Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nativescript-slides

Package Overview
Dependencies
Maintainers
4
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-slides - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

5

nativescript-slides.d.ts

@@ -27,8 +27,3 @@ import { AbsoluteLayout } from 'ui/layouts/absolute-layout';

private _pageIndicators;
private _pageIndicatorsColor;
private _pageIndicatorsActiveImage;
private indicatorImage;
pageIndicators: boolean;
pageIndicatorsColor: string;
pageIndicatorsActiveImage: string;
hasNext: boolean;

@@ -35,0 +30,0 @@ hasPrevious: boolean;

53

nativescript-slides.js

@@ -17,3 +17,2 @@ "use strict";

var color_1 = require('color');
var imageSource = require('image-source');
var LayoutParams;

@@ -58,23 +57,2 @@ if (app.android) {

});
Object.defineProperty(SlideContainer.prototype, "pageIndicatorsColor", {
get: function () {
return this._pageIndicatorsColor.hex;
},
set: function (value) {
this._pageIndicatorsColor = new color_1.Color(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideContainer.prototype, "pageIndicatorsActiveImage", {
get: function () {
return this._pageIndicatorsActiveImage;
},
set: function (value) {
this.indicatorImage.imageSource = imageSource.fromFile(value);
this._pageIndicatorsActiveImage = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideContainer.prototype, "hasNext", {

@@ -201,7 +179,2 @@ get: function () {

}
else {
if (this._pageIndicatorsColor == null) {
this._pageIndicatorsColor = new color_1.Color('#fff');
}
}
};

@@ -235,7 +208,4 @@ SlideContainer.prototype.constructView = function (constructor) {

});
if (_this.pageIndicators) {
_this._footer = _this.buildFooter(slides_1.length, 0);
_this.addChild(_this._footer);
_this.setActivePageIndicator(0);
}
_this._footer = _this.buildFooter(slides_1.length, 0);
_this.insertChild(_this._footer, _this.getChildrenCount());
_this.currentPanel = _this.buildSlideMap(slides_1);

@@ -478,3 +448,3 @@ _this.currentPanel.panel.translateX = -_this.pageWidth;

var topOffset = Platform.screen.mainScreen.heightDIPs - 105;
footerInnerWrap.height = 20;
footerInnerWrap.height = 50;
this.setwidthPercent(footerInnerWrap, 100);

@@ -491,2 +461,5 @@ absolute_layout_1.AbsoluteLayout.setLeft(footerInnerWrap, 0);

}
var activeIndicator = footerInnerWrap.getChildAt(0);
activeIndicator.className = 'slide-indicator-active';
activeIndicator.opacity = 0.9;
return footerInnerWrap;

@@ -520,3 +493,2 @@ };

slideMap[0].left = slideMap[slideMap.length - 1];
slideMap[slideMap.length - 1].right = slideMap[0];
}

@@ -529,2 +501,3 @@ this.startSlideshow();

indicator.backgroundColor = new color_1.Color('#fff');
indicator.opacity = 0.4;
indicator.width = 10;

@@ -534,2 +507,3 @@ indicator.height = 10;

indicator.marginRight = 2.5;
indicator.marginTop = 0;
indicator.borderRadius = 5;

@@ -539,11 +513,6 @@ return indicator;

SlideContainer.prototype.setActivePageIndicator = function (index) {
var _this = this;
this._footer.eachLayoutChild(function (view) {
if (view instanceof label_1.Label) {
view.opacity = 0.4;
if (_this._pageIndicatorsActiveImage != null) {
view.backgroundColor = new color_1.Color('#fff');
view.className = 'slide-indicator-inactive';
view.backgroundImage = null;
}
view.className = 'slide-indicator-inactive';
}

@@ -554,6 +523,2 @@ });

activeIndicator.opacity = 0.9;
if (this._pageIndicatorsActiveImage != null) {
activeIndicator.backgroundColor = null;
activeIndicator.backgroundImage = this.pageIndicatorsActiveImage;
}
};

@@ -560,0 +525,0 @@ return SlideContainer;

57

nativescript-slides.ts

@@ -52,5 +52,3 @@ import * as app from 'application';

private _pageIndicators: boolean;
private _pageIndicatorsColor: Color;
private _pageIndicatorsActiveImage: string;
private indicatorImage: Image;
/* page indicator stuff*/

@@ -64,19 +62,2 @@ get pageIndicators(): boolean {

set pageIndicatorsColor(value: string) {
this._pageIndicatorsColor = new Color(value);
}
get pageIndicatorsColor() {
return this._pageIndicatorsColor.hex
}
get pageIndicatorsActiveImage(): string {
return this._pageIndicatorsActiveImage;
}
set pageIndicatorsActiveImage(value: string) {
this.indicatorImage.imageSource = imageSource.fromFile(value);
this._pageIndicatorsActiveImage = value;
}
get hasNext(): boolean {

@@ -182,6 +163,2 @@ return !!this.currentPanel.right;

this._pageIndicators = false;
} else {
if (this._pageIndicatorsColor == null) {
this._pageIndicatorsColor = new Color('#fff')
}
}

@@ -225,7 +202,7 @@ }

if (this.pageIndicators) {
this._footer = this.buildFooter(slides.length, 0);
this.addChild(this._footer);
this.setActivePageIndicator(0);
}
//if (this.pageIndicators) {
this._footer = this.buildFooter(slides.length, 0);
this.insertChild(this._footer, this.getChildrenCount());
// this.setActivePageIndicator(0);
//}

@@ -489,3 +466,3 @@

const topOffset = Platform.screen.mainScreen.heightDIPs - 105;
footerInnerWrap.height = 20;
footerInnerWrap.height = 50;

@@ -505,2 +482,6 @@ this.setwidthPercent(footerInnerWrap, 100);

}
let activeIndicator = footerInnerWrap.getChildAt(0);
activeIndicator.className = 'slide-indicator-active';
activeIndicator.opacity = 0.9;
return footerInnerWrap;

@@ -538,3 +519,2 @@ }

