@tealca/core-components 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,7 +56,7 @@ Take a look at the logic that dispatched this action: `,g,`
56
56
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
57
57
  (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),o||(x.measureTime(()=>{const y=h.getState(),w=Ya(y,"",t,r,i,f);if(w){const{keyPath:O,value:S}=w;console.error(`A non-serializable value was detected in the state, in the path: \`${O}\`. Value:`,S,`
58
58
  Take a look at the reducer(s) handling this action type: ${g.type}.
59
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),x.warnIfExceeded()),m}}}function Es(e){return typeof e=="boolean"}var fE=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{};let a=new Oh;if(r&&(Es(r)?a.push(tE):a.push(rE(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let o={};Es(n)||(o=n),a.unshift(uE(o))}if(s){let o={};Es(s)||(o=s),a.push(dE(o))}if(i){let o={};Es(i)||(o=i),a.unshift(oE(o))}}return a},hE="RTK_autoBatch",Zu=e=>t=>{setTimeout(t,e)},pE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let s=!0,i=!1,a=!1;const o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Zu(10):e.type==="callback"?e.queueNotification:Zu(e.timeout),d=()=>{a=!1,i&&(i=!1,o.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){const h=()=>s&&f(),p=n.subscribe(h);return o.add(f),()=>{p(),o.delete(f)}},dispatch(f){try{return s=!f?.meta?.[hE],i=!s,i&&(a||(a=!0,c(d))),n.dispatch(f)}finally{s=!0}}})},mE=e=>function(r){const{autoBatch:n=!0}=r??{};let s=new Oh(e);return n&&s.push(pE(typeof n=="object"?n:void 0)),s};function jh(e){const t=fE(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Kn(r))c=dh(r);else throw new Error(process.env.NODE_ENV==="production"?Oe(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Oe(2):"`middleware` field must be a callback");let d;if(typeof n=="function"){if(d=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(d))throw new Error(process.env.NODE_ENV==="production"?Oe(3):"when using a middleware builder function, an array of middleware must be returned")}else d=t();if(process.env.NODE_ENV!=="production"&&d.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Oe(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let x=new Set;d.forEach(y=>{if(x.has(y))throw new Error(process.env.NODE_ENV==="production"?Oe(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");x.add(y)})}let f=ri;s&&(f=nE({trace:process.env.NODE_ENV!=="production",...typeof s=="object"&&s}));const h=Fw(...d),p=mE(h);if(process.env.NODE_ENV!=="production"&&o&&typeof o!="function")throw new Error(process.env.NODE_ENV==="production"?Oe(5):"`enhancers` field must be a callback");let g=typeof o=="function"?o(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(g))throw new Error(process.env.NODE_ENV==="production"?Oe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&g.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Oe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&d.length&&!g.includes(h)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=f(...g);return _o(c,a,m)}function Mh(e){const t={},r=[];let n;const s={addCase(i,a){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?Oe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Oe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const o=typeof i=="string"?i:i.type;if(!o)throw new Error(process.env.NODE_ENV==="production"?Oe(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error(process.env.NODE_ENV==="production"?Oe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=a,s},addAsyncThunk(i,a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Oe(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Oe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Oe(31):"`builder.addDefaultCase` can only be called once");return n=i,s}};return e(s),[t,r,n]}function gE(e){return typeof e=="function"}function vE(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Oe(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,s]=Mh(t),i;if(gE(e))i=()=>qu(e());else{const o=qu(e);i=()=>o}function a(o=i(),c){let d=[r[c.type],...n.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return d.filter(f=>!!f).length===0&&(d=[s]),d.reduce((f,h)=>{if(h)if(Ut(f)){const g=h(f,c);return g===void 0?f:g}else{if(mt(f))return Eh(f,p=>h(p,c));{const p=h(f,c);if(p===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return f},o)}return a.getInitialState=i,a}var yE=Symbol.for("rtk-slice-createasyncthunk");function xE(e,t){return`${e}/${t}`}function bE({creators:e}={}){const t=e?.asyncThunk?.[yE];return function(n){const{name:s,reducerPath:i=s}=n;if(!s)throw new Error(process.env.NODE_ENV==="production"?Oe(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof n.reducers=="function"?n.reducers(SE()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,E){const v=typeof S=="string"?S:S.type;if(!v)throw new Error(process.env.NODE_ENV==="production"?Oe(12):"`context.addCase` cannot be called with an empty action type");if(v in c.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Oe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+v);return c.sliceCaseReducersByType[v]=E,d},addMatcher(S,E){return c.sliceMatchers.push({matcher:S,reducer:E}),d},exposeAction(S,E){return c.actionCreators[S]=E,d},exposeCaseReducer(S,E){return c.sliceCaseReducersByName[S]=E,d}};o.forEach(S=>{const E=a[S],v={reducerName:S,type:xE(s,S),createNotation:typeof n.reducers=="function"};OE(E)?CE(v,E,d,t):kE(v,E,d)});function f(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Oe(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[S={},E=[],v=void 0]=typeof n.extraReducers=="function"?Mh(n.extraReducers):[n.extraReducers],b={...S,...c.sliceCaseReducersByType};return vE(n.initialState,k=>{for(let C in b)k.addCase(C,b[C]);for(let C of c.sliceMatchers)k.addMatcher(C.matcher,C.reducer);for(let C of E)k.addMatcher(C.matcher,C.reducer);v&&k.addDefaultCase(v)})}const h=S=>S,p=new Map,g=new WeakMap;let m;function x(S,E){return m||(m=f()),m(S,E)}function y(){return m||(m=f()),m.getInitialState()}function w(S,E=!1){function v(k){let C=k[S];if(typeof C>"u"){if(E)C=ws(g,v,y);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Oe(15):"selectSlice returned undefined for an uninjected slice reducer")}return C}function b(k=h){const C=ws(p,E,()=>new WeakMap);return ws(C,k,()=>{const _={};for(const[M,D]of Object.entries(n.selectors??{}))_[M]=wE(D,k,()=>ws(g,k,y),E);return _})}return{reducerPath:S,getSelectors:b,get selectors(){return b(v)},selectSlice:v}}const O={name:s,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...w(i),injectInto(S,{reducerPath:E,...v}={}){const b=E??i;return S.inject({reducerPath:b,reducer:x},v),{...O,...w(b,!0)}}};return O}}function wE(e,t,r,n){function s(i,...a){let o=t(i);if(typeof o>"u"){if(n)o=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Oe(16):"selectState returned undefined for an uninjected slice reducer")}return e(o,...a)}return s.unwrapped=e,s}var EE=bE();function SE(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kE({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!_E(n))throw new Error(process.env.NODE_ENV==="production"?Oe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Gu(e,a):Gu(e))}function OE(e){return e._reducerDefinitionType==="asyncThunk"}function _E(e){return e._reducerDefinitionType==="reducerWithPrepare"}function CE({type:e,reducerName:t},r,n,s){if(!s)throw new Error(process.env.NODE_ENV==="production"?Oe(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:d,options:f}=r,h=s(e,i,f);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),o&&n.addCase(h.pending,o),c&&n.addCase(h.rejected,c),d&&n.addMatcher(h.settled,d),n.exposeCaseReducer(t,{fulfilled:a||Ss,pending:o||Ss,rejected:c||Ss,settled:d||Ss})}function Ss(){}function Oe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const LE={isLoggedIn:!1,user:null,accessToken:null,refreshToken:null},Th=EE({name:"auth",initialState:LE,reducers:{login:(e,t)=>{e.isLoggedIn=!0,e.user=t.payload.user,e.accessToken=t.payload.accessToken,e.refreshToken=t.payload.refreshToken},logout:e=>{e.isLoggedIn=!1,e.user=null,e.accessToken=null,e.refreshToken=null}}}),{login:Dh,logout:hC}=Th.actions,NE=Th.reducer;var ks={exports:{}},ma={};/**
59
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),x.warnIfExceeded()),m}}}function Es(e){return typeof e=="boolean"}var fE=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{};let a=new Oh;if(r&&(Es(r)?a.push(tE):a.push(rE(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let o={};Es(n)||(o=n),a.unshift(uE(o))}if(s){let o={};Es(s)||(o=s),a.push(dE(o))}if(i){let o={};Es(i)||(o=i),a.unshift(oE(o))}}return a},hE="RTK_autoBatch",Zu=e=>t=>{setTimeout(t,e)},pE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let s=!0,i=!1,a=!1;const o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Zu(10):e.type==="callback"?e.queueNotification:Zu(e.timeout),d=()=>{a=!1,i&&(i=!1,o.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){const h=()=>s&&f(),p=n.subscribe(h);return o.add(f),()=>{p(),o.delete(f)}},dispatch(f){try{return s=!f?.meta?.[hE],i=!s,i&&(a||(a=!0,c(d))),n.dispatch(f)}finally{s=!0}}})},mE=e=>function(r){const{autoBatch:n=!0}=r??{};let s=new Oh(e);return n&&s.push(pE(typeof n=="object"?n:void 0)),s};function jh(e){const t=fE(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Kn(r))c=dh(r);else throw new Error(process.env.NODE_ENV==="production"?Oe(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Oe(2):"`middleware` field must be a callback");let d;if(typeof n=="function"){if(d=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(d))throw new Error(process.env.NODE_ENV==="production"?Oe(3):"when using a middleware builder function, an array of middleware must be returned")}else d=t();if(process.env.NODE_ENV!=="production"&&d.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Oe(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&i){let x=new Set;d.forEach(y=>{if(x.has(y))throw new Error(process.env.NODE_ENV==="production"?Oe(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");x.add(y)})}let f=ri;s&&(f=nE({trace:process.env.NODE_ENV!=="production",...typeof s=="object"&&s}));const h=Fw(...d),p=mE(h);if(process.env.NODE_ENV!=="production"&&o&&typeof o!="function")throw new Error(process.env.NODE_ENV==="production"?Oe(5):"`enhancers` field must be a callback");let g=typeof o=="function"?o(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(g))throw new Error(process.env.NODE_ENV==="production"?Oe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&g.some(x=>typeof x!="function"))throw new Error(process.env.NODE_ENV==="production"?Oe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&d.length&&!g.includes(h)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=f(...g);return _o(c,a,m)}function Mh(e){const t={},r=[];let n;const s={addCase(i,a){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?Oe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Oe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const o=typeof i=="string"?i:i.type;if(!o)throw new Error(process.env.NODE_ENV==="production"?Oe(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error(process.env.NODE_ENV==="production"?Oe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=a,s},addAsyncThunk(i,a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Oe(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Oe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Oe(31):"`builder.addDefaultCase` can only be called once");return n=i,s}};return e(s),[t,r,n]}function gE(e){return typeof e=="function"}function vE(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Oe(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,s]=Mh(t),i;if(gE(e))i=()=>qu(e());else{const o=qu(e);i=()=>o}function a(o=i(),c){let d=[r[c.type],...n.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return d.filter(f=>!!f).length===0&&(d=[s]),d.reduce((f,h)=>{if(h)if(Ut(f)){const g=h(f,c);return g===void 0?f:g}else{if(mt(f))return Eh(f,p=>h(p,c));{const p=h(f,c);if(p===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return f},o)}return a.getInitialState=i,a}var yE=Symbol.for("rtk-slice-createasyncthunk");function xE(e,t){return`${e}/${t}`}function bE({creators:e}={}){const t=e?.asyncThunk?.[yE];return function(n){const{name:s,reducerPath:i=s}=n;if(!s)throw new Error(process.env.NODE_ENV==="production"?Oe(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof n.reducers=="function"?n.reducers(SE()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,E){const v=typeof S=="string"?S:S.type;if(!v)throw new Error(process.env.NODE_ENV==="production"?Oe(12):"`context.addCase` cannot be called with an empty action type");if(v in c.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Oe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+v);return c.sliceCaseReducersByType[v]=E,d},addMatcher(S,E){return c.sliceMatchers.push({matcher:S,reducer:E}),d},exposeAction(S,E){return c.actionCreators[S]=E,d},exposeCaseReducer(S,E){return c.sliceCaseReducersByName[S]=E,d}};o.forEach(S=>{const E=a[S],v={reducerName:S,type:xE(s,S),createNotation:typeof n.reducers=="function"};OE(E)?CE(v,E,d,t):kE(v,E,d)});function f(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Oe(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[S={},E=[],v=void 0]=typeof n.extraReducers=="function"?Mh(n.extraReducers):[n.extraReducers],b={...S,...c.sliceCaseReducersByType};return vE(n.initialState,k=>{for(let C in b)k.addCase(C,b[C]);for(let C of c.sliceMatchers)k.addMatcher(C.matcher,C.reducer);for(let C of E)k.addMatcher(C.matcher,C.reducer);v&&k.addDefaultCase(v)})}const h=S=>S,p=new Map,g=new WeakMap;let m;function x(S,E){return m||(m=f()),m(S,E)}function y(){return m||(m=f()),m.getInitialState()}function w(S,E=!1){function v(k){let C=k[S];if(typeof C>"u"){if(E)C=ws(g,v,y);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Oe(15):"selectSlice returned undefined for an uninjected slice reducer")}return C}function b(k=h){const C=ws(p,E,()=>new WeakMap);return ws(C,k,()=>{const _={};for(const[M,D]of Object.entries(n.selectors??{}))_[M]=wE(D,k,()=>ws(g,k,y),E);return _})}return{reducerPath:S,getSelectors:b,get selectors(){return b(v)},selectSlice:v}}const O={name:s,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...w(i),injectInto(S,{reducerPath:E,...v}={}){const b=E??i;return S.inject({reducerPath:b,reducer:x},v),{...O,...w(b,!0)}}};return O}}function wE(e,t,r,n){function s(i,...a){let o=t(i);if(typeof o>"u"){if(n)o=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Oe(16):"selectState returned undefined for an uninjected slice reducer")}return e(o,...a)}return s.unwrapped=e,s}var EE=bE();function SE(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kE({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!_E(n))throw new Error(process.env.NODE_ENV==="production"?Oe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Gu(e,a):Gu(e))}function OE(e){return e._reducerDefinitionType==="asyncThunk"}function _E(e){return e._reducerDefinitionType==="reducerWithPrepare"}function CE({type:e,reducerName:t},r,n,s){if(!s)throw new Error(process.env.NODE_ENV==="production"?Oe(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:d,options:f}=r,h=s(e,i,f);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),o&&n.addCase(h.pending,o),c&&n.addCase(h.rejected,c),d&&n.addMatcher(h.settled,d),n.exposeCaseReducer(t,{fulfilled:a||Ss,pending:o||Ss,rejected:c||Ss,settled:d||Ss})}function Ss(){}function Oe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const LE={isAuthenticated:!1,user:null,accessToken:null,refreshToken:null},Th=EE({name:"auth",initialState:LE,reducers:{login:(e,t)=>{e.isAuthenticated=!0,e.user=t.payload.user,e.accessToken=t.payload.accessToken,e.refreshToken=t.payload.refreshToken},logout:e=>{e.isAuthenticated=!1,e.user=null,e.accessToken=null,e.refreshToken=null}}}),{login:Dh,logout:hC}=Th.actions,NE=Th.reducer;var ks={exports:{}},ma={};/**
60
60
  * @license React
61
61
  * use-sync-external-store-with-selector.production.js
62
62
  *
@@ -14191,7 +14191,7 @@ function Ne(e) {
14191
14191
  return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
14192
14192
  }
14193
14193
  const pk = {
14194
- isLoggedIn: !1,
14194
+ isAuthenticated: !1,
14195
14195
  user: null,
14196
14196
  accessToken: null,
14197
14197
  refreshToken: null
@@ -14206,7 +14206,7 @@ const pk = {
14206
14206
  * @param action - The action containing the login response.
14207
14207
  */
14208
14208
  login: (e, t) => {
14209
- e.isLoggedIn = !0, e.user = t.payload.user, e.accessToken = t.payload.accessToken, e.refreshToken = t.payload.refreshToken;
14209
+ e.isAuthenticated = !0, e.user = t.payload.user, e.accessToken = t.payload.accessToken, e.refreshToken = t.payload.refreshToken;
14210
14210
  },
14211
14211
  /**
14212
14212
  * Logs the user out.
@@ -14214,7 +14214,7 @@ const pk = {
14214
14214
  * @param state - The current state.
14215
14215
  */
14216
14216
  logout: (e) => {
14217
- e.isLoggedIn = !1, e.user = null, e.accessToken = null, e.refreshToken = null;
14217
+ e.isAuthenticated = !1, e.user = null, e.accessToken = null, e.refreshToken = null;
14218
14218
  }
14219
14219
  }
14220
14220
  }), { login: Ih, logout: CL } = Rh.actions, gk = Rh.reducer;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tealca/core-components",
3
3
  "private": false,
4
- "version": "1.0.22",
4
+ "version": "1.0.23",
5
5
  "description": "A collection of shared UI components for Tealca's applications.",
6
6
  "main": "dist/tealca-core-components.cjs.js",
7
7
  "module": "dist/tealca-core-components.es.js",