Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add complete docs rule #153

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export interface LoginPromptResult {

declare const host: string;

/**
* Main class that initializes app.
*/
export class App {
public currentPopup: string = null;
public homePage: HomePage;
Expand Down
4 changes: 4 additions & 0 deletions js/appInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function isRunningStandalone() {
|| ("standalone" in window.navigator && window.navigator["standalone"] === true));
}

/**
* Applies app configuration
* @param localConfiguration local saved configurations
*/
export function bootstrap(localConfiguration?: Partial<AppConfig>) {
overrideConfiguration(localConfiguration || {});

Expand Down
5 changes: 5 additions & 0 deletions js/appconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class GameActionBlock {
public hasSecondaryPanel = true;
}

/** Local app configurations */
export class AppConfig {
public auth = {
automaticLogin: true,
Expand Down Expand Up @@ -103,6 +104,10 @@ export type PartialConfiguration<T> = {
[P in keyof T]?: Partial<T[P]>;
};

/**
* This function overrides local configuration
* @param localConfiguration
*/
export function overrideConfiguration(localConfiguration: PartialConfiguration<AppConfig>) {
appConfig = mergeDeep(appConfig, localConfiguration);
}
Expand Down
1 change: 1 addition & 0 deletions js/authmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export interface IAuthenticationManager {
loginAsGuest(): Promise<string>;
}

/** Manager that handles authentication */
export class AuthManager implements IAuthenticationInformation, IAuthenticationManager {
/**
* Returns authentication status of the application user.
Expand Down
1 change: 1 addition & 0 deletions js/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as timeService from "./timeservice";

declare var app: App;

/** Registers knokcoutjs bindings */
export function registerBindings() {
// Binding set loading variable for short amount of time.
ko.bindingHandlers["loading"] = {
Expand Down
1 change: 1 addition & 0 deletions js/commandmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface ICommandManager extends ICommandExecutor {
registerCommand(commandName: string, handler: CommandHandler): void;
}

/** Register and executes commands */
export class CommandManager implements ICommandManager {
public commands: any[] = [];

Expand Down
1 change: 1 addition & 0 deletions js/components/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function getTemplateDefinition(name: string) {
return window["PokerComponents"][name];
}

/** Register knockoutjs components */
export function registerComponents() {
/**
* Tournament lobby sub-components
Expand Down
1 change: 1 addition & 0 deletions js/components/table/actionBlock/actionBlock.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ActionBlock } from "../../../table/actionBlock";

/** Action Block Component */
export class ActionBlockComponent {
private actionBlock: ActionBlock;

Expand Down
1 change: 1 addition & 0 deletions js/components/table/menu/menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { TablesPage } from "../../../pages/tablespage";

/** Table Menu Component */
export class TableMenuComponent {
private page: TablesPage;

Expand Down
1 change: 1 addition & 0 deletions js/components/table/raiseBlock/raiseBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface IRaiseBlockComponentParameters {
updateTranslator: () => void;
}

/** Raise Block Component */
export class RaiseBlockComponent {
private tableSlider: TableSlider;

Expand Down
1 change: 1 addition & 0 deletions js/extenders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as ko from "knockout";
import { SelectorItem } from "./selector";

/** Register knockoutjs extenders */
export function registerExtenders() {
ko.extenders["options"] = (target: KnockoutObservable<any>, option: { caption: string; items: SelectorItem[]}) => {
target.options = option.items;
Expand Down
7 changes: 7 additions & 0 deletions js/languagemanager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare var messages: any;

/** This manager is responsible for all text operations */
export class LanguageManager {
public currentLang: string;
constructor() {
Expand Down Expand Up @@ -63,6 +64,12 @@ export class LanguageManager {
}

export const l = new LanguageManager();

/**
* Returns message value for current language
* @param message name of needed message
* @param parameters (optional) dynamic values that shoud be written in message
*/
export function _(message: string, parameters: any = null) {
return l.getMessage(message, parameters);
}
1 change: 1 addition & 0 deletions js/pageblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import * as ko from "knockout";
import { Signal } from "signals";

/** Forms app pages */
export class PageBlock {
public static useDoubleView: boolean = false;
public shown: Signal;
Expand Down
1 change: 1 addition & 0 deletions js/pages/SeatPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { version } from "../version";

declare var app: App;

/** Seat page of the player */
export class SeatPage extends PageBase {
public currentTable: KnockoutComputed<TableView>;
public selectedTables: KnockoutComputed<TableView[]>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/accountpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface AccountPagePlayerModel {
stars: number;
}

/** Account Page */
export class AccountPage extends PageBase {
public cashierCaption: KnockoutObservable<string>;
public loading: KnockoutObservable<boolean>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/cashierpageblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { OperationsHistoryPage } from "./operationshistorypage";
import { RatingPage } from "./ratingpage";
import { WithdrawalPage } from "./withdrawalpage";

/** Cashier Page Block */
export class CashierPageBlock extends PageBlock {
public accountPage: AccountPage;
public ratingPage: RatingPage;
Expand Down
1 change: 1 addition & 0 deletions js/pages/changepasswordpage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as ko from "knockout";
import { PageBase } from "../ui/pagebase";

/** Change Password Page */
export class ChangePasswordPage extends PageBase implements KnockoutValidationGroup {
public oldpassword: KnockoutObservable<string>;
public password: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/chatpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as timeService from "../timeservice";
declare var host: string;
declare var app: App;

/** Chat Page */
export class ChatPage implements Page {
public currentMessage: KnockoutObservable<string>;
public messages: KnockoutObservableArray<PlayerMessage>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { PageBase } from "../ui/pagebase";

declare var app: App;

/** Home Page */
export class HomePage extends PageBase {
public online: KnockoutObservable<string>;
public registered: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/infopage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { PageBase } from "../ui/pagebase";

declare var app: App;

/** Info Page */
export class InfoPage extends PageBase {
constructor() {
super();
Expand Down
1 change: 1 addition & 0 deletions js/pages/infopageblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { InfoPage } from "./infopage";
import { SupportPage } from "./supportpage";

/** Info Page Block */
export class InfoPageBlock extends PageBlock {
constructor() {
super("info", "pagesList", new InfoPage());
Expand Down
3 changes: 3 additions & 0 deletions js/pages/lobbypage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { PageBase } from "../ui/pagebase";

declare var app: App;

/** Filter options for cash table */
export class CashOptions {
public currency: KnockoutObservable<number>;
public limits: KnockoutObservable<number>;
Expand Down Expand Up @@ -74,6 +75,7 @@ export class CashOptions {
}
}

/** Filter options for tournaments */
export class TournamentOptions {
public currency: KnockoutObservable<number>;
public buyin: KnockoutObservable<number>;
Expand Down Expand Up @@ -132,6 +134,7 @@ interface LobbyTournamentItemEx extends LobbyTournamentItem {
duration: string;
}

/** Page for players lobby */
export class LobbyPage extends PageBase {
public online: KnockoutObservable<string>;
public registered: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/lobbypageblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { TournamentsListPage } from "./tournamentslistpage";

declare var app: App;

/** Lobby Page Block */
export class LobbyPageBlock extends PageBlock {
public sngListPage: TournamentsListPage;
public tournamentsListPage: TournamentsListPage;
Expand Down
1 change: 1 addition & 0 deletions js/pages/operationshistorypage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PageBase } from "../ui/pagebase";

declare var app: App;

/** Operations History Page */
export class OperationsHistoryPage extends PageBase implements KnockoutValidationGroup {
public from: KnockoutObservable<string>;
public to: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/otherpageblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ChatPage } from "./chatpage";
import { RatingPage } from "./ratingpage";
import { SettingsPage } from "./settingspage";

/** Page block for changePassword, more, rating, chat and accout pages */
export class OtherPageBlock extends PageBlock {
public changePasswordPage: ChangePasswordPage;
public morePage: SettingsPage;
Expand Down
1 change: 1 addition & 0 deletions js/pages/ratingpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { AccountManager } from "../services/accountManager";

declare var app: App;

/** RatingPage */
export class RatingPage implements Page {
public ratings = ko.observableArray<UserRatingModel>();
public loading = ko.observable(false);
Expand Down
1 change: 1 addition & 0 deletions js/pages/settingspage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { _ } from "../languagemanager";
import * as metadataManager from "../metadatamanager";

/** Settings page */
export class SettingsPage implements Page {
public online: KnockoutObservable<string>;
public registered: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/supportpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PageBase } from "../ui/pagebase";
declare var host: string;
declare var app: App;

/** Support page */
export class SupportPage extends PageBase implements KnockoutValidationGroup {
public displayFullName = false;
public displaySubject = false;
Expand Down
1 change: 1 addition & 0 deletions js/pages/tableslistpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { PageBase } from "../ui/pagebase";
declare var host: string;
declare var app: App;

/** Page that displyes tables list */
export class TablesListPage extends PageBase {
public tablesCaption: KnockoutComputed<string>;
public tables: KnockoutObservableArray<any>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/tablespage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { PageBase } from "../ui/pagebase";

declare var app: App;

/** Tables Page */
export class TablesPage extends PageBase implements ICurrentTableProvider {
public currentTable: KnockoutComputed<TableView>;
public selectedTables: KnockoutComputed<TableView[]>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/tournamentlobbypage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ interface TournamentTableListView {
players: TournamentTablePlayerView[];
}

/** Lobby page for tournaments */
export class TournamentLobbyPage extends PageBase {
public loading: KnockoutObservable<boolean>;
public tournamentId = 0;
Expand Down
1 change: 1 addition & 0 deletions js/pages/tournamentslistpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { TournamentOptions } from "./lobbypage";

declare var app: App;

/** Page with tournaments list */
export class TournamentsListPage extends PageBase {
public tournamentsCaption: KnockoutComputed<string>;
public tournaments: KnockoutObservableArray<LobbyTournamentItem>;
Expand Down
1 change: 1 addition & 0 deletions js/pages/withdrawalpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PageBase } from "../ui/pagebase";

declare var app: App;

/** Withdrawal Page */
export class WithdrawalPage extends PageBase {
public player: KnockoutObservable<any>;
public withdrawalMethods: KnockoutObservableArray<any>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/accountstatuspopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PopupBase } from "../ui/popupbase";

declare var app: App;

/** Account Status Popup */
export class AccountStatusPopup extends PopupBase {
public loading: KnockoutObservable<boolean>;
public information: KnockoutObservable<AccountServiceInformation>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/addmoneypopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { PopupBase } from "../ui/popupbase";

declare var app: App;

/** Popup for adding money */
export class AddMoneyPopup {
public buyin: KnockoutObservable<number>;
public minBuyin: KnockoutObservable<number>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/authpopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PopupBase } from "../ui/popupbase";

declare var app: App;

/** Authentication popup */
export class AuthPopup extends PopupBase {
public login: KnockoutObservable<string>;
public password: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/changepasswordpopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PopupBase } from "../ui/popupbase";

declare var app: App;

/** Popup for password change */
export class ChangePasswordPopup extends PopupBase {
public oldPassword = ko.observable<string>().extend({ required: true });
public password: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/chatpopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ChatControl } from "../ui/chatcontrol";

declare var app: App;

/** Chat popup */
export class ChatPopup {
public control: ChatControl;
public caption: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/continueforgetpasswordpopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PopupBase } from "../ui/popupbase";

declare var app: App;

/** Continue Forget Password Popup */
export class ContinueForgetPasswordPopup extends PopupBase {
public token: KnockoutObservable<string>;
public password: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/custompopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { PopupBase } from "../ui/popupbase";

type PromiseOrVoid = void | Promise<void>;

/** Custom Popup */
export class CustomPopup extends PopupBase {
public title: KnockoutObservable<string>;
public messages: KnockoutObservableArray<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/forgetpasswordpopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SimplePopup } from "../popups/simplepopup";
import { AccountManager } from "../services/accountManager";
import { PopupBase } from "../ui/popupbase";

/** Forget Password Popup */
export class ForgetPasswordPopup extends PopupBase {
public login: KnockoutObservable<string>;
public email: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/handhistorypopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum HandHistoryDisplayMode {
Detailed,
}

/** Popup for showing of previous game history */
export class HandHistoryPopup extends PopupBase {
public detailedOperations: KnockoutObservableArray<string>;
public shortOperations: KnockoutObservableArray<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/jointablepopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { SimplePopup } from "./simplepopup";

declare var app: App;

/** Join Table Popup */
export class JoinTablePopup {
public buyin: KnockoutObservable<number>;
public ticketCode: KnockoutObservable<string>;
Expand Down
1 change: 1 addition & 0 deletions js/popups/morepopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { settings } from "../settings";
declare var host: string;
declare var app: App;

/** More Popup */
export class MorePopup {
public authenticated: KnockoutObservable<boolean>;
public login: KnockoutComputed<string>;
Expand Down
Loading