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.37 to 0.1.38

6

ko/validation/validators.ts

@@ -60,8 +60,8 @@

async: true,
validator: async (uriTemplate, layoutKey, callback) => {
if (!uriTemplate) {
validator: async (permalinkTemplate, layoutKey, callback) => {
if (!permalinkTemplate) {
return;
}
const layout = await this.layoutService.getLayoutByUriTemplate(uriTemplate);
const layout = await this.layoutService.getLayoutByUriTemplate(permalinkTemplate);
const conflict = layout && layout.key !== layoutKey;

@@ -68,0 +68,0 @@

@@ -13,3 +13,3 @@ import * as ko from "knockout";

public description: KnockoutObservable<string>;
public uriTemplate: KnockoutObservable<string>;
public permalinkTemplate: KnockoutObservable<string>;
public widgets: KnockoutObservableArray<Object>;

@@ -21,4 +21,4 @@

this.description = ko.observable<string>();
this.uriTemplate = ko.observable<string>();
this.permalinkTemplate = ko.observable<string>();
}
}

@@ -93,3 +93,3 @@ import { LayoutViewModel } from "./layoutViewModel";

viewModel.uriTemplate(model.uriTemplate);
viewModel.permalinkTemplate(model.permalinkTemplate);
viewModel.widgets(sectionViewModels);

@@ -96,0 +96,0 @@

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

public description: string;
public uriTemplate: string;
public permalinkTemplate: string;
public widgets: WidgetModel[];

@@ -10,0 +10,0 @@

@@ -35,3 +35,3 @@ import { IRouteHandler } from "@paperbits/common/routing";

layoutModel.description = layoutContract.description;
layoutModel.uriTemplate = layoutContract.uriTemplate;
layoutModel.permalinkTemplate = layoutContract.permalinkTemplate;

@@ -55,3 +55,3 @@ const layoutContent = await this.layoutService.getLayoutContent(layoutContract.key);

description: layoutModel.description,
uriTemplate: layoutModel.uriTemplate,
permalinkTemplate: layoutModel.permalinkTemplate,
object: "block",

@@ -58,0 +58,0 @@ type: "layout",

{
"name": "@paperbits/core",
"version": "0.1.37",
"version": "0.1.38",
"description": "Paperbits core components.",

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

"dependencies": {
"@paperbits/common": "0.1.37",
"@paperbits/styles": "0.1.37",
"@paperbits/common": "0.1.38",
"@paperbits/styles": "0.1.38",
"cropperjs": "^1.4.0",

@@ -27,0 +27,0 @@ "file-saver": "^2.0.0",

@@ -10,3 +10,3 @@ import * as ko from "knockout";

import { Component, OnDestroyed } from "@paperbits/common/ko/decorators";
import { FontContract } from "@paperbits/styles/contracts";
import { FontContract, ColorContract } from "@paperbits/styles/contracts";
import { IViewManager } from "@paperbits/common/ui";

@@ -23,5 +23,6 @@

public underlined: KnockoutObservable<boolean>;
public highlighted: KnockoutObservable<boolean>;
public pre: KnockoutObservable<boolean>;
public style: KnockoutObservable<string>;
public styled: KnockoutObservable<boolean>;
public colored: KnockoutObservable<string>;
public alignment: KnockoutObservable<string>;

@@ -48,5 +49,6 @@ public justified: KnockoutObservable<boolean>;

this.onFontSelected = this.onFontSelected.bind(this);
this.onColorSelected = this.onColorSelected.bind(this);
this.style = ko.observable<string>();
this.styled = ko.observable<boolean>();
this.colored = ko.observable<string>();
this.font = ko.observable<string>();

@@ -59,2 +61,3 @@ this.sized = ko.observable<boolean>();

this.underlined = ko.observable<boolean>();
this.highlighted = ko.observable<boolean>();
this.ul = ko.observable<boolean>();

@@ -75,2 +78,3 @@ this.ol = ko.observable<boolean>();

this.underlined(selectionState.underlined);
this.highlighted(selectionState.highlighted);
this.ul(selectionState.bulletedList);

@@ -156,2 +160,7 @@ this.ol(selectionState.orderedList);

public toggleHighlighted(): void {
this.htmlEditorProvider.getCurrentHtmlEditor().toggleHighlighted();
this.updateFormattingState();
}
public toggleSize(): void {

@@ -294,2 +303,13 @@ this.htmlEditorProvider.getCurrentHtmlEditor().toggleSize();

public onColorSelected(color: ColorContract): void {
if (color) {
this.htmlEditorProvider.getCurrentHtmlEditor().setColor(color.key);
}
else {
this.htmlEditorProvider.getCurrentHtmlEditor().removeColor();
}
this.updateFormattingState();
}
public dispose(): void {

@@ -296,0 +316,0 @@ this.eventManager.removeEventListener(HtmlEditorEvents.onSelectionChange, this.updateFormattingState);

@@ -41,3 +41,3 @@ import * as ko from "knockout";

this.layoutItem.uriTemplate
this.layoutItem.permalinkTemplate
.extend({ uniqueLayoutUri: this.layoutItem.key })

@@ -50,3 +50,3 @@ .subscribe(this.updateLayout);

this.isDefaultLayout = ko.pureComputed(() => {
return this.layoutItem.uriTemplate() === "/";
return this.layoutItem.permalinkTemplate() === "/";
});

@@ -58,3 +58,3 @@

const uri = this.layoutItem.uriTemplate();
const uri = this.layoutItem.permalinkTemplate();

@@ -61,0 +61,0 @@ this.routeHandler.navigateTo(uri, { usePagePlaceholder: true });

@@ -10,3 +10,3 @@ import * as ko from "knockout";

public description: KnockoutObservable<string>;
public uriTemplate: KnockoutObservable<string>;
public permalinkTemplate: KnockoutObservable<string>;
public hasFocus: KnockoutObservable<boolean>;

@@ -20,3 +20,3 @@

this.description = ko.observable<string>(layout.description);
this.uriTemplate = ko.observable<string>(layout.uriTemplate);
this.permalinkTemplate = ko.observable<string>(layout.permalinkTemplate);
this.hasFocus = ko.observable<boolean>(false);

@@ -30,3 +30,3 @@ }

description: this.description(),
uriTemplate: this.uriTemplate(),
permalinkTemplate: this.permalinkTemplate(),
contentKey: this.contentKey

@@ -33,0 +33,0 @@ };

Sorry, the diff of this file is not supported yet

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