@nextcloud/vue
Version:
Nextcloud vue components
440 lines (439 loc) • 20.5 kB
TypeScript
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
/**
* The text of the label element of the select group input
*/
label: {
type: StringConstructor;
required: true;
};
/**
* Placeholder for the input element
* For backwards compatibility it falls back to the `label` value
*/
placeholder: {
type: StringConstructor;
default: string;
};
/**
* id attribute of the select group element
*/
id: {
type: StringConstructor;
default: () => string;
validator: (id: unknown) => boolean;
};
/**
* value of the select group input
* A list of group IDs can be provided
*/
modelValue: {
type: ArrayConstructor;
default: () => never[];
};
/**
* disabled state of the settings select group input
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>, {}, {
/** Temporary store to cache groups */
groups: {};
randId: string;
errorMessage: string;
}, {
/**
* If the error message should be shown
*/
hasError(): boolean;
/**
* Validate input value and only return valid strings (group IDs)
*
* @return {string[]}
*/
filteredValue(): string[];
/**
* value property converted to an array of group objects used as input for the NcSelect
*/
inputValue(): any[];
/**
* Convert groups object to array of groups required for NcSelect.options
* Filter out currently selected values
*
* @return {object[]}
*/
groupsArray(): object[];
}, {
t: (original: string, placeholders?: Record<string, string | number>) => string;
/**
* Called when a new group is selected or previous group is deselected to emit the update event
*
* @param {object[]} updatedValue Array of selected groups
*/
update(updatedValue: object[]): void;
/**
* Use provisioning API to search for given group and save it in the groups object
*
* @param {string} query The query like parts of the id oder display name
* @return {boolean}
*/
loadGroup(query: string): boolean;
/**
* Custom filter function for `NcSelect` to filter by ID *and* display name
*
* @param {object} option One of the groups
* @param {string} label The label property of the group
* @param {string} search The current search string
*/
filterGroups(option: object, label: string, search: string): boolean;
/**
* Debounce the group search (reduce API calls)
*/
onSearch: import('debounce').DebouncedFunction<(query: any) => void>;
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("input" | "error" | "update:modelValue")[], "input" | "error" | "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
/**
* The text of the label element of the select group input
*/
label: {
type: StringConstructor;
required: true;
};
/**
* Placeholder for the input element
* For backwards compatibility it falls back to the `label` value
*/
placeholder: {
type: StringConstructor;
default: string;
};
/**
* id attribute of the select group element
*/
id: {
type: StringConstructor;
default: () => string;
validator: (id: unknown) => boolean;
};
/**
* value of the select group input
* A list of group IDs can be provided
*/
modelValue: {
type: ArrayConstructor;
default: () => never[];
};
/**
* disabled state of the settings select group input
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
onInput?: ((...args: any[]) => any) | undefined;
onError?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
}>, {
id: string;
disabled: boolean;
placeholder: string;
modelValue: unknown[];
}, {}, {
NcSelect: import('vue').DefineComponent<{}, {
avatarSize: number;
isLegacy: boolean;
mdiAlertCircleOutline: string;
mdiCheck: string;
}, {
search: string;
}, {
inputRequired(): boolean | null;
localCalculatePosition(): any;
localFilterBy(): any;
localLabel(): any;
propsToForward(): {
calculatePosition: any;
closeOnSelect: boolean;
filterBy: any;
label: any;
};
}, {
t: (original: string, placeholders?: Record<string, string | number>) => string;
forwardedSlots(): string[];
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, (" " | "update:modelValue")[], " " | "update:modelValue", import('vue').PublicProps, Readonly<{}> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
"on "?: ((...args: any[]) => any) | undefined;
}>, {} | {
[x: string]: any;
}, {}, {
ChevronDown: any;
NcEllipsisedOption: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
name: {
type: StringConstructor;
default: string;
};
search: {
type: StringConstructor;
default: string;
};
}>, {}, {}, {
needsTruncate(): boolean | "";
split(): number;
part1(): string;
part2(): string;
highlight1(): any[];
highlight2(): any[];
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
name: {
type: StringConstructor;
default: string;
};
search: {
type: StringConstructor;
default: string;
};
}>> & Readonly<{}>, {
name: string;
search: string;
}, {}, {
NcHighlight: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
text: {
type: StringConstructor;
default: string;
};
search: {
type: StringConstructor;
default: string;
};
highlight: {
type: import('vue').PropType<import('../../utils/findRanges.ts').StringRange[]>;
default: () => never[];
};
}>, {}, {}, {
ranges(): import('../../utils/findRanges.ts').StringRange[];
chunks(): import('../NcHighlight/NcHighlight.vue').HighlightChunk[];
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
text: {
type: StringConstructor;
default: string;
};
search: {
type: StringConstructor;
default: string;
};
highlight: {
type: import('vue').PropType<import('../../utils/findRanges.ts').StringRange[]>;
default: () => never[];
};
}>> & Readonly<{}>, {
search: string;
text: string;
highlight: import('../../utils/findRanges.ts').StringRange[];
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
NcIconSvgWrapper: import('vue').DefineComponent<{
directional?: boolean;
inline?: boolean;
svg?: string;
name?: string;
path?: string;
size?: number | "auto";
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
directional?: boolean;
inline?: boolean;
svg?: string;
name?: string;
path?: string;
size?: number | "auto";
}> & Readonly<{}>, {
size: number | "auto";
name: string;
svg: string;
path: string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
NcLoadingIcon: import('vue').DefineComponent<{
appearance?: "auto" | "light" | "dark";
name?: string;
size?: number;
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
appearance?: "auto" | "light" | "dark";
name?: string;
size?: number;
}> & Readonly<{}>, {
size: number;
name: string;
appearance: "auto" | "light" | "dark";
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
NcTextField: {
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
modelValue?: string | number;
} & Omit<import('../NcInputField/NcInputField.vue').NcInputFieldProps, "type"> & {
type?: Exclude<import('../NcInputField/NcInputField.vue').NcInputFieldProps["type"], "date" | "datetime-local" | "month" | "time" | "week">;
trailingButtonIcon?: "arrowEnd" | "close" | "undo";
trailingButtonLabel?: string;
}> & Readonly<{
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
}>, {
focus: (options?: FocusOptions) => void;
select: () => void;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"update:modelValue": (value: string | number) => any;
}, import('vue').PublicProps, {
trailingButtonLabel: string;
trailingButtonIcon: "arrowEnd" | "close" | "undo";
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
inputField: ({
$: import('vue').ComponentInternalInstance;
$data: {};
$props: {
readonly modelValue: string | number;
readonly class?: import('../../utils/VueTypes.ts').VueClassType | undefined;
readonly inputClass?: import('../../utils/VueTypes.ts').VueClassType | undefined;
readonly id?: string | undefined;
readonly label?: string | undefined;
readonly labelOutside?: boolean | undefined;
readonly type?: "text" | "password" | "email" | "tel" | "url" | "search" | "number" | "date" | "datetime-local" | "month" | "time" | "week" | undefined;
readonly placeholder?: string | undefined;
readonly showTrailingButton?: boolean | undefined;
readonly trailingButtonLabel?: string | undefined;
readonly success?: boolean | undefined;
readonly error?: boolean | undefined;
readonly helperText?: string | undefined;
readonly disabled?: boolean | undefined;
readonly pill?: boolean | undefined;
readonly onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined;
readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
$attrs: import('vue').Attrs;
$refs: {
[x: string]: unknown;
} & {
input: HTMLInputElement;
};
$slots: Readonly<{
[name: string]: import('vue').Slot<any> | undefined;
}>;
$root: import('vue').ComponentPublicInstance | null;
$parent: import('vue').ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "trailingButtonClick", event: MouseEvent) => void) & ((event: "update:modelValue", value: string | number) => void);
$el: any;
$options: import('vue').ComponentOptionsBase<Readonly<{
modelValue: string | number;
} & import('../NcInputField/NcInputField.vue').NcInputFieldProps> & Readonly<{
onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined;
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
}>, {
focus: (options?: FocusOptions) => void;
select: () => void;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
trailingButtonClick: (event: MouseEvent) => any;
"update:modelValue": (value: string | number) => any;
}, string, {
id: string;
type: "text" | "password" | "email" | "tel" | "url" | "search" | "number" | "date" | "datetime-local" | "month" | "time" | "week";
label: string;
class: import('../../utils/VueTypes.ts').VueClassType;
inputClass: import('../../utils/VueTypes.ts').VueClassType;
placeholder: string;
trailingButtonLabel: string;
helperText: string;
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: typeof import('vue').nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
} & Readonly<{
id: string;
type: "text" | "password" | "email" | "tel" | "url" | "search" | "number" | "date" | "datetime-local" | "month" | "time" | "week";
label: string;
class: import('../../utils/VueTypes.ts').VueClassType;
inputClass: import('../../utils/VueTypes.ts').VueClassType;
placeholder: string;
trailingButtonLabel: string;
helperText: string;
}> & Omit<Readonly<{
modelValue: string | number;
} & import('../NcInputField/NcInputField.vue').NcInputFieldProps> & Readonly<{
onTrailingButtonClick?: ((event: MouseEvent) => any) | undefined;
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
}>, "select" | "focus" | ("id" | "type" | "label" | "class" | "inputClass" | "placeholder" | "trailingButtonLabel" | "helperText")> & {
focus: (options?: FocusOptions) => void;
select: () => void;
} & {} & import('vue').ComponentCustomProperties & {} & {
$slots: Readonly<{
icon?: import('vue').Slot;
'trailing-button-icon'?: import('vue').Slot;
}> & {
icon?: import('vue').Slot;
'trailing-button-icon'?: import('vue').Slot;
};
}) | null;
}, any, import('vue').ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<{
modelValue?: string | number;
} & Omit<import('../NcInputField/NcInputField.vue').NcInputFieldProps, "type"> & {
type?: Exclude<import('../NcInputField/NcInputField.vue').NcInputFieldProps["type"], "date" | "datetime-local" | "month" | "time" | "week">;
trailingButtonIcon?: "arrowEnd" | "close" | "undo";
trailingButtonLabel?: string;
}> & Readonly<{
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
}>, {
focus: (options?: FocusOptions) => void;
select: () => void;
}, {}, {}, {}, {
trailingButtonLabel: string;
trailingButtonIcon: "arrowEnd" | "close" | "undo";
}>;
__isFragment?: never;
__isTeleport?: never;
__isSuspense?: never;
} & import('vue').ComponentOptionsBase<Readonly<{
modelValue?: string | number;
} & Omit<import('../NcInputField/NcInputField.vue').NcInputFieldProps, "type"> & {
type?: Exclude<import('../NcInputField/NcInputField.vue').NcInputFieldProps["type"], "date" | "datetime-local" | "month" | "time" | "week">;
trailingButtonIcon?: "arrowEnd" | "close" | "undo";
trailingButtonLabel?: string;
}> & Readonly<{
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
}>, {
focus: (options?: FocusOptions) => void;
select: () => void;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"update:modelValue": (value: string | number) => any;
}, string, {
trailingButtonLabel: string;
trailingButtonIcon: "arrowEnd" | "close" | "undo";
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
$slots: Readonly<{
icon?: import('vue').Slot;
}> & {
icon?: import('vue').Slot;
};
});
VueSelect: any;
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;