Socket
Socket
Sign inDemoInstall

@contentful/field-editor-shared

Package Overview
Dependencies
Maintainers
176
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/field-editor-shared - npm Package Compare versions

Comparing version 1.4.4 to 1.4.5

4

dist/cjs/CharCounter.js

@@ -40,3 +40,5 @@ "use strict";

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -43,0 +45,0 @@ for(var key in obj){

@@ -33,3 +33,5 @@ "use strict";

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -53,3 +55,3 @@ for(var key in obj){

function CharValidation(props) {
const { constraints } = props;
const { constraints } = props;
if (constraints.type === 'max') {

@@ -56,0 +58,0 @@ return _react.createElement("span", null, "Maximum ", constraints.max, " characters");

@@ -53,3 +53,5 @@ "use strict";

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -75,3 +77,3 @@ for(var key in obj){

componentDidMount() {
const { field } = this.props;
const { field } = this.props;
this.unsubscribeErrors = field.onSchemaErrorsChanged((errors)=>{

@@ -78,0 +80,0 @@ this.setState({

@@ -36,3 +36,5 @@ "use strict";

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -39,0 +41,0 @@ for(var key in obj){

@@ -18,5 +18,17 @@ "use strict";

},
Asset: function() {
return _typesEntity.Asset;
},
BaseAppSDK: function() {
return _appsdk.BaseAppSDK;
},
CharCounter: function() {
return _CharCounter.CharCounter;
},
CharValidation: function() {
return _CharValidation.CharValidation;
},
ConstraintsUtils: function() {
return _constraints;
},
ContentType: function() {

@@ -28,2 +40,5 @@ return _appsdk.ContentType;

},
Entry: function() {
return _typesEntity.Entry;
},
EntryAPI: function() {

@@ -41,2 +56,8 @@ return _appsdk.EntryAPI;

},
FieldConnector: function() {
return _FieldConnector.FieldConnector;
},
File: function() {
return _typesEntity.File;
},
IdsAPI: function() {

@@ -51,2 +72,5 @@ return _appsdk.IdsAPI;

},
ModalDialogLauncher: function() {
return _ModalDialogLauncher;
},
NavigatorAPI: function() {

@@ -64,2 +88,5 @@ return _appsdk.NavigatorAPI;

},
PredefinedValuesError: function() {
return _PredefinedValuesError.PredefinedValuesError;
},
SpaceAPI: function() {

@@ -71,23 +98,5 @@ return _appsdk.SpaceAPI;

},
CharCounter: function() {
return _CharCounter.CharCounter;
entityHelpers: function() {
return _entityHelpers;
},
CharValidation: function() {
return _CharValidation.CharValidation;
},
FieldConnector: function() {
return _FieldConnector.FieldConnector;
},
PredefinedValuesError: function() {
return _PredefinedValuesError.PredefinedValuesError;
},
Asset: function() {
return _typesEntity.Asset;
},
Entry: function() {
return _typesEntity.Entry;
},
File: function() {
return _typesEntity.File;
},
isValidImage: function() {

@@ -101,11 +110,2 @@ return _isValidImage.isValidImage;

return _shortenStorageUnit.toLocaleString;
},
ModalDialogLauncher: function() {
return _ModalDialogLauncher;
},
entityHelpers: function() {
return _entityHelpers;
},
ConstraintsUtils: function() {
return _constraints;
}

@@ -145,3 +145,5 @@ });

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -148,0 +150,0 @@ for(var key in obj){

@@ -12,2 +12,5 @@ "use strict";

_export(exports, {
default: function() {
return _default;
},
open: function() {

@@ -18,5 +21,2 @@ return open;

return openDialog;
},
default: function() {
return _default;
}

@@ -54,3 +54,5 @@ });

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -88,3 +90,3 @@ for(var key in obj){

};
function render({ onClose , isShown }) {
function render({ onClose, isShown }) {
_reactdom.default.render(componentRenderer({

@@ -110,3 +112,3 @@ onClose,

const size = (0, _isNumber.default)(options.width) ? `${options.width}px` : options.width;
return open(({ isShown , onClose })=>{
return open(({ isShown, onClose })=>{
const onCloseHandler = ()=>onClose();

@@ -113,0 +115,0 @@ return _react.createElement(_f36components.Modal, {

@@ -34,3 +34,5 @@ "use strict";

}
var newObj = {};
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

@@ -37,0 +39,0 @@ for(var key in obj){

@@ -12,2 +12,5 @@ "use strict";

_export(exports, {
Asset: function() {
return _appsdk.Asset;
},
BaseAppSDK: function() {

@@ -22,12 +25,9 @@ return _appsdk.BaseAppSDK;

},
Link: function() {
return _appsdk.Link;
},
Entry: function() {
return _appsdk.Entry;
},
Asset: function() {
return _appsdk.Asset;
Link: function() {
return _appsdk.Link;
}
});
const _appsdk = require("@contentful/app-sdk");

@@ -12,22 +12,10 @@ "use strict";

_export(exports, {
getFieldValue: function() {
return getFieldValue;
},
getAssetTitle: function() {
return getAssetTitle;
},
isAssetField: function() {
return isAssetField;
},
isDisplayField: function() {
return isDisplayField;
},
isDescriptionField: function() {
return isDescriptionField;
},
getEntityDescription: function() {
return getEntityDescription;
},
getEntryTitle: function() {
return getEntryTitle;
getEntryImage: function() {
return getEntryImage;
},

@@ -37,4 +25,16 @@ getEntryStatus: function() {

},
getEntryImage: function() {
return getEntryImage;
getEntryTitle: function() {
return getEntryTitle;
},
getFieldValue: function() {
return getFieldValue;
},
isAssetField: function() {
return isAssetField;
},
isDescriptionField: function() {
return isDescriptionField;
},
isDisplayField: function() {
return isDisplayField;
}

@@ -62,3 +62,3 @@ });

}
function getFieldValue({ entity , fieldId , localeCode , defaultLocaleCode }) {
function getFieldValue({ entity, fieldId, localeCode, defaultLocaleCode }) {
const values = (0, _get.default)(entity, [

@@ -74,3 +74,3 @@ 'fields',

}
function getAssetTitle({ asset , localeCode , defaultLocaleCode , defaultTitle }) {
function getAssetTitle({ asset, localeCode, defaultLocaleCode, defaultTitle }) {
const title = getFieldValue({

@@ -89,6 +89,6 @@ entity: {

const isAssetField = (field)=>field.type === 'Link' && field.linkType === 'Asset';
function isDisplayField({ field , contentType }) {
function isDisplayField({ field, contentType }) {
return field.id === contentType.displayField;
}
function isDescriptionField({ field , contentType }) {
function isDescriptionField({ field, contentType }) {
const isTextField = (field)=>[

@@ -104,3 +104,3 @@ 'Symbol',

}
function getEntityDescription({ entity , contentType , localeCode , defaultLocaleCode }) {
function getEntityDescription({ entity, contentType, localeCode, defaultLocaleCode }) {
if (!contentType) {

@@ -123,3 +123,3 @@ return '';

}
function getEntryTitle({ entry , contentType , localeCode , defaultLocaleCode , defaultTitle }) {
function getEntryTitle({ entry, contentType, localeCode, defaultLocaleCode, defaultTitle }) {
let title;

@@ -188,3 +188,3 @@ if (!contentType) {

}
const getEntryImage = async ({ entry , contentType , localeCode }, getAsset)=>{
const getEntryImage = async ({ entry, contentType, localeCode }, getAsset)=>{
if (!contentType) {

@@ -191,0 +191,0 @@ return null;

@@ -12,7 +12,7 @@ "use strict";

_export(exports, {
shortenStorageUnit: function() {
return shortenStorageUnit;
},
toLocaleString: function() {
return toLocaleString;
},
shortenStorageUnit: function() {
return shortenStorageUnit;
}

@@ -54,4 +54,4 @@ });

};
const { number , unit } = reduce(value, uom);
const { number, unit } = reduce(value, uom);
return `${formatFloat(number, false)} ${unit}`;
}
import * as React from 'react';
export function CharValidation(props) {
const { constraints } = props;
const { constraints } = props;
if (constraints.type === 'max') {

@@ -5,0 +5,0 @@ return React.createElement("span", null, "Maximum ", constraints.max, " characters");

@@ -20,3 +20,3 @@ function _define_property(obj, key, value) {

componentDidMount() {
const { field } = this.props;
const { field } = this.props;
this.unsubscribeErrors = field.onSchemaErrorsChanged((errors)=>{

@@ -23,0 +23,0 @@ this.setState({

@@ -20,3 +20,3 @@ import * as React from 'react';

};
function render({ onClose , isShown }) {
function render({ onClose, isShown }) {
ReactDOM.render(componentRenderer({

@@ -42,3 +42,3 @@ onClose,

const size = isNumber(options.width) ? `${options.width}px` : options.width;
return open(({ isShown , onClose })=>{
return open(({ isShown, onClose })=>{
const onCloseHandler = ()=>onClose();

@@ -45,0 +45,0 @@ return React.createElement(Modal, {

@@ -16,3 +16,3 @@ import get from 'lodash/get';

}
export function getFieldValue({ entity , fieldId , localeCode , defaultLocaleCode }) {
export function getFieldValue({ entity, fieldId, localeCode, defaultLocaleCode }) {
const values = get(entity, [

@@ -28,3 +28,3 @@ 'fields',

}
export function getAssetTitle({ asset , localeCode , defaultLocaleCode , defaultTitle }) {
export function getAssetTitle({ asset, localeCode, defaultLocaleCode, defaultTitle }) {
const title = getFieldValue({

@@ -43,6 +43,6 @@ entity: {

export const isAssetField = (field)=>field.type === 'Link' && field.linkType === 'Asset';
export function isDisplayField({ field , contentType }) {
export function isDisplayField({ field, contentType }) {
return field.id === contentType.displayField;
}
export function isDescriptionField({ field , contentType }) {
export function isDescriptionField({ field, contentType }) {
const isTextField = (field)=>[

@@ -58,3 +58,3 @@ 'Symbol',

}
export function getEntityDescription({ entity , contentType , localeCode , defaultLocaleCode }) {
export function getEntityDescription({ entity, contentType, localeCode, defaultLocaleCode }) {
if (!contentType) {

@@ -77,3 +77,3 @@ return '';

}
export function getEntryTitle({ entry , contentType , localeCode , defaultLocaleCode , defaultTitle }) {
export function getEntryTitle({ entry, contentType, localeCode, defaultLocaleCode, defaultTitle }) {
let title;

@@ -142,3 +142,3 @@ if (!contentType) {

}
export const getEntryImage = async ({ entry , contentType , localeCode }, getAsset)=>{
export const getEntryImage = async ({ entry, contentType, localeCode }, getAsset)=>{
if (!contentType) {

@@ -145,0 +145,0 @@ return null;

@@ -35,4 +35,4 @@ export function toLocaleString(number) {

};
const { number , unit } = reduce(value, uom);
const { number, unit } = reduce(value, uom);
return `${formatFloat(number, false)} ${unit}`;
}
{
"name": "@contentful/field-editor-shared",
"version": "1.4.4",
"version": "1.4.5",
"main": "dist/cjs/index.js",

@@ -39,3 +39,3 @@ "module": "dist/esm/index.js",

"@contentful/app-sdk": "^4.17.1",
"@contentful/field-editor-test-utils": "^1.4.5"
"@contentful/field-editor-test-utils": "^1.4.6"
},

@@ -55,3 +55,3 @@ "dependencies": {

},
"gitHead": "b1f62d6b934520b6d4dc328921dd500381d1e22c"
"gitHead": "142d2039f023bf4ced956aae1dd08b27c35fdbaa"
}
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