@acorex/platform 20.8.23 → 20.8.24

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/common/index.d.ts CHANGED
@@ -2603,8 +2603,9 @@ declare class AXPTokenEvaluatorScopeProvider implements AXPExpressionEvaluatorSc
2603
2603
  }
2604
2604
 
2605
2605
  declare class AXPClipBoardService {
2606
- private toast;
2607
- copy(title: string, value: string): void;
2606
+ private readonly toast;
2607
+ private readonly translationService;
2608
+ copy(title: string, value: string): Promise<void>;
2608
2609
  static ɵfac: i0.ɵɵFactoryDeclaration<AXPClipBoardService, never>;
2609
2610
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPClipBoardService>;
2610
2611
  }
@@ -4215,16 +4215,23 @@ function systemStatusToDefinition(statusType, overrides) {
4215
4215
 
4216
4216
  class AXPClipBoardService {
4217
4217
  constructor() {
4218
+ //#region ---- Services & Dependencies ----
4218
4219
  this.toast = inject(AXToastService);
4220
+ this.translationService = inject(AXTranslationService);
4219
4221
  }
4220
- copy(title, value) {
4222
+ //#endregion
4223
+ //#region ---- Public Methods ----
4224
+ async copy(title, value) {
4221
4225
  const copyText = document.createElement('input');
4222
4226
  copyText.type = 'text';
4223
4227
  copyText.select();
4224
4228
  copyText.setSelectionRange(0, 99999); // For mobile devices
4225
4229
  copyText.remove();
4226
- navigator.clipboard.writeText(value);
4227
- this.toast.success(`${title} copied!`);
4230
+ await navigator.clipboard.writeText(value);
4231
+ const message = await this.translationService.translateAsync('@general:messages.clipboard.copied', {
4232
+ params: { title },
4233
+ });
4234
+ this.toast.success(message);
4228
4235
  }
4229
4236
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPClipBoardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4230
4237
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPClipBoardService, providedIn: 'root' }); }