@uifabric/merge-styles
Advanced tools
Comparing version 5.14.0 to 5.14.1
@@ -5,2 +5,16 @@ { | ||
{ | ||
"version": "5.14.1", | ||
"tag": "@uifabric/merge-styles_v5.14.1", | ||
"date": "Fri, 06 Apr 2018 10:25:55 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "David Zearing <dzearing@microsoft.com>", | ||
"commit": "22604406e2cba799fca243348ac8ec87ae0f6102", | ||
"comment": "mergeStyles: flipping RTL at runtime now resets the keys." | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "5.14.0", | ||
@@ -7,0 +21,0 @@ "tag": "@uifabric/merge-styles_v5.14.0", |
# Change Log - @uifabric/merge-styles | ||
This log was last generated on Sun, 25 Mar 2018 03:08:03 GMT and should not be manually modified. | ||
This log was last generated on Fri, 06 Apr 2018 10:25:55 GMT and should not be manually modified. | ||
## 5.14.1 | ||
Fri, 06 Apr 2018 10:25:55 GMT | ||
### Patches | ||
- mergeStyles: flipping RTL at runtime now resets the keys. | ||
## 5.14.0 | ||
@@ -6,0 +13,0 @@ Sun, 25 Mar 2018 03:08:03 GMT |
@@ -76,5 +76,5 @@ var MergeStyles = | ||
/***/ "../../common/temp/node_modules/tslib/tslib.es6.js": | ||
/*!************************************************************************!*\ | ||
!*** D:/agent/1/_work/7/s/common/temp/node_modules/tslib/tslib.es6.js ***! | ||
\************************************************************************/ | ||
/*!*************************************************************************!*\ | ||
!*** D:/agent/5/_work/15/s/common/temp/node_modules/tslib/tslib.es6.js ***! | ||
\*************************************************************************/ | ||
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */ | ||
@@ -328,4 +328,9 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
function Stylesheet(config) { | ||
this._rules = []; | ||
this._rulesToInsert = []; | ||
this._counter = 0; | ||
this._keyToClassName = {}; | ||
// tslint:disable-next-line:no-any | ||
this._classNameToArgs = {}; | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
} | ||
@@ -440,7 +445,7 @@ /** | ||
this._keyToClassName = {}; | ||
if (this._timerId) { | ||
clearTimeout(this._timerId); | ||
this._timerId = 0; | ||
} | ||
}; | ||
// Forces the regeneration of incoming styles without totally resetting the stylesheet. | ||
Stylesheet.prototype.resetKeys = function () { | ||
this._keyToClassName = {}; | ||
}; | ||
Stylesheet.prototype._getElement = function () { | ||
@@ -1112,2 +1117,3 @@ if (!this._styleElement && typeof document !== 'undefined') { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Stylesheet_1 = __webpack_require__(/*! ../Stylesheet */ "./lib/Stylesheet.js"); | ||
var LEFT = 'left'; | ||
@@ -1130,3 +1136,6 @@ var RIGHT = 'right'; | ||
function setRTL(isRTL) { | ||
_rtl = isRTL; | ||
if (_rtl !== isRTL) { | ||
Stylesheet_1.Stylesheet.getInstance().resetKeys(); | ||
_rtl = isRTL; | ||
} | ||
} | ||
@@ -1133,0 +1142,0 @@ exports.setRTL = setRTL; |
@@ -1,2 +0,2 @@ | ||
var MergeStyles=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var o,i=function(){function e(e){this._config=n.__assign({injectionMode:1,defaultPrefix:"css"},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(o=t.__stylesheet__)){var r=t&&t.FabricConfig||{};o=t.__stylesheet__=new e(r.mergeStyles)}return o},e.prototype.setConfig=function(e){this._config=n.__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:s(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=s()),this._styleElement},e}();function s(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}t.Stylesheet=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(11),i=r(10),s=r(8),a=r(7),u="displayName";function c(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 f(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==u&&void 0!==e[r]&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)o.kebabRules(t,n),s.provideUnits(t,n),a.rtlifyRules(t,n),i.prefixRules(t,n);for(n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function e(t,r,o){void 0===r&&(r={__order:[]}),void 0===o&&(o="&");var i=n.Stylesheet.getInstance(),s=r[o];s||(s={},r[o]=s,r.__order.push(o));for(var a=0,u=t;a<u.length;a++){var f=u[a];if("string"==typeof f){var l=i.argsFromClassName(f);l&&e(l,r,o)}else if(Array.isArray(f))e(f,r,o);else for(var p in f)if("selectors"===p){var d=f.selectors;for(var y in d)if(d.hasOwnProperty(y)){var v=d[y];0===y.indexOf(":global(")?y=y.replace(/:global\(|\)$/g,""):0===y.indexOf("@media")?y=y+"{"+o:0===y.indexOf(":")?y=o+y:y.indexOf("&")<0&&(y=o+" "+y),e([v],r,y)}}else"margin"===p||"padding"===p?c(s,p,f[p]):s[p]=f[p]}return r}(e),o=function(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)&&void 0!==s[a]&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}(r);if(o){var i=n.Stylesheet.getInstance(),s={className:i.classNameFromKey(o),key:o,args:e};if(!s.className){s.className=i.getClassName(function(e){var t=e&&e["&"];return t?t.displayName:void 0}(r));for(var a=[],u=0,l=r.__order;u<l.length;u++){var p=l[u];a.push(p,f(r[p]))}s.rulesToInsert=a}return s}}function p(e,t){var r=n.Stylesheet.getInstance(),o=e.className,i=e.key,s=e.args,a=e.rulesToInsert;if(a){for(var u=0;u<a.length;u+=2){var c=a[u+1];if(c){var f=a[u],l=(f=f.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""}))+"{"+c+"}"+(0===f.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(o,i,s,a)}}t.serializeRuleEntries=f,t.styleToRegistration=l,t.applyRegistration=p,t.styleToClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.apply(void 0,e);return r?(p(r),r.className):""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=function(){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}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.extractStyleParts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=[],o=[],i=n.Stylesheet.getInstance();return function e(t){for(var n=0,s=t;n<s.length;n++){var a=s[n];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=i.argsFromClassName(a);u?e(u):-1===r.indexOf(a)&&r.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&o.push(a)}}(e),{classes:r,objects:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1);t.keyframes=function(e){var t=n.Stylesheet.getInstance(),r=t.getClassName(),i=[];for(var s in e)e.hasOwnProperty(s)&&i.push(s,"{",o.serializeRuleEntries(e[s]),"}");var a=i.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1);t.fontFace=function(e){n.Stylesheet.getInstance().insertRule("@font-face{"+o.serializeRuleEntries(e)+"}")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(2),i=r(1);t.mergeStyleSets=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},s={},a=e[0];if(a){e.length>1&&(a=o.concatStyleSets.apply(void 0,e));var u=[];for(var c in a)if(a.hasOwnProperty(c)){var f=a[c],l=n.extractStyleParts(f),p=l.classes,d=l.objects,y=i.styleToRegistration({displayName:c},d);u.push(y),y&&(s[c]=y.className,r[c]=p.concat([y.className]).join(" "))}for(var v=0,h=u;v<h.length;v++)(y=h[v])&&i.applyRegistration(y,s)}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o="left",i="right",s="@noflip",a=((n={})[o]=i,n[i]=o,n),u={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},c=f();function f(){return void 0===c&&(c="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),c}t.setRTL=function(e){c=e},t.getRTL=f,t.rtlifyRules=function(e,t){if(f()){var r=e[t];if(!r)return;var n=e[t+1];if("string"==typeof n&&n.indexOf(s)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf(o)>=0)e[t]=r.replace(o,i);else if(r.indexOf(i)>=0)e[t]=r.replace(i,o);else if(String(n).indexOf(o)>=0)e[t+1]=n.replace(o,i);else if(String(n).indexOf(i)>=0)e[t+1]=n.replace(i,o);else if(a[r])e[t]=a[r];else if(u[n])e[t+1]=u[n];else switch(r){case"margin":case"padding":e[t+1]=function(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}(n);break;case"box-shadow":e[t+1]=function(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}(n,0)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];t.provideUnits=function(e,t){var r=e[t],o=e[t+1];if("number"==typeof o){var i=-1===n.indexOf(r)?"px":"";e[t+1]=""+o+i}}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.getVendorSettings=function(){if(!n){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;n=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return n},t.setVendorSettings=function(e){n=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o={"user-select":1};t.prefixRules=function(e,t){var r=n.getVendorSettings(),i=e[t];if(o[i]){var s=e[t+1];o[i]&&(r.isWebkit&&e.push("-webkit-"+i,s),r.isMoz&&e.push("-moz-"+i,s),r.isMs&&e.push("-ms-"+i,s),r.isOpera&&e.push("-o-"+i,s))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=function(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",function(){return o}),r.d(t,"__assign",function(){return i}),r.d(t,"__rest",function(){return s}),r.d(t,"__decorate",function(){return a}),r.d(t,"__param",function(){return u}),r.d(t,"__metadata",function(){return c}),r.d(t,"__awaiter",function(){return f}),r.d(t,"__generator",function(){return l}),r.d(t,"__exportStar",function(){return p}),r.d(t,"__values",function(){return d}),r.d(t,"__read",function(){return y}),r.d(t,"__spread",function(){return v}),r.d(t,"__await",function(){return h}),r.d(t,"__asyncGenerator",function(){return _}),r.d(t,"__asyncDelegator",function(){return g}),r.d(t,"__asyncValues",function(){return m}),r.d(t,"__makeTemplateObject",function(){return b}),r.d(t,"__importStar",function(){return O}),r.d(t,"__importDefault",function(){return w}); | ||
var MergeStyles=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var o,i=function(){function e(e){this._rules=[],this._rulesToInsert=[],this._counter=0,this._keyToClassName={},this._classNameToArgs={},this._config=n.__assign({injectionMode:1,defaultPrefix:"css"},e)}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(o=t.__stylesheet__)){var r=t&&t.FabricConfig||{};o=t.__stylesheet__=new e(r.mergeStyles)}return o},e.prototype.setConfig=function(e){this._config=n.__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:s(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={}},e.prototype.resetKeys=function(){this._keyToClassName={}},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=s()),this._styleElement},e}();function s(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}t.Stylesheet=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(11),i=r(10),s=r(8),a=r(7),u="displayName";function c(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 f(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==u&&void 0!==e[r]&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)o.kebabRules(t,n),s.provideUnits(t,n),a.rtlifyRules(t,n),i.prefixRules(t,n);for(n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function e(t,r,o){void 0===r&&(r={__order:[]}),void 0===o&&(o="&");var i=n.Stylesheet.getInstance(),s=r[o];s||(s={},r[o]=s,r.__order.push(o));for(var a=0,u=t;a<u.length;a++){var f=u[a];if("string"==typeof f){var l=i.argsFromClassName(f);l&&e(l,r,o)}else if(Array.isArray(f))e(f,r,o);else for(var p in f)if("selectors"===p){var y=f.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf(":global(")?d=d.replace(/:global\(|\)$/g,""):0===d.indexOf("@media")?d=d+"{"+o:0===d.indexOf(":")?d=o+d:d.indexOf("&")<0&&(d=o+" "+d),e([v],r,d)}}else"margin"===p||"padding"===p?c(s,p,f[p]):s[p]=f[p]}return r}(e),o=function(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)&&void 0!==s[a]&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}(r);if(o){var i=n.Stylesheet.getInstance(),s={className:i.classNameFromKey(o),key:o,args:e};if(!s.className){s.className=i.getClassName(function(e){var t=e&&e["&"];return t?t.displayName:void 0}(r));for(var a=[],u=0,l=r.__order;u<l.length;u++){var p=l[u];a.push(p,f(r[p]))}s.rulesToInsert=a}return s}}function p(e,t){var r=n.Stylesheet.getInstance(),o=e.className,i=e.key,s=e.args,a=e.rulesToInsert;if(a){for(var u=0;u<a.length;u+=2){var c=a[u+1];if(c){var f=a[u],l=(f=f.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""}))+"{"+c+"}"+(0===f.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(o,i,s,a)}}t.serializeRuleEntries=f,t.styleToRegistration=l,t.applyRegistration=p,t.styleToClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.apply(void 0,e);return r?(p(r),r.className):""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=function(){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}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.extractStyleParts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=[],o=[],i=n.Stylesheet.getInstance();return function e(t){for(var n=0,s=t;n<s.length;n++){var a=s[n];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=i.argsFromClassName(a);u?e(u):-1===r.indexOf(a)&&r.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&o.push(a)}}(e),{classes:r,objects:o}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1);t.keyframes=function(e){var t=n.Stylesheet.getInstance(),r=t.getClassName(),i=[];for(var s in e)e.hasOwnProperty(s)&&i.push(s,"{",o.serializeRuleEntries(e[s]),"}");var a=i.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1);t.fontFace=function(e){n.Stylesheet.getInstance().insertRule("@font-face{"+o.serializeRuleEntries(e)+"}")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(2),i=r(1);t.mergeStyleSets=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},s={},a=e[0];if(a){e.length>1&&(a=o.concatStyleSets.apply(void 0,e));var u=[];for(var c in a)if(a.hasOwnProperty(c)){var f=a[c],l=n.extractStyleParts(f),p=l.classes,y=l.objects,d=i.styleToRegistration({displayName:c},y);u.push(d),d&&(s[c]=d.className,r[c]=p.concat([d.className]).join(" "))}for(var v=0,h=u;v<h.length;v++)(d=h[v])&&i.applyRegistration(d,s)}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),i="left",s="right",a="@noflip",u=((n={})[i]=s,n[s]=i,n),c={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},f=l();function l(){return void 0===f&&(f="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),f}t.setRTL=function(e){f!==e&&(o.Stylesheet.getInstance().resetKeys(),f=e)},t.getRTL=l,t.rtlifyRules=function(e,t){if(l()){var r=e[t];if(!r)return;var n=e[t+1];if("string"==typeof n&&n.indexOf(a)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf(i)>=0)e[t]=r.replace(i,s);else if(r.indexOf(s)>=0)e[t]=r.replace(s,i);else if(String(n).indexOf(i)>=0)e[t+1]=n.replace(i,s);else if(String(n).indexOf(s)>=0)e[t+1]=n.replace(s,i);else if(u[r])e[t]=u[r];else if(c[n])e[t+1]=c[n];else switch(r){case"margin":case"padding":e[t+1]=function(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}(n);break;case"box-shadow":e[t+1]=function(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}(n,0)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];t.provideUnits=function(e,t){var r=e[t],o=e[t+1];if("number"==typeof o){var i=-1===n.indexOf(r)?"px":"";e[t+1]=""+o+i}}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.getVendorSettings=function(){if(!n){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;n=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return n},t.setVendorSettings=function(e){n=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o={"user-select":1};t.prefixRules=function(e,t){var r=n.getVendorSettings(),i=e[t];if(o[i]){var s=e[t+1];o[i]&&(r.isWebkit&&e.push("-webkit-"+i,s),r.isMoz&&e.push("-moz-"+i,s),r.isMs&&e.push("-ms-"+i,s),r.isOpera&&e.push("-o-"+i,s))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=function(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",function(){return o}),r.d(t,"__assign",function(){return i}),r.d(t,"__rest",function(){return s}),r.d(t,"__decorate",function(){return a}),r.d(t,"__param",function(){return u}),r.d(t,"__metadata",function(){return c}),r.d(t,"__awaiter",function(){return f}),r.d(t,"__generator",function(){return l}),r.d(t,"__exportStar",function(){return p}),r.d(t,"__values",function(){return y}),r.d(t,"__read",function(){return d}),r.d(t,"__spread",function(){return v}),r.d(t,"__await",function(){return h}),r.d(t,"__asyncGenerator",function(){return _}),r.d(t,"__asyncDelegator",function(){return g}),r.d(t,"__asyncValues",function(){return m}),r.d(t,"__makeTemplateObject",function(){return b}),r.d(t,"__importStar",function(){return O}),r.d(t,"__importDefault",function(){return w}); | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function s(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){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r}function a(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 u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(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 l(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function p(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function d(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 y(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 v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function _(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(u,c):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function f(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function g(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){e[n]&&(t[n]=function(t){return(r=!r)?{value:h(e[n](t)),done:"return"===n}:o?o(t):t})}}function m(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):d(e)}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function w(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3);t.mergeStyles=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.extractStyleParts(e),i=r.classes,s=r.objects;return s.length&&i.push(n.styleToClassName(s)),i.join(" ")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13);t.mergeStyles=n.mergeStyles;var o=r(6);t.mergeStyleSets=o.mergeStyleSets;var i=r(2);t.concatStyleSets=i.concatStyleSets;var s=r(5);t.fontFace=s.fontFace;var a=r(4);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet}]); | ||
var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function s(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){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r}function a(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 u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(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 l(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=n[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function p(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function y(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 d(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 v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function _(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(u,c):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function f(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function g(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){e[n]&&(t[n]=function(t){return(r=!r)?{value:h(e[n](t)),done:"return"===n}:o?o(t):t})}}function m(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):y(e)}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function w(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3);t.mergeStyles=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.extractStyleParts(e),i=r.classes,s=r.objects;return s.length&&i.push(n.styleToClassName(s)),i.join(" ")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13);t.mergeStyles=n.mergeStyles;var o=r(6);t.mergeStyleSets=o.mergeStyleSets;var i=r(2);t.concatStyleSets=i.concatStyleSets;var s=r(5);t.fontFace=s.fontFace;var a=r(4);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet}]); | ||
//# sourceMappingURL=merge-styles.min.js.map |
@@ -45,7 +45,6 @@ import { IStyle } from './IStyle'; | ||
export declare class Stylesheet { | ||
private _styleElement; | ||
private _styleElement?; | ||
private _rules; | ||
private _config; | ||
private _rulesToInsert; | ||
private _timerId; | ||
private _counter; | ||
@@ -103,3 +102,4 @@ private _keyToClassName; | ||
reset(): void; | ||
resetKeys(): void; | ||
private _getElement(); | ||
} |
@@ -35,4 +35,9 @@ define(["require", "exports", "tslib"], function (require, exports, tslib_1) { | ||
function Stylesheet(config) { | ||
this._rules = []; | ||
this._rulesToInsert = []; | ||
this._counter = 0; | ||
this._keyToClassName = {}; | ||
// tslint:disable-next-line:no-any | ||
this._classNameToArgs = {}; | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
} | ||
@@ -147,7 +152,7 @@ /** | ||
this._keyToClassName = {}; | ||
if (this._timerId) { | ||
clearTimeout(this._timerId); | ||
this._timerId = 0; | ||
} | ||
}; | ||
// Forces the regeneration of incoming styles without totally resetting the stylesheet. | ||
Stylesheet.prototype.resetKeys = function () { | ||
this._keyToClassName = {}; | ||
}; | ||
Stylesheet.prototype._getElement = function () { | ||
@@ -154,0 +159,0 @@ if (!this._styleElement && typeof document !== 'undefined') { |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports"], function (require, exports) { | ||
define(["require", "exports", "../Stylesheet"], function (require, exports, Stylesheet_1) { | ||
"use strict"; | ||
@@ -21,3 +21,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
function setRTL(isRTL) { | ||
_rtl = isRTL; | ||
if (_rtl !== isRTL) { | ||
Stylesheet_1.Stylesheet.getInstance().resetKeys(); | ||
_rtl = isRTL; | ||
} | ||
} | ||
@@ -24,0 +27,0 @@ exports.setRTL = setRTL; |
@@ -45,7 +45,6 @@ import { IStyle } from './IStyle'; | ||
export declare class Stylesheet { | ||
private _styleElement; | ||
private _styleElement?; | ||
private _rules; | ||
private _config; | ||
private _rulesToInsert; | ||
private _timerId; | ||
private _counter; | ||
@@ -103,3 +102,4 @@ private _keyToClassName; | ||
reset(): void; | ||
resetKeys(): void; | ||
private _getElement(); | ||
} |
@@ -33,4 +33,9 @@ import * as tslib_1 from "tslib"; | ||
function Stylesheet(config) { | ||
this._rules = []; | ||
this._rulesToInsert = []; | ||
this._counter = 0; | ||
this._keyToClassName = {}; | ||
// tslint:disable-next-line:no-any | ||
this._classNameToArgs = {}; | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
} | ||
@@ -145,7 +150,7 @@ /** | ||
this._keyToClassName = {}; | ||
if (this._timerId) { | ||
clearTimeout(this._timerId); | ||
this._timerId = 0; | ||
} | ||
}; | ||
// Forces the regeneration of incoming styles without totally resetting the stylesheet. | ||
Stylesheet.prototype.resetKeys = function () { | ||
this._keyToClassName = {}; | ||
}; | ||
Stylesheet.prototype._getElement = function () { | ||
@@ -152,0 +157,0 @@ if (!this._styleElement && typeof document !== 'undefined') { |
@@ -0,1 +1,2 @@ | ||
import { Stylesheet } from '../Stylesheet'; | ||
var LEFT = 'left'; | ||
@@ -18,3 +19,6 @@ var RIGHT = 'right'; | ||
export function setRTL(isRTL) { | ||
_rtl = isRTL; | ||
if (_rtl !== isRTL) { | ||
Stylesheet.getInstance().resetKeys(); | ||
_rtl = isRTL; | ||
} | ||
} | ||
@@ -21,0 +25,0 @@ /** |
@@ -45,7 +45,6 @@ import { IStyle } from './IStyle'; | ||
export declare class Stylesheet { | ||
private _styleElement; | ||
private _styleElement?; | ||
private _rules; | ||
private _config; | ||
private _rulesToInsert; | ||
private _timerId; | ||
private _counter; | ||
@@ -103,3 +102,4 @@ private _keyToClassName; | ||
reset(): void; | ||
resetKeys(): void; | ||
private _getElement(); | ||
} |
@@ -35,4 +35,9 @@ "use strict"; | ||
function Stylesheet(config) { | ||
this._rules = []; | ||
this._rulesToInsert = []; | ||
this._counter = 0; | ||
this._keyToClassName = {}; | ||
// tslint:disable-next-line:no-any | ||
this._classNameToArgs = {}; | ||
this._config = tslib_1.__assign({ injectionMode: 1 /* insertNode */, defaultPrefix: 'css' }, config); | ||
this.reset(); | ||
} | ||
@@ -147,7 +152,7 @@ /** | ||
this._keyToClassName = {}; | ||
if (this._timerId) { | ||
clearTimeout(this._timerId); | ||
this._timerId = 0; | ||
} | ||
}; | ||
// Forces the regeneration of incoming styles without totally resetting the stylesheet. | ||
Stylesheet.prototype.resetKeys = function () { | ||
this._keyToClassName = {}; | ||
}; | ||
Stylesheet.prototype._getElement = function () { | ||
@@ -154,0 +159,0 @@ if (!this._styleElement && typeof document !== 'undefined') { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Stylesheet_1 = require("../Stylesheet"); | ||
var LEFT = 'left'; | ||
@@ -20,3 +21,6 @@ var RIGHT = 'right'; | ||
function setRTL(isRTL) { | ||
_rtl = isRTL; | ||
if (_rtl !== isRTL) { | ||
Stylesheet_1.Stylesheet.getInstance().resetKeys(); | ||
_rtl = isRTL; | ||
} | ||
} | ||
@@ -23,0 +27,0 @@ exports.setRTL = setRTL; |
@@ -5,4 +5,4 @@ { | ||
"packages/merge-styles/.npmrc": "825c83e09df4dad076d980d1236c532d689edf75", | ||
"packages/merge-styles/CHANGELOG.json": "cceb41e4a2c840b3fffcdbba8f1eee7012cec30b", | ||
"packages/merge-styles/CHANGELOG.md": "57e1c2f1a72fcea89048ac93ab37cbcb8e78645e", | ||
"packages/merge-styles/CHANGELOG.json": "2dee01b472f37cb8dca2b3d64b6efe36c5e357ee", | ||
"packages/merge-styles/CHANGELOG.md": "222466f5831956b84cb1cc85ceb4063fe250fca8", | ||
"packages/merge-styles/LICENSE": "310f6231e35c591f17680ffd2f5d4daea754e1f6", | ||
@@ -13,3 +13,3 @@ "packages/merge-styles/README.md": "e76ef60d0f5c8c4a4decd7379ed29bbe877d9340", | ||
"packages/merge-styles/jest.config.js": "a92c71220a900a5366be5af2cb98d273f3b697d4", | ||
"packages/merge-styles/package.json": "63a56a9f8061a8c414ed08fff9bbbffaa27b80ad", | ||
"packages/merge-styles/package.json": "cbdd67a39d59735eb5973bb07c15058c979a50e6", | ||
"packages/merge-styles/src/IRawStyleBase.ts": "c0a2414ee3dcd827a82c1cc9072f9b218da8bf5f", | ||
@@ -19,3 +19,3 @@ "packages/merge-styles/src/IStyle.ts": "770aa641a178f4ade3e75c36c663919cb65d00f9", | ||
"packages/merge-styles/src/Stylesheet.test.ts": "cdc9f0c02bc50acd2b6a27baf555609e6f2326b9", | ||
"packages/merge-styles/src/Stylesheet.ts": "20cda8757e20f1d3bca9e176a5925a41bda3a02a", | ||
"packages/merge-styles/src/Stylesheet.ts": "12de4f0d2f5b2cb94a07e3e0d44329d694f7ee92", | ||
"packages/merge-styles/src/concatStyleSets.test.ts": "2e39f2d1305f051655db238528fc50796646187a", | ||
@@ -33,3 +33,3 @@ "packages/merge-styles/src/concatStyleSets.ts": "98b314a88176cc61f444042c0c49b364d00c277e", | ||
"packages/merge-styles/src/mergeStyleSets.ts": "a5980e8d3dced3769f42e2ae215963ad6e6e13df", | ||
"packages/merge-styles/src/mergeStyles.test.ts": "ba07949b4e7000bde20409c3e27c19db1c27d863", | ||
"packages/merge-styles/src/mergeStyles.test.ts": "1fdaeee6f83dd5ec84c8e6fc713b432abfe96d71", | ||
"packages/merge-styles/src/mergeStyles.ts": "8538b54c5e7a6200dc3152f1e5244caa0e8d1066", | ||
@@ -47,9 +47,9 @@ "packages/merge-styles/src/server.test.ts": "efe9c4f1f8a03511def6738fc10e4bbed16ae9b8", | ||
"packages/merge-styles/src/transforms/rtlifyRules.test.ts": "cff34694b45aa1f2bfc9ee2c8c708e8a90eb3705", | ||
"packages/merge-styles/src/transforms/rtlifyRules.ts": "211cf60772dea3fd3bf6f8ddb217676025ecff63", | ||
"packages/merge-styles/src/transforms/rtlifyRules.ts": "318cf4cddb346d6d4130c55572efa9b74fcb8afe", | ||
"packages/merge-styles/tsconfig.json": "93c5fccb2af87cae0d9b3b90a9c308e5e140934a", | ||
"packages/merge-styles/tslint.json": "621ee6ba046052113aa7042fb5bb5323594253ff", | ||
"packages/merge-styles/webpack.config.js": "837a9532ca54effe65c3627c35c7f70611c792cc", | ||
"common/config/rush/npm-shrinkwrap.json": "6508c0add6657f2e29a7984d18f0bb9dda51f1c1" | ||
"common/config/rush/npm-shrinkwrap.json": "b547b239bedf1d798332be0b6113b628abc95cda" | ||
}, | ||
"arguments": "node ../../scripts/build.js --production" | ||
} |
{ | ||
"name": "@uifabric/merge-styles", | ||
"version": "5.14.0", | ||
"version": "5.14.1", | ||
"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 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
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
1074906
9425