@acoustic-content-sdk/redux-feature-auth-layout
Version:
Implementation of a redux feature to manage authoring layouts.
2 lines • 3.23 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("redux-actions"),require("@acoustic-content-sdk/redux-store"),require("@acoustic-content-sdk/redux-utils"),require("@acoustic-content-sdk/redux-feature-load"),require("@acoustic-content-sdk/redux-feature-login"),require("@acoustic-content-sdk/utils"),require("redux-observable"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@acoustic-content-sdk/redux-feature-auth-layout",["exports","redux-actions","@acoustic-content-sdk/redux-store","@acoustic-content-sdk/redux-utils","@acoustic-content-sdk/redux-feature-load","@acoustic-content-sdk/redux-feature-login","@acoustic-content-sdk/utils","redux-observable","rxjs/operators"],t):t(((e=e||self)["acoustic-content-sdk"]=e["acoustic-content-sdk"]||{},e["acoustic-content-sdk"]["redux-feature-auth-layout"]={}),e.ReduxActions,e["acoustic-content-sdk"]["redux-store"],e["acoustic-content-sdk"]["redux-utils"],e["acoustic-content-sdk"]["redux-feature-load"],e["acoustic-content-sdk"]["redux-feature-login"],e["acoustic-content-sdk"].utils,e.ReduxObservable,e.rxjs.operators)}(this,(function(e,t,o,u,r,a,A,n,c){"use strict";var i,T,s={version:{major:"9",minor:"0",patch:"10076",branch:"master"},build:new Date(1585229427693)},_=t.createAction("ACTION_ADD_AUTH_LAYOUT"),d=t.createAction("ACTION_SET_AUTH_LAYOUT"),O=t.createAction("ACTION_LOAD_AUTH_LAYOUT"),U=t.createAction("ACTION_GUARANTEE_AUTH_LAYOUT"),L=t.createAction("ACTION_ADD_AUTH_LAYOUT_IF_NONEXISTENT"),N=function(e,t){return u.updateItemsWithRevision(e,o.selectPayload(t))},l=t.handleActions(((i={}).ACTION_ADD_AUTH_LAYOUT=N,i.ACTION_SET_AUTH_LAYOUT=N,i),{});var I=((T={}).authLayout=l,T),E=o.selectFeature("authLayout");var x=function(e,t,u){var a=u.fetchText,i=u.logSvc.get("AuthLayoutEpic"),T=r.createAuthenticatedLoader(t,(function(e){return A.rxPipe(a("authoring/v1/layouts/"+encodeURIComponent(e)+"?"+r.PROJECT_ID_QUERY_PARAM),c.map(A.jsonParse),c.map(_))}),i);return A.rxPipe(e,n.ofType("ACTION_LOAD_AUTH_LAYOUT"),c.map(o.selectPayload),T)};var y=u.addToSetEpic("ACTION_ADD_AUTH_LAYOUT","ACTION_SET_AUTH_LAYOUT"),f=r.guaranteeEpic("ACTION_GUARANTEE_AUTH_LAYOUT",O,E),h=r.nonExistentEpic("ACTION_ADD_AUTH_LAYOUT_IF_NONEXISTENT",_,u.getDeliveryIdFromAuthoringItem,E),D=n.combineEpics(x,f,h,y),p=o.createReduxFeatureModule("authLayout",l,D,[r.loadingFeature,a.loggedInFeature]);e.ACTION_ADD_AUTH_LAYOUT="ACTION_ADD_AUTH_LAYOUT",e.ACTION_ADD_AUTH_LAYOUT_IF_NONEXISTENT="ACTION_ADD_AUTH_LAYOUT_IF_NONEXISTENT",e.ACTION_GUARANTEE_AUTH_LAYOUT="ACTION_GUARANTEE_AUTH_LAYOUT",e.ACTION_LOAD_AUTH_LAYOUT="ACTION_LOAD_AUTH_LAYOUT",e.ACTION_SET_AUTH_LAYOUT="ACTION_SET_AUTH_LAYOUT",e.AUTH_LAYOUT_FEATURE="authLayout",e.VERSION=s,e.addAuthoringLayoutAction=_,e.addAuthoringLayoutIfNonExistentAction=L,e.authLayoutFeatureReducer=I,e.authoringLayoutFeature=p,e.authoringLayoutReducer=l,e.guaranteeAuthoringLayoutAction=U,e.loadAuthoringLayoutAction=O,e.selectAuthLayoutFeature=E,e.selectAuthoringLayout=function(e){return u.selectByDeliveryId(e)},e.setAuthoringLayoutAction=d,e.ɵa=D,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=acoustic-content-sdk-redux-feature-auth-layout.umd.min.js.map