Socket
Socket
Sign inDemoInstall

@wordpress/notices

Package Overview
Dependencies
Maintainers
10
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/notices - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

10

build-module/store/actions.js

@@ -54,2 +54,4 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

actions,
_options$type,
type,
__unstableHTML,

@@ -65,3 +67,3 @@ _args = arguments;

options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
_options$speak = options.speak, speak = _options$speak === void 0 ? true : _options$speak, _options$isDismissibl = options.isDismissible, isDismissible = _options$isDismissibl === void 0 ? true : _options$isDismissibl, _options$context = options.context, context = _options$context === void 0 ? DEFAULT_CONTEXT : _options$context, _options$id = options.id, id = _options$id === void 0 ? uniqueId(context) : _options$id, _options$actions = options.actions, actions = _options$actions === void 0 ? [] : _options$actions, __unstableHTML = options.__unstableHTML; // The supported value shape of content is currently limited to plain text
_options$speak = options.speak, speak = _options$speak === void 0 ? true : _options$speak, _options$isDismissibl = options.isDismissible, isDismissible = _options$isDismissibl === void 0 ? true : _options$isDismissibl, _options$context = options.context, context = _options$context === void 0 ? DEFAULT_CONTEXT : _options$context, _options$id = options.id, id = _options$id === void 0 ? uniqueId(context) : _options$id, _options$actions = options.actions, actions = _options$actions === void 0 ? [] : _options$actions, _options$type = options.type, type = _options$type === void 0 ? 'default' : _options$type, __unstableHTML = options.__unstableHTML; // The supported value shape of content is currently limited to plain text
// strings. To avoid setting expectation that e.g. a WPElement could be

@@ -80,3 +82,4 @@ // supported, cast to a string.

type: 'SPEAK',
message: content
message: content,
ariaLive: type === 'snackbar' ? 'polite' : 'assertive'
};

@@ -95,3 +98,4 @@

isDismissible: isDismissible,
actions: actions
actions: actions,
type: type
}

@@ -98,0 +102,0 @@ };

@@ -7,5 +7,5 @@ /**

SPEAK: function SPEAK(action) {
speak(action.message, 'assertive');
speak(action.message, action.ariaLive || 'assertive');
}
};
//# sourceMappingURL=controls.js.map

@@ -62,2 +62,4 @@ "use strict";

actions,
_options$type,
type,
__unstableHTML,

@@ -73,3 +75,3 @@ _args = arguments;

options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
_options$speak = options.speak, speak = _options$speak === void 0 ? true : _options$speak, _options$isDismissibl = options.isDismissible, isDismissible = _options$isDismissibl === void 0 ? true : _options$isDismissibl, _options$context = options.context, context = _options$context === void 0 ? _constants.DEFAULT_CONTEXT : _options$context, _options$id = options.id, id = _options$id === void 0 ? (0, _lodash.uniqueId)(context) : _options$id, _options$actions = options.actions, actions = _options$actions === void 0 ? [] : _options$actions, __unstableHTML = options.__unstableHTML; // The supported value shape of content is currently limited to plain text
_options$speak = options.speak, speak = _options$speak === void 0 ? true : _options$speak, _options$isDismissibl = options.isDismissible, isDismissible = _options$isDismissibl === void 0 ? true : _options$isDismissibl, _options$context = options.context, context = _options$context === void 0 ? _constants.DEFAULT_CONTEXT : _options$context, _options$id = options.id, id = _options$id === void 0 ? (0, _lodash.uniqueId)(context) : _options$id, _options$actions = options.actions, actions = _options$actions === void 0 ? [] : _options$actions, _options$type = options.type, type = _options$type === void 0 ? 'default' : _options$type, __unstableHTML = options.__unstableHTML; // The supported value shape of content is currently limited to plain text
// strings. To avoid setting expectation that e.g. a WPElement could be

@@ -88,3 +90,4 @@ // supported, cast to a string.

type: 'SPEAK',
message: content
message: content,
ariaLive: type === 'snackbar' ? 'polite' : 'assertive'
};

@@ -103,3 +106,4 @@

isDismissible: isDismissible,
actions: actions
actions: actions,
type: type
}

@@ -106,0 +110,0 @@ };

@@ -15,3 +15,3 @@ "use strict";

SPEAK: function SPEAK(action) {
(0, _a11y.speak)(action.message, 'assertive');
(0, _a11y.speak)(action.message, action.ariaLive || 'assertive');
}

@@ -18,0 +18,0 @@ };

@@ -0,1 +1,7 @@

## Master
### New Features
- Support a new `snackbar` notice type in the `createNotice` action.
## 1.1.2 (2019-01-03)

@@ -2,0 +8,0 @@

{
"name": "@wordpress/notices",
"version": "1.4.0",
"version": "1.5.0",
"description": "State management for notices.",

@@ -25,4 +25,4 @@ "author": "The WordPress Contributors",

"@babel/runtime": "^7.4.4",
"@wordpress/a11y": "^2.3.0",
"@wordpress/data": "^4.5.0",
"@wordpress/a11y": "^2.4.0",
"@wordpress/data": "^4.6.0",
"lodash": "^4.17.11"

@@ -33,3 +33,3 @@ },

},
"gitHead": "87f92f8f58a14a58b44beff0919734c546b3b975"
"gitHead": "256d514d356709cfdb27e28a5b200043d768d9cc"
}

@@ -41,2 +41,3 @@ /**

actions = [],
type = 'default',
__unstableHTML,

@@ -51,3 +52,7 @@ } = options;

if ( speak ) {
yield { type: 'SPEAK', message: content };
yield {
type: 'SPEAK',
message: content,
ariaLive: type === 'snackbar' ? 'polite' : 'assertive',
};
}

@@ -65,2 +70,3 @@

actions,
type,
},

@@ -67,0 +73,0 @@ };

@@ -8,4 +8,4 @@ /**

SPEAK( action ) {
speak( action.message, 'assertive' );
speak( action.message, action.ariaLive || 'assertive' );
},
};

@@ -37,2 +37,3 @@ /**

actions: [],
type: 'default',
},

@@ -59,2 +60,3 @@ } );

actions: [],
type: 'default',
},

@@ -88,2 +90,3 @@ } );

actions: [],
type: 'default',
},

@@ -115,2 +118,3 @@ } );

actions: [],
type: 'default',
},

@@ -140,2 +144,3 @@ } );

id: expect.any( String ),
type: 'default',
},

@@ -165,2 +170,3 @@ } );

id: expect.any( String ),
type: 'default',
},

@@ -190,2 +196,3 @@ } );

id: expect.any( String ),
type: 'default',
},

@@ -215,2 +222,3 @@ } );

id: expect.any( String ),
type: 'default',
},

@@ -217,0 +225,0 @@ } );

@@ -39,2 +39,3 @@ /**

actions: [],
type: 'default',
},

@@ -57,2 +58,3 @@ ],

actions: [],
type: 'default',
},

@@ -78,2 +80,3 @@ ],

actions: [],
type: 'default',
},

@@ -86,2 +89,3 @@ {

actions: [],
type: 'default',
},

@@ -141,2 +145,3 @@ ],

actions: [],
type: 'default',
},

@@ -143,0 +148,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

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