@angular/cdk/clipboard#Clipboard TypeScript Examples
The following examples show how to use
@angular/cdk/clipboard#Clipboard.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: side-settings.component.ts From ng-devui-admin with MIT License | 6 votes |
constructor(
private clipboard: Clipboard,
private layoutService: DaLayoutService,
private mediaQueryService: DaScreenMediaQueryService,
private translate: TranslateService
) {
this.mediaQueryService
.getPoint()
.pipe(takeUntil(this.destroy$))
.subscribe(({ currentPoint, change, compare }) => {
this.change = change;
this.compare = compare;
});
}
Example #2
Source File: lookup-capability.component.ts From scion-microfrontend-platform with Eclipse Public License 2.0 | 6 votes |
constructor(fb: FormBuilder, private _clipboard: Clipboard) {
this.form = fb.group({
[ID]: new FormControl(''),
[TYPE]: new FormControl(''),
[QUALIFIER]: fb.array([]),
[NILQUALIFIER_IF_EMPTY]: new FormControl(false),
[APP_SYMBOLIC_NAME]: new FormControl(''),
});
}
Example #3
Source File: header.component.ts From ngx-ui-tour with MIT License | 6 votes |
constructor(
@Attribute('id')
readonly id: string | null,
@Inject(Clipboard) private readonly clipboard: Clipboard,
@Inject(TuiNotificationsService)
private readonly notifications: TuiNotificationsService,
@Inject(LOCATION) private readonly location: Location,
@Inject(TUI_COPY_TEXTS) private readonly copyTexts$: Observable<[string, string]>,
@Inject(TUI_DOC_EXAMPLE_TEXTS) readonly texts: [string, string, string]
) {}
Example #4
Source File: example.component.ts From open-source with MIT License | 6 votes |
constructor(
public readonly injector: Injector,
private readonly cdr: ChangeDetectorRef,
private readonly snackbar: MatSnackBar,
private readonly clipboard: Clipboard,
private readonly route: ActivatedRoute,
private readonly content: ContentService,
private readonly i18n: I18nService,
) {}
Example #5
Source File: ui.service.ts From sba-angular with MIT License | 6 votes |
constructor(
@Inject(SCREEN_SIZE_RULES) public screenSizeRules: MapOf<string>,
public notificationsService: NotificationsService,
public clipboard: Clipboard
) {
this.screenSizes = ["xs", "sm", "md", "lg", "xl", "xxl"]; // in ascending size order
this.setScreenSize();
window.addEventListener("resize", this.resizeEventListener);
this.elementResizeDetector = elementResizeDetectorMaker({ strategy: "scroll" });
}
Example #6
Source File: app.component.ts From Angular-Cookbook with MIT License | 5 votes |
constructor(private clipboard: Clipboard) {
this.resetCopiedHash();
}
Example #7
Source File: app.component.ts From Angular-Cookbook with MIT License | 5 votes |
constructor(private clipboard: Clipboard) {}
Example #8
Source File: capability-accordion-item.component.ts From scion-microfrontend-platform with Eclipse Public License 2.0 | 5 votes |
constructor(private _router: Router, private _clipboard: Clipboard) {
}
Example #9
Source File: report.component.ts From blockcore-hub with MIT License | 5 votes |
constructor(
public snackBar: MatSnackBar,
private clipboard: Clipboard,
private appState: ApplicationStateService,
public dialogRef: MatDialogRef<ReportComponent>,
@Inject(MAT_DIALOG_DATA) public data: ReportDialogData) {
}
Example #10
Source File: report.component.ts From EXOS-Core with MIT License | 5 votes |
constructor(
public snackBar: MatSnackBar,
private clipboard: Clipboard,
private appState: ApplicationStateService,
public dialogRef: MatDialogRef<ReportComponent>,
@Inject(MAT_DIALOG_DATA) public data: ReportDialogData) {
}
Example #11
Source File: index.component.ts From models-web-app with Apache License 2.0 | 5 votes |
constructor(
private backend: MWABackendService,
private confirmDialog: ConfirmDialogService,
private snack: SnackBarService,
private router: Router,
private clipboard: Clipboard,
public ns: NamespaceService,
) {}
Example #12
Source File: dashboard.service.ts From sba-angular with MIT License | 5 votes |
constructor(
public modalService: ModalService,
public userSettingsService: UserSettingsWebService,
public loginService: LoginService,
public prefs: UserPreferences,
public searchService: SearchService,
public notificationService: NotificationsService,
public router: Router,
public location: Location,
public urlSerializer: UrlSerializer,
public clipboard: Clipboard,
public intlService: IntlService
) {
// Default options of the Gridster dashboard
this.options = {
swap: true,
draggable: {
enabled: true,
ignoreContent: true, // By default, dragging is impossible
dragHandleClass: 'card-header', // except in the facet header
ignoreContentClass: 'btn-group', // *except* in the button group
},
resizable: {enabled: true},
itemChangeCallback: (item, itemComponent) => {
this.notifyItemChange(item as DashboardItem);
},
itemResizeCallback: (item, itemComponent) => {
if (!document.fullscreenElement) { // Exclude the change detection on switch from/to full-screen mode
/** Items must know their height/width to (re)size their content*/
if (!itemComponent.el.classList.contains('widget-maximized-view')) {
item.height = itemComponent.height;
item.width = itemComponent.width;
} else {
item.height = itemComponent.gridster.curHeight;
item.width = itemComponent.gridster.curWidth;
}
this.notifyItemChange(item as DashboardItem);
}
},
scrollToNewItems: true, // Scroll to new items when inserted
gridType: 'verticalFixed', // The grid has a fixed size vertically, and fits the screen horizontally
fixedRowHeight: (window.innerHeight - 150) / 4, // 150px to account for header and margins
minRows: 4,
minCols: 4
};
// Manage URL changes (which may include dashboard name or config to be imported)
this.router.events.subscribe(event => {
if(event instanceof NavigationEnd) {
this.handleNavigation();
}
})
// Dashboards are stored in User Settings
this.userSettingsService.events.subscribe(event => {
// E.g. new login occurs
// ==> Menus need to be rebuilt
if(this.openAction) {
this.updateOpenAction();
this.updateAutoSaveAction();
this.setLayout(this.layout);
}
});
// Manage Autosave
this.dashboardChanged.subscribe(dashboard => {
if(this.autoSave && this.isDashboardSaved()) {
this.debounceSave();
}
});
}
Example #13
Source File: sidenav.component.ts From angular-communities with MIT License | 5 votes |
constructor(private clipboard: Clipboard, private snackBar: MatSnackBar) {}