{"version":3,"sources":["webpack:///./src/components/NewBucketForm.vue?346d","webpack:///./src/components/BucketFormDraggable.vue?3bf4","webpack:///./src/components/BucketFormDraggable.vue","webpack:///./src/components/BucketFormDraggable.vue?08f2","webpack:///./src/components/BucketFormDraggable.vue?d5ff","webpack:///./src/components/NewBucketForm.vue","webpack:///./src/components/NewBucketForm.vue?022d","webpack:///./src/components/NewBucketForm.vue?5fdc","webpack:///./src/components/NewBucketForm.vue?8a5b"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","disableDrag","childPayload","on","dropped","colors","Object","assign","defaultGroup","name","_l","bucket","i","key","color","pickerDisplay","group","pickerColor","closePicker","closePickerBuffer","$event","onGroupSelected","remove","setColorBuffer","setColor","loading","bucketLimitReached","add","_v","save","staticRenderFns","staticStyle","disableActions","scopedSlots","_u","fn","proxy","data","item","toProperCase","model","value","callback","$$v","tempPickerColor","expression","directives","rawName","arg","idx","$emit","_e","ref","Vue","extend","components","Draggable","GroupSelector","props","type","String","required","Array","Boolean","default","displayPicker","Number","computed","get","set","val","methods","event","index","payload","component","VBtn","VCol","VColorPicker","VFadeTransition","VIcon","VRow","VSelect","BucketFormDraggable","Container","bucketGroups","buckets","mounted","setBuckets","length","defaultBucket","groups","find","x","entries","len","push","order","target","getAttribute","indexes","addedIndex","removedIndex","oldBucket","newBucket","splice","getRemovedGroups","groupIds","window","_","cloneDeep","removal","filter","includes","id","forEach","selectedGroup","prepPayload","removedGroups","valid","validate","$store","dispatch","setPickerColor","togglePicker","exists","findIndex","invalidGroups","title","text","icon","invalidColors"],"mappings":"gJAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,YAAY,CAACE,YAAY,iBAAiBC,MAAM,CAAC,uBAAuBP,EAAIQ,YAAc,WAAa,kBAAkB,aAAa,UAAU,YAAY,IAAI,oBAAoBR,EAAI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,SAGjE,OAAIqH,EAAc1C,SACd/F,KAAK+H,OAAOC,SAAS,aAAc,CAC/B/D,KAAM,UACNqE,MAAO,oBACPC,KAAM,uDACNC,KAAM,8BACNpH,MAAO,aAIJ,OClXiX,ICQpY,G,UAAY,eACd,EACAtB,EACAsC,GACA,EACA,KACA,KACA,OAIa,eAAiB,QAOhC,IAAkB,EAAW,CAAC8C,OAAA,KAAKI,QAAA,KAAMC,OAAA,Q,kCC1BzC","file":"js/chunk-1f2a5e78.507510ae.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('container',{staticClass:\"drag-container\",attrs:{\"drag-handle-selector\":_vm.disableDrag ? 'reelitIn' : '.drag-container',\"group-name\":\"Buckets\",\"lock-axis\":\"y\",\"get-child-payload\":_vm.childPayload},on:{\"drop\":_vm.dropped}},[_c('bucket-form-draggable',{attrs:{\"disableActions\":\"\",\"color\":\"#6142B0\",\"colors\":_vm.colors,\"group\":Object.assign({}, _vm.defaultGroup, {name: 'All Conversations'})}}),_vm._l((_vm.buckets),function(bucket,i){return [_c('bucket-form-draggable',{key:i,attrs:{\"color\":bucket.color,\"colors\":_vm.colors,\"disableDrag\":_vm.disableDrag,\"displayPicker\":_vm.pickerDisplay[i],\"group\":bucket.group,\"idx\":i,\"pickerColor\":bucket.pickerColor},on:{\"closePicker\":_vm.closePicker,\"closePickerBuffer\":_vm.closePickerBuffer,\"onGroupSelected\":function($event){return _vm.onGroupSelected($event, i)},\"remove\":function($event){return _vm.remove(i)},\"setColorBuffer\":function($event){return _vm.setColorBuffer($event, i)},\"setColor\":function($event){return _vm.setColor($event, i)}}})]})],2),_c('v-row',{staticClass:\"pb-8\",attrs:{\"align\":\"center\",\"justify\":\"center\"}},[_c('v-btn',{attrs:{\"color\":\"primary\",\"loading\":_vm.loading,\"disabled\":_vm.bucketLimitReached,\"icon\":\"\",\"data-cy\":\"addView\"},on:{\"click\":_vm.add}},[_c('v-icon',[_vm._v(\" mdi-plus \")])],1)],1),_c('v-row',{staticClass:\"pb-4\",attrs:{\"align\":\"center\",\"justify\":\"center\"}},[_c('v-btn',{attrs:{\"color\":\"primary\",\"loading\":_vm.loading},on:{\"click\":_vm.save}},[_vm._v(\" Save \")])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('draggable',{attrs:{\"disabled\":true}},[_c('v-row',{staticStyle:{\"margin\":\"5px\",\"position\":\"relative\"},attrs:{\"no-gutters\":\"\"}},[_c('v-col',{staticClass:\"pa-1\",staticStyle:{\"max-width\":\"77px\"}},[_c('v-select',{attrs:{\"dense\":\"\",\"hide-details\":\"\",\"outlined\":\"\",\"color\":\"primary\",\"disabled\":_vm.disableActions,\"value\":_vm.color,\"items\":_vm.colors},scopedSlots:_vm._u([{key:\"selection\",fn:function(){return [_c('v-icon',{attrs:{\"small\":\"\",\"color\":_vm.color}},[_vm._v(\" bi-circle-fill \")])]},proxy:true},{key:\"item\",fn:function(data){return [(data.item === 'Custom')?_c('span',{staticClass:\"custom-picker\"},[_vm._v(\"Custom\")]):_c('v-icon',{attrs:{\"small\":\"\",\"color\":data.item,\"data-cy\":(\"viewColor\" + (data.item.toProperCase()))}},[_vm._v(\" bi-circle-fill \")])]}}]),model:{value:(_vm.tempPickerColor),callback:function ($$v) {_vm.tempPickerColor=$$v},expression:\"tempPickerColor\"}}),(_vm.displayPicker)?_c('div',{directives:[{name:\"click-outside-color\",rawName:\"v-click-outside-color:[idx]\",value:(_vm.closePickerBuffer),expression:\"closePickerBuffer\",arg:_vm.idx}],staticClass:\"color-btn-container\"},[_c('div',{staticClass:\"color-picker\"},[_c('v-fade-transition',[_c('v-color-picker',{attrs:{\"mode\":\"hexa\",\"value\":_vm.color},on:{\"input\":function($event){return _vm.$emit('setColor', $event)}}})],1),_c('v-row',{staticClass:\"d-flex justify-center\",staticStyle:{\"position\":\"fixed\",\"width\":\"300px\"},attrs:{\"no-gutters\":\"\"}},[_c('v-btn',{attrs:{\"depressed\":\"\",\"color\":\"primary\"},on:{\"click\":function($event){return _vm.$emit('closePicker')}}},[_vm._v(\" Confirm \")])],1)],1)]):_vm._e()],1),_c('v-col',{staticClass:\"pa-1\"},[_c('group-selector',{ref:\"groupSelector\",attrs:{\"compact\":\"\",\"create-new\":\"\",\"dense\":\"\",\"hideDetails\":\"\",\"outlined\":\"\",\"static\":\"\",\"disabled\":_vm.disableActions,\"group\":_vm.group,\"width\":\"400px\"},on:{\"groupSelected\":function($event){return _vm.$emit('onGroupSelected', $event)}}})],1),_c('v-col',{staticStyle:{\"max-width\":\"27px\",\"padding-top\":\"11px\"}},[_c('v-btn',{attrs:{\"icon\":\"\",\"small\":\"\",\"disabled\":_vm.disableActions},on:{\"click\":function($event){return _vm.$emit('remove')}}},[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\" bi-trash-fill \")])],1)],1),_c('v-col',{staticStyle:{\"max-width\":\"27px\",\"padding-top\":\"11px\"}},[_c('v-btn',{attrs:{\"icon\":\"\",\"small\":\"\",\"disabled\":_vm.disableDrag || _vm.disableActions}},[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\" bi-grid-3x3-gap-fill \")])],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Draggable } from 'vue-smooth-dnd'\nimport Group from '@/types/Group.interface'\nimport GroupSelector from '@/components/GroupSelector.vue'\nimport Vue, { PropType } from 'vue'\nexport default Vue.extend({\n components: { Draggable, GroupSelector },\n props: {\n color: {\n type: String,\n required: true\n },\n colors: {\n type: Array,\n required: true\n },\n disableActions: {\n type: Boolean,\n default: false\n },\n disableDrag: {\n type: Boolean,\n default: false\n },\n displayPicker: {\n type: Boolean,\n default: false\n },\n group: {\n type: Object as PropType,\n default: null\n },\n idx: {\n type: Number,\n default: 0\n },\n pickerColor: {\n type: String,\n default: '#6142B0'\n }\n },\n computed: {\n tempPickerColor: {\n get(): string {\n return this.pickerColor\n },\n set(val: string): void {\n this.$emit('setColorBuffer', val)\n }\n }\n },\n methods: {\n closePickerBuffer(event: Event, index: number): void {\n // Create the payload\n const payload = {\n event: event,\n index: index\n }\n\n // Emit the event to the parent\n this.$emit('closePickerBuffer', payload)\n }\n }\n})\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BucketFormDraggable.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BucketFormDraggable.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./BucketFormDraggable.vue?vue&type=template&id=75fea28c&\"\nimport script from \"./BucketFormDraggable.vue?vue&type=script&lang=ts&\"\nexport * from \"./BucketFormDraggable.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 { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VColorPicker } from 'vuetify/lib/components/VColorPicker';\nimport { VFadeTransition } from 'vuetify/lib/components/transitions';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\ninstallComponents(component, {VBtn,VCol,VColorPicker,VFadeTransition,VIcon,VRow,VSelect})\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Container } from 'vue-smooth-dnd'\nimport Group, { GroupBucket } from '@/types/Group.interface'\nimport BucketFormDraggable from '@/components/BucketFormDraggable.vue'\nimport Vue from 'vue'\n\ninterface Indexes {\n removedIndex: number\n addedIndex: number\n payload: number\n}\nexport default Vue.extend({\n components: { BucketFormDraggable, Container },\n props: {\n bucketGroups: {\n type: Array,\n default: () => []\n }\n },\n data() {\n return {\n // Maps opened/closed color pickers\n pickerDisplay: {},\n colors: [\n '#6142B0',\n '#EF9A9A',\n '#FFCC80',\n '#FFF59D',\n '#A5D6A7',\n '#90CAF9',\n '#CE93D8',\n '#F48FB1',\n '#BCAAA4',\n 'Custom'\n ],\n loading: false,\n buckets: null\n }\n },\n async mounted() {\n // Set our buckets\n this.setBuckets()\n },\n computed: {\n bucketLimitReached(): boolean {\n // If we have 0 buckets, do nothing\n if (!this.buckets) return false\n\n // If we have 20 or more buckets, return true\n if (this.buckets.length >= 20) return true\n\n // Else, the limit hasn't been reached, return false\n return false\n },\n defaultBucket(): GroupBucket {\n // Create a default bucket\n return { color: '#6142B0', group: this.defaultGroup }\n },\n defaultGroup(): Group {\n // Grab our temp bucket groups\n const groups = this.bucketGroups\n\n // Find the \"All Contacts\" one\n const group = groups.find((x: Group) => x.name === 'All Contacts')\n\n // Return the group\n return group\n },\n disableDrag(): boolean {\n // If picker display is empty, do nothing\n if (!this.pickerDisplay) return false\n\n // Iterate through our entries\n for (const [key, val] of Object.entries(this.pickerDisplay)) {\n // If the value is true, return true\n if (val) return true\n }\n\n // Else, nothing is enabled so return false\n return false\n }\n },\n methods: {\n add(): void {\n // Grab the current length of our buckets\n const len = this.buckets.length\n\n // Add a new bucket entry\n this.buckets.push({ color: '#6142B0', order: len, group: null })\n },\n childPayload(i: number): number {\n // Return index of the child\n return i\n },\n closePickerBuffer(payload: object): void {\n // @ts-ignore Grab the event and index\n const event = payload.event\n\n // Get our HTML target\n const target = event.target as HTMLTextAreaElement\n\n // If our event target has class custom-picker, ignore\n if (target.getAttribute('class') === 'custom-picker') return\n\n // @ts-ignore Grab the index\n const index = payload.index\n\n // Else, call our close picker\n this.closePicker(index)\n },\n closePicker(index: number): void {\n // If the picker is opened, close it and emit the pickerClosed event\n if (this.pickerDisplay[index]) {\n this.pickerDisplay[index] = false\n return this.$emit('pickerClosed')\n }\n },\n dropped(indexes: Indexes): void {\n // Get the new and old index of the item\n const { addedIndex, removedIndex } = indexes\n\n // If the item hasn't moved, do nothing\n if (addedIndex === removedIndex) return\n\n // Else, if this was the first element, do nothing\n if (addedIndex === 0 || removedIndex === 0) return\n\n // From here on out, we subtract 1 from the indexes because our buckets are offset by 1\n\n // Else, get the bucket at the old index\n const oldBucket = this.buckets[removedIndex - 1]\n\n // Get the bucket at the new index\n const newBucket = this.buckets[addedIndex - 1]\n\n // Update this bucket with its new index\n oldBucket.order = addedIndex - 1\n newBucket.order = removedIndex - 1\n\n // Remove this from that index\n this.buckets.splice(removedIndex - 1, 1)\n\n // Insert this bucket at the new index\n this.buckets.splice(addedIndex - 1, 0, oldBucket)\n },\n getRemovedGroups(groupIds: number[]): void {\n // Clone our bucket groups\n const bucketGroups = window._.cloneDeep(this.bucketGroups)\n\n // Find any groups that are in bucketGroups but NOT buckets\n const removal = bucketGroups.filter(\n (x: Group) => !groupIds.includes(x.id) && x.name !== 'All Contacts'\n )\n\n // For each of these groups, remove the bucket from them\n removal.forEach((x: Group) => (x.bucket = null))\n\n // Return the removed groups\n return removal\n },\n async onGroupSelected(selectedGroup: Group, i: number): Promise {\n // Update our buckets\n this.buckets[i].group = selectedGroup\n },\n async remove(i: number): Promise {\n // Remove this bucket\n this.buckets.splice(i, 1)\n },\n prepPayload(): Group[] {\n // Grab our buckets\n const buckets = this.buckets\n\n // Payload container\n const payload = []\n\n // Container for group ids\n const groupIds = []\n\n // Iterate through each bucket\n for (let i = 0; i < buckets.length; i++) {\n // Assign group to \"group\" and grab our bucket without it\n let { pickerColor: _, group: group, ...bucket } = buckets[i]\n\n // Make sure our bucket order is correct\n bucket.order = i\n\n // Attach the bucket to our group\n group.bucket = bucket\n\n // Push this into our payload\n payload.push(group)\n\n // Push this id into our group ids\n groupIds.push(group.id)\n }\n\n // Get our removed groups\n const removedGroups = this.getRemovedGroups(groupIds)\n\n // Add these removal groups\n payload.push(...removedGroups)\n\n // Return our payload\n return payload\n },\n async save(): Promise {\n // Make sure all fields have a color and a group selected\n const valid = this.validate()\n\n // If not valid, do nothing\n if (!valid) return\n\n // Start the loading spinner\n this.loading = true\n\n // Prep our payload\n const payload = this.prepPayload()\n\n // Send the request to update the groups\n await this.$store.dispatch('groupsPutBucket', { payload: payload })\n\n // Stop the loading spinner\n this.loading = false\n\n // Close the form and re-paginate bucket groups in AppNavigationDrawer.vue\n this.$emit('submit')\n },\n setBuckets(): void {\n // Grab all of our groups\n const groups = this.bucketGroups\n\n // Create a container for our buckets\n const buckets = []\n\n // Iterate through each group\n for (let i = 0; i < groups.length; i++) {\n // If this is the \"All Conversations\" group then skip\n if (groups[i].name === 'All Contacts') continue\n\n // Grab the order\n let order = groups[i].bucket.order\n\n // Grab our color\n let color = groups[i].bucket.color\n\n // Get the picker color\n let pickerColor = this.setPickerColor(color)\n\n // Create the bucket for this group\n let bucket = {\n order: order,\n color: color,\n group: groups[i],\n pickerColor: pickerColor\n }\n\n // Push this bucket\n buckets.push(bucket)\n }\n\n // Set our buckets\n this.buckets = buckets\n },\n setColorBuffer(color: string, idx: number): void {\n // If the color is custom then pop our picker\n if (color === 'Custom') return this.togglePicker(idx)\n\n // Else, just set our color\n this.setColor(color, idx)\n },\n setColor(color: string, idx: number): void {\n // If object is null, do nothing\n if (!color) return\n\n // Else, set the hexa\n this.buckets[idx].color = color\n\n // Get our picker color\n const pickerColor = this.setPickerColor(color)\n\n // Set our picker color\n this.buckets[idx].pickerColor = pickerColor\n },\n setPickerColor(color: string): string {\n // Check if this is in our list of colors\n const exists = this.colors.findIndex((x: string) => x === color)\n\n // If the index is -1, then our pickerColor is \"Custom\", else it is just the color\n const pickerColor = exists === -1 ? 'Custom' : color\n\n // Return the picker color\n return pickerColor\n },\n // Toggles a color picker to be on or off\n togglePicker(index: number): void {\n // If the picker is open, close the picker\n if (this.pickerDisplay[index]) {\n return this.closePicker(index)\n }\n // Invert the picker value\n this.pickerDisplay[index] = true\n\n // This allows vue to detect the changes\n this.pickerDisplay = { ...this.pickerDisplay }\n },\n validate(): boolean {\n // Check if there are any buckets missing groups\n const invalidGroups = this.buckets.filter((x: GroupBucket) => !x.group)\n\n // If there are any invalid groups, pop a dialog\n if (invalidGroups.length) {\n this.$store.dispatch('dialogOpen', {\n type: 'MESSAGE',\n title: 'Group is Required',\n text: 'Please pick a group for each view before continuing.',\n icon: 'bi-exclamation-diamond-fill',\n color: 'primary'\n })\n\n // Return false\n return false\n }\n\n // If there is a color selector with no value, valid is false\n const invalidColors = this.buckets.filter((x: GroupBucket) => !x.color)\n\n // If there are any invalid colors, pop a dialog\n if (invalidColors.length) {\n this.$store.dispatch('dialogOpen', {\n type: 'MESSAGE',\n title: 'Color is Required',\n text: 'Please pick a color for each view before continuing.',\n icon: 'bi-exclamation-diamond-fill',\n color: 'primary'\n })\n\n // Return false\n return false\n }\n\n // Everything passed, return true\n return true\n }\n }\n})\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NewBucketForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NewBucketForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./NewBucketForm.vue?vue&type=template&id=82fa6f24&\"\nimport script from \"./NewBucketForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./NewBucketForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./NewBucketForm.vue?vue&type=style&index=0&lang=css&\"\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 { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VIcon,VRow})\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NewBucketForm.vue?vue&type=style&index=0&lang=css&\""],"sourceRoot":""}