@everymatrix/prize-engine-suite 0.0.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.
Files changed (40) hide show
  1. package/README.md +138 -0
  2. package/components/PrizeEngineChest-BVPAgurG.js +309 -0
  3. package/components/PrizeEngineChest-C0N7lnkh.js +331 -0
  4. package/components/PrizeEngineChest-IjXQ3Npg.cjs +1 -0
  5. package/components/PrizeEngineCoin-BSbJruG-.js +293 -0
  6. package/components/PrizeEngineCoin-CfvghnNb.js +271 -0
  7. package/components/PrizeEngineCoin-DSfNslVg.cjs +1 -0
  8. package/components/PrizeEngineDetails-3-kB4O56.js +2000 -0
  9. package/components/PrizeEngineDetails-BB_QSozG.cjs +1 -0
  10. package/components/PrizeEngineDetails-CjKeFIuU.js +1960 -0
  11. package/components/PrizeEngineHistory-60ER0uV1.js +1786 -0
  12. package/components/PrizeEngineHistory-BpILiR5F.cjs +1 -0
  13. package/components/PrizeEngineHistory-DN5bFRQB.js +1816 -0
  14. package/components/PrizeEngineList-DQ8Mn6nB.js +471 -0
  15. package/components/PrizeEngineList-QzCyrAut.cjs +1 -0
  16. package/components/PrizeEngineList-mINVnC_b.js +437 -0
  17. package/components/PrizeEngineLuckywheel-BgWt7wEl.cjs +1 -0
  18. package/components/PrizeEngineLuckywheel-BncCaQEg.js +272 -0
  19. package/components/PrizeEngineLuckywheel-CTlHcFBH.js +272 -0
  20. package/components/PrizeEngineSuite-BhF-GlCv.js +5378 -0
  21. package/components/PrizeEngineSuite-DNby9KuV.cjs +23 -0
  22. package/components/PrizeEngineSuite-DWvvEtv_.js +5337 -0
  23. package/components/WheelSVG-BxjEfPQo.js +1475 -0
  24. package/components/WheelSVG-DYz6PQPq.cjs +34 -0
  25. package/components/WheelSVG-MY7KdRdd.js +1441 -0
  26. package/es2015/prize-engine-suite.cjs +1 -0
  27. package/es2015/prize-engine-suite.js +16 -0
  28. package/esnext/prize-engine-suite.js +14 -0
  29. package/package.json +25 -0
  30. package/stencil/app-globals-0f993ce5-D-kw1sls.js +5 -0
  31. package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
  32. package/stencil/index-b2193545-9K-aI7zC.cjs +1 -0
  33. package/stencil/index-b2193545-DsMHU6jb.js +519 -0
  34. package/stencil/index-b2193545-R7ZoV-kY.js +503 -0
  35. package/stencil/ui-skeleton-BreIU6e5.cjs +1 -0
  36. package/stencil/ui-skeleton-W50o8tfg.js +11 -0
  37. package/stencil/ui-skeleton-ed169f8f-CVY4B-CP.js +155 -0
  38. package/stencil/ui-skeleton-ed169f8f-CpiCXJrP.cjs +55 -0
  39. package/stencil/ui-skeleton-ed169f8f-D3TjbVKy.js +155 -0
  40. package/stencil/ui-skeleton-xXZA3rYO.js +29 -0
