UNPKG

@aurigma/ui-framework

Version:

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

1 lines 2.94 kB
(window.multistep_editor_jsonpFunction=window.multistep_editor_jsonpFunction||[]).push([[19],{826:function(e,t){e.exports='<style>\n :host {\n display: var(--au-widget-display, inherit);\n }\n\n .text {\n user-select: none;\n @apply --au-body1-font;\n }\n\n paper-checkbox {\n --paper-checkbox-checked-color: var(--theme-primary-color);\n --paper-checkbox-unchecked-color: var(--checkbox-unchecked-color);\n --paper-checkbox-vertical-align: top;\n --paper-checkbox-margin: 1px 0 0 0;\n display: flex;\n }\n</style>\n\n<paper-checkbox noink type="value" checked="{{value}}" disabled$="{{!enable}}">\n <span noink class="text">\n [[prompt]]\n </span>\n</paper-checkbox>'},898:function(e,t,n){n.r(t),n.d(t,"AuWidgetCheckbox",function(){return p}),n.d(t,"widget",function(){return p});var o,i=n(0),t=n(826),a=n(160),c=n(2),r=n(1),p=(o=a.b,Object(i.d)(s,o),s.prototype.valueChanged=function(){this._isRestoring||(this.emitChange({value:this.value}),this._onChange&&this._onChange(this.value))},s.prototype.exportWidgetData=function(e){return Object(i.b)(this,void 0,void 0,function(){return Object(i.e)(this,function(e){return[2,{value:this.value}]})})},s.prototype.restoreWidgetFromData=function(t,e){return Object(i.b)(this,void 0,void 0,function(){return Object(i.e)(this,function(e){return t&&this.value!==t.value&&(this._isRestoring=!0,this.value=t.value),this._isRestoring=!1,[2]})})},Object.defineProperty(s.prototype,"_",{get:function(){return this.value},enumerable:!1,configurable:!0}),s.prototype.clearSelection=function(){this.value=!1},s.prototype.updateParams=function(e){var t=this;this.prompt=e.prompt,this.value=(r.a.isNotNullOrUndefined(e.value)?e:this).value,this.enable=!r.a.isNotNullOrUndefined(e.enabled)||e.enabled,this.autoReset=(r.a.isNotNullOrUndefined(e.autoReset)?e:this).autoReset,this._onChange=r.a.isNotNullOrUndefined(e.onChange)?r.a.functionWrapperConstructor(Array.isArray(e.onChange)?e.onChange:[e.onChange]):null,this.onWidgetDisplay=function(){t.autoReset&&t.clearSelection()}},Object(i.c)([Object(c.c)(),Object(i.g)("design:type",Object)],s.prototype,"params",void 0),Object(i.c)([Object(c.c)(),Object(i.g)("design:type",Boolean)],s.prototype,"enable",void 0),Object(i.c)([Object(c.c)(),Object(i.g)("design:type",String)],s.prototype,"prompt",void 0),Object(i.c)([Object(c.c)(),Object(i.g)("design:type",Boolean)],s.prototype,"value",void 0),Object(i.c)([Object(c.c)(),Object(i.g)("design:type",Boolean)],s.prototype,"autoReset",void 0),Object(i.c)([Object(c.b)("value"),Object(i.g)("design:type",Function),Object(i.g)("design:paramtypes",[]),Object(i.g)("design:returntype",void 0)],s.prototype,"valueChanged",null),Object(i.c)([Object(c.a)("au-widget-checkbox",t)],s));function s(){var e=null!==o&&o.apply(this,arguments)||this;return e.enable=!0,e.value=!1,e.autoReset=!1,e._isRestoring=!1,e._onChange=null,e}}}]);