UNPKG

@aurigma/ui-framework

Version:

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

1 lines 1.51 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 o}),i.d(e,"widget",function(){return o});var e=i(0),s=i(2),n=i(17),d=i(1),i=i(160);let o=class extends i.a{constructor(){super(...arguments),this.selector="#finishButton",this.widgetIsInited=!1,this._subscribed=!1}updateParams(t){void 0!==t.visible&&(this.visible=t.visible),void 0!==t.enabled&&(this.enabled=t.enabled),this._onClick=d.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)}_changeDisable(){this.publishData({selector:this.selector},n.a.GET_ELEMENT_FROM_AU_WIZARD).then(t=>{t&&(void 0!==this.visible&&(t.hidden=!this.visible,t.setAttribute)&&t.setAttribute("data-hidden",t.hidden),void 0!==this.enabled&&(t.enabled=this.enabled),this._subscribed||(t.onFinish.subscribe(async()=>{await this._onClick()}),this._subscribed=!0))})}};Object(e.a)([Object(s.c)(),Object(e.b)("design:type",Object)],o.prototype,"params",void 0),Object(e.a)([Object(s.c)(),Object(e.b)("design:type",String)],o.prototype,"selector",void 0),Object(e.a)([Object(s.c)(),Object(e.b)("design:type",Boolean)],o.prototype,"enabled",void 0),Object(e.a)([Object(s.c)(),Object(e.b)("design:type",Boolean)],o.prototype,"visible",void 0),o=Object(e.a)([Object(s.a)("au-widget-finish-button")],o)}}]);