{ "version": 3, "sources": ["src/app/features/thematics/+state/thematics.actions.ts", "src/app/features/thematics/+state/thematics.state.ts", "src/app/features/thematics/+state/thematics.selectors.ts"], "sourcesContent": ["import { createActionGroup, emptyProps, props } from '@ngrx/store';\nimport { Thematic } from '../thematics.models';\n\nexport const thematicsActions = createActionGroup({\n source: 'Thematics',\n events: {\n 'Load Single Thematic': props<{ uuid: string }>(),\n 'Load Single Thematic Success': props<{ thematic: Thematic }>(),\n 'Load Single Thematic Failure': props<{ error: Error }>(),\n 'Load Thematics': emptyProps(),\n 'Load Thematics Success': props<{ thematics: Thematic[] }>(),\n 'Load Thematics Failure': props<{ error: Error }>()\n }\n});\n", "import { createEntityAdapter, EntityState } from '@ngrx/entity';\nimport { Thematic } from '../thematics.models';\n\nexport const THEMATICS_FEATURE_KEY = 'thematics';\n\nexport interface ThematicsState extends EntityState {\n loading: boolean;\n error: Error | null;\n}\n\nexport const thematicsAdapter = createEntityAdapter({\n selectId: (thematic: Thematic) => thematic.uuid\n});\n\nexport const initialThematicsState = thematicsAdapter.getInitialState({\n loading: false,\n error: null\n});\n", "import { MediaTypeEnum } from '@models/company/company';\nimport { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { selectCurrentRoute } from 'app/store/router/router.selectors';\nimport { thematicsAdapter, ThematicsState, THEMATICS_FEATURE_KEY } from './thematics.state';\n\nexport const selectThematicsState = createFeatureSelector(THEMATICS_FEATURE_KEY);\n\nexport const entityAdapter = thematicsAdapter.getSelectors();\n\nexport const selectThematicEntities = createSelector(\n selectThematicsState,\n entityAdapter.selectEntities\n);\n\nexport const selectThematics = createSelector(selectThematicsState, entityAdapter.selectAll);\n\nexport const selectCurrentThematic = createSelector(\n selectThematicEntities,\n selectCurrentRoute,\n (thematics, route) => (thematics ? thematics[route.params.uuid] : null)\n);\n\nexport const selectThematicIsLoading = createSelector(selectThematicsState, state => state.loading);\n\nexport const selectCurrentThematicIframeMedias = createSelector(selectCurrentThematic, state =>\n state?.medias?.filter(m => m.type === MediaTypeEnum.IFRAME)\n);\n"], "mappings": ";;;;;;;;;;;;;;AAGO,IAAM,mBAAmB,kBAAkB;EAChD,QAAQ;EACR,QAAQ;IACN,wBAAwB,MAAK;IAC7B,gCAAgC,MAAK;IACrC,gCAAgC,MAAK;IACrC,kBAAkB,WAAU;IAC5B,0BAA0B,MAAK;IAC/B,0BAA0B,MAAK;;CAElC;;;ACVM,IAAM,wBAAwB;AAO9B,IAAM,mBAAmB,oBAA8B;EAC5D,UAAU,CAAC,aAAuB,SAAS;CAC5C;AAEM,IAAM,wBAAwB,iBAAiB,gBAAgB;EACpE,SAAS;EACT,OAAO;CACR;;;ACZM,IAAM,uBAAuB,sBAAsC,qBAAqB;AAExF,IAAM,gBAAgB,iBAAiB,aAAY;AAEnD,IAAM,yBAAyB,eACpC,sBACA,cAAc,cAAc;AAGvB,IAAM,kBAAkB,eAAe,sBAAsB,cAAc,SAAS;AAEpF,IAAM,wBAAwB,eACnC,wBACA,oBACA,CAAC,WAAW,UAAW,YAAY,UAAU,MAAM,OAAO,IAAI,IAAI,IAAK;AAGlE,IAAM,0BAA0B,eAAe,sBAAsB,WAAS,MAAM,OAAO;AAE3F,IAAM,oCAAoC,eAAe,uBAAuB,WACrF,OAAO,QAAQ,OAAO,OAAK,EAAE,SAAS,cAAc,MAAM,CAAC;", "names": [] }