@lrnwebcomponents/schema-behaviors
Advanced tools
Comparing version 2.7.7 to 2.7.10
@@ -15,3 +15,3 @@ { | ||
}, | ||
"version": "2.7.7", | ||
"version": "2.7.10", | ||
"description": "Apply schema helper behaviors to existing Polymer (Legacy) based elements", | ||
@@ -27,9 +27,9 @@ "repository": { | ||
"scripts": { | ||
"test": "../../node_modules/.bin/wct --configFile ../../wct.conf.json node_modules/@lrnwebcomponents/schema-behaviors/test/", | ||
"test": "wct --configFile ../../wct.conf.json node_modules/@lrnwebcomponents/schema-behaviors/test/", | ||
"start": "yarn run dev", | ||
"build": "../../node_modules/.bin/gulp --gulpfile=gulpfile.cjs && ../../node_modules/.bin/rollup -c && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && wca analyze \"**/*.js\" --format vscode --outFile vscode-html-custom-data.json", | ||
"dev": "../../node_modules/.bin/concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", | ||
"watch": "../../node_modules/.bin/gulp dev --gulpfile=gulpfile.cjs", | ||
"serve": "../../node_modules/.bin/es-dev-server -c ../../es-dev-server.config.js", | ||
"lighthouse": "../../node_modules/.bin/gulp lighthouse --gulpfile=gulpfile.cjs" | ||
"build": "gulp --gulpfile=gulpfile.cjs && rollup -c && prettier --ignore-path ../../.prettierignore --write \"**/*.{js,json}\" && wca analyze \"**/*.js\" --format vscode --outFile vscode-html-custom-data.json", | ||
"dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", | ||
"watch": "gulp dev --gulpfile=gulpfile.cjs", | ||
"serve": "es-dev-server -c ../../es-dev-server.config.js", | ||
"lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs" | ||
}, | ||
@@ -45,7 +45,7 @@ "author": { | ||
"@lrnwebcomponents/deduping-fix": "^2.7.7", | ||
"@lrnwebcomponents/storybook-utilities": "^2.7.7", | ||
"@lrnwebcomponents/storybook-utilities": "^2.7.10", | ||
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
"@polymer/iron-demo-helpers": "3.1.0", | ||
"@webcomponents/webcomponentsjs": "2.4.1", | ||
"concurrently": "5.1.0", | ||
"@webcomponents/webcomponentsjs": "2.4.4", | ||
"concurrently": "5.3.0", | ||
"gulp-babel": "8.0.0", | ||
@@ -64,3 +64,3 @@ "lodash": "4.17.19", | ||
], | ||
"gitHead": "5b346a23a41445900c73e9b8748be86b6f7db550" | ||
"gitHead": "5b8d225cec2bf64160b4f4cab0630b187fdcd2d8" | ||
} |
@@ -6,3 +6,3 @@ /** | ||
import { generateResourceID } from "@lrnwebcomponents/utils/utils.js"; | ||
export const SchemaBehaviors = function(SuperClass) { | ||
export const SchemaBehaviors = function (SuperClass) { | ||
return class extends SuperClass { | ||
@@ -22,4 +22,4 @@ /** | ||
cc: "http://creativecommons.org/ns#", | ||
bib: "http://bib.schema.org" | ||
} | ||
bib: "http://bib.schema.org", | ||
}, | ||
}; | ||
@@ -38,3 +38,3 @@ } | ||
type: String, | ||
attribute: "schema-resource-id" | ||
attribute: "schema-resource-id", | ||
}, | ||
@@ -48,4 +48,4 @@ /** | ||
readOnly: true, | ||
observer: "_schemaMapChanged" | ||
} | ||
observer: "_schemaMapChanged", | ||
}, | ||
}; | ||
@@ -52,0 +52,0 @@ } |
@@ -1,2 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@lrnwebcomponents/utils/utils.js")):"function"==typeof define&&define.amd?define(["exports","@lrnwebcomponents/utils/utils.js"],t):t((e=e||self).SchemaBehaviors={},e.utils_js)}(this,function(e,t){"use strict";function r(e){return(r="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 o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=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 a(e,t,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e}(e,t);if(o){var n=Object.getOwnPropertyDescriptor(o,t);return n.get?n.get.call(r):n.value}})(e,t,r||e)}e.SchemaBehaviors=function(e){return function(f){function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=s(this,i(p).call(this))).schemaResourceID="",e.schemaMap={prefix:{oer:"http://oerschema.org/",schema:"http://schema.org/",dc:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",cc:"http://creativecommons.org/ns#",bib:"http://bib.schema.org"}},e}var l,h,b;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&&u(e,t)}(p,e),l=p,b=[{key:"properties",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},a(i(p),"properties",this),{schemaResourceID:{type:String,attribute:"schema-resource-id"},schemaMap:{type:Object,readOnly:!0,observer:"_schemaMapChanged"}})}}],(h=[{key:"updated",value:function(e){var t=this;a(i(p.prototype),"updated",this)&&a(i(p.prototype),"updated",this).call(this,e),e.forEach(function(e,r){"schemaMap"==r&&t._schemaMapChanged(t[r],e)})}},{key:"_schemaMapChanged",value:function(e,o){if("undefined"!==r(e)){this.schemaResourceID=this.getAttribute("resource"),""!=this.schemaResourceID&&null!=this.schemaResourceID&&"null"!=this.schemaResourceID||(this.schemaResourceID=t.generateResourceID(),this.setAttribute("resource",this.schemaResourceID));var n=e.prefix,c="";for(var i in n)n.hasOwnProperty(i)&&(c+=i+":"+n[i]+" ");""!=c&&this.setAttribute("prefix",c)}}}])&&o(l.prototype,h),b&&o(l,b),p}()},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=schema-behaviors.umd.js.map | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@lrnwebcomponents/utils/utils.js")):"function"==typeof define&&define.amd?define(["exports","@lrnwebcomponents/utils/utils.js"],t):t((e=e||self).SchemaBehaviors={},e.utils_js)}(this,function(e,t){"use strict";function r(e){return(r="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 n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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 c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(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 a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function p(e,t,r){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}e.SchemaBehaviors=function(e){return function(o){!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&&s(e,t)}(y,e);var c,f,l,h=a(y);function y(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(e=h.call(this)).schemaResourceID="",e.schemaMap={prefix:{oer:"http://oerschema.org/",schema:"http://schema.org/",dc:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",cc:"http://creativecommons.org/ns#",bib:"http://bib.schema.org"}},e}return c=y,l=[{key:"properties",get:function(){return i(i({},p(u(y),"properties",this)),{},{schemaResourceID:{type:String,attribute:"schema-resource-id"},schemaMap:{type:Object,readOnly:!0,observer:"_schemaMapChanged"}})}}],(f=[{key:"updated",value:function(e){var t=this;p(u(y.prototype),"updated",this)&&p(u(y.prototype),"updated",this).call(this,e),e.forEach(function(e,r){"schemaMap"==r&&t._schemaMapChanged(t[r],e)})}},{key:"_schemaMapChanged",value:function(e,n){if("undefined"!==r(e)){this.schemaResourceID=this.getAttribute("resource"),""!=this.schemaResourceID&&null!=this.schemaResourceID&&"null"!=this.schemaResourceID||(this.schemaResourceID=t.generateResourceID(),this.setAttribute("resource",this.schemaResourceID));var o=e.prefix,c="";for(var i in o)o.hasOwnProperty(i)&&(c+=i+":"+o[i]+" ");""!=c&&this.setAttribute("prefix",c)}}}])&&n(c.prototype,f),l&&n(c,l),y}()},Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -6,3 +6,3 @@ /** | ||
import { generateResourceID } from "@lrnwebcomponents/utils/utils.js"; | ||
export const SchemaBehaviors = function(SuperClass) { | ||
export const SchemaBehaviors = function (SuperClass) { | ||
return class extends SuperClass { | ||
@@ -22,4 +22,4 @@ /** | ||
cc: "http://creativecommons.org/ns#", | ||
bib: "http://bib.schema.org" | ||
} | ||
bib: "http://bib.schema.org", | ||
}, | ||
}; | ||
@@ -38,3 +38,3 @@ } | ||
type: String, | ||
attribute: "schema-resource-id" | ||
attribute: "schema-resource-id", | ||
}, | ||
@@ -48,4 +48,4 @@ /** | ||
readOnly: true, | ||
observer: "_schemaMapChanged" | ||
} | ||
observer: "_schemaMapChanged", | ||
}, | ||
}; | ||
@@ -52,0 +52,0 @@ } |
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
41639