@claspo/editor 1.0.8 → 1.0.10

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