{"version":3,"sources":["webpack:///./src/components/learningLibrary/ConfigureLearningLibraryCollection.less?e7ed","webpack:///./src/components/learningLibrary/ConfigureLearningLibraryCollection.vue?7358","webpack:///./src/components/learningLibrary/ConfigureLearningLibraryCollection.ts","webpack:///./src/components/learningLibrary/ConfigureLearningLibraryCollection.vue?690f","webpack:///./src/components/learningLibrary/ConfigureLearningLibraryCollection.vue?5f69","webpack:///./src/components/learningLibrary/ConfigureLearningLibraryCollection.vue","webpack:///./src/services/collections/api.ts","webpack:///./src/utilities/collectionsUtilities.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","ref","attrs","required","unique","nameValidationRules","scopedSlots","_u","key","fn","errors","directives","name","rawName","value","expression","modifiers","domProps","on","$event","target","composing","collectionName","trim","$forceUpdate","_s","cancel","save","staticRenderFns","ConfigureLearningLibraryCollection","collectionValidationProvider","reset","validate","valid","$emit","resetValidation","modelValue","newValue","collectionNameValidationRules","Vue","tslib_1","Model","type","Object","Ref","Component","components","ValidationProvider","component","getUserCollections","request","httpIdentityClient","get","API_CONST","COLLECTIONS","params","getDefaultCollections","getCollection","id","createUserCollection","post","updateCollection","put","deleteUserCollection","delete","validateCollectionName","max","validator"],"mappings":"gHAAA,W,yCCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,sCAAsC,CAACF,EAAG,UAAU,CAACE,YAAY,+CAA+C,CAACF,EAAG,KAAK,CAACE,YAAY,6CAA6C,CAACN,EAAIO,GAAG,4BAA4BH,EAAG,qBAAqB,CAACI,IAAI,+BAA+BF,YAAY,4CAA4CG,MAAM,CAAC,kBAAkB,CAAEC,SAAU,gBAAiBC,OAAQ,sCAAsC,KAAO,OAAO,IAAM,MAAM,MAAQX,EAAIY,oBAAoB,KAAO,WAAWC,YAAYb,EAAIc,GAAG,CAAC,CAACC,IAAI,UAAUC,G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zC,8DAFM,WAAoCb,GAAgC,0GAClEC,iBAAqBa,OAAM,UAAaX,OAAUC,YAAW,YAAIJ,EAAQQ,MAAK,2CACtF,wBAEM,SAAeO,EAAuB,GAAD,+BAE3C,8DAFM,WAAsCrD,GAAY,0GAChDuC,iBAAqBC,IAAG,UAAaC,OAAUC,YAAW,wBAAgB1C,KAAO,2CACzF,0B,kCCvCD,kDAEM,SAAU0B,IACd,MAAO,CACLnC,UAAU,EACV+D,IAAK,GACL9D,OAAQ,CACN+D,UAAWF","file":"js/chunk-084b2f46.c6c7626ac7f379430b46.1725496708077.min.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./ConfigureLearningLibraryCollection.less?vue&type=style&index=0&id=004a07fe&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"ConfigureLearningLibraryCollection\"},[_c('section',{staticClass:\"ConfigureLearningLibraryCollection__section\"},[_c('h3',{staticClass:\"ConfigureLearningLibraryCollection__title\"},[_vm._v(\" Configure collection \")]),_c('ValidationProvider',{ref:\"collectionValidationProvider\",staticClass:\"ConfigureLearningLibraryCollection__field\",attrs:{\"custom-messages\":{ required: 'Enter a name.', unique: 'Sorry, that name is already taken.'},\"name\":\"Name\",\"tag\":\"div\",\"rules\":_vm.nameValidationRules,\"mode\":\"passive\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('label',{staticClass:\"ConfigureLearningLibraryCollection__label\",attrs:{\"for\":\"learning-library-collection-name\"}},[_vm._v(\" Name\"),_c('span',{staticClass:\"ConfigureLearningLibraryCollection__required\"},[_vm._v(\"*\")])]),_c('div',{staticClass:\"ConfigureLearningLibraryCollection__description\"},[_vm._v(\" Give your collection a unique name. \")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.collectionName),expression:\"collectionName\",modifiers:{\"trim\":true}}],staticClass:\"ConfigureLearningLibraryCollection__input\",attrs:{\"type\":\"text\",\"required\":\"\"},domProps:{\"value\":(_vm.collectionName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.collectionName=$event.target.value.trim()},\"blur\":function($event){return _vm.$forceUpdate()}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(errors[0]),expression:\"errors[0]\"}],staticClass:\"ConfigureLearningLibraryCollection__error\"},[_c('i',{staticClass:\"fa-solid fa-exclamation-circle\"}),_vm._v(\" \"+_vm._s(errors[0])+\" \")])]}}])}),_c('div',{staticClass:\"ConfigureLearningLibraryCollection__actions\"},[_c('button',{staticClass:\"btn-secondary\",on:{\"click\":_vm.cancel}},[_vm._v(\" Cancel \")]),_c('button',{staticClass:\"btn-primary\",on:{\"click\":_vm.save}},[_vm._v(\" Save \")])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { CollectionsDto } from '@/Model/collections/types';\nimport { ValidationProvider } from 'vee-validate';\nimport { ProviderInstance } from 'vee-validate/dist/types/types';\nimport { PropType } from 'vue';\nimport { Component, Model, Ref, Vue } from 'vue-property-decorator';\nimport {validateCollectionName} from '@/services/collections/api';\nimport {collectionNameValidationRules} from \"@/utilities/collectionsUtilities\";\n\n@Component({\n components: {\n ValidationProvider,\n }\n})\nexport default class ConfigureLearningLibraryCollection extends Vue {\n @Model('update:modelValue', { type: Object as PropType })\n readonly modelValue!: CollectionsDto;\n\n @Ref('collectionValidationProvider')\n public collectionValidationProvider?: ProviderInstance;\n\n get collectionName(): string {\n return this.modelValue.name;\n }\n\n set collectionName(newValue: string) {\n this.$emit('update:modelValue', {\n ...this.modelValue,\n name: newValue,\n });\n }\n\n resetValidation(): void {\n this.collectionValidationProvider && this.collectionValidationProvider.reset();\n }\n\n get nameValidationRules(): Record {\n return collectionNameValidationRules();\n }\n\n async save(): Promise {\n if (!this.collectionValidationProvider) {\n return;\n }\n\n const { valid } = await this.collectionValidationProvider.validate();\n\n if (!valid) {\n return;\n }\n\n this.$emit('save');\n\n this.resetValidation();\n }\n\n cancel(): void {\n this.$emit('cancel');\n this.resetValidation();\n }\n}\n","\n\nimport ConfigureLearningLibraryCollection from './ConfigureLearningLibraryCollection';\nexport default ConfigureLearningLibraryCollection;\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!./ConfigureLearningLibraryCollection.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!./ConfigureLearningLibraryCollection.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ConfigureLearningLibraryCollection.vue?vue&type=template&id=004a07fe&scoped=true&\"\nimport script from \"./ConfigureLearningLibraryCollection.vue?vue&type=script&lang=ts&\"\nexport * from \"./ConfigureLearningLibraryCollection.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./ConfigureLearningLibraryCollection.less?vue&type=style&index=0&id=004a07fe&lang=less&scoped=true&\"\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 \"004a07fe\",\n null\n \n)\n\nexport default component.exports","import {\n CollectionsDto,\n CreateUserCollectionRequest,\n DeleteCollectionRequest,\n GetAllUserCollectionsRequest,\n GetCollectionRequest,\n GetUserCollectionsResponse,\n UpdateCollectionRequest,\n UserCollection\n} from '@/Model/collections/types';\nimport API_CONST from '@/constants/ApiConst';\nimport { httpIdentityClient } from '../common/httpClient';\n\nexport async function getUserCollections(request: GetAllUserCollectionsRequest) {\n return httpIdentityClient().get(`${API_CONST.COLLECTIONS}`, { params: request });\n}\n\nexport async function getDefaultCollections() {\n return httpIdentityClient().get(`${API_CONST.COLLECTIONS}/default`);\n}\n\nexport async function getCollection(request: GetCollectionRequest) {\n return httpIdentityClient().get(`${API_CONST.COLLECTIONS}/${request.id}`);\n}\n\nexport async function createUserCollection(request: CreateUserCollectionRequest) {\n return httpIdentityClient().post(API_CONST.COLLECTIONS, request);\n}\n\nexport async function updateCollection(request: UpdateCollectionRequest) {\n return httpIdentityClient().put(`${API_CONST.COLLECTIONS}/${request.id}`, request);\n}\n\nexport async function deleteUserCollection(request: DeleteCollectionRequest) {\n return httpIdentityClient().delete(`${API_CONST.COLLECTIONS}/${request.id}`);\n}\n\nexport async function validateCollectionName(name: string) {\n return httpIdentityClient().get(`${API_CONST.COLLECTIONS}/exists?name=${name}`);\n}\n","import {validateCollectionName} from '@/services/collections/api';\n\nexport function collectionNameValidationRules(): Record {\n return {\n required: true,\n max: 66,\n unique: {\n validator: validateCollectionName\n },\n };\n}\n"],"sourceRoot":""}