{"version":3,"sources":["webpack:///./src/pages/FacebookPostSettings/index.vue?1f6d","webpack:///./src/pages/FacebookPostSettings/index.vue","webpack:///./src/pages/FacebookPostSettings/index.vue?52c5","webpack:///./src/pages/FacebookPostSettings/index.vue?8c48","webpack:///../../../src/components/VSwitch/VSwitch.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","requestPayload","on","onSuccess","onLocationChange","model","value","callback","$$v","pulsemAccountId","expression","locationValid","isAutoApprove","isAutoPost","postFrequency","staticRenderFns","post","loadSettings","response","data","status","parseInt","components","AccountIdInput","TechTaskCard","component","VSwitch","VTextField","name","directives","Touch","props","inset","loading","type","Boolean","default","flat","computed","classes","String","role","validationState","hasError","hasColor","switchData","setTextColor","undefined","class","themeClasses","methods","genDefaultSlot","genSwitch","staticClass","genInput","attrs$","genRipple","left","right","onSwipeRight","genProgress","$slots","progress","color","size","width","indeterminate","onSwipeLeft","onChange","onKeydown","e"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,eAAe,CAACE,MAAM,CAAC,YAAY,yBAAyB,MAAQ,yBAAyB,kBAAkBN,EAAIO,gBAAgBC,GAAG,CAAC,YAAYR,EAAIS,YAAY,CAACL,EAAG,iBAAiB,CAACI,GAAG,CAAC,cAAgBR,EAAIU,kBAAkBC,MAAM,CAACC,MAAOZ,EAAmB,gBAAEa,SAAS,SAAUC,GAAMd,EAAIe,gBAAgBD,GAAKE,WAAW,qBAAqBZ,EAAG,WAAW,CAACE,MAAM,CAAC,MAAQ,eAAe,UAAYN,EAAIiB,eAAeN,MAAM,CAACC,MAAOZ,EAAiB,cAAEa,SAAS,SAAUC,GAAMd,EAAIkB,cAAcJ,GAAKE,WAAW,mBAAmBZ,EAAG,WAAW,CAACE,MAAM,CAAC,MAAQ,YAAY,UAAYN,EAAIiB,eAAeN,MAAM,CAACC,MAAOZ,E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vBN,mBA0BFiE,YAlCO,WAmCL,OAAOjE,KAAKE,eAAe,EAApB,QAAwC,EAC5B,IAAjBF,KAAKsC,QAAL,KAEItC,KAAKkE,OAAOC,UAAYnE,KAAKE,eAAe,EAApB,KAAuC,CAC/DkC,MAAO,CACLgC,OAAyB,IAAjBpE,KAAKsC,SAAN,KAA0BtC,KAAKsC,QACjCtC,KAAKoE,OADH,UAEHpE,KAHC,QAILqE,KAJK,GAKLC,MALK,EAMLC,eAAe,QAKzBC,YAlDO,WAmDDxE,KAAJ,UAAmBA,KAAKyE,YAE1BT,aArDO,WAsDAhE,KAAL,UAAoBA,KAAKyE,YAE3BC,UAxDO,SAwDE,IAEJC,EAAA,UAAc,OAAd,MAA+B3E,KAAhC,UACC2E,EAAA,UAAc,OAAd,QAAiC3E,KAFpC,WAGEA,KAAKyE","file":"js/chunk-0a4ced58.d77bd6c8.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('TechTaskCard',{attrs:{\"task-name\":\"facebook-post-settings\",\"title\":\"Facebook Post Settings\",\"request-payload\":_vm.requestPayload},on:{\"on-submit\":_vm.onSuccess}},[_c('AccountIdInput',{on:{\"onStateChange\":_vm.onLocationChange},model:{value:(_vm.pulsemAccountId),callback:function ($$v) {_vm.pulsemAccountId=$$v},expression:\"pulsemAccountId\"}}),_c('v-switch',{attrs:{\"label\":\"Auto Approve\",\"disabled\":!_vm.locationValid},model:{value:(_vm.isAutoApprove),callback:function ($$v) {_vm.isAutoApprove=$$v},expression:\"isAutoApprove\"}}),_c('v-switch',{attrs:{\"label\":\"Auto Post\",\"disabled\":!_vm.locationValid},model:{value:(_vm.isAutoPost),callback:function ($$v) {_vm.isAutoPost=$$v},expression:\"isAutoPost\"}}),_c('v-text-field',{attrs:{\"label\":\"Post Frequency\",\"type\":\"number\",\"suffix\":\"day(s)\",\"disabled\":!_vm.locationValid},model:{value:(_vm.postFrequency),callback:function ($$v) {_vm.postFrequency=$$v},expression:\"postFrequency\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator'\nimport request, { Response } from '@/helpers/requests'\nimport AccountIdInput from '@/components/ui/AccountIdInput.vue'\nimport TechTaskCard from '@/components/ui/TechTaskCard.vue'\n\n\ninterface RequestPayload {\n pulsemAccountId: number|null;\n isAutoApprove: boolean|null;\n isAutoPost: boolean|null;\n postFrequency: string|number|null;\n}\n\n\ninterface ResponsePayload extends Response {\n data: RequestPayload;\n}\n\n\n@Component({\n components: {\n AccountIdInput,\n TechTaskCard\n }\n})\nexport default class FacebookPostSettings extends Vue {\n locationValid = false\n pulsemAccountId: number|null = null\n isAutoApprove: boolean|null = null\n isAutoPost: boolean|null = null\n postFrequency: string|number|null = null\n\n get requestPayload(): RequestPayload {\n return {\n pulsemAccountId: this.pulsemAccountId,\n isAutoApprove: this.isAutoApprove,\n isAutoPost: this.isAutoPost,\n postFrequency: typeof this.postFrequency === 'string' ? parseInt(this.postFrequency) : this.postFrequency\n }\n }\n\n async loadSettings(): Promise {\n return await request.post('/support/facebook-post-settings-load/load', {\n pulsemAccountId: this.pulsemAccountId\n }) as ResponsePayload\n }\n\n async onLocationChange(locationValid: boolean) {\n this.locationValid = locationValid\n if (this.locationValid) {\n const response = await this.loadSettings()\n this.isAutoApprove = response.data.isAutoApprove\n this.isAutoPost = response.data.isAutoPost\n this.postFrequency = response.data.postFrequency\n } else {\n this.isAutoApprove = null\n this.isAutoPost = null\n this.postFrequency = null\n }\n }\n\n onSuccess(status: boolean) {\n if (status) {\n this.pulsemAccountId = null\n this.isAutoApprove = null\n this.isAutoPost = null\n this.postFrequency = null\n }\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=6b266864&\"\nimport script from \"./index.vue?vue&type=script&lang=ts&\"\nexport * from \"./index.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VSwitch } from 'vuetify/lib/components/VSwitch';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VSwitch,VTextField})\n","// Styles\nimport '../../styles/components/_selection-controls.sass'\nimport './VSwitch.sass'\n\n// Mixins\nimport Selectable from '../../mixins/selectable'\nimport VInput from '../VInput'\n\n// Directives\nimport Touch from '../../directives/touch'\n\n// Components\nimport { VFabTransition } from '../transitions'\nimport VProgressCircular from '../VProgressCircular/VProgressCircular'\n\n// Helpers\nimport { keyCodes } from '../../util/helpers'\n\n// Types\nimport { VNode, VNodeData } from 'vue'\n\n/* @vue/component */\nexport default Selectable.extend({\n name: 'v-switch',\n\n directives: { Touch },\n\n props: {\n inset: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n flat: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n classes (): object {\n return {\n ...VInput.options.computed.classes.call(this),\n 'v-input--selection-controls v-input--switch': true,\n 'v-input--switch--flat': this.flat,\n 'v-input--switch--inset': this.inset,\n }\n },\n attrs (): object {\n return {\n 'aria-checked': String(this.isActive),\n 'aria-disabled': String(this.isDisabled),\n role: 'switch',\n }\n },\n // Do not return undefined if disabled,\n // according to spec, should still show\n // a color when disabled and active\n validationState (): string | undefined {\n if (this.hasError && this.shouldValidate) return 'error'\n if (this.hasSuccess) return 'success'\n if (this.hasColor !== null) return this.computedColor\n return undefined\n },\n switchData (): VNodeData {\n return this.setTextColor(this.loading ? undefined : this.validationState, {\n class: this.themeClasses,\n })\n },\n },\n\n methods: {\n genDefaultSlot (): (VNode | null)[] {\n return [\n this.genSwitch(),\n this.genLabel(),\n ]\n },\n genSwitch (): VNode {\n return this.$createElement('div', {\n staticClass: 'v-input--selection-controls__input',\n }, [\n this.genInput('checkbox', {\n ...this.attrs,\n ...this.attrs$,\n }),\n this.genRipple(this.setTextColor(this.validationState, {\n directives: [{\n name: 'touch',\n value: {\n left: this.onSwipeLeft,\n right: this.onSwipeRight,\n },\n }],\n })),\n this.$createElement('div', {\n staticClass: 'v-input--switch__track',\n ...this.switchData,\n }),\n this.$createElement('div', {\n staticClass: 'v-input--switch__thumb',\n ...this.switchData,\n }, [this.genProgress()]),\n ])\n },\n genProgress (): VNode {\n return this.$createElement(VFabTransition, {}, [\n this.loading === false\n ? null\n : this.$slots.progress || this.$createElement(VProgressCircular, {\n props: {\n color: (this.loading === true || this.loading === '')\n ? (this.color || 'primary')\n : this.loading,\n size: 16,\n width: 2,\n indeterminate: true,\n },\n }),\n ])\n },\n onSwipeLeft () {\n if (this.isActive) this.onChange()\n },\n onSwipeRight () {\n if (!this.isActive) this.onChange()\n },\n onKeydown (e: KeyboardEvent) {\n if (\n (e.keyCode === keyCodes.left && this.isActive) ||\n (e.keyCode === keyCodes.right && !this.isActive)\n ) this.onChange()\n },\n },\n})\n"],"sourceRoot":""}