@wordpress/data 9.0.0 → 9.1.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +28 -65
  3. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 9.1.0 (2023-04-12)
6
+
5
7
  ## 9.0.0 (2023-03-29)
6
8
 
7
9
  ### Breaking Changes
package/README.md CHANGED
@@ -279,8 +279,7 @@ Specific implementation differences from Redux and React Redux:
279
279
 
280
280
  ### AsyncModeProvider
281
281
 
282
- Context Provider Component used to switch the data module component rerendering
283
- between Sync and Async modes.
282
+ Context Provider Component used to switch the data module component rerendering between Sync and Async modes.
284
283
 
285
284
  _Usage_
286
285
 
@@ -320,8 +319,7 @@ _Returns_
320
319
 
321
320
  ### combineReducers
322
321
 
323
- The combineReducers helper function turns an object whose values are different
324
- reducing functions into a single reducing function you can pass to registerReducer.
322
+ The combineReducers helper function turns an object whose values are different reducing functions into a single reducing function you can pass to registerReducer.
325
323
 
326
324
  _Usage_
327
325
 
@@ -368,8 +366,7 @@ Undocumented declaration.
368
366
 
369
367
  ### createReduxStore
370
368
 
371
- Creates a data store descriptor for the provided Redux store configuration containing
372
- properties describing reducer, actions, selectors, controls and resolvers.
369
+ Creates a data store descriptor for the provided Redux store configuration containing properties describing reducer, actions, selectors, controls and resolvers.
373
370
 
374
371
  _Usage_
375
372
 
@@ -395,8 +392,7 @@ _Returns_
395
392
 
396
393
  ### createRegistry
397
394
 
398
- Creates a new store registry, given an optional object of initial store
399
- configurations.
395
+ Creates a new store registry, given an optional object of initial store configurations.
400
396
 
401
397
  _Parameters_
402
398
 
@@ -409,8 +405,7 @@ _Returns_
409
405
 
410
406
  ### createRegistryControl
411
407
 
412
- Creates a control function that takes additional curried argument with the `registry` object.
413
- While a regular control has signature
408
+ Creates a control function that takes additional curried argument with the `registry` object. While a regular control has signature
414
409
 
415
410
  ```js
416
411
  ( action ) => iteratorOrPromise;
@@ -422,11 +417,9 @@ where the control works with the `action` that it's bound to, a registry control
422
417
  ( registry ) => ( action ) => iteratorOrPromise;
423
418
  ```
424
419
 
425
- A registry control is typically used to select data or dispatch an action to a registered
426
- store.
420
+ A registry control is typically used to select data or dispatch an action to a registered store.
427
421
 
428
- When registering a control created with `createRegistryControl` with a store, the store
429
- knows which calling convention to use when executing the control.
422
+ When registering a control created with `createRegistryControl` with a store, the store knows which calling convention to use when executing the control.
430
423
 
431
424
  _Parameters_
432
425
 
@@ -438,15 +431,13 @@ _Returns_
438
431
 
439
432
  ### createRegistrySelector
440
433
 
441
- Creates a selector function that takes additional curried argument with the
442
- registry `select` function. While a regular selector has signature
434
+ Creates a selector function that takes additional curried argument with the registry `select` function. While a regular selector has signature
443
435
 
444
436
  ```js
445
437
  ( state, ...selectorArgs ) => result;
446
438
  ```
447
439
 
448
- that allows to select data from the store's `state`, a registry selector
449
- has signature:
440
+ that allows to select data from the store's `state`, a registry selector has signature:
450
441
 
