ngx-kit 6.3.0 → 7.0.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.
Files changed (67) hide show
  1. package/README.md +3 -3
  2. package/angle-selector/README.md +34 -34
  3. package/box-shadow/README.md +33 -33
  4. package/color-picker/README.md +52 -49
  5. package/data-table/README.md +120 -113
  6. package/date-picker/README.md +74 -69
  7. package/dialog/README.md +92 -92
  8. package/drag-resize/README.md +55 -0
  9. package/dropzone/README.md +422 -422
  10. package/fesm2022/ngx-kit-angle-selector.mjs +2 -2
  11. package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
  12. package/fesm2022/ngx-kit-box-shadow.mjs +2 -2
  13. package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
  14. package/fesm2022/ngx-kit-color-picker.mjs +265 -73
  15. package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
  16. package/fesm2022/ngx-kit-data-table.mjs +2 -2
  17. package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
  18. package/fesm2022/ngx-kit-date-picker.mjs +7 -9
  19. package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
  20. package/fesm2022/ngx-kit-dialog.mjs +3 -3
  21. package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
  22. package/fesm2022/ngx-kit-drag-resize.mjs +1664 -0
  23. package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -0
  24. package/fesm2022/ngx-kit-drawer-menu.mjs +389 -285
  25. package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
  26. package/fesm2022/ngx-kit-dropzone.mjs +2 -2
  27. package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
  28. package/fesm2022/ngx-kit-form-field.mjs +3 -5
  29. package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
  30. package/fesm2022/ngx-kit-gallery.mjs +2 -2
  31. package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
  32. package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
  33. package/fesm2022/ngx-kit-grid-layout.mjs +927 -0
  34. package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -0
  35. package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
  36. package/fesm2022/ngx-kit-menu.mjs +8 -8
  37. package/fesm2022/ngx-kit-menu.mjs.map +1 -1
  38. package/fesm2022/ngx-kit-message.mjs.map +1 -1
  39. package/fesm2022/ngx-kit-notify.mjs +2 -2
  40. package/fesm2022/ngx-kit-notify.mjs.map +1 -1
  41. package/fesm2022/ngx-kit-shared.mjs +54 -3
  42. package/fesm2022/ngx-kit-shared.mjs.map +1 -1
  43. package/fesm2022/ngx-kit-time-picker.mjs +2 -2
  44. package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
  45. package/fesm2022/ngx-kit-virtual-scroll.mjs +392 -0
  46. package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -0
  47. package/fesm2022/ngx-kit-webflow.mjs +709 -0
  48. package/fesm2022/ngx-kit-webflow.mjs.map +1 -0
  49. package/gallery/README.md +71 -71
  50. package/gradient-picker/README.md +41 -41
  51. package/grid-layout/README.md +64 -0
  52. package/image-editor/README.md +12 -12
  53. package/menu/README.md +85 -85
  54. package/message/README.md +70 -70
  55. package/notify/README.md +56 -58
  56. package/package.json +17 -1
  57. package/shared/README.md +117 -117
  58. package/time-picker/README.md +89 -95
  59. package/types/ngx-kit-color-picker.d.ts +72 -16
  60. package/types/ngx-kit-drag-resize.d.ts +368 -0
  61. package/types/ngx-kit-drawer-menu.d.ts +135 -86
  62. package/types/ngx-kit-grid-layout.d.ts +310 -0
  63. package/types/ngx-kit-image-editor.d.ts +1 -1
  64. package/types/ngx-kit-shared.d.ts +12 -1
  65. package/types/ngx-kit-virtual-scroll.d.ts +179 -0
  66. package/types/ngx-kit-webflow.d.ts +286 -0
  67. package/virtual-scroll/README.md +199 -0
