ngx-semantic 2.0.7-beta.2 → 2.0.9

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 (99) hide show
  1. package/README.md +18 -18
  2. package/fesm2022/ngx-semantic-collections-breadcrumb.mjs +13 -13
  3. package/fesm2022/ngx-semantic-collections-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/ngx-semantic-collections-form.mjs +16 -16
  5. package/fesm2022/ngx-semantic-collections-form.mjs.map +1 -1
  6. package/fesm2022/ngx-semantic-collections-grid.mjs +13 -13
  7. package/fesm2022/ngx-semantic-collections-grid.mjs.map +1 -1
  8. package/fesm2022/ngx-semantic-collections-menu.mjs +16 -16
  9. package/fesm2022/ngx-semantic-collections-menu.mjs.map +1 -1
  10. package/fesm2022/ngx-semantic-collections-message.mjs +16 -16
  11. package/fesm2022/ngx-semantic-collections-message.mjs.map +1 -1
  12. package/fesm2022/ngx-semantic-collections-table.mjs +16 -16
  13. package/fesm2022/ngx-semantic-collections-table.mjs.map +1 -1
  14. package/fesm2022/ngx-semantic-core-base.mjs +3 -3
  15. package/fesm2022/ngx-semantic-core-base.mjs.map +1 -1
  16. package/fesm2022/ngx-semantic-elements-button.mjs +10 -10
  17. package/fesm2022/ngx-semantic-elements-button.mjs.map +1 -1
  18. package/fesm2022/ngx-semantic-elements-container.mjs +7 -7
  19. package/fesm2022/ngx-semantic-elements-container.mjs.map +1 -1
  20. package/fesm2022/ngx-semantic-elements-divider.mjs +7 -7
  21. package/fesm2022/ngx-semantic-elements-divider.mjs.map +1 -1
  22. package/fesm2022/ngx-semantic-elements-flag.mjs +7 -7
  23. package/fesm2022/ngx-semantic-elements-flag.mjs.map +1 -1
  24. package/fesm2022/ngx-semantic-elements-header.mjs +10 -10
  25. package/fesm2022/ngx-semantic-elements-header.mjs.map +1 -1
  26. package/fesm2022/ngx-semantic-elements-icon.mjs +10 -10
  27. package/fesm2022/ngx-semantic-elements-icon.mjs.map +1 -1
  28. package/fesm2022/ngx-semantic-elements-image.mjs +10 -10
  29. package/fesm2022/ngx-semantic-elements-image.mjs.map +1 -1
  30. package/fesm2022/ngx-semantic-elements-input.mjs +7 -7
  31. package/fesm2022/ngx-semantic-elements-input.mjs.map +1 -1
  32. package/fesm2022/ngx-semantic-elements-label.mjs +10 -10
  33. package/fesm2022/ngx-semantic-elements-label.mjs.map +1 -1
  34. package/fesm2022/ngx-semantic-elements-list.mjs +10 -10
  35. package/fesm2022/ngx-semantic-elements-list.mjs.map +1 -1
  36. package/fesm2022/ngx-semantic-elements-loader.mjs +7 -7
  37. package/fesm2022/ngx-semantic-elements-loader.mjs.map +1 -1
  38. package/fesm2022/ngx-semantic-elements-placeholder.mjs +19 -19
  39. package/fesm2022/ngx-semantic-elements-placeholder.mjs.map +1 -1
  40. package/fesm2022/ngx-semantic-elements-rail.mjs +7 -7
  41. package/fesm2022/ngx-semantic-elements-rail.mjs.map +1 -1
  42. package/fesm2022/ngx-semantic-elements-reveal.mjs +10 -10
  43. package/fesm2022/ngx-semantic-elements-reveal.mjs.map +1 -1
  44. package/fesm2022/ngx-semantic-elements-segment.mjs +13 -13
  45. package/fesm2022/ngx-semantic-elements-segment.mjs.map +1 -1
  46. package/fesm2022/ngx-semantic-elements-steps.mjs +19 -19
  47. package/fesm2022/ngx-semantic-elements-steps.mjs.map +1 -1
  48. package/fesm2022/ngx-semantic-modules-accordion.mjs +10 -10
  49. package/fesm2022/ngx-semantic-modules-accordion.mjs.map +1 -1
  50. package/fesm2022/ngx-semantic-modules-checkbox.mjs +7 -7
  51. package/fesm2022/ngx-semantic-modules-checkbox.mjs.map +1 -1
  52. package/fesm2022/ngx-semantic-modules-dimmer.mjs +13 -13
  53. package/fesm2022/ngx-semantic-modules-dimmer.mjs.map +1 -1
  54. package/fesm2022/ngx-semantic-modules-dropdown.mjs +19 -19
  55. package/fesm2022/ngx-semantic-modules-dropdown.mjs.map +1 -1
  56. package/fesm2022/ngx-semantic-modules-embed.mjs +10 -10
  57. package/fesm2022/ngx-semantic-modules-embed.mjs.map +1 -1
  58. package/fesm2022/ngx-semantic-modules-modal.mjs +16 -16
  59. package/fesm2022/ngx-semantic-modules-modal.mjs.map +1 -1
  60. package/fesm2022/ngx-semantic-modules-popup.mjs +10 -10
  61. package/fesm2022/ngx-semantic-modules-popup.mjs.map +1 -1
  62. package/fesm2022/ngx-semantic-modules-progress.mjs +7 -7
  63. package/fesm2022/ngx-semantic-modules-progress.mjs.map +1 -1
  64. package/fesm2022/ngx-semantic-modules-rating.mjs +7 -7
  65. package/fesm2022/ngx-semantic-modules-rating.mjs.map +1 -1
  66. package/fesm2022/ngx-semantic-modules-search.mjs +7 -7
  67. package/fesm2022/ngx-semantic-modules-search.mjs.map +1 -1
  68. package/fesm2022/ngx-semantic-modules-select.mjs +13 -13
  69. package/fesm2022/ngx-semantic-modules-select.mjs.map +1 -1
  70. package/fesm2022/ngx-semantic-modules-shape.mjs +10 -10
  71. package/fesm2022/ngx-semantic-modules-shape.mjs.map +1 -1
  72. package/fesm2022/ngx-semantic-modules-sidebar.mjs +16 -16
  73. package/fesm2022/ngx-semantic-modules-sidebar.mjs.map +1 -1
  74. package/fesm2022/ngx-semantic-modules-sticky.mjs +7 -7
  75. package/fesm2022/ngx-semantic-modules-sticky.mjs.map +1 -1
  76. package/fesm2022/ngx-semantic-modules-tabs.mjs +10 -10
  77. package/fesm2022/ngx-semantic-modules-tabs.mjs.map +1 -1
  78. package/fesm2022/ngx-semantic-modules-transition.mjs +7 -7
  79. package/fesm2022/ngx-semantic-modules-transition.mjs.map +1 -1
  80. package/fesm2022/ngx-semantic-modules-visibility.mjs +525 -0
  81. package/fesm2022/ngx-semantic-modules-visibility.mjs.map +1 -0
  82. package/fesm2022/ngx-semantic-views-advertisement.mjs +7 -7
  83. package/fesm2022/ngx-semantic-views-advertisement.mjs.map +1 -1
  84. package/fesm2022/ngx-semantic-views-card.mjs +28 -28
  85. package/fesm2022/ngx-semantic-views-card.mjs.map +1 -1
  86. package/fesm2022/ngx-semantic-views-comment.mjs +31 -31
  87. package/fesm2022/ngx-semantic-views-comment.mjs.map +1 -1
  88. package/fesm2022/ngx-semantic-views-feed.mjs +28 -28
  89. package/fesm2022/ngx-semantic-views-feed.mjs.map +1 -1
  90. package/fesm2022/ngx-semantic-views-items.mjs +28 -28
  91. package/fesm2022/ngx-semantic-views-items.mjs.map +1 -1
  92. package/fesm2022/ngx-semantic-views-statistics.mjs +16 -16
  93. package/fesm2022/ngx-semantic-views-statistics.mjs.map +1 -1
  94. package/fesm2022/ngx-semantic.mjs +15 -9
  95. package/fesm2022/ngx-semantic.mjs.map +1 -1
  96. package/modules/visibility/package.json +4 -0
  97. package/package.json +5 -1
  98. package/types/ngx-semantic-modules-visibility.d.ts +124 -0
  99. package/types/ngx-semantic.d.ts +2 -1
