API @deepkit/desktop-ui
npm install @deepkit/desktop-ui
See Desktop UI documentation for more information.
The AdaptiveContainerComponent is a flexible container that arranges its child elements
in a row or column, depending on the specified direction. It uses flexbox to manage the layout
and automatically hides elements that overflow the container's bounds. The container uses flex-wrap: nowrap to detect overflow and hides elements (display: none) that do not fit. Overflowing elements can be moved to a hidden container automatically, which per default is put into a dropdown
that can be opened to show the hidden elements. Directive to mark an element as a hidden container for the adaptive container.
If defined, adaptive-container uses this element to place hidden elements into it. A directive that catches pointer events and emits drag events. This won't move the element, it just emits events when the user does a drag gesture. Almost the same as |async pipe, but renders directly (detectChanges() instead of marking it only(markForCheck())
on ChangeDetectorRef. EfficientState is a base class for all states that are used in the frontend. Adds a hotkey to a button. Used to group buttons together. Directive to open the native file chooser dialog.
Can be used wth FormsModule (ngModel). Directive to open the native file picker dialog and return the selected files as Uint8Array.
Can be used wth FormsModule (ngModel). Directive to allow dropping files into an area.
Can be used wth FormsModule (ngModel). A dropdown component that can be used to display a list of items or content in a popup. It can be opened and closed programmatically or via user interaction. By monitoring the focused elements, it is possible to add interactive elements inside the dropdown. A directive to open the given dropdown on regular left click. A directive to open the given dropdown on mouseenter, and closes automatically on mouseleave.
Dropdown keeps open when mouse enters the dropdown. A directive to open the given dropdown upon right click / context menu. A component that acts as a visual separator or splitter inside a dropdown. This directive is necessary if you want to load and render the dialog content
only when opening the dialog. Without it, it is immediately rendered, which can cause
performance and injection issues. Interactive item inside a dropdown. Checkbox component to toggle boolean values. Directive to show a confirmation dialog when the user clicks on the element. A dialog component that can be used to display content in a modal dialog. Directive to lazy load a dialog container. A directive to close the dialog on regular left click.
Can be used inside a dialog to close it. A directive to open the given dialog on regular left click. Non-interactive title item for a list. Interactive item for a list.
Supports router links, selection and more. Radio group component to group multiple radio buttons together. Radio button component to toggle between multiple options. Necessary directive to get a dynamic rendered option. Directive to create an option in the select dropdown. Directive to create a separator in the select dropdown. A splitter component that can be used for layout resizing. With an indicator that shows a handle. This is typically used to resize layouts such as sidebars, panels, or other UI elements. Best used in combination with flex-basis CSS property to allow flexible resizing. Directive to allow dynamic content in a cell. Can be used to define own dropdown items once the user opens the header context menu. Can be used to define own dropdown items once the user opens the row context menu. Directive to allow dynamic content in a column header. Defines a new column. Slider component allows users to select a value from a range by dragging a knob along a track. This directive is necessary if you want to load and render the dialog content
only when opening the dialog. Without it it is immediately render, which can cause
performance and injection issues. This is only for documentation purposes. Checks if Checks if Observes focus changes on target elements and emits when focus is lost. This is used to track multi-element focus changes, such as when a user clicks from a dropdown toggle into the dropdown menu. Signals Angular that SSR should wait for this task to complete before rendering. Automatically unsubscribe the value (calling unsubscribe() on the current value)
when ngOnDestroy is called or a new value has been set.
When the component is already destroyed, newly set values will be unscubribed immediately.
This makes sure when a component is destroyed too fast before a async operation is completed
that the result is unsubscribed, otherwise it would be a memory leak. Angular provider factory for the state class. If this type decorator is used then the property is not persisted in localStorage,
but in the URL instead and recovered from the URL when reloaded. hotkey has format of "ctrl+shift+alt+key", e.g "ctrl+s" or "shift+o"
and supports more than one, e.g. "ctrl+s,ctrl+o"Classes
export class BrowserText {
constructor(public fontSize: number = , public fontFamily: string = getComputedStyle(document.querySelector() || document.body).fontFamily);
destroy();
getDimensions(text: string);
}
@Directive()
export class ValueAccessorBase<T> implements ControlValueAccessor, OnDestroy {
value;
disabled;
valid?: boolean;
error?: boolean;
get isDisabled(): boolean;
get isValid();
get isError();
required;
get ngControl(): NgControl | undefined;
setDisabledState(isDisabled: boolean): void;
ngOnDestroy(): void;
/**
* This is called whenever value() needs to update. Either through Angular forms or through setValue().
* Do not call this method in UI code, use setValue() instead so that angular forms informed about the change.
*
* This is a good place to normalize values whenever they change. (like clamping a number to a range)
*/
writeValue(value?: T);
/**
* Set the value from UI code.
*/
setValue(value: T | undefined);
/**
* Call this method to signal Angular's form or other users that this widget has been touched.
*/
touch();
registerOnChange(fn: (value: T | undefined) => void);
registerOnTouched(fn: () => void);
}
@Injectable({ providedIn: })
export class BrowserWindow {
constructor(
@Inject(DOCUMENT)
private window?: ElectronOrBrowserWindow);
isElectron();
getWindow(): ElectronOrBrowserWindow | undefined;
setVibrancy(vibrancy: string): void;
addListener(event: string, listener: (...args: any[]) => void): void;
removeListener(event: string, listener: (...args: any[]) => void): void;
}
@Injectable({ providedIn: })
export class Electron {
static getRemote(): any;
static getIpc(): any;
static isAvailable(): any;
static getRemoteOrUndefined(): any;
static getProcess();
}
export class AsyncEventEmitter<T> extends EventEmitter<T> {
emit(value?: T): void;
subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription;
}
export class ExecutionState {
running;
error: string;
constructor(protected readonly cd: ChangeDetectorRef, protected readonly func: (...args: any[]) => Promise<any> | any);
async execute(...args: any[]);
}
@Injectable({ providedIn: })
export class DuiDocument implements OnDestroy {
document;
activeElement;
onFocus;
constructor();
ngOnDestroy();
}
@Component({
selector: , host: {
ngSkipHydration: , : , : , : , : ,
}, template: , styleUrl: , imports: [
DropdownComponent, forwardRef(() => AdaptiveHiddenContainer), DropdownContainerDirective,
],
})
export class AdaptiveContainerComponent implements OnInit, AfterViewInit, OnDestroy {
dropdown;
/**
* Per default, the dui-adaptive-container will be made adaptive. Pass an Element or ElementRef to
* use a different element as the container.
*/
element;
/**
* The class to apply to the dropdown container.
*/
dropdownClass;
direction;
/**
* Triggers for elements that are now hidden.
*/
visibilityChange;
/**
* Trigger for elements that were hidden and are now shown again.
*/
showElements;
hiddenElements;
/**
* The elements that are currently hidden, either currently hidden (display: none) or moved to the hidden container.
*/
hiddenContainer;
registerHiddenContainer(hiddenContainer: HTMLElement);
unregisterHiddenContainer(hiddenContainer: HTMLElement);
update();
constructor();
ngOnDestroy();
ngOnInit();
ngAfterViewInit();
}
<dui-adaptive-container>
<dui-button>Button 1</dui-button>
<dui-button>Button 2</dui-button>
<dui-button>Button 3</dui-button>
<dui-button>Button 4</dui-button>
</dui-adaptive-container>
@Directive({
selector: , standalone: true,
})
export class AdaptiveHiddenContainer implements OnDestroy {
constructor(private host: ElementRef, private container: AdaptiveContainerComponent);
ngOnDestroy();
}
<dui-adaptive-container>
<dui-button>Button 1</dui-button>
<dui-button>Button 2</dui-button>
<dui-dropdown>
<div *dropdownContainer duiAdaptiveHiddenContainer></ng-container>
</dui-dropdown>
</dui-adaptive-container>
@Injectable({ providedIn: })
export class BetterPendingTasks {
constructor(private pendingTasks: PendingTasks);
async run<T>(task: () => Promise<T>): Promise<T>;
callback<T>(task: () => Promise<T>): () => Promise<T>;
patchPrototype<T>(prototype: T, methods: (keyof T)[]);
}
@Directive()
export class BaseComponent {
disabled;
get isDisabled();
}
@Component({
selector: , template: , styles: [], host: {
: ,
},
})
export class UiComponentComponent extends BaseComponent {
name;
}
export class OverlayStackItem {
constructor(public level: number, public host: HTMLElement, public component: any, public close: () => void, protected stack: OverlayStackItem[], public release: () => void);
getAllAfter(): OverlayStackItem[];
getPrevious(): OverlayStackItem | undefined;
isLast(): boolean;
getAllBefore(): OverlayStackItem[];
}
@Injectable({ providedIn: })
export class OverlayStack {
stack: OverlayStackItem[];
register(host: HTMLElement, component: any, onClose: () => void): OverlayStackItem;
forEach(callback: (item: OverlayStackItem) => void): void;
getCurrentLevel();
getLevel(item: OverlayStackItem): number;
getForComponent(component: any): OverlayStackItem | undefined;
}
@Injectable({ providedIn: })
export class Storage {
getItem(key: string): any;
setItem(key: string, value: any): void;
removeItem(key: string): void;
}
@Injectable({ providedIn: })
export class DuiApp {
darkMode;
platform;
themeDetection: boolean;
constructor(protected app: ApplicationRef,
@Inject(DOCUMENT)
protected document: Document, rendererFactory: RendererFactory2, protected storage: Storage,
@Optional()
protected windowRegistry?: WindowRegistry,
@Optional()
protected router?: Router);
start();
setPlatform(platform: | | | );
getPlatform(): string;
isDarkMode(): boolean;
setAutoDarkMode(): void;
get theme(): | | ;
isDarkModeOverwritten(): boolean;
setGlobalDarkMode(darkMode: boolean): void;
getVibrancy(): | ;
disableThemeDetection();
setDarkMode(darkMode?: boolean);
}
@Directive({
selector: ,
})
export class DragDirective {
duiDragThreshold;
duiDragAbortOnEscape;
duiDrag;
duiDragStart;
duiDragEnd;
duiDragCancel;
constructor();
ngOnDestroy();
}
<div (duiDrag)="onDrag($event)" [duiDragThreshold]="2"></div>
@Directive({
selector: ,
})
export class DuiResponsiveDirective implements OnInit {
clazz: {
[className: string]: boolean;
};
duiClassMin;
element;
ngOnInit();
onResize();
}
@Directive()
export abstract class MenuBase implements ActiveComponent, OnDestroy {
destroy;
label;
sublabel;
icon;
disabled;
accelerator;
role;
hotkey;
visible;
onlyMacOs;
noMacOs;
id;
before;
after;
beforeGroupContaining;
afterGroupContaining;
template;
registeredHotkey;
click;
checkboxStyle;
type;
level;
children;
active;
ngOnDestroy();
buildTemplate(item: BuiltTemplateItem);
activate();
constructor();
validOs(): boolean;
}
@Component({
selector: , providers: [{ provide: MenuBase, useExisting: forwardRef(() => MenuItemComponent) }], template: , styles: ,
})
export class MenuItemComponent extends MenuBase {
type;
}
@Component({
selector: , providers: [{ provide: MenuBase, useExisting: forwardRef(() => MenuDivComponent) }], template: , styles: ,
})
export class MenuDivComponent extends MenuBase {
type;
}
@Directive({
selector: , providers: [{ provide: MenuBase, useExisting: forwardRef(() => MenuCheckboxDirective) }],
})
export class MenuCheckboxDirective extends MenuBase {
checked;
type;
buildTemplate(item: BuiltTemplateItem);
}
@Directive({
selector: , providers: [{ provide: MenuBase, useExisting: forwardRef(() => MenuRadioComponent) }],
})
export class MenuRadioComponent extends MenuBase {
checked;
type;
buildTemplate(item: BuiltTemplateItem);
}
@Directive({
selector: , providers: [{ provide: MenuBase, useExisting: forwardRef(() => MenuSeparatorComponent) }],
})
export class MenuSeparatorComponent extends MenuBase {
type;
}
@Directive({
selector: ,
})
export class MenuRenderDirective implements OnDestroy {
duiMenuRender;
template;
rootAsButton;
constructor();
ngOnDestroy();
}
@Directive({
selector: ,
})
export class MenuItemTemplate {
static ngTemplateContextGuard(directive: unknown, context: unknown): context is TemplateContext;
}
@Component({
selector: , host: {
: ,
}, template: , styles: , imports: [
forwardRef(() => AdaptiveContainerComponent), forwardRef(() => AdaptiveHiddenContainer), forwardRef(() => DropdownItemComponent), MenuRenderDirective, MenuItemTemplate, DropdownComponent, DropdownContainerDirective, OpenDropdownDirective, DropdownSplitterComponent, NgTemplateOutlet, ButtonHotkeyComponent, IconComponent, OnDomCreationDirective,
],
})
export class MenuComponent implements OnDestroy {
/**
* If true, this menu is used for the application menu bar (only works in Electron).
*/
forApp;
moreLabel;
children;
adaptiveContainer;
dropdownPositionsRoot: ConnectedPosition[];
dropdownPositions: ConnectedPosition[];
registerDropdownItem(item: Element, menu: MenuBase);
selected(item: MenuBase): boolean;
constructor();
activate(item: MenuBase);
close();
lostFocus(event: FocusEvent);
dropdownHidden(dropdown: DropdownComponent, level: number);
dropdownShown(dropdown: DropdownComponent, level: number);
ngOnDestroy();
}
@Pipe({ name: , pure: false })
export class AsyncRenderPipe implements OnDestroy, PipeTransform {
constructor(protected cd: ChangeDetectorRef);
ngOnDestroy(): void;
transform<T>(value?: Observable<T> | Promise<T>): T | undefined;
}
@Pipe({ name: })
export class ObjectURLPipe implements PipeTransform, OnDestroy {
constructor(private sanitizer: DomSanitizer);
ngOnDestroy(): void;
transform(buffer?: ArrayBuffer | ArrayBufferView, mimeType?: string): SafeUrl | undefined;
}
@Pipe({ name: })
export class HumanFileSizePipe implements PipeTransform {
transform(bytes: number, si: boolean = false): string;
}
@Directive({
selector: ,
})
export class PositionChangeDirective implements OnInit, OnDestroy {
duiPositionChange;
elementRef;
observer;
ngOnInit();
ngOnDestroy();
}
export class EfficientState {
call: FilterActions<this> & Excluded;
constructor(injector?: Injector);
}
@Component({
selector: , template: , styleUrl: , encapsulation: ViewEncapsulation.None,
})
export class DuiStyleComponent {
duiApp;
document;
/**
* If true, the body applies the 'dui-normalized' class to normalize all elements.
*/
normalizeStyle;
constructor();
}
@Directive({ selector: })
export class OpenExternalDirective implements OnChanges {
openExternal;
href;
constructor(private element: ElementRef);
ngOnChanges(): void;
getLink();
onClick(event: Event);
}
@Directive({ selector: })
export class TemplateContextTypeDirective<T> {
static ngTemplateContextGuard<T>(dir: TemplateContextTypeDirective<T>, ctx: unknown): ctx is T;
}
@Directive({ selector: })
export class OnDomCreationDirective implements OnInit, OnDestroy {
onDomCreation;
onDomCreationDestroy;
ngOnInit();
ngOnDestroy();
}
export abstract class ActiveComponent {
abstract active: WritableSignal<boolean>;
abstract registeredHotkey?: WritableSignal<string>;
abstract showHotkey?: WritableSignal<boolean>;
abstract destroy: OutputEmitterRef<void>;
abstract activate(): void;
}
@Component({
selector: , styles: [], template: , imports: [],
})
export class ButtonHotkeyComponent implements OnChanges, OnInit {
hotkey;
ngOnInit();
ngOnChanges();
}
@Component({
selector: , template: , host: {
: , : , : , : , : , : , : , : , : , : , : , : , : , : ,
}, styleUrls: [], hostDirectives: [
{ directive: RouterLinkActive, inputs: [] },
], providers: [
{ provide: ActiveComponent, useExisting: forwardRef(() => ButtonComponent) },
], imports: [
IconComponent, ButtonHotkeyComponent,
],
})
export class ButtonComponent implements OnInit, ActiveComponent, OnDestroy {
hotKeySize;
destroy;
/**
* The icon for this button. Either a icon name same as for dui-icon, or an image path.
*/
icon;
/**
* Change in the icon size. Should not be necessary usually.
*/
iconSize;
iconRight;
iconColor;
showHotkey;
registeredHotkey;
/**
* Whether the button is active (pressed)
*/
active;
/**
* Whether the button has no padding and smaller font size
*/
small;
/**
* Whether the button has smaller padding. Better for button with icons.
*/
tight;
/**
* Whether the button is highlighted.
*/
highlighted;
/**
* Whether the button is primary.
*/
primary;
/**
* Whether the button is focused on initial loading.
*/
autoFocus;
/**
* The form to submit when this button is clicked.
*/
submitForm;
disabled;
square;
textured;
iconOnly;
isDisabled;
constructor();
ngOnDestroy();
activate();
ngOnInit();
}
@Injectable({ providedIn: })
export class HotkeyRegistry implements OnDestroy {
active: {
key: HotKey;
component: ActiveComponent;
}[];
showHotKeyOn;
constructor();
activate(component: ActiveComponent);
ngOnDestroy();
unregister(component: ActiveComponent);
register(key: HotKey, component: ActiveComponent);
}
@Directive({ selector: })
export class HotkeyDirective implements OnDestroy {
hotkey;
registeredHotkey;
active;
destroy;
ngOnDestroy();
constructor();
activate();
}
<dui-button hotkey="escape">Cancel</dui-button>
<dui-button hotkey="cmd+s">Save</dui-button>
@Component({
selector: , template: , host: {
: , : ,
}, styleUrls: [],
})
export class ButtonGroupComponent implements AfterViewInit, OnDestroy, AlignedButtonGroup {
/**
* How the button should behave.
* `sidebar` means it aligns with the sidebar. Is the sidebar open, this button-group has a left margin.
* Is it closed, the margin is gone.
*/
float;
/**
* If set to none, buttons inside this group will be tightly packed together without any padding.
*/
padding;
get isPaddingNone();
constructor(private element: ElementRef<HTMLElement>,
@SkipSelf()
protected cd: ChangeDetectorRef,
@Optional()
private windowState?: WindowState,
@Optional()
private windowComponent?: WindowComponent);
/**
* @hidden
*/
activateOneTimeAnimation();
ngOnDestroy(): void;
ngAfterViewInit(): void;
}
@Component({
selector: , template: , host: {
: , : , : ,
}, styleUrls: [],
})
export class ButtonGroupsComponent {
align;
}
@Directive({
selector: , providers: [ngValueAccessor(FileChooserDirective)],
})
export class FileChooserDirective extends ValueAccessorBase<File[]> implements OnDestroy, OnChanges {
duiFileMultiple;
duiFileDirectory;
duiFileChooserChange;
constructor();
ngOnDestroy();
ngOnChanges(): void;
}
<dui-button duiFileChooser duiFileChooserChange="open($event)">Open File</dui-button>
@Directive({
selector: , providers: [ngValueAccessor(FileChooserDirective)],
})
export class FilePickerDirective extends ValueAccessorBase<FilePickerItem[]> implements OnDestroy, AfterViewInit {
duiFileMultiple;
duiFileAutoOpen;
duiFilePickerChange;
constructor();
ngOnDestroy();
ngAfterViewInit();
}
<dui-button duiFilePicker duiFilePickerChange="open($event)">Open File</dui-button>
@Directive({
selector: , host: {
: ,
}, providers: [ngValueAccessor(FileChooserDirective)],
})
export class FileDropDirective extends ValueAccessorBase<FilePickerItem[]> implements OnDestroy {
duiFileDropMultiple;
duiFileDropChange;
i;
ngOnDestroy();
}
<div duiFileDrop (duiFileDropChange)="onFilesDropped($event)">
Drop files here
</div>
@Component({
selector: , template: , host: {
: ,
}, changeDetection: ChangeDetectionStrategy.OnPush, styleUrls: [], imports: [NgTemplateOutlet],
})
export class DropdownComponent implements OnChanges, OnDestroy, AfterViewInit {
isOpen;
overlayRef?: OverlayRef;
/**
* If open() is called without a target, the host element is used as the target.
* THe target elements is allowed to have focus without closing the dropdown.
*/
host;
/**
* Additional elements that are allowed to have focus without closing the dropdown.cdk-global-overlay-wrapper
*/
allowedFocus;
normalizeStyle;
/**
* Keeps the dropdown open when it should be closed, ideal for debugging purposes.
*/
keepOpen;
height;
width;
minWidth;
minHeight;
maxWidth;
maxHeight;
/**
* Whether the dropdown should allow scrollbars.
*/
scrollbars;
/**
* Whether the dropdown aligns to the horizontal center.
*/
center;
dropdownClass;
/**
* Whether is styled as overlay
*/
overlay;
hasBackdrop;
show;
/**
* Additional positions to connect the dropdown to the target element.
*/
connectedPositions;
/**
* Triggered when the dropdown is opened or closed.
*/
showChange;
/**
* Triggered when the dropdown is opened.
*/
shown;
/**
* Triggered when the dropdown is closed.
*/
hidden;
/**
* Triggered when the dropdown loses focus and is about to close.
*/
lostFocus;
dropdownTemplate?: TemplateRef<any>;
constructor(protected overlayService: Overlay, protected injector: Injector, protected overlayStack: OverlayStack, protected viewContainerRef: ViewContainerRef);
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit();
ngOnDestroy(): void;
/**
* Toggles the dropdown open or closed.
*/
toggle(target?: Element | ElementRef | MouseEvent | EventTarget | | null): boolean;
/**
* Sets the container template for the dropdown.
*/
setContainer(container: TemplateRef<any> | undefined);
/**
* Opens the dropdown at the given target element or mouse position.
*/
open(target?: Element | ElementRef | MouseEvent | EventTarget | | null, initiator?: HTMLElement | ElementRef | {
x: number;
y: number;
width: number;
height: number;
});
setInitiator(initiator?: HTMLElement | ElementRef | {
x: number;
y: number;
width: number;
height: number;
});
/**
* Focuses the dropdown element.
*/
focus();
/**
* Closes the dropdown if it is open.
*/
close();
}
@Directive({ selector: })
export class OpenDropdownDirective implements AfterViewInit, OnDestroy {
openDropdown;
openDropdownHover;
openSub?: OutputRefSubscription;
hiddenSub?: OutputRefSubscription;
activeComponent;
ngAfterViewInit();
ngOnDestroy();
}
<dui-dropdown #dropdown>
</dui-dropdown>
<dui-button [openDropdown]="dropdown">Open dropdown</dui-button>
@Directive({ selector: })
export class OpenDropdownHoverDirective implements OnDestroy {
openDropdownHover;
/**
* In milliseconds.
*/
openDropdownHoverCloseTimeout;
constructor(protected elementRef: ElementRef);
ngOnDestroy();
}
<dui-dropdown #dropdown>
</dui-dropdown>
<dui-button [openDropdownHover]="dropdown">Open on hover</dui-button>
@Directive({ selector: })
export class ContextDropdownDirective {
contextDropdown;
}
<dui-dropdown #dropdown>
</dui-dropdown>
<dui-button [contextDropdown]="dropdown">Open context menu</dui-button>
@Component({
selector: , template: , host: {
: ,
}, styles: [],
})
export class DropdownSplitterComponent {
}
<dui-dropdown>
<dui-dropdown-item>Item 1</dui-dropdown-item>
<dui-dropdown-separator />
<dui-dropdown-item>Item 2</dui-dropdown-item>
</dui-dropdown>
@Directive({ selector: })
export class DropdownContainerDirective {
constructor(protected dropdown: DropdownComponent, public template: TemplateRef<any>);
}
<dui-dropdown>
<ng-container *dropdownContainer>
Dynamically created upon dropdown instantiation.
</ng-container>
</dui-dropdown>
@Component({
selector: , template: , host: {
: , : , : , : , : , : ,
}, styleUrls: [], providers: [
{ provide: ActiveComponent, useExisting: forwardRef(() => DropdownItemComponent) },
], imports: [IconComponent],
})
export class DropdownItemComponent implements ActiveComponent, OnDestroy {
selected;
/**
* Whether the button is active (pressed)
*/
active;
destroy;
disabled;
/**
* When set to true, the item is optimised to display left-aligned checkboxes next to the text.
*/
checkbox;
closeOnClick;
activate();
ngOnDestroy();
}
<dui-dropdown>
<dui-dropdown-item (click)="doSomething()">Click me</dui-dropdown-item>
<dui-dropdown-item [selected]="true">Selected item</dui-dropdown-item>
<dui-dropdown-item [disabled]="true">Disabled item</dui-dropdown-item>
</dui-dropdown>
@Component({
selector: , template: , host: {
: , : ,
}, styleUrls: [], hostDirectives: [
{ directive: RouterLinkActive, inputs: [] },
], providers: [ngValueAccessor(TabButtonComponent)],
})
export class TabButtonComponent extends ValueAccessorBase<any> {
/**
* Whether the button is active (pressed).
*
* Use alternatively form API, e.g. <dui-tab-button [(ngModel)]="chosen" value="overview"></dui-tab-button>
*/
active;
routerLinkActive;
}
@Component({
selector: , template: , styleUrls: [], providers: [ngValueAccessor(CheckboxComponent)], changeDetection: ChangeDetectionStrategy.OnPush, imports: [IconComponent], host: {
: ,
},
})
export class CheckboxComponent extends ValueAccessorBase<boolean> {
constructor();
}
<dui-checkbox [(ngModel)]="myValue">Check me!</dui-checkbox>
@Directive({ selector: })
export class RenderComponentDirective implements AfterViewInit, OnDestroy {
renderComponent;
renderComponentInputs;
component?: ComponentRef<any>;
constructor(protected viewContainerRef: ViewContainerRef);
ngAfterViewInit(): void;
ngOnDestroy(): void;
}
@Component({
template: , imports: [DialogActionsComponent, ButtonComponent, HotkeyDirective, CloseDialogDirective],
})
export class DuiDialogConfirm {
title;
content;
static dialogDefaults;
}
@Component({
template: , imports: [DialogActionsComponent, ButtonComponent, HotkeyDirective, CloseDialogDirective],
})
export class DuiDialogAlert {
title;
content;
static dialogDefaults;
}
@Component({
template: , imports: [InputComponent, FormsModule, DialogActionsComponent, ButtonComponent, HotkeyDirective, CloseDialogDirective],
})
export class DuiDialogPrompt {
title;
content;
value;
static dialogDefaults;
constructor(public dialog: DialogComponent);
}
@Injectable({ providedIn: })
export class DuiDialog {
constructor(protected resolver: ComponentFactoryResolver, protected app: ApplicationRef, protected injector: Injector, protected registry: WindowRegistry, protected overlay: Overlay);
open<T>(component: Type<T>, inputs: {
[name in keyof T]?: any;
} = {}, dialogInputs: Inputs<DialogComponent> = {}, viewContainerRef: ViewContainerRef | null = null): {
dialog: DialogComponent;
close: Promise<any>;
component: T;
};
async alert(title: string, content: string = , inputs: {
[name: string]: any;
} = {}): Promise<boolean>;
async confirm(title: string, content: string = , inputs: {
[name: string]: any;
} = {}): Promise<boolean>;
async prompt(title: string, value: string, content?: string, inputs: {
[name: string]: any;
} = {}): Promise<false | string>;
}
@Directive({ selector: })
export class DuiDialogConfirmDirective implements OnDestroy {
/**
* The confirm message to show when the user clicks on the element.
*
* Use `Title\nText` to specify a title and text, separated by a newline.
*/
confirm;
constructor(protected element: ElementRef<HTMLElement>, protected dialog: DuiDialog,
@Inject(DOCUMENT)
protected document: any);
ngOnDestroy();
}
<dui-button confirm="Really delete?" (click)="delete()">Delete</dui-button>
@Component({
template: , host: {
: ,
}, styleUrls: [], imports: [WindowComponent, WindowContentComponent, RenderComponentDirective, NgTemplateOutlet],
})
export class DialogWrapperComponent {
component;
componentInputs;
actions;
container;
content;
class;
normalizeStyle;
renderComponentDirective?: RenderComponentDirective;
windowComponent;
setActions(actions: TemplateRef<any> | undefined);
setDialogContainer(container: TemplateRef<any> | undefined);
}
@Component({
selector: , template: , styles: [],
})
export class DialogComponent implements AfterViewInit, OnDestroy, OnChanges {
title;
visible;
class;
noPadding;
minWidth;
minHeight;
width;
height;
maxWidth;
maxHeight;
center;
backDropCloses;
normalizeStyle;
component;
componentInputs;
closed;
open;
template?: TemplateRef<any>;
actions?: TemplateRef<any> | undefined;
container?: TemplateRef<any> | undefined;
overlayRef?: OverlayRef;
wrapperComponentRef?: ComponentRef<DialogWrapperComponent>;
constructor(protected applicationRef: ApplicationRef, protected overlayStack: OverlayStack, protected viewContainerRef: ViewContainerRef, protected overlay: Overlay, protected injector: Injector, protected registry: WindowRegistry,
@Optional()
protected window?: WindowComponent);
toPromise(): Promise<any>;
setDialogContainer(container: TemplateRef<any> | undefined);
setActions(actions: TemplateRef<any> | undefined);
ngOnChanges(changes: SimpleChanges): void;
show();
ngAfterViewInit();
close(v?: any);
ngOnDestroy(): void;
}
<dui-dialog #dialog [maxWidth]="500">
Hello World!
<dui-button closeDialog>Abort</dui-button>
<dui-button>OK</dui-button>
</dui-dialog>
<dui-button openDialog="dialog">Open Dialog</dui-button>
@Directive({ selector: })
export class DialogDirective {
constructor(protected dialog: DialogComponent, public template: TemplateRef<any>);
}
<dui-dialog #dialog>
<ng-container *dialogContainer>
Lazy loaded dialog content.
</ng-container>
</dui-dialog>
@Component({
selector: , template: ,
})
export class DialogActionsComponent implements AfterViewInit, OnDestroy {
template: TemplateRef<any>;
constructor(protected dialog: DialogComponent);
ngAfterViewInit(): void;
ngOnDestroy(): void;
}
@Component({
selector: , template: , styleUrls: [],
})
export class DialogErrorComponent {
}
@Directive({ selector: })
export class CloseDialogDirective {
closeDialog;
constructor(protected dialog: DialogComponent);
}
<dui-button closeDialog>Close</dui-button>
@Directive({ selector: })
export class OpenDialogDirective implements AfterViewInit, OnChanges, OnDestroy {
openDialog;
openSub?: Subscription;
hiddenSub?: Subscription;
constructor(protected elementRef: ElementRef,
@Optional()
protected button?: ButtonComponent);
ngOnDestroy();
ngOnChanges();
ngAfterViewInit();
}
<dui-dialog #myDialog>
Hi there!
</dui-dialog>
<dui-button openDialog="myDialog">Open Dialog</dui-button>
@Injectable({ providedIn: })
export class FilesystemState {
uploadQueue;
pendingQueue;
upload;
addUpload(file: FileQueueEntry);
cleanQueue();
checkNext();
}
@Injectable()
export abstract class FilesystemFileCache implements OnDestroy {
constructor();
ngOnDestroy();
clean();
nextQueue();
connect(api: FilesystemApi, path: string): CacheData;
}
@Injectable()
export class FilesystemFileDataCache extends FilesystemFileCache {
}
@Injectable()
export class FilesystemFileQuickLookCache extends FilesystemFileCache {
}
@Injectable()
export class FilesystemFileThumbnailCache extends FilesystemFileCache {
}
@Component({
selector: , template: , styleUrl: , host: {
: ,
}, providers: [
FilesystemFileDataCache, FilesystemFileQuickLookCache, FilesystemFileThumbnailCache,
], imports: [
DropdownComponent, DropdownItemComponent, FilePickerDirective, DropdownSplitterComponent, ButtonGroupsComponent, ButtonGroupComponent, ButtonComponent, InputComponent, FormsModule, FilesystemFileQuickLook, FileDropDirective, ContextDropdownDirective, IconComponent, FilesystemFileDetail, TableComponent, TableColumnDirective, TableCellDirective, HumanFileSizePipe, forwardRef(() => FilesystemFileThumbnail), DatePipe, DropdownContainerDirective, MenuComponent, MenuItemComponent, MenuCheckboxDirective, MenuSeparatorComponent,
],
})
export class FilesystemComponent implements OnInit, OnDestroy {
mimeTypeToLabel;
api;
dialogMode;
selectMultiple;
path;
media;
files;
sort;
view;
selected;
renameFile;
containerElementRef;
loading;
filesSelected;
filesSorted;
activeFile;
quickLook?: DropdownComponent;
thumbnails?: QueryList<FilesystemFileThumbnail>;
element;
dialog;
state;
intersectionObserver?: IntersectionObserver;
constructor();
registerThumbnail(thumbnail: FilesystemFileThumbnail);
unregisterThumbnail(thumbnail: FilesystemFileThumbnail);
tableSelect(selected: FilesystemApiFile[]);
sortBy(by: string);
sortDirection(direction: | );
toggleFolderFirst();
async fileRenamed(newName?: string);
keyDown(event: KeyboardEvent);
openQuickLook();
async openPublic(path: string);
open(path: string, andSelect = false);
goUp();
closeQuickLook();
async deleteSelected();
selectBackground(event: MouseEvent);
select(file: FilesystemApiFile);
ngOnDestroy();
upload(files: FilePickerItem[]);
getFolder();
async createFolder();
ngOnInit();
async load(andSelect = false);
async loadActiveFolder();
async loadFolder(dir: string);
}
@Component({
selector: , standalone: true, template: , styles: [], imports: [
AsyncPipe, ButtonComponent, IndicatorComponent,
],
})
export class FileUploaderComponent {
truncateFileName;
filesToUpload;
currentIndex;
constructor(public state: FilesystemState);
cancel();
}
@Component({
selector: , template: , styleUrl: , imports: [
ObjectURLPipe, IndicatorComponent, ObjectURLPipe, LoadingSpinnerComponent,
],
})
export class FilesystemFileDetail implements OnDestroy {
api;
file;
data;
filesystemFileCache;
cacheData;
constructor();
ngOnDestroy();
}
@Component({
selector: , template: , styleUrl: , host: {
: ,
}, imports: [
ButtonGroupsComponent, ButtonGroupComponent, IconComponent, ObjectURLPipe, DatePipe, LoadingSpinnerComponent, HumanFileSizePipe, LoadingSpinnerComponent, HumanFileSizePipe, AsyncPipe, IndicatorComponent,
],
})
export class FilesystemFileQuickLook implements OnDestroy {
fileName;
mimeTypeToLabel;
api;
files;
close;
file;
filesystemFileCache;
cacheData;
dim;
constructor();
ngOnDestroy();
next();
prev();
onClose($event: KeyboardEvent);
select(file: FilesystemApiFile);
}
@Component({
selector: , template: , host: {
: , : ,
}, styleUrl: , imports: [
LoadingSpinnerComponent, FormsModule, ObjectURLPipe,
],
})
export class FilesystemFileThumbnail implements OnDestroy {
truncateFileName;
fileName;
loading;
loadingFailed;
thumbnailCache;
cacheData;
newName;
view: | ;
api;
file;
withTitle;
selected;
rename;
intersection;
select;
renamed;
image;
elementRef;
setNewName(name: string);
constructor(
@Inject(forwardRef(() => FilesystemComponent))
private filesystemComponent: FilesystemComponent);
ngOnDestroy();
loaded(error: boolean = false);
doRename(name: string | undefined, event?: Event);
onContextMenu();
selectFile();
}
@Component({
styles: [], imports: [
FilesystemComponent, ButtonGroupComponent, ButtonComponent, CloseDialogDirective,
], template: ,
})
export class FilesystemFileDialog {
static dialogDefaults;
selected;
activeFile?: FilesystemApiFile;
api;
dialog;
choose();
}
@Component({
selector: , template: , host: {
: ,
}, styleUrls: [], imports: [KeyValuePipe],
})
export class FormRowComponent {
label;
description;
labelWidth;
left;
ngControl?: NgControl;
isString(v: any);
}
@Component({
selector: , template: , styleUrls: [], imports: [FormsModule, ReactiveFormsModule],
})
export class FormComponent {
formGroup;
disabled;
submit;
success;
error;
errorText;
submitting;
constructor(protected cd: ChangeDetectorRef,
@SkipSelf()
protected cdParent: ChangeDetectorRef);
onEnter(event: KeyboardEvent);
get invalid();
async submitForm();
}
@Component({
selector: , template: , host: {
: , : , : , : , : ,
}, styleUrls: [],
})
export class IconComponent implements OnInit, OnChanges {
/**
* The icon for this button.
*/
name;
/**
* The icon size (default 17). Should not be necessary usually.
*/
size;
/**
* Enables interactive style for this icon.
*/
clickable;
/**
* The color of the icon. If not set, it will use `currentColor` by default.
*/
color;
/**
* If true, the icon will be disabled and not clickable.
*/
disabled;
get isClickable();
get isDisabled();
constructor();
ngOnChanges(): void;
ngOnInit();
}
@Component({
selector: , template: , styleUrls: []
})
export class IndicatorComponent {
step;
}
@Component({
selector: , styles: [], template: , imports: [IndicatorComponent, DecimalPipe, DialogActionsComponent, ButtonComponent, DialogActionsComponent, ButtonComponent],
})
export class ProgressIndicatorComponent implements OnChanges, OnDestroy {
title;
description;
progressTracker;
display;
step: number;
sub?: Subscription;
constructor(private cd: ChangeDetectorRef);
ngOnChanges(): void;
ngOnDestroy(): void;
}
@Component({
selector: , styles: [], template:
})
export class LoadingSpinnerComponent {
}
@Component({
selector: , template: , styleUrls: [], host: {
: , : , : , : , : , : , : , : , : , : , : ,
}, providers: [ngValueAccessor(InputComponent)], imports: [IconComponent, FormsModule],
})
export class InputComponent extends ValueAccessorBase<any> implements AfterViewInit {
type;
step;
placeholder;
name;
icon;
min;
max;
maxLength;
minLength;
iconSize;
/**
* Focuses this element once created (AfterViewInit).
*/
autoFocus;
/**
* Uses a more decent focus border.
*/
lightFocus;
/**
* Disables input controls (like for type=number the arrow buttons)
*/
noControls;
/**
* Appears a little bit transparent. Perfect for blurry background.
*/
semiTransparent;
esc;
enter;
keydown;
keyup;
blur;
focus;
input;
textured;
readonly;
isFocused;
round;
clearer;
constructor();
clear();
setValue(value: any | undefined);
focusInput();
ngAfterViewInit();
}
@Component({
selector: , template: , styles: []
})
export class LabelComponent {
label;
}
@Component({
selector: , template: , styles: [], host: {
:
}
})
export class LabelGridComponent {
labelWidth;
labelMaxWidth;
}
@Component({
selector: , template: , host: {
:
}, styleUrls: []
})
export class SectionHeaderComponent {
center;
}
@Component({
selector: , template: , styleUrls: [],
})
export class ListTitleComponent {
constructor();
}
<dui-list>
<dui-list-title>Title</dui-list-title>
<dui-list-item value="1">Item 1</dui-list-item>
</list>
@Component({
selector: , template: , styleUrls: [], host: {
: , : , : , : ,
}, providers: [ngValueAccessor(ListComponent)],
})
export class ListComponent extends ValueAccessorBase<any> {
static ids: number;
id;
white;
focusable;
delimiterLine;
/**
* @hidden
*/
deregister(item: ListItemComponent);
/**
* @hidden
*/
register(item: ListItemComponent);
getSelectedItem(): ListItemComponent | undefined;
}
@Component({
selector: , template: , host: {
: , : , : ,
}, styleUrls: [], hostDirectives: [
{ directive: RouterLinkActive, inputs: [] },
],
})
export class ListItemComponent implements OnDestroy {
id;
value;
active;
/**
* When position is dynamic, it might be handy to define the position
* explicitly to make arrow-up/arrow-down navigation possible.
*/
position;
onSelect;
constructor();
ngOnDestroy(): void;
async select();
isSelected(): boolean;
}
<dui-list>
<dui-list-item value="1">Item 1</dui-list-item>
</list>
@Component({
selector: , providers: [ngValueAccessor(RadioGroupComponent)], template: ,
})
export class RadioGroupComponent extends ValueAccessorBase<any> {
}
@Component({
selector: , template: , host: {
: , : , : ,
}, styleUrls: [],
})
export class RadioButtonComponent {
value;
disabled;
group;
}
<dui-radio-group [(ngModel)]="myValue">
<dui-radio-button value="a">Option A</dui-radio-button>
<dui-radio-button value="b">Option B</dui-radio-button>
</dui-radio-group>
@Directive({ selector: })
export class DynamicOptionDirective {
constructor(public template: TemplateRef<any>);
}
<dui-option>
<ng-container *dynamicOption>
{{item.fieldName | date}}
</ng-container>
</dui-option>
@Component({
selector: , template: ,
})
export class OptionDirective {
value;
disabled;
dynamic?: DynamicOptionDirective;
constructor(public element: ElementRef);
}
<dui-select>
<dui-option value="1">Option 1</dui-option>
</dui-select>
@Directive({
selector: , providers: [{ provide: OptionDirective, useExisting: OptionSeparatorDirective }],
})
export class OptionSeparatorDirective {
constructor();
}
<dui-select>
<dui-option value="1">Option 1</dui-option>
<dui-option-separator></dui-option-separator>
<dui-option value="2">Option 2</dui-option>
</dui-select>
@Component({
selector: , template: , styleUrls: [], host: {
: , : , : , : ,
}, providers: [ngValueAccessor(SelectBoxComponent)], imports: [
ButtonGroupComponent, ButtonComponent, OpenDropdownDirective, NgTemplateOutlet, IconComponent, DropdownComponent, DropdownSplitterComponent, DropdownItemComponent,
],
})
export class SelectBoxComponent<T> extends ValueAccessorBase<T> implements OnDestroy {
placeholder;
/**
* Different textured styled.
*/
textured;
/**
* Smaller text and height.
*/
small;
button;
options;
dropdown;
label: string;
optionsValueMap;
element;
constructor();
select(value: T);
open();
}
@Component({
selector: , template: , styleUrls: [], host: {
: , : , : , : , : , : , : , : , : , : , : ,
}, hostDirectives: [
{
directive: DragDirective, inputs: [], outputs: [, , , ],
},
],
})
export class SplitterComponent {
/**
* When set, the splitter will show an indicator (handle) to indicate that it can be dragged.
*/
indicator;
size;
inverted;
/**
* If set one of these, the splitter will be positioned absolutely in the layout.
* Make sure to set a parent element with `position: relative;` to allow absolute positioning.
*/
position;
orientation;
/**
* Per default splitter is vertical (movement left-to-right), meaning vertical line.
* If set to true, it will be horizontal (movement top-to-bottom).
*/
horizontal;
min;
max;
element;
/**
* When element is set, this CSS property will be used to set the size of the splitter.
* Default is 'flex-basis', which is typically used in flexbox layouts.
*/
property;
isHorizontal;
constructor();
}
<div class="layout">
<div class="sidebar" [style.flex-basis.px]="sidebarSize()">
<dui-splitter position="right" [size]="sidebarSize" (sizeChange)="sidebarSize.set($event)" indicator></dui-splitter>
</div>
<div class="content"></div>
</div>
@Directive({ selector: })
export class TableCellDirective {
constructor(public template: TemplateRef<any>);
}
<dui-table-column>
<ng-container *duiTableCell="let item">
{{item.fieldName | date}}
</ng-container>
</dui-table-column>
@Directive({ selector: })
export class TableCustomHeaderContextMenuDirective {
constructor(public dropdown: DropdownComponent);
}
<dui-table>
<dui-dropdown duiTableCustomHeaderContextMenu>
<dui-dropdown-item>Custom Item</dui-dropdown-item>
</dui-dropdown>
</dui-table>
@Directive({ selector: })
export class TableCustomRowContextMenuDirective {
constructor(public dropdown: DropdownComponent);
}
<dui-table>
<dui-dropdown duiTableCustomRowContextMenu>
<dui-dropdown-item>Custom Item</dui-dropdown-item>
</dui-dropdown>
</dui-table>
@Directive({ selector: })
export class TableHeaderDirective {
constructor(public template: TemplateRef<any>);
}
<dui-table-column name="fieldName">
<ng-container *duiTableHead>
<strong>Header</strong>
</ng-container>
</dui-table-column>
@Directive({ selector: })
export class TableColumnDirective implements OnInit {
/**
* The name of the column. Needs to be unique. If no renderer (*duiTableCell) is specified, this
* name is used to render the content T[name].
*
* This supports dot notation, so you can use `user.name` to access the `name` property of the `user` object.
*/
name;
/**
* A different header name. Use dui-table-header to render HTML there.
*/
header;
/**
* Default width.
*/
width;
effectiveWidth;
/**
* Adds additional class to the columns cells.
*/
class;
/**
* Whether this column is start hidden. User can unhide it using the context menu on the header.
*/
hidden;
effectiveHidden;
sortable;
hideable;
/**
* At which position this column will be placed.
*/
position;
/**
* This is the new position when the user moved it manually.
* @hidden
*/
effectivePosition;
cell;
headerDirective;
ngOnInit();
getHidden(): boolean;
toggleHidden();
/**
* @hidden
*/
getWidth(): number;
/**
* @hidden
*/
getPosition();
}
<dui-table-column name="fieldName" header="Field Name" [width]="100" />
@Component({
selector: , changeDetection: ChangeDetectionStrategy.OnPush, template: , styleUrls: [], host: {
: , : , : , : , : , : ,
}, imports: [
DropdownComponent_1, DropdownContainerDirective, DropdownItemComponent, NgTemplateOutlet, DropdownSplitterComponent, ContextDropdownDirective, IconComponent, SplitterComponent, CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf, DragDirective,
],
})
export class TableComponent<T> implements AfterViewInit, OnInit, OnDestroy {
/**
* @hidden
*/
tabindex;
borderless;
/**
* Array of items that should be used for each row.
*/
items;
/**
* Since dui-table has virtual-scroll active per default, it's required to define the itemHeight to
* make scrolling actually workable correctly.
*/
itemHeight;
/**
* Whether the table height just prints all rows, or if virtual scrolling is enabled.
* If true, the row height depends on the content.
*/
virtualScrolling;
/**
* Whether the table row should have a hover effect.
*/
hover;
/**
* Whether the header should be shown.
*/
showHeader;
/**
* How many columns (from the left) are frozen (stay visible even if user scrolls horizontally).
*/
freezeColumns;
/**
* Default field of T for sorting.
*/
defaultSort;
/**
* Default sorting order.
*/
defaultSortDirection;
/**
* Whether rows are selectable.
*/
selectable;
/**
* Whether multiple rows are selectable at the same time.
*/
multiSelect;
/**
* TrackFn for ngFor to improve performance. Default is order by index.
*/
trackFn;
/**
* Filter function.
*/
filter;
rowClass;
cellClass;
/**
* When the user changes the order or width of the columns, the information is stored
* in localStorage using this key, prefixed with `@dui/table/`.
*/
preferenceKey;
/**
* Filter query.
*/
filterQuery;
/**
* Against which fields filterQuery should run.
*/
filterFields;
/**
* Alternate object value fetcher, important for sorting and filtering.
*/
valueFetcher;
/**
* A hook to provide custom sorting behavior for certain columns.
*/
sortFunction;
/**
* Whether sorting is enabled (clicking headers trigger sort).
*/
sorting;
noFocusOutline;
/**
* Allow text selection in the table.
*/
textSelection;
sort;
sorted;
/**
* Elements that are selected, by reference.
*/
selected;
cellSelect;
/**
* When a row gets double-clicked.
*/
rowDblClick;
cellClick;
cellDblClick;
columnDefs;
sortedColumns;
sortedFilteredColumns;
element;
constructor();
ngOnInit();
ngOnDestroy(): void;
filterSorted;
onHeadDragStart(event: DuiDragStartEvent, index: number);
onHeadDrag(event: DuiDragEvent);
onHeadDragEnd(event: DuiDragEvent);
ngAfterViewInit(): void;
select(item: T, $event?: MouseEvent);
}
@Component({
selector: , template: , host: {
: ,
}, styleUrls: [], imports: [IconComponent],
})
export class TabComponent {
active;
removable;
close;
}
@Component({
selector: , template: , styleUrls: []
})
export class TabsComponent {
}
@Component({
selector: , template: , host: {
: , : , : ,
}, hostDirectives: [
{
directive: DragDirective, inputs: [], outputs: [, , , ],
},
], styleUrls: [], providers: [ngValueAccessor(SliderComponent)],
})
export class SliderComponent extends ValueAccessorBase<number> {
/**
* The minimum value of the slider.
*/
min;
/**
* The maximum value of the slider.
*/
max;
/**
* The step size for the slider. The value will be rounded to the nearest step.
*/
steps;
/**
* How many fractional digits to display.
*/
fractionalDigits;
/**
* If true, the slider will be displayed in a compact form.
*/
mini;
writeValue(value?: number);
}
<dui-slider [(ngModel)]="value" [min]="0" [max]="100" [steps]="1"></dui-slider>
@Component({
template: , host: {
: ,
}, imports: [
RenderComponentDirective, NgTemplateOutlet,
],
})
export class ExternalDialogWrapperComponent {
component;
componentInputs;
actions?: TemplateRef<any> | undefined;
container?: TemplateRef<any> | undefined;
content?: TemplateRef<any> | undefined;
renderComponentDirective?: RenderComponentDirective;
constructor(protected cd: ChangeDetectorRef, public injector: Injector);
setDialogContainer(container: TemplateRef<any> | undefined);
}
@Component({
selector: , template: ,
})
export class ExternalWindowComponent implements AfterViewInit, OnDestroy, OnChanges {
alwaysRaised;
visible;
closed;
component;
componentInputs;
wrapperComponentRef?: ComponentRef<ExternalDialogWrapperComponent>;
template?: TemplateRef<any>;
externalWindow?: Window;
container?: TemplateRef<any> | undefined;
observerStyles?: MutationObserver;
observerClass?: MutationObserver;
parentFocusSub?: Subscription;
electronWindow?: any;
parentWindow?: WindowComponent;
constructor(protected componentFactoryResolver: ComponentFactoryResolver, protected applicationRef: ApplicationRef, protected injector: Injector, protected dialog: DuiDialog, protected registry: WindowRegistry, protected cd: ChangeDetectorRef, protected viewContainerRef: ViewContainerRef);
ngOnChanges(changes: SimpleChanges): void;
setDialogContainer(container: TemplateRef<any> | undefined);
show();
beforeUnload();
ngAfterViewInit();
close();
ngOnDestroy(): void;
}
@Directive({ selector: })
export class ExternalDialogDirective {
constructor(protected dialog: ExternalWindowComponent, public template: TemplateRef<any>);
}
@Injectable({ providedIn: })
export class DuiExternalWindow {
constructor(protected resolver: ComponentFactoryResolver, protected app: ApplicationRef, protected injector: Injector);
open<T>(component: Type<T>, inputs: {
[name: string]: any;
} = {}, options: {
alwaysRaised?: boolean;
} = {}, viewContainerRef: ViewContainerRef | null = null): {
window: ExternalWindowComponent;
instance: T;
};
}
@Component({
selector: , template: , styleUrls: [], host: {
: , : ,
},
})
export class WindowFrameComponent {
height;
}
@Component({
selector: , template: , styleUrl: , host: {
: , : , : , : ,
}, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
forwardRef(() => WindowState), forwardRef(() => WindowMenuState),
],
})
export class WindowComponent implements OnInit, OnDestroy, Win {
id;
content;
header;
closable;
maximizable;
minimizable;
dialog;
normalizeStyle;
windowState;
viewContainerRef;
browserWindow;
constructor();
ngOnInit();
ngOnDestroy();
getClosestNonDialogWindow(): WindowComponent | undefined;
}
@Component({
selector: , template: , host: {
: ,
}, styleUrls: [], imports: [
NgTemplateOutlet, SplitterComponent,
],
})
export class WindowContentComponent {
transparent;
sidebarVisible;
class;
sidebarWidth;
sidebarMaxWidth;
sidebarMinWidth;
toolbar;
sidebar;
sidebarContainer;
content;
withAnimation;
constructor(private windowState: WindowState);
unregisterSidebar(sidebar: WinSidebar);
registerSidebar(sidebar: WinSidebar);
isSidebarVisible(): boolean;
}
@Component({
selector: , template: , styleUrls: []
})
export class WindowFooterComponent {
}
@Component({
selector: , template: , host: {
ngSkipHydration: , : , : , : ,
}, styleUrls: [], imports: [IconComponent, forwardRef(() => WindowToolbarContainerComponent)],
})
export class WindowHeaderComponent implements WinHeader {
size;
constructor(public windowState: WindowState, protected element: ElementRef);
getBottomPosition(): number;
maximize();
minimize();
close();
}
@Component({
selector: , template: ,
})
export class WindowToolbarComponent implements OnDestroy, OnInit {
for;
template?: TemplateRef<any>;
constructor(protected windowState: WindowState);
ngOnInit();
ngOnDestroy(): void;
}
@Component({
selector: , template: , styles: [], imports: [
NgTemplateOutlet,
],
})
export class WindowToolbarContainerComponent {
name;
windowState;
}
@Injectable()
export class WindowMenuState {
menus: MenuComponent[];
addMenu(menu: MenuComponent);
removeMenu(menu: MenuComponent);
build();
focus();
}
@Component({
selector: , template: , styleUrls: [],
})
export class WindowSidebarComponent implements OnDestroy {
template: TemplateRef<any>;
constructor(private content: WindowContentComponent);
ngOnDestroy();
}
@Component({
selector: , template: , styles: [], providers: [
WindowRegistry,
],
})
export class WindowManagerComponent {
templates;
open(component: any, options: {
[key: string]: any;
} = {}): void;
}
@Directive({
selector: , standalone: true,
})
export class WindowTemplateDirective {
constructor(private windowManager: WindowManagerComponent, public template: TemplateRef<any>, private element: ElementRef);
}
<dui-window-manager>
<window-posts *duiWindowTemplate />
</dui-window-manager>
@Injectable({ providedIn: })
export class WindowRegistry {
id;
registry;
windowHistory: Win[];
activeWindow?: Win;
getAllElectronWindows(): BrowserWindow[];
register(win: Win, state: WindowState, menu: WindowMenuState, viewContainerRef: ViewContainerRef);
/**
* Finds the activeWindow and returns its most outer parent.
*/
getOuterActiveWindow(): Win | undefined;
getCurrentViewContainerRef(): ViewContainerRef;
focus(win: Win);
blur(win: Win);
unregister(win: Win);
}
@Injectable()
export class WindowState {
buttonGroupAlignedToSidebar;
focus;
disableInputs;
toolbars;
addToolbarContainer(forName: string, template: TemplateRef<any>);
removeToolbarContainer(forName: string, template: TemplateRef<any>);
}
Functions
<T>(clazz: Type<T>): { provide: any; useExisting: any; multi: boolean; }
(target: HTMLElement | EventTarget | null, parent: HTMLElement): boolean
target
is children of parent
or if target
is parent
.(): boolean
(): boolean
(start: HTMLElement, className: string): HTMLElement | undefined
target
is children of parent
or if target
is parent
.(): void
(target: Element, allowedFocuses: Element[], onBlur: (event: FocusEvent) => void, customChecker?: (currentlyFocused: Element | null) => boolean): FocusWatcherUnsubscribe
(node: Element, passive?: boolean): () => void
(node: Element): Element[]
(index: number): number
(rect: DOMRect, direction: "row" | "column" | "row-reverse" | "column-reverse"): string
<T>(prototype: T, methods: (keyof T)[]): void
<T>(task: () => Promise<T>): () => Promise<T>
(element: Element, callback: (entry: DOMRectReadOnly) => void, debugPosition?: boolean): PositionObserverDisconnect
<T extends OnDestroy>(): (target: T, propertyKey: string | symbol) => void
(stateClass: ClassType): string[]
(state: EfficientState): any
(type: Type, paths?: string[], prefix?: string, state?: any[]): void
(stateClass: ClassType, localStorageKey?: string): { provide: ClassType<any>; deps: any[]; useFactory: (router: Router, injector: Injector) => any; }
(): Document | undefined
(): ElementRef<HTMLElement>
(value: number, min: number, max: number): number
(): void
<T extends Element | Document | Window, K extends keyof KeyMap, KeyMap extends GlobalEventHandlersEventMap = T extends Document ? DocumentEventMap : T extends Window ? WindowEventMap : HTMLElementEventMap>(element: T, type: K, listener: (ev: KeyMap[K]) => any, options?: AddEventListenerOptions): RegisterEventListenerRemove
(file: FilesystemApiFile): string
(file: FilesystemApiFile): string
(name: string): string
Types
type ElectronOrBrowserWindow = Window & {
setVibrancy?: (vibrancy: string) => void;
addListener?: (event: string, listener: (...args: any[]) => void) => void;
removeListener?: (event: string, listener: (...args: any[]) => void) => void;
};
type FocusWatcherUnsubscribe = () => void;
interface DuiDragEvent extends PointerEvent {
id: number;
deltaX: number;
deltaY: number;
}
interface DuiDragStartEvent extends DuiDragEvent {
/**
* If this is set to false, the drag will not be accepted.
*/
accept: boolean;
}
interface TemplateContext {
$implicit: MenuBase;
}
type PositionObserverDisconnect = () => void;
type PartOfUrl = TypeAnnotation<'partOfUrl'>;
type FilterActions<T> = { [name in keyof T]: T[name] extends (a: infer A extends [...a: any[]], ...args: any[]) => infer R ? (...args: A) => R : never };
type RegisterEventListenerRemove = () => void;
type HotKey = string;
interface FilePickerItem {
data: Uint8Array;
name: string;
mimeType: string;
}
type Inputs<T> = {
[P in keyof T]?: T[P] extends Signal<infer V> ? V : T[P];
}
interface FileQueueEntry {
name: string;
dir: string;
data: Uint8Array;
addFile: (name: string, dir: string, data: Uint8Array) => Promise<void>;
progress?: Progress;
abort?: () => void;
done?: true;
errored?: true;
aborted?: true;
}
interface FilesystemApiFile {
size: number;
lastModified?: Date;
visibility: string;
// not available in Filesystem
created?: Date;
mimeType: string;
path: string;
type: 'file' | 'directory';
}
interface FilesystemApi {
getPublicUrl(path: string): Promise<string>;
createFolder(path: string): Promise<void>;
getFile(path: string): Promise<FilesystemApiFile | undefined>;
getFiles(path: string): Promise<FilesystemApiFile[]>;
/**
* Return the full data of the file.
*/
getData(path: string): Promise<{ data: Uint8Array, mimeType: string } | undefined>;
// /**
// * Return a small preview of the file, e.g. for images or PDFs.
// * Could be just the full data if the file is not enormous.
// */
// getQuickLookData(path: string): Promise<{ data: Uint8Array, mimeType: string } | undefined>;
/**
* Returns an even smaller preview of the file, e.g. for images or PDFs.
* Best size is 256x256 pixels.
*/
getThumbnailData(path: string): Promise<{ data: Uint8Array, mimeType: string } | undefined>;
renameFile(path: string, newName: string): Promise<string>;
addFile(name: string, dir: string, data: Uint8Array): Promise<void>;
remove(paths: string[]): Promise<void>;
}
interface CacheData {
path: string;
aborted: WritableSignal<boolean>;
invalid: WritableSignal<boolean>;
result: WritableSignal<{ data: Uint8Array, mimeType: string } | undefined>;
progress: WritableSignal<number>;
disconnect: () => void;
}
type ElementWithThumbnail = Element & { thumbnail?: FilesystemFileThumbnail };
interface WinSidebar {
template: TemplateRef<any>;
}
interface WinHeader {
getBottomPosition(): number;
}
interface Win {
id: number;
browserWindow: BrowserWindow;
getClosestNonDialogWindow(): Win | undefined;
header: Signal<WinHeader | undefined>;
viewContainerRef: ViewContainerRef;
}
interface AlignedButtonGroup {
activateOneTimeAnimation: () => void;
}