{"version":3,"file":"useFilterCategories-CRQ9hN5i.js","sources":["../../../packs/frontend/components/Filter/Buttons.vue","../../../packs/frontend/components/Base/NotificationBadge.vue","../../../packs/frontend/components/Filter/offCanvas.vue","../../../packs/frontend/components/Filter/FormDropdown.vue","../../../packs/frontend/utils/gallery/ensureArray.ts","../../../packs/frontend/components/Base/Dropdown/Checkbox.vue","../../../packs/frontend/components/Filter/DesktopItems.vue","../../../packs/frontend/images/icons/Filter_default.svg","../../../packs/frontend/components/Filter/Content.vue","../../../packs/frontend/composables/gallery/useApprovedUsers.ts","../../../packs/frontend/types/filter.types.ts","../../../packs/frontend/composables/gallery/useFilterCategories.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","export const ensureArray = (value: string | string[]) => {\n if (!value) {\n return [];\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n if (value.includes(\",\")) {\n return value.split(\",\");\n }\n return [value];\n};\n","\n\n\n\n\n\n\n","\n\n\n\n","export default \"data:image/svg+xml,%3csvg%20width='18'%20height='17'%20viewBox='0%200%2018%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9375%201.25C12.0055%201.25%2011.25%202.00552%2011.25%202.9375C11.25%203.86948%2012.0055%204.625%2012.9375%204.625C13.8695%204.625%2014.625%203.86948%2014.625%202.9375C14.625%202.00552%2013.8695%201.25%2012.9375%201.25ZM10.1813%202.375C10.4418%201.09124%2011.5768%200.125%2012.9375%200.125C14.2982%200.125%2015.4332%201.09124%2015.6937%202.375H18V3.5H15.6937C15.4332%204.78376%2014.2982%205.75%2012.9375%205.75C11.5768%205.75%2010.4418%204.78376%2010.1813%203.5H0V2.375H10.1813ZM5.0625%206.875C4.13052%206.875%203.375%207.63052%203.375%208.5625C3.375%209.49448%204.13052%2010.25%205.0625%2010.25C5.99448%2010.25%206.75%209.49448%206.75%208.5625C6.75%207.63052%205.99448%206.875%205.0625%206.875ZM2.30626%208C2.56685%206.71624%203.70184%205.75%205.0625%205.75C6.42316%205.75%207.55815%206.71624%207.81874%208H18V9.125H7.81874C7.55815%2010.4088%206.42316%2011.375%205.0625%2011.375C3.70184%2011.375%202.56685%2010.4088%202.30626%209.125H0V8H2.30626ZM12.9375%2012.5C12.0055%2012.5%2011.25%2013.2555%2011.25%2014.1875C11.25%2015.1195%2012.0055%2015.875%2012.9375%2015.875C13.8695%2015.875%2014.625%2015.1195%2014.625%2014.1875C14.625%2013.2555%2013.8695%2012.5%2012.9375%2012.5ZM10.1813%2013.625C10.4418%2012.3412%2011.5768%2011.375%2012.9375%2011.375C14.2982%2011.375%2015.4332%2012.3412%2015.6937%2013.625H18V14.75H15.6937C15.4332%2016.0338%2014.2982%2017%2012.9375%2017C11.5768%2017%2010.4418%2016.0338%2010.1813%2014.75H0V13.625H10.1813Z'%20fill='%23505C88'/%3e%3c/svg%3e\"","\n\n\n\n","import { useApiClient } from \"@/composables/useApiClient\";\nimport { useQuery, useQueryClient } from \"@tanstack/vue-query\";\n\nexport const useApprovedUsers = (\n international: ComputedRef\n) => {\n const queryClient = useQueryClient();\n const { toolsUsers: toolsUsersService } = useApiClient();\n\n const { data: approvedUsers, refetch: refetchApprovedUsers } = useQuery(\n {\n queryKey: [\"approvedUsers\", international],\n queryFn: async () =>\n await toolsUsersService.listApprovedToolsUsers({\n international: international.value,\n }),\n },\n queryClient\n );\n\n watch(international, () => refetchApprovedUsers);\n\n return {\n approvedUsers,\n };\n};\n","import { BaseButtonKindEnum } from \"@/components/Base/Button\";\nimport BaseDropdownCheckbox from \"@/components/Base/Dropdown/Checkbox.vue\";\nimport FilterButtons from \"@/components/Filter/Buttons.vue\";\nimport FilterFormDropdown from \"@/components/Filter/FormDropdown.vue\";\nimport { Option } from \"@/types/components/Base/BaseFormDropdown.types\";\n\nexport interface FilterParamsBase extends Record {\n query: string;\n page: string | number;\n}\n\nexport enum FilterableRoute {\n INDEX = \"gallery-index\",\n COMMUNITY = \"gallery-community\",\n TO_TEACH = \"gallery-to-teach\",\n COLLECTION_SHOW = \"collections-show\",\n}\n\nexport type FilterCategory = {\n id: string;\n component: \"FilterFormDropdown\" | \"DropdownCheckbox\" | \"FilterButtons\";\n pages: FilterableRoute[];\n props: {\n id: string;\n label: string;\n options: FilterOption[] | Option[];\n selectedValues?: string[] | \"\";\n radio?: boolean; // only for FilterButtons\n };\n};\n\nexport type FilterComponent =\n | typeof FilterFormDropdown\n | typeof BaseDropdownCheckbox\n | typeof FilterButtons;\n\nexport type FilterOption = Option & {\n id: string;\n icon?: string;\n};\n\nexport type { Option };\n\nexport type FilterButtonsProps = {\n options?: FilterOption[];\n models?: string[];\n apps?: { id: string; modelName: string; icon: string }[];\n kind?: BaseButtonKindEnum;\n selectedValues: string[] | string;\n radio?: boolean;\n};\n\nexport type FilterDropdownCheckboxProps = {\n id: string;\n label: string;\n options: Option[];\n kind?: BaseButtonKindEnum;\n selectedValues: string[];\n};\n","import { useApprovedUsers } from \"@/composables/gallery/useApprovedUsers\";\nimport {\n GradeLevelEnum,\n SchoolTypeEnum,\n SubjectTypeEnum,\n ToolsUser,\n} from \"@/services/fobizzToolsApi\";\nimport { gradeLevelKeys, schoolTypeKeys, subjectTypeKeys } from \"@/types\";\nimport { FilterCategory, FilterableRoute } from \"@/types/filter.types\";\nimport { computed, ComputedRef } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\n\nexport const useGalleryCategories = (\n international: ComputedRef,\n currentFilterableRoute: ComputedRef\n) => {\n const { t } = useI18n();\n const { approvedUsers } = useApprovedUsers(international);\n const appsStore = useAppsStore();\n\n const partnerCategory = computed(() => ({\n id: \"userIds\",\n component: \"DropdownCheckbox\",\n pages: [FilterableRoute.INDEX],\n props: {\n id: \"approvedUserIdsDropdown\",\n label: t(\"materials.labels.approvedUserIds\"),\n options:\n approvedUsers.value?.map((user: ToolsUser) => ({\n label: user.publicDisplayName as string,\n value: user.id,\n })) ?? [],\n selectedValues: [],\n },\n }));\n\n const schoolTypesCategory: FilterCategory = {\n id: \"schoolTypes\",\n component: \"DropdownCheckbox\",\n pages: [\n FilterableRoute.INDEX,\n FilterableRoute.COMMUNITY,\n FilterableRoute.COLLECTION_SHOW,\n ],\n props: {\n id: \"schoolTypesDropdown\",\n label: t(\"labels.schoolTypes\"),\n options: schoolTypeKeys.map((value) => ({\n label: t(\n `enums.schoolTypes.${SchoolTypeEnum[value as SchoolTypeEnum]}`\n ),\n value: value.toString(),\n })),\n selectedValues: [],\n },\n };\n\n const gradeLevelsCategory: FilterCategory = {\n id: \"gradeLevels\",\n component: \"DropdownCheckbox\",\n pages: [\n FilterableRoute.INDEX,\n FilterableRoute.COMMUNITY,\n FilterableRoute.COLLECTION_SHOW,\n ],\n props: {\n id: \"gradeLevelsDropdown\",\n label: t(\"labels.gradeLevels\"),\n options: gradeLevelKeys.map((value) => ({\n label: t(\n `enums.gradeLevels.${GradeLevelEnum[value as GradeLevelEnum]}`\n ),\n value: value.toString(),\n })),\n selectedValues: [],\n },\n };\n\n const subjectTypesCategory: FilterCategory = {\n id: \"subjectTypes\",\n component: \"DropdownCheckbox\",\n pages: [\n FilterableRoute.INDEX,\n FilterableRoute.COMMUNITY,\n FilterableRoute.TO_TEACH,\n FilterableRoute.COLLECTION_SHOW,\n ],\n props: {\n id: \"subjectTypesDropdown\",\n label: t(\"labels.subjectTypes\"),\n options: subjectTypeKeys.map((value) => ({\n label: t(\n `enums.subjectTypes.${SubjectTypeEnum[value as SubjectTypeEnum]}`\n ),\n value: value.toString(),\n })),\n selectedValues: [],\n },\n };\n\n const internationalCategory: FilterCategory = {\n id: \"international\",\n component: \"FilterFormDropdown\",\n pages: [\n FilterableRoute.INDEX,\n FilterableRoute.COMMUNITY,\n FilterableRoute.TO_TEACH,\n ],\n props: {\n id: \"internationalDropdown\",\n label: t(\"materials.filters.language\"),\n options: [\n { value: \"true\", label: t(\"materials.filters.international.true\") },\n { value: \"false\", label: t(\"materials.filters.international.false\") },\n ],\n selectedValues: \"\",\n radio: true,\n },\n };\n\n const orderCategory: FilterCategory = {\n id: \"order\",\n component: \"FilterFormDropdown\",\n pages: [\n FilterableRoute.INDEX,\n FilterableRoute.COMMUNITY,\n FilterableRoute.TO_TEACH,\n ],\n props: {\n id: \"order\",\n label: t(\"materials.filters.order.label\"),\n options: [\n { value: \"created_at\", label: t(\"materials.filters.order.newest\") },\n { value: \"relevant\", label: t(\"materials.filters.order.relevance\") },\n ],\n selectedValues: \"\",\n radio: true,\n },\n };\n\n const availableApps = computed(() => {\n const apps =\n currentFilterableRoute.value == FilterableRoute.INDEX\n ? appsStore.listCatalogablePlusAssistant\n : appsStore.listCatalogable;\n\n apps.map((app) =>\n app.id === \"ClassroomScreen::Screen\"\n ? { ...app, id: \"TeachingBoard::Screen\" }\n : app\n );\n\n const collection = {\n id: \"Collection\",\n modelName: t(\"materials.labels.filterCollection\"),\n icon: \"bi-collection\",\n };\n\n return [...apps, collection];\n });\n\n const models = computed(() => ({\n id: \"models\",\n component: \"DropdownCheckbox\",\n pages: [\n FilterableRoute.INDEX,\n FilterableRoute.COMMUNITY,\n FilterableRoute.COLLECTION_SHOW,\n ],\n props: {\n label: t(\"materials.labels.models\"),\n id: \"model-buttons\",\n options: availableApps.value.map((app) => ({\n value: app.id,\n label: app.modelName,\n id: app.modelName,\n icon: app.icon,\n })),\n selectedValues: [],\n },\n }));\n\n const categories = computed(() =>\n [\n partnerCategory.value,\n schoolTypesCategory,\n gradeLevelsCategory,\n subjectTypesCategory,\n models.value,\n internationalCategory,\n orderCategory,\n ].filter((cat: FilterCategory) =>\n cat.pages.includes(currentFilterableRoute.value)\n )\n );\n\n return { categories };\n};\n"],"names":["props","__props","emit","__emit","selectedOptions","computed","newValues","toggleOption","optionValue","value","isSelected","handleKeyDown","event","buttonRefs","ref","optionsLength","focusNextButton","currentIndex","nextIndex","focusPreviousButton","previousIndex","handleGroupKeyDown","sizeClasses","positionClass","style","isVisible","ACCORDION_ID","t","useI18n","handleFilterChange","label","handleReset","resetAccordions","categoryHasOptions","category","option","accordionRefs","accordionStates","acc","index","_","handleAccordionUpdate","categoryId","expanded","handleButtonGroupKeyDown","categoryIndex","firstButton","getSelectedCount","params","getSelectedValue","outsideValue","__default__","selectedValue","ensureArray","selectedCount","isOpen","handleResetFilter","getComponentFromString","componentName","FilterFormDropdown","BaseDropdownCheckbox","FilterButtons","getHasSelectedValues","selectedValues","filteredCategories","mobileIcon","internalQuery","showMobileFilter","toggleMobileFilter","handleFinished","handleQuery","handleSubmit","handleCancel","count","param","useApprovedUsers","international","queryClient","useQueryClient","toolsUsersService","useApiClient","approvedUsers","refetchApprovedUsers","useQuery","watch","FilterableRoute","useGalleryCategories","currentFilterableRoute","appsStore","useAppsStore","partnerCategory","user","schoolTypesCategory","schoolTypeKeys","SchoolTypeEnum","gradeLevelsCategory","gradeLevelKeys","GradeLevelEnum","subjectTypesCategory","subjectTypeKeys","SubjectTypeEnum","internationalCategory","orderCategory","availableApps","apps","app","collection","models","cat"],"mappings":"0rCAIA,MAAMA,EAAQC,EAKRC,EAAOC,EAEPC,EAA0DC,EAAS,CACvE,IAAK,IAAML,EAAM,eACjB,IAAMM,GAAc,CAClBJ,EAAK,wBAAyBI,CAAS,EACvCJ,EAAK,SAAUI,CAAS,CAAA,CAC1B,CACD,EAEKC,EAAgBC,GAAwB,CACxCR,EAAM,MACRI,EAAgB,MAAQI,EACf,MAAM,QAAQJ,EAAgB,KAAK,IAC5CA,EAAgB,MAAQA,EAAgB,MAAM,SAASI,CAAW,EAC9DJ,EAAgB,MAAM,OAAQK,GAAUA,IAAUD,CAAW,EAC7D,CAAC,GAAGJ,EAAgB,MAAOI,CAAW,EAE9C,EAEME,EAAcF,GACdR,EAAM,MACDI,EAAgB,QAAUI,EAG/B,MAAM,QAAQJ,EAAgB,KAAK,GACnCA,EAAgB,MAAM,SAASI,CAAW,EAK1CG,EAAgB,CAACC,EAAsBJ,IAAwB,EAC/DI,EAAM,MAAQ,SAAWA,EAAM,MAAQ,O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