@@ -1,95 +1,89 @@
1
- # ngx-kit/time-picker
2
-
3
- An analog clock time picker (MUI-style), usable either inline or as a popup attached to a text input, with 12h/24h format support and a configurable minute step.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install ngx-kit
9
- ```
10
-
11
- ## Setup (optional)
12
-
13
- ```ts
14
- // app.config.ts
15
- import { provideTimePicker } from 'ngx-kit/time-picker';
16
-
17
- export const appConfig: ApplicationConfig = {
18
- providers: [
19
- provideTimePicker({
20
- format: '24',
21
- minuteStep: 5,
22
- confirmButtonText: 'Done',
23
- }),
24
- ],
25
- };
26
- ```
27
-
28
- `provideTimePicker` only needs the fields you want to override — everything else falls back to the defaults (`confirmButtonText: 'Ok'`, `cancelButtonText: 'Cancel'`, `amText: 'AM'`, `pmText: 'PM'`, `format: '12'`, `minuteStep: 1`, `autoSwitchToMinute: true`).
29
-
30
- ## Usage — popup attached to an input
31
-
32
- ```html
33
- <input
34
- type="text"
35
- formControlName="time"
36
- ngxInputTimePicker
37
- #dp="ngxInputTimePicker"
38
- />
39
- <button (click)="dp.toggle()">Open</button>
40
- ```
41
-
42
- `[ngxInputTimePicker]` is a full `ControlValueAccessor` + `Validator`, so it works with `ngModel`/`formControl`/`formControlName`. The value is always a string in `HH:MM` (24h) form, e.g. `'14:35'`.
43
-
44
- If the typed text isn't a valid time, the control gets a `{ invalid: true }` error (in addition to whatever built-in validators like `Validators.required` you add yourself):
45
-
46
- ```html
47
- @if (form.get('time')?.hasError('invalid')) {
48
- <div class="text-danger">Invalid time</div>
49
- }
50
- @if (form.get('time')?.hasError('required')) {
51
- <div class="text-danger">Time is required</div>
52
- }
53
- ```
54
-
55
- ## Usage — inline (always visible)
56
-
57
- ```html
58
- <ngx-time-picker format="24" [(value)]="time" (change)="onTimeChange($event)"></ngx-time-picker>
59
- ```
60
-
61
- ## API
62
-
63
- ### `[ngxInputTimePicker]`
64
-
65
- | Input | Type | Default | Description |
66
- | --- | --- | --- | --- |
67
- | `openOnCLick` | `boolean` | `true` | Open the popup when the input itself is clicked |
68
- | `format` | `'12' \| '24'` | from config | |
69
-
70
- | Output | Type | Description |
71
- | --- | --- | --- |
72
- | `change` | `EventEmitter<string \| null>` | Emitted when the user confirms a time |
73
-
74
- | Member | Description |
75
- | --- | --- |
76
- | `toggle()` | Opens the popup if closed, closes it if open |
77
-
78
- ### `<ngx-time-picker>`
79
-
80
- | Input | Type | Default | Description |
81
- | --- | --- | --- | --- |
82
- | `value` (model, two-way) | `string` | `'12:00'` | Bind with `[(value)]` |
83
- | `format` | `'12' \| '24'` | from config | |
84
- | `minuteStep` | `number` | from config | |
85
- | `disabled` | `boolean` | `false` | |
86
- | `autoSwitchToMinute` | `boolean` | from config | Switch to minute-selection mode right after picking the hour |
87
-
88
- | Output | Type | Description |
89
- | --- | --- | --- |
90
- | `change` | `EventEmitter<string \| null>` | Emitted when "OK" is pressed |
91
- | `cancel` | `EventEmitter<void>` | Emitted when "Cancel" is pressed |
92
-
93
- ## Dark mode and RTL
94
-
95
- Supported automatically.
1
+ # ngx-kit/time-picker
2
+
3
+ An analog clock time picker (MUI-style), usable either inline or as a popup attached to a text input, with 12h/24h format support and a configurable minute step.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install ngx-kit
9
+ ```
10
+
11
+ ## Setup (optional)
12
+
13
+ ```ts
14
+ // app.config.ts
15
+ import { provideTimePicker } from 'ngx-kit/time-picker';
16
+
17
+ export const appConfig: ApplicationConfig = {
18
+ providers: [
19
+ provideTimePicker({
20
+ format: '24',
21
+ minuteStep: 5,
22
+ confirmButtonText: 'Done',
23
+ }),
24
+ ],
25
+ };
26
+ ```
27
+
28
+ `provideTimePicker` only needs the fields you want to override — everything else falls back to the defaults (`confirmButtonText: 'Ok'`, `cancelButtonText: 'Cancel'`, `amText: 'AM'`, `pmText: 'PM'`, `format: '12'`, `minuteStep: 1`, `autoSwitchToMinute: true`).
29
+
30
+ ## Usage — popup attached to an input
31
+
32
+ ```html
33
+ <input type="text" formControlName="time" ngxInputTimePicker #dp="ngxInputTimePicker" />
34
+ <button (click)="dp.toggle()">Open</button>
35
+ ```
36
+
37
+ `[ngxInputTimePicker]` is a full `ControlValueAccessor` + `Validator`, so it works with `ngModel`/`formControl`/`formControlName`. The value is always a string in `HH:MM` (24h) form, e.g. `'14:35'`.
38
+
39
+ If the typed text isn't a valid time, the control gets a `{ invalid: true }` error (in addition to whatever built-in validators like `Validators.required` you add yourself):
40
+
41
+ ```html
42
+ @if (form.get('time')?.hasError('invalid')) {
43
+ <div class="text-danger">Invalid time</div>
44
+ } @if (form.get('time')?.hasError('required')) {
45
+ <div class="text-danger">Time is required</div>
46
+ }
47
+ ```
48
+
49
+ ## Usage — inline (always visible)
50
+
51
+ ```html
52
+ <ngx-time-picker format="24" [(value)]="time" (change)="onTimeChange($event)"></ngx-time-picker>
53
+ ```
54
+
55
+ ## API
56
+
57
+ ### `[ngxInputTimePicker]`
58
+
59
+ | Input | Type | Default | Description |
60
+ | ------------- | -------------- | ----------- | ----------------------------------------------- |
61
+ | `openOnCLick` | `boolean` | `true` | Open the popup when the input itself is clicked |
62
+ | `format` | `'12' \| '24'` | from config | |
63
+
64
+ | Output | Type | Description |
65
+ | -------- | ------------------------------ | ------------------------------------- |
66
+ | `change` | `EventEmitter<string \| null>` | Emitted when the user confirms a time |
67
+
68
+ | Member | Description |
69
+ | ---------- | -------------------------------------------- |
70
+ | `toggle()` | Opens the popup if closed, closes it if open |
71
+
72
+ ### `<ngx-time-picker>`
73
+
74
+ | Input | Type | Default | Description |
75
+ | ------------------------ | -------------- | ----------- | ------------------------------------------------------------ |
76
+ | `value` (model, two-way) | `string` | `'12:00'` | Bind with `[(value)]` |
77
+ | `format` | `'12' \| '24'` | from config | |
78
+ | `minuteStep` | `number` | from config | |
79
+ | `disabled` | `boolean` | `false` | |
80
+ | `autoSwitchToMinute` | `boolean` | from config | Switch to minute-selection mode right after picking the hour |
81
+
82
+ | Output | Type | Description |
83
+ | -------- | ------------------------------ | -------------------------------- |
84
+ | `change` | `EventEmitter<string \| null>` | Emitted when "OK" is pressed |
85
+ | `cancel` | `EventEmitter<void>` | Emitted when "Cancel" is pressed |
86
+
87
+ ## Dark mode and RTL
88
+
89
+ Supported automatically.
@@ -178,41 +178,97 @@ declare class NgxInputColorComponent implements OnInit, OnDestroy, ControlValueA
178
178
  }
