@nativescript-community/ui-image 4.3.7 → 4.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/angular/directives.d.ts +7 -0
- package/angular/esm2020/directives.mjs +15 -0
- package/angular/esm2020/index.mjs +2 -0
- package/angular/esm2020/module.mjs +22 -0
- package/angular/esm2020/nativescript-community-ui-image-angular.mjs +5 -0
- package/angular/fesm2015/nativescript-community-ui-image-angular.mjs +43 -0
- package/angular/fesm2020/nativescript-community-ui-image-angular.mjs +39 -0
- package/angular/index.d.ts +1 -0
- package/angular/module.d.ts +9 -0
- package/angular/package.json +30 -0
- package/index.android.d.ts +85 -0
- package/index.android.js +0 -1
- package/index.ios.d.ts +50 -0
- package/index.ios.js +8 -8
- package/package.json +6 -6
- package/platforms/android/include.gradle +1 -0
- package/platforms/android/ui_image.aar +0 -0
- package/typings/fresco.d.ts +210 -0
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,25 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [4.3.9](https://github.com/nativescript-community/ui-image/compare/v4.3.8...v4.3.9) (2023-05-31)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **android:** trying to remove build warnings ([e4686b2](https://github.com/nativescript-community/ui-image/commit/e4686b202f4c841730ea32357035d9ebb440020f))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [4.3.8](https://github.com/nativescript-community/ui-image/compare/v4.3.7...v4.3.8) (2023-05-24)
|
18
|
+
|
19
|
+
**Note:** Version bump only for package @nativescript-community/ui-image
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
6
25
|
## [4.3.7](https://github.com/nativescript-community/ui-image/compare/v4.3.6...v4.3.7) (2023-05-23)
|
7
26
|
|
8
27
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class ImgDirective {
|
3
|
+
constructor();
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImgDirective, never>;
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ImgDirective, "NSImg", never, {}, {}, never, never, false, never>;
|
6
|
+
}
|
7
|
+
export declare const NSIMG_DIRECTIVES: (typeof ImgDirective)[];
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Directive } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class ImgDirective {
|
4
|
+
constructor() { }
|
5
|
+
}
|
6
|
+
ImgDirective.ɵfac = function ImgDirective_Factory(t) { return new (t || ImgDirective)(); };
|
7
|
+
ImgDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ImgDirective, selectors: [["NSImg"]] });
|
8
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ImgDirective, [{
|
9
|
+
type: Directive,
|
10
|
+
args: [{
|
11
|
+
selector: 'NSImg'
|
12
|
+
}]
|
13
|
+
}], function () { return []; }, null); })();
|
14
|
+
export const NSIMG_DIRECTIVES = [ImgDirective];
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9pbWFnZS9hbmd1bGFyL2RpcmVjdGl2ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLMUMsTUFBTSxPQUFPLFlBQVk7SUFDckIsZ0JBQWUsQ0FBQzs7d0VBRFAsWUFBWTsrREFBWixZQUFZO3VGQUFaLFlBQVk7Y0FIeEIsU0FBUztlQUFDO2dCQUNQLFFBQVEsRUFBRSxPQUFPO2FBQ3BCOztBQUlELE1BQU0sQ0FBQyxNQUFNLGdCQUFnQixHQUFHLENBQUMsWUFBWSxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaXJlY3RpdmUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQERpcmVjdGl2ZSh7XG4gICAgc2VsZWN0b3I6ICdOU0ltZydcbn0pXG5leHBvcnQgY2xhc3MgSW1nRGlyZWN0aXZlIHtcbiAgICBjb25zdHJ1Y3RvcigpIHt9XG59XG5leHBvcnQgY29uc3QgTlNJTUdfRElSRUNUSVZFUyA9IFtJbWdEaXJlY3RpdmVdO1xuIl19
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './module';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvaW1hZ2UvYW5ndWxhci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxjQUFjLFVBQVUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIlxuZXhwb3J0ICogZnJvbSAnLi9tb2R1bGUnO1xuIl19
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { NgModule } from '@angular/core';
|
2
|
+
import { registerElement } from '@nativescript/angular';
|
3
|
+
import { ImgDirective, NSIMG_DIRECTIVES } from './directives';
|
4
|
+
import { Img } from '@nativescript-community/ui-image';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "./directives";
|
7
|
+
export { ImgDirective };
|
8
|
+
export class TNSImageModule {
|
9
|
+
}
|
10
|
+
TNSImageModule.ɵfac = function TNSImageModule_Factory(t) { return new (t || TNSImageModule)(); };
|
11
|
+
TNSImageModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TNSImageModule });
|
12
|
+
TNSImageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
13
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TNSImageModule, [{
|
14
|
+
type: NgModule,
|
15
|
+
args: [{
|
16
|
+
declarations: [NSIMG_DIRECTIVES],
|
17
|
+
exports: [NSIMG_DIRECTIVES],
|
18
|
+
}]
|
19
|
+
}], null, null); })();
|
20
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TNSImageModule, { declarations: [i1.ImgDirective], exports: [i1.ImgDirective] }); })();
|
21
|
+
registerElement('NSImg', () => Img);
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2ltYWdlL2FuZ3VsYXIvbW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRXhELE9BQU8sRUFBRSxZQUFZLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDOUQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtDQUFrQyxDQUFDOzs7QUFDdkQsT0FBTyxFQUFFLFlBQVksRUFBRSxDQUFDO0FBS3hCLE1BQU0sT0FBTyxjQUFjOzs0RUFBZCxjQUFjO2dFQUFkLGNBQWM7O3VGQUFkLGNBQWM7Y0FKMUIsUUFBUTtlQUFDO2dCQUNOLFlBQVksRUFBRSxDQUFDLGdCQUFnQixDQUFDO2dCQUNoQyxPQUFPLEVBQUUsQ0FBQyxnQkFBZ0IsQ0FBQzthQUM5Qjs7d0ZBQ1ksY0FBYztBQUUzQixlQUFlLENBQUMsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiXG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgcmVnaXN0ZXJFbGVtZW50IH0gZnJvbSAnQG5hdGl2ZXNjcmlwdC9hbmd1bGFyJztcblxuaW1wb3J0IHsgSW1nRGlyZWN0aXZlLCBOU0lNR19ESVJFQ1RJVkVTIH0gZnJvbSAnLi9kaXJlY3RpdmVzJztcbmltcG9ydCB7IEltZyB9IGZyb20gJ0BuYXRpdmVzY3JpcHQtY29tbXVuaXR5L3VpLWltYWdlJztcbmV4cG9ydCB7IEltZ0RpcmVjdGl2ZSB9O1xuQE5nTW9kdWxlKHtcbiAgICBkZWNsYXJhdGlvbnM6IFtOU0lNR19ESVJFQ1RJVkVTXSxcbiAgICBleHBvcnRzOiBbTlNJTUdfRElSRUNUSVZFU10sXG59KVxuZXhwb3J0IGNsYXNzIFROU0ltYWdlTW9kdWxlIHt9XG5cbnJlZ2lzdGVyRWxlbWVudCgnTlNJbWcnLCAoKSA9PiBJbWcpO1xuIl19
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Generated bundle index. Do not edit.
|
3
|
+
*/
|
4
|
+
export * from './index';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF0aXZlc2NyaXB0LWNvbW11bml0eS11aS1pbWFnZS1hbmd1bGFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2ltYWdlL2FuZ3VsYXIvbmF0aXZlc2NyaXB0LWNvbW11bml0eS11aS1pbWFnZS1hbmd1bGFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { Directive, NgModule } from '@angular/core';
|
3
|
+
import { registerElement } from '@nativescript/angular';
|
4
|
+
import { Img } from '@nativescript-community/ui-image';
|
5
|
+
|
6
|
+
class ImgDirective {
|
7
|
+
constructor() { }
|
8
|
+
}
|
9
|
+
ImgDirective.ɵfac = function ImgDirective_Factory(t) { return new (t || ImgDirective)(); };
|
10
|
+
ImgDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ImgDirective, selectors: [["NSImg"]] });
|
11
|
+
(function () {
|
12
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ImgDirective, [{
|
13
|
+
type: Directive,
|
14
|
+
args: [{
|
15
|
+
selector: 'NSImg'
|
16
|
+
}]
|
17
|
+
}], function () { return []; }, null);
|
18
|
+
})();
|
19
|
+
const NSIMG_DIRECTIVES = [ImgDirective];
|
20
|
+
|
21
|
+
class TNSImageModule {
|
22
|
+
}
|
23
|
+
TNSImageModule.ɵfac = function TNSImageModule_Factory(t) { return new (t || TNSImageModule)(); };
|
24
|
+
TNSImageModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TNSImageModule });
|
25
|
+
TNSImageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
26
|
+
(function () {
|
27
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TNSImageModule, [{
|
28
|
+
type: NgModule,
|
29
|
+
args: [{
|
30
|
+
declarations: [NSIMG_DIRECTIVES],
|
31
|
+
exports: [NSIMG_DIRECTIVES],
|
32
|
+
}]
|
33
|
+
}], null, null);
|
34
|
+
})();
|
35
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TNSImageModule, { declarations: [ImgDirective], exports: [ImgDirective] }); })();
|
36
|
+
registerElement('NSImg', () => Img);
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Generated bundle index. Do not edit.
|
40
|
+
*/
|
41
|
+
|
42
|
+
export { ImgDirective, TNSImageModule };
|
43
|
+
//# sourceMappingURL=nativescript-community-ui-image-angular.mjs.map
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { Directive, NgModule } from '@angular/core';
|
3
|
+
import { registerElement } from '@nativescript/angular';
|
4
|
+
import { Img } from '@nativescript-community/ui-image';
|
5
|
+
|
6
|
+
class ImgDirective {
|
7
|
+
constructor() { }
|
8
|
+
}
|
9
|
+
ImgDirective.ɵfac = function ImgDirective_Factory(t) { return new (t || ImgDirective)(); };
|
10
|
+
ImgDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ImgDirective, selectors: [["NSImg"]] });
|
11
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ImgDirective, [{
|
12
|
+
type: Directive,
|
13
|
+
args: [{
|
14
|
+
selector: 'NSImg'
|
15
|
+
}]
|
16
|
+
}], function () { return []; }, null); })();
|
17
|
+
const NSIMG_DIRECTIVES = [ImgDirective];
|
18
|
+
|
19
|
+
class TNSImageModule {
|
20
|
+
}
|
21
|
+
TNSImageModule.ɵfac = function TNSImageModule_Factory(t) { return new (t || TNSImageModule)(); };
|
22
|
+
TNSImageModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TNSImageModule });
|
23
|
+
TNSImageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
24
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TNSImageModule, [{
|
25
|
+
type: NgModule,
|
26
|
+
args: [{
|
27
|
+
declarations: [NSIMG_DIRECTIVES],
|
28
|
+
exports: [NSIMG_DIRECTIVES],
|
29
|
+
}]
|
30
|
+
}], null, null); })();
|
31
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TNSImageModule, { declarations: [ImgDirective], exports: [ImgDirective] }); })();
|
32
|
+
registerElement('NSImg', () => Img);
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Generated bundle index. Do not edit.
|
36
|
+
*/
|
37
|
+
|
38
|
+
export { ImgDirective, TNSImageModule };
|
39
|
+
//# sourceMappingURL=nativescript-community-ui-image-angular.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './module';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { ImgDirective } from './directives';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "./directives";
|
4
|
+
export { ImgDirective };
|
5
|
+
export declare class TNSImageModule {
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TNSImageModule, never>;
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TNSImageModule, [typeof i1.ImgDirective], never, [typeof i1.ImgDirective]>;
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TNSImageModule>;
|
9
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"name": "@nativescript-community/ui-image-angular",
|
3
|
+
"main": "index.js",
|
4
|
+
"module": "fesm2015/nativescript-community-ui-image-angular.mjs",
|
5
|
+
"es2020": "fesm2020/nativescript-community-ui-image-angular.mjs",
|
6
|
+
"esm2020": "esm2020/nativescript-community-ui-image-angular.mjs",
|
7
|
+
"fesm2020": "fesm2020/nativescript-community-ui-image-angular.mjs",
|
8
|
+
"fesm2015": "fesm2015/nativescript-community-ui-image-angular.mjs",
|
9
|
+
"typings": "index.d.ts",
|
10
|
+
"exports": {
|
11
|
+
"./package.json": {
|
12
|
+
"default": "./package.json"
|
13
|
+
},
|
14
|
+
".": {
|
15
|
+
"types": "./index.d.ts",
|
16
|
+
"esm2020": "./esm2020/nativescript-community-ui-image-angular.mjs",
|
17
|
+
"es2020": "./fesm2020/nativescript-community-ui-image-angular.mjs",
|
18
|
+
"es2015": "./fesm2015/nativescript-community-ui-image-angular.mjs",
|
19
|
+
"node": "./fesm2015/nativescript-community-ui-image-angular.mjs",
|
20
|
+
"default": "./fesm2020/nativescript-community-ui-image-angular.mjs"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"sideEffects": false,
|
24
|
+
"dependencies": {
|
25
|
+
"tslib": "^2.3.0"
|
26
|
+
},
|
27
|
+
"scripts": {
|
28
|
+
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.\\nPlease delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.\\n')\" && exit 1"
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
export * from './index-common';
|
2
|
+
import { AnimatedImage, EventData, ImageBase, ImageError as ImageErrorBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting } from './index-common';
|
3
|
+
export declare function initialize(config?: ImagePipelineConfigSetting): void;
|
4
|
+
export declare function getImagePipeline(): ImagePipeline;
|
5
|
+
export declare function shutDown(): void;
|
6
|
+
export declare class ImagePipeline {
|
7
|
+
private _android;
|
8
|
+
toUri(value: string | android.net.Uri): globalAndroid.net.Uri;
|
9
|
+
isInDiskCache(uri: string | android.net.Uri): boolean;
|
10
|
+
isInBitmapMemoryCache(uri: string | android.net.Uri): boolean;
|
11
|
+
evictFromMemoryCache(uri: string | android.net.Uri): void;
|
12
|
+
evictFromDiskCache(uri: string | android.net.Uri): void;
|
13
|
+
evictFromCache(uri: string | android.net.Uri): void;
|
14
|
+
clearCaches(): void;
|
15
|
+
clearMemoryCaches(): void;
|
16
|
+
clearDiskCaches(): void;
|
17
|
+
prefetchToDiskCache(uri: string): Promise<void>;
|
18
|
+
prefetchToMemoryCache(uri: string): Promise<void>;
|
19
|
+
private prefetchToCache;
|
20
|
+
get android(): any;
|
21
|
+
set android(value: any);
|
22
|
+
fetchImage(): void;
|
23
|
+
}
|
24
|
+
export declare class ImageError implements ImageErrorBase {
|
25
|
+
private _stringValue;
|
26
|
+
private _message;
|
27
|
+
private _errorType;
|
28
|
+
constructor(throwable: java.lang.Throwable);
|
29
|
+
getMessage(): string;
|
30
|
+
getErrorType(): string;
|
31
|
+
toString(): string;
|
32
|
+
}
|
33
|
+
export interface QualityInfo {
|
34
|
+
getQuality(): any;
|
35
|
+
isOfFullQuality(): any;
|
36
|
+
isOfGoodEnoughQuality(): any;
|
37
|
+
}
|
38
|
+
export declare class ImageInfo implements ImageInfoBase {
|
39
|
+
private _nativeImageInfo;
|
40
|
+
constructor(imageInfo: any);
|
41
|
+
getHeight(): number;
|
42
|
+
getWidth(): number;
|
43
|
+
getQualityInfo(): QualityInfo;
|
44
|
+
}
|
45
|
+
export declare class FinalEventData extends EventData {
|
46
|
+
private _imageInfo;
|
47
|
+
private _animatable;
|
48
|
+
get imageInfo(): ImageInfo;
|
49
|
+
set imageInfo(value: ImageInfo);
|
50
|
+
get animatable(): AnimatedImage;
|
51
|
+
set animatable(value: AnimatedImage);
|
52
|
+
get android(): AnimatedImage;
|
53
|
+
}
|
54
|
+
export declare class IntermediateEventData extends EventData {
|
55
|
+
private _imageInfo;
|
56
|
+
get imageInfo(): ImageInfo;
|
57
|
+
set imageInfo(value: ImageInfo);
|
58
|
+
}
|
59
|
+
export declare class FailureEventData extends EventData {
|
60
|
+
private _error;
|
61
|
+
get error(): ImageError;
|
62
|
+
set error(value: ImageError);
|
63
|
+
}
|
64
|
+
export declare const needRequestImage: (target: any, propertyKey: string | Symbol, descriptor: PropertyDescriptor) => void;
|
65
|
+
export declare const needUpdateHierarchy: (target: any, propertyKey: string | Symbol, descriptor: PropertyDescriptor) => void;
|
66
|
+
export declare class Img extends ImageBase {
|
67
|
+
nativeViewProtected: com.nativescript.image.DraweeView;
|
68
|
+
nativeImageViewProtected: com.nativescript.image.DraweeView;
|
69
|
+
isLoading: boolean;
|
70
|
+
_canRequestImage: boolean;
|
71
|
+
_canUpdateHierarchy: boolean;
|
72
|
+
_needUpdateHierarchy: boolean;
|
73
|
+
_needRequestImage: boolean;
|
74
|
+
onResumeNativeUpdates(): void;
|
75
|
+
createNativeView(): com.nativescript.image.DraweeView;
|
76
|
+
updateViewSize(imageInfo: any): void;
|
77
|
+
updateImageUri(): void;
|
78
|
+
private initImage;
|
79
|
+
private updateHierarchy;
|
80
|
+
private getDrawable;
|
81
|
+
private getDrawableFromLocalFile;
|
82
|
+
private getDrawableFromResource;
|
83
|
+
startAnimating(): void;
|
84
|
+
stopAnimating(): void;
|
85
|
+
}
|
package/index.android.js
CHANGED
@@ -19,7 +19,6 @@ export function initialize(config) {
|
|
19
19
|
if (useOkhttp) {
|
20
20
|
//@ts-ignore
|
21
21
|
if (useOkhttp instanceof okhttp3.OkHttpClient) {
|
22
|
-
//@ts-ignore
|
23
22
|
builder = com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory.newBuilder(context, useOkhttp);
|
24
23
|
}
|
25
24
|
else {
|
package/index.ios.d.ts
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
export * from './index-common';
|
2
|
+
import { EventData, ImageBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting } from './index-common';
|
3
|
+
export declare class ImageInfo implements ImageInfoBase {
|
4
|
+
private width;
|
5
|
+
private height;
|
6
|
+
constructor(width: number, height: number);
|
7
|
+
getHeight(): number;
|
8
|
+
getWidth(): number;
|
9
|
+
}
|
10
|
+
export interface FinalEventData extends EventData {
|
11
|
+
imageInfo: ImageInfo;
|
12
|
+
ios: UIImage;
|
13
|
+
}
|
14
|
+
export declare function initialize(config?: ImagePipelineConfigSetting): void;
|
15
|
+
export declare function shutDown(): void;
|
16
|
+
export declare class ImagePipeline {
|
17
|
+
private _ios;
|
18
|
+
constructor();
|
19
|
+
isInDiskCache(uri: string): boolean;
|
20
|
+
isInBitmapMemoryCache(uri: string): boolean;
|
21
|
+
evictFromMemoryCache(uri: string): void;
|
22
|
+
evictFromDiskCache(uri: string): void;
|
23
|
+
evictFromCache(uri: string): void;
|
24
|
+
clearCaches(): void;
|
25
|
+
clearMemoryCaches(): void;
|
26
|
+
clearDiskCaches(): void;
|
27
|
+
prefetchToDiskCache(uri: string): Promise<void>;
|
28
|
+
prefetchToMemoryCache(uri: string): Promise<void>;
|
29
|
+
private prefetchToCacheType;
|
30
|
+
get ios(): SDImageCache;
|
31
|
+
}
|
32
|
+
export declare function getImagePipeline(): ImagePipeline;
|
33
|
+
export declare class Img extends ImageBase {
|
34
|
+
nativeViewProtected: SDAnimatedImageView | UIImageView;
|
35
|
+
nativeImageViewProtected: SDAnimatedImageView | UIImageView;
|
36
|
+
isLoading: boolean;
|
37
|
+
private _imageSourceAffectsLayout;
|
38
|
+
createNativeView(): UIImageView;
|
39
|
+
_setNativeClipToBounds(): void;
|
40
|
+
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
41
|
+
updateImageUri(): void;
|
42
|
+
_setNativeImage(nativeImage: UIImage, animated?: boolean): void;
|
43
|
+
private handleImageLoaded;
|
44
|
+
private onLoadProgress;
|
45
|
+
private getUIImage;
|
46
|
+
private initImage;
|
47
|
+
placeholderImage: UIImage;
|
48
|
+
startAnimating(): void;
|
49
|
+
stopAnimating(): void;
|
50
|
+
}
|
package/index.ios.js
CHANGED
@@ -44,24 +44,24 @@ function getUIImageScaleType(scaleType) {
|
|
44
44
|
if (isString(scaleType)) {
|
45
45
|
switch (scaleType) {
|
46
46
|
case ScaleType.Center:
|
47
|
-
return UIViewContentMode.Center
|
47
|
+
return 4 /* UIViewContentMode.Center */;
|
48
48
|
case ScaleType.FocusCrop:
|
49
49
|
case ScaleType.CenterCrop:
|
50
50
|
case ScaleType.AspectFill:
|
51
|
-
return UIViewContentMode.ScaleAspectFill
|
51
|
+
return 2 /* UIViewContentMode.ScaleAspectFill */;
|
52
52
|
case ScaleType.AspectFit:
|
53
53
|
case ScaleType.CenterInside:
|
54
54
|
case ScaleType.FitCenter:
|
55
|
-
return UIViewContentMode.ScaleAspectFit
|
55
|
+
return 1 /* UIViewContentMode.ScaleAspectFit */;
|
56
56
|
case ScaleType.FitEnd:
|
57
|
-
return UIViewContentMode.Right
|
57
|
+
return 8 /* UIViewContentMode.Right */;
|
58
58
|
case ScaleType.FitStart:
|
59
|
-
return UIViewContentMode.Left
|
59
|
+
return 7 /* UIViewContentMode.Left */;
|
60
60
|
case ScaleType.Fill:
|
61
61
|
case ScaleType.FitXY:
|
62
|
-
return UIViewContentMode.ScaleToFill
|
62
|
+
return 0 /* UIViewContentMode.ScaleToFill */;
|
63
63
|
case ScaleType.None:
|
64
|
-
return UIViewContentMode.TopLeft
|
64
|
+
return 9 /* UIViewContentMode.TopLeft */;
|
65
65
|
default:
|
66
66
|
break;
|
67
67
|
}
|
@@ -207,7 +207,7 @@ export class Img extends ImageBase {
|
|
207
207
|
}
|
208
208
|
createNativeView() {
|
209
209
|
const result = this.animatedImageView ? SDAnimatedImageView.new() : UIImageView.new();
|
210
|
-
result.contentMode = UIViewContentMode.ScaleAspectFit
|
210
|
+
result.contentMode = 1 /* UIViewContentMode.ScaleAspectFit */;
|
211
211
|
result.clipsToBounds = true;
|
212
212
|
result.userInteractionEnabled = true; // needed for gestures to work
|
213
213
|
result.tintColor = null;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-image",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.9",
|
4
4
|
"description": "Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.",
|
5
5
|
"main": "./index",
|
6
6
|
"sideEffects": false,
|
@@ -8,10 +8,10 @@
|
|
8
8
|
"scripts": {
|
9
9
|
"build": "npm run tsc && npm run readme",
|
10
10
|
"build.all": "npm run build && npm run build.angular",
|
11
|
-
"build.angular": "
|
12
|
-
"readme": "
|
13
|
-
"tsc": "
|
14
|
-
"clean": "
|
11
|
+
"build.angular": "ng-packagr -p ../../src/image/angular/ng-package.json -c ../../src/image/angular/tsconfig.json",
|
12
|
+
"readme": "readme generate -c ../../tools/readme/blueprint.json",
|
13
|
+
"tsc": "cpy '**/*.d.ts' '../../packages/image' --parents --cwd=../../src/image && tsc -skipLibCheck -d",
|
14
|
+
"clean": "rimraf ./*.d.ts ./*.js ./*.js.map"
|
15
15
|
},
|
16
16
|
"nativescript": {
|
17
17
|
"platforms": {
|
@@ -44,5 +44,5 @@
|
|
44
44
|
},
|
45
45
|
"license": "Apache-2.0",
|
46
46
|
"readmeFilename": "README.md",
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "fd2c19d1e630af51c4b27e13e95b170c2afd5d9f"
|
48
48
|
}
|
@@ -9,6 +9,7 @@ dependencies {
|
|
9
9
|
implementation("com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion") {
|
10
10
|
exclude group: 'com.facebook.soloader', module: 'soloader'
|
11
11
|
}
|
12
|
+
implementation 'com.facebook.infer.annotation:infer-annotation:0.18.0'
|
12
13
|
// implementation ("com.facebook.fresco:animated-gif:$frescoVersion") {
|
13
14
|
// exclude group: 'com.facebook.soloader', module: 'soloader'
|
14
15
|
// }
|
Binary file
|
package/typings/fresco.d.ts
CHANGED
@@ -11858,3 +11858,213 @@ declare namespace com {
|
|
11858
11858
|
}
|
11859
11859
|
}
|
11860
11860
|
}
|
11861
|
+
|
11862
|
+
|
11863
|
+
declare module com {
|
11864
|
+
export module facebook {
|
11865
|
+
export module imagepipeline {
|
11866
|
+
export module backends {
|
11867
|
+
export module okhttp3 {
|
11868
|
+
export class BuildConfig extends java.lang.Object {
|
11869
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.BuildConfig>;
|
11870
|
+
public static DEBUG: boolean;
|
11871
|
+
public static LIBRARY_PACKAGE_NAME: string;
|
11872
|
+
public static BUILD_TYPE: string;
|
11873
|
+
public constructor();
|
11874
|
+
}
|
11875
|
+
}
|
11876
|
+
}
|
11877
|
+
}
|
11878
|
+
}
|
11879
|
+
}
|
11880
|
+
|
11881
|
+
declare module com {
|
11882
|
+
export module facebook {
|
11883
|
+
export module imagepipeline {
|
11884
|
+
export module backends {
|
11885
|
+
export module okhttp3 {
|
11886
|
+
export class OkHttpImagePipelineConfigFactory extends java.lang.Object {
|
11887
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory>;
|
11888
|
+
public constructor();
|
11889
|
+
public static newBuilder(param0: globalAndroid.content.Context, param1: okhttp3.OkHttpClient): com.facebook.imagepipeline.core.ImagePipelineConfig.Builder;
|
11890
|
+
}
|
11891
|
+
}
|
11892
|
+
}
|
11893
|
+
}
|
11894
|
+
}
|
11895
|
+
}
|
11896
|
+
|
11897
|
+
declare module com {
|
11898
|
+
export module facebook {
|
11899
|
+
export module imagepipeline {
|
11900
|
+
export module backends {
|
11901
|
+
export module okhttp3 {
|
11902
|
+
export class OkHttpNetworkFetcher extends com.facebook.imagepipeline.producers.BaseNetworkFetcher<com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState> {
|
11903
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher>;
|
11904
|
+
public constructor(param0: okhttp3.OkHttpClient);
|
11905
|
+
public createFetchState(param0: com.facebook.imagepipeline.producers.Consumer<com.facebook.imagepipeline.image.EncodedImage>, param1: com.facebook.imagepipeline.producers.ProducerContext): com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState;
|
11906
|
+
public constructor(param0: okhttp3.Call.Factory, param1: java.util.concurrent.Executor);
|
11907
|
+
public getExtraMap(param0: com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState, param1: number): java.util.Map<string,string>;
|
11908
|
+
public onFetchCompletion(param0: com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState, param1: number): void;
|
11909
|
+
public constructor(param0: okhttp3.Call.Factory, param1: java.util.concurrent.Executor, param2: boolean);
|
11910
|
+
public fetchWithRequest(param0: com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState, param1: com.facebook.imagepipeline.producers.NetworkFetcher.Callback, param2: okhttp3.Request): void;
|
11911
|
+
public fetch(param0: com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState, param1: com.facebook.imagepipeline.producers.NetworkFetcher.Callback): void;
|
11912
|
+
}
|
11913
|
+
export module OkHttpNetworkFetcher {
|
11914
|
+
export class OkHttpNetworkFetchState {
|
11915
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher.OkHttpNetworkFetchState>;
|
11916
|
+
public submitTime: number;
|
11917
|
+
public responseTime: number;
|
11918
|
+
public fetchCompleteTime: number;
|
11919
|
+
public constructor(param0: com.facebook.imagepipeline.producers.Consumer<com.facebook.imagepipeline.image.EncodedImage>, param1: com.facebook.imagepipeline.producers.ProducerContext);
|
11920
|
+
}
|
11921
|
+
}
|
11922
|
+
}
|
11923
|
+
}
|
11924
|
+
}
|
11925
|
+
}
|
11926
|
+
}
|
11927
|
+
|
11928
|
+
declare module com {
|
11929
|
+
export module facebook {
|
11930
|
+
export module imagepipeline {
|
11931
|
+
export module backends {
|
11932
|
+
export module okhttp3 {
|
11933
|
+
export class R extends java.lang.Object {
|
11934
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R>;
|
11935
|
+
}
|
11936
|
+
export module R {
|
11937
|
+
export class attr extends java.lang.Object {
|
11938
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.attr>;
|
11939
|
+
public static alpha: number;
|
11940
|
+
public static font: number;
|
11941
|
+
public static fontProviderAuthority: number;
|
11942
|
+
public static fontProviderCerts: number;
|
11943
|
+
public static fontProviderFetchStrategy: number;
|
11944
|
+
public static fontProviderFetchTimeout: number;
|
11945
|
+
public static fontProviderPackage: number;
|
11946
|
+
public static fontProviderQuery: number;
|
11947
|
+
public static fontStyle: number;
|
11948
|
+
public static fontVariationSettings: number;
|
11949
|
+
public static fontWeight: number;
|
11950
|
+
public static ttcIndex: number;
|
11951
|
+
}
|
11952
|
+
export class color extends java.lang.Object {
|
11953
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.color>;
|
11954
|
+
public static notification_action_color_filter: number;
|
11955
|
+
public static notification_icon_bg_color: number;
|
11956
|
+
public static ripple_material_light: number;
|
11957
|
+
public static secondary_text_default_material_light: number;
|
11958
|
+
}
|
11959
|
+
export class dimen extends java.lang.Object {
|
11960
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.dimen>;
|
11961
|
+
public static compat_button_inset_horizontal_material: number;
|
11962
|
+
public static compat_button_inset_vertical_material: number;
|
11963
|
+
public static compat_button_padding_horizontal_material: number;
|
11964
|
+
public static compat_button_padding_vertical_material: number;
|
11965
|
+
public static compat_control_corner_material: number;
|
11966
|
+
public static compat_notification_large_icon_max_height: number;
|
11967
|
+
public static compat_notification_large_icon_max_width: number;
|
11968
|
+
public static notification_action_icon_size: number;
|
11969
|
+
public static notification_action_text_size: number;
|
11970
|
+
public static notification_big_circle_margin: number;
|
11971
|
+
public static notification_content_margin_start: number;
|
11972
|
+
public static notification_large_icon_height: number;
|
11973
|
+
public static notification_large_icon_width: number;
|
11974
|
+
public static notification_main_column_padding_top: number;
|
11975
|
+
public static notification_media_narrow_margin: number;
|
11976
|
+
public static notification_right_icon_size: number;
|
11977
|
+
public static notification_right_side_padding_top: number;
|
11978
|
+
public static notification_small_icon_background_padding: number;
|
11979
|
+
public static notification_small_icon_size_as_large: number;
|
11980
|
+
public static notification_subtext_size: number;
|
11981
|
+
public static notification_top_pad: number;
|
11982
|
+
public static notification_top_pad_large_text: number;
|
11983
|
+
}
|
11984
|
+
export class drawable extends java.lang.Object {
|
11985
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.drawable>;
|
11986
|
+
public static notification_action_background: number;
|
11987
|
+
public static notification_bg: number;
|
11988
|
+
public static notification_bg_low: number;
|
11989
|
+
public static notification_bg_low_normal: number;
|
11990
|
+
public static notification_bg_low_pressed: number;
|
11991
|
+
public static notification_bg_normal: number;
|
11992
|
+
public static notification_bg_normal_pressed: number;
|
11993
|
+
public static notification_icon_background: number;
|
11994
|
+
public static notification_template_icon_bg: number;
|
11995
|
+
public static notification_template_icon_low_bg: number;
|
11996
|
+
public static notification_tile_bg: number;
|
11997
|
+
public static notify_panel_notification_icon_bg: number;
|
11998
|
+
}
|
11999
|
+
export class integer extends java.lang.Object {
|
12000
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.integer>;
|
12001
|
+
public static status_bar_notification_info_maxnum: number;
|
12002
|
+
}
|
12003
|
+
export class layout extends java.lang.Object {
|
12004
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.layout>;
|
12005
|
+
public static notification_action: number;
|
12006
|
+
public static notification_action_tombstone: number;
|
12007
|
+
public static notification_template_custom_big: number;
|
12008
|
+
public static notification_template_icon_group: number;
|
12009
|
+
public static notification_template_part_chronometer: number;
|
12010
|
+
public static notification_template_part_time: number;
|
12011
|
+
}
|
12012
|
+
export class style extends java.lang.Object {
|
12013
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.style>;
|
12014
|
+
public static TextAppearance_Compat_Notification: number;
|
12015
|
+
public static TextAppearance_Compat_Notification_Info: number;
|
12016
|
+
public static TextAppearance_Compat_Notification_Line2: number;
|
12017
|
+
public static TextAppearance_Compat_Notification_Time: number;
|
12018
|
+
public static TextAppearance_Compat_Notification_Title: number;
|
12019
|
+
public static Widget_Compat_NotificationActionContainer: number;
|
12020
|
+
public static Widget_Compat_NotificationActionText: number;
|
12021
|
+
}
|
12022
|
+
export class styleable extends java.lang.Object {
|
12023
|
+
public static class: java.lang.Class<com.facebook.imagepipeline.backends.okhttp3.R.styleable>;
|
12024
|
+
public static ColorStateListItem: androidNative.Array<number>;
|
12025
|
+
public static ColorStateListItem_alpha: number;
|
12026
|
+
public static ColorStateListItem_android_alpha: number;
|
12027
|
+
public static ColorStateListItem_android_color: number;
|
12028
|
+
public static FontFamily: androidNative.Array<number>;
|
12029
|
+
public static FontFamily_fontProviderAuthority: number;
|
12030
|
+
public static FontFamily_fontProviderCerts: number;
|
12031
|
+
public static FontFamily_fontProviderFetchStrategy: number;
|
12032
|
+
public static FontFamily_fontProviderFetchTimeout: number;
|
12033
|
+
public static FontFamily_fontProviderPackage: number;
|
12034
|
+
public static FontFamily_fontProviderQuery: number;
|
12035
|
+
public static FontFamilyFont: androidNative.Array<number>;
|
12036
|
+
public static FontFamilyFont_android_font: number;
|
12037
|
+
public static FontFamilyFont_android_fontStyle: number;
|
12038
|
+
public static FontFamilyFont_android_fontVariationSettings: number;
|
12039
|
+
public static FontFamilyFont_android_fontWeight: number;
|
12040
|
+
public static FontFamilyFont_android_ttcIndex: number;
|
12041
|
+
public static FontFamilyFont_font: number;
|
12042
|
+
public static FontFamilyFont_fontStyle: number;
|
12043
|
+
public static FontFamilyFont_fontVariationSettings: number;
|
12044
|
+
public static FontFamilyFont_fontWeight: number;
|
12045
|
+
public static FontFamilyFont_ttcIndex: number;
|
12046
|
+
public static GradientColor: androidNative.Array<number>;
|
12047
|
+
public static GradientColor_android_centerColor: number;
|
12048
|
+
public static GradientColor_android_centerX: number;
|
12049
|
+
public static GradientColor_android_centerY: number;
|
12050
|
+
public static GradientColor_android_endColor: number;
|
12051
|
+
public static GradientColor_android_endX: number;
|
12052
|
+
public static GradientColor_android_endY: number;
|
12053
|
+
public static GradientColor_android_gradientRadius: number;
|
12054
|
+
public static GradientColor_android_startColor: number;
|
12055
|
+
public static GradientColor_android_startX: number;
|
12056
|
+
public static GradientColor_android_startY: number;
|
12057
|
+
public static GradientColor_android_tileMode: number;
|
12058
|
+
public static GradientColor_android_type: number;
|
12059
|
+
public static GradientColorItem: androidNative.Array<number>;
|
12060
|
+
public static GradientColorItem_android_color: number;
|
12061
|
+
public static GradientColorItem_android_offset: number;
|
12062
|
+
public static <clinit>(): void;
|
12063
|
+
}
|
12064
|
+
}
|
12065
|
+
}
|
12066
|
+
}
|
12067
|
+
}
|
12068
|
+
}
|
12069
|
+
}
|
12070
|
+
|