@inappstory/slide-api 0.0.28 → 0.0.30
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/dist/index.cjs +73 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +73 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -4
package/dist/index.cjs
CHANGED
|
@@ -1236,7 +1236,6 @@ class WidgetBase {
|
|
|
1236
1236
|
showWidgetCompleteToast = null;
|
|
1237
1237
|
submitButtonAnimatedView = null;
|
|
1238
1238
|
submitButtonView = null;
|
|
1239
|
-
submitButtonViewHeight = 0;
|
|
1240
1239
|
savedData = null;
|
|
1241
1240
|
localData = null;
|
|
1242
1241
|
firstOpenTime = 0;
|
|
@@ -1285,9 +1284,6 @@ class WidgetBase {
|
|
|
1285
1284
|
this.submitButtonAnimatedView = this.element.querySelector(".submit-button-animated-view");
|
|
1286
1285
|
if (this.submitButtonAnimatedView != null) {
|
|
1287
1286
|
this.submitButtonView = this.submitButtonAnimatedView.querySelector(".submit-button-view");
|
|
1288
|
-
if (this.submitButtonView != null) {
|
|
1289
|
-
this.submitButtonViewHeight = this.submitButtonView.clientHeight;
|
|
1290
|
-
}
|
|
1291
1287
|
}
|
|
1292
1288
|
}
|
|
1293
1289
|
this.savedData = this.sdkApi.getCardServerData(this.cardId);
|
|
@@ -1296,6 +1292,12 @@ class WidgetBase {
|
|
|
1296
1292
|
++WidgetBase.widgetIndex;
|
|
1297
1293
|
this.resetStartReadyPromise();
|
|
1298
1294
|
}
|
|
1295
|
+
get submitButtonViewHeight() {
|
|
1296
|
+
if (this.submitButtonView != null) {
|
|
1297
|
+
return this.submitButtonView.clientHeight;
|
|
1298
|
+
}
|
|
1299
|
+
return 0;
|
|
1300
|
+
}
|
|
1299
1301
|
resetStartReadyPromise() {
|
|
1300
1302
|
this.startReadyPromise = new Promise(resolve => {
|
|
1301
1303
|
this.startReadyResolve = resolve;
|
|
@@ -1797,8 +1799,9 @@ class WidgetCopy extends WidgetBase {
|
|
|
1797
1799
|
initWidget: function (nodeList, localData) {
|
|
1798
1800
|
// prevent initWidget for result layer
|
|
1799
1801
|
const elements = slice.call(nodeList).filter(element => !element.classList.contains("narrative-element-copy-result-variant"));
|
|
1800
|
-
WidgetCopy.initWidgets((element, options) => new WidgetCopy(element, options), elements, localData)
|
|
1801
|
-
|
|
1802
|
+
WidgetCopy.initWidgets((element, options) => new WidgetCopy(element, options), elements, localData).then(() => {
|
|
1803
|
+
elements.forEach(element => WidgetCopy.getInstance(element)?.onStart());
|
|
1804
|
+
});
|
|
1802
1805
|
},
|
|
1803
1806
|
onStart: function (element) {
|
|
1804
1807
|
WidgetCopy.getInstance(element)?.onStart();
|
|
@@ -2003,8 +2006,9 @@ class WidgetDataInput extends WidgetBase {
|
|
|
2003
2006
|
/** @deprecated */
|
|
2004
2007
|
initWidget: function (nodeList, localData) {
|
|
2005
2008
|
const elements = slice.call(nodeList);
|
|
2006
|
-
WidgetDataInput.initWidgets((element, options) => new WidgetDataInput(element, options), slice.call(nodeList), localData)
|
|
2007
|
-
|
|
2009
|
+
WidgetDataInput.initWidgets((element, options) => new WidgetDataInput(element, options), slice.call(nodeList), localData).then(() => {
|
|
2010
|
+
elements.forEach(element => WidgetDataInput.getInstance(element)?.onStart());
|
|
2011
|
+
});
|
|
2008
2012
|
},
|
|
2009
2013
|
onStart: function (element) {
|
|
2010
2014
|
WidgetDataInput.getInstance(element)?.onStart();
|
|
@@ -2241,8 +2245,9 @@ class WidgetDateCountdown extends WidgetBase {
|
|
|
2241
2245
|
/** @deprecated */
|
|
2242
2246
|
initWidget: function (nodeList, layers, localData) {
|
|
2243
2247
|
const elements = slice.call(nodeList);
|
|
2244
|
-
WidgetDateCountdown.initWidgets((element, options) => new WidgetDateCountdown(element, { ...options, layers }), elements, localData)
|
|
2245
|
-
|
|
2248
|
+
WidgetDateCountdown.initWidgets((element, options) => new WidgetDateCountdown(element, { ...options, layers }), elements, localData).then(() => {
|
|
2249
|
+
elements.forEach(element => WidgetDateCountdown.getInstance(element)?.onStart());
|
|
2250
|
+
});
|
|
2246
2251
|
},
|
|
2247
2252
|
onStart: function (element) {
|
|
2248
2253
|
WidgetDateCountdown.getInstance(element)?.onStart();
|
|
@@ -2890,8 +2895,9 @@ class WidgetPoll extends WidgetBase {
|
|
|
2890
2895
|
},
|
|
2891
2896
|
/** @deprecated */
|
|
2892
2897
|
initWidget: function (element, localData) {
|
|
2893
|
-
WidgetPoll.initWidgets((element, options) => new WidgetPoll(element, options), [element], localData)
|
|
2894
|
-
|
|
2898
|
+
WidgetPoll.initWidgets((element, options) => new WidgetPoll(element, options), [element], localData).then(() => {
|
|
2899
|
+
WidgetPoll.getInstance(element)?.onStart();
|
|
2900
|
+
});
|
|
2895
2901
|
},
|
|
2896
2902
|
onStart: function (element) {
|
|
2897
2903
|
WidgetPoll.getInstance(element)?.onStart();
|
|
@@ -3085,8 +3091,9 @@ class WidgetPollLayers extends WidgetBase {
|
|
|
3085
3091
|
layers = localData;
|
|
3086
3092
|
localData = undefined;
|
|
3087
3093
|
}
|
|
3088
|
-
WidgetPollLayers.initWidgets((element, options) => new WidgetPollLayers(element, { ...options, layers }), [element], localData)
|
|
3089
|
-
|
|
3094
|
+
WidgetPollLayers.initWidgets((element, options) => new WidgetPollLayers(element, { ...options, layers }), [element], localData).then(() => {
|
|
3095
|
+
WidgetPollLayers.getInstance(element)?.onStart();
|
|
3096
|
+
});
|
|
3090
3097
|
},
|
|
3091
3098
|
onStart: function (element) {
|
|
3092
3099
|
WidgetPollLayers.getInstance(element)?.onStart();
|
|
@@ -3403,13 +3410,14 @@ class WidgetQuest extends WidgetBase {
|
|
|
3403
3410
|
WidgetQuest.initWidgets((element, options) => new WidgetQuest(element, options), [element], localData).then(localData => {
|
|
3404
3411
|
const widget = WidgetQuest.getInstance(element);
|
|
3405
3412
|
if (widget) {
|
|
3406
|
-
|
|
3413
|
+
const result = widget.init();
|
|
3414
|
+
widget.onStart();
|
|
3415
|
+
resolve(result);
|
|
3407
3416
|
}
|
|
3408
3417
|
else {
|
|
3409
3418
|
resolve(true);
|
|
3410
3419
|
}
|
|
3411
3420
|
});
|
|
3412
|
-
WidgetQuest.getInstance(element)?.onStart();
|
|
3413
3421
|
});
|
|
3414
3422
|
},
|
|
3415
3423
|
onStart: function (element) {
|
|
@@ -3500,7 +3508,7 @@ class WidgetQuiz extends WidgetBase {
|
|
|
3500
3508
|
this.localData["_q_g_" + this.elementId + "_sa"] = index;
|
|
3501
3509
|
this.element.classList.add("done");
|
|
3502
3510
|
this.env.requestAnimationFrame(() => {
|
|
3503
|
-
if (this.submitButtonAnimatedView != null
|
|
3511
|
+
if (this.submitButtonAnimatedView != null) {
|
|
3504
3512
|
this.submitButtonAnimatedView.style.maxHeight = `${this.submitButtonViewHeight}px`;
|
|
3505
3513
|
}
|
|
3506
3514
|
});
|
|
@@ -3613,8 +3621,9 @@ class WidgetQuiz extends WidgetBase {
|
|
|
3613
3621
|
},
|
|
3614
3622
|
/** @deprecated */
|
|
3615
3623
|
initWidget: function (element, localData) {
|
|
3616
|
-
WidgetQuiz.initWidgets((element, options) => new WidgetQuiz(element, options), [element], localData)
|
|
3617
|
-
|
|
3624
|
+
WidgetQuiz.initWidgets((element, options) => new WidgetQuiz(element, options), [element], localData).then(() => {
|
|
3625
|
+
WidgetQuiz.getInstance(element)?.onStart();
|
|
3626
|
+
});
|
|
3618
3627
|
},
|
|
3619
3628
|
onStart: function (element) {
|
|
3620
3629
|
WidgetQuiz.getInstance(element)?.onStart();
|
|
@@ -3700,8 +3709,8 @@ class WidgetQuizGrouped extends WidgetBase {
|
|
|
3700
3709
|
this.localData["_q_gg_" + this.elementId + "_sa"] = index;
|
|
3701
3710
|
this.element.classList.add("done");
|
|
3702
3711
|
this.env.requestAnimationFrame(() => {
|
|
3703
|
-
if (this.submitButtonAnimatedView != null
|
|
3704
|
-
this.submitButtonAnimatedView.style.maxHeight = this.submitButtonViewHeight
|
|
3712
|
+
if (this.submitButtonAnimatedView != null) {
|
|
3713
|
+
this.submitButtonAnimatedView.style.maxHeight = `${this.submitButtonViewHeight}px`;
|
|
3705
3714
|
}
|
|
3706
3715
|
});
|
|
3707
3716
|
this.startReadyPromise.then(() => {
|
|
@@ -3823,8 +3832,9 @@ class WidgetQuizGrouped extends WidgetBase {
|
|
|
3823
3832
|
},
|
|
3824
3833
|
/** @deprecated */
|
|
3825
3834
|
initWidget: function (element, localData) {
|
|
3826
|
-
WidgetQuizGrouped.initWidgets((element, options) => new WidgetQuizGrouped(element, options), [element], localData)
|
|
3827
|
-
|
|
3835
|
+
WidgetQuizGrouped.initWidgets((element, options) => new WidgetQuizGrouped(element, options), [element], localData).then(() => {
|
|
3836
|
+
WidgetQuizGrouped.getInstance(element)?.onStart();
|
|
3837
|
+
});
|
|
3828
3838
|
},
|
|
3829
3839
|
onStart: function (element) {
|
|
3830
3840
|
WidgetQuizGrouped.getInstance(element)?.onStart();
|
|
@@ -3981,6 +3991,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
3981
3991
|
create: false,
|
|
3982
3992
|
localData: {},
|
|
3983
3993
|
rangeClass: "slider-view",
|
|
3994
|
+
rangeBackgroundClass: "slider-background-view",
|
|
3984
3995
|
activeClass: "rangeslider--active",
|
|
3985
3996
|
horizontalClass: "rangeslider--horizontal",
|
|
3986
3997
|
verticalClass: "rangeslider--vertical",
|
|
@@ -4006,6 +4017,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4006
4017
|
fill;
|
|
4007
4018
|
handle;
|
|
4008
4019
|
range;
|
|
4020
|
+
rangeBgView;
|
|
4009
4021
|
DIMENSION;
|
|
4010
4022
|
DIRECTION;
|
|
4011
4023
|
DIRECTION_STYLE;
|
|
@@ -4048,11 +4060,14 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4048
4060
|
this.handle = getValueOrException(this.element.querySelector(`.${this.options.handleClass}`), `Empty .${this.options.handleClass}`);
|
|
4049
4061
|
this.range = getValueOrException(this.element.querySelector(`.${this.options.rangeClass}`), `Empty .${this.options.rangeClass}`);
|
|
4050
4062
|
this.range.id = this.id;
|
|
4063
|
+
this.rangeBgView = getValueOrException(this.element.querySelector(`.${this.options.rangeBackgroundClass}`), `Empty .${this.options.rangeBackgroundClass}`);
|
|
4051
4064
|
// if (this.range.classList.contains(this.options['horizontalClass'])) {
|
|
4052
4065
|
this.orientation = "horizontal";
|
|
4053
4066
|
// } else if (this.range.classList.contains(this.options['verticalClass'])) {
|
|
4054
4067
|
// this.orientation = 'vertical';
|
|
4055
4068
|
// }
|
|
4069
|
+
// enable expanded tap area (disabled by default for backward compatibility)
|
|
4070
|
+
this.element.classList.add("width-expanded-slider-tap-area");
|
|
4056
4071
|
this.DIMENSION = constants.orientation[this.orientation].dimension;
|
|
4057
4072
|
this.DIRECTION = constants.orientation[this.orientation].direction;
|
|
4058
4073
|
this.DIRECTION_STYLE = constants.orientation[this.orientation].directionStyle[this.layoutDirection];
|
|
@@ -4255,8 +4270,9 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4255
4270
|
this.step = tryParseFloat(this.elementSlider.getAttribute("step"), 1);
|
|
4256
4271
|
}
|
|
4257
4272
|
this.handleDimension = getDimension(this.handle, ("offset" + ucfirst(this.DIMENSION)));
|
|
4258
|
-
this.rangeDimension = getDimension(this.
|
|
4259
|
-
this.maxHandlePos = this.rangeDimension - this.handleDimension;
|
|
4273
|
+
this.rangeDimension = getDimension(this.rangeBgView, ("offset" + ucfirst(this.DIMENSION)));
|
|
4274
|
+
// this.maxHandlePos = this.rangeDimension - this.handleDimension;
|
|
4275
|
+
this.maxHandlePos = this.rangeDimension;
|
|
4260
4276
|
this.grabPos = this.handleDimension / 2;
|
|
4261
4277
|
this.position = this.getPositionFromValue(this.value);
|
|
4262
4278
|
if (updateAttributes) {
|
|
@@ -4295,7 +4311,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4295
4311
|
if ((" " + e.target.className + " ").replace(/[\n\t]/g, " ").indexOf(this.options.handleClass) > -1) {
|
|
4296
4312
|
return;
|
|
4297
4313
|
}
|
|
4298
|
-
const pos = this.getRelativePosition(e), rangePos = this.
|
|
4314
|
+
const pos = this.getRelativePosition(e), rangePos = this.rangeBgView.getBoundingClientRect()[this.DIRECTION], handlePos = this.getPositionFromNode(this.handle) - rangePos, setPos = this.orientation === "vertical" ? this.maxHandlePos - (pos - this.grabPos) : pos - this.grabPos;
|
|
4299
4315
|
this.setPosition(setPos);
|
|
4300
4316
|
if (pos >= handlePos && pos < handlePos + this.handleDimension) {
|
|
4301
4317
|
this.grabPos = pos - handlePos;
|
|
@@ -4323,8 +4339,8 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4323
4339
|
}
|
|
4324
4340
|
else {
|
|
4325
4341
|
this.env.requestAnimationFrame(() => {
|
|
4326
|
-
if (this.submitButtonAnimatedView != null
|
|
4327
|
-
this.submitButtonAnimatedView.style.maxHeight = this.submitButtonViewHeight
|
|
4342
|
+
if (this.submitButtonAnimatedView != null) {
|
|
4343
|
+
this.submitButtonAnimatedView.style.maxHeight = `${this.submitButtonViewHeight}px`;
|
|
4328
4344
|
}
|
|
4329
4345
|
});
|
|
4330
4346
|
}
|
|
@@ -4352,11 +4368,14 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4352
4368
|
uiPos = this.maxHandlePos - uiPos;
|
|
4353
4369
|
}
|
|
4354
4370
|
// this.rangeDimension - slider width
|
|
4355
|
-
this.fill.style.transform = "translateX(" + (uiPos
|
|
4371
|
+
this.fill.style.transform = "translateX(" + (uiPos - this.rangeDimension) + "px)";
|
|
4372
|
+
// this.fill.style.transform = "translateX(" + (uiPos + this.grabPos - this.rangeDimension) + "px)";
|
|
4356
4373
|
// this.fill.style[this.DIMENSION] = (uiPos + this.grabPos) + 'px';
|
|
4357
4374
|
const percentage = this.getPercentageFromValue(value);
|
|
4358
4375
|
// 1 + (scale - 1) * percentage
|
|
4359
|
-
this.handle.style.
|
|
4376
|
+
this.handle.style.setProperty("--offset", String(uiPos));
|
|
4377
|
+
this.handle.style.setProperty("--percentage", String(percentage));
|
|
4378
|
+
// this.handle.style.transform = "translateY(-50%) translateX(" + uiPos + "px) scale(calc(1 + (var(--scale-factor, 1) - 1) * " + percentage + "))";
|
|
4360
4379
|
// this.handle.style[this.DIRECTION_STYLE] = uiPos + 'px';
|
|
4361
4380
|
this.setValue(value);
|
|
4362
4381
|
// Update globals
|
|
@@ -4467,8 +4486,9 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
4467
4486
|
},
|
|
4468
4487
|
/** @deprecated */
|
|
4469
4488
|
initWidget: function (element, localData) {
|
|
4470
|
-
WidgetRangeSlider.initWidgets((element, options) => new WidgetRangeSlider(element, options), [element], localData)
|
|
4471
|
-
|
|
4489
|
+
WidgetRangeSlider.initWidgets((element, options) => new WidgetRangeSlider(element, options), [element], localData).then(() => {
|
|
4490
|
+
WidgetRangeSlider.getInstance(element)?.onStart();
|
|
4491
|
+
});
|
|
4472
4492
|
},
|
|
4473
4493
|
onStart: function (element) {
|
|
4474
4494
|
WidgetRangeSlider.getInstance(element)?.onStart();
|
|
@@ -4732,8 +4752,9 @@ class WidgetRate extends WidgetBase {
|
|
|
4732
4752
|
/** @deprecated */
|
|
4733
4753
|
initWidget: function (nodeList, localData) {
|
|
4734
4754
|
const elements = slice.call(nodeList);
|
|
4735
|
-
WidgetRate.initWidgets((element, options) => new WidgetRate(element, options), elements, localData)
|
|
4736
|
-
|
|
4755
|
+
WidgetRate.initWidgets((element, options) => new WidgetRate(element, options), elements, localData).then(() => {
|
|
4756
|
+
elements.forEach(element => WidgetRate.getInstance(element)?.onStart());
|
|
4757
|
+
});
|
|
4737
4758
|
},
|
|
4738
4759
|
onStart: function (element) {
|
|
4739
4760
|
WidgetRate.getInstance(element)?.onStart();
|
|
@@ -4893,8 +4914,9 @@ class WidgetShare extends WidgetBase {
|
|
|
4893
4914
|
localData = undefined;
|
|
4894
4915
|
}
|
|
4895
4916
|
const elements = slice.call(nodeList);
|
|
4896
|
-
WidgetShare.initWidgets((element, options) => new WidgetShare(element, { ...options, layers }), elements, localData)
|
|
4897
|
-
|
|
4917
|
+
WidgetShare.initWidgets((element, options) => new WidgetShare(element, { ...options, layers }), elements, localData).then(() => {
|
|
4918
|
+
elements.forEach(element => WidgetShare.getInstance(element)?.onStart());
|
|
4919
|
+
});
|
|
4898
4920
|
},
|
|
4899
4921
|
onStart: function (element) {
|
|
4900
4922
|
WidgetShare.getInstance(element)?.onStart();
|
|
@@ -5090,8 +5112,8 @@ class WidgetTest extends WidgetBase {
|
|
|
5090
5112
|
this.localData["_t_g_" + this.elementId + "_sa"] = index;
|
|
5091
5113
|
this.element.classList.add("done");
|
|
5092
5114
|
this.env.requestAnimationFrame(() => {
|
|
5093
|
-
if (this.submitButtonAnimatedView != null
|
|
5094
|
-
this.submitButtonAnimatedView.style.maxHeight = this.submitButtonViewHeight
|
|
5115
|
+
if (this.submitButtonAnimatedView != null) {
|
|
5116
|
+
this.submitButtonAnimatedView.style.maxHeight = `${this.submitButtonViewHeight}px`;
|
|
5095
5117
|
}
|
|
5096
5118
|
});
|
|
5097
5119
|
this.startReadyPromise.then(() => {
|
|
@@ -5176,8 +5198,9 @@ class WidgetTest extends WidgetBase {
|
|
|
5176
5198
|
},
|
|
5177
5199
|
/** @deprecated */
|
|
5178
5200
|
initWidget: function (element, localData) {
|
|
5179
|
-
WidgetTest.initWidgets((element, options) => new WidgetTest(element, options), [element], localData)
|
|
5180
|
-
|
|
5201
|
+
WidgetTest.initWidgets((element, options) => new WidgetTest(element, options), [element], localData).then(() => {
|
|
5202
|
+
WidgetTest.getInstance(element)?.onStart();
|
|
5203
|
+
});
|
|
5181
5204
|
},
|
|
5182
5205
|
onStart: function (element) {
|
|
5183
5206
|
WidgetTest.getInstance(element)?.onStart();
|
|
@@ -5431,8 +5454,8 @@ class WidgetVote extends WidgetBase {
|
|
|
5431
5454
|
}
|
|
5432
5455
|
_showSubmitBtn() {
|
|
5433
5456
|
this.env.requestAnimationFrame(() => {
|
|
5434
|
-
if (this.submitButtonAnimatedView != null
|
|
5435
|
-
this.submitButtonAnimatedView.style.maxHeight = this.submitButtonViewHeight
|
|
5457
|
+
if (this.submitButtonAnimatedView != null) {
|
|
5458
|
+
this.submitButtonAnimatedView.style.maxHeight = `${this.submitButtonViewHeight}px`;
|
|
5436
5459
|
}
|
|
5437
5460
|
});
|
|
5438
5461
|
}
|
|
@@ -5655,10 +5678,13 @@ class WidgetVote extends WidgetBase {
|
|
|
5655
5678
|
},
|
|
5656
5679
|
/** @deprecated */
|
|
5657
5680
|
initWidget: function (element, localData) {
|
|
5658
|
-
WidgetVote.initWidgets((element, options) => new WidgetVote(element, options), [element], localData)
|
|
5681
|
+
WidgetVote.initWidgets((element, options) => new WidgetVote(element, options), [element], localData)
|
|
5682
|
+
.then(localData => {
|
|
5659
5683
|
WidgetVote.api.fallbackInitOnMultiSlide(element, localData);
|
|
5684
|
+
})
|
|
5685
|
+
.then(() => {
|
|
5686
|
+
WidgetVote.getInstance(element)?.onStart();
|
|
5660
5687
|
});
|
|
5661
|
-
WidgetVote.getInstance(element)?.onStart();
|
|
5662
5688
|
},
|
|
5663
5689
|
onStart: function (element) {
|
|
5664
5690
|
WidgetVote.getInstance(element)?.onStart();
|
|
@@ -15331,8 +15357,9 @@ class WidgetBarcode extends WidgetBase {
|
|
|
15331
15357
|
/** @deprecated */
|
|
15332
15358
|
initWidget: function (nodeList, localData) {
|
|
15333
15359
|
const elements = slice.call(nodeList);
|
|
15334
|
-
WidgetBarcode.initWidgets((element, options) => new WidgetBarcode(element, options), elements, localData)
|
|
15335
|
-
|
|
15360
|
+
WidgetBarcode.initWidgets((element, options) => new WidgetBarcode(element, options), elements, localData).then(() => {
|
|
15361
|
+
elements.forEach(element => WidgetBarcode.getInstance(element)?.onStart());
|
|
15362
|
+
});
|
|
15336
15363
|
},
|
|
15337
15364
|
onStart: function (element) {
|
|
15338
15365
|
WidgetBarcode.getInstance(element)?.onStart();
|