@everymatrix/lottery-program-wof 1.22.2 → 1.22.6

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.
Files changed (61) hide show
  1. package/dist/lottery-program-wof.js +1244 -2170
  2. package/dist/lottery-program-wof.js.map +1 -1
  3. package/index.html +2 -2
  4. package/package.json +2 -2
  5. package/src/LotteryProgramWof.svelte +7 -6
  6. package/src/business.ts +11 -6
  7. package/src/calc.point.ts +1 -112
  8. package/src/calc.ts +0 -6
  9. package/src/class.svgcalc.ts +35 -210
  10. package/src/images/theme.bg.blackring.svg +10 -0
  11. package/src/images/theme.bg.halo.svg +27 -0
  12. package/src/images/theme1Bg3.svg +15 -0
  13. package/src/images/theme2Bg3.svg +11 -0
  14. package/src/images/theme2Center.svg +36 -0
  15. package/src/images/theme3Bg1.svg +29 -0
  16. package/src/images/theme3Bg2.svg +19 -0
  17. package/src/images/theme3Center.svg +77 -0
  18. package/src/images/theme7Arrow.svg +67 -0
  19. package/src/images/theme7Bg1.svg +786 -0
  20. package/src/images/theme7Bg2.svg +40 -0
  21. package/src/images/theme7Bg3.svg +26 -0
  22. package/src/images/theme7Center.svg +72 -0
  23. package/src/images/theme7Light.svg +17 -0
  24. package/src/images/themeCenter1.svg +76 -0
  25. package/src/images/themeCenter2.svg +58 -0
  26. package/src/images/{areaSec.svg → themePointerArea.svg} +37 -4
  27. package/src/images/themeShadow.svg +27 -0
  28. package/src/private.item.svelte +13 -16
  29. package/src/private.item.svg.scss +179 -20
  30. package/src/private.item.svg.svelte +89 -135
  31. package/src/private.message.svelte +33 -12
  32. package/src/private.outcomes.svelte +1 -0
  33. package/src/themes.image.center.ts +61 -134
  34. package/src/themes.ts +8 -231
  35. package/src/translations.js +2 -2
  36. package/src/business.dom.test.ts +0 -34
  37. package/src/business.dom.ts +0 -21
  38. package/src/images/area.svg +0 -11
  39. package/src/images/areaV1.svg +0 -18
  40. package/src/images/areaV2.svg +0 -17
  41. package/src/images/background.svg +0 -27
  42. package/src/images/background3.svg +0 -13
  43. package/src/images/backgroundShadow.svg +0 -22
  44. package/src/images/centerArrow.svg +0 -50
  45. package/src/images/centerArrow1.svg +0 -18
  46. package/src/images/centerArrow2.svg +0 -5
  47. package/src/images/centerArrow3.svg +0 -46
  48. package/src/images/centerArrowBg.svg +0 -12
  49. package/src/images/centerBackground1.svg +0 -21
  50. package/src/images/centerBackground2.svg +0 -24
  51. package/src/images/centerCircle.svg +0 -24
  52. package/src/images/centerPack.svg +0 -16
  53. package/src/images/centerText3.svg +0 -3
  54. package/src/images/partition1.svg +0 -10
  55. package/src/images/spin.svg +0 -13
  56. package/src/themes.image.base.ts +0 -69
  57. package/src/themes.image.pointer.ts +0 -51
  58. package/src/themes.partitions.ts +0 -193
  59. /package/src/images/{pointerArrow.svg → theme2Arrow.svg} +0 -0
  60. /package/src/images/{pointerArrow3.svg → theme3Arrow.svg} +0 -0
  61. /package/src/images/{light.svg → themePartitionLight.svg} +0 -0
@@ -1,141 +1,68 @@
1
+ // @ts-nocheck
2
+ import themeBgHalo from './images/theme.bg.halo.svg'
3
+ import themeBgBlackRing from './images/theme.bg.blackring.svg'
4
+ import themeCenter1 from './images/themeCenter1.svg'
5
+ import themeCenter2 from './images/themeCenter2.svg'
6
+ import themePartitionLight from './images/themePartitionLight.svg'
7
+ import themePointerArea from './images/themePointerArea.svg'
1
8
 
