@contentful/field-editor-shared
Advanced tools
Comparing version 0.9.1 to 0.10.0
@@ -13,5 +13,6 @@ 'use strict'; | ||
var emotion = require('emotion'); | ||
var isNumber = _interopDefault(require('lodash/isNumber')); | ||
var ReactDOM = _interopDefault(require('react-dom')); | ||
var get = _interopDefault(require('lodash/get')); | ||
var isObject = _interopDefault(require('lodash/isObject')); | ||
var isNumber = _interopDefault(require('lodash/isNumber')); | ||
@@ -42,5 +43,3 @@ function _extends() { | ||
var FieldConnector = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
var FieldConnector = /*#__PURE__*/function (_React$Component) { | ||
_inheritsLoose(FieldConnector, _React$Component); | ||
@@ -172,5 +171,3 @@ | ||
var styles = { | ||
invalid: | ||
/*#__PURE__*/ | ||
emotion.css({ | ||
invalid: /*#__PURE__*/emotion.css({ | ||
color: tokens.colorRedBase | ||
@@ -207,13 +204,91 @@ }) | ||
function open(componentRenderer) { | ||
var rootDom = null; | ||
var getRoot = function getRoot() { | ||
if (rootDom === null) { | ||
rootDom = document.createElement('div'); | ||
rootDom.setAttribute('id', 'field-editor-modal-root'); | ||
document.body.appendChild(rootDom); | ||
} | ||
return rootDom; | ||
}; | ||
return new Promise(function (resolve) { | ||
var currentConfig = { | ||
onClose: onClose, | ||
isShown: true | ||
}; | ||
function render(_ref) { | ||
var onClose = _ref.onClose, | ||
isShown = _ref.isShown; | ||
ReactDOM.render(componentRenderer({ | ||
onClose: onClose, | ||
isShown: isShown | ||
}), getRoot()); | ||
} | ||
function onClose() { | ||
currentConfig = _extends({}, currentConfig, { | ||
isShown: false | ||
}); | ||
render(currentConfig); | ||
resolve.apply(void 0, arguments); | ||
getRoot().remove(); | ||
} | ||
render(currentConfig); | ||
}); | ||
} | ||
function openDialog(options, Component) { | ||
var key = Date.now(); | ||
var size = isNumber(options.width) ? options.width + "px" : options.width; | ||
return open(function (_ref2) { | ||
var isShown = _ref2.isShown, | ||
onClose = _ref2.onClose; | ||
var onCloseHandler = function onCloseHandler() { | ||
return onClose(); | ||
}; | ||
return React.createElement(forma36ReactComponents.Modal, { | ||
key: key, | ||
shouldCloseOnOverlayClick: options.shouldCloseOnOverlayClick || false, | ||
shouldCloseOnEscapePress: options.shouldCloseOnEscapePress || false, | ||
allowHeightOverflow: options.allowHeightOverflow || false, | ||
position: options.position || 'center', | ||
isShown: isShown, | ||
onClose: onCloseHandler, | ||
size: size || '700px' | ||
}, function () { | ||
return React.createElement(React.Fragment, null, options.title && React.createElement(forma36ReactComponents.Modal.Header, { | ||
testId: "dialog-title", | ||
title: options.title, | ||
onClose: onCloseHandler | ||
}), React.createElement("div", { | ||
style: { | ||
minHeight: options.minHeight || 'auto' | ||
} | ||
}, React.createElement(Component, { | ||
onClose: onClose | ||
}))); | ||
}); | ||
}); | ||
} | ||
var ModalDialogLauncher = { | ||
openDialog: openDialog | ||
}; | ||
var ModalDialogLauncher$1 = { | ||
__proto__: null, | ||
open: open, | ||
openDialog: openDialog, | ||
'default': ModalDialogLauncher | ||
}; | ||
// A type of promise-like that resolves synchronously and supports only one observer | ||
var _iteratorSymbol = | ||
/*#__PURE__*/ | ||
typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = | ||
/*#__PURE__*/ | ||
Symbol("Symbol.iterator")) : "@@iterator"; // Asynchronously iterate through an object's values | ||
var _asyncIteratorSymbol = | ||
/*#__PURE__*/ | ||
typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = | ||
/*#__PURE__*/ | ||
Symbol("Symbol.asyncIterator")) : "@@asyncIterator"; // Asynchronously iterate on a value using it's async iterator if present, or its synchronous iterator if missing | ||
var _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = /*#__PURE__*/Symbol("Symbol.iterator")) : "@@iterator"; // Asynchronously iterate through an object's values | ||
var _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = /*#__PURE__*/Symbol("Symbol.asyncIterator")) : "@@asyncIterator"; // Asynchronously iterate on a value using it's async iterator if present, or its synchronous iterator if missing | ||
@@ -506,4 +581,5 @@ function _catch(body, recover) { | ||
exports.FieldConnector = FieldConnector; | ||
exports.ModalDialogLauncher = ModalDialogLauncher$1; | ||
exports.PredefinedValuesError = PredefinedValuesError; | ||
exports.entityHelpers = entityHelpers; | ||
//# sourceMappingURL=field-editor-shared.cjs.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),n=e(require("lodash/throttle")),r=e(require("lodash/isEqual")),i=require("@contentful/forma-36-react-components"),a=e(require("@contentful/forma-36-tokens")),l=require("emotion"),o=e(require("lodash/get")),u=e(require("lodash/isObject")),s=e(require("lodash/isNumber"));function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d=function(e){var t,r;function i(t){var r;(r=e.call(this,t)||this).unsubscribeErrors=null,r.unsubscribeDisabled=null,r.unsubscribeValue=null,r.setValue=n((function(e){return r.props.isEmptyValue(void 0===e?null:e)?new Promise((function(e,t){r.setState({lastSetValue:void 0},(function(){r.props.field.removeValue().then(e).catch(t)}))})):new Promise((function(t,n){r.setState({lastSetValue:e},(function(){r.props.field.setValue(e).then(t).catch(n)}))}))}),r.props.throttle,{leading:0===r.props.throttle});var i=t.field.getValue();return r.state={isLocalValueChange:!1,externalReset:0,value:i,lastSetValue:i,lastRemoteValue:i,disabled:t.isInitiallyDisabled,errors:[]},r}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=i.prototype;return a.componentDidMount=function(){var e=this,t=this.props.field;this.unsubscribeErrors=t.onSchemaErrorsChanged((function(t){e.setState({errors:t||[]})})),this.unsubscribeDisabled=t.onIsDisabledChanged((function(t){e.setState({disabled:t})})),this.unsubscribeValue=t.onValueChanged((function(t){e.setState((function(n){var r=e.props.isEqualValues(t,n.lastSetValue);return{value:t,lastSetValue:t,lastRemoteValue:r?n.lastRemoteValue:t,isLocalValueChange:r,externalReset:n.externalReset+(r?0:1)}}))}))},a.componentWillUnmount=function(){"function"==typeof this.unsubscribeErrors&&this.unsubscribeErrors(),"function"==typeof this.unsubscribeDisabled&&this.unsubscribeDisabled(),"function"==typeof this.unsubscribeValue&&this.unsubscribeValue()},a.render=function(){var e=c({},this.state);return delete e.lastSetValue,this.props.children(c({},e,{setValue:this.setValue}))},i}(t.Component);d.defaultProps={children:function(){return null},isEmptyValue:function(e){return null===e||""===e},isEqualValues:function(e,t){return r(e,t)},throttle:300};var f=l.css({color:a.colorRedBase});function p(e,t){return!e||e.match(/^\s*$/)?t:e}function m(e){var t=e.localeCode,n=e.defaultLocaleCode,r=o(e.entity,["fields",e.fieldId]);if(u(r)){var i=Object.keys(r)[0];return r[t]||r[n]||r[i]}}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var y={__proto__:null,getFieldValue:m,getAssetTitle:function(e){var t=e.defaultTitle;return p(m({entity:e.asset,fieldId:"title",localeCode:e.localeCode,defaultLocaleCode:e.defaultLocaleCode}),t)},getEntityDescription:function(e){var t=e.entity,n=e.contentType,r=e.localeCode,i=e.defaultLocaleCode;if(!n)return"";var a=n.fields.find((function(e){return function(e){return["Symbol","Text"].includes(e.type)}(e)&&!function(e){return e.id===n.displayField}(e)&&!function(e){return/\bslug\b/.test(e.name)}(e)}));return a&&m({entity:t,fieldId:a.id,localeCode:r,defaultLocaleCode:i})||""},getEntryTitle:function(e){var t,n=e.entry,r=e.contentType,i=e.localeCode,a=e.defaultLocaleCode,l=e.defaultTitle;if(!r)return l;var o=r.displayField;if(!o)return l;var u=r.fields.find((function(e){return e.id===o}));return u?(u.localized?(t=m({entity:n,fieldId:o,localeCode:i,defaultLocaleCode:a}))||(t=m({entity:n,fieldId:u.id,localeCode:i,defaultLocaleCode:a})):(t=m({entity:n,fieldId:o,defaultLocaleCode:a,localeCode:""}))||(t=m({entity:n,fieldId:u.id,defaultLocaleCode:a,localeCode:""})),p(t,l)):l},getEntryStatus:function(e){if(!e||"Entry"!==e.type&&"Asset"!==e.type)throw new TypeError("Invalid entity metadata object");return e.deletedVersion?"deleted":e.archivedVersion?"archived":e.publishedVersion?e.version>e.publishedVersion+1?"changed":"published":"draft"},getEntryImage:function(e,t){var n=e.entry,r=e.contentType,i=e.localeCode;try{if(!r)return Promise.resolve(null);var a=r.fields.find((function(e){return"Link"===e.type&&"Asset"===e.linkType}));if(!a)return Promise.resolve(null);var l=o(n.fields,[a.id,i,"sys","id"]);return Promise.resolve(l?function(e,n){try{var r=Promise.resolve(t(l)).then((function(e){var t=o(e,["fields","file",i]);return Boolean(o(t,["details","image"],!1))?t:null}))}catch(e){return null}return r&&r.then?r.then(void 0,(function(){return null})):r}():null)}catch(e){return Promise.reject(e)}}},h={__proto__:null,fromFieldValidations:function(e,t){void 0===e&&(e=[]);var n=e.find((function(e){return"size"in e})),r=n&&n.size||{},i=r.min,a=r.max;return s(i)&&s(a)?{type:"min-max",min:i,max:a}:s(i)?{type:"min",min:i}:s(a)?{type:"max",max:a}:{type:"max",max:"Symbol"===t?256:5e4}},makeChecker:function(e){return function(t){return"max"===e.type?t<=e.max:"min"===e.type?t>=e.min:t>=e.min&&t<=e.max}}};exports.CharCounter=function(e){var n,r=0;e.value&&(r=e.value.length);var i=0===r||e.checkConstraint(r);return t.createElement("span",{"data-status-code":i?null:"invalid-size",className:l.cx((n={},n[f]=!i,n))},r," characters")},exports.CharValidation=function(e){var n=e.constraints;return"max"===n.type?t.createElement("span",null,"Maximum ",n.max," characters"):"min"===n.type?t.createElement("span",null,"Requires at least ",n.min," characters"):t.createElement("span",null,"Requires between ",n.min," and ",n.max," characters")},exports.ConstraintsUtils=h,exports.FieldConnector=d,exports.PredefinedValuesError=function(){return t.createElement(i.Note,{noteType:"warning",testId:"predefined-values-warning"},"The widget failed to initialize. You can fix the problem by providing predefined values under the validations tab in the field settings.")},exports.entityHelpers=y; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),n=e(require("lodash/throttle")),r=e(require("lodash/isEqual")),o=require("@contentful/forma-36-react-components"),i=e(require("@contentful/forma-36-tokens")),l=require("emotion"),a=e(require("lodash/isNumber")),u=e(require("react-dom")),s=e(require("lodash/get")),c=e(require("lodash/isObject"));function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var f=function(e){var t,r;function o(t){var r;(r=e.call(this,t)||this).unsubscribeErrors=null,r.unsubscribeDisabled=null,r.unsubscribeValue=null,r.setValue=n((function(e){return r.props.isEmptyValue(void 0===e?null:e)?new Promise((function(e,t){r.setState({lastSetValue:void 0},(function(){r.props.field.removeValue().then(e).catch(t)}))})):new Promise((function(t,n){r.setState({lastSetValue:e},(function(){r.props.field.setValue(e).then(t).catch(n)}))}))}),r.props.throttle,{leading:0===r.props.throttle});var o=t.field.getValue();return r.state={isLocalValueChange:!1,externalReset:0,value:o,lastSetValue:o,lastRemoteValue:o,disabled:t.isInitiallyDisabled,errors:[]},r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=o.prototype;return i.componentDidMount=function(){var e=this,t=this.props.field;this.unsubscribeErrors=t.onSchemaErrorsChanged((function(t){e.setState({errors:t||[]})})),this.unsubscribeDisabled=t.onIsDisabledChanged((function(t){e.setState({disabled:t})})),this.unsubscribeValue=t.onValueChanged((function(t){e.setState((function(n){var r=e.props.isEqualValues(t,n.lastSetValue);return{value:t,lastSetValue:t,lastRemoteValue:r?n.lastRemoteValue:t,isLocalValueChange:r,externalReset:n.externalReset+(r?0:1)}}))}))},i.componentWillUnmount=function(){"function"==typeof this.unsubscribeErrors&&this.unsubscribeErrors(),"function"==typeof this.unsubscribeDisabled&&this.unsubscribeDisabled(),"function"==typeof this.unsubscribeValue&&this.unsubscribeValue()},i.render=function(){var e=d({},this.state);return delete e.lastSetValue,this.props.children(d({},e,{setValue:this.setValue}))},o}(t.Component);f.defaultProps={children:function(){return null},isEmptyValue:function(e){return null===e||""===e},isEqualValues:function(e,t){return r(e,t)},throttle:300};var p=l.css({color:i.colorRedBase});function m(e){var t=null,n=function(){return null===t&&((t=document.createElement("div")).setAttribute("id","field-editor-modal-root"),document.body.appendChild(t)),t};return new Promise((function(t){var r={onClose:function(){o(r=d({},r,{isShown:!1})),t.apply(void 0,arguments),n().remove()},isShown:!0};function o(t){u.render(e({onClose:t.onClose,isShown:t.isShown}),n())}o(r)}))}function h(e,n){var r=Date.now(),i=a(e.width)?e.width+"px":e.width;return m((function(l){var a=l.onClose,u=function(){return a()};return t.createElement(o.Modal,{key:r,shouldCloseOnOverlayClick:e.shouldCloseOnOverlayClick||!1,shouldCloseOnEscapePress:e.shouldCloseOnEscapePress||!1,allowHeightOverflow:e.allowHeightOverflow||!1,position:e.position||"center",isShown:l.isShown,onClose:u,size:i||"700px"},(function(){return t.createElement(t.Fragment,null,e.title&&t.createElement(o.Modal.Header,{testId:"dialog-title",title:e.title,onClose:u}),t.createElement("div",{style:{minHeight:e.minHeight||"auto"}},t.createElement(n,{onClose:a})))}))}))}var y={__proto__:null,open:m,openDialog:h,default:{openDialog:h}};function v(e,t){return!e||e.match(/^\s*$/)?t:e}function b(e){var t=e.localeCode,n=e.defaultLocaleCode,r=s(e.entity,["fields",e.fieldId]);if(c(r)){var o=Object.keys(r)[0];return r[t]||r[n]||r[o]}}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var C={__proto__:null,getFieldValue:b,getAssetTitle:function(e){var t=e.defaultTitle;return v(b({entity:e.asset,fieldId:"title",localeCode:e.localeCode,defaultLocaleCode:e.defaultLocaleCode}),t)},getEntityDescription:function(e){var t=e.entity,n=e.contentType,r=e.localeCode,o=e.defaultLocaleCode;if(!n)return"";var i=n.fields.find((function(e){return function(e){return["Symbol","Text"].includes(e.type)}(e)&&!function(e){return e.id===n.displayField}(e)&&!function(e){return/\bslug\b/.test(e.name)}(e)}));return i&&b({entity:t,fieldId:i.id,localeCode:r,defaultLocaleCode:o})||""},getEntryTitle:function(e){var t,n=e.entry,r=e.contentType,o=e.localeCode,i=e.defaultLocaleCode,l=e.defaultTitle;if(!r)return l;var a=r.displayField;if(!a)return l;var u=r.fields.find((function(e){return e.id===a}));return u?(u.localized?(t=b({entity:n,fieldId:a,localeCode:o,defaultLocaleCode:i}))||(t=b({entity:n,fieldId:u.id,localeCode:o,defaultLocaleCode:i})):(t=b({entity:n,fieldId:a,defaultLocaleCode:i,localeCode:""}))||(t=b({entity:n,fieldId:u.id,defaultLocaleCode:i,localeCode:""})),v(t,l)):l},getEntryStatus:function(e){if(!e||"Entry"!==e.type&&"Asset"!==e.type)throw new TypeError("Invalid entity metadata object");return e.deletedVersion?"deleted":e.archivedVersion?"archived":e.publishedVersion?e.version>e.publishedVersion+1?"changed":"published":"draft"},getEntryImage:function(e,t){var n=e.entry,r=e.contentType,o=e.localeCode;try{if(!r)return Promise.resolve(null);var i=r.fields.find((function(e){return"Link"===e.type&&"Asset"===e.linkType}));if(!i)return Promise.resolve(null);var l=s(n.fields,[i.id,o,"sys","id"]);return Promise.resolve(l?function(e,n){try{var r=Promise.resolve(t(l)).then((function(e){var t=s(e,["fields","file",o]);return Boolean(s(t,["details","image"],!1))?t:null}))}catch(e){return null}return r&&r.then?r.then(void 0,(function(){return null})):r}():null)}catch(e){return Promise.reject(e)}}},g={__proto__:null,fromFieldValidations:function(e,t){void 0===e&&(e=[]);var n=e.find((function(e){return"size"in e})),r=n&&n.size||{},o=r.min,i=r.max;return a(o)&&a(i)?{type:"min-max",min:o,max:i}:a(o)?{type:"min",min:o}:a(i)?{type:"max",max:i}:{type:"max",max:"Symbol"===t?256:5e4}},makeChecker:function(e){return function(t){return"max"===e.type?t<=e.max:"min"===e.type?t>=e.min:t>=e.min&&t<=e.max}}};exports.CharCounter=function(e){var n,r=0;e.value&&(r=e.value.length);var o=0===r||e.checkConstraint(r);return t.createElement("span",{"data-status-code":o?null:"invalid-size",className:l.cx((n={},n[p]=!o,n))},r," characters")},exports.CharValidation=function(e){var n=e.constraints;return"max"===n.type?t.createElement("span",null,"Maximum ",n.max," characters"):"min"===n.type?t.createElement("span",null,"Requires at least ",n.min," characters"):t.createElement("span",null,"Requires between ",n.min," and ",n.max," characters")},exports.ConstraintsUtils=g,exports.FieldConnector=f,exports.ModalDialogLauncher=y,exports.PredefinedValuesError=function(){return t.createElement(o.Note,{noteType:"warning",testId:"predefined-values-warning"},"The widget failed to initialize. You can fix the problem by providing predefined values under the validations tab in the field settings.")},exports.entityHelpers=C; | ||
//# sourceMappingURL=field-editor-shared.cjs.production.min.js.map |
import React from 'react'; | ||
import throttle from 'lodash-es/throttle'; | ||
import isEqual from 'lodash-es/isEqual'; | ||
import { Note } from '@contentful/forma-36-react-components'; | ||
import { Note, Modal } from '@contentful/forma-36-react-components'; | ||
import tokens from '@contentful/forma-36-tokens'; | ||
import { cx, css } from 'emotion'; | ||
import isNumber from 'lodash-es/isNumber'; | ||
import ReactDOM from 'react-dom'; | ||
import get from 'lodash-es/get'; | ||
import isObject from 'lodash-es/isObject'; | ||
import isNumber from 'lodash-es/isNumber'; | ||
@@ -35,5 +36,3 @@ function _extends() { | ||
var FieldConnector = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
var FieldConnector = /*#__PURE__*/function (_React$Component) { | ||
_inheritsLoose(FieldConnector, _React$Component); | ||
@@ -165,5 +164,3 @@ | ||
var styles = { | ||
invalid: | ||
/*#__PURE__*/ | ||
css({ | ||
invalid: /*#__PURE__*/css({ | ||
color: tokens.colorRedBase | ||
@@ -200,13 +197,91 @@ }) | ||
function open(componentRenderer) { | ||
var rootDom = null; | ||
var getRoot = function getRoot() { | ||
if (rootDom === null) { | ||
rootDom = document.createElement('div'); | ||
rootDom.setAttribute('id', 'field-editor-modal-root'); | ||
document.body.appendChild(rootDom); | ||
} | ||
return rootDom; | ||
}; | ||
return new Promise(function (resolve) { | ||
var currentConfig = { | ||
onClose: onClose, | ||
isShown: true | ||
}; | ||
function render(_ref) { | ||
var onClose = _ref.onClose, | ||
isShown = _ref.isShown; | ||
ReactDOM.render(componentRenderer({ | ||
onClose: onClose, | ||
isShown: isShown | ||
}), getRoot()); | ||
} | ||
function onClose() { | ||
currentConfig = _extends({}, currentConfig, { | ||
isShown: false | ||
}); | ||
render(currentConfig); | ||
resolve.apply(void 0, arguments); | ||
getRoot().remove(); | ||
} | ||
render(currentConfig); | ||
}); | ||
} | ||
function openDialog(options, Component) { | ||
var key = Date.now(); | ||
var size = isNumber(options.width) ? options.width + "px" : options.width; | ||
return open(function (_ref2) { | ||
var isShown = _ref2.isShown, | ||
onClose = _ref2.onClose; | ||
var onCloseHandler = function onCloseHandler() { | ||
return onClose(); | ||
}; | ||
return React.createElement(Modal, { | ||
key: key, | ||
shouldCloseOnOverlayClick: options.shouldCloseOnOverlayClick || false, | ||
shouldCloseOnEscapePress: options.shouldCloseOnEscapePress || false, | ||
allowHeightOverflow: options.allowHeightOverflow || false, | ||
position: options.position || 'center', | ||
isShown: isShown, | ||
onClose: onCloseHandler, | ||
size: size || '700px' | ||
}, function () { | ||
return React.createElement(React.Fragment, null, options.title && React.createElement(Modal.Header, { | ||
testId: "dialog-title", | ||
title: options.title, | ||
onClose: onCloseHandler | ||
}), React.createElement("div", { | ||
style: { | ||
minHeight: options.minHeight || 'auto' | ||
} | ||
}, React.createElement(Component, { | ||
onClose: onClose | ||
}))); | ||
}); | ||
}); | ||
} | ||
var ModalDialogLauncher = { | ||
openDialog: openDialog | ||
}; | ||
var ModalDialogLauncher$1 = { | ||
__proto__: null, | ||
open: open, | ||
openDialog: openDialog, | ||
'default': ModalDialogLauncher | ||
}; | ||
// A type of promise-like that resolves synchronously and supports only one observer | ||
var _iteratorSymbol = | ||
/*#__PURE__*/ | ||
typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = | ||
/*#__PURE__*/ | ||
Symbol("Symbol.iterator")) : "@@iterator"; // Asynchronously iterate through an object's values | ||
var _asyncIteratorSymbol = | ||
/*#__PURE__*/ | ||
typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = | ||
/*#__PURE__*/ | ||
Symbol("Symbol.asyncIterator")) : "@@asyncIterator"; // Asynchronously iterate on a value using it's async iterator if present, or its synchronous iterator if missing | ||
var _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = /*#__PURE__*/Symbol("Symbol.iterator")) : "@@iterator"; // Asynchronously iterate through an object's values | ||
var _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = /*#__PURE__*/Symbol("Symbol.asyncIterator")) : "@@asyncIterator"; // Asynchronously iterate on a value using it's async iterator if present, or its synchronous iterator if missing | ||
@@ -495,3 +570,3 @@ function _catch(body, recover) { | ||
export { CharCounter, CharValidation, constraints as ConstraintsUtils, FieldConnector, PredefinedValuesError, entityHelpers }; | ||
export { CharCounter, CharValidation, constraints as ConstraintsUtils, FieldConnector, ModalDialogLauncher$1 as ModalDialogLauncher, PredefinedValuesError, entityHelpers }; | ||
//# sourceMappingURL=field-editor-shared.esm.js.map |
@@ -6,2 +6,4 @@ export { FieldAPI, ParametersAPI, LocalesAPI, BaseExtensionSDK, OpenCustomWidgetOptions } from 'contentful-ui-extensions-sdk'; | ||
export { CharValidation } from './CharValidation'; | ||
import * as ModalDialogLauncher from './ModalDialogLauncher'; | ||
export { ModalDialogLauncher }; | ||
import * as entityHelpers from './utils/entityHelpers'; | ||
@@ -8,0 +10,0 @@ export { entityHelpers }; |
{ | ||
"name": "@contentful/field-editor-shared", | ||
"version": "0.9.1", | ||
"version": "0.10.0", | ||
"main": "dist/index.js", | ||
@@ -36,3 +36,3 @@ "module": "dist/field-editor-shared.esm.js", | ||
}, | ||
"gitHead": "899e936cc89b19e7c3a01bd87b2e9c5538d58c7c" | ||
"gitHead": "0f9ad7605ca21a08970378ba5bd73be42b9ca4d4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
200216
20
1212