@widgetic/editor 4.1.19 → 4.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "embedding-options-schema-001",
|
|
3
|
+
"name": "Embedding Options Schema",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"componentGroups": [
|
|
6
|
+
{
|
|
7
|
+
"name": "Embed Composition",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"id": "embed-options",
|
|
11
|
+
"type": "embedOptions",
|
|
12
|
+
"propertyGroups": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Basic options",
|
|
15
|
+
"properties": [
|
|
16
|
+
{
|
|
17
|
+
"name": "useIframe",
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"defaultValue": false,
|
|
20
|
+
"inputController": {
|
|
21
|
+
"type": "switch",
|
|
22
|
+
"helpText": "Embed as an isolated <iframe>. Simplest and safest, but the widget cannot autoscale or listen to page events. Turn this off to use the Widgetic SDK snippet.",
|
|
23
|
+
"description": "Use iframe"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "resizeMode",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"defaultValue": "fillWidth",
|
|
30
|
+
"inputController": {
|
|
31
|
+
"type": "dropdown",
|
|
32
|
+
"helpText": "Choose how the widget should be resized",
|
|
33
|
+
"description": "Resize mode",
|
|
34
|
+
"options": [
|
|
35
|
+
{
|
|
36
|
+
"label": "Fill width",
|
|
37
|
+
"value": "fillWidth"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"label": "Fixed",
|
|
41
|
+
"value": "fixed"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Responsive",
|
|
45
|
+
"value": "responsive"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "Custom",
|
|
49
|
+
"value": "custom"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"visibilityCondition": {
|
|
54
|
+
"dependsOn": "useIframe",
|
|
55
|
+
"condition": "useIframe === false"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "width",
|
|
60
|
+
"type": "number",
|
|
61
|
+
"defaultValue": 405,
|
|
62
|
+
"inputController": {
|
|
63
|
+
"type": "number",
|
|
64
|
+
"helpText": "Set the width of the widget in pixels",
|
|
65
|
+
"description": "Width",
|
|
66
|
+
"config": {
|
|
67
|
+
"min": 50,
|
|
68
|
+
"max": 4096,
|
|
69
|
+
"step": 1
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"visibilityCondition": {
|
|
73
|
+
"dependsOn": [
|
|
74
|
+
"useIframe",
|
|
75
|
+
"resizeMode"
|
|
76
|
+
],
|
|
77
|
+
"condition": "useIframe === true || resizeMode === 'custom' || resizeMode === 'fixed'"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "height",
|
|
82
|
+
"type": "number",
|
|
83
|
+
"defaultValue": 300,
|
|
84
|
+
"inputController": {
|
|
85
|
+
"type": "number",
|
|
86
|
+
"helpText": "Set the height of the widget in pixels",
|
|
87
|
+
"description": "Height",
|
|
88
|
+
"config": {
|
|
89
|
+
"min": 50,
|
|
90
|
+
"max": 4096,
|
|
91
|
+
"step": 1
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "responsive",
|
|
97
|
+
"type": "number",
|
|
98
|
+
"defaultValue": 480,
|
|
99
|
+
"inputController": {
|
|
100
|
+
"type": "number",
|
|
101
|
+
"helpText": "Below this viewport width the widget switches to the adaptive layout",
|
|
102
|
+
"description": "Adaptive width",
|
|
103
|
+
"config": {
|
|
104
|
+
"min": 0,
|
|
105
|
+
"max": 4096,
|
|
106
|
+
"step": 1
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"visibilityCondition": {
|
|
110
|
+
"dependsOn": [
|
|
111
|
+
"useIframe",
|
|
112
|
+
"resizeMode"
|
|
113
|
+
],
|
|
114
|
+
"condition": "useIframe === false && resizeMode === 'responsive'"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "autoscale",
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"defaultValue": true,
|
|
121
|
+
"inputController": {
|
|
122
|
+
"type": "switch",
|
|
123
|
+
"helpText": "Let the widget report its real height to the page so its container never clips or scrolls",
|
|
124
|
+
"description": "Autoscale"
|
|
125
|
+
},
|
|
126
|
+
"visibilityCondition": {
|
|
127
|
+
"dependsOn": "useIframe",
|
|
128
|
+
"condition": "useIframe === false"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"optionGroup": "basic"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "Layout & overlay",
|
|
136
|
+
"optionGroup": "layout",
|
|
137
|
+
"properties": [
|
|
138
|
+
{
|
|
139
|
+
"name": "embedTarget",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"defaultValue": "overlay",
|
|
142
|
+
"inputController": {
|
|
143
|
+
"type": "dropdown",
|
|
144
|
+
"helpText": "Choose the embed target",
|
|
145
|
+
"description": "Embed target",
|
|
146
|
+
"options": [
|
|
147
|
+
{
|
|
148
|
+
"label": "Inline",
|
|
149
|
+
"value": "site"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"label": "Overlay",
|
|
153
|
+
"value": "overlay"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"label": "Mixed",
|
|
157
|
+
"value": "mixed"
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"optionGroup": "layout"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "overlayPosition",
|
|
165
|
+
"type": "string",
|
|
166
|
+
"defaultValue": "center-center",
|
|
167
|
+
"inputController": {
|
|
168
|
+
"type": "fixedposition",
|
|
169
|
+
"helpText": "Set the overlay position",
|
|
170
|
+
"description": "Overlay position"
|
|
171
|
+
},
|
|
172
|
+
"visibilityCondition": {
|
|
173
|
+
"dependsOn": "embedTarget",
|
|
174
|
+
"condition": "embedTarget === 'overlay' || embedTarget === 'mixed'"
|
|
175
|
+
},
|
|
176
|
+
"optionGroup": "layout"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "addBackgroundColor",
|
|
180
|
+
"type": "boolean",
|
|
181
|
+
"defaultValue": false,
|
|
182
|
+
"inputController": {
|
|
183
|
+
"type": "switch",
|
|
184
|
+
"helpText": "Add a background color to the overlay. It will prevent click-through.",
|
|
185
|
+
"description": "Add background"
|
|
186
|
+
},
|
|
187
|
+
"visibilityCondition": {
|
|
188
|
+
"dependsOn": "embedTarget",
|
|
189
|
+
"condition": "embedTarget === 'overlay'"
|
|
190
|
+
},
|
|
191
|
+
"optionGroup": "layout"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "overlayBackgroundColor",
|
|
195
|
+
"type": "string",
|
|
196
|
+
"defaultValue": "#000000",
|
|
197
|
+
"inputController": {
|
|
198
|
+
"type": "colorPicker",
|
|
199
|
+
"helpText": "Set the color of the overlay background",
|
|
200
|
+
"description": "Overlay color",
|
|
201
|
+
"config": {
|
|
202
|
+
"showOpacityControls": true,
|
|
203
|
+
"defaultTransparency": 50
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"visibilityCondition": {
|
|
207
|
+
"dependsOn": "addBackgroundColor",
|
|
208
|
+
"condition": "addBackgroundColor === true"
|
|
209
|
+
},
|
|
210
|
+
"optionGroup": "layout"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "keepDimensions",
|
|
214
|
+
"type": "boolean",
|
|
215
|
+
"defaultValue": true,
|
|
216
|
+
"inputController": {
|
|
217
|
+
"type": "switch",
|
|
218
|
+
"helpText": "Keep width, height, resize the same",
|
|
219
|
+
"description": "Keep dimensions"
|
|
220
|
+
},
|
|
221
|
+
"visibilityCondition": {
|
|
222
|
+
"dependsOn": "embedTarget",
|
|
223
|
+
"condition": "embedTarget === 'mixed'"
|
|
224
|
+
},
|
|
225
|
+
"optionGroup": "layout"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "overlayResizeMode",
|
|
229
|
+
"type": "string",
|
|
230
|
+
"defaultValue": "fillWidth",
|
|
231
|
+
"inputController": {
|
|
232
|
+
"type": "dropdown",
|
|
233
|
+
"helpText": "Choose how the overlay widget should be resized",
|
|
234
|
+
"description": "Overlay resize mode",
|
|
235
|
+
"options": [
|
|
236
|
+
{
|
|
237
|
+
"label": "Fill width",
|
|
238
|
+
"value": "fillWidth"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"label": "Fill height",
|
|
242
|
+
"value": "fillHeight"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"label": "Fixed size",
|
|
246
|
+
"value": "fixedSize"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"label": "Fixed height",
|
|
250
|
+
"value": "fixedHeight"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"label": "Fixed width",
|
|
254
|
+
"value": "fixedWidth"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"label": "Allow scale down",
|
|
258
|
+
"value": "allowScaleDown"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"label": "Fill",
|
|
262
|
+
"value": "fill"
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
"visibilityCondition": {
|
|
267
|
+
"dependsOn": [
|
|
268
|
+
"embedTarget",
|
|
269
|
+
"keepDimensions"
|
|
270
|
+
],
|
|
271
|
+
"condition": "embedTarget === 'mixed' && keepDimensions === false"
|
|
272
|
+
},
|
|
273
|
+
"optionGroup": "layout"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "overlayWidth",
|
|
277
|
+
"type": "number",
|
|
278
|
+
"defaultValue": 405,
|
|
279
|
+
"inputController": {
|
|
280
|
+
"type": "number",
|
|
281
|
+
"helpText": "Set the width of the overlay widget in pixels",
|
|
282
|
+
"description": "Overlay width",
|
|
283
|
+
"config": {
|
|
284
|
+
"min": 50,
|
|
285
|
+
"max": 4096,
|
|
286
|
+
"step": 1
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"visibilityCondition": {
|
|
290
|
+
"dependsOn": [
|
|
291
|
+
"embedTarget",
|
|
292
|
+
"keepDimensions",
|
|
293
|
+
"overlayResizeMode"
|
|
294
|
+
],
|
|
295
|
+
"condition": "embedTarget === 'mixed' && keepDimensions === false && (overlayResizeMode === 'fixedSize' || overlayResizeMode === 'fixedWidth' || overlayResizeMode === 'allowScaleDown')"
|
|
296
|
+
},
|
|
297
|
+
"optionGroup": "layout"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "overlayHeight",
|
|
301
|
+
"type": "number",
|
|
302
|
+
"defaultValue": 300,
|
|
303
|
+
"inputController": {
|
|
304
|
+
"type": "number",
|
|
305
|
+
"helpText": "Set the height of the overlay widget in pixels",
|
|
306
|
+
"description": "Overlay height",
|
|
307
|
+
"config": {
|
|
308
|
+
"min": 50,
|
|
309
|
+
"max": 4096,
|
|
310
|
+
"step": 1
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"visibilityCondition": {
|
|
314
|
+
"dependsOn": [
|
|
315
|
+
"embedTarget",
|
|
316
|
+
"keepDimensions",
|
|
317
|
+
"overlayResizeMode"
|
|
318
|
+
],
|
|
319
|
+
"condition": "embedTarget === 'mixed' && keepDimensions === false && (overlayResizeMode === 'fixedSize' || overlayResizeMode === 'fixedHeight' || overlayResizeMode === 'allowScaleDown')"
|
|
320
|
+
},
|
|
321
|
+
"optionGroup": "layout"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "Triggers",
|
|
327
|
+
"optionGroup": "triggers",
|
|
328
|
+
"properties": [
|
|
329
|
+
{
|
|
330
|
+
"name": "eventTriggers",
|
|
331
|
+
"type": "string",
|
|
332
|
+
"defaultValue": "exitIntent",
|
|
333
|
+
"inputController": {
|
|
334
|
+
"type": "dropdown",
|
|
335
|
+
"helpText": "When the overlay opens automatically (Manual opens only via Widgetic.show() in your page code).",
|
|
336
|
+
"description": "Event triggers",
|
|
337
|
+
"options": [
|
|
338
|
+
{
|
|
339
|
+
"label": "Exit intent",
|
|
340
|
+
"value": "exitIntent"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"label": "Page load",
|
|
344
|
+
"value": "pageLoad"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"label": "Delay",
|
|
348
|
+
"value": "delay"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"label": "Scroll (pixels)",
|
|
352
|
+
"value": "scroll"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"label": "Scroll (percent)",
|
|
356
|
+
"value": "scrollPercent"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"label": "Manual",
|
|
360
|
+
"value": "manual"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"label": "Times page shown",
|
|
364
|
+
"value": "timesShown"
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"visibilityCondition": {
|
|
369
|
+
"dependsOn": "embedTarget",
|
|
370
|
+
"condition": "embedTarget === 'overlay'"
|
|
371
|
+
},
|
|
372
|
+
"optionGroup": "triggers"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "triggerDelaySeconds",
|
|
376
|
+
"type": "number",
|
|
377
|
+
"defaultValue": 3,
|
|
378
|
+
"optionGroup": "triggers",
|
|
379
|
+
"inputController": {
|
|
380
|
+
"type": "number",
|
|
381
|
+
"description": "Delay",
|
|
382
|
+
"helpText": "Seconds after the widget is ready before the overlay opens.",
|
|
383
|
+
"config": {
|
|
384
|
+
"min": 0,
|
|
385
|
+
"max": 86400,
|
|
386
|
+
"step": 1
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"visibilityCondition": {
|
|
390
|
+
"dependsOn": [
|
|
391
|
+
"embedTarget",
|
|
392
|
+
"eventTriggers"
|
|
393
|
+
],
|
|
394
|
+
"condition": "embedTarget === 'overlay' && eventTriggers === 'delay'"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "triggerScrollDistance",
|
|
399
|
+
"type": "number",
|
|
400
|
+
"defaultValue": 100,
|
|
401
|
+
"optionGroup": "triggers",
|
|
402
|
+
"inputController": {
|
|
403
|
+
"type": "number",
|
|
404
|
+
"description": "Scroll distance",
|
|
405
|
+
"helpText": "Pixels scrolled down before the overlay opens.",
|
|
406
|
+
"config": {
|
|
407
|
+
"min": 1,
|
|
408
|
+
"max": 100000,
|
|
409
|
+
"step": 1
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"visibilityCondition": {
|
|
413
|
+
"dependsOn": [
|
|
414
|
+
"embedTarget",
|
|
415
|
+
"eventTriggers"
|
|
416
|
+
],
|
|
417
|
+
"condition": "embedTarget === 'overlay' && eventTriggers === 'scroll'"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"name": "triggerScrollPercent",
|
|
422
|
+
"type": "number",
|
|
423
|
+
"defaultValue": 50,
|
|
424
|
+
"optionGroup": "triggers",
|
|
425
|
+
"inputController": {
|
|
426
|
+
"type": "number",
|
|
427
|
+
"description": "Scroll percent",
|
|
428
|
+
"helpText": "Share of page height scrolled (0–100) before the overlay opens.",
|
|
429
|
+
"config": {
|
|
430
|
+
"min": 0,
|
|
431
|
+
"max": 100,
|
|
432
|
+
"step": 1
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"visibilityCondition": {
|
|
436
|
+
"dependsOn": [
|
|
437
|
+
"embedTarget",
|
|
438
|
+
"eventTriggers"
|
|
439
|
+
],
|
|
440
|
+
"condition": "embedTarget === 'overlay' && eventTriggers === 'scrollPercent'"
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "triggerPageViews",
|
|
445
|
+
"type": "number",
|
|
446
|
+
"defaultValue": 3,
|
|
447
|
+
"optionGroup": "triggers",
|
|
448
|
+
"inputController": {
|
|
449
|
+
"type": "number",
|
|
450
|
+
"description": "Page views",
|
|
451
|
+
"helpText": "How many times this page must load for this visitor before the widget appears (stored in the browser).",
|
|
452
|
+
"config": {
|
|
453
|
+
"min": 1,
|
|
454
|
+
"max": 1000,
|
|
455
|
+
"step": 1
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"visibilityCondition": {
|
|
459
|
+
"dependsOn": [
|
|
460
|
+
"embedTarget",
|
|
461
|
+
"eventTriggers"
|
|
462
|
+
],
|
|
463
|
+
"condition": "embedTarget === 'overlay' && eventTriggers === 'timesShown'"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"name": "Excludes",
|
|
470
|
+
"optionGroup": "excludes",
|
|
471
|
+
"properties": [
|
|
472
|
+
{
|
|
473
|
+
"name": "excludeUrlPatterns",
|
|
474
|
+
"type": "string",
|
|
475
|
+
"defaultValue": "",
|
|
476
|
+
"optionGroup": "excludes",
|
|
477
|
+
"inputController": {
|
|
478
|
+
"type": "textarea",
|
|
479
|
+
"description": "Exclude URLs",
|
|
480
|
+
"helpText": "Comma- or newline-separated path or URL fragments. The widget does not open on matching pages."
|
|
481
|
+
},
|
|
482
|
+
"visibilityCondition": {
|
|
483
|
+
"dependsOn": "embedTarget",
|
|
484
|
+
"condition": "embedTarget === 'overlay' || embedTarget === 'mixed'"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "excludeAfterDismiss",
|
|
489
|
+
"type": "boolean",
|
|
490
|
+
"defaultValue": false,
|
|
491
|
+
"optionGroup": "excludes",
|
|
492
|
+
"inputController": {
|
|
493
|
+
"type": "switch",
|
|
494
|
+
"description": "After close",
|
|
495
|
+
"helpText": "Do not show again after the visitor closed the overlay."
|
|
496
|
+
},
|
|
497
|
+
"visibilityCondition": {
|
|
498
|
+
"dependsOn": "embedTarget",
|
|
499
|
+
"condition": "embedTarget === 'overlay'"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "excludeAfterInteract",
|
|
504
|
+
"type": "boolean",
|
|
505
|
+
"defaultValue": false,
|
|
506
|
+
"optionGroup": "excludes",
|
|
507
|
+
"inputController": {
|
|
508
|
+
"type": "switch",
|
|
509
|
+
"description": "After open",
|
|
510
|
+
"helpText": "Do not show again after the widget opened once."
|
|
511
|
+
},
|
|
512
|
+
"visibilityCondition": {
|
|
513
|
+
"dependsOn": "embedTarget",
|
|
514
|
+
"condition": "embedTarget === 'overlay'"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "Visitors",
|
|
521
|
+
"optionGroup": "visitors",
|
|
522
|
+
"properties": [
|
|
523
|
+
{
|
|
524
|
+
"name": "visitorType",
|
|
525
|
+
"type": "string",
|
|
526
|
+
"defaultValue": "any",
|
|
527
|
+
"optionGroup": "visitors",
|
|
528
|
+
"inputController": {
|
|
529
|
+
"type": "dropdown",
|
|
530
|
+
"description": "Visitor type",
|
|
531
|
+
"helpText": "Limit to first-time or returning visitors (tracked in this browser only).",
|
|
532
|
+
"options": [
|
|
533
|
+
{
|
|
534
|
+
"label": "Any",
|
|
535
|
+
"value": "any"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"label": "New visitor",
|
|
539
|
+
"value": "new"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"label": "Returning visitor",
|
|
543
|
+
"value": "returning"
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
},
|
|
547
|
+
"visibilityCondition": {
|
|
548
|
+
"dependsOn": "embedTarget",
|
|
549
|
+
"condition": "embedTarget === 'overlay'"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"name": "minTimeOnPageSeconds",
|
|
554
|
+
"type": "number",
|
|
555
|
+
"defaultValue": 0,
|
|
556
|
+
"optionGroup": "visitors",
|
|
557
|
+
"inputController": {
|
|
558
|
+
"type": "number",
|
|
559
|
+
"description": "Time on page",
|
|
560
|
+
"helpText": "Wait this many seconds on the page before the overlay may open.",
|
|
561
|
+
"config": {
|
|
562
|
+
"min": 0,
|
|
563
|
+
"max": 3600,
|
|
564
|
+
"step": 1
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"visibilityCondition": {
|
|
568
|
+
"dependsOn": "embedTarget",
|
|
569
|
+
"condition": "embedTarget === 'overlay'"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "minSitePageViews",
|
|
574
|
+
"type": "number",
|
|
575
|
+
"defaultValue": 0,
|
|
576
|
+
"optionGroup": "visitors",
|
|
577
|
+
"inputController": {
|
|
578
|
+
"type": "number",
|
|
579
|
+
"description": "Site page views",
|
|
580
|
+
"helpText": "Require this many page loads on the site (any Widgetic embed) before the overlay may open.",
|
|
581
|
+
"config": {
|
|
582
|
+
"min": 0,
|
|
583
|
+
"max": 1000,
|
|
584
|
+
"step": 1
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"visibilityCondition": {
|
|
588
|
+
"dependsOn": "embedTarget",
|
|
589
|
+
"condition": "embedTarget === 'overlay'"
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "Schedule",
|
|
596
|
+
"optionGroup": "schedule",
|
|
597
|
+
"properties": [
|
|
598
|
+
{
|
|
599
|
+
"name": "scheduleStartDate",
|
|
600
|
+
"type": "string",
|
|
601
|
+
"defaultValue": "",
|
|
602
|
+
"optionGroup": "schedule",
|
|
603
|
+
"inputController": {
|
|
604
|
+
"type": "text",
|
|
605
|
+
"description": "Start date",
|
|
606
|
+
"helpText": "First day the widget may open (local time)."
|
|
607
|
+
},
|
|
608
|
+
"visibilityCondition": {
|
|
609
|
+
"dependsOn": "embedTarget",
|
|
610
|
+
"condition": "embedTarget === 'overlay'"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"name": "scheduleEndDate",
|
|
615
|
+
"type": "string",
|
|
616
|
+
"defaultValue": "",
|
|
617
|
+
"optionGroup": "schedule",
|
|
618
|
+
"inputController": {
|
|
619
|
+
"type": "text",
|
|
620
|
+
"description": "End date",
|
|
621
|
+
"helpText": "Last day the widget may open (local time)."
|
|
622
|
+
},
|
|
623
|
+
"visibilityCondition": {
|
|
624
|
+
"dependsOn": "embedTarget",
|
|
625
|
+
"condition": "embedTarget === 'overlay'"
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"name": "scheduleDaysOfWeek",
|
|
630
|
+
"type": "string",
|
|
631
|
+
"defaultValue": "",
|
|
632
|
+
"optionGroup": "schedule",
|
|
633
|
+
"inputController": {
|
|
634
|
+
"type": "text",
|
|
635
|
+
"description": "Weekdays",
|
|
636
|
+
"helpText": "Optional list such as mon,wed,fri or 1,3,5 (0=Sunday). Empty means every day."
|
|
637
|
+
},
|
|
638
|
+
"visibilityCondition": {
|
|
639
|
+
"dependsOn": "embedTarget",
|
|
640
|
+
"condition": "embedTarget === 'overlay'"
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "scheduleTimeStart",
|
|
645
|
+
"type": "string",
|
|
646
|
+
"defaultValue": "",
|
|
647
|
+
"optionGroup": "schedule",
|
|
648
|
+
"inputController": {
|
|
649
|
+
"type": "text",
|
|
650
|
+
"description": "From time",
|
|
651
|
+
"helpText": "Earliest local time (HH:mm)."
|
|
652
|
+
},
|
|
653
|
+
"visibilityCondition": {
|
|
654
|
+
"dependsOn": "embedTarget",
|
|
655
|
+
"condition": "embedTarget === 'overlay'"
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "scheduleTimeEnd",
|
|
660
|
+
"type": "string",
|
|
661
|
+
"defaultValue": "",
|
|
662
|
+
"optionGroup": "schedule",
|
|
663
|
+
"inputController": {
|
|
664
|
+
"type": "text",
|
|
665
|
+
"description": "Until time",
|
|
666
|
+
"helpText": "Latest local time (HH:mm)."
|
|
667
|
+
},
|
|
668
|
+
"visibilityCondition": {
|
|
669
|
+
"dependsOn": "embedTarget",
|
|
670
|
+
"condition": "embedTarget === 'overlay'"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"name": "Acquisition",
|
|
677
|
+
"optionGroup": "acquisition",
|
|
678
|
+
"properties": [
|
|
679
|
+
{
|
|
680
|
+
"name": "requireDirectTraffic",
|
|
681
|
+
"type": "boolean",
|
|
682
|
+
"defaultValue": false,
|
|
683
|
+
"optionGroup": "acquisition",
|
|
684
|
+
"inputController": {
|
|
685
|
+
"type": "switch",
|
|
686
|
+
"description": "Direct traffic only",
|
|
687
|
+
"helpText": "Open only when there is no referrer (typed URL or bookmark)."
|
|
688
|
+
},
|
|
689
|
+
"visibilityCondition": {
|
|
690
|
+
"dependsOn": "embedTarget",
|
|
691
|
+
"condition": "embedTarget === 'overlay'"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"name": "referrerInclude",
|
|
696
|
+
"type": "string",
|
|
697
|
+
"defaultValue": "",
|
|
698
|
+
"optionGroup": "acquisition",
|
|
699
|
+
"inputController": {
|
|
700
|
+
"type": "textarea",
|
|
701
|
+
"description": "Referrers",
|
|
702
|
+
"helpText": "Comma-separated host fragments (e.g. google.com, newsletter.example). Empty allows any referrer."
|
|
703
|
+
},
|
|
704
|
+
"visibilityCondition": {
|
|
705
|
+
"dependsOn": "embedTarget",
|
|
706
|
+
"condition": "embedTarget === 'overlay'"
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "urlIncludePatterns",
|
|
711
|
+
"type": "string",
|
|
712
|
+
"defaultValue": "",
|
|
713
|
+
"optionGroup": "acquisition",
|
|
714
|
+
"inputController": {
|
|
715
|
+
"type": "textarea",
|
|
716
|
+
"description": "URL includes",
|
|
717
|
+
"helpText": "Only open when the current URL matches one of these patterns (substring or * wildcard)."
|
|
718
|
+
},
|
|
719
|
+
"visibilityCondition": {
|
|
720
|
+
"dependsOn": "embedTarget",
|
|
721
|
+
"condition": "embedTarget === 'overlay'"
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"name": "utmSourceMatch",
|
|
726
|
+
"type": "string",
|
|
727
|
+
"defaultValue": "",
|
|
728
|
+
"optionGroup": "acquisition",
|
|
729
|
+
"inputController": {
|
|
730
|
+
"type": "text",
|
|
731
|
+
"description": "UTM source",
|
|
732
|
+
"helpText": "utm_source query must contain this text."
|
|
733
|
+
},
|
|
734
|
+
"visibilityCondition": {
|
|
735
|
+
"dependsOn": "embedTarget",
|
|
736
|
+
"condition": "embedTarget === 'overlay'"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "utmMediumMatch",
|
|
741
|
+
"type": "string",
|
|
742
|
+
"defaultValue": "",
|
|
743
|
+
"optionGroup": "acquisition",
|
|
744
|
+
"inputController": {
|
|
745
|
+
"type": "text",
|
|
746
|
+
"description": "UTM medium",
|
|
747
|
+
"helpText": "utm_medium query must contain this text."
|
|
748
|
+
},
|
|
749
|
+
"visibilityCondition": {
|
|
750
|
+
"dependsOn": "embedTarget",
|
|
751
|
+
"condition": "embedTarget === 'overlay'"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "utmCampaignMatch",
|
|
756
|
+
"type": "string",
|
|
757
|
+
"defaultValue": "",
|
|
758
|
+
"optionGroup": "acquisition",
|
|
759
|
+
"inputController": {
|
|
760
|
+
"type": "text",
|
|
761
|
+
"description": "UTM campaign",
|
|
762
|
+
"helpText": "utm_campaign query must contain this text."
|
|
763
|
+
},
|
|
764
|
+
"visibilityCondition": {
|
|
765
|
+
"dependsOn": "embedTarget",
|
|
766
|
+
"condition": "embedTarget === 'overlay'"
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
]
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"name": "View limits",
|
|
773
|
+
"optionGroup": "frequency",
|
|
774
|
+
"properties": [
|
|
775
|
+
{
|
|
776
|
+
"name": "restrictions",
|
|
777
|
+
"type": "boolean",
|
|
778
|
+
"defaultValue": false,
|
|
779
|
+
"inputController": {
|
|
780
|
+
"type": "switch",
|
|
781
|
+
"helpText": "Enable restrictions",
|
|
782
|
+
"description": "Restrictions"
|
|
783
|
+
},
|
|
784
|
+
"optionGroup": "frequency"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"name": "maxViews",
|
|
788
|
+
"type": "number",
|
|
789
|
+
"defaultValue": 10,
|
|
790
|
+
"inputController": {
|
|
791
|
+
"type": "number",
|
|
792
|
+
"helpText": "Set the maximum number of views",
|
|
793
|
+
"description": "Max # of views",
|
|
794
|
+
"config": {
|
|
795
|
+
"min": 1,
|
|
796
|
+
"max": 100000,
|
|
797
|
+
"step": 1
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
"visibilityCondition": {
|
|
801
|
+
"dependsOn": "restrictions",
|
|
802
|
+
"condition": "restrictions === true"
|
|
803
|
+
},
|
|
804
|
+
"optionGroup": "frequency"
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"name": "timePeriod",
|
|
808
|
+
"type": "number",
|
|
809
|
+
"defaultValue": 120,
|
|
810
|
+
"inputController": {
|
|
811
|
+
"type": "number",
|
|
812
|
+
"helpText": "Set the time period in hours",
|
|
813
|
+
"description": "Time period",
|
|
814
|
+
"config": {
|
|
815
|
+
"min": 1,
|
|
816
|
+
"max": 8760,
|
|
817
|
+
"step": 1
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"visibilityCondition": {
|
|
821
|
+
"dependsOn": "restrictions",
|
|
822
|
+
"condition": "restrictions === true"
|
|
823
|
+
},
|
|
824
|
+
"optionGroup": "frequency"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"name": "displayOnMobile",
|
|
828
|
+
"type": "boolean",
|
|
829
|
+
"defaultValue": true,
|
|
830
|
+
"inputController": {
|
|
831
|
+
"type": "switch",
|
|
832
|
+
"helpText": "Display on mobile devices",
|
|
833
|
+
"description": "Display on mobile"
|
|
834
|
+
},
|
|
835
|
+
"visibilityCondition": {
|
|
836
|
+
"dependsOn": "restrictions",
|
|
837
|
+
"condition": "restrictions === true"
|
|
838
|
+
},
|
|
839
|
+
"optionGroup": "frequency"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"name": "displayOnDesktop",
|
|
843
|
+
"type": "boolean",
|
|
844
|
+
"defaultValue": true,
|
|
845
|
+
"inputController": {
|
|
846
|
+
"type": "switch",
|
|
847
|
+
"helpText": "Display on desktop devices",
|
|
848
|
+
"description": "Display on desktop"
|
|
849
|
+
},
|
|
850
|
+
"visibilityCondition": {
|
|
851
|
+
"dependsOn": "restrictions",
|
|
852
|
+
"condition": "restrictions === true"
|
|
853
|
+
},
|
|
854
|
+
"optionGroup": "frequency"
|
|
855
|
+
}
|
|
856
|
+
]
|
|
857
|
+
}
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
"optionGroups": [
|
|
864
|
+
{
|
|
865
|
+
"id": "basic",
|
|
866
|
+
"label": "Basic options",
|
|
867
|
+
"order": 1
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"id": "layout",
|
|
871
|
+
"label": "Layout & overlay",
|
|
872
|
+
"order": 2
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"id": "triggers",
|
|
876
|
+
"label": "Triggers",
|
|
877
|
+
"order": 3
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"id": "excludes",
|
|
881
|
+
"label": "Excludes",
|
|
882
|
+
"order": 4
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"id": "visitors",
|
|
886
|
+
"label": "Visitors",
|
|
887
|
+
"order": 5
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"id": "schedule",
|
|
891
|
+
"label": "Schedule",
|
|
892
|
+
"order": 6
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"id": "acquisition",
|
|
896
|
+
"label": "Acquisition",
|
|
897
|
+
"order": 7
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"id": "frequency",
|
|
901
|
+
"label": "View limits",
|
|
902
|
+
"order": 8
|
|
903
|
+
}
|
|
904
|
+
]
|
|
905
|
+
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* Parses a paste-ready Widgetic composition embed snippet into embed editor settings.
|
|
3
3
|
* Accepts only output from the site `generateCompositionEmbedCode` and the gateway HTML embed generator.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
// The schema is read from this folder, not from static/: the package ships dist/ only, so a path to static/ points outside the
|
|
6
|
+
// installed package and breaks the build of every consumer. embedSchema.json is a copy of static/embed-schema.json that
|
|
7
|
+
// `npm run sync-embed-schema` refreshes (tests/package-imports.test.mjs fails when the two differ).
|
|
8
|
+
import embedSchemaFile from './embedSchema.json';
|
|
6
9
|
const MAX_INPUT_LENGTH = 20_000;
|
|
7
10
|
const ALLOWED_SDK_HOST = 'cdn.widgetic.com';
|
|
8
11
|
const SDK_PATH_SUFFIX = '/sdks/browser/embed-sdk.js';
|
package/dist/i18n/language.d.ts
CHANGED
|
@@ -673,7 +673,7 @@ export declare const ALL_EDITOR_MESSAGES: Readonly<Record<string, string>>;
|
|
|
673
673
|
* the nearest real one), a value that is not text, a template that does not parse, or one that asks for a value the message
|
|
674
674
|
* is never given. An empty list means every message will be used. For a test or a build step of the page.
|
|
675
675
|
*/
|
|
676
|
-
export declare const checkEditorMessages: (messages: import("@widgetic/
|
|
676
|
+
export declare const checkEditorMessages: (messages: import("@widgetic/design-system/i18n").MessageOverrides) => import("@widgetic/design-system/i18n").MessageProblem[];
|
|
677
677
|
/**
|
|
678
678
|
* Called by the root component of an editor while it is created, so everything inside it speaks the page's language.
|
|
679
679
|
* The context belongs to one root component, so two editors on a page can speak two languages.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widgetic/editor",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.21",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"llinks": "ls -la node_modules/@widgetic",
|
|
34
34
|
"stop-dev": "lsof -i :5180 | awk 'NR>1 {print $2}' | xargs kill",
|
|
35
35
|
"dev": "npm run sync-embed-schema && npm run stop-dev && npm run dev-sv",
|
|
36
|
-
"sync-embed-schema": "node ../scripts/sync-embed-schema.mjs",
|
|
36
|
+
"sync-embed-schema": "node ../scripts/sync-embed-schema.mjs && node scripts/copy-embed-schema-into-lib.mjs",
|
|
37
37
|
"dev-sv": "NODE_ENV=development vite dev --port 5180",
|
|
38
38
|
"dev-open": "npm run dev -- --open",
|
|
39
39
|
"render-build": "bash render-build.sh",
|