@nativescript-community/ui-image 4.1.7 → 4.2.1
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 +27 -0
- package/README.md +354 -286
- package/angular/directives.d.ts +2 -2
- 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 +2 -0
- package/angular/fesm2015/nativescript-community-ui-image-angular.mjs +39 -0
- package/angular/fesm2020/nativescript-community-ui-image-angular.mjs +35 -0
- package/angular/module.d.ts +3 -3
- package/angular/package.json +22 -8
- package/blueprint.md +561 -0
- package/{image-common.d.ts → index-common.d.ts} +1 -0
- package/{image-common.js → index-common.js} +28 -7
- package/{image.android.d.ts → index.android.d.ts} +3 -2
- package/{image.android.js → index.android.js} +34 -30
- package/{image.d.ts → index.d.ts} +4 -4
- package/{image.ios.d.ts → index.ios.d.ts} +3 -2
- package/{image.ios.js → index.ios.js} +23 -19
- package/package.json +12 -4
- package/platforms/android/include.gradle +5 -6
- package/platforms/android/java/com/nativescript/image/ScalingBlurPostprocessor.java +0 -2
- package/platforms/android/ui_image.aar +0 -0
- package/platforms/ios/Podfile +1 -1
- package/vue/index.js +1 -1
- package/angular/bundles/nativescript-community-ui-image-angular.umd.js +0 -49
- package/angular/bundles/nativescript-community-ui-image-angular.umd.min.js +0 -2
- package/angular/esm2015/directives.js +0 -15
- package/angular/esm2015/index.js +0 -2
- package/angular/esm2015/module.js +0 -21
- package/angular/esm2015/nativescript-community-ui-image-angular.js +0 -2
- package/angular/fesm2015/nativescript-community-ui-image-angular.js +0 -33
- package/image-common.metadata.json +0 -1
- package/image.android.metadata.json +0 -1
- package/image.ios.metadata.json +0 -1
@@ -1,15 +1,15 @@
|
|
1
1
|
var _a, _b, _c, _d;
|
2
|
-
export * from './
|
3
|
-
import { ImageAsset, ImageSource, Trace, knownFolders, path } from '@nativescript/core';
|
2
|
+
export * from './index-common';
|
3
|
+
import { Color, Image, ImageAsset, ImageSource, Trace, Utils, knownFolders, path } from '@nativescript/core';
|
4
4
|
import { android as androidApp } from '@nativescript/core/application';
|
5
5
|
import { isString } from '@nativescript/core/utils/types';
|
6
6
|
import { RESOURCE_PREFIX, ad, isFileOrResourcePath, isFontIconURI } from '@nativescript/core/utils/utils';
|
7
|
-
import { CLog, CLogTypes, EventData, ImageBase, ScaleType } from './
|
7
|
+
import { CLog, CLogTypes, EventData, ImageBase, ScaleType } from './index-common';
|
8
8
|
let initialized = false;
|
9
9
|
let initializeConfig;
|
10
10
|
export function initialize(config) {
|
11
11
|
if (!initialized) {
|
12
|
-
const context =
|
12
|
+
const context = ad.getApplicationContext();
|
13
13
|
if (!context) {
|
14
14
|
initializeConfig = config;
|
15
15
|
return;
|
@@ -128,7 +128,7 @@ export class ImagePipeline {
|
|
128
128
|
}
|
129
129
|
datasource.subscribe(new com.nativescript.image.BaseDataSubscriber(new com.nativescript.image.BaseDataSubscriberListener({
|
130
130
|
onFailure: reject,
|
131
|
-
onNewResult: resolve
|
131
|
+
onNewResult: resolve
|
132
132
|
})), com.facebook.common.executors.CallerThreadExecutor.getInstance());
|
133
133
|
}
|
134
134
|
catch (error) {
|
@@ -251,7 +251,7 @@ export class Img extends ImageBase {
|
|
251
251
|
return view;
|
252
252
|
}
|
253
253
|
updateViewSize(imageInfo) {
|
254
|
-
const draweeView = this.
|
254
|
+
const draweeView = this.nativeImageViewProtected;
|
255
255
|
if (!draweeView) {
|
256
256
|
return;
|
257
257
|
}
|
@@ -337,9 +337,13 @@ export class Img extends ImageBase {
|
|
337
337
|
[_d = ImageBase.aspectRatioProperty.setNative]() {
|
338
338
|
this.initImage();
|
339
339
|
}
|
340
|
-
initImage() {
|
341
|
-
if (this.
|
340
|
+
async initImage() {
|
341
|
+
if (this.nativeImageViewProtected) {
|
342
342
|
const src = this.src;
|
343
|
+
if (src instanceof Promise) {
|
344
|
+
this.src = await src;
|
345
|
+
return;
|
346
|
+
}
|
343
347
|
if (src) {
|
344
348
|
let drawable;
|
345
349
|
if (src instanceof ImageSource) {
|
@@ -355,7 +359,7 @@ export class Img extends ImageBase {
|
|
355
359
|
}
|
356
360
|
}
|
357
361
|
if (drawable) {
|
358
|
-
const hierarchy = this.
|
362
|
+
const hierarchy = this.nativeImageViewProtected.getHierarchy();
|
359
363
|
hierarchy.setImage(drawable, 1, hierarchy.getFadeDuration() === 0);
|
360
364
|
return;
|
361
365
|
}
|
@@ -403,7 +407,7 @@ export class Img extends ImageBase {
|
|
403
407
|
eventName: ImageBase.finalImageSetEvent,
|
404
408
|
object: nativeView,
|
405
409
|
imageInfo: info,
|
406
|
-
animatable: animatable
|
410
|
+
animatable: animatable
|
407
411
|
};
|
408
412
|
nativeView.notify(args);
|
409
413
|
}
|
@@ -422,7 +426,7 @@ export class Img extends ImageBase {
|
|
422
426
|
const args = {
|
423
427
|
eventName: ImageBase.failureEvent,
|
424
428
|
object: nativeView,
|
425
|
-
error: imageError
|
429
|
+
error: imageError
|
426
430
|
};
|
427
431
|
that.get().notify(args);
|
428
432
|
}
|
@@ -440,7 +444,7 @@ export class Img extends ImageBase {
|
|
440
444
|
const args = {
|
441
445
|
eventName: ImageBase.intermediateImageFailedEvent,
|
442
446
|
object: nativeView,
|
443
|
-
error: imageError
|
447
|
+
error: imageError
|
444
448
|
};
|
445
449
|
that.get().notify(args);
|
446
450
|
}
|
@@ -459,7 +463,7 @@ export class Img extends ImageBase {
|
|
459
463
|
const args = {
|
460
464
|
eventName: ImageBase.intermediateImageSetEvent,
|
461
465
|
object: nativeView,
|
462
|
-
imageInfo: info
|
466
|
+
imageInfo: info
|
463
467
|
};
|
464
468
|
that.get().notify(args);
|
465
469
|
}
|
@@ -475,7 +479,7 @@ export class Img extends ImageBase {
|
|
475
479
|
if (nativeView) {
|
476
480
|
const args = {
|
477
481
|
eventName: ImageBase.releaseEvent,
|
478
|
-
object: nativeView
|
482
|
+
object: nativeView
|
479
483
|
};
|
480
484
|
that.get().notify(args);
|
481
485
|
}
|
@@ -491,20 +495,20 @@ export class Img extends ImageBase {
|
|
491
495
|
if (nativeView) {
|
492
496
|
const args = {
|
493
497
|
eventName: ImageBase.submitEvent,
|
494
|
-
object: nativeView
|
498
|
+
object: nativeView
|
495
499
|
};
|
496
500
|
that.get().notify(args);
|
497
501
|
}
|
498
502
|
else {
|
499
503
|
console.log("Warning: WeakRef<Image> was GC and no 'submitEvent' callback will be raised.");
|
500
504
|
}
|
501
|
-
}
|
505
|
+
}
|
502
506
|
});
|
503
507
|
const builder = com.facebook.drawee.backends.pipeline.Fresco.newDraweeControllerBuilder();
|
504
508
|
builder.setImageRequest(request);
|
505
509
|
builder.setCallerContext(src);
|
506
510
|
builder.setControllerListener(listener);
|
507
|
-
builder.setOldController(this.
|
511
|
+
builder.setOldController(this.nativeImageViewProtected.getController());
|
508
512
|
if (Trace.isEnabled()) {
|
509
513
|
builder.setPerfDataListener(new com.facebook.drawee.backends.pipeline.info.ImagePerfDataListener({
|
510
514
|
onImageLoadStatusUpdated(param0, param1) {
|
@@ -512,7 +516,7 @@ export class Img extends ImageBase {
|
|
512
516
|
},
|
513
517
|
onImageVisibilityUpdated(param0, param1) {
|
514
518
|
CLog(CLogTypes.info, 'onImageVisibilityUpdated', param0, param1);
|
515
|
-
}
|
519
|
+
}
|
516
520
|
}));
|
517
521
|
}
|
518
522
|
if (this.lowerResSrc) {
|
@@ -525,11 +529,11 @@ export class Img extends ImageBase {
|
|
525
529
|
builder.setTapToRetryEnabled(this.tapToRetryEnabled);
|
526
530
|
}
|
527
531
|
const controller = builder.build();
|
528
|
-
this.
|
532
|
+
this.nativeImageViewProtected.setController(controller);
|
529
533
|
}
|
530
534
|
else {
|
531
|
-
this.
|
532
|
-
this.
|
535
|
+
this.nativeImageViewProtected.setController(null);
|
536
|
+
this.nativeImageViewProtected.setImageBitmap(null);
|
533
537
|
}
|
534
538
|
}
|
535
539
|
}
|
@@ -538,7 +542,7 @@ export class Img extends ImageBase {
|
|
538
542
|
this._needUpdateHierarchy = true;
|
539
543
|
return;
|
540
544
|
}
|
541
|
-
if (this.
|
545
|
+
if (this.nativeImageViewProtected) {
|
542
546
|
let failureImageDrawable;
|
543
547
|
let placeholderImageDrawable;
|
544
548
|
let backgroundDrawable;
|
@@ -587,14 +591,14 @@ export class Img extends ImageBase {
|
|
587
591
|
builder.setCornersRadii(topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius);
|
588
592
|
}
|
589
593
|
const hierarchy = builder.build();
|
590
|
-
this.
|
594
|
+
this.nativeImageViewProtected.setHierarchy(hierarchy);
|
591
595
|
}
|
592
596
|
}
|
593
597
|
getDrawable(path) {
|
594
598
|
let drawable;
|
595
599
|
if (typeof path === 'string') {
|
596
600
|
if (isFontIconURI(path)) {
|
597
|
-
const fontIconCode =
|
601
|
+
const fontIconCode = path.split('//')[1];
|
598
602
|
if (fontIconCode !== undefined) {
|
599
603
|
const font = this.style.fontInternal;
|
600
604
|
const color = this.style.color;
|
@@ -628,8 +632,8 @@ export class Img extends ImageBase {
|
|
628
632
|
return identifier;
|
629
633
|
}
|
630
634
|
startAnimating() {
|
631
|
-
if (this.
|
632
|
-
const controller = this.
|
635
|
+
if (this.nativeImageViewProtected) {
|
636
|
+
const controller = this.nativeImageViewProtected.getController();
|
633
637
|
if (controller) {
|
634
638
|
const animatable = controller.getAnimatable();
|
635
639
|
if (animatable) {
|
@@ -639,8 +643,8 @@ export class Img extends ImageBase {
|
|
639
643
|
}
|
640
644
|
}
|
641
645
|
stopAnimating() {
|
642
|
-
if (this.
|
643
|
-
const controller = this.
|
646
|
+
if (this.nativeImageViewProtected) {
|
647
|
+
const controller = this.nativeImageViewProtected.getController();
|
644
648
|
if (controller) {
|
645
649
|
const animatable = controller.getAnimatable();
|
646
650
|
if (animatable) {
|
@@ -664,7 +668,7 @@ __decorate([
|
|
664
668
|
], Img.prototype, _d, null);
|
665
669
|
class GenericDraweeHierarchyBuilder {
|
666
670
|
constructor() {
|
667
|
-
const res =
|
671
|
+
const res = ad.getApplicationContext().getResources();
|
668
672
|
this.nativeBuilder = new com.facebook.drawee.generic.GenericDraweeHierarchyBuilder(res);
|
669
673
|
}
|
670
674
|
setPlaceholderImage(drawable, scaleType) {
|
@@ -782,4 +786,4 @@ function getScaleType(scaleType) {
|
|
782
786
|
}
|
783
787
|
return null;
|
784
788
|
}
|
785
|
-
//# sourceMappingURL=
|
789
|
+
//# sourceMappingURL=index.android.js.map
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { ImageSource, View } from '@nativescript/core';
|
2
|
-
|
1
|
+
import { ImageAsset, ImageSource, View } from '@nativescript/core';
|
3
2
|
|
4
3
|
/**
|
5
4
|
* When called, initializes the android Image library. Calling this method is required.
|
@@ -75,7 +74,7 @@ export class Img extends View {
|
|
75
74
|
/**
|
76
75
|
* String value used for the image URI.
|
77
76
|
*/
|
78
|
-
src: string | ImageSource
|
77
|
+
src: string | ImageSource | ImageAsset | Promise<string | ImageSource | ImageAsset>;
|
79
78
|
|
80
79
|
/**
|
81
80
|
* String value used for the lower res image URI.
|
@@ -429,7 +428,7 @@ export enum ScaleType {
|
|
429
428
|
/**
|
430
429
|
* Scales the child so that both dimensions will be greater than or equal to the corresponding dimension of the parent.
|
431
430
|
*/
|
432
|
-
focusCrop
|
431
|
+
focusCrop
|
433
432
|
}
|
434
433
|
|
435
434
|
/**
|
@@ -439,3 +438,4 @@ export enum ScaleType {
|
|
439
438
|
export interface ImagePipelineConfigSetting {
|
440
439
|
isDownsampleEnabled?: boolean;
|
441
440
|
}
|
441
|
+
export const ImageViewTraceCategory;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * from './
|
2
|
-
import { EventData, ImageBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting } from './
|
1
|
+
export * from './index-common';
|
2
|
+
import { EventData, ImageBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting } from './index-common';
|
3
3
|
export declare class ImageInfo implements ImageInfoBase {
|
4
4
|
private width;
|
5
5
|
private height;
|
@@ -32,6 +32,7 @@ export declare class ImagePipeline {
|
|
32
32
|
export declare function getImagePipeline(): ImagePipeline;
|
33
33
|
export declare class Img extends ImageBase {
|
34
34
|
nativeViewProtected: SDAnimatedImageView | UIImageView;
|
35
|
+
nativeImageViewProtected: SDAnimatedImageView | UIImageView;
|
35
36
|
isLoading: boolean;
|
36
37
|
private _imageSourceAffectsLayout;
|
37
38
|
createNativeView(): UIImageView;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export * from './
|
1
|
+
export * from './index-common';
|
2
2
|
import { ImageAsset, ImageSource, Screen, Trace, knownFolders, path } from '@nativescript/core';
|
3
3
|
import { isString } from '@nativescript/core/utils/types';
|
4
4
|
import { RESOURCE_PREFIX, isFileOrResourcePath, isFontIconURI, layout } from '@nativescript/core/utils/utils';
|
5
|
-
import { CLog, CLogTypes, ImageBase, ScaleType } from './
|
5
|
+
import { CLog, CLogTypes, EventData, ImageBase, ScaleType } from './index-common';
|
6
6
|
export class ImageInfo {
|
7
7
|
constructor(width, height) {
|
8
8
|
this.width = width;
|
@@ -173,13 +173,13 @@ export class Img extends ImageBase {
|
|
173
173
|
this._setNativeImage(image, animate);
|
174
174
|
}
|
175
175
|
if (!this.autoPlayAnimations) {
|
176
|
-
this.
|
176
|
+
this.nativeImageViewProtected.stopAnimating();
|
177
177
|
}
|
178
178
|
if (error) {
|
179
179
|
const args = {
|
180
180
|
eventName: Img.failureEvent,
|
181
181
|
object: this,
|
182
|
-
error
|
182
|
+
error
|
183
183
|
};
|
184
184
|
this.notify(args);
|
185
185
|
if (this.failureImageUri) {
|
@@ -192,7 +192,7 @@ export class Img extends ImageBase {
|
|
192
192
|
eventName: ImageBase.finalImageSetEvent,
|
193
193
|
object: this,
|
194
194
|
imageInfo: new ImageInfo(image.size.width, image.size.height),
|
195
|
-
ios: image
|
195
|
+
ios: image
|
196
196
|
};
|
197
197
|
this.notify(args);
|
198
198
|
}
|
@@ -218,7 +218,7 @@ export class Img extends ImageBase {
|
|
218
218
|
const widthMode = layout.getMeasureSpecMode(widthMeasureSpec);
|
219
219
|
const height = layout.getMeasureSpecSize(heightMeasureSpec);
|
220
220
|
const heightMode = layout.getMeasureSpecMode(heightMeasureSpec);
|
221
|
-
const image = this.
|
221
|
+
const image = this.nativeImageViewProtected.image;
|
222
222
|
const finiteWidth = widthMode === layout.EXACTLY;
|
223
223
|
const finiteHeight = heightMode === layout.EXACTLY;
|
224
224
|
this._imageSourceAffectsLayout = !finiteWidth || !finiteHeight;
|
@@ -257,14 +257,14 @@ export class Img extends ImageBase {
|
|
257
257
|
}
|
258
258
|
_setNativeImage(nativeImage, animated = true) {
|
259
259
|
if (animated) {
|
260
|
-
this.
|
261
|
-
this.
|
260
|
+
this.nativeImageViewProtected.alpha = 0.0;
|
261
|
+
this.nativeImageViewProtected.image = nativeImage;
|
262
262
|
UIView.animateWithDurationAnimations(this.fadeDuration / 1000, () => {
|
263
|
-
this.
|
263
|
+
this.nativeImageViewProtected.alpha = this.opacity;
|
264
264
|
});
|
265
265
|
}
|
266
266
|
else {
|
267
|
-
this.
|
267
|
+
this.nativeImageViewProtected.image = nativeImage;
|
268
268
|
}
|
269
269
|
if (this._imageSourceAffectsLayout) {
|
270
270
|
this._imageSourceAffectsLayout = false;
|
@@ -278,11 +278,11 @@ export class Img extends ImageBase {
|
|
278
278
|
let image;
|
279
279
|
if (typeof imagePath === 'string') {
|
280
280
|
if (isFontIconURI(imagePath)) {
|
281
|
-
const fontIconCode =
|
281
|
+
const fontIconCode = imagePath.split('//')[1];
|
282
282
|
if (fontIconCode !== undefined) {
|
283
283
|
const font = this.style.fontInternal;
|
284
284
|
const color = this.style.color;
|
285
|
-
image =
|
285
|
+
image = ImageSource.fromFontIconCodeSync(fontIconCode, font, color).ios;
|
286
286
|
}
|
287
287
|
}
|
288
288
|
if (!image && isFileOrResourcePath(imagePath)) {
|
@@ -297,9 +297,13 @@ export class Img extends ImageBase {
|
|
297
297
|
}
|
298
298
|
return image;
|
299
299
|
}
|
300
|
-
initImage() {
|
300
|
+
async initImage() {
|
301
301
|
if (this.nativeViewProtected) {
|
302
302
|
const src = this.src;
|
303
|
+
if (src instanceof Promise) {
|
304
|
+
this.src = await src;
|
305
|
+
return;
|
306
|
+
}
|
303
307
|
if (src) {
|
304
308
|
const animate = this.fadeDuration > 0;
|
305
309
|
if (src instanceof ImageSource) {
|
@@ -308,7 +312,7 @@ export class Img extends ImageBase {
|
|
308
312
|
}
|
309
313
|
else if (typeof src === 'string') {
|
310
314
|
if (isFontIconURI(src)) {
|
311
|
-
const fontIconCode =
|
315
|
+
const fontIconCode = src.split('//')[1];
|
312
316
|
if (fontIconCode !== undefined) {
|
313
317
|
const font = this.style.fontInternal;
|
314
318
|
const color = this.style.color;
|
@@ -357,7 +361,7 @@ export class Img extends ImageBase {
|
|
357
361
|
}
|
358
362
|
context.setValueForKey(SDImagePipelineTransformer.transformerWithTransformers(transformers), SDWebImageContextImageTransformer);
|
359
363
|
}
|
360
|
-
this.
|
364
|
+
this.nativeImageViewProtected.sd_setImageWithURLPlaceholderImageOptionsContextProgressCompleted(uri, this.placeholderImage, options, context, this.onLoadProgress, this.handleImageLoaded);
|
361
365
|
}
|
362
366
|
else if (this.placeholderImage) {
|
363
367
|
this._setNativeImage(this.placeholderImage);
|
@@ -380,13 +384,13 @@ export class Img extends ImageBase {
|
|
380
384
|
if (!this.nativeView) {
|
381
385
|
return;
|
382
386
|
}
|
383
|
-
this.
|
387
|
+
this.nativeImageViewProtected.contentMode = getUIImageScaleType(value);
|
384
388
|
}
|
385
389
|
startAnimating() {
|
386
|
-
this.
|
390
|
+
this.nativeImageViewProtected.startAnimating();
|
387
391
|
}
|
388
392
|
stopAnimating() {
|
389
|
-
this.
|
393
|
+
this.nativeImageViewProtected.stopAnimating();
|
390
394
|
}
|
391
395
|
}
|
392
|
-
//# sourceMappingURL=
|
396
|
+
//# sourceMappingURL=index.ios.js.map
|
package/package.json
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-image",
|
3
|
-
"version": "4.1
|
3
|
+
"version": "4.2.1",
|
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
|
-
"main": "./
|
5
|
+
"main": "./index",
|
6
6
|
"sideEffects": false,
|
7
|
-
"typings": "./
|
7
|
+
"typings": "./index.d.ts",
|
8
|
+
"scripts": {
|
9
|
+
"build": "npm run tsc && npm run readme",
|
10
|
+
"build.all": "npm run build && npm run build.angular",
|
11
|
+
"build.angular": "../../node_modules/.bin/ng-packagr -p ../../src/image/angular/ng-package.json -c ../../src/image/angular/tsconfig.json",
|
12
|
+
"readme": "../../node_modules/.bin/readme generate -c ../../tools/readme/blueprint.json",
|
13
|
+
"tsc": "../../node_modules/.bin/cpy '**/*.d.ts' '../../packages/image' --parents --cwd=../../src/image && ../../node_modules/.bin/tsc -skipLibCheck -d",
|
14
|
+
"clean": "../../node_modules/.bin/rimraf ./*.d.ts ./*.js ./*.js.map"
|
15
|
+
},
|
8
16
|
"nativescript": {
|
9
17
|
"platforms": {
|
10
18
|
"android": "6.0.0",
|
@@ -36,5 +44,5 @@
|
|
36
44
|
},
|
37
45
|
"license": "Apache-2.0",
|
38
46
|
"readmeFilename": "README.md",
|
39
|
-
"gitHead": "
|
47
|
+
"gitHead": "7ae707fd4b614e66d757d0f54a207f311702e826"
|
40
48
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import groovy.json.JsonSlurper
|
2
2
|
dependencies {
|
3
|
-
def frescoVersion = project.hasProperty("frescoVersion") ? project.frescoVersion : "2.
|
3
|
+
def frescoVersion = project.hasProperty("frescoVersion") ? project.frescoVersion : "2.6.0"
|
4
4
|
|
5
5
|
implementation("com.facebook.fresco:fresco:$frescoVersion") {
|
6
6
|
exclude group: 'com.facebook.soloader', module: 'soloader'
|
@@ -17,13 +17,12 @@ dependencies {
|
|
17
17
|
|
18
18
|
repositories {
|
19
19
|
mavenCentral()
|
20
|
-
def
|
21
|
-
def
|
22
|
-
def appPackageJsonFile = file("$appDir/package.json")
|
20
|
+
def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
|
21
|
+
def appPackageJsonFile = file("$USER_PROJECT_ROOT/package.json")
|
23
22
|
if (appPackageJsonFile.exists()) {
|
24
23
|
def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
|
25
|
-
if (appPackageJson.dependencies
|
26
|
-
widgetsDir = "$
|
24
|
+
if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
|
25
|
+
widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
|
27
26
|
}
|
28
27
|
}
|
29
28
|
flatDir {
|
@@ -11,7 +11,6 @@ import android.graphics.Bitmap;
|
|
11
11
|
import android.graphics.Canvas;
|
12
12
|
import android.graphics.Paint;
|
13
13
|
import android.graphics.Rect;
|
14
|
-
import com.facebook.common.internal.Preconditions;
|
15
14
|
import com.facebook.common.references.CloseableReference;
|
16
15
|
import com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory;
|
17
16
|
import com.facebook.imagepipeline.nativecode.NativeBlurFilter;
|
@@ -32,7 +31,6 @@ public class ScalingBlurPostprocessor extends BasePostprocessor {
|
|
32
31
|
private final int mScaleRatio;
|
33
32
|
|
34
33
|
public ScalingBlurPostprocessor(int iterations, int blurRadius, int scaleRatio) {
|
35
|
-
Preconditions.checkArgument(scaleRatio > 0);
|
36
34
|
|
37
35
|
mIterations = iterations;
|
38
36
|
mBlurRadius = blurRadius;
|
Binary file
|
package/platforms/ios/Podfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
pod 'SDWebImage', '>= 5.
|
1
|
+
pod 'SDWebImage', '>= 5.13.0'
|
2
2
|
pod 'SDWebImagePhotosPlugin'
|
package/vue/index.js
CHANGED
@@ -1,49 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@nativescript/angular'), require('@nativescript-community/ui-image')) :
|
3
|
-
typeof define === 'function' && define.amd ? define('@nativescript-community/ui-image-angular', ['exports', '@angular/core', '@nativescript/angular', '@nativescript-community/ui-image'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['nativescript-community'] = global['nativescript-community'] || {}, global['nativescript-community']['ui-image-angular'] = {}), global.ng.core, global['ns-angular'], global['ns-image']));
|
5
|
-
}(this, (function (exports, i0, angular, uiImage) { 'use strict';
|
6
|
-
|
7
|
-
var ImgDirective = /** @class */ (function () {
|
8
|
-
function ImgDirective() {
|
9
|
-
}
|
10
|
-
return ImgDirective;
|
11
|
-
}());
|
12
|
-
ImgDirective.ɵfac = function ImgDirective_Factory(t) { return new (t || ImgDirective)(); };
|
13
|
-
ImgDirective.ɵdir = i0.ɵɵdefineDirective({ type: ImgDirective, selectors: [["NSImg"]] });
|
14
|
-
(function () {
|
15
|
-
i0.ɵsetClassMetadata(ImgDirective, [{
|
16
|
-
type: i0.Directive,
|
17
|
-
args: [{
|
18
|
-
selector: 'NSImg'
|
19
|
-
}]
|
20
|
-
}], function () { return []; }, null);
|
21
|
-
})();
|
22
|
-
var NSIMG_DIRECTIVES = [ImgDirective];
|
23
|
-
|
24
|
-
var TNSImageModule = /** @class */ (function () {
|
25
|
-
function TNSImageModule() {
|
26
|
-
}
|
27
|
-
return TNSImageModule;
|
28
|
-
}());
|
29
|
-
TNSImageModule.ɵmod = i0.ɵɵdefineNgModule({ type: TNSImageModule });
|
30
|
-
TNSImageModule.ɵinj = i0.ɵɵdefineInjector({ factory: function TNSImageModule_Factory(t) { return new (t || TNSImageModule)(); } });
|
31
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TNSImageModule, { declarations: [ImgDirective], exports: [ImgDirective] }); })();
|
32
|
-
(function () {
|
33
|
-
i0.ɵsetClassMetadata(TNSImageModule, [{
|
34
|
-
type: i0.NgModule,
|
35
|
-
args: [{
|
36
|
-
declarations: [NSIMG_DIRECTIVES],
|
37
|
-
exports: [NSIMG_DIRECTIVES],
|
38
|
-
}]
|
39
|
-
}], null, null);
|
40
|
-
})();
|
41
|
-
angular.registerElement('NSImg', function () { return uiImage.Img; });
|
42
|
-
|
43
|
-
exports.ImgDirective = ImgDirective;
|
44
|
-
exports.TNSImageModule = TNSImageModule;
|
45
|
-
|
46
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
47
|
-
|
48
|
-
})));
|
49
|
-
//# sourceMappingURL=nativescript-community-ui-image-angular.umd.js.map
|
@@ -1,2 +0,0 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@nativescript/angular"),require("@nativescript-community/ui-image")):"function"==typeof define&&define.amd?define("@nativescript-community/ui-image-angular",["exports","@angular/core","@nativescript/angular","@nativescript-community/ui-image"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["nativescript-community"]=e["nativescript-community"]||{},e["nativescript-community"]["ui-image-angular"]={}),e.ng.core,e["ns-angular"],e["ns-image"])}(this,(function(e,t,n,i){"use strict";var r=function(){};r.ɵfac=function(e){return new(e||r)},r.ɵdir=t.ɵɵdefineDirective({type:r,selectors:[["NSImg"]]}),t.ɵsetClassMetadata(r,[{type:t.Directive,args:[{selector:"NSImg"}]}],(function(){return[]}),null);var a=[r],o=function(){};o.ɵmod=t.ɵɵdefineNgModule({type:o}),o.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||o)}}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(o,{declarations:[r],exports:[r]}),t.ɵsetClassMetadata(o,[{type:t.NgModule,args:[{declarations:[a],exports:[a]}]}],null,null),n.registerElement("NSImg",(function(){return i.Img})),e.ImgDirective=r,e.TNSImageModule=o,Object.defineProperty(e,"__esModule",{value:!0})}));
|
2
|
-
//# sourceMappingURL=nativescript-community-ui-image-angular.umd.min.js.map
|
@@ -1,15 +0,0 @@
|
|
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 = i0.ɵɵdefineDirective({ type: ImgDirective, selectors: [["NSImg"]] });
|
8
|
-
(function () { 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5qcyIsInNvdXJjZVJvb3QiOiIuLi9zcmMvIiwic291cmNlcyI6WyJkaXJlY3RpdmVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBSzFDLE1BQU0sT0FBTyxZQUFZO0lBQ3JCLGdCQUFlLENBQUM7O3dFQURQLFlBQVk7aURBQVosWUFBWTtvQ0FBWixZQUFZO2NBSHhCLFNBQVM7ZUFBQztnQkFDUCxRQUFRLEVBQUUsT0FBTzthQUNwQjs7QUFJRCxNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aXZlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBEaXJlY3RpdmUoe1xuICAgIHNlbGVjdG9yOiAnTlNJbWcnXG59KVxuZXhwb3J0IGNsYXNzIEltZ0RpcmVjdGl2ZSB7XG4gICAgY29uc3RydWN0b3IoKSB7fVxufVxuZXhwb3J0IGNvbnN0IE5TSU1HX0RJUkVDVElWRVMgPSBbSW1nRGlyZWN0aXZlXTtcbiJdfQ==
|
package/angular/esm2015/index.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './module';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiLi4vc3JjLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsY0FBYyxVQUFVLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbmV4cG9ydCAqIGZyb20gJy4vbW9kdWxlJztcbiJdfQ==
|
@@ -1,21 +0,0 @@
|
|
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.ɵmod = i0.ɵɵdefineNgModule({ type: TNSImageModule });
|
11
|
-
TNSImageModule.ɵinj = i0.ɵɵdefineInjector({ factory: function TNSImageModule_Factory(t) { return new (t || TNSImageModule)(); } });
|
12
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TNSImageModule, { declarations: [i1.ImgDirective], exports: [i1.ImgDirective] }); })();
|
13
|
-
(function () { i0.ɵsetClassMetadata(TNSImageModule, [{
|
14
|
-
type: NgModule,
|
15
|
-
args: [{
|
16
|
-
declarations: [NSIMG_DIRECTIVES],
|
17
|
-
exports: [NSIMG_DIRECTIVES],
|
18
|
-
}]
|
19
|
-
}], null, null); })();
|
20
|
-
registerElement('NSImg', () => Img);
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6Ii4uL3NyYy8iLCJzb3VyY2VzIjpbIm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUV4RCxPQUFPLEVBQUUsWUFBWSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sY0FBYyxDQUFDO0FBQzlELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQzs7O0FBQ3ZELE9BQU8sRUFBRSxZQUFZLEVBQUUsQ0FBQztBQUt4QixNQUFNLE9BQU8sY0FBYzs7a0RBQWQsY0FBYzsyR0FBZCxjQUFjO3dGQUFkLGNBQWM7b0NBQWQsY0FBYztjQUoxQixRQUFRO2VBQUM7Z0JBQ04sWUFBWSxFQUFFLENBQUMsZ0JBQWdCLENBQUM7Z0JBQ2hDLE9BQU8sRUFBRSxDQUFDLGdCQUFnQixDQUFDO2FBQzlCOztBQUdELGVBQWUsQ0FBQyxPQUFPLEVBQUUsR0FBRyxFQUFFLENBQUMsR0FBRyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vLi4vcmVmZXJlbmNlcy5kLnRzXCIgLz5cblxuaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IHJlZ2lzdGVyRWxlbWVudCB9IGZyb20gJ0BuYXRpdmVzY3JpcHQvYW5ndWxhcic7XG5cbmltcG9ydCB7IEltZ0RpcmVjdGl2ZSwgTlNJTUdfRElSRUNUSVZFUyB9IGZyb20gJy4vZGlyZWN0aXZlcyc7XG5pbXBvcnQgeyBJbWcgfSBmcm9tICdAbmF0aXZlc2NyaXB0LWNvbW11bml0eS91aS1pbWFnZSc7XG5leHBvcnQgeyBJbWdEaXJlY3RpdmUgfTtcbkBOZ01vZHVsZSh7XG4gICAgZGVjbGFyYXRpb25zOiBbTlNJTUdfRElSRUNUSVZFU10sXG4gICAgZXhwb3J0czogW05TSU1HX0RJUkVDVElWRVNdLFxufSlcbmV4cG9ydCBjbGFzcyBUTlNJbWFnZU1vZHVsZSB7fVxuXG5yZWdpc3RlckVsZW1lbnQoJ05TSW1nJywgKCkgPT4gSW1nKTtcbiJdfQ==
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './index';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF0aXZlc2NyaXB0LWNvbW11bml0eS11aS1pbWFnZS1hbmd1bGFyLmpzIiwic291cmNlUm9vdCI6Ii4uL3NyYy8iLCJzb3VyY2VzIjpbIm5hdGl2ZXNjcmlwdC1jb21tdW5pdHktdWktaW1hZ2UtYW5ndWxhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { ɵɵdefineDirective, ɵsetClassMetadata, Directive, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
|
2
|
-
import { registerElement } from '@nativescript/angular';
|
3
|
-
import { Img } from '@nativescript-community/ui-image';
|
4
|
-
|
5
|
-
class ImgDirective {
|
6
|
-
constructor() { }
|
7
|
-
}
|
8
|
-
ImgDirective.ɵfac = function ImgDirective_Factory(t) { return new (t || ImgDirective)(); };
|
9
|
-
ImgDirective.ɵdir = ɵɵdefineDirective({ type: ImgDirective, selectors: [["NSImg"]] });
|
10
|
-
(function () { ɵsetClassMetadata(ImgDirective, [{
|
11
|
-
type: Directive,
|
12
|
-
args: [{
|
13
|
-
selector: 'NSImg'
|
14
|
-
}]
|
15
|
-
}], function () { return []; }, null); })();
|
16
|
-
const NSIMG_DIRECTIVES = [ImgDirective];
|
17
|
-
|
18
|
-
class TNSImageModule {
|
19
|
-
}
|
20
|
-
TNSImageModule.ɵmod = ɵɵdefineNgModule({ type: TNSImageModule });
|
21
|
-
TNSImageModule.ɵinj = ɵɵdefineInjector({ factory: function TNSImageModule_Factory(t) { return new (t || TNSImageModule)(); } });
|
22
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(TNSImageModule, { declarations: [ImgDirective], exports: [ImgDirective] }); })();
|
23
|
-
(function () { ɵsetClassMetadata(TNSImageModule, [{
|
24
|
-
type: NgModule,
|
25
|
-
args: [{
|
26
|
-
declarations: [NSIMG_DIRECTIVES],
|
27
|
-
exports: [NSIMG_DIRECTIVES],
|
28
|
-
}]
|
29
|
-
}], null, null); })();
|
30
|
-
registerElement('NSImg', () => Img);
|
31
|
-
|
32
|
-
export { ImgDirective, TNSImageModule };
|
33
|
-
//# sourceMappingURL=nativescript-community-ui-image-angular.js.map
|