dolphin-components
Version:
## License
481 lines (415 loc) • 14.6 kB
TypeScript
import { App } from 'vue';
import { AxiosInstance } from 'axios';
import { CellComponent } from 'tabulator-tables';
import { ColumnDefinition } from 'tabulator-tables';
import { ColumnDefinitionAlign } from 'tabulator-tables';
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { ContentTitle as ContentTitle_2 } from '..';
import { DefineComponent } from 'vue';
import { DirectiveBinding } from 'vue';
import { Editor } from 'tabulator-tables';
import { ModalTitle as ModalTitle_2 } from '..';
import { PublicProps } from 'vue';
import { TabulatorAction as TabulatorAction_2 } from '..';
import { TabulatorData as TabulatorData_2 } from '..';
import { VerticalAlign } from 'tabulator-tables';
declare const __VLS_component: DefineComponent<ContentProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
[x: string]: never;
}, string, PublicProps, Readonly<ContentProps> & Readonly<{
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
}>, {
title: ContentTitle_2[];
bodyClass: string;
titleClass: string;
disableMinHeight: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
declare const __VLS_component_2: DefineComponent<ModalProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
[x: string]: never;
}, string, PublicProps, Readonly<ModalProps> & Readonly<{
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
}>, {
title: ModalTitle_2[];
actions: ModalAction[];
width: string;
show: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
dynamicDiv: HTMLDivElement;
}, any>;
declare const __VLS_component_3: DefineComponent<TowserProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
[x: string]: never;
}, string, PublicProps, Readonly<TowserProps> & Readonly<{
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
}>, {
show: boolean;
double: boolean;
bodyWidth: number;
body2Width: number;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
'action-before'?(_: {}): any;
'action-after'?(_: {}): any;
body?(_: {}): any;
};
refs: {};
rootEl: HTMLDivElement;
};
declare function __VLS_template_2(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {
dynamicDiv: HTMLDivElement;
};
rootEl: any;
};
declare function __VLS_template_3(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
body2?(_: {}): any;
};
refs: {};
rootEl: any;
};
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
declare type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
new (): {
$slots: S;
};
};
export declare interface ContentAction {
title: string;
emit: string;
class?: string;
}
export declare const ContentLayout: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export declare interface ContentProps {
title: ContentTitle[];
actions?: ContentAction[];
bodyClass?: string;
titleClass?: string;
disableMinHeight?: boolean;
}
export declare interface ContentTitle {
name: string;
link?: string;
}
export declare const createShortCutKey: (keyStructure: string, callback: (e: KeyboardEvent) => void) => {
destroy(): void;
};
export declare const CurrencyFormatter: (value: number | string, withDisplayCurrency?: boolean, displayCurrency?: string, format?: FormatType, structure?: StructureType) => string;
declare interface CurrencyInputElement extends HTMLInputElement {
eventCleanUp?: () => void;
}
export declare const CurrencyUnformatter: (formattedValue: string, withDisplayCurrency?: boolean, displayCurrency?: string, format?: FormatType, structure?: StructureType) => number;
declare interface CustomHTMLElement extends HTMLElement {
__tooltipHandlers?: {
showTooltip: () => void;
hideTooltip: () => void;
clearShowTimeout: () => void;
createTooltip: () => void;
updateBinding: (binding: DirectiveBinding<TooltipBindingValue>) => void;
};
}
export declare const DateRange: DefineComponent<DateRangeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
search: (...args: any[]) => void;
"update:modelValue": (...args: any[]) => void;
}, string, PublicProps, Readonly<DateRangeProps> & Readonly<{
onSearch?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
}>, {
modelValue: {
startDate: string;
endDate: string;
dateType: string;
isBS: boolean;
};
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
export declare interface DateRangeProps {
modelValue: {
startDate: string;
endDate: string;
dateType: string;
isBS: boolean;
};
}
export declare const DateSelector: DefineComponent<DateSelectorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (...args: any[]) => void;
"update:isBS": (...args: any[]) => void;
}, string, PublicProps, Readonly<DateSelectorProps> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
"onUpdate:isBS"?: ((...args: any[]) => any) | undefined;
}>, {
disabled: boolean;
modelValue: string;
inputWidth: number;
isBS: boolean;
showToggle: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
export declare interface DateSelectorProps {
modelValue: string;
inputWidth?: number;
isBS?: boolean;
showToggle?: boolean;
disabled?: boolean;
classValue?: string;
}
export declare const FocusNext: {
install(app: App): void;
};
export declare type FormatType = "usa" | "euro";
declare interface HTMLElementWithState extends HTMLElement {
_observer?: MutationObserver;
_timeout?: number;
}
export declare interface IconProps {
name: string;
size?: number | string;
color?: string;
strokeWidth?: number;
absoluteStrokeWidth?: boolean;
classValue?: string;
}
export declare const Icons: DefineComponent<IconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconProps> & Readonly<{}>, {
size: number | string;
color: string;
strokeWidth: number;
absoluteStrokeWidth: boolean;
classValue: string;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
export declare const InputCurrency: {
mounted(el: CurrencyInputElement, binding: DirectiveBinding): void;
updated(el: HTMLInputElement, binding: DirectiveBinding): void;
unmounted(el: HTMLInputElement): void;
};
export declare const InputError: {
mounted: (el: HTMLElement, binding: DirectiveBinding) => void;
updated: (el: HTMLElement, binding: DirectiveBinding) => void;
};
export declare const InputSelect: {
mounted(el: HTMLElement): void;
unmounted(el: HTMLElement): void;
};
export declare const Loader: DefineComponent<LoaderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<LoaderProps> & Readonly<{}>, {
show: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
export declare interface LoaderProps {
show: boolean;
}
export declare const Modal: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
export declare interface ModalAction {
emit: string;
title: string;
class?: string;
}
export declare interface ModalProps {
title: ModalTitle[];
actions: ModalAction[];
show: boolean;
width?: string;
}
export declare interface ModalTitle {
name: string;
link?: string;
}
export declare const ScrollbarAnimateDropdown: {
mounted(el: HTMLElementWithState): void;
unmounted(el: HTMLElementWithState): void;
};
export declare const ScrollbarScroll: {
mounted(el: HTMLElement, _binding: DirectiveBinding): void;
unmounted(el: HTMLElement): void;
};
export declare type StructureType = "nepali" | "foreign";
export declare const Switch: DefineComponent<SwitchProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"update:modelValue": (value: boolean) => any;
}, string, PublicProps, Readonly<SwitchProps> & Readonly<{
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
}>, {
modelValue: boolean;
background: string;
disable: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
export declare interface SwitchProps {
modelValue: boolean;
background?: string;
disable?: boolean;
}
export declare const Tabulator: DefineComponent<TabulatorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
[x: string]: never;
}, string, PublicProps, Readonly<TabulatorProps> & Readonly<{
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
}>, {
action: boolean;
data: TabulatorData_2[];
columns: TabulatorHeader[];
placeholder: string;
paginationSize: number;
paginationSizeSelector: number[];
actionButtons: TabulatorAction_2[];
heightOffset: number;
actionMode: "frontend" | "api";
showOptions: boolean;
paginationType: "local" | "remote";
apiEndpoint: string;
queryParams: Record<string, any>;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
export declare interface TabulatorAction {
name: string;
emit: string;
class?: string;
}
export declare interface TabulatorData {
id: string | number;
action?: {
name: string;
emit: string;
class?: string;
}[];
[key: string]: any;
}
export declare interface TabulatorHeader {
title: string;
field: string;
headerFilter?: Editor;
headerFilterPlaceholder?: string;
isNotMandatory?: boolean;
width?: number;
vertAlign?: VerticalAlign;
hozAlign?: ColumnDefinitionAlign;
headerSort?: boolean;
formatter?: (cell: CellComponent) => string;
cellClick?: (e: UIEvent, cell: CellComponent) => void;
sorter?: ColumnDefinition['sorter'];
}
export declare interface TabulatorModalSettings {
title: Array<{
name: string;
}>;
action: Array<{
title: string;
emit: string;
class?: string;
}>;
}
export declare interface TabulatorProps {
data?: TabulatorData[];
columns: TabulatorHeader[];
placeholder?: string;
paginationSize?: number;
paginationSizeSelector?: number[];
action?: boolean;
actionButtons?: TabulatorAction[];
heightOffset?: number;
actionMode?: "frontend" | "api";
showOptions?: boolean;
paginationType?: 'local' | 'remote';
apiEndpoint?: string;
apiInstance?: AxiosInstance;
queryParams?: Record<string, any>;
}
export declare const Toast: {
error(msg: string, delay?: number): void;
warn(msg: string, delay?: number): void;
success(msg: string, delay?: number): void;
info(msg: string, delay?: number): void;
};
export declare const Toggle: DefineComponent<ToggleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"update:modelValue": (value: boolean) => any;
}, string, PublicProps, Readonly<ToggleProps> & Readonly<{
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
}>, {
width: string;
modelValue: boolean;
disable: boolean;
onText: string;
offText: string;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
export declare interface ToggleProps {
modelValue: boolean;
onText?: string;
offText?: string;
width?: string;
disable?: boolean;
}
export declare const Tooltip: {
mounted(el: CustomHTMLElement, binding: DirectiveBinding<TooltipBindingValue>): void;
updated(el: CustomHTMLElement, binding: DirectiveBinding<TooltipBindingValue>): void;
unmounted(el: CustomHTMLElement): void;
};
declare interface TooltipBindingValue {
content: string;
raw?: boolean;
preferredPosition?: "top" | "bottom" | "left" | "right";
}
export declare const Towser: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
export declare interface TowserAction {
emit: string;
title: string;
class?: string;
}
export declare interface TowserProps {
show: boolean;
title: TowserTitle[];
actions?: TowserAction[];
double?: boolean;
bodyWidth?: number;
body2Width?: number;
}
export declare interface TowserTitle {
name: string;
link?: string;
}
export declare class WebSocketWrapper {
private socket;
private url;
private isConnected;
setURL(url: string): void;
init(): Promise<WebSocketWrapper>;
onMessage(callback: (message: string) => void): Promise<WebSocketWrapper>;
sendMessage(message: string): Promise<void>;
close(): void;
getConnectionStatus(): boolean;
}
export declare const Wizard: DefineComponent<WizardProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"step-change": (step: number) => any;
}, string, PublicProps, Readonly<WizardProps> & Readonly<{
"onStep-change"?: ((step: number) => any) | undefined;
}>, {
totalSteps: number;
currentStep: number;
className: string;
stepLabels: string[] | null;
onStepChange: ((step: number) => void) | null;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
containerRef: HTMLDivElement;
}, HTMLDivElement>;
export declare interface WizardProps {
totalSteps?: number;
currentStep?: number;
className?: string;
stepLabels?: string[] | null;
onStepChange?: ((step: number) => void) | null;
}
export { }
declare module "@vue/runtime-core" {
interface ComponentCustomProperties {
$focusNext: (nextElementId: string) => void;
}
}