@acorex/modules 19.1.6 → 19.1.8
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/fesm2022/{acorex-modules-form-template-management-template.entity-CGhbmYel.mjs → acorex-modules-form-template-management-template.entity-CrFYszl6.mjs} +2 -2
- package/fesm2022/acorex-modules-form-template-management-template.entity-CrFYszl6.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management.mjs +647 -594
- package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +52 -28
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +23 -1
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-text-template-management.mjs +32 -1
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/form-template-management/lib/entity.provider.d.ts +3 -2
- package/form-template-management/lib/search.provider.d.ts +4 -0
- package/notification-management/lib/entity.loader.d.ts +3 -2
- package/package.json +4 -8
- package/platform-management/index.d.ts +1 -0
- package/platform-management/lib/const.d.ts +1 -0
- package/platform-management/lib/text-search/index.d.ts +2 -0
- package/platform-management/lib/text-search/text-search.service.d.ts +10 -0
- package/platform-management/lib/text-search/text-search.types.d.ts +9 -0
- package/text-template-management/lib/entity.provider.d.ts +3 -2
- package/text-template-management/lib/search-definition.provider.d.ts +4 -0
- package/backend/README.md +0 -4
- package/backend/index.d.ts +0 -4
- package/backend/lib/auth/oidc/application.loader.d.ts +0 -16
- package/backend/lib/auth/oidc/configuration.service.d.ts +0 -60
- package/backend/lib/auth/oidc/feature.loader.d.ts +0 -6
- package/backend/lib/auth/oidc/index.d.ts +0 -6
- package/backend/lib/auth/oidc/oidc.strategy.d.ts +0 -50
- package/backend/lib/auth/oidc/permission.loader.d.ts +0 -14
- package/backend/lib/auth/oidc/signincallback.component.d.ts +0 -12
- package/backend/lib/auth/oidc/tenant.loader.d.ts +0 -16
- package/backend/lib/backend.configs.d.ts +0 -94
- package/backend/lib/backend.module.d.ts +0 -9
- package/backend/lib/data/api/comment.service.d.ts +0 -16
- package/backend/lib/data/api/data-provider.d.ts +0 -26
- package/backend/lib/data/api/file.service.d.ts +0 -16
- package/backend/lib/data/api/module-designer.service.d.ts +0 -43
- package/backend/lib/data/index.d.ts +0 -4
- package/fesm2022/acorex-modules-backend.mjs +0 -943
- package/fesm2022/acorex-modules-backend.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-CGhbmYel.mjs.map +0 -1
@@ -1,189 +1,359 @@
|
|
1
|
-
import { AXMEntityCrudServiceImpl, AXPDataGenerator, AXPWorkflowNavigateAction, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
1
|
+
import { AXMEntityCrudServiceImpl, AXPCommandSearchProvider, AXPDataGenerator, AXPWorkflowNavigateAction, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
2
|
+
import * as i2 from '@acorex/platform/layout/builder';
|
3
|
+
import { AXPWidgetComponent, AXPLayoutBuilderModule, AXP_WIDGETS_ADVANCE_GROUP, createStringProperty, AXP_WIDGETS_LAYOUT_GROUP, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
4
|
+
import { AXPDesignerService, AXPWidgetDesignerRendererDirective, AXPDesignerAddWidgetMiniButtonComponent, AXPDesignerConnector } from '@acorex/platform/layout/designer';
|
2
5
|
import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
3
6
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXPWidgetsModule } from '@acorex/platform/widgets';
|
7
|
+
import * as i2$1 from '@acorex/platform/workflow';
|
8
|
+
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
4
9
|
import * as i0 from '@angular/core';
|
5
|
-
import {
|
10
|
+
import { InjectionToken, inject, Injectable, computed, signal, effect, Component, ChangeDetectionStrategy, HostBinding, NgModule, Injector } from '@angular/core';
|
6
11
|
import { ROUTES } from '@angular/router';
|
7
|
-
import * as i2 from '@acorex/platform/layout/builder';
|
8
|
-
import { AXPWidgetComponent, AXP_WIDGETS_LAYOUT_GROUP, AXPLayoutBuilderModule, AXP_WIDGETS_ADVANCE_GROUP, createStringProperty, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
9
|
-
import { AXButtonModule } from '@acorex/components/button';
|
10
12
|
import * as i3 from '@acorex/core/translation';
|
11
13
|
import { AXTranslationModule } from '@acorex/core/translation';
|
12
|
-
import * as i2$1 from '@acorex/platform/workflow';
|
13
|
-
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
14
14
|
import * as i1 from '@angular/common';
|
15
15
|
import { CommonModule } from '@angular/common';
|
16
|
-
import {
|
17
|
-
import { get, sortBy } from 'lodash-es';
|
16
|
+
import { sortBy, get } from 'lodash-es';
|
18
17
|
import { AXPopupService } from '@acorex/components/popup';
|
18
|
+
import { AXButtonModule } from '@acorex/components/button';
|
19
19
|
|
20
|
-
const
|
21
|
-
|
22
|
-
moduleRoute: 'form-template-management',
|
23
|
-
i18n: 'form-template-management',
|
24
|
-
categoryEntity: 'Category',
|
25
|
-
templateEntity: 'Template',
|
26
|
-
};
|
27
|
-
|
28
|
-
class AXMFormTemplateManagementCategoryEntityService extends AXMEntityCrudServiceImpl {
|
29
|
-
}
|
30
|
-
class AXMFormTemplateManagementCategoryEntityServiceImpl extends AXMFormTemplateManagementCategoryEntityService {
|
31
|
-
constructor() {
|
32
|
-
super(`${AXMFormTemplateManagementModuleConst.moduleName}.${AXMFormTemplateManagementModuleConst.categoryEntity}`);
|
33
|
-
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityServiceImpl }); }
|
36
|
-
}
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityServiceImpl, decorators: [{
|
38
|
-
type: Injectable
|
39
|
-
}], ctorParameters: () => [] });
|
40
|
-
|
41
|
-
class AXMFormTemplateManagementCategoryEntityModule {
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
43
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule }); }
|
44
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule, providers: [
|
45
|
-
{
|
46
|
-
provide: AXMFormTemplateManagementCategoryEntityService,
|
47
|
-
useClass: AXMFormTemplateManagementCategoryEntityServiceImpl,
|
48
|
-
},
|
49
|
-
] }); }
|
50
|
-
}
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule, decorators: [{
|
52
|
-
type: NgModule,
|
53
|
-
args: [{
|
54
|
-
imports: [],
|
55
|
-
exports: [],
|
56
|
-
declarations: [],
|
57
|
-
providers: [
|
58
|
-
{
|
59
|
-
provide: AXMFormTemplateManagementCategoryEntityService,
|
60
|
-
useClass: AXMFormTemplateManagementCategoryEntityServiceImpl,
|
61
|
-
},
|
62
|
-
],
|
63
|
-
}]
|
64
|
-
}] });
|
65
|
-
|
66
|
-
class AXMFormTemplateManagementTemplateEntityService extends AXMEntityCrudServiceImpl {
|
67
|
-
}
|
68
|
-
class AXMFormTemplateManagementTemplateEntityServiceImpl extends AXMFormTemplateManagementTemplateEntityService {
|
20
|
+
const AXP_TEMPLATE_WIDGET_PROVIDER = new InjectionToken('AXP_TEMPLATE_WIDGET_PROVIDER');
|
21
|
+
class AXPTemplateWidgetProviderService {
|
69
22
|
constructor() {
|
70
|
-
|
23
|
+
this.popupService = inject(AXPopupService);
|
24
|
+
this.providers = inject(AXP_TEMPLATE_WIDGET_PROVIDER, { optional: true });
|
71
25
|
}
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
},
|
87
|
-
] }); }
|
88
|
-
}
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityModule, decorators: [{
|
90
|
-
type: NgModule,
|
91
|
-
args: [{
|
92
|
-
imports: [],
|
93
|
-
exports: [],
|
94
|
-
declarations: [],
|
95
|
-
providers: [
|
96
|
-
{
|
97
|
-
provide: AXMFormTemplateManagementTemplateEntityService,
|
98
|
-
useClass: AXMFormTemplateManagementTemplateEntityServiceImpl,
|
99
|
-
},
|
100
|
-
],
|
101
|
-
}]
|
102
|
-
}] });
|
103
|
-
|
104
|
-
const AXMFormTemplateTypes = {
|
105
|
-
Form: { id: 10, title: 'Form Template' },
|
106
|
-
Widget: { id: 20, title: 'Widget Template' },
|
107
|
-
};
|
108
|
-
|
109
|
-
class AXMFormTemplateManagementModuleEntityProvider {
|
110
|
-
constructor() {
|
111
|
-
this.injector = inject(Injector);
|
26
|
+
async items(query) {
|
27
|
+
if (Array.isArray(this.providers)) {
|
28
|
+
const result = [];
|
29
|
+
for (const provider of this.providers) {
|
30
|
+
const items = await provider.items(query);
|
31
|
+
if (items) {
|
32
|
+
result.push(...items);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
return result;
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
return [];
|
39
|
+
}
|
112
40
|
}
|
113
|
-
async get(
|
114
|
-
if (
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
41
|
+
async get(id) {
|
42
|
+
if (Array.isArray(this.providers)) {
|
43
|
+
for (const provider of this.providers) {
|
44
|
+
const node = await provider.get(id);
|
45
|
+
if (node) {
|
46
|
+
return node;
|
47
|
+
}
|
120
48
|
}
|
121
49
|
}
|
122
50
|
return null;
|
123
51
|
}
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
const
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
children: [
|
144
|
-
{
|
145
|
-
text: `t("categories", { scope: "common" })`,
|
146
|
-
path: this.entityService.createPath(moduleName, AXMFormTemplateManagementModuleConst.categoryEntity),
|
147
|
-
priority: 1,
|
148
|
-
},
|
149
|
-
{
|
150
|
-
text: `t('templates', {scope:"${scope}"})`,
|
151
|
-
path: this.entityService.createPath(moduleName, AXMFormTemplateManagementModuleConst.templateEntity),
|
152
|
-
priority: 2,
|
153
|
-
},
|
154
|
-
],
|
52
|
+
async chooseTemplate() {
|
53
|
+
const com = await import('./acorex-modules-form-template-management-template-picker.component-CsGnikzF.mjs').then((c) => c.AXPTemplateWidgetPickerComponent);
|
54
|
+
const widgets = await this.items({
|
55
|
+
skip: 0,
|
56
|
+
take: 100,
|
57
|
+
filter: {
|
58
|
+
field: 'type.id',
|
59
|
+
value: 20,
|
60
|
+
operator: {
|
61
|
+
type: 'equal',
|
62
|
+
}
|
63
|
+
}
|
64
|
+
});
|
65
|
+
const result = await this.popupService.open(com, {
|
66
|
+
title: 'Widget Template Gallery',
|
67
|
+
size: 'md',
|
68
|
+
closeButton: true,
|
69
|
+
data: {
|
70
|
+
widgets: sortBy(widgets, (c) => c.title),
|
155
71
|
},
|
156
|
-
|
72
|
+
});
|
73
|
+
if (result.data) {
|
74
|
+
const selected = result.data?.widgets;
|
75
|
+
return selected[0];
|
76
|
+
}
|
77
|
+
return null;
|
157
78
|
}
|
79
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
80
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetProviderService, providedIn: 'root' }); }
|
158
81
|
}
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetProviderService, decorators: [{
|
83
|
+
type: Injectable,
|
84
|
+
args: [{ providedIn: 'root' }]
|
85
|
+
}] });
|
159
86
|
|
160
|
-
class
|
87
|
+
class AXPTemplateWidgetViewComponent extends AXPWidgetComponent {
|
161
88
|
constructor() {
|
162
|
-
super(
|
163
|
-
this.
|
89
|
+
super();
|
90
|
+
this.metaKey = '__meta__';
|
91
|
+
this.templateProvider = inject(AXPTemplateWidgetProviderService);
|
92
|
+
this.templateId = computed(() => this.options()['templateId']);
|
93
|
+
this.nodes = signal([]);
|
94
|
+
//
|
95
|
+
effect(async () => {
|
96
|
+
this.nodes.set([]);
|
97
|
+
const value = this.getValue();
|
98
|
+
const templateId = get(value, `${this.metaKey}.templateId`) ?? this.templateId();
|
99
|
+
if (templateId) {
|
100
|
+
const item = await this.templateProvider.get(templateId);
|
101
|
+
if (item) {
|
102
|
+
this.nodes.set(item.nodes);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
});
|
164
106
|
}
|
165
|
-
|
166
|
-
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetViewComponent, isStandalone: true, selector: "axp-template-widget-view", usesInheritance: true, ngImport: i0, template: `
|
109
|
+
@for (node of nodes(); track $index) {
|
110
|
+
<ng-container axp-widget-renderer
|
111
|
+
[node]="node"
|
112
|
+
[parentNode]="this"
|
113
|
+
[mode]="this.mode"
|
114
|
+
>
|
115
|
+
</ng-container>
|
167
116
|
}
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
class="ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer"
|
172
|
-
(click)="handleClick()"
|
173
|
-
>
|
174
|
-
{{ 't("edit-template",{ scope:"form-template-management" })' | translate | async }}
|
117
|
+
@empty {
|
118
|
+
<span class="ax-underline ax-decoration-dotted ax-underline-offset-8 ax-text-gray-400">
|
119
|
+
{{ 'empty-template' | translate : { scope: 'form-template-management' } | async }}
|
175
120
|
</span>
|
176
|
-
|
121
|
+
}
|
122
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
177
123
|
}
|
178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetViewComponent, decorators: [{
|
179
125
|
type: Component,
|
180
126
|
args: [{
|
127
|
+
selector: 'axp-template-widget-view',
|
181
128
|
template: `
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
129
|
+
@for (node of nodes(); track $index) {
|
130
|
+
<ng-container axp-widget-renderer
|
131
|
+
[node]="node"
|
132
|
+
[parentNode]="this"
|
133
|
+
[mode]="this.mode"
|
134
|
+
>
|
135
|
+
</ng-container>
|
136
|
+
}
|
137
|
+
@empty {
|
138
|
+
<span class="ax-underline ax-decoration-dotted ax-underline-offset-8 ax-text-gray-400">
|
139
|
+
{{ 'empty-template' | translate : { scope: 'form-template-management' } | async }}
|
140
|
+
</span>
|
141
|
+
}
|
142
|
+
`,
|
143
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
144
|
+
imports: [CommonModule, AXPLayoutBuilderModule, AXTranslationModule]
|
145
|
+
}]
|
146
|
+
}], ctorParameters: () => [] });
|
147
|
+
|
148
|
+
var templateWidgetView_component = /*#__PURE__*/Object.freeze({
|
149
|
+
__proto__: null,
|
150
|
+
AXPTemplateWidgetViewComponent: AXPTemplateWidgetViewComponent
|
151
|
+
});
|
152
|
+
|
153
|
+
const AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU = {
|
154
|
+
text: 'Choose Template',
|
155
|
+
name: 'choose',
|
156
|
+
icon: 'fa-solid fa-folder-open',
|
157
|
+
};
|
158
|
+
class AXPTemplateWidgetDesignerComponent extends AXPWidgetComponent {
|
159
|
+
constructor() {
|
160
|
+
super();
|
161
|
+
this.templateProvider = inject(AXPTemplateWidgetProviderService);
|
162
|
+
this.designerService = inject(AXPDesignerService);
|
163
|
+
this.templateId = computed(() => this.options()['templateId']);
|
164
|
+
this.nodes = signal([]);
|
165
|
+
this.title = signal(null);
|
166
|
+
//
|
167
|
+
effect(async () => {
|
168
|
+
this.nodes.set([]);
|
169
|
+
if (this.templateId()) {
|
170
|
+
const item = await this.templateProvider.get(this.templateId());
|
171
|
+
if (item && item.nodes?.length > 0) {
|
172
|
+
this.title.set(item.title);
|
173
|
+
this.nodes.set(item.nodes);
|
174
|
+
}
|
175
|
+
}
|
176
|
+
});
|
177
|
+
}
|
178
|
+
// override async ngOnInit() {
|
179
|
+
// super.ngOnInit();
|
180
|
+
// if (!this.templateId()) {
|
181
|
+
// this.handleChooseWidget();
|
182
|
+
// }
|
183
|
+
// }
|
184
|
+
async handleChooseWidget() {
|
185
|
+
const result = await this.templateProvider.chooseTemplate();
|
186
|
+
if (result) {
|
187
|
+
this.designerService.update({
|
188
|
+
mode: 'update',
|
189
|
+
values: { options: { templateId: result.id } },
|
190
|
+
widget: this.node,
|
191
|
+
});
|
192
|
+
}
|
193
|
+
}
|
194
|
+
get __class() {
|
195
|
+
const cls = {};
|
196
|
+
//
|
197
|
+
cls[`ax-w-full`] = true;
|
198
|
+
cls[`ax-widget-outline`] = true;
|
199
|
+
//
|
200
|
+
cls[`ax-block`] = true;
|
201
|
+
return cls;
|
202
|
+
}
|
203
|
+
onContextMenu(context) {
|
204
|
+
const items = [
|
205
|
+
AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU
|
206
|
+
];
|
207
|
+
items[items.length - 1].break = true;
|
208
|
+
context.items.unshift(...items);
|
209
|
+
}
|
210
|
+
async executeCommand(command) {
|
211
|
+
switch (command.name) {
|
212
|
+
case AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU.name:
|
213
|
+
await this.handleChooseWidget();
|
214
|
+
break;
|
215
|
+
}
|
216
|
+
return Promise.resolve();
|
217
|
+
}
|
218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
219
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetDesignerComponent, isStandalone: true, selector: "axp-template-widget-designer", host: { properties: { "class": "this.__class" } }, providers: [
|
220
|
+
{
|
221
|
+
provide: AXPTemplateWidgetDesignerComponent,
|
222
|
+
useExisting: AXPWidgetComponent,
|
223
|
+
},
|
224
|
+
], usesInheritance: true, ngImport: i0, template: `
|
225
|
+
@if(nodes().length) {
|
226
|
+
<div class="ax-relative ax-block ax-w-full ax-pointer-events-none">
|
227
|
+
@for (node of nodes(); track $index) {
|
228
|
+
<ng-container axp-widget-designer-renderer [locked]="true" [node]="node" [parentNode]="this" [mode]="this.mode"> </ng-container>
|
229
|
+
}
|
230
|
+
<div
|
231
|
+
class="ax-absolute ax-top-0 ax-bottom-0 ax-left-0 ax-right-0 ax-bg-blue-400 ax-opacity-30 ax-flex ax-justify-center ax-items-center ax-z-[400]"
|
232
|
+
>
|
233
|
+
<span class="ax-capitalize ax-font-semibold ax-text-primary-700"> {{ title() }}</span>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
} @else {
|
237
|
+
<axp-designer-add-widget-mini-button
|
238
|
+
class="ax-flex-1 ax-self-center ax-place-self-end"
|
239
|
+
(onClick)="handleChooseWidget()"
|
240
|
+
>
|
241
|
+
</axp-designer-add-widget-mini-button>
|
242
|
+
}
|
243
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "directive", type: AXPWidgetDesignerRendererDirective, selector: "[axp-widget-designer-renderer]", inputs: ["parentNode", "index", "locked", "mode", "node"] }, { kind: "component", type: AXPDesignerAddWidgetMiniButtonComponent, selector: "axp-designer-add-widget-mini-button", outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
244
|
+
}
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetDesignerComponent, decorators: [{
|
246
|
+
type: Component,
|
247
|
+
args: [{
|
248
|
+
selector: 'axp-template-widget-designer',
|
249
|
+
template: `
|
250
|
+
@if(nodes().length) {
|
251
|
+
<div class="ax-relative ax-block ax-w-full ax-pointer-events-none">
|
252
|
+
@for (node of nodes(); track $index) {
|
253
|
+
<ng-container axp-widget-designer-renderer [locked]="true" [node]="node" [parentNode]="this" [mode]="this.mode"> </ng-container>
|
254
|
+
}
|
255
|
+
<div
|
256
|
+
class="ax-absolute ax-top-0 ax-bottom-0 ax-left-0 ax-right-0 ax-bg-blue-400 ax-opacity-30 ax-flex ax-justify-center ax-items-center ax-z-[400]"
|
257
|
+
>
|
258
|
+
<span class="ax-capitalize ax-font-semibold ax-text-primary-700"> {{ title() }}</span>
|
259
|
+
</div>
|
260
|
+
</div>
|
261
|
+
} @else {
|
262
|
+
<axp-designer-add-widget-mini-button
|
263
|
+
class="ax-flex-1 ax-self-center ax-place-self-end"
|
264
|
+
(onClick)="handleChooseWidget()"
|
265
|
+
>
|
266
|
+
</axp-designer-add-widget-mini-button>
|
267
|
+
}
|
268
|
+
`,
|
269
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
270
|
+
imports: [
|
271
|
+
CommonModule,
|
272
|
+
AXPLayoutBuilderModule,
|
273
|
+
AXPWidgetDesignerRendererDirective,
|
274
|
+
AXPDesignerAddWidgetMiniButtonComponent,
|
275
|
+
],
|
276
|
+
providers: [
|
277
|
+
{
|
278
|
+
provide: AXPTemplateWidgetDesignerComponent,
|
279
|
+
useExisting: AXPWidgetComponent,
|
280
|
+
},
|
281
|
+
]
|
282
|
+
}]
|
283
|
+
}], ctorParameters: () => [], propDecorators: { __class: [{
|
284
|
+
type: HostBinding,
|
285
|
+
args: ['class']
|
286
|
+
}] } });
|
287
|
+
|
288
|
+
var templateWidgetDesigner_component = /*#__PURE__*/Object.freeze({
|
289
|
+
__proto__: null,
|
290
|
+
AXPTemplateWidgetDesignerComponent: AXPTemplateWidgetDesignerComponent,
|
291
|
+
AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU: AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU
|
292
|
+
});
|
293
|
+
|
294
|
+
const AXPTemplateWidget = {
|
295
|
+
name: 'template',
|
296
|
+
title: 'Template',
|
297
|
+
type: 'container',
|
298
|
+
icon: 'fa-solid fa-file-invoice',
|
299
|
+
group: AXP_WIDGETS_ADVANCE_GROUP,
|
300
|
+
visible: true,
|
301
|
+
options: {
|
302
|
+
canInsert: false,
|
303
|
+
},
|
304
|
+
properties: [
|
305
|
+
AXP_NAME_PROPERTY,
|
306
|
+
AXP_DATA_PATH_PROPERTY,
|
307
|
+
createStringProperty({
|
308
|
+
name: 'options.templateId',
|
309
|
+
title: 'Template',
|
310
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
311
|
+
visible: false,
|
312
|
+
}),
|
313
|
+
],
|
314
|
+
components: {
|
315
|
+
view: {
|
316
|
+
component: () => Promise.resolve().then(function () { return templateWidgetView_component; }).then((c) => c.AXPTemplateWidgetViewComponent),
|
317
|
+
},
|
318
|
+
edit: {
|
319
|
+
component: () => import('./acorex-modules-form-template-management-template-widget-edit.component-CVyFN7D9.mjs').then((c) => c.AXPTemplateWidgetEditComponent),
|
320
|
+
},
|
321
|
+
print: {
|
322
|
+
component: () => Promise.resolve().then(function () { return templateWidgetView_component; }).then((c) => c.AXPTemplateWidgetViewComponent),
|
323
|
+
},
|
324
|
+
designer: {
|
325
|
+
component: () => Promise.resolve().then(function () { return templateWidgetDesigner_component; }).then((c) => c.AXPTemplateWidgetDesignerComponent),
|
326
|
+
},
|
327
|
+
},
|
328
|
+
};
|
329
|
+
|
330
|
+
class AXPTemplateDesignerWidgetViewComponent extends AXPWidgetComponent {
|
331
|
+
constructor() {
|
332
|
+
super(...arguments);
|
333
|
+
this.workflow = inject(AXPWorkflowService);
|
334
|
+
}
|
335
|
+
async handleClick() {
|
336
|
+
await this.workflow.execute('design-form-template', { data: { id: this.extractValue('id') } });
|
337
|
+
}
|
338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateDesignerWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
339
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPTemplateDesignerWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
340
|
+
<span
|
341
|
+
class="ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer"
|
342
|
+
(click)="handleClick()"
|
343
|
+
>
|
344
|
+
{{ 't("edit-template",{ scope:"form-template-management" })' | translate | async }}
|
345
|
+
</span>
|
346
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
347
|
+
}
|
348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateDesignerWidgetViewComponent, decorators: [{
|
349
|
+
type: Component,
|
350
|
+
args: [{
|
351
|
+
template: `
|
352
|
+
<span
|
353
|
+
class="ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer"
|
354
|
+
(click)="handleClick()"
|
355
|
+
>
|
356
|
+
{{ 't("edit-template",{ scope:"form-template-management" })' | translate | async }}
|
187
357
|
</span>
|
188
358
|
`,
|
189
359
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
@@ -217,44 +387,184 @@ const AXPTemplateDesignerWidget = {
|
|
217
387
|
}
|
218
388
|
};
|
219
389
|
|
220
|
-
const
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
390
|
+
const AXMFormTemplateManagementModuleConst = {
|
391
|
+
moduleName: 'FormTemplateManagement',
|
392
|
+
moduleRoute: 'form-template-management',
|
393
|
+
i18n: 'form-template-management',
|
394
|
+
categoryEntity: 'Category',
|
395
|
+
templateEntity: 'Template',
|
396
|
+
};
|
397
|
+
|
398
|
+
class AXMFormTemplateManagementCategoryEntityService extends AXMEntityCrudServiceImpl {
|
399
|
+
}
|
400
|
+
class AXMFormTemplateManagementCategoryEntityServiceImpl extends AXMFormTemplateManagementCategoryEntityService {
|
401
|
+
constructor() {
|
402
|
+
super(`${AXMFormTemplateManagementModuleConst.moduleName}.${AXMFormTemplateManagementModuleConst.categoryEntity}`);
|
403
|
+
}
|
404
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
405
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityServiceImpl }); }
|
406
|
+
}
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityServiceImpl, decorators: [{
|
408
|
+
type: Injectable
|
409
|
+
}], ctorParameters: () => [] });
|
410
|
+
|
411
|
+
class AXMFormTemplateManagementCategoryEntityModule {
|
412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
413
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule }); }
|
414
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule, providers: [
|
415
|
+
{
|
416
|
+
provide: AXMFormTemplateManagementCategoryEntityService,
|
417
|
+
useClass: AXMFormTemplateManagementCategoryEntityServiceImpl,
|
231
418
|
},
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
419
|
+
] }); }
|
420
|
+
}
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementCategoryEntityModule, decorators: [{
|
422
|
+
type: NgModule,
|
423
|
+
args: [{
|
424
|
+
imports: [],
|
425
|
+
exports: [],
|
426
|
+
declarations: [],
|
427
|
+
providers: [
|
428
|
+
{
|
429
|
+
provide: AXMFormTemplateManagementCategoryEntityService,
|
430
|
+
useClass: AXMFormTemplateManagementCategoryEntityServiceImpl,
|
431
|
+
},
|
432
|
+
],
|
433
|
+
}]
|
434
|
+
}] });
|
435
|
+
|
436
|
+
class AXMFormTemplateManagementTemplateEntityService extends AXMEntityCrudServiceImpl {
|
437
|
+
}
|
438
|
+
class AXMFormTemplateManagementTemplateEntityServiceImpl extends AXMFormTemplateManagementTemplateEntityService {
|
439
|
+
constructor() {
|
440
|
+
super(`${AXMFormTemplateManagementModuleConst.moduleName}.${AXMFormTemplateManagementModuleConst.templateEntity}`);
|
441
|
+
}
|
442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
443
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityServiceImpl }); }
|
444
|
+
}
|
445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityServiceImpl, decorators: [{
|
446
|
+
type: Injectable
|
447
|
+
}], ctorParameters: () => [] });
|
448
|
+
|
449
|
+
class AXMFormTemplateManagementTemplateEntityModule {
|
450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
451
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityModule }); }
|
452
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityModule, providers: [
|
453
|
+
{
|
454
|
+
provide: AXMFormTemplateManagementTemplateEntityService,
|
455
|
+
useClass: AXMFormTemplateManagementTemplateEntityServiceImpl,
|
456
|
+
},
|
457
|
+
] }); }
|
458
|
+
}
|
459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementTemplateEntityModule, decorators: [{
|
460
|
+
type: NgModule,
|
461
|
+
args: [{
|
462
|
+
imports: [],
|
463
|
+
exports: [],
|
464
|
+
declarations: [],
|
465
|
+
providers: [
|
466
|
+
{
|
467
|
+
provide: AXMFormTemplateManagementTemplateEntityService,
|
468
|
+
useClass: AXMFormTemplateManagementTemplateEntityServiceImpl,
|
469
|
+
},
|
470
|
+
],
|
471
|
+
}]
|
472
|
+
}] });
|
473
|
+
|
474
|
+
const AXMFormTemplateTypes = {
|
475
|
+
Form: { id: 10, title: 'Form Template' },
|
476
|
+
Widget: { id: 20, title: 'Widget Template' },
|
477
|
+
};
|
478
|
+
|
479
|
+
class AXMFormTemplateManagementModuleEntityProvider {
|
480
|
+
constructor() {
|
481
|
+
this.injector = inject(Injector);
|
482
|
+
}
|
483
|
+
preload() {
|
484
|
+
const { categoryEntity, templateEntity } = AXMFormTemplateManagementModuleConst;
|
485
|
+
const module = AXMFormTemplateManagementModuleConst.moduleName;
|
486
|
+
return [categoryEntity, templateEntity].map((entity) => ({ module, entity }));
|
487
|
+
}
|
488
|
+
async get(moduleName, entityName) {
|
489
|
+
if (moduleName == AXMFormTemplateManagementModuleConst.moduleName) {
|
490
|
+
switch (entityName) {
|
491
|
+
case AXMFormTemplateManagementModuleConst.categoryEntity:
|
492
|
+
return (await import('./acorex-modules-form-template-management-category.entity-Cqu3urCo.mjs')).factory(this.injector);
|
493
|
+
case AXMFormTemplateManagementModuleConst.templateEntity:
|
494
|
+
return (await import('./acorex-modules-form-template-management-template.entity-CrFYszl6.mjs')).factory(this.injector);
|
495
|
+
}
|
496
|
+
}
|
497
|
+
return null;
|
498
|
+
}
|
499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
500
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleEntityProvider }); }
|
501
|
+
}
|
502
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleEntityProvider, decorators: [{
|
503
|
+
type: Injectable
|
504
|
+
}] });
|
505
|
+
|
506
|
+
class AXMMenuProvider {
|
507
|
+
constructor() {
|
508
|
+
this.entityService = inject(AXPEntityService);
|
509
|
+
}
|
510
|
+
async provide(context) {
|
511
|
+
const scope = AXMFormTemplateManagementModuleConst.i18n;
|
512
|
+
const moduleName = AXMFormTemplateManagementModuleConst.moduleName;
|
513
|
+
context.addItems([
|
514
|
+
{
|
515
|
+
priority: 9001,
|
516
|
+
text: `t('module-name', {scope:"${scope}"})`,
|
517
|
+
icon: 'fa-solid fa-file-invoice',
|
518
|
+
children: [
|
519
|
+
{
|
520
|
+
text: `t("categories", { scope: "common" })`,
|
521
|
+
path: this.entityService.createPath(moduleName, AXMFormTemplateManagementModuleConst.categoryEntity),
|
522
|
+
priority: 1,
|
523
|
+
},
|
524
|
+
{
|
525
|
+
text: `t('templates', {scope:"${scope}"})`,
|
526
|
+
path: this.entityService.createPath(moduleName, AXMFormTemplateManagementModuleConst.templateEntity),
|
527
|
+
priority: 2,
|
528
|
+
},
|
529
|
+
],
|
530
|
+
},
|
531
|
+
]);
|
532
|
+
}
|
533
|
+
}
|
534
|
+
|
535
|
+
class AXMFormTemplateManagementSearchProvider extends AXPCommandSearchProvider {
|
536
|
+
constructor() {
|
537
|
+
super(...arguments);
|
538
|
+
this.commands = [
|
539
|
+
{
|
540
|
+
name: 'command',
|
541
|
+
title: 'Create New Form Template',
|
542
|
+
icon: 'fa-solid fa-plus',
|
543
|
+
data: {
|
544
|
+
command: {
|
545
|
+
name: 'create-entity',
|
546
|
+
options: {
|
547
|
+
entity: `${AXMFormTemplateManagementModuleConst.moduleName}.${AXMFormTemplateManagementModuleConst.templateEntity}`,
|
548
|
+
},
|
549
|
+
},
|
236
550
|
},
|
237
|
-
],
|
238
|
-
},
|
239
|
-
"get-template-confirmaton": {
|
240
|
-
action: 'show-prompt-dialog',
|
241
|
-
input: {
|
242
|
-
title: 'Confirm Action',
|
243
|
-
message: `Would you like to proceed with starting template design?`,
|
244
|
-
type: 'primary',
|
245
551
|
},
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
552
|
+
{
|
553
|
+
name: 'command',
|
554
|
+
title: 'Create form template category',
|
555
|
+
icon: 'fa-solid fa-plus',
|
556
|
+
data: {
|
557
|
+
command: {
|
558
|
+
name: 'create-entity',
|
559
|
+
options: {
|
560
|
+
entity: `${AXMFormTemplateManagementModuleConst.moduleName}.${AXMFormTemplateManagementModuleConst.categoryEntity}`,
|
561
|
+
},
|
562
|
+
},
|
250
563
|
},
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
},
|
256
|
-
},
|
257
|
-
};
|
564
|
+
},
|
565
|
+
];
|
566
|
+
}
|
567
|
+
}
|
258
568
|
|
259
569
|
class AXPDesignerConnectorImpl extends AXPDesignerConnector {
|
260
570
|
constructor() {
|
@@ -284,397 +594,59 @@ class AXPDesignerConnectorImpl extends AXPDesignerConnector {
|
|
284
594
|
type: AXMFormTemplateTypes.Widget,
|
285
595
|
template: content.json,
|
286
596
|
categoryId: (await this.categoryEntityService.query()).items[0]?.id
|
287
|
-
}
|
288
|
-
});
|
289
|
-
return result.getOutput('result');
|
290
|
-
}
|
291
|
-
async load(id) {
|
292
|
-
const item = await this.templateEntityService.getOne(id);
|
293
|
-
if (item) {
|
294
|
-
return item.template;
|
295
|
-
}
|
296
|
-
else {
|
297
|
-
throw Error("Invalid Id");
|
298
|
-
}
|
299
|
-
}
|
300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerConnectorImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
301
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerConnectorImpl }); }
|
302
|
-
}
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerConnectorImpl, decorators: [{
|
304
|
-
type: Injectable
|
305
|
-
}] });
|
306
|
-
|
307
|
-
class AXMOpenFormTemplateDesignerAction extends AXPWorkflowAction {
|
308
|
-
constructor() {
|
309
|
-
super(...arguments);
|
310
|
-
this.navigation = inject(AXPWorkflowNavigateAction);
|
311
|
-
}
|
312
|
-
async execute(context) {
|
313
|
-
const { id } = context.getVariable('data');
|
314
|
-
context.setVariable('payload', {
|
315
|
-
commands: `forms/designer?id=${id}`,
|
316
|
-
target: 'blank'
|
317
|
-
});
|
318
|
-
await this.navigation.execute(context);
|
319
|
-
}
|
320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOpenFormTemplateDesignerAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
321
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOpenFormTemplateDesignerAction }); }
|
322
|
-
}
|
323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOpenFormTemplateDesignerAction, decorators: [{
|
324
|
-
type: Injectable
|
325
|
-
}] });
|
326
|
-
const AXMDesignFormTemplateWorkflow = {
|
327
|
-
startStepId: 'open-design-designer',
|
328
|
-
steps: {
|
329
|
-
"open-design-designer": {
|
330
|
-
action: 'open-form-template-designer',
|
331
|
-
},
|
332
|
-
},
|
333
|
-
};
|
334
|
-
|
335
|
-
class AXPTemplateWidgetProviderImpl {
|
336
|
-
constructor() {
|
337
|
-
this.service = inject(AXMFormTemplateManagementTemplateEntityService);
|
338
|
-
}
|
339
|
-
async items(query) {
|
340
|
-
const result = ((await this.service.query(query)).items).map(c => ({
|
341
|
-
id: c.id,
|
342
|
-
title: c.title,
|
343
|
-
group: {
|
344
|
-
name: c.categoryId,
|
345
|
-
order: 2,
|
346
|
-
title: get(c, 'category.title') ?? 'Custom'
|
347
|
-
},
|
348
|
-
description: c.description
|
349
|
-
}));
|
350
|
-
return result;
|
351
|
-
}
|
352
|
-
async get(id) {
|
353
|
-
const item = await this.service.getOne(id);
|
354
|
-
if (item) {
|
355
|
-
const document = JSON.parse(item.template);
|
356
|
-
const page = document?.children?.[0];
|
357
|
-
return {
|
358
|
-
id: item.id,
|
359
|
-
nodes: page?.children ?? [],
|
360
|
-
title: item.title,
|
361
|
-
};
|
362
|
-
}
|
363
|
-
else {
|
364
|
-
throw Error("Invalid Id");
|
365
|
-
}
|
366
|
-
}
|
367
|
-
}
|
368
|
-
|
369
|
-
const AXP_TEMPLATE_WIDGET_PROVIDER = new InjectionToken('AXP_TEMPLATE_WIDGET_PROVIDER');
|
370
|
-
class AXPTemplateWidgetProviderService {
|
371
|
-
constructor() {
|
372
|
-
this.popupService = inject(AXPopupService);
|
373
|
-
this.providers = inject(AXP_TEMPLATE_WIDGET_PROVIDER, { optional: true });
|
374
|
-
}
|
375
|
-
async items(query) {
|
376
|
-
if (Array.isArray(this.providers)) {
|
377
|
-
const result = [];
|
378
|
-
for (const provider of this.providers) {
|
379
|
-
const items = await provider.items(query);
|
380
|
-
if (items) {
|
381
|
-
result.push(...items);
|
382
|
-
}
|
383
|
-
}
|
384
|
-
return result;
|
385
|
-
}
|
386
|
-
else {
|
387
|
-
return [];
|
388
|
-
}
|
389
|
-
}
|
390
|
-
async get(id) {
|
391
|
-
if (Array.isArray(this.providers)) {
|
392
|
-
for (const provider of this.providers) {
|
393
|
-
const node = await provider.get(id);
|
394
|
-
if (node) {
|
395
|
-
return node;
|
396
|
-
}
|
397
|
-
}
|
398
|
-
}
|
399
|
-
return null;
|
400
|
-
}
|
401
|
-
async chooseTemplate() {
|
402
|
-
const com = await import('./acorex-modules-form-template-management-template-picker.component-CsGnikzF.mjs').then((c) => c.AXPTemplateWidgetPickerComponent);
|
403
|
-
const widgets = await this.items({
|
404
|
-
skip: 0,
|
405
|
-
take: 100,
|
406
|
-
filter: {
|
407
|
-
field: 'type.id',
|
408
|
-
value: 20,
|
409
|
-
operator: {
|
410
|
-
type: 'equal',
|
411
|
-
}
|
412
|
-
}
|
413
|
-
});
|
414
|
-
const result = await this.popupService.open(com, {
|
415
|
-
title: 'Widget Template Gallery',
|
416
|
-
size: 'md',
|
417
|
-
closeButton: true,
|
418
|
-
data: {
|
419
|
-
widgets: sortBy(widgets, (c) => c.title),
|
420
|
-
},
|
421
|
-
});
|
422
|
-
if (result.data) {
|
423
|
-
const selected = result.data?.widgets;
|
424
|
-
return selected[0];
|
425
|
-
}
|
426
|
-
return null;
|
427
|
-
}
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
429
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetProviderService, providedIn: 'root' }); }
|
430
|
-
}
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetProviderService, decorators: [{
|
432
|
-
type: Injectable,
|
433
|
-
args: [{ providedIn: 'root' }]
|
434
|
-
}] });
|
435
|
-
|
436
|
-
class AXPTemplateWidgetViewComponent extends AXPWidgetComponent {
|
437
|
-
constructor() {
|
438
|
-
super();
|
439
|
-
this.metaKey = '__meta__';
|
440
|
-
this.templateProvider = inject(AXPTemplateWidgetProviderService);
|
441
|
-
this.templateId = computed(() => this.options()['templateId']);
|
442
|
-
this.nodes = signal([]);
|
443
|
-
//
|
444
|
-
effect(async () => {
|
445
|
-
this.nodes.set([]);
|
446
|
-
const value = this.getValue();
|
447
|
-
const templateId = get(value, `${this.metaKey}.templateId`) ?? this.templateId();
|
448
|
-
if (templateId) {
|
449
|
-
const item = await this.templateProvider.get(templateId);
|
450
|
-
if (item) {
|
451
|
-
this.nodes.set(item.nodes);
|
452
|
-
}
|
453
|
-
}
|
454
|
-
});
|
455
|
-
}
|
456
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
457
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetViewComponent, isStandalone: true, selector: "axp-template-widget-view", usesInheritance: true, ngImport: i0, template: `
|
458
|
-
@for (node of nodes(); track $index) {
|
459
|
-
<ng-container axp-widget-renderer
|
460
|
-
[node]="node"
|
461
|
-
[parentNode]="this"
|
462
|
-
[mode]="this.mode"
|
463
|
-
>
|
464
|
-
</ng-container>
|
465
|
-
}
|
466
|
-
@empty {
|
467
|
-
<span class="ax-underline ax-decoration-dotted ax-underline-offset-8 ax-text-gray-400">
|
468
|
-
{{ 'empty-template' | translate : { scope: 'form-template-management' } | async }}
|
469
|
-
</span>
|
470
|
-
}
|
471
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
472
|
-
}
|
473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetViewComponent, decorators: [{
|
474
|
-
type: Component,
|
475
|
-
args: [{
|
476
|
-
selector: 'axp-template-widget-view',
|
477
|
-
template: `
|
478
|
-
@for (node of nodes(); track $index) {
|
479
|
-
<ng-container axp-widget-renderer
|
480
|
-
[node]="node"
|
481
|
-
[parentNode]="this"
|
482
|
-
[mode]="this.mode"
|
483
|
-
>
|
484
|
-
</ng-container>
|
485
|
-
}
|
486
|
-
@empty {
|
487
|
-
<span class="ax-underline ax-decoration-dotted ax-underline-offset-8 ax-text-gray-400">
|
488
|
-
{{ 'empty-template' | translate : { scope: 'form-template-management' } | async }}
|
489
|
-
</span>
|
490
|
-
}
|
491
|
-
`,
|
492
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
493
|
-
imports: [CommonModule, AXPLayoutBuilderModule, AXTranslationModule]
|
494
|
-
}]
|
495
|
-
}], ctorParameters: () => [] });
|
496
|
-
|
497
|
-
var templateWidgetView_component = /*#__PURE__*/Object.freeze({
|
498
|
-
__proto__: null,
|
499
|
-
AXPTemplateWidgetViewComponent: AXPTemplateWidgetViewComponent
|
500
|
-
});
|
501
|
-
|
502
|
-
const AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU = {
|
503
|
-
text: 'Choose Template',
|
504
|
-
name: 'choose',
|
505
|
-
icon: 'fa-solid fa-folder-open',
|
506
|
-
};
|
507
|
-
class AXPTemplateWidgetDesignerComponent extends AXPWidgetComponent {
|
508
|
-
constructor() {
|
509
|
-
super();
|
510
|
-
this.templateProvider = inject(AXPTemplateWidgetProviderService);
|
511
|
-
this.designerService = inject(AXPDesignerService);
|
512
|
-
this.templateId = computed(() => this.options()['templateId']);
|
513
|
-
this.nodes = signal([]);
|
514
|
-
this.title = signal(null);
|
515
|
-
//
|
516
|
-
effect(async () => {
|
517
|
-
this.nodes.set([]);
|
518
|
-
if (this.templateId()) {
|
519
|
-
const item = await this.templateProvider.get(this.templateId());
|
520
|
-
if (item && item.nodes?.length > 0) {
|
521
|
-
this.title.set(item.title);
|
522
|
-
this.nodes.set(item.nodes);
|
523
|
-
}
|
524
|
-
}
|
525
|
-
});
|
526
|
-
}
|
527
|
-
// override async ngOnInit() {
|
528
|
-
// super.ngOnInit();
|
529
|
-
// if (!this.templateId()) {
|
530
|
-
// this.handleChooseWidget();
|
531
|
-
// }
|
532
|
-
// }
|
533
|
-
async handleChooseWidget() {
|
534
|
-
const result = await this.templateProvider.chooseTemplate();
|
535
|
-
if (result) {
|
536
|
-
this.designerService.update({
|
537
|
-
mode: 'update',
|
538
|
-
values: { options: { templateId: result.id } },
|
539
|
-
widget: this.node,
|
540
|
-
});
|
597
|
+
}
|
598
|
+
});
|
599
|
+
return result.getOutput('result');
|
600
|
+
}
|
601
|
+
async load(id) {
|
602
|
+
const item = await this.templateEntityService.getOne(id);
|
603
|
+
if (item) {
|
604
|
+
return item.template;
|
605
|
+
}
|
606
|
+
else {
|
607
|
+
throw Error("Invalid Id");
|
541
608
|
}
|
542
609
|
}
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
610
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerConnectorImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
611
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerConnectorImpl }); }
|
612
|
+
}
|
613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerConnectorImpl, decorators: [{
|
614
|
+
type: Injectable
|
615
|
+
}] });
|
616
|
+
|
617
|
+
class AXPTemplateWidgetProviderImpl {
|
618
|
+
constructor() {
|
619
|
+
this.service = inject(AXMFormTemplateManagementTemplateEntityService);
|
551
620
|
}
|
552
|
-
|
553
|
-
const
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
621
|
+
async items(query) {
|
622
|
+
const result = ((await this.service.query(query)).items).map(c => ({
|
623
|
+
id: c.id,
|
624
|
+
title: c.title,
|
625
|
+
group: {
|
626
|
+
name: c.categoryId,
|
627
|
+
order: 2,
|
628
|
+
title: get(c, 'category.title') ?? 'Custom'
|
629
|
+
},
|
630
|
+
description: c.description
|
631
|
+
}));
|
632
|
+
return result;
|
558
633
|
}
|
559
|
-
async
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
634
|
+
async get(id) {
|
635
|
+
const item = await this.service.getOne(id);
|
636
|
+
if (item) {
|
637
|
+
const document = JSON.parse(item.template);
|
638
|
+
const page = document?.children?.[0];
|
639
|
+
return {
|
640
|
+
id: item.id,
|
641
|
+
nodes: page?.children ?? [],
|
642
|
+
title: item.title,
|
643
|
+
};
|
644
|
+
}
|
645
|
+
else {
|
646
|
+
throw Error("Invalid Id");
|
564
647
|
}
|
565
|
-
return Promise.resolve();
|
566
|
-
}
|
567
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
568
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetDesignerComponent, isStandalone: true, selector: "axp-template-widget-designer", host: { properties: { "class": "this.__class" } }, providers: [
|
569
|
-
{
|
570
|
-
provide: AXPTemplateWidgetDesignerComponent,
|
571
|
-
useExisting: AXPWidgetComponent,
|
572
|
-
},
|
573
|
-
], usesInheritance: true, ngImport: i0, template: `
|
574
|
-
@if(nodes().length) {
|
575
|
-
<div class="ax-relative ax-block ax-w-full ax-pointer-events-none">
|
576
|
-
@for (node of nodes(); track $index) {
|
577
|
-
<ng-container axp-widget-designer-renderer [locked]="true" [node]="node" [parentNode]="this" [mode]="this.mode"> </ng-container>
|
578
|
-
}
|
579
|
-
<div
|
580
|
-
class="ax-absolute ax-top-0 ax-bottom-0 ax-left-0 ax-right-0 ax-bg-blue-400 ax-opacity-30 ax-flex ax-justify-center ax-items-center ax-z-[400]"
|
581
|
-
>
|
582
|
-
<span class="ax-capitalize ax-font-semibold ax-text-primary-700"> {{ title() }}</span>
|
583
|
-
</div>
|
584
|
-
</div>
|
585
|
-
} @else {
|
586
|
-
<axp-designer-add-widget-mini-button
|
587
|
-
class="ax-flex-1 ax-self-center ax-place-self-end"
|
588
|
-
(onClick)="handleChooseWidget()"
|
589
|
-
>
|
590
|
-
</axp-designer-add-widget-mini-button>
|
591
648
|
}
|
592
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "directive", type: AXPWidgetDesignerRendererDirective, selector: "[axp-widget-designer-renderer]", inputs: ["parentNode", "index", "locked", "mode", "node"] }, { kind: "component", type: AXPDesignerAddWidgetMiniButtonComponent, selector: "axp-designer-add-widget-mini-button", outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
593
649
|
}
|
594
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetDesignerComponent, decorators: [{
|
595
|
-
type: Component,
|
596
|
-
args: [{
|
597
|
-
selector: 'axp-template-widget-designer',
|
598
|
-
template: `
|
599
|
-
@if(nodes().length) {
|
600
|
-
<div class="ax-relative ax-block ax-w-full ax-pointer-events-none">
|
601
|
-
@for (node of nodes(); track $index) {
|
602
|
-
<ng-container axp-widget-designer-renderer [locked]="true" [node]="node" [parentNode]="this" [mode]="this.mode"> </ng-container>
|
603
|
-
}
|
604
|
-
<div
|
605
|
-
class="ax-absolute ax-top-0 ax-bottom-0 ax-left-0 ax-right-0 ax-bg-blue-400 ax-opacity-30 ax-flex ax-justify-center ax-items-center ax-z-[400]"
|
606
|
-
>
|
607
|
-
<span class="ax-capitalize ax-font-semibold ax-text-primary-700"> {{ title() }}</span>
|
608
|
-
</div>
|
609
|
-
</div>
|
610
|
-
} @else {
|
611
|
-
<axp-designer-add-widget-mini-button
|
612
|
-
class="ax-flex-1 ax-self-center ax-place-self-end"
|
613
|
-
(onClick)="handleChooseWidget()"
|
614
|
-
>
|
615
|
-
</axp-designer-add-widget-mini-button>
|
616
|
-
}
|
617
|
-
`,
|
618
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
619
|
-
imports: [
|
620
|
-
CommonModule,
|
621
|
-
AXPLayoutBuilderModule,
|
622
|
-
AXPWidgetDesignerRendererDirective,
|
623
|
-
AXPDesignerAddWidgetMiniButtonComponent,
|
624
|
-
],
|
625
|
-
providers: [
|
626
|
-
{
|
627
|
-
provide: AXPTemplateWidgetDesignerComponent,
|
628
|
-
useExisting: AXPWidgetComponent,
|
629
|
-
},
|
630
|
-
]
|
631
|
-
}]
|
632
|
-
}], ctorParameters: () => [], propDecorators: { __class: [{
|
633
|
-
type: HostBinding,
|
634
|
-
args: ['class']
|
635
|
-
}] } });
|
636
|
-
|
637
|
-
var templateWidgetDesigner_component = /*#__PURE__*/Object.freeze({
|
638
|
-
__proto__: null,
|
639
|
-
AXPTemplateWidgetDesignerComponent: AXPTemplateWidgetDesignerComponent,
|
640
|
-
AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU: AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU
|
641
|
-
});
|
642
|
-
|
643
|
-
const AXPTemplateWidget = {
|
644
|
-
name: 'template',
|
645
|
-
title: 'Template',
|
646
|
-
type: 'container',
|
647
|
-
icon: 'fa-solid fa-file-invoice',
|
648
|
-
group: AXP_WIDGETS_ADVANCE_GROUP,
|
649
|
-
visible: true,
|
650
|
-
options: {
|
651
|
-
canInsert: false,
|
652
|
-
},
|
653
|
-
properties: [
|
654
|
-
AXP_NAME_PROPERTY,
|
655
|
-
AXP_DATA_PATH_PROPERTY,
|
656
|
-
createStringProperty({
|
657
|
-
name: 'options.templateId',
|
658
|
-
title: 'Template',
|
659
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
660
|
-
visible: false,
|
661
|
-
}),
|
662
|
-
],
|
663
|
-
components: {
|
664
|
-
view: {
|
665
|
-
component: () => Promise.resolve().then(function () { return templateWidgetView_component; }).then((c) => c.AXPTemplateWidgetViewComponent),
|
666
|
-
},
|
667
|
-
edit: {
|
668
|
-
component: () => import('./acorex-modules-form-template-management-template-widget-edit.component-CVyFN7D9.mjs').then((c) => c.AXPTemplateWidgetEditComponent),
|
669
|
-
},
|
670
|
-
print: {
|
671
|
-
component: () => Promise.resolve().then(function () { return templateWidgetView_component; }).then((c) => c.AXPTemplateWidgetViewComponent),
|
672
|
-
},
|
673
|
-
designer: {
|
674
|
-
component: () => Promise.resolve().then(function () { return templateWidgetDesigner_component; }).then((c) => c.AXPTemplateWidgetDesignerComponent),
|
675
|
-
},
|
676
|
-
},
|
677
|
-
};
|
678
650
|
|
679
651
|
class AXMSettingProvider {
|
680
652
|
async provide(context) {
|
@@ -736,6 +708,73 @@ class AXMSettingProvider {
|
|
736
708
|
}
|
737
709
|
}
|
738
710
|
|
711
|
+
const AXMCreateFormTemplateWorkflow = {
|
712
|
+
startStepId: 'create-form-template',
|
713
|
+
steps: {
|
714
|
+
"create-form-template": {
|
715
|
+
action: 'start-workflow',
|
716
|
+
input: {
|
717
|
+
workflow: "create-entity",
|
718
|
+
context: {
|
719
|
+
redirect: true,
|
720
|
+
entity: `${AXMFormTemplateManagementModuleConst.moduleName}.${AXMFormTemplateManagementModuleConst.templateEntity}`,
|
721
|
+
}
|
722
|
+
},
|
723
|
+
nextSteps: [
|
724
|
+
{
|
725
|
+
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
|
726
|
+
nextStepId: 'get-template-confirmaton',
|
727
|
+
},
|
728
|
+
],
|
729
|
+
},
|
730
|
+
"get-template-confirmaton": {
|
731
|
+
action: 'show-prompt-dialog',
|
732
|
+
input: {
|
733
|
+
title: 'Confirm Action',
|
734
|
+
message: `Would you like to proceed with starting template design?`,
|
735
|
+
type: 'primary',
|
736
|
+
},
|
737
|
+
nextSteps: [
|
738
|
+
{
|
739
|
+
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
|
740
|
+
nextStepId: 'template-design',
|
741
|
+
},
|
742
|
+
],
|
743
|
+
},
|
744
|
+
"template-design": {
|
745
|
+
action: 'open-form-template-designer',
|
746
|
+
},
|
747
|
+
},
|
748
|
+
};
|
749
|
+
|
750
|
+
class AXMOpenFormTemplateDesignerAction extends AXPWorkflowAction {
|
751
|
+
constructor() {
|
752
|
+
super(...arguments);
|
753
|
+
this.navigation = inject(AXPWorkflowNavigateAction);
|
754
|
+
}
|
755
|
+
async execute(context) {
|
756
|
+
const { id } = context.getVariable('data');
|
757
|
+
context.setVariable('payload', {
|
758
|
+
commands: `forms/designer?id=${id}`,
|
759
|
+
target: 'blank'
|
760
|
+
});
|
761
|
+
await this.navigation.execute(context);
|
762
|
+
}
|
763
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOpenFormTemplateDesignerAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
764
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOpenFormTemplateDesignerAction }); }
|
765
|
+
}
|
766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOpenFormTemplateDesignerAction, decorators: [{
|
767
|
+
type: Injectable
|
768
|
+
}] });
|
769
|
+
const AXMDesignFormTemplateWorkflow = {
|
770
|
+
startStepId: 'open-design-designer',
|
771
|
+
steps: {
|
772
|
+
"open-design-designer": {
|
773
|
+
action: 'open-form-template-designer',
|
774
|
+
},
|
775
|
+
},
|
776
|
+
};
|
777
|
+
|
739
778
|
function routesFacory() {
|
740
779
|
const routes = [
|
741
780
|
{
|
@@ -781,7 +820,7 @@ class AXMFormTemplateManagementModule {
|
|
781
820
|
},
|
782
821
|
{
|
783
822
|
provide: AXPDesignerConnector,
|
784
|
-
useClass: AXPDesignerConnectorImpl
|
823
|
+
useClass: AXPDesignerConnectorImpl,
|
785
824
|
},
|
786
825
|
{
|
787
826
|
provide: AXP_TEMPLATE_WIDGET_PROVIDER,
|
@@ -792,24 +831,31 @@ class AXMFormTemplateManagementModule {
|
|
792
831
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
793
832
|
useClass: AXMSettingProvider,
|
794
833
|
multi: true,
|
795
|
-
}
|
834
|
+
},
|
835
|
+
{
|
836
|
+
provide: AXP_SEARCH_PROVIDER,
|
837
|
+
useClass: AXMFormTemplateManagementSearchProvider,
|
838
|
+
multi: true,
|
839
|
+
},
|
840
|
+
// {
|
841
|
+
// provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
842
|
+
// useClass: AXMFormTemplateManagementModuleSearchProvider,
|
843
|
+
// multi: true,
|
844
|
+
// },
|
796
845
|
], imports: [AXPWidgetsModule,
|
797
846
|
AXMFormTemplateManagementCategoryEntityModule,
|
798
847
|
AXMFormTemplateManagementTemplateEntityModule,
|
799
848
|
AXPLayoutBuilderModule.forChild({
|
800
|
-
widgets: [
|
801
|
-
AXPTemplateDesignerWidget,
|
802
|
-
AXPTemplateWidget
|
803
|
-
]
|
849
|
+
widgets: [AXPTemplateDesignerWidget, AXPTemplateWidget],
|
804
850
|
}),
|
805
851
|
AXPWorkflowModule.forChild({
|
806
852
|
actions: {
|
807
|
-
'open-form-template-designer': AXMOpenFormTemplateDesignerAction
|
853
|
+
'open-form-template-designer': AXMOpenFormTemplateDesignerAction,
|
808
854
|
},
|
809
855
|
workflows: {
|
810
856
|
'create-form-template': AXMCreateFormTemplateWorkflow,
|
811
|
-
'design-form-template': AXMDesignFormTemplateWorkflow
|
812
|
-
}
|
857
|
+
'design-form-template': AXMDesignFormTemplateWorkflow,
|
858
|
+
},
|
813
859
|
})] }); }
|
814
860
|
}
|
815
861
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModule, decorators: [{
|
@@ -820,20 +866,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
820
866
|
AXMFormTemplateManagementCategoryEntityModule,
|
821
867
|
AXMFormTemplateManagementTemplateEntityModule,
|
822
868
|
AXPLayoutBuilderModule.forChild({
|
823
|
-
widgets: [
|
824
|
-
AXPTemplateDesignerWidget,
|
825
|
-
AXPTemplateWidget
|
826
|
-
]
|
869
|
+
widgets: [AXPTemplateDesignerWidget, AXPTemplateWidget],
|
827
870
|
}),
|
828
871
|
AXPWorkflowModule.forChild({
|
829
872
|
actions: {
|
830
|
-
'open-form-template-designer': AXMOpenFormTemplateDesignerAction
|
873
|
+
'open-form-template-designer': AXMOpenFormTemplateDesignerAction,
|
831
874
|
},
|
832
875
|
workflows: {
|
833
876
|
'create-form-template': AXMCreateFormTemplateWorkflow,
|
834
|
-
'design-form-template': AXMDesignFormTemplateWorkflow
|
835
|
-
}
|
836
|
-
})
|
877
|
+
'design-form-template': AXMDesignFormTemplateWorkflow,
|
878
|
+
},
|
879
|
+
}),
|
837
880
|
],
|
838
881
|
exports: [],
|
839
882
|
declarations: [],
|
@@ -855,7 +898,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
855
898
|
},
|
856
899
|
{
|
857
900
|
provide: AXPDesignerConnector,
|
858
|
-
useClass: AXPDesignerConnectorImpl
|
901
|
+
useClass: AXPDesignerConnectorImpl,
|
859
902
|
},
|
860
903
|
{
|
861
904
|
provide: AXP_TEMPLATE_WIDGET_PROVIDER,
|
@@ -866,7 +909,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
866
909
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
867
910
|
useClass: AXMSettingProvider,
|
868
911
|
multi: true,
|
869
|
-
}
|
912
|
+
},
|
913
|
+
{
|
914
|
+
provide: AXP_SEARCH_PROVIDER,
|
915
|
+
useClass: AXMFormTemplateManagementSearchProvider,
|
916
|
+
multi: true,
|
917
|
+
},
|
918
|
+
// {
|
919
|
+
// provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
920
|
+
// useClass: AXMFormTemplateManagementModuleSearchProvider,
|
921
|
+
// multi: true,
|
922
|
+
// },
|
870
923
|
],
|
871
924
|
}]
|
872
925
|
}] });
|