@everymatrix/lottery-program-wof 1.44.0 → 1.45.3

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 (75) hide show
  1. package/es2015/lottery-program-wof.cjs +1 -0
  2. package/es2015/lottery-program-wof.js +16 -0
  3. package/package.json +14 -37
  4. package/CHANGELOG.md +0 -12
  5. package/README.md +0 -30
  6. package/babel.config.js +0 -6
  7. package/dist/lottery-program-wof.js +0 -11886
  8. package/dist/lottery-program-wof.js.map +0 -1
  9. package/index.html +0 -42
  10. package/index.js +0 -1
  11. package/public/favicon.png +0 -0
  12. package/public/reset.css +0 -48
  13. package/rollup.config.js +0 -61
  14. package/src/LotteryProgramWof.svelte +0 -214
  15. package/src/api/api.ts +0 -2016
  16. package/src/api/configuration.ts +0 -65
  17. package/src/api/custom.d.ts +0 -2
  18. package/src/api/index.ts +0 -15
  19. package/src/business.partition.ts +0 -98
  20. package/src/business.ts +0 -186
  21. package/src/calc.point.ts +0 -67
  22. package/src/calc.temp.ts +0 -29
  23. package/src/calc.ts +0 -28
  24. package/src/class.process.ts +0 -130
  25. package/src/class.spinable.ts +0 -60
  26. package/src/class.spinable.util.ts +0 -10
  27. package/src/class.spinner.ts +0 -176
  28. package/src/class.spinner.util.ts +0 -92
  29. package/src/class.svgcalc.ts +0 -249
  30. package/src/i18n.ts +0 -38
  31. package/src/images/Thankyou_1.svg +0 -100
  32. package/src/images/Thankyou_2.svg +0 -112
  33. package/src/images/Thankyou_3.svg +0 -87
  34. package/src/images/Thankyou_4.svg +0 -114
  35. package/src/images/gift.svg +0 -964
  36. package/src/images/theme.bg.blackring.svg +0 -10
  37. package/src/images/theme.bg.halo.svg +0 -27
  38. package/src/images/theme1Bg3.svg +0 -15
  39. package/src/images/theme2Arrow.svg +0 -24
  40. package/src/images/theme2Bg3.svg +0 -11
  41. package/src/images/theme2Center.svg +0 -36
  42. package/src/images/theme3Arrow.svg +0 -25
  43. package/src/images/theme3Bg1.svg +0 -29
  44. package/src/images/theme3Bg2.svg +0 -19
  45. package/src/images/theme3Center.svg +0 -77
  46. package/src/images/theme7Arrow.svg +0 -67
  47. package/src/images/theme7Bg1.svg +0 -786
  48. package/src/images/theme7Bg2.svg +0 -40
  49. package/src/images/theme7Bg3.svg +0 -26
  50. package/src/images/theme7Center.svg +0 -72
  51. package/src/images/theme7Light.svg +0 -17
  52. package/src/images/themeCenter1.svg +0 -76
  53. package/src/images/themeCenter2.svg +0 -58
  54. package/src/images/themePartitionLight.svg +0 -19
  55. package/src/images/themePointerArea.svg +0 -44
  56. package/src/images/themeShadow.svg +0 -27
  57. package/src/index.ts +0 -4
  58. package/src/message.ts +0 -28
  59. package/src/private.item.svelte +0 -172
  60. package/src/private.item.svg.scss +0 -302
  61. package/src/private.item.svg.svelte +0 -356
  62. package/src/private.loader.svelte +0 -61
  63. package/src/private.message.svelte +0 -236
  64. package/src/private.outcomes.svelte +0 -203
  65. package/src/private.tabs.svelte +0 -106
  66. package/src/themes.image.center.ts +0 -68
  67. package/src/themes.ts +0 -52
  68. package/src/translations.js +0 -218
  69. package/src/types.business.ts +0 -20
  70. package/src/types.ts +0 -79
  71. package/src/util.ts +0 -90
  72. package/src/widget.ts +0 -27
  73. package/stories/LotteryProgramWof.stories.js +0 -13
  74. package/svelte.config.js +0 -7
  75. package/tsconfig.json +0 -11
