@jetthai/cuora 1.1.13 → 1.1.15

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.15](https://github.com/jetthai/cuora-module/compare/v1.1.14...v1.1.15) (2022-12-24)
6
+
7
+ ### [1.1.14](https://github.com/jetthai/cuora-module/compare/v1.1.13...v1.1.14) (2022-12-24)
8
+
5
9
  ### [1.1.13](https://github.com/jetthai/cuora-module/compare/v1.1.12...v1.1.13) (2022-12-23)
6
10
 
7
11
  ### [1.1.12](https://github.com/jetthai/cuora-module/compare/v1.1.11...v1.1.12) (2022-12-23)
package/dist/bundle.mjs CHANGED
@@ -11701,7 +11701,7 @@ function game_favorite_v2 (request) {
11701
11701
  return createMachine(
11702
11702
  {
11703
11703
  id: 'favorite',
11704
- type: 'parallel',
11704
+ initial: 'fetching',
11705
11705
  context: {
11706
11706
  list: [],
11707
11707
  },
@@ -11717,31 +11717,36 @@ function game_favorite_v2 (request) {
11717
11717
  },
11718
11718
  },
11719
11719
  },
11720
- adding: {
11721
- initial: 'disable',
11720
+ operation: {
11721
+ type: 'parallel',
11722
11722
  states: {
11723
- disable: {},
11724
- enable: {
11725
- invoke: {
11726
- src: 'add',
11727
- onDone: {},
11728
- onError: {
11729
- actions: 'removeFromList',
11723
+ adding: {
11724
+ initial: 'disable',
11725
+ states: {
11726
+ disable: {},
11727
+ enable: {
11728
+ invoke: {
11729
+ src: 'add',
11730
+ onDone: {},
11731
+ onError: {
11732
+ actions: 'removeFromList',
11733
+ },
11734
+ },
11730
11735
  },
11731
11736
  },
11732
11737
  },
11733
- },
11734
- },
11735
- removing: {
11736
- initial: 'disable',
11737
- states: {
11738
- disable: {},
11739
- enable: {
11740
- invoke: {
11741
- src: 'remove',
11742
- onDone: {},
11743
- onError: {
11744
- actions: 'addToList',
11738
+ removing: {
11739
+ initial: 'disable',
11740
+ states: {
11741
+ disable: {},
11742
+ enable: {
11743
+ invoke: {
11744
+ src: 'remove',
11745
+ onDone: {},
11746
+ onError: {
11747
+ actions: 'addToList',
11748
+ },
11749
+ },
11745
11750
  },
11746
11751
  },
11747
11752
  },
@@ -11750,12 +11755,12 @@ function game_favorite_v2 (request) {
11750
11755
  },
11751
11756
  on: {
11752
11757
  ADD: {
11753
- target: 'adding.enable',
11758
+ target: 'operation.adding.enable',
11754
11759
  actions: 'addToList',
11755
11760
  cond: 'isNotExist',
11756
11761
  },
11757
11762
  REMOVE: {
11758
- target: 'removing.enable',
11763
+ target: 'operation.removing.enable',
11759
11764
  actions: 'removeFromList',
11760
11765
  cond: 'isExist',
11761
11766
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -5,7 +5,7 @@ export default function (request) {
5
5
  return createMachine(
6
6
  {
7
7
  id: 'favorite',
8
- type: 'parallel',
8
+ initial: 'fetching',
9
9
  context: {
10
10
  list: [],
11
11
  },
@@ -21,31 +21,36 @@ export default function (request) {
21
21
  },
22
22
  },
23
23
  },
24
- adding: {
25
- initial: 'disable',
24
+ operation: {
25
+ type: 'parallel',
26
26
  states: {
27
- disable: {},
28
- enable: {
29
- invoke: {
30
- src: 'add',
31
- onDone: {},
32
- onError: {
33
- actions: 'removeFromList',
27
+ adding: {
28
+ initial: 'disable',
29
+ states: {
30
+ disable: {},
31
+ enable: {
32
+ invoke: {
33
+ src: 'add',
34
+ onDone: {},
35
+ onError: {
36
+ actions: 'removeFromList',
37
+ },
38
+ },
34
39
  },
35
40
  },
36
41
  },
37
- },
38
- },
39
- removing: {
40
- initial: 'disable',
41
- states: {
42
- disable: {},
43
- enable: {
44
- invoke: {
45
- src: 'remove',
46
- onDone: {},
47
- onError: {
48
- actions: 'addToList',
42
+ removing: {
43
+ initial: 'disable',
44
+ states: {
45
+ disable: {},
46
+ enable: {
47
+ invoke: {
48
+ src: 'remove',
49
+ onDone: {},
50
+ onError: {
51
+ actions: 'addToList',
52
+ },
53
+ },
49
54
  },
50
55
  },
51
56
  },
@@ -54,12 +59,12 @@ export default function (request) {
54
59
  },
55
60
  on: {
56
61
  ADD: {
57
- target: 'adding.enable',
62
+ target: 'operation.adding.enable',
58
63
  actions: 'addToList',
59
64
  cond: 'isNotExist',
60
65
  },
61
66
  REMOVE: {
62
- target: 'removing.enable',
67
+ target: 'operation.removing.enable',
63
68
  actions: 'removeFromList',
64
69
  cond: 'isExist',
65
70
  },