@speakableio/core 0.1.19 → 0.1.20

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.
package/dist/index.js CHANGED
@@ -1618,11 +1618,10 @@ function useUpdateScore() {
1618
1618
  function useUpdateCardScore({
1619
1619
  isAssignment,
1620
1620
  activityId,
1621
- userId
1621
+ userId,
1622
+ set
1622
1623
  }) {
1623
1624
  const { queryClient } = useSpeakableApi();
1624
- const querySet = useSet({ setId: activityId });
1625
- const dataCurrentSet = querySet.data;
1626
1625
  const queryKey = scoreQueryKeys.byId(activityId);
1627
1626
  const mutation = _reactquery.useMutation.call(void 0, {
1628
1627
  mutationFn: async ({ cardId, cardScore }) => {
@@ -1636,7 +1635,7 @@ function useUpdateCardScore({
1636
1635
  const { progress, score, newScoreUpdated, updatedCardScore } = getScoreUpdated({
1637
1636
  previousScores: _nullishCoalesce(previousScores, () => ( {})),
1638
1637
  cardId,
1639
- set: _nullishCoalesce(dataCurrentSet, () => ( void 0)),
1638
+ set,
1640
1639
  cardScore
1641
1640
  });
1642
1641
  await updateCardScore({
@@ -1658,7 +1657,7 @@ function useUpdateCardScore({
1658
1657
  score: previousScore,
1659
1658
  cardId,
1660
1659
  cardScore,
1661
- set: _nullishCoalesce(dataCurrentSet, () => ( void 0))
1660
+ set
1662
1661
  });
1663
1662
  return {
1664
1663
  ...previousScore,
@@ -1905,7 +1904,8 @@ function useActivity({
1905
1904
  const { mutationUpdateCardScore } = useUpdateCardScore({
1906
1905
  activityId,
1907
1906
  isAssignment,
1908
- userId
1907
+ userId,
1908
+ set: _nullishCoalesce(querySet.data, () => ( void 0))
1909
1909
  });
1910
1910
  const { mutationClearScore } = useClearScore();
1911
1911
  const { submitAssignmentScore: submitAssignmentScore2 } = useSubmitAssignmentScore({
package/dist/index.mjs CHANGED
@@ -1618,11 +1618,10 @@ function useUpdateScore() {
1618
1618
  function useUpdateCardScore({
1619
1619
  isAssignment,
1620
1620
  activityId,
1621
- userId
1621
+ userId,
1622
+ set
1622
1623
  }) {
1623
1624
  const { queryClient } = useSpeakableApi();
1624
- const querySet = useSet({ setId: activityId });
1625
- const dataCurrentSet = querySet.data;
1626
1625
  const queryKey = scoreQueryKeys.byId(activityId);
1627
1626
  const mutation = useMutation2({
1628
1627
  mutationFn: async ({ cardId, cardScore }) => {
@@ -1636,7 +1635,7 @@ function useUpdateCardScore({
1636
1635
  const { progress, score, newScoreUpdated, updatedCardScore } = getScoreUpdated({
1637
1636
  previousScores: previousScores ?? {},
1638
1637
  cardId,
1639
- set: dataCurrentSet ?? void 0,
1638
+ set,
1640
1639
  cardScore
1641
1640
  });
1642
1641
  await updateCardScore({
@@ -1658,7 +1657,7 @@ function useUpdateCardScore({
1658
1657
  score: previousScore,
1659
1658
  cardId,
1660
1659
  cardScore,
1661
- set: dataCurrentSet ?? void 0
1660
+ set
1662
1661
  });
1663
1662
  return {
1664
1663
  ...previousScore,
@@ -1905,7 +1904,8 @@ function useActivity({
1905
1904
  const { mutationUpdateCardScore } = useUpdateCardScore({
1906
1905
  activityId,
1907
1906
  isAssignment,
1908
- userId
1907
+ userId,
1908
+ set: querySet.data ?? void 0
1909
1909
  });
1910
1910
  const { mutationClearScore } = useClearScore();
1911
1911
  const { submitAssignmentScore: submitAssignmentScore2 } = useSubmitAssignmentScore({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakableio/core",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Speakable-io/speakable-core.git"