@progress/kendo-vue-inputs 4.3.4-dev.202405030811 → 4.4.0-dev.202405091413
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/dist/cdn/js/kendo-vue-inputs.js +1 -1
- package/dist/es/main.d.ts +1 -0
- package/dist/es/main.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rating/Rating.d.ts +61 -0
- package/dist/es/rating/Rating.js +400 -0
- package/dist/es/rating/RatingItem.d.ts +46 -0
- package/dist/es/rating/RatingItem.js +272 -0
- package/dist/es/rating/interfaces/RatingEvents.d.ts +47 -0
- package/dist/es/rating/interfaces/RatingEvents.js +1 -0
- package/dist/es/rating/interfaces/RatingItemProps.d.ts +92 -0
- package/dist/es/rating/interfaces/RatingItemProps.js +1 -0
- package/dist/es/rating/interfaces/RatingProps.d.ts +116 -0
- package/dist/es/rating/interfaces/RatingProps.js +1 -0
- package/dist/es/rating/utils/index.d.ts +24 -0
- package/dist/es/rating/utils/index.js +60 -0
- package/dist/es/rating/utils/rating-reducer.d.ts +32 -0
- package/dist/es/rating/utils/rating-reducer.js +63 -0
- package/dist/esm/main.d.ts +1 -0
- package/dist/esm/main.js +1 -0
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/rating/Rating.d.ts +61 -0
- package/dist/esm/rating/Rating.js +400 -0
- package/dist/esm/rating/RatingItem.d.ts +46 -0
- package/dist/esm/rating/RatingItem.js +272 -0
- package/dist/esm/rating/interfaces/RatingEvents.d.ts +47 -0
- package/dist/esm/rating/interfaces/RatingEvents.js +1 -0
- package/dist/esm/rating/interfaces/RatingItemProps.d.ts +92 -0
- package/dist/esm/rating/interfaces/RatingItemProps.js +1 -0
- package/dist/esm/rating/interfaces/RatingProps.d.ts +116 -0
- package/dist/esm/rating/interfaces/RatingProps.js +1 -0
- package/dist/esm/rating/utils/index.d.ts +24 -0
- package/dist/esm/rating/utils/index.js +60 -0
- package/dist/esm/rating/utils/rating-reducer.d.ts +32 -0
- package/dist/esm/rating/utils/rating-reducer.js +63 -0
- package/dist/npm/main.d.ts +1 -0
- package/dist/npm/main.js +1 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rating/Rating.d.ts +61 -0
- package/dist/npm/rating/Rating.js +407 -0
- package/dist/npm/rating/RatingItem.d.ts +46 -0
- package/dist/npm/rating/RatingItem.js +279 -0
- package/dist/npm/rating/interfaces/RatingEvents.d.ts +47 -0
- package/dist/npm/rating/interfaces/RatingEvents.js +2 -0
- package/dist/npm/rating/interfaces/RatingItemProps.d.ts +92 -0
- package/dist/npm/rating/interfaces/RatingItemProps.js +2 -0
- package/dist/npm/rating/interfaces/RatingProps.d.ts +116 -0
- package/dist/npm/rating/interfaces/RatingProps.js +2 -0
- package/dist/npm/rating/utils/index.d.ts +24 -0
- package/dist/npm/rating/utils/index.js +72 -0
- package/dist/npm/rating/utils/rating-reducer.d.ts +32 -0
- package/dist/npm/rating/utils/rating-reducer.js +67 -0
- package/package.json +13 -13
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ratingReducer = exports.RATING_ACTION = void 0;
|
|
4
|
+
var index_1 = require("./index");
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
var RATING_ACTION;
|
|
9
|
+
(function (RATING_ACTION) {
|
|
10
|
+
RATING_ACTION["select"] = "select";
|
|
11
|
+
RATING_ACTION["deselect"] = "deselect";
|
|
12
|
+
RATING_ACTION["increase"] = "increase";
|
|
13
|
+
RATING_ACTION["decrease"] = "decrease";
|
|
14
|
+
RATING_ACTION["min"] = "min";
|
|
15
|
+
RATING_ACTION["max"] = "max";
|
|
16
|
+
RATING_ACTION["reset"] = "reset";
|
|
17
|
+
})(RATING_ACTION = exports.RATING_ACTION || (exports.RATING_ACTION = {}));
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
var ratingReducer = function (state, action) {
|
|
22
|
+
switch (action.type) {
|
|
23
|
+
case RATING_ACTION.select:
|
|
24
|
+
if (action.payload === undefined || action.step === undefined) {
|
|
25
|
+
return state;
|
|
26
|
+
}
|
|
27
|
+
if (action.payload === state) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return action.payload >= action.min
|
|
31
|
+
? action.payload < action.max
|
|
32
|
+
? (0, index_1.toRound)(action.payload, action.step)
|
|
33
|
+
: action.max
|
|
34
|
+
: action.min;
|
|
35
|
+
case RATING_ACTION.deselect:
|
|
36
|
+
return null;
|
|
37
|
+
case RATING_ACTION.increase:
|
|
38
|
+
if (action.step === undefined) {
|
|
39
|
+
return state;
|
|
40
|
+
}
|
|
41
|
+
if (state < action.min) {
|
|
42
|
+
return action.min;
|
|
43
|
+
}
|
|
44
|
+
return state + action.step < action.max
|
|
45
|
+
? (0, index_1.toRound)(state + action.step, action.step)
|
|
46
|
+
: action.max;
|
|
47
|
+
case RATING_ACTION.decrease:
|
|
48
|
+
if (action.step === undefined) {
|
|
49
|
+
return state;
|
|
50
|
+
}
|
|
51
|
+
return (0, index_1.toRound)(state - action.step, action.step) >= action.min
|
|
52
|
+
? (0, index_1.toRound)(state - action.step, action.step)
|
|
53
|
+
: action.min;
|
|
54
|
+
case RATING_ACTION.min:
|
|
55
|
+
if (action.step === undefined) {
|
|
56
|
+
return state;
|
|
57
|
+
}
|
|
58
|
+
return action.min;
|
|
59
|
+
case RATING_ACTION.max:
|
|
60
|
+
return action.max;
|
|
61
|
+
case RATING_ACTION.reset:
|
|
62
|
+
return null;
|
|
63
|
+
default:
|
|
64
|
+
return state;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.ratingReducer = ratingReducer;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-inputs",
|
|
3
3
|
"description": "Kendo UI for Vue Input package",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.4.0-dev.202405091413",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@progress/kendo-inputs-common": "^3.1.0",
|
|
50
|
-
"@progress/kendo-vue-buttons": "4.
|
|
51
|
-
"@progress/kendo-vue-common": "4.
|
|
52
|
-
"@progress/kendo-vue-dialogs": "4.
|
|
53
|
-
"@progress/kendo-vue-labels": "4.
|
|
54
|
-
"@progress/kendo-vue-popup": "4.
|
|
50
|
+
"@progress/kendo-vue-buttons": "4.4.0-dev.202405091413",
|
|
51
|
+
"@progress/kendo-vue-common": "4.4.0-dev.202405091413",
|
|
52
|
+
"@progress/kendo-vue-dialogs": "4.4.0-dev.202405091413",
|
|
53
|
+
"@progress/kendo-vue-labels": "4.4.0-dev.202405091413",
|
|
54
|
+
"@progress/kendo-vue-popup": "4.4.0-dev.202405091413"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@progress/kendo-data-query": "^1.5.5",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"@progress/kendo-file-saver": "^1.1.1",
|
|
61
61
|
"@progress/kendo-licensing": "^1.3.0",
|
|
62
62
|
"@progress/kendo-svg-icons": "^2.0.0",
|
|
63
|
-
"@progress/kendo-vue-buttons": "4.
|
|
64
|
-
"@progress/kendo-vue-dropdowns": "4.
|
|
65
|
-
"@progress/kendo-vue-form": "4.
|
|
66
|
-
"@progress/kendo-vue-intl": "4.
|
|
67
|
-
"@progress/kendo-vue-labels": "4.
|
|
68
|
-
"@progress/kendo-vue-tooltip": "4.
|
|
69
|
-
"@progress/kendo-vue-upload": "4.
|
|
63
|
+
"@progress/kendo-vue-buttons": "4.4.0-dev.202405091413",
|
|
64
|
+
"@progress/kendo-vue-dropdowns": "4.4.0-dev.202405091413",
|
|
65
|
+
"@progress/kendo-vue-form": "4.4.0-dev.202405091413",
|
|
66
|
+
"@progress/kendo-vue-intl": "4.4.0-dev.202405091413",
|
|
67
|
+
"@progress/kendo-vue-labels": "4.4.0-dev.202405091413",
|
|
68
|
+
"@progress/kendo-vue-tooltip": "4.4.0-dev.202405091413",
|
|
69
|
+
"@progress/kendo-vue-upload": "4.4.0-dev.202405091413",
|
|
70
70
|
"cldr-core": "^41.0.0",
|
|
71
71
|
"cldr-dates-full": "^41.0.0",
|
|
72
72
|
"cldr-numbers-full": "^41.0.0"
|