@claspo/editor 1.0.0

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 (3) hide show
  1. package/README.md +31 -0
  2. package/package.json +30 -0
  3. package/src/index.md +1234 -0
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @claspo/editor
2
+
3
+ TypeScript type definitions for ClaspoEditor.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @claspo/editor
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import type {
15
+ EditorConfigI,
16
+ EditorApiConfigI,
17
+ ResolvedDataI,
18
+ DataToSaveI,
19
+ } from '@claspo/editor';
20
+
21
+ const config: EditorConfigI = {
22
+ containerElement: document.getElementById('editor')!,
23
+ countryCode: 'US',
24
+ theme: { /* ... */ },
25
+ // ...
26
+ };
27
+ ```
28
+
29
+ ## Peer Dependencies
30
+
31
+ - `rxjs` >= 6.0.0 (optional) - Required if using Observable-based API methods
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@claspo/editor",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript type definitions for ClaspoEditor",
5
+ "types": "src/types.d.ts",
6
+ "files": ["src"],
7
+ "scripts": {
8
+
9
+ "build:types": "node scripts/build-types.js && node scripts/types-postprocessing.js",
10
+ "build:docs": "typedoc --options typedoc.md.json && node scripts/postprocess-md.js && node scripts/add-frontmatter.js",
11
+ "build:all": "npm run build:types && npm run build:docs",
12
+
13
+ "generate-reexports": "echo 'DO NOT CALL IT, WILL REWRITE editor-config.interface.ts' && node scripts/generate-esng-reexports.js"
14
+ },
15
+ "devDependencies": {
16
+ "typedoc": "^0.28.0",
17
+ "typedoc-plugin-markdown": "^4.4.1"
18
+ },
19
+ "peerDependencies": {
20
+ "rxjs": ">=6.0.0",
21
+ "@claspo/common": "6.0.0",
22
+ "@claspo/document-connector": "15.0.0"
23
+ },
24
+ "peerDependenciesMeta": {
25
+ "rxjs": { "optional": true }
26
+ },
27
+ "author": "alex-chernysh",
28
+ "license": "",
29
+ "homepage": "https://docs.claspo.io/docs/claspoeditor"
30
+ }
package/src/index.md ADDED
@@ -0,0 +1,1234 @@
1
+ ---
2
+ title: '@claspo/editor'
3
+ deprecated: false
4
+ hidden: false
5
+ metadata:
6
+ robots: index
7
+ ---
8
+ **@claspo/editor**
9
+
10
+ ***
11
+
12
+ # @claspo/editor
13
+
14
+ ## AsyncPatternType
15
+
16
+ Async pattern type for API calls.
17
+
18
+ ### Enumeration Members
19
+
20
+ | Enumeration Member | Value | Description |
21
+ | ------ | ------ | ------ |
22
+ | <a id="promise"></a> `PROMISE` | `"PROMISE"` | Use Promise-based API calls |
23
+ | <a id="observable"></a> `OBSERVABLE` | `"OBSERVABLE"` | Use Observable-based API calls (RxJS) |
24
+
25
+ ***
26
+
27
+ ## ContactMappingOptionType
28
+
29
+ ### Enumeration Members
30
+
31
+ | Enumeration Member | Value |
32
+ | ------ | ------ |
33
+ | <a id="text"></a> `TEXT` | `"text"` |
34
+ | <a id="select-1"></a> `SELECT` | `"select"` |
35
+ | <a id="checkbox-1"></a> `CHECKBOX` | `"checkbox"` |
36
+ | <a id="text_area"></a> `TEXT_AREA` | `"textarea"` |
37
+ | <a id="number"></a> `NUMBER` | `"number"` |
38
+ | <a id="date"></a> `DATE` | `"date"` |
39
+ | <a id="date_time"></a> `DATE_TIME` | `"datetime"` |
40
+ | <a id="bool"></a> `BOOL` | `"bool"` |
41
+ | <a id="decimal"></a> `DECIMAL` | `"decimal"` |
42
+ | <a id="unknown"></a> `UNKNOWN` | `"unknown"` |
43
+
44
+ ***
45
+
46
+ ## ClDocumentActionType
47
+
48
+ ### Enumeration Members
49
+
50
+ | Enumeration Member | Value |
51
+ | ------ | ------ |
52
+ | <a id="show_widget"></a> `SHOW_WIDGET` | `"SHOW_WIDGET"` |
53
+ | <a id="open_link"></a> `OPEN_LINK` | `"OPEN_LINK"` |
54
+ | <a id="subscribe_contact"></a> `SUBSCRIBE_CONTACT` | `"SUBSCRIBE_CONTACT"` |
55
+ | <a id="request"></a> `REQUEST` | `"REQUEST"` |
56
+ | <a id="close_widget"></a> `CLOSE_WIDGET` | `"CLOSE_WIDGET"` |
57
+ | <a id="go_to_view"></a> `GO_TO_VIEW` | `"GO_TO_VIEW"` |
58
+ | <a id="go_to_previous_view"></a> `GO_TO_PREVIOUS_VIEW` | `"GO_TO_PREVIOUS_VIEW"` |
59
+ | <a id="go_to_next_view"></a> `GO_TO_NEXT_VIEW` | `"GO_TO_NEXT_VIEW"` |
60
+ | <a id="click"></a> `CLICK` | `"CLICK"` |
61
+
62
+ ***
63
+
64
+ ## ClPreviewEnvironment
65
+
66
+ ### Enumeration Members
67
+
68
+ | Enumeration Member | Value |
69
+ | ------ | ------ |
70
+ | <a id="desktop"></a> `DESKTOP` | `"DESKTOP"` |
71
+ | <a id="mobile"></a> `MOBILE` | `"MOBILE"` |
72
+
73
+ ***
74
+
75
+ ## FormPublishStatus
76
+
77
+ ### Enumeration Members
78
+
79
+ | Enumeration Member | Value |
80
+ | ------ | ------ |
81
+ | <a id="for_all"></a> `FOR_ALL` | `"FOR_ALL"` |
82
+ | <a id="paused"></a> `PAUSED` | `"PAUSED"` |
83
+ | <a id="debug"></a> `DEBUG` | `"DEBUG"` |
84
+
85
+ ***
86
+
87
+ ## EsWidgetLayoutType
88
+
89
+ ### Enumeration Members
90
+
91
+ | Enumeration Member | Value |
92
+ | ------ | ------ |
93
+ | <a id="built_in"></a> `BUILT_IN` | `"BUILT_IN"` |
94
+ | <a id="detached"></a> `DETACHED` | `"DETACHED"` |
95
+ | <a id="floating_box"></a> `FLOATING_BOX` | `"FLOATING_BOX"` |
96
+ | <a id="floating_bar"></a> `FLOATING_BAR` | `"FLOATING_BAR"` |
97
+ | <a id="launcher"></a> `LAUNCHER` | `"LAUNCHER"` |
98
+ | <a id="content_locker"></a> `CONTENT_LOCKER` | `"CONTENT_LOCKER"` |
99
+ | <a id="slide_up"></a> `SLIDE_UP` | `"SLIDE_UP"` |
100
+ | <a id="pop_up"></a> `POP_UP` | `"POP_UP"` |
101
+ | <a id="bottom_bar"></a> `BOTTOM_BAR` | `"BOTTOM_BAR"` |
102
+
103
+ ***
104
+
105
+ ## EsWidgetType
106
+
107
+ ### Enumeration Members
108
+
109
+ | Enumeration Member | Value |
110
+ | ------ | ------ |
111
+ | <a id="subscription_form"></a> `SUBSCRIPTION_FORM` | `"SUBSCRIPTION_FORM"` |
112
+ | <a id="informer"></a> `INFORMER` | `"INFORMER"` |
113
+ | <a id="request_form"></a> `REQUEST_FORM` | `"REQUEST_FORM"` |
114
+ | <a id="launcher-1"></a> `LAUNCHER` | `"LAUNCHER"` |
115
+ | <a id="age_verify"></a> `AGE_VERIFY` | `"AGE_VERIFY"` |
116
+ | <a id="teaser"></a> `TEASER` | `"TEASER"` |
117
+
118
+ ***
119
+
120
+ ## TypeOfFilesFromCommonDir
121
+
122
+ ### Enumeration Members
123
+
124
+ | Enumeration Member | Value |
125
+ | ------ | ------ |
126
+ | <a id="forms"></a> `FORMS` | `"FORMS"` |
127
+ | <a id="close_icon"></a> `CLOSE_ICON` | `"CLOSE_ICON"` |
128
+ | <a id="promocode_icon"></a> `PROMOCODE_ICON` | `"PROMOCODE_ICON"` |
129
+ | <a id="gift_box_icon"></a> `GIFT_BOX_ICON` | `"GIFT_BOX_ICON"` |
130
+ | <a id="scratch_card_icon"></a> `SCRATCH_CARD_ICON` | `"SCRATCH_CARD_ICON"` |
131
+ | <a id="feedback_icon"></a> `FEEDBACK_ICON` | `"FEEDBACK_ICON"` |
132
+
133
+ ***
134
+
135
+ ## PrizePoolModelI
136
+
137
+ ### Properties
138
+
139
+ | Property | Type |
140
+ | ------ | ------ |
141
+ | <a id="id"></a> `id` | `string` |
142
+ | <a id="sourcetype"></a> `sourceType` | `PrizeSourceType` |
143
+ | <a id="distributiontype"></a> `distributionType?` | `PrizeDistributionType` |
144
+ | <a id="options"></a> `options?` | [`PrizePoolOptionI`](#prizepooloptioni)[] |
145
+
146
+ ***
147
+
148
+ ## PrizePoolOptionI
149
+
150
+ ### Properties
151
+
152
+ | Property | Type |
153
+ | ------ | ------ |
154
+ | <a id="valuetype"></a> `valueType` | `PrizeOptionValueType` |
155
+ | <a id="value"></a> `value` | `string` |
156
+ | <a id="code"></a> `code` | `string` |
157
+ | <a id="weight"></a> `weight` | `number` |
158
+ | <a id="id-1"></a> `id?` | `string` |
159
+ | <a id="config"></a> `config?` | `PrizeOptionConfigI` |
160
+
161
+ ***
162
+
163
+ ## EditorI
164
+
165
+ Global ClaspoEditor interface exposed on window object.
166
+ Use `window.ClaspoEditor` to access the editor API.
167
+
168
+ ### Example
169
+
170
+ ```typescript
171
+ // Initialize editor
172
+ window.ClaspoEditor.init(config, () => {
173
+ console.log('Editor loaded');
174
+ }, () => {
175
+ console.error('Editor failed to load');
176
+ });
177
+
178
+ // Save changes
179
+ window.ClaspoEditor.save({ publishChanges: true });
180
+
181
+ // Destroy editor
182
+ window.ClaspoEditor.destroy();
183
+ ```
184
+
185
+ ### Properties
186
+
187
+ | Property | Type | Description |
188
+ | ------ | ------ | ------ |
189
+ | <a id="init"></a> `init` | (`config`, `onLoaded?`, `onError?`) => `void` | Initialize the Claspo Editor. |
190
+ | <a id="destroy"></a> `destroy` | () => `void` | Destroy the editor instance and cleanup resources. Must be called before re-initializing the editor. |
191
+ | <a id="save"></a> `save` | (`params?`) => `void` | Save current editor state. |
192
+ | <a id="cancel"></a> `cancel` | () => `void` | Cancel editing and discard unsaved changes. |
193
+ | <a id="getcomponentmanifests"></a> `getComponentManifests` | () => `any`[] | Get all available component manifests. |
194
+ | <a id="getdocumenterrors"></a> `getDocumentErrors` | () => `any`[] | Get current document validation errors. |
195
+
196
+ ***
197
+
198
+ ## EditorConfigI
199
+
200
+ Main configuration object for initializing the Claspo Editor.
201
+
202
+ ### See
203
+
204
+ https://github.com/Claspo/claspo-plugin-starter-poc/blob/main/quickstart/public/editor.html
205
+
206
+ ### Properties
207
+
208
+ | Property | Type | Description |
209
+ | ------ | ------ | ------ |
210
+ | <a id="containerelement"></a> `containerElement` | `HTMLElement` | HTML element or CSS selector where the editor is embedded. Editors takes full width and full height of the element. It’s important to set a size of the element before editor initialization. Editor calculates actual element size and based on that it will calculate the size of it’s blocks. **Remarks** Required |
211
+ | <a id="countrycode"></a> `countryCode` | `string` | Default country code for phone input components. **See** Code at https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements Default: `"US"` |
212
+ | <a id="theme"></a> `theme` | [`EditorThemeI`](#editorthemei) | Theme configuration for the editor UI. |
213
+ | <a id="notificationhandlers"></a> `notificationHandlers` | [`EditorConfigNotificationHandlersI`](#editorconfignotificationhandlersi) | Custom notification handlers for editor messages **Default** `console.log will be used` |
214
+ | <a id="closeeditorcallback"></a> `closeEditorCallback` | (`payload`) => `void` | Callback fired when Close button is clicked. Use this to handle editor closure and cleanup. |
215
+ | <a id="staticresourcesurl"></a> `staticResourcesUrl` | `string` | Base URL for static resources (images, fonts, etc.). Must include trailing slash. **Example** ``"https://cdn.claspo.io/static/"`` |
216
+ | <a id="hosturl"></a> `hostUrl` | `string` | Base URL for the host application. **Example** ``"https://app.claspo.io/"`` |
217
+ | <a id="availablecomponentspanel"></a> `availableComponentsPanel` | [`AvailableComponentsPanelConfigI`](#availablecomponentspanelconfigi) | Configuration for the left panel component selector |
218
+ | <a id="getrevisionpayloadcallback"></a> `getRevisionPayloadCallback` | (`payload`) => [`CreateWidgetRevisionRequestI`](#createwidgetrevisionrequesti) | Callback to transform revision payload before saving |
219
+ | <a id="api"></a> `api` | [`EditorApiConfigI`](#editorapiconfigi) | HTTP API configuration for all editor operations |
220
+ | <a id="initialloaderrorcallback"></a> `initialLoadErrorCallback?` | (`payload`) => `void` | Callback fired on initial data loading errors. If not provided, default error UI will be shown. |
221
+ | <a id="logo"></a> `logo?` | [`EditorLogoI`](#editorlogoi) | Logo configuration displayed in top-left corner. **Example** ``{ imageUrl: 'https://example.com/logo.png', link: 'https://example.com' }`` |
222
+ | <a id="usecontactfields"></a> `useContactFields?` | `boolean` | Enable contact fields mapping functionality. |
223
+ | <a id="localepatch"></a> `localePatch?` | `any` | Override translations by language. **Example** ``'WIDGET_TYPE_FLOATING_BOX': { 'en': 'Floating Box', 'ru': 'Плавающее окно', 'uk': 'Плаваюче вікно', }`` |
224
+ | <a id="defaultlanguage"></a> `defaultLanguage?` | `string` | Default language code for the editor UI **See** https://www.w3schools.com/tags/ref_language_codes.asp @ |
225
+ | <a id="showpropertypanesettingsintabs"></a> `showPropertyPaneSettingsInTabs?` | `boolean` | Show property pane settings in tabs layout or on single columns (tabs are hidden) |
226
+ | <a id="defaultasyncpattern"></a> `defaultAsyncPattern?` | [`AsyncPatternType`](#asyncpatterntype) | Default async pattern for API calls. `"PROMISE"` by default |
227
+ | <a id="authtoken"></a> `authToken?` | `string` | Authentication token for editor API access |
228
+ | <a id="teaserfeatureconfig"></a> `teaserFeatureConfig?` | [`TeaserFeatureConfigI`](#teaserfeatureconfigi) | Teaser feature configuration |
229
+ | <a id="googlefontsapikey"></a> `googleFontsApiKey?` | `string` | Google Fonts API key for font loading |
230
+ | <a id="previewopenedcallback"></a> `previewOpenedCallback?` | () => `void` | Callback fired when preview opens via header button |
231
+ | <a id="previewclosedcallback"></a> `previewClosedCallback?` | () => `void` | Callback fired when preview closes from header button |
232
+ | <a id="disableimageeditor"></a> `disableImageEditor?` | `boolean` | Disable built-in image editor |
233
+ | <a id="disablelanguageselect"></a> `disableLanguageSelect?` | `boolean` | Disable language selection dropdown at the navbar |
234
+ | <a id="disableabilitytoremoveuploadedfiles"></a> `disableAbilityToRemoveUploadedFiles?` | `boolean` | Prevent users from removing uploaded files |
235
+
236
+ ***
237
+
238
+ ## AvailableComponentsPanelConfigI
239
+
240
+ Configuration for the left panel component selector.
241
+ Defines which components are available for users to add to widgets.
242
+
243
+ ### Properties
244
+
245
+ | Property | Type | Description |
246
+ | ------ | ------ | ------ |
247
+ | <a id="groups"></a> `groups` | [`AvailableComponentsGroupI`](#availablecomponentsgroupi)[] | Groups of available components |
248
+ | <a id="showrequestcomponentbutton"></a> `showRequestComponentButton?` | `boolean` | Show "Request component" button at the bottom |
249
+
250
+ ***
251
+
252
+ ## AvailableComponentsGroupI
253
+
254
+ Group of components in the available components panel.
255
+
256
+ ### Properties
257
+
258
+ | Property | Type | Description |
259
+ | ------ | ------ | ------ |
260
+ | <a id="label"></a> `label` | `string` | Display label for the group |
261
+ | <a id="components"></a> `components` | [`AvailableComponentI`](#availablecomponenti)[] | Components in this group |
262
+
263
+ ***
264
+
265
+ ## AvailableComponentI
266
+
267
+ Configuration for a single available component.
268
+
269
+ ### Properties
270
+
271
+ | Property | Type | Description |
272
+ | ------ | ------ | ------ |
273
+ | <a id="componentname"></a> `componentName` | `string` | Component class name (e.g., "SysButtonComponent") |
274
+ | <a id="customicon"></a> `customIcon?` | `string` | Custom SVG icon URL |
275
+ | <a id="customlabel"></a> `customLabel?` | `string` | Custom display label |
276
+ | <a id="fullwidthicon"></a> `fullWidthIcon?` | `boolean` | Display icon at full width |
277
+ | <a id="modeloverrides"></a> `modelOverrides?` | `any` | Override default component model properties |
278
+ | <a id="dependentcomponentnames"></a> `dependentComponentNames?` | `string`[] | Components that will be added together with this one |
279
+
280
+ ***
281
+
282
+ ## EditorLinksConfigI
283
+
284
+ Configuration for external links shown in the editor.
285
+
286
+ ### Properties
287
+
288
+ | Property | Type | Description |
289
+ | ------ | ------ | ------ |
290
+ | <a id="linkparameters"></a> `linkParameters?` | `string` | Link parameters template |
291
+ | <a id="readmoreaboutclicktrackinglink"></a> `readMoreAboutClickTrackingLink?` | `string` | "Read more" link for click tracking documentation |
292
+ | <a id="readmoreaboutopenurllink"></a> `readMoreAboutOpenUrlLink?` | `string` | "Read more" link for Open URL action documentation |
293
+ | <a id="readmoreaboutcustomdataioslink"></a> `readMoreAboutCustomDataIosLink?` | `string` | "Read more" link for iOS custom data documentation |
294
+ | <a id="readmoreaboutcustomdataandroidlink"></a> `readMoreAboutCustomDataAndroidLink?` | `string` | "Read more" link for Android custom data documentation |
295
+ | <a id="externallinks"></a> `externalLinks?` | `any` | Additional external links |
296
+ | <a id="eventstypes"></a> `eventsTypes?` | `any` | Event types configuration |
297
+ | <a id="domain"></a> `domain?` | `string` | Default domain for links |
298
+
299
+ ***
300
+
301
+ ## EditorConfigNotificationHandlersI
302
+
303
+ Custom notification handlers for editor messages.
304
+ Implement these methods to integrate with your notification system.
305
+
306
+ ### Example
307
+
308
+ ```typescript
309
+ const notificationHandlers: EditorConfigNotificationHandlersI = {
310
+ success: (msg) => toast.success(msg),
311
+ error: (msg) => toast.error(msg),
312
+ warning: (msg) => toast.warning(msg),
313
+ info: (msg) => toast.info(msg),
314
+ hide: () => toast.dismiss()
315
+ };
316
+ ```
317
+
318
+ ### Properties
319
+
320
+ | Property | Type | Description |
321
+ | ------ | ------ | ------ |
322
+ | <a id="success"></a> `success` | (`message`) => `void` | Show success notification |
323
+ | <a id="info"></a> `info` | (`message`) => `void` | Show info notification |
324
+ | <a id="warning"></a> `warning` | (`message`) => `void` | Show warning notification |
325
+ | <a id="error"></a> `error` | (`message`) => `void` | Show error notification |
326
+ | <a id="hide"></a> `hide` | () => `void` | Hide all notifications |
327
+
328
+ ***
329
+
330
+ ## ActionOptionsI
331
+
332
+ Configuration for click action behavior in the editor.
333
+
334
+ ### Properties
335
+
336
+ | Property | Type | Description |
337
+ | ------ | ------ | ------ |
338
+ | <a id="availableclickactions"></a> `availableClickActions?` | [`ClDocumentActionType`](#cldocumentactiontype)[] | List of available click actions for components |
339
+ | <a id="isdisplayingopenlinknewtabswitch"></a> `isDisplayingOpenLinkNewTabSwitch?` | `boolean` | Show "Open link in new tab" switch. |
340
+ | <a id="isdisplayingcustomdata"></a> `isDisplayingCustomData?` | `boolean` | Show custom data input fields |
341
+ | <a id="isallowdeeplink"></a> `isAllowDeepLink?` | `boolean` | Allow deep link configuration |
342
+
343
+ ***
344
+
345
+ ## ColumnsOptionsI
346
+
347
+ Configuration for columns component behavior.
348
+
349
+ ### Properties
350
+
351
+ | Property | Type | Description |
352
+ | ------ | ------ | ------ |
353
+ | <a id="allowhidecolumnonmobile"></a> `allowHideColumnOnMobile?` | `boolean` | Allow hiding individual columns on mobile view |
354
+
355
+ ***
356
+
357
+ ## TeaserFeatureConfigI
358
+
359
+ Configuration for teaser (minimized widget) feature.
360
+
361
+ ### Properties
362
+
363
+ | Property | Type | Description |
364
+ | ------ | ------ | ------ |
365
+ | <a id="enabled"></a> `enabled` | `boolean` | Enable teaser functionality |
366
+ | <a id="defaultdocumentmodel"></a> `defaultDocumentModel` | [`ClDocumentI`](#cldocumenti) | Default document model for new teasers |
367
+ | <a id="enabledforlayouts"></a> `enabledForLayouts?` | [`EsWidgetLayoutType`](#eswidgetlayouttype)[] | Layouts where teaser is available |
368
+ | <a id="availablecomponentspanel-1"></a> `availableComponentsPanel?` | [`AvailableComponentsPanelConfigI`](#availablecomponentspanelconfigi) | Component panel configuration for teaser editor |
369
+
370
+ ***
371
+
372
+ ## CloseEditorCallbackPayloadI
373
+
374
+ Payload passed to [EditorConfigI.closeEditorCallback](#closeeditorcallback).
375
+
376
+ ### Properties
377
+
378
+ | Property | Type | Description |
379
+ | ------ | ------ | ------ |
380
+ | <a id="variant"></a> `variant` | [`FormVariantI`](#formvarianti) | Current widget variant data |
381
+
382
+ ***
383
+
384
+ ## GetRevisionPayloadCallbackPayloadI
385
+
386
+ Payload passed to [EditorConfigI.getRevisionPayloadCallback](#getrevisionpayloadcallback).
387
+
388
+ ### Properties
389
+
390
+ | Property | Type | Description |
391
+ | ------ | ------ | ------ |
392
+ | <a id="variant-1"></a> `variant` | [`FormVariantI`](#formvarianti) | Current widget variant |
393
+ | <a id="appearances"></a> `appearances` | [`EsFormAppearanceI`](#esformappearancei)[] | All widget appearances (desktop, mobile, etc.) |
394
+ | <a id="publishstatus"></a> `publishStatus` | [`FormPublishStatus`](#formpublishstatus) | Current publish status |
395
+
396
+ ***
397
+
398
+ ## InitialLoadErrorCallbackPayloadI
399
+
400
+ Payload passed to [EditorConfigI.initialLoadErrorCallback](#initialloaderrorcallback).
401
+
402
+ ### Properties
403
+
404
+ | Property | Type | Description |
405
+ | ------ | ------ | ------ |
406
+ | <a id="status"></a> `status` | `number` | HTTP status code of the failed request |
407
+
408
+ ***
409
+
410
+ ## EditorThemeI
411
+
412
+ Simplified theme configuration for the Claspo Editor.
413
+ This interface provides a streamlined API for external developers
414
+ with only the essential customization options.
415
+
416
+ ### Example
417
+
418
+ ```typescript
419
+ const theme: EditorThemeI = {
420
+ primaryColor: '#F3492C',
421
+ primaryFontFace: 'Montserrat, sans-serif',
422
+ secondaryColor: '#ffffff',
423
+ successColor: '#27C173',
424
+ errorColor: '#E72324'
425
+ };
426
+ ```
427
+
428
+ ### Properties
429
+
430
+ | Property | Type | Description |
431
+ | ------ | ------ | ------ |
432
+ | <a id="primarycolor"></a> `primaryColor` | `string` | Primary brand color used throughout the editor |
433
+ | <a id="primaryfontface"></a> `primaryFontFace` | `string` | Main font family for the editor UI |
434
+ | <a id="secondarycolor"></a> `secondaryColor?` | `string` | Secondary/background color |
435
+ | <a id="successcolor"></a> `successColor?` | `string` | Success state color |
436
+ | <a id="warningcolor"></a> `warningColor?` | `string` | Warning state color |
437
+ | <a id="infocolor"></a> `infoColor?` | `string` | Info state color |
438
+ | <a id="errorcolor"></a> `errorColor?` | `string` | Error state color |
439
+ | <a id="disabledfontcolor"></a> `disabledFontColor?` | `string` | Disabled elements font color |
440
+ | <a id="primaryfontcolor"></a> `primaryFontColor?` | `string` | Primary text color |
441
+ | <a id="secondaryfontcolor"></a> `secondaryFontColor?` | `string` | Secondary text color |
442
+ | <a id="buttonfontweight"></a> `buttonFontWeight?` | `string` | Button font weight |
443
+ | <a id="primarybuttonfontcolor"></a> `primaryButtonFontColor?` | `string` | Primary button text color |
444
+ | <a id="secondarybuttonfontcolor"></a> `secondaryButtonFontColor?` | `string` | Secondary button text color |
445
+ | <a id="secondarybuttonbordercolor"></a> `secondaryButtonBorderColor?` | `string` | Secondary button border color |
446
+ | <a id="secondarybuttonborderwidth"></a> `secondaryButtonBorderWidth?` | `string` | Secondary button border width |
447
+ | <a id="buttonloadingbackground"></a> `buttonLoadingBackground?` | `string` | Button loading state background |
448
+ | <a id="buttonheight"></a> `buttonHeight?` | `string` | Button height |
449
+ | <a id="buttonpadding"></a> `buttonPadding?` | `string` | Button padding |
450
+ | <a id="buttonpaddingwithicon"></a> `buttonPaddingWithIcon?` | `string` | Button padding when icon is present |
451
+ | <a id="inputloadingbackground"></a> `inputLoadingBackground?` | `string` | Input loading state background |
452
+ | <a id="textinputdefaultbordercolor"></a> `textInputDefaultBorderColor?` | `string` | Text input default border color |
453
+ | <a id="textinputdefaultborderwidth"></a> `textInputDefaultBorderWidth?` | `string` | Text input default border width |
454
+ | <a id="textinputdefaultbackgroundcolor"></a> `textInputDefaultBackgroundColor?` | `string` | Text input default background color |
455
+ | <a id="textinputpadding"></a> `textInputPadding?` | `string` | Text input padding |
456
+ | <a id="checkboxdefaultbordercolor"></a> `checkboxDefaultBorderColor?` | `string` | Checkbox default border color |
457
+ | <a id="checkboxdefaultborderwidth"></a> `checkboxDefaultBorderWidth?` | `string` | Checkbox default border width |
458
+ | <a id="checkboxdefaultbackgroundcolor"></a> `checkboxDefaultBackgroundColor?` | `string` | Checkbox default background color |
459
+ | <a id="checkboxselectediconcolor"></a> `checkboxSelectedIconColor?` | `string` | Checkbox selected icon color |
460
+ | <a id="checkboxsize"></a> `checkboxSize?` | `string` | Checkbox size |
461
+ | <a id="radiobuttondefaultbackgroundcolor"></a> `radioButtonDefaultBackgroundColor?` | `string` | Radio button default background color |
462
+ | <a id="switchdefaultbackgroundcolor"></a> `switchDefaultBackgroundColor?` | `string` | Switch default background color |
463
+ | <a id="switchiconcolor"></a> `switchIconColor?` | `string` | Switch icon color |
464
+ | <a id="selectdefaultbordercolor"></a> `selectDefaultBorderColor?` | `string` | Select default border color |
465
+ | <a id="selectdefaultborderwidth"></a> `selectDefaultBorderWidth?` | `string` | Select default border width |
466
+ | <a id="selectdefaultbackgroundcolor"></a> `selectDefaultBackgroundColor?` | `string` | Select default background color |
467
+ | <a id="selectpadding"></a> `selectPadding?` | `string` | Select padding |
468
+ | <a id="largeborderradius"></a> `largeBorderRadius?` | `string` | Large border radius for rounded elements |
469
+ | <a id="smallborderradius"></a> `smallBorderRadius?` | `string` | Small border radius for subtle rounding |
470
+ | <a id="contextmenuselectedbackgroundcolor"></a> `contextMenuSelectedBackgroundColor?` | `string` | Context menu selected item background color |
471
+ | <a id="snackbarpositiontop"></a> `snackBarPositionTop?` | `string` | Snackbar position from top |
472
+ | <a id="snackbarpadding"></a> `snackBarPadding?` | `string` | Snackbar padding |
473
+ | <a id="darkerprimarycolorkey"></a> `darkerPrimaryColorKey?` | `string` | Darker shade of primary color (CSS value) |
474
+ | <a id="lighterprimarycolor"></a> `lighterPrimaryColor?` | `string` | Lighter shade of primary color |
475
+ | <a id="verylightprimarycolor"></a> `veryLightPrimaryColor?` | `string` | Very light shade of primary color (for backgrounds) |
476
+ | <a id="iconpickercolor"></a> `iconPickerColor?` | `string` | Icon picker accent color |
477
+ | <a id="notification"></a> `notification?` | \{ `padding?`: `string`; `borderRadius?`: `string`; `boxShadow?`: `string`; `textColor?`: `string`; `warningBackgroundColor?`: `string`; `fontSize?`: `string`; \} | Notification theme settings |
478
+ | `notification.padding?` | `string` | - |
479
+ | `notification.borderRadius?` | `string` | - |
480
+ | `notification.boxShadow?` | `string` | - |
481
+ | `notification.textColor?` | `string` | - |
482
+ | `notification.warningBackgroundColor?` | `string` | - |
483
+ | `notification.fontSize?` | `string` | - |
484
+ | <a id="dialog"></a> `dialog?` | \{ `titleFontSize?`: `string`; `titleFontWeight?`: `string`; \} | Dialog theme settings |
485
+ | `dialog.titleFontSize?` | `string` | - |
486
+ | `dialog.titleFontWeight?` | `string` | - |
487
+ | <a id="checkbox"></a> `checkbox?` | \{ `valueFontSize?`: `string`; `valueFontColor?`: `string`; \} | Checkbox component theme settings |
488
+ | `checkbox.valueFontSize?` | `string` | - |
489
+ | `checkbox.valueFontColor?` | `string` | - |
490
+ | <a id="select"></a> `select?` | \{ `filterBorderRadius?`: `string`; `filterPadding?`: `string`; `filterIconPadding?`: `string`; \} | Select filter theme settings |
491
+ | `select.filterBorderRadius?` | `string` | - |
492
+ | `select.filterPadding?` | `string` | - |
493
+ | `select.filterIconPadding?` | `string` | - |
494
+ | <a id="input"></a> `input?` | \{ `labelMargin?`: `string`; `textInputTextareaPadding?`: `string`; `searchInputBackgroundIconColor?`: `string`; `searchInputBorderRadius?`: `string`; `searchInputIconColorActive?`: `string`; \} | Input field theme settings |
495
+ | `input.labelMargin?` | `string` | - |
496
+ | `input.textInputTextareaPadding?` | `string` | - |
497
+ | `input.searchInputBackgroundIconColor?` | `string` | - |
498
+ | `input.searchInputBorderRadius?` | `string` | - |
499
+ | `input.searchInputIconColorActive?` | `string` | - |
500
+ | <a id="dropdown"></a> `dropdown?` | \{ `borderRadius?`: `string`; `padding?`: `string`; `leftRightIndent?`: `string`; \} | Dropdown menu theme settings |
501
+ | `dropdown.borderRadius?` | `string` | - |
502
+ | `dropdown.padding?` | `string` | - |
503
+ | `dropdown.leftRightIndent?` | `string` | - |
504
+ | <a id="editoroption"></a> `editorOption?` | \{ `customPrizeImageSize?`: `string`; `borderDefaultColor?`: `string`; `borderClearButtonColor?`: `string`; `borderRadiusToggleButtons?`: `string`; `descriptionFontSize?`: `string`; `backgroundToggleButtonSelected?`: `string`; `backgroundToggleTextButtonSelected?`: `string`; `backgroundToggleButtonHover?`: `string`; `defaultBorder?`: `string`; \} | Editor option controls theme settings |
505
+ | `editorOption.customPrizeImageSize?` | `string` | - |
506
+ | `editorOption.borderDefaultColor?` | `string` | - |
507
+ | `editorOption.borderClearButtonColor?` | `string` | - |
508
+ | `editorOption.borderRadiusToggleButtons?` | `string` | - |
509
+ | `editorOption.descriptionFontSize?` | `string` | - |
510
+ | `editorOption.backgroundToggleButtonSelected?` | `string` | - |
511
+ | `editorOption.backgroundToggleTextButtonSelected?` | `string` | - |
512
+ | `editorOption.backgroundToggleButtonHover?` | `string` | - |
513
+ | `editorOption.defaultBorder?` | `string` | - |
514
+ | <a id="editorprizeoption"></a> `editorPrizeOption?` | \{ `gridTemplateColumns?`: `string`; `decrementIncrementGap?`: `string`; `chancePseudoBorderRight?`: `string`; `customEsInputFormWidth?`: `string`; `confirmButtonBottomPadding?`: `string`; \} | Prize option editor theme settings |
515
+ | `editorPrizeOption.gridTemplateColumns?` | `string` | - |
516
+ | `editorPrizeOption.decrementIncrementGap?` | `string` | - |
517
+ | `editorPrizeOption.chancePseudoBorderRight?` | `string` | - |
518
+ | `editorPrizeOption.customEsInputFormWidth?` | `string` | - |
519
+ | `editorPrizeOption.confirmButtonBottomPadding?` | `string` | - |
520
+ | <a id="dropzone"></a> `dropzone?` | \{ `codeFont?`: `string`; \} | Dropzone/code editor theme settings |
521
+ | `dropzone.codeFont?` | `string` | - |
522
+ | <a id="slidebar"></a> `slidebar?` | \{ `padding?`: `string`; `margin?`: `string`; `titleFontSize?`: `string`; `titleFontWeight?`: `string`; \} | Slidebar/sidebar theme settings |
523
+ | `slidebar.padding?` | `string` | - |
524
+ | `slidebar.margin?` | `string` | - |
525
+ | `slidebar.titleFontSize?` | `string` | - |
526
+ | `slidebar.titleFontWeight?` | `string` | - |
527
+ | <a id="editorpanel"></a> `editorPanel?` | \{ `smallBorderRadius?`: `string`; `rewardsInputWidth?`: `string`; `errorNotificationBackgroundColor?`: `string`; `errorNotificationLeftPadding?`: `string`; `tabsBackgroundColor?`: `string`; `tabBackgroundColor?`: `string`; `tabsDeviceBackgroundColor?`: `string`; `tabHoverBackgroundColor?`: `string`; `tabHoverColor?`: `string`; `tabBorderRadius?`: `string`; `borderLeftWidthSelected?`: `string`; `borderTopWidthSelected?`: `string`; `borderRightWidthSelected?`: `string`; `borderBottomWidthSelected?`: `string`; `borderBottomWidth?`: `string`; `tabPadding?`: `string`; `tabHeaderPadding?`: `string`; `tabButtonPadding?`: `string`; `tabHeight?`: `string`; `tabGap?`: `string`; \} | Editor panel (tabs, property pane) theme settings |
528
+ | `editorPanel.smallBorderRadius?` | `string` | - |
529
+ | `editorPanel.rewardsInputWidth?` | `string` | - |
530
+ | `editorPanel.errorNotificationBackgroundColor?` | `string` | - |
531
+ | `editorPanel.errorNotificationLeftPadding?` | `string` | - |
532
+ | `editorPanel.tabsBackgroundColor?` | `string` | - |
533
+ | `editorPanel.tabBackgroundColor?` | `string` | - |
534
+ | `editorPanel.tabsDeviceBackgroundColor?` | `string` | - |
535
+ | `editorPanel.tabHoverBackgroundColor?` | `string` | - |
536
+ | `editorPanel.tabHoverColor?` | `string` | - |
537
+ | `editorPanel.tabBorderRadius?` | `string` | - |
538
+ | `editorPanel.borderLeftWidthSelected?` | `string` | - |
539
+ | `editorPanel.borderTopWidthSelected?` | `string` | - |
540
+ | `editorPanel.borderRightWidthSelected?` | `string` | - |
541
+ | `editorPanel.borderBottomWidthSelected?` | `string` | - |
542
+ | `editorPanel.borderBottomWidth?` | `string` | - |
543
+ | `editorPanel.tabPadding?` | `string` | - |
544
+ | `editorPanel.tabHeaderPadding?` | `string` | - |
545
+ | `editorPanel.tabButtonPadding?` | `string` | - |
546
+ | `editorPanel.tabHeight?` | `string` | - |
547
+ | `editorPanel.tabGap?` | `string` | - |
548
+ | <a id="editorinputs"></a> `editorInputs?` | \{ `selectDefaultAlignItems?`: `string`; `selectDefaultJustifyContent?`: `string`; `selectInputDefaultMinHeight?`: `string`; `selectInputDefaultLineHeight?`: `string`; `inputDefaultMinWidth?`: `string`; `inputSmallMinWidth?`: `string`; `selectBodyWidth?`: `string`; `searchInputBoxShadow?`: `string`; `searchInputBackgroundIconColor?`: `string`; `searchInputBorderRadius?`: `string`; `searchInputBackgroundActiveColor?`: `string`; `searchInputBorderActiveColorHover?`: `string`; `searchInputBackgroundActiveMargin?`: `string`; `selectTextParamsWidth?`: `string`; \} | Editor inputs theme settings |
549
+ | `editorInputs.selectDefaultAlignItems?` | `string` | - |
550
+ | `editorInputs.selectDefaultJustifyContent?` | `string` | - |
551
+ | `editorInputs.selectInputDefaultMinHeight?` | `string` | - |
552
+ | `editorInputs.selectInputDefaultLineHeight?` | `string` | - |
553
+ | `editorInputs.inputDefaultMinWidth?` | `string` | - |
554
+ | `editorInputs.inputSmallMinWidth?` | `string` | - |
555
+ | `editorInputs.selectBodyWidth?` | `string` | - |
556
+ | `editorInputs.searchInputBoxShadow?` | `string` | - |
557
+ | `editorInputs.searchInputBackgroundIconColor?` | `string` | - |
558
+ | `editorInputs.searchInputBorderRadius?` | `string` | - |
559
+ | `editorInputs.searchInputBackgroundActiveColor?` | `string` | - |
560
+ | `editorInputs.searchInputBorderActiveColorHover?` | `string` | - |
561
+ | `editorInputs.searchInputBackgroundActiveMargin?` | `string` | - |
562
+ | `editorInputs.selectTextParamsWidth?` | `string` | - |
563
+
564
+ ***
565
+
566
+ ## ResolvedDataI
567
+
568
+ Data returned by [EditorApiConfigI.getWidgetData](#getwidgetdata).
569
+ Contains all information needed to initialize the editor.
570
+
571
+ ### Properties
572
+
573
+ | Property | Type | Description |
574
+ | ------ | ------ | ------ |
575
+ | <a id="widgetdata"></a> `widgetData` | [`ResolvedWidgetDataI`](#resolvedwidgetdatai) | Main widget data |
576
+ | <a id="teaserdata"></a> `teaserData` | [`ResolvedWidgetDataI`](#resolvedwidgetdatai) | Teaser (minimized widget) data, if enabled |
577
+ | <a id="languages"></a> `languages` | [`FormLanguageI`](#formlanguagei)[] | Available languages for the widget |
578
+ | <a id="userinfo"></a> `userInfo` | [`UserInfoDtoI`](#userinfodtoi) | Current user information |
579
+ | <a id="linkedwidgets"></a> `linkedWidgets` | [`FormsListItemI`](#formslistitemi)[] | List of widgets that can be linked |
580
+ | <a id="prizepools"></a> `prizePools?` | [`PrizePoolModelI`](#prizepoolmodeli)[] | Prize pools for gamification widgets |
581
+ | <a id="widgettype"></a> `widgetType?` | [`EsWidgetType`](#eswidgettype) | Widget type for creating new widget mock when widget data is absent |
582
+ | <a id="layouttype"></a> `layoutType?` | [`EsWidgetLayoutType`](#eswidgetlayouttype) | Layout type for creating new widget mock when widget data is absent |
583
+
584
+ ***
585
+
586
+ ## ResolvedWidgetDataI
587
+
588
+ Widget-specific data within [ResolvedDataI](#resolveddatai).
589
+
590
+ ### Properties
591
+
592
+ | Property | Type | Description |
593
+ | ------ | ------ | ------ |
594
+ | <a id="variant-2"></a> `variant` | [`EsFormVariantI`](#esformvarianti) | Widget variant (form) data |
595
+ | <a id="appearances-1"></a> `appearances` | [`EsFormAppearanceI`](#esformappearancei)[] | All appearances (desktop, mobile, etc.) |
596
+ | <a id="latestrevision"></a> `latestRevision` | [`WidgetRevisionI`](#widgetrevisioni) | Latest saved revision |
597
+ | <a id="currentrevision"></a> `currentRevision` | [`WidgetRevisionI`](#widgetrevisioni) | Currently loaded revision |
598
+ | <a id="publishstatus-1"></a> `publishStatus` | [`FormPublishStatus`](#formpublishstatus) | Current publish status |
599
+
600
+ ***
601
+
602
+ ## DataToSaveI
603
+
604
+ Data passed to [EditorApiConfigI.saveWidgetData](#savewidgetdata).
605
+ Contains both original and modified data for comparison.
606
+
607
+ ### Properties
608
+
609
+ | Property | Type | Description |
610
+ | ------ | ------ | ------ |
611
+ | <a id="widgetdata-1"></a> `widgetData` | [`WidgetDataToSaveI`](#widgetdatatosavei) | Main widget data to save |
612
+ | <a id="teaserdata-1"></a> `teaserData` | [`WidgetDataToSaveI`](#widgetdatatosavei) | Teaser data to save, if enabled |
613
+ | <a id="pristineconfigs"></a> `pristineConfigs` | [`WidgetProjectConfigI`](#widgetprojectconfigi)[] | Original project configs (for comparison) |
614
+ | <a id="updatedconfigs"></a> `updatedConfigs` | [`WidgetProjectConfigI`](#widgetprojectconfigi)[] | Modified project configs |
615
+ | <a id="publishchanges"></a> `publishChanges` | `boolean` | Whether to publish changes immediately |
616
+
617
+ ***
618
+
619
+ ## WidgetDataToSaveI
620
+
621
+ Widget-specific data within [DataToSaveI](#datatosavei).
622
+
623
+ ### Properties
624
+
625
+ | Property | Type | Description |
626
+ | ------ | ------ | ------ |
627
+ | <a id="pristineappearances"></a> `pristineAppearances` | [`EsFormAppearanceI`](#esformappearancei)[] | Original appearances (for comparison) |
628
+ | <a id="updatedappearances"></a> `updatedAppearances` | [`EsFormAppearanceI`](#esformappearancei)[] | Modified appearances |
629
+ | <a id="pristinevariant"></a> `pristineVariant` | [`FormVariantI`](#formvarianti) | Original variant (for comparison) |
630
+ | <a id="updatedvariant"></a> `updatedVariant` | [`FormVariantI`](#formvarianti) | Modified variant |
631
+ | <a id="publishstatus-2"></a> `publishStatus` | [`FormPublishStatus`](#formpublishstatus) | Current publish status |
632
+
633
+ ***
634
+
635
+ ## EditorApiConfigI
636
+
637
+ HTTP API configuration for all editor operations.
638
+ All methods can return either Promise or Observable based on [EditorConfigI.defaultAsyncPattern](#defaultasyncpattern).
639
+
640
+ ### Example
641
+
642
+ ```typescript
643
+ const api: EditorApiConfigI = {
644
+ getWidgetData: () => fetch('/api/widget').then(r => r.json()),
645
+ saveWidgetData: (data) => fetch('/api/widget', {
646
+ method: 'POST',
647
+ body: JSON.stringify(data)
648
+ }),
649
+ // ... other methods
650
+ };
651
+ ```
652
+
653
+ ### Methods
654
+
655
+ #### createWidgetPrizePool()
656
+
657
+ ```ts
658
+ createWidgetPrizePool(body):
659
+ | Observable<{
660
+ id: string;
661
+ }>
662
+ | Promise<{
663
+ id: string;
664
+ }>;
665
+ ```
666
+
667
+ Create a new prize pool for gamification
668
+
669
+ ##### Parameters
670
+
671
+ | Parameter | Type |
672
+ | ------ | ------ |
673
+ | `body` | [`PrizePoolModelI`](#prizepoolmodeli) |
674
+
675
+ ##### Returns
676
+
677
+ \| `Observable`\<\{
678
+ `id`: `string`;
679
+ \}\>
680
+ \| `Promise`\<\{
681
+ `id`: `string`;
682
+ \}\>
683
+
684
+ #### updateWidgetPrizeOptions()
685
+
686
+ ```ts
687
+ updateWidgetPrizeOptions(payload): Promise<void> | Observable<void>;
688
+ ```
689
+
690
+ Update prize options in a prize pool
691
+
692
+ ##### Parameters
693
+
694
+ | Parameter | Type |
695
+ | ------ | ------ |
696
+ | `payload` | [`UpdateWidgetPrizeOptionsPayloadI`](#updatewidgetprizeoptionspayloadi) |
697
+
698
+ ##### Returns
699
+
700
+ `Promise`\<`void`\> \| `Observable`\<`void`\>
701
+
702
+ ### Properties
703
+
704
+ | Property | Type | Description |
705
+ | ------ | ------ | ------ |
706
+ | <a id="getwidgetdata"></a> `getWidgetData` | () => \| `Observable`\<[`ResolvedDataI`](#resolveddatai)\> \| `Promise`\<[`ResolvedDataI`](#resolveddatai)\> | Fetch initial widget data for editor initialization |
707
+ | <a id="savewidgetdata"></a> `saveWidgetData` | (`data`) => `Promise`\<`void`\> \| `Observable`\<`void`\> | Save widget data (appearances, variant, configs) |
708
+ | <a id="getwidgetappearances"></a> `getWidgetAppearances` | (`payload`) => \| `Observable`\<[`EsFormAppearanceI`](#esformappearancei)[]\> \| `Promise`\<[`EsFormAppearanceI`](#esformappearancei)[]\> | Fetch appearances for a specific widget |
709
+ | <a id="createwidgetrevision"></a> `createWidgetRevision` | (`payload`) => \| `Observable`\<[`CreateWidgetRevisionResponseI`](#createwidgetrevisionresponsei)\> \| `Promise`\<[`CreateWidgetRevisionResponseI`](#createwidgetrevisionresponsei)\> | Create a new widget revision (save point) |
710
+ | <a id="getwidgetslist"></a> `getWidgetsList` | (`params`) => \| `Observable`\<[`BaseListDtoI`](#baselistdtoi)\<[`FormsListItemI`](#formslistitemi)\>\> \| `Promise`\<[`BaseListDtoI`](#baselistdtoi)\<[`FormsListItemI`](#formslistitemi)\>\> | Fetch list of widgets for linking |
711
+ | <a id="getfilesfromcommondir"></a> `getFilesFromCommonDir` | (`payload`) => \| `Observable`\<\{ `url`: `string`; \}[]\> \| `Promise`\<\{ `url`: `string`; \}[]\> | Get files from common directory (icons, backgrounds, etc.) |
712
+ | <a id="removefile"></a> `removeFile` | (`payload`) => `Promise`\<`void`\> \| `Observable`\<`void`\> | Remove an uploaded file |
713
+ | <a id="getimagelibrary"></a> `getImageLibrary` | (`params`) => \| `Observable`\<[`ImageLibraryResponseDtoI`](#imagelibraryresponsedtoi)\> \| `Promise`\<[`ImageLibraryResponseDtoI`](#imagelibraryresponsedtoi)\> | Fetch images from the image library |
714
+ | <a id="getuserimages"></a> `getUserImages` | (`params`) => \| `Observable`\<[`UserImagesResponseDtoI`](#userimagesresponsedtoi)\> \| `Promise`\<[`UserImagesResponseDtoI`](#userimagesresponsedtoi)\> | Fetch user-uploaded images |
715
+ | <a id="uploadimage"></a> `uploadImage` | (`payload`) => \| `Observable`\<\{ `url`: `string`; \}\> \| `Promise`\<\{ `url`: `string`; \}\> | Upload an image file |
716
+ | <a id="uploadimagebyurl"></a> `uploadImageByUrl` | (`payload`) => \| `Observable`\<\{ `url`: `string`; \}\> \| `Promise`\<\{ `url`: `string`; \}\> | Upload an image from URL |
717
+ | <a id="copyimagebyurl"></a> `copyImageByUrl` | (`payload`) => \| `Observable`\<\{ `url`: `string`; \}\> \| `Promise`\<\{ `url`: `string`; \}\> | Copy an image by URL to widget storage |
718
+ | <a id="translate"></a> `translate` | (`params`) => \| `Observable`\<\{ `response`: [`TranslateRequestJsonI`](#translaterequestjsoni); \}\> \| `Promise`\<\{ `response`: [`TranslateRequestJsonI`](#translaterequestjsoni); \}\> | Translate text content |
719
+ | <a id="setautotranslate"></a> `setAutoTranslate?` | (`payload`) => `void` | Enable/disable auto-translation |
720
+ | <a id="getcontactmappingoptions"></a> `getContactMappingOptions` | () => \| `Observable`\<[`ClContactMappingOptionI`](#clcontactmappingoptioni)[]\> \| `Promise`\<[`ClContactMappingOptionI`](#clcontactmappingoptioni)[]\> | Fetch available contact mapping options |
721
+ | <a id="getcontactfieldgroups"></a> `getContactFieldGroups?` | () => \| `Observable`\<[`EsAdditionalFieldsListI`](#esadditionalfieldslisti)[]\> \| `Promise`\<[`EsAdditionalFieldsListI`](#esadditionalfieldslisti)[]\> | Fetch contact field groups |
722
+ | <a id="createwidget"></a> `createWidget?` | (`payload`) => \| `Observable`\<[`CreateWidgetResponseI`](#createwidgetresponsei)\> \| `Promise`\<[`CreateWidgetResponseI`](#createwidgetresponsei)\> | Create a new widget |
723
+
724
+ ***
725
+
726
+ ## GetWidgetAppearancesPayloadI
727
+
728
+ Payload for [EditorApiConfigI.getWidgetAppearances](#getwidgetappearances).
729
+
730
+ ### Properties
731
+
732
+ | Property | Type | Description |
733
+ | ------ | ------ | ------ |
734
+ | <a id="widgetid"></a> `widgetId` | `number` | Widget ID |
735
+ | <a id="variantid"></a> `variantId` | `number` | Variant ID |
736
+
737
+ ***
738
+
739
+ ## CreateWidgetRevisionPayloadI
740
+
741
+ Payload for [EditorApiConfigI.createWidgetRevision](#createwidgetrevision).
742
+
743
+ ### Extends
744
+
745
+ ### [`CreateWidgetRevisionRequestI`](#createwidgetrevisionrequesti)
746
+
747
+ ### Properties
748
+
749
+ | Property | Type | Description | Inherited from |
750
+ | ------ | ------ | ------ | ------ |
751
+ | <a id="widgetid-1"></a> `widgetId` | `number` | Widget ID | - |
752
+ | <a id="revisionid"></a> `revisionId` | `string` | Revision ID | - |
753
+ | <a id="changessaved"></a> `changesSaved` | `boolean` | - | [`CreateWidgetRevisionRequestI`](#createwidgetrevisionrequesti).[`changesSaved`](#changessaved-1) |
754
+ | <a id="payload"></a> `payload` | `WidgetRevisionPayloadI` | - | [`CreateWidgetRevisionRequestI`](#createwidgetrevisionrequesti).[`payload`](#payload-1) |
755
+
756
+ ***
757
+
758
+ ## GetFilesFromCommonDirPayloadI
759
+
760
+ Payload for [EditorApiConfigI.getFilesFromCommonDir](#getfilesfromcommondir).
761
+
762
+ ### Properties
763
+
764
+ | Property | Type | Description |
765
+ | ------ | ------ | ------ |
766
+ | <a id="type"></a> `type?` | [`TypeOfFilesFromCommonDir`](#typeoffilesfromcommondir) | Type of files to retrieve (icons, backgrounds, etc.) |
767
+
768
+ ***
769
+
770
+ ## RemoveFilePayloadI
771
+
772
+ Payload for [EditorApiConfigI.removeFile](#removefile).
773
+
774
+ ### Properties
775
+
776
+ | Property | Type | Description |
777
+ | ------ | ------ | ------ |
778
+ | <a id="fileurl"></a> `fileUrl` | `string` | URL of the file to remove |
779
+ | <a id="widgetid-2"></a> `widgetId` | `number` | Widget ID that owns the file |
780
+
781
+ ***
782
+
783
+ ## UploadImagePayloadI
784
+
785
+ Payload for [EditorApiConfigI.uploadImage](#uploadimage).
786
+
787
+ ### Properties
788
+
789
+ | Property | Type | Description |
790
+ | ------ | ------ | ------ |
791
+ | <a id="file"></a> `file` | `FormData` | FormData containing the image file |
792
+ | <a id="widgetid-3"></a> `widgetId` | `number` | Widget ID to associate the image with |
793
+ | <a id="type-1"></a> `type?` | `string` | Optional image type category |
794
+
795
+ ***
796
+
797
+ ## UploadImageByUrlPayloadI
798
+
799
+ Payload for [EditorApiConfigI.uploadImageByUrl](#uploadimagebyurl).
800
+
801
+ ### Properties
802
+
803
+ | Property | Type | Description |
804
+ | ------ | ------ | ------ |
805
+ | <a id="imageurl"></a> `imageUrl` | `string` | URL of the image to upload |
806
+ | <a id="widgetid-4"></a> `widgetId` | `number` | Widget ID to associate the image with |
807
+
808
+ ***
809
+
810
+ ## CopyImageByUrlPayloadI
811
+
812
+ Payload for [EditorApiConfigI.copyImageByUrl](#copyimagebyurl).
813
+
814
+ ### Properties
815
+
816
+ | Property | Type | Description |
817
+ | ------ | ------ | ------ |
818
+ | <a id="imageurl-1"></a> `imageUrl` | `string` | URL of the image to copy |
819
+ | <a id="widgetid-5"></a> `widgetId` | `number` | Widget ID to associate the copied image with |
820
+ | <a id="type-2"></a> `type?` | [`TypeOfFilesFromCommonDir`](#typeoffilesfromcommondir) | Type category for the copied image |
821
+
822
+ ***
823
+
824
+ ## UpdateWidgetPrizeOptionsPayloadI
825
+
826
+ Payload for [EditorApiConfigI.updateWidgetPrizeOptions](#updatewidgetprizeoptions).
827
+
828
+ ### Properties
829
+
830
+ | Property | Type | Description |
831
+ | ------ | ------ | ------ |
832
+ | <a id="poolid"></a> `poolId` | `string` | Prize pool ID |
833
+ | <a id="options-1"></a> `options` | [`PrizePoolOptionI`](#prizepooloptioni)[] | Updated prize options |
834
+
835
+ ***
836
+
837
+ ## SetAutoTranslatePayloadI
838
+
839
+ Payload for [EditorApiConfigI.setAutoTranslate](#setautotranslate).
840
+
841
+ ### Properties
842
+
843
+ | Property | Type | Description |
844
+ | ------ | ------ | ------ |
845
+ | <a id="enabled-1"></a> `enabled` | `boolean` | Enable or disable auto-translation |
846
+
847
+ ***
848
+
849
+ ## GetTemplatePayloadI
850
+
851
+ Payload for EditorApiConfigI.getTemplate.
852
+
853
+ ### Properties
854
+
855
+ | Property | Type | Description |
856
+ | ------ | ------ | ------ |
857
+ | <a id="templateid"></a> `templateId` | `number` | Template ID to fetch |
858
+
859
+ ***
860
+
861
+ ## CreateWidgetResponseI
862
+
863
+ Response from [EditorApiConfigI.createWidget](#createwidget).
864
+
865
+ ### Properties
866
+
867
+ | Property | Type | Description |
868
+ | ------ | ------ | ------ |
869
+ | <a id="variant-3"></a> `variant` | [`FormVariantI`](#formvarianti) | Created widget variant |
870
+ | <a id="appearances-2"></a> `appearances` | [`EsFormAppearanceI`](#esformappearancei)[] | Created widget appearances |
871
+
872
+ ***
873
+
874
+ ## EditorLogoI
875
+
876
+ Logo configuration for the editor header.
877
+
878
+ ### Example
879
+
880
+ ```typescript
881
+ const logo: EditorLogoI = {
882
+ imageUrl: 'https://example.com/logo.png',
883
+ link: 'https://example.com'
884
+ };
885
+ ```
886
+
887
+ ### Properties
888
+
889
+ | Property | Type | Description |
890
+ | ------ | ------ | ------ |
891
+ | <a id="imageurl-2"></a> `imageUrl` | `string` | URL of the logo image |
892
+ | <a id="link"></a> `link?` | `string` | Optional link URL when logo is clicked |
893
+
894
+ ***
895
+
896
+ ## ClContactMappingOptionI
897
+
898
+ Contact mapping option for form field mapping.
899
+ Used to map form inputs to contact fields in CDP.
900
+
901
+ ### Properties
902
+
903
+ | Property | Type | Description |
904
+ | ------ | ------ | ------ |
905
+ | <a id="name"></a> `name` | `string` | Unique identifier for the mapping option |
906
+ | <a id="label-1"></a> `label` | `string` | Display label for the option |
907
+ | <a id="group"></a> `group` | `string` | Group name for categorization |
908
+ | <a id="isdedupe"></a> `isDedupe` | `boolean` | Whether this field is used for deduplication |
909
+ | <a id="iscustom"></a> `isCustom` | `boolean` | Whether this is a custom field |
910
+ | <a id="type-3"></a> `type?` | [`ContactMappingOptionType`](#contactmappingoptiontype) | Type of contact mapping |
911
+ | <a id="values"></a> `values?` | `string`[] | Predefined values for select-type fields |
912
+ | <a id="options-2"></a> `options?` | [`ContactMappingOptionLimitsI`](#contactmappingoptionlimitsi) | Additional options and limits |
913
+ | <a id="isnew"></a> `isNew?` | `boolean` | Flag indicating this is a newly created field |
914
+ | <a id="additionalfieldtype"></a> `additionalFieldType?` | `EsAdditionalFieldType` | Type of additional field (for custom fields) |
915
+
916
+ ***
917
+
918
+ ## BaseListDtoI
919
+
920
+ ### Type Parameters
921
+
922
+ | Type Parameter |
923
+ | ------ |
924
+ | `T` |
925
+
926
+ ### Properties
927
+
928
+ | Property | Type |
929
+ | ------ | ------ |
930
+ | <a id="totalcount"></a> `totalCount` | `number` |
931
+ | <a id="items"></a> `items` | `T`[] |
932
+
933
+ ***
934
+
935
+ ## UserInfoDtoI
936
+
937
+ ### Properties
938
+
939
+ | Property | Type |
940
+ | ------ | ------ |
941
+ | <a id="userid"></a> `userId` | `number` |
942
+ | <a id="username"></a> `userName` | `string` |
943
+ | <a id="organisationid"></a> `organisationId` | `number` |
944
+ | <a id="projectid"></a> `projectId` | `number` |
945
+ | <a id="language"></a> `language` | `string` |
946
+ | <a id="permissions"></a> `permissions` | `PermissionOptionI` |
947
+ | <a id="featureflags"></a> `featureFlags` | `FeatureFlagOptionI` |
948
+
949
+ ***
950
+
951
+ ## ContactMappingOptionLimitsI
952
+
953
+ ### Properties
954
+
955
+ | Property | Type |
956
+ | ------ | ------ |
957
+ | <a id="max_value"></a> `MAX_VALUE?` | `number` |
958
+ | <a id="min_value"></a> `MIN_VALUE?` | `number` |
959
+ | <a id="annual"></a> `ANNUAL?` | `boolean` |
960
+
961
+ ***
962
+
963
+ ## ClDocumentI
964
+
965
+ ### Extends
966
+
967
+ - `ClDocumentI`
968
+
969
+ ### Properties
970
+
971
+ | Property | Type | Overrides |
972
+ | ------ | ------ | ------ |
973
+ | <a id="views"></a> `views` | `ClBaseComponentI`[] | `CommonDocumentI.views` |
974
+ | <a id="shared"></a> `shared` | `ClDocumentSharedI` | `CommonDocumentI.shared` |
975
+
976
+ ***
977
+
978
+ ## FormsListItemI
979
+
980
+ ### Properties
981
+
982
+ | Property | Type |
983
+ | ------ | ------ |
984
+ | <a id="id-2"></a> `id` | `number` |
985
+ | <a id="name-1"></a> `name` | `string` |
986
+ | <a id="publishstatus-3"></a> `publishStatus` | [`FormPublishStatus`](#formpublishstatus) |
987
+ | <a id="testingstatus"></a> `testingStatus` | `FormTestingStatus` |
988
+ | <a id="fullyconfigured"></a> `fullyConfigured` | `boolean` |
989
+ | <a id="createddate"></a> `createdDate` | `string` |
990
+ | <a id="updateddate"></a> `updatedDate` | `string` |
991
+ | <a id="draft"></a> `draft` | `boolean` |
992
+ | <a id="variantids"></a> `variantIds` | `number`[] |
993
+ | <a id="abtestid"></a> `abTestId` | `number` |
994
+ | <a id="config-1"></a> `config` | [`EsFormVariantI`](#esformvarianti) |
995
+ | <a id="restrictions"></a> `restrictions?` | `EsFormRestrictionI` |
996
+ | <a id="deleted"></a> `deleted?` | `boolean` |
997
+
998
+ ***
999
+
1000
+ ## EsFormVariantI
1001
+
1002
+ ### Properties
1003
+
1004
+ | Property | Type |
1005
+ | ------ | ------ |
1006
+ | <a id="formid"></a> `formId` | `number` |
1007
+ | <a id="id-3"></a> `id` | `number` |
1008
+ | <a id="config-2"></a> `config` | `EsFormVariantConfigI` |
1009
+ | <a id="appearances-3"></a> `appearances` | `EsFormVariantAppearanceI`[] |
1010
+ | <a id="linkedtovariantid"></a> `linkedToVariantId` | `number` |
1011
+ | <a id="type-4"></a> `type` | [`EsWidgetType`](#eswidgettype) |
1012
+ | <a id="revision"></a> `revision?` | `string` |
1013
+ | <a id="publishedrevision"></a> `publishedRevision?` | `string` |
1014
+
1015
+ ***
1016
+
1017
+ ## EsFormAppearanceI
1018
+
1019
+ ### Properties
1020
+
1021
+ | Property | Type | Description |
1022
+ | ------ | ------ | ------ |
1023
+ | <a id="id-4"></a> `id` | `string` \| `number` | - |
1024
+ | <a id="origin"></a> `origin` | `boolean` | - |
1025
+ | <a id="language-1"></a> `language` | `string` | - |
1026
+ | <a id="translations"></a> `translations` | `string` | - |
1027
+ | <a id="document"></a> `document` | `string` | stringified JSON {id: object} where id is node's id |
1028
+ | <a id="sync"></a> `sync` | `string` | - |
1029
+ | <a id="consents"></a> `consents?` | `object` | - |
1030
+ | <a id="revision-1"></a> `revision?` | `string` | - |
1031
+ | <a id="publishedrevision-1"></a> `publishedRevision?` | `string` | - |
1032
+
1033
+ ***
1034
+
1035
+ ## FormLanguageI
1036
+
1037
+ ### Properties
1038
+
1039
+ | Property | Type |
1040
+ | ------ | ------ |
1041
+ | <a id="languagecode"></a> `languageCode` | `string` |
1042
+ | <a id="name-2"></a> `name` | `string` |
1043
+ | <a id="localisation"></a> `localisation` | `MessageLanguageLocalisationI` |
1044
+
1045
+ ***
1046
+
1047
+ ## FormVariantI
1048
+
1049
+ ### Properties
1050
+
1051
+ | Property | Type |
1052
+ | ------ | ------ |
1053
+ | <a id="formid-1"></a> `formId` | `number` |
1054
+ | <a id="id-5"></a> `id` | `number` |
1055
+ | <a id="config-3"></a> `config` | `FormVariantConfigI` |
1056
+ | <a id="appearances-4"></a> `appearances` | `EsFormVariantAppearanceI`[] |
1057
+ | <a id="linkedtovariantid-1"></a> `linkedToVariantId` | `number` |
1058
+ | <a id="type-5"></a> `type` | [`EsWidgetType`](#eswidgettype) |
1059
+ | <a id="revision-2"></a> `revision` | `string` |
1060
+ | <a id="publishedrevision-2"></a> `publishedRevision` | `string` |
1061
+
1062
+ ***
1063
+
1064
+ ## WidgetProjectConfigI
1065
+
1066
+ ### Properties
1067
+
1068
+ | Property | Type |
1069
+ | ------ | ------ |
1070
+ | <a id="id-6"></a> `id` | `WidgetProjectConfigId` |
1071
+ | <a id="value-1"></a> `value` | `string` |
1072
+
1073
+ ***
1074
+
1075
+ ## EsAdditionalFieldsListI
1076
+
1077
+ ### Properties
1078
+
1079
+ | Property | Type |
1080
+ | ------ | ------ |
1081
+ | <a id="id-7"></a> `id` | `number` |
1082
+ | <a id="name-3"></a> `name` | `string` |
1083
+ | <a id="personalisationkey"></a> `personalisationKey` | `string` |
1084
+ | <a id="fields"></a> `fields` | `EsAdditionalFieldI`[] |
1085
+
1086
+ ***
1087
+
1088
+ ## BaseFormsListRequestParamsI
1089
+
1090
+ ### Properties
1091
+
1092
+ | Property | Type |
1093
+ | ------ | ------ |
1094
+ | <a id="layouttypes"></a> `layoutTypes?` | [`EsWidgetLayoutType`](#eswidgetlayouttype)[] |
1095
+ | <a id="order"></a> `order?` | `BaseListOrderOption` |
1096
+ | <a id="search"></a> `search?` | `string` |
1097
+ | <a id="offset"></a> `offset?` | `number` |
1098
+ | <a id="limit"></a> `limit?` | `number` |
1099
+ | <a id="sort"></a> `sort?` | `BaseListSortOption` |
1100
+ | <a id="types"></a> `types?` | [`EsWidgetType`](#eswidgettype)[] |
1101
+ | <a id="projectid-1"></a> `projectId?` | `number` |
1102
+ | <a id="filters"></a> `filters?` | `FormListRequestFilter` |
1103
+ | <a id="publishstatus-4"></a> `publishStatus?` | [`FormPublishStatus`](#formpublishstatus) |
1104
+ | <a id="publishdatefrom"></a> `publishDateFrom?` | `string` |
1105
+ | <a id="publishdateto"></a> `publishDateTo?` | `string` |
1106
+ | <a id="withdeleted"></a> `withDeleted?` | `boolean` |
1107
+ | <a id="analyticsdatefrom"></a> `analyticsDateFrom?` | `string` |
1108
+ | <a id="analyticsdateto"></a> `analyticsDateTo?` | `string` |
1109
+
1110
+ ***
1111
+
1112
+ ## CreateFormParamsI
1113
+
1114
+ ### Properties
1115
+
1116
+ | Property | Type |
1117
+ | ------ | ------ |
1118
+ | <a id="name-4"></a> `name` | `string` |
1119
+ | <a id="variant-4"></a> `variant` | `CreateFormParamsVariantI` |
1120
+ | <a id="publishstatus-5"></a> `publishStatus?` | [`FormPublishStatus`](#formpublishstatus) |
1121
+
1122
+ ***
1123
+
1124
+ ## TranslateRequestI
1125
+
1126
+ ### Properties
1127
+
1128
+ | Property | Type |
1129
+ | ------ | ------ |
1130
+ | <a id="json"></a> `json` | [`TranslateRequestJsonI`](#translaterequestjsoni) |
1131
+ | <a id="sourcelanguage"></a> `sourceLanguage` | `string` |
1132
+ | <a id="targetlanguage"></a> `targetLanguage` | `string` |
1133
+
1134
+ ***
1135
+
1136
+ ## TranslateRequestJsonI
1137
+
1138
+ ### Properties
1139
+
1140
+ | Property | Type |
1141
+ | ------ | ------ |
1142
+ | <a id="widgettranslations"></a> `widgetTranslations` | `LanguageTranslateState` |
1143
+ | <a id="teasertranslations"></a> `teaserTranslations?` | `LanguageTranslateState` |
1144
+
1145
+ ***
1146
+
1147
+ ## CreateWidgetRevisionRequestI
1148
+
1149
+ ### Extended by
1150
+
1151
+ ### [`CreateWidgetRevisionPayloadI`](#createwidgetrevisionpayloadi)
1152
+
1153
+ ### Properties
1154
+
1155
+ | Property | Type |
1156
+ | ------ | ------ |
1157
+ | <a id="changessaved-1"></a> `changesSaved` | `boolean` |
1158
+ | <a id="payload-1"></a> `payload` | `WidgetRevisionPayloadI` |
1159
+
1160
+ ***
1161
+
1162
+ ## CreateWidgetRevisionResponseI
1163
+
1164
+ ### Properties
1165
+
1166
+ | Property | Type |
1167
+ | ------ | ------ |
1168
+ | <a id="uuid"></a> `uuid` | `string` |
1169
+
1170
+ ***
1171
+
1172
+ ## WidgetRevisionI
1173
+
1174
+ ### Properties
1175
+
1176
+ | Property | Type |
1177
+ | ------ | ------ |
1178
+ | <a id="uuid-1"></a> `uuid` | `string` |
1179
+ | <a id="createddate-1"></a> `createdDate` | `string` |
1180
+ | <a id="widgetid-6"></a> `widgetId` | `number` |
1181
+ | <a id="userid-1"></a> `userId` | `number` |
1182
+ | <a id="published"></a> `published` | `boolean` |
1183
+ | <a id="changessaved-2"></a> `changesSaved` | `boolean` |
1184
+ | <a id="payload-2"></a> `payload` | `WidgetRevisionPayloadI` |
1185
+
1186
+ ***
1187
+
1188
+ ## ImageLibraryRequestParamsI
1189
+
1190
+ ### Properties
1191
+
1192
+ | Property | Type |
1193
+ | ------ | ------ |
1194
+ | <a id="search-1"></a> `search` | `string` |
1195
+ | <a id="usecache"></a> `useCache` | `boolean` |
1196
+ | <a id="page"></a> `page` | `number` |
1197
+ | <a id="limit-1"></a> `limit` | `number` |
1198
+ | <a id="type-6"></a> `type` | `ImageLibraryType` |
1199
+
1200
+ ***
1201
+
1202
+ ## ImageLibraryResponseDtoI
1203
+
1204
+ ### Properties
1205
+
1206
+ | Property | Type |
1207
+ | ------ | ------ |
1208
+ | <a id="data"></a> `data` | `ImageLibraryItemI`[] |
1209
+ | <a id="fromcache"></a> `fromCache` | `boolean` |
1210
+ | <a id="source"></a> `source` | `string` |
1211
+ | <a id="total"></a> `total` | `number` |
1212
+
1213
+ ***
1214
+
1215
+ ## UserImagesRequestParamsI
1216
+
1217
+ ### Properties
1218
+
1219
+ | Property | Type |
1220
+ | ------ | ------ |
1221
+ | <a id="page-1"></a> `page` | `number` |
1222
+ | <a id="limit-2"></a> `limit` | `number` |
1223
+ | <a id="type-7"></a> `type?` | `string` |
1224
+
1225
+ ***
1226
+
1227
+ ## UserImagesResponseDtoI
1228
+
1229
+ ### Properties
1230
+
1231
+ | Property | Type |
1232
+ | ------ | ------ |
1233
+ | <a id="items-1"></a> `items` | `UserImageItemI`[] |
1234
+ | <a id="total-1"></a> `total` | `number` |