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

refactor: remove private API from TS definitions #2974

Merged
merged 1 commit into from
Nov 3, 2021
Merged
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
2 changes: 0 additions & 2 deletions packages/board/src/vaadin-board.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
* ```
*/
declare class Board extends ElementMixin(HTMLElement) {
static _finalizeClass(): void;

/**
* Redraws the board and all rows inside it, if necessary.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/charts/src/vaadin-chart-series.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ declare class ChartSeries extends HTMLElement {
*/
additionalOptions: SeriesOptionsType | null | undefined;

_series: Series | undefined;

/**
* Method to attach a series object of type `Highcharts.Series`.
*
Expand Down
23 changes: 0 additions & 23 deletions packages/charts/src/vaadin-chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,29 +541,6 @@ declare class Chart extends ThemableMixin(ElementMixin(HTMLElement)) {
*/
polar: boolean | null | undefined;

/**
* Search for axis with given `id`.
*
* @param id contains the id that will be searched
* @param isXAxis indicates if it will remove x or y axes. Defaults to `false`.
*/
__getAxis(id: string, isXAxis: boolean): Axis | null;

/**
* Add an axis with given options
*
* @param options axis options
* @param isXAxis indicates if axis is X (`true`) or Y (`false`). Defaults to `false`.
*/
__addAxis(options: object | null, isXAxis: boolean): Axis;

/**
* Iterates over axes (y or x) and removes whenever it doesn't contain any series and was created for unit
*
* @param isXAxis indicates if it will remove x or y axes. Defaults to `false`.
*/
__removeAxisIfEmpty(isXAxis: boolean): void;

/**
* Update the chart configuration.
* This JSON API provides a simple single-argument alternative to the configuration property.
Expand Down
4 changes: 2 additions & 2 deletions packages/component-base/src/focus-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const FocusMixin = dedupingMixin(
/**
* Override to define if the field receives focus based on the event.
*
* @param {FocusEvent} event
* @param {FocusEvent} _event
* @return {boolean}
* @protected
*/
Expand All @@ -103,7 +103,7 @@ export const FocusMixin = dedupingMixin(
/**
* Override to define if the field loses focus based on the event.
*
* @param {FocusEvent} event
* @param {FocusEvent} _event
* @return {boolean}
* @protected
*/
Expand Down
5 changes: 0 additions & 5 deletions packages/cookie-consent/src/vaadin-cookie-consent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ declare class CookieConsent extends ElementMixin(HTMLElement) {
* @attr {string} cookie-name
*/
cookieName: string;

/**
* Shows the popup even if the user has seen it before.
*/
_show(): void;
}

declare global {
Expand Down
7 changes: 0 additions & 7 deletions packages/crud/src/vaadin-crud-form.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ declare class CrudForm<Item> extends IncludedMixin(FormLayout) {
* The item being edited.
*/
item: Item | null | undefined;

/**
* Auto-generate form fields based on the JSON structure of the object provided.
*
* If not called, the method will be executed the first time an item is assigned.
*/
_configure(object: Item): void;
}

declare global {
Expand Down
10 changes: 4 additions & 6 deletions packages/grid-pro/src/vaadin-grid-pro-edit-column.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ declare class GridProEditColumn<TItem = GridDefaultItem> extends GridColumn<TIte
*/
editorValuePath: string;

_getEditorTagName(cell: HTMLElement): string;
protected _getEditorComponent(cell: HTMLElement): HTMLElement | null;

_getEditorComponent(cell: HTMLElement): HTMLElement | null;
protected _getEditorValue(editor: HTMLElement): unknown | null;

_getEditorValue(editor: HTMLElement): unknown | null;
protected _startCellEdit(cell: HTMLElement, model: GridItemModel<TItem>): void;

_startCellEdit(cell: HTMLElement, model: GridItemModel<TItem>): void;

_stopCellEdit(cell: HTMLElement, model: GridItemModel<TItem>): void;
protected _stopCellEdit(cell: HTMLElement, model: GridItemModel<TItem>): void;
}

declare global {
Expand Down
2 changes: 0 additions & 2 deletions packages/grid-pro/src/vaadin-grid-pro.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export interface GridProEventMap<TItem>
* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
*/
declare class GridPro<TItem = GridDefaultItem> extends Grid<TItem> {
static _finalizeClass(): void;

addEventListener<K extends keyof GridProEventMap<TItem>>(
type: K,
listener: (this: GridPro<TItem>, ev: GridProEventMap<TItem>[K]) => void,
Expand Down
2 changes: 0 additions & 2 deletions packages/list-box/src/vaadin-list-box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export interface ListBoxEventMap extends HTMLElementEventMap, ListBoxCustomEvent
declare class ListBox extends MultiSelectListMixin(ThemableMixin(ElementMixin(HTMLElement))) {
focused: Element | null;

readonly _scrollerElement: HTMLElement;

addEventListener<K extends keyof ListBoxEventMap>(
type: K,
listener: (this: ListBox, ev: ListBoxEventMap[K]) => void,
Expand Down
4 changes: 1 addition & 3 deletions packages/tabs/src/vaadin-tab.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
*
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
*/
declare class Tab extends ElementMixin(ThemableMixin(ItemMixin(HTMLElement))) {
_onKeyup(event: KeyboardEvent): void;
}
declare class Tab extends ElementMixin(ThemableMixin(ItemMixin(HTMLElement))) {}

declare global {
interface HTMLElementTagNameMap {
Expand Down
4 changes: 0 additions & 4 deletions packages/tabs/src/vaadin-tabs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ export interface TabsEventMap extends HTMLElementEventMap, TabsCustomEventMap {}
* @fires {CustomEvent} selected-changed - Fired when the `selected` property changes.
*/
declare class Tabs extends ElementMixin(ListMixin(ThemableMixin(HTMLElement))) {
readonly _scrollerElement: HTMLElement;

/**
* The index of the selected tab.
*/
Expand All @@ -74,8 +72,6 @@ declare class Tabs extends ElementMixin(ListMixin(ThemableMixin(HTMLElement))) {
*/
orientation: TabsOrientation;

readonly _scrollOffset: number;

addEventListener<K extends keyof TabsEventMap>(
type: K,
listener: (this: Tabs, ev: TabsEventMap[K]) => void,
Expand Down
14 changes: 0 additions & 14 deletions packages/upload/src/vaadin-upload.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,20 +398,6 @@ declare class Upload extends ThemableMixin(ElementMixin(HTMLElement)) {
*/
uploadFiles(files?: UploadFile | UploadFile[]): void;

/**
* Add the file for uploading. Called internally for each file after picking files from dialog or dropping files.
*
* @param file File being added
*/
_addFile(file: UploadFile): void;

/**
* Remove file from upload list. Called internally if file upload was canceled.
*
* @param file File to remove
*/
_removeFile(file: UploadFile): void;

addEventListener<K extends keyof UploadEventMap>(
type: K,
listener: (this: Upload, ev: UploadEventMap[K]) => void,
Expand Down
47 changes: 0 additions & 47 deletions packages/vaadin-overlay/src/vaadin-overlay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ export type OverlayEventMap = HTMLElementEventMap & OverlayElementEventMap;
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
*/
declare class OverlayElement extends ThemableMixin(DirMixin(HTMLElement)) {
/**
* returns true if this is the last one in the opened overlays stack
*/
readonly _last: boolean;

/**
* When true, the overlay is visible and attached to body.
*/
Expand Down Expand Up @@ -184,38 +179,8 @@ declare class OverlayElement extends ThemableMixin(DirMixin(HTMLElement)) {
*/
restoreFocusOnClose: boolean;

_setTemplateFromNodes(nodes: Element[]): void;

close(sourceEvent?: Event | null): void;

_ensureTemplatized(): void;

_shouldAnimate(): boolean;

_enqueueAnimation(type: string, callback: Function | null): void;

_flushAnimation(type: string): void;

_animatedOpening(): void;

_attachOverlay(): void;

_animatedClosing(): void;

_detachOverlay(): void;

_addGlobalListeners(): void;

_enterModalState(): void;

_removeGlobalListeners(): void;

_exitModalState(): void;

_removeOldContent(): void;

_stampOverlayTemplate(template: HTMLTemplateElement, instanceProps: object | null): void;

/**
* Requests an update for the content of the overlay.
* While performing the update, it invokes the renderer passed in the `renderer` property.
Expand All @@ -224,18 +189,6 @@ declare class OverlayElement extends ThemableMixin(DirMixin(HTMLElement)) {
*/
requestContentUpdate(): void;

_isFocused(element: Element | null): boolean;

_focusedIndex(elements: Array<Element | null> | null): number;

_cycleTab(increment: number, index: number | undefined): void;

_getFocusableElements(): HTMLElement[];

_getActiveElement(): Element;

_deepContains(node: Node): boolean;

/**
* Brings the overlay as visually the frontmost one
*/
Expand Down