@shopify/ui-extensions 2025.10.0-rc.8 → 2025.10.0-rc.9

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 (156) hide show
  1. package/build/ts/surfaces/admin/components/AdminAction.d.ts +1 -1
  2. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +1 -1
  3. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +1 -1
  4. package/build/ts/surfaces/admin/components/Avatar.d.ts +139 -0
  5. package/build/ts/surfaces/admin/components/Badge.d.ts +1 -1
  6. package/build/ts/surfaces/admin/components/Banner.d.ts +1 -1
  7. package/build/ts/surfaces/admin/components/Box.d.ts +1 -1
  8. package/build/ts/surfaces/admin/components/Button.d.ts +1 -1
  9. package/build/ts/surfaces/admin/components/Checkbox.d.ts +1 -1
  10. package/build/ts/surfaces/admin/components/Choice.d.ts +1 -1
  11. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +1 -1
  12. package/build/ts/surfaces/admin/components/Clickable.d.ts +1 -1
  13. package/build/ts/surfaces/admin/components/DatePicker.d.ts +1 -1
  14. package/build/ts/surfaces/admin/components/Divider.d.ts +1 -1
  15. package/build/ts/surfaces/admin/components/EmailField.d.ts +1 -1
  16. package/build/ts/surfaces/admin/components/Form.d.ts +1 -1
  17. package/build/ts/surfaces/admin/components/Grid.d.ts +1 -1
  18. package/build/ts/surfaces/admin/components/GridItem.d.ts +1 -1
  19. package/build/ts/surfaces/admin/components/Heading.d.ts +1 -1
  20. package/build/ts/surfaces/admin/components/Icon.d.ts +1 -1
  21. package/build/ts/surfaces/admin/components/Image.d.ts +1 -1
  22. package/build/ts/surfaces/admin/components/Link.d.ts +1 -1
  23. package/build/ts/surfaces/admin/components/ListItem.d.ts +1 -1
  24. package/build/ts/surfaces/admin/components/MoneyField.d.ts +1 -1
  25. package/build/ts/surfaces/admin/components/NumberField.d.ts +1 -1
  26. package/build/ts/surfaces/admin/components/Option.d.ts +1 -1
  27. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +1 -1
  28. package/build/ts/surfaces/admin/components/OrderedList.d.ts +1 -1
  29. package/build/ts/surfaces/admin/components/Page.d.ts +1 -1
  30. package/build/ts/surfaces/admin/components/Paragraph.d.ts +1 -1
  31. package/build/ts/surfaces/admin/components/PasswordField.d.ts +1 -1
  32. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +1 -1
  33. package/build/ts/surfaces/admin/components/SearchField.d.ts +1 -1
  34. package/build/ts/surfaces/admin/components/Section.d.ts +1 -1
  35. package/build/ts/surfaces/admin/components/Select.d.ts +1 -1
  36. package/build/ts/surfaces/admin/components/Spinner.d.ts +1 -1
  37. package/build/ts/surfaces/admin/components/Stack.d.ts +1 -1
  38. package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
  39. package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
  40. package/build/ts/surfaces/admin/components/Switch.d.ts +1 -1
  41. package/build/ts/surfaces/admin/components/Table.d.ts +1 -1
  42. package/build/ts/surfaces/admin/components/TableBody.d.ts +1 -1
  43. package/build/ts/surfaces/admin/components/TableCell.d.ts +1 -1
  44. package/build/ts/surfaces/admin/components/TableHeader.d.ts +1 -1
  45. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  46. package/build/ts/surfaces/admin/components/TableRow.d.ts +1 -1
  47. package/build/ts/surfaces/admin/components/Text.d.ts +1 -1
  48. package/build/ts/surfaces/admin/components/TextArea.d.ts +1 -1
  49. package/build/ts/surfaces/admin/components/TextField.d.ts +1 -1
  50. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +1 -1
  51. package/build/ts/surfaces/admin/components/URLField.d.ts +1 -1
  52. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +1 -1
  53. package/build/ts/surfaces/admin/components/shared.d.ts +195 -160
  54. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +68 -11
  55. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +68 -11
  56. package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +68 -11
  57. package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +68 -11
  58. package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +68 -11
  59. package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +68 -11
  60. package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +68 -11
  61. package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +68 -11
  62. package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +68 -11
  63. package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +68 -11
  64. package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +68 -11
  65. package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +68 -11
  66. package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +68 -11
  67. package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +68 -11
  68. package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +68 -11
  69. package/build/ts/surfaces/admin/targets/admin.customers.segmentation-templates.render.d.ts +68 -11
  70. package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +68 -11
  71. package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +68 -11
  72. package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +68 -11
  73. package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +68 -11
  74. package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +68 -11
  75. package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +68 -11
  76. package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +68 -11
  77. package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +68 -11
  78. package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +68 -11
  79. package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +68 -11
  80. package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +68 -11
  81. package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +68 -11
  82. package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +68 -11
  83. package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +68 -11
  84. package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +68 -11
  85. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +68 -11
  86. package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +68 -11
  87. package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +68 -11
  88. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +68 -11
  89. package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +68 -11
  90. package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +68 -11
  91. package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +68 -11
  92. package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +68 -11
  93. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +68 -11
  94. package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +68 -11
  95. package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +68 -11
  96. package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +68 -11
  97. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +68 -11
  98. package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +68 -11
  99. package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +68 -11
  100. package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +68 -11
  101. package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +68 -11
  102. package/build/tsconfig.tsbuildinfo +1 -1
  103. package/package.json +1 -1
  104. package/src/surfaces/admin/components/AdminAction.d.ts +1 -1
  105. package/src/surfaces/admin/components/AdminBlock.d.ts +1 -1
  106. package/src/surfaces/admin/components/AdminPrintAction.d.ts +1 -1
  107. package/src/surfaces/admin/components/Avatar.d.ts +139 -0
  108. package/src/surfaces/admin/components/Badge.d.ts +1 -1
  109. package/src/surfaces/admin/components/Banner.d.ts +1 -1
  110. package/src/surfaces/admin/components/Box.d.ts +1 -1
  111. package/src/surfaces/admin/components/Button.d.ts +1 -1
  112. package/src/surfaces/admin/components/Checkbox.d.ts +1 -1
  113. package/src/surfaces/admin/components/Choice.d.ts +1 -1
  114. package/src/surfaces/admin/components/ChoiceList.d.ts +1 -1
  115. package/src/surfaces/admin/components/Clickable.d.ts +1 -1
  116. package/src/surfaces/admin/components/DatePicker.d.ts +1 -1
  117. package/src/surfaces/admin/components/Divider.d.ts +1 -1
  118. package/src/surfaces/admin/components/EmailField.d.ts +1 -1
  119. package/src/surfaces/admin/components/Form.d.ts +1 -1
  120. package/src/surfaces/admin/components/Grid.d.ts +1 -1
  121. package/src/surfaces/admin/components/GridItem.d.ts +1 -1
  122. package/src/surfaces/admin/components/Heading.d.ts +1 -1
  123. package/src/surfaces/admin/components/Icon.d.ts +1 -1
  124. package/src/surfaces/admin/components/Image.d.ts +1 -1
  125. package/src/surfaces/admin/components/Link.d.ts +1 -1
  126. package/src/surfaces/admin/components/ListItem.d.ts +1 -1
  127. package/src/surfaces/admin/components/MoneyField.d.ts +1 -1
  128. package/src/surfaces/admin/components/NumberField.d.ts +1 -1
  129. package/src/surfaces/admin/components/Option.d.ts +1 -1
  130. package/src/surfaces/admin/components/OptionGroup.d.ts +1 -1
  131. package/src/surfaces/admin/components/OrderedList.d.ts +1 -1
  132. package/src/surfaces/admin/components/Page.d.ts +1 -1
  133. package/src/surfaces/admin/components/Paragraph.d.ts +1 -1
  134. package/src/surfaces/admin/components/PasswordField.d.ts +1 -1
  135. package/src/surfaces/admin/components/QueryContainer.d.ts +1 -1
  136. package/src/surfaces/admin/components/SearchField.d.ts +1 -1
  137. package/src/surfaces/admin/components/Section.d.ts +1 -1
  138. package/src/surfaces/admin/components/Select.d.ts +1 -1
  139. package/src/surfaces/admin/components/Spinner.d.ts +1 -1
  140. package/src/surfaces/admin/components/Stack.d.ts +1 -1
  141. package/src/surfaces/admin/components/StandardComponents.ts +1 -0
  142. package/src/surfaces/admin/components/Switch.d.ts +1 -1
  143. package/src/surfaces/admin/components/Table.d.ts +1 -1
  144. package/src/surfaces/admin/components/TableBody.d.ts +1 -1
  145. package/src/surfaces/admin/components/TableCell.d.ts +1 -1
  146. package/src/surfaces/admin/components/TableHeader.d.ts +1 -1
  147. package/src/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  148. package/src/surfaces/admin/components/TableRow.d.ts +1 -1
  149. package/src/surfaces/admin/components/Text.d.ts +1 -1
  150. package/src/surfaces/admin/components/TextArea.d.ts +1 -1
  151. package/src/surfaces/admin/components/TextField.d.ts +1 -1
  152. package/src/surfaces/admin/components/Thumbnail.d.ts +1 -1
  153. package/src/surfaces/admin/components/URLField.d.ts +1 -1
  154. package/src/surfaces/admin/components/UnorderedList.d.ts +1 -1
  155. package/src/surfaces/admin/components/shared.d.ts +195 -160
  156. package/src/surfaces/admin/components.d.ts +274 -182
