@acorex-platform/module-common-client 0.0.56 → 0.0.58

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.
Files changed (27) hide show
  1. package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-D2iWgdxu.mjs} +69 -44
  2. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-D2iWgdxu.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs → acorex-platform-module-common-client-archive-entity.command-Bi-36t8z.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs.map → acorex-platform-module-common-client-archive-entity.command-Bi-36t8z.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs → acorex-platform-module-common-client-archive-entity.command.util-PWLnCnEK.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-PWLnCnEK.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-D7trLk58.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-D7trLk58.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-BnSzZsI2.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-BnSzZsI2.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs → acorex-platform-module-common-client-clone-entity.command-DeCYclgZ.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs.map → acorex-platform-module-common-client-clone-entity.command-DeCYclgZ.mjs.map} +1 -1
  13. package/fesm2022/acorex-platform-module-common-client-contracts.mjs +1 -0
  14. package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
  15. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs → acorex-platform-module-common-client-restore-archive-entity.command-C_vgLiV2.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-C_vgLiV2.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs → acorex-platform-module-common-client-search-popup.component-C-Ug9qoD.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs.map → acorex-platform-module-common-client-search-popup.component-C-Ug9qoD.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-DIipjaFX.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-DIipjaFX.mjs.map} +1 -1
  21. package/fesm2022/acorex-platform-module-common-client.mjs +1 -1
  22. package/i18n/en-AU/common.json +4 -0
  23. package/i18n/en-US/common.json +4 -0
  24. package/i18n/fa-IR/common.json +4 -0
  25. package/package.json +1 -1
  26. package/types/acorex-platform-module-common-client.d.ts +2 -1
  27. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs.map +0 -1
@@ -1,7 +1,7 @@
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, AXP_FEATURE_DEFINITION_PROVIDER, AXP_CATALOG_SCOPE_DEFINITION_PROVIDER, AXPKeyboardShortcutRegistry, chordToKbdItemKeys, AXPComponentSlotModule } from '@acorex-platform/framework-client/core';
4
+ import { AXPDialogOpener, 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
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';
@@ -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-BOV-yh5h.mjs').then((m) => m.AXPArchiveEntityCommand),
249
+ command: () => import('./acorex-platform-module-common-client-archive-entity.command-Bi-36t8z.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-Bami3ybY.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
253
+ command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-C_vgLiV2.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-B-S45xY1.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
257
+ command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-D7trLk58.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-CqZxZrkm.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
261
+ command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-BnSzZsI2.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-BOV-yh5h.mjs').then((m) => m.AXPArchiveEntityCommand),
274
+ command: () => import('./acorex-platform-module-common-client-archive-entity.command-Bi-36t8z.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-Bami3ybY.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
278
+ command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-C_vgLiV2.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-B-S45xY1.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
282
+ command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-D7trLk58.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-CqZxZrkm.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
286
+ command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-BnSzZsI2.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
287
287
  },
288
288
  ]),
289
289
  ],
