@rei/cdr-rating
Advanced tools
Comparing version 1.0.2-alpha.0 to 1.0.2
@@ -1,1 +0,1 @@ | ||
!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CdrRating",[],t):"object"==typeof exports?exports.CdrRating=t():r.CdrRating=t()}("undefined"!=typeof self?self:this,function(){return function(r){var t={};function n(a){if(t[a])return t[a].exports;var e=t[a]={i:a,l:!1,exports:{}};return r[a].call(e.exports,e,e.exports,n),e.l=!0,e.exports}return n.m=r,n.c=t,n.d=function(r,t,a){n.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="/",n(n.s=4)}([function(r,t,n){"use strict";var a=n(1);t.a=a.a},function(r,t,n){"use strict";var a=n(8),e=n(9),i=n(11);t.a={name:"CdrRating",mixins:[a.a,e.a,i.a],props:{rating:{required:!0,type:[String,Number],default:0},count:{required:!1,type:[String,Number],default:0},compact:{type:Boolean,default:!1},href:{type:String}},computed:{baseClass:function(){return"cdr-rating"},rounded:function(){return Math.round(4*this.rating)/4},whole:function(){return Math.floor(this.rounded)},remainder:function(){return this.rounded.toFixed(2).split(".")[1]},formattedCount:function(){return this.compact?"("+this.count+")":""+this.count}}}},function(r,t,n){"use strict";t.a={methods:{buildClass:function(r){var t=this,n="cdr";this.baseClass&&(n=this.baseClass);var a=n,e=this[r]?this[r].split(" "):[],i=[];return this.$style?(i.push(this.moduleClass(a)),i=i.concat(e.map(function(r){return t.modifyClassName(a,r)}))):(i.push(""+a),i=i.concat(e.map(function(r){return t.modifyClassName(a,r)}))),i.join(" ")},moduleClass:function(r){return this.$style[""+r]},modifyClassName:function(r,t){return this.$style?this.moduleClass(r+"--"+t):r+"--"+t}}}},function(r,t){r.exports={"cdr-rating":"cdr-rating_1.0.2-alpha.0","cdr-rating__icon":"cdr-rating__icon_1.0.2-alpha.0","cdr-rating__count":"cdr-rating__count_1.0.2-alpha.0","cdr-rating__ratings":"cdr-rating__ratings_1.0.2-alpha.0","cdr-rating__background":"cdr-rating__background_1.0.2-alpha.0","cdr-rating__placeholder":"cdr-rating__placeholder_1.0.2-alpha.0","cdr-rating__placeholder--no-reviews":"cdr-rating__placeholder--no-reviews_1.0.2-alpha.0","cdr-rating__100":"cdr-rating__100_1.0.2-alpha.0","cdr-rating__75":"cdr-rating__75_1.0.2-alpha.0","cdr-rating__50":"cdr-rating__50_1.0.2-alpha.0","cdr-rating__25":"cdr-rating__25_1.0.2-alpha.0","cdr-rating--linked":"cdr-rating--linked_1.0.2-alpha.0","cdr-rating__number":"cdr-rating__number_1.0.2-alpha.0","cdr-rating--large":"cdr-rating--large_1.0.2-alpha.0","cdr-rating--small":"cdr-rating--small_1.0.2-alpha.0","cdr-rating--primary":"cdr-rating--primary_1.0.2-alpha.0","cdr-rating--secondary":"cdr-rating--secondary_1.0.2-alpha.0","cdr-rating--small@xs":"cdr-rating--small@xs_1.0.2-alpha.0","cdr-rating--large@xs":"cdr-rating--large@xs_1.0.2-alpha.0","cdr-rating--small@sm":"cdr-rating--small@sm_1.0.2-alpha.0","cdr-rating--large@sm":"cdr-rating--large@sm_1.0.2-alpha.0","cdr-rating--small@md":"cdr-rating--small@md_1.0.2-alpha.0","cdr-rating--large@md":"cdr-rating--large@md_1.0.2-alpha.0","cdr-rating--small@lg":"cdr-rating--small@lg_1.0.2-alpha.0","cdr-rating--large@lg":"cdr-rating--large@lg_1.0.2-alpha.0"}},function(r,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(5);n.d(t,"CdrRating",function(){return a.a})},function(r,t,n){"use strict";var a=n(6),e=n(0),i=n(12),s=n(13);var c=Object(s.a)(e.a,a.a,a.b,!1,function(r){this.$style=i.default.locals||i.default},null,null);t.a=c.exports},function(r,t,n){"use strict";var a=n(7);n.d(t,"a",function(){return a.a}),n.d(t,"b",function(){return a.b})},function(r,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return e});var a=function(){var r=this,t=r.$createElement,n=r._self._c||t;return n(r.href?"a":"div",{tag:"component",class:[r.contentPriorityClass,r.sizeClass,r.space,r.href?r.$style["cdr-rating--linked"]:""],attrs:{href:r.href}},[n("div",{class:r.$style["cdr-rating__background"]},r._l(5,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.count>0?r.$style["cdr-rating__placeholder"]:r.$style["cdr-rating__placeholder--no-reviews"]],attrs:{"aria-hidden":"true"}})})),r._v(" "),n("div",{class:r.$style["cdr-rating__ratings"]},[r._l(r.whole,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__100"]],attrs:{"aria-hidden":"true"}})}),r._v(" "),"25"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__25"]],attrs:{"aria-hidden":"true"}}):"50"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__50"]],attrs:{"aria-hidden":"true"}}):"75"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__75"]],attrs:{"aria-hidden":"true"}}):r._e()],2),r._v(" "),r.count?n("span",{class:r.$style["cdr-rating__count"],attrs:{"aria-hidden":"true"}},[r.href?n("span",{class:r.$style["cdr-rating__number"]},[r._v(r._s(r.rounded))]):r._e(),n("span",[r._v(r._s(r.formattedCount))]),r.compact?r._e():n("span",[r._v(" Reviews")])]):r._e(),r._v(" "),n("span",{staticClass:"cdr-sr-only"},[r._v("rated "+r._s(r.rounded)+" out of 5 with "+r._s(r.count)+" reviews")])])},e=[]},function(r,t,n){"use strict";var a=n(2);t.a={mixins:[a.a],props:{contentPriority:{type:String,default:"primary",validator:function(r){return["primary","secondary","tertiary"].indexOf(r)>=0||!1}}},computed:{contentPriorityClass:function(){return this.buildClass("contentPriority")}}}},function(r,t,n){"use strict";var a=n(10),e=n(2);t.a={mixins:[e.a],props:{size:{type:String,default:"medium",validator:function(r){return Object(a.a)(r,["small","medium","large"])}}},computed:{sizeClass:function(){return this.buildClass("size")}}}},function(r,t,n){"use strict";t.a=function(r,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.split(" ").every(function(r){var a=t.some(function(t){return n?r===t||r===t+"@xs"||r===t+"@sm"||r===t+"@md"||r===t+"@lg":r===t});return a||console.error("Invalid prop value: "+r),a})}},function(r,t,n){"use strict";t.a={props:{space:{type:String,default:""}}}},function(r,t,n){"use strict";var a=n(3),e=n.n(a);t.default=e.a},function(r,t,n){"use strict";t.a=function(r,t,n,a,e,i,s,c){var o,d="function"==typeof r?r.options:r;t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0);a&&(d.functional=!0);i&&(d._scopeId="data-v-"+i);s?(o=function(r){(r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(r=__VUE_SSR_CONTEXT__),e&&e.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(s)},d._ssrRegister=o):e&&(o=c?function(){e.call(this,this.$root.$options.shadowRoot)}:e);if(o)if(d.functional){d._injectStyles=o;var l=d.render;d.render=function(r,t){return o.call(t),l(r,t)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,o):[o]}return{exports:r,options:d}}}])}); | ||
!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CdrRating",[],t):"object"==typeof exports?exports.CdrRating=t():r.CdrRating=t()}("undefined"!=typeof self?self:this,function(){return function(r){var t={};function n(e){if(t[e])return t[e].exports;var a=t[e]={i:e,l:!1,exports:{}};return r[e].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=r,n.c=t,n.d=function(r,t,e){n.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="/",n(n.s=4)}([function(r,t,n){"use strict";var e=n(1);t.a=e.a},function(r,t,n){"use strict";var e=n(8),a=n(9),i=n(11);t.a={name:"CdrRating",mixins:[e.a,a.a,i.a],props:{rating:{required:!0,type:[String,Number],default:0},count:{required:!1,type:[String,Number],default:0},compact:{type:Boolean,default:!1},href:{type:String}},computed:{baseClass:function(){return"cdr-rating"},rounded:function(){return Math.round(4*this.rating)/4},whole:function(){return Math.floor(this.rounded)},remainder:function(){return this.rounded.toFixed(2).split(".")[1]},formattedCount:function(){return this.compact?"("+this.count+")":""+this.count}}}},function(r,t,n){"use strict";t.a={methods:{buildClass:function(r){var t=this,n="cdr";this.baseClass&&(n=this.baseClass);var e=n,a=this[r]?this[r].split(" "):[],i=[];return this.$style?(i.push(this.moduleClass(e)),i=i.concat(a.map(function(r){return t.modifyClassName(e,r)}))):(i.push(""+e),i=i.concat(a.map(function(r){return t.modifyClassName(e,r)}))),i.join(" ")},moduleClass:function(r){return this.$style[""+r]},modifyClassName:function(r,t){return this.$style?this.moduleClass(r+"--"+t):r+"--"+t}}}},function(r,t){r.exports={"cdr-rating":"cdr-rating_1.0.2","cdr-rating__icon":"cdr-rating__icon_1.0.2","cdr-rating__count":"cdr-rating__count_1.0.2","cdr-rating__ratings":"cdr-rating__ratings_1.0.2","cdr-rating__background":"cdr-rating__background_1.0.2","cdr-rating__placeholder":"cdr-rating__placeholder_1.0.2","cdr-rating__placeholder--no-reviews":"cdr-rating__placeholder--no-reviews_1.0.2","cdr-rating__100":"cdr-rating__100_1.0.2","cdr-rating__75":"cdr-rating__75_1.0.2","cdr-rating__50":"cdr-rating__50_1.0.2","cdr-rating__25":"cdr-rating__25_1.0.2","cdr-rating--linked":"cdr-rating--linked_1.0.2","cdr-rating__number":"cdr-rating__number_1.0.2","cdr-rating--large":"cdr-rating--large_1.0.2","cdr-rating--small":"cdr-rating--small_1.0.2","cdr-rating--primary":"cdr-rating--primary_1.0.2","cdr-rating--secondary":"cdr-rating--secondary_1.0.2","cdr-rating--small@xs":"cdr-rating--small@xs_1.0.2","cdr-rating--large@xs":"cdr-rating--large@xs_1.0.2","cdr-rating--small@sm":"cdr-rating--small@sm_1.0.2","cdr-rating--large@sm":"cdr-rating--large@sm_1.0.2","cdr-rating--small@md":"cdr-rating--small@md_1.0.2","cdr-rating--large@md":"cdr-rating--large@md_1.0.2","cdr-rating--small@lg":"cdr-rating--small@lg_1.0.2","cdr-rating--large@lg":"cdr-rating--large@lg_1.0.2"}},function(r,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=n(5);n.d(t,"CdrRating",function(){return e.a})},function(r,t,n){"use strict";var e=n(6),a=n(0),i=n(12),s=n(13);var c=Object(s.a)(a.a,e.a,e.b,!1,function(r){this.$style=i.default.locals||i.default},null,null);t.a=c.exports},function(r,t,n){"use strict";var e=n(7);n.d(t,"a",function(){return e.a}),n.d(t,"b",function(){return e.b})},function(r,t,n){"use strict";n.d(t,"a",function(){return e}),n.d(t,"b",function(){return a});var e=function(){var r=this,t=r.$createElement,n=r._self._c||t;return n(r.href?"a":"div",{tag:"component",class:[r.contentPriorityClass,r.sizeClass,r.space,r.href?r.$style["cdr-rating--linked"]:""],attrs:{href:r.href}},[n("div",{class:r.$style["cdr-rating__background"]},r._l(5,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.count>0?r.$style["cdr-rating__placeholder"]:r.$style["cdr-rating__placeholder--no-reviews"]],attrs:{"aria-hidden":"true"}})})),r._v(" "),n("div",{class:r.$style["cdr-rating__ratings"]},[r._l(r.whole,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__100"]],attrs:{"aria-hidden":"true"}})}),r._v(" "),"25"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__25"]],attrs:{"aria-hidden":"true"}}):"50"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__50"]],attrs:{"aria-hidden":"true"}}):"75"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__75"]],attrs:{"aria-hidden":"true"}}):r._e()],2),r._v(" "),r.count?n("span",{class:r.$style["cdr-rating__count"],attrs:{"aria-hidden":"true"}},[r.href?n("span",{class:r.$style["cdr-rating__number"]},[r._v(r._s(r.rounded))]):r._e(),n("span",[r._v(r._s(r.formattedCount))]),r.compact?r._e():n("span",[r._v(" Reviews")])]):r._e(),r._v(" "),n("span",{staticClass:"cdr-sr-only"},[r._v("rated "+r._s(r.rounded)+" out of 5 with "+r._s(r.count)+" reviews")])])},a=[]},function(r,t,n){"use strict";var e=n(2);t.a={mixins:[e.a],props:{contentPriority:{type:String,default:"primary",validator:function(r){return["primary","secondary","tertiary"].indexOf(r)>=0||!1}}},computed:{contentPriorityClass:function(){return this.buildClass("contentPriority")}}}},function(r,t,n){"use strict";var e=n(10),a=n(2);t.a={mixins:[a.a],props:{size:{type:String,default:"medium",validator:function(r){return Object(e.a)(r,["small","medium","large"])}}},computed:{sizeClass:function(){return this.buildClass("size")}}}},function(r,t,n){"use strict";t.a=function(r,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.split(" ").every(function(r){var e=t.some(function(t){return n?r===t||r===t+"@xs"||r===t+"@sm"||r===t+"@md"||r===t+"@lg":r===t});return e||console.error("Invalid prop value: "+r),e})}},function(r,t,n){"use strict";t.a={props:{space:{type:String,default:""}}}},function(r,t,n){"use strict";var e=n(3),a=n.n(e);t.default=a.a},function(r,t,n){"use strict";t.a=function(r,t,n,e,a,i,s,c){var o,d="function"==typeof r?r.options:r;t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0);e&&(d.functional=!0);i&&(d._scopeId="data-v-"+i);s?(o=function(r){(r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(r=__VUE_SSR_CONTEXT__),a&&a.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(s)},d._ssrRegister=o):a&&(o=c?function(){a.call(this,this.$root.$options.shadowRoot)}:a);if(o)if(d.functional){d._injectStyles=o;var u=d.render;d.render=function(r,t){return o.call(t),u(r,t)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,o):[o]}return{exports:r,options:d}}}])}); |
@@ -1,1 +0,1 @@ | ||
!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CdrRating",[],t):"object"==typeof exports?exports.CdrRating=t():r.CdrRating=t()}("undefined"!=typeof self?self:this,function(){return function(r){var t={};function n(a){if(t[a])return t[a].exports;var e=t[a]={i:a,l:!1,exports:{}};return r[a].call(e.exports,e,e.exports,n),e.l=!0,e.exports}return n.m=r,n.c=t,n.d=function(r,t,a){n.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="/",n(n.s=4)}([function(r,t,n){"use strict";var a=n(1);t.a=a.a},function(r,t,n){"use strict";var a=n(8),e=n(9),i=n(11);t.a={name:"CdrRating",mixins:[a.a,e.a,i.a],props:{rating:{required:!0,type:[String,Number],default:0},count:{required:!1,type:[String,Number],default:0},compact:{type:Boolean,default:!1},href:{type:String}},computed:{baseClass:function(){return"cdr-rating"},rounded:function(){return Math.round(4*this.rating)/4},whole:function(){return Math.floor(this.rounded)},remainder:function(){return this.rounded.toFixed(2).split(".")[1]},formattedCount:function(){return this.compact?"("+this.count+")":""+this.count}}}},function(r,t,n){"use strict";t.a={methods:{buildClass:function(r){var t=this,n="cdr";this.baseClass&&(n=this.baseClass);var a=n,e=this[r]?this[r].split(" "):[],i=[];return this.$style?(i.push(this.moduleClass(a)),i=i.concat(e.map(function(r){return t.modifyClassName(a,r)}))):(i.push(""+a),i=i.concat(e.map(function(r){return t.modifyClassName(a,r)}))),i.join(" ")},moduleClass:function(r){return this.$style[""+r]},modifyClassName:function(r,t){return this.$style?this.moduleClass(r+"--"+t):r+"--"+t}}}},function(r,t){r.exports={"cdr-rating":"cdr-rating_1.0.2-alpha.0","cdr-rating__icon":"cdr-rating__icon_1.0.2-alpha.0","cdr-rating__count":"cdr-rating__count_1.0.2-alpha.0","cdr-rating__ratings":"cdr-rating__ratings_1.0.2-alpha.0","cdr-rating__background":"cdr-rating__background_1.0.2-alpha.0","cdr-rating__placeholder":"cdr-rating__placeholder_1.0.2-alpha.0","cdr-rating__placeholder--no-reviews":"cdr-rating__placeholder--no-reviews_1.0.2-alpha.0","cdr-rating__100":"cdr-rating__100_1.0.2-alpha.0","cdr-rating__75":"cdr-rating__75_1.0.2-alpha.0","cdr-rating__50":"cdr-rating__50_1.0.2-alpha.0","cdr-rating__25":"cdr-rating__25_1.0.2-alpha.0","cdr-rating--linked":"cdr-rating--linked_1.0.2-alpha.0","cdr-rating__number":"cdr-rating__number_1.0.2-alpha.0","cdr-rating--large":"cdr-rating--large_1.0.2-alpha.0","cdr-rating--small":"cdr-rating--small_1.0.2-alpha.0","cdr-rating--primary":"cdr-rating--primary_1.0.2-alpha.0","cdr-rating--secondary":"cdr-rating--secondary_1.0.2-alpha.0","cdr-rating--small@xs":"cdr-rating--small@xs_1.0.2-alpha.0","cdr-rating--large@xs":"cdr-rating--large@xs_1.0.2-alpha.0","cdr-rating--small@sm":"cdr-rating--small@sm_1.0.2-alpha.0","cdr-rating--large@sm":"cdr-rating--large@sm_1.0.2-alpha.0","cdr-rating--small@md":"cdr-rating--small@md_1.0.2-alpha.0","cdr-rating--large@md":"cdr-rating--large@md_1.0.2-alpha.0","cdr-rating--small@lg":"cdr-rating--small@lg_1.0.2-alpha.0","cdr-rating--large@lg":"cdr-rating--large@lg_1.0.2-alpha.0"}},function(r,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(5);function e(r){r.component("cdr-rating",a.a)}"undefined"!=typeof window&&window.Vue&&window.Vue.use(e),t.default=e},function(r,t,n){"use strict";var a=n(6),e=n(0),i=n(12),s=n(13);var c=Object(s.a)(e.a,a.a,a.b,!1,function(r){this.$style=i.default.locals||i.default},null,null);t.a=c.exports},function(r,t,n){"use strict";var a=n(7);n.d(t,"a",function(){return a.a}),n.d(t,"b",function(){return a.b})},function(r,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return e});var a=function(){var r=this,t=r.$createElement,n=r._self._c||t;return n(r.href?"a":"div",{tag:"component",class:[r.contentPriorityClass,r.sizeClass,r.space,r.href?r.$style["cdr-rating--linked"]:""],attrs:{href:r.href}},[n("div",{class:r.$style["cdr-rating__background"]},r._l(5,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.count>0?r.$style["cdr-rating__placeholder"]:r.$style["cdr-rating__placeholder--no-reviews"]],attrs:{"aria-hidden":"true"}})})),r._v(" "),n("div",{class:r.$style["cdr-rating__ratings"]},[r._l(r.whole,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__100"]],attrs:{"aria-hidden":"true"}})}),r._v(" "),"25"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__25"]],attrs:{"aria-hidden":"true"}}):"50"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__50"]],attrs:{"aria-hidden":"true"}}):"75"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__75"]],attrs:{"aria-hidden":"true"}}):r._e()],2),r._v(" "),r.count?n("span",{class:r.$style["cdr-rating__count"],attrs:{"aria-hidden":"true"}},[r.href?n("span",{class:r.$style["cdr-rating__number"]},[r._v(r._s(r.rounded))]):r._e(),n("span",[r._v(r._s(r.formattedCount))]),r.compact?r._e():n("span",[r._v(" Reviews")])]):r._e(),r._v(" "),n("span",{staticClass:"cdr-sr-only"},[r._v("rated "+r._s(r.rounded)+" out of 5 with "+r._s(r.count)+" reviews")])])},e=[]},function(r,t,n){"use strict";var a=n(2);t.a={mixins:[a.a],props:{contentPriority:{type:String,default:"primary",validator:function(r){return["primary","secondary","tertiary"].indexOf(r)>=0||!1}}},computed:{contentPriorityClass:function(){return this.buildClass("contentPriority")}}}},function(r,t,n){"use strict";var a=n(10),e=n(2);t.a={mixins:[e.a],props:{size:{type:String,default:"medium",validator:function(r){return Object(a.a)(r,["small","medium","large"])}}},computed:{sizeClass:function(){return this.buildClass("size")}}}},function(r,t,n){"use strict";t.a=function(r,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.split(" ").every(function(r){var a=t.some(function(t){return n?r===t||r===t+"@xs"||r===t+"@sm"||r===t+"@md"||r===t+"@lg":r===t});return a||console.error("Invalid prop value: "+r),a})}},function(r,t,n){"use strict";t.a={props:{space:{type:String,default:""}}}},function(r,t,n){"use strict";var a=n(3),e=n.n(a);t.default=e.a},function(r,t,n){"use strict";t.a=function(r,t,n,a,e,i,s,c){var o,d="function"==typeof r?r.options:r;t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0);a&&(d.functional=!0);i&&(d._scopeId="data-v-"+i);s?(o=function(r){(r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(r=__VUE_SSR_CONTEXT__),e&&e.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(s)},d._ssrRegister=o):e&&(o=c?function(){e.call(this,this.$root.$options.shadowRoot)}:e);if(o)if(d.functional){d._injectStyles=o;var l=d.render;d.render=function(r,t){return o.call(t),l(r,t)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,o):[o]}return{exports:r,options:d}}}])}); | ||
!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CdrRating",[],t):"object"==typeof exports?exports.CdrRating=t():r.CdrRating=t()}("undefined"!=typeof self?self:this,function(){return function(r){var t={};function n(e){if(t[e])return t[e].exports;var a=t[e]={i:e,l:!1,exports:{}};return r[e].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=r,n.c=t,n.d=function(r,t,e){n.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="/",n(n.s=4)}([function(r,t,n){"use strict";var e=n(1);t.a=e.a},function(r,t,n){"use strict";var e=n(8),a=n(9),i=n(11);t.a={name:"CdrRating",mixins:[e.a,a.a,i.a],props:{rating:{required:!0,type:[String,Number],default:0},count:{required:!1,type:[String,Number],default:0},compact:{type:Boolean,default:!1},href:{type:String}},computed:{baseClass:function(){return"cdr-rating"},rounded:function(){return Math.round(4*this.rating)/4},whole:function(){return Math.floor(this.rounded)},remainder:function(){return this.rounded.toFixed(2).split(".")[1]},formattedCount:function(){return this.compact?"("+this.count+")":""+this.count}}}},function(r,t,n){"use strict";t.a={methods:{buildClass:function(r){var t=this,n="cdr";this.baseClass&&(n=this.baseClass);var e=n,a=this[r]?this[r].split(" "):[],i=[];return this.$style?(i.push(this.moduleClass(e)),i=i.concat(a.map(function(r){return t.modifyClassName(e,r)}))):(i.push(""+e),i=i.concat(a.map(function(r){return t.modifyClassName(e,r)}))),i.join(" ")},moduleClass:function(r){return this.$style[""+r]},modifyClassName:function(r,t){return this.$style?this.moduleClass(r+"--"+t):r+"--"+t}}}},function(r,t){r.exports={"cdr-rating":"cdr-rating_1.0.2","cdr-rating__icon":"cdr-rating__icon_1.0.2","cdr-rating__count":"cdr-rating__count_1.0.2","cdr-rating__ratings":"cdr-rating__ratings_1.0.2","cdr-rating__background":"cdr-rating__background_1.0.2","cdr-rating__placeholder":"cdr-rating__placeholder_1.0.2","cdr-rating__placeholder--no-reviews":"cdr-rating__placeholder--no-reviews_1.0.2","cdr-rating__100":"cdr-rating__100_1.0.2","cdr-rating__75":"cdr-rating__75_1.0.2","cdr-rating__50":"cdr-rating__50_1.0.2","cdr-rating__25":"cdr-rating__25_1.0.2","cdr-rating--linked":"cdr-rating--linked_1.0.2","cdr-rating__number":"cdr-rating__number_1.0.2","cdr-rating--large":"cdr-rating--large_1.0.2","cdr-rating--small":"cdr-rating--small_1.0.2","cdr-rating--primary":"cdr-rating--primary_1.0.2","cdr-rating--secondary":"cdr-rating--secondary_1.0.2","cdr-rating--small@xs":"cdr-rating--small@xs_1.0.2","cdr-rating--large@xs":"cdr-rating--large@xs_1.0.2","cdr-rating--small@sm":"cdr-rating--small@sm_1.0.2","cdr-rating--large@sm":"cdr-rating--large@sm_1.0.2","cdr-rating--small@md":"cdr-rating--small@md_1.0.2","cdr-rating--large@md":"cdr-rating--large@md_1.0.2","cdr-rating--small@lg":"cdr-rating--small@lg_1.0.2","cdr-rating--large@lg":"cdr-rating--large@lg_1.0.2"}},function(r,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=n(5);function a(r){r.component("cdr-rating",e.a)}"undefined"!=typeof window&&window.Vue&&window.Vue.use(a),t.default=a},function(r,t,n){"use strict";var e=n(6),a=n(0),i=n(12),s=n(13);var c=Object(s.a)(a.a,e.a,e.b,!1,function(r){this.$style=i.default.locals||i.default},null,null);t.a=c.exports},function(r,t,n){"use strict";var e=n(7);n.d(t,"a",function(){return e.a}),n.d(t,"b",function(){return e.b})},function(r,t,n){"use strict";n.d(t,"a",function(){return e}),n.d(t,"b",function(){return a});var e=function(){var r=this,t=r.$createElement,n=r._self._c||t;return n(r.href?"a":"div",{tag:"component",class:[r.contentPriorityClass,r.sizeClass,r.space,r.href?r.$style["cdr-rating--linked"]:""],attrs:{href:r.href}},[n("div",{class:r.$style["cdr-rating__background"]},r._l(5,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.count>0?r.$style["cdr-rating__placeholder"]:r.$style["cdr-rating__placeholder--no-reviews"]],attrs:{"aria-hidden":"true"}})})),r._v(" "),n("div",{class:r.$style["cdr-rating__ratings"]},[r._l(r.whole,function(t){return n("span",{key:t,class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__100"]],attrs:{"aria-hidden":"true"}})}),r._v(" "),"25"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__25"]],attrs:{"aria-hidden":"true"}}):"50"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__50"]],attrs:{"aria-hidden":"true"}}):"75"===r.remainder?n("span",{class:[r.$style["cdr-rating__icon"],r.$style["cdr-rating__75"]],attrs:{"aria-hidden":"true"}}):r._e()],2),r._v(" "),r.count?n("span",{class:r.$style["cdr-rating__count"],attrs:{"aria-hidden":"true"}},[r.href?n("span",{class:r.$style["cdr-rating__number"]},[r._v(r._s(r.rounded))]):r._e(),n("span",[r._v(r._s(r.formattedCount))]),r.compact?r._e():n("span",[r._v(" Reviews")])]):r._e(),r._v(" "),n("span",{staticClass:"cdr-sr-only"},[r._v("rated "+r._s(r.rounded)+" out of 5 with "+r._s(r.count)+" reviews")])])},a=[]},function(r,t,n){"use strict";var e=n(2);t.a={mixins:[e.a],props:{contentPriority:{type:String,default:"primary",validator:function(r){return["primary","secondary","tertiary"].indexOf(r)>=0||!1}}},computed:{contentPriorityClass:function(){return this.buildClass("contentPriority")}}}},function(r,t,n){"use strict";var e=n(10),a=n(2);t.a={mixins:[a.a],props:{size:{type:String,default:"medium",validator:function(r){return Object(e.a)(r,["small","medium","large"])}}},computed:{sizeClass:function(){return this.buildClass("size")}}}},function(r,t,n){"use strict";t.a=function(r,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.split(" ").every(function(r){var e=t.some(function(t){return n?r===t||r===t+"@xs"||r===t+"@sm"||r===t+"@md"||r===t+"@lg":r===t});return e||console.error("Invalid prop value: "+r),e})}},function(r,t,n){"use strict";t.a={props:{space:{type:String,default:""}}}},function(r,t,n){"use strict";var e=n(3),a=n.n(e);t.default=a.a},function(r,t,n){"use strict";t.a=function(r,t,n,e,a,i,s,c){var o,d="function"==typeof r?r.options:r;t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0);e&&(d.functional=!0);i&&(d._scopeId="data-v-"+i);s?(o=function(r){(r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(r=__VUE_SSR_CONTEXT__),a&&a.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(s)},d._ssrRegister=o):a&&(o=c?function(){a.call(this,this.$root.$options.shadowRoot)}:a);if(o)if(d.functional){d._injectStyles=o;var u=d.render;d.render=function(r,t){return o.call(t),u(r,t)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,o):[o]}return{exports:r,options:d}}}])}); |
{ | ||
"name": "@rei/cdr-rating", | ||
"version": "1.0.2-alpha.0", | ||
"version": "1.0.2", | ||
"author": "REI Software Engineering", | ||
@@ -5,0 +5,0 @@ "description": "REI Cedar Style Framework - Vue Component for Rating", |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
1
28935
1