@@ -1,4 +1,4 @@
1
- /** VERSION: 1.1.1 **/
1
+ /** VERSION: 1.2.0 **/
2
2
 
3
3
  /* eslint-disable @typescript-eslint/ban-types */
4
4
 
@@ -30,6 +30,41 @@ export type SizeKeyword =
30
30
  | 'large-400'
31
31
  | 'large-500';
32
32
  export type ColorKeyword = 'subdued' | 'base' | 'strong';
33
+ interface AvatarProps$1 extends GlobalProps {
34
+ /**
35
+ * Initials to display in the avatar.
36
+ */
37
+ initials?: string;
38
+ /**
39
+ * The URL or path to the image.
40
+ *
41
+ * Initials will be rendered as a fallback if `src` is not provided, fails to load or does not load quickly
42
+ */
43
+ src?: string;
44
+ /**
45
+ * Invoked when load of provided image completes successfully.
46
+ *
47
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload
48
+ */
49
+ onLoad?: () => void;
50
+ /**
51
+ * Invoked on load error of provided image.
52
+ *
53
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
54
+ */
55
+ onError?: () => void;
56
+ /**
57
+ * Size of the avatar.
58
+ *
59
+ * @default 'base'
60
+ */
61
+ size?: SizeKeyword;
62
+ /**
63
+ * An alternative text that describes the avatar for the reader
64
+ * to understand what it is about or identify the user the avatar belongs to.
65
+ */
66
+ alt?: string;
67
+ }
33
68
  export type BackgroundColorKeyword = 'transparent' | ColorKeyword;
