@wordpress/list-reusable-blocks 3.0.2 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,6 @@ Install the module
12
12
  npm install @wordpress/list-reusable-blocks --save
13
13
  ```
14
14
 
15
- _This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for ES2015+ such as IE browsers then using [core-js](https://github.com/zloirock/core-js) will add polyfills for these methods._
15
+ _This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for such language features and APIs, you should include [the polyfill shipped in `@wordpress/babel-preset-default`](https://github.com/WordPress/gutenberg/tree/HEAD/packages/babel-preset-default#polyfill) in your code._
16
16
 
17
17
  <br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
@@ -28,25 +28,32 @@ var _importForm = _interopRequireDefault(require("../import-form"));
28
28
  /**
29
29
  * Internal dependencies
30
30
  */
31
- function ImportDropdown({
32
- onUpload
33
- }) {
31
+ function ImportDropdown(_ref) {
32
+ let {
33
+ onUpload
34
+ } = _ref;
34
35
  return (0, _element.createElement)(_components.Dropdown, {
35
36
  position: "bottom right",
36
37
  contentClassName: "list-reusable-blocks-import-dropdown__content",
37
- renderToggle: ({
38
- isOpen,
39
- onToggle
40
- }) => (0, _element.createElement)(_components.Button, {
41
- "aria-expanded": isOpen,
42
- onClick: onToggle,
43
- variant: "primary"
44
- }, (0, _i18n.__)('Import from JSON')),
45
- renderContent: ({
46
- onClose
47
- }) => (0, _element.createElement)(_importForm.default, {
48
- onUpload: (0, _lodash.flow)(onClose, onUpload)
49
- })
38
+ renderToggle: _ref2 => {
39
+ let {
40
+ isOpen,
41
+ onToggle
42
+ } = _ref2;
43
+ return (0, _element.createElement)(_components.Button, {
44
+ "aria-expanded": isOpen,
45
+ onClick: onToggle,
46
+ variant: "primary"
47
+ }, (0, _i18n.__)('Import from JSON'));
48
+ },
49
+ renderContent: _ref3 => {
50
+ let {
51
+ onClose
52
+ } = _ref3;
53
+ return (0, _element.createElement)(_importForm.default, {
54
+ onUpload: (0, _lodash.flow)(onClose, onUpload)
55
+ });
56
+ }
50
57
  });
51
58
  }
52
59
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/list-reusable-blocks/src/components/import-dropdown/index.js"],"names":["ImportDropdown","onUpload","isOpen","onToggle","onClose"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAGA,SAASA,cAAT,CAAyB;AAAEC,EAAAA;AAAF,CAAzB,EAAwC;AACvC,SACC,4BAAC,oBAAD;AACC,IAAA,QAAQ,EAAC,cADV;AAEC,IAAA,gBAAgB,EAAC,+CAFlB;AAGC,IAAA,YAAY,EAAG,CAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAF,KACd,4BAAC,kBAAD;AACC,uBAAgBD,MADjB;AAEC,MAAA,OAAO,EAAGC,QAFX;AAGC,MAAA,OAAO,EAAC;AAHT,OAKG,cAAI,kBAAJ,CALH,CAJF;AAYC,IAAA,aAAa,EAAG,CAAE;AAAEC,MAAAA;AAAF,KAAF,KACf,4BAAC,mBAAD;AAAY,MAAA,QAAQ,EAAG,kBAAMA,OAAN,EAAeH,QAAf;AAAvB;AAbF,IADD;AAkBA;;eAEcD,c","sourcesContent":["/**\n * External dependencies\n */\nimport { flow } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ImportForm from '../import-form';\n\nfunction ImportDropdown( { onUpload } ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom right\"\n\t\t\tcontentClassName=\"list-reusable-blocks-import-dropdown__content\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Import from JSON' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<ImportForm onUpload={ flow( onClose, onUpload ) } />\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default ImportDropdown;\n"]}
1
+ {"version":3,"sources":["@wordpress/list-reusable-blocks/src/components/import-dropdown/index.js"],"names":["ImportDropdown","onUpload","isOpen","onToggle","onClose"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAGA,SAASA,cAAT,OAAwC;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACvC,SACC,4BAAC,oBAAD;AACC,IAAA,QAAQ,EAAC,cADV;AAEC,IAAA,gBAAgB,EAAC,+CAFlB;AAGC,IAAA,YAAY,EAAG;AAAA,UAAE;AAAEC,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAF;AAAA,aACd,4BAAC,kBAAD;AACC,yBAAgBD,MADjB;AAEC,QAAA,OAAO,EAAGC,QAFX;AAGC,QAAA,OAAO,EAAC;AAHT,SAKG,cAAI,kBAAJ,CALH,CADc;AAAA,KAHhB;AAYC,IAAA,aAAa,EAAG;AAAA,UAAE;AAAEC,QAAAA;AAAF,OAAF;AAAA,aACf,4BAAC,mBAAD;AAAY,QAAA,QAAQ,EAAG,kBAAMA,OAAN,EAAeH,QAAf;AAAvB,QADe;AAAA;AAZjB,IADD;AAkBA;;eAEcD,c","sourcesContent":["/**\n * External dependencies\n */\nimport { flow } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ImportForm from '../import-form';\n\nfunction ImportDropdown( { onUpload } ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom right\"\n\t\t\tcontentClassName=\"list-reusable-blocks-import-dropdown__content\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Import from JSON' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<ImportForm onUpload={ flow( onClose, onUpload ) } />\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default ImportDropdown;\n"]}
@@ -16,25 +16,32 @@ import { Dropdown, Button } from '@wordpress/components';
16
16
 
17
17
  import ImportForm from '../import-form';
18
18
 
19
- function ImportDropdown({
20
- onUpload
21
- }) {
19
+ function ImportDropdown(_ref) {
20
+ let {
21
+ onUpload
22
+ } = _ref;
22
23
  return createElement(Dropdown, {
23
24
  position: "bottom right",
24
25
  contentClassName: "list-reusable-blocks-import-dropdown__content",
25
- renderToggle: ({
26
- isOpen,
27
- onToggle
28
- }) => createElement(Button, {
29
- "aria-expanded": isOpen,
30
- onClick: onToggle,
31
- variant: "primary"
32
- }, __('Import from JSON')),
33
- renderContent: ({
34
- onClose
35
- }) => createElement(ImportForm, {
36
- onUpload: flow(onClose, onUpload)
37
- })
26
+ renderToggle: _ref2 => {
27
+ let {
28
+ isOpen,
29
+ onToggle
30
+ } = _ref2;
31
+ return createElement(Button, {
32
+ "aria-expanded": isOpen,
33
+ onClick: onToggle,
34
+ variant: "primary"
35
+ }, __('Import from JSON'));
36
+ },
37
+ renderContent: _ref3 => {
38
+ let {
39
+ onClose
40
+ } = _ref3;
41
+ return createElement(ImportForm, {
42
+ onUpload: flow(onClose, onUpload)
43
+ });
44
+ }
38
45
  });
39
46
  }
40
47
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/list-reusable-blocks/src/components/import-dropdown/index.js"],"names":["flow","__","Dropdown","Button","ImportForm","ImportDropdown","onUpload","isOpen","onToggle","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,EAAmBC,MAAnB,QAAiC,uBAAjC;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,gBAAvB;;AAEA,SAASC,cAAT,CAAyB;AAAEC,EAAAA;AAAF,CAAzB,EAAwC;AACvC,SACC,cAAC,QAAD;AACC,IAAA,QAAQ,EAAC,cADV;AAEC,IAAA,gBAAgB,EAAC,+CAFlB;AAGC,IAAA,YAAY,EAAG,CAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAF,KACd,cAAC,MAAD;AACC,uBAAgBD,MADjB;AAEC,MAAA,OAAO,EAAGC,QAFX;AAGC,MAAA,OAAO,EAAC;AAHT,OAKGP,EAAE,CAAE,kBAAF,CALL,CAJF;AAYC,IAAA,aAAa,EAAG,CAAE;AAAEQ,MAAAA;AAAF,KAAF,KACf,cAAC,UAAD;AAAY,MAAA,QAAQ,EAAGT,IAAI,CAAES,OAAF,EAAWH,QAAX;AAA3B;AAbF,IADD;AAkBA;;AAED,eAAeD,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { flow } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ImportForm from '../import-form';\n\nfunction ImportDropdown( { onUpload } ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom right\"\n\t\t\tcontentClassName=\"list-reusable-blocks-import-dropdown__content\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Import from JSON' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<ImportForm onUpload={ flow( onClose, onUpload ) } />\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default ImportDropdown;\n"]}
1
+ {"version":3,"sources":["@wordpress/list-reusable-blocks/src/components/import-dropdown/index.js"],"names":["flow","__","Dropdown","Button","ImportForm","ImportDropdown","onUpload","isOpen","onToggle","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,EAAmBC,MAAnB,QAAiC,uBAAjC;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,gBAAvB;;AAEA,SAASC,cAAT,OAAwC;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACvC,SACC,cAAC,QAAD;AACC,IAAA,QAAQ,EAAC,cADV;AAEC,IAAA,gBAAgB,EAAC,+CAFlB;AAGC,IAAA,YAAY,EAAG;AAAA,UAAE;AAAEC,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAF;AAAA,aACd,cAAC,MAAD;AACC,yBAAgBD,MADjB;AAEC,QAAA,OAAO,EAAGC,QAFX;AAGC,QAAA,OAAO,EAAC;AAHT,SAKGP,EAAE,CAAE,kBAAF,CALL,CADc;AAAA,KAHhB;AAYC,IAAA,aAAa,EAAG;AAAA,UAAE;AAAEQ,QAAAA;AAAF,OAAF;AAAA,aACf,cAAC,UAAD;AAAY,QAAA,QAAQ,EAAGT,IAAI,CAAES,OAAF,EAAWH,QAAX;AAA3B,QADe;AAAA;AAZjB,IADD;AAkBA;;AAED,eAAeD,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { flow } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ImportForm from '../import-form';\n\nfunction ImportDropdown( { onUpload } ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom right\"\n\t\t\tcontentClassName=\"list-reusable-blocks-import-dropdown__content\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Import from JSON' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<ImportForm onUpload={ flow( onClose, onUpload ) } />\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default ImportDropdown;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/list-reusable-blocks",
3
- "version": "3.0.2",
3
+ "version": "3.0.6",
4
4
  "description": "Adding Export/Import support to the reusable blocks listing.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -25,16 +25,16 @@
25
25
  "main": "build/index.js",
26
26
  "module": "build-module/index.js",
27
27
  "dependencies": {
28
- "@babel/runtime": "^7.13.10",
29
- "@wordpress/api-fetch": "^5.2.2",
30
- "@wordpress/components": "^17.0.0",
31
- "@wordpress/compose": "^5.0.2",
32
- "@wordpress/element": "^4.0.1",
33
- "@wordpress/i18n": "^4.2.2",
28
+ "@babel/runtime": "^7.16.0",
29
+ "@wordpress/api-fetch": "^5.2.6",
30
+ "@wordpress/components": "^19.0.2",
31
+ "@wordpress/compose": "^5.0.6",
32
+ "@wordpress/element": "^4.0.4",
33
+ "@wordpress/i18n": "^4.2.4",
34
34
  "lodash": "^4.17.21"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "98c42a7187f788fe3e023f04df7f5dcbdae4e4e7"
39
+ "gitHead": "9a1dd3474d937468e4cf9caf9886ad61ef0a8f50"
40
40
  }