@acorex/modules 19.2.8 → 19.2.10
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 +3 -0
- package/conversation/lib/entities/chat/chat.module.d.ts +2 -3
- package/fesm2022/acorex-modules-application-management.mjs +5 -2
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-HwJJs-3A.mjs → acorex-modules-auth-acorex-modules-auth-D1qxdECo.mjs} +8 -8
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-HwJJs-3A.mjs.map → acorex-modules-auth-acorex-modules-auth-D1qxdECo.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BvxMkXPp.mjs → acorex-modules-auth-app-chooser.component-8GCTwtb2.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BvxMkXPp.mjs.map → acorex-modules-auth-app-chooser.component-8GCTwtb2.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-CDvLUxls.mjs → acorex-modules-auth-login.module-DR3QLEM-.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-CDvLUxls.mjs.map → acorex-modules-auth-login.module-DR3QLEM-.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-CnKBnl8W.mjs → acorex-modules-auth-master.layout-BMJ5mW63.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-master.layout-CnKBnl8W.mjs.map → acorex-modules-auth-master.layout-BMJ5mW63.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-C16jeHuJ.mjs → acorex-modules-auth-password.component-EXWlXGez.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-C16jeHuJ.mjs.map → acorex-modules-auth-password.component-EXWlXGez.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-1FnIjiZ8.mjs → acorex-modules-auth-password.component-avrMwyr8.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-1FnIjiZ8.mjs.map → acorex-modules-auth-password.component-avrMwyr8.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-ZDDUhAWd.mjs → acorex-modules-auth-routes-BPYBFOxg.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-ZDDUhAWd.mjs.map → acorex-modules-auth-routes-BPYBFOxg.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-C32MVGby.mjs → acorex-modules-auth-two-factor.module-B_V_nQN_.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-C32MVGby.mjs.map → acorex-modules-auth-two-factor.module-B_V_nQN_.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +3 -8
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-CUQ-GAN5.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-BkUdHH_Y.mjs} +83 -7
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-BkUdHH_Y.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-category.entity-WtgUidaW.mjs → acorex-modules-form-template-management-category.entity-D00XZd7o.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-category.entity-WtgUidaW.mjs.map → acorex-modules-form-template-management-category.entity-D00XZd7o.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-setting.provider-u7Jv1myU.mjs → acorex-modules-form-template-management-setting.provider-Dy-Cd_iL.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-setting.provider-u7Jv1myU.mjs.map → acorex-modules-form-template-management-setting.provider-Dy-Cd_iL.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-DPdPjZGi.mjs → acorex-modules-form-template-management-template-widget-edit.component-rGcHfFSh.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-DPdPjZGi.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-rGcHfFSh.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template.entity-BnctQkm6.mjs → acorex-modules-form-template-management-template.entity-B0DUUdPJ.mjs} +38 -2
- package/fesm2022/acorex-modules-form-template-management-template.entity-B0DUUdPJ.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management-viewer-popup.component-xUrGRQbQ.mjs +93 -0
- package/fesm2022/acorex-modules-form-template-management-viewer-popup.component-xUrGRQbQ.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/{acorex-modules-organization-management-add-item.component-DsWqdz8M.mjs → acorex-modules-organization-management-add-item.component-PhQRBTtI.mjs} +13 -10
- package/fesm2022/acorex-modules-organization-management-add-item.component-PhQRBTtI.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-DBc6gISy.mjs → acorex-modules-organization-management-org-chart-configuration.page-DjzqBdaS.mjs} +3 -3
- package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DjzqBdaS.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-e-N7Ql80.mjs → acorex-modules-organization-management-org-chart.page-BSh18amn.mjs} +167 -118
- package/fesm2022/acorex-modules-organization-management-org-chart.page-BSh18amn.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +2 -2
- package/fesm2022/acorex-modules-platform-management.mjs +397 -127
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/form-template-management/lib/features/viewer/viewer-connector.service.d.ts +13 -0
- package/form-template-management/lib/features/viewer/viewer-popup.component.d.ts +25 -0
- package/form-template-management/lib/features/viewer/workflows/open-template.workflow.d.ts +9 -0
- package/organization-management/lib/features/organization-chart/add-item/add-item.component.d.ts +2 -1
- package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +3 -0
- package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +3 -0
- package/organization-management/lib/features/organization-chart/org-chart.service.d.ts +15 -13
- package/package.json +5 -5
- package/platform-management/lib/common/regional/index.d.ts +0 -2
- package/platform-management/lib/common/regional/language-slot/language-slot.component.d.ts +1 -1
- package/platform-management/lib/entities/check-version.d.ts +1 -0
- package/platform-management/lib/entities/data-source/data-source.types.d.ts +2 -1
- package/platform-management/lib/entities/data-source/datasource-provider.dynamic.d.ts +2 -0
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-CUQ-GAN5.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-BnctQkm6.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-add-item.component-DsWqdz8M.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DBc6gISy.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart.page-e-N7Ql80.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-countries-0S6HdpYF.mjs +0 -500
- package/fesm2022/acorex-modules-platform-management-countries-0S6HdpYF.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-currencies-vgPg4Hj3.mjs +0 -13
- package/fesm2022/acorex-modules-platform-management-currencies-vgPg4Hj3.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-regional-formats-BaHofjWg.mjs +0 -14
- package/fesm2022/acorex-modules-platform-management-regional-formats-BaHofjWg.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-timezones-BoScbn0h.mjs +0 -15
- package/fesm2022/acorex-modules-platform-management-timezones-BoScbn0h.mjs.map +0 -1
- package/platform-management/lib/common/regional/data/countries.d.ts +0 -2
- package/platform-management/lib/common/regional/data/currencies.d.ts +0 -2
- package/platform-management/lib/common/regional/data/regional-formats.d.ts +0 -2
- package/platform-management/lib/common/regional/data/timezones.d.ts +0 -2
- package/platform-management/lib/common/regional/regional-util.service.d.ts +0 -12
- package/platform-management/lib/common/regional/regional.types.d.ts +0 -52
@@ -1,14 +1,14 @@
|
|
1
1
|
import * as i1$1 from '@acorex/platform/common';
|
2
|
-
import { AXPSettingScope, AXPSettingService, AXP_SETTING_DEFINITION_PROVIDER, AXPComponentSlotModule, AXMEntityCrudServiceImpl, AXPEntityQueryType, AXPEntityCommandScope, AXP_APP_VERSION_PROVIDER, AXPAppStartUpService, AXPFileStorageService, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
3
|
-
import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityDefinitionRegistryService, AXPEntityService, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
2
|
+
import { AXPRegionalService, AXPSettingScope, AXPSettingService, AXP_SETTING_DEFINITION_PROVIDER, AXPComponentSlotModule, AXMEntityCrudServiceImpl, AXPEntityQueryType, AXPEntityCommandScope, AXP_APP_VERSION_PROVIDER, AXPAppStartUpService, AXPFileStorageService, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
3
|
+
import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityDefinitionRegistryService, AXPEntityService, AXPEntityResolver, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
4
4
|
import * as i2$4 from '@acorex/platform/workflow';
|
5
5
|
import { AXPWorkflowAction, AXPWorkflowService, AXPWorkflowModule } from '@acorex/platform/workflow';
|
6
6
|
import * as i0 from '@angular/core';
|
7
7
|
import { inject, Injector, Injectable, signal, Component, NgModule, HostListener, ChangeDetectionStrategy, Input } from '@angular/core';
|
8
8
|
import { ROUTES } from '@angular/router';
|
9
|
-
import { objectKeyValueTransforms, AXPWidgetsCatalog, AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
|
10
9
|
import * as i6 from '@acorex/core/translation';
|
11
10
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
11
|
+
import { objectKeyValueTransforms, AXPWidgetsCatalog, AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
|
12
12
|
import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
|
13
13
|
import * as i3 from '@acorex/components/button';
|
14
14
|
import { AXButtonModule } from '@acorex/components/button';
|
@@ -38,9 +38,10 @@ import { AXSafePipe } from '@acorex/core/pipes';
|
|
38
38
|
import * as i2$3 from '@acorex/components/time-line';
|
39
39
|
import { AXTimeLineModule } from '@acorex/components/time-line';
|
40
40
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
41
|
+
import { AXPSessionService } from '@acorex/platform/auth';
|
41
42
|
import { AXDataSource, convertArrayToDataSource } from '@acorex/components/common';
|
42
43
|
import { upperFirst, camelCase } from 'lodash-es';
|
43
|
-
import
|
44
|
+
import get from 'lodash-es/get';
|
44
45
|
|
45
46
|
class AXMCommonModuleEntityProvider {
|
46
47
|
constructor() {
|
@@ -77,47 +78,6 @@ var AXPRegionalSetting;
|
|
77
78
|
AXPRegionalSetting["LongTime"] = "regional:long-time";
|
78
79
|
})(AXPRegionalSetting || (AXPRegionalSetting = {}));
|
79
80
|
|
80
|
-
class AXPRegionalService {
|
81
|
-
async getCountries() {
|
82
|
-
const { countries } = await import('./acorex-modules-platform-management-countries-0S6HdpYF.mjs');
|
83
|
-
return countries;
|
84
|
-
}
|
85
|
-
async getCurrencies() {
|
86
|
-
const { currencies } = await import('./acorex-modules-platform-management-currencies-vgPg4Hj3.mjs');
|
87
|
-
return currencies;
|
88
|
-
}
|
89
|
-
async getRegionalFormats() {
|
90
|
-
const { regionalFormats } = await import('./acorex-modules-platform-management-regional-formats-BaHofjWg.mjs');
|
91
|
-
return regionalFormats;
|
92
|
-
}
|
93
|
-
async getLanguages() {
|
94
|
-
return (await this.getRegionalFormats())
|
95
|
-
.map(c => ({ code: c.locale, title: c.title }));
|
96
|
-
}
|
97
|
-
async getAvailableLanguages() {
|
98
|
-
return (await this.getLanguages()).filter(c => ['fa-IR', 'en-US'].some(e => e == c.code));
|
99
|
-
}
|
100
|
-
async getBrowserTimeZoneCode() {
|
101
|
-
const { timeZones } = await import('./acorex-modules-platform-management-timezones-BoScbn0h.mjs');
|
102
|
-
const now = new Date();
|
103
|
-
// Calculate offset in hours and minutes
|
104
|
-
const offsetMinutes = now.getTimezoneOffset();
|
105
|
-
const offsetHours = Math.floor(-offsetMinutes / 60);
|
106
|
-
const offsetRemainder = Math.abs(offsetMinutes % 60);
|
107
|
-
// Format the offset properly
|
108
|
-
const formattedOffset = `UTC${offsetHours >= 0 ? '+' : ''}${offsetHours}${offsetRemainder ? `:${offsetRemainder.toString().padStart(2, '0')}` : ''}`;
|
109
|
-
// Find matching time zone
|
110
|
-
const matchedZone = timeZones.find(zone => zone.code === formattedOffset);
|
111
|
-
return matchedZone ? matchedZone.code : 'UTC';
|
112
|
-
}
|
113
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
114
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, providedIn: 'root' }); }
|
115
|
-
}
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, decorators: [{
|
117
|
-
type: Injectable,
|
118
|
-
args: [{ providedIn: 'root' }]
|
119
|
-
}] });
|
120
|
-
|
121
81
|
class AXMRegionalSettingProvider {
|
122
82
|
constructor() {
|
123
83
|
this.translationService = inject(AXTranslationService);
|
@@ -139,7 +99,7 @@ class AXMRegionalSettingProvider {
|
|
139
99
|
type: AXPWidgetsCatalog.select,
|
140
100
|
options: {
|
141
101
|
valueField: 'code',
|
142
|
-
dataSource:
|
102
|
+
dataSource: this.regionalService.getTimeZones(),
|
143
103
|
},
|
144
104
|
},
|
145
105
|
description: 'Set the default time zone for the application.',
|
@@ -324,7 +284,7 @@ withMethods((store, settingService = inject(AXPSettingService), translationServi
|
|
324
284
|
patchState(store, { language: lang });
|
325
285
|
}
|
326
286
|
translationService.setActiveLang(lang);
|
327
|
-
const reg = await (await regionalService.getRegionalFormats()).find(c => c.locale == lang);
|
287
|
+
const reg = await (await regionalService.getRegionalFormats()).find((c) => c.locale == lang);
|
328
288
|
const html = document.getElementsByTagName('html')[0];
|
329
289
|
reg?.layout == 'rtl' ? html.setAttribute('dir', 'rtl') : html.removeAttribute('dir');
|
330
290
|
},
|
@@ -341,8 +301,7 @@ withMethods((store, settingService = inject(AXPSettingService), translationServi
|
|
341
301
|
}
|
342
302
|
});
|
343
303
|
},
|
344
|
-
onDestroy() {
|
345
|
-
},
|
304
|
+
onDestroy() { },
|
346
305
|
})));
|
347
306
|
|
348
307
|
class AXMLanguageSlotComponent {
|
@@ -444,7 +403,7 @@ const RootConfig = {
|
|
444
403
|
icon: 'fa-light fa-globe',
|
445
404
|
},
|
446
405
|
globalVariable: {
|
447
|
-
name: '
|
406
|
+
name: 'GlobalVariables',
|
448
407
|
title: `t("variables", {scope:"${config.i18n}"})`,
|
449
408
|
icon: 'fa-light fa-object-exclude',
|
450
409
|
},
|
@@ -467,7 +426,7 @@ const RootConfig = {
|
|
467
426
|
icon: 'fa-light fa-billboard',
|
468
427
|
},
|
469
428
|
dataSource: {
|
470
|
-
name: '
|
429
|
+
name: 'DataSource',
|
471
430
|
title: `t("dataSource", {scope:"${config.i18n}"})`,
|
472
431
|
titlePlural: `t("dataSourcePlural", {scope:"${config.i18n}"})`,
|
473
432
|
icon: 'fa-light fa-database',
|
@@ -548,6 +507,11 @@ async function appTermEntityEntityFactory(injector) {
|
|
548
507
|
dataType: 'string',
|
549
508
|
interface: {
|
550
509
|
type: AXPWidgetsCatalog.richText,
|
510
|
+
options: {
|
511
|
+
minLineCount: 5,
|
512
|
+
maxLineCount: 17,
|
513
|
+
isFitLine: true,
|
514
|
+
},
|
551
515
|
},
|
552
516
|
},
|
553
517
|
validations: [
|
@@ -916,7 +880,7 @@ class AXMListTermsComponent extends AXBasePageComponent {
|
|
916
880
|
setTimeout(() => this.checkScroll(), 50);
|
917
881
|
}
|
918
882
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMListTermsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
919
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMListTermsComponent, isStandalone: true, selector: "acorex-platform-list-terms", host: { listeners: { "window:resize": "onResize($event)" } }, usesInheritance: true, ngImport: i0, template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n
|
883
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMListTermsComponent, isStandalone: true, selector: "acorex-platform-list-terms", host: { listeners: { "window:resize": "onResize($event)" } }, usesInheritance: true, ngImport: i0, template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n <axp-layout-description>Please review the terms and conditions carefully. </axp-layout-description>\n </axp-layout-header>\n @if(loaded()){\n <axp-layout-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'simple-page-content'\"\n [activationOffset]=\"150\">\n <div class=\"ax-flex\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-text-neutral-700\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content\"></div>\n </div>\n }\n </div>\n @if(showScrollSide){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60 ax-sticky ax-top-0\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full\"></ax-side-menu>\n </div>\n }\n </div>\n </axp-layout-content>\n }\n</axp-layout-simple-page>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i2$1.AXFormatPipe, name: "format" }, { kind: "component", type: AXPSimplePageLayout, selector: "axp-layout-simple-page" }, { kind: "component", type: AXPThemeLayoutHeaderTemplateComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-layout-content, axp-layout-header-container, axp-layout-side-container, axp-layout-sections, axp-layout-section-container, axp-layout-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title, axp-layout-nav-button, axp-layout-description, axp-layout-toolbar, axp-layout-title-bar, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i4.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "directive", type: i4.AXOutlineSideMenuDirective, selector: "[axOutlineSideMenu]", exportAs: ["axOutlineSideMenu"] }, { kind: "ngmodule", type: AXOutlineModule }, { kind: "directive", type: i5.AXOutlineContainerDirective, selector: "[axOutlineContainer]", inputs: ["target", "smoothScroll", "activationOffset", "activateLastAtBottom", "scrollableElementId"], exportAs: ["axOutlineContainer"] }] }); }
|
920
884
|
}
|
921
885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMListTermsComponent, decorators: [{
|
922
886
|
type: Component,
|
@@ -930,7 +894,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
930
894
|
AXTranslationModule,
|
931
895
|
AXSideMenuModule,
|
932
896
|
AXOutlineModule,
|
933
|
-
], template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n
|
897
|
+
], template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n <axp-layout-description>Please review the terms and conditions carefully. </axp-layout-description>\n </axp-layout-header>\n @if(loaded()){\n <axp-layout-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'simple-page-content'\"\n [activationOffset]=\"150\">\n <div class=\"ax-flex\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-text-neutral-700\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content\"></div>\n </div>\n }\n </div>\n @if(showScrollSide){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60 ax-sticky ax-top-0\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full\"></ax-side-menu>\n </div>\n }\n </div>\n </axp-layout-content>\n }\n</axp-layout-simple-page>" }]
|
934
898
|
}], propDecorators: { onResize: [{
|
935
899
|
type: HostListener,
|
936
900
|
args: ['window:resize', ['$event']]
|
@@ -1059,6 +1023,11 @@ async function appVersionEntityEntityFactory(injector) {
|
|
1059
1023
|
type: AXPWidgetsCatalog.text,
|
1060
1024
|
},
|
1061
1025
|
},
|
1026
|
+
options: {
|
1027
|
+
sort: {
|
1028
|
+
enabled: true,
|
1029
|
+
},
|
1030
|
+
},
|
1062
1031
|
validations: [
|
1063
1032
|
{
|
1064
1033
|
rule: 'required',
|
@@ -1073,7 +1042,11 @@ async function appVersionEntityEntityFactory(injector) {
|
|
1073
1042
|
dataType: 'string',
|
1074
1043
|
interface: {
|
1075
1044
|
type: AXPWidgetsCatalog.richText,
|
1076
|
-
options: {
|
1045
|
+
options: {
|
1046
|
+
minLineCount: 5,
|
1047
|
+
maxLineCount: 17,
|
1048
|
+
isFitLine: true,
|
1049
|
+
},
|
1077
1050
|
},
|
1078
1051
|
},
|
1079
1052
|
validations: [
|
@@ -1153,7 +1126,8 @@ async function appVersionEntityEntityFactory(injector) {
|
|
1153
1126
|
},
|
1154
1127
|
list: {
|
1155
1128
|
execute: async (e) => {
|
1156
|
-
|
1129
|
+
console.log(e);
|
1130
|
+
const x = await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });
|
1157
1131
|
return x;
|
1158
1132
|
},
|
1159
1133
|
type: AXPEntityQueryType.List,
|
@@ -1352,11 +1326,11 @@ async function appVersionEntityEntityFactory(injector) {
|
|
1352
1326
|
views: [
|
1353
1327
|
{
|
1354
1328
|
name: 'all',
|
1355
|
-
title: '
|
1329
|
+
title: 't("all", { scope: "common" })',
|
1356
1330
|
fixed: true,
|
1357
1331
|
columns: [],
|
1358
1332
|
conditions: [],
|
1359
|
-
sorts: [],
|
1333
|
+
sorts: [{ name: 'versionNumber', dir: 'desc' }],
|
1360
1334
|
},
|
1361
1335
|
],
|
1362
1336
|
},
|
@@ -1380,11 +1354,11 @@ class AXMNotifyAppComponent extends AXBasePageComponent {
|
|
1380
1354
|
this.close({ data: this.data, isShowAgain: !this.isShowAgain });
|
1381
1355
|
}
|
1382
1356
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMNotifyAppComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
1383
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMNotifyAppComponent, isStandalone: true, selector: "axm-notify-app", usesInheritance: true, ngImport: i0, template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i2$2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i3$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { 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-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }] }); }
|
1357
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMNotifyAppComponent, isStandalone: true, selector: "axm-notify-app", usesInheritance: true, ngImport: i0, template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i2$2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i3$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { 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-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }] }); }
|
1384
1358
|
}
|
1385
1359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMNotifyAppComponent, decorators: [{
|
1386
1360
|
type: Component,
|
1387
|
-
args: [{ selector: 'axm-notify-app', imports: [CommonModule, AXLabelModule, AXCheckBoxModule, AXDecoratorModule, AXButtonModule, AXTranslationModule], template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n" }]
|
1361
|
+
args: [{ selector: 'axm-notify-app', imports: [CommonModule, AXLabelModule, AXCheckBoxModule, AXDecoratorModule, AXButtonModule, AXTranslationModule], template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n" }]
|
1388
1362
|
}] });
|
1389
1363
|
|
1390
1364
|
class AXMListVersionComponent extends AXBasePageComponent {
|
@@ -1521,23 +1495,28 @@ class AppTermAndVersionCheck {
|
|
1521
1495
|
this.appVersionService = inject(AXMAppVersionService);
|
1522
1496
|
this.appTermService = inject(AXMAppTermService);
|
1523
1497
|
this.appInitService = inject(AXPAppStartUpService);
|
1498
|
+
this.sessionService = inject(AXPSessionService);
|
1524
1499
|
//check new version
|
1525
1500
|
this.appInitService.registerTask({
|
1526
1501
|
name: 'Version',
|
1527
1502
|
statusText: 'Check New Version...',
|
1528
1503
|
run: async () => {
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1504
|
+
this.sessionService.isAuthorized$.subscribe(async (isAuthorized) => {
|
1505
|
+
if (isAuthorized) {
|
1506
|
+
const versions = await this.appVersionService.query();
|
1507
|
+
versions.items.forEach(async (v) => {
|
1508
|
+
const current = (await this.versionProvider.provider()).version;
|
1509
|
+
if (v.versionNumber == current) {
|
1510
|
+
const isSee = await this.settingsService
|
1511
|
+
.scope(AXPSettingScope.User)
|
1512
|
+
.get(`is-see-check-version-${v.versionNumber}`);
|
1513
|
+
if (!isSee) {
|
1514
|
+
setTimeout(() => {
|
1515
|
+
this.workflowService.execute('change-log-version', v);
|
1516
|
+
}, 500);
|
1517
|
+
}
|
1518
|
+
}
|
1519
|
+
});
|
1541
1520
|
}
|
1542
1521
|
});
|
1543
1522
|
},
|
@@ -1547,19 +1526,25 @@ class AppTermAndVersionCheck {
|
|
1547
1526
|
name: 'Terms',
|
1548
1527
|
statusText: 'Check New Terms And Conditions...',
|
1549
1528
|
run: async () => {
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1529
|
+
this.sessionService.isAuthorized$.subscribe(async (isAuthorized) => {
|
1530
|
+
if (isAuthorized) {
|
1531
|
+
const filterTerms = [];
|
1532
|
+
const terms = await this.appTermService.query();
|
1533
|
+
for (const term of terms.items) {
|
1534
|
+
const isConfirm = await this.settingsService
|
1535
|
+
.scope(AXPSettingScope.User)
|
1536
|
+
.get(`is-confirm-term-${term.id}`);
|
1537
|
+
if (!isConfirm) {
|
1538
|
+
filterTerms.push(term);
|
1539
|
+
}
|
1540
|
+
}
|
1541
|
+
if (filterTerms.length > 0) {
|
1542
|
+
setTimeout(() => {
|
1543
|
+
this.workflowService.execute('new-term', filterTerms);
|
1544
|
+
}, 500);
|
1545
|
+
}
|
1556
1546
|
}
|
1557
|
-
}
|
1558
|
-
if (filterTerms.length > 0) {
|
1559
|
-
setTimeout(() => {
|
1560
|
-
this.workflowService.execute('new-term', filterTerms);
|
1561
|
-
}, 500);
|
1562
|
-
}
|
1547
|
+
});
|
1563
1548
|
},
|
1564
1549
|
});
|
1565
1550
|
}
|
@@ -1594,7 +1579,7 @@ const AXM_COLUMN_DEF_WIDGET = [
|
|
1594
1579
|
{
|
1595
1580
|
type: 'grid-item-layout',
|
1596
1581
|
mode: 'view',
|
1597
|
-
options: { colSpan:
|
1582
|
+
options: { colSpan: 3 },
|
1598
1583
|
children: [
|
1599
1584
|
{
|
1600
1585
|
type: 'text-editor',
|
@@ -1940,24 +1925,81 @@ async function dataSourceEntityFactory(injector) {
|
|
1940
1925
|
triggers: [
|
1941
1926
|
{
|
1942
1927
|
event: "{{ events.context('sourceEntity') }}",
|
1943
|
-
action: `{{ (async () => { const columns = await Promise.all(context.eval('sourceEntity').properties.map(async (item) => { return { name: item.name, title: await methods.translate(item.title), type: { title: await methods.widgetInfo(item.schema.interface.type)?.title, name: item.schema.interface.type }, options: item.schema.interface.options }; })); context.set('columns', columns); })(); }}`,
|
1928
|
+
action: `{{ (async () => { const columns = await Promise.all(context.eval('sourceEntity').properties.filter((x) => x.schema.interface != null && x.schema.interface.type != null).map(async (item) => { return { name: item.name, title: await methods.translate(item.title), type: { title: await methods.widgetInfo(item.schema.interface.type)?.title, name: item.schema.interface.type }, options: item.schema.interface.options }; })); context.set('columns', columns); })(); }}`,
|
1944
1929
|
},
|
1945
1930
|
],
|
1946
1931
|
},
|
1947
1932
|
},
|
1948
1933
|
validations: [
|
1949
|
-
//
|
1934
|
+
// {
|
1950
1935
|
// rule: 'required',
|
1951
1936
|
// disabled: true,
|
1952
|
-
//
|
1937
|
+
// },
|
1938
|
+
],
|
1939
|
+
},
|
1940
|
+
{
|
1941
|
+
name: 'textField',
|
1942
|
+
title: `t("textField", { scope: "${i18n}" })`,
|
1943
|
+
groupId: 'dataSource',
|
1944
|
+
schema: {
|
1945
|
+
dataType: 'string',
|
1946
|
+
interface: {
|
1947
|
+
type: AXPWidgetsCatalog.select,
|
1948
|
+
options: {
|
1949
|
+
valueField: 'name',
|
1950
|
+
textField: 'title',
|
1951
|
+
dataSource: `{{ context.eval('columns') }}`,
|
1952
|
+
},
|
1953
|
+
triggers: [
|
1954
|
+
{
|
1955
|
+
event: '{{ events.context("columns*") }}',
|
1956
|
+
action: "{{ widget.call('clear'); }}",
|
1957
|
+
},
|
1958
|
+
],
|
1959
|
+
},
|
1960
|
+
},
|
1961
|
+
validations: [
|
1962
|
+
{
|
1963
|
+
rule: 'required',
|
1964
|
+
},
|
1965
|
+
],
|
1966
|
+
},
|
1967
|
+
{
|
1968
|
+
name: 'valueField',
|
1969
|
+
title: `t("valueField", { scope: "${i18n}" })`,
|
1970
|
+
groupId: 'dataSource',
|
1971
|
+
schema: {
|
1972
|
+
dataType: 'string',
|
1973
|
+
interface: {
|
1974
|
+
type: AXPWidgetsCatalog.select,
|
1975
|
+
options: {
|
1976
|
+
valueField: 'name',
|
1977
|
+
textField: 'title',
|
1978
|
+
dataSource: `{{ context.eval('columns') }}`,
|
1979
|
+
},
|
1980
|
+
triggers: [
|
1981
|
+
{
|
1982
|
+
event: "{{ events.context('columns*') }}",
|
1983
|
+
action: "{{ widget.call('clear'); }}",
|
1984
|
+
},
|
1985
|
+
],
|
1986
|
+
},
|
1987
|
+
},
|
1988
|
+
validations: [
|
1989
|
+
{
|
1990
|
+
rule: 'required',
|
1991
|
+
},
|
1953
1992
|
],
|
1954
1993
|
},
|
1955
1994
|
],
|
1956
|
-
columns: [{ name: 'name' }, { name: 'title' }, { name: '
|
1995
|
+
columns: [{ name: 'name' }, { name: 'title' }, { name: 'sourceType' }],
|
1957
1996
|
commands: {
|
1958
1997
|
create: {
|
1959
1998
|
execute: async (data) => {
|
1960
|
-
|
1999
|
+
debugger;
|
2000
|
+
if (data.sourceType.name == 'entity') {
|
2001
|
+
data.sourceEntity = data.sourceEntity?.name;
|
2002
|
+
}
|
1961
2003
|
const res = await dataService.insertOne(data);
|
1962
2004
|
return { id: res };
|
1963
2005
|
},
|
@@ -2035,11 +2077,33 @@ async function dataSourceEntityFactory(injector) {
|
|
2035
2077
|
positions: {
|
2036
2078
|
lg: {
|
2037
2079
|
colSpan: 12,
|
2080
|
+
order: 11,
|
2081
|
+
},
|
2082
|
+
},
|
2083
|
+
},
|
2084
|
+
},
|
2085
|
+
{
|
2086
|
+
name: 'textField',
|
2087
|
+
layout: {
|
2088
|
+
positions: {
|
2089
|
+
lg: {
|
2090
|
+
colSpan: 6,
|
2038
2091
|
order: 6,
|
2039
2092
|
},
|
2040
2093
|
},
|
2041
2094
|
},
|
2042
2095
|
},
|
2096
|
+
{
|
2097
|
+
name: 'valueField',
|
2098
|
+
layout: {
|
2099
|
+
positions: {
|
2100
|
+
lg: {
|
2101
|
+
colSpan: 6,
|
2102
|
+
order: 7,
|
2103
|
+
},
|
2104
|
+
},
|
2105
|
+
},
|
2106
|
+
},
|
2043
2107
|
{
|
2044
2108
|
name: 'sourceType',
|
2045
2109
|
layout: {
|
@@ -2110,13 +2174,57 @@ async function dataSourceEntityFactory(injector) {
|
|
2110
2174
|
positions: {
|
2111
2175
|
lg: {
|
2112
2176
|
colSpan: 12,
|
2113
|
-
order:
|
2177
|
+
order: 5,
|
2178
|
+
},
|
2179
|
+
},
|
2180
|
+
},
|
2181
|
+
},
|
2182
|
+
{
|
2183
|
+
name: 'textField',
|
2184
|
+
layout: {
|
2185
|
+
positions: {
|
2186
|
+
lg: {
|
2187
|
+
colSpan: 6,
|
2188
|
+
order: 6,
|
2189
|
+
},
|
2190
|
+
},
|
2191
|
+
},
|
2192
|
+
},
|
2193
|
+
{
|
2194
|
+
name: 'valueField',
|
2195
|
+
layout: {
|
2196
|
+
positions: {
|
2197
|
+
lg: {
|
2198
|
+
colSpan: 6,
|
2199
|
+
order: 7,
|
2114
2200
|
},
|
2115
2201
|
},
|
2116
2202
|
},
|
2117
2203
|
},
|
2118
2204
|
{
|
2119
2205
|
name: 'samples',
|
2206
|
+
layout: {
|
2207
|
+
positions: {
|
2208
|
+
lg: {
|
2209
|
+
colSpan: 12,
|
2210
|
+
order: 10,
|
2211
|
+
},
|
2212
|
+
},
|
2213
|
+
},
|
2214
|
+
},
|
2215
|
+
{
|
2216
|
+
name: 'sourceEntity',
|
2217
|
+
layout: {
|
2218
|
+
positions: {
|
2219
|
+
lg: {
|
2220
|
+
colSpan: 12,
|
2221
|
+
order: 4,
|
2222
|
+
},
|
2223
|
+
},
|
2224
|
+
},
|
2225
|
+
},
|
2226
|
+
{
|
2227
|
+
name: 'sourceStatic',
|
2120
2228
|
layout: {
|
2121
2229
|
positions: {
|
2122
2230
|
lg: {
|
@@ -2169,13 +2277,68 @@ async function dataSourceEntityFactory(injector) {
|
|
2169
2277
|
},
|
2170
2278
|
},
|
2171
2279
|
},
|
2280
|
+
{
|
2281
|
+
name: 'sourceType',
|
2282
|
+
layout: {
|
2283
|
+
positions: {
|
2284
|
+
lg: {
|
2285
|
+
colSpan: 6,
|
2286
|
+
order: 4,
|
2287
|
+
},
|
2288
|
+
},
|
2289
|
+
},
|
2290
|
+
},
|
2291
|
+
{
|
2292
|
+
name: 'sourceEntity',
|
2293
|
+
layout: {
|
2294
|
+
positions: {
|
2295
|
+
lg: {
|
2296
|
+
colSpan: 6,
|
2297
|
+
order: 5,
|
2298
|
+
},
|
2299
|
+
},
|
2300
|
+
},
|
2301
|
+
},
|
2302
|
+
{
|
2303
|
+
name: 'sourceStatic',
|
2304
|
+
layout: {
|
2305
|
+
positions: {
|
2306
|
+
lg: {
|
2307
|
+
colSpan: 6,
|
2308
|
+
order: 5,
|
2309
|
+
},
|
2310
|
+
},
|
2311
|
+
},
|
2312
|
+
},
|
2172
2313
|
{
|
2173
2314
|
name: 'samples',
|
2174
2315
|
layout: {
|
2175
2316
|
positions: {
|
2176
2317
|
lg: {
|
2177
2318
|
colSpan: 12,
|
2178
|
-
order:
|
2319
|
+
order: 10,
|
2320
|
+
},
|
2321
|
+
},
|
2322
|
+
},
|
2323
|
+
},
|
2324
|
+
{
|
2325
|
+
name: 'textField',
|
2326
|
+
layout: {
|
2327
|
+
positions: {
|
2328
|
+
lg: {
|
2329
|
+
colSpan: 6,
|
2330
|
+
order: 7,
|
2331
|
+
},
|
2332
|
+
},
|
2333
|
+
},
|
2334
|
+
},
|
2335
|
+
{
|
2336
|
+
name: 'valueField',
|
2337
|
+
layout: {
|
2338
|
+
positions: {
|
2339
|
+
lg: {
|
2340
|
+
colSpan: 6,
|
2341
|
+
order: 8,
|
2179
2342
|
},
|
2180
2343
|
},
|
2181
2344
|
},
|
@@ -2187,7 +2350,14 @@ async function dataSourceEntityFactory(injector) {
|
|
2187
2350
|
actions: [
|
2188
2351
|
{
|
2189
2352
|
title: `t("create", { scope: "common" })`,
|
2190
|
-
command:
|
2353
|
+
command: {
|
2354
|
+
name: 'create-entity',
|
2355
|
+
options: {
|
2356
|
+
layout: {
|
2357
|
+
size: 'lg',
|
2358
|
+
},
|
2359
|
+
},
|
2360
|
+
},
|
2191
2361
|
priority: 'primary',
|
2192
2362
|
type: 'create',
|
2193
2363
|
scope: AXPEntityCommandScope.TypeLevel,
|
@@ -2213,6 +2383,13 @@ async function dataSourceEntityFactory(injector) {
|
|
2213
2383
|
type: 'delete',
|
2214
2384
|
scope: AXPEntityCommandScope.Individual,
|
2215
2385
|
},
|
2386
|
+
{
|
2387
|
+
title: 't("modify", { scope: "common" })',
|
2388
|
+
command: 'quick-modify-entity',
|
2389
|
+
priority: 'secondary',
|
2390
|
+
type: 'update',
|
2391
|
+
scope: AXPEntityCommandScope.Individual,
|
2392
|
+
},
|
2216
2393
|
],
|
2217
2394
|
views: [
|
2218
2395
|
{
|
@@ -2632,11 +2809,11 @@ class AXMPromotionSlotComponent {
|
|
2632
2809
|
this.listData.set(mappedItems);
|
2633
2810
|
}
|
2634
2811
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPromotionSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2635
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMPromotionSlotComponent, isStandalone: true, selector: "acorex-platform-promotion-slot", ngImport: i0, template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img
|
2812
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMPromotionSlotComponent, isStandalone: true, selector: "acorex-platform-promotion-slot", ngImport: i0, template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img [src]=\"item.image?.url ?? ''\" class=\"ax-w-full ax-p-3 ax-border {{\n item.shape?.name == 'circle' ? 'ax-rounded-full' : 'ax-rounded-none'\n }}\" />\n} @if(item.contentType?.name == 'text'){\n<div class=\"ax-m-1 ax-px-6 ax-p-4 ax-border ax-bg-primary ax-rounded-lg\">\n <h1 class=\"ax-text-base/6\" [innerHTML]=\"item.body | safe : 'html'\"></h1>\n</div>\n\n} }\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: AXSafePipe, name: "safe" }] }); }
|
2636
2813
|
}
|
2637
2814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPromotionSlotComponent, decorators: [{
|
2638
2815
|
type: Component,
|
2639
|
-
args: [{ selector: 'acorex-platform-promotion-slot', imports: [CommonModule, AXSafePipe], template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img
|
2816
|
+
args: [{ selector: 'acorex-platform-promotion-slot', imports: [CommonModule, AXSafePipe], template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img [src]=\"item.image?.url ?? ''\" class=\"ax-w-full ax-p-3 ax-border {{\n item.shape?.name == 'circle' ? 'ax-rounded-full' : 'ax-rounded-none'\n }}\" />\n} @if(item.contentType?.name == 'text'){\n<div class=\"ax-m-1 ax-px-6 ax-p-4 ax-border ax-bg-primary ax-rounded-lg\">\n <h1 class=\"ax-text-base/6\" [innerHTML]=\"item.body | safe : 'html'\"></h1>\n</div>\n\n} }\n" }]
|
2640
2817
|
}] });
|
2641
2818
|
|
2642
2819
|
async function promotionEntityFactory(injector) {
|
@@ -2701,6 +2878,9 @@ async function promotionEntityFactory(injector) {
|
|
2701
2878
|
type: AXPWidgetsCatalog.file,
|
2702
2879
|
options: {
|
2703
2880
|
multiple: false,
|
2881
|
+
accept: '.png,.jpg,.jpeg,.svg,.gif',
|
2882
|
+
refType: 'entity',
|
2883
|
+
refId: `${RootConfig.module.name}.${RootConfig.entities.promotion.name}`,
|
2704
2884
|
},
|
2705
2885
|
},
|
2706
2886
|
},
|
@@ -2731,9 +2911,36 @@ async function promotionEntityFactory(injector) {
|
|
2731
2911
|
},
|
2732
2912
|
],
|
2733
2913
|
},
|
2914
|
+
// {
|
2915
|
+
// name: 'shape',
|
2916
|
+
// title: `t("shape", { scope: "${i18n}" })`,
|
2917
|
+
// groupId: 'promotion',
|
2918
|
+
// schema: {
|
2919
|
+
// dataType: 'string',
|
2920
|
+
// interface: {
|
2921
|
+
// type: AXPWidgetsCatalog.select,
|
2922
|
+
// options: {
|
2923
|
+
// valueField: 'name',
|
2924
|
+
// textField: 'title',
|
2925
|
+
// dataSource: [
|
2926
|
+
// { title: 'Circle', name: 'circle' },
|
2927
|
+
// { title: 'Square', name: 'square' },
|
2928
|
+
// ],
|
2929
|
+
// direction: 'horizontal',
|
2930
|
+
// multiple: false,
|
2931
|
+
// accept: '',
|
2932
|
+
// },
|
2933
|
+
// },
|
2934
|
+
// },
|
2935
|
+
// validations: [
|
2936
|
+
// {
|
2937
|
+
// rule: 'required',
|
2938
|
+
// },
|
2939
|
+
// ],
|
2940
|
+
// },
|
2734
2941
|
{
|
2735
|
-
name: '
|
2736
|
-
title: `t("
|
2942
|
+
name: 'placement',
|
2943
|
+
title: `t("placement", { scope: "${i18n}" })`,
|
2737
2944
|
groupId: 'promotion',
|
2738
2945
|
schema: {
|
2739
2946
|
dataType: 'string',
|
@@ -2743,8 +2950,26 @@ async function promotionEntityFactory(injector) {
|
|
2743
2950
|
valueField: 'name',
|
2744
2951
|
textField: 'title',
|
2745
2952
|
dataSource: [
|
2746
|
-
{
|
2747
|
-
|
2953
|
+
{
|
2954
|
+
title: 'Side Menu Footer',
|
2955
|
+
name: 'side-menu-footer',
|
2956
|
+
options: AXM_COLUMN_DEF_WIDGET
|
2957
|
+
},
|
2958
|
+
{
|
2959
|
+
title: 'Side Menu Header',
|
2960
|
+
name: 'side-menu-header',
|
2961
|
+
options: [
|
2962
|
+
{
|
2963
|
+
type: 'text-editor',
|
2964
|
+
mode: 'edit',
|
2965
|
+
path: 'name',
|
2966
|
+
options: {
|
2967
|
+
placeholder: 'Name',
|
2968
|
+
defaultValue: 'test',
|
2969
|
+
},
|
2970
|
+
},
|
2971
|
+
]
|
2972
|
+
},
|
2748
2973
|
],
|
2749
2974
|
direction: 'horizontal',
|
2750
2975
|
multiple: false,
|
@@ -2757,34 +2982,32 @@ async function promotionEntityFactory(injector) {
|
|
2757
2982
|
},
|
2758
2983
|
],
|
2759
2984
|
},
|
2985
|
+
// {
|
2986
|
+
// name: "metadaata",
|
2987
|
+
// title: "Meta Data",
|
2988
|
+
// groupId: 'promotion',
|
2989
|
+
// schema: {
|
2990
|
+
// dataType: 'object',
|
2991
|
+
// interface: {
|
2992
|
+
// type: AXPWidgetsCatalog.text,
|
2993
|
+
// // children: "{{ context.eval('placement').options }}" as any,
|
2994
|
+
// },
|
2995
|
+
// }
|
2996
|
+
//},
|
2760
2997
|
{
|
2761
|
-
name: '
|
2762
|
-
title: `
|
2998
|
+
name: 'metadata',
|
2999
|
+
title: `Meta Data`,
|
2763
3000
|
groupId: 'promotion',
|
2764
3001
|
schema: {
|
2765
|
-
dataType: '
|
3002
|
+
dataType: 'object',
|
2766
3003
|
interface: {
|
2767
|
-
type: AXPWidgetsCatalog.
|
2768
|
-
|
2769
|
-
valueField: 'name',
|
2770
|
-
textField: 'title',
|
2771
|
-
dataSource: [
|
2772
|
-
{ title: 'Side Menu Footer', name: 'side-menu-footer' },
|
2773
|
-
{ title: 'Side Menu Header', name: 'side-menu-header' },
|
2774
|
-
],
|
2775
|
-
direction: 'horizontal',
|
2776
|
-
multiple: false,
|
2777
|
-
},
|
3004
|
+
type: AXPWidgetsCatalog.blockLayout,
|
3005
|
+
children: "{{ context.eval('placement')?.options ?? [] }}",
|
2778
3006
|
},
|
2779
|
-
}
|
2780
|
-
validations: [
|
2781
|
-
{
|
2782
|
-
rule: 'required',
|
2783
|
-
},
|
2784
|
-
],
|
3007
|
+
}
|
2785
3008
|
},
|
2786
3009
|
],
|
2787
|
-
columns: [{ name: 'title' }, { name: '
|
3010
|
+
columns: [{ name: 'title' }, { name: 'placement' }],
|
2788
3011
|
commands: {
|
2789
3012
|
create: {
|
2790
3013
|
execute: async (data) => {
|
@@ -2893,6 +3116,17 @@ async function promotionEntityFactory(injector) {
|
|
2893
3116
|
},
|
2894
3117
|
},
|
2895
3118
|
},
|
3119
|
+
{
|
3120
|
+
name: 'metadata',
|
3121
|
+
layout: {
|
3122
|
+
positions: {
|
3123
|
+
lg: {
|
3124
|
+
colSpan: 12,
|
3125
|
+
order: 10,
|
3126
|
+
},
|
3127
|
+
},
|
3128
|
+
},
|
3129
|
+
},
|
2896
3130
|
],
|
2897
3131
|
},
|
2898
3132
|
update: {
|
@@ -2968,6 +3202,17 @@ async function promotionEntityFactory(injector) {
|
|
2968
3202
|
},
|
2969
3203
|
},
|
2970
3204
|
},
|
3205
|
+
{
|
3206
|
+
name: 'metadata',
|
3207
|
+
layout: {
|
3208
|
+
positions: {
|
3209
|
+
lg: {
|
3210
|
+
colSpan: 12,
|
3211
|
+
order: 10,
|
3212
|
+
},
|
3213
|
+
},
|
3214
|
+
},
|
3215
|
+
},
|
2971
3216
|
],
|
2972
3217
|
},
|
2973
3218
|
single: {
|
@@ -3282,25 +3527,50 @@ class AXMMenuProvider {
|
|
3282
3527
|
class AXMDynamicDataSourceProvider {
|
3283
3528
|
constructor() {
|
3284
3529
|
this.dataSourceService = inject(AXMDataSourceService);
|
3530
|
+
this.entityResolverService = inject(AXPEntityResolver);
|
3285
3531
|
}
|
3286
3532
|
async items() {
|
3287
|
-
|
3533
|
+
const dataSources = await this.dataSourceService.query({
|
3288
3534
|
skip: 0,
|
3289
3535
|
take: 1000,
|
3290
|
-
})
|
3536
|
+
});
|
3537
|
+
const mapFn = (item) => {
|
3291
3538
|
return {
|
3292
3539
|
...item,
|
3293
|
-
|
3294
|
-
|
3540
|
+
valueField: get(item, 'valueField.name'),
|
3541
|
+
textField: get(item, 'textField.name'),
|
3542
|
+
source: async () => {
|
3295
3543
|
if (item.sourceType.name == 'static') {
|
3296
3544
|
return convertArrayToDataSource(item.sourceStatic);
|
3297
3545
|
}
|
3298
|
-
|
3299
|
-
|
3546
|
+
// Entity
|
3547
|
+
else if (item.sourceType.name == 'entity') {
|
3548
|
+
const [module, entityName] = item.sourceEntity.split('.');
|
3549
|
+
const entity = await this.entityResolverService.get(module, entityName);
|
3550
|
+
const exFn = entity?.queries.list?.execute;
|
3551
|
+
if (exFn && typeof exFn == 'function') {
|
3552
|
+
return new AXDataSource({
|
3553
|
+
key: 'id',
|
3554
|
+
pageSize: 10,
|
3555
|
+
load: async (e) => {
|
3556
|
+
try {
|
3557
|
+
const result = await exFn(e);
|
3558
|
+
return result;
|
3559
|
+
}
|
3560
|
+
catch (error) {
|
3561
|
+
throw error;
|
3562
|
+
}
|
3563
|
+
}
|
3564
|
+
});
|
3565
|
+
}
|
3300
3566
|
}
|
3567
|
+
//
|
3568
|
+
return convertArrayToDataSource([]);
|
3301
3569
|
},
|
3302
3570
|
};
|
3303
|
-
}
|
3571
|
+
};
|
3572
|
+
const mapped = dataSources.items.map((item) => mapFn(item));
|
3573
|
+
return mapped;
|
3304
3574
|
}
|
3305
3575
|
}
|
3306
3576
|
|
@@ -3495,5 +3765,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
3495
3765
|
* Generated bundle index. Do not edit.
|
3496
3766
|
*/
|
3497
3767
|
|
3498
|
-
export { AXMAppPromotionService, AXMAppTermService, AXMAppTermServiceImpl, AXMAppVersionService, AXMAppVersionServiceImpl, AXMAppVersionSlotComponent, AXMChangeLogPopupAction, AXMChangeLogUpdateSettingAction, AXMChangeLogWorkflow, AXMCommonModuleEntityProvider, AXMDataSourceService, AXMDataSourceServiceImpl, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMListTermsComponent, AXMNewTermWorkflow, AXMNotifyAppComponent, AXMNotifyNewTermPopupAction, AXMPlatformManagementModule, AXMPromotionServiceImpl, AXMPromotionSlotComponent, AXMTermUpdateSettingAction,
|
3768
|
+
export { AXMAppPromotionService, AXMAppTermService, AXMAppTermServiceImpl, AXMAppVersionService, AXMAppVersionServiceImpl, AXMAppVersionSlotComponent, AXMChangeLogPopupAction, AXMChangeLogUpdateSettingAction, AXMChangeLogWorkflow, AXMCommonModuleEntityProvider, AXMDataSourceService, AXMDataSourceServiceImpl, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMListTermsComponent, AXMNewTermWorkflow, AXMNotifyAppComponent, AXMNotifyNewTermPopupAction, AXMPlatformManagementModule, AXMPromotionServiceImpl, AXMPromotionSlotComponent, AXMTermUpdateSettingAction, AXPRegionalStoreService, AppTermAndVersionCheck, RootConfig, appTermEntityEntityFactory, appVersionEntityEntityFactory, dataSourceEntityFactory, globalVariableEntityFactory, promotionEntityFactory };
|
3499
3769
|
//# sourceMappingURL=acorex-modules-platform-management.mjs.map
|