UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

1 lines 1.73 kB
(window.multistep_editor_jsonpFunction=window.multistep_editor_jsonpFunction||[]).push([[26],{899:function(t,e,i){i.r(e),i.d(e,"AuWidgetFinishButton",function(){return d}),i.d(e,"widget",function(){return d});var n,s=i(0),e=i(2),o=i(17),c=i(1),i=i(160),d=(n=i.a,Object(s.d)(b,n),b.prototype.updateParams=function(t){void 0!==t.visible&&(this.visible=t.visible),void 0!==t.enabled&&(this.enabled=t.enabled),this._onClick=c.a.functionWrapperConstructor(t.onClick),this.auWizard._showDefaultTopBar&&this._changeDisable(),this.widgetIsInited||(console.warn("'finish-button' widget is deprecated, use 'steps' widget instead."),this.widgetIsInited=!0)},b.prototype._changeDisable=function(){var e=this;this.publishData({selector:this.selector},o.a.GET_ELEMENT_FROM_AU_WIZARD).then(function(t){t&&(void 0!==e.visible&&(t.hidden=!e.visible,t.setAttribute)&&t.setAttribute("data-hidden",t.hidden),void 0!==e.enabled&&(t.enabled=e.enabled),e._subscribed||(t.onFinish.subscribe(function(){return Object(s.b)(e,void 0,void 0,function(){return Object(s.e)(this,function(t){switch(t.label){case 0:return[4,this._onClick()];case 1:return t.sent(),[2]}})})}),e._subscribed=!0))})},Object(s.c)([Object(e.c)(),Object(s.g)("design:type",Object)],b.prototype,"params",void 0),Object(s.c)([Object(e.c)(),Object(s.g)("design:type",String)],b.prototype,"selector",void 0),Object(s.c)([Object(e.c)(),Object(s.g)("design:type",Boolean)],b.prototype,"enabled",void 0),Object(s.c)([Object(e.c)(),Object(s.g)("design:type",Boolean)],b.prototype,"visible",void 0),Object(s.c)([Object(e.a)("au-widget-finish-button")],b));function b(){var t=null!==n&&n.apply(this,arguments)||this;return t.selector="#finishButton",t.widgetIsInited=!1,t._subscribed=!1,t}}}]);