@progress/kendo-vue-progressbars 5.3.0-dev.202409130647 → 5.3.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -32
- package/chunkprogressbar/ChunkProgressBar.js +8 -0
- package/chunkprogressbar/ChunkProgressBar.mjs +127 -0
- package/common/constants.js +8 -0
- package/common/constants.mjs +14 -0
- package/common/utils.js +8 -0
- package/common/utils.mjs +24 -0
- package/dist/cdn/js/kendo-vue-progressbars.js +8 -1
- package/index.d.mts +397 -0
- package/index.d.ts +397 -0
- package/index.js +8 -0
- package/index.mjs +13 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +18 -0
- package/package.json +25 -47
- package/progressbar/ProgressBar.js +8 -0
- package/progressbar/ProgressBar.mjs +204 -0
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/chunkprogressbar/ChunkProgressBar.d.ts +0 -44
- package/dist/es/chunkprogressbar/ChunkProgressBar.js +0 -172
- package/dist/es/chunkprogressbar/interfaces/ChunkProgressBarProps.d.ts +0 -10
- package/dist/es/chunkprogressbar/interfaces/ChunkProgressBarProps.js +0 -1
- package/dist/es/common/BaseProps.d.ts +0 -78
- package/dist/es/common/BaseProps.js +0 -1
- package/dist/es/common/constants.d.ts +0 -16
- package/dist/es/common/constants.js +0 -16
- package/dist/es/common/utils.d.ts +0 -16
- package/dist/es/common/utils.js +0 -34
- package/dist/es/main.d.ts +0 -7
- package/dist/es/main.js +0 -7
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/progressbar/ProgressBar.d.ts +0 -54
- package/dist/es/progressbar/ProgressBar.js +0 -244
- package/dist/es/progressbar/interfaces/LabelProps.d.ts +0 -9
- package/dist/es/progressbar/interfaces/LabelProps.js +0 -1
- package/dist/es/progressbar/interfaces/ProgressBarAnimation.d.ts +0 -9
- package/dist/es/progressbar/interfaces/ProgressBarAnimation.js +0 -1
- package/dist/es/progressbar/interfaces/ProgressBarHandle.d.ts +0 -21
- package/dist/es/progressbar/interfaces/ProgressBarHandle.js +0 -4
- package/dist/es/progressbar/interfaces/ProgressBarProps.d.ts +0 -29
- package/dist/es/progressbar/interfaces/ProgressBarProps.js +0 -1
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/chunkprogressbar/ChunkProgressBar.d.ts +0 -44
- package/dist/esm/chunkprogressbar/ChunkProgressBar.js +0 -172
- package/dist/esm/chunkprogressbar/interfaces/ChunkProgressBarProps.d.ts +0 -10
- package/dist/esm/chunkprogressbar/interfaces/ChunkProgressBarProps.js +0 -1
- package/dist/esm/common/BaseProps.d.ts +0 -78
- package/dist/esm/common/BaseProps.js +0 -1
- package/dist/esm/common/constants.d.ts +0 -16
- package/dist/esm/common/constants.js +0 -16
- package/dist/esm/common/utils.d.ts +0 -16
- package/dist/esm/common/utils.js +0 -34
- package/dist/esm/main.d.ts +0 -7
- package/dist/esm/main.js +0 -7
- package/dist/esm/package-metadata.d.ts +0 -5
- package/dist/esm/package-metadata.js +0 -11
- package/dist/esm/package.json +0 -3
- package/dist/esm/progressbar/ProgressBar.d.ts +0 -54
- package/dist/esm/progressbar/ProgressBar.js +0 -244
- package/dist/esm/progressbar/interfaces/LabelProps.d.ts +0 -9
- package/dist/esm/progressbar/interfaces/LabelProps.js +0 -1
- package/dist/esm/progressbar/interfaces/ProgressBarAnimation.d.ts +0 -9
- package/dist/esm/progressbar/interfaces/ProgressBarAnimation.js +0 -1
- package/dist/esm/progressbar/interfaces/ProgressBarHandle.d.ts +0 -21
- package/dist/esm/progressbar/interfaces/ProgressBarHandle.js +0 -4
- package/dist/esm/progressbar/interfaces/ProgressBarProps.d.ts +0 -29
- package/dist/esm/progressbar/interfaces/ProgressBarProps.js +0 -1
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/chunkprogressbar/ChunkProgressBar.d.ts +0 -44
- package/dist/npm/chunkprogressbar/ChunkProgressBar.js +0 -179
- package/dist/npm/chunkprogressbar/interfaces/ChunkProgressBarProps.d.ts +0 -10
- package/dist/npm/chunkprogressbar/interfaces/ChunkProgressBarProps.js +0 -2
- package/dist/npm/common/BaseProps.d.ts +0 -78
- package/dist/npm/common/BaseProps.js +0 -2
- package/dist/npm/common/constants.d.ts +0 -16
- package/dist/npm/common/constants.js +0 -19
- package/dist/npm/common/utils.d.ts +0 -16
- package/dist/npm/common/utils.js +0 -41
- package/dist/npm/main.d.ts +0 -7
- package/dist/npm/main.js +0 -23
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/progressbar/ProgressBar.d.ts +0 -54
- package/dist/npm/progressbar/ProgressBar.js +0 -251
- package/dist/npm/progressbar/interfaces/LabelProps.d.ts +0 -9
- package/dist/npm/progressbar/interfaces/LabelProps.js +0 -2
- package/dist/npm/progressbar/interfaces/ProgressBarAnimation.d.ts +0 -9
- package/dist/npm/progressbar/interfaces/ProgressBarAnimation.js +0 -2
- package/dist/npm/progressbar/interfaces/ProgressBarHandle.d.ts +0 -21
- package/dist/npm/progressbar/interfaces/ProgressBarHandle.js +0 -5
- package/dist/npm/progressbar/interfaces/ProgressBarProps.d.ts +0 -29
- package/dist/npm/progressbar/interfaces/ProgressBarProps.js +0 -2
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export interface BaseProps {
|
|
5
|
-
/**
|
|
6
|
-
* Sets one of the two visually distinct types of progress bar.
|
|
7
|
-
*
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
type?: 'linear' | 'circular';
|
|
11
|
-
/**
|
|
12
|
-
* Sets the value of the progress bar. Has to be between `min` and `max` values. Defaults to `0`.
|
|
13
|
-
* Set `null` to enable the indeterminate state of the progress bar.
|
|
14
|
-
* See examples ([here]({% slug overview_progressbar %})).
|
|
15
|
-
*/
|
|
16
|
-
value?: number | null;
|
|
17
|
-
/**
|
|
18
|
-
* The minimum value of the progress bar. Defaults to `0`.
|
|
19
|
-
*/
|
|
20
|
-
min?: number;
|
|
21
|
-
/**
|
|
22
|
-
* The maximum value of the progress bar. Defaults to `100`.
|
|
23
|
-
*/
|
|
24
|
-
max?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Represents the `dir` HTML attribute. This is used to switch from LTR to RTL.
|
|
27
|
-
*/
|
|
28
|
-
dir?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The accessible label of the component.
|
|
31
|
-
*/
|
|
32
|
-
ariaLabel?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the disabled state of the progress bar.
|
|
35
|
-
* See examples ([here]({% slug progressbar_disabled %})).
|
|
36
|
-
*/
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Defines the orientation of the progress bar.
|
|
40
|
-
* See examples ([here]({% slug progressbar_orientation %})) .
|
|
41
|
-
* Defaults to `horizontal`.
|
|
42
|
-
*/
|
|
43
|
-
orientation?: 'horizontal' | 'vertical' | string;
|
|
44
|
-
/**
|
|
45
|
-
* If set to `true`, the progress bar will be reversed.
|
|
46
|
-
* See examples ([here]({% slug progressbar_direction %})).
|
|
47
|
-
* Defaults to `false`.
|
|
48
|
-
*/
|
|
49
|
-
reverse?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Specifies a list of CSS classes that will be added to the progress bar element.
|
|
52
|
-
*/
|
|
53
|
-
className?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The styles that are applied to the inner element which represents the empty portion of the progress bar.
|
|
56
|
-
* See examples ([here]({% slug progressbar_appearance %})).
|
|
57
|
-
*/
|
|
58
|
-
emptyStyle?: object;
|
|
59
|
-
/**
|
|
60
|
-
* Sets additional classes to the inner element which represents the empty portion of the progress bar.
|
|
61
|
-
* See examples ([here]({% slug progressbar_appearance %})).
|
|
62
|
-
*/
|
|
63
|
-
emptyClassName?: string;
|
|
64
|
-
/**
|
|
65
|
-
* The styles that are applied to the inner element which represents the full portion of the progress bar.
|
|
66
|
-
* See examples ([here]({% slug progressbar_appearance %})).
|
|
67
|
-
*/
|
|
68
|
-
progressStyle?: object;
|
|
69
|
-
/**
|
|
70
|
-
* Sets additional classes to the inner element which represents the full portion of the progress bar.
|
|
71
|
-
* See examples ([here]({% slug progressbar_appearance %})).
|
|
72
|
-
*/
|
|
73
|
-
progressClassName?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Sets the `tabIndex` property of the progress bar.
|
|
76
|
-
*/
|
|
77
|
-
tabIndex?: number;
|
|
78
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare const MIN_RATIO = 0.00001;
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare const LABEL_DECIMALS = 3;
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export declare const DEFAULT_ANIMATION_DURATION = 400;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare const NO_ANIMATION = 0;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare const truncateNumber: (value: number) => string;
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare const calculatePercentage: (min: number, max: number, value: number) => number;
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export declare const updateProgress: (progressRef: any, progressWrapRef: any, percentage: number, isVertical: boolean) => void;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare const calculateRatio: (min: number, max: number, value: number) => number;
|
package/dist/esm/common/utils.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { LABEL_DECIMALS, MIN_RATIO } from './constants.js';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export var truncateNumber = function (value) {
|
|
6
|
-
var numberParts = value.toString().split('.');
|
|
7
|
-
return numberParts.length === 1 ? "".concat(numberParts[0]) : "".concat(numberParts[0], ".").concat(numberParts[1].substr(0, LABEL_DECIMALS));
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export var calculatePercentage = function (min, max, value) {
|
|
13
|
-
var onePercent = Math.abs((max - min) / 100);
|
|
14
|
-
return Math.abs((value - min) / onePercent);
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
export var updateProgress = function (progressRef, progressWrapRef, percentage, isVertical) {
|
|
20
|
-
var progressPercentage = Math.max(percentage, 0.01);
|
|
21
|
-
var progressWrapPercentage = (100 / progressPercentage) * 100;
|
|
22
|
-
if (progressRef && progressWrapRef) {
|
|
23
|
-
progressRef.style.width = !isVertical ? "".concat(progressPercentage, "%") : '100%';
|
|
24
|
-
progressWrapRef.style.width = !isVertical ? "".concat(progressWrapPercentage, "%") : '100%';
|
|
25
|
-
progressRef.style.height = isVertical ? "".concat(progressPercentage, "%") : '100%';
|
|
26
|
-
progressWrapRef.style.height = isVertical ? "".concat(progressWrapPercentage, "%") : '100%';
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
export var calculateRatio = function (min, max, value) {
|
|
33
|
-
return Math.max((value - min) / (max - min), MIN_RATIO);
|
|
34
|
-
};
|
package/dist/esm/main.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './progressbar/ProgressBar';
|
|
2
|
-
export * from './progressbar/interfaces/ProgressBarHandle';
|
|
3
|
-
export * from './progressbar/interfaces/ProgressBarProps';
|
|
4
|
-
export * from './progressbar/interfaces/ProgressBarAnimation';
|
|
5
|
-
export * from './progressbar/interfaces/LabelProps';
|
|
6
|
-
export * from './chunkprogressbar/ChunkProgressBar';
|
|
7
|
-
export * from './chunkprogressbar/interfaces/ChunkProgressBarProps';
|
package/dist/esm/main.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './progressbar/ProgressBar.js';
|
|
2
|
-
export * from './progressbar/interfaces/ProgressBarHandle.js';
|
|
3
|
-
export * from './progressbar/interfaces/ProgressBarProps.js';
|
|
4
|
-
export * from './progressbar/interfaces/ProgressBarAnimation.js';
|
|
5
|
-
export * from './progressbar/interfaces/LabelProps.js';
|
|
6
|
-
export * from './chunkprogressbar/ChunkProgressBar.js';
|
|
7
|
-
export * from './chunkprogressbar/interfaces/ChunkProgressBarProps.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export var packageMetadata = {
|
|
5
|
-
name: '@progress/kendo-vue-progressbars',
|
|
6
|
-
productName: 'Kendo UI for Vue',
|
|
7
|
-
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate: 1726209459,
|
|
9
|
-
version: '',
|
|
10
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
|
-
};
|
package/dist/esm/package.json
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
-
declare type DefaultMethods<V> = {
|
|
4
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
-
};
|
|
6
|
-
import { ProgressBarProps } from './interfaces/ProgressBarProps';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export interface ProgressBarState {
|
|
11
|
-
_progressStatus?: any;
|
|
12
|
-
_progressStatusWrap?: any;
|
|
13
|
-
animationFrame: any;
|
|
14
|
-
prevValue: number;
|
|
15
|
-
v3: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export interface ProgressBarComputed {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
wrapperClass: object;
|
|
23
|
-
isVertical: boolean;
|
|
24
|
-
animationDuration: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
export interface ProgressBarMethods {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
focus: (e: any) => void;
|
|
32
|
-
toggleIfApplicable: () => void;
|
|
33
|
-
handleClick: (event: any) => void;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
export interface ProgressBarData {
|
|
39
|
-
currentActive: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
export interface ProgressBarAll extends Vue2type, ProgressBarMethods, ProgressBarData, ProgressBarComputed, ProgressBarState {
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
declare let ProgressBarVue2: ComponentOptions<ProgressBarAll, DefaultData<ProgressBarData>, DefaultMethods<ProgressBarAll>, ProgressBarComputed, RecordPropsDefinition<ProgressBarProps>>;
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
declare const ProgressBar: DefineComponent<ProgressBarProps, any, ProgressBarData, ProgressBarComputed, ProgressBarMethods, {}, {}, {}, string, ProgressBarProps, ProgressBarProps, {}>;
|
|
54
|
-
export { ProgressBar, ProgressBarVue2 };
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import * as Vue from 'vue';
|
|
3
|
-
var allVue = Vue;
|
|
4
|
-
var gh = allVue.h;
|
|
5
|
-
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
-
import { animate, cancelAnimation } from '@progress/kendo-vue-animation';
|
|
7
|
-
import { classNames, isRtl, getTabIndex, templateRendering, getListeners, getTemplate, setRef, getRef } from '@progress/kendo-vue-common';
|
|
8
|
-
import { calculatePercentage, updateProgress, truncateNumber } from '../common/utils.js';
|
|
9
|
-
import { DEFAULT_ANIMATION_DURATION, NO_ANIMATION } from '../common/constants.js';
|
|
10
|
-
import { validatePackage } from '@progress/kendo-vue-common';
|
|
11
|
-
import { packageMetadata } from '../package-metadata.js';
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
var ProgressBarVue2 = {
|
|
16
|
-
name: 'KendoProgressBar',
|
|
17
|
-
props: {
|
|
18
|
-
animation: {
|
|
19
|
-
type: [Boolean, Object],
|
|
20
|
-
default: false
|
|
21
|
-
},
|
|
22
|
-
disabled: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
reverse: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false
|
|
29
|
-
},
|
|
30
|
-
label: String,
|
|
31
|
-
labelRender: [String, Object, Function],
|
|
32
|
-
labelVisible: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: true
|
|
35
|
-
},
|
|
36
|
-
labelPlacement: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: undefined,
|
|
39
|
-
validator: function validator(value) {
|
|
40
|
-
return ['start', 'center', 'end'].includes(value);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
dir: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: undefined
|
|
46
|
-
},
|
|
47
|
-
max: {
|
|
48
|
-
type: Number,
|
|
49
|
-
default: 100
|
|
50
|
-
},
|
|
51
|
-
min: {
|
|
52
|
-
type: Number,
|
|
53
|
-
default: 0
|
|
54
|
-
},
|
|
55
|
-
value: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: 0
|
|
58
|
-
},
|
|
59
|
-
orientation: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: 'horizontal',
|
|
62
|
-
validator: function validator(value) {
|
|
63
|
-
return ['horizontal', 'vertical'].includes(value);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
tabIndex: Number,
|
|
67
|
-
emptyStyle: Object,
|
|
68
|
-
emptyClassName: String,
|
|
69
|
-
progressStyle: Object,
|
|
70
|
-
progressClassName: String,
|
|
71
|
-
ariaLabel: String
|
|
72
|
-
},
|
|
73
|
-
created: function created() {
|
|
74
|
-
validatePackage(packageMetadata);
|
|
75
|
-
this.currentDir = this.$props.dir;
|
|
76
|
-
},
|
|
77
|
-
mounted: function mounted() {
|
|
78
|
-
this._progressStatus = getRef(this, 'progressStatus');
|
|
79
|
-
this._progressStatusWrap = getRef(this, 'progressStatusWrap');
|
|
80
|
-
this.currentDir = this.$props.dir !== undefined ? this.$props.dir : isRtl(this.$el) ? 'rtl' : 'ltr';
|
|
81
|
-
this.animationFrame = animate({
|
|
82
|
-
duration: this.animationDuration,
|
|
83
|
-
onStart: this.handleStart,
|
|
84
|
-
onUpdate: this.handleUpdate,
|
|
85
|
-
onEnd: this.handleEnd
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
destroyed: !!isV3 ? undefined : function () {
|
|
89
|
-
cancelAnimation(this.animationFrame);
|
|
90
|
-
},
|
|
91
|
-
// @ts-ignore
|
|
92
|
-
unmounted: function unmounted() {
|
|
93
|
-
cancelAnimation(this.animationFrame);
|
|
94
|
-
},
|
|
95
|
-
data: function data() {
|
|
96
|
-
return {
|
|
97
|
-
currentDir: undefined
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
watch: {
|
|
101
|
-
value: function value(_newValue, oldValue) {
|
|
102
|
-
this.prevValue = oldValue;
|
|
103
|
-
this.animationFrame = animate({
|
|
104
|
-
duration: this.animationDuration,
|
|
105
|
-
onStart: this.handleStart,
|
|
106
|
-
onUpdate: this.handleUpdate,
|
|
107
|
-
onEnd: this.handleEnd
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
computed: {
|
|
112
|
-
wrapperClass: function wrapperClass() {
|
|
113
|
-
var _a = this.$props,
|
|
114
|
-
disabled = _a.disabled,
|
|
115
|
-
reverse = _a.reverse,
|
|
116
|
-
orientation = _a.orientation,
|
|
117
|
-
value = _a.value;
|
|
118
|
-
var isVertical = orientation === 'vertical';
|
|
119
|
-
var indeterminateProp = value === null;
|
|
120
|
-
return {
|
|
121
|
-
'k-progressbar': true,
|
|
122
|
-
'k-progressbar-horizontal': !isVertical,
|
|
123
|
-
'k-progressbar-vertical': isVertical,
|
|
124
|
-
'k-progressbar-reverse': reverse,
|
|
125
|
-
'k-progressbar-indeterminate': indeterminateProp,
|
|
126
|
-
'k-disabled': disabled
|
|
127
|
-
};
|
|
128
|
-
},
|
|
129
|
-
isVertical: function isVertical() {
|
|
130
|
-
return this.orientation === 'vertical';
|
|
131
|
-
},
|
|
132
|
-
animationDuration: function animationDuration() {
|
|
133
|
-
var animation = this.$props.animation;
|
|
134
|
-
return typeof animation !== 'boolean' && animation !== undefined ? animation.duration : animation ? DEFAULT_ANIMATION_DURATION : NO_ANIMATION;
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
// @ts-ignore
|
|
138
|
-
setup: !isV3 ? undefined : function () {
|
|
139
|
-
var v3 = !!isV3;
|
|
140
|
-
return {
|
|
141
|
-
v3: v3
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
// @ts-ignore
|
|
145
|
-
render: function render(createElement) {
|
|
146
|
-
var h = gh || createElement;
|
|
147
|
-
var _a = this.$props,
|
|
148
|
-
disabled = _a.disabled,
|
|
149
|
-
labelVisible = _a.labelVisible,
|
|
150
|
-
labelPlacement = _a.labelPlacement,
|
|
151
|
-
max = _a.max,
|
|
152
|
-
min = _a.min,
|
|
153
|
-
tabIndex = _a.tabIndex,
|
|
154
|
-
emptyStyle = _a.emptyStyle,
|
|
155
|
-
emptyClassName = _a.emptyClassName,
|
|
156
|
-
progressStyle = _a.progressStyle,
|
|
157
|
-
progressClassName = _a.progressClassName;
|
|
158
|
-
var value = this.$props.value || 0;
|
|
159
|
-
var indeterminateProp = this.$props.value === null;
|
|
160
|
-
var formattedLabel = truncateNumber(value);
|
|
161
|
-
var labelProps = {
|
|
162
|
-
value: value
|
|
163
|
-
};
|
|
164
|
-
var label = this.$props.labelRender ? templateRendering.call(this, this.$props.labelRender, getListeners.call(this)) : undefined;
|
|
165
|
-
var labelDefaultRendering = h('span', {
|
|
166
|
-
'class': 'k-progress-status'
|
|
167
|
-
}, formattedLabel);
|
|
168
|
-
var toggleButtonRendering = getTemplate.call(this, {
|
|
169
|
-
h: h,
|
|
170
|
-
template: label,
|
|
171
|
-
defaultRendering: labelDefaultRendering,
|
|
172
|
-
additionalProps: labelProps
|
|
173
|
-
});
|
|
174
|
-
var renderLabel = labelVisible ? this.$props.label ? h("span", {
|
|
175
|
-
"class": 'k-progress-status'
|
|
176
|
-
}, [this.$props.label]) : toggleButtonRendering : undefined;
|
|
177
|
-
var positionClasses = classNames('k-progress-status-wrap', {
|
|
178
|
-
'k-progress-start': labelPlacement === 'start',
|
|
179
|
-
'k-progress-center': labelPlacement === 'center',
|
|
180
|
-
'k-progress-end': labelPlacement === 'end' || labelPlacement === undefined
|
|
181
|
-
});
|
|
182
|
-
return h("div", {
|
|
183
|
-
"class": this.wrapperClass,
|
|
184
|
-
dir: this.currentDir,
|
|
185
|
-
attrs: this.v3 ? undefined : {
|
|
186
|
-
dir: this.currentDir,
|
|
187
|
-
tabindex: getTabIndex(tabIndex, disabled),
|
|
188
|
-
role: 'progressbar',
|
|
189
|
-
"aria-valuemin": min,
|
|
190
|
-
"aria-valuemax": max,
|
|
191
|
-
"aria-valuenow": indeterminateProp ? undefined : value,
|
|
192
|
-
"aria-disabled": disabled,
|
|
193
|
-
"aria-label": this.$props.ariaLabel
|
|
194
|
-
},
|
|
195
|
-
tabindex: getTabIndex(tabIndex, disabled),
|
|
196
|
-
role: 'progressbar',
|
|
197
|
-
"aria-valuemin": min,
|
|
198
|
-
"aria-valuemax": max,
|
|
199
|
-
"aria-valuenow": indeterminateProp ? undefined : value,
|
|
200
|
-
"aria-disabled": disabled,
|
|
201
|
-
"aria-label": this.$props.ariaLabel
|
|
202
|
-
}, [h("span", {
|
|
203
|
-
"class": positionClasses + (emptyClassName ? ' ' + emptyClassName : ''),
|
|
204
|
-
style: emptyStyle
|
|
205
|
-
}, [renderLabel]), h("div", {
|
|
206
|
-
"class": 'k-progressbar-value k-selected',
|
|
207
|
-
style: progressStyle,
|
|
208
|
-
ref: setRef(this, 'progressStatus')
|
|
209
|
-
}, [h("span", {
|
|
210
|
-
"class": positionClasses + (progressClassName ? ' ' + progressClassName : ''),
|
|
211
|
-
ref: setRef(this, 'progressStatusWrap')
|
|
212
|
-
}, [renderLabel])])]);
|
|
213
|
-
},
|
|
214
|
-
methods: {
|
|
215
|
-
focus: function focus() {
|
|
216
|
-
if (this.$el) {
|
|
217
|
-
this.$el.focus();
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
progressStatusElement: function progressStatusElement() {
|
|
221
|
-
return this._progressStatus;
|
|
222
|
-
},
|
|
223
|
-
progressStatusWrapElement: function progressStatusWrapElement() {
|
|
224
|
-
return this._progressStatusWrap;
|
|
225
|
-
},
|
|
226
|
-
handleStart: function handleStart() {
|
|
227
|
-
var percentage = calculatePercentage(this.min, this.max, this.prevValue);
|
|
228
|
-
updateProgress(this._progressStatus, this._progressStatusWrap, percentage, this.isVertical);
|
|
229
|
-
},
|
|
230
|
-
handleUpdate: function handleUpdate(progress) {
|
|
231
|
-
var percentage = calculatePercentage(this.min, this.max, this.prevValue + (this.value - this.prevValue) * progress);
|
|
232
|
-
updateProgress(this._progressStatus, this._progressStatusWrap, percentage, this.isVertical);
|
|
233
|
-
},
|
|
234
|
-
handleEnd: function handleEnd() {
|
|
235
|
-
var percentage = calculatePercentage(this.min, this.max, this.value);
|
|
236
|
-
updateProgress(this._progressStatus, this._progressStatusWrap, percentage, this.isVertical);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* @hidden
|
|
242
|
-
*/
|
|
243
|
-
var ProgressBar = ProgressBarVue2;
|
|
244
|
-
export { ProgressBar, ProgressBarVue2 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The ProgressBar ref.
|
|
3
|
-
*/
|
|
4
|
-
export interface ProgressBarHandle {
|
|
5
|
-
/**
|
|
6
|
-
* The ProgressBar element.
|
|
7
|
-
*/
|
|
8
|
-
element: HTMLDivElement | null;
|
|
9
|
-
/**
|
|
10
|
-
* The progress status element.
|
|
11
|
-
*/
|
|
12
|
-
progressStatusElement: HTMLDivElement | null;
|
|
13
|
-
/**
|
|
14
|
-
* The progress status wrap element.
|
|
15
|
-
*/
|
|
16
|
-
progressStatusWrapElement: HTMLSpanElement | null;
|
|
17
|
-
/**
|
|
18
|
-
* Focus the ProgressBar.
|
|
19
|
-
*/
|
|
20
|
-
focus: () => void;
|
|
21
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BaseProps } from '../../common/BaseProps';
|
|
2
|
-
import { ProgressBarAnimation } from './ProgressBarAnimation';
|
|
3
|
-
/**
|
|
4
|
-
* Represents the props of the [Kendo UI for Vue ProgressBar component]({% slug overview_progressbar %}).
|
|
5
|
-
*/
|
|
6
|
-
export interface ProgressBarProps extends BaseProps {
|
|
7
|
-
/**
|
|
8
|
-
* Specifies the animation settings of the ProgressBar. Defaults to `false`.
|
|
9
|
-
* If boolean, enables or disables the default animation.
|
|
10
|
-
* Use ProgressBarAnimation to set slide animation with customizable duration option. Accepts a number in milliseconds.
|
|
11
|
-
*/
|
|
12
|
-
animation?: boolean | ProgressBarAnimation;
|
|
13
|
-
/**
|
|
14
|
-
* Overrides the default label ([see example]({% slug progressbar_label %})).
|
|
15
|
-
*/
|
|
16
|
-
label?: any;
|
|
17
|
-
/**
|
|
18
|
-
* Overrides the default label template ([see example]({% slug progressbar_label %})).
|
|
19
|
-
*/
|
|
20
|
-
labelRender?: any;
|
|
21
|
-
/**
|
|
22
|
-
* Sets the visibility of the progress status label. Defaults to `true`.
|
|
23
|
-
*/
|
|
24
|
-
labelVisible?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Sets the position of the progress status label. Defaults to `end` ([see example]({% slug progressbar_label %})).
|
|
27
|
-
*/
|
|
28
|
-
labelPlacement?: 'start' | 'center' | 'end' | any;
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import * as Vue from 'vue';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
type Vue2type = Vue.default;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
-
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
-
declare type DefaultMethods<V> = {
|
|
4
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
-
};
|
|
6
|
-
import { ChunkProgressBarProps } from './interfaces/ChunkProgressBarProps';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export interface ChunkProgressBarState {
|
|
11
|
-
v3: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export interface ChunkProgressBarComputed {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
export interface ChunkProgressBarMethods {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
export interface ChunkProgressBarData {
|
|
29
|
-
currentActive: boolean;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
export interface ChunkProgressBarAll extends Vue2type, ChunkProgressBarMethods, ChunkProgressBarData, ChunkProgressBarComputed, ChunkProgressBarState {
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
declare let ChunkProgressBarVue2: ComponentOptions<ChunkProgressBarAll, DefaultData<ChunkProgressBarData>, DefaultMethods<ChunkProgressBarAll>, ChunkProgressBarComputed, RecordPropsDefinition<ChunkProgressBarProps>>;
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
declare const ChunkProgressBar: DefineComponent<ChunkProgressBarProps, any, ChunkProgressBarData, ChunkProgressBarComputed, ChunkProgressBarMethods, {}, {}, {}, string, ChunkProgressBarProps, ChunkProgressBarProps, {}>;
|
|
44
|
-
export { ChunkProgressBar, ChunkProgressBarVue2 };
|