ngx-kit 7.2.0 → 7.3.0
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/angle-selector/README.md +34 -34
- package/box-shadow/README.md +33 -33
- package/color-picker/README.md +52 -52
- package/{shared → core}/README.md +117 -117
- package/data-table/README.md +120 -120
- package/date-picker/README.md +74 -74
- package/dialog/README.md +122 -92
- package/drag-resize/README.md +53 -55
- package/fesm2022/ngx-kit-angle-selector.mjs +9 -26
- package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
- package/fesm2022/ngx-kit-box-shadow.mjs +330 -356
- package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
- package/fesm2022/ngx-kit-color-picker.mjs +132 -272
- package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
- package/fesm2022/{ngx-kit-shared.mjs → ngx-kit-core.mjs} +845 -277
- package/fesm2022/ngx-kit-core.mjs.map +1 -0
- package/fesm2022/ngx-kit-data-table.mjs +1 -1
- package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
- package/fesm2022/ngx-kit-date-picker.mjs +27 -21
- package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-dialog.mjs +430 -331
- package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
- package/fesm2022/ngx-kit-drag-resize.mjs +126 -45
- package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -1
- package/fesm2022/ngx-kit-drawer-menu.mjs +2 -2
- package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
- package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
- package/fesm2022/ngx-kit-gallery.mjs +3 -3
- package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
- package/fesm2022/ngx-kit-gradient-picker.mjs +20 -38
- package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-grid-layout.mjs +14 -14
- package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -1
- package/fesm2022/ngx-kit-image-editor.mjs +3 -3
- package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
- package/fesm2022/ngx-kit-menu.mjs +1 -1
- package/fesm2022/ngx-kit-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-message.mjs +1 -1
- package/fesm2022/ngx-kit-message.mjs.map +1 -1
- package/fesm2022/ngx-kit-notify.mjs +1 -1
- package/fesm2022/ngx-kit-notify.mjs.map +1 -1
- package/fesm2022/ngx-kit-time-picker.mjs +1 -1
- package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-virtual-scroll.mjs +2 -2
- package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -1
- package/gallery/README.md +71 -71
- package/gradient-picker/README.md +41 -41
- package/grid-layout/README.md +64 -64
- package/image-editor/README.md +44 -44
- package/menu/README.md +85 -85
- package/message/README.md +70 -70
- package/notify/README.md +56 -56
- package/package.json +5 -9
- package/time-picker/README.md +89 -89
- package/types/ngx-kit-angle-selector.d.ts +13 -16
- package/types/ngx-kit-box-shadow.d.ts +37 -95
- package/types/ngx-kit-color-picker.d.ts +61 -58
- package/types/{ngx-kit-shared.d.ts → ngx-kit-core.d.ts} +156 -34
- package/types/ngx-kit-data-table.d.ts +2 -2
- package/types/ngx-kit-date-picker.d.ts +1 -1
- package/types/ngx-kit-dialog.d.ts +208 -107
- package/types/ngx-kit-drag-resize.d.ts +33 -6
- package/types/ngx-kit-gradient-picker.d.ts +4 -7
- package/types/ngx-kit-menu.d.ts +1 -1
- package/types/ngx-kit-time-picker.d.ts +1 -1
- package/virtual-scroll/README.md +199 -199
- package/fesm2022/ngx-kit-shared.mjs.map +0 -1
- package/fesm2022/ngx-kit-webflow.mjs +0 -709
- package/fesm2022/ngx-kit-webflow.mjs.map +0 -1
- package/types/ngx-kit-webflow.d.ts +0 -286
|
@@ -1,140 +1,241 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, Injector, EnvironmentProviders, Type, InjectionToken } from '@angular/core';
|
|
3
|
+
import * as ngx_kit_dialog from 'ngx-kit/dialog';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import
|
|
5
|
+
import { OverlayRef } from 'ngx-kit/core';
|
|
6
|
+
import * as i1 from 'ngx-kit/drag-resize';
|
|
6
7
|
|
|
8
|
+
type NgxDialogFooterAlign = 'start' | 'end' | 'center' | 'space-between' | 'space-around';
|
|
9
|
+
declare class NgxDialogFooter implements OnInit, OnDestroy {
|
|
10
|
+
readonly align: _angular_core.InputSignal<NgxDialogFooterAlign>;
|
|
11
|
+
private readonly el;
|
|
12
|
+
private readonly dialogRef;
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
ngOnDestroy(): void;
|
|
15
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogFooter, never>;
|
|
16
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDialogFooter, "ngx-dialog-footer,[ngxDialogFooter]", ["ngxDialogFooter"], { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type NgxDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
20
|
+
interface NgxDialogHeaderConfig {
|
|
21
|
+
enable?: boolean;
|
|
22
|
+
title?: string;
|
|
23
|
+
showCloseButton?: boolean;
|
|
24
|
+
showMaximizeButton?: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface NgxDialogFooterConfig {
|
|
27
|
+
enable?: boolean;
|
|
28
|
+
/** Text for the auto-generated close button. Default: 'Close'. */
|
|
29
|
+
closeText?: string;
|
|
30
|
+
align?: NgxDialogFooterAlign;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* BREAKING CHANGE from the previous version of this config:
|
|
34
|
+
* - `allowCloseOnOutsideClick` -> `closeOnOutsideClick` (naming now matches
|
|
35
|
+
* `ngx-kit/overlay`'s options, which this service is built directly on).
|
|
36
|
+
* - `header`/`footer` are now actually wired up (previously declared but
|
|
37
|
+
* unused) - set `enable: true` to get an automatic header/footer without
|
|
38
|
+
* having to place the `ngxDialogHeader`/`ngxDialogFooter` directives
|
|
39
|
+
* yourself inside the content component.
|
|
40
|
+
*/
|
|
7
41
|
declare class NgxDialogConfig<DataType = any> {
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
allowCloseOnOutsideClick?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* container class
|
|
17
|
-
* - You can separate the list of classes with a space
|
|
18
|
-
* - for example:"`my class one two three ...`"
|
|
19
|
-
*
|
|
20
|
-
* TODO: must set with public config setter
|
|
21
|
-
*/
|
|
22
|
-
containerClass?: string | undefined;
|
|
23
|
-
header?: {
|
|
24
|
-
enable?: true;
|
|
25
|
-
title?: '';
|
|
26
|
-
showCloseButton?: true;
|
|
27
|
-
};
|
|
28
|
-
footer?: {
|
|
29
|
-
enable?: true;
|
|
30
|
-
};
|
|
42
|
+
/** Data made available to the content component (and to `ngx-dialog-panel`
|
|
43
|
+
* itself) via the `DIALOG_DATA` injection token. */
|
|
44
|
+
data?: DataType;
|
|
45
|
+
/** Named size preset - sets sensible min/max width bounds. Combine with
|
|
46
|
+
* `width`/`maxWidth`/... for full manual control. */
|
|
47
|
+
size?: NgxDialogSize;
|
|
31
48
|
width?: string;
|
|
32
49
|
minWidth?: string;
|
|
33
50
|
maxWidth?: string;
|
|
34
51
|
height?: string;
|
|
35
52
|
minHeight?: string;
|
|
36
53
|
maxHeight?: string;
|
|
37
|
-
/**
|
|
54
|
+
/** Extra class(es) on the dialog panel (the `ngx-dialog-panel` host). */
|
|
55
|
+
panelClass?: string | string[];
|
|
56
|
+
/** Extra class(es) on the backdrop element behind the panel. */
|
|
57
|
+
backdropClass?: string | string[];
|
|
58
|
+
header?: NgxDialogHeaderConfig;
|
|
59
|
+
footer?: NgxDialogFooterConfig;
|
|
60
|
+
/** Close when clicking outside the panel. Default: false (modal by default). */
|
|
61
|
+
closeOnOutsideClick?: boolean;
|
|
62
|
+
/** Close on Escape. Default: true. */
|
|
63
|
+
closeOnEscape?: boolean;
|
|
64
|
+
/** Shorthand for `closeOnOutsideClick: false, closeOnEscape: false` - the
|
|
65
|
+
* dialog can then only be closed programmatically (e.g. via its own
|
|
66
|
+
* buttons calling `dialogRef.close()`). */
|
|
67
|
+
disableClose?: boolean;
|
|
68
|
+
/** Synchronous guard consulted before Escape/outside-click would close the
|
|
69
|
+
* dialog - return `false` to block it (e.g. unsaved changes). Does not
|
|
70
|
+
* affect a programmatic `dialogRef.close()` call. */
|
|
71
|
+
beforeClose?: () => boolean;
|
|
72
|
+
/** Prevent the page behind the dialog from scrolling while it's open. Default: true. */
|
|
73
|
+
lockBodyScroll?: boolean;
|
|
74
|
+
/** Move focus into the dialog on open. Default: true. */
|
|
75
|
+
autoFocus?: boolean;
|
|
76
|
+
/** Restore focus to the previously focused element on close. Default: true. */
|
|
77
|
+
restoreFocus?: boolean;
|
|
78
|
+
/** Render via the native Popover API when supported. Default: true. */
|
|
79
|
+
usePopover?: boolean;
|
|
80
|
+
role?: 'dialog' | 'alertdialog';
|
|
81
|
+
ariaLabel?: string;
|
|
82
|
+
ariaLabelledby?: string;
|
|
83
|
+
ariaDescribedby?: string;
|
|
84
|
+
/** Entry animation for the panel. Default: 'zoom'. */
|
|
85
|
+
animation?: 'zoom' | 'fade' | 'slide-up' | 'none';
|
|
86
|
+
/** Parent injector for the content component (and `ngx-dialog-panel`
|
|
87
|
+
* itself). Defaults to the root injector. */
|
|
38
88
|
injector?: Injector;
|
|
39
|
-
constructor();
|
|
89
|
+
constructor(init?: Partial<NgxDialogConfig<DataType>>);
|
|
40
90
|
}
|
|
41
91
|
|
|
42
|
-
declare
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
92
|
+
declare function provideNgxDialog(config?: NgxDialogConfig): EnvironmentProviders;
|
|
93
|
+
|
|
94
|
+
declare class NgxDialogRef<R = any> {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
/** true from the moment `close()` is called, even before teardown finishes. */
|
|
97
|
+
readonly closing: _angular_core.WritableSignal<boolean>;
|
|
98
|
+
/** true once the dialog has been fully removed from the DOM. */
|
|
99
|
+
readonly closed: _angular_core.WritableSignal<boolean>;
|
|
47
100
|
private readonly _afterClosed;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
101
|
+
/** Emits the result exactly once, after the dialog has been fully torn down. */
|
|
102
|
+
readonly afterClosed: Observable<R | undefined>;
|
|
103
|
+
/** @internal set by the layout directives; read by NgxDialogBody to size itself. */
|
|
104
|
+
readonly headerEl: _angular_core.WritableSignal<HTMLElement | null>;
|
|
105
|
+
/** @internal */
|
|
106
|
+
readonly footerEl: _angular_core.WritableSignal<HTMLElement | null>;
|
|
107
|
+
/** @internal */
|
|
108
|
+
readonly bodyEl: _angular_core.WritableSignal<HTMLElement | null>;
|
|
109
|
+
/** @internal the dialog panel's own host element. */
|
|
110
|
+
readonly panelEl: _angular_core.WritableSignal<HTMLElement | null>;
|
|
111
|
+
/** Optional synchronous guard - return `false` to prevent Escape/outside-click from closing. */
|
|
112
|
+
beforeClose?: () => boolean;
|
|
113
|
+
private overlayRef?;
|
|
114
|
+
private result;
|
|
115
|
+
/** @internal used by NgxDialogService right after creating the overlay. */
|
|
116
|
+
_attachOverlayRef(ref: OverlayRef<unknown>): void;
|
|
117
|
+
/** @internal used by the header/footer/body directives and the panel component. */
|
|
118
|
+
_setHeaderElement(el: HTMLElement | null): void;
|
|
119
|
+
/** @internal */
|
|
120
|
+
_setFooterElement(el: HTMLElement | null): void;
|
|
121
|
+
/** @internal */
|
|
122
|
+
_setBodyElement(el: HTMLElement | null): void;
|
|
123
|
+
/** @internal */
|
|
124
|
+
_setPanelElement(el: HTMLElement | null): void;
|
|
125
|
+
/** Closes the dialog and emits `result` on `afterClosed` once torn down. Idempotent. */
|
|
126
|
+
close(result?: R): void;
|
|
127
|
+
/** @internal called by NgxDialogService's `onClosed` callback once the overlay is fully torn down. */
|
|
128
|
+
_finalizeClose(): void;
|
|
51
129
|
}
|
|
52
130
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
131
|
+
/**
|
|
132
|
+
* The dialog "panel" shell. It no longer owns the backdrop, centering,
|
|
133
|
+
* focus trap, Escape handling or outside-click handling - all of that now
|
|
134
|
+
* lives in `OverlayService`, which this component is rendered inside of.
|
|
135
|
+
* This is intentionally a thin, fully signal-driven shell: no
|
|
136
|
+
* `AfterViewInit`, no manual `ChangeDetectorRef.detectChanges()`, no
|
|
137
|
+
* imperative style writes. Angular schedules change detection automatically
|
|
138
|
+
* whenever a signal read from the template changes, including in zoneless
|
|
139
|
+
* apps.
|
|
140
|
+
*/
|
|
141
|
+
declare class NgxDialogComponent {
|
|
142
|
+
protected readonly dialogRef: NgxDialogRef<any>;
|
|
143
|
+
protected readonly config: ngx_kit_dialog.NgxDialogConfig<any>;
|
|
144
|
+
protected readonly content: _angular_core.Type<any>;
|
|
145
|
+
protected readonly sizeClass: _angular_core.Signal<string>;
|
|
61
146
|
constructor();
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
ngOnDestroy(): void;
|
|
65
|
-
onOverlayClicked(evt: MouseEvent): void;
|
|
66
|
-
onDialogClicked(evt: MouseEvent): void;
|
|
67
|
-
close(): void;
|
|
68
|
-
setStyle(): void;
|
|
69
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxDialogComponent, "ng-component", never, {}, {}, never, never, false, never>;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare class NgxOverlayService {
|
|
74
|
-
private appRef;
|
|
75
|
-
private injector;
|
|
76
|
-
private envInjector;
|
|
77
|
-
dialogComponentRefs: ComponentRef<NgxDialogComponent>[];
|
|
78
|
-
_defaultOptions: NgxDialogConfig | undefined;
|
|
79
|
-
constructor(appRef: ApplicationRef, injector: Injector, envInjector: EnvironmentInjector);
|
|
80
|
-
open(component: Type<any>, config?: NgxDialogConfig): NgxDialogRef;
|
|
81
|
-
private _open;
|
|
82
|
-
private removeDialogComponentFromBody;
|
|
83
|
-
private appendDialogComponentToBody;
|
|
84
|
-
closeAll(): void;
|
|
85
|
-
private get getDialogId();
|
|
86
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxOverlayService, never>;
|
|
87
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxOverlayService>;
|
|
147
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogComponent, never>;
|
|
148
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxDialogComponent, "ngx-dialog-panel", never, {}, {}, never, never, true, never>;
|
|
88
149
|
}
|
|
89
150
|
|
|
90
|
-
declare class
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
private
|
|
95
|
-
|
|
151
|
+
declare class NgxDialogHeader implements OnInit {
|
|
152
|
+
private config;
|
|
153
|
+
readonly showCloseButton: _angular_core.InputSignal<boolean>;
|
|
154
|
+
readonly showMaximizeButton: _angular_core.InputSignal<boolean>;
|
|
155
|
+
private readonly el;
|
|
156
|
+
private readonly document;
|
|
157
|
+
private readonly dialogRef;
|
|
158
|
+
private readonly drag;
|
|
159
|
+
private isMaximized;
|
|
96
160
|
ngOnInit(): void;
|
|
97
|
-
|
|
98
|
-
static
|
|
161
|
+
private fullScreen;
|
|
162
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogHeader, never>;
|
|
163
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDialogHeader, "ngx-dialog-header,[ngxDialogHeader]", ["ngxDialogHeader"], { "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "showMaximizeButton": { "alias": "showMaximizeButton"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgxDraggable; inputs: {}; outputs: {}; }]>;
|
|
99
164
|
}
|
|
100
165
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Why this can't be pure CSS flexbox: the header/body/footer elements are
|
|
168
|
+
* *grandchildren* of the dialog panel (panel -> `*ngComponentOutlet`'s host
|
|
169
|
+
* element -> header/body/footer), not direct children, because the content
|
|
170
|
+
* component that hosts them is arbitrary and we don't control its own host
|
|
171
|
+
* styling. `display:flex;flex-direction:column` on the panel therefore can't
|
|
172
|
+
* size the body against the header/footer through that extra layer, so we
|
|
173
|
+
* measure and set an explicit `max-height` instead, driven by a
|
|
174
|
+
* `ResizeObserver` on the panel (not a `window:resize` listener, so it also
|
|
175
|
+
* reacts to the dialog itself changing size, e.g. via `config.size`).
|
|
176
|
+
*/
|
|
177
|
+
declare class NgxDialogBody {
|
|
178
|
+
private readonly el;
|
|
179
|
+
private readonly renderer;
|
|
180
|
+
private readonly dialogRef;
|
|
181
|
+
private readonly destroyRef;
|
|
182
|
+
constructor();
|
|
183
|
+
private recomputeHeight;
|
|
184
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogBody, never>;
|
|
185
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDialogBody, "ngx-dialog-body,[ngxDialogBody]", ["ngxDialogBody"], {}, {}, never, never, true, never>;
|
|
109
186
|
}
|
|
110
187
|
|
|
111
|
-
declare class
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
private _dialogRef;
|
|
116
|
-
constructor(_el: ElementRef<HTMLElement>, _renderer: Renderer2);
|
|
117
|
-
ngAfterViewInit(): void;
|
|
118
|
-
onWindowResize(ev?: Event): void;
|
|
119
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogBodyDirective, never>;
|
|
120
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDialogBodyDirective, "ngx-dialog-body,[ngxDialogBody]", ["ngxDialogBody"], {}, {}, never, never, false, never>;
|
|
188
|
+
declare class NgxDialogModule {
|
|
189
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogModule, never>;
|
|
190
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<NgxDialogModule, never, [typeof NgxDialogComponent, typeof NgxDialogHeader, typeof NgxDialogFooter, typeof NgxDialogBody], [typeof NgxDialogComponent, typeof NgxDialogHeader, typeof NgxDialogFooter, typeof NgxDialogBody]>;
|
|
191
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<NgxDialogModule>;
|
|
121
192
|
}
|
|
122
193
|
|
|
123
|
-
declare class
|
|
124
|
-
private readonly
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
194
|
+
declare class NgxDialogService {
|
|
195
|
+
private readonly overlay;
|
|
196
|
+
private readonly injector;
|
|
197
|
+
private readonly _openRefs;
|
|
198
|
+
/** Every currently open dialog, oldest first. */
|
|
199
|
+
readonly openDialogs: _angular_core.Signal<NgxDialogRef<any>[]>;
|
|
200
|
+
/** How many dialogs are currently open. */
|
|
201
|
+
readonly openCount: _angular_core.Signal<number>;
|
|
202
|
+
readonly defaultConfig: NgxDialogConfig<any>;
|
|
203
|
+
/**
|
|
204
|
+
* Opens `content` inside a dialog panel and returns a ref you can use to
|
|
205
|
+
* close it and read the result back (`afterClosed`).
|
|
206
|
+
*/
|
|
207
|
+
open<R = any, DataType = any>(content: Type<any>, config?: Partial<NgxDialogConfig<DataType>>): NgxDialogRef<R>;
|
|
208
|
+
/** Closes every currently open dialog (ignores `disableClose`/guards - use sparingly, e.g. on logout). */
|
|
209
|
+
closeAll(): void;
|
|
210
|
+
private applySizing;
|
|
211
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogService, never>;
|
|
212
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgxDialogService>;
|
|
129
213
|
}
|
|
130
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Static convenience API over `NgxDialogService`, so you can call
|
|
217
|
+
* `Dialog.open(...)` from anywhere without injecting the service manually.
|
|
218
|
+
*
|
|
219
|
+
* SSR note: the instance backing this static class is process-wide, not
|
|
220
|
+
* per-request, so it is deliberately left unset on the server (see
|
|
221
|
+
* `provideNgxDialog()`). Inject `NgxDialogService` directly in SSR code paths.
|
|
222
|
+
*/
|
|
131
223
|
declare class Dialog {
|
|
132
224
|
private static serviceInstance;
|
|
133
|
-
|
|
134
|
-
static
|
|
225
|
+
/** @internal set by `provideNgxDialog()`'s environment initializer. */
|
|
226
|
+
static _setService(svc: NgxDialogService): void;
|
|
227
|
+
private static get service();
|
|
228
|
+
static open<R = any, DataType = any>(component: Type<any>, config?: Partial<NgxDialogConfig<DataType>>): NgxDialogRef<R>;
|
|
229
|
+
static closeAll(): void;
|
|
135
230
|
}
|
|
136
231
|
|
|
137
232
|
declare const DIALOG_DATA: InjectionToken<any>;
|
|
138
|
-
declare const DIALOG_REF: InjectionToken<NgxDialogRef
|
|
233
|
+
declare const DIALOG_REF: InjectionToken<NgxDialogRef<any>>;
|
|
234
|
+
/** The resolved config for the dialog currently being rendered. */
|
|
235
|
+
declare const NGX_DIALOG_DEFAULT_CONFIG: NgxDialogConfig<any>;
|
|
236
|
+
declare const NGX_DIALOG_CONFIG: InjectionToken<NgxDialogConfig<any>>;
|
|
237
|
+
/** The arbitrary content component passed to `open()`, projected via `*ngComponentOutlet`. */
|
|
238
|
+
declare const DIALOG_CONTENT: InjectionToken<Type<any>>;
|
|
139
239
|
|
|
140
|
-
export { DIALOG_DATA, DIALOG_REF, Dialog,
|
|
240
|
+
export { DIALOG_CONTENT, DIALOG_DATA, DIALOG_REF, Dialog, NGX_DIALOG_CONFIG, NGX_DIALOG_DEFAULT_CONFIG, NgxDialogBody, NgxDialogComponent, NgxDialogConfig, NgxDialogFooter, NgxDialogHeader, NgxDialogModule, NgxDialogService, provideNgxDialog };
|
|
241
|
+
export type { NgxDialogFooterAlign, NgxDialogFooterConfig, NgxDialogHeaderConfig, NgxDialogSize };
|
|
@@ -90,6 +90,7 @@ declare class DragRef<T = unknown> {
|
|
|
90
90
|
private previousZIndex;
|
|
91
91
|
private moveDx;
|
|
92
92
|
private moveDy;
|
|
93
|
+
private scrollCompensation;
|
|
93
94
|
private preview?;
|
|
94
95
|
private previewOffsetX;
|
|
95
96
|
private previewOffsetY;
|
|
@@ -110,6 +111,12 @@ declare class DragRef<T = unknown> {
|
|
|
110
111
|
get pointer(): IPosition;
|
|
111
112
|
get start(): DOMRect;
|
|
112
113
|
getPlaceholderElement(): HTMLElement | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* صدا زده میشود هر بار که container یا window در حین درگ اسکرول شود
|
|
116
|
+
* (چه توسط auto-scroll خودمان، چه با wheel/اسکرولبار دستی کاربر).
|
|
117
|
+
* transform را فوراً تصحیح میکند تا عنصر زیر پوینتر بماند.
|
|
118
|
+
*/
|
|
119
|
+
notifyScroll(dx: number, dy: number): void;
|
|
113
120
|
private applyTransform;
|
|
114
121
|
private updatePreview;
|
|
115
122
|
}
|
|
@@ -167,9 +174,9 @@ declare class NgxDraggable<T = unknown> implements OnInit, OnDestroy {
|
|
|
167
174
|
readonly disabled: _angular_core.ModelSignal<boolean>;
|
|
168
175
|
/** Element whose rect constrains the drag. Now actually enforced. */
|
|
169
176
|
readonly boundary: _angular_core.InputSignal<HTMLElement | undefined>;
|
|
170
|
-
readonly dragRootElement: _angular_core.
|
|
177
|
+
readonly dragRootElement: _angular_core.ModelSignal<string>;
|
|
171
178
|
/** CSS selector for a drag handle. When set, only pointerdowns inside it start a drag. */
|
|
172
|
-
readonly dragHandle: _angular_core.
|
|
179
|
+
readonly dragHandle: _angular_core.ModelSignal<string>;
|
|
173
180
|
/** Restrict movement to a single axis. */
|
|
174
181
|
readonly lockAxis: _angular_core.InputSignal<DragAxis>;
|
|
175
182
|
/** Minimum pointer travel (px) before a drag starts, so clicks still register normally. */
|
|
@@ -192,15 +199,27 @@ declare class NgxDraggable<T = unknown> implements OnInit, OnDestroy {
|
|
|
192
199
|
private down;
|
|
193
200
|
private start;
|
|
194
201
|
private pointerId;
|
|
202
|
+
private lastPointer;
|
|
195
203
|
private removeDown?;
|
|
196
204
|
private removeMove?;
|
|
197
205
|
private removeUp?;
|
|
198
206
|
private removeKeydown?;
|
|
199
207
|
private removeEscape?;
|
|
208
|
+
private scrollTarget;
|
|
209
|
+
private lastScroll;
|
|
210
|
+
private lastWindowScroll;
|
|
211
|
+
private removeContainerScroll?;
|
|
212
|
+
private removeWindowScroll?;
|
|
200
213
|
constructor(host: ElementRef<HTMLElement>, renderer: Renderer2);
|
|
201
214
|
ngOnInit(): void;
|
|
202
215
|
ngOnDestroy(): void;
|
|
203
216
|
private pointerDown;
|
|
217
|
+
private applyDragUpdate;
|
|
218
|
+
/** فراخوانی میشود دقیقاً وقتی drag واقعاً شروع میشود (چه با موس، چه با کیبورد). */
|
|
219
|
+
private startScrollTracking;
|
|
220
|
+
private handleContainerScroll;
|
|
221
|
+
private handleWindowScroll;
|
|
222
|
+
private stopScrollTracking;
|
|
204
223
|
private pointerMove;
|
|
205
224
|
private pointerUp;
|
|
206
225
|
private cancel;
|
|
@@ -210,7 +229,7 @@ declare class NgxDraggable<T = unknown> implements OnInit, OnDestroy {
|
|
|
210
229
|
private isOnHandle;
|
|
211
230
|
private isInteractive;
|
|
212
231
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDraggable<any>, never>;
|
|
213
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDraggable<any>, "[NgxDraggable],[ngxDraggable]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "boundary": { "alias": "boundary"; "required": false; "isSignal": true; }; "dragRootElement": { "alias": "dragRootElement"; "required": false; "isSignal": true; }; "dragHandle": { "alias": "dragHandle"; "required": false; "isSignal": true; }; "lockAxis": { "alias": "lockAxis"; "required": false; "isSignal": true; }; "dragThreshold": { "alias": "dragThreshold"; "required": false; "isSignal": true; }; "keyboardStep": { "alias": "keyboardStep"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; }; }, { "disabled": "disabledChange"; "dragStart": "dragStart"; "dragMove": "dragMove"; "dragEnd": "dragEnd"; }, never, never, true, never>;
|
|
232
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDraggable<any>, "[NgxDraggable],[ngxDraggable]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "boundary": { "alias": "boundary"; "required": false; "isSignal": true; }; "dragRootElement": { "alias": "dragRootElement"; "required": false; "isSignal": true; }; "dragHandle": { "alias": "dragHandle"; "required": false; "isSignal": true; }; "lockAxis": { "alias": "lockAxis"; "required": false; "isSignal": true; }; "dragThreshold": { "alias": "dragThreshold"; "required": false; "isSignal": true; }; "keyboardStep": { "alias": "keyboardStep"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; }; }, { "disabled": "disabledChange"; "dragRootElement": "dragRootElementChange"; "dragHandle": "dragHandleChange"; "dragStart": "dragStart"; "dragMove": "dragMove"; "dragEnd": "dragEnd"; }, never, never, true, never>;
|
|
214
233
|
}
|
|
215
234
|
|
|
216
235
|
declare class NgxResizable {
|
|
@@ -341,15 +360,23 @@ declare class AutoScroller {
|
|
|
341
360
|
private raf;
|
|
342
361
|
private container;
|
|
343
362
|
private speed;
|
|
363
|
+
private onTick?;
|
|
344
364
|
private readonly edge;
|
|
345
365
|
private readonly maxSpeed;
|
|
346
366
|
constructor(edge?: number, maxSpeed?: number);
|
|
347
|
-
|
|
348
|
-
|
|
367
|
+
/** onTick اجرا میشود بعد از هر گام اسکرول، تا با آخرین موقعیت pointer، sort/placeholder بهروز شود. */
|
|
368
|
+
start(fromEl: HTMLElement, onTick?: () => void): void;
|
|
369
|
+
/** فقط container را عوض میکند بدون قطع حلقهی در حال اجرا یا صفر کردن speed. */
|
|
370
|
+
retarget(fromEl: HTMLElement): void;
|
|
349
371
|
update(clientX: number, clientY: number): void;
|
|
350
372
|
stop(): void;
|
|
351
373
|
private tick;
|
|
352
374
|
}
|
|
375
|
+
declare function findScrollableAncestor(el: HTMLElement): HTMLElement | Window;
|
|
376
|
+
declare function getScrollPosition(container: HTMLElement | Window): {
|
|
377
|
+
left: number;
|
|
378
|
+
top: number;
|
|
379
|
+
};
|
|
353
380
|
|
|
354
381
|
declare function moveItemInArray<T>(array: T[], from: number, to: number): void;
|
|
355
382
|
declare function transferArrayItem<T>(src: T[], dst: T[], from: number, to: number): void;
|
|
@@ -364,5 +391,5 @@ declare function transferArrayItem<T>(src: T[], dst: T[], from: number, to: numb
|
|
|
364
391
|
*/
|
|
365
392
|
declare function copyArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
|
|
366
393
|
|
|
367
|
-
export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, getPageZoom, isRtl, moveItemInArray, resolveLogicalDirection, transferArrayItem };
|
|
394
|
+
export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, findScrollableAncestor, getPageZoom, getScrollPosition, isRtl, moveItemInArray, resolveLogicalDirection, transferArrayItem };
|
|
368
395
|
export type { DragAxis, IDropEvent, IPosition, IResizableOutput, LogicalResizeDirection, ResizeDirection };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, OnDestroy, EventEmitter, ChangeDetectorRef, AfterViewInit, ElementRef, Renderer2, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
4
|
-
import { BrowserService, RangeSliderComponent, OverlayService } from 'ngx-kit/
|
|
4
|
+
import { BrowserService, RangeSliderComponent, OverlayService } from 'ngx-kit/core';
|
|
5
5
|
|
|
6
6
|
interface GradientStop {
|
|
7
7
|
id: string;
|
|
@@ -13,8 +13,6 @@ type GradientType = 'linear' | 'radial';
|
|
|
13
13
|
declare class NgxInputGradientComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator {
|
|
14
14
|
private cd;
|
|
15
15
|
browserService: BrowserService;
|
|
16
|
-
theme: 'light' | 'dark';
|
|
17
|
-
set setTheme(val: 'light' | 'dark' | 'auto');
|
|
18
16
|
change: EventEmitter<string>;
|
|
19
17
|
defaultGradients: string[];
|
|
20
18
|
resultGradient: string;
|
|
@@ -46,7 +44,7 @@ declare class NgxInputGradientComponent implements OnInit, OnDestroy, ControlVal
|
|
|
46
44
|
setDefaultGradients(): void;
|
|
47
45
|
onSelectDefault(item: string, i: number): void;
|
|
48
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputGradientComponent, never>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxInputGradientComponent, "ngx-input-gradient", never, {
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxInputGradientComponent, "ngx-input-gradient", never, {}, { "change": "change"; }, never, never, true, never>;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
declare class NgxInputGradient implements AfterViewInit, OnDestroy, ControlValueAccessor, Validator {
|
|
@@ -55,7 +53,6 @@ declare class NgxInputGradient implements AfterViewInit, OnDestroy, ControlValue
|
|
|
55
53
|
private viewContainerRef;
|
|
56
54
|
private overlayService;
|
|
57
55
|
setInputBackground: boolean;
|
|
58
|
-
theme: 'light' | 'dark' | 'auto';
|
|
59
56
|
private _targetInput?;
|
|
60
57
|
set ngxInputColor(el: HTMLInputElement | ElementRef<HTMLInputElement> | null | undefined | '');
|
|
61
58
|
change: EventEmitter<string>;
|
|
@@ -76,11 +73,11 @@ declare class NgxInputGradient implements AfterViewInit, OnDestroy, ControlValue
|
|
|
76
73
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
77
74
|
ngOnDestroy(): void;
|
|
78
75
|
writeValue(val: any): void;
|
|
79
|
-
|
|
76
|
+
toggle(): void;
|
|
80
77
|
destroyPicker(): void;
|
|
81
78
|
private emitChange;
|
|
82
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputGradient, never>;
|
|
83
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxInputGradient, "[ngxInputGradient]", never, { "setInputBackground": { "alias": "setInputBackground"; "required": false; }; "
|
|
80
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxInputGradient, "[ngxInputGradient]", never, { "setInputBackground": { "alias": "setInputBackground"; "required": false; }; "ngxInputColor": { "alias": "ngxInputColor"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
export { NgxInputGradient, NgxInputGradientComponent };
|
package/types/ngx-kit-menu.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { TemplateRef, OnDestroy, ElementRef, ApplicationRef } from '@angular/core';
|
|
3
|
-
import { OverlayRef, Placement, Alignment, OverlayService } from 'ngx-kit/
|
|
3
|
+
import { OverlayRef, Placement, Alignment, OverlayService } from 'ngx-kit/core';
|
|
4
4
|
|
|
5
5
|
interface MenuContext {
|
|
6
6
|
close(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ngx_kit_time_picker from 'ngx-kit/time-picker';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { OnInit, ElementRef, InjectionToken, Provider } from '@angular/core';
|
|
4
|
-
import { BrowserService } from 'ngx-kit/
|
|
4
|
+
import { BrowserService } from 'ngx-kit/core';
|
|
5
5
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
6
6
|
|
|
7
7
|
declare type NgxTimePickerMode = 'hour' | 'minute';
|