@wordpress/core-data 6.3.1 → 6.4.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.
- package/CHANGELOG.md +2 -0
- package/README.md +1 -1
- package/build/actions.js +6 -6
- package/build/actions.js.map +1 -1
- package/build/hooks/use-entity-record.js +4 -4
- package/build/hooks/use-entity-record.js.map +1 -1
- package/build/hooks/use-entity-records.js +4 -4
- package/build/hooks/use-entity-records.js.map +1 -1
- package/build/hooks/use-resource-permissions.js +2 -2
- package/build/hooks/use-resource-permissions.js.map +1 -1
- package/build/selectors.js +116 -116
- package/build/selectors.js.map +1 -1
- package/build-module/actions.js +6 -6
- package/build-module/actions.js.map +1 -1
- package/build-module/hooks/use-entity-record.js +4 -4
- package/build-module/hooks/use-entity-record.js.map +1 -1
- package/build-module/hooks/use-entity-records.js +4 -4
- package/build-module/hooks/use-entity-records.js.map +1 -1
- package/build-module/hooks/use-resource-permissions.js +2 -2
- package/build-module/hooks/use-resource-permissions.js.map +1 -1
- package/build-module/selectors.js +116 -116
- package/build-module/selectors.js.map +1 -1
- package/build-types/actions.d.ts +1 -1
- package/build-types/actions.d.ts.map +1 -1
- package/build-types/hooks/use-entity-record.d.ts +4 -4
- package/build-types/hooks/use-entity-records.d.ts +4 -4
- package/build-types/hooks/use-resource-permissions.d.ts +2 -2
- package/build-types/index.d.ts +1 -1
- package/build-types/selectors.d.ts +115 -115
- package/package.json +12 -12
- package/src/actions.js +6 -6
- package/src/hooks/use-entity-record.ts +4 -4
- package/src/hooks/use-entity-records.ts +4 -4
- package/src/hooks/use-resource-permissions.ts +2 -2
- package/src/selectors.ts +116 -116
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/src/selectors.ts
CHANGED
|
@@ -86,8 +86,8 @@ const EMPTY_OBJECT = {};
|
|
|
86
86
|
* Returns true if a request is in progress for embed preview data, or false
|
|
87
87
|
* otherwise.
|
|
88
88
|
*
|
|
89
|
-
* @param
|
|
90
|
-
* @param
|
|
89
|
+
* @param state Data state.
|
|
90
|
+
* @param url URL the preview would be for.
|
|
91
91
|
*
|
|
92
92
|
* @return Whether a request is in progress for an embed preview.
|
|
93
93
|
*/
|
|
@@ -105,9 +105,9 @@ export const isRequestingEmbedPreview = createRegistrySelector(
|
|
|
105
105
|
*
|
|
106
106
|
* @deprecated since 11.3. Callers should use `select( 'core' ).getUsers({ who: 'authors' })` instead.
|
|
107
107
|
*
|
|
108
|
-
* @param
|
|
109
|
-
* @param
|
|
110
|
-
*
|
|
108
|
+
* @param state Data state.
|
|
109
|
+
* @param query Optional object of query parameters to
|
|
110
|
+
* include with request.
|
|
111
111
|
* @return Authors list.
|
|
112
112
|
*/
|
|
113
113
|
export function getAuthors(
|
|
@@ -129,7 +129,7 @@ export function getAuthors(
|
|
|
129
129
|
/**
|
|
130
130
|
* Returns the current user.
|
|
131
131
|
*
|
|
132
|
-
* @param
|
|
132
|
+
* @param state Data state.
|
|
133
133
|
*
|
|
134
134
|
* @return Current user object.
|
|
135
135
|
*/
|
|
@@ -140,8 +140,8 @@ export function getCurrentUser( state: State ): ET.User< 'edit' > {
|
|
|
140
140
|
/**
|
|
141
141
|
* Returns all the users returned by a query ID.
|
|
142
142
|
*
|
|
143
|
-
* @param
|
|
144
|
-
* @param
|
|
143
|
+
* @param state Data state.
|
|
144
|
+
* @param queryID Query ID.
|
|
145
145
|
*
|
|
146
146
|
* @return Users list.
|
|
147
147
|
*/
|
|
@@ -161,8 +161,8 @@ export const getUserQueryResults = createSelector(
|
|
|
161
161
|
* Returns the loaded entities for the given kind.
|
|
162
162
|
*
|
|
163
163
|
* @deprecated since WordPress 6.0. Use getEntitiesConfig instead
|
|
164
|
-
* @param
|
|
165
|
-
* @param
|
|
164
|
+
* @param state Data state.
|
|
165
|
+
* @param kind Entity kind.
|
|
166
166
|
*
|
|
167
167
|
* @return Array of entities with config matching kind.
|
|
168
168
|
*/
|
|
@@ -177,8 +177,8 @@ export function getEntitiesByKind( state: State, kind: string ): Array< any > {
|
|
|
177
177
|
/**
|
|
178
178
|
* Returns the loaded entities for the given kind.
|
|
179
179
|
*
|
|
180
|
-
* @param
|
|
181
|
-
* @param
|
|
180
|
+
* @param state Data state.
|
|
181
|
+
* @param kind Entity kind.
|
|
182
182
|
*
|
|
183
183
|
* @return Array of entities with config matching kind.
|
|
184
184
|
*/
|
|
@@ -190,9 +190,9 @@ export function getEntitiesConfig( state: State, kind: string ): Array< any > {
|
|
|
190
190
|
* Returns the entity config given its kind and name.
|
|
191
191
|
*
|
|
192
192
|
* @deprecated since WordPress 6.0. Use getEntityConfig instead
|
|
193
|
-
* @param
|
|
194
|
-
* @param
|
|
195
|
-
* @param
|
|
193
|
+
* @param state Data state.
|
|
194
|
+
* @param kind Entity kind.
|
|
195
|
+
* @param name Entity name.
|
|
196
196
|
*
|
|
197
197
|
* @return Entity config
|
|
198
198
|
*/
|
|
@@ -207,9 +207,9 @@ export function getEntity( state: State, kind: string, name: string ): any {
|
|
|
207
207
|
/**
|
|
208
208
|
* Returns the entity config given its kind and name.
|
|
209
209
|
*
|
|
210
|
-
* @param
|
|
211
|
-
* @param
|
|
212
|
-
* @param
|
|
210
|
+
* @param state Data state.
|
|
211
|
+
* @param kind Entity kind.
|
|
212
|
+
* @param name Entity name.
|
|
213
213
|
*
|
|
214
214
|
* @return Entity config
|
|
215
215
|
*/
|
|
@@ -277,12 +277,12 @@ export interface GetEntityRecord {
|
|
|
277
277
|
* yet received, undefined if the value entity is known to not exist, or the
|
|
278
278
|
* entity object if it exists and is received.
|
|
279
279
|
*
|
|
280
|
-
* @param
|
|
281
|
-
* @param
|
|
282
|
-
* @param
|
|
283
|
-
* @param
|
|
284
|
-
* @param
|
|
285
|
-
*
|
|
280
|
+
* @param state State tree
|
|
281
|
+
* @param kind Entity kind.
|
|
282
|
+
* @param name Entity name.
|
|
283
|
+
* @param key Record's key
|
|
284
|
+
* @param query Optional query. If requesting specific
|
|
285
|
+
* fields, fields must always include the ID.
|
|
286
286
|
*
|
|
287
287
|
* @return Record.
|
|
288
288
|
*/
|
|
@@ -357,10 +357,10 @@ export const getEntityRecord = createSelector(
|
|
|
357
357
|
/**
|
|
358
358
|
* Returns the Entity's record object by key. Doesn't trigger a resolver nor requests the entity records from the API if the entity record isn't available in the local state.
|
|
359
359
|
*
|
|
360
|
-
* @param
|
|
361
|
-
* @param
|
|
362
|
-
* @param
|
|
363
|
-
* @param
|
|
360
|
+
* @param state State tree
|
|
361
|
+
* @param kind Entity kind.
|
|
362
|
+
* @param name Entity name.
|
|
363
|
+
* @param key Record's key
|
|
364
364
|
*
|
|
365
365
|
* @return Record.
|
|
366
366
|
*/
|
|
@@ -374,10 +374,10 @@ export function __experimentalGetEntityRecordNoResolver<
|
|
|
374
374
|
* Returns the entity's record object by key,
|
|
375
375
|
* with its attributes mapped to their raw values.
|
|
376
376
|
*
|
|
377
|
-
* @param
|
|
378
|
-
* @param
|
|
379
|
-
* @param
|
|
380
|
-
* @param
|
|
377
|
+
* @param state State tree.
|
|
378
|
+
* @param kind Entity kind.
|
|
379
|
+
* @param name Entity name.
|
|
380
|
+
* @param key Record's key.
|
|
381
381
|
*
|
|
382
382
|
* @return Object with the entity's raw attributes.
|
|
383
383
|
*/
|
|
@@ -449,10 +449,10 @@ export const getRawEntityRecord = createSelector(
|
|
|
449
449
|
* Returns true if records have been received for the given set of parameters,
|
|
450
450
|
* or false otherwise.
|
|
451
451
|
*
|
|
452
|
-
* @param
|
|
453
|
-
* @param
|
|
454
|
-
* @param
|
|
455
|
-
* @param
|
|
452
|
+
* @param state State tree
|
|
453
|
+
* @param kind Entity kind.
|
|
454
|
+
* @param name Entity name.
|
|
455
|
+
* @param query Optional terms query.
|
|
456
456
|
*
|
|
457
457
|
* @return Whether entity records have been received.
|
|
458
458
|
*/
|
|
@@ -499,11 +499,11 @@ export interface GetEntityRecords {
|
|
|
499
499
|
/**
|
|
500
500
|
* Returns the Entity's records.
|
|
501
501
|
*
|
|
502
|
-
* @param
|
|
503
|
-
* @param
|
|
504
|
-
* @param
|
|
505
|
-
* @param
|
|
506
|
-
*
|
|
502
|
+
* @param state State tree
|
|
503
|
+
* @param kind Entity kind.
|
|
504
|
+
* @param name Entity name.
|
|
505
|
+
* @param query Optional terms query. If requesting specific
|
|
506
|
+
* fields, fields must always include the ID.
|
|
507
507
|
*
|
|
508
508
|
* @return Records.
|
|
509
509
|
*/
|
|
@@ -539,7 +539,7 @@ type DirtyEntityRecord = {
|
|
|
539
539
|
/**
|
|
540
540
|
* Returns the list of dirty entity records.
|
|
541
541
|
*
|
|
542
|
-
* @param
|
|
542
|
+
* @param state State tree.
|
|
543
543
|
*
|
|
544
544
|
* @return The list of updated records
|
|
545
545
|
*/
|
|
@@ -596,7 +596,7 @@ export const __experimentalGetDirtyEntityRecords = createSelector(
|
|
|
596
596
|
/**
|
|
597
597
|
* Returns the list of entities currently being saved.
|
|
598
598
|
*
|
|
599
|
-
* @param
|
|
599
|
+
* @param state State tree.
|
|
600
600
|
*
|
|
601
601
|
* @return The list of records being saved.
|
|
602
602
|
*/
|
|
@@ -648,10 +648,10 @@ export const __experimentalGetEntitiesBeingSaved = createSelector(
|
|
|
648
648
|
/**
|
|
649
649
|
* Returns the specified entity record's edits.
|
|
650
650
|
*
|
|
651
|
-
* @param
|
|
652
|
-
* @param
|
|
653
|
-
* @param
|
|
654
|
-
* @param
|
|
651
|
+
* @param state State tree.
|
|
652
|
+
* @param kind Entity kind.
|
|
653
|
+
* @param name Entity name.
|
|
654
|
+
* @param recordId Record ID.
|
|
655
655
|
*
|
|
656
656
|
* @return The entity record's edits.
|
|
657
657
|
*/
|
|
@@ -676,10 +676,10 @@ export function getEntityRecordEdits(
|
|
|
676
676
|
* are not considered for change detection.
|
|
677
677
|
* They are defined in the entity's config.
|
|
678
678
|
*
|
|
679
|
-
* @param
|
|
680
|
-
* @param
|
|
681
|
-
* @param
|
|
682
|
-
* @param
|
|
679
|
+
* @param state State tree.
|
|
680
|
+
* @param kind Entity kind.
|
|
681
|
+
* @param name Entity name.
|
|
682
|
+
* @param recordId Record ID.
|
|
683
683
|
*
|
|
684
684
|
* @return The entity record's non transient edits.
|
|
685
685
|
*/
|
|
@@ -712,10 +712,10 @@ export const getEntityRecordNonTransientEdits = createSelector(
|
|
|
712
712
|
* Returns true if the specified entity record has edits,
|
|
713
713
|
* and false otherwise.
|
|
714
714
|
*
|
|
715
|
-
* @param
|
|
716
|
-
* @param
|
|
717
|
-
* @param
|
|
718
|
-
* @param
|
|
715
|
+
* @param state State tree.
|
|
716
|
+
* @param kind Entity kind.
|
|
717
|
+
* @param name Entity name.
|
|
718
|
+
* @param recordId Record ID.
|
|
719
719
|
*
|
|
720
720
|
* @return Whether the entity record has edits or not.
|
|
721
721
|
*/
|
|
@@ -736,10 +736,10 @@ export function hasEditsForEntityRecord(
|
|
|
736
736
|
/**
|
|
737
737
|
* Returns the specified entity record, merged with its edits.
|
|
738
738
|
*
|
|
739
|
-
* @param
|
|
740
|
-
* @param
|
|
741
|
-
* @param
|
|
742
|
-
* @param
|
|
739
|
+
* @param state State tree.
|
|
740
|
+
* @param kind Entity kind.
|
|
741
|
+
* @param name Entity name.
|
|
742
|
+
* @param recordId Record ID.
|
|
743
743
|
*
|
|
744
744
|
* @return The entity record, merged with its edits.
|
|
745
745
|
*/
|
|
@@ -787,10 +787,10 @@ export const getEditedEntityRecord = createSelector(
|
|
|
787
787
|
/**
|
|
788
788
|
* Returns true if the specified entity record is autosaving, and false otherwise.
|
|
789
789
|
*
|
|
790
|
-
* @param
|
|
791
|
-
* @param
|
|
792
|
-
* @param
|
|
793
|
-
* @param
|
|
790
|
+
* @param state State tree.
|
|
791
|
+
* @param kind Entity kind.
|
|
792
|
+
* @param name Entity name.
|
|
793
|
+
* @param recordId Record ID.
|
|
794
794
|
*
|
|
795
795
|
* @return Whether the entity record is autosaving or not.
|
|
796
796
|
*/
|
|
@@ -811,10 +811,10 @@ export function isAutosavingEntityRecord(
|
|
|
811
811
|
/**
|
|
812
812
|
* Returns true if the specified entity record is saving, and false otherwise.
|
|
813
813
|
*
|
|
814
|
-
* @param
|
|
815
|
-
* @param
|
|
816
|
-
* @param
|
|
817
|
-
* @param
|
|
814
|
+
* @param state State tree.
|
|
815
|
+
* @param kind Entity kind.
|
|
816
|
+
* @param name Entity name.
|
|
817
|
+
* @param recordId Record ID.
|
|
818
818
|
*
|
|
819
819
|
* @return Whether the entity record is saving or not.
|
|
820
820
|
*/
|
|
@@ -834,10 +834,10 @@ export function isSavingEntityRecord(
|
|
|
834
834
|
/**
|
|
835
835
|
* Returns true if the specified entity record is deleting, and false otherwise.
|
|
836
836
|
*
|
|
837
|
-
* @param
|
|
838
|
-
* @param
|
|
839
|
-
* @param
|
|
840
|
-
* @param
|
|
837
|
+
* @param state State tree.
|
|
838
|
+
* @param kind Entity kind.
|
|
839
|
+
* @param name Entity name.
|
|
840
|
+
* @param recordId Record ID.
|
|
841
841
|
*
|
|
842
842
|
* @return Whether the entity record is deleting or not.
|
|
843
843
|
*/
|
|
@@ -857,10 +857,10 @@ export function isDeletingEntityRecord(
|
|
|
857
857
|
/**
|
|
858
858
|
* Returns the specified entity record's last save error.
|
|
859
859
|
*
|
|
860
|
-
* @param
|
|
861
|
-
* @param
|
|
862
|
-
* @param
|
|
863
|
-
* @param
|
|
860
|
+
* @param state State tree.
|
|
861
|
+
* @param kind Entity kind.
|
|
862
|
+
* @param name Entity name.
|
|
863
|
+
* @param recordId Record ID.
|
|
864
864
|
*
|
|
865
865
|
* @return The entity record's save error.
|
|
866
866
|
*/
|
|
@@ -882,10 +882,10 @@ export function getLastEntitySaveError(
|
|
|
882
882
|
/**
|
|
883
883
|
* Returns the specified entity record's last delete error.
|
|
884
884
|
*
|
|
885
|
-
* @param
|
|
886
|
-
* @param
|
|
887
|
-
* @param
|
|
888
|
-
* @param
|
|
885
|
+
* @param state State tree.
|
|
886
|
+
* @param kind Entity kind.
|
|
887
|
+
* @param name Entity name.
|
|
888
|
+
* @param recordId Record ID.
|
|
889
889
|
*
|
|
890
890
|
* @return The entity record's save error.
|
|
891
891
|
*/
|
|
@@ -911,7 +911,7 @@ export function getLastEntityDeleteError(
|
|
|
911
911
|
* of the history stack we are at. 0 is the
|
|
912
912
|
* last edit, -1 is the second last, and so on.
|
|
913
913
|
*
|
|
914
|
-
* @param
|
|
914
|
+
* @param state State tree.
|
|
915
915
|
*
|
|
916
916
|
* @return The current undo offset.
|
|
917
917
|
*/
|
|
@@ -923,7 +923,7 @@ function getCurrentUndoOffset( state: State ): number {
|
|
|
923
923
|
* Returns the previous edit from the current undo offset
|
|
924
924
|
* for the entity records edits history, if any.
|
|
925
925
|
*
|
|
926
|
-
* @param
|
|
926
|
+
* @param state State tree.
|
|
927
927
|
*
|
|
928
928
|
* @return The edit.
|
|
929
929
|
*/
|
|
@@ -935,7 +935,7 @@ export function getUndoEdit( state: State ): Optional< any > {
|
|
|
935
935
|
* Returns the next edit from the current undo offset
|
|
936
936
|
* for the entity records edits history, if any.
|
|
937
937
|
*
|
|
938
|
-
* @param
|
|
938
|
+
* @param state State tree.
|
|
939
939
|
*
|
|
940
940
|
* @return The edit.
|
|
941
941
|
*/
|
|
@@ -947,7 +947,7 @@ export function getRedoEdit( state: State ): Optional< any > {
|
|
|
947
947
|
* Returns true if there is a previous edit from the current undo offset
|
|
948
948
|
* for the entity records edits history, and false otherwise.
|
|
949
949
|
*
|
|
950
|
-
* @param
|
|
950
|
+
* @param state State tree.
|
|
951
951
|
*
|
|
952
952
|
* @return Whether there is a previous edit or not.
|
|
953
953
|
*/
|
|
@@ -959,7 +959,7 @@ export function hasUndo( state: State ): boolean {
|
|
|
959
959
|
* Returns true if there is a next edit from the current undo offset
|
|
960
960
|
* for the entity records edits history, and false otherwise.
|
|
961
961
|
*
|
|
962
|
-
* @param
|
|
962
|
+
* @param state State tree.
|
|
963
963
|
*
|
|
964
964
|
* @return Whether there is a next edit or not.
|
|
965
965
|
*/
|
|
@@ -970,7 +970,7 @@ export function hasRedo( state: State ): boolean {
|
|
|
970
970
|
/**
|
|
971
971
|
* Return the current theme.
|
|
972
972
|
*
|
|
973
|
-
* @param
|
|
973
|
+
* @param state Data state.
|
|
974
974
|
*
|
|
975
975
|
* @return The current theme.
|
|
976
976
|
*/
|
|
@@ -981,7 +981,7 @@ export function getCurrentTheme( state: State ): any {
|
|
|
981
981
|
/**
|
|
982
982
|
* Return the ID of the current global styles object.
|
|
983
983
|
*
|
|
984
|
-
* @param
|
|
984
|
+
* @param state Data state.
|
|
985
985
|
*
|
|
986
986
|
* @return The current global styles ID.
|
|
987
987
|
*/
|
|
@@ -992,7 +992,7 @@ export function __experimentalGetCurrentGlobalStylesId( state: State ): string {
|
|
|
992
992
|
/**
|
|
993
993
|
* Return theme supports data in the index.
|
|
994
994
|
*
|
|
995
|
-
* @param
|
|
995
|
+
* @param state Data state.
|
|
996
996
|
*
|
|
997
997
|
* @return Index data.
|
|
998
998
|
*/
|
|
@@ -1003,8 +1003,8 @@ export function getThemeSupports( state: State ): any {
|
|
|
1003
1003
|
/**
|
|
1004
1004
|
* Returns the embed preview for the given URL.
|
|
1005
1005
|
*
|
|
1006
|
-
* @param
|
|
1007
|
-
* @param
|
|
1006
|
+
* @param state Data state.
|
|
1007
|
+
* @param url Embedded URL.
|
|
1008
1008
|
*
|
|
1009
1009
|
* @return Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.
|
|
1010
1010
|
*/
|
|
@@ -1019,8 +1019,8 @@ export function getEmbedPreview( state: State, url: string ): any {
|
|
|
1019
1019
|
* We need to be able to determine if a URL is embeddable or not, based on what we
|
|
1020
1020
|
* get back from the oEmbed preview API.
|
|
1021
1021
|
*
|
|
1022
|
-
* @param
|
|
1023
|
-
* @param
|
|
1022
|
+
* @param state Data state.
|
|
1023
|
+
* @param url Embedded URL.
|
|
1024
1024
|
*
|
|
1025
1025
|
* @return Is the preview for the URL an oEmbed link fallback.
|
|
1026
1026
|
*/
|
|
@@ -1042,10 +1042,10 @@ export function isPreviewEmbedFallback( state: State, url: string ): boolean {
|
|
|
1042
1042
|
*
|
|
1043
1043
|
* https://developer.wordpress.org/rest-api/reference/
|
|
1044
1044
|
*
|
|
1045
|
-
* @param
|
|
1046
|
-
* @param
|
|
1047
|
-
* @param
|
|
1048
|
-
* @param
|
|
1045
|
+
* @param state Data state.
|
|
1046
|
+
* @param action Action to check. One of: 'create', 'read', 'update', 'delete'.
|
|
1047
|
+
* @param resource REST resource to check, e.g. 'media' or 'posts'.
|
|
1048
|
+
* @param id Optional ID of the rest resource to check.
|
|
1049
1049
|
*
|
|
1050
1050
|
* @return Whether or not the user can perform the action,
|
|
1051
1051
|
* or `undefined` if the OPTIONS request is still being made.
|
|
@@ -1068,10 +1068,10 @@ export function canUser(
|
|
|
1068
1068
|
*
|
|
1069
1069
|
* https://developer.wordpress.org/rest-api/reference/
|
|
1070
1070
|
*
|
|
1071
|
-
* @param
|
|
1072
|
-
* @param
|
|
1073
|
-
* @param
|
|
1074
|
-
* @param
|
|
1071
|
+
* @param state Data state.
|
|
1072
|
+
* @param kind Entity kind.
|
|
1073
|
+
* @param name Entity name.
|
|
1074
|
+
* @param recordId Record's id.
|
|
1075
1075
|
* @return Whether or not the user can edit,
|
|
1076
1076
|
* or `undefined` if the OPTIONS request is still being made.
|
|
1077
1077
|
*/
|
|
@@ -1096,9 +1096,9 @@ export function canUserEditEntityRecord(
|
|
|
1096
1096
|
* May return multiple autosaves since the backend stores one autosave per
|
|
1097
1097
|
* author for each post.
|
|
1098
1098
|
*
|
|
1099
|
-
* @param
|
|
1100
|
-
* @param
|
|
1101
|
-
* @param
|
|
1099
|
+
* @param state State tree.
|
|
1100
|
+
* @param postType The type of the parent post.
|
|
1101
|
+
* @param postId The id of the parent post.
|
|
1102
1102
|
*
|
|
1103
1103
|
* @return An array of autosaves for the post, or undefined if there is none.
|
|
1104
1104
|
*/
|
|
@@ -1113,10 +1113,10 @@ export function getAutosaves(
|
|
|
1113
1113
|
/**
|
|
1114
1114
|
* Returns the autosave for the post and author.
|
|
1115
1115
|
*
|
|
1116
|
-
* @param
|
|
1117
|
-
* @param
|
|
1118
|
-
* @param
|
|
1119
|
-
* @param
|
|
1116
|
+
* @param state State tree.
|
|
1117
|
+
* @param postType The type of the parent post.
|
|
1118
|
+
* @param postId The id of the parent post.
|
|
1119
|
+
* @param authorId The id of the author.
|
|
1120
1120
|
*
|
|
1121
1121
|
* @return The autosave for the post and author.
|
|
1122
1122
|
*/
|
|
@@ -1140,9 +1140,9 @@ export function getAutosave< EntityRecord extends ET.EntityRecord< any > >(
|
|
|
1140
1140
|
/**
|
|
1141
1141
|
* Returns true if the REST request for autosaves has completed.
|
|
1142
1142
|
*
|
|
1143
|
-
* @param
|
|
1144
|
-
* @param
|
|
1145
|
-
* @param
|
|
1143
|
+
* @param state State tree.
|
|
1144
|
+
* @param postType The type of the parent post.
|
|
1145
|
+
* @param postId The id of the parent post.
|
|
1146
1146
|
*
|
|
1147
1147
|
* @return True if the REST request was completed. False otherwise.
|
|
1148
1148
|
*/
|
|
@@ -1174,7 +1174,7 @@ export const hasFetchedAutosaves = createRegistrySelector(
|
|
|
1174
1174
|
* );
|
|
1175
1175
|
* ```
|
|
1176
1176
|
*
|
|
1177
|
-
* @param
|
|
1177
|
+
* @param state Editor state.
|
|
1178
1178
|
*
|
|
1179
1179
|
* @return A value whose reference will change only when an edit occurs.
|
|
1180
1180
|
*/
|
|
@@ -1191,8 +1191,8 @@ export const getReferenceByDistinctEdits = createSelector(
|
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Retrieve the frontend template used for a given link.
|
|
1193
1193
|
*
|
|
1194
|
-
* @param
|
|
1195
|
-
* @param
|
|
1194
|
+
* @param state Editor state.
|
|
1195
|
+
* @param link Link.
|
|
1196
1196
|
*
|
|
1197
1197
|
* @return The template record.
|
|
1198
1198
|
*/
|
|
@@ -1223,7 +1223,7 @@ export function __experimentalGetTemplateForLink(
|
|
|
1223
1223
|
/**
|
|
1224
1224
|
* Retrieve the current theme's base global styles
|
|
1225
1225
|
*
|
|
1226
|
-
* @param
|
|
1226
|
+
* @param state Editor state.
|
|
1227
1227
|
*
|
|
1228
1228
|
* @return The Global Styles object.
|
|
1229
1229
|
*/
|
|
@@ -1240,7 +1240,7 @@ export function __experimentalGetCurrentThemeBaseGlobalStyles(
|
|
|
1240
1240
|
/**
|
|
1241
1241
|
* Return the ID of the current global styles object.
|
|
1242
1242
|
*
|
|
1243
|
-
* @param
|
|
1243
|
+
* @param state Data state.
|
|
1244
1244
|
*
|
|
1245
1245
|
* @return The current global styles ID.
|
|
1246
1246
|
*/
|
|
@@ -1257,7 +1257,7 @@ export function __experimentalGetCurrentThemeGlobalStylesVariations(
|
|
|
1257
1257
|
/**
|
|
1258
1258
|
* Retrieve the list of registered block patterns.
|
|
1259
1259
|
*
|
|
1260
|
-
* @param
|
|
1260
|
+
* @param state Data state.
|
|
1261
1261
|
*
|
|
1262
1262
|
* @return Block pattern list.
|
|
1263
1263
|
*/
|
|
@@ -1268,7 +1268,7 @@ export function getBlockPatterns( state: State ): Array< any > {
|
|
|
1268
1268
|
/**
|
|
1269
1269
|
* Retrieve the list of registered block pattern categories.
|
|
1270
1270
|
*
|
|
1271
|
-
* @param
|
|
1271
|
+
* @param state Data state.
|
|
1272
1272
|
*
|
|
1273
1273
|
* @return Block pattern category list.
|
|
1274
1274
|
*/
|