Skip to content

Instantly share code, notes, and snippets.

@guidone
Created June 3, 2020 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guidone/be3d57ece22d366908e45b53b6478915 to your computer and use it in GitHub Desktop.
Save guidone/be3d57ece22d366908e45b53b6478915 to your computer and use it in GitHub Desktop.
define(["../../../src/components","../../src/components","code-plug","react","rsuite"],(e,t,n,l,o)=>(()=>{"use strict";var r={849:(e,t,n)=>{n.r(t);var l=n(297),o=n.n(l),r=n(399),a=n(186),c=n(222),s=n(738);const{NodeRedNode:u,SlugHelp:i,TypeCommand:m}=a.HelpElements;(0,r.plug)("sidebar",null,{permission:"configure",id:"configuration",label:"Configuration",icon:"cog",options:[{id:"welcome-message",label:"Welcome Message",url:"/welcome"}]}),(0,r.plug)("pages",(0,a.withConfigurationPage)("survey",({value:e,onSubmit:t=(()=>{}),disabled:n=!1})=>{const[r,a]=(0,l.useState)(e),[u,i]=(0,l.useState)(null),m=(0,l.useRef)(null);return o().createElement("div",null,o().createElement(c.Form,{disabled:!0,formValue:r,formError:u,ref:m,checkTrigger:"none",layout:"vertical",fluid:!0,onChange:e=>{a(e),i(null)},onCheck:e=>{i(e)}},o().createElement(l.Fragment,null,o().createElement(c.FormGroup,null,o().createElement(c.ControlLabel,null,"Welcome message",o().createElement(c.HelpBlock,{tooltip:!0},"Select the content to show when the user joins the chatbot")),o().createElement(c.FormControl,{name:"page",accepter:s.ContentAutocomplete,useSlug:!0,disabled:n}))),o().createElement(c.FormGroup,{style:{marginTop:"40px"}},o().createElement(c.ButtonToolbar,null,o().createElement(c.Button,{disabled:n,appearance:"primary",onClick:()=>{m.current.check()&&t(r)}},"Save configuration"),o().createElement(c.Button,{disabled:n,appearance:"default",onClick:()=>{confirm("Reset configuration?")&&a(e)}},"Reset")))))},{Legend:()=>o().createElement("div",null,o().createElement(u,null,"New User"),o().createElement("p",null,"Select the message to show when a new user joins the chatbot by selecting a ",o().createElement("em",null,"slug")," from the ",o().createElement("strong",null,"Content")," section."),o().createElement(i,null),o().createElement("p",null,"To test message type ",o().createElement(m,null,"/start")," in the chatbot")),title:"Welcome message"}),{permission:"configure",url:"/welcome",title:"Welcome Message",id:"page-welcome-message"})},738:t=>{t.exports=e},186:e=>{e.exports=t},399:e=>{e.exports=n},297:e=>{e.exports=l},222:e=>{e.exports=o}},a={};function c(e){if(a[e])return a[e].exports;var t=a[e]={exports:{}};return r[e](t,t.exports,c),t.exports}return c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c(849)})());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment