@jetthai/cuora 1.1.13 → 1.1.15-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.
- package/CHANGELOG.md +6 -0
- package/dist/bundle.mjs +49 -27
- package/package.json +1 -1
- package/src/machine/deposit/loadcard_vn.js +20 -3
- package/src/machine/game_favorite_v2.js +29 -24
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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-1](https://github.com/jetthai/cuora-module/compare/v1.1.15...v1.1.15-1) (2023-01-03)
|
|
6
|
+
|
|
7
|
+
### [1.1.15](https://github.com/jetthai/cuora-module/compare/v1.1.14...v1.1.15) (2022-12-24)
|
|
8
|
+
|
|
9
|
+
### [1.1.14](https://github.com/jetthai/cuora-module/compare/v1.1.13...v1.1.14) (2022-12-24)
|
|
10
|
+
|
|
5
11
|
### [1.1.13](https://github.com/jetthai/cuora-module/compare/v1.1.12...v1.1.13) (2022-12-23)
|
|
6
12
|
|
|
7
13
|
### [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
|
-
|
|
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
|
-
|
|
11721
|
-
|
|
11720
|
+
operation: {
|
|
11721
|
+
type: 'parallel',
|
|
11722
11722
|
states: {
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
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
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
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
|
},
|
|
@@ -16288,6 +16293,7 @@ function loadcard_vn (request) {
|
|
|
16288
16293
|
currentCategory: 'loadcard',
|
|
16289
16294
|
currentMethod: null,
|
|
16290
16295
|
currentPayment: null,
|
|
16296
|
+
result: null,
|
|
16291
16297
|
},
|
|
16292
16298
|
states: {
|
|
16293
16299
|
loading: {
|
|
@@ -16364,9 +16370,15 @@ function loadcard_vn (request) {
|
|
|
16364
16370
|
target: 'debouncing',
|
|
16365
16371
|
actions: 'setAmount',
|
|
16366
16372
|
},
|
|
16367
|
-
CONFIRM:
|
|
16368
|
-
|
|
16369
|
-
|
|
16373
|
+
CONFIRM: [
|
|
16374
|
+
{
|
|
16375
|
+
target: 'submitting',
|
|
16376
|
+
cond: 'jumpLinkEnable',
|
|
16377
|
+
},
|
|
16378
|
+
{
|
|
16379
|
+
target: 'cardInfo',
|
|
16380
|
+
},
|
|
16381
|
+
],
|
|
16370
16382
|
BACK: {
|
|
16371
16383
|
target: 'loaded',
|
|
16372
16384
|
},
|
|
@@ -16399,6 +16411,7 @@ function loadcard_vn (request) {
|
|
|
16399
16411
|
src: 'submitDeposit',
|
|
16400
16412
|
onDone: {
|
|
16401
16413
|
target: 'submitted',
|
|
16414
|
+
actions: 'setResult',
|
|
16402
16415
|
},
|
|
16403
16416
|
onError: {
|
|
16404
16417
|
target: 'cardInfo',
|
|
@@ -16465,12 +16478,21 @@ function loadcard_vn (request) {
|
|
|
16465
16478
|
calculation: null,
|
|
16466
16479
|
}
|
|
16467
16480
|
}),
|
|
16481
|
+
setResult: assign((context, event) => {
|
|
16482
|
+
return {
|
|
16483
|
+
result: event.data,
|
|
16484
|
+
}
|
|
16485
|
+
}),
|
|
16468
16486
|
},
|
|
16469
16487
|
guards: {
|
|
16470
16488
|
isSubmittable: (context, event) => {
|
|
16471
16489
|
const { cardNumber, serialNumber } = context;
|
|
16472
16490
|
return cardNumber && serialNumber
|
|
16473
16491
|
},
|
|
16492
|
+
jumpLinkEnable: (context, event) => {
|
|
16493
|
+
const { selectedCard } = context;
|
|
16494
|
+
return selectedCard.jumpLinkEnable === 1
|
|
16495
|
+
},
|
|
16474
16496
|
},
|
|
16475
16497
|
services: {
|
|
16476
16498
|
fetchInitData: async (context, event) => {
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ export default function (request) {
|
|
|
21
21
|
currentCategory: 'loadcard',
|
|
22
22
|
currentMethod: null,
|
|
23
23
|
currentPayment: null,
|
|
24
|
+
result: null,
|
|
24
25
|
},
|
|
25
26
|
states: {
|
|
26
27
|
loading: {
|
|
@@ -97,9 +98,15 @@ export default function (request) {
|
|
|
97
98
|
target: 'debouncing',
|
|
98
99
|
actions: 'setAmount',
|
|
99
100
|
},
|
|
100
|
-
CONFIRM:
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
CONFIRM: [
|
|
102
|
+
{
|
|
103
|
+
target: 'submitting',
|
|
104
|
+
cond: 'jumpLinkEnable',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
target: 'cardInfo',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
103
110
|
BACK: {
|
|
104
111
|
target: 'loaded',
|
|
105
112
|
},
|
|
@@ -132,6 +139,7 @@ export default function (request) {
|
|
|
132
139
|
src: 'submitDeposit',
|
|
133
140
|
onDone: {
|
|
134
141
|
target: 'submitted',
|
|
142
|
+
actions: 'setResult',
|
|
135
143
|
},
|
|
136
144
|
onError: {
|
|
137
145
|
target: 'cardInfo',
|
|
@@ -198,12 +206,21 @@ export default function (request) {
|
|
|
198
206
|
calculation: null,
|
|
199
207
|
}
|
|
200
208
|
}),
|
|
209
|
+
setResult: assign((context, event) => {
|
|
210
|
+
return {
|
|
211
|
+
result: event.data,
|
|
212
|
+
}
|
|
213
|
+
}),
|
|
201
214
|
},
|
|
202
215
|
guards: {
|
|
203
216
|
isSubmittable: (context, event) => {
|
|
204
217
|
const { cardNumber, serialNumber } = context
|
|
205
218
|
return cardNumber && serialNumber
|
|
206
219
|
},
|
|
220
|
+
jumpLinkEnable: (context, event) => {
|
|
221
|
+
const { selectedCard } = context
|
|
222
|
+
return selectedCard.jumpLinkEnable === 1
|
|
223
|
+
},
|
|
207
224
|
},
|
|
208
225
|
services: {
|
|
209
226
|
fetchInitData: async (context, event) => {
|
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'favorite',
|
|
8
|
-
|
|
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
|
-
|
|
25
|
-
|
|
24
|
+
operation: {
|
|
25
|
+
type: 'parallel',
|
|
26
26
|
states: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
},
|