/*
* Copyright (c) 2010, 2026 BSI Business Systems Integration AG
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
import {
arrays, BaseDoEntity, BookmarkSupport, BookmarkTableRowIdentifierDo, ButtonTile, ChildModelOf, Column, comparators, Constructor, dataObjects, DoTypeResolver, EnumObject, Event, EventHandler, EventListener, EventMapOf, EventModel,
EventSupport, Form, HtmlComponent, InitModelOf, inspector, Menu, MenuBar, MenuOwner, ObjectIdProvider, ObjectOrType, ObjectWithUuid, Outline, PageDetailMenuContributor, PageEventMap, PageModel, ParentTablePageMenuContributor,
PropertyChangeEvent, RequiredUnlessNotSubclass, scout, SomeRequired, strings, Table, TableRow, TableRowClickEvent, TileOutlineOverview, TileOverviewForm, TreeNode, typeName, UuidPathOptions, Widget
} from '../../../index';
import $ from 'jquery';
/**
* This class is used differently in online and JS-only case. In the online case we only have instances
* of Page in an outline. The server sets the property nodeType which is used to distinct
* between pages with tables and pages with nodes in some cases. In the JS only case, Page is an abstract
* class and is never instantiated directly, instead we always use subclasses of PageWithTable or PageWithNodes.
* Implementations of these classes contain code which loads table data or child nodes.
*/
export class Page extends TreeNode implements PageModel, ObjectWithUuid {
declare initModel: SomeRequired & PageParamRequiredIfDeclared;
declare model: PageModel;
declare eventMap: PageEventMap;
declare self: Page;
declare parent: Outline;
declare childNodes: Page[];
declare parentNode: Page;
uuid: string;
pageParam: PageParamDo;
/**
* This property is set by the server, see: JsonOutline#putNodeType.
*/
nodeType: NodeType;
compactRoot: boolean;
detailTable: Table;
detailTableVisible: boolean;
detailForm: Form;
detailFormVisible: boolean;
detailFormVisibleByUi: boolean;
navigateButtonsVisible: boolean;
tableStatusVisible: boolean;
htmlComp: HtmlComponent;
/**
* True to select the page linked with the selected row when the row was selected. May be useful on touch devices.
*/
drillDownOnRowClick: boolean;
overviewText: string;
overviewIconId: string;
overviewHtmlEnabled: boolean;
showTileOverview: boolean;
inheritMenusFromParentTablePage: boolean;
detailMenuContributors: PageDetailMenuContributor[];
row: TableRow;
tile: ButtonTile;
events: EventSupport;
pageChanging: number;
userPreferenceContext: string;
// Inspector infos (are only available for remote pages)
modelClass: string;
classId: string;
protected _tableFilterHandler: EventHandler>;
protected _tableRowClickHandler: EventHandler;
protected _detailTableModel: ChildModelOf;
/** @internal */
_detailFormModel: ChildModelOf