@acorex/modules 20.6.0 → 20.6.2
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-document-management-acorex-modules-document-management-CVTT8ctu.mjs → acorex-modules-document-management-acorex-modules-document-management-Cd7_tQ9I.mjs} +33 -20
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-CVTT8ctu.mjs.map → acorex-modules-document-management-acorex-modules-document-management-Cd7_tQ9I.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-hRx5kgIG.mjs → acorex-modules-document-management-attachment-widget.component-OOvQKX6g.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-hRx5kgIG.mjs.map → acorex-modules-document-management-attachment-widget.component-OOvQKX6g.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-details-view.component-B0d8igsi.mjs → acorex-modules-document-management-details-view.component-BhqjkUbV.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-details-view.component-B0d8igsi.mjs.map → acorex-modules-document-management-details-view.component-BhqjkUbV.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-D9-55hkH.mjs → acorex-modules-document-management-document-signature-popup.component-DGWY6fSe.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-D9-55hkH.mjs.map → acorex-modules-document-management-document-signature-popup.component-DGWY6fSe.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-qwmn-Nan.mjs → acorex-modules-document-management-drive-choose.component-WxmS0fOY.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-qwmn-Nan.mjs.map → acorex-modules-document-management-drive-choose.component-WxmS0fOY.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive.component-00fK0Exr.mjs → acorex-modules-document-management-drive.component-D8VzFK-5.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-drive.component-00fK0Exr.mjs.map → acorex-modules-document-management-drive.component-D8VzFK-5.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BKhBKRMc.mjs → acorex-modules-document-management-large-icons-view.component-cYzLaOAQ.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BKhBKRMc.mjs.map → acorex-modules-document-management-large-icons-view.component-cYzLaOAQ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-CYwO8gZY.mjs → acorex-modules-document-management-large-tiles-view.component-BkcKvoe6.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-CYwO8gZY.mjs.map → acorex-modules-document-management-large-tiles-view.component-BkcKvoe6.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-list-view.component-BpkDnz7i.mjs → acorex-modules-document-management-list-view.component-CvPkInJy.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-list-view.component-BpkDnz7i.mjs.map → acorex-modules-document-management-list-view.component-CvPkInJy.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-TJIPH8xE.mjs → acorex-modules-document-management-permission-definition.provider-CODjZ6lP.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-TJIPH8xE.mjs.map → acorex-modules-document-management-permission-definition.provider-CODjZ6lP.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BiSKothg.mjs → acorex-modules-document-management-small-icons-view.component-C30ghzKp.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BiSKothg.mjs.map → acorex-modules-document-management-small-icons-view.component-C30ghzKp.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BMdnlNuG.mjs → acorex-modules-document-management-small-tiles-view.component-DyLRmcJH.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BMdnlNuG.mjs.map → acorex-modules-document-management-small-tiles-view.component-DyLRmcJH.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +325 -260
- package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management.mjs +1 -37
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/form-template-management/index.d.ts +2 -138
- package/package.json +2 -2
|
@@ -6,8 +6,7 @@ import { AXPDesignerConnector, AXPDesignerService, AXPWidgetDesignerRendererDire
|
|
|
6
6
|
import { AXMEntityCrudServiceImpl, AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
7
7
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXPWidgetsModule } from '@acorex/platform/layout/widgets';
|
|
8
8
|
import * as i2$1 from '@acorex/platform/workflow';
|
|
9
|
-
import { AXPWorkflowService,
|
|
10
|
-
import { provideCommandSetups } from '@acorex/platform/runtime';
|
|
9
|
+
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
11
10
|
import * as i0 from '@angular/core';
|
|
12
11
|
import { Injectable, NgModule, inject, Injector, runInInjectionContext, InjectionToken, computed, signal, effect, ChangeDetectionStrategy, Component, HostBinding } from '@angular/core';
|
|
13
12
|
import { ROUTES } from '@angular/router';
|
|
@@ -20,7 +19,6 @@ import * as i2 from '@angular/common';
|
|
|
20
19
|
import { CommonModule } from '@angular/common';
|
|
21
20
|
import { AXPopupService } from '@acorex/components/popup';
|
|
22
21
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
23
|
-
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
24
22
|
import { AXPTemplateViewerService } from '@acorex/platform/layout/components';
|
|
25
23
|
import { AXP_IDENTIFIER_RULES } from '@acorex/modules/identifier-management';
|
|
26
24
|
|
|
@@ -1128,250 +1126,317 @@ class AXMQuestionnaireDataSourceDefinition {
|
|
|
1128
1126
|
* }
|
|
1129
1127
|
* ```
|
|
1130
1128
|
*/
|
|
1131
|
-
class ShowForm
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
});
|
|
1129
|
+
// export class ShowForm implements AXPActivity<{
|
|
1130
|
+
// type: "workflow-activity:show-form";
|
|
1131
|
+
// /**
|
|
1132
|
+
// * Dialog title
|
|
1133
|
+
// */
|
|
1134
|
+
// title: string;
|
|
1135
|
+
// /**
|
|
1136
|
+
// * Form definition - can be:
|
|
1137
|
+
// * - JSON object with fields array
|
|
1138
|
+
// * - Widget node definition
|
|
1139
|
+
// */
|
|
1140
|
+
// formDefinition: any;
|
|
1141
|
+
// /**
|
|
1142
|
+
// * Initial form context/data
|
|
1143
|
+
// */
|
|
1144
|
+
// context?: Record<string, any>;
|
|
1145
|
+
// /**
|
|
1146
|
+
// * Dialog size
|
|
1147
|
+
// */
|
|
1148
|
+
// size?: AXPopupSizeType;
|
|
1149
|
+
// /**
|
|
1150
|
+
// * Show close button
|
|
1151
|
+
// */
|
|
1152
|
+
// closeButton?: boolean;
|
|
1153
|
+
// /**
|
|
1154
|
+
// * Actions to show (submit, cancel, or custom)
|
|
1155
|
+
// */
|
|
1156
|
+
// actions?: {
|
|
1157
|
+
// submit?: string; // Submit button text
|
|
1158
|
+
// cancel?: string; // Cancel button text
|
|
1159
|
+
// custom?: Array<{
|
|
1160
|
+
// title: string;
|
|
1161
|
+
// icon?: string;
|
|
1162
|
+
// color?: string;
|
|
1163
|
+
// command: string;
|
|
1164
|
+
// }>;
|
|
1165
|
+
// };
|
|
1166
|
+
// }, {
|
|
1167
|
+
// formData: Record<string, any>;
|
|
1168
|
+
// action: string;
|
|
1169
|
+
// cancelled: boolean;
|
|
1170
|
+
// }> {
|
|
1171
|
+
// private readonly layoutBuilderService = inject(AXPLayoutBuilderService);
|
|
1172
|
+
// constructor() {
|
|
1173
|
+
// super('workflow-activity:show-form', 'Show Form');
|
|
1174
|
+
// }
|
|
1175
|
+
// async execute(input: {
|
|
1176
|
+
// title: string;
|
|
1177
|
+
// formDefinition: any;
|
|
1178
|
+
// context?: Record<string, any>;
|
|
1179
|
+
// size?: AXPopupSizeType;
|
|
1180
|
+
// closeButton?: boolean;
|
|
1181
|
+
// actions?: {
|
|
1182
|
+
// submit?: string;
|
|
1183
|
+
// cancel?: string;
|
|
1184
|
+
// custom?: Array<{
|
|
1185
|
+
// title: string;
|
|
1186
|
+
// icon?: string;
|
|
1187
|
+
// color?: string;
|
|
1188
|
+
// command: string;
|
|
1189
|
+
// }>;
|
|
1190
|
+
// };
|
|
1191
|
+
// }) {
|
|
1192
|
+
// const {
|
|
1193
|
+
// title,
|
|
1194
|
+
// formDefinition,
|
|
1195
|
+
// context = {},
|
|
1196
|
+
// size = 'md',
|
|
1197
|
+
// closeButton = false,
|
|
1198
|
+
// actions = {
|
|
1199
|
+
// submit: '@general:actions.submit.title',
|
|
1200
|
+
// cancel: '@general:actions.cancel.title'
|
|
1201
|
+
// }
|
|
1202
|
+
// } = input;
|
|
1203
|
+
// try {
|
|
1204
|
+
// // Create dialog with form
|
|
1205
|
+
// const dialogRef = await this.layoutBuilderService
|
|
1206
|
+
// .create()
|
|
1207
|
+
// .dialog((dialog) => {
|
|
1208
|
+
// dialog
|
|
1209
|
+
// .setTitle(title)
|
|
1210
|
+
// .setSize(size)
|
|
1211
|
+
// .setCloseButton(closeButton)
|
|
1212
|
+
// .setContext(context)
|
|
1213
|
+
// .content((content) => {
|
|
1214
|
+
// // Build form fields from definition
|
|
1215
|
+
// this.buildFormFields(content, formDefinition);
|
|
1216
|
+
// })
|
|
1217
|
+
// .setActions((actionBuilder) => {
|
|
1218
|
+
// // Add cancel action
|
|
1219
|
+
// if (actions.cancel !== undefined && actions.cancel !== null) {
|
|
1220
|
+
// actionBuilder.cancel(actions.cancel);
|
|
1221
|
+
// }
|
|
1222
|
+
// // Add submit action
|
|
1223
|
+
// if (actions.submit !== undefined && actions.submit !== null) {
|
|
1224
|
+
// actionBuilder.submit(actions.submit);
|
|
1225
|
+
// }
|
|
1226
|
+
// // Add custom actions
|
|
1227
|
+
// if (actions.custom && Array.isArray(actions.custom)) {
|
|
1228
|
+
// for (const customAction of actions.custom) {
|
|
1229
|
+
// actionBuilder.custom({
|
|
1230
|
+
// title: customAction.title,
|
|
1231
|
+
// icon: customAction.icon || 'fa-circle',
|
|
1232
|
+
// color: customAction.color || 'primary',
|
|
1233
|
+
// command: { name: customAction.command }
|
|
1234
|
+
// });
|
|
1235
|
+
// }
|
|
1236
|
+
// }
|
|
1237
|
+
// });
|
|
1238
|
+
// })
|
|
1239
|
+
// .show();
|
|
1240
|
+
// // Wait for user interaction
|
|
1241
|
+
// const action = dialogRef.action() || 'cancel';
|
|
1242
|
+
// const formData = dialogRef.context() || {};
|
|
1243
|
+
// const cancelled = action === 'cancel';
|
|
1244
|
+
// // Map action to outcome
|
|
1245
|
+
// const outcome = cancelled ? 'Cancelled' : (action === 'submit' ? 'Submitted' : action);
|
|
1246
|
+
// return this.createResult(
|
|
1247
|
+
// {
|
|
1248
|
+
// formData,
|
|
1249
|
+
// action,
|
|
1250
|
+
// cancelled
|
|
1251
|
+
// },
|
|
1252
|
+
// outcome
|
|
1253
|
+
// );
|
|
1254
|
+
// } catch (error: any) {
|
|
1255
|
+
// console.error('[ShowForm] Error displaying form:', error);
|
|
1256
|
+
// return {
|
|
1257
|
+
// success: false,
|
|
1258
|
+
// error: {
|
|
1259
|
+
// message: error instanceof Error ? error.message : 'Failed to display form dialog',
|
|
1260
|
+
// },
|
|
1261
|
+
// result: {
|
|
1262
|
+
// output: {
|
|
1263
|
+
// formData: {},
|
|
1264
|
+
// action: 'error',
|
|
1265
|
+
// cancelled: true,
|
|
1266
|
+
// },
|
|
1267
|
+
// outcomes: {
|
|
1268
|
+
// Failed: true,
|
|
1269
|
+
// },
|
|
1270
|
+
// },
|
|
1271
|
+
// };
|
|
1272
|
+
// }
|
|
1273
|
+
// }
|
|
1274
|
+
// /**
|
|
1275
|
+
// * Build form fields from definition
|
|
1276
|
+
// */
|
|
1277
|
+
// private buildFormFields(contentBuilder: any, formDefinition: any): void {
|
|
1278
|
+
// // Check if formDefinition is a widget node (already built)
|
|
1279
|
+
// if (formDefinition?.type && formDefinition?.children) {
|
|
1280
|
+
// // Already a widget node - use it directly
|
|
1281
|
+
// const flexBuilder = this.layoutBuilderService.create().flex((flex) => {
|
|
1282
|
+
// // Convert widget node to form fields
|
|
1283
|
+
// this.convertWidgetNodeToFields(flex, formDefinition);
|
|
1284
|
+
// });
|
|
1285
|
+
// // Note: This is a simplified approach - in production, you'd need to properly integrate
|
|
1286
|
+
// return;
|
|
1287
|
+
// }
|
|
1288
|
+
// // Handle JSON form definition
|
|
1289
|
+
// if (formDefinition?.fields && Array.isArray(formDefinition.fields)) {
|
|
1290
|
+
// // Simple fields array format
|
|
1291
|
+
// for (const field of formDefinition.fields) {
|
|
1292
|
+
// this.addFormField(contentBuilder, field);
|
|
1293
|
+
// }
|
|
1294
|
+
// } else if (formDefinition?.groups && Array.isArray(formDefinition.groups)) {
|
|
1295
|
+
// // Groups format (like dynamic form designer)
|
|
1296
|
+
// for (const group of formDefinition.groups) {
|
|
1297
|
+
// if (group.fields && Array.isArray(group.fields)) {
|
|
1298
|
+
// for (const field of group.fields) {
|
|
1299
|
+
// this.addFormField(contentBuilder, field);
|
|
1300
|
+
// }
|
|
1301
|
+
// }
|
|
1302
|
+
// }
|
|
1303
|
+
// } else {
|
|
1304
|
+
// // Assume it's a widget node structure
|
|
1305
|
+
// this.convertWidgetNodeToFields(contentBuilder, formDefinition);
|
|
1306
|
+
// }
|
|
1307
|
+
// }
|
|
1308
|
+
// /**
|
|
1309
|
+
// * Add a single form field
|
|
1310
|
+
// */
|
|
1311
|
+
// private addFormField(contentBuilder: any, field: any): void {
|
|
1312
|
+
// const {
|
|
1313
|
+
// label,
|
|
1314
|
+
// type = 'text-editor',
|
|
1315
|
+
// path,
|
|
1316
|
+
// name,
|
|
1317
|
+
// options = {},
|
|
1318
|
+
// required = false,
|
|
1319
|
+
// readonly = false,
|
|
1320
|
+
// disabled = false,
|
|
1321
|
+
// visible = true,
|
|
1322
|
+
// defaultValue
|
|
1323
|
+
// } = field;
|
|
1324
|
+
// if (!label || !path) {
|
|
1325
|
+
// console.warn('[ShowForm] Skipping field without label or path:', field);
|
|
1326
|
+
// return;
|
|
1327
|
+
// }
|
|
1328
|
+
// // Create form field
|
|
1329
|
+
// contentBuilder.formField(label, (formField: any) => {
|
|
1330
|
+
// // Set field properties
|
|
1331
|
+
// if (readonly) {
|
|
1332
|
+
// formField.readonly(true);
|
|
1333
|
+
// }
|
|
1334
|
+
// if (disabled) {
|
|
1335
|
+
// formField.disabled(true);
|
|
1336
|
+
// }
|
|
1337
|
+
// if (!visible) {
|
|
1338
|
+
// formField.visible(false);
|
|
1339
|
+
// }
|
|
1340
|
+
// if (defaultValue !== undefined) {
|
|
1341
|
+
// // Set default value in options
|
|
1342
|
+
// const fieldOptions = { ...options, defaultValue };
|
|
1343
|
+
// this.addWidgetToFormField(formField, type, path, name || path, fieldOptions);
|
|
1344
|
+
// } else {
|
|
1345
|
+
// this.addWidgetToFormField(formField, type, path, name || path, options);
|
|
1346
|
+
// }
|
|
1347
|
+
// });
|
|
1348
|
+
// }
|
|
1349
|
+
// /**
|
|
1350
|
+
// * Add widget to form field based on type
|
|
1351
|
+
// */
|
|
1352
|
+
// private addWidgetToFormField(formField: any, type: string, path: string, name: string, options: any): void {
|
|
1353
|
+
// switch (type) {
|
|
1354
|
+
// case 'text-editor':
|
|
1355
|
+
// case 'textbox':
|
|
1356
|
+
// formField.textBox({ path, name, ...options });
|
|
1357
|
+
// break;
|
|
1358
|
+
// case 'large-text-editor':
|
|
1359
|
+
// case 'large-textbox':
|
|
1360
|
+
// formField.largeTextBox({ path, name, ...options });
|
|
1361
|
+
// break;
|
|
1362
|
+
// case 'rich-text-editor':
|
|
1363
|
+
// case 'richtext':
|
|
1364
|
+
// formField.richText({ path, name, ...options });
|
|
1365
|
+
// break;
|
|
1366
|
+
// case 'password-editor':
|
|
1367
|
+
// case 'password':
|
|
1368
|
+
// formField.passwordBox({ path, name, ...options });
|
|
1369
|
+
// break;
|
|
1370
|
+
// case 'number-editor':
|
|
1371
|
+
// case 'numberbox':
|
|
1372
|
+
// formField.numberBox({ path, name, ...options });
|
|
1373
|
+
// break;
|
|
1374
|
+
// case 'select-editor':
|
|
1375
|
+
// case 'selectbox':
|
|
1376
|
+
// formField.selectBox({ path, name, ...options });
|
|
1377
|
+
// break;
|
|
1378
|
+
// case 'lookup-editor':
|
|
1379
|
+
// case 'lookup':
|
|
1380
|
+
// formField.lookupBox({ path, name, ...options });
|
|
1381
|
+
// break;
|
|
1382
|
+
// case 'selection-list-editor':
|
|
1383
|
+
// case 'selection-list':
|
|
1384
|
+
// formField.selectionList({ path, name, ...options });
|
|
1385
|
+
// break;
|
|
1386
|
+
// case 'date-time-editor':
|
|
1387
|
+
// case 'datetime':
|
|
1388
|
+
// formField.dateTimeBox({ path, name, ...options });
|
|
1389
|
+
// break;
|
|
1390
|
+
// case 'toggle-editor':
|
|
1391
|
+
// case 'toggle':
|
|
1392
|
+
// formField.toggleSwitch({ path, name, ...options });
|
|
1393
|
+
// break;
|
|
1394
|
+
// case 'color-editor':
|
|
1395
|
+
// case 'color':
|
|
1396
|
+
// formField.colorBox({ path, name, ...options });
|
|
1397
|
+
// break;
|
|
1398
|
+
// default:
|
|
1399
|
+
// // Custom widget type
|
|
1400
|
+
// formField.customWidget(type, { path, name, ...options });
|
|
1401
|
+
// break;
|
|
1402
|
+
// }
|
|
1403
|
+
// }
|
|
1404
|
+
// /**
|
|
1405
|
+
// * Convert widget node to form fields (recursive)
|
|
1406
|
+
// */
|
|
1407
|
+
// private convertWidgetNodeToFields(contentBuilder: any, node: any): void {
|
|
1408
|
+
// if (!node) return;
|
|
1409
|
+
// // If it's a form-field node, extract it
|
|
1410
|
+
// if (node.type === 'form-field') {
|
|
1411
|
+
// const label = node.options?.label || node.name || 'Field';
|
|
1412
|
+
// const widget = node.children?.[0];
|
|
1413
|
+
// if (widget) {
|
|
1414
|
+
// contentBuilder.formField(label, (formField: any) => {
|
|
1415
|
+
// // Map widget properties
|
|
1416
|
+
// if (node.options?.readonly) {
|
|
1417
|
+
// formField.readonly(true);
|
|
1418
|
+
// }
|
|
1419
|
+
// if (node.options?.disabled) {
|
|
1420
|
+
// formField.disabled(true);
|
|
1421
|
+
// }
|
|
1422
|
+
// if (node.options?.visible === false) {
|
|
1423
|
+
// formField.visible(false);
|
|
1424
|
+
// }
|
|
1425
|
+
// // Add widget based on type
|
|
1426
|
+
// const path = widget.path || widget.name || label.toLowerCase().replace(/\s+/g, '_');
|
|
1427
|
+
// const name = widget.name || path;
|
|
1428
|
+
// const options = { ...widget.options };
|
|
1429
|
+
// this.addWidgetToFormField(formField, widget.type, path, name, options);
|
|
1430
|
+
// });
|
|
1431
|
+
// }
|
|
1432
|
+
// } else if (node.children && Array.isArray(node.children)) {
|
|
1433
|
+
// // Recursively process children
|
|
1434
|
+
// for (const child of node.children) {
|
|
1435
|
+
// this.convertWidgetNodeToFields(contentBuilder, child);
|
|
1436
|
+
// }
|
|
1437
|
+
// }
|
|
1438
|
+
// }
|
|
1439
|
+
// }
|
|
1375
1440
|
|
|
1376
1441
|
class AXPFormTemplateViewerConnector {
|
|
1377
1442
|
}
|
|
@@ -1628,12 +1693,12 @@ class AXMFormTemplateManagementModule {
|
|
|
1628
1693
|
multi: true,
|
|
1629
1694
|
},
|
|
1630
1695
|
// Register ShowForm activity as workflow command
|
|
1631
|
-
provideCommandSetups([
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
]),
|
|
1696
|
+
// provideCommandSetups([
|
|
1697
|
+
// {
|
|
1698
|
+
// key: 'workflow-activity:show-form',
|
|
1699
|
+
// command: () => import('./features/activities/show-form.activity').then(m => m.ShowForm),
|
|
1700
|
+
// },
|
|
1701
|
+
// ]),
|
|
1637
1702
|
], imports: [AXPWidgetsModule,
|
|
1638
1703
|
AXMFormTemplateManagementTemplateEntityModule,
|
|
1639
1704
|
AXPWidgetCoreModule.forChild({
|
|
@@ -1745,12 +1810,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1745
1810
|
multi: true,
|
|
1746
1811
|
},
|
|
1747
1812
|
// Register ShowForm activity as workflow command
|
|
1748
|
-
provideCommandSetups([
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
]),
|
|
1813
|
+
// provideCommandSetups([
|
|
1814
|
+
// {
|
|
1815
|
+
// key: 'workflow-activity:show-form',
|
|
1816
|
+
// command: () => import('./features/activities/show-form.activity').then(m => m.ShowForm),
|
|
1817
|
+
// },
|
|
1818
|
+
// ]),
|
|
1754
1819
|
],
|
|
1755
1820
|
}]
|
|
1756
1821
|
}] });
|
|
@@ -1759,5 +1824,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1759
1824
|
* Generated bundle index. Do not edit.
|
|
1760
1825
|
*/
|
|
1761
1826
|
|
|
1762
|
-
export { AXMCreateFormTemplateWorkflow, AXMDesignFormTemplateWorkflow, AXMFormTemplateManagementModule, AXMFormTemplateManagementTemplateEntityModule, AXMFormTemplateManagementTemplateEntityService, AXMFormTemplateManagementTemplateEntityServiceImpl, AXMFormTemplateTypes, AXMPermissionsKeys, AXMQuestionnaireDataSourceDefinition, AXPDesignerConnectorImpl, AXPTemplateDesignerWidget, AXPTemplateDesignerWidgetViewComponent, AXPTemplateWidget, AXPTemplateWidgetDesignerComponent, AXPTemplateWidgetProviderService, AXPTemplateWidgetViewComponent, AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU, AXP_TEMPLATE_WIDGET_PROVIDER, RootConfig
|
|
1827
|
+
export { AXMCreateFormTemplateWorkflow, AXMDesignFormTemplateWorkflow, AXMFormTemplateManagementModule, AXMFormTemplateManagementTemplateEntityModule, AXMFormTemplateManagementTemplateEntityService, AXMFormTemplateManagementTemplateEntityServiceImpl, AXMFormTemplateTypes, AXMPermissionsKeys, AXMQuestionnaireDataSourceDefinition, AXPDesignerConnectorImpl, AXPTemplateDesignerWidget, AXPTemplateDesignerWidgetViewComponent, AXPTemplateWidget, AXPTemplateWidgetDesignerComponent, AXPTemplateWidgetProviderService, AXPTemplateWidgetViewComponent, AXP_DESIGNER_TEMPLATE_WIDGET_CHOOSE_MENU, AXP_TEMPLATE_WIDGET_PROVIDER, RootConfig };
|
|
1763
1828
|
//# sourceMappingURL=acorex-modules-form-template-management.mjs.map
|