package/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # Prize Engine Suite Widget
2
+
3
+ ## Overview
4
+ ### Meet the Prize Engine Suite
5
+ The Prize Engine Suite is a cutting-edge collection of modular web components designed to provide a complete, unified, and highly customizable gamification experience. Whether you are implementing a **Lucky Wheel**, a **Coin Flip**, or **Mystery Chests**, the Suite handles everything from discovery to the final reward claim.
6
+
7
+ ### Why the Prize Engine Suite?
8
+ Previously, different game types required separate integrations and containers. The Prize Engine Suite changes this by offering:
9
+ - **Unified Architecture**: One integration to support all "Draw-and-Reward" game types.
10
+ - **Modular Design**: Components for Listing, History, and Game Details work together seamlessly but can be used independently if needed.
11
+ - **Plug-and-Play**: Adding a new gamified experience to your product is now as simple as changing a single `type` attribute.
12
+
13
+ ### A Progressive & Scalable Suite
14
+ The Suite is built to grow with your product. Start with a simple implementation using default themes, and scale up to a fully customized, branded experience using our robust set of tools for player sessions, custom styling, and dynamic translations.
15
+
16
+ ---
17
+
18
+ ## Pre-requisites
19
+ For the Widget to function, the parent website must be integrated with the EveryMatrix platform.
20
+ Supported integrations:
21
+ - CE new WebAPI Integration
22
+ - UBS Integration
23
+
24
+ For further information, please contact your assigned Integration Manager.
25
+
26
+ ---
27
+
28
+ ## Setup the widget on your website
29
+ To install the latest version of the Prize Engine Suite, add the following script tag to the root page of your application (either in `<head>` or at the end of `<body>`).
30
+
31
+ ```html
32
+ <script src="https://unpkg.com/@everymatrix/prize-engine-suite/es2015/prize-engine-suite.js" type="module"></script>
33
+ ```
34
+
35
+ ---
36
+
37
+ ## Usage
38
+ Add the `<prize-engine-suite>` tag to your page. Use the `type` attribute to specify which gamification engine to load.
39
+
40
+ ```html
41
+ <prize-engine-suite
42
+ endpoint="https://your-wofapi-endpoint.everymatrix.com"
43
+ session="your-player-session-token"
44
+ lang="en"
45
+ type="wheelOfFortune"
46
+ />
47
+ ```
48
+
49
+ ### Full Example
50
+ ```html
51
+ <!doctype html>
52
+ <html lang="en">
53
+ <head>
54
+ <meta charset="UTF-8">
55
+ <title>Prize Engine Suite Demo</title>
56
+ <script src="https://unpkg.com/@everymatrix/prize-engine-suite/es2015/prize-engine-suite.js" type="module"></script>
57
+ </head>
58
+ <body>
59
+ <prize-engine-suite
60
+ endpoint="https://demo-wofapi-stage.everymatrix.com"
61
+ session="your-session-token"
62
+ lang="en"
63
+ type="flipCoin"
64
+ />
65
+ </body>
66
+ </html>
67
+ ```
68
+
69
+ ---
70
+
71
+ ## API Reference
72
+
73
+ | Parameter | Mandatory | Default | Comment |
74
+ | :--- | :--- | :--- | :--- |
75
+ | **endpoint** | Yes | - | NorWAy endpoint for Prize Engine API |
76
+ | **session** | Yes | - | The session token of the player |
77
+ | **lang** | Yes | 'en' | Language of the widget (en, zh, etc.) |
78
+ | **type** | No | 'wheelOfFortune' | Game type: `wheelOfFortune`, `flipCoin`, or `mysteryChest` |
79
+ | **isdrawer** | No | 'true' | If 'true', the widget renders as a fixed bottom drawer |
80
+ | **opened** | No | 'false' | If 'true', the drawer opens automatically on load |
81
+ | **clientstyling** | No | - | CSS string to override widget styles |
82
+ | **clientstylingurl** | No | - | URL to a CSS file for style injection |
83
+ | **translationurl** | No | - | URL to a JSON file for custom translations |
84
+ | **luckywheelsize** | No | 324 | Diameter of the wheel on desktop (px) |
85
+ | **luckywheelmobilesize** | No | 240 | Diameter of the wheel on mobile (px) |
86
+
87
+ ---
88
+
89
+ ## Styling
90
+ Our web components support dynamic styling through two attributes: `clientstyling` and `clientstylingurl`.
91
+
92
+ **Example:**
93
+ ```html
94
+ <prize-engine-suite
95
+ clientstyling=".HeaderTitle { color: gold; }"
96
+ clientstylingurl="https://cdn.yourbrand.com/widget-theme.css">
97
+ </prize-engine-suite>
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Translations
103
+ The Suite supports dynamic translations via the `translationurl` attribute. The JSON file should provide overrides for the following core keys:
104
+
105
+ ```json
106
+ {
107
+ "en": {
108
+ "Play": "Play",
109
+ "History": "History",
110
+ "Rules": "Rules",
111
+ "LuckyWheels": "Lucky Wheels",
112
+ "CoinRoyale": "Coin Royale",
113
+ "MysteryChest": "Mystery Chest",
114
+ "RemainingTimes": "Remaining Times",
115
+ "Spin": "Spin",
116
+ "Flip": "Flip",
117
+ "OpenChest": "Open Chest",
118
+ "Congratulation": "Congratulations!",
119
+ "Success": "You won a {prize}!",
120
+ "NoContent": "No games available at the moment",
121
+ "NoHistories": "No histories",
122
+ "InfoTooltipLuckywheel": "Spin a lucky wheel and take a chance to win!",
123
+ "InfoTooltipCoin": "Flip a virtual coin and take a chance to win!",
124
+ "InfoTooltipChest": "Open Mystery Chest and find your reward!"
125
+ }
126
+ }
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Core Events
132
+ The widget communicates with the parent site using `window.postMessage`:
133
+
134
+ | Event Type | Description |
135
+ | :--- | :--- |
136
+ | `OpenPrizeGame` | Triggered when a player selects a game from the list |
137
+ | `ClosePrizeEngineDrawer` | Triggered when the drawer is closed |
138
+ | `PrizeGameSpinEnd` | Triggered when a draw animation completes and result is shown |