@claspo/editor 1.0.14 → 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 +4 -3
- package/src/index.js +6 -5
- package/src/types.d.ts +16 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claspo/editor",
|
|
3
|
-
"version": "1.0.
|
|
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",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"build:types": "node scripts/build-types.js && node scripts/types-postprocessing.js && node scripts/generate-enum-values.js",
|
|
20
20
|
"build:docs": "typedoc --options typedoc.md.json && node scripts/postprocess-md.js && node scripts/add-frontmatter.js",
|
|
21
21
|
"build:all": "npm run build:types && npm run build:docs",
|
|
22
|
+
"sync:docs": "node ../../../scripts/sync-docs.js --package=editor",
|
|
22
23
|
|
|
23
24
|
"generate-reexports": "echo 'DO NOT CALL IT, WILL REWRITE editor-config.interface.ts' && node scripts/generate-esng-reexports.js"
|
|
24
25
|
},
|
|
@@ -29,8 +30,8 @@
|
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"rxjs": ">=6.0.0",
|
|
32
|
-
"@claspo/common": "
|
|
33
|
-
"@claspo/document-connector": "
|
|
33
|
+
"@claspo/common": "7.0.7",
|
|
34
|
+
"@claspo/document-connector": "16.2.4"
|
|
34
35
|
},
|
|
35
36
|
"peerDependenciesMeta": {
|
|
36
37
|
"rxjs": { "optional": true }
|
package/src/index.js
CHANGED
|
@@ -82,11 +82,6 @@ exports.WidgetPublishStatus = Object.freeze({
|
|
|
82
82
|
DEBUG: "DEBUG",
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
exports.FormTestingStatus = Object.freeze({
|
|
86
|
-
TESTING: "TESTING",
|
|
87
|
-
OFF: "OFF",
|
|
88
|
-
});
|
|
89
|
-
|
|
90
85
|
exports.EsFormIntegrationType = Object.freeze({
|
|
91
86
|
WEBHOOK: "webhook",
|
|
92
87
|
EMBEDDED: "embedded",
|
|
@@ -117,6 +112,12 @@ exports.ImageLibraryType = Object.freeze({
|
|
|
117
112
|
ICON: "ICON",
|
|
118
113
|
});
|
|
119
114
|
|
|
115
|
+
exports.RegistrationType = Object.freeze({
|
|
116
|
+
SHOPIFY: "SHOPIFY",
|
|
117
|
+
APPSUMO: "APPSUMO",
|
|
118
|
+
EMAIL: "EMAIL",
|
|
119
|
+
});
|
|
120
|
+
|
|
120
121
|
exports.AsyncPatternType = Object.freeze({
|
|
121
122
|
PROMISE: "PROMISE",
|
|
122
123
|
OBSERVABLE: "OBSERVABLE",
|
package/src/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentManifestI } from '@claspo/common/component-manifest/ComponentManifest.interface';
|
|
1
2
|
import { ClPropertyPaneManifestModelName } from '@claspo/common/component-manifest/PropertyPaneManifest.interface';
|
|
2
3
|
import { ClBaseComponentI, ClComponentType, ClDocumentActionType, ClDocumentI as CommonDocumentI, ClDocumentSharedI as CommonDocumentSharedI } from '@claspo/common/document/Document.interface';
|
|
3
4
|
import { LayoutType } from '@claspo/common/LayoutType';
|
|
@@ -162,26 +163,16 @@ export interface WidgetsListItemI {
|
|
|
162
163
|
id: number;
|
|
163
164
|
name: string;
|
|
164
165
|
publishStatus: WidgetPublishStatus;
|
|
165
|
-
testingStatus: FormTestingStatus;
|
|
166
|
-
fullyConfigured: boolean;
|
|
167
166
|
createdDate: string;
|
|
168
167
|
updatedDate: string;
|
|
169
|
-
draft: boolean;
|
|
170
168
|
variantIds: number[];
|
|
171
|
-
abTestId: number | null;
|
|
172
169
|
config: WidgetVariantDtoI;
|
|
173
|
-
restrictions?: EsFormRestrictionI;
|
|
174
|
-
deleted?: boolean;
|
|
175
170
|
}
|
|
176
171
|
export declare enum WidgetPublishStatus {
|
|
177
172
|
FOR_ALL = "FOR_ALL",
|
|
178
173
|
PAUSED = "PAUSED",// teaser disabled. Any other status means that teaser is enabled and status works as usual
|
|
179
174
|
DEBUG = "DEBUG"
|
|
180
175
|
}
|
|
181
|
-
declare enum FormTestingStatus {
|
|
182
|
-
TESTING = "TESTING",
|
|
183
|
-
OFF = "OFF"
|
|
184
|
-
}
|
|
185
176
|
export interface WidgetModelI {
|
|
186
177
|
id: number;
|
|
187
178
|
name: string;
|
|
@@ -191,12 +182,6 @@ export interface WidgetModelI {
|
|
|
191
182
|
variants: WidgetVariantDtoI[];
|
|
192
183
|
config: WidgetVariantDtoI;
|
|
193
184
|
}
|
|
194
|
-
export interface EsFormRestrictionI {
|
|
195
|
-
BRANDED?: EsFormBrandingI;
|
|
196
|
-
}
|
|
197
|
-
export interface EsFormBrandingI {
|
|
198
|
-
reason?: string;
|
|
199
|
-
}
|
|
200
185
|
export interface WidgetVariantDtoI {
|
|
201
186
|
formId: number;
|
|
202
187
|
id: number;
|
|
@@ -247,6 +232,7 @@ export interface WidgetAppearanceI {
|
|
|
247
232
|
/** stringified JSON {id: object} where id is node's id */
|
|
248
233
|
document: string;
|
|
249
234
|
sync: string;
|
|
235
|
+
themeConsumers?: string;
|
|
250
236
|
consents?: object;
|
|
251
237
|
revision?: string;
|
|
252
238
|
publishedRevision?: string;
|
|
@@ -298,6 +284,9 @@ export interface WidgetRevisionAppearanceI {
|
|
|
298
284
|
document: ClDocumentI;
|
|
299
285
|
sync: ClComponentSyncStateI;
|
|
300
286
|
consents?: object;
|
|
287
|
+
themeConsumers?: {
|
|
288
|
+
[key: string]: any;
|
|
289
|
+
};
|
|
301
290
|
}
|
|
302
291
|
export interface CreateWidgetRevisionResponseI {
|
|
303
292
|
uuid: string;
|
|
@@ -396,6 +385,11 @@ export interface UserImagesResponseDtoI {
|
|
|
396
385
|
export interface UserImageItemI {
|
|
397
386
|
url: string;
|
|
398
387
|
}
|
|
388
|
+
declare enum RegistrationType {
|
|
389
|
+
SHOPIFY = "SHOPIFY",
|
|
390
|
+
APPSUMO = "APPSUMO",
|
|
391
|
+
EMAIL = "EMAIL"
|
|
392
|
+
}
|
|
399
393
|
/**
|
|
400
394
|
* Global ClaspoEditor interface exposed on window object.
|
|
401
395
|
* Use `window.ClaspoEditor` to access the editor API.
|
|
@@ -563,6 +557,8 @@ export interface EditorConfigI {
|
|
|
563
557
|
disableLanguageSelect?: boolean;
|
|
564
558
|
/** Prevent users from removing uploaded files */
|
|
565
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;
|
|
566
562
|
}
|
|
567
563
|
/**
|
|
568
564
|
* Configuration for the left panel component selector.
|
|
@@ -600,6 +596,10 @@ export interface AvailableComponentI {
|
|
|
600
596
|
/** Components that will be added together with this one */
|
|
601
597
|
dependentComponentNames?: string[];
|
|
602
598
|
}
|
|
599
|
+
export interface UserContextI {
|
|
600
|
+
domain?: string;
|
|
601
|
+
registrationType?: RegistrationType;
|
|
602
|
+
}
|
|
603
603
|
/**
|
|
604
604
|
* Configuration for external links shown in the editor.
|
|
605
605
|
*/
|