2
- // @ts-ignore
3
- import spinSvg from './images/spin.svg'
4
- // @ts-ignore
5
- import centerArrowSvg from './images/centerArrow.svg'
6
- // @ts-ignore
7
- import centerArrow3Svg from './images/centerArrow3.svg'
8
- // @ts-ignore
9
- import centerPackSvg from './images/centerPack.svg'
10
- // @ts-ignore
11
- import centerText3Svg from './images/centerText3.svg'
12
- // @ts-ignore
13
- import centerBackground2Svg from './images/centerBackground2.svg'
14
- // @ts-ignore
15
- import centerBackground1Svg from './images/centerBackground1.svg'
16
- // @ts-ignore
17
- import centerCircleSvg from './images/centerCircle.svg'
18
- // @ts-ignore
19
- import centerArrowBgSvg from './images/centerArrowBg.svg'
9
+ import theme1Bg3 from './images/theme1Bg3.svg'
10
+ import theme2Bg3 from './images/theme2Bg3.svg'
11
+ import theme2Arrow from './images/theme2Arrow.svg'
20
12
 
21
- import { themedImagesUpdater } from './themes.image.base'
13
+ import theme3Bg1 from './images/theme3Bg1.svg'
14
+ import theme3Bg2 from './images/theme3Bg2.svg'
15
+ import theme3Arrow from './images/theme3Arrow.svg'
22
16
 
23
- export const centerImages = {
24
- centerArrowSvg,
25
- centerArrow3Svg,
26
- centerText3Svg,
27
- centerBackground2Svg,
28
- centerPackSvg,
29
- spinSvg,
30
- centerArrowBgSvg,
31
- centerCircleSvg,
32
- centerBackground1Svg,
33
- }
17
+ import theme7Bg1 from './images/theme7Bg1.svg'
18
+ import theme7Bg2 from './images/theme7Bg2.svg'
19
+ import theme7Bg3 from './images/theme7Bg3.svg'
34
20
 
35
- export const centerImagesData = {
36
- centerArrow3Svg: {
37
- props: {
38
- width: 92,
39
- height: 92
40
- },
41
- },
42
- centerText3Svg: {
43
- props: {
44
- width: 42,
45
- height: 25
46
- },
47
- },
48
- centerBackground2Svg: {
49
- props: {
50
- width: 128,
51
- height: 128
52
- },
53
- },
54
- centerBackground1Svg: {
55
- props: {
56
- width: 128,
57
- height: 128
58
- },
59
- },
60
- centerPackSvg: {
61
- props: {
62
- width: 76,
63
- height: 76
64
- },
65
- },
66
- centerArrowSvg: {
67
- props: {
68
- width: 96,
69
- height: 96
70
- },
71
- },
72
- spinSvg: {
73
- props: {
74
- width: 1.3 * 42,
75
- height: 1.3 * 25
76
- },
77
- },
78
- centerArrowBgSvg: {
79
- props: {
80
- width: 28,
81
- height: 24,
82
- },
83
- offset: {
84
- x: 0,
85
- y: 45
86
- }
87
- },
88
- centerCircleSvg: {
89
- props: {
90
- width: 88,
91
- height: 104,
92
- },
93
- offset: {
94
- x: 0,
95
- y: 6
96
- }
97
- }
98
- }
21
+ import theme2Center from './images/theme2Center.svg'
22
+ import theme3Center from './images/theme3Center.svg'
23
+ import theme7Center from './images/theme7Center.svg'
24
+ import theme7Light from './images/theme7Light.svg'
25
+ import theme7Arrow from './images/theme7Arrow.svg'
99
26
 
27
+ import themeShadow from './images/themeShadow.svg'
100
28
 