34
69
  export interface BackgroundProps {
35
70
  /**
@@ -3122,6 +3157,165 @@ export type URLAutocompleteField = ExtractStrict<
3122
3157
  AnyAutocompleteField,
3123
3158
  'url' | 'photo' | 'impp' | `${AutocompleteAddressGroup} impp`
3124
3159
  >;
3160
+ //
3161
+ // Preact Virtual DOM
3162
+ // -----------------------------------
3163
+ export interface VNode<P = {}> {
3164
+ type: ComponentType<P> | string;
3165
+ props: P & {
3166
+ children: ComponentChildren$1;
3167
+ };
3168
+ key: Key;
3169
+ /**
3170
+ * ref is not guaranteed by React.ReactElement, for compatibility reasons
3171
+ * with popular react libs we define it as optional too
3172
+ */
3173
+ ref?: Ref<any> | null;
3174
+ /**
3175
+ * The time this `vnode` started rendering. Will only be set when
3176
+ * the devtools are attached.
3177
+ * Default value: `0`
3178
+ */
3179
+ startTime?: number;
3180
+ /**
3181
+ * The time that the rendering of this `vnode` was completed. Will only be
3182
+ * set when the devtools are attached.
3183
+ * Default value: `-1`
3184
+ */
3185
+ endTime?: number;
3186
+ }
3187
+ //
3188
+ // Preact Component interface
3189
+ // -----------------------------------
3190
+ export type Key = string | number | any;
3191
+ export interface RefObject<T> {
3192
+ current: T | null;
3193
+ }
3194
+ export type RefCallback<T> = (instance: T | null) => void;
3195
+ export type Ref<T> = RefObject<T> | RefCallback<T> | null;
3196
+ export type ComponentChild =
3197
+ | VNode<any>
3198
+ | object
3199
+ | string
3200
+ | number
3201
+ | bigint
3202
+ | boolean
3203
+ | null
3204
+ | undefined;
3205
+ type ComponentChildren$1 = ComponentChild[] | ComponentChild;
3206
+ export interface Attributes {
3207
+ key?: Key | undefined;
3208
+ jsx?: boolean | undefined;
3209
+ }
3210
+ export interface ErrorInfo {
3211
+ componentStack?: string;
3212
+ }
3213
+ export type RenderableProps<P, RefType = any> = P &
3214
+ Readonly<
3215
+ Attributes & {
3216
+ children?: ComponentChildren$1;
3217
+ ref?: Ref<RefType>;
3218
+ }
3219
+ >;
3220
+ export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
3221
+ export interface FunctionComponent<P = {}> {
3222
+ (props: RenderableProps<P>, context?: any): ComponentChildren$1;
3223
+ displayName?: string;
3224
+ defaultProps?: Partial<P> | undefined;
3225
+ }
3226
+ export interface ComponentClass<P = {}, S = {}> {
3227
+ new (props: P, context?: any): Component<P, S>;
3228
+ displayName?: string;
3229
+ defaultProps?: Partial<P>;
3230
+ contextType?: Context<any>;
3231
+ getDerivedStateFromProps?(
3232
+ props: Readonly<P>,
3233
+ state: Readonly<S>,
3234
+ ): Partial<S> | null;
3235
+ getDerivedStateFromError?(error: any): Partial<S> | null;
3236
+ }
3237
+ export interface Component<P = {}, S = {}> {
3238
+ componentWillMount?(): void;
3239
+ componentDidMount?(): void;
3240
+ componentWillUnmount?(): void;
3241
+ getChildContext?(): object;
3242
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
3243
+ shouldComponentUpdate?(
3244
+ nextProps: Readonly<P>,
3245
+ nextState: Readonly<S>,
3246
+ nextContext: any,
3247
+ ): boolean;
3248
+ componentWillUpdate?(
3249
+ nextProps: Readonly<P>,
3250
+ nextState: Readonly<S>,
3251
+ nextContext: any,
3252
+ ): void;
3253
+ getSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;
3254
+ componentDidUpdate?(
3255
+ previousProps: Readonly<P>,
3256
+ previousState: Readonly<S>,
3257
+ snapshot: any,
3258
+ ): void;
3259
+ componentDidCatch?(error: any, errorInfo: ErrorInfo): void;
3260
+ }
3261
+ declare abstract class Component<P, S> {
3262
+ constructor(props?: P, context?: any);
3263
+ static displayName?: string;
3264
+ static defaultProps?: any;
3265
+ static contextType?: Context<any>;
3266
+ // Static members cannot reference class type parameters. This is not
3267
+ // supported in TypeScript. Reusing the same type arguments from `Component`
3268
+ // will lead to an impossible state where one cannot satisfy the type
3269
+ // constraint under no circumstances, see #1356.In general type arguments
3270
+ // seem to be a bit buggy and not supported well at the time of this
3271
+ // writing with TS 3.3.3333.
3272
+ static getDerivedStateFromProps?(
3273
+ props: Readonly<object>,
3274
+ state: Readonly<object>,
3275
+ ): object | null;
3276
+
3277
+ static getDerivedStateFromError?(error: any): object | null;
3278
+ state: Readonly<S>;
3279
+ props: RenderableProps<P>;
3280
+ context: any;
3281
+ base?: Element | Text;
3282
+ // From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402
3283
+ // // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
3284
+ // // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
3285
+ setState<K extends keyof S>(
3286
+ state:
3287
+ | ((
3288
+ prevState: Readonly<S>,
3289
+ props: Readonly<P>,
3290
+ ) => Pick<S, K> | Partial<S> | null)
3291
+ | (Pick<S, K> | Partial<S> | null),
3292
+ callback?: () => void,
3293
+ ): void;
3294
+
3295
+ forceUpdate(callback?: () => void): void;
3296
+ abstract render(
3297
+ props?: RenderableProps<P>,
3298
+ state?: Readonly<S>,
3299
+ context?: any,
3300
+ ): ComponentChildren$1;
3301
+ }
3302
+ //
3303
+ // Context
3304
+ // -----------------------------------
3305
+ export interface Consumer<T>
3306
+ extends FunctionComponent<{
3307
+ children: (value: T) => ComponentChildren$1;
3308
+ }> {}
3309
+ export interface Provider<T>
3310
+ extends FunctionComponent<{
3311
+ value: T;
3312
+ children?: ComponentChildren$1;
3313
+ }> {}
3314
+ export interface Context<T> extends Provider<T> {
3315
+ Consumer: Consumer<T>;
3316
+ Provider: Provider<T>;
3317
+ displayName?: string;
3318
+ }
3125
3319
  type IconType$1 =
