web-component-wrapper
Version:
Generic web-component base class and framework specific wrapper.
1 lines • 4.09 kB
JavaScript
if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/extends"),require("clientnode"),require("clientnode/property-types"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","clientnode","clientnode/property-types"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/extends"),require("clientnode"),require("clientnode/property-types")):t(e["@babel/runtime/helpers/extends"],e.clientnode,e["clientnode/property-types"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(function(e,t,r){return function(){var o=[function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=r}],p={};function i(e){var t=p[e];if(void 0!==t)return t.exports;var r=p[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};i.r(s),i.d(s,{property:function(){return c}});var n=i(0),l=i.n(n),u=i(1),a=i(2);function c(e){return void 0===e&&(e={}),e=l()({readAttribute:!0,type:a.string},e),function(t,r){if("string"==typeof r){var o,p=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(p,"observedAttributes")||(p.observedAttributes=p.observedAttributes?[].concat(p.observedAttributes):[]);var i=(0,u.camelCaseToDelimited)(r);p.observedAttributes&&!p.observedAttributes.includes(i)&&p.observedAttributes.push(i)}if(e.type&&(Object.prototype.hasOwnProperty.call(p,"propertyTypes")||(p.propertyTypes=p.propertyTypes?l()({},p.propertyTypes):{}),!p.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(p,r)||(p.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(p,"propertiesToReflectAsAttributes")||(p.propertiesToReflectAsAttributes=p.propertiesToReflectAsAttributes?(0,u.copy)(p.propertiesToReflectAsAttributes):[]),e.update||p.propertiesToReflectAsAttributes instanceof Map&&!p.propertiesToReflectAsAttributes.has(r)||Array.isArray(p.propertiesToReflectAsAttributes)&&!p.propertiesToReflectAsAttributes.includes(r)||"object"==typeof p.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(p.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?e.writeAttribute&&p.propertyTypes&&Object.prototype.hasOwnProperty.call(p.propertyTypes,r)&&(o=p.propertyTypes[r]):o=e.writeAttribute,void 0!==o&&(Array.isArray(p.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?p.propertiesToReflectAsAttributes.push(r):p.normalizePropertyTypeList&&(p.propertiesToReflectAsAttributes=p.normalizePropertyTypeList(p.propertiesToReflectAsAttributes))),p.propertiesToReflectAsAttributes instanceof Map&&p.propertiesToReflectAsAttributes.set(r,o),"object"==typeof p.propertiesToReflectAsAttributes&&(p.propertiesToReflectAsAttributes[r]=o));e.alias&&(Object.prototype.hasOwnProperty.call(p,"propertyAliases")||(p.propertyAliases=p.propertyAliases?l()({},p.propertyAliases):{}),!p.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(p,r)||(p.propertyAliases[r]=e.alias))}}}return s.default=c,s}()}));
;