@@ -0,0 +1,525 @@
1
+ import { __decorate } from 'tslib';
2
+ import { DOCUMENT, CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, ElementRef, Renderer2, NgZone, EventEmitter, Output, Input, Directive, NgModule } from '@angular/core';
5
+ import { InputBoolean } from 'ngx-semantic/core/util';
6
+ import { Subject, fromEvent } from 'rxjs';
7
+ import { takeUntil } from 'rxjs/operators';
8
+
9
+ function computeVisibilityCalculations(input) {
10
+ const offset = input.offset || 0;
11
+ let top = input.element.top;
12
+ let bottom = input.element.bottom;
13
+ let height = input.element.height;
14
+ if (input.includeMargin) {
15
+ top -= input.marginTop;
16
+ bottom += input.marginBottom;
17
+ height += input.marginTop + input.marginBottom;
18
+ }
19
+ const screenTop = input.screen.top + offset;
20
+ const screenBottom = input.screen.top + input.screen.height + offset;
21
+ const topVisible = screenBottom >= top;
22
+ const topPassed = screenTop >= top;
23
+ const bottomVisible = screenBottom >= bottom;
24
+ const bottomPassed = screenTop >= bottom;
25
+ const onScreen = topVisible && !bottomPassed;
26
+ const passing = topPassed && !bottomPassed;
27
+ const pixelsPassed = Math.max(0, screenTop - top);
28
+ const percentagePassed = height > 0 ? pixelsPassed / height : 0;
29
+ const direction = input.scrollTop < input.lastScrollTop ? 'up' : 'down';
30
+ return {
31
+ topVisible,
32
+ topPassed,
33
+ bottomVisible,
34
+ bottomPassed,
35
+ passing,
36
+ onScreen,
37
+ offScreen: !onScreen,
38
+ fits: height < input.screen.height,
39
+ width: input.element.width,
40
+ height,
41
+ pixelsPassed,
42
+ percentagePassed,
43
+ direction
44
+ };
45
+ }
46
+ function passedAmounts(config) {
47
+ if (!config) {
48
+ return [];
49
+ }
50
+ if (Array.isArray(config)) {
51
+ return config;
52
+ }
53
+ return Object.keys(config);
54
+ }
55
+ /** Convert `'10%'` / `'200px'` / `'50'` into pixels for the current element height. */
56
+ function passedThresholdPixels(amount, elementHeight) {
57
+ const trimmed = amount.trim();
58
+ if (trimmed.endsWith('%')) {
59
+ return (parseFloat(trimmed) / 100) * elementHeight;
60
+ }
61
+ return parseFloat(trimmed);
62
+ }
63
+ function shouldEmitCondition(current, previous, alreadyOccurred, once, continuous) {
64
+ if (!current) {
65
+ return false;
66
+ }
67
+ if (continuous) {
68
+ return true;
69
+ }
70
+ if (once) {
71
+ return !alreadyOccurred;
72
+ }
73
+ return !previous;
74
+ }
75
+ function shouldEmitReverse(current, previous, forwardOccurred, reverseOccurred, once, continuous) {
76
+ if (current || !(forwardOccurred || previous)) {
77
+ return false;
78
+ }
79
+ if (continuous) {
80
+ return true;
81
+ }
82
+ if (once) {
83
+ return !reverseOccurred;
84
+ }
85
+ return previous;
86
+ }
87
+
88
+ const CONDITION_KEYS = ['onScreen', 'offScreen', 'topVisible', 'topPassed', 'bottomVisible', 'bottomPassed', 'passing'];
89
+ const REVERSE_KEYS = {
90
+ topVisible: 'topVisibleReverse',
91
+ topPassed: 'topPassedReverse',
92
+ bottomVisible: 'bottomVisibleReverse',
93
+ bottomPassed: 'bottomPassedReverse',
94
+ passing: 'passingReverse'
95
+ };
96
+ class SuiVisibilityDirective {
97
+ constructor() {
98
+ this.document = inject(DOCUMENT);
99
+ this.el = inject(ElementRef);
100
+ this.renderer = inject(Renderer2);
101
+ this.zone = inject(NgZone);
102
+ /** Semantic UI `once` — each condition fires once until `refresh()`. */
103
+ this.suiOnce = true;
104
+ /** Fire on every check while the condition holds. */
105
+ this.suiContinuous = false;
106
+ /** Scroll context (`window`, selector, or element). */
107
+ this.suiContext = 'window';
108
+ /** Alias of `suiContext` (sticky-style). Takes precedence when set. */
109
+ this.suiScrollContext = null;
110
+ this.suiOffset = 0;
111
+ this.suiIncludeMargin = false;
112
+ this.suiInitialCheck = true;
113
+ this.suiObserveChanges = false;
114
+ /** Milliseconds to throttle scroll checks; `false` uses `requestAnimationFrame`. */
115
+ this.suiThrottle = false;
116
+ this.suiType = false;
117
+ this.suiPassed = null;
118
+ this.suiZIndex = 1;
119
+ this.suiOnOnScreen = new EventEmitter();
120
+ this.suiOnOffScreen = new EventEmitter();
121
+ this.suiOnTopVisible = new EventEmitter();
122
+ this.suiOnTopPassed = new EventEmitter();
123
+ this.suiOnBottomVisible = new EventEmitter();
124
+ this.suiOnBottomPassed = new EventEmitter();
125
+ this.suiOnPassing = new EventEmitter();
126
+ this.suiOnTopVisibleReverse = new EventEmitter();
127
+ this.suiOnTopPassedReverse = new EventEmitter();
128
+ this.suiOnBottomVisibleReverse = new EventEmitter();
129
+ this.suiOnBottomPassedReverse = new EventEmitter();
130
+ this.suiOnPassingReverse = new EventEmitter();
131
+ this.suiOnUpdate = new EventEmitter();
132
+ this.suiOnPassed = new EventEmitter();
133
+ this.suiOnRefresh = new EventEmitter();
134
+ this.suiOnFixed = new EventEmitter();
135
+ this.suiOnUnfixed = new EventEmitter();
136
+ this.suiOnLoad = new EventEmitter();
137
+ this.lastCalculations = null;
138
+ this.destroy$ = new Subject();
139
+ this.occurred = {};
140
+ this.previous = {};
141
+ this.scrollEl = window;
142
+ this.lastScrollTop = 0;
143
+ this.disabled = false;
144
+ this.mutationObserver = null;
145
+ this.refreshTimer = null;
146
+ this.throttleTimer = null;
147
+ this.rafId = null;
148
+ this.imageLoaded = false;
149
+ this.isFixed = false;
150
+ this.placeholder = null;
151
+ this.emitters = {
152
+ onScreen: this.suiOnOnScreen,
153
+ offScreen: this.suiOnOffScreen,
154
+ topVisible: this.suiOnTopVisible,
155
+ topPassed: this.suiOnTopPassed,
156
+ bottomVisible: this.suiOnBottomVisible,
157
+ bottomPassed: this.suiOnBottomPassed,
158
+ passing: this.suiOnPassing,
159
+ topVisibleReverse: this.suiOnTopVisibleReverse,
160
+ topPassedReverse: this.suiOnTopPassedReverse,
161
+ bottomVisibleReverse: this.suiOnBottomVisibleReverse,
162
+ bottomPassedReverse: this.suiOnBottomPassedReverse,
163
+ passingReverse: this.suiOnPassingReverse
164
+ };
165
+ }
166
+ ngOnInit() {
167
+ this.bindListeners();
168
+ }
169
+ ngAfterViewInit() {
170
+ if (this.suiObserveChanges && typeof MutationObserver !== 'undefined') {
171
+ this.mutationObserver = new MutationObserver(() => this.scheduleRefresh());
172
+ this.mutationObserver.observe(this.el.nativeElement, { childList: true, subtree: true, attributes: true });
173
+ }
174
+ if (this.suiInitialCheck) {
175
+ queueMicrotask(() => this.check());
176
+ }
177
+ }
178
+ ngOnDestroy() {
179
+ this.destroy$.next();
180
+ this.destroy$.complete();
181
+ this.mutationObserver?.disconnect();
182
+ if (this.refreshTimer) {
183
+ clearTimeout(this.refreshTimer);
184
+ }
185
+ if (this.throttleTimer) {
186
+ clearTimeout(this.throttleTimer);
187
+ }
188
+ if (this.rafId != null) {
189
+ cancelAnimationFrame(this.rafId);
190
+ }
191
+ this.removePlaceholder();
192
+ }
193
+ /** Mirrors `visibility('refresh')` — clears occurred flags and rechecks. */
194
+ refresh() {
195
+ Object.keys(this.occurred).forEach((key) => {
196
+ delete this.occurred[key];
197
+ });
198
+ Object.keys(this.previous).forEach((key) => {
199
+ delete this.previous[key];
200
+ });
201
+ this.suiOnRefresh.emit();
202
+ this.check();
203
+ }
204
+ disable() {
205
+ this.disabled = true;
206
+ }
207
+ enable() {
208
+ this.disabled = false;
209
+ this.check();
210
+ }
211
+ /** Mirrors `visibility('check')`. */
212
+ check() {
213
+ if (this.disabled) {
214
+ return;
215
+ }
216
+ this.scrollEl = this.resolveScrollElement();
217
+ const calculations = this.readCalculations();
218
+ this.lastCalculations = calculations;
219
+ this.suiOnUpdate.emit(calculations);
220
+ this.emitConditions(calculations);
221
+ this.emitPassed(calculations);
222
+ this.applyImageType(calculations);
223
+ this.applyFixedType(calculations);
224
+ }
225
+ bindListeners() {
226
+ const win = this.document.defaultView;
227
+ this.scrollEl = this.resolveScrollElement();
228
+ this.zone.runOutsideAngular(() => {
229
+ const scrollTarget = this.scrollEl === window ? win : this.scrollEl;
230
+ fromEvent(scrollTarget, 'scroll', { passive: true })
231
+ .pipe(takeUntil(this.destroy$))
232
+ .subscribe(() => this.scheduleCheck());
233
+ fromEvent(win, 'resize', { passive: true })
234
+ .pipe(takeUntil(this.destroy$))
235
+ .subscribe(() => this.scheduleCheck());
236
+ });
237
+ }
238
+ scheduleCheck() {
239
+ if (this.disabled) {
240
+ return;
241
+ }
242
+ if (typeof this.suiThrottle === 'number' && this.suiThrottle > 0) {
243
+ if (this.throttleTimer != null) {
244
+ clearTimeout(this.throttleTimer);
245
+ }
246
+ this.throttleTimer = setTimeout(() => {
247
+ this.throttleTimer = null;
248
+ this.zone.run(() => this.check());
249
+ }, this.suiThrottle);
250
+ return;
251
+ }
252
+ if (this.rafId != null) {
253
+ return;
254
+ }
255
+ this.rafId = requestAnimationFrame(() => {
256
+ this.rafId = null;
257
+ this.zone.run(() => this.check());
258
+ });
259
+ }
260
+ scheduleRefresh() {
261
+ if (this.refreshTimer) {
262
+ clearTimeout(this.refreshTimer);
263
+ }
264
+ this.refreshTimer = setTimeout(() => {
265
+ this.refreshTimer = null;
266
+ this.refresh();
267
+ }, 100);
268
+ }
269
+ resolveScrollElement() {
270
+ const ctx = this.suiScrollContext ?? this.suiContext;
271
+ if (!ctx || ctx === 'window') {
272
+ return window;
273
+ }
274
+ if (typeof ctx !== 'string') {
275
+ return ctx;
276
+ }
277
+ const found = this.document.querySelector(ctx);
278
+ return found || window;
279
+ }
280
+ readScrollTop() {
281
+ return this.scrollEl === window ? window.scrollY : this.scrollEl.scrollTop;
282
+ }
283
+ readCalculations() {
284
+ const host = this.el.nativeElement;
285
+ const elRect = host.getBoundingClientRect();
286
+ const cs = getComputedStyle(host);
287
+ const marginTop = parseFloat(cs.marginTop) || 0;
288
+ const marginBottom = parseFloat(cs.marginBottom) || 0;
289
+ const scrollTop = this.readScrollTop();
290
+ const screen = this.scrollEl === window
291
+ ? { top: 0, height: window.innerHeight }
292
+ : (() => {
293
+ const r = this.scrollEl.getBoundingClientRect();
294
+ return { top: r.top, height: r.height };
295
+ })();
296
+ const calculations = computeVisibilityCalculations({
297
+ element: { top: elRect.top, bottom: elRect.bottom, width: elRect.width, height: elRect.height },
298
+ screen,
299
+ offset: this.suiOffset,
300
+ includeMargin: this.suiIncludeMargin,
301
+ marginTop,
302
+ marginBottom,
303
+ lastScrollTop: this.lastScrollTop,
304
+ scrollTop
305
+ });
306
+ this.lastScrollTop = scrollTop;
307
+ return calculations;
308
+ }
309
+ emitConditions(calculations) {
310
+ for (const key of CONDITION_KEYS) {
311
+ const current = calculations[key];
312
+ const previous = !!this.previous[key];
313
+ const reverseKey = REVERSE_KEYS[key];
314
+ if (shouldEmitCondition(current, previous, !!this.occurred[key], this.suiOnce, this.suiContinuous)) {
315
+ this.emitters[key].emit(calculations);
316
+ }
317
+ if (reverseKey && shouldEmitReverse(current, previous, !!this.occurred[key], !!this.occurred[reverseKey], this.suiOnce, this.suiContinuous)) {
318
+ this.emitters[reverseKey].emit(calculations);
319
+ this.occurred[reverseKey] = true;
320
+ }
321
+ if (current) {
322
+ this.occurred[key] = true;
323
+ if (!this.suiOnce && reverseKey) {
324
+ this.occurred[reverseKey] = false;
325
+ }
326
+ }
327
+ else if (!this.suiOnce) {
328
+ this.occurred[key] = false;
329
+ }
330
+ this.previous[key] = current;
331
+ }
332
+ }
333
+ emitPassed(calculations) {
334
+ if (!calculations.topPassed && !calculations.passing) {
335
+ return;
336
+ }
337
+ for (const amount of passedAmounts(this.suiPassed)) {
338
+ const px = passedThresholdPixels(amount, calculations.height);
339
+ if (Number.isNaN(px) || calculations.pixelsPassed < px) {
340
+ continue;
341
+ }
342
+ const occurredKey = `passed:${amount}`;
343
+ const previous = !!this.previous[occurredKey];
344
+ if (shouldEmitCondition(true, previous, !!this.occurred[occurredKey], this.suiOnce, this.suiContinuous)) {
345
+ this.suiOnPassed.emit({ amount, calculations });
346
+ }
347
+ this.occurred[occurredKey] = true;
348
+ this.previous[occurredKey] = true;
349
+ }
350
+ }
351
+ applyImageType(calculations) {
352
+ if (this.suiType !== 'image' || this.imageLoaded || !calculations.topVisible) {
353
+ return;
354
+ }
355
+ const host = this.el.nativeElement;
356
+ const src = host.getAttribute('data-src');
357
+ if (!src) {
358
+ return;
359
+ }
360
+ this.renderer.setAttribute(host, 'src', src);
361
+ this.renderer.removeAttribute(host, 'data-src');
362
+ this.imageLoaded = true;
363
+ this.suiOnLoad.emit(calculations);
364
+ }
365
+ applyFixedType(calculations) {
366
+ if (this.suiType !== 'fixed') {
367
+ return;
368
+ }
369
+ if (calculations.topPassed) {
370
+ this.fixElement(calculations);
371
+ }
372
+ else {
373
+ this.unfixElement(calculations);
374
+ }
375
+ }
376
+ fixElement(calculations) {
377
+ if (this.isFixed) {
378
+ return;
379
+ }
380
+ const host = this.el.nativeElement;
381
+ const rect = host.getBoundingClientRect();
382
+ const parent = host.parentNode;
383
+ if (parent) {
384
+ this.placeholder = this.renderer.createElement('div');
385
+ this.renderer.setStyle(this.placeholder, 'display', 'block');
386
+ this.renderer.setStyle(this.placeholder, 'width', `${rect.width}px`);
387
+ this.renderer.setStyle(this.placeholder, 'height', `${rect.height}px`);
388
+ this.renderer.insertBefore(parent, this.placeholder, host);
389
+ }
390
+ this.renderer.addClass(host, 'fixed');
391
+ this.renderer.setStyle(host, 'position', 'fixed');
392
+ this.renderer.setStyle(host, 'top', `${this.suiOffset}px`);
393
+ this.renderer.setStyle(host, 'z-index', String(this.suiZIndex));
394
+ this.isFixed = true;
395
+ this.suiOnFixed.emit(calculations);
396
+ }
397
+ unfixElement(calculations) {
398
+ if (!this.isFixed) {
399
+ return;
400
+ }
401
+ const host = this.el.nativeElement;
402
+ this.renderer.removeClass(host, 'fixed');
403
+ this.renderer.removeStyle(host, 'position');
404
+ this.renderer.removeStyle(host, 'top');
405
+ this.renderer.removeStyle(host, 'z-index');
406
+ this.removePlaceholder();
407
+ this.isFixed = false;
408
+ this.suiOnUnfixed.emit(calculations);
409
+ }
410
+ removePlaceholder() {
411
+ if (!this.placeholder) {
412
+ return;
413
+ }
414
+ const parent = this.placeholder.parentNode;
415
+ if (parent) {
416
+ this.renderer.removeChild(parent, this.placeholder);
417
+ }
418
+ this.placeholder = null;
419
+ }
420
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiVisibilityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
421
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: SuiVisibilityDirective, isStandalone: true, selector: "[suiVisibility]", inputs: { suiOnce: "suiOnce", suiContinuous: "suiContinuous", suiContext: "suiContext", suiScrollContext: "suiScrollContext", suiOffset: "suiOffset", suiIncludeMargin: "suiIncludeMargin", suiInitialCheck: "suiInitialCheck", suiObserveChanges: "suiObserveChanges", suiThrottle: "suiThrottle", suiType: "suiType", suiPassed: "suiPassed", suiZIndex: "suiZIndex" }, outputs: { suiOnOnScreen: "suiOnOnScreen", suiOnOffScreen: "suiOnOffScreen", suiOnTopVisible: "suiOnTopVisible", suiOnTopPassed: "suiOnTopPassed", suiOnBottomVisible: "suiOnBottomVisible", suiOnBottomPassed: "suiOnBottomPassed", suiOnPassing: "suiOnPassing", suiOnTopVisibleReverse: "suiOnTopVisibleReverse", suiOnTopPassedReverse: "suiOnTopPassedReverse", suiOnBottomVisibleReverse: "suiOnBottomVisibleReverse", suiOnBottomPassedReverse: "suiOnBottomPassedReverse", suiOnPassingReverse: "suiOnPassingReverse", suiOnUpdate: "suiOnUpdate", suiOnPassed: "suiOnPassed", suiOnRefresh: "suiOnRefresh", suiOnFixed: "suiOnFixed", suiOnUnfixed: "suiOnUnfixed", suiOnLoad: "suiOnLoad" }, exportAs: ["suiVisibility"], ngImport: i0 }); }
422
+ }
423
+ __decorate([
424
+ InputBoolean()
425
+ ], SuiVisibilityDirective.prototype, "suiOnce", void 0);
426
+ __decorate([
427
+ InputBoolean()
428
+ ], SuiVisibilityDirective.prototype, "suiContinuous", void 0);
429
+ __decorate([
430
+ InputBoolean()
431
+ ], SuiVisibilityDirective.prototype, "suiIncludeMargin", void 0);
432
+ __decorate([
433
+ InputBoolean()
434
+ ], SuiVisibilityDirective.prototype, "suiInitialCheck", void 0);
435
+ __decorate([
436
+ InputBoolean()
437
+ ], SuiVisibilityDirective.prototype, "suiObserveChanges", void 0);
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiVisibilityDirective, decorators: [{
439
+ type: Directive,
440
+ args: [{
441
+ standalone: true,
442
+ selector: '[suiVisibility]',
443
+ exportAs: 'suiVisibility'
444
+ }]
445
+ }], propDecorators: { suiOnce: [{
446
+ type: Input
447
+ }], suiContinuous: [{
448
+ type: Input
449
+ }], suiContext: [{
450
+ type: Input
451
+ }], suiScrollContext: [{
452
+ type: Input
453
+ }], suiOffset: [{
454
+ type: Input
455
+ }], suiIncludeMargin: [{
456
+ type: Input
457
+ }], suiInitialCheck: [{
458
+ type: Input
459
+ }], suiObserveChanges: [{
460
+ type: Input
461
+ }], suiThrottle: [{
462
+ type: Input
463
+ }], suiType: [{
464
+ type: Input
465
+ }], suiPassed: [{
466
+ type: Input
467
+ }], suiZIndex: [{
468
+ type: Input
469
+ }], suiOnOnScreen: [{
470
+ type: Output
471
+ }], suiOnOffScreen: [{
472
+ type: Output
473
+ }], suiOnTopVisible: [{
474
+ type: Output
475
+ }], suiOnTopPassed: [{
476
+ type: Output
477
+ }], suiOnBottomVisible: [{
478
+ type: Output
479
+ }], suiOnBottomPassed: [{
480
+ type: Output
481
+ }], suiOnPassing: [{
482
+ type: Output
483
+ }], suiOnTopVisibleReverse: [{
484
+ type: Output
485
+ }], suiOnTopPassedReverse: [{
486
+ type: Output
487
+ }], suiOnBottomVisibleReverse: [{
488
+ type: Output
489
+ }], suiOnBottomPassedReverse: [{
490
+ type: Output
491
+ }], suiOnPassingReverse: [{
492
+ type: Output
493
+ }], suiOnUpdate: [{
494
+ type: Output
495
+ }], suiOnPassed: [{
496
+ type: Output
497
+ }], suiOnRefresh: [{
498
+ type: Output
499
+ }], suiOnFixed: [{
500
+ type: Output
501
+ }], suiOnUnfixed: [{
502
+ type: Output
503
+ }], suiOnLoad: [{
504
+ type: Output
505
+ }] } });
506
+
507
+ class SuiVisibilityModule {
508
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiVisibilityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
509
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: SuiVisibilityModule, imports: [CommonModule, SuiVisibilityDirective], exports: [SuiVisibilityDirective] }); }
510
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiVisibilityModule, imports: [CommonModule] }); }
511
+ }
512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiVisibilityModule, decorators: [{
513
+ type: NgModule,
514
+ args: [{
515
+ imports: [CommonModule, SuiVisibilityDirective],
516
+ exports: [SuiVisibilityDirective]
517
+ }]
518
+ }] });
519
+
520
+ /**
521
+ * Generated bundle index. Do not edit.
522
+ */
523
+
524
+ export { SuiVisibilityDirective, SuiVisibilityModule };
525
+ //# sourceMappingURL=ngx-semantic-modules-visibility.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-semantic-modules-visibility.mjs","sources":["../../src/modules/visibility/visibility-util.ts","../../src/modules/visibility/visibility.directive.ts","../../src/modules/visibility/visibility.module.ts","../../src/modules/visibility/ngx-semantic-modules-visibility.ts"],"sourcesContent":["import { SuiVisibilityCalculations, SuiVisibilityDirection, SuiVisibilityPassedConfig } from './visibility.types';\n\nexport interface SuiVisibilityRect {\n top: number;\n bottom: number;\n width: number;\n height: number;\n}\n\nexport interface SuiVisibilityComputeInput {\n element: SuiVisibilityRect;\n /** Visible viewport of the scroll context, in the same coordinate space as `element`. */\n screen: {top: number; height: number};\n offset: number;\n includeMargin: boolean;\n marginTop: number;\n marginBottom: number;\n lastScrollTop: number;\n scrollTop: number;\n}\n\nexport function computeVisibilityCalculations(input: SuiVisibilityComputeInput): SuiVisibilityCalculations {\n const offset = input.offset || 0;\n let top = input.element.top;\n let bottom = input.element.bottom;\n let height = input.element.height;\n if (input.includeMargin) {\n top -= input.marginTop;\n bottom += input.marginBottom;\n height += input.marginTop + input.marginBottom;\n }\n\n const screenTop = input.screen.top + offset;\n const screenBottom = input.screen.top + input.screen.height + offset;\n\n const topVisible = screenBottom >= top;\n const topPassed = screenTop >= top;\n const bottomVisible = screenBottom >= bottom;\n const bottomPassed = screenTop >= bottom;\n const onScreen = topVisible && !bottomPassed;\n const passing = topPassed && !bottomPassed;\n const pixelsPassed = Math.max(0, screenTop - top);\n const percentagePassed = height > 0 ? pixelsPassed / height : 0;\n const direction: SuiVisibilityDirection = input.scrollTop < input.lastScrollTop ? 'up' : 'down';\n\n return {\n topVisible,\n topPassed,\n bottomVisible,\n bottomPassed,\n passing,\n onScreen,\n offScreen: !onScreen,\n fits: height < input.screen.height,\n width: input.element.width,\n height,\n pixelsPassed,\n percentagePassed,\n direction\n };\n}\n\nexport function passedAmounts(config: SuiVisibilityPassedConfig | null | undefined): string[] {\n if (!config) {\n return [];\n }\n if (Array.isArray(config)) {\n return config;\n }\n return Object.keys(config);\n}\n\n/** Convert `'10%'` / `'200px'` / `'50'` into pixels for the current element height. */\nexport function passedThresholdPixels(amount: string, elementHeight: number): number {\n const trimmed = amount.trim();\n if (trimmed.endsWith('%')) {\n return (parseFloat(trimmed) / 100) * elementHeight;\n }\n return parseFloat(trimmed);\n}\n\nexport function shouldEmitCondition(\n current: boolean,\n previous: boolean,\n alreadyOccurred: boolean,\n once: boolean,\n continuous: boolean\n): boolean {\n if (!current) {\n return false;\n }\n if (continuous) {\n return true;\n }\n if (once) {\n return !alreadyOccurred;\n }\n return !previous;\n}\n\nexport function shouldEmitReverse(\n current: boolean,\n previous: boolean,\n forwardOccurred: boolean,\n reverseOccurred: boolean,\n once: boolean,\n continuous: boolean\n): boolean {\n if (current || !(forwardOccurred || previous)) {\n return false;\n }\n if (continuous) {\n return true;\n }\n if (once) {\n return !reverseOccurred;\n }\n return previous;\n}\n","/**\n * Semantic UI [Visibility](https://semantic-ui.com/behaviors/visibility.html) — Angular port of `$.fn.visibility`.\n * Add `suiVisibility` to any element to receive viewport/scroll callbacks.\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output, Renderer2, inject } from '@angular/core';\nimport { InputBoolean } from 'ngx-semantic/core/util';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport {\n computeVisibilityCalculations,\n passedAmounts,\n passedThresholdPixels,\n shouldEmitCondition,\n shouldEmitReverse\n} from './visibility-util';\nimport { SuiVisibilityCalculations, SuiVisibilityPassedConfig, SuiVisibilityPassedEvent, SuiVisibilityType } from './visibility.types';\n\nconst CONDITION_KEYS = ['onScreen', 'offScreen', 'topVisible', 'topPassed', 'bottomVisible', 'bottomPassed', 'passing'] as const;\n\ntype ConditionKey = typeof CONDITION_KEYS[number];\n\nconst REVERSE_KEYS: Partial<Record<ConditionKey, string>> = {\n topVisible: 'topVisibleReverse',\n topPassed: 'topPassedReverse',\n bottomVisible: 'bottomVisibleReverse',\n bottomPassed: 'bottomPassedReverse',\n passing: 'passingReverse'\n};\n\n@Directive({\n standalone: true,\n selector: '[suiVisibility]',\n exportAs: 'suiVisibility'\n})\nexport class SuiVisibilityDirective implements OnInit, AfterViewInit, OnDestroy {\n private readonly document = inject<Document>(DOCUMENT);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly zone = inject(NgZone);\n\n /** Semantic UI `once` — each condition fires once until `refresh()`. */\n @Input() @InputBoolean() public suiOnce = true;\n /** Fire on every check while the condition holds. */\n @Input() @InputBoolean() public suiContinuous = false;\n /** Scroll context (`window`, selector, or element). */\n @Input() public suiContext: 'window' | string | HTMLElement | null = 'window';\n /** Alias of `suiContext` (sticky-style). Takes precedence when set. */\n @Input() public suiScrollContext: 'window' | string | HTMLElement | null = null;\n @Input() public suiOffset = 0;\n @Input() @InputBoolean() public suiIncludeMargin = false;\n @Input() @InputBoolean() public suiInitialCheck = true;\n @Input() @InputBoolean() public suiObserveChanges = false;\n /** Milliseconds to throttle scroll checks; `false` uses `requestAnimationFrame`. */\n @Input() public suiThrottle: number | false = false;\n @Input() public suiType: SuiVisibilityType = false;\n @Input() public suiPassed: SuiVisibilityPassedConfig | null = null;\n @Input() public suiZIndex = 1;\n\n @Output() public readonly suiOnOnScreen = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnOffScreen = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnTopVisible = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnTopPassed = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnBottomVisible = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnBottomPassed = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnPassing = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnTopVisibleReverse = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnTopPassedReverse = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnBottomVisibleReverse = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnBottomPassedReverse = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnPassingReverse = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnUpdate = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnPassed = new EventEmitter<SuiVisibilityPassedEvent>();\n @Output() public readonly suiOnRefresh = new EventEmitter<void>();\n @Output() public readonly suiOnFixed = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnUnfixed = new EventEmitter<SuiVisibilityCalculations>();\n @Output() public readonly suiOnLoad = new EventEmitter<SuiVisibilityCalculations>();\n\n public lastCalculations: SuiVisibilityCalculations | null = null;\n\n private readonly destroy$ = new Subject<void>();\n private readonly occurred: Record<string, boolean> = {};\n private readonly previous: Record<string, boolean> = {};\n private scrollEl: Window | HTMLElement = window;\n private lastScrollTop = 0;\n private disabled = false;\n private mutationObserver: MutationObserver | null = null;\n private refreshTimer: ReturnType<typeof setTimeout> | null = null;\n private throttleTimer: ReturnType<typeof setTimeout> | null = null;\n private rafId: number | null = null;\n private imageLoaded = false;\n private isFixed = false;\n private placeholder: HTMLElement | null = null;\n\n private readonly emitters: Record<string, EventEmitter<SuiVisibilityCalculations>> = {\n onScreen: this.suiOnOnScreen,\n offScreen: this.suiOnOffScreen,\n topVisible: this.suiOnTopVisible,\n topPassed: this.suiOnTopPassed,\n bottomVisible: this.suiOnBottomVisible,\n bottomPassed: this.suiOnBottomPassed,\n passing: this.suiOnPassing,\n topVisibleReverse: this.suiOnTopVisibleReverse,\n topPassedReverse: this.suiOnTopPassedReverse,\n bottomVisibleReverse: this.suiOnBottomVisibleReverse,\n bottomPassedReverse: this.suiOnBottomPassedReverse,\n passingReverse: this.suiOnPassingReverse\n };\n\n public ngOnInit(): void {\n this.bindListeners();\n }\n\n public ngAfterViewInit(): void {\n if (this.suiObserveChanges && typeof MutationObserver !== 'undefined') {\n this.mutationObserver = new MutationObserver(() => this.scheduleRefresh());\n this.mutationObserver.observe(this.el.nativeElement, { childList: true, subtree: true, attributes: true });\n }\n if (this.suiInitialCheck) {\n queueMicrotask(() => this.check());\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.mutationObserver?.disconnect();\n if (this.refreshTimer) {\n clearTimeout(this.refreshTimer);\n }\n if (this.throttleTimer) {\n clearTimeout(this.throttleTimer);\n }\n if (this.rafId != null) {\n cancelAnimationFrame(this.rafId);\n }\n this.removePlaceholder();\n }\n\n /** Mirrors `visibility('refresh')` — clears occurred flags and rechecks. */\n public refresh(): void {\n Object.keys(this.occurred).forEach((key) => {\n delete this.occurred[key];\n });\n Object.keys(this.previous).forEach((key) => {\n delete this.previous[key];\n });\n this.suiOnRefresh.emit();\n this.check();\n }\n\n public disable(): void {\n this.disabled = true;\n }\n\n public enable(): void {\n this.disabled = false;\n this.check();\n }\n\n /** Mirrors `visibility('check')`. */\n public check(): void {\n if (this.disabled) {\n return;\n }\n this.scrollEl = this.resolveScrollElement();\n const calculations = this.readCalculations();\n this.lastCalculations = calculations;\n this.suiOnUpdate.emit(calculations);\n this.emitConditions(calculations);\n this.emitPassed(calculations);\n this.applyImageType(calculations);\n this.applyFixedType(calculations);\n }\n\n private bindListeners(): void {\n const win = this.document.defaultView!;\n this.scrollEl = this.resolveScrollElement();\n this.zone.runOutsideAngular(() => {\n const scrollTarget = this.scrollEl === window ? win : this.scrollEl;\n fromEvent(scrollTarget, 'scroll', { passive: true })\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.scheduleCheck());\n fromEvent(win, 'resize', { passive: true })\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.scheduleCheck());\n });\n }\n\n private scheduleCheck(): void {\n if (this.disabled) {\n return;\n }\n if (typeof this.suiThrottle === 'number' && this.suiThrottle > 0) {\n if (this.throttleTimer != null) {\n clearTimeout(this.throttleTimer);\n }\n this.throttleTimer = setTimeout(() => {\n this.throttleTimer = null;\n this.zone.run(() => this.check());\n }, this.suiThrottle);\n return;\n }\n if (this.rafId != null) {\n return;\n }\n this.rafId = requestAnimationFrame(() => {\n this.rafId = null;\n this.zone.run(() => this.check());\n });\n }\n\n private scheduleRefresh(): void {\n if (this.refreshTimer) {\n clearTimeout(this.refreshTimer);\n }\n this.refreshTimer = setTimeout(() => {\n this.refreshTimer = null;\n this.refresh();\n }, 100);\n }\n\n private resolveScrollElement(): Window | HTMLElement {\n const ctx = this.suiScrollContext ?? this.suiContext;\n if (!ctx || ctx === 'window') {\n return window;\n }\n if (typeof ctx !== 'string') {\n return ctx;\n }\n const found = this.document.querySelector(ctx);\n return (found as HTMLElement) || window;\n }\n\n private readScrollTop(): number {\n return this.scrollEl === window ? window.scrollY : (this.scrollEl as HTMLElement).scrollTop;\n }\n\n private readCalculations(): SuiVisibilityCalculations {\n const host = this.el.nativeElement;\n const elRect = host.getBoundingClientRect();\n const cs = getComputedStyle(host);\n const marginTop = parseFloat(cs.marginTop) || 0;\n const marginBottom = parseFloat(cs.marginBottom) || 0;\n const scrollTop = this.readScrollTop();\n const screen = this.scrollEl === window\n ? { top: 0, height: window.innerHeight }\n : (() => {\n const r = (this.scrollEl as HTMLElement).getBoundingClientRect();\n return { top: r.top, height: r.height };\n })();\n\n const calculations = computeVisibilityCalculations({\n element: { top: elRect.top, bottom: elRect.bottom, width: elRect.width, height: elRect.height },\n screen,\n offset: this.suiOffset,\n includeMargin: this.suiIncludeMargin,\n marginTop,\n marginBottom,\n lastScrollTop: this.lastScrollTop,\n scrollTop\n });\n this.lastScrollTop = scrollTop;\n return calculations;\n }\n\n private emitConditions(calculations: SuiVisibilityCalculations): void {\n for (const key of CONDITION_KEYS) {\n const current = calculations[key];\n const previous = !!this.previous[key];\n const reverseKey = REVERSE_KEYS[key];\n if (shouldEmitCondition(current, previous, !!this.occurred[key], this.suiOnce, this.suiContinuous)) {\n this.emitters[key].emit(calculations);\n }\n if (reverseKey && shouldEmitReverse(\n current,\n previous,\n !!this.occurred[key],\n !!this.occurred[reverseKey],\n this.suiOnce,\n this.suiContinuous\n )) {\n this.emitters[reverseKey].emit(calculations);\n this.occurred[reverseKey] = true;\n }\n if (current) {\n this.occurred[key] = true;\n if (!this.suiOnce && reverseKey) {\n this.occurred[reverseKey] = false;\n }\n } else if (!this.suiOnce) {\n this.occurred[key] = false;\n }\n this.previous[key] = current;\n }\n }\n\n private emitPassed(calculations: SuiVisibilityCalculations): void {\n if (!calculations.topPassed && !calculations.passing) {\n return;\n }\n for (const amount of passedAmounts(this.suiPassed)) {\n const px = passedThresholdPixels(amount, calculations.height);\n if (Number.isNaN(px) || calculations.pixelsPassed < px) {\n continue;\n }\n const occurredKey = `passed:${amount}`;\n const previous = !!this.previous[occurredKey];\n if (shouldEmitCondition(true, previous, !!this.occurred[occurredKey], this.suiOnce, this.suiContinuous)) {\n this.suiOnPassed.emit({ amount, calculations });\n }\n this.occurred[occurredKey] = true;\n this.previous[occurredKey] = true;\n }\n }\n\n private applyImageType(calculations: SuiVisibilityCalculations): void {\n if (this.suiType !== 'image' || this.imageLoaded || !calculations.topVisible) {\n return;\n }\n const host = this.el.nativeElement;\n const src = host.getAttribute('data-src');\n if (!src) {\n return;\n }\n this.renderer.setAttribute(host, 'src', src);\n this.renderer.removeAttribute(host, 'data-src');\n this.imageLoaded = true;\n this.suiOnLoad.emit(calculations);\n }\n\n private applyFixedType(calculations: SuiVisibilityCalculations): void {\n if (this.suiType !== 'fixed') {\n return;\n }\n if (calculations.topPassed) {\n this.fixElement(calculations);\n } else {\n this.unfixElement(calculations);\n }\n }\n\n private fixElement(calculations: SuiVisibilityCalculations): void {\n if (this.isFixed) {\n return;\n }\n const host = this.el.nativeElement;\n const rect = host.getBoundingClientRect();\n const parent = host.parentNode;\n if (parent) {\n this.placeholder = this.renderer.createElement('div');\n this.renderer.setStyle(this.placeholder, 'display', 'block');\n this.renderer.setStyle(this.placeholder, 'width', `${rect.width}px`);\n this.renderer.setStyle(this.placeholder, 'height', `${rect.height}px`);\n this.renderer.insertBefore(parent, this.placeholder, host);\n }\n this.renderer.addClass(host, 'fixed');\n this.renderer.setStyle(host, 'position', 'fixed');\n this.renderer.setStyle(host, 'top', `${this.suiOffset}px`);\n this.renderer.setStyle(host, 'z-index', String(this.suiZIndex));\n this.isFixed = true;\n this.suiOnFixed.emit(calculations);\n }\n\n private unfixElement(calculations: SuiVisibilityCalculations): void {\n if (!this.isFixed) {\n return;\n }\n const host = this.el.nativeElement;\n this.renderer.removeClass(host, 'fixed');\n this.renderer.removeStyle(host, 'position');\n this.renderer.removeStyle(host, 'top');\n this.renderer.removeStyle(host, 'z-index');\n this.removePlaceholder();\n this.isFixed = false;\n this.suiOnUnfixed.emit(calculations);\n }\n\n private removePlaceholder(): void {\n if (!this.placeholder) {\n return;\n }\n const parent = this.placeholder.parentNode;\n if (parent) {\n this.renderer.removeChild(parent, this.placeholder);\n }\n this.placeholder = null;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SuiVisibilityDirective } from './visibility.directive';\n\n@NgModule({\n imports: [CommonModule, SuiVisibilityDirective],\n exports: [SuiVisibilityDirective]\n})\nexport class SuiVisibilityModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAqBM,SAAU,6BAA6B,CAAC,KAAgC,EAAA;AAC5E,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC;AAChC,IAAA,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG;AAC3B,IAAA,IAAI,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM;AACjC,IAAA,IAAI,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC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A,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,sBAAsB,aACpC,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAErB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHpB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,sBAAsB,CAAC;oBAC/C,OAAO,EAAE,CAAC,sBAAsB;AACjC,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -36,8 +36,8 @@ class SuiAdvertisementDirective extends BaseDirective {
36
36
  'ad'
