ngx-fixed-footer 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/{esm2020 → esm2022}/lib/ngx-fixed-footer-options.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/ngx-fixed-footer.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/ngx-fixed-footer.module.mjs +5 -5
- package/{fesm2020 → fesm2022}/ngx-fixed-footer.mjs +10 -10
- package/{fesm2020 → fesm2022}/ngx-fixed-footer.mjs.map +1 -1
- package/lib/ngx-fixed-footer.directive.d.ts +1 -1
- package/package.json +5 -11
- package/fesm2015/ngx-fixed-footer.mjs +0 -167
- package/fesm2015/ngx-fixed-footer.mjs.map +0 -1
- /package/{esm2020 → esm2022}/lib/ngx-fixed-footer-factory.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/ngx-fixed-footer.constants.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/ngx-fixed-footer.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-fixed-footer.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://badge.fury.io/js/ngx-fixed-footer)
|
|
7
7
|
[](https://www.npmjs.com/ngx-fixed-footer)
|
|
8
8
|
[](https://www.npmjs.com/ngx-fixed-footer)
|
|
9
|
-
[](https://snyk.io/advisor/npm-package/ngx-fixed-footer)
|
|
10
10
|
[](https://codecov.io/gh/celtian/ngx-fixed-footer/)
|
|
11
11
|
[](https://github.com/celtian/ngx-fixed-footer/)
|
|
12
12
|
[](https://github.com/celtian/ngx-fixed-footer/)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
> Angular directive that adds fixed footer without overlap
|
|
16
16
|
|
|
17
|
-
> ✓ _Angular
|
|
17
|
+
> ✓ _Angular 16, 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
|
|
|
@@ -56,7 +56,6 @@ yarn add ngx-fixed-footer
|
|
|
56
56
|
]
|
|
57
57
|
})
|
|
58
58
|
|
|
59
|
-
|
|
60
59
|
```
|
|
61
60
|
|
|
62
61
|
## Compatibility
|
|
@@ -12,10 +12,10 @@ export class NgxFixedFooterOptionsService {
|
|
|
12
12
|
*/
|
|
13
13
|
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
14
14
|
}
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterOptionsService }); }
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
NgxFixedFooterOptionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterOptionsService });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
19
19
|
type: Injectable
|
|
20
20
|
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci1vcHRpb25zLnNlcnZpY2UuanMiLCJzb3VyY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xuICBwdWJsaWMgY3NzQXR0cmlidXRlOiBOZ3hGaXhlZEZvb3RlckNzc0F0dHJpYnV0ZSA9IERFRkFVTFRfQ1NTX0FUVFJJQlVURTtcblxuICAvKipcbiAgICogQHJldHVybnMgQ3NzIHNlbGVjdG9yIG9mIEhUTUwgZWxlbWVudCB3aGljaCBnZXRzIGV4dHJhIG1hcmdpbiBvciBwYWRkaW5nXG4gICAqL1xuICBwdWJsaWMgY29udGFpbmVyU2VsZWN0b3I6IHN0cmluZyA9IERFRkFVTFRfQ09OVEFJTkVSX1NFTEVDVE9SO1xufVxuIl19
|
|
@@ -70,10 +70,10 @@ export class NgxFixedFooterDirective {
|
|
|
70
70
|
get hasResizeObserver() {
|
|
71
71
|
return typeof ResizeObserver !== 'undefined';
|
|
72
72
|
}
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.NgxFixedFooterOptionsService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
74
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 }); }
|
|
73
75
|
}
|
|
74
|
-
|
|
75
|
-
NgxFixedFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 });
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
77
77
|
type: Directive,
|
|
78
78
|
args: [{
|
|
79
79
|
selector: '[ngxFixedFooter]'
|
|
@@ -86,4 +86,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
86
86
|
}], cssAttribute: [{
|
|
87
87
|
type: Input
|
|
88
88
|
}] } });
|
|
89
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZml4ZWQtZm9vdGVyL3NyYy9saWIvbmd4LWZpeGVkLWZvb3Rlci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFDTCxTQUFTLEVBRVQsTUFBTSxFQUNOLEtBQUssRUFNTixNQUFNLGVBQWUsQ0FBQzs7O0FBT3ZCLE1BQU0sT0FBTyx1QkFBdUI7SUFPbEMsWUFDNEIsUUFBYSxFQUMvQixFQUFjLEVBQ2QsTUFBaUIsRUFDakIsT0FBcUM7UUFIbkIsYUFBUSxHQUFSLFFBQVEsQ0FBSztRQUMvQixPQUFFLEdBQUYsRUFBRSxDQUFZO1FBQ2QsV0FBTSxHQUFOLE1BQU0sQ0FBVztRQUNqQixZQUFPLEdBQVAsT0FBTyxDQUE4QjtRQVYvQixzQkFBaUIsR0FBVyxJQUFJLENBQUMsT0FBTyxDQUFDLGlCQUFpQixDQUFDO1FBQzNELGlCQUFZLEdBQStCLElBQUksQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDO1FBRTd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bWVudDtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0IGhhc1Jlc2l6ZU9ic2VydmVyKCk6IGJvb2xlYW4ge1xuICAgIHJldHVybiB0eXBlb2YgUmVzaXplT2JzZXJ2ZXIgIT09ICd1bmRlZmluZWQnO1xuICB9XG59XG4iXX0=
|
|
@@ -21,11 +21,11 @@ export class NgxFixedFooterModule {
|
|
|
21
21
|
]
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
25
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] }); }
|
|
26
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] }); }
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
NgxFixedFooterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] });
|
|
27
|
-
NgxFixedFooterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
29
29
|
type: NgModule,
|
|
30
30
|
args: [{
|
|
31
31
|
declarations: [NgxFixedFooterDirective],
|
|
@@ -33,4 +33,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
33
33
|
providers: [NgxFixedFooterOptionsService]
|
|
34
34
|
}]
|
|
35
35
|
}] });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZpeGVkLWZvb3Rlci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZml4ZWQtZm9vdGVyL3NyYy9saWIvbmd4LWZpeGVkLWZvb3Rlci5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBdUIsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzlFLE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzFFLE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDhCQUE4QixDQUFDOztBQUd2RSxNQUFNLENBQUMsSUFBSSxzQkFBc0IsR0FBRyxJQUFJLGNBQWMsQ0FDcEQsK0NBQStDLENBQ2hELENBQUM7QUFPRixNQUFNLE9BQU8sb0JBQW9CO0lBQ3hCLE1BQU0sQ0FBQyxPQUFPLENBQUMsT0FBK0I7UUFDbkQsT0FBTztZQUNMLFFBQVEsRUFBRSxvQkFBb0I7WUFDOUIsU0FBUyxFQUFFO2dCQUNUO29CQUNFLE9BQU8sRUFBRSxzQkFBc0I7b0JBQy9CLFFBQVEsRUFBRSxPQUFPO2lCQUNsQjtnQkFDRDtvQkFDRSxPQUFPLEVBQUUsNEJBQTRC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OZ3hGaXhlZEZvb3Rlck9wdGlvbnM+KFxuICAnZm9yUm9vdCgpIE5neEN1dE9wdGlvbnNTZXJ2aWNlIGNvbmZpZ3VyYXRpb24uJ1xuKTtcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbTmd4Rml4ZWRGb290ZXJEaXJlY3RpdmVdLFxuICBleHBvcnRzOiBbTmd4Rml4ZWRGb290ZXJEaXJlY3RpdmVdLFxuICBwcm92aWRlcnM6IFtOZ3hGaXhlZEZvb3Rlck9wdGlvbnNTZXJ2aWNlXVxufSlcbmV4cG9ydCBjbGFzcyBOZ3hGaXhlZEZvb3Rlck1vZHVsZSB7XG4gIHB1YmxpYyBzdGF0aWMgZm9yUm9vdChvcHRpb25zPzogTmd4Rml4ZWRGb290ZXJPcHRpb25zKTogTW9kdWxlV2l0aFByb3ZpZGVyczxOZ3hGaXhlZEZvb3Rlck1vZHVsZT4ge1xuICAgIHJldHVybiB7XG4gICAgICBuZ01vZHVsZTogTmd4Rml4ZWRGb290ZXJNb2R1bGUsXG4gICAgICBwcm92aWRlcnM6IFtcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IEZPUl9ST09UX09QVElPTlNfVE9LRU4sXG4gICAgICAgICAgdXNlVmFsdWU6IG9wdGlvbnNcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHByb3ZpZGU6IE5neEZpeGVkRm9vdGVyT3B0aW9uc1NlcnZpY2UsXG4gICAgICAgICAgdXNlRmFjdG9yeTogbmd4Rml4ZWRGb290ZXJPcHRpb25zRmFjdG9yeSxcbiAgICAgICAgICBkZXBzOiBbRk9SX1JPT1RfT1BUSU9OU19UT0tFTl1cbiAgICAgICAgfVxuICAgICAgXVxuICAgIH07XG4gIH1cbn1cbiJdfQ==
|
|
@@ -16,10 +16,10 @@ class NgxFixedFooterOptionsService {
|
|
|
16
16
|
*/
|
|
17
17
|
this.containerSelector = DEFAULT_CONTAINER_SELECTOR;
|
|
18
18
|
}
|
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterOptionsService }); }
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
NgxFixedFooterOptionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterOptionsService });
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterOptionsService, decorators: [{
|
|
23
23
|
type: Injectable
|
|
24
24
|
}] });
|
|
25
25
|
|
|
@@ -91,10 +91,10 @@ class NgxFixedFooterDirective {
|
|
|
91
91
|
get hasResizeObserver() {
|
|
92
92
|
return typeof ResizeObserver !== 'undefined';
|
|
93
93
|
}
|
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: NgxFixedFooterOptionsService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
95
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 }); }
|
|
94
96
|
}
|
|
95
|
-
|
|
96
|
-
NgxFixedFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 });
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterDirective, decorators: [{
|
|
98
98
|
type: Directive,
|
|
99
99
|
args: [{
|
|
100
100
|
selector: '[ngxFixedFooter]'
|
|
@@ -139,11 +139,11 @@ class NgxFixedFooterModule {
|
|
|
139
139
|
]
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
143
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] }); }
|
|
144
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] }); }
|
|
142
145
|
}
|
|
143
|
-
|
|
144
|
-
NgxFixedFooterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] });
|
|
145
|
-
NgxFixedFooterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] });
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
147
147
|
type: NgModule,
|
|
148
148
|
args: [{
|
|
149
149
|
declarations: [NgxFixedFooterDirective],
|
|
@@ -1 +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":["i1.NgxFixedFooterOptionsService"],"mappings":";;;;AAAO,MAAM,qBAAqB,GAAG,UAAU;AACxC,MAAM,0BAA0B,GAAG;;MCI7B,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;AAEE;;AAEG;QACI,IAAY,CAAA,YAAA,GAA+B,qBAAqB,CAAC;AAExE;;AAEG;QACI,IAAiB,CAAA,iBAAA,GAAW,0BAA0B,CAAC;AAC/D,KAAA;;yHAVY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;6HAA5B,4BAA4B,EAAA,CAAA,CAAA;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;;;MCcE,uBAAuB,CAAA;AAOlC,IAAA,WAAA,CAC4B,QAAa,EAC/B,EAAc,EACd,MAAiB,EACjB,OAAqC,EAAA;QAHnB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAK;QAC/B,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;QACd,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;QACjB,IAAO,CAAA,OAAA,GAAP,OAAO,CAA8B;AAV/B,QAAA,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;AAC3D,QAAA,IAAA,CAAA,YAAY,GAA+B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;QAE7E,IAAY,CAAA,YAAA,GAAW,SAAS,CAAC;KAQrC;IAEG,QAAQ,GAAA;AACb,QAAA,I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C,iBAAA,CAAA;;;ACdD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
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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asResizeObserver();
|
|
24
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxFixedFooterDirective, never>;
|
|
25
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFixedFooterDirective, "[ngxFixedFooter]", never, { "containerSelector": "containerSelector"; "cssAttribute": "cssAttribute"; }, {}, never, never, false, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFixedFooterDirective, "[ngxFixedFooter]", never, { "containerSelector": { "alias": "containerSelector"; "required": false; }; "cssAttribute": { "alias": "cssAttribute"; "required": false; }; }, {}, never, never, false, never>;
|
|
26
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-fixed-footer",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Dominik Hladík",
|
|
6
6
|
"email": "dominik.hladik@seznam.cz",
|
|
@@ -34,11 +34,7 @@
|
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=12"
|
|
36
36
|
},
|
|
37
|
-
"module": "
|
|
38
|
-
"es2020": "fesm2020/ngx-fixed-footer.mjs",
|
|
39
|
-
"esm2020": "esm2020/ngx-fixed-footer.mjs",
|
|
40
|
-
"fesm2020": "fesm2020/ngx-fixed-footer.mjs",
|
|
41
|
-
"fesm2015": "fesm2015/ngx-fixed-footer.mjs",
|
|
37
|
+
"module": "fesm2022/ngx-fixed-footer.mjs",
|
|
42
38
|
"typings": "index.d.ts",
|
|
43
39
|
"exports": {
|
|
44
40
|
"./package.json": {
|
|
@@ -46,11 +42,9 @@
|
|
|
46
42
|
},
|
|
47
43
|
".": {
|
|
48
44
|
"types": "./index.d.ts",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"node": "./fesm2015/ngx-fixed-footer.mjs",
|
|
53
|
-
"default": "./fesm2020/ngx-fixed-footer.mjs"
|
|
45
|
+
"esm2022": "./esm2022/ngx-fixed-footer.mjs",
|
|
46
|
+
"esm": "./esm2022/ngx-fixed-footer.mjs",
|
|
47
|
+
"default": "./fesm2022/ngx-fixed-footer.mjs"
|
|
54
48
|
}
|
|
55
49
|
},
|
|
56
50
|
"sideEffects": false,
|
|
@@ -1,167 +0,0 @@
|
|
|
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: "15.2.2", ngImport: i0, type: NgxFixedFooterOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
-
NgxFixedFooterOptionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterOptionsService });
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", 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
|
-
var _a, _b, _c, _d, _e, _f;
|
|
44
|
-
if (this.hasResizeObserver && this.document) {
|
|
45
|
-
// swap selector
|
|
46
|
-
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)) {
|
|
47
|
-
const prev = (_b = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _b === void 0 ? void 0 : _b.previousValue;
|
|
48
|
-
const next = (_c = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _c === void 0 ? void 0 : _c.currentValue;
|
|
49
|
-
if (next !== prev) {
|
|
50
|
-
this.removeStyle(this.document.body.querySelector(prev), this.cssAttribute);
|
|
51
|
-
this.setStyle(this.document.body.querySelector(next), this.cssAttribute, this.offsetHeight);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
// swap css attribute
|
|
55
|
-
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)) {
|
|
56
|
-
const prev = (_e = changes === null || changes === void 0 ? void 0 : changes.containerSelector) === null || _e === void 0 ? void 0 : _e.previousValue;
|
|
57
|
-
const next = (_f = changes === null || changes === void 0 ? void 0 : changes.cssAttribute) === null || _f === void 0 ? void 0 : _f.currentValue;
|
|
58
|
-
if (next !== prev) {
|
|
59
|
-
this.removeStyle(this.container, prev);
|
|
60
|
-
this.setStyle(this.container, next, this.offsetHeight);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
ngOnDestroy() {
|
|
66
|
-
if (this.hasResizeObserver && this.document) {
|
|
67
|
-
this.removeStyle(this.container, this.cssAttribute);
|
|
68
|
-
if (this.resizeObserver) {
|
|
69
|
-
this.resizeObserver.unobserve(this.html);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
checkHeight() {
|
|
74
|
-
const height = this.html.offsetHeight;
|
|
75
|
-
if (this.offsetHeight !== height) {
|
|
76
|
-
this.setStyle(this.container, this.cssAttribute, height);
|
|
77
|
-
this.offsetHeight = height;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
removeStyle(container, cssAttribute) {
|
|
81
|
-
this.render.setStyle(container, `${cssAttribute}-bottom`, '');
|
|
82
|
-
}
|
|
83
|
-
setStyle(container, cssAttribute, height) {
|
|
84
|
-
this.render.setStyle(container, `${cssAttribute}-bottom`, height === 0 ? '' : `${height}px`);
|
|
85
|
-
}
|
|
86
|
-
get container() {
|
|
87
|
-
return this.document.body.querySelector(this.containerSelector);
|
|
88
|
-
}
|
|
89
|
-
get html() {
|
|
90
|
-
return this.el.nativeElement;
|
|
91
|
-
}
|
|
92
|
-
get hasResizeObserver() {
|
|
93
|
-
return typeof ResizeObserver !== 'undefined';
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
NgxFixedFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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: "14.0.0", version: "15.2.2", type: NgxFixedFooterDirective, selector: "[ngxFixedFooter]", inputs: { containerSelector: "containerSelector", cssAttribute: "cssAttribute" }, usesOnChanges: true, ngImport: i0 });
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", 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
|
-
}] } });
|
|
113
|
-
|
|
114
|
-
const ngxFixedFooterOptionsFactory = (options) => {
|
|
115
|
-
const ngxFixedFooterOptionsService = new NgxFixedFooterOptionsService();
|
|
116
|
-
if (options) {
|
|
117
|
-
if (options.containerSelector) {
|
|
118
|
-
ngxFixedFooterOptionsService.containerSelector = options.containerSelector;
|
|
119
|
-
}
|
|
120
|
-
if (options.cssAttribute) {
|
|
121
|
-
ngxFixedFooterOptionsService.cssAttribute = options.cssAttribute;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return ngxFixedFooterOptionsService;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
let FOR_ROOT_OPTIONS_TOKEN = new InjectionToken('forRoot() NgxCutOptionsService configuration.');
|
|
128
|
-
class NgxFixedFooterModule {
|
|
129
|
-
static forRoot(options) {
|
|
130
|
-
return {
|
|
131
|
-
ngModule: NgxFixedFooterModule,
|
|
132
|
-
providers: [
|
|
133
|
-
{
|
|
134
|
-
provide: FOR_ROOT_OPTIONS_TOKEN,
|
|
135
|
-
useValue: options
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
provide: NgxFixedFooterOptionsService,
|
|
139
|
-
useFactory: ngxFixedFooterOptionsFactory,
|
|
140
|
-
deps: [FOR_ROOT_OPTIONS_TOKEN]
|
|
141
|
-
}
|
|
142
|
-
]
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
NgxFixedFooterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
147
|
-
NgxFixedFooterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, declarations: [NgxFixedFooterDirective], exports: [NgxFixedFooterDirective] });
|
|
148
|
-
NgxFixedFooterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, providers: [NgxFixedFooterOptionsService] });
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: NgxFixedFooterModule, decorators: [{
|
|
150
|
-
type: NgModule,
|
|
151
|
-
args: [{
|
|
152
|
-
declarations: [NgxFixedFooterDirective],
|
|
153
|
-
exports: [NgxFixedFooterDirective],
|
|
154
|
-
providers: [NgxFixedFooterOptionsService]
|
|
155
|
-
}]
|
|
156
|
-
}] });
|
|
157
|
-
|
|
158
|
-
/*
|
|
159
|
-
* Public API Surface of ngx-fixed-footer
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Generated bundle index. Do not edit.
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
export { DEFAULT_CONTAINER_SELECTOR, DEFAULT_CSS_ATTRIBUTE, FOR_ROOT_OPTIONS_TOKEN, NgxFixedFooterDirective, NgxFixedFooterModule, NgxFixedFooterOptionsService };
|
|
167
|
-
//# sourceMappingURL=ngx-fixed-footer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":["i1.NgxFixedFooterOptionsService"],"mappings":";;;;AAAO,MAAM,qBAAqB,GAAG,UAAU;AACxC,MAAM,0BAA0B,GAAG;;MCI7B,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;AAEE;;AAEG;AACI,QAAA,IAAY,CAAA,YAAA,GAA+B,qBAAqB,CAAC;AAExE;;AAEG;AACI,QAAA,IAAiB,CAAA,iBAAA,GAAW,0BAA0B,CAAC;KAC/D;;yHAVY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;6HAA5B,4BAA4B,EAAA,CAAA,CAAA;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;;;MCcE,uBAAuB,CAAA;AAOlC,IAAA,WAAA,CAC4B,QAAa,EAC/B,EAAc,EACd,MAAiB,EACjB,OAAqC,EAAA;AAHnB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAK;AAC/B,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;AACd,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;AACjB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAA8B;QAV/B,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC3D,IAAA,CAAA,YAAY,GAA+B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;AAE7E,QAAA,IAAY,CAAA,YAAA,GAAW,SAAS,CAAC;KAQrC;IAEG,QAAQ,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,QAAQ,EAAE;AAC3C,YAAA,MAAM,cAAc,GAAG,IAAI,cAAc,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