179
179
 
180
180
  declare class NgxInputColor implements AfterViewInit, OnDestroy, ControlValueAccessor, Validator {
181
- private el;
182
- private renderer;
183
- private viewContainerRef;
184
- private overlayService;
181
+ private readonly el;
182
+ private readonly renderer;
183
+ private readonly viewContainerRef;
184
+ private readonly overlayService;
185
185
  setInputBackgroundColor: boolean;
186
186
  defaultInspector: ColorInspector;
187
187
  simpleMode: boolean;
188
188
  outputType: OutputType;
189
189
  theme: 'light' | 'dark' | 'auto';
190
190
  private useAlphaChannel;
191
- set setUseAlphaChannel(val: boolean);
192
- private boundInputHandler;
193
- private _targetInput?;
194
- set ngxInputColor(el: HTMLInputElement | ElementRef<HTMLInputElement> | null | undefined | '');
191
+ set setUseAlphaChannel(value: boolean);
192
+ /**
193
+ * Input target.
194
+ *
195
+ * Supported:
196
+ *
197
+ * <input ngxInputColor>
198
+ *
199
+ * or
200
+ *
201
+ * <div [ngxInputColor]="inputElement"></div>
202
+ *
203
+ * or
204
+ *
205
+ * <div [ngxInputColor]="inputRef"></div>
206
+ */
207
+ set ngxInputColor(element: HTMLInputElement | ElementRef<HTMLInputElement> | null | undefined | '');
195
208
  change: EventEmitter<string>;
196
209
  private color?;
197
210
  private pickerRef?;
211
+ private _targetInput?;
212
+ private explicitTargetInput;
198
213
  private isHostInput;
199
- inValid: boolean;
214
+ private removeInputListener?;
215
+ private disabled;
216
+ private invalid;
200
217
  protected _onChange: (value: string) => void;
201
218
  protected _onTouched: () => void;
202
- _onValidateChange: () => void;
203
- constructor(el: ElementRef, renderer: Renderer2, viewContainerRef: ViewContainerRef, overlayService: OverlayService);
219
+ private _onValidateChange;
220
+ constructor(el: ElementRef<HTMLElement>, renderer: Renderer2, viewContainerRef: ViewContainerRef, overlayService: OverlayService);
204
221
  ngAfterViewInit(): void;
205
222
  ngOnDestroy(): void;
206
- onClick(ev: Event): void;
207
- writeValue(value: any): void;
208
- registerOnChange(fn: any): void;
209
- registerOnTouched(fn: any): void;
223
+ /**
224
+ * Open the custom color picker.
225
+ */
226
+ onHostClick(event: Event): void;
227
+ /**
228
+ * Called by Angular Forms.
229
+ *
230
+ * IMPORTANT:
231
+ * writeValue must NEVER call _onChange().
232
+ */
233
+ writeValue(value: unknown): void;
234
+ registerOnChange(fn: (value: string) => void): void;
235
+ registerOnTouched(fn: () => void): void;
210
236
  setDisabledState(disabled: boolean): void;
211
237
  registerOnValidatorChange(fn: () => void): void;
212
- validate(control: AbstractControl): ValidationErrors | null;
238
+ validate(_control: AbstractControl): ValidationErrors | null;
239
+ private bindTargetInput;
240
+ private removeTargetInputListener;
241
+ /**
242
+ * Handles native input changes.
243
+ *
244
+ * This is deliberately NOT implemented using writeValue(),
245
+ * because this is a user-originated value and therefore
246
+ * must propagate through ControlValueAccessor.
247
+ */
248
+ private handleInputEvent;
213
249
  private toggleColorPicker;
214
250
  private destroyColorPicker;
251
+ /**
252
+ * User-originated/custom-picker value.
253
+ *
254
+ * This is the ONLY place where _onChange is called.
255
+ */
215
256
  private emitChange;
257
+ /**
258
+ * Synchronize all visual representations.
259
+ */
260
+ private syncView;
261
+ /**
262
+ * input[type=color] only accepts a 6-digit RGB hex value.
263
+ *
264
+ * Therefore even if the selected color contains alpha,
265
+ * the native color input receives #RRGGBB.
266
+ */
267
+ private getNativeInputColor;
268
+ private getViewColor;
269
+ private syncHostBackground;
270
+ private notifyValidatorChange;
271
+ private isInputElement;
216
272
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputColor, never>;
217
273
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgxInputColor, "[ngxInputColor]", never, { "setInputBackgroundColor": { "alias": "setInputBackgroundColor"; "required": false; }; "defaultInspector": { "alias": "defaultInspector"; "required": false; }; "simpleMode": { "alias": "simpleMode"; "required": false; }; "outputType": { "alias": "outputType"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "setUseAlphaChannel": { "alias": "useAlphaChannel"; "required": false; }; "ngxInputColor": { "alias": "ngxInputColor"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
218
274
  }
@@ -0,0 +1,368 @@
1
+ import * as i0 from '@angular/core';
2
+ import { TemplateRef, EventEmitter, InjectionToken, OnInit, OnDestroy, ElementRef, Renderer2 } from '@angular/core';
3
+
4
+ interface IPosition {
5
+ x: number;
6
+ y: number;
7
+ }
8
+
9
+ /**
10
+ * Groups multiple drop lists so items can be dragged between them without
11
+ * needing an explicit `connectedTo` list on every single one.
12
+ * Lists register themselves automatically when `NgxDropListGroup` wraps them.
13
+ */
14
+ declare class DropListGroupRef {
15
+ readonly lists: Set<DropListRef<any>>;
16
+ add(list: DropListRef<any>): void;
17
+ remove(list: DropListRef<any>): void;
18
+ has(list: DropListRef<any> | null | undefined): boolean;
19
+ }
20
+
21
+ declare class PlaceHolderRef {
22
+ tpl?: TemplateRef<unknown>;
23
+ dropList?: DropListRef;
24
+ element?: HTMLElement;
25
+ private _visible;
26
+ attach(container: HTMLElement, source: HTMLElement, reference?: Node | null): HTMLElement;
27
+ detach(): void;
28
+ get visible(): boolean;
29
+ }
30
+
31
+ /**
32
+ * DropListRef is intentionally generic, while the positional sorting strategy
33
+ * works on DragRef<any>. The public DropList/DragRef relationship is invariant
34
+ * because IDropEvent<T> contains T in a callback position. Keep the strongly
35
+ * typed Set here, and narrow only at the DOM-local bridge / strategy boundary.
36
+ */
37
+ declare class DropListRef<T = any> {
38
+ data?: T;
39
+ el: HTMLElement;
40
+ disableSort: boolean;
41
+ connectedTo: HTMLElement[];
42
+ dropListGroup?: DropListGroupRef | null;
43
+ readonly _draggables: Set<DragRef<T>>;
44
+ readonly onDrop: EventEmitter<IDropEvent<T>>;
45
+ private strategy;
46
+ private active;
47
+ private previousIndex;
48
+ private placeholder?;
49
+ addItem(item: DragRef<T>): void;
50
+ removeItem(item: DragRef<T>): void;
51
+ isConnectedTo(other: DropListRef<any>): boolean;
52
+ createPlaceholder(drag: DragRef<T>): PlaceHolderRef;
53
+ enter(drag: DragRef<T>, x?: number, y?: number): void;
54
+ sortItem(drag: DragRef<T>, position: IPosition): number | null;
55
+ finishDrag(drag: DragRef<T>): void;
56
+ exit(_drag: DragRef<T>): void;
57
+ resetSortTransforms(): void;
58
+ getFinalIndex(): number;
59
+ getItemIndex(item: DragRef<T>): number;
60
+ private indexOf;
61
+ private reset;
62
+ private copyPlaceholderGeometry;
63
+ /**
64
+ * The sorting strategy only needs a read-only collection of draggable refs.
65
+ * Using DragRef<any> at this internal boundary avoids the invariant generic
66
+ * relationship between DragRef<T> and DragRef<unknown>.
67
+ */
68
+ private getStrategyItems;
69
+ private asStrategyDrag;
70
+ private publishDragItems;
71
+ }
72
+
73
+ type DragAxis = 'x' | 'y' | undefined;
74
+ declare class DragRef<T = unknown> {
75
+ data?: T;
76
+ el: HTMLElement;
77
+ boundary?: HTMLElement;
78
+ lockAxis?: DragAxis;
79
+ dropList: DropListRef<T> | null;
80
+ dropListGroup?: DropListGroupRef | null;
81
+ placeholder?: PlaceHolderRef;
82
+ originDropList: DropListRef<T> | null;
83
+ originIndex: number;
84
+ readonly isDragging: i0.WritableSignal<boolean>;
85
+ readonly position: i0.WritableSignal<IPosition>;
86
+ private startPointer;
87
+ private startRect;
88
+ private lastPointer;
89
+ private previousTransform;
90
+ private previousZIndex;
91
+ private moveDx;
92
+ private moveDy;
93
+ private preview?;
94
+ private previewOffsetX;
95
+ private previewOffsetY;
96
+ private sourceVisibility;
97
+ private sourceDisplay;
98
+ private sourcePointerEvents;
99
+ init(): void;
100
+ withDropList(list: DropListRef<T> | null): this;
101
+ clearDropList(): void;
102
+ pointerDown(pointer: IPosition): void;
103
+ startDrag(pointer: IPosition): void;
104
+ dragMove(pointer: IPosition): void;
105
+ nudge(dx: number, dy: number): void;
106
+ endDrag(): void;
107
+ cancelDrag(): void;
108
+ get x(): number;
109
+ get y(): number;
110
+ get pointer(): IPosition;
111
+ get start(): DOMRect;
112
+ getPlaceholderElement(): HTMLElement | undefined;
113
+ private applyTransform;
114
+ private updatePreview;
115
+ }
116
+
117
+ interface IDropEvent<T = any> {
118
+ previousIndex: number;
119
+ currentIndex: number;
120
+ item: DragRef<T>;
121
+ container: DropListRef<T>;
122
+ previousContainer: DropListRef<T>;
123
+ isPointerOverContainer?: boolean;
124
+ }
125
+
126
+ /** Physical (viewport-space) resize directions — always in LTR screen coordinates. */
127
+ type ResizeDirection = 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw';
128
+ /**
129
+ * Logical (writing-direction aware) resize directions.
130
+ * `start`/`end` resolve to `w`/`e` depending on the host's computed `direction`,
131
+ * so a single template works unchanged in both LTR and RTL layouts.
132
+ */
133
+ type LogicalResizeDirection = ResizeDirection | 'n-start' | 'n-end' | 's-start' | 's-end' | 'start' | 'end';
134
+ interface IResizableOutput {
135
+ width: number;
136
+ height: number;
137
+ moveLeft: number;
138
+ moveTop: number;
139
+ left: number;
140
+ top: number;
141
+ direction: ResizeDirection;
142
+ }
143
+
144
+ declare class DragDropService {
145
+ readonly drags: i0.WritableSignal<readonly DragRef<unknown>[]>;
146
+ readonly dropLists: i0.WritableSignal<readonly DropListRef<any>[]>;
147
+ readonly activeDrag: i0.WritableSignal<DragRef<unknown> | null>;
148
+ registerDragItem(ref: DragRef<any>): void;
149
+ removeDragItem(ref: DragRef<any>): void;
150
+ registerDropList(ref: DropListRef): void;
151
+ removeDropList(ref: DropListRef<any>): void;
152
+ begin(ref: DragRef<any>): void;
153
+ end(ref: DragRef<any>): void;
154
+ cancelActive(): void;
155
+ findDropList(point: {
156
+ x: number;
157
+ y: number;
158
+ }, current?: DropListRef | null): DropListRef | null;
159
+ static ɵfac: i0.ɵɵFactoryDeclaration<DragDropService, never>;
160
+ static ɵprov: i0.ɵɵInjectableDeclaration<DragDropService>;
161
+ }
162
+
163
+ declare const NGX_DRAGGABLE: InjectionToken<NgxDraggable<unknown>>;
164
+ declare class NgxDraggable<T = unknown> implements OnInit, OnDestroy {
165
+ private readonly host;
166
+ private readonly renderer;
167
+ disabled: boolean;
168
+ /** Element whose rect constrains the drag. Now actually enforced. */
169
+ boundary?: HTMLElement;
170
+ dragRootElement: string;
171
+ /** CSS selector for a drag handle. When set, only pointerdowns inside it start a drag. */
172
+ dragHandle: string;
173
+ /** Restrict movement to a single axis. */
174
+ lockAxis: DragAxis;
175
+ /** Minimum pointer travel (px) before a drag starts, so clicks still register normally. */
176
+ dragThreshold: number;
177
+ /** Pixel step used when dragging via the keyboard (arrow keys, focus required). */
178
+ keyboardStep: number;
179
+ /** Auto-scroll the nearest scrollable ancestor while dragging near its edge. */
180
+ autoScroll: boolean;
181
+ set data(v: T);
182
+ readonly dragStart: EventEmitter<IPosition>;
183
+ readonly dragMove: EventEmitter<IPosition>;
184
+ readonly dragEnd: EventEmitter<IPosition>;
185
+ readonly _ref: DragRef<T>;
186
+ readonly dragging: i0.WritableSignal<boolean>;
187
+ private readonly doc;
188
+ private readonly service;
189
+ private readonly list;
190
+ private readonly group;
191
+ private readonly scroller;
192
+ private down;
193
+ private start;
194
+ private pointerId;
195
+ private removeDown?;
196
+ private removeMove?;
197
+ private removeUp?;
198
+ private removeKeydown?;
199
+ private removeEscape?;
200
+ constructor(host: ElementRef<HTMLElement>, renderer: Renderer2);
201
+ ngOnInit(): void;
202
+ ngOnDestroy(): void;
203
+ private pointerDown;
204
+ private pointerMove;
205
+ private pointerUp;
206
+ private cancel;
207
+ private finish;
208
+ /** Arrow-key movement for keyboard/assistive-tech users. Shift multiplies the step by 4. */
209
+ private keyDown;
210
+ private isOnHandle;
211
+ private isInteractive;
212
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxDraggable<any>, never>;
213
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDraggable<any>, "[NgxDraggable],[ngxDraggable]", never, { "disabled": { "alias": "disabled"; "required": false; }; "boundary": { "alias": "boundary"; "required": false; }; "dragRootElement": { "alias": "dragRootElement"; "required": false; }; "dragHandle": { "alias": "dragHandle"; "required": false; }; "lockAxis": { "alias": "lockAxis"; "required": false; }; "dragThreshold": { "alias": "dragThreshold"; "required": false; }; "keyboardStep": { "alias": "keyboardStep"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "dragStart": "dragStart"; "dragMove": "dragMove"; "dragEnd": "dragEnd"; }, never, never, true, never>;
214
+ }
215
+
216
+ declare class NgxResizable {
217
+ private readonly el;
218
+ disabled: boolean;
219
+ minWidth: number;
220
+ minHeight: number;
221
+ maxWidth: number;
222
+ maxHeight: number;
223
+ directions: LogicalResizeDirection[];
224
+ grid?: number | {
225
+ x: number;
226
+ y: number;
227
+ };
228
+ /** Element whose rect constrains the resize. Previously accepted nowhere on this directive. */
229
+ boundary?: HTMLElement;
230
+ /** Pixel step used when resizing via the keyboard (arrow keys, focus required). */
231
+ keyboardStep: number;
232
+ readonly resizeStart: EventEmitter<IResizableOutput>;
233
+ readonly resizeMove: EventEmitter<IResizableOutput>;
234
+ readonly resizeEnd: EventEmitter<IResizableOutput>;
235
+ readonly resizing: i0.WritableSignal<boolean>;
236
+ private direction;
237
+ private start;
238
+ private pointer;
239
+ private beforeTransition;
240
+ private beforeWidth;
241
+ private beforeHeight;
242
+ private beforeTransform;
243
+ private pointerId;
244
+ constructor(el: ElementRef<HTMLElement>);
245
+ onPointerDown(e: PointerEvent): void;
246
+ onPointerMove(e: PointerEvent): void;
247
+ onPointerUp(e: PointerEvent): void;
248
+ onDocumentKeyDown(e: KeyboardEvent): void;
249
+ onHandleKeyDown(e: KeyboardEvent): void;
250
+ private calculate;
251
+ private apply;
252
+ private clampGrid;
253
+ private finish;
254
+ private resolvedDirections;
255
+ private hitDirection;
256
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxResizable, never>;
257
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxResizable, "[NgxResizable],[ngxResizable]", never, { "disabled": { "alias": "disabled"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "directions": { "alias": "directions"; "required": false; }; "grid": { "alias": "grid"; "required": false; }; "boundary": { "alias": "boundary"; "required": false; }; "keyboardStep": { "alias": "keyboardStep"; "required": false; }; }, { "resizeStart": "resizeStart"; "resizeMove": "resizeMove"; "resizeEnd": "resizeEnd"; }, never, never, true, never>;
258
+ }
259
+
260
+ declare const NGX_DROPLIST: InjectionToken<NgxDropList<any>>;
261
+ declare class NgxDropList<T = any> implements OnInit, OnDestroy {
262
+ private readonly el;
263
+ readonly _ref: DropListRef<T>;
264
+ set data(value: T);
265
+ set connectedTo(value: HTMLElement[] | null | undefined);
266
+ set disableSort(value: boolean);
267
+ readonly drop: EventEmitter<IDropEvent<T>>;
268
+ private readonly service;
269
+ private readonly group;
270
+ constructor(el: ElementRef<HTMLElement>);
271
+ ngOnInit(): void;
272
+ ngOnDestroy(): void;
273
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxDropList<any>, never>;
274
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDropList<any>, "[NgxDropList],[ngxDropList]", never, { "data": { "alias": "data"; "required": false; }; "connectedTo": { "alias": "connectedTo"; "required": false; }; "disableSort": { "alias": "disableSort"; "required": false; }; }, { "drop": "drop"; }, never, never, true, never>;
275
+ }
276
+
277
+ declare const NGX_DROPLIST_GROUP: InjectionToken<NgxDropListGroup>;
278
+ /** Wrap several `ngxDropList`s to let items move freely between them. */
279
+ declare class NgxDropListGroup implements OnDestroy {
280
+ readonly _ref: DropListGroupRef;
281
+ ngOnDestroy(): void;
282
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxDropListGroup, never>;
283
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDropListGroup, "[NgxDropListGroup],[ngxDropListGroup]", never, {}, {}, never, never, true, never>;
284
+ }
285
+
286
+ declare const NGX_PLACEHOLDER: InjectionToken<PlaceHolderRef>;
287
+ declare class NgxPlaceholder {
288
+ readonly tpl: TemplateRef<unknown>;
289
+ readonly _ref: PlaceHolderRef;
290
+ private readonly list;
291
+ constructor(tpl: TemplateRef<unknown>);
292
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxPlaceholder, never>;
293
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxPlaceholder, "[NgxPlaceholder],[ngxPlaceholder]", never, {}, {}, never, never, true, never>;
294
+ }
295
+
296
+ /**
297
+ * True when `element` sits inside a right-to-left context.
298
+ *
299
+ * Reads the *computed* `direction` style instead of `element.dir`, because
300
+ * `direction` is inherited and is almost never set on the resizable element
301
+ * itself - it's usually set on `<html>`, `<body>`, or some ancestor wrapper.
302
+ */
303
+ declare function isRtl(element: HTMLElement): boolean;
304
+ /**
305
+ * Resolves a logical direction ('start' | 'end' | 'n-start' | 'n-end' | 's-start' | 's-end')
306
+ * to a physical, viewport-space direction ('n' | 'e' | 's' | 'w' | 'ne' | 'nw' | 'se' | 'sw')
307
+ * based on `rtl`.
308
+ *
309
+ * Physical directions pass through untouched, so it's always safe to call this
310
+ * even when `dir` might already be physical (e.g. resolving a direction that was
311
+ * already resolved once before).
312
+ */
313
+ declare function resolveLogicalDirection(dir: string, rtl: boolean): ResizeDirection;
314
+
315
+ /** Clamps a proposed vertical delta so the element's rect stays inside the boundary rect. */
316
+ declare function checkBoundY(selfRect: DOMRect, boundaryRect: DOMRect | undefined, offsetY: number): number;
317
+ /** Clamps a proposed horizontal delta so the element's rect stays inside the boundary rect. */
318
+ declare function checkBoundX(selfRect: DOMRect, boundaryRect: DOMRect | undefined, offsetX: number): number;
319
+ /**
320
+ * Clamps a resize result (width/height/left/top, all relative CSS px deltas from the
321
+ * element's start position) so the element never grows/moves outside `boundaryRect`.
322
+ * `startRect` is the element's `getBoundingClientRect()` captured at resize-start.
323
+ */
324
+ declare function clampResizeWithinBoundary(boundaryRect: DOMRect | undefined, startRect: DOMRect, width: number, height: number, left: number, top: number): {
325
+ width: number;
326
+ height: number;
327
+ left: number;
328
+ top: number;
329
+ };
330
+ /** Current page zoom level (1 = 100%). Falls back to devicePixelRatio pre visualViewport. */
331
+ declare function getPageZoom(): number;
332
+ /** Adjusts a raw pointer-derived value for the current page zoom level. */
333
+ declare function adjustForZoom(value: number): number;
334
+
335
+ /**
336
+ * Auto-scrolls the nearest scrollable ancestor (or window) while the pointer
337
+ * is dragged near the edge of the scrollable viewport. Direction-agnostic —
338
+ * works the same in RTL and LTR since it operates on physical scroll deltas.
339
+ */
340
+ declare class AutoScroller {
341
+ private raf;
342
+ private container;
343
+ private speed;
344
+ private readonly edge;
345
+ private readonly maxSpeed;
346
+ constructor(edge?: number, maxSpeed?: number);
347
+ start(fromEl: HTMLElement): void;
348
+ /** Call on every pointermove with the current client coordinates. */
349
+ update(clientX: number, clientY: number): void;
350
+ stop(): void;
351
+ private tick;
352
+ }
353
+
354
+ declare function moveItemInArray<T>(array: T[], from: number, to: number): void;
355
+ declare function transferArrayItem<T>(src: T[], dst: T[], from: number, to: number): void;
356
+ /**
357
+ * Copies an item from one array to another, leaving it in its
358
+ * original position in current array.
359
+ * @param currentArray Array from which to copy the item.
360
+ * @param targetArray Array into which is copy the item.
361
+ * @param currentIndex Index of the item in its current array.
362
+ * @param targetIndex Index at which to insert the item.
363
+ *
364
+ */
365
+ declare function copyArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
366
+
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 };
368
+ export type { DragAxis, IDropEvent, IPosition, IResizableOutput, LogicalResizeDirection, ResizeDirection };