2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* MeterGroup is a group of process status indicators.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://primevue.org/metergroup)
|
|
|
|
*
|
|
|
|
* @module metergroup
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
import { VNode } from 'vue';
|
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2024-05-16 10:50:43 +00:00
|
|
|
import { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
2024-01-11 13:42:20 +00:00
|
|
|
|
|
|
|
export declare type MeterGroupPassThroughOptionType = MeterGroupPassThroughAttributes | ((options: MeterGroupPassThroughMethodOptions) => MeterGroupPassThroughAttributes | string) | string | null | undefined;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface MeterGroupPassThroughMethodOptions {
|
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
|
|
|
instance: any;
|
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
|
|
|
props: MeterGroupProps;
|
|
|
|
/**
|
|
|
|
* Defines current inline state.
|
|
|
|
*/
|
|
|
|
context: MeterGroupContext;
|
|
|
|
/**
|
|
|
|
* Defines valid attributes.
|
|
|
|
*/
|
|
|
|
attrs: any;
|
|
|
|
/**
|
|
|
|
* Defines parent options.
|
|
|
|
*/
|
|
|
|
parent: any;
|
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link MeterGroupProps.pt}
|
|
|
|
*/
|
|
|
|
export interface MeterGroupPassThroughOptions {
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
|
|
|
root?: MeterGroupPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the meter container's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
2024-04-30 06:54:48 +00:00
|
|
|
meters?: MeterGroupPassThroughOptionType;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the meter's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
2024-04-30 06:54:48 +00:00
|
|
|
meter?: MeterGroupPassThroughOptionType;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the label list's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
2024-04-30 06:54:48 +00:00
|
|
|
labelList?: MeterGroupPassThroughOptionType;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the label list item's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
|
|
|
label?: MeterGroupPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the label icon type's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
2024-04-30 06:54:48 +00:00
|
|
|
labelIcon?: MeterGroupPassThroughOptionType;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the label list type's DOM element.
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
2024-04-30 06:54:48 +00:00
|
|
|
labelMarker?: MeterGroupPassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the label's DOM element.
|
2024-04-30 06:54:48 +00:00
|
|
|
*/
|
|
|
|
labelText?: MeterGroupPassThroughOptionType;
|
2024-01-11 13:42:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
|
|
|
export interface MeterGroupPassThroughAttributes {
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current options in MeterGroup component.
|
|
|
|
*/
|
|
|
|
export interface MeterGroupContext {
|
|
|
|
/**
|
|
|
|
* Current value of the meter item
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value: MeterItem;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Current index of the meter item
|
|
|
|
*/
|
|
|
|
index: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines valid properties of a meter item.
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
export interface MeterItem {
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Current label of the meter item.
|
|
|
|
*/
|
|
|
|
label: string;
|
|
|
|
/**
|
|
|
|
* Current value of the meter item.
|
|
|
|
*/
|
|
|
|
value: number;
|
|
|
|
/**
|
|
|
|
* Current color of the meter item.
|
|
|
|
*/
|
|
|
|
color: string;
|
2024-01-18 12:53:33 +00:00
|
|
|
/**
|
|
|
|
* Current icon of the meter item.
|
|
|
|
*/
|
|
|
|
icon: string;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Optional keys.
|
|
|
|
*/
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines valid properties in MeterGroup component.
|
|
|
|
*/
|
|
|
|
export interface MeterGroupProps {
|
|
|
|
/**
|
|
|
|
* Current value of the metergroup.
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value?: MeterItem[] | undefined;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Mininum boundary value.
|
|
|
|
* @defaultValue 0
|
|
|
|
*/
|
|
|
|
min?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Maximum boundary value.
|
|
|
|
* @defaultValue 100
|
|
|
|
*/
|
|
|
|
max?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Specifies the layout of the component, valid values are 'horizontal' and 'vertical'.
|
|
|
|
* @defaultValue horizontal
|
|
|
|
*/
|
|
|
|
orientation?: 'horizontal' | 'vertical' | undefined;
|
|
|
|
/**
|
|
|
|
* Specifies the label position of the component, valid values are 'start' and 'end'.
|
|
|
|
* @defaultValue end
|
|
|
|
*/
|
|
|
|
labelPosition?: 'start' | 'end' | undefined;
|
|
|
|
/**
|
|
|
|
* Specifies the label orientation of the component, valid values are 'horizontal' and 'vertical'.
|
|
|
|
* @defaultValue horizontal
|
|
|
|
*/
|
|
|
|
labelOrientation?: 'horizontal' | 'vertical' | undefined;
|
2024-04-02 08:24:31 +00:00
|
|
|
/**
|
|
|
|
* It generates scoped CSS variables using design tokens for the component.
|
|
|
|
*/
|
|
|
|
dt?: DesignToken<any>;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
|
|
|
* @type {MeterGroupPassThroughOptions}
|
|
|
|
*/
|
|
|
|
pt?: PassThrough<MeterGroupPassThroughOptions>;
|
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
|
|
|
/**
|
|
|
|
* When enabled, it removes component related styles in the core.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
unstyled?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines valid slots in MeterGroup component.
|
|
|
|
*/
|
|
|
|
export interface MeterGroupSlots {
|
|
|
|
/**
|
|
|
|
* Custom label template.
|
|
|
|
*/
|
|
|
|
label(scope: {
|
|
|
|
/**
|
|
|
|
* Current value of the component
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value: MeterItem[];
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Total percent of the metergroup items
|
|
|
|
*/
|
2024-01-18 12:53:33 +00:00
|
|
|
totalPercent: number;
|
|
|
|
/**
|
|
|
|
* Array of sequential sum of values of metergroup items
|
|
|
|
*/
|
|
|
|
percentages: number[];
|
2024-01-11 13:42:20 +00:00
|
|
|
}): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom meter template.
|
|
|
|
*/
|
|
|
|
meter(scope: {
|
|
|
|
/**
|
|
|
|
* Current value of the meter item
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value: MeterItem;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Current index of the meter item
|
|
|
|
*/
|
|
|
|
index: number;
|
|
|
|
/**
|
|
|
|
* Style class of the meter item
|
|
|
|
*/
|
|
|
|
class: string;
|
|
|
|
/**
|
|
|
|
* Current orientation of the component
|
|
|
|
*/
|
|
|
|
orientation: string;
|
|
|
|
/**
|
|
|
|
* Current width of the meter item
|
|
|
|
*/
|
2024-01-18 12:53:33 +00:00
|
|
|
size: string;
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Total percent of the metergroup items
|
|
|
|
*/
|
2024-01-18 12:53:33 +00:00
|
|
|
totalPercent: number;
|
2024-01-11 13:42:20 +00:00
|
|
|
}): VNode[];
|
2024-01-12 09:51:29 +00:00
|
|
|
/**
|
|
|
|
* Custom icon template.
|
|
|
|
*/
|
|
|
|
icon(scope: {
|
|
|
|
/**
|
|
|
|
* Current value of the component
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value: MeterItem;
|
2024-01-12 09:51:29 +00:00
|
|
|
/**
|
|
|
|
* Style class of the icon
|
|
|
|
*/
|
|
|
|
class: string;
|
|
|
|
}): VNode[];
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Custom start template.
|
|
|
|
*/
|
|
|
|
start(scope: {
|
|
|
|
/**
|
|
|
|
* Current value of the component
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value: MeterItem[];
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Total percent of the metergroup items
|
|
|
|
*/
|
2024-01-18 12:53:33 +00:00
|
|
|
totalPercent: number;
|
|
|
|
/**
|
|
|
|
* Array of sequential sum of values of metergroup items
|
|
|
|
*/
|
|
|
|
percentages: number[];
|
2024-01-11 13:42:20 +00:00
|
|
|
}): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom end template.
|
|
|
|
*/
|
|
|
|
end(scope: {
|
|
|
|
/**
|
|
|
|
* Current value of the component
|
|
|
|
*/
|
2024-01-24 10:37:01 +00:00
|
|
|
value: MeterItem[];
|
2024-01-11 13:42:20 +00:00
|
|
|
/**
|
|
|
|
* Total percent of the metergroup items
|
|
|
|
*/
|
2024-01-18 12:53:33 +00:00
|
|
|
totalPercent: number;
|
|
|
|
/**
|
|
|
|
* Array of sequential sum of values of metergroup items
|
|
|
|
*/
|
|
|
|
percentages: number[];
|
2024-01-11 13:42:20 +00:00
|
|
|
}): VNode[];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines valid emits in MeterGroup component.
|
|
|
|
*/
|
2024-05-16 10:50:43 +00:00
|
|
|
interface MeterGroupEmitsOptions {}
|
|
|
|
|
|
|
|
export declare type MeterGroupEmits = EmitFn<MeterGroupEmitsOptions>;
|
2024-01-11 13:42:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* **PrimeVue - MeterGroup**
|
|
|
|
*
|
|
|
|
* _MeterGroup is a group of process status indicators._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/metergroup/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
2024-05-16 10:50:43 +00:00
|
|
|
*
|
2024-01-11 13:42:20 +00:00
|
|
|
*/
|
2024-05-16 10:50:43 +00:00
|
|
|
declare const MeterGroup: DefineComponent<MeterGroupProps, MeterGroupSlots, MeterGroupEmits>;
|
2024-01-11 13:42:20 +00:00
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2024-05-16 10:50:43 +00:00
|
|
|
MeterGroup: GlobalComponentConstructor<MeterGroupProps, MeterGroupSlots, MeterGroupEmits>;
|
2024-01-11 13:42:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MeterGroup;
|