mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-01-20 01:22:59 +08:00
Build update
This commit is contained in:
parent
bddf3f6640
commit
dd784b7fa7
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
*
|
||||
* simple-keyboard v3.0.26
|
||||
* simple-keyboard v3.0.27
|
||||
* https://github.com/hodgef/simple-keyboard
|
||||
*
|
||||
* Copyright (c) Francisco Hodge (https://github.com/hodgef) and project contributors.
|
||||
|
File diff suppressed because one or more lines are too long
17
build/types/components/Keyboard.d.ts
vendored
17
build/types/components/Keyboard.d.ts
vendored
@ -13,8 +13,8 @@ declare class SimpleKeyboard {
|
||||
input: KeyboardInput;
|
||||
options: KeyboardOptions;
|
||||
utilities: any;
|
||||
caretPosition: number;
|
||||
caretPositionEnd: number;
|
||||
caretPosition: number | null;
|
||||
caretPositionEnd: number | null;
|
||||
keyboardDOM: KeyboardElement;
|
||||
keyboardPluginClasses: string;
|
||||
keyboardDOMClass: string;
|
||||
@ -34,8 +34,9 @@ declare class SimpleKeyboard {
|
||||
holdTimeout: number;
|
||||
isMouseHold: boolean;
|
||||
initialized: boolean;
|
||||
candidateBox: CandidateBox;
|
||||
candidateBox: CandidateBox | null;
|
||||
keyboardRowsDOM: KeyboardElement;
|
||||
defaultName: string;
|
||||
/**
|
||||
* Creates an instance of SimpleKeyboard
|
||||
* @param {Array} params If first parameter is a string, it is considered the container class. The second parameter is then considered the options object. If first parameter is an object, it is considered the options object.
|
||||
@ -47,20 +48,20 @@ declare class SimpleKeyboard {
|
||||
handleParams: (params: KeyboardParams) => {
|
||||
keyboardDOMClass: string;
|
||||
keyboardDOM: KeyboardElement;
|
||||
options: Partial<KeyboardOptions>;
|
||||
options: Partial<KeyboardOptions | undefined>;
|
||||
};
|
||||
/**
|
||||
* Getters
|
||||
*/
|
||||
getOptions: () => KeyboardOptions;
|
||||
getCaretPosition: () => number;
|
||||
getCaretPositionEnd: () => number;
|
||||
getCaretPosition: () => number | null;
|
||||
getCaretPositionEnd: () => number | null;
|
||||
/**
|
||||
* Changes the internal caret position
|
||||
* @param {number} position The caret's start position
|
||||
* @param {number} positionEnd The caret's end position
|
||||
*/
|
||||
setCaretPosition(position: number, endPosition?: number): void;
|
||||
setCaretPosition(position: number | null, endPosition?: number | null): void;
|
||||
/**
|
||||
* Retrieve the candidates for a given input
|
||||
* @param input The input string to check
|
||||
@ -166,7 +167,7 @@ declare class SimpleKeyboard {
|
||||
* Get the DOM Element of a button. If there are several buttons with the same name, an array of the DOM Elements is returned.
|
||||
* @param {string} button The button layout name to select
|
||||
*/
|
||||
getButtonElement(button: string): KeyboardElement | KeyboardElement[];
|
||||
getButtonElement(button: string): KeyboardElement | KeyboardElement[] | undefined;
|
||||
/**
|
||||
* This handles the "inputPattern" option
|
||||
* by checking if the provided inputPattern passes
|
||||
|
16
build/types/interfaces.d.ts
vendored
16
build/types/interfaces.d.ts
vendored
@ -3,10 +3,10 @@ import Utilities from "./services/Utilities";
|
||||
export interface KeyboardLayoutObject {
|
||||
[key: string]: string[];
|
||||
}
|
||||
export interface KeyboardButtonTheme {
|
||||
export declare type KeyboardButtonTheme = {
|
||||
class: string;
|
||||
buttons: string;
|
||||
}
|
||||
} | null;
|
||||
export interface KeyboardButtonAttributes {
|
||||
attribute: string;
|
||||
value: string;
|
||||
@ -32,16 +32,18 @@ export declare type CandidateBoxRenderParams = {
|
||||
onItemSelected: (selectedCandidate: string) => void;
|
||||
};
|
||||
export declare type KeyboardElement = HTMLDivElement | HTMLButtonElement;
|
||||
export declare type KeyboardHandlerEvent = PointerEvent & TouchEvent & KeyboardEvent & {
|
||||
target: HTMLDivElement & HTMLInputElement;
|
||||
};
|
||||
export declare type KeyboardHandlerEvent = any;
|
||||
export interface KeyboardButtonElements {
|
||||
[key: string]: KeyboardElement[];
|
||||
}
|
||||
export interface UtilitiesParams {
|
||||
getOptions: () => KeyboardOptions;
|
||||
getCaretPosition: () => number;
|
||||
getCaretPositionEnd: () => number;
|
||||
getCaretPosition: () => number | null;
|
||||
getCaretPositionEnd: () => number | null;
|
||||
dispatch: any;
|
||||
}
|
||||
export interface PhysicalKeyboardParams {
|
||||
getOptions: () => KeyboardOptions;
|
||||
dispatch: any;
|
||||
}
|
||||
export interface KeyboardOptions {
|
||||
|
4
build/types/services/PhysicalKeyboard.d.ts
vendored
4
build/types/services/PhysicalKeyboard.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import { KeyboardOptions, UtilitiesParams } from "../interfaces";
|
||||
import { KeyboardOptions, PhysicalKeyboardParams } from "../interfaces";
|
||||
/**
|
||||
* Physical Keyboard Service
|
||||
*/
|
||||
@ -8,7 +8,7 @@ declare class PhysicalKeyboard {
|
||||
/**
|
||||
* Creates an instance of the PhysicalKeyboard service
|
||||
*/
|
||||
constructor({ dispatch, getOptions }: Partial<UtilitiesParams>);
|
||||
constructor({ dispatch, getOptions }: PhysicalKeyboardParams);
|
||||
handleHighlightKeyDown(event: KeyboardEvent): void;
|
||||
handleHighlightKeyUp(event: KeyboardEvent): void;
|
||||
/**
|
||||
|
8
build/types/services/Utilities.d.ts
vendored
8
build/types/services/Utilities.d.ts
vendored
@ -5,8 +5,8 @@ import { KeyboardOptions, UtilitiesParams } from "../interfaces";
|
||||
*/
|
||||
declare class Utilities {
|
||||
getOptions: () => KeyboardOptions;
|
||||
getCaretPosition: () => number;
|
||||
getCaretPositionEnd: () => number;
|
||||
getCaretPosition: () => number | null;
|
||||
getCaretPositionEnd: () => number | null;
|
||||
dispatch: any;
|
||||
maxLengthReached: boolean;
|
||||
/**
|
||||
@ -122,7 +122,7 @@ declare class Utilities {
|
||||
* @param {number} length Represents by how many characters the input should be moved
|
||||
* @param {boolean} minus Whether the cursor should be moved to the left or not.
|
||||
*/
|
||||
updateCaretPosAction(length: number, minus?: boolean): number;
|
||||
updateCaretPosAction(length: number, minus?: boolean): number | null;
|
||||
/**
|
||||
* Adds a string to the input at a given position
|
||||
*
|
||||
@ -146,7 +146,7 @@ declare class Utilities {
|
||||
* @param {object} inputObj
|
||||
* @param {string} updatedInput
|
||||
*/
|
||||
handleMaxLength(inputObj: KeyboardInput, updatedInput: string): boolean;
|
||||
handleMaxLength(inputObj: KeyboardInput, updatedInput: string): boolean | undefined;
|
||||
/**
|
||||
* Gets the current value of maxLengthReached
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user