@schematichq/schematic-components 0.3.6 → 0.3.7

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.
@@ -1,3 +1,4 @@
1
+ import { Component } from 'react';
1
2
  import { Context } from 'react';
2
3
  import * as Craft from '@craftjs/core';
3
4
  import { DetailedHTMLProps } from 'react';
@@ -61,61 +62,6 @@ declare class BaseAPI {
61
62
  private clone;
62
63
  }
63
64
 
64
- /**
65
- * Schematic API
66
- * Schematic API
67
- *
68
- * The version of the OpenAPI document: 0.1
69
- *
70
- *
71
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
72
- * https://openapi-generator.tech
73
- * Do not edit the class manually.
74
- */
75
- /**
76
- *
77
- * @export
78
- * @interface BillingPlan
79
- */
80
- declare interface BillingPlan {
81
- /**
82
- *
83
- * @type {string}
84
- * @memberof BillingPlan
85
- */
86
- description?: string | null;
87
- /**
88
- *
89
- * @type {string}
90
- * @memberof BillingPlan
91
- */
92
- id: string;
93
- /**
94
- *
95
- * @type {string}
96
- * @memberof BillingPlan
97
- */
98
- imageUrl?: string | null;
99
- /**
100
- *
101
- * @type {string}
102
- * @memberof BillingPlan
103
- */
104
- name: string;
105
- /**
106
- *
107
- * @type {string}
108
- * @memberof BillingPlan
109
- */
110
- planPeriod?: string | null;
111
- /**
112
- *
113
- * @type {number}
114
- * @memberof BillingPlan
115
- */
116
- planPrice?: number | null;
117
- }
118
-
119
65
  /**
120
66
  * Schematic API
121
67
  * Schematic API
@@ -522,6 +468,8 @@ declare class CheckoutApi extends runtime.BaseAPI {
522
468
  updatePaymentMethod(requestParameters: UpdatePaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdatePaymentMethodResponse>;
523
469
  }
524
470
 
471
+ export declare const CheckoutDialog: () => JSX_2.Element;
472
+
525
473
  declare interface CheckoutRequest {
526
474
  changeSubscriptionRequestBody: ChangeSubscriptionRequestBody;
527
475
  }
@@ -567,10 +515,10 @@ export declare interface ColumnProps extends React.HTMLProps<HTMLDivElement> {
567
515
  declare interface CompanyDetailResponseData {
568
516
  /**
569
517
  *
570
- * @type {Array<BillingPlan>}
518
+ * @type {Array<CompanyPlanWithBillingSubView>}
571
519
  * @memberof CompanyDetailResponseData
572
520
  */
573
- addOns: Array<BillingPlan>;
521
+ addOns: Array<CompanyPlanWithBillingSubView>;
574
522
  /**
575
523
  *
576
524
  * @type {Array<BillingSubscriptionResponseData>}
@@ -627,10 +575,10 @@ declare interface CompanyDetailResponseData {
627
575
  name: string;
628
576
  /**
629
577
  *
630
- * @type {BillingPlan}
578
+ * @type {CompanyPlanWithBillingSubView}
631
579
  * @memberof CompanyDetailResponseData
632
580
  */