package/src/types.ts DELETED
@@ -1,79 +0,0 @@
1
- declare global {
2
- namespace svelte.JSX {
3
- interface SVGProps<T> {
4
- part?: string
5
- }
6
- }
7
- }
8
-
9
- export interface Point {
10
- x: number;
11
- y: number;
12
- }
13
-
14
- export enum PointerMode {
15
- Arrow = "Arrow",
16
- Partition = "Partition",
17
- }
18
-
19
- export enum ArrowMode {
20
- DownFromTop = "DownFromTop",
21
- UpFromCenter = "UpFromCenter",
22
- DownFromCenter = "DownFromCenter",
23
- UpFromBottom = "UpFromBottom",
24
- }
25
-
26
- export enum Api {
27
- lotteries = 'lotteries',
28
- outcome = 'outcome',
29
- draw = 'draw',
30
- }
31
-
32
- export interface ApiConfigs {
33
- [Api.lotteries]: {
34
- session?: string
35
- },
36
- [Api.outcome]: {
37
- session?: string
38
- id: string
39
- },
40
- [Api.draw]: {
41
- session?: string
42
- id: string
43
- guid: string
44
- },
45
-
46
- }
47
-
48
- export enum Lang {
49
- en = 'en',
50
- fr = 'fr',
51
- de = 'de',
52
- tr = 'tr'
53
- }
54
-
55
- type StringWithLang = {
56
- [key in Lang]: string
57
- }
58
-
59
- export interface Partition {
60
- name: StringWithLang
61
- image1: StringWithLang
62
- image2: StringWithLang
63
- image3: StringWithLang
64
- }
65
-
66
-
67
- export enum Tab {
68
- Program = 'Program',
69
- History = 'History'
70
- }
71
-
72
- export enum ContentDirection {
73
- clockwise = 1,
74
- anticlockwise = -1,
75
- outward = 0,
76
- }
77
-
78
-
79
-
package/src/util.ts DELETED
@@ -1,90 +0,0 @@
1
- export const imageLoader = (src: string) => {
2
- return new Promise((resolve, reject) => {
3
- let img = new Image()
4
- img.onload = () => resolve(img)
5
- img.onerror = reject
6
- img.src = src
7
- })
8
- }
9
-
10
- export const clamp = (num: number, min: number, max?: number) => {
11
- if(max){
12
- return Math.min(Math.max(num, min), max)
13
- }else{
14
- return Math.max(num, min)
15
- }
16
- }
17
-
18
- export const imageLoaderSvg = (src: string) => {
19
- return new Promise((resolve, reject) => {
20
- let img = document.createElementNS("http://www.w3.org/2000/svg", "image")
21
- img.onload = () => resolve(img)
22
- img.onerror = () => resolve(img) //reject
23
- img.href.baseVal = src
24
- })
25
- }
26
-
27
- const cvtCaseFromCamelToKebab = (text: string) =>
28
- text
29
- .split(/(?=[A-Z])/)
30
- .map(s => s.toLocaleLowerCase())
31
- .join('-')
32
-
33
- export const setProps = <T extends Element>(element: T, props: any) => {
34
- Object.keys(props).map(_key => {
35
- element.setAttribute(cvtCaseFromCamelToKebab(_key), props[_key])
36
- })
37
- }
38
-
39
- export const setPropsSVG = <T extends SVGElement>(element: T, props: any) => {
40
- Object.keys(props).map(_key => {
41
- element.setAttributeNS("http://www.w3.org/2000/svg", cvtCaseFromCamelToKebab(_key), props[_key])
42
- })
43
- }
44
-
45
- export const delay = (time: number) => new Promise(res => setTimeout(res, time * 1000));
46
-
47
- type MapObjectValueToTuple<T extends Object> = T[keyof T][]
48
-
49
- export const mapObjectValueToTuple =
50
- <T>(object: T): MapObjectValueToTuple<T> =>
51
- Object.keys(object).map(key => object[key])
52
-
53
- interface fetcherArgs {
54
- path: string,
55
- params?: Object,
56
- options?: RequestInit
57
- }
58
-
59
- export const fetcher = async (config: fetcherArgs) => {
60
-
61
- const { path, params = {}, options = {} } = config
62
-
63
- const url = new URL(path)
64
-
65
- Object.keys(params).map(_key => {
66
- url.searchParams.append(_key, params[_key])
67
- })
68
-
69
- return await fetchBase(url, options)
70
- }
71
-
72
-
73
- export const fetchBase = async (input: RequestInfo | URL, init: RequestInit = {}): Promise<Response> => {
74
-
75
- let res: any
76
- try {
77
- res = await fetch(input, init)
78
- res = await res.text()
79
- res = JSON.parse(res)
80
- } catch (e) {
81
- throw new Error(e.message)
82
- }
83
-
84
- return res
85
- }
86
-
87
- export const isSafari = () => {
88
- var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
89
- return isSafari;
90
- }
package/src/widget.ts DELETED
@@ -1,27 +0,0 @@
1
- import { addNewMessages } from "./i18n";
2
- import { fetchBase, fetcher } from "./util";
3
-
4
- export const setTranslation = (translations) => {
5
- Object.keys(translations).forEach((item:any):void => {
6
- addNewMessages(item, translations[item]);
7
- });
8
- }
9
-
10
- export const setTranslationUrl = async (translationurl) => {
11
-
12
- const res = await fetchBase(translationurl)
13
-
14
- setTranslation(res)
15
- }
16
-
17
- export const setClientStyling = (container, clientstyling) => {
18
- let sheet = document.createElement('style');
19
- sheet.innerHTML = clientstyling;
20
- container.appendChild(sheet);
21
- }
22
-
23
- export const setClientStylingURL = async (clientstylingurl, callback) => {
24
- const res = await fetch(clientstylingurl)
25
- const clientstyling = await res.text()
26
- callback(clientstyling)
27
- }
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import LotteryProgramWof from '../src/LotteryProgramWof';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'LotteryProgramWof',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const LotteryProgramWof = ({ aProperty }) => html`<lottery-program-wof></lottery-program-wof>`;
12
-
13
- export const FirstStory = LotteryProgramWof.bind({});
package/svelte.config.js DELETED
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- svelte: {
3
- "language-server": {
4
- runtime: `sass`
5
- }
6
- }
7
- }
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@tsconfig/svelte/tsconfig.json",
3
-
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"],
6
- "compilerOptions": {
7
- "types": [
8
- "@types/jest"
9
- ]
10
- }
11
- }