@acorex-platform/module-common-client 0.0.53 → 0.0.56
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-Cd7vTe3G.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs} +232 -39
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs → acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs.map → acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs → acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs → acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs} +9 -4
- package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs → acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs} +23 -2
- package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs → acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs} +23 -2
- package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs +9 -0
- package/fesm2022/acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs → acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs.map → acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts.mjs +57 -1
- 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 → acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs} +14 -2
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs → acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs} +14 -2
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs → acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs} +14 -2
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs → acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs → acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs.map → acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs +553 -0
- package/fesm2022/acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs → acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs} +18 -1
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client.mjs +1 -1
- package/i18n/en-AU/_feature-sample.json +47 -0
- package/i18n/en-AU/_module-sample.json +114 -0
- package/i18n/en-AU/common.json +1164 -0
- package/i18n/en-AU/global-search.json +38 -0
- package/i18n/en-AU/lock-system.json +66 -0
- package/i18n/en-US/_feature-sample.json +47 -0
- package/i18n/en-US/_module-sample.json +114 -0
- package/i18n/en-US/common.json +1164 -0
- package/i18n/en-US/global-search.json +38 -0
- package/i18n/en-US/lock-system.json +66 -0
- package/i18n/fa-IR/_feature-sample.json +48 -0
- package/i18n/fa-IR/_module-sample.json +115 -0
- package/i18n/fa-IR/common.json +1164 -0
- package/i18n/fa-IR/global-search.json +38 -0
- package/i18n/fa-IR/lock-system.json +66 -0
- package/package.json +1 -1
- package/types/acorex-platform-module-common-client-contracts.d.ts +42 -2
- package/types/acorex-platform-module-common-client.d.ts +5 -1
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map +0 -1
|
@@ -3,19 +3,19 @@ import { AXPVersioningService, AXVChangeType, AXPSettingsService, AXPCommonSetti
|
|
|
3
3
|
import * as i1$3 from '@acorex-platform/framework-client/core';
|
|
4
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 { AXPCommonCommandKeys, AXPVersioningField, AXP_VERSIONING_PLUGIN_NAME, RootConfig, AXPCommonMenuKeys, AXPCommonFeatureKeys, COMMON_CATALOG_SCOPE_GENERAL, resolvePermissionModules } from '@acorex-platform/module-common-client/contracts';
|
|
6
|
+
import { AXPCommonCommandKeys, AXPVersioningField, maintainVersioningPermissionKey, AXP_VERSIONING_MAINTAIN_PERMISSION_LEGACY, AXPVersioningStatus, AXP_VERSIONING_PLUGIN_NAME, AXP_VERSIONING_SEEDED_HOST_ENTITIES, AXPCommonPermissionGroupKeys, AXP_VERSIONING_LIST_HOST_ENTITIES_QUERY, 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';
|
|
10
10
|
import { ensureListActions, actionExists, AXP_ENTITY_ACTION_PLUGIN, resolveEntityPluginDetailPageOrder, cloneLayoutArrays, ensureLayoutSection, ensureLayoutPropertyView, AXPEntityDefinitionRegistryService, AXP_APPEARANCE_SECTION_ORDER, AXP_CLASSIFICATION_SECTION_ORDER, AXMEntityCrudServiceImpl, AXP_ENTITY_DEFINITION_LOADER, AXPMiddlewareAbortError, AXP_ENTITY_STORAGE_MIDDLEWARE, AXPEntityService, AXPMultiSourceType, AXP_MULTI_SOURCE_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/layout/entity';
|
|
11
11
|
import { AXPEntityCommandScope, createQueryView, createAllQueryView, entityMasterCrudActions, entityMasterDeleteAction, AXPEntityQueryType } from '@acorex-platform/framework-shared/entity';
|
|
12
|
-
import { AXPWidgetsList,
|
|
12
|
+
import { AXPWidgetsList, runtimeQueryCollectionData, runtimeQueryPayloadData, resolveMultiLanguageString, AXPSystemActionType, AXPWidgetsCatalog, getSmart, AXPStatusProvider, AXPSystemStatuses, AXPSystemStatusType, formatAddressData, AXPKeyboardShortcutPriority, AXPPlatformScope } from '@acorex-platform/framework-shared/core';
|
|
13
|
+
import * as i4 from '@acorex/core/translation';
|
|
14
|
+
import { AXTranslationService, AXTranslationModule, createMultiLanguageString } from '@acorex/core/translation';
|
|
13
15
|
import { AXP_PAGE_COMPONENT_PROVIDER, AXPActivityLogComponent, AXPCompareViewComponent, AXPThemeLayoutBlockComponent, AXPResourceAppointmentComponent } from '@acorex-platform/framework-client/layout/components';
|
|
14
16
|
import { AXP_WIDGET_DEFINITION_PROVIDER, AXPWidgetRegistryService } from '@acorex-platform/framework-client/layout/widget-core';
|
|
15
17
|
import { pickInputOrOptionsField, ENTITY_GET_BY_ID_DEFAULT, ENTITY_QUERY_DEFAULT, resolveEntityActionCommandInput, entityActionDataRows, resolveEntityActionRef, ENTITY_INSERT_DEFAULT, ENTITY_UPDATE_DEFAULT, ENTITY_DELETE_DEFAULT, ENTITY_REMOVE_UI, AUTH_SIGN_IN_DEFAULT, AUTH_REGISTER_DEFAULT, AUTH_UPDATE_SESSION_DEFAULT, AUTH_REFRESH_DEFAULT, AUTH_LOGOUT_DEFAULT } from '@acorex-platform/framework-shared/runtime';
|
|
16
18
|
import { AXPopupService } from '@acorex/components/popup';
|
|
17
|
-
import * as i4 from '@acorex/core/translation';
|
|
18
|
-
import { AXTranslationService, AXTranslationModule, createMultiLanguageString } from '@acorex/core/translation';
|
|
19
19
|
import { AXPWidgetGroupEnum } from '@acorex-platform/framework-shared/widget-core';
|
|
20
20
|
import { ActivatedRoute } from '@angular/router';
|
|
21
21
|
import * as i1 from '@acorex/components/decorators';
|
|
@@ -246,19 +246,19 @@ class AXPArchivePluginModule {
|
|
|
246
246
|
provideCommandSetups([
|
|
247
247
|
{
|
|
248
248
|
key: AXPCommonCommandKeys.Archive.Archive,
|
|
249
|
-
command: () => import('./acorex-platform-module-common-client-archive-entity.command-
|
|
249
|
+
command: () => import('./acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs').then((m) => m.AXPArchiveEntityCommand),
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
key: AXPCommonCommandKeys.Archive.Restore,
|
|
253
|
-
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-
|
|
253
|
+
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
key: AXPCommonCommandKeys.Archive.BulkArchive,
|
|
257
|
-
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-
|
|
257
|
+
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
key: AXPCommonCommandKeys.Archive.BulkRestore,
|
|
261
|
-
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-CqZxZrkm.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
|
|
262
262
|
},
|
|
263
263
|
]),
|
|
264
264
|
] }); }
|
|
@@ -271,19 +271,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
271
271
|
provideCommandSetups([
|
|
272
272
|
{
|
|
273
273
|
key: AXPCommonCommandKeys.Archive.Archive,
|
|
274
|
-
command: () => import('./acorex-platform-module-common-client-archive-entity.command-
|
|
274
|
+
command: () => import('./acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs').then((m) => m.AXPArchiveEntityCommand),
|
|
275
275
|
},
|
|
276
276
|
{
|
|
277
277
|
key: AXPCommonCommandKeys.Archive.Restore,
|
|
278
|
-
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-
|
|
278
|
+
command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
key: AXPCommonCommandKeys.Archive.BulkArchive,
|
|
282
|
-
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-
|
|
282
|
+
command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
key: AXPCommonCommandKeys.Archive.BulkRestore,
|
|
286
|
-
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-CqZxZrkm.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
|
|
287
287
|
},
|
|
288
288
|
]),
|
|
289
289
|
],
|
|
@@ -302,13 +302,22 @@ function notEnabledHiddenExpression(options) {
|
|
|
302
302
|
}
|
|
303
303
|
return `{{ !context.eval("${enabledField}") }}`;
|
|
304
304
|
}
|
|
305
|
+
function maintainVersioningHiddenExpression(hostRefType, options) {
|
|
306
|
+
const notEnabled = notEnabledHiddenExpression(options)
|
|
307
|
+
.replace(/^\{\{\s*/, '')
|
|
308
|
+
.replace(/\s*\}\}$/, '');
|
|
309
|
+
const key = maintainVersioningPermissionKey(hostRefType);
|
|
310
|
+
const checks = key
|
|
311
|
+
? `(!permission.check("${key}") && !permission.check("${AXP_VERSIONING_MAINTAIN_PERMISSION_LEGACY}"))`
|
|
312
|
+
: `!permission.check("${AXP_VERSIONING_MAINTAIN_PERMISSION_LEGACY}")`;
|
|
313
|
+
return `{{ ${notEnabled} || ${checks} }}`;
|
|
314
|
+
}
|
|
305
315
|
//#region ----- Entity versioning plugin -----
|
|
306
316
|
const versioningPlugin = {
|
|
307
317
|
name: AXP_VERSIONING_PLUGIN_NAME,
|
|
308
318
|
order: 64,
|
|
309
319
|
apply: (ctx, options) => {
|
|
310
320
|
ensureListActions(ctx);
|
|
311
|
-
const hiddenWhenNotEnabled = notEnabledHiddenExpression(options);
|
|
312
321
|
const groupId = 'basic-info';
|
|
313
322
|
const groups = ctx.groups.list() ?? [];
|
|
314
323
|
if (!groups.some((g) => g.id === groupId)) {
|
|
@@ -374,8 +383,26 @@ const versioningPlugin = {
|
|
|
374
383
|
filterable: true,
|
|
375
384
|
});
|
|
376
385
|
}
|
|
386
|
+
ctx.interfaces.master.update((master) => {
|
|
387
|
+
const next = master ?? {};
|
|
388
|
+
const styling = { ...(next.styling ?? {}) };
|
|
389
|
+
const fields = { ...(styling.fields ?? {}) };
|
|
390
|
+
if (!fields[AXPVersioningField.Version]) {
|
|
391
|
+
fields[AXPVersioningField.Version] = {
|
|
392
|
+
rules: [
|
|
393
|
+
{
|
|
394
|
+
when: `{{ context.eval("${AXPVersioningField.VersioningStatus}") === "${AXPVersioningStatus.Draft}" }}`,
|
|
395
|
+
class: 'warning',
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
next.styling = { ...styling, fields };
|
|
401
|
+
return next;
|
|
402
|
+
});
|
|
377
403
|
const hostRefType = `${ctx.entity.module}.${ctx.entity.name}`;
|
|
378
404
|
const companionEntity = `${hostRefType}Version`;
|
|
405
|
+
const hiddenWhenNotMaintainer = maintainVersioningHiddenExpression(hostRefType, options);
|
|
379
406
|
ctx.entity.relatedEntities ??= [];
|
|
380
407
|
const related = ctx.entity.relatedEntities;
|
|
381
408
|
if (!related.some((r) => r.entity === companionEntity)) {
|
|
@@ -420,7 +447,7 @@ const versioningPlugin = {
|
|
|
420
447
|
priority: 'secondary',
|
|
421
448
|
type: 'update',
|
|
422
449
|
scope: AXPEntityCommandScope.Individual,
|
|
423
|
-
hidden:
|
|
450
|
+
hidden: hiddenWhenNotMaintainer,
|
|
424
451
|
});
|
|
425
452
|
}
|
|
426
453
|
if (!actionExists(actions, AXPCommonCommandKeys.Versioning.Publish)) {
|
|
@@ -436,7 +463,7 @@ const versioningPlugin = {
|
|
|
436
463
|
priority: 'secondary',
|
|
437
464
|
type: 'update',
|
|
438
465
|
scope: AXPEntityCommandScope.Individual,
|
|
439
|
-
hidden:
|
|
466
|
+
hidden: hiddenWhenNotMaintainer,
|
|
440
467
|
});
|
|
441
468
|
}
|
|
442
469
|
if (!actionExists(actions, AXPCommonCommandKeys.Versioning.DeleteDraft)) {
|
|
@@ -452,7 +479,24 @@ const versioningPlugin = {
|
|
|
452
479
|
priority: 'secondary',
|
|
453
480
|
type: 'delete',
|
|
454
481
|
scope: AXPEntityCommandScope.Individual,
|
|
455
|
-
hidden:
|
|
482
|
+
hidden: hiddenWhenNotMaintainer,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
if (!actionExists(actions, AXPCommonCommandKeys.Versioning.ShowHistory)) {
|
|
486
|
+
actions.push({
|
|
487
|
+
title: '@general:actions.versioning.show-history.title',
|
|
488
|
+
command: {
|
|
489
|
+
name: AXPCommonCommandKeys.Versioning.ShowHistory,
|
|
490
|
+
options: {
|
|
491
|
+
refId: '{{ context.eval("id") }}',
|
|
492
|
+
refType: hostRefType,
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
priority: 'secondary',
|
|
496
|
+
type: 'view',
|
|
497
|
+
scope: AXPEntityCommandScope.Individual,
|
|
498
|
+
separated: true,
|
|
499
|
+
hidden: notEnabledHiddenExpression(options),
|
|
456
500
|
});
|
|
457
501
|
}
|
|
458
502
|
};
|
|
@@ -464,23 +508,147 @@ const versioningPlugin = {
|
|
|
464
508
|
};
|
|
465
509
|
//#endregion
|
|
466
510
|
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region ----- Constants -----
|
|
513
|
+
const PERMISSION_I18N = '@common:content-documents.permissions.maintain-versioning';
|
|
514
|
+
const GROUP_I18N = '@common:permission-groups';
|
|
515
|
+
const FALLBACK_HOSTS = AXP_VERSIONING_SEEDED_HOST_ENTITIES.map((fullName) => {
|
|
516
|
+
const [moduleName, entityName] = fullName.split('.');
|
|
517
|
+
return { module: moduleName, name: entityName, fullName, title: entityName };
|
|
518
|
+
});
|
|
519
|
+
//#endregion
|
|
520
|
+
//#region ----- Permission Definition Provider -----
|
|
521
|
+
/**
|
|
522
|
+
* Registers a Maintain Versioning permission for every entity that uses the versioning plugin.
|
|
523
|
+
*/
|
|
524
|
+
class AXPVersioningPermissionDefinitionProvider {
|
|
525
|
+
constructor() {
|
|
526
|
+
this.queryService = inject(AXPQueryService);
|
|
527
|
+
this.translationService = inject(AXTranslationService);
|
|
528
|
+
}
|
|
529
|
+
async define(context) {
|
|
530
|
+
const hosts = await this.loadVersioningHosts();
|
|
531
|
+
const groups = AXPCommonPermissionGroupKeys;
|
|
532
|
+
for (const host of hosts) {
|
|
533
|
+
const key = maintainVersioningPermissionKey(host.fullName);
|
|
534
|
+
if (!key) {
|
|
535
|
+
continue;
|
|
536
|
+
}
|
|
537
|
+
const entityTitle = await this.resolveEntityTitle(host);
|
|
538
|
+
const title = await this.translationService.translateAsync(`${PERMISSION_I18N}.title-for-entity`, {
|
|
539
|
+
params: { entity: entityTitle },
|
|
540
|
+
});
|
|
541
|
+
const description = `${PERMISSION_I18N}.description`;
|
|
542
|
+
const placement = permissionGroupForModule(host.module, groups);
|
|
543
|
+
if (placement.root) {
|
|
544
|
+
context.addGroup(placement.root.name, placement.root.title, placement.root.description, { order: placement.root.order });
|
|
545
|
+
}
|
|
546
|
+
context
|
|
547
|
+
.addGroup(placement.groupName, placement.title, placement.description, placement.options)
|
|
548
|
+
.addPermission(key, title || `${PERMISSION_I18N}.title`, description, {
|
|
549
|
+
modules: [host.module],
|
|
550
|
+
})
|
|
551
|
+
.endPermission()
|
|
552
|
+
.endGroup();
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
async loadVersioningHosts() {
|
|
556
|
+
try {
|
|
557
|
+
const result = await this.queryService.fetch(AXP_VERSIONING_LIST_HOST_ENTITIES_QUERY, {});
|
|
558
|
+
const items = runtimeQueryCollectionData(result)?.items ?? [];
|
|
559
|
+
if (items.length > 0) {
|
|
560
|
+
return items;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
catch {
|
|
564
|
+
// Role editor still needs Document / Fiscal Calendar when the catalog query is unavailable.
|
|
565
|
+
}
|
|
566
|
+
return FALLBACK_HOSTS;
|
|
567
|
+
}
|
|
568
|
+
async resolveEntityTitle(host) {
|
|
569
|
+
const raw = host.title?.trim();
|
|
570
|
+
if (raw?.startsWith('@')) {
|
|
571
|
+
const translated = await this.translationService.translateAsync(raw);
|
|
572
|
+
if (translated?.trim()) {
|
|
573
|
+
return translated.trim();
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
if (raw) {
|
|
577
|
+
return raw;
|
|
578
|
+
}
|
|
579
|
+
return host.name;
|
|
580
|
+
}
|
|
581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
582
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPermissionDefinitionProvider }); }
|
|
583
|
+
}
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPermissionDefinitionProvider, decorators: [{
|
|
585
|
+
type: Injectable
|
|
586
|
+
}] });
|
|
587
|
+
//#endregion
|
|
588
|
+
//#region ----- Group placement -----
|
|
589
|
+
function permissionGroupForModule(moduleName, groups) {
|
|
590
|
+
if (moduleName === 'DocumentManagement') {
|
|
591
|
+
return {
|
|
592
|
+
root: {
|
|
593
|
+
name: groups.ContentDocuments.Root,
|
|
594
|
+
title: `${GROUP_I18N}.content-documents.title`,
|
|
595
|
+
description: `${GROUP_I18N}.content-documents.description`,
|
|
596
|
+
order: 90,
|
|
597
|
+
},
|
|
598
|
+
groupName: groups.ContentDocuments.Documents,
|
|
599
|
+
title: `${GROUP_I18N}.content-documents-documents.title`,
|
|
600
|
+
description: `${GROUP_I18N}.content-documents-documents.description`,
|
|
601
|
+
options: { parent: groups.ContentDocuments.Root, order: 10 },
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
if (moduleName === 'FinancialCore') {
|
|
605
|
+
return {
|
|
606
|
+
groupName: groups.Finance.Root,
|
|
607
|
+
title: `${GROUP_I18N}.finance.title`,
|
|
608
|
+
description: `${GROUP_I18N}.finance.description`,
|
|
609
|
+
options: { order: 40 },
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
return {
|
|
613
|
+
root: {
|
|
614
|
+
name: groups.Administration.Root,
|
|
615
|
+
title: `${GROUP_I18N}.administration.title`,
|
|
616
|
+
description: `${GROUP_I18N}.administration.description`,
|
|
617
|
+
order: 120,
|
|
618
|
+
},
|
|
619
|
+
groupName: groups.Administration.Root,
|
|
620
|
+
title: `${GROUP_I18N}.administration.title`,
|
|
621
|
+
description: `${GROUP_I18N}.administration.description`,
|
|
622
|
+
options: { order: 120 },
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
|
|
467
626
|
class AXPVersioningPluginModule {
|
|
468
627
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
469
628
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule }); }
|
|
470
629
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, providers: [
|
|
471
630
|
{ provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: versioningPlugin },
|
|
631
|
+
{
|
|
632
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
633
|
+
multi: true,
|
|
634
|
+
useClass: AXPVersioningPermissionDefinitionProvider,
|
|
635
|
+
},
|
|
472
636
|
provideCommandSetups([
|
|
473
637
|
{
|
|
474
638
|
key: AXPCommonCommandKeys.Versioning.CreateDraft,
|
|
475
|
-
command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-
|
|
639
|
+
command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs').then((m) => m.AXPCreateEntityVersionDraftCommand),
|
|
476
640
|
},
|
|
477
641
|
{
|
|
478
642
|
key: AXPCommonCommandKeys.Versioning.Publish,
|
|
479
|
-
command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-
|
|
643
|
+
command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs').then((m) => m.AXPPublishEntityVersionCommand),
|
|
480
644
|
},
|
|
481
645
|
{
|
|
482
646
|
key: AXPCommonCommandKeys.Versioning.DeleteDraft,
|
|
483
|
-
command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-
|
|
647
|
+
command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs').then((m) => m.AXPDeleteEntityVersionDraftCommand),
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
key: AXPCommonCommandKeys.Versioning.ShowHistory,
|
|
651
|
+
command: () => import('./acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs').then((m) => m.AXPShowEntityVersionHistoryCommand),
|
|
484
652
|
},
|
|
485
653
|
]),
|
|
486
654
|
] }); }
|
|
@@ -490,18 +658,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
490
658
|
args: [{
|
|
491
659
|
providers: [
|
|
492
660
|
{ provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: versioningPlugin },
|
|
661
|
+
{
|
|
662
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
663
|
+
multi: true,
|
|
664
|
+
useClass: AXPVersioningPermissionDefinitionProvider,
|
|
665
|
+
},
|
|
493
666
|
provideCommandSetups([
|
|
494
667
|
{
|
|
495
668
|
key: AXPCommonCommandKeys.Versioning.CreateDraft,
|
|
496
|
-
command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-
|
|
669
|
+
command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs').then((m) => m.AXPCreateEntityVersionDraftCommand),
|
|
497
670
|
},
|
|
498
671
|
{
|
|
499
672
|
key: AXPCommonCommandKeys.Versioning.Publish,
|
|
500
|
-
command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-
|
|
673
|
+
command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs').then((m) => m.AXPPublishEntityVersionCommand),
|
|
501
674
|
},
|
|
502
675
|
{
|
|
503
676
|
key: AXPCommonCommandKeys.Versioning.DeleteDraft,
|
|
504
|
-
command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-
|
|
677
|
+
command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs').then((m) => m.AXPDeleteEntityVersionDraftCommand),
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
key: AXPCommonCommandKeys.Versioning.ShowHistory,
|
|
681
|
+
command: () => import('./acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs').then((m) => m.AXPShowEntityVersionHistoryCommand),
|
|
505
682
|
},
|
|
506
683
|
]),
|
|
507
684
|
],
|
|
@@ -715,7 +892,7 @@ class ShowVersionHistoryPopupCommand {
|
|
|
715
892
|
},
|
|
716
893
|
};
|
|
717
894
|
}
|
|
718
|
-
const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-
|
|
895
|
+
const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs')).AXMTimelineVersionHistoryPopupComponent;
|
|
719
896
|
this.popupService.open(comp, {
|
|
720
897
|
title: await this.translate.translateAsync('@activity-log:actions.view-history.title'),
|
|
721
898
|
data: {
|
|
@@ -781,13 +958,13 @@ const AXPHistoryAuditInfoWidget = {
|
|
|
781
958
|
properties: [],
|
|
782
959
|
components: {
|
|
783
960
|
view: {
|
|
784
|
-
component: () => import('./acorex-platform-module-common-client-audit-info-view.component-
|
|
961
|
+
component: () => import('./acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs').then((c) => c.AXPAuditInfoViewComponent),
|
|
785
962
|
},
|
|
786
963
|
edit: {
|
|
787
|
-
component: () => import('./acorex-platform-module-common-client-audit-info-edit.component-
|
|
964
|
+
component: () => import('./acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs').then((c) => c.AXPAuditInfoEditComponent),
|
|
788
965
|
},
|
|
789
966
|
column: {
|
|
790
|
-
component: () => import('./acorex-platform-module-common-client-audit-info-column.component-
|
|
967
|
+
component: () => import('./acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs').then((c) => c.AXPAuditInfoColumnComponent),
|
|
791
968
|
},
|
|
792
969
|
},
|
|
793
970
|
};
|
|
@@ -1120,6 +1297,28 @@ function mapOpToAction(op) {
|
|
|
1120
1297
|
return AXPSystemActionType.Update;
|
|
1121
1298
|
}
|
|
1122
1299
|
}
|
|
1300
|
+
/** True for locales that render history timelines right-to-left. */
|
|
1301
|
+
function isRtlHistoryLocale(locale) {
|
|
1302
|
+
const normalized = locale.trim().toLowerCase();
|
|
1303
|
+
return (normalized === 'fa-ir' ||
|
|
1304
|
+
normalized.startsWith('fa-') ||
|
|
1305
|
+
normalized.startsWith('ar') ||
|
|
1306
|
+
normalized === 'he-il' ||
|
|
1307
|
+
normalized.startsWith('he-'));
|
|
1308
|
+
}
|
|
1309
|
+
/** Old/new value summary for version history rows (arrow follows reading direction). */
|
|
1310
|
+
function formatVersionHistoryReplaceSummary(oldStr, newStr, locale) {
|
|
1311
|
+
if (oldStr !== '—' && newStr !== '—') {
|
|
1312
|
+
return isRtlHistoryLocale(locale) ? `${newStr} ← ${oldStr}` : `${oldStr} → ${newStr}`;
|
|
1313
|
+
}
|
|
1314
|
+
if (newStr !== '—') {
|
|
1315
|
+
return isRtlHistoryLocale(locale) ? `به ${newStr} بهروزرسانی شد` : `Updated to ${newStr}`;
|
|
1316
|
+
}
|
|
1317
|
+
if (oldStr !== '—') {
|
|
1318
|
+
return isRtlHistoryLocale(locale) ? `پاک شد (قبلاً ${oldStr})` : `Cleared (was ${oldStr})`;
|
|
1319
|
+
}
|
|
1320
|
+
return isRtlHistoryLocale(locale) ? 'بهروزرسانی شد' : 'Updated';
|
|
1321
|
+
}
|
|
1123
1322
|
/** Kebab-case to camelCase for fieldTitles lookup (e.g. is-disabled -> isDisabled). */
|
|
1124
1323
|
function toCamelCase$2(str) {
|
|
1125
1324
|
return str.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
@@ -1301,13 +1500,7 @@ function buildChangeSummary(op, oldVal, newVal, meta, locale = 'en-US', path) {
|
|
|
1301
1500
|
case 'remove':
|
|
1302
1501
|
return oldStr !== '—' ? `Removed ${oldStr}` : 'Removed';
|
|
1303
1502
|
case 'replace':
|
|
1304
|
-
|
|
1305
|
-
return `${oldStr} → ${newStr}`;
|
|
1306
|
-
if (newStr !== '—')
|
|
1307
|
-
return `Updated to ${newStr}`;
|
|
1308
|
-
if (oldStr !== '—')
|
|
1309
|
-
return `Cleared (was ${oldStr})`;
|
|
1310
|
-
return 'Updated';
|
|
1503
|
+
return formatVersionHistoryReplaceSummary(oldStr, newStr, locale);
|
|
1311
1504
|
default:
|
|
1312
1505
|
return newStr !== '—' ? `Updated ${newStr}` : 'Updated';
|
|
1313
1506
|
}
|
|
@@ -2702,7 +2895,7 @@ class AXPClonePluginModule {
|
|
|
2702
2895
|
provideCommandSetups([
|
|
2703
2896
|
{
|
|
2704
2897
|
key: AXPCommonCommandKeys.Clone.Clone,
|
|
2705
|
-
command: () => import('./acorex-platform-module-common-client-clone-entity.command-
|
|
2898
|
+
command: () => import('./acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs').then((m) => m.AXPCloneEntityCommand),
|
|
2706
2899
|
},
|
|
2707
2900
|
]),
|
|
2708
2901
|
] }); }
|
|
@@ -2715,7 +2908,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2715
2908
|
provideCommandSetups([
|
|
2716
2909
|
{
|
|
2717
2910
|
key: AXPCommonCommandKeys.Clone.Clone,
|
|
2718
|
-
command: () => import('./acorex-platform-module-common-client-clone-entity.command-
|
|
2911
|
+
command: () => import('./acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs').then((m) => m.AXPCloneEntityCommand),
|
|
2719
2912
|
},
|
|
2720
2913
|
]),
|
|
2721
2914
|
],
|
|
@@ -6778,7 +6971,7 @@ class AXPGlobalSearchModule {
|
|
|
6778
6971
|
{
|
|
6779
6972
|
provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
|
|
6780
6973
|
useValue: {
|
|
6781
|
-
window: () => import('./acorex-platform-module-common-client-search-popup.component-
|
|
6974
|
+
window: () => import('./acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
|
|
6782
6975
|
},
|
|
6783
6976
|
},
|
|
6784
6977
|
AXPGlobalSearchCommand,
|
|
@@ -6820,7 +7013,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
6820
7013
|
{
|
|
6821
7014
|
provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
|
|
6822
7015
|
useValue: {
|
|
6823
|
-
window: () => import('./acorex-platform-module-common-client-search-popup.component-
|
|
7016
|
+
window: () => import('./acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
|
|
6824
7017
|
},
|
|
6825
7018
|
},
|
|
6826
7019
|
AXPGlobalSearchCommand,
|
|
@@ -7043,5 +7236,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
7043
7236
|
* Generated bundle index. Do not edit.
|
|
7044
7237
|
*/
|
|
7045
7238
|
|
|
7046
|
-
export {
|
|
7047
|
-
//# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-
|
|
7239
|
+
export { mapOpToAction 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, formatVersionHistoryReplaceSummary as L, getActiveStatuses as M, getFinalStatuses as N, getInitialStatuses as O, getStatusByName as P, getTransitionsFromStatus as Q, getTransitionsToStatus as R, ShowVersionHistoryPopupCommand as S, TaskStatusProvider as T, UniqueValidationRule as U, VARIABLE_NAME_VALIDATION_PATTERN as V, historyPlugin as W, humanizeChange as X, isRtlHistoryLocale as Y, isValidTransition as Z, mapChangeType as _, AXPGlobalSearchViewModel as a, resolvePathKey as a0, statusPlugin as a1, uniqueFieldsPlugin as a2, versioningPlugin as a3, 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 };
|
|
7240
|
+
//# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs.map
|