@everymatrix/lottery-selection-group 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 (59) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-bc355d7d.js +1310 -0
  3. package/dist/cjs/index.cjs.js +10 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/lottery-button_4.cjs.entry.js +486 -0
  6. package/dist/cjs/lottery-selection-group-1608b2e2.js +480 -0
  7. package/dist/cjs/lottery-selection-group.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +31 -0
  9. package/dist/collection/components/lottery-selection-group/index.js +1 -0
  10. package/dist/collection/components/lottery-selection-group/lottery-selection-group.css +84 -0
  11. package/dist/collection/components/lottery-selection-group/lottery-selection-group.js +685 -0
  12. package/dist/collection/index.js +1 -0
  13. package/dist/collection/model/type.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +74 -0
  15. package/dist/collection/utils/utils.js +86 -0
  16. package/dist/esm/app-globals-0f993ce5.js +3 -0
  17. package/dist/esm/index-3a4d6110.js +1282 -0
  18. package/dist/esm/index.js +2 -0
  19. package/dist/esm/loader.js +11 -0
  20. package/dist/esm/lottery-button_4.entry.js +480 -0
  21. package/dist/esm/lottery-selection-group-656d6729.js +475 -0
  22. package/dist/esm/lottery-selection-group.js +20 -0
  23. package/dist/index.cjs.js +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/lottery-selection-group/app-globals-0f993ce5.js +1 -0
  26. package/dist/lottery-selection-group/index-3a4d6110.js +2 -0
  27. package/dist/lottery-selection-group/index.esm.js +1 -0
  28. package/dist/lottery-selection-group/lottery-button_4.entry.js +1 -0
  29. package/dist/lottery-selection-group/lottery-selection-group-656d6729.js +1 -0
  30. package/dist/lottery-selection-group/lottery-selection-group.esm.js +1 -0
  31. package/dist/stencil.config.dev.js +19 -0
  32. package/dist/stencil.config.js +19 -0
  33. package/dist/storybook/main.js +43 -0
  34. package/dist/storybook/preview.js +9 -0
  35. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  36. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/stencil.config.d.ts +2 -0
  37. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/stencil.config.dev.d.ts +2 -0
  38. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/storybook/main.d.ts +3 -0
  39. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/packages/stencil/lottery-selection-group/storybook/preview.d.ts +70 -0
  40. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/index.d.ts +4 -0
  41. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  42. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  43. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  44. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-selection-group/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  45. package/dist/types/components/lottery-selection-group/index.d.ts +1 -0
  46. package/dist/types/components/lottery-selection-group/lottery-selection-group.d.ts +122 -0
  47. package/dist/types/components.d.ts +218 -0
  48. package/dist/types/index.d.ts +1 -0
  49. package/dist/types/model/type.d.ts +12 -0
  50. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  51. package/dist/types/utils/locale.utils.d.ts +3 -0
  52. package/dist/types/utils/utils.d.ts +14 -0
  53. package/loader/cdn.js +1 -0
  54. package/loader/index.cjs.js +1 -0
  55. package/loader/index.d.ts +24 -0
  56. package/loader/index.es2017.js +1 -0
  57. package/loader/index.js +2 -0
  58. package/loader/package.json +11 -0
  59. package/package.json +27 -0
