@everymatrix/lottery-grid 1.44.0 → 1.45.2
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/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-402a1909.js +1276 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +212 -252
- package/dist/cjs/lottery-grid.cjs.js +16 -10
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/lottery-grid/index.js +1 -0
- package/dist/collection/components/lottery-grid/lottery-grid.js +473 -488
- package/dist/collection/utils/locale.utils.js +22 -22
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-d55f95ff.js +1249 -0
- package/dist/esm/loader.js +6 -12
- package/dist/esm/lottery-bullet_2.entry.js +212 -252
- package/dist/esm/lottery-grid.js +13 -10
- package/dist/lottery-grid/lottery-grid.esm.js +1 -1
- package/dist/lottery-grid/p-205e4975.entry.js +1 -0
- package/dist/lottery-grid/p-2a12d7f8.js +2 -0
- package/dist/lottery-grid/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/lottery-grid/index.d.ts +1 -0
- package/dist/types/components/lottery-grid/lottery-grid.d.ts +74 -74
- package/dist/types/components/lottery-grid/lottery-grid.types.d.ts +8 -8
- package/dist/types/components.d.ts +19 -2
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +9 -2
- package/dist/cjs/index-dfe5695c.js +0 -1249
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/lottery-bullet.js +0 -6
- package/dist/components/lottery-bullet2.js +0 -91
- package/dist/components/lottery-grid.d.ts +0 -11
- package/dist/components/lottery-grid.js +0 -248
- package/dist/esm/index-c15ec15f.js +0 -1223
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/lottery-grid/p-6caa0d6c.entry.js +0 -1
- package/dist/lottery-grid/p-8a854495.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-grid/.stencil/packages/lottery-grid/stencil.config.d.ts +0 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
|
+
export const config = {
|
|
3
|
+
namespace: 'lottery-grid',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
sourceMap: true,
|
|
6
|
+
minifyJs: false,
|
|
7
|
+
extras: {
|
|
8
|
+
experimentalImportInjection: true
|
|
9
|
+
},
|
|
10
|
+
plugins: [sass()],
|
|
11
|
+
outputTargets: [
|
|
12
|
+
{
|
|
13
|
+
type: 'www',
|
|
14
|
+
serviceWorker: null // disable service workers
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
package/dist/stencil.config.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import { sass } from
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
2
|
export const config = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
esmLoaderPath: '../loader',
|
|
3
|
+
namespace: 'lottery-grid',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
sourceMap: false,
|
|
6
|
+
minifyJs: true,
|
|
7
|
+
extras: {
|
|
8
|
+
experimentalImportInjection: true
|
|
10
9
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
type: 'www',
|
|
19
|
-
serviceWorker: null, // disable service workers
|
|
20
|
-
},
|
|
21
|
-
],
|
|
10
|
+
plugins: [sass()],
|
|
11
|
+
outputTargets: [
|
|
12
|
+
{
|
|
13
|
+
type: 'dist',
|
|
14
|
+
esmLoaderPath: '../loader'
|
|
15
|
+
}
|
|
16
|
+
]
|
|
22
17
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LotteryGrid } from './lottery-grid';
|
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { GridNumbers, BulletEvent, GridEvent } from './lottery-grid.types';
|
|
3
|
-
import
|
|
3
|
+
import "../../../../../../dist/packages/stencil/lottery-bullet/dist/types/index";
|
|
4
4
|
export declare class LotteryGrid {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Identifier for the ticket
|
|
7
|
+
*/
|
|
8
|
+
ticketId: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of bullets of grid
|
|
11
|
+
*/
|
|
12
|
+
totalNumbers: number;
|
|
13
|
+
/**
|
|
14
|
+
* Game ID
|
|
15
|
+
*/
|
|
16
|
+
gameId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Number of maximum bullets that can be selected
|
|
19
|
+
*/
|
|
20
|
+
maximumAllowed: number;
|
|
21
|
+
/**
|
|
22
|
+
* Minimum allowed of bullets
|
|
23
|
+
*/
|
|
24
|
+
minimumAllowed: number;
|
|
25
|
+
/**
|
|
26
|
+
* Allows the user to select numbers on the grid
|
|
27
|
+
*/
|
|
28
|
+
selectable: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Numbers that should be showed as selected on the grid (as a string of those numbers e.g. '1,2,3,4,5,6')
|
|
31
|
+
*/
|
|
32
|
+
selectedNumbers: string;
|
|
33
|
+
/**
|
|
34
|
+
* Show only selected numbers
|
|
35
|
+
*/
|
|
36
|
+
displaySelected: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Language
|
|
39
|
+
*/
|
|
40
|
+
language: string;
|
|
41
|
+
/**
|
|
42
|
+
* The index of the number
|
|
43
|
+
*/
|
|
44
|
+
gridIndex: number;
|
|
45
|
+
/**
|
|
46
|
+
* Personalize grid for ticket
|
|
47
|
+
*/
|
|
48
|
+
gridType: string;
|
|
49
|
+
/**
|
|
50
|
+
* Client custom styling via string
|
|
51
|
+
*/
|
|
52
|
+
clientStyling: string;
|
|
53
|
+
/**
|
|
54
|
+
* Client custom styling via url content
|
|
55
|
+
*/
|
|
56
|
+
clientStylingUrlContent: string;
|
|
57
|
+
numbers: Array<GridNumbers>;
|
|
58
|
+
private limitStylingAppends;
|
|
59
|
+
private selectedCounter;
|
|
60
|
+
private stylingContainer;
|
|
61
|
+
/**
|
|
62
|
+
* When the grid is completed, it emits this event with selected numbers
|
|
63
|
+
*/
|
|
64
|
+
gridFilledEvent: EventEmitter<GridEvent>;
|
|
65
|
+
/**
|
|
66
|
+
* When the grid is uncomplete after being completed once (reset or change), it emits this event
|
|
67
|
+
*/
|
|
68
|
+
gridDirtyEvent: EventEmitter<GridEvent>;
|
|
69
|
+
connectedCallback(): void;
|
|
70
|
+
componentDidRender(): void;
|
|
71
|
+
shuffleArray(array: Array<any>): Array<any>;
|
|
72
|
+
setClientStyling: () => void;
|
|
73
|
+
setClientStylingURL: () => void;
|
|
74
|
+
lotteryBulletSelectionHandler(event: CustomEvent<BulletEvent>): void;
|
|
75
|
+
resetSelectionHandler(event: any): Promise<void>;
|
|
76
|
+
autoSelectionHandler(event: any): Promise<void>;
|
|
77
|
+
render(): any;
|
|
78
78
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export interface GridNumbers {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
number: string;
|
|
3
|
+
selected: boolean;
|
|
4
|
+
selectable: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface BulletEvent {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
value: string;
|
|
8
|
+
selected: boolean;
|
|
9
9
|
}
|
|
10
10
|
export interface GridEvent {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
id: number;
|
|
12
|
+
index: number;
|
|
13
|
+
selectedNumbers: Array<string>;
|
|
14
14
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { GridEvent } from "./components/lottery-grid/lottery-grid.types";
|
|
9
|
+
export { GridEvent } from "./components/lottery-grid/lottery-grid.types";
|
|
9
10
|
export namespace Components {
|
|
10
11
|
interface LotteryGrid {
|
|
11
12
|
/**
|
|
@@ -62,8 +63,24 @@ export namespace Components {
|
|
|
62
63
|
"totalNumbers": number;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
66
|
+
export interface LotteryGridCustomEvent<T> extends CustomEvent<T> {
|
|
67
|
+
detail: T;
|
|
68
|
+
target: HTMLLotteryGridElement;
|
|
69
|
+
}
|
|
65
70
|
declare global {
|
|
71
|
+
interface HTMLLotteryGridElementEventMap {
|
|
72
|
+
"gridFilled": GridEvent;
|
|
73
|
+
"gridDirty": GridEvent;
|
|
74
|
+
}
|
|
66
75
|
interface HTMLLotteryGridElement extends Components.LotteryGrid, HTMLStencilElement {
|
|
76
|
+
addEventListener<K extends keyof HTMLLotteryGridElementEventMap>(type: K, listener: (this: HTMLLotteryGridElement, ev: LotteryGridCustomEvent<HTMLLotteryGridElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
77
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
78
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
79
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
80
|
+
removeEventListener<K extends keyof HTMLLotteryGridElementEventMap>(type: K, listener: (this: HTMLLotteryGridElement, ev: LotteryGridCustomEvent<HTMLLotteryGridElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
81
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
82
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
83
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
67
84
|
}
|
|
68
85
|
var HTMLLotteryGridElement: {
|
|
69
86
|
prototype: HTMLLotteryGridElement;
|
|
@@ -114,11 +131,11 @@ declare namespace LocalJSX {
|
|
|
114
131
|
/**
|
|
115
132
|
* When the grid is uncomplete after being completed once (reset or change), it emits this event
|
|
116
133
|
*/
|
|
117
|
-
"onGridDirty"?: (event:
|
|
134
|
+
"onGridDirty"?: (event: LotteryGridCustomEvent<GridEvent>) => void;
|
|
118
135
|
/**
|
|
119
136
|
* When the grid is completed, it emits this event with selected numbers
|
|
120
137
|
*/
|
|
121
|
-
"onGridFilled"?: (event:
|
|
138
|
+
"onGridFilled"?: (event: LotteryGridCustomEvent<GridEvent>) => void;
|
|
122
139
|
/**
|
|
123
140
|
* Allows the user to select numbers on the grid
|
|
124
141
|
*/
|