633
- plan?: BillingPlan;
581
+ plan?: CompanyPlanWithBillingSubView;
634
582
  /**
635
583
  *
636
584
  * @type {Array<PreviewObject>}
@@ -767,6 +715,67 @@ declare interface CompanyPlanDetailResponseData {
767
715
  yearlyPrice?: BillingPriceResponseData;
768
716
  }
769
717
 
718
+ /**
719
+ * Schematic API
720
+ * Schematic API
721
+ *
722
+ * The version of the OpenAPI document: 0.1
723
+ *
724
+ *
725
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
726
+ * https://openapi-generator.tech
727
+ * Do not edit the class manually.
728
+ */
729
+ /**
730
+ *
731
+ * @export
732
+ * @interface CompanyPlanWithBillingSubView
733
+ */
734
+ declare interface CompanyPlanWithBillingSubView {
735
+ /**
736
+ *
737
+ * @type {string}
738
+ * @memberof CompanyPlanWithBillingSubView
739
+ */
740
+ billingProductId?: string | null;
741
+ /**
742
+ *
743
+ * @type {string}
744
+ * @memberof CompanyPlanWithBillingSubView
745
+ */
746
+ description?: string | null;
747
+ /**
748
+ *
749
+ * @type {string}
750
+ * @memberof CompanyPlanWithBillingSubView
751
+ */
752
+ id: string;
753
+ /**
754
+ *
755
+ * @type {string}
756
+ * @memberof CompanyPlanWithBillingSubView
757
+ */
758
+ imageUrl?: string | null;
759
+ /**
760
+ *
761
+ * @type {string}
762
+ * @memberof CompanyPlanWithBillingSubView
763
+ */
764
+ name: string;
765
+ /**
766
+ *
767
+ * @type {string}
768
+ * @memberof CompanyPlanWithBillingSubView
769
+ */
770
+ planPeriod?: string | null;
771
+ /**
772
+ *
773
+ * @type {number}
774
+ * @memberof CompanyPlanWithBillingSubView
775
+ */
776
+ planPrice?: number | null;
777
+ }
778
+
770
779
  /**
771
780
  *
772
781
  * @export
@@ -1094,27 +1103,21 @@ export declare const defaultTheme: EmbedThemeSettings;
1094
1103
  declare interface DesignProps {
1095
1104
  header: {
1096
1105
  isVisible: boolean;
1097
- title: {
1098
- fontStyle: FontStyle;
1099
- };
1100
- description: {
1101
- isVisible: boolean;
1102
- fontStyle: FontStyle;
1103
- };
1104
- price: {
1105
- isVisible: boolean;
1106
- fontStyle: FontStyle;
1107
- };
1106
+ fontStyle: FontStyle;
1107
+ text: string;
1108
1108
  };
1109
- addOns: {
1109
+ icons: {
1110
1110
  isVisible: boolean;
1111
1111
  fontStyle: FontStyle;
1112
- showLabel: boolean;
1112
+ style: "light" | "dark";
1113
1113
  };
1114
- callToAction: {
1114
+ entitlement: {
1115
1115
  isVisible: boolean;
1116
- buttonSize: "sm" | "md" | "lg";
1117
- buttonStyle: "primary" | "secondary" | "tertiary";
1116
+ fontStyle: FontStyle;
1117
+ };
1118
+ usage: {
1119
+ isVisible: boolean;
1120
+ fontStyle: FontStyle;
1118
1121
  };
1119
1122
  }
1120
1123
 
@@ -1122,18 +1125,20 @@ declare interface DesignProps_2 {
1122
1125
  header: {
1123
1126
  isVisible: boolean;
1124
1127
  fontStyle: FontStyle;
1125
- text: string;
1126
1128
  };
1127
- icons: {
1129
+ date: {
1128
1130
  isVisible: boolean;
1129
1131
  fontStyle: FontStyle;
1130
- style: "light" | "dark";
1131
1132
  };
1132
- entitlement: {
1133
+ amount: {
1133
1134
  isVisible: boolean;
1134
1135
  fontStyle: FontStyle;
1135
1136
  };
1136
- usage: {
1137
+ limit: {
1138
+ isVisible: boolean;
1139
+ number: number;
1140
+ };
1141
+ collapse: {
1137
1142
  isVisible: boolean;
1138
1143
  fontStyle: FontStyle;
1139
1144
  };
@@ -1166,27 +1171,37 @@ declare interface DesignProps_4 {
1166
1171
  header: {
1167
1172
  isVisible: boolean;
1168
1173
  fontStyle: FontStyle;
1169
- prefix: string;
1170
- };
1171
- price: {
1172
- isVisible: boolean;
1173
- fontStyle: FontStyle;
1174
1174
  };
1175
- contractEndDate: {
1176
- isVisible: boolean;
1177
- fontStyle: FontStyle;
1178
- prefix: string;
1175
+ functions: {
1176
+ allowEdit: boolean;
1177
+ showExpiration: boolean;
1179
1178
  };
1180
1179
  }
1181
1180
 
1182
1181
  declare interface DesignProps_5 {
1183
1182
  header: {
1183
+ isVisible: boolean;
1184
+ title: {
1185
+ fontStyle: FontStyle;
1186
+ };
1187
+ description: {
1188
+ isVisible: boolean;
1189
+ fontStyle: FontStyle;
1190
+ };
1191
+ price: {
1192
+ isVisible: boolean;
1193
+ fontStyle: FontStyle;
1194
+ };
1195
+ };
1196
+ addOns: {
1184
1197
  isVisible: boolean;
1185
1198
  fontStyle: FontStyle;
1199
+ showLabel: boolean;
1186
1200
  };
1187
- functions: {
1188
- allowEdit: boolean;
1189
- showExpiration: boolean;
1201
+ callToAction: {
1202
+ isVisible: boolean;
1203
+ buttonSize: "sm" | "md" | "lg";
1204
+ buttonStyle: "primary" | "secondary" | "tertiary";
1190
1205
  };
1191
1206
  }
1192
1207
 
@@ -1194,22 +1209,16 @@ declare interface DesignProps_6 {
1194
1209
  header: {
1195
1210
  isVisible: boolean;
1196
1211
  fontStyle: FontStyle;
1212
+ prefix: string;
1197
1213
  };
1198
- date: {
1199
- isVisible: boolean;
1200
- fontStyle: FontStyle;
1201
- };
1202
- amount: {
1214
+ price: {
1203
1215
  isVisible: boolean;
1204
1216
  fontStyle: FontStyle;
1205
1217
  };
1206
- limit: {
1207
- isVisible: boolean;
1208
- number: number;
1209
- };
1210
- collapse: {
1218
+ contractEndDate: {
1211
1219
  isVisible: boolean;
1212
1220
  fontStyle: FontStyle;
1221
+ prefix: string;
1213
1222
  };
1214
1223
  }
1215
1224
 
@@ -1224,6 +1233,12 @@ declare interface ElementProps {
1224
1233
  style?: React.CSSProperties;
1225
1234
  }
1226
1235
 
1236
+ export declare const EmbedButton: IStyledComponentBase<"web", Substitute<ButtonProps, {
1237
+ $size?: "sm" | "md" | "lg";
1238
+ $color?: "primary" | "secondary" | "tertiary";
1239
+ $variant?: "outline" | "filled";
1240
+ }>> & string & Omit<({ color, size, variant, disabled, isLoading, children, ...props }: ButtonProps) => JSX_2.Element, keyof Component<any, {}, any>>;
1241
+
1227
1242
  export declare const EmbedContext: Context<EmbedContextProps>;
1228
1243
 
1229
1244
  export declare interface EmbedContextProps {
@@ -1232,6 +1247,7 @@ export declare interface EmbedContextProps {
1232
1247
  nodes: SerializedNodeWithChildren[];
1233
1248
  settings: EmbedSettings;
1234
1249
  layout: EmbedLayout;
1250
+ mode: EmbedMode;
1235
1251
  error?: Error;
1236
1252
  isPending: boolean;
1237
1253
  hydrate: () => void;
@@ -1242,19 +1258,22 @@ export declare interface EmbedContextProps {
1242
1258
 
1243
1259
  export declare type EmbedLayout = "portal" | "checkout" | "payment" | "success" | "disabled";
1244
1260
 
1261
+ export declare type EmbedMode = "edit" | "view";
1262
+
1245
1263
  export declare interface EmbedProps {
1246
1264
  accessToken?: string;
1247
1265
  id?: string;
1248
1266
  apiConfig?: ConfigurationParameters;
1249
1267
  }
1250
1268
 
1251
- export declare const EmbedProvider: ({ id, accessToken, apiConfig, children, }: EmbedProviderProps) => JSX_2.Element;
1269
+ export declare const EmbedProvider: ({ id, accessToken, apiConfig, children, mode, }: EmbedProviderProps) => JSX_2.Element;
1252
1270
 
1253
1271
  export declare interface EmbedProviderProps {
1254
1272
  id?: string;
1255
1273
  accessToken?: string;
1256
1274
  apiConfig?: ConfigurationParameters;
1257
1275
  children?: React.ReactNode;
1276
+ mode?: EmbedMode;
1258
1277
  }
1259
1278
 
1260
1279
  export declare type EmbedSettings = {
@@ -2036,9 +2055,9 @@ export declare interface IconRoundProps extends React.HTMLAttributes<HTMLElement
2036
2055
  colors?: [string, string];
2037
2056
  }
2038
2057
 
2039
- export declare const IncludedFeatures: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_2> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2058
+ export declare const IncludedFeatures: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2040
2059
 
2041
- export declare type IncludedFeaturesProps = DesignProps_2;
2060
+ export declare type IncludedFeaturesProps = DesignProps;
2042
2061
 
2043
2062
  declare type InitOverrideFunction = (requestContext: {
2044
2063
  init: HTTPRequestInit;
@@ -2166,11 +2185,11 @@ declare interface InvoiceResponseData {
2166
2185
  url?: string | null;
2167
2186
  }
2168
2187
 
2169
- export declare const Invoices: ForwardRefExoticComponent<ElementProps & DesignProps_6 & {
2188
+ export declare const Invoices: ForwardRefExoticComponent<ElementProps & DesignProps_2 & {
2170
2189
  data?: ListInvoicesResponse["data"];
2171
2190
  } & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
2172
2191
 
2173
- export declare type InvoicesProps = DesignProps_6 & {
2192
+ export declare type InvoicesProps = DesignProps_2 & {
2174
2193
  data?: ListInvoicesResponse["data"];
2175
2194
  };
2176
2195
 
@@ -2283,11 +2302,11 @@ declare interface PaymentFormProps {
2283
2302
  onConfirm?: (paymentMethodId: string) => void;
2284
2303
  }
2285
2304
 
2286
- export declare const PaymentMethod: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_5> & HTMLAttributes<HTMLDivElement> & {
2305
+ export declare const PaymentMethod: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_4> & HTMLAttributes<HTMLDivElement> & {
2287
2306
  portal?: HTMLElement | null;
2288
2307
  } & RefAttributes<HTMLDivElement | null>>;
2289
2308
 
2290
- export declare type PaymentMethodProps = DesignProps_5;
2309
+ export declare type PaymentMethodProps = DesignProps_4;
2291
2310
 
2292
2311
  /**
2293
2312
  * Schematic API
@@ -2514,11 +2533,11 @@ declare interface PlanEntitlementResponseData {
2514
2533
  valueType: string;
2515
2534
  }
2516
2535
 
2517
- export declare const PlanManager: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps> & HTMLAttributes<HTMLDivElement> & {
2536
+ export declare const PlanManager: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_5> & HTMLAttributes<HTMLDivElement> & {
2518
2537
  portal?: HTMLElement | null;
2519
2538
  } & RefAttributes<HTMLDivElement | null>>;
2520
2539
 
2521
- export declare type PlanManagerProps = DesignProps;
2540
+ export declare type PlanManagerProps = DesignProps_5;
2522
2541
 
2523
2542
  /**
2524
2543
  * Schematic API
@@ -3190,6 +3209,13 @@ export declare interface TextProps extends ComponentProps {
3190
3209
  $lineHeight?: ComponentProps["$lineHeight"];
3191
3210
  }
3192
3211
 
3212
+ export declare const Tooltip: ({ label, description }: TooltipProps) => JSX_2.Element;
3213
+
3214
+ declare interface TooltipProps {
3215
+ label: string;
3216
+ description: string;
3217
+ }
3218
+
3193
3219
  declare type TransientCSSProperties = {
3194
3220
  [Property in keyof React.CSSProperties as `$${string & Property}`]: React.CSSProperties[Property];
3195
3221
  };
@@ -3201,9 +3227,9 @@ export declare interface TypographySettings {
3201
3227
  color: string;
3202
3228
  }
3203
3229
 
3204
- export declare const UpcomingBill: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_4> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
3230
+ export declare const UpcomingBill: ForwardRefExoticComponent<ElementProps & RecursivePartial<DesignProps_6> & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement | null>>;
3205
3231
 
3206
- export declare type UpcomingBillProps = DesignProps_4;
3232
+ export declare type UpcomingBillProps = DesignProps_6;
3207
3233
 
3208
3234
  declare interface UpdatePaymentMethodRequest {
3209
3235
  updatePaymentMethodRequestBody: UpdatePaymentMethodRequestBody;