@acorex-platform/module-common-client 0.0.38 → 0.0.48
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-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs} +258 -66
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs → acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs.map → acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs → acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs → acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs.map → acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs → acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs.map → acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs +13 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs +14 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs +13 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-C2WFbRne.mjs → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-C2WFbRne.mjs.map → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-CY6jfaD7.mjs → acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs} +15 -2
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-DCBxAIMJ.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs} +16 -2
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-DbSB34vz.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs} +15 -2
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts.mjs +110 -4
- package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs +46 -0
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs +54 -0
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs +58 -0
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs → acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs → acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs.map → acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs +122 -0
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client.mjs +2 -1
- package/fesm2022/acorex-platform-module-common-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-common-client-contracts.d.ts +80 -4
- package/types/acorex-platform-module-common-client.d.ts +13 -10
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-CY6jfaD7.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-DCBxAIMJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-DbSB34vz.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AXP_PERMISSION_DEFINITION_PROVIDER, AXPSessionService, AXP_PERMISSION_MODULES_RESOLVER } from '@acorex-platform/framework-client/auth';
|
|
2
2
|
import { AXPVersioningService, AXVChangeType, AXPSettingsService, AXPCommonSettings, AXPLockService, AXPStatusDefinitionProviderService, platformErrorI18nKey, AXPHomePageService, ALL_DEFAULT_OPERATORS, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_STATUS_PROVIDERS, AXPTabNavigationService, AXPSearchService } from '@acorex-platform/framework-client/common';
|
|
3
3
|
import * as i1$3 from '@acorex-platform/framework-client/core';
|
|
4
|
-
import { AXPCatalogScopeDefinitionProviderService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPEntityBroadcastService, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
4
|
+
import { AXPCatalogScopeDefinitionProviderService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPEntityBroadcastService, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_CATALOG_SCOPE_DEFINITION_PROVIDER, AXPKeyboardShortcutRegistry, chordToKbdItemKeys, AXPComponentSlotModule } from '@acorex-platform/framework-client/core';
|
|
5
5
|
import { provideCommandSetups, AXPQueryService, provideCommandMiddleware, AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';
|
|
6
|
-
import {
|
|
6
|
+
import { AXPCommonCommandKeys, AXPVersioningField, AXP_VERSIONING_PLUGIN_NAME, RootConfig, AXPCommonMenuKeys, AXPCommonFeatureKeys, COMMON_CATALOG_SCOPE_GENERAL, resolvePermissionModules } from '@acorex-platform/module-common-client/contracts';
|
|
7
7
|
import { AXPWidgetsModule } from '@acorex-platform/framework-client/layout/widgets';
|
|
8
8
|
import * as i0 from '@angular/core';
|
|
9
9
|
import { NgModule, InjectionToken, inject, Injectable, input, signal, computed, Injector, ChangeDetectionStrategy, Component, runInInjectionContext, ViewEncapsulation, DestroyRef } from '@angular/core';
|
|
@@ -40,26 +40,6 @@ import { firstValueFrom, Subject } from 'rxjs';
|
|
|
40
40
|
import { AXKBDComponent, AXKBDItemComponent } from '@acorex/components/kbd';
|
|
41
41
|
import { AXPLayoutThemeService } from '@acorex-platform/framework-client/themes/shared';
|
|
42
42
|
|
|
43
|
-
//#region ---- Imports ----
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region ---- Manifest Definition ----
|
|
46
|
-
/**
|
|
47
|
-
* Common Module Manifest.
|
|
48
|
-
* Defines module metadata, features, and provider references.
|
|
49
|
-
*/
|
|
50
|
-
const CommonManifest = {
|
|
51
|
-
name: RootConfig.module.name,
|
|
52
|
-
version: '1.0.0',
|
|
53
|
-
title: RootConfig.module.title,
|
|
54
|
-
icon: RootConfig.module.icon,
|
|
55
|
-
i18n: RootConfig.config.i18n,
|
|
56
|
-
type: 'platform',
|
|
57
|
-
domain: 'platform',
|
|
58
|
-
required: true,
|
|
59
|
-
// Module dependencies (optional)
|
|
60
|
-
};
|
|
61
|
-
//#endregion
|
|
62
|
-
|
|
63
43
|
const DEFAULT_ARCHIVE_FIELD_NAME = 'isArchived';
|
|
64
44
|
//#endregion
|
|
65
45
|
const archivePlugin = {
|
|
@@ -248,7 +228,6 @@ const archivePlugin = {
|
|
|
248
228
|
},
|
|
249
229
|
],
|
|
250
230
|
sorts: [
|
|
251
|
-
{ name: 'archivedAt', dir: 'desc' },
|
|
252
231
|
{ name: 'title', dir: 'asc' },
|
|
253
232
|
],
|
|
254
233
|
}));
|
|
@@ -267,19 +246,19 @@ class AXPArchivePluginModule {
|
|
|
267
246
|
provideCommandSetups([
|
|
268
247
|
{
|
|
269
248
|
key: AXPCommonCommandKeys.Archive.Archive,
|
|
270
|
-
command: () => import('./acorex-platform-module-common-client-archive-entity.command-
|
|
249
|
+
command: () => import('./acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs').then((m) => m.AXPArchiveEntityCommand),
|
|
271
250
|
},
|
|
272
251
|
{
|
|
273
252
|
key: AXPCommonCommandKeys.Archive.Restore,
|
|
274
|
-
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-
|
|
253
|
+
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
|
|
275
254
|
},
|
|
276
255
|
{
|
|
277
256
|
key: AXPCommonCommandKeys.Archive.BulkArchive,
|
|
278
|
-
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-
|
|
257
|
+
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
|
|
279
258
|
},
|
|
280
259
|
{
|
|
281
260
|
key: AXPCommonCommandKeys.Archive.BulkRestore,
|
|
282
|
-
command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-
|
|
261
|
+
command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
|
|
283
262
|
},
|
|
284
263
|
]),
|
|
285
264
|
] }); }
|
|
@@ -292,19 +271,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
292
271
|
provideCommandSetups([
|
|
293
272
|
{
|
|
294
273
|
key: AXPCommonCommandKeys.Archive.Archive,
|
|
295
|
-
command: () => import('./acorex-platform-module-common-client-archive-entity.command-
|
|
274
|
+
command: () => import('./acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs').then((m) => m.AXPArchiveEntityCommand),
|
|
296
275
|
},
|
|
297
276
|
{
|
|
298
277
|
key: AXPCommonCommandKeys.Archive.Restore,
|
|
299
|
-
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-
|
|
278
|
+
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
|
|
300
279
|
},
|
|
301
280
|
{
|
|
302
281
|
key: AXPCommonCommandKeys.Archive.BulkArchive,
|
|
303
|
-
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-
|
|
282
|
+
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
|
|
304
283
|
},
|
|
305
284
|
{
|
|
306
285
|
key: AXPCommonCommandKeys.Archive.BulkRestore,
|
|
307
|
-
command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-
|
|
286
|
+
command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
|
|
308
287
|
},
|
|
309
288
|
]),
|
|
310
289
|
],
|
|
@@ -314,6 +293,221 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
314
293
|
const AXP_ENTITY_ARCHIVE_OVERRIDES = new InjectionToken('AXP_ENTITY_ARCHIVE_OVERRIDES');
|
|
315
294
|
//#endregion
|
|
316
295
|
|
|
296
|
+
function notEnabledHiddenExpression(options) {
|
|
297
|
+
const enabledField = options?.enabledField ?? AXPVersioningField.VersioningEnabled;
|
|
298
|
+
const raw = options?.enabledWhen;
|
|
299
|
+
if (typeof raw === 'string' && raw.includes('{{')) {
|
|
300
|
+
const inner = raw.replace(/^\{\{\s*/, '').replace(/\s*\}\}$/, '');
|
|
301
|
+
return `{{ !(${inner}) }}`;
|
|
302
|
+
}
|
|
303
|
+
return `{{ !context.eval("${enabledField}") }}`;
|
|
304
|
+
}
|
|
305
|
+
//#region ----- Entity versioning plugin -----
|
|
306
|
+
const versioningPlugin = {
|
|
307
|
+
name: AXP_VERSIONING_PLUGIN_NAME,
|
|
308
|
+
order: 64,
|
|
309
|
+
apply: (ctx, options) => {
|
|
310
|
+
ensureListActions(ctx);
|
|
311
|
+
const hiddenWhenNotEnabled = notEnabledHiddenExpression(options);
|
|
312
|
+
const groupId = 'basic-info';
|
|
313
|
+
const groups = ctx.groups.list() ?? [];
|
|
314
|
+
if (!groups.some((g) => g.id === groupId)) {
|
|
315
|
+
ctx.groups.add({ id: groupId, title: '@general:terms.interface.basic-info' });
|
|
316
|
+
}
|
|
317
|
+
const props = ctx.properties.list();
|
|
318
|
+
if (!props.some((p) => p.name === AXPVersioningField.Version)) {
|
|
319
|
+
ctx.properties.add({
|
|
320
|
+
name: AXPVersioningField.Version,
|
|
321
|
+
title: '@general:versioning.fields.version.title',
|
|
322
|
+
groupId,
|
|
323
|
+
schema: {
|
|
324
|
+
dataType: 'number',
|
|
325
|
+
readonly: true,
|
|
326
|
+
interface: {
|
|
327
|
+
type: AXPWidgetsList.Editors.NumberBox,
|
|
328
|
+
options: { disabled: true },
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
options: {
|
|
332
|
+
sort: { enabled: true },
|
|
333
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
if (!props.some((p) => p.name === AXPVersioningField.VersionId)) {
|
|
338
|
+
ctx.properties.add({
|
|
339
|
+
name: AXPVersioningField.VersionId,
|
|
340
|
+
title: '@general:versioning.fields.version-id.title',
|
|
341
|
+
groupId,
|
|
342
|
+
schema: {
|
|
343
|
+
dataType: 'string',
|
|
344
|
+
readonly: true,
|
|
345
|
+
visible: false,
|
|
346
|
+
interface: { type: AXPWidgetsList.Editors.TextBox },
|
|
347
|
+
},
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
const enabledField = options?.enabledField ?? AXPVersioningField.VersioningEnabled;
|
|
351
|
+
if (!props.some((p) => p.name === enabledField)) {
|
|
352
|
+
ctx.properties.add({
|
|
353
|
+
name: enabledField,
|
|
354
|
+
title: '@general:versioning.fields.versioning-enabled.title',
|
|
355
|
+
groupId,
|
|
356
|
+
schema: {
|
|
357
|
+
dataType: 'boolean',
|
|
358
|
+
readonly: true,
|
|
359
|
+
visible: false,
|
|
360
|
+
interface: {
|
|
361
|
+
type: AXPWidgetsList.Editors.ToggleSwitch,
|
|
362
|
+
options: { defaultValue: false, nullValue: false },
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
const columns = ctx.columns.list() ?? [];
|
|
368
|
+
if (!columns.some((c) => c.name === AXPVersioningField.Version)) {
|
|
369
|
+
ctx.columns.add({
|
|
370
|
+
name: AXPVersioningField.Version,
|
|
371
|
+
title: '@general:versioning.fields.version.title',
|
|
372
|
+
width: 90,
|
|
373
|
+
sortable: true,
|
|
374
|
+
filterable: true,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
const hostRefType = `${ctx.entity.module}.${ctx.entity.name}`;
|
|
378
|
+
const companionEntity = `${hostRefType}Version`;
|
|
379
|
+
ctx.entity.relatedEntities ??= [];
|
|
380
|
+
const related = ctx.entity.relatedEntities;
|
|
381
|
+
if (!related.some((r) => r.entity === companionEntity)) {
|
|
382
|
+
ctx.entity.relatedEntities.push({
|
|
383
|
+
entity: companionEntity,
|
|
384
|
+
title: '@general:versioning.related-versions.title',
|
|
385
|
+
icon: 'fa-light fa-code-branch',
|
|
386
|
+
conditions: [
|
|
387
|
+
{
|
|
388
|
+
name: AXPVersioningField.SourceId,
|
|
389
|
+
operator: { type: 'equal' },
|
|
390
|
+
value: '{{ context.eval("id") }}',
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
columns: [
|
|
394
|
+
{ name: AXPVersioningField.VersionNumber },
|
|
395
|
+
{ name: AXPVersioningField.VersioningStatus },
|
|
396
|
+
],
|
|
397
|
+
excludeProperties: ['sourceId'],
|
|
398
|
+
layout: { type: 'page-list', position: 'after', order: 80 },
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
ctx.interfaces.update((interfaces) => {
|
|
402
|
+
const listActions = interfaces.master
|
|
403
|
+
?.list?.actions;
|
|
404
|
+
const singleActions = interfaces.master
|
|
405
|
+
?.single?.actions;
|
|
406
|
+
const addActions = (actions) => {
|
|
407
|
+
if (!actions) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
if (!actionExists(actions, AXPCommonCommandKeys.Versioning.CreateDraft)) {
|
|
411
|
+
actions.push({
|
|
412
|
+
title: '@general:actions.versioning.create-draft.title',
|
|
413
|
+
command: {
|
|
414
|
+
name: AXPCommonCommandKeys.Versioning.CreateDraft,
|
|
415
|
+
options: {
|
|
416
|
+
refId: '{{ context.eval("id") }}',
|
|
417
|
+
refType: hostRefType,
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
priority: 'secondary',
|
|
421
|
+
type: 'update',
|
|
422
|
+
scope: AXPEntityCommandScope.Individual,
|
|
423
|
+
hidden: hiddenWhenNotEnabled,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (!actionExists(actions, AXPCommonCommandKeys.Versioning.Publish)) {
|
|
427
|
+
actions.push({
|
|
428
|
+
title: '@general:actions.versioning.publish.title',
|
|
429
|
+
command: {
|
|
430
|
+
name: AXPCommonCommandKeys.Versioning.Publish,
|
|
431
|
+
options: {
|
|
432
|
+
refId: '{{ context.eval("id") }}',
|
|
433
|
+
refType: hostRefType,
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
priority: 'secondary',
|
|
437
|
+
type: 'update',
|
|
438
|
+
scope: AXPEntityCommandScope.Individual,
|
|
439
|
+
hidden: hiddenWhenNotEnabled,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
if (!actionExists(actions, AXPCommonCommandKeys.Versioning.DeleteDraft)) {
|
|
443
|
+
actions.push({
|
|
444
|
+
title: '@general:actions.versioning.delete-draft.title',
|
|
445
|
+
command: {
|
|
446
|
+
name: AXPCommonCommandKeys.Versioning.DeleteDraft,
|
|
447
|
+
options: {
|
|
448
|
+
refId: '{{ context.eval("id") }}',
|
|
449
|
+
refType: hostRefType,
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
priority: 'secondary',
|
|
453
|
+
type: 'delete',
|
|
454
|
+
scope: AXPEntityCommandScope.Individual,
|
|
455
|
+
hidden: hiddenWhenNotEnabled,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
addActions(listActions);
|
|
460
|
+
addActions(singleActions);
|
|
461
|
+
return interfaces;
|
|
462
|
+
});
|
|
463
|
+
},
|
|
464
|
+
};
|
|
465
|
+
//#endregion
|
|
466
|
+
|
|
467
|
+
class AXPVersioningPluginModule {
|
|
468
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
469
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule }); }
|
|
470
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, providers: [
|
|
471
|
+
{ provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: versioningPlugin },
|
|
472
|
+
provideCommandSetups([
|
|
473
|
+
{
|
|
474
|
+
key: AXPCommonCommandKeys.Versioning.CreateDraft,
|
|
475
|
+
command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs').then((m) => m.AXPCreateEntityVersionDraftCommand),
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
key: AXPCommonCommandKeys.Versioning.Publish,
|
|
479
|
+
command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs').then((m) => m.AXPPublishEntityVersionCommand),
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
key: AXPCommonCommandKeys.Versioning.DeleteDraft,
|
|
483
|
+
command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs').then((m) => m.AXPDeleteEntityVersionDraftCommand),
|
|
484
|
+
},
|
|
485
|
+
]),
|
|
486
|
+
] }); }
|
|
487
|
+
}
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, decorators: [{
|
|
489
|
+
type: NgModule,
|
|
490
|
+
args: [{
|
|
491
|
+
providers: [
|
|
492
|
+
{ provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: versioningPlugin },
|
|
493
|
+
provideCommandSetups([
|
|
494
|
+
{
|
|
495
|
+
key: AXPCommonCommandKeys.Versioning.CreateDraft,
|
|
496
|
+
command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs').then((m) => m.AXPCreateEntityVersionDraftCommand),
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
key: AXPCommonCommandKeys.Versioning.Publish,
|
|
500
|
+
command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs').then((m) => m.AXPPublishEntityVersionCommand),
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
key: AXPCommonCommandKeys.Versioning.DeleteDraft,
|
|
504
|
+
command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs').then((m) => m.AXPDeleteEntityVersionDraftCommand),
|
|
505
|
+
},
|
|
506
|
+
]),
|
|
507
|
+
],
|
|
508
|
+
}]
|
|
509
|
+
}] });
|
|
510
|
+
|
|
317
511
|
/** Component key used when display is 'page'. Register via AXP_PAGE_COMPONENT_PROVIDER. */
|
|
318
512
|
const HISTORY_PAGE_COMPONENT_KEY = 'entity-version-history-page';
|
|
319
513
|
const DEFAULT_COLUMN_WIDTH = '180px';
|
|
@@ -521,7 +715,7 @@ class ShowVersionHistoryPopupCommand {
|
|
|
521
715
|
},
|
|
522
716
|
};
|
|
523
717
|
}
|
|
524
|
-
const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-
|
|
718
|
+
const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs')).AXMTimelineVersionHistoryPopupComponent;
|
|
525
719
|
this.popupService.open(comp, {
|
|
526
720
|
title: await this.translate.translateAsync('@activity-log:actions.view-history.title'),
|
|
527
721
|
data: {
|
|
@@ -593,7 +787,7 @@ const AXPHistoryAuditInfoWidget = {
|
|
|
593
787
|
component: () => import('./acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs').then((c) => c.AXPAuditInfoEditComponent),
|
|
594
788
|
},
|
|
595
789
|
column: {
|
|
596
|
-
component: () => import('./acorex-platform-module-common-client-audit-info-column.component-
|
|
790
|
+
component: () => import('./acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs').then((c) => c.AXPAuditInfoColumnComponent),
|
|
597
791
|
},
|
|
598
792
|
},
|
|
599
793
|
};
|
|
@@ -1041,15 +1235,26 @@ function formatObjectDisplay(value, locale) {
|
|
|
1041
1235
|
return undefined;
|
|
1042
1236
|
}
|
|
1043
1237
|
/** Converts a value to a short display string for notification-style summary. */
|
|
1044
|
-
function toShortDisplayString(val, meta, side, locale = 'en-US') {
|
|
1238
|
+
function toShortDisplayString(val, meta, side, locale = 'en-US', path) {
|
|
1239
|
+
const kindFile = meta?.['kind'] === 'file';
|
|
1240
|
+
const pathFile = !!path && /(^|\/)(avatar|logo|image|photo|attachments?|files?|fileId|fileInfo)(\/|$)/i.test(path);
|
|
1241
|
+
const hideFileId = (text) => {
|
|
1242
|
+
const trimmed = text.trim();
|
|
1243
|
+
const opaque = /^file:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(trimmed) ||
|
|
1244
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(trimmed);
|
|
1245
|
+
if ((kindFile || pathFile) && opaque) {
|
|
1246
|
+
return locale.startsWith('fa') ? 'تصویر' : 'Image';
|
|
1247
|
+
}
|
|
1248
|
+
return trimDisplay(text);
|
|
1249
|
+
};
|
|
1045
1250
|
if (side === 'old' && typeof meta?.['displayOld'] === 'string' && meta['displayOld'].trim()) {
|
|
1046
|
-
return
|
|
1251
|
+
return hideFileId(meta['displayOld']);
|
|
1047
1252
|
}
|
|
1048
1253
|
if (side === 'new' && typeof meta?.['displayNew'] === 'string' && meta['displayNew'].trim()) {
|
|
1049
|
-
return
|
|
1254
|
+
return hideFileId(meta['displayNew']);
|
|
1050
1255
|
}
|
|
1051
1256
|
if (typeof meta?.['fileName'] === 'string' && meta['fileName'].trim()) {
|
|
1052
|
-
return
|
|
1257
|
+
return hideFileId(meta['fileName']);
|
|
1053
1258
|
}
|
|
1054
1259
|
if (val == null)
|
|
1055
1260
|
return '—';
|
|
@@ -1062,13 +1267,13 @@ function toShortDisplayString(val, meta, side, locale = 'en-US') {
|
|
|
1062
1267
|
if (typeof val === 'string') {
|
|
1063
1268
|
if (!val.trim() || val === '[object Object]')
|
|
1064
1269
|
return '—';
|
|
1065
|
-
return
|
|
1270
|
+
return hideFileId(val);
|
|
1066
1271
|
}
|
|
1067
1272
|
if (Array.isArray(val)) {
|
|
1068
1273
|
if (val.length === 0)
|
|
1069
1274
|
return '—';
|
|
1070
1275
|
const parts = val
|
|
1071
|
-
.map((item) => toShortDisplayString(item, null, undefined, locale))
|
|
1276
|
+
.map((item) => toShortDisplayString(item, null, undefined, locale, path))
|
|
1072
1277
|
.filter((part) => part && part !== '—');
|
|
1073
1278
|
return parts.length ? trimDisplay(parts.join(', ')) : '—';
|
|
1074
1279
|
}
|
|
@@ -1087,9 +1292,9 @@ function trimDisplay(value) {
|
|
|
1087
1292
|
return value;
|
|
1088
1293
|
}
|
|
1089
1294
|
/** Builds a short, human-readable notification-style summary for a change. */
|
|
1090
|
-
function buildChangeSummary(op, oldVal, newVal, meta, locale = 'en-US') {
|
|
1091
|
-
const oldStr = toShortDisplayString(oldVal, meta, 'old', locale);
|
|
1092
|
-
const newStr = toShortDisplayString(newVal, meta, 'new', locale);
|
|
1295
|
+
function buildChangeSummary(op, oldVal, newVal, meta, locale = 'en-US', path) {
|
|
1296
|
+
const oldStr = toShortDisplayString(oldVal, meta, 'old', locale, path);
|
|
1297
|
+
const newStr = toShortDisplayString(newVal, meta, 'new', locale, path);
|
|
1093
1298
|
switch (op) {
|
|
1094
1299
|
case 'add':
|
|
1095
1300
|
return newStr !== '—' ? `Added ${newStr}` : 'Added';
|
|
@@ -1122,7 +1327,7 @@ function resolveMls(value, locale) {
|
|
|
1122
1327
|
return resolveMultiLanguageString(value, locale) || '';
|
|
1123
1328
|
}
|
|
1124
1329
|
function mapServerChangeLines(lines, getHistoryLayout, locale) {
|
|
1125
|
-
return lines.slice(0,
|
|
1330
|
+
return lines.slice(0, 50).map((line) => {
|
|
1126
1331
|
const pathStr = line.path;
|
|
1127
1332
|
const layout = getHistoryLayout?.(pathStr);
|
|
1128
1333
|
const fieldLabel = resolveMls(line.field, locale);
|
|
@@ -1148,7 +1353,7 @@ function mapPatchChanges(rawChanges, fieldTitles, getHistoryLayout, locale) {
|
|
|
1148
1353
|
continue;
|
|
1149
1354
|
seenFields.add(dedupeKey);
|
|
1150
1355
|
const layout = getHistoryLayout?.(pathStr);
|
|
1151
|
-
const summary = buildChangeSummary(c.op, c.oldValue, c.newValue, c.meta, locale);
|
|
1356
|
+
const summary = buildChangeSummary(c.op, c.oldValue, c.newValue, c.meta, locale, pathStr);
|
|
1152
1357
|
const fallbackDesc = `${humanizeKeyAsFallback(resolvePathKey(c.path))}: ${c.op}`;
|
|
1153
1358
|
const fieldLabel = (fieldKeyParams?.['name']
|
|
1154
1359
|
? humanizeKeyAsFallback(fieldKeyParams['name'])
|
|
@@ -2497,7 +2702,7 @@ class AXPClonePluginModule {
|
|
|
2497
2702
|
provideCommandSetups([
|
|
2498
2703
|
{
|
|
2499
2704
|
key: AXPCommonCommandKeys.Clone.Clone,
|
|
2500
|
-
command: () => import('./acorex-platform-module-common-client-clone-entity.command-
|
|
2705
|
+
command: () => import('./acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs').then((m) => m.AXPCloneEntityCommand),
|
|
2501
2706
|
},
|
|
2502
2707
|
]),
|
|
2503
2708
|
] }); }
|
|
@@ -2510,7 +2715,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2510
2715
|
provideCommandSetups([
|
|
2511
2716
|
{
|
|
2512
2717
|
key: AXPCommonCommandKeys.Clone.Clone,
|
|
2513
|
-
command: () => import('./acorex-platform-module-common-client-clone-entity.command-
|
|
2718
|
+
command: () => import('./acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs').then((m) => m.AXPCloneEntityCommand),
|
|
2514
2719
|
},
|
|
2515
2720
|
]),
|
|
2516
2721
|
],
|
|
@@ -3454,7 +3659,6 @@ const disablePlugin = {
|
|
|
3454
3659
|
},
|
|
3455
3660
|
],
|
|
3456
3661
|
sorts: [
|
|
3457
|
-
{ name: 'disabledAt', dir: 'desc' },
|
|
3458
3662
|
{ name: 'title', dir: 'asc' },
|
|
3459
3663
|
],
|
|
3460
3664
|
}));
|
|
@@ -4371,7 +4575,6 @@ const primaryPlugin = {
|
|
|
4371
4575
|
},
|
|
4372
4576
|
],
|
|
4373
4577
|
sorts: [
|
|
4374
|
-
{ name: 'updatedAt', dir: 'desc' },
|
|
4375
4578
|
{ name: 'title', dir: 'asc' },
|
|
4376
4579
|
],
|
|
4377
4580
|
}));
|
|
@@ -6064,6 +6267,7 @@ class AXMCommonModule {
|
|
|
6064
6267
|
//#endregion
|
|
6065
6268
|
//#region ---- Status Management Plugins ----
|
|
6066
6269
|
AXPArchivePluginModule,
|
|
6270
|
+
AXPVersioningPluginModule,
|
|
6067
6271
|
AXPDisablePluginModule,
|
|
6068
6272
|
AXPDefaultPluginModule,
|
|
6069
6273
|
AXPPrimaryPluginModule,
|
|
@@ -6154,13 +6358,6 @@ class AXMCommonModule {
|
|
|
6154
6358
|
multi: true,
|
|
6155
6359
|
},
|
|
6156
6360
|
//#endregion
|
|
6157
|
-
//#region ---- Module Manifest Provider ----
|
|
6158
|
-
{
|
|
6159
|
-
provide: AXP_MODULE_MANIFEST_PROVIDER,
|
|
6160
|
-
useValue: CommonManifest,
|
|
6161
|
-
multi: true,
|
|
6162
|
-
},
|
|
6163
|
-
//#endregion
|
|
6164
6361
|
//#region ---- Feature Definition Provider ----
|
|
6165
6362
|
{
|
|
6166
6363
|
provide: AXP_FEATURE_DEFINITION_PROVIDER,
|
|
@@ -6202,6 +6399,7 @@ class AXMCommonModule {
|
|
|
6202
6399
|
//#endregion
|
|
6203
6400
|
//#region ---- Status Management Plugins ----
|
|
6204
6401
|
AXPArchivePluginModule,
|
|
6402
|
+
AXPVersioningPluginModule,
|
|
6205
6403
|
AXPDisablePluginModule,
|
|
6206
6404
|
AXPDefaultPluginModule,
|
|
6207
6405
|
AXPPrimaryPluginModule,
|
|
@@ -6243,6 +6441,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
6243
6441
|
//#endregion
|
|
6244
6442
|
//#region ---- Status Management Plugins ----
|
|
6245
6443
|
AXPArchivePluginModule,
|
|
6444
|
+
AXPVersioningPluginModule,
|
|
6246
6445
|
AXPDisablePluginModule,
|
|
6247
6446
|
AXPDefaultPluginModule,
|
|
6248
6447
|
AXPPrimaryPluginModule,
|
|
@@ -6337,13 +6536,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
6337
6536
|
multi: true,
|
|
6338
6537
|
},
|
|
6339
6538
|
//#endregion
|
|
6340
|
-
//#region ---- Module Manifest Provider ----
|
|
6341
|
-
{
|
|
6342
|
-
provide: AXP_MODULE_MANIFEST_PROVIDER,
|
|
6343
|
-
useValue: CommonManifest,
|
|
6344
|
-
multi: true,
|
|
6345
|
-
},
|
|
6346
|
-
//#endregion
|
|
6347
6539
|
//#region ---- Feature Definition Provider ----
|
|
6348
6540
|
{
|
|
6349
6541
|
provide: AXP_FEATURE_DEFINITION_PROVIDER,
|
|
@@ -6586,7 +6778,7 @@ class AXPGlobalSearchModule {
|
|
|
6586
6778
|
{
|
|
6587
6779
|
provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
|
|
6588
6780
|
useValue: {
|
|
6589
|
-
window: () => import('./acorex-platform-module-common-client-search-popup.component-
|
|
6781
|
+
window: () => import('./acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
|
|
6590
6782
|
},
|
|
6591
6783
|
},
|
|
6592
6784
|
AXPGlobalSearchCommand,
|
|
@@ -6628,7 +6820,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
6628
6820
|
{
|
|
6629
6821
|
provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
|
|
6630
6822
|
useValue: {
|
|
6631
|
-
window: () => import('./acorex-platform-module-common-client-search-popup.component-
|
|
6823
|
+
window: () => import('./acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
|
|
6632
6824
|
},
|
|
6633
6825
|
},
|
|
6634
6826
|
AXPGlobalSearchCommand,
|
|
@@ -6851,5 +7043,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
6851
7043
|
* Generated bundle index. Do not edit.
|
|
6852
7044
|
*/
|
|
6853
7045
|
|
|
6854
|
-
export { statusPlugin as $, AXP_ENTITY_ARCHIVE_OVERRIDES as A,
|
|
6855
|
-
//# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-
|
|
7046
|
+
export { statusPlugin as $, AXP_ENTITY_ARCHIVE_OVERRIDES as A, AtLeastOneOfValidationRule as B, StateStatusProvider as C, VariableNameValidationRule as D, aggregateVersionHistoryBarChartItems as E, archivePlugin as F, buildEntityFieldHistoryLineChartSeries as G, HISTORY_PAGE_COMPONENT_KEY as H, buildProductBasePriceHistoryLineChartSeries as I, derivedNamePlugin as J, disablePlugin as K, getActiveStatuses as L, getFinalStatuses as M, getInitialStatuses as N, getStatusByName as O, getTransitionsFromStatus as P, getTransitionsToStatus as Q, historyPlugin as R, ShowVersionHistoryPopupCommand as S, TaskStatusProvider as T, UniqueValidationRule as U, VARIABLE_NAME_VALIDATION_PATTERN as V, humanizeChange as W, isValidTransition as X, mapChangeType as Y, mapOpToAction as Z, resolvePathKey as _, AXPGlobalSearchViewModel as a, uniqueFieldsPlugin as a0, versioningPlugin as a1, AXMCommonModule as b, AXMMenuProvider as c, AXMSettingProvider as d, AXMVersionHistoryPageComponent as e, AXPArchivePluginModule as f, AXPCommonFeatureDefinitionProvider as g, AXPDerivedNamePluginModule as h, isValidVariableName as i, AXPDisablePluginModule as j, AXPGlobalSearchModule as k, AXPHistoryAuditInfoWidget as l, AXPHistoryModule as m, AXPLockEntityCommand as n, openActivityLogVersionCompare as o, AXPResourceAppointmentPageComponent as p, AXPStatusPluginModule as q, AXPUniqueFieldsPluginModule as r, AXPUnlockEntityCommand as s, toVariableName as t, AXPValidationRulesModule as u, versionEntriesToActivityLogs as v, AXPVersioningPluginModule as w, AXP_GLOBAL_SEARCH_CONFIG_TOKEN as x, AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG as y, ApprovalStatusProvider as z };
|
|
7047
|
+
//# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs.map
|