@ngneers/controls 0.0.1-next.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 (186) hide show
  1. package/fesm2022/ngneers-controls-accordion.mjs +234 -0
  2. package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
  3. package/fesm2022/ngneers-controls-api-ng.mjs +959 -0
  4. package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
  5. package/fesm2022/ngneers-controls-api-resize.mjs +712 -0
  6. package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
  7. package/fesm2022/ngneers-controls-api.mjs +347 -0
  8. package/fesm2022/ngneers-controls-api.mjs.map +1 -0
  9. package/fesm2022/ngneers-controls-avatar.mjs +77 -0
  10. package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
  11. package/fesm2022/ngneers-controls-base.mjs +620 -0
  12. package/fesm2022/ngneers-controls-base.mjs.map +1 -0
  13. package/fesm2022/ngneers-controls-breadcrumb.mjs +100 -0
  14. package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
  15. package/fesm2022/ngneers-controls-button-group.mjs +110 -0
  16. package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
  17. package/fesm2022/ngneers-controls-button.mjs +83 -0
  18. package/fesm2022/ngneers-controls-button.mjs.map +1 -0
  19. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs +74 -0
  20. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs.map +1 -0
  21. package/fesm2022/ngneers-controls-calendar.mjs +801 -0
  22. package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
  23. package/fesm2022/ngneers-controls-checkbox.mjs +63 -0
  24. package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
  25. package/fesm2022/ngneers-controls-chip.mjs +55 -0
  26. package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
  27. package/fesm2022/ngneers-controls-default-icons.mjs +82 -0
  28. package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
  29. package/fesm2022/ngneers-controls-defer.mjs +72 -0
  30. package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
  31. package/fesm2022/ngneers-controls-dialog.mjs +407 -0
  32. package/fesm2022/ngneers-controls-dialog.mjs.map +1 -0
  33. package/fesm2022/ngneers-controls-directives.mjs +498 -0
  34. package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
  35. package/fesm2022/ngneers-controls-drawer.mjs +271 -0
  36. package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
  37. package/fesm2022/ngneers-controls-edit-inplace.mjs +127 -0
  38. package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
  39. package/fesm2022/ngneers-controls-errors.mjs +329 -0
  40. package/fesm2022/ngneers-controls-errors.mjs.map +1 -0
  41. package/fesm2022/ngneers-controls-filter.mjs +708 -0
  42. package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
  43. package/fesm2022/ngneers-controls-hint.mjs +153 -0
  44. package/fesm2022/ngneers-controls-hint.mjs.map +1 -0
  45. package/fesm2022/ngneers-controls-i18n-translations-de.mjs +170 -0
  46. package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -0
  47. package/fesm2022/ngneers-controls-i18n-translations-en.mjs +170 -0
  48. package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -0
  49. package/fesm2022/ngneers-controls-i18n.mjs +57 -0
  50. package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
  51. package/fesm2022/ngneers-controls-icon.mjs +195 -0
  52. package/fesm2022/ngneers-controls-icon.mjs.map +1 -0
  53. package/fesm2022/ngneers-controls-inplace.mjs +150 -0
  54. package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
  55. package/fesm2022/ngneers-controls-input-field.mjs +165 -0
  56. package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
  57. package/fesm2022/ngneers-controls-input.mjs +72 -0
  58. package/fesm2022/ngneers-controls-input.mjs.map +1 -0
  59. package/fesm2022/ngneers-controls-item-view.mjs +473 -0
  60. package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
  61. package/fesm2022/ngneers-controls-list-box.mjs +281 -0
  62. package/fesm2022/ngneers-controls-list-box.mjs.map +1 -0
  63. package/fesm2022/ngneers-controls-mask-input.mjs +888 -0
  64. package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -0
  65. package/fesm2022/ngneers-controls-menu.mjs +371 -0
  66. package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
  67. package/fesm2022/ngneers-controls-message.mjs +30 -0
  68. package/fesm2022/ngneers-controls-message.mjs.map +1 -0
  69. package/fesm2022/ngneers-controls-number-input.mjs +366 -0
  70. package/fesm2022/ngneers-controls-number-input.mjs.map +1 -0
  71. package/fesm2022/ngneers-controls-paginator.mjs +129 -0
  72. package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
  73. package/fesm2022/ngneers-controls-popover.mjs +215 -0
  74. package/fesm2022/ngneers-controls-popover.mjs.map +1 -0
  75. package/fesm2022/ngneers-controls-progress.mjs +98 -0
  76. package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
  77. package/fesm2022/ngneers-controls-radio.mjs +152 -0
  78. package/fesm2022/ngneers-controls-radio.mjs.map +1 -0
  79. package/fesm2022/ngneers-controls-roving-focus.mjs +323 -0
  80. package/fesm2022/ngneers-controls-roving-focus.mjs.map +1 -0
  81. package/fesm2022/ngneers-controls-scroll-shadow.mjs +65 -0
  82. package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
  83. package/fesm2022/ngneers-controls-scroller.mjs +308 -0
  84. package/fesm2022/ngneers-controls-scroller.mjs.map +1 -0
  85. package/fesm2022/ngneers-controls-select-button.mjs +58 -0
  86. package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
  87. package/fesm2022/ngneers-controls-select.mjs +417 -0
  88. package/fesm2022/ngneers-controls-select.mjs.map +1 -0
  89. package/fesm2022/ngneers-controls-slider.mjs +167 -0
  90. package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
  91. package/fesm2022/ngneers-controls-snackbar.mjs +414 -0
  92. package/fesm2022/ngneers-controls-snackbar.mjs.map +1 -0
  93. package/fesm2022/ngneers-controls-spin-buttons.mjs +126 -0
  94. package/fesm2022/ngneers-controls-spin-buttons.mjs.map +1 -0
  95. package/fesm2022/ngneers-controls-spinner.mjs +184 -0
  96. package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
  97. package/fesm2022/ngneers-controls-splitter.mjs +604 -0
  98. package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
  99. package/fesm2022/ngneers-controls-state.mjs +185 -0
  100. package/fesm2022/ngneers-controls-state.mjs.map +1 -0
  101. package/fesm2022/ngneers-controls-switch.mjs +39 -0
  102. package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
  103. package/fesm2022/ngneers-controls-table.mjs +2634 -0
  104. package/fesm2022/ngneers-controls-table.mjs.map +1 -0
  105. package/fesm2022/ngneers-controls-tabs.mjs +336 -0
  106. package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
  107. package/fesm2022/ngneers-controls-tag.mjs +30 -0
  108. package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
  109. package/fesm2022/ngneers-controls-toast.mjs +350 -0
  110. package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
  111. package/fesm2022/ngneers-controls-toggle-button.mjs +70 -0
  112. package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
  113. package/fesm2022/ngneers-controls-tooltip.mjs +506 -0
  114. package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
  115. package/fesm2022/ngneers-controls-tree.mjs +599 -0
  116. package/fesm2022/ngneers-controls-tree.mjs.map +1 -0
  117. package/fesm2022/ngneers-controls-upload.mjs +377 -0
  118. package/fesm2022/ngneers-controls-upload.mjs.map +1 -0
  119. package/fesm2022/ngneers-controls-utils-ng.mjs +411 -0
  120. package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
  121. package/fesm2022/ngneers-controls-utils.mjs +261 -0
  122. package/fesm2022/ngneers-controls-utils.mjs.map +1 -0
  123. package/fesm2022/ngneers-controls.mjs +6 -0
  124. package/fesm2022/ngneers-controls.mjs.map +1 -0
  125. package/package.json +302 -0
  126. package/types/ngneers-controls-accordion.d.ts +139 -0
  127. package/types/ngneers-controls-api-ng.d.ts +364 -0
  128. package/types/ngneers-controls-api-resize.d.ts +318 -0
  129. package/types/ngneers-controls-api.d.ts +145 -0
  130. package/types/ngneers-controls-avatar.d.ts +54 -0
  131. package/types/ngneers-controls-base.d.ts +277 -0
  132. package/types/ngneers-controls-breadcrumb.d.ts +272 -0
  133. package/types/ngneers-controls-button-group.d.ts +46 -0
  134. package/types/ngneers-controls-button.d.ts +48 -0
  135. package/types/ngneers-controls-calendar.d.ts +466 -0
  136. package/types/ngneers-controls-checkbox.d.ts +40 -0
  137. package/types/ngneers-controls-chip.d.ts +202 -0
  138. package/types/ngneers-controls-default-icons.d.ts +5 -0
  139. package/types/ngneers-controls-defer.d.ts +48 -0
  140. package/types/ngneers-controls-dialog.d.ts +399 -0
  141. package/types/ngneers-controls-directives.d.ts +171 -0
  142. package/types/ngneers-controls-drawer.d.ts +308 -0
  143. package/types/ngneers-controls-edit-inplace.d.ts +263 -0
  144. package/types/ngneers-controls-errors.d.ts +155 -0
  145. package/types/ngneers-controls-filter.d.ts +609 -0
  146. package/types/ngneers-controls-hint.d.ts +88 -0
  147. package/types/ngneers-controls-i18n-translations-de.d.ts +164 -0
  148. package/types/ngneers-controls-i18n-translations-en.d.ts +164 -0
  149. package/types/ngneers-controls-i18n.d.ts +186 -0
  150. package/types/ngneers-controls-icon.d.ts +68 -0
  151. package/types/ngneers-controls-inplace.d.ts +98 -0
  152. package/types/ngneers-controls-input-field.d.ts +248 -0
  153. package/types/ngneers-controls-input.d.ts +30 -0
  154. package/types/ngneers-controls-item-view.d.ts +215 -0
  155. package/types/ngneers-controls-list-box.d.ts +334 -0
  156. package/types/ngneers-controls-mask-input.d.ts +434 -0
  157. package/types/ngneers-controls-menu.d.ts +192 -0
  158. package/types/ngneers-controls-message.d.ts +21 -0
  159. package/types/ngneers-controls-number-input.d.ts +146 -0
  160. package/types/ngneers-controls-paginator.d.ts +255 -0
  161. package/types/ngneers-controls-popover.d.ts +116 -0
  162. package/types/ngneers-controls-progress.d.ts +49 -0
  163. package/types/ngneers-controls-radio.d.ts +91 -0
  164. package/types/ngneers-controls-roving-focus.d.ts +107 -0
  165. package/types/ngneers-controls-scroll-shadow.d.ts +25 -0
  166. package/types/ngneers-controls-scroller.d.ts +151 -0
  167. package/types/ngneers-controls-select-button.d.ts +51 -0
  168. package/types/ngneers-controls-select.d.ts +409 -0
  169. package/types/ngneers-controls-slider.d.ts +57 -0
  170. package/types/ngneers-controls-snackbar.d.ts +330 -0
  171. package/types/ngneers-controls-spin-buttons.d.ts +69 -0
  172. package/types/ngneers-controls-spinner.d.ts +117 -0
  173. package/types/ngneers-controls-splitter.d.ts +465 -0
  174. package/types/ngneers-controls-state.d.ts +102 -0
  175. package/types/ngneers-controls-switch.d.ts +18 -0
  176. package/types/ngneers-controls-table.d.ts +3127 -0
  177. package/types/ngneers-controls-tabs.d.ts +118 -0
  178. package/types/ngneers-controls-tag.d.ts +21 -0
  179. package/types/ngneers-controls-toast.d.ts +298 -0
  180. package/types/ngneers-controls-toggle-button.d.ts +48 -0
  181. package/types/ngneers-controls-tooltip.d.ts +189 -0
  182. package/types/ngneers-controls-tree.d.ts +409 -0
  183. package/types/ngneers-controls-upload.d.ts +347 -0
  184. package/types/ngneers-controls-utils-ng.d.ts +129 -0
  185. package/types/ngneers-controls-utils.d.ts +130 -0
  186. package/types/ngneers-controls.d.ts +2 -0
