ngx-fixed-footer 0.1.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/{esm2015/lib/ngx-fixed-footer-factory.js → esm2020/lib/ngx-fixed-footer-factory.mjs} +0 -0
- package/esm2020/lib/ngx-fixed-footer-options.service.mjs +21 -0
- package/{esm2015/lib/ngx-fixed-footer.constants.js → esm2020/lib/ngx-fixed-footer.constants.mjs} +0 -0
- package/esm2020/lib/ngx-fixed-footer.directive.mjs +89 -0
- package/{esm2015/lib/ngx-fixed-footer.interface.js → esm2020/lib/ngx-fixed-footer.interface.mjs} +0 -0
- package/esm2020/lib/ngx-fixed-footer.module.mjs +36 -0
- package/esm2020/ngx-fixed-footer.mjs +5 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{ngx-fixed-footer.js → ngx-fixed-footer.mjs} +37 -28
- package/fesm2015/ngx-fixed-footer.mjs.map +1 -0
- package/fesm2020/ngx-fixed-footer.mjs +164 -0
- package/fesm2020/ngx-fixed-footer.mjs.map +1 -0
- package/lib/ngx-fixed-footer-options.service.d.ts +3 -0
- package/lib/ngx-fixed-footer.directive.d.ts +3 -0
- package/lib/ngx-fixed-footer.module.d.ts +5 -0
- package/ngx-fixed-footer.d.ts +1 -1
- package/package.json +25 -9
- package/bundles/ngx-fixed-footer.umd.js +0 -189
- package/bundles/ngx-fixed-footer.umd.js.map +0 -1
- package/esm2015/lib/ngx-fixed-footer-options.service.js +0 -18
- package/esm2015/lib/ngx-fixed-footer.directive.js +0 -89
- package/esm2015/lib/ngx-fixed-footer.module.js +0 -31
- package/esm2015/ngx-fixed-footer.js +0 -6
- package/fesm2015/ngx-fixed-footer.js.map +0 -1
- package/ngx-fixed-footer.metadata.json +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
> Angular directive that adds fixed footer without overlap
|
|
16
16
|
|
|
17
|
-
> ✓ _Angular
|
|
17
|
+
> ✓ _Angular 13, Ivy and SSR compatible_
|
|
18
18
|
|
|
19
19
|
Here's the [demo](http://celtian.github.io/ngx-fixed-footer/) or [stackblitz live preview](https://stackblitz.com/edit/ngx-fixed-footer) or [codesandbox live preview](https://codesandbox.io/s/ngx-fixed-footer-m4f21)
|
|
20
20
|
|
|
@@ -59,6 +59,13 @@ yarn add ngx-fixed-footer
|
|
|
59
59
|
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
## Compatibility
|
|
63
|
+
|
|
64
|
+
| Angular | ngx-fixed-footer | Install |
|
|
65
|
+
| --------- | ---------------- | ----------------------------- |
|
|
66
|
+
| >= 12 | 1.x | `yarn add ngx-fixed-footer` |
|
|
67
|
+
| >= 5 < 13 | 0.x | `yarn add ngx-fixed-footer@0` |
|
|
68
|
+
|
|
62
69
|
## Quick start
|
|
63
70
|
|
|
64
71
|
### Example code
|
|
@@ -101,7 +108,7 @@ _None_
|
|
|
101
108
|
|
|
102
109
|
## License
|
|
103
110
|
|
|
104
|
-
Copyright © 2021 [Dominik Hladik](https://github.com/Celtian)
|
|
111
|
+
Copyright © 2021 - 2022 [Dominik Hladik](https://github.com/Celtian)
|
|
105
112
|
|
|
106
113
|
All contents are licensed under the [MIT license].
|
|
107
114
|
|
package/{esm2015/lib/ngx-fixed-footer-factory.js → esm2020/lib/ngx-fixed-footer-factory.mjs}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE } from './ngx-fixed-footer.constants';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class NgxFixedFooterOptionsService {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* @returns Css attribute of HTML element which gets style. It means margin or padding
|
|
8
|
+
*/
|
|
9
|
+
this.cssAttribute = DEFAULT_CSS_ATTRIBUTE;
|
|
10
|
+
/**
|
|
11
|
+
* @returns Css selector of HTML element which gets extra margin or padding
|
|
12
|
+
*/
|
|
13
|
+
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
NgxFixedFooterOptionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
NgxFixedFooterOptionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
19
|
+
type: Injectable
|
|
20
|
+
}] });
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci1vcHRpb25zLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZml4ZWQtZm9vdGVyL3NyYy9saWIvbmd4LWZpeGVkLWZvb3Rlci1vcHRpb25zLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsMEJBQTBCLEVBQUUscUJBQXFCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQzs7QUFJakcsTUFBTSxPQUFPLDRCQUE0QjtJQUR6QztRQUVFOztXQUVHO1FBQ0ksaUJBQVksR0FBK0IscUJBQXFCLENBQUM7UUFFeEU7O1dBRUc7UUFDSSxzQkFBaUIsR0FBVywwQkFBMEIsQ0FBQztLQUMvRDs7eUhBVlksNEJBQTRCOzZIQUE1Qiw0QkFBNEI7MkZBQTVCLDRCQUE0QjtrQkFEeEMsVUFBVSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IERFRkFVTFRfQ09OVEFJTkVSX1NFTEVDVE9SLCBERUZBVUxUX0NTU19BVFRSSUJVVEUgfSBmcm9tICcuL25neC1maXhlZC1mb290ZXIuY29uc3RhbnRzJztcbmltcG9ydCB7IE5neEZpeGVkRm9vdGVyQ3NzQXR0cmlidXRlIH0gZnJvbSAnLi9uZ3gtZml4ZWQtZm9vdGVyLmludGVyZmFjZSc7XG5cbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBOZ3hGaXhlZEZvb3Rlck9wdGlvbnNTZXJ2aWNlIHtcbiAgLyoqXG4gICAqIEByZXR1cm5zIENzcyBhdHRyaWJ1dGUgb2YgSFRNTCBlbGVtZW50IHdoaWNoIGdldHMgc3R5bGUuIEl0IG1lYW5zIG1hcmdpbiBvciBwYWRkaW5nXG4gICAqL1xuICBwdWJsaWMgY3NzQXR0cmlidXRlOiBOZ3hGaXhlZEZvb3RlckNzc0F0dHJpYnV0ZSA9IERFRkFVTFRfQ1NTX0FUVFJJQlVURTtcblxuICAvKipcbiAgICogQHJldHVybnMgQ3NzIHNlbGVjdG9yIG9mIEhUTUwgZWxlbWVudCB3aGljaCBnZXRzIGV4dHJhIG1hcmdpbiBvciBwYWRkaW5nXG4gICAqL1xuICBwdWJsaWMgY29udGFpbmVyU2VsZWN0b3I6IHN0cmluZyA9IERFRkFVTFRfQ09OVEFJTkVSX1NFTEVDVE9SO1xufVxuIl19
|
package/{esm2015/lib/ngx-fixed-footer.constants.js → esm2020/lib/ngx-fixed-footer.constants.mjs}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { Directive, Inject, Input } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./ngx-fixed-footer-options.service";
|
|
5
|
+
export class NgxFixedFooterDirective {
|
|
6
|
+
constructor(document, el, render, options) {
|
|
7
|
+
this.document = document;
|
|
8
|
+
this.el = el;
|
|
9
|
+
this.render = render;
|
|
10
|
+
this.options = options;
|
|
11
|
+
this.containerSelector = this.options.containerSelector;
|
|
12
|
+
this.cssAttribute = this.options.cssAttribute;
|
|
13
|
+
this.offsetHeight = undefined;
|
|
14
|
+
}
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
if (this.hasResizeObserver && this.document) {
|
|
17
|
+
const resizeObserver = new ResizeObserver(() => this.checkHeight());
|
|
18
|
+
resizeObserver.observe(this.html);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
ngOnChanges(changes) {
|
|
22
|
+
if (this.hasResizeObserver && this.document) {
|
|
23
|
+
// swap selector
|
|
24
|
+
if (changes?.containerSelector && !changes?.containerSelector?.firstChange) {
|
|
25
|
+
const prev = changes?.containerSelector?.previousValue;
|
|
26
|
+
const next = changes?.containerSelector?.currentValue;
|
|
27
|
+
if (next !== prev) {
|
|
28
|
+
this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);
|
|
29
|
+
this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// swap css attribute
|
|
33
|
+
if (changes?.cssAttribute && !changes?.cssAttribute?.firstChange) {
|
|
34
|
+
const prev = changes?.containerSelector?.previousValue;
|
|
35
|
+
const next = changes?.cssAttribute?.currentValue;
|
|
36
|
+
if (next !== prev) {
|
|
37
|
+
this.removeStyle(this.container, prev);
|
|
38
|
+
this.setStyle(this.container, next, this.offsetHeight);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
ngOnDestroy() {
|
|
44
|
+
if (this.hasResizeObserver && this.document) {
|
|
45
|
+
this.removeStyle(this.container, this.cssAttribute);
|
|
46
|
+
if (this.resizeObserver) {
|
|
47
|
+
this.resizeObserver.unobserve(this.html);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
checkHeight() {
|
|
52
|
+
const height = this.html.offsetHeight;
|
|
53
|
+
if (this.offsetHeight !== height) {
|
|
54
|
+
this.setStyle(this.container, this.cssAttribute, height);
|
|
55
|
+
this.offsetHeight = height;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
removeStyle(container, cssAttribute) {
|
|
59
|
+
this.render.setStyle(container, `${cssAttribute}-bottom`, '');
|
|
60
|
+
}
|
|
61
|
+
setStyle(container, cssAttribute, height) {
|
|
62
|
+
this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);
|
|
63
|
+
}
|
|
64
|
+
get container() {
|
|
65
|
+
return this.document.body.querySelector(this.containerSelector);
|
|
66
|
+
}
|
|
67
|
+
get html() {
|
|
68
|
+
return this.el.nativeElement;
|
|
69
|
+
}
|
|
70
|
+
get hasResizeObserver() {
|
|
71
|
+
return typeof ResizeObserver !== 'undefined';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
NgxFixedFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.NgxFixedFooterOptionsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
75
|
+
NgxFixedFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 });
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
77
|
+
type: Directive,
|
|
78
|
+
args: [{
|
|
79
|
+
selector: '[ngxFixedFooter]'
|
|
80
|
+
}]
|
|
81
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
82
|
+
type: Inject,
|
|
83
|
+
args: [DOCUMENT]
|
|
84
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.NgxFixedFooterOptionsService }]; }, propDecorators: { containerSelector: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], cssAttribute: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}] } });
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZml4ZWQtZm9vdGVyL3NyYy9saWIvbmd4LWZpeGVkLWZvb3Rlci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFDTCxTQUFTLEVBRVQsTUFBTSxFQUNOLEtBQUssRUFNTixNQUFNLGVBQWUsQ0FBQzs7O0FBT3ZCLE1BQU0sT0FBTyx1QkFBdUI7SUFPbEMsWUFDNEIsUUFBYSxFQUMvQixFQUFjLEVBQ2QsTUFBaUIsRUFDakIsT0FBcUM7UUFIbkIsYUFBUSxHQUFSLFFBQVEsQ0FBSztRQUMvQixPQUFFLEdBQUYsRUFBRSxDQUFZO1FBQ2QsV0FBTSxHQUFOLE1BQU0sQ0FBVztRQUNqQixZQUFPLEdBQVAsT0FBTyxDQUE4QjtRQVYvQixzQkFBaUIsR0FBVyxJQUFJLENBQUMsT0FBTyxDQUFDLGlCQUFpQixDQUF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ZXQgaHRtbCgpOiBIVE1MRWxlbWVudCB7XG4gICAgcmV0dXJuIHRoaXMuZWwubmF0aXZlRWxlbWVudDtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0IGhhc1Jlc2l6ZU9ic2VydmVyKCk6IGJvb2xlYW4ge1xuICAgIHJldHVybiB0eXBlb2YgUmVzaXplT2JzZXJ2ZXIgIT09ICd1bmRlZmluZWQnO1xuICB9XG59XG4iXX0=
|
package/{esm2015/lib/ngx-fixed-footer.interface.js → esm2020/lib/ngx-fixed-footer.interface.mjs}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InjectionToken, NgModule } from '@angular/core';
|
|
2
|
+
import { ngxFixedFooterOptionsFactory } from './ngx-fixed-footer-factory';
|
|
3
|
+
import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';
|
|
4
|
+
import { NgxFixedFooterDirective } from './ngx-fixed-footer.directive';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken('forRoot() NgxCutOptionsService configuration.');
|
|
7
|
+
export class NgxFixedFooterModule {
|
|
8
|
+
static forRoot(options) {
|
|
9
|
+
return {
|
|
10
|
+
ngModule: NgxFixedFooterModule,
|
|
11
|
+
providers: [
|
|
12
|
+
{
|
|
13
|
+
provide: FOR_ROOT_OPTIONS_TOKEN,
|
|
14
|
+
useValue: options
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
provide: NgxFixedFooterOptionsService,
|
|
18
|
+
useFactory: ngxFixedFooterOptionsFactory,
|
|
19
|
+
deps: [FOR_ROOT_OPTIONS_TOKEN]
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
NgxFixedFooterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
26
|
+
NgxFixedFooterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] });
|
|
27
|
+
NgxFixedFooterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
29
|
+
type: NgModule,
|
|
30
|
+
args: [{
|
|
31
|
+
declarations: [NgxFixedFooterDirective],
|
|
32
|
+
exports: [NgxFixedFooterDirective],
|
|
33
|
+
providers: [NgxFixedFooterOptionsService]
|
|
34
|
+
}]
|
|
35
|
+
}] });
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZml4ZWQtZm9vdGVyL3NyYy9saWIvbmd4LWZpeGVkLWZvb3Rlci5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBdUIsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzlFLE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzFFLE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDhCQUE4QixDQUFDOztBQUd2RSxNQUFNLENBQUMsSUFBSSxzQkFBc0IsR0FBRy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VyT3B0aW9uc1NlcnZpY2UsXG4gICAgICAgICAgdXNlRmFjdG9yeTogbmd4Rml4ZWRGb290ZXJPcHRpb25zRmFjdG9yeSxcbiAgICAgICAgICBkZXBzOiBbRk9SX1JPT1RfT1BUSU9OU19UT0tFTl1cbiAgICAgICAgfVxuICAgICAgXVxuICAgIH07XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1maXhlZC1mb290ZXIvc3JjL25neC1maXhlZC1mb290ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, Inject, Input, InjectionToken, NgModule } from '@angular/core';
|
|
2
3
|
import { DOCUMENT } from '@angular/common';
|
|
3
4
|
|
|
4
5
|
const DEFAULT_CSS_ATTRIBUTE = 'padding';
|
|
@@ -16,9 +17,11 @@ class NgxFixedFooterOptionsService {
|
|
|
16
17
|
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
NgxFixedFooterOptionsService
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
NgxFixedFooterOptionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
NgxFixedFooterOptionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
23
|
+
type: Injectable
|
|
24
|
+
}] });
|
|
22
25
|
|
|
23
26
|
class NgxFixedFooterDirective {
|
|
24
27
|
constructor(document, el, render, options) {
|
|
@@ -90,21 +93,23 @@ class NgxFixedFooterDirective {
|
|
|
90
93
|
return typeof ResizeObserver !== 'undefined';
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
|
-
NgxFixedFooterDirective
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
]
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
96
|
+
NgxFixedFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: NgxFixedFooterOptionsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
97
|
+
NgxFixedFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
99
|
+
type: Directive,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: '[ngxFixedFooter]'
|
|
102
|
+
}]
|
|
103
|
+
}], ctorParameters: function () {
|
|
104
|
+
return [{ type: undefined, decorators: [{
|
|
105
|
+
type: Inject,
|
|
106
|
+
args: [DOCUMENT]
|
|
107
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: NgxFixedFooterOptionsService }];
|
|
108
|
+
}, propDecorators: { containerSelector: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], cssAttribute: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}] } });
|
|
108
113
|
|
|
109
114
|
const ngxFixedFooterOptionsFactory = (options) => {
|
|
110
115
|
const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();
|
|
@@ -138,13 +143,17 @@ class NgxFixedFooterModule {
|
|
|
138
143
|
};
|
|
139
144
|
}
|
|
140
145
|
}
|
|
141
|
-
NgxFixedFooterModule
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
]
|
|
146
|
+
NgxFixedFooterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
147
|
+
NgxFixedFooterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] });
|
|
148
|
+
NgxFixedFooterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] });
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
150
|
+
type: NgModule,
|
|
151
|
+
args: [{
|
|
152
|
+
declarations: [NgxFixedFooterDirective],
|
|
153
|
+
exports: [NgxFixedFooterDirective],
|
|
154
|
+
providers: [NgxFixedFooterOptionsService]
|
|
155
|
+
}]
|
|
156
|
+
}] });
|
|
148
157
|
|
|
149
158
|
/*
|
|
150
159
|
* Public API Surface of ngx-fixed-footer
|
|
@@ -154,5 +163,5 @@ NgxFixedFooterModule.decorators = [
|
|
|
154
163
|
* Generated bundle index. Do not edit.
|
|
155
164
|
*/
|
|
156
165
|
|
|
157
|
-
export { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE, FOR_ROOT_OPTIONS_TOKEN, NgxFixedFooterDirective, NgxFixedFooterModule, NgxFixedFooterOptionsService
|
|
158
|
-
//# sourceMappingURL=ngx-fixed-footer.
|
|
166
|
+
export { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE, FOR_ROOT_OPTIONS_TOKEN, NgxFixedFooterDirective, NgxFixedFooterModule, NgxFixedFooterOptionsService };
|
|
167
|
+
//# sourceMappingURL=ngx-fixed-footer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-fixed-footer.mjs","sources":["../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.constants.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-options.service.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.directive.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-factory.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.module.ts","../../../projects/ngx-fixed-footer/src/public-api.ts","../../../projects/ngx-fixed-footer/src/ngx-fixed-footer.ts"],"sourcesContent":["export const DEFAULT_CSS_ATTRIBUTE = 'padding';\nexport const DEFAULT_CONTAINER_SELECTOR = '[role=\"main\"]';\n","import { Injectable } from '@angular/core';\nimport { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE } from './ngx-fixed-footer.constants';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Injectable()\nexport class NgxFixedFooterOptionsService {\n /**\n * @returns Css attribute of HTML element which gets style. It means margin or padding\n */\n public cssAttribute: NgxFixedFooterCssAttribute = DEFAULT_CSS_ATTRIBUTE;\n\n /**\n * @returns Css selector of HTML element which gets extra margin or padding\n */\n public containerSelector: string = DEFAULT_CONTAINER_SELECTOR;\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges\n} from '@angular/core';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Directive({\n selector: '[ngxFixedFooter]'\n})\nexport class NgxFixedFooterDirective implements OnDestroy, OnChanges, OnInit {\n @Input() public containerSelector: string = this.options.containerSelector;\n @Input() public cssAttribute: NgxFixedFooterCssAttribute = this.options.cssAttribute;\n\n private offsetHeight: number = undefined;\n private resizeObserver: ResizeObserver;\n\n constructor(\n @Inject(DOCUMENT) private document: any,\n private el: ElementRef,\n private render: Renderer2,\n private options: NgxFixedFooterOptionsService\n ) {}\n\n public ngOnInit(): void {\n if (this.hasResizeObserver && this.document) {\n const resizeObserver = new ResizeObserver(() => this.checkHeight());\n resizeObserver.observe(this.html);\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (this.hasResizeObserver && this.document) {\n // swap selector\n if (changes?.containerSelector && !changes?.containerSelector?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.containerSelector?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);\n this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);\n }\n }\n\n // swap css attribute\n if (changes?.cssAttribute && !changes?.cssAttribute?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.cssAttribute?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.container, prev);\n this.setStyle(this.container, next, this.offsetHeight);\n }\n }\n }\n }\n\n public ngOnDestroy(): void {\n if (this.hasResizeObserver && this.document) {\n this.removeStyle(this.container, this.cssAttribute);\n if (this.resizeObserver) {\n this.resizeObserver.unobserve(this.html);\n }\n }\n }\n\n private checkHeight(): void {\n const height = this.html.offsetHeight;\n if (this.offsetHeight !== height) {\n this.setStyle(this.container, this.cssAttribute, height);\n this.offsetHeight = height;\n }\n }\n\n private removeStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, '');\n }\n\n private setStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute, height: number): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);\n }\n\n private get container(): HTMLElement {\n return this.document.body.querySelector(this.containerSelector);\n }\n\n private get html(): HTMLElement {\n return this.el.nativeElement;\n }\n\n private get hasResizeObserver(): boolean {\n return typeof ResizeObserver !== 'undefined';\n }\n}\n","import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport const ngxFixedFooterOptionsFactory = (options?: NgxFixedFooterOptions): NgxFixedFooterOptionsService => {\n const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();\n if (options) {\n if (options.containerSelector) {\n ngxFixedFooterOptionsService.containerSelector = options.containerSelector;\n }\n if (options.cssAttribute) {\n ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;\n }\n }\n return ngxFixedFooterOptionsService;\n};\n","import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { ngxFixedFooterOptionsFactory } from './ngx-fixed-footer-factory';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterDirective } from './ngx-fixed-footer.directive';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken<NgxFixedFooterOptions>(\n 'forRoot() NgxCutOptionsService configuration.'\n);\n\n@NgModule({\n declarations: [NgxFixedFooterDirective],\n exports: [NgxFixedFooterDirective],\n providers: [NgxFixedFooterOptionsService]\n})\nexport class NgxFixedFooterModule {\n public static forRoot(options?: NgxFixedFooterOptions): ModuleWithProviders<NgxFixedFooterModule> {\n return {\n ngModule: NgxFixedFooterModule,\n providers: [\n {\n provide: FOR_ROOT_OPTIONS_TOKEN,\n useValue: options\n },\n {\n provide: NgxFixedFooterOptionsService,\n useFactory: ngxFixedFooterOptionsFactory,\n deps: [FOR_ROOT_OPTIONS_TOKEN]\n }\n ]\n };\n }\n}\n","/*\n * Public API Surface of ngx-fixed-footer\n */\n\nexport * from './lib/ngx-fixed-footer-options.service';\nexport * from './lib/ngx-fixed-footer.constants';\nexport * from './lib/ngx-fixed-footer.directive';\nexport * from './lib/ngx-fixed-footer.interface';\nexport * from './lib/ngx-fixed-footer.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAAa,qBAAqB,GAAG,UAAU;MAClC,0BAA0B,GAAG;;MCI7B,4BAA4B;IADzC;;;;QAKS,iBAAY,GAA+B,qBAAqB,CAAC;;;;QAKjE,sBAAiB,GAAW,0BAA0B,CAAC;KAC/D;;yHAVY,4BAA4B;6HAA5B,4BAA4B;2FAA5B,4BAA4B;kBADxC,UAAU;;;MCcE,uBAAuB;IAOlC,YAC4B,QAAa,EAC/B,EAAc,EACd,MAAiB,EACjB,OAAqC;QAHnB,aAAQ,GAAR,QAAQ,CAAK;QAC/B,OAAE,GAAF,EAAE,CAAY;QACd,WAAM,GAAN,MAAM,CAAW;QACjB,YAAO,GAAP,OAAO,CAA8B;QAV/B,sBAAiB,GAAW,IAAI,CAAC,OAAO,C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BACrC,UAAU,EAAE,4BAA4B;oBACxC,IAAI,EAAE,CAAC,sBAAsB,CAAC;iBAC/B;aACF;SACF,CAAC;KACH;;iHAhBU,oBAAoB;kHAApB,oBAAoB,iBAJhB,uBAAuB,aAC5B,uBAAuB;kHAGtB,oBAAoB,aAFpB,CAAC,4BAA4B,CAAC;2FAE9B,oBAAoB;kBALhC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,SAAS,EAAE,CAAC,4BAA4B,CAAC;iBAC1C;;;ACdD;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, Inject, Input, InjectionToken, NgModule } from '@angular/core';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
const DEFAULT_CSS_ATTRIBUTE = 'padding';
|
|
6
|
+
const DEFAULT_CONTAINER_SELECTOR = '[role="main"]';
|
|
7
|
+
|
|
8
|
+
class NgxFixedFooterOptionsService {
|
|
9
|
+
constructor() {
|
|
10
|
+
/**
|
|
11
|
+
* @returns Css attribute of HTML element which gets style. It means margin or padding
|
|
12
|
+
*/
|
|
13
|
+
this.cssAttribute = DEFAULT_CSS_ATTRIBUTE;
|
|
14
|
+
/**
|
|
15
|
+
* @returns Css selector of HTML element which gets extra margin or padding
|
|
16
|
+
*/
|
|
17
|
+
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
NgxFixedFooterOptionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
NgxFixedFooterOptionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
23
|
+
type: Injectable
|
|
24
|
+
}] });
|
|
25
|
+
|
|
26
|
+
class NgxFixedFooterDirective {
|
|
27
|
+
constructor(document, el, render, options) {
|
|
28
|
+
this.document = document;
|
|
29
|
+
this.el = el;
|
|
30
|
+
this.render = render;
|
|
31
|
+
this.options = options;
|
|
32
|
+
this.containerSelector = this.options.containerSelector;
|
|
33
|
+
this.cssAttribute = this.options.cssAttribute;
|
|
34
|
+
this.offsetHeight = undefined;
|
|
35
|
+
}
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
if (this.hasResizeObserver && this.document) {
|
|
38
|
+
const resizeObserver = new ResizeObserver(() => this.checkHeight());
|
|
39
|
+
resizeObserver.observe(this.html);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
ngOnChanges(changes) {
|
|
43
|
+
if (this.hasResizeObserver && this.document) {
|
|
44
|
+
// swap selector
|
|
45
|
+
if (changes?.containerSelector && !changes?.containerSelector?.firstChange) {
|
|
46
|
+
const prev = changes?.containerSelector?.previousValue;
|
|
47
|
+
const next = changes?.containerSelector?.currentValue;
|
|
48
|
+
if (next !== prev) {
|
|
49
|
+
this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);
|
|
50
|
+
this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// swap css attribute
|
|
54
|
+
if (changes?.cssAttribute && !changes?.cssAttribute?.firstChange) {
|
|
55
|
+
const prev = changes?.containerSelector?.previousValue;
|
|
56
|
+
const next = changes?.cssAttribute?.currentValue;
|
|
57
|
+
if (next !== prev) {
|
|
58
|
+
this.removeStyle(this.container, prev);
|
|
59
|
+
this.setStyle(this.container, next, this.offsetHeight);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
ngOnDestroy() {
|
|
65
|
+
if (this.hasResizeObserver && this.document) {
|
|
66
|
+
this.removeStyle(this.container, this.cssAttribute);
|
|
67
|
+
if (this.resizeObserver) {
|
|
68
|
+
this.resizeObserver.unobserve(this.html);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
checkHeight() {
|
|
73
|
+
const height = this.html.offsetHeight;
|
|
74
|
+
if (this.offsetHeight !== height) {
|
|
75
|
+
this.setStyle(this.container, this.cssAttribute, height);
|
|
76
|
+
this.offsetHeight = height;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
removeStyle(container, cssAttribute) {
|
|
80
|
+
this.render.setStyle(container, `${cssAttribute}-bottom`, '');
|
|
81
|
+
}
|
|
82
|
+
setStyle(container, cssAttribute, height) {
|
|
83
|
+
this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);
|
|
84
|
+
}
|
|
85
|
+
get container() {
|
|
86
|
+
return this.document.body.querySelector(this.containerSelector);
|
|
87
|
+
}
|
|
88
|
+
get html() {
|
|
89
|
+
return this.el.nativeElement;
|
|
90
|
+
}
|
|
91
|
+
get hasResizeObserver() {
|
|
92
|
+
return typeof ResizeObserver !== 'undefined';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
NgxFixedFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: NgxFixedFooterOptionsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
96
|
+
NgxFixedFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 });
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
98
|
+
type: Directive,
|
|
99
|
+
args: [{
|
|
100
|
+
selector: '[ngxFixedFooter]'
|
|
101
|
+
}]
|
|
102
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
103
|
+
type: Inject,
|
|
104
|
+
args: [DOCUMENT]
|
|
105
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: NgxFixedFooterOptionsService }]; }, propDecorators: { containerSelector: [{
|
|
106
|
+
type: Input
|
|
107
|
+
}], cssAttribute: [{
|
|
108
|
+
type: Input
|
|
109
|
+
}] } });
|
|
110
|
+
|
|
111
|
+
const ngxFixedFooterOptionsFactory = (options) => {
|
|
112
|
+
const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();
|
|
113
|
+
if (options) {
|
|
114
|
+
if (options.containerSelector) {
|
|
115
|
+
ngxFixedFooterOptionsService.containerSelector = options.containerSelector;
|
|
116
|
+
}
|
|
117
|
+
if (options.cssAttribute) {
|
|
118
|
+
ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return ngxFixedFooterOptionsService;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken('forRoot() NgxCutOptionsService configuration.');
|
|
125
|
+
class NgxFixedFooterModule {
|
|
126
|
+
static forRoot(options) {
|
|
127
|
+
return {
|
|
128
|
+
ngModule: NgxFixedFooterModule,
|
|
129
|
+
providers: [
|
|
130
|
+
{
|
|
131
|
+
provide: FOR_ROOT_OPTIONS_TOKEN,
|
|
132
|
+
useValue: options
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
provide: NgxFixedFooterOptionsService,
|
|
136
|
+
useFactory: ngxFixedFooterOptionsFactory,
|
|
137
|
+
deps: [FOR_ROOT_OPTIONS_TOKEN]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
NgxFixedFooterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
144
|
+
NgxFixedFooterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] });
|
|
145
|
+
NgxFixedFooterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] });
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
147
|
+
type: NgModule,
|
|
148
|
+
args: [{
|
|
149
|
+
declarations: [NgxFixedFooterDirective],
|
|
150
|
+
exports: [NgxFixedFooterDirective],
|
|
151
|
+
providers: [NgxFixedFooterOptionsService]
|
|
152
|
+
}]
|
|
153
|
+
}] });
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
* Public API Surface of ngx-fixed-footer
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Generated bundle index. Do not edit.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
export { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE, FOR_ROOT_OPTIONS_TOKEN, NgxFixedFooterDirective, NgxFixedFooterModule, NgxFixedFooterOptionsService };
|
|
164
|
+
//# sourceMappingURL=ngx-fixed-footer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-fixed-footer.mjs","sources":["../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.constants.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-options.service.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.directive.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-factory.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.module.ts","../../../projects/ngx-fixed-footer/src/public-api.ts","../../../projects/ngx-fixed-footer/src/ngx-fixed-footer.ts"],"sourcesContent":["export const DEFAULT_CSS_ATTRIBUTE = 'padding';\nexport const DEFAULT_CONTAINER_SELECTOR = '[role=\"main\"]';\n","import { Injectable } from '@angular/core';\nimport { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE } from './ngx-fixed-footer.constants';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Injectable()\nexport class NgxFixedFooterOptionsService {\n /**\n * @returns Css attribute of HTML element which gets style. It means margin or padding\n */\n public cssAttribute: NgxFixedFooterCssAttribute = DEFAULT_CSS_ATTRIBUTE;\n\n /**\n * @returns Css selector of HTML element which gets extra margin or padding\n */\n public containerSelector: string = DEFAULT_CONTAINER_SELECTOR;\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges\n} from '@angular/core';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Directive({\n selector: '[ngxFixedFooter]'\n})\nexport class NgxFixedFooterDirective implements OnDestroy, OnChanges, OnInit {\n @Input() public containerSelector: string = this.options.containerSelector;\n @Input() public cssAttribute: NgxFixedFooterCssAttribute = this.options.cssAttribute;\n\n private offsetHeight: number = undefined;\n private resizeObserver: ResizeObserver;\n\n constructor(\n @Inject(DOCUMENT) private document: any,\n private el: ElementRef,\n private render: Renderer2,\n private options: NgxFixedFooterOptionsService\n ) {}\n\n public ngOnInit(): void {\n if (this.hasResizeObserver && this.document) {\n const resizeObserver = new ResizeObserver(() => this.checkHeight());\n resizeObserver.observe(this.html);\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (this.hasResizeObserver && this.document) {\n // swap selector\n if (changes?.containerSelector && !changes?.containerSelector?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.containerSelector?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);\n this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);\n }\n }\n\n // swap css attribute\n if (changes?.cssAttribute && !changes?.cssAttribute?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.cssAttribute?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.container, prev);\n this.setStyle(this.container, next, this.offsetHeight);\n }\n }\n }\n }\n\n public ngOnDestroy(): void {\n if (this.hasResizeObserver && this.document) {\n this.removeStyle(this.container, this.cssAttribute);\n if (this.resizeObserver) {\n this.resizeObserver.unobserve(this.html);\n }\n }\n }\n\n private checkHeight(): void {\n const height = this.html.offsetHeight;\n if (this.offsetHeight !== height) {\n this.setStyle(this.container, this.cssAttribute, height);\n this.offsetHeight = height;\n }\n }\n\n private removeStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, '');\n }\n\n private setStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute, height: number): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);\n }\n\n private get container(): HTMLElement {\n return this.document.body.querySelector(this.containerSelector);\n }\n\n private get html(): HTMLElement {\n return this.el.nativeElement;\n }\n\n private get hasResizeObserver(): boolean {\n return typeof ResizeObserver !== 'undefined';\n }\n}\n","import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport const ngxFixedFooterOptionsFactory = (options?: NgxFixedFooterOptions): NgxFixedFooterOptionsService => {\n const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();\n if (options) {\n if (options.containerSelector) {\n ngxFixedFooterOptionsService.containerSelector = options.containerSelector;\n }\n if (options.cssAttribute) {\n ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;\n }\n }\n return ngxFixedFooterOptionsService;\n};\n","import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { ngxFixedFooterOptionsFactory } from './ngx-fixed-footer-factory';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterDirective } from './ngx-fixed-footer.directive';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken<NgxFixedFooterOptions>(\n 'forRoot() NgxCutOptionsService configuration.'\n);\n\n@NgModule({\n declarations: [NgxFixedFooterDirective],\n exports: [NgxFixedFooterDirective],\n providers: [NgxFixedFooterOptionsService]\n})\nexport class NgxFixedFooterModule {\n public static forRoot(options?: NgxFixedFooterOptions): ModuleWithProviders<NgxFixedFooterModule> {\n return {\n ngModule: NgxFixedFooterModule,\n providers: [\n {\n provide: FOR_ROOT_OPTIONS_TOKEN,\n useValue: options\n },\n {\n provide: NgxFixedFooterOptionsService,\n useFactory: ngxFixedFooterOptionsFactory,\n deps: [FOR_ROOT_OPTIONS_TOKEN]\n }\n ]\n };\n }\n}\n","/*\n * Public API Surface of ngx-fixed-footer\n */\n\nexport * from './lib/ngx-fixed-footer-options.service';\nexport * from './lib/ngx-fixed-footer.constants';\nexport * from './lib/ngx-fixed-footer.directive';\nexport * from './lib/ngx-fixed-footer.interface';\nexport * from './lib/ngx-fixed-footer.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAAa,qBAAqB,GAAG,UAAU;MAClC,0BAA0B,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YACL,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,OAAO;iBAClB;gBACD;oBACE,OAAO,EAAE,4BAA4B;oBACrC,UAAU,EAAE,4BAA4B;oBACxC,IAAI,EAAE,CAAC,sBAAsB,CAAC;iBAC/B;aACF;SACF,CAAC;KACH;;iHAhBU,oBAAoB;kHAApB,oBAAoB,iBAJhB,uBAAuB,aAC5B,uBAAuB;kHAGtB,oBAAoB,aAFpB,CAAC,4BAA4B,CAAC;2FAE9B,oBAAoB;kBALhC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,SAAS,EAAE,CAAC,4BAA4B,CAAC;iBAC1C;;;ACdD;;;;ACAA;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class NgxFixedFooterOptionsService {
|
|
3
4
|
/**
|
|
4
5
|
* @returns Css attribute of HTML element which gets style. It means margin or padding
|
|
@@ -8,4 +9,6 @@ export declare class NgxFixedFooterOptionsService {
|
|
|
8
9
|
* @returns Css selector of HTML element which gets extra margin or padding
|
|
9
10
|
*/
|
|
10
11
|
containerSelector: string;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxFixedFooterOptionsService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxFixedFooterOptionsService>;
|
|
11
14
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementRef, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';
|
|
3
3
|
import { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class NgxFixedFooterDirective implements OnDestroy, OnChanges, OnInit {
|
|
5
6
|
private document;
|
|
6
7
|
private el;
|
|
@@ -20,4 +21,6 @@ export declare class NgxFixedFooterDirective implements OnDestroy, OnChanges, On
|
|
|
20
21
|
private get container();
|
|
21
22
|
private get html();
|
|
22
23
|
private get hasResizeObserver();
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxFixedFooterDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFixedFooterDirective, "[ngxFixedFooter]", never, { "containerSelector": "containerSelector"; "cssAttribute": "cssAttribute"; }, {}, never>;
|
|
23
26
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { InjectionToken, ModuleWithProviders } from '@angular/core';
|
|
2
2
|
import { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./ngx-fixed-footer.directive";
|
|
3
5
|
export declare let FOR_ROOT_OPTIONS_TOKEN: InjectionToken<NgxFixedFooterOptions>;
|
|
4
6
|
export declare class NgxFixedFooterModule {
|
|
5
7
|
static forRoot(options?: NgxFixedFooterOptions): ModuleWithProviders<NgxFixedFooterModule>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxFixedFooterModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxFixedFooterModule, [typeof i1.NgxFixedFooterDirective], never, [typeof i1.NgxFixedFooterDirective]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxFixedFooterModule>;
|
|
6
11
|
}
|
package/ngx-fixed-footer.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-fixed-footer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Dominik Hladík",
|
|
6
6
|
"email": "dominik.hladik@seznam.cz",
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"description": "Angular directive that adds fixed footer without overlap",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"tslib": "^2.
|
|
13
|
+
"tslib": "^2.4.0"
|
|
14
|
+
},
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"@angular/common": ">=12",
|
|
17
|
+
"@angular/core": ">=12"
|
|
14
18
|
},
|
|
15
19
|
"publishConfig": {
|
|
16
20
|
"registry": "https://registry.npmjs.org"
|
|
@@ -31,14 +35,26 @@
|
|
|
31
35
|
"overlap"
|
|
32
36
|
],
|
|
33
37
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
38
|
+
"node": ">=12"
|
|
35
39
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"fesm2015": "fesm2015/ngx-fixed-footer.
|
|
40
|
+
"module": "fesm2015/ngx-fixed-footer.mjs",
|
|
41
|
+
"es2020": "fesm2020/ngx-fixed-footer.mjs",
|
|
42
|
+
"esm2020": "esm2020/ngx-fixed-footer.mjs",
|
|
43
|
+
"fesm2020": "fesm2020/ngx-fixed-footer.mjs",
|
|
44
|
+
"fesm2015": "fesm2015/ngx-fixed-footer.mjs",
|
|
41
45
|
"typings": "ngx-fixed-footer.d.ts",
|
|
42
|
-
"
|
|
46
|
+
"exports": {
|
|
47
|
+
"./package.json": {
|
|
48
|
+
"default": "./package.json"
|
|
49
|
+
},
|
|
50
|
+
".": {
|
|
51
|
+
"types": "./ngx-fixed-footer.d.ts",
|
|
52
|
+
"esm2020": "./esm2020/ngx-fixed-footer.mjs",
|
|
53
|
+
"es2020": "./fesm2020/ngx-fixed-footer.mjs",
|
|
54
|
+
"es2015": "./fesm2015/ngx-fixed-footer.mjs",
|
|
55
|
+
"node": "./fesm2015/ngx-fixed-footer.mjs",
|
|
56
|
+
"default": "./fesm2020/ngx-fixed-footer.mjs"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
43
59
|
"sideEffects": false
|
|
44
60
|
}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('ngx-fixed-footer', ['exports', '@angular/core', '@angular/common'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ngx-fixed-footer'] = {}, global.ng.core, global.ng.common));
|
|
5
|
-
}(this, (function (exports, core, common) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var DEFAULT_CSS_ATTRIBUTE = 'padding';
|
|
8
|
-
var DEFAULT_CONTAINER_SELECTOR = '[role="main"]';
|
|
9
|
-
|
|
10
|
-
var NgxFixedFooterOptionsService = /** @class */ (function () {
|
|
11
|
-
function NgxFixedFooterOptionsService() {
|
|
12
|
-
/**
|
|
13
|
-
* @returns Css attribute of HTML element which gets style. It means margin or padding
|
|
14
|
-
*/
|
|
15
|
-
this.cssAttribute = DEFAULT_CSS_ATTRIBUTE;
|
|
16
|
-
/**
|
|
17
|
-
* @returns Css selector of HTML element which gets extra margin or padding
|
|
18
|
-
*/
|
|
19
|
-
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
20
|
-
}
|
|
21
|
-
return NgxFixedFooterOptionsService;
|
|
22
|
-
}());
|
|
23
|
-
NgxFixedFooterOptionsService.decorators = [
|
|
24
|
-
{ type: core.Injectable }
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
var NgxFixedFooterDirective = /** @class */ (function () {
|
|
28
|
-
function NgxFixedFooterDirective(document, el, render, options) {
|
|
29
|
-
this.document = document;
|
|
30
|
-
this.el = el;
|
|
31
|
-
this.render = render;
|
|
32
|
-
this.options = options;
|
|
33
|
-
this.containerSelector = this.options.containerSelector;
|
|
34
|
-
this.cssAttribute = this.options.cssAttribute;
|
|
35
|
-
this.offsetHeight = undefined;
|
|
36
|
-
}
|
|
37
|
-
NgxFixedFooterDirective.prototype.ngOnInit = function () {
|
|
38
|
-
var _this = this;
|
|
39
|
-
if (this.hasResizeObserver && this.document) {
|
|
40
|
-
var resizeObserver = new ResizeObserver(function () { return _this.checkHeight(); });
|
|
41
|
-
resizeObserver.observe(this.html);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
NgxFixedFooterDirective.prototype.ngOnChanges = function (changes) {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f;
|
|
46
|
-
if (this.hasResizeObserver && this.document) {
|
|
47
|
-
// swap selector
|
|
48
|
-
if ((changes === null || changes === void 0 ? void 0 : changes.containerSelector) && !((_a = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _a === void 0 ? void 0 : _a.firstChange)) {
|
|
49
|
-
var prev = (_b = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _b === void 0 ? void 0 : _b.previousValue;
|
|
50
|
-
var next = (_c = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _c === void 0 ? void 0 : _c.currentValue;
|
|
51
|
-
if (next !== prev) {
|
|
52
|
-
this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);
|
|
53
|
-
this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// swap css attribute
|
|
57
|
-
if ((changes === null || changes === void 0 ? void 0 : changes.cssAttribute) && !((_d = changes === null || changes === void 0 ? void 0 : changes.cssAttribute) === null || _d === void 0 ? void 0 : _d.firstChange)) {
|
|
58
|
-
var prev = (_e = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _e === void 0 ? void 0 : _e.previousValue;
|
|
59
|
-
var next = (_f = changes === null || changes === void 0 ? void 0 : changes.cssAttribute) === null || _f === void 0 ? void 0 : _f.currentValue;
|
|
60
|
-
if (next !== prev) {
|
|
61
|
-
this.removeStyle(this.container, prev);
|
|
62
|
-
this.setStyle(this.container, next, this.offsetHeight);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
NgxFixedFooterDirective.prototype.ngOnDestroy = function () {
|
|
68
|
-
if (this.hasResizeObserver && this.document) {
|
|
69
|
-
this.removeStyle(this.container, this.cssAttribute);
|
|
70
|
-
if (this.resizeObserver) {
|
|
71
|
-
this.resizeObserver.unobserve(this.html);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
NgxFixedFooterDirective.prototype.checkHeight = function () {
|
|
76
|
-
var height = this.html.offsetHeight;
|
|
77
|
-
if (this.offsetHeight !== height) {
|
|
78
|
-
this.setStyle(this.container, this.cssAttribute, height);
|
|
79
|
-
this.offsetHeight = height;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
NgxFixedFooterDirective.prototype.removeStyle = function (container, cssAttribute) {
|
|
83
|
-
this.render.setStyle(container, cssAttribute + "-bottom", '');
|
|
84
|
-
};
|
|
85
|
-
NgxFixedFooterDirective.prototype.setStyle = function (container, cssAttribute, height) {
|
|
86
|
-
this.render.setStyle(container, cssAttribute + "-bottom", height === 0 ? '' : height + "px");
|
|
87
|
-
};
|
|
88
|
-
Object.defineProperty(NgxFixedFooterDirective.prototype, "container", {
|
|
89
|
-
get: function () {
|
|
90
|
-
return this.document.body.querySelector(this.containerSelector);
|
|
91
|
-
},
|
|
92
|
-
enumerable: false,
|
|
93
|
-
configurable: true
|
|
94
|
-
});
|
|
95
|
-
Object.defineProperty(NgxFixedFooterDirective.prototype, "html", {
|
|
96
|
-
get: function () {
|
|
97
|
-
return this.el.nativeElement;
|
|
98
|
-
},
|
|
99
|
-
enumerable: false,
|
|
100
|
-
configurable: true
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(NgxFixedFooterDirective.prototype, "hasResizeObserver", {
|
|
103
|
-
get: function () {
|
|
104
|
-
return typeof ResizeObserver !== 'undefined';
|
|
105
|
-
},
|
|
106
|
-
enumerable: false,
|
|
107
|
-
configurable: true
|
|
108
|
-
});
|
|
109
|
-
return NgxFixedFooterDirective;
|
|
110
|
-
}());
|
|
111
|
-
NgxFixedFooterDirective.decorators = [
|
|
112
|
-
{ type: core.Directive, args: [{
|
|
113
|
-
selector: '[ngxFixedFooter]'
|
|
114
|
-
},] }
|
|
115
|
-
];
|
|
116
|
-
NgxFixedFooterDirective.ctorParameters = function () { return [
|
|
117
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
|
|
118
|
-
{ type: core.ElementRef },
|
|
119
|
-
{ type: core.Renderer2 },
|
|
120
|
-
{ type: NgxFixedFooterOptionsService }
|
|
121
|
-
]; };
|
|
122
|
-
NgxFixedFooterDirective.propDecorators = {
|
|
123
|
-
containerSelector: [{ type: core.Input }],
|
|
124
|
-
cssAttribute: [{ type: core.Input }]
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
var ngxFixedFooterOptionsFactory = function (options) {
|
|
128
|
-
var ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();
|
|
129
|
-
if (options) {
|
|
130
|
-
if (options.containerSelector) {
|
|
131
|
-
ngxFixedFooterOptionsService.containerSelector = options.containerSelector;
|
|
132
|
-
}
|
|
133
|
-
if (options.cssAttribute) {
|
|
134
|
-
ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return ngxFixedFooterOptionsService;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
var FOR_ROOT_OPTIONS_TOKEN = new core.InjectionToken('forRoot() NgxCutOptionsService configuration.');
|
|
141
|
-
var NgxFixedFooterModule = /** @class */ (function () {
|
|
142
|
-
function NgxFixedFooterModule() {
|
|
143
|
-
}
|
|
144
|
-
NgxFixedFooterModule.forRoot = function (options) {
|
|
145
|
-
return {
|
|
146
|
-
ngModule: NgxFixedFooterModule,
|
|
147
|
-
providers: [
|
|
148
|
-
{
|
|
149
|
-
provide: FOR_ROOT_OPTIONS_TOKEN,
|
|
150
|
-
useValue: options
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
provide: NgxFixedFooterOptionsService,
|
|
154
|
-
useFactory: ngxFixedFooterOptionsFactory,
|
|
155
|
-
deps: [FOR_ROOT_OPTIONS_TOKEN]
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
return NgxFixedFooterModule;
|
|
161
|
-
}());
|
|
162
|
-
NgxFixedFooterModule.decorators = [
|
|
163
|
-
{ type: core.NgModule, args: [{
|
|
164
|
-
declarations: [NgxFixedFooterDirective],
|
|
165
|
-
exports: [NgxFixedFooterDirective],
|
|
166
|
-
providers: [NgxFixedFooterOptionsService]
|
|
167
|
-
},] }
|
|
168
|
-
];
|
|
169
|
-
|
|
170
|
-
/*
|
|
171
|
-
* Public API Surface of ngx-fixed-footer
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Generated bundle index. Do not edit.
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
exports.DEFAULT_CONTAINER_SELECTOR = DEFAULT_CONTAINER_SELECTOR;
|
|
179
|
-
exports.DEFAULT_CSS_ATTRIBUTE = DEFAULT_CSS_ATTRIBUTE;
|
|
180
|
-
exports.FOR_ROOT_OPTIONS_TOKEN = FOR_ROOT_OPTIONS_TOKEN;
|
|
181
|
-
exports.NgxFixedFooterDirective = NgxFixedFooterDirective;
|
|
182
|
-
exports.NgxFixedFooterModule = NgxFixedFooterModule;
|
|
183
|
-
exports.NgxFixedFooterOptionsService = NgxFixedFooterOptionsService;
|
|
184
|
-
exports.ɵa = ngxFixedFooterOptionsFactory;
|
|
185
|
-
|
|
186
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
187
|
-
|
|
188
|
-
})));
|
|
189
|
-
//# sourceMappingURL=ngx-fixed-footer.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-fixed-footer.umd.js","sources":["../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.constants.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-options.service.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.directive.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-factory.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.module.ts","../../../projects/ngx-fixed-footer/src/public-api.ts","../../../projects/ngx-fixed-footer/src/ngx-fixed-footer.ts"],"sourcesContent":["export const DEFAULT_CSS_ATTRIBUTE = 'padding';\nexport const DEFAULT_CONTAINER_SELECTOR = '[role=\"main\"]';\n","import { Injectable } from '@angular/core';\nimport { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE } from './ngx-fixed-footer.constants';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Injectable()\nexport class NgxFixedFooterOptionsService {\n /**\n * @returns Css attribute of HTML element which gets style. It means margin or padding\n */\n public cssAttribute: NgxFixedFooterCssAttribute = DEFAULT_CSS_ATTRIBUTE;\n\n /**\n * @returns Css selector of HTML element which gets extra margin or padding\n */\n public containerSelector: string = DEFAULT_CONTAINER_SELECTOR;\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges\n} from '@angular/core';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Directive({\n selector: '[ngxFixedFooter]'\n})\nexport class NgxFixedFooterDirective implements OnDestroy, OnChanges, OnInit {\n @Input() public containerSelector: string = this.options.containerSelector;\n @Input() public cssAttribute: NgxFixedFooterCssAttribute = this.options.cssAttribute;\n\n private offsetHeight: number = undefined;\n private resizeObserver: ResizeObserver;\n\n constructor(\n @Inject(DOCUMENT) private document: any,\n private el: ElementRef,\n private render: Renderer2,\n private options: NgxFixedFooterOptionsService\n ) {}\n\n public ngOnInit(): void {\n if (this.hasResizeObserver && this.document) {\n const resizeObserver = new ResizeObserver(() => this.checkHeight());\n resizeObserver.observe(this.html);\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (this.hasResizeObserver && this.document) {\n // swap selector\n if (changes?.containerSelector && !changes?.containerSelector?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.containerSelector?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);\n this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);\n }\n }\n\n // swap css attribute\n if (changes?.cssAttribute && !changes?.cssAttribute?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.cssAttribute?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.container, prev);\n this.setStyle(this.container, next, this.offsetHeight);\n }\n }\n }\n }\n\n public ngOnDestroy(): void {\n if (this.hasResizeObserver && this.document) {\n this.removeStyle(this.container, this.cssAttribute);\n if (this.resizeObserver) {\n this.resizeObserver.unobserve(this.html);\n }\n }\n }\n\n private checkHeight(): void {\n const height = this.html.offsetHeight;\n if (this.offsetHeight !== height) {\n this.setStyle(this.container, this.cssAttribute, height);\n this.offsetHeight = height;\n }\n }\n\n private removeStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, '');\n }\n\n private setStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute, height: number): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);\n }\n\n private get container(): HTMLElement {\n return this.document.body.querySelector(this.containerSelector);\n }\n\n private get html(): HTMLElement {\n return this.el.nativeElement;\n }\n\n private get hasResizeObserver(): boolean {\n return typeof ResizeObserver !== 'undefined';\n }\n}\n","import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport const ngxFixedFooterOptionsFactory = (options?: NgxFixedFooterOptions): NgxFixedFooterOptionsService => {\n const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();\n if (options) {\n if (options.containerSelector) {\n ngxFixedFooterOptionsService.containerSelector = options.containerSelector;\n }\n if (options.cssAttribute) {\n ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;\n }\n }\n return ngxFixedFooterOptionsService;\n};\n","import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { ngxFixedFooterOptionsFactory } from './ngx-fixed-footer-factory';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterDirective } from './ngx-fixed-footer.directive';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken<NgxFixedFooterOptions>(\n 'forRoot() NgxCutOptionsService configuration.'\n);\n\n@NgModule({\n declarations: [NgxFixedFooterDirective],\n exports: [NgxFixedFooterDirective],\n providers: [NgxFixedFooterOptionsService]\n})\nexport class NgxFixedFooterModule {\n public static forRoot(options?: NgxFixedFooterOptions): ModuleWithProviders<NgxFixedFooterModule> {\n return {\n ngModule: NgxFixedFooterModule,\n providers: [\n {\n provide: FOR_ROOT_OPTIONS_TOKEN,\n useValue: options\n },\n {\n provide: NgxFixedFooterOptionsService,\n useFactory: ngxFixedFooterOptionsFactory,\n deps: [FOR_ROOT_OPTIONS_TOKEN]\n }\n ]\n };\n }\n}\n","/*\n * Public API Surface of ngx-fixed-footer\n */\n\nexport * from './lib/ngx-fixed-footer-options.service';\nexport * from './lib/ngx-fixed-footer.constants';\nexport * from './lib/ngx-fixed-footer.directive';\nexport * from './lib/ngx-fixed-footer.interface';\nexport * from './lib/ngx-fixed-footer.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {ngxFixedFooterOptionsFactory as ɵa} from './lib/ngx-fixed-footer-factory';"],"names":["Injectable","Directive","Inject","DOCUMENT","ElementRef","Renderer2","Input","InjectionToken","NgModule"],"mappings":";;;;;;QAAa,qBAAqB,GAAG,UAAU;QAClC,0BAA0B,GAAG;;;QCG1C;;;;YAKS,iBAAY,GAA+B,qBAAqB,CAAC;;;;YAKjE,sBAAiB,GAAW,0BAA0B,CAAC;SAC/D;;;;gBAXAA,eAAU;;;;QCqBT,iCAC4B,QAAa,EAC/B,EAAc,EACd,MAAiB,EACjB,OAAqC;YAHnB,aAAQ,GAAR,QAAQ,CAAK;YAC/B,OAAE,GAAF,EAAE,CAAY;YACd,WAAM,GAAN,MAAM,CAAW;YACjB,YAAO,GAAP,OAAO,CAA8B;YAV/B,sBAAiB,GAAW,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;YAC3D,iBAAY,GAA+B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;YAE7E,iBAAY,GAAW,SAAS,CAAC;SAQrC;QAEG,0CAAQ,GAAR;YAAA,iBAKN;YAJC,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC3C,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,cAAM,OAAA,KAAI,CAAC,WAAW,EAAE,GAAA,CAAC,CAAC;gBACpE,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACnC;SACF;QAEM,6CAAW,GAAX,UAAY,OAAsB;;YACvC,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,QAAQ,EAAE;;gBAE3C,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,KAAI,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,0CAAE,WAAW,CAAA,EAAE;oBAC1E,IAAM,IAAI,GAAG,MAA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BACLA,UAAK;;;QCjBK,4BAA4B,GAAG,UAAC,OAA+B;QAC1E,IAAM,4BAA4B,GAAG,IAAI,4BAA4B,EAAE,CAAC;QACxE,IAAI,OAAO,EAAE;YACX,IAAI,OAAO,CAAC,iBAAiB,EAAE;gBAC7B,4BAA4B,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;aAC5E;YACD,IAAI,OAAO,CAAC,YAAY,EAAE;gBACxB,4BAA4B,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;aAClE;SACF;QACD,OAAO,4BAA4B,CAAC;IACtC;;QCRW,sBAAsB,GAAG,IAAIC,mBAAc,CACpD,+CAA+C,EAC/C;;QAOF;;QACgB,4BAAO,GAAd,UAAe,OAA+B;YACnD,OAAO;gBACL,QAAQ,EAAE,oBAAoB;gBAC9B,SAAS,EAAE;oBACT;wBACE,OAAO,EAAE,sBAAsB;wBAC/B,QAAQ,EAAE,OAAO;qBAClB;oBACD;wBACE,OAAO,EAAE,4BAA4B;wBACrC,UAAU,EAAE,4BAA4B;wBACxC,IAAI,EAAE,CAAC,sBAAsB,CAAC;qBAC/B;iBACF;aACF,CAAC;SACH;;;;gBArBFC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,SAAS,EAAE,CAAC,4BAA4B,CAAC;iBAC1C;;;ICdD;;;;ICAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE } from './ngx-fixed-footer.constants';
|
|
3
|
-
export class NgxFixedFooterOptionsService {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* @returns Css attribute of HTML element which gets style. It means margin or padding
|
|
7
|
-
*/
|
|
8
|
-
this.cssAttribute = DEFAULT_CSS_ATTRIBUTE;
|
|
9
|
-
/**
|
|
10
|
-
* @returns Css selector of HTML element which gets extra margin or padding
|
|
11
|
-
*/
|
|
12
|
-
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
NgxFixedFooterOptionsService.decorators = [
|
|
16
|
-
{ type: Injectable }
|
|
17
|
-
];
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci1vcHRpb25zLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZml4ZWQtZm9vdGVyL3NyYy9saWIvbmd4LWZpeGVkLWZvb3Rlci1vcHRpb25zLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsMEJBQTBCLEVBQUUscUJBQXFCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUlqRyxNQUFNLE9BQU8sNEJBQTRCO0lBRHpDO1FBRUU7O1dBRUc7UUFDSSxpQkFBWSxHQUErQixxQkFBcUIsQ0FBQztRQUV4RTs7V0FFRztRQUNJLHNCQUFpQixHQUFXLDBCQUEwQixDQUFDO0lBQ2hFLENBQUM7OztZQVhBLFVBQVUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBERUZBVUxUX0NPTlRBSU5FUl9TRUxFQ1RPUiwgREVGQVVMVF9DU1NfQVRUUklCVVRFIH0gZnJvbSAnLi9uZ3gtZml4ZWQtZm9vdGVyLmNvbnN0YW50cyc7XG5pbXBvcnQgeyBOZ3hGaXhlZEZvb3RlckNzc0F0dHJpYnV0ZSB9IGZyb20gJy4vbmd4LWZpeGVkLWZvb3Rlci5pbnRlcmZhY2UnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgTmd4Rml4ZWRGb290ZXJPcHRpb25zU2VydmljZSB7XG4gIC8qKlxuICAgKiBAcmV0dXJucyBDc3MgYXR0cmlidXRlIG9mIEhUTUwgZWxlbWVudCB3aGljaCBnZXRzIHN0eWxlLiBJdCBtZWFucyBtYXJnaW4gb3IgcGFkZGluZ1xuICAgKi9cbiAgcHVibGljIGNzc0F0dHJpYnV0ZTogTmd4Rml4ZWRGb290ZXJDc3NBdHRyaWJ1dGUgPSBERUZBVUxUX0NTU19BVFRSSUJVVEU7XG5cbiAgLyoqXG4gICAqIEByZXR1cm5zIENzcyBzZWxlY3RvciBvZiBIVE1MIGVsZW1lbnQgd2hpY2ggZ2V0cyBleHRyYSBtYXJnaW4gb3IgcGFkZGluZ1xuICAgKi9cbiAgcHVibGljIGNvbnRhaW5lclNlbGVjdG9yOiBzdHJpbmcgPSBERUZBVUxUX0NPTlRBSU5FUl9TRUxFQ1RPUjtcbn1cbiJdfQ==
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, Inject, Input, Renderer2 } from '@angular/core';
|
|
3
|
-
import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';
|
|
4
|
-
export class NgxFixedFooterDirective {
|
|
5
|
-
constructor(document, el, render, options) {
|
|
6
|
-
this.document = document;
|
|
7
|
-
this.el = el;
|
|
8
|
-
this.render = render;
|
|
9
|
-
this.options = options;
|
|
10
|
-
this.containerSelector = this.options.containerSelector;
|
|
11
|
-
this.cssAttribute = this.options.cssAttribute;
|
|
12
|
-
this.offsetHeight = undefined;
|
|
13
|
-
}
|
|
14
|
-
ngOnInit() {
|
|
15
|
-
if (this.hasResizeObserver && this.document) {
|
|
16
|
-
const resizeObserver = new ResizeObserver(() => this.checkHeight());
|
|
17
|
-
resizeObserver.observe(this.html);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
ngOnChanges(changes) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f;
|
|
22
|
-
if (this.hasResizeObserver && this.document) {
|
|
23
|
-
// swap selector
|
|
24
|
-
if ((changes === null || changes === void 0 ? void 0 : changes.containerSelector) && !((_a = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _a === void 0 ? void 0 : _a.firstChange)) {
|
|
25
|
-
const prev = (_b = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _b === void 0 ? void 0 : _b.previousValue;
|
|
26
|
-
const next = (_c = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _c === void 0 ? void 0 : _c.currentValue;
|
|
27
|
-
if (next !== prev) {
|
|
28
|
-
this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);
|
|
29
|
-
this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
// swap css attribute
|
|
33
|
-
if ((changes === null || changes === void 0 ? void 0 : changes.cssAttribute) && !((_d = changes === null || changes === void 0 ? void 0 : changes.cssAttribute) === null || _d === void 0 ? void 0 : _d.firstChange)) {
|
|
34
|
-
const prev = (_e = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _e === void 0 ? void 0 : _e.previousValue;
|
|
35
|
-
const next = (_f = changes === null || changes === void 0 ? void 0 : changes.cssAttribute) === null || _f === void 0 ? void 0 : _f.currentValue;
|
|
36
|
-
if (next !== prev) {
|
|
37
|
-
this.removeStyle(this.container, prev);
|
|
38
|
-
this.setStyle(this.container, next, this.offsetHeight);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
ngOnDestroy() {
|
|
44
|
-
if (this.hasResizeObserver && this.document) {
|
|
45
|
-
this.removeStyle(this.container, this.cssAttribute);
|
|
46
|
-
if (this.resizeObserver) {
|
|
47
|
-
this.resizeObserver.unobserve(this.html);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
checkHeight() {
|
|
52
|
-
const height = this.html.offsetHeight;
|
|
53
|
-
if (this.offsetHeight !== height) {
|
|
54
|
-
this.setStyle(this.container, this.cssAttribute, height);
|
|
55
|
-
this.offsetHeight = height;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
removeStyle(container, cssAttribute) {
|
|
59
|
-
this.render.setStyle(container, `${cssAttribute}-bottom`, '');
|
|
60
|
-
}
|
|
61
|
-
setStyle(container, cssAttribute, height) {
|
|
62
|
-
this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);
|
|
63
|
-
}
|
|
64
|
-
get container() {
|
|
65
|
-
return this.document.body.querySelector(this.containerSelector);
|
|
66
|
-
}
|
|
67
|
-
get html() {
|
|
68
|
-
return this.el.nativeElement;
|
|
69
|
-
}
|
|
70
|
-
get hasResizeObserver() {
|
|
71
|
-
return typeof ResizeObserver !== 'undefined';
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
NgxFixedFooterDirective.decorators = [
|
|
75
|
-
{ type: Directive, args: [{
|
|
76
|
-
selector: '[ngxFixedFooter]'
|
|
77
|
-
},] }
|
|
78
|
-
];
|
|
79
|
-
NgxFixedFooterDirective.ctorParameters = () => [
|
|
80
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
81
|
-
{ type: ElementRef },
|
|
82
|
-
{ type: Renderer2 },
|
|
83
|
-
{ type: NgxFixedFooterOptionsService }
|
|
84
|
-
];
|
|
85
|
-
NgxFixedFooterDirective.propDecorators = {
|
|
86
|
-
containerSelector: [{ type: Input }],
|
|
87
|
-
cssAttribute: [{ type: Input }]
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci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cy5lbC5uYXRpdmVFbGVtZW50O1xuICB9XG5cbiAgcHJpdmF0ZSBnZXQgaGFzUmVzaXplT2JzZXJ2ZXIoKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIHR5cGVvZiBSZXNpemVPYnNlcnZlciAhPT0gJ3VuZGVmaW5lZCc7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, NgModule } from '@angular/core';
|
|
2
|
-
import { ngxFixedFooterOptionsFactory } from './ngx-fixed-footer-factory';
|
|
3
|
-
import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';
|
|
4
|
-
import { NgxFixedFooterDirective } from './ngx-fixed-footer.directive';
|
|
5
|
-
export let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken('forRoot() NgxCutOptionsService configuration.');
|
|
6
|
-
export class NgxFixedFooterModule {
|
|
7
|
-
static forRoot(options) {
|
|
8
|
-
return {
|
|
9
|
-
ngModule: NgxFixedFooterModule,
|
|
10
|
-
providers: [
|
|
11
|
-
{
|
|
12
|
-
provide: FOR_ROOT_OPTIONS_TOKEN,
|
|
13
|
-
useValue: options
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
provide: NgxFixedFooterOptionsService,
|
|
17
|
-
useFactory: ngxFixedFooterOptionsFactory,
|
|
18
|
-
deps: [FOR_ROOT_OPTIONS_TOKEN]
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
NgxFixedFooterModule.decorators = [
|
|
25
|
-
{ type: NgModule, args: [{
|
|
26
|
-
declarations: [NgxFixedFooterDirective],
|
|
27
|
-
exports: [NgxFixedFooterDirective],
|
|
28
|
-
providers: [NgxFixedFooterOptionsService]
|
|
29
|
-
},] }
|
|
30
|
-
];
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3R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bnMpOiBNb2R1bGVXaXRoUHJvdmlkZXJzPE5neEZpeGVkRm9vdGVyTW9kdWxlPiB7XG4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBOZ3hGaXhlZEZvb3Rlck1vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogRk9SX1JPT1RfT1BUSU9OU19UT0tFTixcbiAgICAgICAgICB1c2VWYWx1ZTogb3B0aW9uc1xuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgcHJvdmlkZTogTmd4Rml4ZWRGb290ZXJPcHRpb25zU2VydmljZSxcbiAgICAgICAgICB1c2VGYWN0b3J5OiBuZ3hGaXhlZEZvb3Rlck9wdGlvbnNGYWN0b3J5LFxuICAgICAgICAgIGRlcHM6IFtGT1JfUk9PVF9PUFRJT05TX1RPS0VOXVxuICAgICAgICB9XG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
export { ngxFixedFooterOptionsFactory as ɵa } from './lib/ngx-fixed-footer-factory';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1maXhlZC1mb290ZXIvc3JjL25neC1maXhlZC1mb290ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsNEJBQTRCLElBQUksRUFBRSxFQUFDLE1BQU0sZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG5cbmV4cG9ydCB7bmd4Rml4ZWRGb290ZXJPcHRpb25zRmFjdG9yeSBhcyDJtWF9IGZyb20gJy4vbGliL25neC1maXhlZC1mb290ZXItZmFjdG9yeSc7Il19
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-fixed-footer.js","sources":["../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.constants.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-options.service.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.directive.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer-factory.ts","../../../projects/ngx-fixed-footer/src/lib/ngx-fixed-footer.module.ts","../../../projects/ngx-fixed-footer/src/public-api.ts","../../../projects/ngx-fixed-footer/src/ngx-fixed-footer.ts"],"sourcesContent":["export const DEFAULT_CSS_ATTRIBUTE = 'padding';\nexport const DEFAULT_CONTAINER_SELECTOR = '[role=\"main\"]';\n","import { Injectable } from '@angular/core';\nimport { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE } from './ngx-fixed-footer.constants';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Injectable()\nexport class NgxFixedFooterOptionsService {\n /**\n * @returns Css attribute of HTML element which gets style. It means margin or padding\n */\n public cssAttribute: NgxFixedFooterCssAttribute = DEFAULT_CSS_ATTRIBUTE;\n\n /**\n * @returns Css selector of HTML element which gets extra margin or padding\n */\n public containerSelector: string = DEFAULT_CONTAINER_SELECTOR;\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges\n} from '@angular/core';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterCssAttribute } from './ngx-fixed-footer.interface';\n\n@Directive({\n selector: '[ngxFixedFooter]'\n})\nexport class NgxFixedFooterDirective implements OnDestroy, OnChanges, OnInit {\n @Input() public containerSelector: string = this.options.containerSelector;\n @Input() public cssAttribute: NgxFixedFooterCssAttribute = this.options.cssAttribute;\n\n private offsetHeight: number = undefined;\n private resizeObserver: ResizeObserver;\n\n constructor(\n @Inject(DOCUMENT) private document: any,\n private el: ElementRef,\n private render: Renderer2,\n private options: NgxFixedFooterOptionsService\n ) {}\n\n public ngOnInit(): void {\n if (this.hasResizeObserver && this.document) {\n const resizeObserver = new ResizeObserver(() => this.checkHeight());\n resizeObserver.observe(this.html);\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (this.hasResizeObserver && this.document) {\n // swap selector\n if (changes?.containerSelector && !changes?.containerSelector?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.containerSelector?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);\n this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);\n }\n }\n\n // swap css attribute\n if (changes?.cssAttribute && !changes?.cssAttribute?.firstChange) {\n const prev = changes?.containerSelector?.previousValue;\n const next = changes?.cssAttribute?.currentValue;\n if (next !== prev) {\n this.removeStyle(this.container, prev);\n this.setStyle(this.container, next, this.offsetHeight);\n }\n }\n }\n }\n\n public ngOnDestroy(): void {\n if (this.hasResizeObserver && this.document) {\n this.removeStyle(this.container, this.cssAttribute);\n if (this.resizeObserver) {\n this.resizeObserver.unobserve(this.html);\n }\n }\n }\n\n private checkHeight(): void {\n const height = this.html.offsetHeight;\n if (this.offsetHeight !== height) {\n this.setStyle(this.container, this.cssAttribute, height);\n this.offsetHeight = height;\n }\n }\n\n private removeStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, '');\n }\n\n private setStyle(container: HTMLElement, cssAttribute: NgxFixedFooterCssAttribute, height: number): void {\n this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);\n }\n\n private get container(): HTMLElement {\n return this.document.body.querySelector(this.containerSelector);\n }\n\n private get html(): HTMLElement {\n return this.el.nativeElement;\n }\n\n private get hasResizeObserver(): boolean {\n return typeof ResizeObserver !== 'undefined';\n }\n}\n","import { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport const ngxFixedFooterOptionsFactory = (options?: NgxFixedFooterOptions): NgxFixedFooterOptionsService => {\n const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();\n if (options) {\n if (options.containerSelector) {\n ngxFixedFooterOptionsService.containerSelector = options.containerSelector;\n }\n if (options.cssAttribute) {\n ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;\n }\n }\n return ngxFixedFooterOptionsService;\n};\n","import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { ngxFixedFooterOptionsFactory } from './ngx-fixed-footer-factory';\nimport { NgxFixedFooterOptionsService } from './ngx-fixed-footer-options.service';\nimport { NgxFixedFooterDirective } from './ngx-fixed-footer.directive';\nimport { NgxFixedFooterOptions } from './ngx-fixed-footer.interface';\n\nexport let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken<NgxFixedFooterOptions>(\n 'forRoot() NgxCutOptionsService configuration.'\n);\n\n@NgModule({\n declarations: [NgxFixedFooterDirective],\n exports: [NgxFixedFooterDirective],\n providers: [NgxFixedFooterOptionsService]\n})\nexport class NgxFixedFooterModule {\n public static forRoot(options?: NgxFixedFooterOptions): ModuleWithProviders<NgxFixedFooterModule> {\n return {\n ngModule: NgxFixedFooterModule,\n providers: [\n {\n provide: FOR_ROOT_OPTIONS_TOKEN,\n useValue: options\n },\n {\n provide: NgxFixedFooterOptionsService,\n useFactory: ngxFixedFooterOptionsFactory,\n deps: [FOR_ROOT_OPTIONS_TOKEN]\n }\n ]\n };\n }\n}\n","/*\n * Public API Surface of ngx-fixed-footer\n */\n\nexport * from './lib/ngx-fixed-footer-options.service';\nexport * from './lib/ngx-fixed-footer.constants';\nexport * from './lib/ngx-fixed-footer.directive';\nexport * from './lib/ngx-fixed-footer.interface';\nexport * from './lib/ngx-fixed-footer.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {ngxFixedFooterOptionsFactory as ɵa} from './lib/ngx-fixed-footer-factory';"],"names":[],"mappings":";;;MAAa,qBAAqB,GAAG,UAAU;MAClC,0BAA0B,GAAG;;MCI7B,4BAA4B;IADzC;;;;QAKS,iBAAY,GAA+B,qBAAqB,CAAC;;;;QAKjE,sBAAiB,GAAW,0BAA0B,CAAC;KAC/D;;;YAXA,UAAU;;;MCcE,uBAAuB;IAOlC,YAC4B,QAAa,EAC/B,EAAc,EACd,MAAiB,EACjB,OAAqC;QAHnB,aAAQ,GAAR,QAAQ,CAAK;QAC/B,OAAE,GAAF,EAAE,CAAY;QACd,WAAM,GAAN,MAAM,CAAW;QACjB,YAAO,GAAP,OAAO,CAA8B;QAV/B,sBAAiB,GAAW,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC3D,iBAAY,GAA+B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;QAE7E,iBAAY,GAAW,SAAS,CAAC;KAQrC;IAEG,QAAQ;QACb,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC3C,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACpE,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnC;KACF;IAEM,WAAW,CAAC,OAAsB;;QACvC,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,QAAQ,EAAE;;YAE3C,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAA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AAU;YAMV,SAAS;YAGF,4BAA4B;;;gCAOlC,KAAK;2BACL,KAAK;;;MCjBK,4BAA4B,GAAG,CAAC,OAA+B;IAC1E,MAAM,4BAA4B,GAAG,IAAI,4BAA4B,EAAE,CAAC;IACxE,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,iBAAiB,EAAE;YAC7B,4BAA4B,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;SAC5E;QACD,IAAI,OAAO,CAAC,YAAY,EAAE;YACxB,4BAA4B,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;SAClE;KACF;IACD,OAAO,4BAA4B,CAAC;AACtC;;ICRW,sBAAsB,GAAG,IAAI,cAAc,CACpD,+CAA+C,EAC/C;MAOW,oBAAoB;IACxB,OAAO,OAAO,CAAC,OAA+B;QACnD,OAAO;YACL,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,OAAO;iBAClB;gBACD;oBACE,OAAO,EAAE,4BAA4B;oBACrC,UAAU,EAAE,4BAA4B;oBACxC,IAAI,EAAE,CAAC,sBAAsB,CAAC;iBAC/B;aACF;SACF,CAAC;KACH;;;YArBF,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;gBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;gBAClC,SAAS,EAAE,CAAC,4BAA4B,CAAC;aAC1C;;;ACdD;;;;ACAA;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"NgxFixedFooterOptionsService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1}}],"members":{}},"DEFAULT_CSS_ATTRIBUTE":"padding","DEFAULT_CONTAINER_SELECTOR":"[role=\"main\"]","NgxFixedFooterDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"selector":"[ngxFixedFooter]"}]}],"members":{"containerSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"cssAttribute":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":26,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":27,"character":16},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":28,"character":20},{"__symbolic":"reference","name":"NgxFixedFooterOptionsService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"checkHeight":[{"__symbolic":"method"}],"removeStyle":[{"__symbolic":"method"}],"setStyle":[{"__symbolic":"method"}]}},"NgxFixedFooterCssAttribute":{"__symbolic":"interface"},"NgxFixedFooterOptions":{"__symbolic":"interface"},"FOR_ROOT_OPTIONS_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":6,"character":40},"arguments":["forRoot() NgxCutOptionsService configuration."]},"NgxFixedFooterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxFixedFooterDirective"}],"exports":[{"__symbolic":"reference","name":"NgxFixedFooterDirective"}],"providers":[{"__symbolic":"reference","name":"NgxFixedFooterOptionsService"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxFixedFooterModule"},"providers":[{"provide":{"__symbolic":"reference","name":"FOR_ROOT_OPTIONS_TOKEN"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","name":"NgxFixedFooterOptionsService"},"useFactory":{"__symbolic":"reference","name":"ɵa"},"deps":[{"__symbolic":"reference","name":"FOR_ROOT_OPTIONS_TOKEN"}]}]}}}},"ɵa":{"__symbolic":"error","message":"Lambda not supported","line":3,"character":44,"module":"./lib/ngx-fixed-footer-factory"}},"origins":{"NgxFixedFooterOptionsService":"./lib/ngx-fixed-footer-options.service","DEFAULT_CSS_ATTRIBUTE":"./lib/ngx-fixed-footer.constants","DEFAULT_CONTAINER_SELECTOR":"./lib/ngx-fixed-footer.constants","NgxFixedFooterDirective":"./lib/ngx-fixed-footer.directive","NgxFixedFooterCssAttribute":"./lib/ngx-fixed-footer.interface","NgxFixedFooterOptions":"./lib/ngx-fixed-footer.interface","FOR_ROOT_OPTIONS_TOKEN":"./lib/ngx-fixed-footer.module","NgxFixedFooterModule":"./lib/ngx-fixed-footer.module","ɵa":"./lib/ngx-fixed-footer-factory"},"importAs":"ngx-fixed-footer"}
|