451
442
  ```js
452
443
  ( select ) =>
@@ -493,11 +484,9 @@ _Returns_
493
484
 
494
485
  ### dispatch
495
486
 
496
- Given a store descriptor, returns an object of the store's action creators.
497
- Calling an action creator will cause it to be dispatched, updating the state value accordingly.
487
+ Given a store descriptor, returns an object of the store's action creators. Calling an action creator will cause it to be dispatched, updating the state value accordingly.
498
488
 
499
- Note: Action creators returned by the dispatch will return a promise when
500
- they are called.
489
+ Note: Action creators returned by the dispatch will return a promise when they are called.
501
490
 
502
491
  _Usage_
503
492
 
@@ -578,11 +567,9 @@ _Returns_
578
567
 
579
568
  ### RegistryConsumer
580
569
 
581
- A custom react Context consumer exposing the provided `registry` to
582
- children components. Used along with the RegistryProvider.
570
+ A custom react Context consumer exposing the provided `registry` to children components. Used along with the RegistryProvider.
583
571
 
584
- You can read more about the react context api here:
585
- <https://reactjs.org/docs/context.html#contextprovider>
572
+ You can read more about the react context api here: <https://reactjs.org/docs/context.html#contextprovider>
586
573
 
587
574
  _Usage_
588
575
 
@@ -611,17 +598,13 @@ const App = ( { props } ) => {
611
598
 
612
599
  ### RegistryProvider
613
600
 
614
- A custom Context provider for exposing the provided `registry` to children
615
- components via a consumer.
601
+ A custom Context provider for exposing the provided `registry` to children components via a consumer.
616
602
 
617
- See <a name="#RegistryConsumer">RegistryConsumer</a> documentation for
618
- example.
603
+ See <a name="#RegistryConsumer">RegistryConsumer</a> documentation for example.
619
604
 
620
605
  ### resolveSelect
621
606
 
622
- Given a store descriptor, returns an object containing the store's selectors pre-bound to state
623
- so that you only need to supply additional arguments, and modified so that they return promises
624
- that resolve to their eventual values, after any resolvers have ran.
607
+ Given a store descriptor, returns an object containing the store's selectors pre-bound to state so that you only need to supply additional arguments, and modified so that they return promises that resolve to their eventual values, after any resolvers have ran.
625
608
 
626
609
  _Usage_
627
610
 
@@ -642,9 +625,7 @@ _Returns_
642
625
 
643
626
  ### select
644
627
 
645
- Given a store descriptor, returns an object of the store's selectors.
646
- The selector functions are been pre-bound to pass the current state automatically.
647
- As a consumer, you need only pass arguments of the selector, if applicable.
628
+ Given a store descriptor, returns an object of the store's selectors. The selector functions are been pre-bound to pass the current state automatically. As a consumer, you need only pass arguments of the selector, if applicable.
648
629
 
649
630
  _Usage_
650
631
 
@@ -665,10 +646,7 @@ _Returns_
665
646
 
666
647
  ### subscribe
667
648
 
668
- Given a listener function, the function will be called any time the state value
669
- of one of the registered stores has changed. If you specify the optional
670
- `storeNameOrDescriptor` parameter, the listener function will be called only
671
- on updates on that one specific registered store.
649
+ Given a listener function, the function will be called any time the state value of one of the registered stores has changed. If you specify the optional `storeNameOrDescriptor` parameter, the listener function will be called only on updates on that one specific registered store.
672
650
 
673
651
  This function returns an `unsubscribe` function used to stop the subscription.
674
652
 
@@ -693,9 +671,7 @@ _Parameters_
693
671
 
694
672
  ### suspendSelect
695
673
 
696
- Given a store descriptor, returns an object containing the store's selectors pre-bound to state
697
- so that you only need to supply additional arguments, and modified so that they throw promises
698
- in case the selector is not resolved yet.
674
+ Given a store descriptor, returns an object containing the store's selectors pre-bound to state so that you only need to supply additional arguments, and modified so that they throw promises in case the selector is not resolved yet.
699
675
 
700
676
  _Parameters_
701
677
 
@@ -707,9 +683,7 @@ _Returns_
707
683
 
708
684
  ### use
709
685
 
710
- Extends a registry to inherit functionality provided by a given plugin. A
711
- plugin is an object with properties aligning to that of a registry, merged
712
- to extend the default registry behavior.
686
+ Extends a registry to inherit functionality provided by a given plugin. A plugin is an object with properties aligning to that of a registry, merged to extend the default registry behavior.
713
687
 
714
688
  _Parameters_
715
689
 
@@ -719,8 +693,7 @@ _Parameters_
719
693
 
720
694
  A custom react hook returning the current registry dispatch actions creators.
721
695
 
722
- Note: The component using this hook must be within the context of a
723
- RegistryProvider.
696
+ Note: The component using this hook must be within the context of a RegistryProvider.
724
697
 
725
698
  _Usage_
726
699
 
@@ -771,16 +744,11 @@ _Returns_
771
744
 
772
745
  A custom react hook exposing the registry context for use.
773
746
 
774
- This exposes the `registry` value provided via the
775
- <a href="#RegistryProvider">Registry Provider</a> to a component implementing
776
- this hook.
747
+ This exposes the `registry` value provided via the <a href="#RegistryProvider">Registry Provider</a> to a component implementing this hook.
777
748
 
778
749
  It acts similarly to the `useContext` react hook.
779
750
 
780
- Note: Generally speaking, `useRegistry` is a low level hook that in most cases
781
- won't be needed for implementation. Most interactions with the `@wordpress/data`
782
- API can be performed via the `useSelect` hook, or the `withSelect` and
783
- `withDispatch` higher order components.
751
+ Note: Generally speaking, `useRegistry` is a low level hook that in most cases won't be needed for implementation. Most interactions with the `@wordpress/data` API can be performed via the `useSelect` hook, or the `withSelect` and `withDispatch` higher order components.
784
752
 
785
753
  _Usage_
786
754
 
@@ -811,8 +779,7 @@ _Returns_
811
779
 
812
780
  Custom react hook for retrieving props from registered selectors.
813
781
 
814
- In general, this custom React hook follows the
815
- [rules of hooks](https://reactjs.org/docs/hooks-rules.html).
782
+ In general, this custom React hook follows the [rules of hooks](https://reactjs.org/docs/hooks-rules.html).
816
783
 
817
784
  _Usage_
818
785
 
@@ -875,8 +842,7 @@ _Returns_
875
842
 
876
843
  ### useSuspenseSelect
877
844
 
878
- A variant of the `useSelect` hook that has the same API, but will throw a
879
- suspense Promise if any of the called selectors is in an unresolved state.
845
+ A variant of the `useSelect` hook that has the same API, but will throw a suspense Promise if any of the called selectors is in an unresolved state.
880
846
 
881
847
  _Parameters_
882
848
 
@@ -889,8 +855,7 @@ _Returns_
889
855
 
890
856
  ### withDispatch
891
857
 
892
- Higher-order component used to add dispatch props using registered action
893
- creators.
858
+ Higher-order component used to add dispatch props using registered action creators.
894
859
 
895
860
  _Usage_
896
861
 
@@ -978,8 +943,7 @@ _Returns_
978
943
 
979
944
  ### withRegistry
980
945
 
981
- Higher-order component which renders the original component with the current
982
- registry context passed as its `registry` prop.
946
+ Higher-order component which renders the original component with the current registry context passed as its `registry` prop.
983
947
 
984
948
  _Parameters_
985
949
 
@@ -991,8 +955,7 @@ _Returns_
991
955
 
992
956
  ### withSelect
993
957
 
994
- Higher-order component used to inject state-derived props using registered
995
- selectors.
958
+ Higher-order component used to inject state-derived props using registered selectors.
996
959
 
997
960
  _Usage_
998
961
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/data",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "description": "Data module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,13 +29,13 @@
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.16.0",
32
- "@wordpress/compose": "^6.7.0",
33
- "@wordpress/deprecated": "^3.30.0",
34
- "@wordpress/element": "^5.7.0",
35
- "@wordpress/is-shallow-equal": "^4.30.0",
36
- "@wordpress/priority-queue": "^2.30.0",
37
- "@wordpress/private-apis": "^0.12.0",
38
- "@wordpress/redux-routine": "^4.30.0",
32
+ "@wordpress/compose": "^6.8.0",
33
+ "@wordpress/deprecated": "^3.31.0",
34
+ "@wordpress/element": "^5.8.0",
35
+ "@wordpress/is-shallow-equal": "^4.31.0",
36
+ "@wordpress/priority-queue": "^2.31.0",
37
+ "@wordpress/private-apis": "^0.13.0",
38
+ "@wordpress/redux-routine": "^4.31.0",
39
39
  "deepmerge": "^4.3.0",
40
40
  "equivalent-key-map": "^0.2.2",
41
41
  "is-plain-object": "^5.0.0",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "d5c28a67b11e91e3e4b8e90346bfcb90909364d6"
53
+ "gitHead": "d61700b9f1c72ba0b030fc815ef1685b4f4031ec"
54
54
  }