3126
3320
  | 'adjust'
3127
3321
  | 'affiliate'
@@ -3619,165 +3813,6 @@ type IconType$1 =
3619
3813
  | 'wrench'
3620
3814
  | 'x'
3621
3815
  | 'x-circle';
3622
- //
3623
- // Preact Virtual DOM
3624
- // -----------------------------------
3625
- export interface VNode<P = {}> {
3626
- type: ComponentType<P> | string;
3627
- props: P & {
3628
- children: ComponentChildren$1;
3629
- };
3630
- key: Key;
3631
- /**
3632
- * ref is not guaranteed by React.ReactElement, for compatibility reasons
3633
- * with popular react libs we define it as optional too
3634
- */
3635
- ref?: Ref<any> | null;
3636
- /**
3637
- * The time this `vnode` started rendering. Will only be set when
3638
- * the devtools are attached.
3639
- * Default value: `0`
3640
- */
3641
- startTime?: number;
3642
- /**
3643
- * The time that the rendering of this `vnode` was completed. Will only be
3644
- * set when the devtools are attached.
3645
- * Default value: `-1`
3646
- */
3647
- endTime?: number;
3648
- }
3649
- //
3650
- // Preact Component interface
3651
- // -----------------------------------
3652
- export type Key = string | number | any;
3653
- export interface RefObject<T> {
3654
- current: T | null;
3655
- }
3656
- export type RefCallback<T> = (instance: T | null) => void;
3657
- export type Ref<T> = RefObject<T> | RefCallback<T> | null;
3658
- export type ComponentChild =
3659
- | VNode<any>
3660
- | object
3661
- | string
3662
- | number
3663
- | bigint
3664
- | boolean
3665
- | null
3666
- | undefined;
3667
- type ComponentChildren$1 = ComponentChild[] | ComponentChild;
3668
- export interface Attributes {
3669
- key?: Key | undefined;
3670
- jsx?: boolean | undefined;
3671
- }
3672
- export interface ErrorInfo {
3673
- componentStack?: string;
3674
- }
3675
- export type RenderableProps<P, RefType = any> = P &
3676
- Readonly<
3677
- Attributes & {
3678
- children?: ComponentChildren$1;
3679
- ref?: Ref<RefType>;
3680
- }
3681
- >;
3682
- export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
3683
- export interface FunctionComponent<P = {}> {
3684
- (props: RenderableProps<P>, context?: any): ComponentChildren$1;
3685
- displayName?: string;
3686
- defaultProps?: Partial<P> | undefined;
3687
- }
3688
- export interface ComponentClass<P = {}, S = {}> {
3689
- new (props: P, context?: any): Component<P, S>;
3690
- displayName?: string;
3691
- defaultProps?: Partial<P>;
3692
- contextType?: Context<any>;
3693
- getDerivedStateFromProps?(
3694
- props: Readonly<P>,
3695
- state: Readonly<S>,
3696
- ): Partial<S> | null;
3697
- getDerivedStateFromError?(error: any): Partial<S> | null;
3698
- }
3699
- export interface Component<P = {}, S = {}> {
3700
- componentWillMount?(): void;
3701
- componentDidMount?(): void;
3702
- componentWillUnmount?(): void;
3703
- getChildContext?(): object;
3704
- componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
3705
- shouldComponentUpdate?(
3706
- nextProps: Readonly<P>,
3707
- nextState: Readonly<S>,
3708
- nextContext: any,
3709
- ): boolean;
3710
- componentWillUpdate?(
3711
- nextProps: Readonly<P>,
3712
- nextState: Readonly<S>,
3713
- nextContext: any,
3714
- ): void;
3715
- getSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;
3716
- componentDidUpdate?(
3717
- previousProps: Readonly<P>,
3718
- previousState: Readonly<S>,
3719
- snapshot: any,
3720
- ): void;
3721
- componentDidCatch?(error: any, errorInfo: ErrorInfo): void;
3722
- }
3723
- declare abstract class Component<P, S> {
3724
- constructor(props?: P, context?: any);
3725
- static displayName?: string;
3726
- static defaultProps?: any;
3727
- static contextType?: Context<any>;
3728
- // Static members cannot reference class type parameters. This is not
3729
- // supported in TypeScript. Reusing the same type arguments from `Component`
3730
- // will lead to an impossible state where one cannot satisfy the type
3731
- // constraint under no circumstances, see #1356.In general type arguments
3732
- // seem to be a bit buggy and not supported well at the time of this
3733
- // writing with TS 3.3.3333.
3734
- static getDerivedStateFromProps?(
3735
- props: Readonly<object>,
3736
- state: Readonly<object>,
3737
- ): object | null;
3738
-
3739
- static getDerivedStateFromError?(error: any): object | null;
3740
- state: Readonly<S>;
3741
- props: RenderableProps<P>;
3742
- context: any;
3743
- base?: Element | Text;
3744
- // From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402
3745
- // // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
3746
- // // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
3747
- setState<K extends keyof S>(
3748
- state:
3749
- | ((
3750
- prevState: Readonly<S>,
3751
- props: Readonly<P>,
3752
- ) => Pick<S, K> | Partial<S> | null)
3753
- | (Pick<S, K> | Partial<S> | null),
3754
- callback?: () => void,
3755
- ): void;
3756
-
3757
- forceUpdate(callback?: () => void): void;
3758
- abstract render(
3759
- props?: RenderableProps<P>,
3760
- state?: Readonly<S>,
3761
- context?: any,
3762
- ): ComponentChildren$1;
3763
- }
3764
- //
3765
- // Context
3766
- // -----------------------------------
3767
- export interface Consumer<T>
3768
- extends FunctionComponent<{
3769
- children: (value: T) => ComponentChildren$1;
3770
- }> {}
3771
- export interface Provider<T>
3772
- extends FunctionComponent<{
3773
- value: T;
3774
- children?: ComponentChildren$1;
3775
- }> {}
3776
- export interface Context<T> extends Provider<T> {
3777
- Consumer: Consumer<T>;
3778
- Provider: Provider<T>;
3779
- displayName?: string;
3780
- }
3781
3816
  interface AdminActionProps$1 extends GlobalProps, ActionProps, ActionSlots {
3782
3817
  /**
3783
3818
  * Whether the action is in a loading state, such as initial page load or action opening.