@@ -0,0 +1,498 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ElementRef, signal, input, booleanAttribute, effect, afterNextRender, Directive, DOCUMENT, output, afterRenderEffect, computed, untracked } from '@angular/core';
3
+ import { Platform, domEventObservable, domEventHandler, domEventSignal, injectThemeTemplate, elementSizeSignal } from '@ngneers/controls/api/ng';
4
+ import { NgnBase } from '@ngneers/controls/base';
5
+ import { signalWithPrevious } from '@ngneers/controls/utils-ng';
6
+ import { movableDirectiveTemplate, resizableDirectiveTemplate } from '@ngneers/controls-themes/templates/api';
7
+ import { map } from 'rxjs';
8
+
9
+ class NgnAutofocus {
10
+ _el = inject((ElementRef));
11
+ _focused = signal(false, /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
13
+ _isInitialized = signal(false, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "_isInitialized" }] : /* istanbul ignore next */ []));
15
+ /**
16
+ * Whether to focus the host element once it has rendered. Set to `false` to
17
+ * disable autofocus without removing the directive.
18
+ * @default true
19
+ */
20
+ ngnAutofocus = input(true, { ...(ngDevMode ? { debugName: "ngnAutofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
21
+ constructor() {
22
+ effect(() => {
23
+ if (!this.ngnAutofocus()) {
24
+ this._focused.set(false);
25
+ }
26
+ });
27
+ effect(() => {
28
+ this.autoFocus();
29
+ });
30
+ /**
31
+ * `afterNextRender` only runs in the browser, never during server-side
32
+ * prerendering — guarding against `getClientRects`/`focus` calls on a
33
+ * server DOM element that lacks them.
34
+ *
35
+ * The additional microtask ensures that the control is rendered and the
36
+ * ngn-control-initializing class is removed before trying to focus the element.
37
+ */
38
+ afterNextRender(() => {
39
+ if (this._el.nativeElement.getClientRects().length === 0) {
40
+ queueMicrotask(() => {
41
+ this._isInitialized.set(true);
42
+ });
43
+ }
44
+ else {
45
+ this._isInitialized.set(true);
46
+ }
47
+ });
48
+ }
49
+ autoFocus() {
50
+ if (!this._isInitialized()) {
51
+ return;
52
+ }
53
+ if (!this.ngnAutofocus()) {
54
+ return;
55
+ }
56
+ if (this._focused()) {
57
+ return;
58
+ }
59
+ this._el.nativeElement.focus();
60
+ this._focused.set(true);
61
+ }
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnAutofocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
63
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: NgnAutofocus, isStandalone: true, selector: "[ngnAutofocus]", inputs: { ngnAutofocus: { classPropertyName: "ngnAutofocus", publicName: "ngnAutofocus", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnAutofocus, decorators: [{
66
+ type: Directive,
67
+ args: [{ selector: '[ngnAutofocus]' }]
68
+ }], ctorParameters: () => [], propDecorators: { ngnAutofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnAutofocus", required: false }] }] } });
69
+
70
+ class NgnDragBase {
71
+ el = inject(ElementRef);
72
+ _document = inject(DOCUMENT);
73
+ _isBrowser = inject(Platform).isBrowser;
74
+ _pointerDown = false;
75
+ _startX = undefined;
76
+ _startY = undefined;
77
+ _dragged = false;
78
+ isDragging = signal(false, /* @ts-ignore */
79
+ ...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
80
+ /**
81
+ * Emits once when a drag gesture begins, i.e. after the pointer has moved past
82
+ * the small activation threshold following a pointerdown.
83
+ */
84
+ dragStart = output();
85
+ /**
86
+ * Emits once when the drag gesture ends (pointer released).
87
+ */
88
+ dragEnd = output();
89
+ /**
90
+ * Emits on every pointer move while dragging, carrying the frame delta and
91
+ * absolute pointer position. See {@link NgnDragInfo}.
92
+ */
93
+ dragged = output();
94
+ _pointerDownEvent = domEventObservable(this.el.nativeElement, 'pointerdown');
95
+ _pointerMoveEvent = domEventObservable(this._document, 'pointermove');
96
+ _pointerUpEvent = domEventObservable(this._document, 'pointerup');
97
+ constructor() {
98
+ if (!this._isBrowser) {
99
+ return;
100
+ }
101
+ domEventHandler(this.el.nativeElement, 'touchmove', e => {
102
+ if (e.cancelable) {
103
+ e.preventDefault();
104
+ }
105
+ });
106
+ // Swallow the click that the browser synthesizes after a drag-release so it
107
+ // does not trigger click handlers (e.g. selecting a tab). Capture phase so
108
+ // it runs before bubbling handlers on descendant elements.
109
+ domEventHandler(this.el.nativeElement, 'click', e => {
110
+ if (this._dragged) {
111
+ this._dragged = false;
112
+ e.preventDefault();
113
+ e.stopPropagation();
114
+ }
115
+ }, undefined, { capture: true });
116
+ afterRenderEffect(() => {
117
+ this._pointerDownEvent.subscribe(event => {
118
+ this._pointerDown = true;
119
+ this._dragged = false;
120
+ this._startX = event.clientX;
121
+ this._startY = event.clientY;
122
+ });
123
+ this._pointerUpEvent.subscribe(() => {
124
+ if (!this._pointerDown) {
125
+ return;
126
+ }
127
+ this._pointerDown = false;
128
+ this._startX = undefined;
129
+ this._startY = undefined;
130
+ this.isDragging.set(false);
131
+ this.dragEnd.emit();
132
+ });
133
+ this._pointerMoveEvent.subscribe(event => {
134
+ if (!this._pointerDown) {
135
+ return;
136
+ }
137
+ this.handleDrag(event);
138
+ });
139
+ });
140
+ }
141
+ onDraggedInt(delta) {
142
+ this.dragged.emit(delta);
143
+ this.onDragged(delta);
144
+ }
145
+ handleDrag(event) {
146
+ const { clientX, clientY } = event;
147
+ if (this._startX === undefined || this._startY === undefined) {
148
+ throw new Error('Start positions are undefined');
149
+ }
150
+ const deltaX = clientX - this._startX;
151
+ const deltaY = clientY - this._startY;
152
+ if (!this.isDragging()) {
153
+ const distance = Math.sqrt(deltaX ** 2 + deltaY ** 2);
154
+ if (distance < 5) {
155
+ return;
156
+ }
157
+ this.isDragging.set(true);
158
+ this._dragged = true;
159
+ this.dragStart.emit();
160
+ }
161
+ if (!this.isDragging()) {
162
+ return;
163
+ }
164
+ this._startX = clientX;
165
+ this._startY = clientY;
166
+ this.onDraggedInt({ deltaX: deltaX, deltaY: deltaY, absoluteX: clientX, absoluteY: clientY });
167
+ }
168
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDragBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
169
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: NgnDragBase, isStandalone: true, outputs: { dragStart: "dragStart", dragEnd: "dragEnd", dragged: "dragged" }, ngImport: i0 });
170
+ }
171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDragBase, decorators: [{
172
+ type: Directive
173
+ }], ctorParameters: () => [], propDecorators: { dragStart: [{ type: i0.Output, args: ["dragStart"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], dragged: [{ type: i0.Output, args: ["dragged"] }] } });
174
+
175
+ class NgnDragScroll extends NgnDragBase {
176
+ onDragged(delta) {
177
+ this.el.nativeElement.scrollBy({
178
+ left: -delta.deltaX,
179
+ top: -delta.deltaY,
180
+ behavior: 'auto',
181
+ });
182
+ }
183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDragScroll, deps: null, target: i0.ɵɵFactoryTarget.Directive });
184
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: NgnDragScroll, isStandalone: true, selector: "[ngnDragScroll]", usesInheritance: true, ngImport: i0 });
185
+ }
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDragScroll, decorators: [{
187
+ type: Directive,
188
+ args: [{
189
+ selector: '[ngnDragScroll]',
190
+ }]
191
+ }] });
192
+
193
+ class NgnDrag extends NgnDragBase {
194
+ onDragged(delta) {
195
+ // do nothing
196
+ }
197
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDrag, deps: null, target: i0.ɵɵFactoryTarget.Directive });
198
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: NgnDrag, isStandalone: true, selector: "[ngnDrag]", usesInheritance: true, ngImport: i0 });
199
+ }
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDrag, decorators: [{
201
+ type: Directive,
202
+ args: [{
203
+ selector: '[ngnDrag]',
204
+ }]
205
+ }] });
206
+
207
+ class NgnMovable extends NgnBase {
208
+ theme = this.injectThemeTemplate(movableDirectiveTemplate, {
209
+ movable: () => this.ngnMovable(),
210
+ moved: () => this.dragged(),
211
+ });
212
+ _el = inject((ElementRef));
213
+ _document = inject(DOCUMENT);
214
+ /**
215
+ * Whether the element is movable.
216
+ * @default true
217
+ */
218
+ ngnMovable = input(true, { ...(ngDevMode ? { debugName: "ngnMovable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
219
+ /**
220
+ * The handle element used to drag the element. If omitted, the entire element will be used as the drag handle.
221
+ * @default null
222
+ */
223
+ ngnMovableDragHandle = input(null, /* @ts-ignore */
224
+ ...(ngDevMode ? [{ debugName: "ngnMovableDragHandle" }] : /* istanbul ignore next */ []));
225
+ /**
226
+ * When `true`, the cursor will change to indicate that the element / drag handle is movable.
227
+ * @default true
228
+ */
229
+ ngnMovableChangeCursor = input(true, { ...(ngDevMode ? { debugName: "ngnMovableChangeCursor" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
230
+ /**
231
+ * When `true`, the movement will be limited to the viewport.
232
+ * @default true
233
+ */
234
+ ngnMovableLimitToViewport = input(true, { ...(ngDevMode ? { debugName: "ngnMovableLimitToViewport" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
235
+ _ngnMovableDragHandleWithPrevious = signalWithPrevious(this.ngnMovableDragHandle, null);
236
+ _eventElement = computed(() => {
237
+ const handle = this.ngnMovableDragHandle();
238
+ return handle ?? this._el.nativeElement;
239
+ }, /* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "_eventElement" }] : /* istanbul ignore next */ []));
241
+ dragged = signal(false, /* @ts-ignore */
242
+ ...(ngDevMode ? [{ debugName: "dragged" }] : /* istanbul ignore next */ []));
243
+ _pointerDownSignal = domEventSignal(this._eventElement, 'pointerdown');
244
+ _pointerMoveSignal = domEventSignal(this._document, 'pointermove');
245
+ _pointerUpSignal = domEventSignal(this._document, 'pointerup');
246
+ _isDragging = signal(false, /* @ts-ignore */
247
+ ...(ngDevMode ? [{ debugName: "_isDragging" }] : /* istanbul ignore next */ []));
248
+ _startX = 0;
249
+ _startY = 0;
250
+ constructor() {
251
+ super();
252
+ domEventHandler(this._el.nativeElement, 'touchmove', e => {
253
+ if (!this.ngnMovable()) {
254
+ return;
255
+ }
256
+ if (e.cancelable) {
257
+ e.preventDefault();
258
+ }
259
+ });
260
+ effect(() => {
261
+ if (!this.ngnMovable()) {
262
+ return;
263
+ }
264
+ const pointerDown = this._pointerDownSignal();
265
+ // check if primary button or touch
266
+ if (pointerDown && (pointerDown.button === 0 || pointerDown.pointerType === 'touch')) {
267
+ this._isDragging.set(true);
268
+ this._startX = pointerDown.clientX - this._el.nativeElement.offsetLeft;
269
+ this._startY = pointerDown.clientY - this._el.nativeElement.offsetTop;
270
+ }
271
+ });
272
+ effect(() => {
273
+ if (!this.ngnMovable()) {
274
+ return;
275
+ }
276
+ const pointerMove = this._pointerMoveSignal();
277
+ if (pointerMove && untracked(this._isDragging)) {
278
+ this.dragged.set(true);
279
+ const newLeft = pointerMove.clientX - this._startX;
280
+ const newTop = pointerMove.clientY - this._startY;
281
+ if (this.ngnMovableLimitToViewport()) {
282
+ const documentRect = this._document.documentElement.getBoundingClientRect();
283
+ const elRect = this._el.nativeElement.getBoundingClientRect();
284
+ const clampedLeft = Math.min(Math.max(newLeft, 0), documentRect.width - elRect.width);
285
+ const clampedTop = Math.min(Math.max(newTop, 0), documentRect.height - elRect.height);
286
+ this._el.nativeElement.style.left = `${clampedLeft}px`;
287
+ this._el.nativeElement.style.top = `${clampedTop}px`;
288
+ }
289
+ else {
290
+ this._el.nativeElement.style.left = `${pointerMove.clientX - this._startX}px`;
291
+ this._el.nativeElement.style.top = `${pointerMove.clientY - this._startY}px`;
292
+ }
293
+ this._el.nativeElement.style.width = `${this._el.nativeElement.offsetWidth}px`;
294
+ this._el.nativeElement.style.height = `${this._el.nativeElement.offsetHeight}px`;
295
+ if (!['fixed', 'absolute', 'static'].includes(getComputedStyle(this._el.nativeElement).position)) {
296
+ this._el.nativeElement.style.position = 'fixed';
297
+ }
298
+ }
299
+ });
300
+ effect(() => {
301
+ if (!this.ngnMovable()) {
302
+ return;
303
+ }
304
+ const pointerUp = this._pointerUpSignal();
305
+ if (pointerUp && untracked(this._isDragging)) {
306
+ this._isDragging.set(false);
307
+ }
308
+ });
309
+ effect(() => {
310
+ if (!this.ngnMovable()) {
311
+ this._isDragging.set(false);
312
+ }
313
+ });
314
+ effect(() => {
315
+ this.refreshCursor();
316
+ });
317
+ }
318
+ bakePosition() {
319
+ this._el.nativeElement.style.left = `${this._el.nativeElement.offsetLeft}px`;
320
+ this._el.nativeElement.style.top = `${this._el.nativeElement.offsetTop}px`;
321
+ if (!['fixed', 'absolute', 'static'].includes(getComputedStyle(this._el.nativeElement).position)) {
322
+ this._el.nativeElement.style.position = 'fixed';
323
+ }
324
+ this.dragged.set(true);
325
+ }
326
+ refreshCursor() {
327
+ const handle = this._ngnMovableDragHandleWithPrevious();
328
+ if (handle.previous && handle.previous !== handle.current) {
329
+ handle.previous.classList.remove(this.theme.class('drag-handle-grab'), this.theme.class('drag-handle-grabbing'));
330
+ }
331
+ if (!this.ngnMovable() || !this.ngnMovableChangeCursor()) {
332
+ handle.current?.classList.remove(this.theme.class('drag-handle-grab'), this.theme.class('drag-handle-grabbing'));
333
+ return;
334
+ }
335
+ if (this._isDragging()) {
336
+ handle.current?.classList.add(this.theme.class('drag-handle-grabbing'));
337
+ handle.current?.classList.remove(this.theme.class('drag-handle-grab'));
338
+ }
339
+ else {
340
+ handle.current?.classList.add(this.theme.class('drag-handle-grab'));
341
+ handle.current?.classList.remove(this.theme.class('drag-handle-grabbing'));
342
+ }
343
+ }
344
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnMovable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
345
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: NgnMovable, isStandalone: true, selector: "[ngnMovable]", inputs: { ngnMovable: { classPropertyName: "ngnMovable", publicName: "ngnMovable", isSignal: true, isRequired: false, transformFunction: null }, ngnMovableDragHandle: { classPropertyName: "ngnMovableDragHandle", publicName: "ngnMovableDragHandle", isSignal: true, isRequired: false, transformFunction: null }, ngnMovableChangeCursor: { classPropertyName: "ngnMovableChangeCursor", publicName: "ngnMovableChangeCursor", isSignal: true, isRequired: false, transformFunction: null }, ngnMovableLimitToViewport: { classPropertyName: "ngnMovableLimitToViewport", publicName: "ngnMovableLimitToViewport", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
346
+ }
347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnMovable, decorators: [{
348
+ type: Directive,
349
+ args: [{
350
+ selector: '[ngnMovable]',
351
+ }]
352
+ }], ctorParameters: () => [], propDecorators: { ngnMovable: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnMovable", required: false }] }], ngnMovableDragHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnMovableDragHandle", required: false }] }], ngnMovableChangeCursor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnMovableChangeCursor", required: false }] }], ngnMovableLimitToViewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnMovableLimitToViewport", required: false }] }] } });
353
+
354
+ class NgnResizable {
355
+ theme = injectThemeTemplate(resizableDirectiveTemplate);
356
+ _el = inject((ElementRef));
357
+ _isBrowser = inject(Platform).isBrowser;
358
+ _document = inject(DOCUMENT);
359
+ _ngnMovable = inject(NgnMovable, { optional: true });
360
+ _isPointerDown = false;
361
+ /**
362
+ * Whether the element is resizable. The empty string (bare attribute) enables it.
363
+ * @default true
364
+ */
365
+ ngnResizable = input(true, /* @ts-ignore */
366
+ ...(ngDevMode ? [{ debugName: "ngnResizable" }] : /* istanbul ignore next */ []));
367
+ /**
368
+ * Minimum and maximum size constraints for the resizable element. Number values
369
+ * are treated as pixels; strings are used as-is. Any bound left `null`/`undefined`
370
+ * is unconstrained (the effective maximum is still clamped to the viewport).
371
+ */
372
+ ngnResizableSizeLimits = input(/* @ts-ignore */
373
+ ...(ngDevMode ? [undefined, { debugName: "ngnResizableSizeLimits" }] : /* istanbul ignore next */ []));
374
+ resized = signal(false, /* @ts-ignore */
375
+ ...(ngDevMode ? [{ debugName: "resized" }] : /* istanbul ignore next */ []));
376
+ _pointerDownSignal = domEventSignal(this._el, 'pointerdown');
377
+ _pointerUpSignal = domEventSignal(this._document, 'pointerup');
378
+ _resizeEvent = elementSizeSignal(this._el);
379
+ /**
380
+ * Formats a size value from string | number | null | undefined to a CSS string.
381
+ * @param value The size value to format
382
+ * @returns The formatted CSS string or null if the value is null/undefined
383
+ */
384
+ formatSizeValue(value) {
385
+ if (value === null || value === undefined) {
386
+ return null;
387
+ }
388
+ return typeof value === 'number' ? `${value}px` : value;
389
+ }
390
+ constructor() {
391
+ effect(() => {
392
+ if (this._pointerDownSignal()) {
393
+ this._isPointerDown = true;
394
+ }
395
+ });
396
+ effect(() => {
397
+ if (this._pointerUpSignal()) {
398
+ this._isPointerDown = false;
399
+ }
400
+ });
401
+ effect(() => {
402
+ if (!this._isBrowser) {
403
+ return;
404
+ }
405
+ const _size = this._resizeEvent(); // just as the trigger
406
+ if (!this._isPointerDown) {
407
+ // only react to resize events when the pointer is down (user is resizing)
408
+ return;
409
+ }
410
+ // If the element is also movable, bake its position to avoid misplacement after resizing
411
+ this._ngnMovable?.bakePosition();
412
+ // calculate the max width & height of the element based on the size, position & body
413
+ const bodyWidth = this._document.body.clientWidth;
414
+ const bodyHeight = this._document.body.clientHeight;
415
+ const elRect = this._el.nativeElement.getBoundingClientRect();
416
+ const maxWidth = bodyWidth - elRect.left;
417
+ const maxHeight = bodyHeight - elRect.top;
418
+ const inputMaxWidth = this.ngnResizableSizeLimits()?.maxWidth;
419
+ const inputMaxHeight = this.ngnResizableSizeLimits()?.maxHeight;
420
+ const formattedMaxWidth = this.formatSizeValue(inputMaxWidth);
421
+ const formattedMaxHeight = this.formatSizeValue(inputMaxHeight);
422
+ this._el.nativeElement.style.maxWidth = formattedMaxWidth
423
+ ? `min(${formattedMaxWidth}, ${maxWidth}px)`
424
+ : `${maxWidth}px`;
425
+ this._el.nativeElement.style.maxHeight = formattedMaxHeight
426
+ ? `min(${formattedMaxHeight}, ${maxHeight}px)`
427
+ : `${maxHeight}px`;
428
+ const inputMinWidth = this.ngnResizableSizeLimits()?.minWidth;
429
+ const inputMinHeight = this.ngnResizableSizeLimits()?.minHeight;
430
+ const formattedMinWidth = this.formatSizeValue(inputMinWidth);
431
+ const formattedMinHeight = this.formatSizeValue(inputMinHeight);
432
+ if (formattedMinWidth) {
433
+ this._el.nativeElement.style.minWidth = formattedMinWidth;
434
+ }
435
+ if (formattedMinHeight) {
436
+ this._el.nativeElement.style.minHeight = formattedMinHeight;
437
+ }
438
+ this.resized.set(true);
439
+ });
440
+ }
441
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnResizable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
442
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: NgnResizable, isStandalone: true, selector: "[ngnResizable]", inputs: { ngnResizable: { classPropertyName: "ngnResizable", publicName: "ngnResizable", isSignal: true, isRequired: false, transformFunction: null }, ngnResizableSizeLimits: { classPropertyName: "ngnResizableSizeLimits", publicName: "ngnResizableSizeLimits", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "theme.classes({ resizable: !!ngnResizable(), resized: resized()})" } }, ngImport: i0 });
443
+ }
444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnResizable, decorators: [{
445
+ type: Directive,
446
+ args: [{
447
+ selector: '[ngnResizable]',
448
+ host: {
449
+ '[class]': 'theme.classes({ resizable: !!ngnResizable(), resized: resized()})',
450
+ },
451
+ }]
452
+ }], ctorParameters: () => [], propDecorators: { ngnResizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnResizable", required: false }] }], ngnResizableSizeLimits: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnResizableSizeLimits", required: false }] }] } });
453
+
454
+ class NgnScrollAmount {
455
+ _el = inject(ElementRef);
456
+ /**
457
+ * Optional external scroll container. When set, scroll events and
458
+ * dimensions are tracked on this element instead of the host element.
459
+ */
460
+ container = input(undefined, { ...(ngDevMode ? { debugName: "container" } : /* istanbul ignore next */ {}), alias: 'ngnScrollAmountContainer' });
461
+ scrollTarget = computed(() => this.container() ?? this._el.nativeElement, /* @ts-ignore */
462
+ ...(ngDevMode ? [{ debugName: "scrollTarget" }] : /* istanbul ignore next */ []));
463
+ scrollTop = signal(this._el.nativeElement.scrollTop, /* @ts-ignore */
464
+ ...(ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []));
465
+ scrollLeft = signal(this._el.nativeElement.scrollLeft, /* @ts-ignore */
466
+ ...(ngDevMode ? [{ debugName: "scrollLeft" }] : /* istanbul ignore next */ []));
467
+ _scrollEvent = domEventObservable(this.scrollTarget, 'scroll');
468
+ constructor() {
469
+ afterRenderEffect(() => {
470
+ const obs = this._scrollEvent.pipe(map(e => {
471
+ const target = e.target;
472
+ return {
473
+ top: target.scrollTop,
474
+ left: target.scrollLeft,
475
+ };
476
+ }));
477
+ obs.subscribe(scroll => {
478
+ this.scrollTop.set(scroll.top);
479
+ this.scrollLeft.set(scroll.left);
480
+ });
481
+ });
482
+ }
483
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnScrollAmount, deps: [], target: i0.ɵɵFactoryTarget.Directive });
484
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: NgnScrollAmount, isStandalone: true, selector: "[ngnScrollAmount]", inputs: { container: { classPropertyName: "container", publicName: "ngnScrollAmountContainer", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
485
+ }
486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnScrollAmount, decorators: [{
487
+ type: Directive,
488
+ args: [{
489
+ selector: '[ngnScrollAmount]',
490
+ }]
491
+ }], ctorParameters: () => [], propDecorators: { container: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnScrollAmountContainer", required: false }] }] } });
492
+
493
+ /**
494
+ * Generated bundle index. Do not edit.
495
+ */
496
+
497
+ export { NgnAutofocus, NgnDrag, NgnDragScroll, NgnMovable, NgnResizable, NgnScrollAmount };
498
+ //# sourceMappingURL=ngneers-controls-directives.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-directives.mjs","sources":["../../src/directives/autofocus.ts","../../src/directives/drag/drag-base.ts","../../src/directives/drag/drag-scroll.ts","../../src/directives/drag/drag.ts","../../src/directives/movable.ts","../../src/directives/resizable.ts","../../src/directives/scroll-amount.ts","../../src/directives/ngneers-controls-directives.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\n\n@Directive({ selector: '[ngnAutofocus]' })\nexport class NgnAutofocus {\n private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>);\n private readonly _focused = signal(false);\n private readonly _isInitialized = signal(false);\n\n /**\n * Whether to focus the host element once it has rendered. Set to `false` to\n * disable autofocus without removing the directive.\n * @default true\n */\n public readonly ngnAutofocus = input(true, { transform: booleanAttribute });\n\n constructor() {\n effect(() => {\n if (!this.ngnAutofocus()) {\n this._focused.set(false);\n }\n });\n effect(() => {\n this.autoFocus();\n });\n\n /**\n * `afterNextRender` only runs in the browser, never during server-side\n * prerendering — guarding against `getClientRects`/`focus` calls on a\n * server DOM element that lacks them.\n *\n * The additional microtask ensures that the control is rendered and the\n * ngn-control-initializing class is removed before trying to focus the element.\n */\n afterNextRender(() => {\n if (this._el.nativeElement.getClientRects().length === 0) {\n queueMicrotask(() => {\n this._isInitialized.set(true);\n });\n } else {\n this._isInitialized.set(true);\n }\n });\n }\n\n private autoFocus() {\n if (!this._isInitialized()) {\n return;\n }\n if (!this.ngnAutofocus()) {\n return;\n }\n if (this._focused()) {\n return;\n }\n this._el.nativeElement.focus();\n this._focused.set(true);\n }\n}\n","import {\n afterRenderEffect,\n Directive,\n DOCUMENT,\n ElementRef,\n inject,\n output,\n signal,\n} from '@angular/core';\nimport { domEventHandler, domEventObservable, Platform } from '@ngneers/controls/api/ng';\n\nimport type { NgnDragInfo } from './types';\n\n@Directive()\nexport abstract class NgnDragBase {\n protected readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _document = inject(DOCUMENT);\n private readonly _isBrowser = inject(Platform).isBrowser;\n\n private _pointerDown = false;\n private _startX?: number = undefined;\n private _startY?: number = undefined;\n private _dragged = false;\n\n protected readonly isDragging = signal(false);\n /**\n * Emits once when a drag gesture begins, i.e. after the pointer has moved past\n * the small activation threshold following a pointerdown.\n */\n public readonly dragStart = output<void>();\n /**\n * Emits once when the drag gesture ends (pointer released).\n */\n public readonly dragEnd = output<void>();\n /**\n * Emits on every pointer move while dragging, carrying the frame delta and\n * absolute pointer position. See {@link NgnDragInfo}.\n */\n public readonly dragged = output<NgnDragInfo>();\n\n private readonly _pointerDownEvent = domEventObservable(this.el.nativeElement, 'pointerdown');\n private readonly _pointerMoveEvent = domEventObservable(this._document, 'pointermove');\n private readonly _pointerUpEvent = domEventObservable(this._document, 'pointerup');\n\n constructor() {\n if (!this._isBrowser) {\n return;\n }\n domEventHandler(this.el.nativeElement, 'touchmove', e => {\n if (e.cancelable) {\n e.preventDefault();\n }\n });\n // Swallow the click that the browser synthesizes after a drag-release so it\n // does not trigger click handlers (e.g. selecting a tab). Capture phase so\n // it runs before bubbling handlers on descendant elements.\n domEventHandler(\n this.el.nativeElement,\n 'click',\n e => {\n if (this._dragged) {\n this._dragged = false;\n e.preventDefault();\n e.stopPropagation();\n }\n },\n undefined,\n { capture: true }\n );\n afterRenderEffect(() => {\n this._pointerDownEvent.subscribe(event => {\n this._pointerDown = true;\n this._dragged = false;\n this._startX = (event as PointerEvent).clientX;\n this._startY = (event as PointerEvent).clientY;\n });\n this._pointerUpEvent.subscribe(() => {\n if (!this._pointerDown) {\n return;\n }\n this._pointerDown = false;\n this._startX = undefined;\n this._startY = undefined;\n this.isDragging.set(false);\n this.dragEnd.emit();\n });\n\n this._pointerMoveEvent.subscribe(event => {\n if (!this._pointerDown) {\n return;\n }\n this.handleDrag(event);\n });\n });\n }\n\n protected abstract onDragged(delta: NgnDragInfo): void;\n\n private onDraggedInt(delta: NgnDragInfo) {\n this.dragged.emit(delta);\n this.onDragged(delta);\n }\n\n private handleDrag(event: Event) {\n const { clientX, clientY } = event as PointerEvent;\n if (this._startX === undefined || this._startY === undefined) {\n throw new Error('Start positions are undefined');\n }\n const deltaX = clientX - this._startX;\n const deltaY = clientY - this._startY;\n if (!this.isDragging()) {\n const distance = Math.sqrt(deltaX ** 2 + deltaY ** 2);\n if (distance < 5) {\n return;\n }\n this.isDragging.set(true);\n this._dragged = true;\n this.dragStart.emit();\n }\n if (!this.isDragging()) {\n return;\n }\n this._startX = clientX;\n this._startY = clientY;\n this.onDraggedInt({ deltaX: deltaX, deltaY: deltaY, absoluteX: clientX, absoluteY: clientY });\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { NgnDragBase } from './drag-base';\n\nimport type { NgnDragInfo } from './types';\n\n@Directive({\n selector: '[ngnDragScroll]',\n})\nexport class NgnDragScroll extends NgnDragBase {\n protected onDragged(delta: NgnDragInfo): void {\n this.el.nativeElement.scrollBy({\n left: -delta.deltaX,\n top: -delta.deltaY,\n behavior: 'auto',\n });\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { NgnDragBase } from './drag-base';\n\nimport type { NgnDragInfo } from './types';\n\n@Directive({\n selector: '[ngnDrag]',\n})\nexport class NgnDrag extends NgnDragBase {\n protected onDragged(delta: NgnDragInfo): void {\n // do nothing\n }\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { domEventHandler, domEventSignal } from '@ngneers/controls/api/ng';\nimport { NgnBase } from '@ngneers/controls/base';\nimport { signalWithPrevious } from '@ngneers/controls/utils-ng';\nimport { movableDirectiveTemplate } from '@ngneers/controls-themes/templates/api';\n\n@Directive({\n selector: '[ngnMovable]',\n})\nexport class NgnMovable extends NgnBase<'movable'> {\n protected readonly theme = this.injectThemeTemplate(movableDirectiveTemplate, {\n movable: () => this.ngnMovable(),\n moved: () => this.dragged(),\n });\n private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>);\n private readonly _document = inject(DOCUMENT);\n\n /**\n * Whether the element is movable.\n * @default true\n */\n public readonly ngnMovable = input(true, { transform: booleanAttribute });\n\n /**\n * The handle element used to drag the element. If omitted, the entire element will be used as the drag handle.\n * @default null\n */\n public readonly ngnMovableDragHandle = input<HTMLElement | null>(null);\n\n /**\n * When `true`, the cursor will change to indicate that the element / drag handle is movable.\n * @default true\n */\n public readonly ngnMovableChangeCursor = input(true, { transform: booleanAttribute });\n\n /**\n * When `true`, the movement will be limited to the viewport.\n * @default true\n */\n public readonly ngnMovableLimitToViewport = input(true, { transform: booleanAttribute });\n\n private readonly _ngnMovableDragHandleWithPrevious = signalWithPrevious(\n this.ngnMovableDragHandle,\n null\n );\n\n private readonly _eventElement = computed(() => {\n const handle = this.ngnMovableDragHandle();\n return handle ?? this._el.nativeElement;\n });\n\n protected readonly dragged = signal(false);\n\n private readonly _pointerDownSignal = domEventSignal(this._eventElement, 'pointerdown');\n private readonly _pointerMoveSignal = domEventSignal(this._document, 'pointermove');\n private readonly _pointerUpSignal = domEventSignal(this._document, 'pointerup');\n\n private readonly _isDragging = signal(false);\n private _startX = 0;\n private _startY = 0;\n\n constructor() {\n super();\n\n domEventHandler(this._el.nativeElement, 'touchmove', e => {\n if (!this.ngnMovable()) {\n return;\n }\n if (e.cancelable) {\n e.preventDefault();\n }\n });\n\n effect(() => {\n if (!this.ngnMovable()) {\n return;\n }\n const pointerDown = this._pointerDownSignal();\n // check if primary button or touch\n if (pointerDown && (pointerDown.button === 0 || pointerDown.pointerType === 'touch')) {\n this._isDragging.set(true);\n this._startX = pointerDown.clientX - this._el.nativeElement.offsetLeft;\n this._startY = pointerDown.clientY - this._el.nativeElement.offsetTop;\n }\n });\n\n effect(() => {\n if (!this.ngnMovable()) {\n return;\n }\n const pointerMove = this._pointerMoveSignal();\n if (pointerMove && untracked(this._isDragging)) {\n this.dragged.set(true);\n const newLeft = pointerMove.clientX - this._startX;\n const newTop = pointerMove.clientY - this._startY;\n\n if (this.ngnMovableLimitToViewport()) {\n const documentRect = this._document.documentElement.getBoundingClientRect();\n const elRect = this._el.nativeElement.getBoundingClientRect();\n\n const clampedLeft = Math.min(Math.max(newLeft, 0), documentRect.width - elRect.width);\n const clampedTop = Math.min(Math.max(newTop, 0), documentRect.height - elRect.height);\n\n this._el.nativeElement.style.left = `${clampedLeft}px`;\n this._el.nativeElement.style.top = `${clampedTop}px`;\n } else {\n this._el.nativeElement.style.left = `${pointerMove.clientX - this._startX}px`;\n this._el.nativeElement.style.top = `${pointerMove.clientY - this._startY}px`;\n }\n\n this._el.nativeElement.style.width = `${this._el.nativeElement.offsetWidth}px`;\n this._el.nativeElement.style.height = `${this._el.nativeElement.offsetHeight}px`;\n if (\n !['fixed', 'absolute', 'static'].includes(\n getComputedStyle(this._el.nativeElement).position\n )\n ) {\n this._el.nativeElement.style.position = 'fixed';\n }\n }\n });\n\n effect(() => {\n if (!this.ngnMovable()) {\n return;\n }\n const pointerUp = this._pointerUpSignal();\n if (pointerUp && untracked(this._isDragging)) {\n this._isDragging.set(false);\n }\n });\n\n effect(() => {\n if (!this.ngnMovable()) {\n this._isDragging.set(false);\n }\n });\n\n effect(() => {\n this.refreshCursor();\n });\n }\n\n public bakePosition() {\n this._el.nativeElement.style.left = `${this._el.nativeElement.offsetLeft}px`;\n this._el.nativeElement.style.top = `${this._el.nativeElement.offsetTop}px`;\n if (\n !['fixed', 'absolute', 'static'].includes(getComputedStyle(this._el.nativeElement).position)\n ) {\n this._el.nativeElement.style.position = 'fixed';\n }\n this.dragged.set(true);\n }\n\n private refreshCursor() {\n const handle = this._ngnMovableDragHandleWithPrevious();\n if (handle.previous && handle.previous !== handle.current) {\n handle.previous.classList.remove(\n this.theme.class('drag-handle-grab'),\n this.theme.class('drag-handle-grabbing')\n );\n }\n if (!this.ngnMovable() || !this.ngnMovableChangeCursor()) {\n handle.current?.classList.remove(\n this.theme.class('drag-handle-grab'),\n this.theme.class('drag-handle-grabbing')\n );\n return;\n }\n if (this._isDragging()) {\n handle.current?.classList.add(this.theme.class('drag-handle-grabbing'));\n handle.current?.classList.remove(this.theme.class('drag-handle-grab'));\n } else {\n handle.current?.classList.add(this.theme.class('drag-handle-grab'));\n handle.current?.classList.remove(this.theme.class('drag-handle-grabbing'));\n }\n }\n}\n","import { Directive, DOCUMENT, effect, ElementRef, inject, input, signal } from '@angular/core';\nimport {\n domEventSignal,\n elementSizeSignal,\n injectThemeTemplate,\n Platform,\n} from '@ngneers/controls/api/ng';\nimport { resizableDirectiveTemplate } from '@ngneers/controls-themes/templates/api';\n\nimport { NgnMovable } from './movable';\n\n@Directive({\n selector: '[ngnResizable]',\n host: {\n '[class]': 'theme.classes({ resizable: !!ngnResizable(), resized: resized()})',\n },\n})\nexport class NgnResizable {\n protected readonly theme = injectThemeTemplate(resizableDirectiveTemplate);\n private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef<HTMLElement>);\n private readonly _isBrowser = inject(Platform).isBrowser;\n private readonly _document = inject(DOCUMENT);\n private readonly _ngnMovable = inject(NgnMovable, { optional: true });\n private _isPointerDown = false;\n\n /**\n * Whether the element is resizable. The empty string (bare attribute) enables it.\n * @default true\n */\n public readonly ngnResizable = input<boolean | null | undefined | ''>(true);\n /**\n * Minimum and maximum size constraints for the resizable element. Number values\n * are treated as pixels; strings are used as-is. Any bound left `null`/`undefined`\n * is unconstrained (the effective maximum is still clamped to the viewport).\n */\n public readonly ngnResizableSizeLimits = input<{\n minWidth: string | number | null | undefined;\n minHeight: string | number | null | undefined;\n maxWidth: string | number | null | undefined;\n maxHeight: string | number | null | undefined;\n }>();\n\n protected readonly resized = signal(false);\n\n private readonly _pointerDownSignal = domEventSignal(this._el, 'pointerdown');\n private readonly _pointerUpSignal = domEventSignal(this._document, 'pointerup');\n\n private readonly _resizeEvent = elementSizeSignal(this._el);\n\n /**\n * Formats a size value from string | number | null | undefined to a CSS string.\n * @param value The size value to format\n * @returns The formatted CSS string or null if the value is null/undefined\n */\n private formatSizeValue(value: string | number | null | undefined): string | null {\n if (value === null || value === undefined) {\n return null;\n }\n return typeof value === 'number' ? `${value}px` : value;\n }\n\n constructor() {\n effect(() => {\n if (this._pointerDownSignal()) {\n this._isPointerDown = true;\n }\n });\n\n effect(() => {\n if (this._pointerUpSignal()) {\n this._isPointerDown = false;\n }\n });\n\n effect(() => {\n if (!this._isBrowser) {\n return;\n }\n const _size = this._resizeEvent(); // just as the trigger\n if (!this._isPointerDown) {\n // only react to resize events when the pointer is down (user is resizing)\n return;\n }\n\n // If the element is also movable, bake its position to avoid misplacement after resizing\n this._ngnMovable?.bakePosition();\n\n // calculate the max width & height of the element based on the size, position & body\n\n const bodyWidth = this._document.body.clientWidth;\n const bodyHeight = this._document.body.clientHeight;\n\n const elRect = this._el.nativeElement.getBoundingClientRect();\n\n const maxWidth = bodyWidth - elRect.left;\n const maxHeight = bodyHeight - elRect.top;\n\n const inputMaxWidth = this.ngnResizableSizeLimits()?.maxWidth;\n const inputMaxHeight = this.ngnResizableSizeLimits()?.maxHeight;\n const formattedMaxWidth = this.formatSizeValue(inputMaxWidth);\n const formattedMaxHeight = this.formatSizeValue(inputMaxHeight);\n\n this._el.nativeElement.style.maxWidth = formattedMaxWidth\n ? `min(${formattedMaxWidth}, ${maxWidth}px)`\n : `${maxWidth}px`;\n this._el.nativeElement.style.maxHeight = formattedMaxHeight\n ? `min(${formattedMaxHeight}, ${maxHeight}px)`\n : `${maxHeight}px`;\n\n const inputMinWidth = this.ngnResizableSizeLimits()?.minWidth;\n const inputMinHeight = this.ngnResizableSizeLimits()?.minHeight;\n const formattedMinWidth = this.formatSizeValue(inputMinWidth);\n const formattedMinHeight = this.formatSizeValue(inputMinHeight);\n\n if (formattedMinWidth) {\n this._el.nativeElement.style.minWidth = formattedMinWidth;\n }\n if (formattedMinHeight) {\n this._el.nativeElement.style.minHeight = formattedMinHeight;\n }\n\n this.resized.set(true);\n });\n }\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { domEventObservable } from '@ngneers/controls/api/ng';\nimport { map } from 'rxjs';\n\n@Directive({\n selector: '[ngnScrollAmount]',\n})\nexport class NgnScrollAmount {\n private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Optional external scroll container. When set, scroll events and\n * dimensions are tracked on this element instead of the host element.\n */\n public readonly container = input<HTMLElement | undefined>(undefined, {\n alias: 'ngnScrollAmountContainer',\n });\n\n public readonly scrollTarget = computed(() => this.container() ?? this._el.nativeElement);\n public readonly scrollTop = signal(this._el.nativeElement.scrollTop);\n public readonly scrollLeft = signal(this._el.nativeElement.scrollLeft);\n\n private readonly _scrollEvent = domEventObservable(this.scrollTarget, 'scroll');\n\n constructor() {\n afterRenderEffect(() => {\n const obs = this._scrollEvent.pipe(\n map(e => {\n const target = e.target as HTMLElement;\n return {\n top: target.scrollTop,\n left: target.scrollLeft,\n };\n })\n );\n obs.subscribe(scroll => {\n this.scrollTop.set(scroll.top);\n this.scrollLeft.set(scroll.left);\n });\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYa,YAAY,CAAA;AACN,IAAA,GAAG,GAAG,MAAM,EAA0B,UAAuB,EAAC;IAC9D,QAAQ,GAAG,MAAM,CAAC,KAAK;iFAAC;IACxB,cAAc,GAAG,MAAM,CAAC,KAAK;uFAAC;AAE/C;;;;AAIG;IACa,YAAY,GAAG,KAAK,CAAC,IAAI,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE3E,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;AACxB,gBAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;YAC1B;AACF,QAAA,CAAC,CAAC;QACF,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,SAAS,EAAE;AAClB,QAAA,CAAC,CAAC;AAEF;;;;;;;AAOG;QACH,eAAe,CAAC,MAAK;AACnB,YAAA,IAAI,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxD,cAAc,CAAC,MAAK;AAClB,oBAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC;AAC/B,gBAAA,CAAC,CAAC;YACJ;iBAAO;AACL,gBAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC;YAC/B;AACF,QAAA,CAAC,CAAC;IACJ;IAEQ,SAAS,GAAA;AACf,QAAA,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE;YAC1B;QACF;AACA,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;YACxB;QAC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