@lrnwebcomponents/hax-body-behaviors
Advanced tools
Comparing version 2.6.5 to 2.6.7
@@ -12,13 +12,14 @@ /** | ||
* { | ||
* 'api': '1', | ||
* 'canScale': true, | ||
* 'canPosition': true, | ||
* 'canEditSource': true, | ||
* 'gizmo': {}, | ||
* 'settings': { | ||
* 'quick': [], | ||
* 'configure': [], | ||
* 'advanced': [], | ||
* "api": "1", | ||
* "canScale": true, | ||
* "canPosition": true, | ||
* "canEditSource": true, | ||
* "gizmo": {}, | ||
* "settings": { | ||
* "quick": [], | ||
* "configure": [], | ||
* "advanced": [], | ||
* }, | ||
* 'saveOptions': {} | ||
* "saveOptions": {}, | ||
* "demoSchema": [] | ||
* } | ||
@@ -130,2 +131,15 @@ * | ||
* }, | ||
* * `demoSchema` | ||
* @element demoSchema is used to present this element in demonstrations and | ||
* interfaces that want to provide a sample of what the element is. This is | ||
* an easy way to ship a demo of this element and is used in HAX settings. | ||
* [{ | ||
* tag: "my-tag", | ||
* content: "<p>inner html</p>", | ||
* properties: { | ||
* endPoint: "https://cdn2.thecatapi.com/images/9j5.jpg", | ||
* primaryColor: "yellow", | ||
* title: "A cat" | ||
* } | ||
* }], | ||
* | ||
@@ -346,2 +360,6 @@ * Specialized functions | ||
} | ||
// support for demoSchema | ||
if (typeof props.demoSchema === typeof undefined) { | ||
props.demoSchema = []; | ||
} | ||
// fire event so we know they have been set for the store to collect | ||
@@ -566,3 +584,3 @@ // only fire if we haven't already so multiple elements don't keep bubbling | ||
}; | ||
schema.properties = SimpleFields.fieldsToSchema(settings); | ||
schema.properties = new SimpleFields().fieldsToSchema(settings); | ||
// support post processing of schema in order to allow for really | ||
@@ -600,3 +618,3 @@ // custom implementations that are highly dynamic in nature | ||
this._getHaxJSONSchemaProperty = settings => { | ||
return SimpleFields.fieldsToSchema(settings); | ||
return new SimpleFields().fieldsToSchema(settings); | ||
}; | ||
@@ -608,4 +626,4 @@ /** | ||
var method = | ||
SimpleFields.fieldsConversion.inputMethod[inputMethod] || | ||
SimpleFields.fieldsConversion; | ||
new SimpleFields().fieldsConversion.inputMethod[inputMethod] || | ||
new SimpleFields().fieldsConversion; | ||
return method && method.defaultSettings && method.defaultSettings.type | ||
@@ -619,3 +637,5 @@ ? method.defaultSettings.type | ||
this.validHAXPropertyInputMethod = () => { | ||
var methods = Object.keys(SimpleFields.fieldsConversion.inputMethod); | ||
var methods = Object.keys( | ||
new SimpleFields().fieldsConversion.inputMethod | ||
); | ||
return methods; | ||
@@ -728,3 +748,14 @@ }; | ||
unsetAttributes: ["end-point", "secondary-color"] | ||
} | ||
}, | ||
demoSchema: [ | ||
{ | ||
tag: "my-tag", | ||
content: "<p>inner html</p>", | ||
properties: { | ||
endPoint: "https://cdn2.thecatapi.com/images/9j5.jpg", | ||
primaryColor: "yellow", | ||
title: "A cat" | ||
} | ||
} | ||
] | ||
}; | ||
@@ -835,3 +866,3 @@ return props; | ||
_getHaxJSONSchemaProperty(settings) { | ||
return SimpleFields.fieldsToSchema(settings); | ||
return new SimpleFields().fieldsToSchema(settings); | ||
} | ||
@@ -929,3 +960,3 @@ /** | ||
_getHaxJSONSchemaProperty: function(settings) { | ||
return SimpleFields.fieldsToSchema(settings); | ||
return new SimpleFields().fieldsToSchema(settings); | ||
}, | ||
@@ -932,0 +963,0 @@ /** |
@@ -15,3 +15,3 @@ { | ||
}, | ||
"version": "2.6.5", | ||
"version": "2.6.7", | ||
"description": "Wire any element up to HAX", | ||
@@ -40,3 +40,3 @@ "repository": { | ||
"dependencies": { | ||
"@lrnwebcomponents/simple-fields": "^2.6.5", | ||
"@lrnwebcomponents/simple-fields": "^2.6.7", | ||
"@polymer/polymer": "^3.3.1" | ||
@@ -46,3 +46,3 @@ }, | ||
"@lrnwebcomponents/deduping-fix": "^2.4.0", | ||
"@lrnwebcomponents/storybook-utilities": "^2.6.5", | ||
"@lrnwebcomponents/storybook-utilities": "^2.6.7", | ||
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
@@ -62,3 +62,3 @@ "@polymer/iron-demo-helpers": "3.1.0", | ||
}, | ||
"gitHead": "eed187ad124036e7768724a2d2e37656018e739d" | ||
"gitHead": "ebc614039b22880d72344a5053498821f17a7c6b" | ||
} |
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
140392
1617