vue-cesium
Version:
Vue 3.x components for CesiumJS.
471 lines (470 loc) • 15.4 kB
TypeScript
import { VNode, ComponentPublicInstance } from 'vue';
import { VueClassProp, VueStyleObjectProp } from 'vue-cesium/es/utils/types';
export declare const sliderProps: {
modelValue: {
required: boolean;
default: any;
validator: (v: any) => boolean;
};
labelValue: (NumberConstructor | StringConstructor)[];
min: {
type: NumberConstructor;
default: number;
};
max: {
type: NumberConstructor;
default: number;
};
innerMin: NumberConstructor;
innerMax: NumberConstructor;
step: {
type: NumberConstructor;
default: number;
validator: (v: any) => boolean;
};
snap: BooleanConstructor;
vertical: BooleanConstructor;
reverse: BooleanConstructor;
hideSelection: BooleanConstructor;
color: StringConstructor;
markerLabelsClass: StringConstructor;
label: BooleanConstructor;
labelColor: StringConstructor;
labelTextColor: StringConstructor;
labelAlways: BooleanConstructor;
switchLabelSide: BooleanConstructor;
markers: (NumberConstructor | BooleanConstructor)[];
markerLabels: (ObjectConstructor | ArrayConstructor | FunctionConstructor | BooleanConstructor)[];
switchMarkerLabelsSide: BooleanConstructor;
trackImg: StringConstructor;
trackColor: StringConstructor;
innerTrackImg: StringConstructor;
innerTrackColor: StringConstructor;
selectionColor: StringConstructor;
selectionImg: StringConstructor;
thumbSize: {
type: StringConstructor;
default: string;
};
trackSize: {
type: StringConstructor;
default: string;
};
disable: BooleanConstructor;
readonly: BooleanConstructor;
dense: BooleanConstructor;
tabindex: (NumberConstructor | StringConstructor)[];
thumbColor: StringConstructor;
thumbPath: {
type: StringConstructor;
default: string;
};
name: StringConstructor;
dark: {
type: BooleanConstructor;
default: any;
};
};
declare const _default: import("vue").DefineComponent<{
modelValue: {
required: boolean;
default: any;
validator: (v: any) => boolean;
};
labelValue: (NumberConstructor | StringConstructor)[];
min: {
type: NumberConstructor;
default: number;
};
max: {
type: NumberConstructor;
default: number;
};
innerMin: NumberConstructor;
innerMax: NumberConstructor;
step: {
type: NumberConstructor;
default: number;
validator: (v: any) => boolean;
};
snap: BooleanConstructor;
vertical: BooleanConstructor;
reverse: BooleanConstructor;
hideSelection: BooleanConstructor;
color: StringConstructor;
markerLabelsClass: StringConstructor;
label: BooleanConstructor;
labelColor: StringConstructor;
labelTextColor: StringConstructor;
labelAlways: BooleanConstructor;
switchLabelSide: BooleanConstructor;
markers: (NumberConstructor | BooleanConstructor)[];
markerLabels: (ObjectConstructor | ArrayConstructor | FunctionConstructor | BooleanConstructor)[];
switchMarkerLabelsSide: BooleanConstructor;
trackImg: StringConstructor;
trackColor: StringConstructor;
innerTrackImg: StringConstructor;
innerTrackColor: StringConstructor;
selectionColor: StringConstructor;
selectionImg: StringConstructor;
thumbSize: {
type: StringConstructor;
default: string;
};
trackSize: {
type: StringConstructor;
default: string;
};
disable: BooleanConstructor;
readonly: BooleanConstructor;
dense: BooleanConstructor;
tabindex: (NumberConstructor | StringConstructor)[];
thumbColor: StringConstructor;
thumbPath: {
type: StringConstructor;
default: string;
};
name: StringConstructor;
dark: {
type: BooleanConstructor;
default: any;
};
}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
modelValue: {
required: boolean;
default: any;
validator: (v: any) => boolean;
};
labelValue: (NumberConstructor | StringConstructor)[];
min: {
type: NumberConstructor;
default: number;
};
max: {
type: NumberConstructor;
default: number;
};
innerMin: NumberConstructor;
innerMax: NumberConstructor;
step: {
type: NumberConstructor;
default: number;
validator: (v: any) => boolean;
};
snap: BooleanConstructor;
vertical: BooleanConstructor;
reverse: BooleanConstructor;
hideSelection: BooleanConstructor;
color: StringConstructor;
markerLabelsClass: StringConstructor;
label: BooleanConstructor;
labelColor: StringConstructor;
labelTextColor: StringConstructor;
labelAlways: BooleanConstructor;
switchLabelSide: BooleanConstructor;
markers: (NumberConstructor | BooleanConstructor)[];
markerLabels: (ObjectConstructor | ArrayConstructor | FunctionConstructor | BooleanConstructor)[];
switchMarkerLabelsSide: BooleanConstructor;
trackImg: StringConstructor;
trackColor: StringConstructor;
innerTrackImg: StringConstructor;
innerTrackColor: StringConstructor;
selectionColor: StringConstructor;
selectionImg: StringConstructor;
thumbSize: {
type: StringConstructor;
default: string;
};
trackSize: {
type: StringConstructor;
default: string;
};
disable: BooleanConstructor;
readonly: BooleanConstructor;
dense: BooleanConstructor;
tabindex: (NumberConstructor | StringConstructor)[];
thumbColor: StringConstructor;
thumbPath: {
type: StringConstructor;
default: string;
};
name: StringConstructor;
dark: {
type: BooleanConstructor;
default: any;
};
}>> & {
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
}, {
reverse: boolean;
vertical: boolean;
label: boolean;
disable: boolean;
modelValue: any;
dark: boolean;
dense: boolean;
min: number;
max: number;
step: number;
snap: boolean;
hideSelection: boolean;
labelAlways: boolean;
switchLabelSide: boolean;
switchMarkerLabelsSide: boolean;
thumbSize: string;
trackSize: string;
readonly: boolean;
thumbPath: string;
}>;
export default _default;
interface SliderMarkerLabelPartialDefinition {
label?: number | string;
classes?: VueClassProp;
style?: VueStyleObjectProp;
}
interface SliderMarkerLabelDefinition extends SliderMarkerLabelPartialDefinition {
value?: number;
}
interface SliderMarkerLabelDefinitionRequiredValue extends SliderMarkerLabelPartialDefinition {
value: number;
}
interface SliderMarkerLabelObjectDefinition {
[value: number]: string | SliderMarkerLabelDefinition;
}
export type SliderMarkerLabels = boolean | Array<SliderMarkerLabelDefinitionRequiredValue> | SliderMarkerLabelObjectDefinition | ((value: number) => string | SliderMarkerLabelDefinition);
export interface VcSliderProps {
/**
* Used to specify the name of the control; Useful if dealing with forms submitted directly to a URL
*/
name?: string | undefined;
/**
* Minimum value of the model; Set track's minimum value
*/
min?: number | undefined;
/**
* Maximum value of the model; Set track's maximum value
* Default value: 100
*/
max?: number | undefined;
/**
* Inner minimum value of the model; Use in case you need the model value to be inside of the track's min-max values; Needs to be higher or equal to 'min' prop; Defaults to 'min' prop
*/
innerMin?: number | undefined;
/**
* Inner maximum value of the model; Use in case you need the model value to be inside of the track's min-max values; Needs to be lower or equal to 'max' prop; Defaults to 'max' prop
*/
innerMax?: number | undefined;
/**
* Specify step amount between valid values (> 0.0); When step equals to 0 it defines infinite granularity
* Default value: 1
*/
step?: number | undefined;
/**
* Snap on valid values, rather than sliding freely; Suggestion: use with 'step' prop
*/
snap?: boolean | undefined;
/**
* Work in reverse (changes direction)
*/
reverse?: boolean | undefined;
/**
* Display in vertical direction
*/
vertical?: boolean | undefined;
/**
* Color name for component from the Quasar Color Palette
*/
color?: string | undefined;
/**
* Color name for the track (can be 'transparent' too) from the Quasar Color Palette
*/
trackColor?: string | undefined;
/**
* Apply a pattern image on the track
*/
trackImg?: string | undefined;
/**
* Color name for the inner track (can be 'transparent' too) from the Quasar Color Palette
*/
innerTrackColor?: string | undefined;
/**
* Apply a pattern image on the inner track
*/
innerTrackImg?: string | undefined;
/**
* Color name for the selection bar (can be 'transparent' too) from the Quasar Color Palette
*/
selectionColor?: string | undefined;
/**
* Apply a pattern image on the selection bar
*/
selectionImg?: string | undefined;
/**
* Popup a label when user clicks/taps on the slider thumb and moves it
*/
label?: boolean | undefined;
/**
* Color name for component from the Quasar Color Palette
*/
labelColor?: string | undefined;
/**
* Color name for component from the Quasar Color Palette
*/
labelTextColor?: string | undefined;
/**
* Switch the position of the label (top <-> bottom or left <-> right)
*/
switchLabelSide?: boolean | undefined;
/**
* Always display the label
*/
labelAlways?: boolean | undefined;
/**
* Display markers on the track, one for each possible value for the model or using a custom step (when specifying a Number)
*/
markers?: boolean | number | undefined;
/**
* Configure the marker labels (or show the default ones if 'true'); Array of definition Objects or Object with key-value where key is the model and the value is the marker label definition
* @param value The marker value to transform
* @returns Marker definition Object or directly a String for the label of the marker
*/
markerLabels?: SliderMarkerLabels | undefined;
/**
* CSS class(es) to apply to the marker labels container
*/
markerLabelsClass?: string | undefined;
/**
* Switch the position of the marker labels (top <-> bottom or left <-> right)
*/
switchMarkerLabelsSide?: boolean | undefined;
/**
* Track size (including CSS unit)
* Default value: 4px
*/
trackSize?: string | undefined;
/**
* Thumb size (including CSS unit)
* Default value: 20px
*/
thumbSize?: string | undefined;
/**
* Color name for component from the Quasar Color Palette
*/
thumbColor?: string | undefined;
/**
* Set custom thumb svg path
* Default value: M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0
*/
thumbPath?: string | undefined;
/**
* Notify the component that the background is a dark color
*/
dark?: boolean | undefined;
/**
* Dense mode; occupies less space
*/
dense?: boolean | undefined;
/**
* Put component in disabled mode
*/
disable?: boolean | undefined;
/**
* Put component in readonly mode
*/
readonly?: boolean | undefined;
/**
* Tabindex HTML attribute value
*/
tabindex?: number | string | undefined;
/**
* Model of the component (must be between min/max); Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
*/
modelValue: number | null | undefined;
/**
* Override default label value
*/
labelValue?: string | number | undefined;
/**
* Emitted on lazy model value change (after user slides then releases the thumb)
* @param value New model value
*/
onChange?: (value: any) => void;
/**
* Triggered when user starts panning on the component
* @param phase Phase of panning
*/
onPan?: (phase: 'start' | 'end') => void;
/**
* Emitted when the component needs to change the model; Is also used by v-model
* @param value New model value
*/
'onUpdate:modelValue'?: (value: number | null) => void;
}
export type SliderMarkerLabelConfig = {
index: number;
value: number;
label: number | string;
classes: string;
style: VueStyleObjectProp;
};
export type SliderMarkerLabelArrayConfig = SliderMarkerLabelConfig[];
export interface SliderMarkerLabelObjectConfig {
[value: number]: SliderMarkerLabelConfig;
}
export interface QSliderSlots {
/**
* What should the menu display after filtering options and none are left to be displayed; Suggestion: <div>
* @param scope
*/
'marker-label': (scope: {
/**
* Config for current marker label
*/
marker: SliderMarkerLabelConfig;
/**
* Array of marker label configs
*/
markerList: SliderMarkerLabelArrayConfig[];
/**
* Object with key-value where key is the model and the value is the marker label config
*/
markerMap: SliderMarkerLabelObjectConfig;
/**
* Required CSS classes to be applied to the marker element
*/
classes: string;
/**
* Get CSS style Object to apply to a marker element at respective model value; For perf reasons, use only if requested model value is not already part of markerMap
* @param value The marker label equivalent model value
* @returns CSS style Object to apply to a marker element at respective model value
*/
getStyle: (value: number) => any;
}) => VNode[];
/**
* What should the menu display after filtering options and none are left to be displayed; Suggestion: <div>
* @param scope
*/
'marker-label-group': (scope: {
/**
* Array of marker label configs
*/
markerList: SliderMarkerLabelArrayConfig[];
/**
* Object with key-value where key is the model and the value is the marker label config
*/
markerMap: SliderMarkerLabelObjectConfig;
/**
* Required CSS classes to be applied to the marker element
*/
classes: string;
/**
* Get CSS style Object to apply to a marker element at respective model value; For perf reasons, use only if requested model value is not already part of markerMap
* @param value The marker label equivalent model value
* @returns CSS style Object to apply to a marker element at respective model value
*/
getStyle: (value: number) => any;
}) => VNode[];
}
export type VcSliderRef = ComponentPublicInstance<VcSliderProps>;