{ "version": 3, "sources": ["libs/mediio-plattform/shared/helper-links/help-center/data-access/src/lib/store/help-center.actions.ts", "libs/mediio-plattform/shared/helper-links/help-center/data-access/src/lib/store/help-center.reducer.ts", "libs/mediio-plattform/shared/helper-links/help-center/data-access/src/lib/store/help-center.selectors.ts", "libs/mediio-plattform/shared/helper-links/help-center/data-access/src/lib/store/help-center.facade.ts", "libs/mediio-plattform/shared/helper-links/help-center/domain/src/lib/models/help-center-type.ts"], "sourcesContent": ["import { createActionGroup, emptyProps, props } from '@ngrx/store';\r\n\r\nimport { HelpCenterSettings } from '@mp/shared/helper-links/help-center/domain';\r\n\r\nexport const HelpCenterActions = createActionGroup({\r\n source: 'Help Center',\r\n events: {\r\n fetchHelpCenterSettings: emptyProps(),\r\n fetchHelpCenterSettingsSuccess: props<{ helpCenterSettings: HelpCenterSettings }>(),\r\n fetchHelpCenterSettingsError: emptyProps(),\r\n\r\n updateHelpCenterSettings: props<{ helpCenterSettings: HelpCenterSettings }>(),\r\n updateHelpCenterSettingsSuccess: props<{ helpCenterSettings: HelpCenterSettings }>(),\r\n updateHelpCenterSettingsError: emptyProps(),\r\n },\r\n});\r\n", "import { createReducer, on } from '@ngrx/store';\r\n\r\nimport { HelpCenterSettings } from '@mp/shared/helper-links/help-center/domain';\r\n\r\nimport { HelpCenterActions } from './help-center.actions';\r\n\r\nexport const helpCenterFeatureKey = 'mp-help-center';\r\n\r\nexport interface HelpCenterState {\r\n helpCenterSettings: HelpCenterSettings | undefined;\r\n isLoading: boolean;\r\n}\r\n\r\nexport const initialState: HelpCenterState = {\r\n helpCenterSettings: undefined,\r\n isLoading: false,\r\n};\r\n\r\nexport const helpCenterReducer = createReducer(\r\n initialState,\r\n on(\r\n HelpCenterActions.fetchHelpCenterSettings,\r\n (state: HelpCenterState): HelpCenterState => ({\r\n ...state,\r\n helpCenterSettings: undefined,\r\n isLoading: true,\r\n }),\r\n ),\r\n on(\r\n HelpCenterActions.fetchHelpCenterSettingsSuccess,\r\n (state: HelpCenterState, { helpCenterSettings }): HelpCenterState => ({\r\n ...state,\r\n helpCenterSettings,\r\n isLoading: false,\r\n }),\r\n ),\r\n on(\r\n HelpCenterActions.fetchHelpCenterSettingsError,\r\n (state: HelpCenterState): HelpCenterState => ({\r\n ...state,\r\n helpCenterSettings: undefined,\r\n isLoading: false,\r\n }),\r\n ),\r\n\r\n on(\r\n HelpCenterActions.updateHelpCenterSettings,\r\n (state: HelpCenterState): HelpCenterState => ({\r\n ...state,\r\n isLoading: true,\r\n }),\r\n ),\r\n on(\r\n HelpCenterActions.updateHelpCenterSettingsSuccess,\r\n (state: HelpCenterState, { helpCenterSettings }): HelpCenterState => ({\r\n ...state,\r\n helpCenterSettings,\r\n isLoading: false,\r\n }),\r\n ),\r\n on(\r\n HelpCenterActions.updateHelpCenterSettingsError,\r\n (state: HelpCenterState): HelpCenterState => ({\r\n ...state,\r\n isLoading: false,\r\n }),\r\n ),\r\n);\r\n", "import { createFeatureSelector, createSelector } from '@ngrx/store';\r\n\r\nimport { HelpCenterState, helpCenterFeatureKey } from './help-center.reducer';\r\n\r\nexport const selectHelpCenterState = createFeatureSelector(helpCenterFeatureKey);\r\n\r\nexport const selectHelpCenterSettings = createSelector(selectHelpCenterState, (state) => state.helpCenterSettings);\r\n\r\nexport const selectIsLoading = createSelector(selectHelpCenterState, (state) => state.isLoading);\r\n", "import { Injectable } from '@angular/core';\r\nimport { Actions, ofType } from '@ngrx/effects';\r\nimport { Store } from '@ngrx/store';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { HelpCenterSettings } from '@mp/shared/helper-links/help-center/domain';\r\n\r\nimport { HelpCenterActions } from './help-center.actions';\r\nimport { selectHelpCenterSettings, selectIsLoading } from './help-center.selectors';\r\n\r\n@Injectable()\r\nexport class HelpCenterFacade {\r\n readonly helpCenterSettings$: Observable =\r\n this.store$.select(selectHelpCenterSettings);\r\n\r\n readonly isLoading$: Observable = this.store$.select(selectIsLoading);\r\n\r\n readonly updateHelpCenterSettingsSuccess$: Observable = this.actions$.pipe(\r\n ofType(HelpCenterActions.updateHelpCenterSettingsSuccess),\r\n );\r\n\r\n constructor(\r\n private readonly store$: Store,\r\n private readonly actions$: Actions,\r\n ) {}\r\n\r\n fetchHelpCenterSettings(): void {\r\n this.store$.dispatch(HelpCenterActions.fetchHelpCenterSettings());\r\n }\r\n\r\n updateHelpCenterSettings(helpCenterSettings: HelpCenterSettings): void {\r\n this.store$.dispatch(HelpCenterActions.updateHelpCenterSettings({ helpCenterSettings }));\r\n }\r\n}\r\n", "export enum HelpCenterType {\r\n Disabled = 'Disabled',\r\n Zendesk = 'Zendesk',\r\n DirectLink = 'DirectLink',\r\n}\r\n"], "mappings": "wOAIO,IAAMA,EAAoBC,EAAkB,CACjDC,OAAQ,cACRC,OAAQ,CACNC,wBAAyBC,EAAU,EACnCC,+BAAgCC,EAAK,EACrCC,6BAA8BH,EAAU,EAExCI,yBAA0BF,EAAK,EAC/BG,gCAAiCH,EAAK,EACtCI,8BAA+BN,EAAU,GAE5C,ECTM,IAAMO,EAAuB,iBAOvBC,EAAgC,CAC3CC,mBAAoBC,OACpBC,UAAW,IAGAC,EAAoBC,EAC/BL,EACAM,EACEC,EAAkBC,wBACjBC,GAA6CC,EAAAC,EAAA,GACzCF,GADyC,CAE5CR,mBAAoBC,OACpBC,UAAW,IACX,EAEJG,EACEC,EAAkBK,+BAClB,CAACH,EAAwB,CAAER,mBAAAA,CAAkB,IAAyBS,EAAAC,EAAA,GACjEF,GADiE,CAEpER,mBAAAA,EACAE,UAAW,IACX,EAEJG,EACEC,EAAkBM,6BACjBJ,GAA6CC,EAAAC,EAAA,GACzCF,GADyC,CAE5CR,mBAAoBC,OACpBC,UAAW,IACX,EAGJG,EACEC,EAAkBO,yBACjBL,GAA6CC,EAAAC,EAAA,GACzCF,GADyC,CAE5CN,UAAW,IACX,EAEJG,EACEC,EAAkBQ,gCAClB,CAACN,EAAwB,CAAER,mBAAAA,CAAkB,IAAyBS,EAAAC,EAAA,GACjEF,GADiE,CAEpER,mBAAAA,EACAE,UAAW,IACX,EAEJG,EACEC,EAAkBS,8BACjBP,GAA6CC,EAAAC,EAAA,GACzCF,GADyC,CAE5CN,UAAW,IACX,CACH,EC9DI,IAAMc,EAAwBC,EAAuCC,CAAoB,EAEnFC,EAA2BC,EAAeJ,EAAwBK,GAAUA,EAAMC,kBAAkB,EAEpGC,EAAkBH,EAAeJ,EAAwBK,GAAUA,EAAMG,SAAS,ECG/F,IAAaC,GAAgB,IAAA,CAAvB,MAAOA,CAAgB,CAU3BC,YACmBC,EACAC,EAAiB,CADjB,KAAAD,OAAAA,EACA,KAAAC,SAAAA,EAXV,KAAAC,oBACP,KAAKF,OAAOG,OAAOC,CAAwB,EAEpC,KAAAC,WAAkC,KAAKL,OAAOG,OAAOG,CAAe,EAEpE,KAAAC,iCAAwD,KAAKN,SAASO,KAC7EC,EAAOC,EAAkBC,+BAA+B,CAAC,CAMxD,CAEHC,yBAAuB,CACrB,KAAKZ,OAAOa,SAASH,EAAkBE,wBAAuB,CAAE,CAClE,CAEAE,yBAAyBC,EAAsC,CAC7D,KAAKf,OAAOa,SAASH,EAAkBI,yBAAyB,CAAEC,mBAAAA,CAAkB,CAAE,CAAC,CACzF,iDArBWjB,GAAgBkB,EAAAC,CAAA,EAAAD,EAAAE,CAAA,CAAA,CAAA,CAAA,iCAAhBpB,EAAgBqB,QAAhBrB,EAAgBsB,SAAA,CAAA,CAAA,SAAhBtB,CAAgB,GAAA,ECX7B,IAAYuB,EAAZ,SAAYA,EAAc,CACxBA,OAAAA,EAAA,SAAA,WACAA,EAAA,QAAA,UACAA,EAAA,WAAA,aAHUA,CAIZ,EAJYA,GAAc,CAAA,CAAA", "names": ["HelpCenterActions", "createActionGroup", "source", "events", "fetchHelpCenterSettings", "emptyProps", "fetchHelpCenterSettingsSuccess", "props", "fetchHelpCenterSettingsError", "updateHelpCenterSettings", "updateHelpCenterSettingsSuccess", "updateHelpCenterSettingsError", "helpCenterFeatureKey", "initialState", "helpCenterSettings", "undefined", "isLoading", "helpCenterReducer", "createReducer", "on", "HelpCenterActions", "fetchHelpCenterSettings", "state", "__spreadProps", "__spreadValues", "fetchHelpCenterSettingsSuccess", "fetchHelpCenterSettingsError", "updateHelpCenterSettings", "updateHelpCenterSettingsSuccess", "updateHelpCenterSettingsError", "selectHelpCenterState", "createFeatureSelector", "helpCenterFeatureKey", "selectHelpCenterSettings", "createSelector", "state", "helpCenterSettings", "selectIsLoading", "isLoading", "HelpCenterFacade", "constructor", "store$", "actions$", "helpCenterSettings$", "select", "selectHelpCenterSettings", "isLoading$", "selectIsLoading", "updateHelpCenterSettingsSuccess$", "pipe", "ofType", "HelpCenterActions", "updateHelpCenterSettingsSuccess", "fetchHelpCenterSettings", "dispatch", "updateHelpCenterSettings", "helpCenterSettings", "\u0275\u0275inject", "Store", "Actions", "factory", "\u0275fac", "HelpCenterType"] }