@claspo/editor 1.0.15 → 1.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/editor",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Claspo Editor SDK and types",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "rxjs": ">=6.0.0",
33
- "@claspo/common": "6.0.14",
34
- "@claspo/document-connector": "15.0.12"
33
+ "@claspo/common": "7.0.7",
34
+ "@claspo/document-connector": "16.2.4"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "rxjs": { "optional": true }
package/src/index.js CHANGED
@@ -112,6 +112,12 @@ exports.ImageLibraryType = Object.freeze({
112
112
  ICON: "ICON",
113
113
  });
114
114
 
115
+ exports.RegistrationType = Object.freeze({
116
+ SHOPIFY: "SHOPIFY",
117
+ APPSUMO: "APPSUMO",
118
+ EMAIL: "EMAIL",
119
+ });
120
+
115
121
  exports.AsyncPatternType = Object.freeze({
116
122
  PROMISE: "PROMISE",
117
123
  OBSERVABLE: "OBSERVABLE",
package/src/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ComponentManifestI } from '@claspo/common/component-manifest/ComponentManifest.interface';
2
2
  import { ClPropertyPaneManifestModelName } from '@claspo/common/component-manifest/PropertyPaneManifest.interface';
3
- import { ClBaseComponentI, ClBaseComponentI as ClBaseComponentI$1, ClComponentType, ClDocumentActionType, ClDocumentI as CommonDocumentI, ClDocumentSharedI as CommonDocumentSharedI } from '@claspo/common/document/Document.interface';
4
- import { LayoutType, LayoutType as LayoutType$1 } from '@claspo/common/LayoutType';
3
+ import { ClBaseComponentI, ClComponentType, ClDocumentActionType, ClDocumentI as CommonDocumentI, ClDocumentSharedI as CommonDocumentSharedI } from '@claspo/common/document/Document.interface';
4
+ import { LayoutType } from '@claspo/common/LayoutType';
5
5
  import { PrizePoolModelI, PrizePoolOptionI } from '@claspo/common/PrizePool.interface';
6
- import { WidgetType, WidgetType as WidgetType$1 } from '@claspo/common/WidgetType';
6
+ import { WidgetType } from '@claspo/common/WidgetType';
7
7
  import LayoutFactory from '@claspo/document-connector/layouts/LayoutFactory';
8
8
  import { Observable } from 'rxjs';
9
9
  declare enum BaseListSortOption {
@@ -193,7 +193,7 @@ export interface WidgetVariantDtoI {
193
193
  publishedRevision?: string;
194
194
  }
195
195
  export interface WidgetVariantConfigDtoI {
196
- type: LayoutType$1;
196
+ type: LayoutType;
197
197
  placements?: WidgetPlacementI[];
198
198
  prizePoolIds?: string[];
199
199
  }
@@ -232,6 +232,7 @@ export interface WidgetAppearanceI {
232
232
  /** stringified JSON {id: object} where id is node's id */
233
233
  document: string;
234
234
  sync: string;
235
+ themeConsumers?: string;
235
236
  consents?: object;
236
237
  revision?: string;
237
238
  publishedRevision?: string;
@@ -252,7 +253,7 @@ export interface WidgetVariantI {
252
253
  publishedRevision: string | null;
253
254
  }
254
255
  export interface WidgetVariantConfigI {
255
- type: LayoutType$1;
256
+ type: LayoutType;
256
257
  placements: WidgetPlacementI[];
257
258
  prizePoolIds?: string[];
258
259
  }
@@ -269,7 +270,7 @@ export interface WidgetRevisionPayloadI {
269
270
  linkedTo?: number | null;
270
271
  }
271
272
  export interface WidgetRevisionPresentationI {
272
- type: LayoutType$1;
273
+ type: LayoutType;
273
274
  }
274
275
  export interface WidgetRevisionAppearanceI {
275
276
  id: number | string;
@@ -283,6 +284,9 @@ export interface WidgetRevisionAppearanceI {
283
284
  document: ClDocumentI;
284
285
  sync: ClComponentSyncStateI;
285
286
  consents?: object;
287
+ themeConsumers?: {
288
+ [key: string]: any;
289
+ };
286
290
  }
287
291
  export interface CreateWidgetRevisionResponseI {
288
292
  uuid: string;
@@ -306,7 +310,7 @@ export declare enum WidgetProjectConfigId {
306
310
  CABINET_AB_TESTS = "CABINET_AB_TESTS"
307
311
  }
308
312
  export interface BaseFormsListRequestParamsI {
309
- layoutTypes?: LayoutType$1[];
313
+ layoutTypes?: LayoutType[];
310
314
  order?: BaseListOrderOption;
311
315
  search?: string;
312
316
  offset?: number;
@@ -381,6 +385,11 @@ export interface UserImagesResponseDtoI {
381
385
  export interface UserImageItemI {
382
386
  url: string;
383
387
  }
388
+ declare enum RegistrationType {
389
+ SHOPIFY = "SHOPIFY",
390
+ APPSUMO = "APPSUMO",
391
+ EMAIL = "EMAIL"
392
+ }
384
393
  /**
385
394
  * Global ClaspoEditor interface exposed on window object.
386
395
  * Use `window.ClaspoEditor` to access the editor API.
@@ -548,6 +557,8 @@ export interface EditorConfigI {
548
557
  disableLanguageSelect?: boolean;
549
558
  /** Prevent users from removing uploaded files */
550
559
  disableAbilityToRemoveUploadedFiles?: boolean;
560
+ /** Prefix for component tag name in order to resolve conflicts between different sources of components on the same page. */
561
+ productKeyPrefix?: string;
551
562
  }
552
563
  /**
553
564
  * Configuration for the left panel component selector.
@@ -585,6 +596,10 @@ export interface AvailableComponentI {
585
596
  /** Components that will be added together with this one */
586
597
  dependentComponentNames?: string[];
587
598
  }
599
+ export interface UserContextI {
600
+ domain?: string;
601
+ registrationType?: RegistrationType;
602
+ }
588
603
  /**
589
604
  * Configuration for external links shown in the editor.
590
605
  */
@@ -1200,7 +1215,7 @@ export {
1200
1215
  LayoutType,
1201
1216
  PrizePoolModelI,
1202
1217
  PrizePoolOptionI,
1203
- WidgetType$1 as WidgetType,
1218
+ WidgetType,
1204
1219
  };
1205
1220
 
1206
1221
  export {};