@cuemath/leap 2.8.21-rj-0 → 2.8.21-rj-1

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.
@@ -1,18 +1,21 @@
1
- import { useCallback as a } from "react";
2
- import { usePostUpdateCircleCoachmark as i } from "../../api/update-circle-onboarding/post-circle-coachmark-api.js";
3
- const p = (o, e) => {
1
+ import { useCallback as n } from "react";
2
+ import { usePostUpdateCircleCoachmark as a } from "../../api/update-circle-onboarding/post-circle-coachmark-api.js";
3
+ const p = (o) => {
4
4
  const {
5
- post: t,
6
- isProcessing: r,
7
- onComplete: c,
5
+ post: e,
6
+ isProcessing: t,
7
+ onComplete: r,
8
8
  ...s
9
- } = i(), l = a(() => {
10
- t({
11
- intelenrollment_id: o,
12
- completed_coachmarks: e
13
- });
14
- }, [e, t, o]);
15
- return { ...s, isProcessing: r, onComplete: c, postCircleJourneyCompletion: l };
9
+ } = a(), c = n(
10
+ (l) => {
11
+ e({
12
+ intelenrollment_id: o,
13
+ completed_coachmarks: l
14
+ });
15
+ },
16
+ [e, o]
17
+ );
18
+ return { ...s, isProcessing: t, onComplete: r, postCircleJourneyCompletion: c };
16
19
  };
17
20
  export {
18
21
  p as usePostUpdateCircleJourneyDal
@@ -1 +1 @@
1
- {"version":3,"file":"use-post-update-circle-journey-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-post-update-circle-journey-dal/use-post-update-circle-journey-dal.ts"],"sourcesContent":["import type { TJourneyId } from '../../../../journey/journey-id/journey-id-types';\n\nimport { useCallback } from 'react';\n\nimport { usePostUpdateCircleCoachmark } from '../../api/update-circle-onboarding/post-circle-coachmark-api';\n\nexport const usePostUpdateCircleJourneyDal = (\n userId: string,\n journeyCompletionIds: TJourneyId[],\n): Omit<ReturnType<typeof usePostUpdateCircleCoachmark>, 'data' | 'post'> & {\n postCircleJourneyCompletion: () => void;\n} => {\n const {\n post: postCircleCoachmark,\n isProcessing,\n onComplete,\n ...rest\n } = usePostUpdateCircleCoachmark();\n\n const postCircleJourneyCompletion = useCallback(() => {\n postCircleCoachmark({\n intelenrollment_id: userId,\n completed_coachmarks: journeyCompletionIds,\n });\n }, [journeyCompletionIds, postCircleCoachmark, userId]);\n\n return { ...rest, isProcessing, onComplete, postCircleJourneyCompletion };\n};\n"],"names":["usePostUpdateCircleJourneyDal","userId","journeyCompletionIds","postCircleCoachmark","isProcessing","onComplete","rest","usePostUpdateCircleCoachmark","postCircleJourneyCompletion","useCallback"],"mappings":";;AAMa,MAAAA,IAAgC,CAC3CC,GACAC,MAGG;AACG,QAAA;AAAA,IACJ,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,MACDC,EAA6B,GAE3BC,IAA8BC,EAAY,MAAM;AAChC,IAAAN,EAAA;AAAA,MAClB,oBAAoBF;AAAA,MACpB,sBAAsBC;AAAA,IAAA,CACvB;AAAA,EACA,GAAA,CAACA,GAAsBC,GAAqBF,CAAM,CAAC;AAEtD,SAAO,EAAE,GAAGK,GAAM,cAAAF,GAAc,YAAAC,GAAY,6BAAAG,EAA4B;AAC1E;"}
1
+ {"version":3,"file":"use-post-update-circle-journey-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-post-update-circle-journey-dal/use-post-update-circle-journey-dal.ts"],"sourcesContent":["import type { TJourneyId } from '../../../../journey/journey-id/journey-id-types';\n\nimport { useCallback } from 'react';\n\nimport { usePostUpdateCircleCoachmark } from '../../api/update-circle-onboarding/post-circle-coachmark-api';\n\nexport const usePostUpdateCircleJourneyDal = (\n userId: string,\n): Omit<ReturnType<typeof usePostUpdateCircleCoachmark>, 'data' | 'post'> & {\n postCircleJourneyCompletion: (journeyCompletionIds: TJourneyId[]) => void;\n} => {\n const {\n post: postCircleCoachmark,\n isProcessing,\n onComplete,\n ...rest\n } = usePostUpdateCircleCoachmark();\n\n const postCircleJourneyCompletion = useCallback(\n (journeyCompletionIds: TJourneyId[]) => {\n postCircleCoachmark({\n intelenrollment_id: userId,\n completed_coachmarks: journeyCompletionIds,\n });\n },\n [postCircleCoachmark, userId],\n );\n\n return { ...rest, isProcessing, onComplete, postCircleJourneyCompletion };\n};\n"],"names":["usePostUpdateCircleJourneyDal","userId","postCircleCoachmark","isProcessing","onComplete","rest","usePostUpdateCircleCoachmark","postCircleJourneyCompletion","useCallback","journeyCompletionIds"],"mappings":";;AAMa,MAAAA,IAAgC,CAC3CC,MAGG;AACG,QAAA;AAAA,IACJ,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,MACDC,EAA6B,GAE3BC,IAA8BC;AAAA,IAClC,CAACC,MAAuC;AAClB,MAAAP,EAAA;AAAA,QAClB,oBAAoBD;AAAA,QACpB,sBAAsBQ;AAAA,MAAA,CACvB;AAAA,IACH;AAAA,IACA,CAACP,GAAqBD,CAAM;AAAA,EAAA;AAG9B,SAAO,EAAE,GAAGI,GAAM,cAAAF,GAAc,YAAAC,GAAY,6BAAAG,EAA4B;AAC1E;"}
package/dist/index.d.ts CHANGED
@@ -4954,8 +4954,8 @@ declare const usePostUpdateCircleCoachmark: (opts?: {
4954
4954
  onComplete: (() => void) | undefined;
4955
4955
  };
4956
4956
 
4957
- export declare const usePostUpdateCircleJourneyDal: (userId: string, journeyCompletionIds: TJourneyId[]) => Omit<ReturnType<typeof usePostUpdateCircleCoachmark>, "data" | "post"> & {
4958
- postCircleJourneyCompletion: () => void;
4957
+ export declare const usePostUpdateCircleJourneyDal: (userId: string) => Omit<ReturnType<typeof usePostUpdateCircleCoachmark>, "data" | "post"> & {
4958
+ postCircleJourneyCompletion: (journeyCompletionIds: TJourneyId[]) => void;
4959
4959
  };
4960
4960
 
4961
4961
  export declare const User2Icon: React.FC<React.SVGProps<SVGSVGElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "2.8.21-rj-0",
3
+ "version": "2.8.21-rj-1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"