@uifabric/merge-styles
Advanced tools
Comparing version 5.9.0 to 5.10.0
@@ -5,2 +5,16 @@ { | ||
{ | ||
"version": "5.10.0", | ||
"tag": "@uifabric/merge-styles_v5.10.0", | ||
"date": "Thu, 28 Dec 2017 11:23:50 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "Jakob Werner <jaxxx_w@yahoo.com>", | ||
"commit": "e5c7d91dff4a37f5d6dabe3ac461afd644804d37", | ||
"comment": "Added a setting to Stylesheet which allows overriding the default prefix" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "5.9.0", | ||
@@ -7,0 +21,0 @@ "tag": "@uifabric/merge-styles_v5.9.0", |
# Change Log - @uifabric/merge-styles | ||
This log was last generated on Sat, 16 Dec 2017 05:07:22 GMT and should not be manually modified. | ||
This log was last generated on Thu, 28 Dec 2017 11:23:50 GMT and should not be manually modified. | ||
## 5.10.0 | ||
Thu, 28 Dec 2017 11:23:50 GMT | ||
### Minor changes | ||
- Added a setting to Stylesheet which allows overriding the default prefix | ||
## 5.9.0 | ||
@@ -6,0 +13,0 @@ Sat, 16 Dec 2017 05:07:22 GMT |
@@ -106,3 +106,3 @@ var MergeStyles = | ||
function Stylesheet(config) { | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */ }, config); | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
@@ -136,3 +136,3 @@ } | ||
Stylesheet.prototype.getClassName = function (displayName) { | ||
var prefix = displayName || 'css'; | ||
var prefix = displayName || this._config.defaultPrefix; | ||
return prefix + "-" + this._counter++; | ||
@@ -139,0 +139,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
var MergeStyles=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=document.createElement("style");return t.setAttribute("data-merge-styles","true"),t.type="text/css",e&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var i,s=function(){function e(e){this._config=o.__assign({injectionMode:1},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(i=t.__stylesheet__)){var r=t&&t.FabricConfig||{};i=t.__stylesheet__=new e(r.mergeStyles)}return i},e.prototype.setConfig=function(e){this._config=o.__assign({},this._config,e)},e.prototype.getClassName=function(e){return(e||"css")+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e){var t=this._getElement();switch(t?this._config.injectionMode:0){case 1:var r=t.sheet;try{r.insertRule(e,r.cssRules.length)}catch(e){}break;case 2:n(e);break;default:this._rules.push(e)}this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(){return(this._rules.join("")||"")+(this._rulesToInsert.join("")||"")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._timerId&&(clearTimeout(this._timerId),this._timerId=0)},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=n()),this._styleElement},e}();t.Stylesheet=s},function(e,t,r){"use strict";function n(e){var t=e&&e["&"];return t?t.displayName:void 0}function o(e,t,r){void 0===t&&(t={__order:[]}),void 0===r&&(r="&");var n=f.Stylesheet.getInstance(),s=t[r];s||(s={},t[r]=s,t.__order.push(r));for(var a=0,u=e;a<u.length;a++){var c=u[a];if("string"==typeof c){var l=n.argsFromClassName(c);l&&o(l,t,r)}else if(Array.isArray(c))o(c,t,r);else for(var p in c)if("selectors"===p){var y=c.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf("@media")?d=d+"{"+r:0===d.indexOf(":")?d=r+d:d.indexOf("&")<0&&(d=r+" "+d),o([v],t,d)}}else"margin"===p||"padding"===p?i(s,p,c[p]):s[p]=c[p]}return t}function i(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function s(e){for(var t=[],r=!1,n=0,o=e.__order;n<o.length;n++){var i=o[n];t.push(i);var s=e[i];for(var a in s)s.hasOwnProperty(a)&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}function a(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==h&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)p.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),y.prefixRules(t,n);for(var n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o(e),i=s(r);if(i){var u=f.Stylesheet.getInstance(),c={className:u.classNameFromKey(i),key:i,args:e};if(!c.className){c.className=u.getClassName(n(r));for(var l=[],p=0,y=r.__order;p<y.length;p++){var d=y[p];l.push(d,a(r[d]))}c.rulesToInsert=l}return c}}function c(e,t){var r=f.Stylesheet.getInstance(),n=e.className,o=e.key,i=e.args,s=e.rulesToInsert;if(s){for(var a=0;a<s.length;a+=2){var u=s[a+1];if(u){var c=s[a];c=c.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""});var l=c+"{"+u+"}"+(0===c.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(n,o,i,s)}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.apply(void 0,e);return r?(c(r),r.className):""}Object.defineProperty(t,"__esModule",{value:!0});var f=r(0),p=r(7),y=r(8),d=r(10),v=r(11),h="displayName";t.serializeRuleEntries=a,t.styleToRegistration=u,t.applyRegistration=c,t.styleToClassName=l},function(e,t,r){"use strict";function n(){function e(t){for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=s.argsFromClassName(a);u?e(u):-1===n.indexOf(a)&&n.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&i.push(a)}}for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[],i=[],s=o.Stylesheet.getInstance();return e(t),{classes:n,objects:i}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);t.extractStyleParts=n},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,o=e;n<o.length;n++){var i=o[n];if(i)for(var s in i)if(i.hasOwnProperty(s)){var a=r[s],u=i[s];r[s]=void 0===a?u:(Array.isArray(a)?a:[a]).concat(Array.isArray(u)?u:[u])}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.mergeStyles=n.mergeStyles;var o=r(12);t.mergeStyleSets=o.mergeStyleSets;var i=r(3);t.concatStyleSets=i.concatStyleSets;var s=r(13);t.fontFace=s.fontFace;var a=r(14);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.extractStyleParts(e),n=r.classes,s=r.objects;return s.length&&n.push(o.styleToClassName(s)),n.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(2);t.mergeStyles=n},function(e,t,r){"use strict";function n(e,t){function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]]);return r}function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,a)}u((n=n.apply(e,t||[])).next())})}function c(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function l(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function v(e,t,r){function n(e){l[e]&&(c[e]=function(t){return new Promise(function(r,n){f.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(e){u(f[0][3],e)}}function i(e){e.value instanceof d?Promise.resolve(e.value.v).then(s,a):u(f[0][2],e)}function s(e){o("next",e)}function a(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=r.apply(e,t||[]),f=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c}function h(e){function t(t,o){e[t]&&(r[t]=function(r){return(n=!n)?{value:d(e[t](r)),done:"return"===t}:o?o(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof f?f(e):e[Symbol.iterator]()}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=n,r.d(t,"__assign",function(){return b}),t.__rest=o,t.__decorate=i,t.__param=s,t.__metadata=a,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=f,t.__read=p,t.__spread=y,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=g,t.__makeTemplateObject=_;/*! ***************************************************************************** | ||
var MergeStyles=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=document.createElement("style");return t.setAttribute("data-merge-styles","true"),t.type="text/css",e&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var i,s=function(){function e(e){this._config=o.__assign({injectionMode:1,defaultPrefix:"css"},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(i=t.__stylesheet__)){var r=t&&t.FabricConfig||{};i=t.__stylesheet__=new e(r.mergeStyles)}return i},e.prototype.setConfig=function(e){this._config=o.__assign({},this._config,e)},e.prototype.getClassName=function(e){return(e||this._config.defaultPrefix)+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e){var t=this._getElement();switch(t?this._config.injectionMode:0){case 1:var r=t.sheet;try{r.insertRule(e,r.cssRules.length)}catch(e){}break;case 2:n(e);break;default:this._rules.push(e)}this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(){return(this._rules.join("")||"")+(this._rulesToInsert.join("")||"")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._timerId&&(clearTimeout(this._timerId),this._timerId=0)},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=n()),this._styleElement},e}();t.Stylesheet=s},function(e,t,r){"use strict";function n(e){var t=e&&e["&"];return t?t.displayName:void 0}function o(e,t,r){void 0===t&&(t={__order:[]}),void 0===r&&(r="&");var n=f.Stylesheet.getInstance(),s=t[r];s||(s={},t[r]=s,t.__order.push(r));for(var a=0,u=e;a<u.length;a++){var c=u[a];if("string"==typeof c){var l=n.argsFromClassName(c);l&&o(l,t,r)}else if(Array.isArray(c))o(c,t,r);else for(var p in c)if("selectors"===p){var y=c.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf("@media")?d=d+"{"+r:0===d.indexOf(":")?d=r+d:d.indexOf("&")<0&&(d=r+" "+d),o([v],t,d)}}else"margin"===p||"padding"===p?i(s,p,c[p]):s[p]=c[p]}return t}function i(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function s(e){for(var t=[],r=!1,n=0,o=e.__order;n<o.length;n++){var i=o[n];t.push(i);var s=e[i];for(var a in s)s.hasOwnProperty(a)&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}function a(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==h&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)p.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),y.prefixRules(t,n);for(var n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o(e),i=s(r);if(i){var u=f.Stylesheet.getInstance(),c={className:u.classNameFromKey(i),key:i,args:e};if(!c.className){c.className=u.getClassName(n(r));for(var l=[],p=0,y=r.__order;p<y.length;p++){var d=y[p];l.push(d,a(r[d]))}c.rulesToInsert=l}return c}}function c(e,t){var r=f.Stylesheet.getInstance(),n=e.className,o=e.key,i=e.args,s=e.rulesToInsert;if(s){for(var a=0;a<s.length;a+=2){var u=s[a+1];if(u){var c=s[a];c=c.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""});var l=c+"{"+u+"}"+(0===c.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(n,o,i,s)}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.apply(void 0,e);return r?(c(r),r.className):""}Object.defineProperty(t,"__esModule",{value:!0});var f=r(0),p=r(7),y=r(8),d=r(10),v=r(11),h="displayName";t.serializeRuleEntries=a,t.styleToRegistration=u,t.applyRegistration=c,t.styleToClassName=l},function(e,t,r){"use strict";function n(){function e(t){for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=s.argsFromClassName(a);u?e(u):-1===n.indexOf(a)&&n.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&i.push(a)}}for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[],i=[],s=o.Stylesheet.getInstance();return e(t),{classes:n,objects:i}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);t.extractStyleParts=n},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,o=e;n<o.length;n++){var i=o[n];if(i)for(var s in i)if(i.hasOwnProperty(s)){var a=r[s],u=i[s];r[s]=void 0===a?u:(Array.isArray(a)?a:[a]).concat(Array.isArray(u)?u:[u])}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.mergeStyles=n.mergeStyles;var o=r(12);t.mergeStyleSets=o.mergeStyleSets;var i=r(3);t.concatStyleSets=i.concatStyleSets;var s=r(13);t.fontFace=s.fontFace;var a=r(14);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.extractStyleParts(e),n=r.classes,s=r.objects;return s.length&&n.push(o.styleToClassName(s)),n.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(2);t.mergeStyles=n},function(e,t,r){"use strict";function n(e,t){function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]]);return r}function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,a)}u((n=n.apply(e,t||[])).next())})}function c(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function l(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function v(e,t,r){function n(e){l[e]&&(c[e]=function(t){return new Promise(function(r,n){f.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(e){u(f[0][3],e)}}function i(e){e.value instanceof d?Promise.resolve(e.value.v).then(s,a):u(f[0][2],e)}function s(e){o("next",e)}function a(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=r.apply(e,t||[]),f=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c}function h(e){function t(t,o){e[t]&&(r[t]=function(r){return(n=!n)?{value:d(e[t](r)),done:"return"===t}:o?o(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof f?f(e):e[Symbol.iterator]()}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=n,r.d(t,"__assign",function(){return b}),t.__rest=o,t.__decorate=i,t.__param=s,t.__metadata=a,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=f,t.__read=p,t.__spread=y,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=g,t.__makeTemplateObject=_;/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
@@ -3,0 +3,0 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
@@ -31,2 +31,6 @@ import { IStyle } from './IStyle'; | ||
injectionMode?: InjectionMode; | ||
/** | ||
* Falls back to "css". | ||
*/ | ||
defaultPrefix?: string; | ||
onInsertRule?: (rule: string) => void; | ||
@@ -33,0 +37,0 @@ } |
@@ -35,3 +35,3 @@ define(["require", "exports", "tslib"], function (require, exports, tslib_1) { | ||
function Stylesheet(config) { | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */ }, config); | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
@@ -65,3 +65,3 @@ } | ||
Stylesheet.prototype.getClassName = function (displayName) { | ||
var prefix = displayName || 'css'; | ||
var prefix = displayName || this._config.defaultPrefix; | ||
return prefix + "-" + this._counter++; | ||
@@ -68,0 +68,0 @@ }; |
@@ -31,2 +31,6 @@ import { IStyle } from './IStyle'; | ||
injectionMode?: InjectionMode; | ||
/** | ||
* Falls back to "css". | ||
*/ | ||
defaultPrefix?: string; | ||
onInsertRule?: (rule: string) => void; | ||
@@ -33,0 +37,0 @@ } |
@@ -33,3 +33,3 @@ import * as tslib_1 from "tslib"; | ||
function Stylesheet(config) { | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */ }, config); | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
@@ -63,3 +63,3 @@ } | ||
Stylesheet.prototype.getClassName = function (displayName) { | ||
var prefix = displayName || 'css'; | ||
var prefix = displayName || this._config.defaultPrefix; | ||
return prefix + "-" + this._counter++; | ||
@@ -66,0 +66,0 @@ }; |
@@ -31,2 +31,6 @@ import { IStyle } from './IStyle'; | ||
injectionMode?: InjectionMode; | ||
/** | ||
* Falls back to "css". | ||
*/ | ||
defaultPrefix?: string; | ||
onInsertRule?: (rule: string) => void; | ||
@@ -33,0 +37,0 @@ } |
@@ -35,3 +35,3 @@ "use strict"; | ||
function Stylesheet(config) { | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */ }, config); | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
@@ -65,3 +65,3 @@ } | ||
Stylesheet.prototype.getClassName = function (displayName) { | ||
var prefix = displayName || 'css'; | ||
var prefix = displayName || this._config.defaultPrefix; | ||
return prefix + "-" + this._counter++; | ||
@@ -68,0 +68,0 @@ }; |
@@ -5,4 +5,4 @@ { | ||
"packages/merge-styles/.npmrc": "825c83e09df4dad076d980d1236c532d689edf75", | ||
"packages/merge-styles/CHANGELOG.json": "0b754a56d298d71a0d86d479f00305414163ae51", | ||
"packages/merge-styles/CHANGELOG.md": "0ea0a14369ea5419c1442f3c067227697956f5c6", | ||
"packages/merge-styles/CHANGELOG.json": "82a38d45087dca44ba4b627685dc05d2b475e4c8", | ||
"packages/merge-styles/CHANGELOG.md": "d929c78ca1bfe1e7d8a0e7bffeaeb0e47729fe84", | ||
"packages/merge-styles/LICENSE": "310f6231e35c591f17680ffd2f5d4daea754e1f6", | ||
@@ -13,7 +13,8 @@ "packages/merge-styles/README.md": "7cceed7041b1629db1306aa064cf6fe2ba73bb33", | ||
"packages/merge-styles/jest.config.js": "a92c71220a900a5366be5af2cb98d273f3b697d4", | ||
"packages/merge-styles/package.json": "fee3b17b70dbe5eda0c78475a4417896c9c85e69", | ||
"packages/merge-styles/package.json": "c5e826d789b88127711f236554ee21abcadafafa", | ||
"packages/merge-styles/src/IRawStyleBase.ts": "7eec66334a749262d8bad97a6014314802383260", | ||
"packages/merge-styles/src/IStyle.ts": "770aa641a178f4ade3e75c36c663919cb65d00f9", | ||
"packages/merge-styles/src/IStyleSet.ts": "82926ab5b49a81a0b4e55f47b1f03f55bdbb4a9e", | ||
"packages/merge-styles/src/Stylesheet.ts": "bc92184fc47d016fa8efcbde7f698118c4ce9e1e", | ||
"packages/merge-styles/src/Stylesheet.test.ts": "cdc9f0c02bc50acd2b6a27baf555609e6f2326b9", | ||
"packages/merge-styles/src/Stylesheet.ts": "594a4acd03a14de1acc80752f274384e2798b9d4", | ||
"packages/merge-styles/src/concatStyleSets.test.ts": "2e39f2d1305f051655db238528fc50796646187a", | ||
@@ -20,0 +21,0 @@ "packages/merge-styles/src/concatStyleSets.ts": "6068fa557682ef2bd5746004b5e0b568bb7171b9", |
{ | ||
"name": "@uifabric/merge-styles", | ||
"version": "5.9.0", | ||
"version": "5.10.0", | ||
"description": "Office UI Fabric style loading utilities.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
969873
10593