37
37
  ].join(' ');
38
38
  }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SuiAdvertisementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
40
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: SuiAdvertisementDirective, isStandalone: true, selector: "[sui-advertisement]", inputs: { suiSize: "suiSize", suiType: "suiType", suiVertical: "suiVertical", suiHalf: "suiHalf", suiTop: "suiTop", suiWide: "suiWide", suiSquare: "suiSquare", suiCentered: "suiCentered", suiTest: "suiTest", suiMobile: "suiMobile" }, exportAs: ["suiAdvertisement"], usesInheritance: true, ngImport: i0 }); }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiAdvertisementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
40
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: SuiAdvertisementDirective, isStandalone: true, selector: "[sui-advertisement]", inputs: { suiSize: "suiSize", suiType: "suiType", suiVertical: "suiVertical", suiHalf: "suiHalf", suiTop: "suiTop", suiWide: "suiWide", suiSquare: "suiSquare", suiCentered: "suiCentered", suiTest: "suiTest", suiMobile: "suiMobile" }, exportAs: ["suiAdvertisement"], usesInheritance: true, ngImport: i0 }); }
41
41
  }
42
42
  __decorate([
43
43
  InputBoolean()
@@ -63,7 +63,7 @@ __decorate([
63
63
  __decorate([
64
64
  InputBoolean()
65
65
  ], SuiAdvertisementDirective.prototype, "suiMobile", void 0);
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SuiAdvertisementDirective, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiAdvertisementDirective, decorators: [{
67
67
  type: Directive,
68
68
  args: [{
69
69
  standalone: true,
@@ -96,11 +96,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
96
96
  * Created by bolor on 7/9/2020
97
97
  */
98
98
  class SuiAdvertisementModule {
99
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SuiAdvertisementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
100
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.7", ngImport: i0, type: SuiAdvertisementModule, imports: [CommonModule, SuiAdvertisementDirective], exports: [SuiAdvertisementDirective] }); }
101
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SuiAdvertisementModule, imports: [CommonModule] }); }
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiAdvertisementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
100
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: SuiAdvertisementModule, imports: [CommonModule, SuiAdvertisementDirective], exports: [SuiAdvertisementDirective] }); }
101
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiAdvertisementModule, imports: [CommonModule] }); }
102
102
  }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SuiAdvertisementModule, decorators: [{
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SuiAdvertisementModule, decorators: [{
104
104
  type: NgModule,
105
105
  args: [{
106
106
  exports: [SuiAdvertisementDirective],