slideMap[0].left = slideMap[slideMap.length - 1];
slideMap[slideMap.length - 1].right = slideMap[0];
}

@@ -548,2 +528,3 @@ this.startSlideshow();

indicator.backgroundColor = new Color('#fff');
indicator.opacity = 0.4;
indicator.width = 10;

@@ -553,2 +534,3 @@ indicator.height = 10;

indicator.marginRight = 2.5;
indicator.marginTop = 0;
indicator.borderRadius = 5;

@@ -563,7 +545,3 @@ return indicator;

view.opacity = 0.4;
if (this._pageIndicatorsActiveImage != null) {
view.backgroundColor = new Color('#fff');
view.className = 'slide-indicator-inactive';
view.backgroundImage = null;
}
view.className = 'slide-indicator-inactive';
}

@@ -574,7 +552,4 @@ });

activeIndicator.opacity = 0.9;
if (this._pageIndicatorsActiveImage != null) {
activeIndicator.backgroundColor = null;
activeIndicator.backgroundImage = this.pageIndicatorsActiveImage;
}
}
}
}
{
"name": "nativescript-slides",
"version": "1.4.0",
"description": "NativeScript Slides plugin.",
"main": "nativescript-slides.js",
"nativescript": {
"platforms": {
"android": "2.0.0",
"ios": "2.0.0"
}
},
"scripts": {
"build": "tsc",
"demo.ios": "npm run preparedemo && cd demo && tns emulate ios",
"demo.android": "npm run preparedemo && cd demo && tns run android",
"preparedemo": "npm run build && cd demo && tns plugin remove nativescript-slides && tns plugin add .. && tns install",
"setup": "npm install && cd demo && npm install && cd .. && npm run build && cd demo && tns plugin add .. && cd ..",
"livesync.ios": "cd demo && tns livesync ios --watch",
"livesync.android": "cd demo && tns livesync android --watch",
"ios": "xcproj --project platforms/ios/YourApp.xcodeproj touch; xcproj --project platforms/ios/Pods/Pods.xcodeproj touch; tns livesync ios --emulator --watch"
},
"repository": {
"type": "git",
"url": "https://github.com/TheOriginalJosh/nativescript-slides.git"
},
"keywords": [
"NativeScript",
"JavaScript",
"Android",
"iOS",
"TypeScript",
"swipe slides",
"Slides",
"Carousel"
],
"author": {
"name": "Josh Sommer",
"email": "joshdsommer@gmail.com"
},
"contributors": [
{
"name": "Brad Martin",
"email": "bradwaynemartin@gmail.com",
"url": "https://github.com/bradmartin"
},
{
"name": "Obsessive Inc/Abhijith Reddy",
"email": "mabhijith95a10@gmail.com",
"url": "https://github.com/Obsessive"
},
{
"name": "Victor Nascimento",
"email": "victormota15@gmail.com",
"url": "https://github.com/vjoao"
}
],
"bugs": {
"url": "https://github.com/TheOriginalJosh/nativescript-slides/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/TheOriginalJosh/nativescript-slides/blob/master/LICENSE"
},
"homepage": "https://github.com/TheOriginalJosh/nativescript-slides",
"readmeFilename": "README.md",
"devDependencies": {
"typescript": "^1.8.7"
},
"dependencies": {
"tns-platform-declarations": "^2.0.0"
}
}
"name": "nativescript-slides",
"version": "1.4.1",
"description": "NativeScript Slides plugin.",
"main": "nativescript-slides.js",
"nativescript": {
"platforms": {
"android": "2.0.0",
"ios": "2.0.0"
},
"tns-ios": {
"version": "2.0.0"
}
},
"scripts": {
"build": "tsc",
"demo.ios": "npm run preparedemo && cd demo && tns emulate ios",
"demo.android": "npm run preparedemo && cd demo && tns run android",
"preparedemo": "npm run build && cd demo && tns plugin remove nativescript-slides && tns plugin add .. && tns install",
"setup": "npm install && cd demo && npm install && cd .. && npm run build && cd demo && tns plugin add .. && cd ..",
"livesync.ios": "cd demo && tns livesync ios --watch",
"livesync.android": "cd demo && tns livesync android --watch",
"ios": "xcproj --project platforms/ios/YourApp.xcodeproj touch; xcproj --project platforms/ios/Pods/Pods.xcodeproj touch; tns livesync ios --emulator --watch"
},
"repository": {
"type": "git",
"url": "https://github.com/TheOriginalJosh/nativescript-slides.git"
},
"keywords": [
"NativeScript",
"JavaScript",
"Android",
"iOS",
"TypeScript",
"swipe slides",
"Slides",
"Carousel"
],
"author": {
"name": "Josh Sommer",
"email": "joshdsommer@gmail.com"
},
"contributors": [
{
"name": "Brad Martin",
"email": "bradwaynemartin@gmail.com",
"url": "https://github.com/bradmartin"
},
{
"name": "Obsessive Inc/Abhijith Reddy",
"email": "mabhijith95a10@gmail.com",
"url": "https://github.com/Obsessive"
},
{
"name": "Victor Nascimento",
"email": "victormota15@gmail.com",
"url": "https://github.com/vjoao"
}
],
"bugs": {
"url": "https://github.com/TheOriginalJosh/nativescript-slides/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/TheOriginalJosh/nativescript-slides/blob/master/LICENSE"
},
"homepage": "https://github.com/TheOriginalJosh/nativescript-slides",
"readmeFilename": "README.md",
"devDependencies": {
"typescript": "^1.8.7"
},
"dependencies": {
"tns-platform-declarations": "^2.0.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc