Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oojs-ui

Package Overview
Dependencies
Maintainers
3
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oojs-ui - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

dist/i18n/ca.json

@@ -18,4 +18,6 @@ {

"ooui-toolbar-more": "Més",
"ooui-toolgroup-expand": "Més",
"ooui-toolgroup-collapse": "Menys",
"ooui-dialog-process-dismiss": "Descarta",
"ooui-dialog-process-retry": "Torneu-ho a provar"
}

@@ -14,2 +14,4 @@ {

"ooui-toolbar-more": "Više",
"ooui-toolgroup-expand": "Više",
"ooui-toolgroup-collapse": "Manje",
"ooui-dialog-message-accept": "U redu",

@@ -16,0 +18,0 @@ "ooui-dialog-message-reject": "Odustani",

4

dist/oojs-ui-apex.js
/*!
* OOjs UI v0.2.3
* OOjs UI v0.2.4
* https://www.mediawiki.org/wiki/OOjs_UI

@@ -9,3 +9,3 @@ *

*
* Date: 2014-11-26T23:37:00Z
* Date: 2014-12-02T18:45:19Z
*/

@@ -12,0 +12,0 @@ /* Instantiation */

@@ -1,3 +0,3 @@

/*! OOjs UI v0.2.3 | http://oojs.mit-license.org */
/*! OOjs UI v0.2.4 | http://oojs.mit-license.org */
OO.ui.theme=new OO.ui.Theme;
//# sourceMappingURL=oojs-ui-apex.min.js.map
/*!
* OOjs UI v0.2.3
* OOjs UI v0.2.4
* https://www.mediawiki.org/wiki/OOjs_UI

@@ -9,3 +9,3 @@ *

*
* Date: 2014-11-26T23:37:00Z
* Date: 2014-12-02T18:45:19Z
*/

@@ -12,0 +12,0 @@ /**

@@ -1,3 +0,3 @@

/*! OOjs UI v0.2.3 | http://oojs.mit-license.org */
/*! OOjs UI v0.2.4 | http://oojs.mit-license.org */
OO.ui.MediaWikiTheme=function(){OO.ui.MediaWikiTheme.super.call(this)},OO.inheritClass(OO.ui.MediaWikiTheme,OO.ui.Theme),OO.ui.MediaWikiTheme.prototype.getElementClasses=function(a){var b,c={invert:!1,primary:!1,constructive:!1,destructive:!1},d=OO.ui.MediaWikiTheme.super.prototype.getElementClasses.call(this,a);a.supports(["isFramed","isDisabled","hasFlag"])&&(a.isFramed()&&!a.isDisabled()?(a.hasFlag("primary")||a.hasFlag("constructive")||a.hasFlag("destructive"))&&(c.invert=!0):(c.primary=a.hasFlag("primary"),c.constructive=a.hasFlag("constructive"),c.destructive=a.hasFlag("destructive")));for(b in c)d[c[b]?"on":"off"].push("oo-ui-image-"+b);return d},OO.ui.theme=new OO.ui.MediaWikiTheme;
//# sourceMappingURL=oojs-ui-mediawiki.min.js.map
# OOjs UI Release History
## v0.2.4 / 2014-12-02
* TextInputWidget: Use .css( propertyName, value ) instead of .css( properties) for single property (Prateek Saxena)
* TextInputWidget: Stop adjustSize if the value of the textarea is the same (Prateek Saxena)
* Window: Avoid height flickering when resizing dialogs (Bartosz Dziewoński)
* MessageDialog: Fit actions again when the dialog is resized (Bartosz Dziewoński)
## v0.2.3 / 2014-11-26

@@ -4,0 +10,0 @@ * Dialog: Only handle escape events when open (Alex Monk)

@@ -18,4 +18,6 @@ {

"ooui-toolbar-more": "Més",
"ooui-toolgroup-expand": "Més",
"ooui-toolgroup-collapse": "Menys",
"ooui-dialog-process-dismiss": "Descarta",
"ooui-dialog-process-retry": "Torneu-ho a provar"
}

@@ -14,2 +14,4 @@ {

"ooui-toolbar-more": "Više",
"ooui-toolgroup-expand": "Više",
"ooui-toolgroup-collapse": "Manje",
"ooui-dialog-message-accept": "U redu",

@@ -16,0 +18,0 @@ "ooui-dialog-message-reject": "Odustani",

{
"name": "oojs-ui",
"version": "0.2.3",
"version": "0.2.4",
"description": "User interface classes built on the OOjs framework.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -69,2 +69,16 @@ /**

*/
OO.ui.MessageDialog.prototype.setManager = function ( manager ) {
OO.ui.MessageDialog.super.prototype.setManager.call( this, manager );
// Events
this.manager.connect( this, {
resize: 'onResize'
} );
return this;
};
/**
* @inheritdoc
*/
OO.ui.MessageDialog.prototype.onActionResize = function ( action ) {

@@ -76,2 +90,14 @@ this.fitActions();

/**
* Handle window resized events.
*/
OO.ui.MessageDialog.prototype.onResize = function () {
var dialog = this;
dialog.fitActions();
// Wait for CSS transition to finish and do it again :(
setTimeout( function () {
dialog.fitActions();
}, 300 );
};
/**
* Toggle action layout between vertical and horizontal.

@@ -237,6 +263,7 @@ *

this.manager.updateWindowSize( this );
this.fitActions();
this.$body.css( 'bottom', this.$foot.outerHeight( true ) );
if ( !this.isOpening() ) {
// If the dialog is currently opening, this will be called automatically soon.
// This also calls #fitActions.
this.manager.updateWindowSize( this );
}
};

@@ -251,2 +278,3 @@

var i, len, action,
previous = this.verticalActionLayout,
actions = this.actions.get();

@@ -263,2 +291,8 @@

}
if ( this.verticalActionLayout !== previous ) {
this.$body.css( 'bottom', this.$foot.outerHeight( true ) );
// We changed the layout, window height might need to be updated.
this.manager.updateWindowSize( this );
}
};

@@ -204,8 +204,9 @@ /**

if ( this.multiline && this.autosize ) {
if ( this.multiline && this.autosize && this.$input.val() !== this.valCache ) {
$clone = this.$input.clone()
.val( this.$input.val() )
// Set inline height property to 0 to measure scroll height
.css( { height: 0 } )
.css( 'height', 0 )
.insertAfter( this.$input );
this.valCache = this.$input.val();
scrollHeight = $clone[0].scrollHeight;

@@ -212,0 +213,0 @@ // Remove inline height property to measure natural heights

@@ -306,10 +306,12 @@ /**

/**
* Get the height of the dialog contents.
* Disable transitions on window's frame for the duration of the callback function, then enable them
* back.
*
* @return {number} Content height
* @private
* @param {Function} callback Function to call while transitions are disabled
*/
OO.ui.Window.prototype.getContentHeight = function () {
OO.ui.Window.prototype.withoutSizeTransitions = function ( callback ) {
// Temporarily resize the frame so getBodyHeight() can use scrollHeight measurements.
// Disable transitions first, otherwise we'll get values from when the window was animating.
var bodyHeight, oldHeight, oldTransition,
var oldTransition,
styleObj = this.$frame[0].style;

@@ -320,9 +322,28 @@ oldTransition = styleObj.transition || styleObj.OTransition || styleObj.MsTransition ||

styleObj.MozTransition = styleObj.WebkitTransition = 'none';
oldHeight = styleObj.height;
styleObj.height = '1px';
bodyHeight = this.getBodyHeight();
styleObj.height = oldHeight;
callback();
// Force reflow to make sure the style changes done inside callback really are not transitioned
this.$frame.height();
styleObj.transition = styleObj.OTransition = styleObj.MsTransition =
styleObj.MozTransition = styleObj.WebkitTransition = oldTransition;
};
/**
* Get the height of the dialog contents.
*
* @return {number} Content height
*/
OO.ui.Window.prototype.getContentHeight = function () {
var bodyHeight,
win = this,
styleObj = this.$frame[0].style;
// Temporarily resize the frame so getBodyHeight() can use scrollHeight measurements.
// Disable transitions first, otherwise we'll get values from when the window was animating.
this.withoutSizeTransitions( function () {
var oldHeight = styleObj.height;
styleObj.height = '1px';
bodyHeight = win.getBodyHeight();
styleObj.height = oldHeight;
} );
return Math.round(

@@ -522,13 +543,27 @@ // Add buffer for border

OO.ui.Window.prototype.setDimensions = function ( dim ) {
// Apply width before height so height is not based on wrapping content using the wrong width
var height,
win = this,
styleObj = this.$frame[0].style;
// Calculate the height we need to set using the correct width
if ( dim.height === undefined ) {
this.withoutSizeTransitions( function () {
var oldWidth = styleObj.width;
win.$frame.css( 'width', dim.width || '' );
height = win.getContentHeight();
styleObj.width = oldWidth;
} );
} else {
height = dim.height;
}
this.$frame.css( {
width: dim.width || '',
minWidth: dim.minWidth || '',
maxWidth: dim.maxWidth || ''
} );
this.$frame.css( {
height: ( dim.height !== undefined ? dim.height : this.getContentHeight() ) || '',
maxWidth: dim.maxWidth || '',
height: height || '',
minHeight: dim.minHeight || '',
maxHeight: dim.maxHeight || ''
} );
return this;

@@ -535,0 +570,0 @@ };

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

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

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 too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc