mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class CatalogEvent extends NitroEvent
|
||||
{
|
||||
public static SHOW_CATALOG: string = 'CE_SHOW_CATALOG';
|
||||
public static HIDE_CATALOG: string = 'CE_HIDE_CATALOG';
|
||||
public static TOGGLE_CATALOG: string = 'CE_TOGGLE_CATALOG';
|
||||
public static SOLD_OUT: string = 'CE_SOLD_OUT';
|
||||
public static APPROVE_NAME_RESULT: string = 'CE_APPROVE_NAME_RESULT';
|
||||
public static PURCHASE_APPROVED: string = 'CE_PURCHASE_APPROVED';
|
||||
public static INIT_GIFT: string = 'CE_INIT_GIFT';
|
||||
public static CATALOG_RESET: string = 'CE_RESET';
|
||||
public static CATALOG_INVISIBLE_PAGE_VISITED: string = 'CE_CATALOG_INVISIBLE_PAGE_VISITED';
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { CatalogEvent } from './CatalogEvent';
|
||||
|
||||
export class CatalogInitGiftEvent extends CatalogEvent
|
||||
{
|
||||
private _pageId: number;
|
||||
private _offerId: number;
|
||||
private _extraData: string;
|
||||
|
||||
constructor(pageId: number, offerId: number, extraData: string)
|
||||
{
|
||||
super(CatalogEvent.INIT_GIFT);
|
||||
|
||||
this._pageId = pageId;
|
||||
this._offerId = offerId;
|
||||
this._extraData = extraData;
|
||||
}
|
||||
|
||||
public get pageId(): number
|
||||
{
|
||||
return this._pageId;
|
||||
}
|
||||
|
||||
public get offerId(): number
|
||||
{
|
||||
return this._offerId;
|
||||
}
|
||||
|
||||
public get extraData(): string
|
||||
{
|
||||
return this._extraData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { CatalogEvent } from '.';
|
||||
import { FurnitureItem } from '../../api';
|
||||
|
||||
export class CatalogPostMarketplaceOfferEvent extends CatalogEvent
|
||||
{
|
||||
public static readonly POST_MARKETPLACE = 'CE_POST_MARKETPLACE';
|
||||
|
||||
private _item: FurnitureItem;
|
||||
|
||||
constructor(item: FurnitureItem)
|
||||
{
|
||||
super(CatalogPostMarketplaceOfferEvent.POST_MARKETPLACE);
|
||||
this._item = item;
|
||||
}
|
||||
|
||||
public get item(): FurnitureItem
|
||||
{
|
||||
return this._item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class CatalogPurchaseFailureEvent extends NitroEvent
|
||||
{
|
||||
public static PURCHASE_FAILED: string = 'CPFE_PURCHASE_FAILED';
|
||||
|
||||
private _code: number;
|
||||
|
||||
constructor(code: number)
|
||||
{
|
||||
super(CatalogPurchaseFailureEvent.PURCHASE_FAILED);
|
||||
|
||||
this._code = code;
|
||||
}
|
||||
|
||||
public get code(): number
|
||||
{
|
||||
return this._code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class CatalogPurchaseNotAllowedEvent extends NitroEvent
|
||||
{
|
||||
public static NOT_ALLOWED: string = 'CPNAE_NOT_ALLOWED';
|
||||
|
||||
private _code: number;
|
||||
|
||||
constructor(code: number)
|
||||
{
|
||||
super(CatalogPurchaseNotAllowedEvent.NOT_ALLOWED);
|
||||
|
||||
this._code = code;
|
||||
}
|
||||
|
||||
public get code(): number
|
||||
{
|
||||
return this._code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
import { CatalogWidgetEvent } from './CatalogWidgetEvent';
|
||||
|
||||
export class CatalogPurchaseOverrideEvent extends NitroEvent
|
||||
{
|
||||
private _callback: Function;
|
||||
|
||||
constructor(callback: Function)
|
||||
{
|
||||
super(CatalogWidgetEvent.PURCHASE_OVERRIDE);
|
||||
|
||||
this._callback = callback;
|
||||
}
|
||||
|
||||
public get callback(): Function
|
||||
{
|
||||
return this._callback;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class CatalogPurchaseSoldOutEvent extends NitroEvent
|
||||
{
|
||||
public static SOLD_OUT: string = 'CPSOE_SOLD_OUT';
|
||||
|
||||
constructor()
|
||||
{
|
||||
super(CatalogPurchaseSoldOutEvent.SOLD_OUT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NitroEvent, PurchaseOKMessageOfferData } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class CatalogPurchasedEvent extends NitroEvent
|
||||
{
|
||||
public static PURCHASE_SUCCESS: string = 'CPE_PURCHASE_SUCCESS';
|
||||
|
||||
private _purchase: PurchaseOKMessageOfferData;
|
||||
|
||||
constructor(purchase: PurchaseOKMessageOfferData)
|
||||
{
|
||||
super(CatalogPurchasedEvent.PURCHASE_SUCCESS);
|
||||
|
||||
this._purchase = purchase;
|
||||
}
|
||||
|
||||
public get purchase(): PurchaseOKMessageOfferData
|
||||
{
|
||||
return this._purchase;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { IObjectData, NitroEvent } from '@nitrots/nitro-renderer';
|
||||
import { CatalogWidgetEvent } from './CatalogWidgetEvent';
|
||||
|
||||
export class CatalogSetRoomPreviewerStuffDataEvent extends NitroEvent
|
||||
{
|
||||
private _stuffData: IObjectData;
|
||||
|
||||
constructor(stuffData: IObjectData)
|
||||
{
|
||||
super(CatalogWidgetEvent.SET_PREVIEWER_STUFFDATA);
|
||||
|
||||
this._stuffData = stuffData;
|
||||
}
|
||||
|
||||
public get stuffData(): IObjectData
|
||||
{
|
||||
return this._stuffData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class CatalogWidgetEvent extends NitroEvent
|
||||
{
|
||||
public static WIDGETS_INITIALIZED: string = 'CWE_CWE_WIDGETS_INITIALIZED';
|
||||
public static SELECT_PRODUCT: string = 'CWE_SELECT_PRODUCT';
|
||||
public static SET_EXTRA_PARM: string = 'CWE_CWE_SET_EXTRA_PARM';
|
||||
public static PURCHASE: string = 'CWE_PURCHASE';
|
||||
public static COLOUR_ARRAY: string = 'CWE_COLOUR_ARRAY';
|
||||
public static MULTI_COLOUR_ARRAY: string = 'CWE_MULTI_COLOUR_ARRAY';
|
||||
public static COLOUR_INDEX: string = 'CWE_COLOUR_INDEX';
|
||||
public static TEXT_INPUT: string = 'CWE_TEXT_INPUT';
|
||||
public static DROPMENU_SELECT: string = 'CWE_CWE_DROPMENU_SELECT';
|
||||
public static PURCHASE_OVERRIDE: string = 'CWE_PURCHASE_OVERRIDE';
|
||||
public static SELLABLE_PET_PALETTES: string = 'CWE_SELLABLE_PET_PALETTES';
|
||||
public static UPDATE_ROOM_PREVIEW: string = 'CWE_UPDATE_ROOM_PREVIEW';
|
||||
public static GUILD_SELECTED: string = 'CWE_GUILD_SELECTED';
|
||||
public static TOTAL_PRICE_WIDGET_INITIALIZED: string = 'CWE_TOTAL_PRICE_WIDGET_INITIALIZED';
|
||||
public static PRODUCT_OFFER_UPDATED: string = 'CWE_CWE_PRODUCT_OFFER_UPDATED';
|
||||
public static SET_PREVIEWER_STUFFDATA: string = 'CWE_CWE_SET_PREVIEWER_STUFFDATA';
|
||||
public static EXTRA_PARAM_REQUIRED_FOR_BUY: string = 'CWE_CWE_EXTRA_PARAM_REQUIRED_FOR_BUY';
|
||||
public static TOGGLE: string = 'CWE_CWE_TOGGLE';
|
||||
public static BUILDER_SUBSCRIPTION_UPDATED: string = 'CWE_CWE_BUILDER_SUBSCRIPTION_UPDATED';
|
||||
public static ROOM_CHANGED: string = 'CWE_CWE_ROOM_CHANGED';
|
||||
public static SHOW_WARNING_TEXT: string = 'CWE_CWE_SHOW_WARNING_TEXT';
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IObjectData, NitroEvent } from '@nitrots/nitro-renderer';
|
||||
import { IPurchasableOffer } from '../../api';
|
||||
|
||||
export class SetRoomPreviewerStuffDataEvent extends NitroEvent
|
||||
{
|
||||
public static UPDATE_STUFF_DATA: string = 'SRPSA_UPDATE_STUFF_DATA';
|
||||
|
||||
private _offer: IPurchasableOffer;
|
||||
private _stuffData: IObjectData;
|
||||
|
||||
constructor(offer: IPurchasableOffer, stuffData: IObjectData)
|
||||
{
|
||||
super(SetRoomPreviewerStuffDataEvent.UPDATE_STUFF_DATA);
|
||||
|
||||
this._offer = offer;
|
||||
this._stuffData = stuffData;
|
||||
}
|
||||
|
||||
public get offer(): IPurchasableOffer
|
||||
{
|
||||
return this._offer;
|
||||
}
|
||||
|
||||
public get stuffData(): IObjectData
|
||||
{
|
||||
return this._stuffData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export * from './CatalogEvent';
|
||||
export * from './CatalogInitGiftEvent';
|
||||
export * from './CatalogPostMarketplaceOfferEvent';
|
||||
export * from './CatalogPurchasedEvent';
|
||||
export * from './CatalogPurchaseFailureEvent';
|
||||
export * from './CatalogPurchaseNotAllowedEvent';
|
||||
export * from './CatalogPurchaseOverrideEvent';
|
||||
export * from './CatalogPurchaseSoldOutEvent';
|
||||
export * from './CatalogSetRoomPreviewerStuffDataEvent';
|
||||
export * from './CatalogWidgetEvent';
|
||||
export * from './SetRoomPreviewerStuffDataEvent';
|
||||
Reference in New Issue
Block a user