@uifabric/merge-styles
Advanced tools
Comparing version 5.5.1 to 5.6.0
@@ -5,2 +5,16 @@ { | ||
{ | ||
"version": "5.6.0", | ||
"tag": "@uifabric/merge-styles_v5.6.0", | ||
"date": "Fri, 10 Nov 2017 17:09:36 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "David Zearing <dzearing@microsoft.com>", | ||
"commit": "696cd19b230f855f071f766c27c0066eb15d8109", | ||
"comment": "Adding the ability to append style content rather than inject using insertRule, for special cases." | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "5.5.1", | ||
@@ -7,0 +21,0 @@ "tag": "@uifabric/merge-styles_v5.5.1", |
# Change Log - @uifabric/merge-styles | ||
This log was last generated on Thu, 02 Nov 2017 18:20:18 GMT and should not be manually modified. | ||
This log was last generated on Fri, 10 Nov 2017 17:09:36 GMT and should not be manually modified. | ||
## 5.6.0 | ||
Fri, 10 Nov 2017 17:09:36 GMT | ||
### Minor changes | ||
- Adding the ability to append style content rather than inject using insertRule, for special cases. | ||
## 5.5.1 | ||
@@ -6,0 +13,0 @@ Thu, 02 Nov 2017 18:20:18 GMT |
@@ -90,2 +90,6 @@ var MergeStyles = | ||
InjectionMode[InjectionMode["insertNode"] = 1] = "insertNode"; | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
InjectionMode[InjectionMode["appendChild"] = 2] = "appendChild"; | ||
})(InjectionMode = exports.InjectionMode || (exports.InjectionMode = {})); | ||
@@ -114,3 +118,5 @@ var STYLESHEET_SETTING = '__stylesheet__'; | ||
if (!_stylesheet) { | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(); | ||
// tslint:disable-next-line:no-string-literal | ||
var fabricConfig = (win && win['FabricConfig']) || {}; | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(fabricConfig.mergeStyles); | ||
} | ||
@@ -185,2 +191,5 @@ return _stylesheet; | ||
break; | ||
case 2 /* appendChild */: | ||
element.appendChild(document.createTextNode(rule)); | ||
break; | ||
default: | ||
@@ -187,0 +196,0 @@ this._rules.push(rule); |
@@ -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";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode"}(t.InjectionMode||(t.InjectionMode={}));var o,i=function(){function e(e){this._config=n.__assign({async:!1,injectionMode:1},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};return o=t.__stylesheet__,o||(o=t.__stylesheet__=new e),o},e.prototype.setConfig=function(e){this._config=n.__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;default:this._rules.push(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=document.createElement("style"),this._styleElement.setAttribute("data-merge-styles","true"),document.head.appendChild(this._styleElement)),this._styleElement},e}();t.Stylesheet=i},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 y in c)if("selectors"===y){var p=c.selectors;for(var d in p)if(p.hasOwnProperty(d)){var v=p[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"===y||"padding"===y?i(s,y,c[y]):s[y]=c[y]}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)y.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),p.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=[],y=0,p=r.__order;y<p.length;y++){var d=p[y];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),y=r(7),p=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):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 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 p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(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 _(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 g(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=y,t.__spread=p,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=_,t.__makeTemplateObject=g;/*! ***************************************************************************** | ||
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";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);!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({async:!1,injectionMode:1},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||"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:t.appendChild(document.createTextNode(e));break;default:this._rules.push(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=document.createElement("style"),this._styleElement.setAttribute("data-merge-styles","true"),document.head.appendChild(this._styleElement)),this._styleElement},e}();t.Stylesheet=i},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):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. | ||
@@ -15,2 +15,2 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
***************************************************************************** */ | ||
var m=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])},b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}},function(e,t,r){"use strict";function n(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=n},function(e,t,r){"use strict";function n(e,t){var r=o.getVendorSettings(),n=e[t];if(i[n]){var s=e[t+1];i[n]&&(r.isWebkit&&e.push("-webkit-"+n,s),r.isMoz&&e.push("-moz-"+n,s),r.isMs&&e.push("-ms-"+n,s),r.isOpera&&e.push("-o-"+n,s))}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(9),i={"user-select":1};t.prefixRules=n},function(e,t,r){"use strict";function n(){if(!i){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;i=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 i}function o(e){i=e}Object.defineProperty(t,"__esModule",{value:!0});var i;t.getVendorSettings=n,t.setVendorSettings=o},function(e,t,r){"use strict";function n(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var i=-1===o.indexOf(r)?"px":"";e[t+1]=""+n+i}}Object.defineProperty(t,"__esModule",{value:!0});var o=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","opacity","order","z-index","zoom"];t.provideUnits=n},function(e,t,r){"use strict";function n(e){f=e}function o(){return void 0===f&&(f="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),f}function i(e,t){if(o()){var r=e[t],n=e[t+1];if(n.indexOf(l)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf("left")>=0)e[t]=r.replace("left","right");else if(r.indexOf("right")>=0)e[t]=r.replace("right","left");else if(String(n).indexOf("left")>=0)e[t+1]=n.replace("left","right");else if(String(n).indexOf("right")>=0)e[t+1]=n.replace("right","left");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]=a(n);break;case"box-shadow":e[t+1]=s(n,0)}}}function s(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}function a(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}Object.defineProperty(t,"__esModule",{value:!0});var u={left:"right",right:"left"},c={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},l="@noflip",f=o();t.setRTL=n,t.getRTL=o,t.rtlifyRules=i},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},n=e[0];if(n){e.length>1&&(n=i.concatStyleSets.apply(void 0,e));var a=[];for(var u in n)if(n.hasOwnProperty(u)){var c=n[u],l=o.extractStyleParts(c),f=l.classes,y=l.objects,p=s.styleToRegistration({displayName:u},y);a.push(p),p&&(r[u]=f.concat([p.className]).join(" "))}for(var d=0,v=a;d<v.length;d++){var p=v[d];p&&s.applyRegistration(p,r)}}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=r(3),s=r(1);t.mergeStyleSets=n},function(e,t,r){"use strict";function n(e){o.Stylesheet.getInstance().insertRule("@font-face{"+i.serializeRuleEntries(e)+"}")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.fontFace=n},function(e,t,r){"use strict";function n(e){var t=o.Stylesheet.getInstance(),r=t.getClassName(),n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s,"{",i.serializeRuleEntries(e[s]),"}");var a=n.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.keyframes=n}]); | ||
var m=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])},b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}},function(e,t,r){"use strict";function n(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=n},function(e,t,r){"use strict";function n(e,t){var r=o.getVendorSettings(),n=e[t];if(i[n]){var s=e[t+1];i[n]&&(r.isWebkit&&e.push("-webkit-"+n,s),r.isMoz&&e.push("-moz-"+n,s),r.isMs&&e.push("-ms-"+n,s),r.isOpera&&e.push("-o-"+n,s))}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(9),i={"user-select":1};t.prefixRules=n},function(e,t,r){"use strict";function n(){if(!i){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;i=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 i}function o(e){i=e}Object.defineProperty(t,"__esModule",{value:!0});var i;t.getVendorSettings=n,t.setVendorSettings=o},function(e,t,r){"use strict";function n(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var i=-1===o.indexOf(r)?"px":"";e[t+1]=""+n+i}}Object.defineProperty(t,"__esModule",{value:!0});var o=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","opacity","order","z-index","zoom"];t.provideUnits=n},function(e,t,r){"use strict";function n(e){f=e}function o(){return void 0===f&&(f="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),f}function i(e,t){if(o()){var r=e[t],n=e[t+1];if(n.indexOf(l)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf("left")>=0)e[t]=r.replace("left","right");else if(r.indexOf("right")>=0)e[t]=r.replace("right","left");else if(String(n).indexOf("left")>=0)e[t+1]=n.replace("left","right");else if(String(n).indexOf("right")>=0)e[t+1]=n.replace("right","left");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]=a(n);break;case"box-shadow":e[t+1]=s(n,0)}}}function s(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}function a(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}Object.defineProperty(t,"__esModule",{value:!0});var u={left:"right",right:"left"},c={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},l="@noflip",f=o();t.setRTL=n,t.getRTL=o,t.rtlifyRules=i},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},n=e[0];if(n){e.length>1&&(n=i.concatStyleSets.apply(void 0,e));var a=[];for(var u in n)if(n.hasOwnProperty(u)){var c=n[u],l=o.extractStyleParts(c),f=l.classes,p=l.objects,y=s.styleToRegistration({displayName:u},p);a.push(y),y&&(r[u]=f.concat([y.className]).join(" "))}for(var d=0,v=a;d<v.length;d++){var y=v[d];y&&s.applyRegistration(y,r)}}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=r(3),s=r(1);t.mergeStyleSets=n},function(e,t,r){"use strict";function n(e){o.Stylesheet.getInstance().insertRule("@font-face{"+i.serializeRuleEntries(e)+"}")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.fontFace=n},function(e,t,r){"use strict";function n(e){var t=o.Stylesheet.getInstance(),r=t.getClassName(),n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s,"{",i.serializeRuleEntries(e[s]),"}");var a=n.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.keyframes=n}]); |
@@ -16,2 +16,6 @@ import { IStyle } from './IStyle'; | ||
insertNode = 1, | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
appendChild = 2, | ||
} | ||
@@ -18,0 +22,0 @@ /** |
@@ -19,2 +19,6 @@ define(["require", "exports", "tslib"], function (require, exports, tslib_1) { | ||
InjectionMode[InjectionMode["insertNode"] = 1] = "insertNode"; | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
InjectionMode[InjectionMode["appendChild"] = 2] = "appendChild"; | ||
})(InjectionMode = exports.InjectionMode || (exports.InjectionMode = {})); | ||
@@ -43,3 +47,5 @@ var STYLESHEET_SETTING = '__stylesheet__'; | ||
if (!_stylesheet) { | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(); | ||
// tslint:disable-next-line:no-string-literal | ||
var fabricConfig = (win && win['FabricConfig']) || {}; | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(fabricConfig.mergeStyles); | ||
} | ||
@@ -114,2 +120,5 @@ return _stylesheet; | ||
break; | ||
case 2 /* appendChild */: | ||
element.appendChild(document.createTextNode(rule)); | ||
break; | ||
default: | ||
@@ -116,0 +125,0 @@ this._rules.push(rule); |
@@ -16,2 +16,6 @@ import { IStyle } from './IStyle'; | ||
insertNode = 1, | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
appendChild = 2, | ||
} | ||
@@ -18,0 +22,0 @@ /** |
@@ -17,2 +17,6 @@ import * as tslib_1 from "tslib"; | ||
InjectionMode[InjectionMode["insertNode"] = 1] = "insertNode"; | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
InjectionMode[InjectionMode["appendChild"] = 2] = "appendChild"; | ||
})(InjectionMode || (InjectionMode = {})); | ||
@@ -41,3 +45,5 @@ var STYLESHEET_SETTING = '__stylesheet__'; | ||
if (!_stylesheet) { | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(); | ||
// tslint:disable-next-line:no-string-literal | ||
var fabricConfig = (win && win['FabricConfig']) || {}; | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(fabricConfig.mergeStyles); | ||
} | ||
@@ -112,2 +118,5 @@ return _stylesheet; | ||
break; | ||
case 2 /* appendChild */: | ||
element.appendChild(document.createTextNode(rule)); | ||
break; | ||
default: | ||
@@ -114,0 +123,0 @@ this._rules.push(rule); |
@@ -16,2 +16,6 @@ import { IStyle } from './IStyle'; | ||
insertNode = 1, | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
appendChild = 2, | ||
} | ||
@@ -18,0 +22,0 @@ /** |
@@ -19,2 +19,6 @@ "use strict"; | ||
InjectionMode[InjectionMode["insertNode"] = 1] = "insertNode"; | ||
/** | ||
* Appends rules using appendChild. | ||
*/ | ||
InjectionMode[InjectionMode["appendChild"] = 2] = "appendChild"; | ||
})(InjectionMode = exports.InjectionMode || (exports.InjectionMode = {})); | ||
@@ -43,3 +47,5 @@ var STYLESHEET_SETTING = '__stylesheet__'; | ||
if (!_stylesheet) { | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(); | ||
// tslint:disable-next-line:no-string-literal | ||
var fabricConfig = (win && win['FabricConfig']) || {}; | ||
_stylesheet = win[STYLESHEET_SETTING] = new Stylesheet(fabricConfig.mergeStyles); | ||
} | ||
@@ -114,2 +120,5 @@ return _stylesheet; | ||
break; | ||
case 2 /* appendChild */: | ||
element.appendChild(document.createTextNode(rule)); | ||
break; | ||
default: | ||
@@ -116,0 +125,0 @@ this._rules.push(rule); |
@@ -5,4 +5,4 @@ { | ||
"packages/merge-styles/.npmrc": "825c83e09df4dad076d980d1236c532d689edf75", | ||
"packages/merge-styles/CHANGELOG.json": "692c9e6185a5387a6d17025fa7dfe59eb6604392", | ||
"packages/merge-styles/CHANGELOG.md": "878c73a127db49a8a421963f41bc36a36df3f097", | ||
"packages/merge-styles/CHANGELOG.json": "12ff39a11fce24862f8be5dfa809d83f7fab2ad9", | ||
"packages/merge-styles/CHANGELOG.md": "151f2f48eec9e97b1dba8d1b0d19cb60fa7d069e", | ||
"packages/merge-styles/LICENSE": "310f6231e35c591f17680ffd2f5d4daea754e1f6", | ||
@@ -13,7 +13,7 @@ "packages/merge-styles/README.md": "7cceed7041b1629db1306aa064cf6fe2ba73bb33", | ||
"packages/merge-styles/jest.config.js": "a92c71220a900a5366be5af2cb98d273f3b697d4", | ||
"packages/merge-styles/package.json": "49cfecc4ce2f0a4f88d605222851c36099aa6466", | ||
"packages/merge-styles/package.json": "ecd35bc682fef39e3232fa0c0125dbd3d77a9f4d", | ||
"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": "925548a3b84b0acd89323b5cc6472104a47a5b44", | ||
"packages/merge-styles/src/Stylesheet.ts": "157a3e28237ce23c970caddb25c710d53917c114", | ||
"packages/merge-styles/src/concatStyleSets.test.ts": "2e39f2d1305f051655db238528fc50796646187a", | ||
@@ -49,3 +49,3 @@ "packages/merge-styles/src/concatStyleSets.ts": "6068fa557682ef2bd5746004b5e0b568bb7171b9", | ||
}, | ||
"arguments": "node ../../scripts/build.js --color --production" | ||
"arguments": "node ../../scripts/build.js --production" | ||
} |
{ | ||
"name": "@uifabric/merge-styles", | ||
"version": "5.5.1", | ||
"version": "5.6.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
957624
10441
175