@@ -0,0 +1 @@
1
+ import{p as l,b as e}from"./index-3a4d6110.js";export{s as setNonce}from"./index-3a4d6110.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),l(t)})().then((async l=>(await t(),e([["lottery-button_4",[[1,"lottery-selection-group",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],splitToken:[513,"split-token"],selectionGroupId:[513,"selection-group-id"],selectionGroupLabel:[513,"selection-group-label"],type:[513],selectedBulletTexts:[513,"selected-bullet-texts"],maxSelectedCount:[514,"max-selected-count"],maxDisplayBulletsCount:[514,"max-display-bullets-count"],bulletTexts:[513,"bullet-texts"],maxIntegerBulletText:[514,"max-integer-bullet-text"],minIntegerBulletText:[514,"min-integer-bullet-text"],bulletTextType:[513,"bullet-text-type"],hasBorder:[516,"has-border"],hasBackground:[516,"has-background"],dialogTitle:[513,"dialog-title"],dialogInputPlaceholder:[513,"dialog-input-placeholder"],dialogConfig:[32],inputInfo:[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-button",{variant:[513],size:[513],color:[513],disabled:[516],loading:[516],text:[513],mbSource:[513,"mb-source"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],ripples:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-selection",{value:[520],text:[513],idx:[514],type:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],hasBorder:[516,"has-border"],hasBackground:[516,"has-background"],deleteIconSvg:[513,"delete-icon-svg"],deleteIconWidth:[513,"delete-icon-width"],deleteIconHeight:[513,"delete-icon-height"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],visible:[516],dialogTitle:[1,"dialog-title"],width:[1],closable:[4],mask:[4],maskClosable:[4,"mask-closable"],animationDuration:[2,"animation-duration"],fullscreen:[4],showFooter:[4,"show-footer"],showCancelBtn:[4,"show-cancel-btn"],language:[513],translationUrl:[520,"translation-url"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],l))));
@@ -0,0 +1,19 @@
1
+ import { sass } from "@stencil/sass";
2
+ export const config = {
3
+ namespace: 'lottery-selection-group',
4
+ taskQueue: 'async',
5
+ sourceMap: false,
6
+ minifyJs: true,
7
+ extras: {
8
+ experimentalImportInjection: true
9
+ },
10
+ plugins: [sass()],
11
+ outputTargets: [
12
+ {
13
+ type: 'www'
14
+ },
15
+ {
16
+ type: 'docs-readme'
17
+ }
18
+ ]
19
+ };
@@ -0,0 +1,19 @@
1
+ import { cleanPackageJsonStencil } from "../../../tools/plugins";
2
+ import { sass } from "@stencil/sass";
3
+ export const config = {
4
+ namespace: 'lottery-selection-group',
5
+ taskQueue: 'async',
6
+ sourceMap: false,
7
+ minifyJs: true,
8
+ hashFileNames: false,
9
+ extras: {
10
+ experimentalImportInjection: true
11
+ },
12
+ plugins: [cleanPackageJsonStencil(), sass()],
13
+ outputTargets: [
14
+ {
15
+ type: 'dist',
16
+ esmLoaderPath: '../loader'
17
+ }
18
+ ]
19
+ };
@@ -0,0 +1,43 @@
1
+ import path from "path";
2
+ import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
3
+ const config = {
4
+ stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
5
+ addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', 'storybook-dark-mode'],
6
+ docs: {
7
+ defaultName: 'Documentation',
8
+ autodocs: 'tag'
9
+ },
10
+ framework: {
11
+ name: '@storybook/web-components-vite',
12
+ options: {}
13
+ },
14
+ // Async viteFinal to build dependent packages before finalizing configuration.
15
+ viteFinal: async (config) => {
16
+ const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
17
+ const usedPackages = detectUsedPackages(storyFiles);
18
+ const buildPromises = usedPackages.map(async (pkg) => {
19
+ try {
20
+ console.log(`Building package ${pkg}...`);
21
+ const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
22
+ console.log(`Built package ${pkg}: ${stdout}`);
23
+ if (stderr) {
24
+ console.error(`Build warning/error for package ${pkg}: ${stderr}`);
25
+ }
26
+ }
27
+ catch (error) {
28
+ console.error(`Error building package ${pkg}:`, error);
29
+ }
30
+ });
31
+ await Promise.all(buildPromises);
32
+ const parsedPaths = parseTsConfig() || {};
33
+ const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
34
+ return Object.assign(Object.assign({}, config), { resolve: {
35
+ alias: Object.assign({}, filteredParsedPaths)
36
+ }, define: {
37
+ process: {
38
+ env: {}
39
+ }
40
+ } });
41
+ }
42
+ };
43
+ export default config;
@@ -0,0 +1,9 @@
1
+ import { themes } from "@storybook/theming";
2
+ export const parameters = {
3
+ darkMode: {
4
+ dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
5
+ light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
6
+ current: 'light',
7
+ stylePreview: true
8
+ }
9
+ };
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { exec as execCallback } from 'child_process';
3
+ export declare const exec: typeof execCallback.__promisify__;
4
+ /**
5
+ * Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
6
+ * @param dir The directory to search.
7
+ * @returns Array of story file paths.
8
+ */
9
+ export declare const getStoryFiles: (dir: string) => string[];
10
+ /**
11
+ * Detects which internal packages are used in the provided story files.
12
+ * It looks at every import that starts with the given package alias prefix,
13
+ * then extracts the package name (the segment immediately following the prefix).
14
+ *
15
+ * @param stories Array of story file paths.
16
+ * @returns Array of unique package names (e.g. ['foo', 'bar']).
17
+ */
18
+ export declare const detectUsedPackages: (stories: string[]) => string[];
19
+ /**
20
+ * Extracts all import paths from a file using the TypeScript compiler API.
21
+ * @param filePath The file path to parse.
22
+ * @returns Array of import strings.
23
+ */
24
+ export declare const extractImports: (filePath: string) => string[];
25
+ /**
26
+ * Parses the tsconfig paths and resolves them to absolute paths.
27
+ * @param tsconfigPath The path to the tsconfig file.
28
+ * @returns An object mapping alias keys to absolute paths.
29
+ */
30
+ export declare const parseTsConfig: () => Record<string, string> | null;
31
+ /**
32
+ * Filters the parsed tsconfig alias mapping to only include keys that correspond
33
+ * to the used packages.
34
+ *
35
+ * @param parsedPaths The full alias mapping from tsconfig.
36
+ * @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
37
+ * @returns Filtered alias mapping.
38
+ */
39
+ export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/web-components-vite';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1,70 @@
1
+ export declare const parameters: {
2
+ darkMode: {
3
+ dark: {
4
+ appBg: string;
5
+ base: "light" | "dark";
6
+ colorPrimary: string;
7
+ colorSecondary: string;
8
+ appContentBg: string;
9
+ appPreviewBg: string;
10
+ appBorderColor: string;
11
+ appBorderRadius: number;
12
+ fontBase: string;
13
+ fontCode: string;
14
+ textColor: string;
15
+ textInverseColor: string;
16
+ textMutedColor: string;
17
+ barTextColor: string;
18
+ barHoverColor: string;
19
+ barSelectedColor: string;
20
+ barBg: string;
21
+ buttonBg: string;
22
+ buttonBorder: string;
23
+ booleanBg: string;
24
+ booleanSelectedBg: string;
25
+ inputBg: string;
26
+ inputBorder: string;
27
+ inputTextColor: string;
28
+ inputBorderRadius: number;
29
+ brandTitle?: string;
30
+ brandUrl?: string;
31
+ brandImage?: string;
32
+ brandTarget?: string;
33
+ gridCellSize?: number;
34
+ };
35
+ light: {
36
+ appBg: string;
37
+ base: "light" | "dark";
38
+ colorPrimary: string;
39
+ colorSecondary: string;
40
+ appContentBg: string;
41
+ appPreviewBg: string;
42
+ appBorderColor: string;
43
+ appBorderRadius: number;
44
+ fontBase: string;
45
+ fontCode: string;
46
+ textColor: string;
47
+ textInverseColor: string;
48
+ textMutedColor: string;
49
+ barTextColor: string;
50
+ barHoverColor: string;
51
+ barSelectedColor: string;
52
+ barBg: string;
53
+ buttonBg: string;
54
+ buttonBorder: string;
55
+ booleanBg: string;
56
+ booleanSelectedBg: string;
57
+ inputBg: string;
58
+ inputBorder: string;
59
+ inputTextColor: string;
60
+ inputBorderRadius: number;
61
+ brandTitle?: string;
62
+ brandUrl?: string;
63
+ brandImage?: string;
64
+ brandTarget?: string;
65
+ gridCellSize?: number;
66
+ };
67
+ current: string;
68
+ stylePreview: boolean;
69
+ };
70
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./vite-chunk-plugin";
2
+ export * from "./stencil-clean-deps-plugin";
3
+ export * from "./vite-clean-deps-plugin";
4
+ export * from "./lazy-load-chunk-plugin";
@@ -0,0 +1,12 @@
1
+ export declare const lazyLoadChunkPlugin: () => {
2
+ name: string;
3
+ config(config: any): {
4
+ build: {
5
+ rollupOptions: {
6
+ output: {
7
+ manualChunks(id: any): any;
8
+ };
9
+ };
10
+ };
11
+ };
12
+ };
@@ -0,0 +1,5 @@
1
+ export declare function cleanPackageJsonStencil(): {
2
+ name: string;
3
+ apply: string;
4
+ buildEnd(): void;
5
+ };
@@ -0,0 +1,6 @@
1
+ export declare function viteChunkPlugin(): {
2
+ name: string;
3
+ config(config: any, { command }: {
4
+ command: any;
5
+ }): void;
6
+ };
@@ -0,0 +1,4 @@
1
+ export declare function cleanPackageJsonVite(widgetName: any): {
2
+ name: string;
3
+ closeBundle(): void;
4
+ };
@@ -0,0 +1 @@
1
+ export { LotterySelectionGroup } from './lottery-selection-group';
@@ -0,0 +1,122 @@
1
+ import "../../../../../../dist/packages/stencil/lottery-button/dist/types/index";
2
+ import "../../../../../../dist/packages/stencil/lottery-selection/dist/types/index";
3
+ import "../../../../../../dist/packages/stencil/lottery-tipping-dialog/dist/types/index";
4
+ import { EventEmitter } from '../../stencil-public-runtime';
5
+ import { BetPlacementType, InputProps } from '../../model/type';
6
+ export declare class LotterySelectionGroup {
7
+ /**
8
+ * The source for stream styling via a service.
9
+ */
10
+ mbSource: string;
11
+ /**
12
+ * Custom CSS styles to apply to the component.
13
+ */
14
+ clientStyling: string;
15
+ /**
16
+ * URL to a custom CSS file for additional styling.
17
+ */
18
+ clientStylingUrl: string;
19
+ /**
20
+ * The language code to use for translations. Defaults to 'en'.
21
+ */
22
+ language: string;
23
+ /**
24
+ * URL to fetch custom translation data from.
25
+ */
26
+ translationUrl: string;
27
+ /**
28
+ * The delimiter used to split the `bulletTexts` and `selectedBulletTexts` strings into individual items. Defaults to ','.
29
+ */
30
+ splitToken: string;
31
+ /**
32
+ * Required: The ID or index of the group, used to identify the group in the emitted event.
33
+ */
34
+ selectionGroupId: string;
35
+ /**
36
+ * The label to display for this selection group.
37
+ */
38
+ selectionGroupLabel: string;
39
+ /**
40
+ * Defines the behavior and rendering mode of the selection group (e.g., 'bet', 'choice', 'preview'). Defaults to 'bet'.
41
+ */
42
+ type: BetPlacementType;
43
+ /**
44
+ * A [splitToken]-separated string of currently selected bullet texts. e.g., '0,1,2,3'.
45
+ */
46
+ selectedBulletTexts: string;
47
+ /**
48
+ * The maximum number of bullets that can be selected. If null, no limit is enforced.
49
+ */
50
+ maxSelectedCount: number;
51
+ /**
52
+ * The maximum number of bullets to display in the group. Defaults to 11.
53
+ */
54
+ maxDisplayBulletsCount: number;
55
+ /**
56
+ * A [splitToken]-separated string of custom bullet texts to display. If not provided, numeric bullets are generated.
57
+ * Example: 'H,D,A' or '0,1,2,3,4,5,6,7,8,9'.
58
+ */
59
+ bulletTexts: string;
60
+ /**
61
+ * represents the absolute maximum integer value a bullet can have.
62
+ */
63
+ maxIntegerBulletText: number;
64
+ /**
65
+ * The minimum integer value for generated numeric bullets. Defaults to 0.
66
+ */
67
+ minIntegerBulletText: number;
68
+ /**
69
+ * Defines the expected type of bullet text: 'integer' for numbers, 'text' for any string. Defaults to 'integer'.
70
+ */
71
+ bulletTextType: 'integer' | 'text';
72
+ /**
73
+ * Whether the bullet has a border. Defaults to true.
74
+ */
75
+ hasBorder: boolean;
76
+ /** Whether the bullet has a background color. Defaults to true. */
77
+ hasBackground: boolean;
78
+ /** Custom title for the add-more dialog. If not provided, a default translated string is used. */
79
+ dialogTitle: string;
80
+ /** Custom placeholder for the input field in the add-more dialog. */
81
+ dialogInputPlaceholder: string;
82
+ /** Configuration for the add-more dialog, controlling its visibility and actions. */
83
+ dialogConfig: {
84
+ visible: boolean;
85
+ width: string;
86
+ onConfirm?: () => void;
87
+ onCancel?: () => void;
88
+ };
89
+ /**
90
+ * Information about the input field in the add-more dialog, including its validity and value.
91
+ * */
92
+ inputInfo: InputProps;
93
+ /**
94
+ * Emitted when the selection of bullets in the group changes.
95
+ * */
96
+ bulletGroupUpdateSelectedBulletTexts: EventEmitter<{
97
+ newSelectedBulletTexts: string;
98
+ selectionGroupId: string;
99
+ }>;
100
+ private stylingContainer;
101
+ private stylingSubscription;
102
+ handleClientStylingChange(newValue: any, oldValue: any): void;
103
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
104
+ handleMbSourceChange(newValue: any, oldValue: any): void;
105
+ componentWillLoad(): void;
106
+ componentDidLoad(): void;
107
+ disconnectedCallback(): void;
108
+ lotteryBulletClickHandler(event: CustomEvent): void;
109
+ get selectedSet(): Set<string>;
110
+ get bulletTextsSet(): Set<unknown>;
111
+ get lastDisplayBulletText(): number | string;
112
+ get isSingleSelectionMode(): boolean;
113
+ getBulletToRender(): {
114
+ bulletsToRender: unknown[];
115
+ showInputButton: boolean;
116
+ };
117
+ renderBulletGroup(): any;
118
+ handleCloseAddMoreDialog(): void;
119
+ handleInputChange(e: Event): void;
120
+ handleFillInAddMore(): void;
121
+ render(): any;
122
+ }
@@ -0,0 +1,218 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { BetPlacementType } from "./model/type";
9
+ export { BetPlacementType } from "./model/type";
10
+ export namespace Components {
11
+ interface LotterySelectionGroup {
12
+ /**
13
+ * Defines the expected type of bullet text: 'integer' for numbers, 'text' for any string. Defaults to 'integer'.
14
+ */
15
+ "bulletTextType": 'integer' | 'text';
16
+ /**
17
+ * A [splitToken]-separated string of custom bullet texts to display. If not provided, numeric bullets are generated. Example: 'H,D,A' or '0,1,2,3,4,5,6,7,8,9'.
18
+ */
19
+ "bulletTexts": string;
20
+ /**
21
+ * Custom CSS styles to apply to the component.
22
+ */
23
+ "clientStyling": string;
24
+ /**
25
+ * URL to a custom CSS file for additional styling.
26
+ */
27
+ "clientStylingUrl": string;
28
+ /**
29
+ * Custom placeholder for the input field in the add-more dialog.
30
+ */
31
+ "dialogInputPlaceholder": string;
32
+ /**
33
+ * Custom title for the add-more dialog. If not provided, a default translated string is used.
34
+ */
35
+ "dialogTitle": string;
36
+ /**
37
+ * Whether the bullet has a background color. Defaults to true.
38
+ */
39
+ "hasBackground": boolean;
40
+ /**
41
+ * Whether the bullet has a border. Defaults to true.
42
+ */
43
+ "hasBorder": boolean;
44
+ /**
45
+ * The language code to use for translations. Defaults to 'en'.
46
+ */
47
+ "language": string;
48
+ /**
49
+ * The maximum number of bullets to display in the group. Defaults to 11.
50
+ */
51
+ "maxDisplayBulletsCount": number;
52
+ /**
53
+ * represents the absolute maximum integer value a bullet can have.
54
+ */
55
+ "maxIntegerBulletText": number;
56
+ /**
57
+ * The maximum number of bullets that can be selected. If null, no limit is enforced.
58
+ */
59
+ "maxSelectedCount": number;
60
+ /**
61
+ * The source for stream styling via a service.
62
+ */
63
+ "mbSource": string;
64
+ /**
65
+ * The minimum integer value for generated numeric bullets. Defaults to 0.
66
+ */
67
+ "minIntegerBulletText": number;
68
+ /**
69
+ * A [splitToken]-separated string of currently selected bullet texts. e.g., '0,1,2,3'.
70
+ */
71
+ "selectedBulletTexts": string;
72
+ /**
73
+ * Required: The ID or index of the group, used to identify the group in the emitted event.
74
+ */
75
+ "selectionGroupId": string;
76
+ /**
77
+ * The label to display for this selection group.
78
+ */
79
+ "selectionGroupLabel": string;
80
+ /**
81
+ * The delimiter used to split the `bulletTexts` and `selectedBulletTexts` strings into individual items. Defaults to ','.
82
+ */
83
+ "splitToken": string;
84
+ /**
85
+ * URL to fetch custom translation data from.
86
+ */
87
+ "translationUrl": string;
88
+ /**
89
+ * Defines the behavior and rendering mode of the selection group (e.g., 'bet', 'choice', 'preview'). Defaults to 'bet'.
90
+ */
91
+ "type": BetPlacementType;
92
+ }
93
+ }
94
+ export interface LotterySelectionGroupCustomEvent<T> extends CustomEvent<T> {
95
+ detail: T;
96
+ target: HTMLLotterySelectionGroupElement;
97
+ }
98
+ declare global {
99
+ interface HTMLLotterySelectionGroupElementEventMap {
100
+ "bulletGroupUpdateSelection": { newSelectedBulletTexts: string; selectionGroupId: string };
101
+ }
102
+ interface HTMLLotterySelectionGroupElement extends Components.LotterySelectionGroup, HTMLStencilElement {
103
+ addEventListener<K extends keyof HTMLLotterySelectionGroupElementEventMap>(type: K, listener: (this: HTMLLotterySelectionGroupElement, ev: LotterySelectionGroupCustomEvent<HTMLLotterySelectionGroupElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
104
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
105
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
106
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
107
+ removeEventListener<K extends keyof HTMLLotterySelectionGroupElementEventMap>(type: K, listener: (this: HTMLLotterySelectionGroupElement, ev: LotterySelectionGroupCustomEvent<HTMLLotterySelectionGroupElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
108
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
109
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
110
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
111
+ }
112
+ var HTMLLotterySelectionGroupElement: {
113
+ prototype: HTMLLotterySelectionGroupElement;
114
+ new (): HTMLLotterySelectionGroupElement;
115
+ };
116
+ interface HTMLElementTagNameMap {
117
+ "lottery-selection-group": HTMLLotterySelectionGroupElement;
118
+ }
119
+ }
120
+ declare namespace LocalJSX {
121
+ interface LotterySelectionGroup {
122
+ /**
123
+ * Defines the expected type of bullet text: 'integer' for numbers, 'text' for any string. Defaults to 'integer'.
124
+ */
125
+ "bulletTextType"?: 'integer' | 'text';
126
+ /**
127
+ * A [splitToken]-separated string of custom bullet texts to display. If not provided, numeric bullets are generated. Example: 'H,D,A' or '0,1,2,3,4,5,6,7,8,9'.
128
+ */
129
+ "bulletTexts"?: string;
130
+ /**
131
+ * Custom CSS styles to apply to the component.
132
+ */
133
+ "clientStyling"?: string;
134
+ /**
135
+ * URL to a custom CSS file for additional styling.
136
+ */
137
+ "clientStylingUrl"?: string;
138
+ /**
139
+ * Custom placeholder for the input field in the add-more dialog.
140
+ */
141
+ "dialogInputPlaceholder"?: string;
142
+ /**
143
+ * Custom title for the add-more dialog. If not provided, a default translated string is used.
144
+ */
145
+ "dialogTitle"?: string;
146
+ /**
147
+ * Whether the bullet has a background color. Defaults to true.
148
+ */
149
+ "hasBackground"?: boolean;
150
+ /**
151
+ * Whether the bullet has a border. Defaults to true.
152
+ */
153
+ "hasBorder"?: boolean;
154
+ /**
155
+ * The language code to use for translations. Defaults to 'en'.
156
+ */
157
+ "language"?: string;
158
+ /**
159
+ * The maximum number of bullets to display in the group. Defaults to 11.
160
+ */
161
+ "maxDisplayBulletsCount"?: number;
162
+ /**
163
+ * represents the absolute maximum integer value a bullet can have.
164
+ */
165
+ "maxIntegerBulletText"?: number;
166
+ /**
167
+ * The maximum number of bullets that can be selected. If null, no limit is enforced.
168
+ */
169
+ "maxSelectedCount"?: number;
170
+ /**
171
+ * The source for stream styling via a service.
172
+ */
173
+ "mbSource"?: string;
174
+ /**
175
+ * The minimum integer value for generated numeric bullets. Defaults to 0.
176
+ */
177
+ "minIntegerBulletText"?: number;
178
+ /**
179
+ * Emitted when the selection of bullets in the group changes.
180
+ */
181
+ "onBulletGroupUpdateSelection"?: (event: LotterySelectionGroupCustomEvent<{ newSelectedBulletTexts: string; selectionGroupId: string }>) => void;
182
+ /**
183
+ * A [splitToken]-separated string of currently selected bullet texts. e.g., '0,1,2,3'.
184
+ */
185
+ "selectedBulletTexts"?: string;
186
+ /**
187
+ * Required: The ID or index of the group, used to identify the group in the emitted event.
188
+ */
189
+ "selectionGroupId"?: string;
190
+ /**
191
+ * The label to display for this selection group.
192
+ */
193
+ "selectionGroupLabel"?: string;
194
+ /**
195
+ * The delimiter used to split the `bulletTexts` and `selectedBulletTexts` strings into individual items. Defaults to ','.
196
+ */
197
+ "splitToken"?: string;
198
+ /**
199
+ * URL to fetch custom translation data from.
200
+ */
201
+ "translationUrl"?: string;
202
+ /**
203
+ * Defines the behavior and rendering mode of the selection group (e.g., 'bet', 'choice', 'preview'). Defaults to 'bet'.
204
+ */
205
+ "type"?: BetPlacementType;
206
+ }
207
+ interface IntrinsicElements {
208
+ "lottery-selection-group": LotterySelectionGroup;
209
+ }
210
+ }
211
+ export { LocalJSX as JSX };
212
+ declare module "@stencil/core" {
213
+ export namespace JSX {
214
+ interface IntrinsicElements {
215
+ "lottery-selection-group": LocalJSX.LotterySelectionGroup & JSXBase.HTMLAttributes<HTMLLotterySelectionGroupElement>;
216
+ }
217
+ }
218
+ }
@@ -0,0 +1 @@
1
+ export * from './components/lottery-selection-group';
@@ -0,0 +1,12 @@
1
+ export interface InputProps {
2
+ valid?: boolean;
3
+ errorMessage?: string;
4
+ value?: string;
5
+ }
6
+ export interface BulletConfig {
7
+ value: number;
8
+ text: string;
9
+ idx: number;
10
+ type: 'toggle' | 'delete' | 'input' | 'readonly' | 'disabled';
11
+ }
12
+ export type BetPlacementType = 'bet' | 'choice' | 'preview';