101
- export const centerImagesConfig = [
102
- [ // 0
103
- 'centerBackground1Svg',
104
- 'centerArrowSvg',
105
- 'spinSvg'
106
- ],
107
- [ // 1
108
- 'centerBackground2Svg',
109
- 'centerPackSvg'
110
- ],
111
- [ // 2
112
- 'centerBackground1Svg',
113
- 'centerArrow3Svg',
114
- 'centerText3Svg'
115
- ],
116
- [ // 3
117
- 'centerBackground1Svg',
118
- 'centerArrowSvg',
119
- 'spinSvg'
120
- ],
121
- [ // 4
122
- 'centerBackground1Svg',
123
- 'spinSvg',
124
- 'centerArrowBgSvg',
125
- 'centerCircleSvg',
126
- ],
127
- [ // 5
128
- 'centerBackground1Svg',
129
- 'spinSvg',
130
- 'centerArrowBgSvg',
131
- 'centerCircleSvg',
132
- ]
133
- ]
29
+ const defineBottom = () => `
30
+ --img-theme-BgBlackRing: url("${themeBgBlackRing}");
31
+ --img-theme-BgHalo: url("${themeBgHalo}");
32
+ --img-theme1-bg3: url("${theme1Bg3}");
33
+ --img-theme2-bg3: url("${theme2Bg3}");
34
+ --img-theme3-bg2: url("${theme3Bg2}");
35
+ --img-theme3-bg1: url("${theme3Bg1}");
134
36
 
135
- export const themedCenterImagesUpdater = (ratio, fn, offset?) =>
136
- themedImagesUpdater(
137
- centerImages,
138
- centerImagesData,
139
- centerImagesConfig,
140
- ratio, fn, offset
141
- )
37
+ --img-theme7-bg3: url("${theme7Bg3}");
38
+ --img-theme7-bg2: url("${theme7Bg2}");
39
+ --img-theme7-bg1: url("${theme7Bg1}");
40
+
41
+ `
42
+
43
+ const defineMiddle = () => `
44
+ --img-theme-center1: url("${themeCenter1}");
45
+ --img-theme2-center: url("${theme2Center}");
46
+ --img-theme2-arrow: url("${theme2Arrow}");
47
+ --img-theme3-center: url("${theme3Center}");
48
+ --img-theme3-arrow: url("${theme3Arrow}");
49
+ --img-theme7-arrow: url("${theme7Arrow}");
50
+ --img-theme-center2: url("${themeCenter2}");
51
+ --img-theme7-center: url("${theme7Center}");
52
+ `
53
+
54
+ const defineTop = () => `
55
+ --img-theme-shadow: url("${themeShadow}");
56
+ --img-theme7-light: url("${theme7Light}");
57
+ `
58
+
59
+ export const defines = () =>
60
+ [
61
+ defineBottom(),
62
+ defineMiddle(),
63
+ defineTop(),
64
+ `
65
+ --img-theme-partition-light: url("${themePartitionLight}");
66
+ --img-theme-pointer-area: url("${themePointerArea}");
67
+ `
68
+ ].join(' ')
package/src/themes.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { partitions1, partitions2, partitions3 } from "./themes.partitions"
2
1
  import { PointerMode } from "./types"
3
2
 
