@embeddable.com/sdk-react 2.2.9 → 2.2.11

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.
@@ -0,0 +1,6 @@
1
+ export interface EntrypointModifier {
2
+ needToModify: (ctx: any) => boolean;
3
+ getContentBegin: (ctx: any) => string;
4
+ getContentEnd: (ctx: any) => string;
5
+ getImports: (ctx: any) => string;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { EntrypointModifier } from "./EntrypointModifier";
2
+ export declare const entrypointModifiers: EntrypointModifier[];
@@ -0,0 +1,8 @@
1
+ import { EntrypointModifier } from "./EntrypointModifier";
2
+ /**
3
+ * Modifies entry point only if there is 'styled-components' in the client's package.json.
4
+ * Imports StyleSheetManager from styled-components and adds shadow root as "target".
5
+ * That will force styled-components to add classes to the customers web-component
6
+ * see https://styled-components.com/docs/api#stylesheetmanager
7
+ */
8
+ export declare const styledComponentsEntrypointModifier: EntrypointModifier;
@@ -96,6 +96,7 @@ export declare const componentMetaSchema: z.ZodObject<{
96
96
  label: string;
97
97
  };
98
98
  }>, z.ZodEnum<["string", "number", "boolean", "time", "timeRange", "granularity", "dataset", "measure", "dimension", "dimensionOrMeasure"]>]>;
99
+ array: z.ZodOptional<z.ZodBoolean>;
99
100
  label: z.ZodOptional<z.ZodString>;
100
101
  }, "strip", z.ZodTypeAny, {
101
102
  type: ("string" | "number" | "boolean" | {
@@ -110,6 +111,7 @@ export declare const componentMetaSchema: z.ZodObject<{
110
111
  };
111
112
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
112
113
  name: string;
114
+ array?: boolean | undefined;
113
115
  label?: string | undefined;
114
116
  }, {
115
117
  type: ("string" | "number" | "boolean" | {
@@ -124,6 +126,7 @@ export declare const componentMetaSchema: z.ZodObject<{
124
126
  };
125
127
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
126
128
  name: string;
129
+ array?: boolean | undefined;
127
130
  label?: string | undefined;
128
131
  }>, "many">>;
129
132
  }, "strict", z.ZodTypeAny, {
@@ -142,6 +145,7 @@ export declare const componentMetaSchema: z.ZodObject<{
142
145
  };
143
146
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
144
147
  name: string;
148
+ array?: boolean | undefined;
145
149
  label?: string | undefined;
146
150
  }[] | undefined;
147
151
  }, {
@@ -160,6 +164,7 @@ export declare const componentMetaSchema: z.ZodObject<{
160
164
  };
161
165
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
162
166
  name: string;
167
+ array?: boolean | undefined;
163
168
  label?: string | undefined;
164
169
  }[] | undefined;
165
170
  }>, "many">>;
@@ -187,6 +192,7 @@ export declare const componentMetaSchema: z.ZodObject<{
187
192
  label: string;
188
193
  };
189
194
  }>, z.ZodEnum<["string", "number", "boolean", "time", "timeRange", "granularity", "dataset", "measure", "dimension", "dimensionOrMeasure"]>]>;
195
+ array: z.ZodOptional<z.ZodBoolean>;
190
196
  defaultValue: z.ZodOptional<z.ZodAny>;
191
197
  inputs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
192
198
  events: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -212,6 +218,7 @@ export declare const componentMetaSchema: z.ZodObject<{
212
218
  };
213
219
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
214
220
  name: string;
221
+ array?: boolean | undefined;
215
222
  defaultValue?: any;
216
223
  inputs?: string[] | undefined;
217
224
  events?: {
@@ -231,6 +238,7 @@ export declare const componentMetaSchema: z.ZodObject<{
231
238
  };
232
239
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
233
240
  name: string;
241
+ array?: boolean | undefined;
234
242
  defaultValue?: any;
235
243
  inputs?: string[] | undefined;
236
244
  events?: {
@@ -277,6 +285,7 @@ export declare const componentMetaSchema: z.ZodObject<{
277
285
  };
278
286
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
279
287
  name: string;
288
+ array?: boolean | undefined;
280
289
  label?: string | undefined;
281
290
  }[] | undefined;
282
291
  }[] | undefined;
@@ -293,6 +302,7 @@ export declare const componentMetaSchema: z.ZodObject<{
293
302
  };
294
303
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
295
304
  name: string;
305
+ array?: boolean | undefined;
296
306
  defaultValue?: any;
297
307
  inputs?: string[] | undefined;
298
308
  events?: {
@@ -339,6 +349,7 @@ export declare const componentMetaSchema: z.ZodObject<{
339
349
  };
340
350
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
341
351
  name: string;
352
+ array?: boolean | undefined;
342
353
  label?: string | undefined;
343
354
  }[] | undefined;
344
355
  }[] | undefined;
@@ -355,6 +366,7 @@ export declare const componentMetaSchema: z.ZodObject<{
355
366
  };
356
367
  } | "time" | "timeRange" | "granularity" | "dataset" | "measure" | "dimension" | "dimensionOrMeasure" | undefined);
357
368
  name: string;
369
+ array?: boolean | undefined;
358
370
  defaultValue?: any;
359
371
  inputs?: string[] | undefined;
360
372
  events?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddable.com/sdk-react",
3
- "version": "2.2.9",
3
+ "version": "2.2.11",
4
4
  "description": "Embeddable SDK React plugin responsible for React components bundling.",
5
5
  "keywords": [
6
6
  "embeddable",
@@ -1,5 +1,6 @@
1
1
  import 'vite/modulepreload-polyfill';
2
2
  {{ERROR_FALLBACK_COMPONENT_IMPORT}}
3
+ {{ADDITIONAL_CONTENT_IMPORT}}
3
4
 
4
5
  import React from 'react';
5
6
  import ReactDOM from 'react-dom/client';
@@ -18,7 +19,9 @@ export default (rootEl, componentName, props) => {
18
19
  root.render(
19
20
  <ErrorBoundary fallback={{{ERROR_FALLBACK_COMPONENT}}}>
20
21
  <React.Suspense fallback={<div/>}>
21
- <Component {...props} propsUpdateListener={rootEl} />
22
+ {{ADDITIONAL_CONTENT_BEGIN}}
23
+ <Component {...props} propsUpdateListener={rootEl} />
24
+ {{ADDITIONAL_CONTENT_END}}
22
25
  </React.Suspense>
23
26
  </ErrorBoundary>
24
27
  );