@betorigami/game-ui-shared 1.3.1 → 1.5.0
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/components/shared/Button/Button.d.ts +2 -2
- package/dist/components/shared/Button/Button.styles.d.ts +3 -1
- package/dist/components/shared/Button/LinkButton.d.ts +24 -0
- package/dist/components/shared/DepositButton/DepositButton.d.ts +0 -1
- package/dist/components/shared/Footer/Footer.d.ts +0 -1
- package/dist/components/shared/GameComponent.d.ts +2 -0
- package/dist/components/shared/GameLayout/GameLayout.d.ts +2 -1
- package/dist/components/shared/GameOutcomeDisplay/GameOutcomeDisplay.d.ts +1 -1
- package/dist/components/shared/GameProviderWrapper.d.ts +4 -3
- package/dist/components/shared/UiLock/UiLock.d.ts +10 -0
- package/dist/components/shared/UiLock/UiLock.styles.d.ts +1 -0
- package/dist/components/shared/UiLock/UiLockContent.d.ts +9 -0
- package/dist/components/shared/context/game.context.d.ts +2 -1
- package/dist/controllers/hotkey.controller.d.ts +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +2653 -2608
- package/dist/shared/event-map.d.ts +3 -1
- package/dist/shared/provider-api/error-codes.d.ts +1 -0
- package/dist/translations/ar.json.d.ts +2 -1
- package/dist/translations/de.json.d.ts +2 -1
- package/dist/translations/en-soc.json.d.ts +2 -1
- package/dist/translations/en.json.d.ts +2 -1
- package/dist/translations/es.json.d.ts +2 -1
- package/dist/translations/fi.json.d.ts +2 -1
- package/dist/translations/fr.json.d.ts +2 -1
- package/dist/translations/hi.json.d.ts +2 -1
- package/dist/translations/id.json.d.ts +2 -1
- package/dist/translations/index.d.ts +34 -17
- package/dist/translations/ja.json.d.ts +2 -1
- package/dist/translations/ko.json.d.ts +2 -1
- package/dist/translations/pl.json.d.ts +2 -1
- package/dist/translations/pt.json.d.ts +2 -1
- package/dist/translations/ru.json.d.ts +2 -1
- package/dist/translations/tr.json.d.ts +2 -1
- package/dist/translations/vi.json.d.ts +2 -1
- package/dist/translations/zh.json.d.ts +2 -1
- package/package.json +1 -1
- package/dist/components/shared/SessionLock/SessionLock.d.ts +0 -10
- package/dist/components/shared/SessionLock/SessionLock.styles.d.ts +0 -1
- package/dist/shared/navigate-to-lobby.d.ts +0 -1
|
@@ -11,12 +11,12 @@ export declare class Button extends OrigamiElement {
|
|
|
11
11
|
serializable?: boolean;
|
|
12
12
|
slotAssignment?: SlotAssignmentMode;
|
|
13
13
|
};
|
|
14
|
-
gameData
|
|
14
|
+
gameData?: gameContextType;
|
|
15
15
|
variant: ButtonVariant;
|
|
16
16
|
disabled: boolean;
|
|
17
17
|
ariaLabel: string | null;
|
|
18
18
|
ariaDescribedby: string | null;
|
|
19
|
-
type:
|
|
19
|
+
type: HTMLButtonElement['type'];
|
|
20
20
|
isLoading: boolean;
|
|
21
21
|
fullWidth: boolean;
|
|
22
22
|
hotkey?: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
+
import { gameContextType } from '../context/game.context';
|
|
3
|
+
import { ButtonVariant } from './Button';
|
|
4
|
+
export type LinkButtonTarget = '_self' | '_top' | '_blank';
|
|
5
|
+
export declare class LinkButton extends OrigamiElement {
|
|
6
|
+
static styles: import('lit').CSSResult[];
|
|
7
|
+
static shadowRootOptions: {
|
|
8
|
+
delegatesFocus: boolean;
|
|
9
|
+
clonable?: boolean;
|
|
10
|
+
customElementRegistry?: CustomElementRegistry;
|
|
11
|
+
mode: ShadowRootMode;
|
|
12
|
+
serializable?: boolean;
|
|
13
|
+
slotAssignment?: SlotAssignmentMode;
|
|
14
|
+
};
|
|
15
|
+
gameData?: gameContextType;
|
|
16
|
+
href: string;
|
|
17
|
+
target: LinkButtonTarget;
|
|
18
|
+
variant: ButtonVariant;
|
|
19
|
+
fullWidth: boolean;
|
|
20
|
+
ariaLabel: string | null;
|
|
21
|
+
private _handlePointerDown;
|
|
22
|
+
private _handleClick;
|
|
23
|
+
render(): import('lit').TemplateResult<1>;
|
|
24
|
+
}
|
|
@@ -3,7 +3,6 @@ import { gameContextType } from '../context/game.context';
|
|
|
3
3
|
export declare class DepositButton extends OrigamiElement {
|
|
4
4
|
betAboveBalance: boolean;
|
|
5
5
|
gameData?: gameContextType;
|
|
6
|
-
private handleDepositClick;
|
|
7
6
|
private shouldShowDepositButton;
|
|
8
7
|
render(): import('lit').TemplateResult<1>;
|
|
9
8
|
}
|
|
@@ -3,6 +3,7 @@ import { default as OrigamiElement } from '../../shared/origami-element';
|
|
|
3
3
|
import { ErrorCode } from '../../shared/provider-api/error-codes';
|
|
4
4
|
import { BetMode } from './GameSidebar/GameSidebar';
|
|
5
5
|
import { AutobetEventPayload } from './GenericAutobet/GenericAutobet';
|
|
6
|
+
import { UiLockContent } from './UiLock/UiLockContent';
|
|
6
7
|
import { default as Big } from 'big.js';
|
|
7
8
|
import { NewBetItem } from '../../controllers/history.controller';
|
|
8
9
|
export declare const isBetMode: (value: unknown) => value is BetMode;
|
|
@@ -76,6 +77,7 @@ export declare abstract class GameComponent extends OrigamiElement {
|
|
|
76
77
|
protected updateHistoryWithBet(betResult: NewBetItem): void;
|
|
77
78
|
protected setActiveBetNonce(nonce: number): void;
|
|
78
79
|
protected checkSessionExpired: (errorCode: ErrorCode) => void;
|
|
80
|
+
protected lockUi: (lock: UiLockContent) => void;
|
|
79
81
|
protected showError(message: string): void;
|
|
80
82
|
protected playWinFeedback(): void;
|
|
81
83
|
}
|
|
@@ -19,7 +19,8 @@ export declare class GameLayout extends OrigamiElement {
|
|
|
19
19
|
private navigateToModal;
|
|
20
20
|
private historyHasNextPage;
|
|
21
21
|
private isLoadingMoreHistory;
|
|
22
|
-
private get
|
|
22
|
+
private get uiLock();
|
|
23
|
+
private get isUiLocked();
|
|
23
24
|
private get gameFooterPosition();
|
|
24
25
|
get isDemoMode(): boolean;
|
|
25
26
|
private getCustomBackgroundUrl;
|
|
@@ -19,9 +19,8 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
19
19
|
maxPayout: number | null;
|
|
20
20
|
minBet: number | null;
|
|
21
21
|
maxBet: number | null;
|
|
22
|
-
edge:
|
|
22
|
+
edge: 1 | 2 | 3 | 8 | 4;
|
|
23
23
|
showCurrencyAsText: boolean;
|
|
24
|
-
sessionLocked: boolean;
|
|
25
24
|
footerPosition: 'ABOVE' | 'BELOW';
|
|
26
25
|
logoUrl: string | null;
|
|
27
26
|
alwaysEnableMaxBetButton: boolean;
|
|
@@ -82,8 +81,10 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
82
81
|
private _haptics;
|
|
83
82
|
private _resizeObserver;
|
|
84
83
|
private hasLoadedBalance;
|
|
84
|
+
private uiLock;
|
|
85
85
|
protected _gameProvider: ContextProvider<typeof gameContext>;
|
|
86
|
-
private
|
|
86
|
+
private applyUiLock;
|
|
87
|
+
private handleLockUi;
|
|
87
88
|
connectedCallback(): void;
|
|
88
89
|
firstUpdated(_changed: PropertyValues): Promise<void>;
|
|
89
90
|
disconnectedCallback(): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
|
+
export declare class UiLock extends OrigamiElement {
|
|
4
|
+
static styles: import('lit').CSSResult[];
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
button?: TemplateResult;
|
|
8
|
+
protected firstUpdated(): Promise<void>;
|
|
9
|
+
render(): TemplateResult<1>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const uiLockStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { Language } from '../../../translations';
|
|
3
|
+
export type UiLockContent = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
button?: TemplateResult;
|
|
7
|
+
};
|
|
8
|
+
export declare const createLobbyLockButton: (lobbyUrl: string | null, language: Language) => TemplateResult | undefined;
|
|
9
|
+
export declare const createSessionExpiredLock: (lobbyUrl: string | null, language: Language) => UiLockContent;
|
|
@@ -4,6 +4,7 @@ import { HistoryController } from '../../../controllers/history.controller';
|
|
|
4
4
|
import { SoundEffectsController } from '../../../controllers/sound/sound-effects.controller';
|
|
5
5
|
import { SupportedEdgePercentages, Currency } from '../../../shared/constants';
|
|
6
6
|
import { Language } from '../../../translations';
|
|
7
|
+
import { UiLockContent } from '../UiLock/UiLockContent';
|
|
7
8
|
export type gameContextType = {
|
|
8
9
|
betAmount: string;
|
|
9
10
|
updateBetAmount: (newAmount: Big) => void;
|
|
@@ -40,7 +41,7 @@ export type gameContextType = {
|
|
|
40
41
|
minBet: number | null;
|
|
41
42
|
maxBet: number | null;
|
|
42
43
|
edge: SupportedEdgePercentages;
|
|
43
|
-
|
|
44
|
+
uiLock: UiLockContent | null;
|
|
44
45
|
footerPosition: 'ABOVE' | 'BELOW';
|
|
45
46
|
logoUrl: string | null;
|
|
46
47
|
alwaysEnableMaxBetButton: boolean;
|
|
@@ -22,7 +22,7 @@ export declare class HotkeyController {
|
|
|
22
22
|
private _clearRepeatTimer;
|
|
23
23
|
private isInputCurrentlyFocused;
|
|
24
24
|
private checkForOpenModals;
|
|
25
|
-
private
|
|
25
|
+
private checkForUiLock;
|
|
26
26
|
private shouldSkipAction;
|
|
27
27
|
private _onKeyDown;
|
|
28
28
|
private _onKeyUp;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/shared/BetResultModal/BetResultModal.styles';
|
|
|
6
6
|
export * from './components/shared/BetResultModal/BetResultModal';
|
|
7
7
|
export * from './components/shared/Button/Button.styles';
|
|
8
8
|
export * from './components/shared/Button/Button';
|
|
9
|
+
export * from './components/shared/Button/LinkButton';
|
|
9
10
|
export * from './components/shared/Button/ButtonGroup.styles';
|
|
10
11
|
export * from './components/shared/Button/ButtonGroup';
|
|
11
12
|
export * from './components/shared/ChipStack/ChipStack.styles';
|
|
@@ -182,8 +183,9 @@ export * from './utils/game-layout-style';
|
|
|
182
183
|
export * from './utils/scroll';
|
|
183
184
|
export * from './utils/slot.controller';
|
|
184
185
|
export * from './utils/tabbable';
|
|
185
|
-
export * from './components/shared/
|
|
186
|
-
export * from './components/shared/
|
|
186
|
+
export * from './components/shared/UiLock/UiLock.styles';
|
|
187
|
+
export * from './components/shared/UiLock/UiLock';
|
|
188
|
+
export * from './components/shared/UiLock/UiLockContent';
|
|
187
189
|
export * from './components/shared/GameProviderWrapper';
|
|
188
190
|
export * from './components/shared/GameProviderWrapper.styles';
|
|
189
191
|
export * from './components/shared/BetDetailsComponent/BetDetailsComponent';
|