{"version":3,"sources":["webpack:///./src/listStore.js"],"names":["ListStore","axios","this","aggregations","state","meta","folderId","get","then","data","params","Object","assign","folders","sharedFolders","mySharedFolders","folder_id","recordsForNavigation","recordId","id","recordsForNavigationVersioned","products","document_types","sharedProducts","sharedDoumentTypes","contacts","sharedWithContacts","connectedContacts","users","tags","searchResultsHeader","result","searchResults","countBySourceType","count_by_source","checklists","folder","record","version","record_id","recordsForNewVersion","organizationId","organization_id","sharedTags","myShareInvites","mentions","addressBook"],"mappings":"0IAAMA,E,WACJ,WAAYC,GAAO,uBACjBC,KAAKD,MAAQA,EACbC,KAAKC,aAAe,GACpBD,KAAKE,MAAQ,GACbF,KAAKG,KAAO,G,yDAGJC,GACR,OAAOJ,KAAKD,MAAMM,IAAX,uBAA+BD,IAAYE,MAAK,YAAY,IAAVC,EAAU,EAAVA,KACvD,OAAOA,O,iCAIAC,GAAQ,WAGjB,OAFAR,KAAKE,MAAQO,OAAOC,OAAO,GAAIV,KAAKE,MAAO,CAAEC,KAAM,KAE5CH,KAAKD,MAAMM,IAAI,eAAgB,CAAEG,OAAQA,IAAUF,MAAK,YAAY,IAAVC,EAAU,EAAVA,KAG/D,OAFA,EAAKL,MAAQO,OAAOC,OAAO,GAAI,EAAKR,MAAO,CAAES,QAASJ,EAAKA,KAAMJ,KAAMI,EAAKJ,OAErEI,O,uCAIMC,GAAQ,WAGvB,OAFAR,KAAKE,MAAQO,OAAOC,OAAO,GAAIV,KAAKE,MAAO,CAAEC,KAAM,KAE5CH,KAAKD,MAAMM,IAAI,sBAAuB,CAAEG,OAAQA,IAAUF,MAAK,YAAY,IAAVC,EAAU,EAAVA,KAGtE,OAFA,EAAKL,MAAQO,OAAOC,OAAO,GAAI,EAAKR,MAAO,CAAEU,cAAeL,EAAKA,KAAMJ,KAAMI,EAAKJ,OAE3EI,O,yCAIQC,GAAQ,WAGzB,OAFAR,KAAKE,MAAQO,OAAOC,OAAO,GAAIV,KAAKE,MAAO,CAAEC,KAAM,KAE5CH,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AAUpC,S,qCAI5CC,GAAQ,WAGrB,OAFAR,KAAKE,MAAQO,OAAOC,OAAO,GAAIV,KAAKE,MAAO,CAAEC,KAAM,KAE5CH,KAAKD,MAAMM,IAAI,oBAAqB,CAAEG,OAAQA,IAAUF,MAAK,YAAY,IAAVC,EAAU,EAAVA,KAGpE,OAFA,EAAKL,MAAQO,OAAOC,OAAO,GAAI,EAAKR,MAAO,CAAE0C,YAAarC,EAAKA,KAAMJ,KAAMI,EAAKJ,OAEzEI,S,KAKET","file":"js/app~584a98c7.43e205c5.js","sourcesContent":["class ListStore {\n constructor(axios) {\n this.axios = axios\n this.aggregations = {}\n this.state = {}\n this.meta = {}\n }\n\n getFolder(folderId) {\n return this.axios.get(`list/folders/${folderId}`).then(({data}) => {\n return data\n })\n }\n\n getFolders(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/folders', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { folders: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getSharedFolders(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/shared_folders', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { sharedFolders: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getMySharedFolders(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/my_shared_folders', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { mySharedFolders: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getRecordsForNavigation(folderId) {\n return this.axios.get('list/records', { params: { folder_id: folderId } }).then(({data}) => {\n this.state = Object.assign({}, this.state, { recordsForNavigation: data })\n })\n }\n\n getRecordsForNavigationVersioned(recordId) {\n return this.axios.get('list/record_versions', { params: { id: recordId } }).then(({data}) => {\n this.state = Object.assign({}, this.state, { recordsForNavigationVersioned: data})\n })\n }\n\n getProducts(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/products', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { products: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getDocumentTypes(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/document_types', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { document_types: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getSharedProducts(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/shared_products', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { sharedProducts: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getSharedDocumentTypes(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/shared_document_types', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { sharedDoumentTypes: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getContacts(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/contacts', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { contacts: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getSharedWithContacts(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/shared_with_contacts', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { sharedWithContacts: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getConnectedContacts(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/connected_contacts', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { connectedContacts: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getUsers(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/users', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { users: data.data, meta: data.meta })\n\n return data\n })\n }\n\n getTags(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/tags', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { tags: data.data, meta: data.meta })\n\n return data\n })\n }\n\n headerSearchViaEs(params) {\n return this.axios.get('searches', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { searchResultsHeader: data.result })\n this.meta = Object.assign({}, this.meta, { searchResultsHeader: data.meta })\n })\n }\n\n searchViaEs(params) {\n return this.axios.get('list/searches/search_via_es', {params: params}).then(({data}) => {\n this.state = Object.assign({}, this.state, { searchResults: data.result })\n this.meta = Object.assign({}, this.meta, { searchResults: data.meta })\n this.aggregations = Object.assign({}, this.aggregations, { countBySourceType: data.count_by_source })\n })\n }\n\n getChecklistItems(params) {\n return this.axios.get('list/checklist_items', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { checklists: data })\n })\n }\n\n getRecordsForVersion(folder, record, version) {\n return this.axios.get('list/records', {params: {folder_id: folder.id, record_id: record.id, version: version}}).then(({data}) => {\n this.state = Object.assign({}, this.state, { recordsForNewVersion: data })\n })\n }\n\n getSharedTags(organizationId) {\n return this.axios.get('shared_tags', {params:{organization_id: organizationId}}).then(({data}) => {\n this.state = Object.assign({}, this.state, { sharedTags: data })\n })\n }\n\n getMyShareInvites(params) {\n return this.axios.get('my_share_invites', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { myShareInvites: data })\n })\n }\n\n getMentions() {\n return this.axios.get('list/mentions').then(({data}) => {\n this.state = Object.assign({}, this.state, { mentions: data })\n })\n }\n\n getAddressBook(params) {\n this.state = Object.assign({}, this.state, { meta: {} })\n\n return this.axios.get('list/address_book', { params: params }).then(({data}) => {\n this.state = Object.assign({}, this.state, { addressBook: data.data, meta: data.meta })\n\n return data\n })\n }\n}\n\nexport default ListStore\n"],"sourceRoot":""}