4
3
  const sizeSchema1 = {
@@ -9,267 +8,45 @@ const sizeSchema1 = {
9
8
  }
10
9
 
11
10
  const sizeSchema2 = {
12
- radius : 253,
11
+ radius : 247,
13
12
  rRingInner: 259,
14
13
  rRingOuter: 280,
15
14
  rBg1: 286,
16
15
  }
17
-
18
- const backgroundSchema1 = {
19
- isShowingBulb: false,
20
- base: {
21
- linearGradient: {
22
- steps: [
23
- {
24
- offset: 0,
25
- color: '#FFB915',
26
- },
27
- {
28
- offset: 0.24,
29
- color: '#BF8500',
30
- },
31
- {
32
- offset: 0.41,
33
- color: '#FFE26A',
34
- },
35
- {
36
- offset: 0.46,
37
- color: '#FFDD63',
38
- },
39
- {
40
- offset: 0.53,
41
- color: '#FFCF51',
42
- },
43
- {
44
- offset: 0.58,
45
- color: '#FFC13F',
46
- },
47
- {
48
- offset: 0.82,
49
- color: '#FFB915',
50
- },
51
- {
52
- offset: 1,
53
- color: '#FFF100',
54
- },
55
- ]
56
- }
57
- },
58
- small: {
59
- linearGradient: {
60
- steps: [
61
- {
62
- offset: 0.4,
63
- color: "#303030",
64
- },
65
- {
66
- offset: 1,
67
- color: "#000604",
68
- },
69
- ]
70
- }
71
- }
72
-
73
-
74
- }
75
-
76
- const backgroundSchema2 = {
77
- isShowingBulb: true,
78
- base: {
79
- linearGradient: {
80
- steps: [
81
- {
82
- offset: "0.00312487",
83
- color: "#454545",
84
- },
85
- {
86
- offset: "0.310417",
87
- },
88
- {
89
- offset: "0.628125",
90
- color: "#575757",
91
- },
92
- {
93
- offset: "1",
94
- },
95
- ]
96
- }
97
- },
98
- small: {
99
- linearGradient: {
100
- steps: [
101
- {
102
- offset: "0.0604165",
103
- color: "#FFB915",
104
- },
105
- {
106
- offset: "0.2375",
107
- color: "#B6820A",
108
- },
109
- {
110
- offset: "0.477083",
111
- color: "#FFE685",
112
- },
113
- {
114
- offset: "0.721875",
115
- color: "#FFB915",
116
- },
117
- {
118
- offset: "1",
119
- color: "#FFD600",
120
- },
121
- ]
122
- }
123
- }
124
- }
125
-
126
- const backgroundSchema3 = {
127
- isShowingBulb: false,
128
- base: {
129
- linearGradient: {
130
- steps: [
131
- {
132
- offset: 0,
133
- color: '#FEDC31',
134
- },
135
- {
136
- offset: 0.09,
137
- color: '#FDC347',
138
- },
139
- {
140
- offset: 0.27,
141
- color: '#FC8682',
142
- },
143
- {
144
- offset: 0.52,
145
- color: '#FA2CD7',
146
- },
147
- {
148
- offset: 0.76,
149
- color: '#987CDB',
150
- },
151
- {
152
- offset: 1,
153
- color: '#33D0E0',
154
- },
155
- ]
156
- }
157
- },
158
- small: {
159
- linearGradient: {
160
- steps: [
161
- {
162
- offset: 0.4,
163
- color: "#303030",
164
- },
165
- {
166
- offset: 1,
167
- color: "#000604",
168
- },
169
- ]
170
- }
171
- }
172
-
173
-
16
+ const sizeSchema3 = {
17
+ radius : 247,
18
+ rRingInner: 275,
19
+ rRingOuter: 280,
20
+ rBg1: 286,
174
21
  }
175
22
 
176
23
  export const themes = [
177
24
  {
178
25
  size: sizeSchema1,
179
- background: backgroundSchema1,
180
- partitions: partitions1,
181
26
  pointerMode: PointerMode.Partition,
182
27
  },
183
28
  {
184
29
  size: sizeSchema2,
185
- background: backgroundSchema2,
186
- partitions: partitions1,
187
30
  pointerMode: PointerMode.Arrow,
188
31
  },
189
32
  {
190
33
  size: sizeSchema1,
191
- background: backgroundSchema3,
192
- partitions: partitions2,
193
34
  pointerMode: PointerMode.Arrow,
194
35
  },
195
36
  {
196
37
  size: sizeSchema1,
197
- background: backgroundSchema1,
198
- partitions: partitions3,
199
38
  pointerMode: PointerMode.Partition,
200
39
  },
201
40
  {
202
41
  size: sizeSchema1,
203
- background: backgroundSchema1,
204
- partitions: partitions3,
205
42
  pointerMode: PointerMode.Arrow,
206
43
  },
207
44
  {
208
45
  size: sizeSchema2,
209
- background: backgroundSchema2,
210
- partitions: partitions3,
211
46
  pointerMode: PointerMode.Arrow,
212
47
  },
213
- ]
214
-
215
- export const shadowSteps1 = [
216
- {
217
- offset: "0.41",
218
- color: "white",
219
- },
220
- {
221
- offset: "0.57",
222
- color: "#FCFCFD",
223
- },
224
- {
225
- offset: "0.61",
226
- color: "#F3F4F6",
227
- },
228
48
  {
229
- offset: "0.74",
230
- color: "#E9ECF0",
231
- },
232
- {
233
- offset: "0.87",
234
- color: "#B9C3CE",
235
- },
236
- {
237
- offset: "1",
238
- color: "#899BAD",
239
- },
240
- ]
241
-
242
- export const shadowSteps = [
243
- {
244
- offset: "0.81",
245
- color: "white",
246
- },
247
- {
248
- offset: "0.87",
249
- color: "#FCFCFD",
250
- },
251
- {
252
- offset: "0.91",
253
- color: "#F3F4F6",
254
- },
255
- {
256
- offset: "0.94",
257
- color: "#E9ECF0",
258
- },
259
- {
260
- offset: "0.97",
261
- color: "#B9C3CE",
262
- },
263
- {
264
- offset: "1",
265
- color: "#899BAD",
49
+ size: sizeSchema3,
50
+ pointerMode: PointerMode.Arrow,
266
51
  },
267
52
  ]
268
-
269
-
270
- // <stop offset="0.81"
271
- // <stop offset="0.87"
272
- // <stop offset="0.91"
273
- // <stop offset="0.94"
274
- // <stop offset="0.97"
275
- // <stop offset="1"
@@ -2,14 +2,14 @@ export const translations = {
2
2
  en: {
3
3
  wof: {
4
4
  NoContent: `You don't have any lottery programs available now.`,
5
- NoNext: `You don't have any spins available. Please check T&C`,
5
+ NoNext: `You don't have any spins available. Please check <a href="javascript:void(0)">Terms and Conditions</a>`,
6
6
  NoHistories: `No histories`,
7
7
  Program: `Program`,
8
8
  History: `History`,
9
9
  ActiveTickets: `Active Tickets`,
10
10
  ImplicitTickets: `Implicit Tickets`,
11
11
  RemainingTimes: `Remaining Times`,
12
- ShowNext: `The Wheel will be available on <strong>{startTime}</strong>. please wait till it is open.`,
12
+ ShowNext: `The Wheel will be available on<br /> <strong>{startTime}</strong> <br />Please wait till it is open.`,
13
13
  SpinFailed: `We are sorry that you don't have any Wheels available, please <strong>check T&C</strong> here to get a chance!`,
14
14
  DrawFailed: 'There was a problem to grant the reward. Please contact support',
15
15
  Congratulation: `Congratulations! You won a {prize}!`,
@@ -1,34 +0,0 @@
1
- import { getColorSchema } from "./business.dom"
2
- import { partitions3, partitions2, partitions1 } from "./themes.partitions"
3
-
4
- const partitionsList = {
5
- partitions1,
6
- partitions2,
7
- partitions3,
8
- }
9
-
10
- const maxLength = 12
11
-
12
- const tester = (iLength, partitions) => {
13
-
14
- const color = (i) => getColorSchema(i, iLength, partitions.colorSchema)[0].color
15
-
16
- const colors = []
17
-
18
- for(let i = 0; i < iLength; i++){
19
- colors.push(color(i))
20
- }
21
-
22
- expect(colors[0]).not.toEqual((colors[iLength - 1]))
23
- }
24
-
25
- describe("check if first color is not equal last color", () => {
26
- Object.keys(partitionsList).map(key => {
27
- const partitions = partitionsList[key]
28
- describe("for " + key, () => {
29
- for(let length = 2; length < maxLength; length ++){
30
- test('length ' + length, () => tester(length, partitions))
31
- }
32
- })
33
- })
34
- })
@@ -1,21 +0,0 @@
1
-
2
- export const getPropsOfBackgroundCircle = (radius, rRingOuter, rRingInner) => ({
3
- cx: radius,
4
- cy: radius,
5
- r: rRingInner,
6
- 'stroke-width': `${(rRingOuter - rRingInner) * 2}px`
7
- })
8
-
9
- // color schema length must be greater than 2
10
- export const getColorSchema = (index, length, colorSchema) => {
11
- if(
12
- length > colorSchema.length &&
13
- length % colorSchema.length === 1 &&
14
- index === length - 1
15
- ){
16
- return colorSchema[1 % colorSchema.length]
17
- }
18
-
19
- return colorSchema[index % colorSchema.length]
20
-
21
- }