Socket
Socket
Sign inDemoInstall

@paperbits/core

Package Overview
Dependencies
Maintainers
2
Versions
620
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paperbits/core - npm Package Compare versions

Comparing version 0.1.49 to 0.1.50

4

card/cardModel.ts

@@ -9,3 +9,3 @@ import { WidgetModel } from "@paperbits/common/widgets";

public overflowY: string;
public styles: Object;
public styles: any;

@@ -15,4 +15,4 @@ constructor() {

this.alignment = {};
this.styles = {};
this.styles = { appearance: "components/card/default" };
}
}

@@ -24,2 +24,4 @@ import * as ko from "knockout";

public readonly typography: KnockoutObservable<TypographyContract>;
public readonly appearanceStyles: KnockoutObservableArray<any>;
public readonly appearanceStyle: KnockoutObservable<any>;

@@ -42,4 +44,5 @@ constructor(

this.applyChanges = this.applyChanges.bind(this);
this.alignment = ko.observable<string>();
this.alignment.subscribe(this.applyChanges.bind(this));

@@ -50,6 +53,8 @@ this.verticalAlignment = ko.observable<string>();

this.scrollOnOverlow = ko.observable<boolean>();
this.scrollOnOverlow.subscribe(this.applyChanges.bind(this));
this.background = ko.observable<BackgroundContract>();
this.typography = ko.observable<TypographyContract>();
this.appearanceStyles = ko.observableArray<any>();
this.appearanceStyle = ko.observable<any>();
}

@@ -97,2 +102,4 @@

this.model.styles.appearance = this.appearanceStyle();
this.onChange(this.model);

@@ -138,2 +145,3 @@ }

public async initialize(): Promise<void> {
const viewport = this.viewManager.getViewport();

@@ -150,11 +158,21 @@

const variations = await this.styleService.getComponentVariations("card");
this.appearanceStyles(variations.filter(x => x.category === "appearance"));
if (this.model.styles && this.model.styles["instance"]) {
const styles = await this.styleService.getStyleByKey(this.model.styles["instance"]);
if (this.model.styles) {
if (this.model.styles["instance"]) {
const styles = await this.styleService.getStyleByKey(this.model.styles["instance"]);
if (styles) {
this.background(styles.background);
this.typography(styles.typography);
if (styles) {
this.background(styles.background);
this.typography(styles.typography);
}
}
this.appearanceStyle(this.model.styles.appearance);
}
this.alignment.subscribe(this.applyChanges);
this.scrollOnOverlow.subscribe(this.applyChanges);
this.appearanceStyle.subscribe(this.applyChanges);
}

@@ -240,3 +258,3 @@

instanceKey = `instances/card-${Utils.identifier()}`;
this.model.styles = { instance: instanceKey };
this.model.styles.instance = instanceKey;
}

@@ -256,3 +274,3 @@

instanceKey = `instances/card-${Utils.identifier()}`;
this.model.styles = { instance: instanceKey };
this.model.styles.instance = instanceKey;
}

@@ -259,0 +277,0 @@

{
"name": "@paperbits/core",
"version": "0.1.49",
"version": "0.1.50",
"description": "Paperbits core components.",

@@ -23,4 +23,4 @@ "author": "Paperbits",

"dependencies": {
"@paperbits/common": "0.1.49",
"@paperbits/styles": "0.1.49",
"@paperbits/common": "0.1.50",
"@paperbits/styles": "0.1.50",
"cropperjs": "^1.4.0",

@@ -27,0 +27,0 @@ "file-saver": "^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