@truelab/truelogic 4.5.0 → 4.6.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.
- package/dist/487.min.js +1 -1
- package/dist/628.min.js +1 -1
- package/dist/truelogic.min.css +1 -1
- package/dist/truelogic.min.js +1 -1
- package/dist/types/src/app/lib/hooks/useSandboxEvents.d.ts +6 -0
- package/dist/types/src/entities/bonus/index.d.ts +3 -2
- package/dist/types/src/entities/bonus/model/bonusSlice.d.ts +3369 -9
- package/dist/types/src/entities/bonus/ui/BonusConfirmButtonBase/BonusConfirmButtonBase.d.ts +4 -1
- package/dist/types/src/entities/bonus/ui/BonusConfirmButtonBase/BonusConfirmButtonBase.stories.d.ts +4 -1
- package/dist/types/src/entities/bonus/ui/BonusPriceChip/BonusPriceChip.d.ts +26 -0
- package/dist/types/src/entities/stake/index.d.ts +1 -1
- package/dist/types/src/entities/stake/model/stakeSlice.d.ts +5 -2
- package/dist/types/src/features/play/lib/flow/roundEnd.test.d.ts +1 -0
- package/dist/types/src/features/play/model/startPlay.d.ts +5 -0
- package/dist/types/src/sandbox/gui/sections/configuration/bonusModes.d.ts +8 -0
- package/dist/types/src/shared/lib/singletones/analyticsEmitter.d.ts +2 -0
- package/dist/types/src/shared/lib/singletones/gameEmitter.d.ts +3 -1
- package/dist/types/src/shared/model/bonus/index.d.ts +1 -1
- package/dist/types/src/shared/model/bonus/types.d.ts +12 -2
- package/dist/types/src/shared/ui/TabBar/TabBar.stories.d.ts +1 -3
- package/dist/types/src/widgets/panel/ui/Panel/Panel.stories.d.ts +13 -0
- package/dist/types/src/widgets/playerPanel/ui/StakeAmount/StakeAmount.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PointerEventHandler } from 'react';
|
|
2
|
+
import { TBonusPriceChipVariant } from '../../../../shared/model/bonus';
|
|
2
3
|
type TProps = {
|
|
3
4
|
onClick: (event: React.MouseEvent) => void;
|
|
4
5
|
cashPrice: number;
|
|
6
|
+
/** The colour of the selected card: pink for a bonus game purchase, purple for a Bonus Bet */
|
|
7
|
+
priceVariant?: TBonusPriceChipVariant;
|
|
5
8
|
disabled: boolean;
|
|
6
9
|
/** Bonus mode is selected: the spin becomes the confirm control and shows the price chip */
|
|
7
10
|
isActive?: boolean;
|
|
@@ -13,5 +16,5 @@ type TProps = {
|
|
|
13
16
|
isPressed?: boolean;
|
|
14
17
|
onPointerDown?: PointerEventHandler<HTMLButtonElement>;
|
|
15
18
|
};
|
|
16
|
-
export declare const BonusConfirmButtonBase: ({ onClick, onPointerDown, cashPrice, disabled, isActive, isPressed, }: TProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const BonusConfirmButtonBase: ({ onClick, onPointerDown, cashPrice, priceVariant, disabled, isActive, isPressed, }: TProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export {};
|
package/dist/types/src/entities/bonus/ui/BonusConfirmButtonBase/BonusConfirmButtonBase.stories.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const meta: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: ({ onClick, onPointerDown, cashPrice, disabled, isActive, isPressed, }: {
|
|
3
|
+
component: ({ onClick, onPointerDown, cashPrice, priceVariant, disabled, isActive, isPressed, }: {
|
|
4
4
|
onClick: (event: React.MouseEvent) => void;
|
|
5
5
|
cashPrice: number;
|
|
6
|
+
priceVariant?: import("../..").TBonusPriceChipVariant;
|
|
6
7
|
disabled: boolean;
|
|
7
8
|
isActive?: boolean;
|
|
8
9
|
isPressed?: boolean;
|
|
@@ -20,11 +21,13 @@ export default meta;
|
|
|
20
21
|
export declare const Variants: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {
|
|
21
22
|
onClick: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
22
23
|
cashPrice: number;
|
|
24
|
+
priceVariant?: import("../..").TBonusPriceChipVariant;
|
|
23
25
|
disabled: boolean;
|
|
24
26
|
isActive?: boolean;
|
|
25
27
|
isPressed?: boolean;
|
|
26
28
|
onPointerDown?: import("react").PointerEventHandler<HTMLButtonElement>;
|
|
27
29
|
}, {
|
|
30
|
+
priceVariant?: import("../..").TBonusPriceChipVariant;
|
|
28
31
|
isActive?: boolean;
|
|
29
32
|
isPressed?: boolean;
|
|
30
33
|
onPointerDown?: import("react").PointerEventHandler<HTMLButtonElement>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TBonusPriceChipVariant } from '../../../../shared/model/bonus';
|
|
2
|
+
type TProps = {
|
|
3
|
+
price: number;
|
|
4
|
+
variant: TBonusPriceChipVariant;
|
|
5
|
+
/**
|
|
6
|
+
* Hidden with a short fade instead of unmounting, so the base game can dim the chip for the
|
|
7
|
+
* length of a round and bring it back with the available spin. `visibility` rides along with
|
|
8
|
+
* the opacity: it flips to hidden at the end of the fade-out and to visible at the start of the
|
|
9
|
+
* fade-in, so a hidden chip is hidden for the tests too
|
|
10
|
+
*/
|
|
11
|
+
isVisible?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The price capsule of the spin slot: hugs the bottom of the 110px spin box (92px in landscape) with
|
|
16
|
+
* the full cost of the next spin — in the shop for the selected card, in the base game for the active
|
|
17
|
+
* mode, Bonus Bet or Buy Feature (GTT-2876).
|
|
18
|
+
*
|
|
19
|
+
* Centered by flex, never by a transform. PanelPlay — the identical spin button the shop's confirm
|
|
20
|
+
* control covers — holds nothing but the filtered glyph, and a transformed child would give WebKit a
|
|
21
|
+
* stacking context to composite inside that button only: the two glyphs then round to different device
|
|
22
|
+
* pixels and the spin appears to hop when the modal opens. Flex centering overflows symmetrically,
|
|
23
|
+
* which is what a -translate-x-1/2 was for.
|
|
24
|
+
*/
|
|
25
|
+
export declare const BonusPriceChip: ({ price, variant, isVisible, className }: TProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getClosestAmountIndex } from './lib/getClosestAmountIndex';
|
|
2
|
-
export { applyStakeStored, getStakeAmounts, getStakeAmountsButtonDisabled, getStakeDefaultAmounts, getStakeMaxBetData, getStakeType, getStoredStakeType, persistStakeTransform, restoreStakeAfterBuy, saveStakeStored, setStake, setStakeAmountsMap, setStakeAmountsMapByLevels, setStakeByName, setStakeDefault, setStakeLevels, setStakeModes,
|
|
2
|
+
export { applyStakeStored, getStakeAmounts, getStakeAmountsButtonDisabled, getStakeDefaultAmounts, getStakeMaxBetData, getStakeType, getStoredStakeType, persistStakeTransform, restoreStakeAfterBuy, saveStakeStored, setStake, setStakeAmountsMap, setStakeAmountsMapByLevels, setStakeByName, setStakeDefault, setStakeLevels, setStakeModes, setStakeNextAmount, setStakeNextLevel, setStakePreviousAmount, setStakePreviousLevel, setStakeStored, setStakeWithMaxBetCheck, stakeReducer, } from './model/stakeSlice';
|
|
3
3
|
export { PanelStakeAmounts } from './ui/PanelStakeAmounts/PanelStakeAmounts';
|
|
@@ -10,7 +10,6 @@ export type TStakeState = {
|
|
|
10
10
|
amountsMapByLevels: TStakeAmountsMapByLevels;
|
|
11
11
|
modes: TStakeMode[];
|
|
12
12
|
levels: number[];
|
|
13
|
-
stakeNameBeforeBuy: string | null;
|
|
14
13
|
};
|
|
15
14
|
export declare const initialState: TStakeState;
|
|
16
15
|
export declare const persistStakeTransform: import("redux-persist").Transform<TStakeState, Partial<TStakeState>, any, any>;
|
|
@@ -65,7 +64,7 @@ export declare const getStakeType: import("reselect").Selector<{
|
|
|
65
64
|
}, EStakeType, []> & {
|
|
66
65
|
unwrapped: (state: TStakeState) => EStakeType;
|
|
67
66
|
};
|
|
68
|
-
export declare const setStakeCurrent: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStake, "stake/setStakeCurrent">, setStakeAmountIndex: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number, "stake/setStakeAmountIndex">, setStakeAmountsMapByLevels: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStakeAmountsMapByLevels, "stake/setStakeAmountsMapByLevels">, setStakeAmountsMap: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStakeAmountsMap, "stake/setStakeAmountsMap">, setStakeDefault: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStake, "stake/setStakeDefault">, setStakeModes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStakeMode[], "stake/setStakeModes">, setStakeLevels: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number[], "stake/setStakeLevels">, setStakeStored: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStake, "stake/setStakeStored"
|
|
67
|
+
export declare const setStakeCurrent: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStake, "stake/setStakeCurrent">, setStakeAmountIndex: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number, "stake/setStakeAmountIndex">, setStakeAmountsMapByLevels: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStakeAmountsMapByLevels, "stake/setStakeAmountsMapByLevels">, setStakeAmountsMap: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStakeAmountsMap, "stake/setStakeAmountsMap">, setStakeDefault: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStake, "stake/setStakeDefault">, setStakeModes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStakeMode[], "stake/setStakeModes">, setStakeLevels: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<number[], "stake/setStakeLevels">, setStakeStored: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<TStake, "stake/setStakeStored">;
|
|
69
68
|
export declare const setStake: TAppThunkAction<Partial<TStake> & {
|
|
70
69
|
amountIndex?: number;
|
|
71
70
|
force?: boolean;
|
|
@@ -81,6 +80,10 @@ export declare const applyStakeStored: TAppThunkAction<{
|
|
|
81
80
|
apiStake: TStake;
|
|
82
81
|
}>;
|
|
83
82
|
export declare const setStakeByName: TAppThunkAction<string>;
|
|
83
|
+
/**
|
|
84
|
+
* A purchase round is over (or failed): back to the regular stake. Never to a Bonus Bet the purchase
|
|
85
|
+
* replaced — the purchase turns the Buy Feature mode on, and the two modes are exclusive (GTT-2875)
|
|
86
|
+
*/
|
|
84
87
|
export declare const restoreStakeAfterBuy: TAppThunkAction;
|
|
85
88
|
export declare const saveStakeStored: TAppThunkAction;
|
|
86
89
|
export declare const stakeReducer: import("redux").Reducer<TStakeState>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { TAppThunkAction } from '../../../shared/lib/store';
|
|
2
|
+
/**
|
|
3
|
+
* The spin control: a new play, a choice step or a skip of the running play. In the Buy Feature mode
|
|
4
|
+
* a new play is a purchase of the mode's bonus game. With the built-in panel replaced by the game's
|
|
5
|
+
* own (the External UI module) the mode is never active, so `ui.play()` plays regular rounds.
|
|
6
|
+
*/
|
|
2
7
|
export declare const startPlay: TAppThunkAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GUI } from '../../../../sandbox/gui/gui';
|
|
2
|
+
/**
|
|
3
|
+
* QA control of the bonus modes (a Bonus Bet stake, the Buy Feature mode — GTT-2875), a live game
|
|
4
|
+
* state rather than a configuration: the game reports it on every change, Apply switches to the
|
|
5
|
+
* picked card without a reload — the game tells a Bonus Bet from a bonus game by the card's stake
|
|
6
|
+
* type. The Buy Feature mode has no look until GTT-2876, so `state` is where QA sees it.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setupBonusModes(gui: GUI): void;
|
|
@@ -7,6 +7,8 @@ type TEventOptions = {
|
|
|
7
7
|
value?: number;
|
|
8
8
|
betType?: string;
|
|
9
9
|
currency?: string;
|
|
10
|
+
/** Extra event parameters, pushed to the data layer as they are (`purchase_source` of `bonus:purchase`) */
|
|
11
|
+
params?: TAnalyticsCustomParams;
|
|
10
12
|
};
|
|
11
13
|
export type TAnalyticsEvents = {
|
|
12
14
|
['modal:opened']: (modalName: string) => void;
|
|
@@ -81,7 +81,9 @@ export type TAutoPlayStartedResponse = {
|
|
|
81
81
|
*/
|
|
82
82
|
export type TButtonName = 'play' | 'stop' | 'bets'
|
|
83
83
|
/** @deprecated The burger button is gone, the menu opens with the Info button (`info`). */
|
|
84
|
-
| 'menu' | 'bonus' | 'bonusBetOff'
|
|
84
|
+
| 'menu' | 'bonus' | 'bonusBetOff'
|
|
85
|
+
/** The shop button while the Buy Feature mode is on — switches the mode off. */
|
|
86
|
+
| 'buyFeatureOff' | 'bonusFeature' | 'bonusFeatureBuy'
|
|
85
87
|
/** `value` is the modal name (`menu` for the game menu, `gameInfo` for the welcome Game Info page). */
|
|
86
88
|
| 'modalClose' | 'autoPlay' | 'autoPlayStop' | 'autoPlayOption' | 'autoPlayStart'
|
|
87
89
|
/** @deprecated The menu cards are gone, the sections are tabs (`menuTab`). */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { bonusInitialState } from './const';
|
|
2
|
-
export type { TBonusConfig, TBonusDescription, TBonusMode, TBonusModes, TBonusState, TBonusWithStakeType, } from './types';
|
|
2
|
+
export type { TBonusConfig, TBonusDescription, TBonusMode, TBonusModes, TBonusPriceChipVariant, TBonusSpinPriceChip, TBonusState, TBonusWithStakeType, } from './types';
|
|
@@ -26,6 +26,13 @@ export type TBonusWithStakeType = {
|
|
|
26
26
|
bonus: TBonusMode;
|
|
27
27
|
stake: TStakeMode;
|
|
28
28
|
};
|
|
29
|
+
/** The colour of the shop card a price belongs to: pink for a bonus game purchase, purple for a Bonus Bet */
|
|
30
|
+
export type TBonusPriceChipVariant = 'buy' | 'bonusBet';
|
|
31
|
+
/** The price chip of the base game's spin: the full cost of the next spin and the colour of its mode */
|
|
32
|
+
export type TBonusSpinPriceChip = {
|
|
33
|
+
price: number;
|
|
34
|
+
variant: TBonusPriceChipVariant;
|
|
35
|
+
};
|
|
29
36
|
export type TBonusState = {
|
|
30
37
|
modes: TBonusModes;
|
|
31
38
|
bonusBetModes: TBonusWithStakeType[];
|
|
@@ -35,7 +42,10 @@ export type TBonusState = {
|
|
|
35
42
|
selectedModeName: string | null;
|
|
36
43
|
preselectedModeName: string | null;
|
|
37
44
|
customBonusBets: boolean;
|
|
38
|
-
tmpLevel: number | null;
|
|
39
|
-
tmpAmountIndex: number | null;
|
|
40
45
|
maxBonusCards: number;
|
|
46
|
+
/**
|
|
47
|
+
* The Buy Feature mode: the bonus game the panel's SPIN buys in the base game, `null` while the
|
|
48
|
+
* mode is off. Set by a purchase, persisted like a Bonus Bet stake (GTT-2875)
|
|
49
|
+
*/
|
|
50
|
+
buyFeatureModeName: string | null;
|
|
41
51
|
};
|
|
@@ -349,7 +349,6 @@ declare const meta: {
|
|
|
349
349
|
maxQty?: number;
|
|
350
350
|
}[];
|
|
351
351
|
levels?: number[];
|
|
352
|
-
stakeNameBeforeBuy?: string | null;
|
|
353
352
|
};
|
|
354
353
|
autoPlay?: {
|
|
355
354
|
isActive?: boolean;
|
|
@@ -751,9 +750,8 @@ declare const meta: {
|
|
|
751
750
|
selectedModeName?: string | null;
|
|
752
751
|
preselectedModeName?: string | null;
|
|
753
752
|
customBonusBets?: boolean;
|
|
754
|
-
tmpLevel?: number | null;
|
|
755
|
-
tmpAmountIndex?: number | null;
|
|
756
753
|
maxBonusCards?: number;
|
|
754
|
+
buyFeatureModeName?: string | null;
|
|
757
755
|
};
|
|
758
756
|
realityCheck?: {
|
|
759
757
|
isActive?: boolean;
|
|
@@ -44,6 +44,19 @@ export declare const DefaultLandscapeBonusBetUIFrozen: import("storybook/interna
|
|
|
44
44
|
export declare const DefaultLandscapeSocialCasino: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
45
45
|
export declare const DefaultPortraitSocialCasino: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
46
46
|
export declare const DefaultLandscapeSocialCasinoBonusBet: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
47
|
+
export declare const DefaultPortraitBonusBet: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
48
|
+
export declare const DefaultLandscapeBuyFeature: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
49
|
+
export declare const DefaultPortraitBuyFeature: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
50
|
+
export declare const DefaultLandscapeBuyFeatureLongPrice: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
51
|
+
export declare const DefaultPortraitBuyFeatureLongPrice: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
52
|
+
export declare const DefaultLandscapeBonusBetLongPrice: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
53
|
+
export declare const DefaultPortraitBonusBetLongPrice: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
54
|
+
export declare const DefaultLandscapeBuyFeatureUIFrozen: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
55
|
+
export declare const DefaultLandscapePlayingBuyFeature: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
56
|
+
export declare const DefaultPortraitPlayingBuyFeature: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
57
|
+
export declare const DefaultLandscapeSocialCasinoBuyFeature: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
58
|
+
export declare const DefaultPortraitSocialCasinoBuyFeature: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
59
|
+
export declare const DefaultPortraitSocialCasinoBonusBet: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
47
60
|
export declare const DefaultLandscapeBonusShopDimmed: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
48
61
|
export declare const DefaultPortraitBonusShopDimmed: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
49
62
|
export declare const DefaultLandscapeCounter: import("storybook/internal/csf").StoryAnnotations<import("@storybook/react-webpack5").ReactRenderer, {}, {}>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
type TStakAmountProps = {
|
|
2
2
|
value: string;
|
|
3
3
|
className?: string;
|
|
4
|
-
isBonusBetMode?: boolean;
|
|
5
4
|
isNetPositionMode?: boolean;
|
|
6
5
|
};
|
|
7
|
-
export declare const StakeAmount: ({ value, className,
|
|
6
|
+
export declare const StakeAmount: ({ value, className, isNetPositionMode }: TStakAmountProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|