@@ -880,6 +880,7 @@ const historyPlugin = {
880
880
  class ShowVersionHistoryPopupCommand {
881
881
  constructor() {
882
882
  this.popupService = inject(AXPopupService);
883
+ this.dialogOpener = inject(AXPDialogOpener);
883
884
  this.translate = inject(AXTranslationService);
884
885
  }
885
886
  async execute(input) {
@@ -892,18 +893,25 @@ class ShowVersionHistoryPopupCommand {
892
893
  },
893
894
  };
894
895
  }
895
- const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs')).AXMTimelineVersionHistoryPopupComponent;
896
- this.popupService.open(comp, {
897
- title: await this.translate.translateAsync('@activity-log:actions.view-history.title'),
898
- data: {
899
- refId: opts.refId,
900
- refType: opts.refType,
901
- fieldTitles: opts.fieldTitles ?? {},
902
- fromDate: opts.fromDate,
903
- toDate: opts.toDate,
904
- limit: opts.limit,
905
- offset: opts.offset,
896
+ let title = '';
897
+ await this.dialogOpener.openPopup({
898
+ load: () => import('./acorex-platform-module-common-client-timeline-version-history-popup.component-DIipjaFX.mjs').then((module) => module.AXMTimelineVersionHistoryPopupComponent),
899
+ data: { refId: opts.refId, refType: opts.refType },
900
+ prepare: async () => {
901
+ title = await this.translate.translateAsync('@activity-log:actions.view-history.title');
906
902
  },
903
+ show: (component) => this.popupService.open(component, {
904
+ title,
905
+ data: {
906
+ refId: opts.refId,
907
+ refType: opts.refType,
908
+ fieldTitles: opts.fieldTitles ?? {},
909
+ fromDate: opts.fromDate,
910
+ toDate: opts.toDate,
911
+ limit: opts.limit,
912
+ offset: opts.offset,
913
+ },
914
+ }),
907
915
  });
908
916
  return { success: true, kind: 'object', data: undefined };
909
917
  }
@@ -1249,14 +1257,21 @@ async function buildCompareVersionObjects(services, refType, refId, ids) {
1249
1257
  }
1250
1258
  async function openComparePopup(services, inputs, mode) {
1251
1259
  const { signal } = await import('@angular/core');
1252
- const comp = (await Promise.resolve().then(function () { return comparePopup_component; })).AXPComparePopupComponent;
1253
- services.popupService.open(comp, {
1254
- title: await services.translate.translateAsync('Compare'),
1255
- size: 'lg',
1256
- data: {
1257
- inputs: signal(inputs),
1258
- mode: signal(mode),
1260
+ let title = '';
1261
+ await services.dialogOpener.openPopup({
1262
+ load: () => Promise.resolve().then(function () { return comparePopup_component; }).then((module) => module.AXPComparePopupComponent),
1263
+ data: { mode, ids: inputs.objects.map((object) => object.id) },
1264
+ prepare: async () => {
1265
+ title = await services.translate.translateAsync('Compare');
1259
1266
  },
1267
+ show: (component) => services.popupService.open(component, {
1268
+ title,
1269
+ size: 'lg',
1270
+ data: {
1271
+ inputs: signal(inputs),
1272
+ mode: signal(mode),
1273
+ },
1274
+ }),
1260
1275
  });
1261
1276
  }
1262
1277
 
@@ -1265,9 +1280,10 @@ async function openActivityLogVersionCompare(injector, event) {
1265
1280
  const entityRegistry = injector.get(AXPEntityDefinitionRegistryService);
1266
1281
  const translate = injector.get(AXTranslationService);
1267
1282
  const popupService = injector.get(AXPopupService);
1283
+ const dialogOpener = injector.get(AXPDialogOpener);
1268
1284
  const fields = await buildCompareFields({ entityRegistry }, refType);
1269
1285
  const objects = buildCompareObjectsFromActivities([event.previous, event.current]);
1270
- await openComparePopup({ popupService, translate }, { fields, objects }, 'changes');
1286
+ await openComparePopup({ popupService, dialogOpener, translate }, { fields, objects }, 'changes');
1271
1287
  }
1272
1288
 
1273
1289
  //#region ---- Version History Utils ----
@@ -2895,7 +2911,7 @@ class AXPClonePluginModule {
2895
2911
  provideCommandSetups([
2896
2912
  {
2897
2913
  key: AXPCommonCommandKeys.Clone.Clone,
2898
- command: () => import('./acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs').then((m) => m.AXPCloneEntityCommand),
2914
+ command: () => import('./acorex-platform-module-common-client-clone-entity.command-DeCYclgZ.mjs').then((m) => m.AXPCloneEntityCommand),
2899
2915
  },
2900
2916
  ]),
2901
2917
  ] }); }
@@ -2908,7 +2924,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2908
2924
  provideCommandSetups([
2909
2925
  {
2910
2926
  key: AXPCommonCommandKeys.Clone.Clone,
2911
- command: () => import('./acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs').then((m) => m.AXPCloneEntityCommand),
2927
+ command: () => import('./acorex-platform-module-common-client-clone-entity.command-DeCYclgZ.mjs').then((m) => m.AXPCloneEntityCommand),
2912
2928
  },
2913
2929
  ]),
2914
2930
  ],
@@ -3106,9 +3122,10 @@ class AXPCompareEntityRecordsCommand {
3106
3122
  const entityRegistry = this.injector.get(AXPEntityDefinitionRegistryService);
3107
3123
  const translate = this.injector.get(AXTranslationService);
3108
3124
  const popupService = this.injector.get(AXPopupService);
3125
+ const dialogOpener = this.injector.get(AXPDialogOpener);
3109
3126
  const fields = await buildCompareFields({ entityRegistry }, context.refType);
3110
3127
  const objects = await buildCompareRecordObjects({ entityRegistry }, context.refType, ids);
3111
- await openComparePopup({ popupService, translate }, { fields, objects }, 'compare');
3128
+ await openComparePopup({ popupService, dialogOpener, translate }, { fields, objects }, 'compare');
3112
3129
  return {
3113
3130
  success: true,
3114
3131
  kind: 'object',
@@ -3148,9 +3165,10 @@ class AXPCompareEntityRecordVersionsCommand {
3148
3165
  const translate = this.injector.get(AXTranslationService);
3149
3166
  const formatService = this.injector.get(AXFormatService);
3150
3167
  const popupService = this.injector.get(AXPopupService);
3168
+ const dialogOpener = this.injector.get(AXPDialogOpener);
3151
3169
  const fields = await buildCompareFields({ entityRegistry }, context.refType);
3152
3170
  const objects = await buildCompareVersionObjects({ versioning, translate, formatService }, context.refType, context.refId, context.ids);
3153
- await openComparePopup({ popupService, translate }, { fields, objects }, 'changes');
3171
+ await openComparePopup({ popupService, dialogOpener, translate }, { fields, objects }, 'changes');
3154
3172
  return {
3155
3173
  success: true,
3156
3174
  kind: 'object',
@@ -6771,6 +6789,7 @@ class AXPGlobalSearchCommand {
6771
6789
  constructor() {
6772
6790
  //#region ----- Services & Dependencies -----
6773
6791
  this.popupService = inject(AXPopupService);
6792
+ this.dialogOpener = inject(AXPDialogOpener);
6774
6793
  this.commandExecutor = inject(AXPCommandExecutor);
6775
6794
  this.config = inject(AXP_GLOBAL_SEARCH_CONFIG_TOKEN);
6776
6795
  //#endregion
@@ -6797,16 +6816,22 @@ class AXPGlobalSearchCommand {
6797
6816
  //#region ----- Popup -----
6798
6817
  async openSearch(input) {
6799
6818
  const text = pickInputOrOptionsField(input, 'text');
6800
- const component = await this.config.window();
6801
- const popup = await this.popupService.open(component, {
6802
- title: 'Search...',
6803
- size: 'fit',
6804
- closeOnBackdropClick: true,
6805
- data: {
6806
- text,
6807
- },
6808
- header: false,
6819
+ const popup = await this.dialogOpener.openPopup({
6820
+ load: () => this.config.window(),
6821
+ data: { text: text ?? '' },
6822
+ show: (component) => this.popupService.open(component, {
6823
+ title: 'Search...',
6824
+ size: 'fit',
6825
+ closeOnBackdropClick: true,
6826
+ data: {
6827
+ text,
6828
+ },
6829
+ header: false,
6830
+ }),
6809
6831
  });
6832
+ if (!popup) {
6833
+ return { success: true, kind: 'object', data: undefined };
6834
+ }
6810
6835
  if (popup.data) {
6811
6836
  const result = popup.data;
6812
6837
  if (result?.command) {
@@ -6971,7 +6996,7 @@ class AXPGlobalSearchModule {
6971
6996
  {
6972
6997
  provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
6973
6998
  useValue: {
6974
- window: () => import('./acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
6999
+ window: () => import('./acorex-platform-module-common-client-search-popup.component-C-Ug9qoD.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
6975
7000
  },
6976
7001
  },
6977
7002
  AXPGlobalSearchCommand,
@@ -7013,7 +7038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
7013
7038
  {
7014
7039
  provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
7015
7040
  useValue: {
7016
- window: () => import('./acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
7041
+ window: () => import('./acorex-platform-module-common-client-search-popup.component-C-Ug9qoD.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
7017
7042
  },
7018
7043
  },
7019
7044
  AXPGlobalSearchCommand,
@@ -7237,4 +7262,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
7237
7262
  */
7238
7263
 
7239
7264
  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
7265
+ //# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-D2iWgdxu.mjs.map