Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lrnwebcomponents/hax-body-behaviors

Package Overview
Dependencies
Maintainers
4
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/hax-body-behaviors - npm Package Compare versions

Comparing version 2.2.0 to 2.2.2

54

analysis.json

@@ -11,7 +11,7 @@ {

"start": {
"line": 1186,
"line": 1220,
"column": 26
},
"end": {
"line": 1291,
"line": 1325,
"column": 1

@@ -40,3 +40,3 @@ }

"end": {
"line": 1181,
"line": 1215,
"column": 1

@@ -60,7 +60,7 @@ }

"start": {
"line": 1207,
"line": 1241,
"column": 4
},
"end": {
"line": 1224,
"line": 1258,
"column": 5

@@ -90,7 +90,7 @@ }

"start": {
"line": 1230,
"line": 1264,
"column": 4
},
"end": {
"line": 1232,
"line": 1266,
"column": 5

@@ -120,7 +120,7 @@ }

"start": {
"line": 1236,
"line": 1270,
"column": 4
},
"end": {
"line": 1238,
"line": 1272,
"column": 5

@@ -142,7 +142,7 @@ }

"start": {
"line": 1242,
"line": 1276,
"column": 4
},
"end": {
"line": 1244,
"line": 1278,
"column": 5

@@ -164,7 +164,7 @@ }

"start": {
"line": 1248,
"line": 1282,
"column": 4
},
"end": {
"line": 1250,
"line": 1284,
"column": 5

@@ -182,7 +182,7 @@ }

"start": {
"line": 1256,
"line": 1290,
"column": 4
},
"end": {
"line": 1258,
"line": 1292,
"column": 5

@@ -211,7 +211,7 @@ }

"start": {
"line": 1262,
"line": 1296,
"column": 4
},
"end": {
"line": 1264,
"line": 1298,
"column": 5

@@ -233,7 +233,7 @@ }

"start": {
"line": 1269,
"line": 1303,
"column": 4
},
"end": {
"line": 1271,
"line": 1305,
"column": 5

@@ -258,7 +258,7 @@ }

"start": {
"line": 1275,
"line": 1309,
"column": 4
},
"end": {
"line": 1277,
"line": 1311,
"column": 5

@@ -280,7 +280,7 @@ }

"start": {
"line": 1281,
"line": 1315,
"column": 4
},
"end": {
"line": 1283,
"line": 1317,
"column": 5

@@ -298,7 +298,7 @@ }

"start": {
"line": 1287,
"line": 1321,
"column": 4
},
"end": {
"line": 1289,
"line": 1323,
"column": 5

@@ -316,7 +316,7 @@ }

"start": {
"line": 1187,
"line": 1221,
"column": 9
},
"end": {
"line": 1290,
"line": 1324,
"column": 3

@@ -323,0 +323,0 @@ }

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).HaxBodyBehaviors={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t,r){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}var p=function e(){var i=this;r(this,e),this.haxProperties={canScale:!1,canPosition:!1,canEditSource:!1,settings:{quick:[],configure:[],advanced:[]},wipeSlot:{}},this.pathFromUrl=function(e){return e.substring(0,e.lastIndexOf("/")+1)},this.setup=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;return"undefined"!==t(i.tagName)&&(r=i.tagName.toLowerCase()),window.addEventListener("hax-store-ready",i._haxStoreReady.bind(i)),"undefined"!==t(window.HaxStore)&&null!=window.HaxStore.instance&&window.HaxStore.ready?i.setHaxProperties(e,r,o,!0):i.setHaxProperties(e,r,o,!1)},this._haxStoreReady=function(e){if(e.detail&&"undefined"!==t(i.tagName)&&"undefined"!==t(i.haxProperties)){var r=i.tagName,o=i.haxProperties,a=i;if(""!=r&&"undefined"===t(window.HaxStore)){var n=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:o,polymer:!1}});a.dispatchEvent(n)}else if(""!=r&&"undefined"===t(window.HaxStore.instance.elementList[r.toLowerCase()])){var s=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:o}});a.dispatchEvent(s)}else if("undefined"!==t(i.tagName)&&"undefined"===t(window.HaxStore.instance.elementList[i.tagName.toLowerCase()])){var d=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:i.tagName.toLowerCase(),properties:o}});a.dispatchEvent(d)}}},this.setHaxProperties=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("undefined"===t(e.api)&&(e.api="1"),"1"==e.api){if("undefined"===t(e.canPosition)&&(e.canPosition=!0),"undefined"===t(e.canScale)&&(e.canScale=!0),"undefined"===t(e.canEditSource)&&(e.canEditSource=!1),"undefined"===t(e.gizmo))e.gizmo=!1;else if("undefined"!==t(e.gizmo.iconLib)){var n=i.pathFromUrl(decodeURIComponent("undefined"!=typeof document?document.currentScript&&document.currentScript.src||document.baseURI:new("undefined"!=typeof URL?URL:require("url").URL)("file:"+__filename).href));import("".concat(n,"../../../").concat(e.gizmo.iconLib))}if("undefined"!==t(e.settings)){"undefined"===t(e.settings.quick)&&(e.settings.quick=[]);for(var s=0;s<e.settings.quick.length;s++)e.settings.quick[s]=i.validateSetting(e.settings.quick[s]),e.settings.quick[s]||e.settings.quick.splice(s,1);"undefined"===t(e.settings.configure)&&(e.settings.configure=[]);for(var d=0;d<e.settings.configure.length;d++)e.settings.configure[d]=i.validateSetting(e.settings.configure[d]),e.settings.configure[d]||e.settings.configure.splice(d,1);"undefined"===t(e.settings.advanced)&&(e.settings.advanced=[]);for(var p=0;p<e.settings.advanced.length;p++)e.settings.advanced[p]=i.validateSetting(e.settings.advanced[p]),e.settings.advanced[p]||e.settings.advanced.splice(p,1);e.settings.advanced.push({attribute:"class",title:"Classes",description:"CSS classes applied manually to the element",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"style",title:"Styles",description:"Custom CSS styles as applied to the element",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"prefix",title:"Schema: prefix",description:"Schema prefixes",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"typeof",title:"Schema: TypeOf",description:"typeof definition for Schema usage",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"property",title:"Schema: Property",description:"typeof definition for Schema usage",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"resource",title:"Schema: Resource ID",description:"Schema resource identifier",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"id",title:"ID",description:"element ID, only set this if you know why",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"data-hax-slot",title:"slot",description:"DOM slot area",inputMethod:"textfield"})}if("undefined"===t(e.saveOptions)&&(e.saveOptions={wipeSlot:!1}),a)if(""!=r&&"undefined"===t(window.HaxStore)){var u=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:e,polymer:!1}});o.dispatchEvent(u)}else if(""!=r){var l=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:e}});o.dispatchEvent(l)}else if("undefined"!==t(i.tagName)){var c=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:i.tagName.toLowerCase(),properties:e}});o.dispatchEvent(c)}else console.warn("".concat(r," missed our checks and has an issue in implementation with HAX"));""===r&&("function"==typeof i._setHaxProperties?i._setHaxProperties(e):i.haxProperties=e)}else console.warn("This is't a valid usage of hax API. See hax-body-behaviors/lib/HAXWiring.js for more details on how to implement the API. Most likely your hax item just was placed in an iframe as a fallback as opposed to a custom element.")},this.validateSetting=function(e){return("undefined"!==t(e.property)||"undefined"!==t(e.slot)||"undefined"!==t(e.attribute))&&("undefined"===t(e.title)&&("undefined"===t(e.attribute)?e.title=e.property:e.title=e.attribute),"undefined"===t(e.description)&&(e.description=""),"undefined"===t(e.inputMethod)&&(e.inputMethod="textfield"),"undefined"===t(e.type)&&(e.type="settings"),"undefined"===t(e.icon)&&(e.icon="android"),"undefined"===t(e.options)&&(e.options={}),"undefined"===t(e.required)&&(e.required=!1),"undefined"===t(e.disabled)&&(e.disabled=!1),"undefined"===t(e.validation)&&(e.validation=".*"),"undefined"===t(e.validationType)&&(e.validationType=""),"undefined"!==t(e.slot)&&("undefined"===t(e.slotWrapper)&&(e.slotWrapper="span"),"undefined"===t(e.slotAttributes)&&(e.slotAttributes={})),e)},this.getHaxProperties=function(){return i.haxProperties},this.getHaxJSONSchema=function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;"undefined"===t(e)&&(e="configure"),"undefined"===t(r)&&(r=o.haxProperties);var a=r.settings[e],n={$schema:"http://json-schema.org/schema#",title:"HAX "+e+" form schema",type:"object",properties:{}};if(n.properties=o._getHaxJSONSchemaProperty(a,o),r.gizmo&&r.gizmo.tag&&window.customElements.get(r.gizmo.tag)){var s=document.createElement(r.gizmo.tag);n="function"==typeof s.postProcessgetHaxJSONSchema?s.postProcessgetHaxJSONSchema(n):o.postProcessgetHaxJSONSchema(n)}else n=o.postProcessgetHaxJSONSchema(n);return n},this.postProcessgetHaxJSONSchema=function(e){return e},this._getHaxJSONSchemaProperty=function(e,r){var o={};for(var a in e)if(e.hasOwnProperty(a))if("undefined"!==t(e[a].property)){switch(o[e[a].property]={title:e[a].title,type:i.getHaxJSONSchemaType(e[a].inputMethod)},"undefined"!==t(r[e[a].property])&&(o[e[a].property].value=r[e[a].property]),"url"==e[a].validationType&&(o[e[a].property].format="uri"),"datepicker"==e[a].inputMethod&&(o[e[a].property].format="date-time"),".*"!=e[a].validation&&(o[e[a].property].pattern=e[a].validation),e[a].inputMethod){case"number":o[e[a].property].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{type:"number"}};break;case"select":var n=[];for(var s in e[a].options){var d=[{alt:e[a].options[s],value:s}];n.push(d)}o[e[a].property].component={name:"simple-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,options:n,disabled:e[a].disabled}};break;case"textarea":o[e[a].property].component={name:"paper-textarea",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"char-counter":"char-counter"}};break;case"code-editor":o[e[a].property].component={name:"code-editor",valueProperty:"value",properties:{editorValue:e[a].value,title:e[a].title,theme:"vs",mode:"html",className:"hax-code-editor"}};break;case"array":o[e[a].property].component={valueProperty:"value"},o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r),itemLabel:e[a].itemLabel},o[e[a].property].type="array";break;case"fieldset":o[e[a].property].component={valueProperty:"value"},o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r)},o[e[a].property].type="fieldset";break;case"tabs":o[e[a].property].component={valueProperty:"value"},e[a].properties.map(function(e){return e.inputMethod="tab",e}),o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r)},o[e[a].property].type="tabs";break;case"tab":o[e[a].property].property=e[a].property,o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r),label:e[a].itemLabel},o[e[a].property].type="tabs";break;case"textfield":o[e[a].property].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"markup":o[e[a].property].component={name:"marked-element",valueProperty:"markdown"},o[e[a].property].slot=e[a].value;break;case"alt":o[e[a].property].component={name:"paper-input-flagged",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"colorpicker":o[e[a].property].component={name:"simple-colors-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,label:e[a].title,disabled:e[a].disabled}};break;case"iconpicker":o[e[a].property].component={name:"simple-icon-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,hideOptionLabels:!0,label:e[a].title,disabled:e[a].disabled}};var p=void 0!==e[a].options&&null!==e[a].options?e[a].options:[];o[e[a].property].component.properties.icons=p;break;case"datepicker":o[e[a].property].component={name:"paper-input",valueProperty:"date",properties:{type:"date",required:e[a].required,disabled:e[a].disabled}};break;case"haxupload":o[e[a].property].component={name:"hax-upload-field",valueProperty:"value",properties:{formDataName:"file-upload",disabled:e[a].disabled,required:e[a].required}}}"undefined"!==e[a].hidden&&(o[e[a].property].hidden=e[a].hidden),"undefined"!==e[a].description&&(o[e[a].property].description=e[a].description)}else if("undefined"!==t(e[a].attribute)){switch(o[e[a].attribute]={title:e[a].title,type:r.getHaxJSONSchemaType(e[a].inputMethod)},"class"===e[a].attribute?o[e[a].attribute].value=r.className:"style"===e[a].attribute?o[e[a].attribute].value=r.style.cssText:"undefined"!==t(r.attributes[e[a].attribute])&&(o[e[a].attribute].value=r.getAttribute(e[a].attribute)),"href"!=a&&"src"!=a||(o[e[a].attribute].format="uri"),"url"==e[a].validationType&&(o[e[a].attribute].format="uri"),"datepicker"==e[a].inputMethod&&(o[e[a].attribute].format="date-time"),".*"!=e[a].validation&&(o[e[a].attribute].pattern=e[a].validation),e[a].inputMethod){case"number":o[e[a].attribute].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{type:"number"}};break;case"select":var u=[];for(var s in e[a].options){var l=[{alt:e[a].options[s],value:s}];u.push(l)}o[e[a].attribute].component={name:"simple-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,options:u,disabled:e[a].disabled}};break;case"textarea":o[e[a].attribute].component={name:"paper-textarea",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"char-counter":"char-counter"}};break;case"code-editor":o[e[a].attribute].component={name:"code-editor",valueProperty:"value",properties:{editorValue:o[e[a].attribute].value,title:e[a].title,readOnly:!1,theme:"vs",mode:"html",className:"hax-code-editor"}};break;case"textfield":o[e[a].attribute].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"alt":o[e[a].attribute].component={name:"paper-input-flagged",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"colorpicker":o[e[a].attribute].component={name:"simple-colors-picker",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled}};break;case"haxupload":o[e[a].attribute].component={name:"hax-upload-field",valueProperty:"value",properties:{formDataName:"file-upload",required:e[a].required,disabled:e[a].disabled}}}"undefined"!==e[a].description&&(o[e[a].attribute].description=e[a].description)}else{o[e[a].slot]={title:e[a].title,type:r.getHaxJSONSchemaType(e[a].inputMethod),value:"",component:{name:"code-editor",valueProperty:"value",properties:{editorValue:e[a].value,title:e[a].title,theme:"vs",mode:"html",className:"hax-code-editor"}}};var c="";for(var f in r.childNodes)"undefined"!==t(r.childNodes[f])&&(1===r.childNodes[f].nodeType?e[a].slot===r.childNodes[f].slot&&(c+=r.childNodes[f].innerHTML):1!==r.childNodes[f].nodeType&&"undefined"!==t(r.childNodes[f].textContent)&&""!==r.childNodes[f].textContent&&(c+=r.childNodes[f].textContent));o[e[a].slot].component.properties.editorValue=c.trim(),"undefined"!==e[a].description&&(o[e[a].slot].description=e[a].description)}return o},this.getHaxJSONSchemaType=function(e){if(i.validHAXPropertyInputMethod().includes(e))switch(e){case"flipboolean":case"boolean":return"boolean";case"number":return"number";case"select":case"textarea":case"colorpicker":case"iconpicker":case"datepicker":case"haxupload":case"markup":case"textfield":case"alt":return"string";case"array":return"array";default:return"string"}},this.validHAXPropertyInputMethod=function(){return["flipboolean","boolean","select","textfield","textarea","datepicker","haxupload","markup","colorpicker","iconpicker","alt","number","code-editor","array"]},this.prototypeHaxProperties=function(){return{api:"1",canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Tag name",description:"A description",icon:"av:play-circle-filled",color:"blue",groups:["Content"],handles:[{type:"data",url:"src"}],meta:{author:""}},settings:{quick:[{property:"title",title:"Title",inputMethod:"textfield",icon:"android"},{property:"primaryColor",title:"Primary color",inputMethod:"colorpicker",icon:"color"}],configure:[{slot:"",title:"Inner content",description:"The slotted content that lives inside the tag",inputMethod:"textfield",icon:"android",required:!0,validationType:"text"},{slot:"button",title:"Button content",description:"The content that can override the button",inputMethod:"textfield",icon:"android",required:!0,validationType:"text"},{property:"title",title:"Title",description:"",inputMethod:"textfield",icon:"android",required:!0,validationType:"text"},{property:"primaryColor",title:"Title",description:"",inputMethod:"textfield",icon:"android",required:!1,validation:".*",validationType:"text"}],advanced:[{property:"secondaryColor",title:"Secondary color",description:"An optional secondary color used in certain edge cases.",inputMethod:"colorpicker",icon:"color"},{property:"endPoint",title:"API endpoint",description:"An optional endpoint to hit and load in more data dymaically.",inputMethod:"textfield",icon:"android",validation:"[a-z0-9]",validationType:"url"}]},saveOptions:{wipeSlot:!1,unsetAttributes:["end-point","secondary-color"]}}}};window.HAXWiring=new p,window.HAXBehaviors=window.HAXBehaviors||{},window.HAXBehaviors.PropertiesBehaviors={properties:{haxProperties:window.HAXWiring.haxProperties},setHaxProperties:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return""==r&&"undefined"!==t(this.tagName)&&(r=this.tagName.toLowerCase()),window.addEventListener("hax-store-ready",this._haxStoreReady.bind(this)),"undefined"!==t(window.HaxStore)&&null!=window.HaxStore.instance&&window.HaxStore.ready?window.HAXWiring.setHaxProperties(e,r,i,!0):window.HAXWiring.setHaxProperties(e,r,i,!1)},_haxStoreReady:function(e){return window.HAXWiring._haxStoreReady(e)},validateSetting:function(e){return window.HAXWiring.validateSetting(e)},getHaxProperties:function(){return this.haxProperties},getHaxJSONSchema:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return window.HAXWiring.getHaxJSONSchema(e,t,r)},postProcessgetHaxJSONSchema:function(e){return window.HAXWiring.postProcessgetHaxJSONSchema(e)},_getHaxJSONSchemaProperty:function(e,t){return window.HAXWiring._getHaxJSONSchemaProperty(e,t)},getHaxJSONSchemaType:function(e){return window.HAXWiring.getHaxJSONSchemaType(e)},validHAXPropertyInputMethod:function(){return window.HAXWiring.validHAXPropertyInputMethod()},prototypeHaxProperties:function(){return window.HAXWiring.prototypeHaxProperties()}},e.HAXWiring=p,e.HAXElement=function(e){return function(u){function l(){var e;return r(this,l),(e=s(this,a(l).call(this))).HAXWiring=new p,e}var c,f,h;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}(l,e),c=l,h=[{key:"properties",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){o(e,t,r[t])})}return e}({},d(a(l),"properties",this),{haxProperties:window.HAXWiring.haxProperties})}}],(f=[{key:"setHaxProperties",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return""==r&&"undefined"!==t(this.tagName)&&(r=this.tagName.toLowerCase()),window.addEventListener("hax-store-ready",this._haxStoreReady.bind(this)),"undefined"!==t(window.HaxStore)&&null!=window.HaxStore.instance&&window.HaxStore.ready?this.HAXWiring.setHaxProperties(e,r,i,!0):this.HAXWiring.setHaxProperties(e,r,i,!1)}},{key:"setup",value:function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.HAXWiring.setup(e,"",this)}},{key:"_haxStoreReady",value:function(e){return this.HAXWiring._haxStoreReady(e)}},{key:"validateSetting",value:function(e){return this.HAXWiring.validateSetting(e)}},{key:"getHaxProperties",value:function(){return this.haxProperties}},{key:"getHaxJSONSchema",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return this.HAXWiring.getHaxJSONSchema(e,t,r)}},{key:"postProcessgetHaxJSONSchema",value:function(e){return this.HAXWiring.postProcessgetHaxJSONSchema(e)}},{key:"_getHaxJSONSchemaProperty",value:function(e,t){return this.HAXWiring._getHaxJSONSchemaProperty(e,t)}},{key:"getHaxJSONSchemaType",value:function(e){return this.HAXWiring.getHaxJSONSchemaType(e)}},{key:"validHAXPropertyInputMethod",value:function(){return this.HAXWiring.validHAXPropertyInputMethod()}},{key:"prototypeHaxProperties",value:function(){return this.HAXWiring.prototypeHaxProperties()}}])&&i(c.prototype,f),h&&i(c,h),l}()},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).HaxBodyBehaviors={})}(this,function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e,t,r){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}var p=function e(){var i=this;r(this,e),this.haxProperties={canScale:!1,canPosition:!1,canEditSource:!1,settings:{quick:[],configure:[],advanced:[]},wipeSlot:{}},this.pathFromUrl=function(e){return e.substring(0,e.lastIndexOf("/")+1)},this.setup=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;return"undefined"!==t(i.tagName)&&(r=i.tagName.toLowerCase()),window.addEventListener("hax-store-ready",i._haxStoreReady.bind(i)),"undefined"!==t(window.HaxStore)&&null!=window.HaxStore.instance&&window.HaxStore.ready?i.setHaxProperties(e,r,o,!0):i.setHaxProperties(e,r,o,!1)},this._haxStoreReady=function(e){if(e.detail&&"undefined"!==t(i.tagName)&&"undefined"!==t(i.haxProperties)){var r=i.tagName,o=i.haxProperties,a=i;if(""!=r&&"undefined"===t(window.HaxStore)){var n=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:o,polymer:!1}});a.dispatchEvent(n)}else if(""!=r&&"undefined"===t(window.HaxStore.instance.elementList[r.toLowerCase()])){var d=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:o}});a.dispatchEvent(d)}else if("undefined"!==t(i.tagName)&&"undefined"===t(window.HaxStore.instance.elementList[i.tagName.toLowerCase()])){var s=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:i.tagName.toLowerCase(),properties:o}});a.dispatchEvent(s)}}},this.setHaxProperties=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("undefined"===t(e.api)&&(e.api="1"),"1"==e.api){if("undefined"===t(e.canPosition)&&(e.canPosition=!0),"undefined"===t(e.canScale)&&(e.canScale=!0),"undefined"===t(e.canEditSource)&&(e.canEditSource=!1),"undefined"===t(e.gizmo))e.gizmo=!1;else if("undefined"!==t(e.gizmo.iconLib)){var n=i.pathFromUrl(decodeURIComponent("undefined"!=typeof document?document.currentScript&&document.currentScript.src||document.baseURI:new("undefined"!=typeof URL?URL:require("url").URL)("file:"+__filename).href));import("".concat(n,"../../../").concat(e.gizmo.iconLib))}if("undefined"!==t(e.settings)){"undefined"===t(e.settings.quick)&&(e.settings.quick=[]);for(var d=0;d<e.settings.quick.length;d++)e.settings.quick[d]=i.validateSetting(e.settings.quick[d]),e.settings.quick[d]||e.settings.quick.splice(d,1);"undefined"===t(e.settings.configure)&&(e.settings.configure=[]);for(var s=0;s<e.settings.configure.length;s++)e.settings.configure[s]=i.validateSetting(e.settings.configure[s]),e.settings.configure[s]||e.settings.configure.splice(s,1);"undefined"===t(e.settings.advanced)&&(e.settings.advanced=[]);for(var p=0;p<e.settings.advanced.length;p++)e.settings.advanced[p]=i.validateSetting(e.settings.advanced[p]),e.settings.advanced[p]||e.settings.advanced.splice(p,1);e.settings.advanced.push({attribute:"class",title:"Classes",description:"CSS classes applied manually to the element",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"style",title:"Styles",description:"Custom CSS styles as applied to the element",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"prefix",title:"Schema: prefix",description:"Schema prefixes",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"typeof",title:"Schema: TypeOf",description:"typeof definition for Schema usage",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"property",title:"Schema: Property",description:"typeof definition for Schema usage",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"resource",title:"Schema: Resource ID",description:"Schema resource identifier",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"id",title:"ID",description:"element ID, only set this if you know why",inputMethod:"textfield"}),e.settings.advanced.push({attribute:"data-hax-slot",title:"slot",description:"DOM slot area",inputMethod:"textfield"})}if("undefined"===t(e.saveOptions)&&(e.saveOptions={wipeSlot:!1}),a)if(""!=r&&"undefined"===t(window.HaxStore)){var l=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:e,polymer:!1}});o.dispatchEvent(l)}else if(""!=r){var u=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:r.toLowerCase(),properties:e}});o.dispatchEvent(u)}else if("undefined"!==t(i.tagName)){var c=new CustomEvent("hax-register-properties",{bubbles:!0,composed:!0,cancelable:!0,detail:{tag:i.tagName.toLowerCase(),properties:e}});o.dispatchEvent(c)}else console.warn("".concat(r," missed our checks and has an issue in implementation with HAX"));""===r&&("function"==typeof i._setHaxProperties?i._setHaxProperties(e):i.haxProperties=e)}else console.warn("This is't a valid usage of hax API. See hax-body-behaviors/lib/HAXWiring.js for more details on how to implement the API. Most likely your hax item just was placed in an iframe as a fallback as opposed to a custom element.")},this.validateSetting=function(e){return("undefined"!==t(e.property)||"undefined"!==t(e.slot)||"undefined"!==t(e.attribute))&&("undefined"===t(e.title)&&("undefined"===t(e.attribute)?e.title=e.property:e.title=e.attribute),"undefined"===t(e.description)&&(e.description=""),"undefined"===t(e.inputMethod)&&(e.inputMethod="textfield"),"undefined"===t(e.type)&&(e.type="settings"),"undefined"===t(e.icon)&&(e.icon="android"),"undefined"===t(e.options)&&(e.options={}),"undefined"===t(e.required)&&(e.required=!1),"undefined"===t(e.disabled)&&(e.disabled=!1),"undefined"===t(e.validation)&&(e.validation=".*"),"undefined"===t(e.validationType)&&(e.validationType=""),"undefined"!==t(e.slot)&&("undefined"===t(e.slotWrapper)&&(e.slotWrapper="span"),"undefined"===t(e.slotAttributes)&&(e.slotAttributes={})),e)},this.getHaxProperties=function(){return i.haxProperties},this.getHaxJSONSchema=function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;"undefined"===t(e)&&(e="configure"),"undefined"===t(r)&&(r=o.haxProperties);var a=r.settings[e],n={$schema:"http://json-schema.org/schema#",title:"HAX "+e+" form schema",type:"object",properties:{}};if(n.properties=o._getHaxJSONSchemaProperty(a,o),r.gizmo&&r.gizmo.tag&&window.customElements.get(r.gizmo.tag)){var d=document.createElement(r.gizmo.tag);n="function"==typeof d.postProcessgetHaxJSONSchema?d.postProcessgetHaxJSONSchema(n):o.postProcessgetHaxJSONSchema(n)}else n=o.postProcessgetHaxJSONSchema(n);return n},this.postProcessgetHaxJSONSchema=function(e){return e},this._getHaxJSONSchemaProperty=function(e,r){var o={};for(var a in e)if(e.hasOwnProperty(a))if("undefined"!==t(e[a].property)){switch(o[e[a].property]={title:e[a].title,type:i.getHaxJSONSchemaType(e[a].inputMethod)},"undefined"!==t(r[e[a].property])&&(o[e[a].property].value=r[e[a].property]),"url"==e[a].validationType&&(o[e[a].property].format="uri"),"datepicker"==e[a].inputMethod&&(o[e[a].property].format="date-time"),".*"!=e[a].validation&&(o[e[a].property].pattern=e[a].validation),e[a].inputMethod){case"number":o[e[a].property].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{type:"number"}};break;case"select":var n=[];for(var d in e[a].options){var s=[{alt:e[a].options[d],value:d}];n.push(s)}o[e[a].property].component={name:"simple-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,options:n,disabled:e[a].disabled}};break;case"textarea":o[e[a].property].component={name:"paper-textarea",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"char-counter":"char-counter"}};break;case"code-editor":o[e[a].property].component={name:"code-editor",valueProperty:"value",properties:{editorValue:e[a].value,title:e[a].title,theme:"vs",mode:"html",className:"hax-code-editor"}};break;case"array":o[e[a].property].component={valueProperty:"value"},o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r),itemLabel:e[a].itemLabel},o[e[a].property].type="array";break;case"fieldset":o[e[a].property].component={valueProperty:"value"},o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r)},o[e[a].property].type="fieldset";break;case"tabs":o[e[a].property].component={valueProperty:"value"},e[a].properties.map(function(e){return e.inputMethod="tab",e}),o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r)},o[e[a].property].type="tabs";break;case"tab":o[e[a].property].property=e[a].property,o[e[a].property].items={type:"object",properties:i._getHaxJSONSchemaProperty(e[a].properties,r),label:e[a].itemLabel},o[e[a].property].type="tabs";break;case"textfield":o[e[a].property].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"markup":o[e[a].property].component={name:"marked-element",valueProperty:"markdown"},o[e[a].property].slot=e[a].value;break;case"alt":o[e[a].property].component={name:"paper-input-flagged",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"colorpicker":o[e[a].property].component={name:"simple-colors-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,label:e[a].title,disabled:e[a].disabled}};break;case"iconpicker":o[e[a].property].component={name:"simple-icon-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,hideOptionLabels:!0,label:e[a].title,disabled:e[a].disabled}};var p=void 0!==e[a].options&&null!==e[a].options?e[a].options:[];o[e[a].property].component.properties.icons=p;break;case"datepicker":o[e[a].property].component={name:"paper-input",valueProperty:"date",properties:{type:"date",required:e[a].required,disabled:e[a].disabled}};break;case"haxupload":o[e[a].property].component={name:"hax-upload-field",valueProperty:"value",properties:{formDataName:"file-upload",disabled:e[a].disabled,required:e[a].required,noCamera:e[a].noCamera}};break;case"slider":o[e[a].property].component={name:"paper-slider",valueProperty:"immediateValue",properties:{pin:!0,required:e[a].required,disabled:e[a].disabled,min:e[a].min,max:e[a].max,step:e[a].step}}}"undefined"!==e[a].hidden&&(o[e[a].property].hidden=e[a].hidden),"undefined"!==e[a].description&&(o[e[a].property].description=e[a].description)}else if("undefined"!==t(e[a].attribute)){switch(o[e[a].attribute]={title:e[a].title,type:r.getHaxJSONSchemaType(e[a].inputMethod)},"class"===e[a].attribute?o[e[a].attribute].value=r.className:"style"===e[a].attribute?o[e[a].attribute].value=r.style.cssText:"loading"===e[a].attribute?o[e[a].attribute].value="lazy":"undefined"!==t(r.attributes[e[a].attribute])&&(o[e[a].attribute].value=r.getAttribute(e[a].attribute)),"href"!=a&&"src"!=a||(o[e[a].attribute].format="uri"),"url"==e[a].validationType&&(o[e[a].attribute].format="uri"),"datepicker"==e[a].inputMethod&&(o[e[a].attribute].format="date-time"),".*"!=e[a].validation&&(o[e[a].attribute].pattern=e[a].validation),e[a].inputMethod){case"number":o[e[a].attribute].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{type:"number"}};break;case"select":var l=[];for(var d in e[a].options){var u=[{alt:e[a].options[d],value:d}];l.push(u)}o[e[a].attribute].component={name:"simple-picker",valueProperty:"value",properties:{allowNull:e[a].allowNull,blockLabel:!0,required:e[a].required,options:l,disabled:e[a].disabled}};break;case"textarea":o[e[a].attribute].component={name:"paper-textarea",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"char-counter":"char-counter"}};break;case"code-editor":o[e[a].attribute].component={name:"code-editor",valueProperty:"value",properties:{editorValue:o[e[a].attribute].value,title:e[a].title,readOnly:!1,theme:"vs",mode:"html",className:"hax-code-editor"}};break;case"textfield":o[e[a].attribute].component={name:"paper-input",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"alt":o[e[a].attribute].component={name:"paper-input-flagged",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled},attributes:{"auto-validate":"auto-validate"}};break;case"colorpicker":o[e[a].attribute].component={name:"simple-colors-picker",valueProperty:"value",properties:{required:e[a].required,disabled:e[a].disabled}};break;case"haxupload":o[e[a].attribute].component={name:"hax-upload-field",valueProperty:"value",properties:{formDataName:"file-upload",required:e[a].required,disabled:e[a].disabled,noCamera:e[a].noCamera}};break;case"slider":o[e[a].attribute].component={name:"paper-slider",valueProperty:"immediateValue",properties:{pin:!0,required:e[a].required,disabled:e[a].disabled,min:e[a].min,max:e[a].max,step:e[a].step}}}"undefined"!==e[a].description&&(o[e[a].attribute].description=e[a].description)}else{o[e[a].slot]={title:e[a].title,type:r.getHaxJSONSchemaType(e[a].inputMethod),value:"",component:{name:"code-editor",valueProperty:"value",properties:{editorValue:e[a].value,title:e[a].title,theme:"vs",mode:"html",className:"hax-code-editor"}}};var c="";for(var f in r.childNodes)"undefined"!==t(r.childNodes[f])&&(1===r.childNodes[f].nodeType?e[a].slot===r.childNodes[f].slot&&(c+=r.childNodes[f].innerHTML):1!==r.childNodes[f].nodeType&&"undefined"!==t(r.childNodes[f].textContent)&&""!==r.childNodes[f].textContent&&(c+=r.childNodes[f].textContent));o[e[a].slot].component.properties.editorValue=c.trim(),"undefined"!==e[a].description&&(o[e[a].slot].description=e[a].description)}return o},this.getHaxJSONSchemaType=function(e){if(i.validHAXPropertyInputMethod().includes(e))switch(e){case"flipboolean":case"boolean":return"boolean";case"number":case"slider":return"number";case"select":case"textarea":case"colorpicker":case"iconpicker":case"datepicker":case"haxupload":case"markup":case"textfield":case"alt":return"string";case"array":return"array";default:return"string"}},this.validHAXPropertyInputMethod=function(){return["flipboolean","boolean","select","textfield","textarea","datepicker","haxupload","slider","markup","colorpicker","iconpicker","alt","number","code-editor","array"]},this.prototypeHaxProperties=function(){return{api:"1",canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Tag name",description:"A description",icon:"av:play-circle-filled",color:"blue",groups:["Content"],handles:[{type:"data",url:"src"}],meta:{author:""}},settings:{quick:[{property:"title",title:"Title",inputMethod:"textfield",icon:"android"},{property:"primaryColor",title:"Primary color",inputMethod:"colorpicker",icon:"color"}],configure:[{slot:"",title:"Inner content",description:"The slotted content that lives inside the tag",inputMethod:"textfield",icon:"android",required:!0,validationType:"text"},{slot:"button",title:"Button content",description:"The content that can override the button",inputMethod:"textfield",icon:"android",required:!0,validationType:"text"},{property:"title",title:"Title",description:"",inputMethod:"textfield",icon:"android",required:!0,validationType:"text"},{property:"primaryColor",title:"Title",description:"",inputMethod:"textfield",icon:"android",required:!1,validation:".*",validationType:"text"}],advanced:[{property:"secondaryColor",title:"Secondary color",description:"An optional secondary color used in certain edge cases.",inputMethod:"colorpicker",icon:"color"},{property:"endPoint",title:"API endpoint",description:"An optional endpoint to hit and load in more data dymaically.",inputMethod:"textfield",icon:"android",validation:"[a-z0-9]",validationType:"url"}]},saveOptions:{wipeSlot:!1,unsetAttributes:["end-point","secondary-color"]}}}};window.HAXWiring=new p,window.HAXBehaviors=window.HAXBehaviors||{},window.HAXBehaviors.PropertiesBehaviors={properties:{haxProperties:window.HAXWiring.haxProperties},setHaxProperties:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return""==r&&"undefined"!==t(this.tagName)&&(r=this.tagName.toLowerCase()),window.addEventListener("hax-store-ready",this._haxStoreReady.bind(this)),"undefined"!==t(window.HaxStore)&&null!=window.HaxStore.instance&&window.HaxStore.ready?window.HAXWiring.setHaxProperties(e,r,i,!0):window.HAXWiring.setHaxProperties(e,r,i,!1)},_haxStoreReady:function(e){return window.HAXWiring._haxStoreReady(e)},validateSetting:function(e){return window.HAXWiring.validateSetting(e)},getHaxProperties:function(){return this.haxProperties},getHaxJSONSchema:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return window.HAXWiring.getHaxJSONSchema(e,t,r)},postProcessgetHaxJSONSchema:function(e){return window.HAXWiring.postProcessgetHaxJSONSchema(e)},_getHaxJSONSchemaProperty:function(e,t){return window.HAXWiring._getHaxJSONSchemaProperty(e,t)},getHaxJSONSchemaType:function(e){return window.HAXWiring.getHaxJSONSchemaType(e)},validHAXPropertyInputMethod:function(){return window.HAXWiring.validHAXPropertyInputMethod()},prototypeHaxProperties:function(){return window.HAXWiring.prototypeHaxProperties()}},e.HAXWiring=p,e.HAXElement=function(e){return function(l){function u(){var e;return r(this,u),(e=d(this,a(u).call(this))).HAXWiring=new p,e}var c,f,h;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}(u,e),c=u,h=[{key:"properties",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){o(e,t,r[t])})}return e}({},s(a(u),"properties",this),{haxProperties:window.HAXWiring.haxProperties})}}],(f=[{key:"setHaxProperties",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return""==r&&"undefined"!==t(this.tagName)&&(r=this.tagName.toLowerCase()),window.addEventListener("hax-store-ready",this._haxStoreReady.bind(this)),"undefined"!==t(window.HaxStore)&&null!=window.HaxStore.instance&&window.HaxStore.ready?this.HAXWiring.setHaxProperties(e,r,i,!0):this.HAXWiring.setHaxProperties(e,r,i,!1)}},{key:"setup",value:function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.HAXWiring.setup(e,"",this)}},{key:"_haxStoreReady",value:function(e){return this.HAXWiring._haxStoreReady(e)}},{key:"validateSetting",value:function(e){return this.HAXWiring.validateSetting(e)}},{key:"getHaxProperties",value:function(){return this.haxProperties}},{key:"getHaxJSONSchema",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;return this.HAXWiring.getHaxJSONSchema(e,t,r)}},{key:"postProcessgetHaxJSONSchema",value:function(e){return this.HAXWiring.postProcessgetHaxJSONSchema(e)}},{key:"_getHaxJSONSchemaProperty",value:function(e,t){return this.HAXWiring._getHaxJSONSchemaProperty(e,t)}},{key:"getHaxJSONSchemaType",value:function(e){return this.HAXWiring.getHaxJSONSchemaType(e)}},{key:"validHAXPropertyInputMethod",value:function(){return this.HAXWiring.validHAXPropertyInputMethod()}},{key:"prototypeHaxProperties",value:function(){return this.HAXWiring.prototypeHaxProperties()}}])&&i(c.prototype,f),h&&i(c,h),u}()},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=hax-body-behaviors.umd.js.map

@@ -805,6 +805,21 @@ /**

disabled: settings[value].disabled,
required: settings[value].required
required: settings[value].required,
noCamera: settings[value].noCamera
}
};
break;
case "slider":
props[settings[value].property].component = {
name: "paper-slider",
valueProperty: "immediateValue",
properties: {
pin: true,
required: settings[value].required,
disabled: settings[value].disabled,
min: settings[value].min,
max: settings[value].max,
step: settings[value].step
}
};
break;
}

@@ -823,3 +838,3 @@ if (settings[value].hidden !== typeof undefined) {

};
// special support for className
// special support for className, style, and lazy loading
if (settings[value].attribute === "class") {

@@ -829,2 +844,4 @@ props[settings[value].attribute].value = target.className;

props[settings[value].attribute].value = target.style.cssText;
} else if (settings[value].attribute === "loading") {
props[settings[value].attribute].value = "lazy";
} else if (

@@ -960,6 +977,21 @@ typeof target.attributes[settings[value].attribute] !==

required: settings[value].required,
disabled: settings[value].disabled
disabled: settings[value].disabled,
noCamera: settings[value].noCamera
}
};
break;
case "slider":
props[settings[value].attribute].component = {
name: "paper-slider",
valueProperty: "immediateValue",
properties: {
pin: true,
required: settings[value].required,
disabled: settings[value].disabled,
min: settings[value].min,
max: settings[value].max,
step: settings[value].step
}
};
break;
}

@@ -1033,2 +1065,3 @@ if (settings[value].description !== typeof undefined) {

case "number":
case "slider":
return "number";

@@ -1068,2 +1101,3 @@ break;

"haxupload",
"slider",
"markup",

@@ -1070,0 +1104,0 @@ "colorpicker",

@@ -14,3 +14,3 @@ {

},
"version": "2.2.0",
"version": "2.2.2",
"description": "Wire any element up to HAX",

@@ -42,3 +42,3 @@ "repository": {

"@lrnwebcomponents/deduping-fix": "^2.1.1",
"@lrnwebcomponents/storybook-utilities": "^2.2.0",
"@lrnwebcomponents/storybook-utilities": "^2.2.2",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",

@@ -58,3 +58,3 @@ "@polymer/iron-demo-helpers": "3.1.0",

},
"gitHead": "d8dfc961c1e93dbe8c38b40c82e288af057d6477"
"gitHead": "0ec87963e7e130a9b4b7028b65a45849bb9b0f81"
}

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