@acorex/modules 19.0.1 → 19.1.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.
- package/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.d.ts +1 -0
- package/auth/lib/menu.provider.d.ts +1 -0
- package/auth/lib/setting.provider.d.ts +4 -0
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CtWwcZOU.mjs → acorex-modules-auth-acorex-modules-auth-D8WcF6Jp.mjs} +80 -9
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-D8WcF6Jp.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BK4Hs5OP.mjs → acorex-modules-auth-app-chooser.component-0TpgRa-v.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BK4Hs5OP.mjs.map → acorex-modules-auth-app-chooser.component-0TpgRa-v.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-Cvr3l9wl.mjs → acorex-modules-auth-login.module-CziF_sE7.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-Cvr3l9wl.mjs.map → acorex-modules-auth-login.module-CziF_sE7.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-4jTF1Xhx.mjs → acorex-modules-auth-master.layout-Ds4LxKSf.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-4jTF1Xhx.mjs.map → acorex-modules-auth-master.layout-Ds4LxKSf.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-DeCK_glZ.mjs → acorex-modules-auth-password.component-9TFb-AHn.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-DeCK_glZ.mjs.map → acorex-modules-auth-password.component-9TFb-AHn.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-C5soTmv9.mjs → acorex-modules-auth-password.component-BVVvl8So.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-C5soTmv9.mjs.map → acorex-modules-auth-password.component-BVVvl8So.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-DqgtVe9G.mjs → acorex-modules-auth-routes-TdAn72Pa.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-DqgtVe9G.mjs.map → acorex-modules-auth-routes-TdAn72Pa.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-C99NYq3o.mjs → acorex-modules-auth-two-factor.module-BE2uEne7.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-C99NYq3o.mjs.map → acorex-modules-auth-two-factor.module-BE2uEne7.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +1 -1
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-D_FkgF0W.mjs → acorex-modules-form-template-management-template-picker.component-BXOyKuAt.mjs} +3 -3
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BXOyKuAt.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-Bgx5YRBc.mjs → acorex-modules-form-template-management-template-widget-edit.component-DQw5qvib.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-Bgx5YRBc.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-DQw5qvib.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +76 -11
- package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +1 -0
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-management-countries-CuJVdPLt.mjs +19 -0
- package/fesm2022/acorex-modules-platform-management-countries-CuJVdPLt.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management-currencies-vgPg4Hj3.mjs +13 -0
- package/fesm2022/acorex-modules-platform-management-currencies-vgPg4Hj3.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management-regional-formats-BSMV12dQ.mjs +14 -0
- package/fesm2022/acorex-modules-platform-management-regional-formats-BSMV12dQ.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management.mjs +355 -1456
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-text-template-management.mjs +3 -305
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/form-template-management/lib/components/widgets/template/template-widget-designer.component.d.ts +2 -2
- package/form-template-management/lib/menu.provider.d.ts +1 -1
- package/form-template-management/lib/setting.provider.d.ts +4 -0
- package/package.json +6 -10
- package/platform-management/lib/common/common.module.d.ts +5 -1
- package/platform-management/lib/common/index.d.ts +0 -2
- package/platform-management/lib/common/regional/data/countries.d.ts +2 -0
- package/platform-management/lib/common/regional/data/currencies.d.ts +2 -0
- package/platform-management/lib/common/regional/data/regional-formats.d.ts +2 -0
- package/platform-management/lib/common/regional/data/timezones.d.ts +2 -0
- package/{localization-management/lib/language → platform-management/lib/common/regional}/language-slot/language-slot.component.d.ts +8 -6
- package/platform-management/lib/common/regional/regional-store.service.d.ts +14 -0
- package/platform-management/lib/common/regional/regional.types.d.ts +37 -0
- package/platform-management/lib/common/regional/setting.keys.d.ts +13 -0
- package/platform-management/lib/common/regional/setting.provider.d.ts +17 -0
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-CtWwcZOU.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-D_FkgF0W.mjs.map +0 -1
- package/fesm2022/acorex-modules-localization-management.mjs +0 -1023
- package/fesm2022/acorex-modules-localization-management.mjs.map +0 -1
- package/localization-management/README.md +0 -4
- package/localization-management/index.d.ts +0 -8
- package/localization-management/lib/const.d.ts +0 -8
- package/localization-management/lib/culture/culture.entity.d.ts +0 -3
- package/localization-management/lib/culture/culture.service.d.ts +0 -10
- package/localization-management/lib/culture/culture.types.d.ts +0 -12
- package/localization-management/lib/culture/index.d.ts +0 -3
- package/localization-management/lib/entity.loader.d.ts +0 -9
- package/localization-management/lib/language/index.d.ts +0 -3
- package/localization-management/lib/language/language.entity.d.ts +0 -3
- package/localization-management/lib/language/language.service.d.ts +0 -10
- package/localization-management/lib/language/language.types.d.ts +0 -5
- package/localization-management/lib/localization-management.module.d.ts +0 -10
- package/localization-management/lib/localization-management.source.d.ts +0 -3
- package/localization-management/lib/localization-store.service.d.ts +0 -7
- package/localization-management/lib/menu.provider.d.ts +0 -5
- package/localization-management/lib/time-zone/index.d.ts +0 -3
- package/localization-management/lib/time-zone/time-zone.entity.d.ts +0 -3
- package/localization-management/lib/time-zone/time-zone.service.d.ts +0 -10
- package/localization-management/lib/time-zone/time-zone.types.d.ts +0 -9
- package/platform-management/lib/common/country/country-datasource.provider.d.ts +0 -5
- package/platform-management/lib/common/country/country.entity.d.ts +0 -3
- package/platform-management/lib/common/country/country.service.d.ts +0 -10
- package/platform-management/lib/common/country/country.types.d.ts +0 -18
- package/platform-management/lib/common/country/index.d.ts +0 -3
- package/platform-management/lib/common/currency/currency.entity.d.ts +0 -3
- package/platform-management/lib/common/currency/currency.service.d.ts +0 -10
- package/platform-management/lib/common/currency/currency.types.d.ts +0 -6
- package/platform-management/lib/common/currency/index.d.ts +0 -3
- package/platform-management/lib/common/province/index.d.ts +0 -3
- package/platform-management/lib/common/province/province.entity.d.ts +0 -3
- package/platform-management/lib/common/province/province.service.d.ts +0 -10
- package/platform-management/lib/common/province/province.types.d.ts +0 -7
@@ -1,1030 +1,19 @@
|
|
1
|
-
import
|
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
3
|
import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityService } from '@acorex/platform/layout/entity';
|
3
4
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable,
|
5
|
-
import { AXPWidgetsCatalog
|
6
|
-
import {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
provinceEntity: 'provinces',
|
17
|
-
cityEntity: 'cities',
|
18
|
-
};
|
19
|
-
|
20
|
-
class AXMCountryService extends AXMEntityCrudServiceImpl {
|
21
|
-
}
|
22
|
-
class AXMCountryServiceImpl extends AXMCountryService {
|
23
|
-
constructor() {
|
24
|
-
super(`${AXMPlatformManagementModuleConst.moduleName}.${AXMPlatformManagementModuleConst.countryEntity}`);
|
25
|
-
}
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCountryServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
27
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCountryServiceImpl }); }
|
28
|
-
}
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCountryServiceImpl, decorators: [{
|
30
|
-
type: Injectable
|
31
|
-
}], ctorParameters: () => [] });
|
32
|
-
|
33
|
-
async function countryEntityFactory(injector) {
|
34
|
-
const dataService = injector.get(AXMCountryService);
|
35
|
-
const entityDef = {
|
36
|
-
module: AXMPlatformManagementModuleConst.moduleName,
|
37
|
-
name: AXMPlatformManagementModuleConst.countryEntity,
|
38
|
-
source: '',
|
39
|
-
title: 't("country", { scope: "common" })',
|
40
|
-
formats: {
|
41
|
-
individual: 't("country", { scope: "common" })',
|
42
|
-
plural: 't("countries", { scope: "common" })',
|
43
|
-
},
|
44
|
-
relatedEntities: [
|
45
|
-
{
|
46
|
-
entity: 'common.province',
|
47
|
-
title: 't("provinces", { scope: "common" })',
|
48
|
-
columns: ['title'],
|
49
|
-
conditions: [
|
50
|
-
{
|
51
|
-
name: 'countryId',
|
52
|
-
operator: {
|
53
|
-
type: 'equal',
|
54
|
-
},
|
55
|
-
value: '${id}',
|
56
|
-
},
|
57
|
-
],
|
58
|
-
},
|
59
|
-
],
|
60
|
-
groups: [
|
61
|
-
{
|
62
|
-
id: 'country',
|
63
|
-
title: 'Country',
|
64
|
-
},
|
65
|
-
{
|
66
|
-
id: 'extra',
|
67
|
-
title: 'Global',
|
68
|
-
},
|
69
|
-
{
|
70
|
-
id: 'geo',
|
71
|
-
title: 'Geo',
|
72
|
-
},
|
73
|
-
],
|
74
|
-
properties: [
|
75
|
-
{
|
76
|
-
name: 'title',
|
77
|
-
title: 'Title',
|
78
|
-
groupId: 'country',
|
79
|
-
schema: {
|
80
|
-
dataType: 'string',
|
81
|
-
interface: {
|
82
|
-
type: AXPWidgetsCatalog.text,
|
83
|
-
},
|
84
|
-
},
|
85
|
-
validations: [
|
86
|
-
{
|
87
|
-
rule: 'required',
|
88
|
-
},
|
89
|
-
],
|
90
|
-
},
|
91
|
-
{
|
92
|
-
name: 'iso3',
|
93
|
-
title: 'ISO3 Code',
|
94
|
-
groupId: 'country',
|
95
|
-
schema: {
|
96
|
-
dataType: 'string',
|
97
|
-
interface: {
|
98
|
-
type: AXPWidgetsCatalog.text,
|
99
|
-
},
|
100
|
-
},
|
101
|
-
validations: [
|
102
|
-
{
|
103
|
-
rule: 'required',
|
104
|
-
},
|
105
|
-
],
|
106
|
-
},
|
107
|
-
{
|
108
|
-
name: 'iso2',
|
109
|
-
title: 'ISO2 Code',
|
110
|
-
groupId: 'country',
|
111
|
-
schema: {
|
112
|
-
dataType: 'string',
|
113
|
-
interface: {
|
114
|
-
type: AXPWidgetsCatalog.text,
|
115
|
-
},
|
116
|
-
},
|
117
|
-
validations: [
|
118
|
-
{
|
119
|
-
rule: 'required',
|
120
|
-
},
|
121
|
-
],
|
122
|
-
},
|
123
|
-
{
|
124
|
-
name: 'numericCode',
|
125
|
-
title: 'Numeric Code',
|
126
|
-
groupId: 'country',
|
127
|
-
schema: {
|
128
|
-
dataType: 'string',
|
129
|
-
interface: {
|
130
|
-
type: AXPWidgetsCatalog.text,
|
131
|
-
},
|
132
|
-
},
|
133
|
-
validations: [
|
134
|
-
{
|
135
|
-
rule: 'required',
|
136
|
-
},
|
137
|
-
],
|
138
|
-
},
|
139
|
-
{
|
140
|
-
name: 'nativeName',
|
141
|
-
title: 'Native Name',
|
142
|
-
groupId: 'geo',
|
143
|
-
schema: {
|
144
|
-
dataType: 'string',
|
145
|
-
interface: {
|
146
|
-
type: AXPWidgetsCatalog.text,
|
147
|
-
},
|
148
|
-
},
|
149
|
-
validations: [
|
150
|
-
{
|
151
|
-
rule: 'required',
|
152
|
-
},
|
153
|
-
],
|
154
|
-
},
|
155
|
-
{
|
156
|
-
name: 'region',
|
157
|
-
title: 'Region',
|
158
|
-
groupId: 'geo',
|
159
|
-
schema: {
|
160
|
-
dataType: 'string',
|
161
|
-
interface: {
|
162
|
-
type: AXPWidgetsCatalog.text,
|
163
|
-
},
|
164
|
-
},
|
165
|
-
validations: [
|
166
|
-
{
|
167
|
-
rule: 'required',
|
168
|
-
},
|
169
|
-
],
|
170
|
-
},
|
171
|
-
{
|
172
|
-
name: 'subregion',
|
173
|
-
title: 'SubRegion',
|
174
|
-
groupId: 'geo',
|
175
|
-
schema: {
|
176
|
-
dataType: 'string',
|
177
|
-
interface: {
|
178
|
-
type: AXPWidgetsCatalog.text,
|
179
|
-
},
|
180
|
-
},
|
181
|
-
validations: [
|
182
|
-
{
|
183
|
-
rule: 'required',
|
184
|
-
},
|
185
|
-
],
|
186
|
-
},
|
187
|
-
{
|
188
|
-
name: 'nationality',
|
189
|
-
title: 'Nationality',
|
190
|
-
groupId: 'geo',
|
191
|
-
schema: {
|
192
|
-
dataType: 'string',
|
193
|
-
interface: {
|
194
|
-
type: AXPWidgetsCatalog.text,
|
195
|
-
},
|
196
|
-
},
|
197
|
-
validations: [
|
198
|
-
{
|
199
|
-
rule: 'required',
|
200
|
-
},
|
201
|
-
],
|
202
|
-
},
|
203
|
-
{
|
204
|
-
name: 'geo.latitude',
|
205
|
-
title: 'Latitude',
|
206
|
-
groupId: 'geo',
|
207
|
-
schema: {
|
208
|
-
dataType: 'string',
|
209
|
-
interface: {
|
210
|
-
type: AXPWidgetsCatalog.text,
|
211
|
-
},
|
212
|
-
},
|
213
|
-
validations: [
|
214
|
-
{
|
215
|
-
rule: 'required',
|
216
|
-
},
|
217
|
-
],
|
218
|
-
},
|
219
|
-
{
|
220
|
-
name: 'geo.longitude',
|
221
|
-
title: 'Longitude',
|
222
|
-
groupId: 'geo',
|
223
|
-
schema: {
|
224
|
-
dataType: 'string',
|
225
|
-
interface: {
|
226
|
-
type: AXPWidgetsCatalog.text,
|
227
|
-
},
|
228
|
-
},
|
229
|
-
validations: [
|
230
|
-
{
|
231
|
-
rule: 'required',
|
232
|
-
},
|
233
|
-
],
|
234
|
-
},
|
235
|
-
{
|
236
|
-
name: 'capital',
|
237
|
-
title: 'Capital',
|
238
|
-
groupId: 'extra',
|
239
|
-
schema: {
|
240
|
-
dataType: 'string',
|
241
|
-
interface: {
|
242
|
-
type: AXPWidgetsCatalog.text,
|
243
|
-
},
|
244
|
-
},
|
245
|
-
validations: [
|
246
|
-
{
|
247
|
-
rule: 'required',
|
248
|
-
},
|
249
|
-
],
|
250
|
-
},
|
251
|
-
{
|
252
|
-
name: 'tld',
|
253
|
-
title: 'Top Level Domain',
|
254
|
-
groupId: 'extra',
|
255
|
-
schema: {
|
256
|
-
dataType: 'string',
|
257
|
-
interface: {
|
258
|
-
type: AXPWidgetsCatalog.text,
|
259
|
-
},
|
260
|
-
},
|
261
|
-
validations: [
|
262
|
-
{
|
263
|
-
rule: 'required',
|
264
|
-
},
|
265
|
-
],
|
266
|
-
},
|
267
|
-
],
|
268
|
-
columns: [{ name: 'title' }, { name: 'iso2' }, { name: 'nativeName' }, { name: 'region' }],
|
269
|
-
commands: {
|
270
|
-
create: {
|
271
|
-
execute: async (data) => {
|
272
|
-
return Promise.resolve({ id: await dataService.insertOne(data) });
|
273
|
-
},
|
274
|
-
},
|
275
|
-
delete: {
|
276
|
-
execute: async (id) => {
|
277
|
-
await dataService.deleteOne(id);
|
278
|
-
return Promise.resolve();
|
279
|
-
},
|
280
|
-
},
|
281
|
-
update: {
|
282
|
-
execute: async (data) => {
|
283
|
-
return new Promise((resolve) => {
|
284
|
-
setTimeout(async () => {
|
285
|
-
await dataService.updateOne(data.id, data);
|
286
|
-
resolve(data);
|
287
|
-
}, 1000);
|
288
|
-
});
|
289
|
-
},
|
290
|
-
},
|
291
|
-
},
|
292
|
-
queries: {
|
293
|
-
byKey: {
|
294
|
-
execute: async (id) => {
|
295
|
-
return new Promise((resolve) => {
|
296
|
-
setTimeout(async () => {
|
297
|
-
const entity = await dataService.getOne(id);
|
298
|
-
resolve(entity);
|
299
|
-
}, 500);
|
300
|
-
});
|
301
|
-
},
|
302
|
-
type: AXPEntityQueryType.Single,
|
303
|
-
},
|
304
|
-
list: {
|
305
|
-
execute: async (e) => {
|
306
|
-
return dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
|
307
|
-
},
|
308
|
-
type: AXPEntityQueryType.List,
|
309
|
-
},
|
310
|
-
},
|
311
|
-
interfaces: {
|
312
|
-
master: {
|
313
|
-
create: {
|
314
|
-
sections: [
|
315
|
-
{
|
316
|
-
id: 'country',
|
317
|
-
},
|
318
|
-
],
|
319
|
-
properties: [
|
320
|
-
{
|
321
|
-
name: 'title',
|
322
|
-
layout: {
|
323
|
-
positions: {
|
324
|
-
lg: {
|
325
|
-
colSpan: 6,
|
326
|
-
},
|
327
|
-
},
|
328
|
-
},
|
329
|
-
},
|
330
|
-
{
|
331
|
-
name: 'nativeName',
|
332
|
-
layout: {
|
333
|
-
positions: {
|
334
|
-
lg: {
|
335
|
-
colSpan: 6,
|
336
|
-
},
|
337
|
-
},
|
338
|
-
},
|
339
|
-
},
|
340
|
-
{
|
341
|
-
name: 'iso3',
|
342
|
-
layout: {
|
343
|
-
positions: {
|
344
|
-
lg: {
|
345
|
-
colSpan: 4,
|
346
|
-
},
|
347
|
-
},
|
348
|
-
},
|
349
|
-
},
|
350
|
-
{
|
351
|
-
name: 'iso2',
|
352
|
-
layout: {
|
353
|
-
positions: {
|
354
|
-
lg: {
|
355
|
-
colSpan: 4,
|
356
|
-
},
|
357
|
-
},
|
358
|
-
},
|
359
|
-
},
|
360
|
-
{
|
361
|
-
name: 'numericCode',
|
362
|
-
layout: {
|
363
|
-
positions: {
|
364
|
-
lg: {
|
365
|
-
colSpan: 4,
|
366
|
-
},
|
367
|
-
},
|
368
|
-
},
|
369
|
-
},
|
370
|
-
{
|
371
|
-
name: 'region',
|
372
|
-
layout: {
|
373
|
-
positions: {
|
374
|
-
lg: {
|
375
|
-
colSpan: 6,
|
376
|
-
},
|
377
|
-
},
|
378
|
-
},
|
379
|
-
},
|
380
|
-
{
|
381
|
-
name: 'subregion',
|
382
|
-
layout: {
|
383
|
-
positions: {
|
384
|
-
lg: {
|
385
|
-
colSpan: 6,
|
386
|
-
},
|
387
|
-
},
|
388
|
-
},
|
389
|
-
},
|
390
|
-
{
|
391
|
-
name: 'Nationality',
|
392
|
-
layout: {
|
393
|
-
positions: {
|
394
|
-
lg: {
|
395
|
-
colSpan: 6,
|
396
|
-
},
|
397
|
-
},
|
398
|
-
},
|
399
|
-
},
|
400
|
-
{
|
401
|
-
name: 'geo.latitude',
|
402
|
-
layout: {
|
403
|
-
positions: {
|
404
|
-
lg: {
|
405
|
-
colSpan: 3,
|
406
|
-
},
|
407
|
-
},
|
408
|
-
},
|
409
|
-
},
|
410
|
-
{
|
411
|
-
name: 'geo.longitude',
|
412
|
-
layout: {
|
413
|
-
positions: {
|
414
|
-
lg: {
|
415
|
-
colSpan: 3,
|
416
|
-
},
|
417
|
-
},
|
418
|
-
},
|
419
|
-
},
|
420
|
-
{
|
421
|
-
name: 'capital',
|
422
|
-
layout: {
|
423
|
-
positions: {
|
424
|
-
lg: {
|
425
|
-
colSpan: 6,
|
426
|
-
},
|
427
|
-
},
|
428
|
-
},
|
429
|
-
},
|
430
|
-
{
|
431
|
-
name: 'tld',
|
432
|
-
layout: {
|
433
|
-
positions: {
|
434
|
-
lg: {
|
435
|
-
colSpan: 6,
|
436
|
-
},
|
437
|
-
},
|
438
|
-
},
|
439
|
-
},
|
440
|
-
],
|
441
|
-
},
|
442
|
-
update: {
|
443
|
-
sections: [
|
444
|
-
{
|
445
|
-
id: 'country',
|
446
|
-
},
|
447
|
-
],
|
448
|
-
properties: [
|
449
|
-
{
|
450
|
-
name: 'title',
|
451
|
-
layout: {
|
452
|
-
positions: {
|
453
|
-
lg: {
|
454
|
-
colSpan: 6,
|
455
|
-
},
|
456
|
-
},
|
457
|
-
},
|
458
|
-
},
|
459
|
-
{
|
460
|
-
name: 'nativeName',
|
461
|
-
layout: {
|
462
|
-
positions: {
|
463
|
-
lg: {
|
464
|
-
colSpan: 6,
|
465
|
-
},
|
466
|
-
},
|
467
|
-
},
|
468
|
-
},
|
469
|
-
{
|
470
|
-
name: 'iso3',
|
471
|
-
layout: {
|
472
|
-
positions: {
|
473
|
-
lg: {
|
474
|
-
colSpan: 4,
|
475
|
-
},
|
476
|
-
},
|
477
|
-
},
|
478
|
-
},
|
479
|
-
{
|
480
|
-
name: 'iso2',
|
481
|
-
layout: {
|
482
|
-
positions: {
|
483
|
-
lg: {
|
484
|
-
colSpan: 4,
|
485
|
-
},
|
486
|
-
},
|
487
|
-
},
|
488
|
-
},
|
489
|
-
{
|
490
|
-
name: 'numericCode',
|
491
|
-
layout: {
|
492
|
-
positions: {
|
493
|
-
lg: {
|
494
|
-
colSpan: 4,
|
495
|
-
},
|
496
|
-
},
|
497
|
-
},
|
498
|
-
},
|
499
|
-
{
|
500
|
-
name: 'region',
|
501
|
-
layout: {
|
502
|
-
positions: {
|
503
|
-
lg: {
|
504
|
-
colSpan: 6,
|
505
|
-
},
|
506
|
-
},
|
507
|
-
},
|
508
|
-
},
|
509
|
-
{
|
510
|
-
name: 'subregion',
|
511
|
-
layout: {
|
512
|
-
positions: {
|
513
|
-
lg: {
|
514
|
-
colSpan: 6,
|
515
|
-
},
|
516
|
-
},
|
517
|
-
},
|
518
|
-
},
|
519
|
-
{
|
520
|
-
name: 'nationality',
|
521
|
-
layout: {
|
522
|
-
positions: {
|
523
|
-
lg: {
|
524
|
-
colSpan: 6,
|
525
|
-
},
|
526
|
-
},
|
527
|
-
},
|
528
|
-
},
|
529
|
-
{
|
530
|
-
name: 'geo.latitude',
|
531
|
-
layout: {
|
532
|
-
positions: {
|
533
|
-
lg: {
|
534
|
-
colSpan: 3,
|
535
|
-
},
|
536
|
-
},
|
537
|
-
},
|
538
|
-
},
|
539
|
-
{
|
540
|
-
name: 'geo.longitude',
|
541
|
-
layout: {
|
542
|
-
positions: {
|
543
|
-
lg: {
|
544
|
-
colSpan: 3,
|
545
|
-
},
|
546
|
-
},
|
547
|
-
},
|
548
|
-
},
|
549
|
-
{
|
550
|
-
name: 'capital',
|
551
|
-
layout: {
|
552
|
-
positions: {
|
553
|
-
lg: {
|
554
|
-
colSpan: 6,
|
555
|
-
},
|
556
|
-
},
|
557
|
-
},
|
558
|
-
},
|
559
|
-
{
|
560
|
-
name: 'tld',
|
561
|
-
layout: {
|
562
|
-
positions: {
|
563
|
-
lg: {
|
564
|
-
colSpan: 6,
|
565
|
-
},
|
566
|
-
},
|
567
|
-
},
|
568
|
-
},
|
569
|
-
],
|
570
|
-
},
|
571
|
-
single: {
|
572
|
-
title: '{{title}}',
|
573
|
-
sections: [
|
574
|
-
{
|
575
|
-
id: 'country',
|
576
|
-
},
|
577
|
-
{
|
578
|
-
id: 'extra',
|
579
|
-
},
|
580
|
-
{
|
581
|
-
id: 'geo',
|
582
|
-
},
|
583
|
-
],
|
584
|
-
properties: [
|
585
|
-
{
|
586
|
-
name: 'title',
|
587
|
-
layout: {
|
588
|
-
positions: {
|
589
|
-
lg: {
|
590
|
-
colSpan: 5,
|
591
|
-
},
|
592
|
-
},
|
593
|
-
},
|
594
|
-
},
|
595
|
-
{
|
596
|
-
name: 'iso2',
|
597
|
-
layout: {
|
598
|
-
positions: {
|
599
|
-
lg: {
|
600
|
-
colSpan: 2,
|
601
|
-
},
|
602
|
-
},
|
603
|
-
},
|
604
|
-
},
|
605
|
-
{
|
606
|
-
name: 'iso3',
|
607
|
-
layout: {
|
608
|
-
positions: {
|
609
|
-
lg: {
|
610
|
-
colSpan: 2,
|
611
|
-
},
|
612
|
-
},
|
613
|
-
},
|
614
|
-
},
|
615
|
-
{
|
616
|
-
name: 'numericCode',
|
617
|
-
layout: {
|
618
|
-
positions: {
|
619
|
-
lg: {
|
620
|
-
colSpan: 3,
|
621
|
-
},
|
622
|
-
},
|
623
|
-
},
|
624
|
-
},
|
625
|
-
{
|
626
|
-
name: 'nativeName',
|
627
|
-
layout: {
|
628
|
-
positions: {
|
629
|
-
lg: {
|
630
|
-
colSpan: 6,
|
631
|
-
},
|
632
|
-
},
|
633
|
-
},
|
634
|
-
},
|
635
|
-
{
|
636
|
-
name: 'nationality',
|
637
|
-
layout: {
|
638
|
-
positions: {
|
639
|
-
lg: {
|
640
|
-
colSpan: 6,
|
641
|
-
},
|
642
|
-
},
|
643
|
-
},
|
644
|
-
},
|
645
|
-
{
|
646
|
-
name: 'region',
|
647
|
-
layout: {
|
648
|
-
positions: {
|
649
|
-
lg: {
|
650
|
-
colSpan: 6,
|
651
|
-
},
|
652
|
-
},
|
653
|
-
},
|
654
|
-
},
|
655
|
-
{
|
656
|
-
name: 'subRegion',
|
657
|
-
layout: {
|
658
|
-
positions: {
|
659
|
-
lg: {
|
660
|
-
colSpan: 6,
|
661
|
-
},
|
662
|
-
},
|
663
|
-
},
|
664
|
-
},
|
665
|
-
{
|
666
|
-
name: 'geo.latitude',
|
667
|
-
layout: {
|
668
|
-
positions: {
|
669
|
-
lg: {
|
670
|
-
colSpan: 6,
|
671
|
-
},
|
672
|
-
},
|
673
|
-
},
|
674
|
-
},
|
675
|
-
],
|
676
|
-
actions: [],
|
677
|
-
},
|
678
|
-
list: {
|
679
|
-
actions: [
|
680
|
-
{
|
681
|
-
title: 't("create", { scope: "common" })',
|
682
|
-
command: 'create-entity',
|
683
|
-
priority: 'primary',
|
684
|
-
type: 'create',
|
685
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
686
|
-
},
|
687
|
-
{
|
688
|
-
title: 't("deleteItems", { scope: "common" })',
|
689
|
-
command: 'delete-entity',
|
690
|
-
priority: 'primary',
|
691
|
-
type: 'delete',
|
692
|
-
scope: AXPEntityCommandScope.Selected,
|
693
|
-
},
|
694
|
-
{
|
695
|
-
title: 't("detail", { scope: "common" })',
|
696
|
-
command: 'open-entity',
|
697
|
-
priority: 'secondary',
|
698
|
-
type: 'view',
|
699
|
-
scope: AXPEntityCommandScope.Individual,
|
700
|
-
},
|
701
|
-
{
|
702
|
-
title: 't("delete", { scope: "common" })',
|
703
|
-
command: 'delete-entity',
|
704
|
-
priority: 'secondary',
|
705
|
-
type: 'delete',
|
706
|
-
scope: AXPEntityCommandScope.Individual,
|
707
|
-
},
|
708
|
-
],
|
709
|
-
views: [
|
710
|
-
{
|
711
|
-
name: 'all',
|
712
|
-
title: 't("allItem", { scope: "common" })',
|
713
|
-
fixed: true,
|
714
|
-
columns: [],
|
715
|
-
conditions: [],
|
716
|
-
sorts: [],
|
717
|
-
},
|
718
|
-
],
|
719
|
-
},
|
720
|
-
},
|
721
|
-
},
|
722
|
-
};
|
723
|
-
return entityDef;
|
724
|
-
}
|
725
|
-
|
726
|
-
var country_entity = /*#__PURE__*/Object.freeze({
|
727
|
-
__proto__: null,
|
728
|
-
countryEntityFactory: countryEntityFactory
|
729
|
-
});
|
730
|
-
|
731
|
-
class AXMCurrencyService extends AXMEntityCrudServiceImpl {
|
732
|
-
}
|
733
|
-
class AXMCurrencyServiceImpl extends AXMCurrencyService {
|
734
|
-
constructor() {
|
735
|
-
super(`${AXMPlatformManagementModuleConst.moduleName}.${AXMPlatformManagementModuleConst.currencyEntity}`);
|
736
|
-
}
|
737
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCurrencyServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
738
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCurrencyServiceImpl }); }
|
739
|
-
}
|
740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCurrencyServiceImpl, decorators: [{
|
741
|
-
type: Injectable
|
742
|
-
}], ctorParameters: () => [] });
|
743
|
-
|
744
|
-
async function currencyEntityFactory(injector) {
|
745
|
-
const dataService = injector.get(AXMCurrencyService);
|
746
|
-
const entityDef = {
|
747
|
-
module: AXMPlatformManagementModuleConst.moduleName,
|
748
|
-
name: AXMPlatformManagementModuleConst.currencyEntity,
|
749
|
-
source: '',
|
750
|
-
title: 'Currency',
|
751
|
-
formats: {
|
752
|
-
individual: 'Currency',
|
753
|
-
plural: 'Currencies',
|
754
|
-
},
|
755
|
-
relatedEntities: [],
|
756
|
-
groups: [
|
757
|
-
{
|
758
|
-
id: 'currency',
|
759
|
-
title: 'Currency',
|
760
|
-
},
|
761
|
-
],
|
762
|
-
properties: [
|
763
|
-
{
|
764
|
-
name: 'title',
|
765
|
-
title: 'Title',
|
766
|
-
groupId: 'currency',
|
767
|
-
schema: {
|
768
|
-
dataType: 'string',
|
769
|
-
interface: {
|
770
|
-
type: AXPWidgetsCatalog.text,
|
771
|
-
},
|
772
|
-
},
|
773
|
-
validations: [
|
774
|
-
{
|
775
|
-
rule: 'required',
|
776
|
-
},
|
777
|
-
],
|
778
|
-
},
|
779
|
-
{
|
780
|
-
name: 'code',
|
781
|
-
title: 'Code',
|
782
|
-
groupId: 'currency',
|
783
|
-
schema: {
|
784
|
-
dataType: 'string',
|
785
|
-
interface: {
|
786
|
-
type: AXPWidgetsCatalog.text,
|
787
|
-
},
|
788
|
-
},
|
789
|
-
validations: [
|
790
|
-
{
|
791
|
-
rule: 'required',
|
792
|
-
},
|
793
|
-
],
|
794
|
-
},
|
795
|
-
{
|
796
|
-
name: 'symbol',
|
797
|
-
title: 'Symbol',
|
798
|
-
groupId: 'currency',
|
799
|
-
schema: {
|
800
|
-
dataType: 'string',
|
801
|
-
interface: {
|
802
|
-
type: AXPWidgetsCatalog.text,
|
803
|
-
},
|
804
|
-
},
|
805
|
-
validations: [
|
806
|
-
{
|
807
|
-
rule: 'required',
|
808
|
-
},
|
809
|
-
],
|
810
|
-
},
|
811
|
-
],
|
812
|
-
columns: [{ name: 'title' }, { name: 'code' }, { name: 'symbol' }],
|
813
|
-
commands: {
|
814
|
-
create: {
|
815
|
-
execute: async (data) => {
|
816
|
-
return Promise.resolve({ id: await dataService.insertOne(data) });
|
817
|
-
},
|
818
|
-
},
|
819
|
-
delete: {
|
820
|
-
execute: async (id) => {
|
821
|
-
await dataService.deleteOne(id);
|
822
|
-
return Promise.resolve();
|
823
|
-
},
|
824
|
-
},
|
825
|
-
update: {
|
826
|
-
execute: async (data) => {
|
827
|
-
return new Promise((resolve) => {
|
828
|
-
setTimeout(async () => {
|
829
|
-
await dataService.updateOne(data.id, data);
|
830
|
-
resolve(data);
|
831
|
-
}, 1000);
|
832
|
-
});
|
833
|
-
},
|
834
|
-
},
|
835
|
-
},
|
836
|
-
queries: {
|
837
|
-
byKey: {
|
838
|
-
execute: async (id) => {
|
839
|
-
return new Promise((resolve) => {
|
840
|
-
setTimeout(async () => {
|
841
|
-
const entity = await dataService.getOne(id);
|
842
|
-
resolve(entity);
|
843
|
-
}, 500);
|
844
|
-
});
|
845
|
-
},
|
846
|
-
type: AXPEntityQueryType.Single,
|
847
|
-
},
|
848
|
-
list: {
|
849
|
-
execute: async (e) => {
|
850
|
-
return dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
|
851
|
-
},
|
852
|
-
type: AXPEntityQueryType.List,
|
853
|
-
},
|
854
|
-
},
|
855
|
-
interfaces: {
|
856
|
-
master: {
|
857
|
-
create: {
|
858
|
-
sections: [
|
859
|
-
{
|
860
|
-
id: 'currency',
|
861
|
-
},
|
862
|
-
],
|
863
|
-
properties: [
|
864
|
-
{
|
865
|
-
name: 'title',
|
866
|
-
layout: {
|
867
|
-
positions: {
|
868
|
-
lg: {
|
869
|
-
colSpan: 12,
|
870
|
-
},
|
871
|
-
},
|
872
|
-
},
|
873
|
-
},
|
874
|
-
{
|
875
|
-
name: 'code',
|
876
|
-
layout: {
|
877
|
-
positions: {
|
878
|
-
lg: {
|
879
|
-
colSpan: 6,
|
880
|
-
},
|
881
|
-
},
|
882
|
-
},
|
883
|
-
},
|
884
|
-
{
|
885
|
-
name: 'symbol',
|
886
|
-
layout: {
|
887
|
-
positions: {
|
888
|
-
lg: {
|
889
|
-
colSpan: 6,
|
890
|
-
},
|
891
|
-
},
|
892
|
-
},
|
893
|
-
},
|
894
|
-
],
|
895
|
-
},
|
896
|
-
update: {
|
897
|
-
sections: [
|
898
|
-
{
|
899
|
-
id: 'currency',
|
900
|
-
},
|
901
|
-
],
|
902
|
-
properties: [
|
903
|
-
{
|
904
|
-
name: 'title',
|
905
|
-
layout: {
|
906
|
-
positions: {
|
907
|
-
lg: {
|
908
|
-
colSpan: 12,
|
909
|
-
},
|
910
|
-
},
|
911
|
-
},
|
912
|
-
},
|
913
|
-
{
|
914
|
-
name: 'code',
|
915
|
-
layout: {
|
916
|
-
positions: {
|
917
|
-
lg: {
|
918
|
-
colSpan: 6,
|
919
|
-
},
|
920
|
-
},
|
921
|
-
},
|
922
|
-
},
|
923
|
-
{
|
924
|
-
name: 'symbol',
|
925
|
-
layout: {
|
926
|
-
positions: {
|
927
|
-
lg: {
|
928
|
-
colSpan: 6,
|
929
|
-
},
|
930
|
-
},
|
931
|
-
},
|
932
|
-
},
|
933
|
-
],
|
934
|
-
},
|
935
|
-
single: {
|
936
|
-
title: '{{title}}',
|
937
|
-
sections: [
|
938
|
-
{
|
939
|
-
id: 'currency',
|
940
|
-
},
|
941
|
-
],
|
942
|
-
properties: [
|
943
|
-
{
|
944
|
-
name: 'title',
|
945
|
-
layout: {
|
946
|
-
positions: {
|
947
|
-
lg: {
|
948
|
-
colSpan: 6,
|
949
|
-
},
|
950
|
-
},
|
951
|
-
},
|
952
|
-
},
|
953
|
-
{
|
954
|
-
name: 'code',
|
955
|
-
layout: {
|
956
|
-
positions: {
|
957
|
-
lg: {
|
958
|
-
colSpan: 6,
|
959
|
-
},
|
960
|
-
},
|
961
|
-
},
|
962
|
-
},
|
963
|
-
{
|
964
|
-
name: 'symbol',
|
965
|
-
layout: {
|
966
|
-
positions: {
|
967
|
-
lg: {
|
968
|
-
colSpan: 6,
|
969
|
-
},
|
970
|
-
},
|
971
|
-
},
|
972
|
-
},
|
973
|
-
],
|
974
|
-
actions: [],
|
975
|
-
},
|
976
|
-
list: {
|
977
|
-
actions: [
|
978
|
-
{
|
979
|
-
title: 'Create New',
|
980
|
-
command: 'create-entity',
|
981
|
-
priority: 'primary',
|
982
|
-
type: 'create',
|
983
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
984
|
-
},
|
985
|
-
{
|
986
|
-
title: 'Delete Items',
|
987
|
-
command: 'delete-entity',
|
988
|
-
priority: 'primary',
|
989
|
-
type: 'delete',
|
990
|
-
scope: AXPEntityCommandScope.Selected,
|
991
|
-
},
|
992
|
-
{
|
993
|
-
title: 'Details',
|
994
|
-
command: 'open-entity',
|
995
|
-
priority: 'secondary',
|
996
|
-
type: 'view',
|
997
|
-
scope: AXPEntityCommandScope.Individual,
|
998
|
-
},
|
999
|
-
{
|
1000
|
-
title: 'Delete',
|
1001
|
-
command: 'delete-entity',
|
1002
|
-
priority: 'secondary',
|
1003
|
-
type: 'delete',
|
1004
|
-
scope: AXPEntityCommandScope.Individual,
|
1005
|
-
},
|
1006
|
-
],
|
1007
|
-
views: [
|
1008
|
-
{
|
1009
|
-
name: 'all',
|
1010
|
-
title: 'All Items',
|
1011
|
-
fixed: true,
|
1012
|
-
columns: [],
|
1013
|
-
conditions: [],
|
1014
|
-
sorts: [],
|
1015
|
-
},
|
1016
|
-
],
|
1017
|
-
},
|
1018
|
-
},
|
1019
|
-
},
|
1020
|
-
};
|
1021
|
-
return entityDef;
|
1022
|
-
}
|
1023
|
-
|
1024
|
-
var currency_entity = /*#__PURE__*/Object.freeze({
|
1025
|
-
__proto__: null,
|
1026
|
-
currencyEntityFactory: currencyEntityFactory
|
1027
|
-
});
|
5
|
+
import { inject, Injector, Injectable, signal, Component, NgModule } from '@angular/core';
|
6
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
7
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
8
|
+
import { signalStore, withState, withMethods, patchState } from '@ngrx/signals';
|
9
|
+
import * as i3 from '@acorex/components/button';
|
10
|
+
import { AXButtonModule } from '@acorex/components/button';
|
11
|
+
import * as i2 from '@acorex/components/decorators';
|
12
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
13
|
+
import * as i1 from '@acorex/components/dropdown';
|
14
|
+
import { AXDropdownModule } from '@acorex/components/dropdown';
|
15
|
+
import { AXPopoverModule } from '@acorex/components/popover';
|
16
|
+
import { CommonModule } from '@angular/common';
|
1028
17
|
|
1029
18
|
class AXMCommonModuleEntityProvider {
|
1030
19
|
constructor() {
|
@@ -1033,21 +22,6 @@ class AXMCommonModuleEntityProvider {
|
|
1033
22
|
async get(moduleName, entityName) {
|
1034
23
|
return new Promise(async (resolve) => {
|
1035
24
|
switch (entityName) {
|
1036
|
-
case AXMPlatformManagementModuleConst.countryEntity: {
|
1037
|
-
const entity = (await Promise.resolve().then(function () { return country_entity; })).countryEntityFactory;
|
1038
|
-
resolve(entity(this.injector));
|
1039
|
-
break;
|
1040
|
-
}
|
1041
|
-
case AXMPlatformManagementModuleConst.provinceEntity: {
|
1042
|
-
const entity = (await Promise.resolve().then(function () { return province_entity; })).provinceEntityFactory;
|
1043
|
-
resolve(entity(this.injector));
|
1044
|
-
break;
|
1045
|
-
}
|
1046
|
-
case AXMPlatformManagementModuleConst.currencyEntity: {
|
1047
|
-
const entity = (await Promise.resolve().then(function () { return currency_entity; })).currencyEntityFactory;
|
1048
|
-
resolve(entity(this.injector));
|
1049
|
-
break;
|
1050
|
-
}
|
1051
25
|
default:
|
1052
26
|
resolve(null);
|
1053
27
|
}
|
@@ -1055,411 +29,375 @@ class AXMCommonModuleEntityProvider {
|
|
1055
29
|
}
|
1056
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCommonModuleEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1057
31
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCommonModuleEntityProvider }); }
|
1058
|
-
}
|
1059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCommonModuleEntityProvider, decorators: [{
|
1060
|
-
type: Injectable
|
1061
|
-
}] });
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
}
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
}], ctorParameters: () => [] });
|
1099
|
-
|
1100
|
-
async function provinceEntityFactory(injector) {
|
1101
|
-
const dataService = injector.get(AXMProvinceService);
|
1102
|
-
const entityDef = {
|
1103
|
-
module: AXMPlatformManagementModuleConst.moduleName,
|
1104
|
-
name: AXMPlatformManagementModuleConst.provinceEntity,
|
1105
|
-
source: '',
|
1106
|
-
title: `t("${AXMPlatformManagementModuleConst.provinceEntity}", { scope: "common" })`,
|
1107
|
-
formats: {
|
1108
|
-
individual: `province`,
|
1109
|
-
plural: `t("${AXMPlatformManagementModuleConst.provinceEntity}", { scope: "common" })`,
|
1110
|
-
},
|
1111
|
-
relatedEntities: [],
|
1112
|
-
groups: [
|
1113
|
-
{
|
1114
|
-
id: 'province',
|
1115
|
-
title: 't("province", { scope: "common" })',
|
1116
|
-
},
|
1117
|
-
],
|
1118
|
-
properties: [
|
1119
|
-
{
|
1120
|
-
name: 'title',
|
1121
|
-
title: 't("title", { scope: "common" })',
|
1122
|
-
groupId: 'province',
|
1123
|
-
schema: {
|
1124
|
-
dataType: 'string',
|
1125
|
-
interface: {
|
1126
|
-
type: AXPWidgetsCatalog.text,
|
1127
|
-
},
|
1128
|
-
},
|
1129
|
-
validations: [
|
1130
|
-
{
|
1131
|
-
rule: 'required',
|
1132
|
-
},
|
1133
|
-
],
|
1134
|
-
},
|
1135
|
-
{
|
1136
|
-
name: 'name',
|
1137
|
-
title: 't("name", { scope: "common" })',
|
1138
|
-
groupId: 'province',
|
1139
|
-
schema: {
|
1140
|
-
dataType: 'string',
|
1141
|
-
interface: {
|
1142
|
-
type: AXPWidgetsCatalog.text,
|
1143
|
-
},
|
1144
|
-
},
|
1145
|
-
validations: [
|
1146
|
-
{
|
1147
|
-
rule: 'required',
|
1148
|
-
},
|
1149
|
-
],
|
1150
|
-
},
|
1151
|
-
{
|
1152
|
-
name: 'country.id',
|
1153
|
-
title: `country`,
|
1154
|
-
groupId: 'province',
|
1155
|
-
schema: {
|
1156
|
-
dataType: 'string',
|
1157
|
-
interface: {
|
1158
|
-
type: AXPWidgetsCatalog.lookup,
|
1159
|
-
options: {
|
1160
|
-
entity: 'common.countries',
|
1161
|
-
expose: 'country',
|
1162
|
-
},
|
1163
|
-
},
|
1164
|
-
},
|
1165
|
-
validations: [
|
1166
|
-
{
|
1167
|
-
rule: 'required',
|
1168
|
-
},
|
1169
|
-
],
|
1170
|
-
},
|
1171
|
-
{
|
1172
|
-
name: 'country.title',
|
1173
|
-
title: `country`,
|
1174
|
-
groupId: 'province',
|
1175
|
-
schema: {
|
1176
|
-
dataType: 'string',
|
1177
|
-
readonly: true,
|
1178
|
-
interface: {
|
1179
|
-
type: AXPWidgetsCatalog.text,
|
1180
|
-
},
|
1181
|
-
},
|
1182
|
-
options: {
|
1183
|
-
sort: {
|
1184
|
-
enabled: true,
|
1185
|
-
},
|
1186
|
-
},
|
1187
|
-
},
|
1188
|
-
],
|
1189
|
-
columns: [{ name: 'name' }, { name: 'title' }, { name: 'country.title' }],
|
1190
|
-
commands: {
|
1191
|
-
create: {
|
1192
|
-
execute: async (data) => {
|
1193
|
-
return Promise.resolve({ id: await dataService.insertOne(data) });
|
1194
|
-
},
|
1195
|
-
},
|
1196
|
-
delete: {
|
1197
|
-
execute: async (id) => {
|
1198
|
-
await dataService.deleteOne(id);
|
1199
|
-
return Promise.resolve();
|
1200
|
-
},
|
1201
|
-
},
|
1202
|
-
update: {
|
1203
|
-
execute: async (data) => {
|
1204
|
-
return new Promise((resolve) => {
|
1205
|
-
setTimeout(async () => {
|
1206
|
-
await dataService.updateOne(data.id, data);
|
1207
|
-
resolve(data);
|
1208
|
-
}, 1000);
|
1209
|
-
});
|
1210
|
-
},
|
1211
|
-
},
|
32
|
+
}
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMCommonModuleEntityProvider, decorators: [{
|
34
|
+
type: Injectable
|
35
|
+
}] });
|
36
|
+
|
37
|
+
const path = 'settings:regional:';
|
38
|
+
var AXPRegionalSetting;
|
39
|
+
(function (AXPRegionalSetting) {
|
40
|
+
AXPRegionalSetting["TimeZone"] = "settings:regional:timezone";
|
41
|
+
AXPRegionalSetting["Language"] = "settings:regional:language";
|
42
|
+
AXPRegionalSetting["Country"] = "settings:regional:country";
|
43
|
+
AXPRegionalSetting["Regional"] = "settings:regional:regional";
|
44
|
+
AXPRegionalSetting["Calendar"] = "settings:regional:calendar";
|
45
|
+
AXPRegionalSetting["FirstDayOfWeek"] = "settings:regional:first-day-of-week";
|
46
|
+
AXPRegionalSetting["WorkDays"] = "settings:regional:work-days";
|
47
|
+
AXPRegionalSetting["ShortDate"] = "settings:regional:short-date";
|
48
|
+
AXPRegionalSetting["LongDate"] = "settings:regional:long-date";
|
49
|
+
AXPRegionalSetting["ShortTime"] = "settings:regional:short-time";
|
50
|
+
AXPRegionalSetting["LongTime"] = "settings:regional:long-time";
|
51
|
+
})(AXPRegionalSetting || (AXPRegionalSetting = {}));
|
52
|
+
|
53
|
+
// ThemeStore - Manages theme settings and system changes
|
54
|
+
const AXPRegionalStoreService = signalStore({ providedIn: 'root' },
|
55
|
+
// Initial State
|
56
|
+
withState((translationService = inject(AXTranslationService)) => {
|
57
|
+
const state = {
|
58
|
+
language: translationService.getDefaultLang(),
|
59
|
+
};
|
60
|
+
return state;
|
61
|
+
}),
|
62
|
+
// Computed Signals
|
63
|
+
// withComputed(({ }) => ({
|
64
|
+
// })),
|
65
|
+
// Methods for State Management
|
66
|
+
withMethods((store, settingService = inject(AXPSettingValueProviderService), translationService = inject(AXTranslationService)) => {
|
67
|
+
return {
|
68
|
+
changeLanguage(lang) {
|
69
|
+
settingService.set(AXPRegionalSetting.Language, lang);
|
70
|
+
translationService.setActiveLang(lang);
|
71
|
+
patchState(store, { language: lang });
|
1212
72
|
},
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
const entity = await dataService.getOne(id);
|
1219
|
-
resolve(entity);
|
1220
|
-
}, 500);
|
1221
|
-
});
|
1222
|
-
},
|
1223
|
-
type: AXPEntityQueryType.Single,
|
1224
|
-
},
|
1225
|
-
list: {
|
1226
|
-
execute: async (e) => {
|
1227
|
-
let x = await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
|
1228
|
-
return Promise.resolve(x);
|
1229
|
-
},
|
1230
|
-
type: AXPEntityQueryType.List,
|
1231
|
-
},
|
73
|
+
async loadSetting() {
|
74
|
+
const lang = (await settingService.get(AXPRegionalSetting.Language)) ?? translationService.getDefaultLang();
|
75
|
+
settingService.set(AXPRegionalSetting.Language, lang);
|
76
|
+
translationService.setActiveLang(lang);
|
77
|
+
patchState(store, { language: lang });
|
1232
78
|
},
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
layout: {
|
1245
|
-
positions: {
|
1246
|
-
lg: {
|
1247
|
-
colSpan: 6,
|
1248
|
-
},
|
1249
|
-
},
|
1250
|
-
},
|
1251
|
-
},
|
1252
|
-
{
|
1253
|
-
name: 'title',
|
1254
|
-
layout: {
|
1255
|
-
positions: {
|
1256
|
-
lg: {
|
1257
|
-
colSpan: 6,
|
1258
|
-
},
|
1259
|
-
},
|
1260
|
-
},
|
1261
|
-
},
|
1262
|
-
{
|
1263
|
-
name: 'country.id',
|
1264
|
-
layout: {
|
1265
|
-
positions: {
|
1266
|
-
lg: {
|
1267
|
-
colSpan: 12,
|
1268
|
-
},
|
1269
|
-
},
|
1270
|
-
},
|
1271
|
-
},
|
1272
|
-
],
|
1273
|
-
},
|
1274
|
-
update: {
|
1275
|
-
sections: [
|
1276
|
-
{
|
1277
|
-
id: 'province',
|
1278
|
-
},
|
1279
|
-
],
|
1280
|
-
properties: [
|
1281
|
-
{
|
1282
|
-
name: 'name',
|
1283
|
-
layout: {
|
1284
|
-
positions: {
|
1285
|
-
lg: {
|
1286
|
-
colSpan: 6,
|
1287
|
-
},
|
1288
|
-
},
|
1289
|
-
},
|
1290
|
-
},
|
1291
|
-
{
|
1292
|
-
name: 'title',
|
1293
|
-
layout: {
|
1294
|
-
positions: {
|
1295
|
-
lg: {
|
1296
|
-
colSpan: 6,
|
1297
|
-
},
|
1298
|
-
},
|
1299
|
-
},
|
1300
|
-
},
|
1301
|
-
{
|
1302
|
-
name: 'country.id',
|
1303
|
-
layout: {
|
1304
|
-
positions: {
|
1305
|
-
lg: {
|
1306
|
-
colSpan: 12,
|
1307
|
-
},
|
1308
|
-
},
|
1309
|
-
},
|
1310
|
-
},
|
1311
|
-
],
|
1312
|
-
},
|
1313
|
-
single: {
|
1314
|
-
title: '{{title}}',
|
1315
|
-
sections: [
|
1316
|
-
{
|
1317
|
-
id: 'province',
|
1318
|
-
},
|
1319
|
-
],
|
1320
|
-
properties: [
|
1321
|
-
{
|
1322
|
-
name: 'name',
|
1323
|
-
layout: {
|
1324
|
-
positions: {
|
1325
|
-
lg: {
|
1326
|
-
colSpan: 6,
|
1327
|
-
},
|
1328
|
-
},
|
1329
|
-
},
|
1330
|
-
},
|
1331
|
-
{
|
1332
|
-
name: 'title',
|
1333
|
-
layout: {
|
1334
|
-
positions: {
|
1335
|
-
lg: {
|
1336
|
-
colSpan: 6,
|
1337
|
-
},
|
1338
|
-
},
|
1339
|
-
},
|
1340
|
-
},
|
1341
|
-
{
|
1342
|
-
name: 'country.name',
|
1343
|
-
layout: {
|
1344
|
-
positions: {
|
1345
|
-
lg: {
|
1346
|
-
colSpan: 12,
|
1347
|
-
},
|
1348
|
-
},
|
1349
|
-
},
|
1350
|
-
},
|
1351
|
-
],
|
1352
|
-
actions: [],
|
1353
|
-
},
|
1354
|
-
list: {
|
1355
|
-
actions: [
|
1356
|
-
{
|
1357
|
-
title: 't("create", { scope: "common" })',
|
1358
|
-
command: 'create-entity',
|
1359
|
-
priority: 'primary',
|
1360
|
-
type: 'create',
|
1361
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
1362
|
-
},
|
1363
|
-
{
|
1364
|
-
title: 't("deleteItems", { scope: "common" })',
|
1365
|
-
command: 'delete-entity',
|
1366
|
-
priority: 'primary',
|
1367
|
-
type: 'delete',
|
1368
|
-
scope: AXPEntityCommandScope.Selected,
|
1369
|
-
},
|
1370
|
-
{
|
1371
|
-
title: 't("detail", { scope: "common" })',
|
1372
|
-
command: 'open-entity',
|
1373
|
-
priority: 'secondary',
|
1374
|
-
type: 'view',
|
1375
|
-
scope: AXPEntityCommandScope.Individual,
|
1376
|
-
},
|
1377
|
-
{
|
1378
|
-
title: 't("delete", { scope: "common" })',
|
1379
|
-
command: 'delete-entity',
|
1380
|
-
priority: 'secondary',
|
1381
|
-
type: 'delete',
|
1382
|
-
scope: AXPEntityCommandScope.Individual,
|
1383
|
-
},
|
1384
|
-
],
|
1385
|
-
views: [
|
1386
|
-
{
|
1387
|
-
name: 'all',
|
1388
|
-
title: 't("allItem", { scope: "common" })',
|
1389
|
-
fixed: true,
|
1390
|
-
columns: [],
|
1391
|
-
conditions: [],
|
1392
|
-
sorts: [],
|
1393
|
-
},
|
1394
|
-
],
|
1395
|
-
},
|
1396
|
-
},
|
79
|
+
async getCountries() {
|
80
|
+
const { countries } = await import('./acorex-modules-platform-management-countries-CuJVdPLt.mjs');
|
81
|
+
return countries;
|
82
|
+
},
|
83
|
+
async getTimeZones() {
|
84
|
+
const { timeZones } = await Promise.resolve().then(function () { return timezones; });
|
85
|
+
return timeZones;
|
86
|
+
},
|
87
|
+
async getCurrencies() {
|
88
|
+
const { currencies } = await import('./acorex-modules-platform-management-currencies-vgPg4Hj3.mjs');
|
89
|
+
return currencies;
|
1397
90
|
},
|
91
|
+
async getRegionalFormats() {
|
92
|
+
const { regionalFormats } = await import('./acorex-modules-platform-management-regional-formats-BSMV12dQ.mjs');
|
93
|
+
return regionalFormats;
|
94
|
+
},
|
95
|
+
async getLanguages() {
|
96
|
+
return (await this.getRegionalFormats())
|
97
|
+
.map(c => ({ code: c.locale, title: c.title }));
|
98
|
+
},
|
99
|
+
async getAvailableLanguages() {
|
100
|
+
return (await this.getLanguages()).filter(c => ['fa-IR', 'en-US'].some(e => e == c.code));
|
101
|
+
}
|
1398
102
|
};
|
1399
|
-
|
1400
|
-
|
103
|
+
}));
|
104
|
+
|
105
|
+
const timeZones = [
|
106
|
+
{ code: 'UTC-5', title: 'UTC-5 (Eastern Time)', offset: '-05:00' },
|
107
|
+
{ code: 'UTC+0', title: 'UTC+0 (Greenwich Mean Time)', offset: '+00:00' },
|
108
|
+
{ code: 'UTC+1', title: 'UTC+1 (Central European Time)', offset: '+01:00' },
|
109
|
+
{ code: 'UTC+2', title: 'UTC+2 (Eastern European Time)', offset: '+02:00' },
|
110
|
+
{ code: 'UTC+3', title: 'UTC+3 (Arabian Time)', offset: '+03:00' },
|
111
|
+
{ code: 'UTC+3:30', title: 'UTC+3:30 (Iran Standard Time)', offset: '+03:30' },
|
112
|
+
{ code: 'UTC+4', title: 'UTC+4 (Gulf Standard Time)', offset: '+04:00' },
|
113
|
+
{ code: 'UTC+9', title: 'UTC+9 (Japan Standard Time)', offset: '+09:00' },
|
114
|
+
{ code: 'UTC+10', title: 'UTC+10 (Australian Eastern Time)', offset: '+10:00' },
|
115
|
+
{ code: 'UTC+12', title: 'UTC+12 (New Zealand Standard Time)', offset: '+12:00' }
|
116
|
+
];
|
1401
117
|
|
1402
|
-
var
|
118
|
+
var timezones = /*#__PURE__*/Object.freeze({
|
1403
119
|
__proto__: null,
|
1404
|
-
|
120
|
+
timeZones: timeZones
|
1405
121
|
});
|
1406
122
|
|
123
|
+
async function getBrowserTimeZoneCode() {
|
124
|
+
const now = new Date();
|
125
|
+
// Calculate offset in hours and minutes
|
126
|
+
const offsetMinutes = now.getTimezoneOffset();
|
127
|
+
const offsetHours = Math.floor(-offsetMinutes / 60);
|
128
|
+
const offsetRemainder = Math.abs(offsetMinutes % 60);
|
129
|
+
// Format the offset properly
|
130
|
+
const formattedOffset = `UTC${offsetHours >= 0 ? '+' : ''}${offsetHours}${offsetRemainder ? `:${offsetRemainder.toString().padStart(2, '0')}` : ''}`;
|
131
|
+
// Find matching time zone
|
132
|
+
const matchedZone = timeZones.find(zone => zone.code === formattedOffset);
|
133
|
+
return matchedZone ? matchedZone.code : 'UTC';
|
134
|
+
}
|
135
|
+
class AXMRegionalSettingProvider {
|
136
|
+
constructor() {
|
137
|
+
this.store = inject(AXPRegionalStoreService);
|
138
|
+
}
|
139
|
+
async provide(context) {
|
140
|
+
context
|
141
|
+
.addGroup('regional-settings', 'Regional Settings', 'Configure regional and language preferences.', 'fa-solid fa-earth-americas')
|
142
|
+
// Date & Time Section
|
143
|
+
.addSection('date-time', 'Date & Time', 'Configure date and time settings.')
|
144
|
+
.addSetting({
|
145
|
+
key: AXPRegionalSetting.TimeZone,
|
146
|
+
title: 'Time Zone',
|
147
|
+
scope: 'G',
|
148
|
+
defaultValue: await getBrowserTimeZoneCode(),
|
149
|
+
widget: {
|
150
|
+
type: AXPWidgetsCatalog.select,
|
151
|
+
options: {
|
152
|
+
valueField: 'code',
|
153
|
+
dataSource: await this.store.getTimeZones(),
|
154
|
+
},
|
155
|
+
},
|
156
|
+
description: 'Set the default time zone for the application.',
|
157
|
+
})
|
158
|
+
.endSection()
|
159
|
+
// Language Section
|
160
|
+
.addSection('language', 'Language', 'Configure display language settings.')
|
161
|
+
.addSetting({
|
162
|
+
key: AXPRegionalSetting.Language,
|
163
|
+
title: 'Display Language',
|
164
|
+
scope: 'U',
|
165
|
+
defaultValue: 'en-US',
|
166
|
+
widget: {
|
167
|
+
type: AXPWidgetsCatalog.select,
|
168
|
+
options: {
|
169
|
+
valueField: 'code',
|
170
|
+
dataSource: await this.store.getAvailableLanguages(),
|
171
|
+
},
|
172
|
+
},
|
173
|
+
description: 'Set the preferred display language for the user.',
|
174
|
+
})
|
175
|
+
.endSection()
|
176
|
+
// Region Section
|
177
|
+
.addSection('region', 'Region', 'Configure regional format and preferences.')
|
178
|
+
.addSetting({
|
179
|
+
key: AXPRegionalSetting.Country,
|
180
|
+
title: 'Country',
|
181
|
+
scope: 'G',
|
182
|
+
defaultValue: 'US',
|
183
|
+
widget: {
|
184
|
+
type: AXPWidgetsCatalog.select,
|
185
|
+
options: {
|
186
|
+
valueField: 'code',
|
187
|
+
dataSource: await this.store.getCountries(),
|
188
|
+
},
|
189
|
+
},
|
190
|
+
description: 'Set the default country for the application.',
|
191
|
+
})
|
192
|
+
.addSetting({
|
193
|
+
key: AXPRegionalSetting.Regional,
|
194
|
+
title: 'Regional Format',
|
195
|
+
scope: 'U',
|
196
|
+
defaultValue: 'English (United States)',
|
197
|
+
widget: {
|
198
|
+
type: AXPWidgetsCatalog.select,
|
199
|
+
options: {
|
200
|
+
dataSource: ['English (United States)', 'English (United Kingdom)', 'French (France)', 'German (Germany)'],
|
201
|
+
},
|
202
|
+
},
|
203
|
+
description: 'Set the regional format for numbers, dates, and times.',
|
204
|
+
})
|
205
|
+
.addSetting({
|
206
|
+
key: AXPRegionalSetting.Calendar,
|
207
|
+
title: 'Calendar',
|
208
|
+
scope: 'G',
|
209
|
+
defaultValue: 'Gregorian',
|
210
|
+
widget: {
|
211
|
+
type: AXPWidgetsCatalog.select,
|
212
|
+
options: {
|
213
|
+
dataSource: ['Gregorian', 'Hijri'],
|
214
|
+
},
|
215
|
+
},
|
216
|
+
description: 'Select the calendar type for the application.',
|
217
|
+
})
|
218
|
+
.addSetting({
|
219
|
+
key: AXPRegionalSetting.FirstDayOfWeek,
|
220
|
+
title: 'First Day of Week',
|
221
|
+
scope: 'U',
|
222
|
+
defaultValue: 'Monday',
|
223
|
+
widget: {
|
224
|
+
type: AXPWidgetsCatalog.select,
|
225
|
+
options: {
|
226
|
+
dataSource: ['Saturday', 'Sunday', 'Monday'],
|
227
|
+
},
|
228
|
+
},
|
229
|
+
description: 'Set the first day of the week.',
|
230
|
+
})
|
231
|
+
.addSetting({
|
232
|
+
key: AXPRegionalSetting.WorkDays,
|
233
|
+
title: 'Work Days',
|
234
|
+
scope: 'U',
|
235
|
+
defaultValue: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
|
236
|
+
widget: {
|
237
|
+
type: AXPWidgetsCatalog.selectionList,
|
238
|
+
options: {
|
239
|
+
multiple: true,
|
240
|
+
dataSource: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
|
241
|
+
},
|
242
|
+
},
|
243
|
+
description: 'Select the working days for the user.',
|
244
|
+
})
|
245
|
+
.addSetting({
|
246
|
+
key: AXPRegionalSetting.ShortDate,
|
247
|
+
title: 'Short Date Format',
|
248
|
+
scope: 'U',
|
249
|
+
defaultValue: 'MM/dd/yyyy',
|
250
|
+
widget: {
|
251
|
+
type: AXPWidgetsCatalog.select,
|
252
|
+
options: {
|
253
|
+
dataSource: ['MM/dd/yyyy', 'dd/MM/yyyy', 'yyyy-MM-dd'],
|
254
|
+
},
|
255
|
+
},
|
256
|
+
description: 'Select the short date format.',
|
257
|
+
})
|
258
|
+
.addSetting({
|
259
|
+
key: AXPRegionalSetting.LongDate,
|
260
|
+
title: 'Long Date Format',
|
261
|
+
scope: 'U',
|
262
|
+
defaultValue: 'MMMM dd, yyyy',
|
263
|
+
widget: {
|
264
|
+
type: AXPWidgetsCatalog.select,
|
265
|
+
options: {
|
266
|
+
dataSource: ['MMMM dd, yyyy', 'dddd, MMMM dd, yyyy', 'yyyy-MM-dd'],
|
267
|
+
},
|
268
|
+
},
|
269
|
+
description: 'Select the long date format.',
|
270
|
+
})
|
271
|
+
.addSetting({
|
272
|
+
key: AXPRegionalSetting.ShortTime,
|
273
|
+
title: 'Short Time Format',
|
274
|
+
scope: 'U',
|
275
|
+
defaultValue: 'hh:mm a',
|
276
|
+
widget: {
|
277
|
+
type: AXPWidgetsCatalog.select,
|
278
|
+
options: {
|
279
|
+
valueField: 'value',
|
280
|
+
dataSource: [
|
281
|
+
{ text: '12-hour (hh:mm AM/PM)', value: 'hh:mm a' },
|
282
|
+
{ text: '24-hour (HH:mm)', value: 'HH:mm' },
|
283
|
+
],
|
284
|
+
},
|
285
|
+
},
|
286
|
+
description: 'Select the short time format (12-hour or 24-hour).',
|
287
|
+
})
|
288
|
+
.addSetting({
|
289
|
+
key: AXPRegionalSetting.LongTime,
|
290
|
+
title: 'Long Time Format',
|
291
|
+
scope: 'U',
|
292
|
+
defaultValue: 'hh:mm:ss a',
|
293
|
+
widget: {
|
294
|
+
type: AXPWidgetsCatalog.select,
|
295
|
+
options: {
|
296
|
+
valueField: 'value',
|
297
|
+
dataSource: [
|
298
|
+
{ text: '12-hour (hh:mm:ss AM/PM)', value: 'hh:mm:ss a' },
|
299
|
+
{ text: '24-hour (HH:mm:ss)', value: 'HH:mm:ss' },
|
300
|
+
],
|
301
|
+
},
|
302
|
+
},
|
303
|
+
description: 'Select the long time format (12-hour or 24-hour).',
|
304
|
+
})
|
305
|
+
.endSection()
|
306
|
+
.endGroup();
|
307
|
+
}
|
308
|
+
}
|
309
|
+
|
310
|
+
class AXMLanguageSlotComponent {
|
311
|
+
constructor() {
|
312
|
+
this.store = inject(AXPRegionalStoreService);
|
313
|
+
this.items = signal([]);
|
314
|
+
}
|
315
|
+
async ngOnInit() {
|
316
|
+
const items = await this.store.getAvailableLanguages();
|
317
|
+
this.items.set(items);
|
318
|
+
}
|
319
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMLanguageSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
320
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMLanguageSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, 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>", dependencies: [{ kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i1.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: CommonModule }] }); }
|
321
|
+
}
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMLanguageSlotComponent, decorators: [{
|
323
|
+
type: Component,
|
324
|
+
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>" }]
|
325
|
+
}] });
|
326
|
+
|
1407
327
|
class AXMPlatformManagementCommonModule {
|
1408
|
-
|
1409
|
-
|
328
|
+
constructor(appInitService, injector) {
|
329
|
+
const service = injector.get(AXPRegionalStoreService);
|
330
|
+
appInitService.registerTask({
|
331
|
+
name: 'Settings',
|
332
|
+
statusText: 'Loading Settings ...',
|
333
|
+
run: async () => {
|
334
|
+
await service.loadSetting();
|
335
|
+
}
|
336
|
+
});
|
337
|
+
}
|
338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPlatformManagementCommonModule, deps: [{ token: i1$1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
339
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMPlatformManagementCommonModule, imports: [i1$1.AXPComponentSlotModule] }); }
|
1410
340
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPlatformManagementCommonModule, providers: [
|
1411
|
-
// Country
|
1412
|
-
{
|
1413
|
-
provide: AXMCountryService,
|
1414
|
-
useClass: AXMCountryServiceImpl,
|
1415
|
-
},
|
1416
|
-
{
|
1417
|
-
provide: AXP_WIDGET_DATASOURCE_PROVIDER,
|
1418
|
-
useClass: AXPPlatformCountryWidgetDataSourceProvider,
|
1419
|
-
multi: true,
|
1420
|
-
},
|
1421
|
-
// Province
|
1422
|
-
{
|
1423
|
-
provide: AXMProvinceService,
|
1424
|
-
useClass: AXMProvinceServiceImpl,
|
1425
|
-
},
|
1426
341
|
{
|
1427
342
|
provide: AXP_ENTITY_DEFINITION_LOADER,
|
1428
343
|
useClass: AXMCommonModuleEntityProvider,
|
1429
344
|
multi: true,
|
1430
345
|
},
|
1431
|
-
|
346
|
+
{
|
347
|
+
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
348
|
+
useClass: AXMRegionalSettingProvider,
|
349
|
+
multi: true
|
350
|
+
},
|
351
|
+
], imports: [AXPComponentSlotModule.forChild({
|
352
|
+
'header-end': [
|
353
|
+
{
|
354
|
+
name: 'language',
|
355
|
+
component: AXMLanguageSlotComponent
|
356
|
+
}
|
357
|
+
]
|
358
|
+
})] }); }
|
1432
359
|
}
|
1433
360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPlatformManagementCommonModule, decorators: [{
|
1434
361
|
type: NgModule,
|
1435
362
|
args: [{
|
1436
|
-
imports: [
|
363
|
+
imports: [
|
364
|
+
AXPComponentSlotModule.forChild({
|
365
|
+
'header-end': [
|
366
|
+
{
|
367
|
+
name: 'language',
|
368
|
+
component: AXMLanguageSlotComponent
|
369
|
+
}
|
370
|
+
]
|
371
|
+
})
|
372
|
+
],
|
1437
373
|
exports: [],
|
1438
374
|
declarations: [],
|
1439
375
|
providers: [
|
1440
|
-
// Country
|
1441
|
-
{
|
1442
|
-
provide: AXMCountryService,
|
1443
|
-
useClass: AXMCountryServiceImpl,
|
1444
|
-
},
|
1445
|
-
{
|
1446
|
-
provide: AXP_WIDGET_DATASOURCE_PROVIDER,
|
1447
|
-
useClass: AXPPlatformCountryWidgetDataSourceProvider,
|
1448
|
-
multi: true,
|
1449
|
-
},
|
1450
|
-
// Province
|
1451
|
-
{
|
1452
|
-
provide: AXMProvinceService,
|
1453
|
-
useClass: AXMProvinceServiceImpl,
|
1454
|
-
},
|
1455
376
|
{
|
1456
377
|
provide: AXP_ENTITY_DEFINITION_LOADER,
|
1457
378
|
useClass: AXMCommonModuleEntityProvider,
|
1458
379
|
multi: true,
|
1459
380
|
},
|
381
|
+
{
|
382
|
+
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
383
|
+
useClass: AXMRegionalSettingProvider,
|
384
|
+
multi: true
|
385
|
+
},
|
1460
386
|
],
|
1461
387
|
}]
|
1462
|
-
}] });
|
388
|
+
}], ctorParameters: () => [{ type: i1$1.AXPAppStartUpService }, { type: i0.Injector }] });
|
389
|
+
|
390
|
+
const AXMPlatformManagementModuleConst = {
|
391
|
+
moduleName: 'common',
|
392
|
+
moduleRoute: 'platform-management',
|
393
|
+
i18n: 'platform-management',
|
394
|
+
localizationManagement: 'localization-management',
|
395
|
+
globalVariableEntity: 'variables',
|
396
|
+
currencyEntity: 'currencies',
|
397
|
+
countryEntity: 'countries',
|
398
|
+
provinceEntity: 'provinces',
|
399
|
+
cityEntity: 'cities',
|
400
|
+
};
|
1463
401
|
|
1464
402
|
class AXMGlobalVariablesService extends AXMEntityCrudServiceImpl {
|
1465
403
|
}
|
@@ -1875,37 +813,6 @@ class AXMPlatformManagmentModuleMenuProvider {
|
|
1875
813
|
// requiredPermission: '',
|
1876
814
|
},
|
1877
815
|
},
|
1878
|
-
{
|
1879
|
-
priority: 9002,
|
1880
|
-
icon: 'fa-solid fa-coins',
|
1881
|
-
text: `t("currency", { scope: "common" })`,
|
1882
|
-
path: this.entityService.createPath(AXMPlatformManagementModuleConst.localizationManagement, AXMPlatformManagementModuleConst.currencyEntity),
|
1883
|
-
},
|
1884
|
-
{
|
1885
|
-
priority: 9003,
|
1886
|
-
icon: 'fa-solid fa-globe-stand',
|
1887
|
-
text: `t("geo", { scope: "common" })`,
|
1888
|
-
children: [
|
1889
|
-
{
|
1890
|
-
priority: 9101,
|
1891
|
-
icon: 'fa-solid fa-earth-americas',
|
1892
|
-
text: 't("country", { scope: "common" })',
|
1893
|
-
path: this.entityService.createPath(AXMPlatformManagementModuleConst.localizationManagement, AXMPlatformManagementModuleConst.countryEntity),
|
1894
|
-
},
|
1895
|
-
{
|
1896
|
-
priority: 9102,
|
1897
|
-
icon: 'fa-solid fa-mountain-city',
|
1898
|
-
text: 't("province", { scope: "common" })',
|
1899
|
-
path: this.entityService.createPath(AXMPlatformManagementModuleConst.localizationManagement, AXMPlatformManagementModuleConst.provinceEntity),
|
1900
|
-
},
|
1901
|
-
{
|
1902
|
-
priority: 9103,
|
1903
|
-
icon: 'fa-solid fa-city',
|
1904
|
-
text: 't("city", { scope: "common" })',
|
1905
|
-
path: this.entityService.createPath(AXMPlatformManagementModuleConst.localizationManagement, AXMPlatformManagementModuleConst.cityEntity),
|
1906
|
-
},
|
1907
|
-
],
|
1908
|
-
},
|
1909
816
|
],
|
1910
817
|
},
|
1911
818
|
]);
|
@@ -1920,10 +827,6 @@ class AXMPlatformManagementModule {
|
|
1920
827
|
provide: AXMGlobalVariablesService,
|
1921
828
|
useClass: AXMGlobalVariablesServiceImpl,
|
1922
829
|
},
|
1923
|
-
{
|
1924
|
-
provide: AXMCurrencyService,
|
1925
|
-
useClass: AXMCurrencyServiceImpl,
|
1926
|
-
},
|
1927
830
|
{
|
1928
831
|
provide: AXP_ENTITY_DEFINITION_LOADER,
|
1929
832
|
useClass: AXMGlobalVariableModuleEntityLoader,
|
@@ -1947,10 +850,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
1947
850
|
provide: AXMGlobalVariablesService,
|
1948
851
|
useClass: AXMGlobalVariablesServiceImpl,
|
1949
852
|
},
|
1950
|
-
{
|
1951
|
-
provide: AXMCurrencyService,
|
1952
|
-
useClass: AXMCurrencyServiceImpl,
|
1953
|
-
},
|
1954
853
|
{
|
1955
854
|
provide: AXP_ENTITY_DEFINITION_LOADER,
|
1956
855
|
useClass: AXMGlobalVariableModuleEntityLoader,
|
@@ -1969,5 +868,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
1969
868
|
* Generated bundle index. Do not edit.
|
1970
869
|
*/
|
1971
870
|
|
1972
|
-
export { AXMCommonModuleEntityProvider,
|
871
|
+
export { AXMCommonModuleEntityProvider, AXMGlobalVariableModuleEntityLoader, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMPlatformManagementModule, AXMPlatformManagementModuleConst, globalVariableEntityFactory };
|
1973
872
|
//# sourceMappingURL=acorex-modules-platform-management.mjs.map
|