@progress/telerik-jquery-report-viewer 21.24.305 → 22.24.514
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/cjs/accessibility.js +218 -0
- package/dist/cjs/binder.js +172 -0
- package/dist/cjs/command.js +32 -0
- package/dist/cjs/commandSet.js +167 -0
- package/dist/cjs/controller.js +1207 -0
- package/dist/cjs/documentMapArea.js +168 -0
- package/dist/cjs/domUtils.js +50 -0
- package/dist/cjs/enums.js +52 -0
- package/dist/cjs/event-emitter.js +17 -0
- package/dist/cjs/events.js +23 -0
- package/dist/cjs/globalSettings.js +9 -0
- package/dist/cjs/history.js +131 -0
- package/dist/cjs/index.js +58 -0
- package/dist/cjs/jqueryThrottleDebounce.js +48 -0
- package/dist/cjs/kendo-jquery.js +4 -0
- package/dist/cjs/mainMenu.js +332 -0
- package/dist/cjs/mem-storage.js +44 -0
- package/dist/cjs/pagesArea.js +641 -0
- package/dist/cjs/parameterValidators.js +167 -0
- package/dist/cjs/parameters.js +921 -0
- package/dist/cjs/parametersArea.js +502 -0
- package/dist/cjs/perspectives.js +138 -0
- package/dist/cjs/print.js +166 -0
- package/dist/cjs/report-viewer/report-viewer-settings.js +138 -0
- package/dist/cjs/reportViewer.js +654 -0
- package/dist/cjs/scroll.js +537 -0
- package/dist/cjs/search.js +634 -0
- package/dist/cjs/sendEmail.js +435 -0
- package/dist/cjs/service-client-sentinel.js +52 -0
- package/dist/cjs/serviceClient.js +405 -0
- package/dist/cjs/sideMenu.js +225 -0
- package/dist/cjs/sr.js +164 -0
- package/dist/cjs/stringResources.js +11 -0
- package/dist/cjs/telerikReportViewer.kendo.js +60196 -0
- package/dist/cjs/telerikReportViewer.kendo.min.js +19776 -0
- package/dist/cjs/template-cache.js +39 -0
- package/dist/cjs/touch.js +86 -0
- package/dist/cjs/uiController.js +142 -0
- package/dist/cjs/uiFreezeCoordinator.js +281 -0
- package/dist/cjs/utils.js +492 -0
- package/dist/es/accessibility.js +214 -0
- package/dist/es/binder.js +168 -0
- package/dist/es/command.js +28 -0
- package/dist/es/commandSet.js +163 -0
- package/dist/es/controller.js +1203 -0
- package/dist/es/documentMapArea.js +164 -0
- package/dist/es/domUtils.js +43 -0
- package/dist/es/enums.js +41 -0
- package/dist/es/event-emitter.js +13 -0
- package/dist/es/events.js +19 -0
- package/dist/es/globalSettings.js +5 -0
- package/dist/es/history.js +127 -0
- package/dist/es/index.js +24 -0
- package/dist/es/jqueryThrottleDebounce.js +46 -0
- package/dist/es/kendo-jquery.js +1 -0
- package/dist/es/mainMenu.js +328 -0
- package/dist/es/mem-storage.js +40 -0
- package/dist/es/pagesArea.js +637 -0
- package/dist/es/parameterValidators.js +163 -0
- package/dist/es/parameters.js +916 -0
- package/dist/es/parametersArea.js +498 -0
- package/dist/es/perspectives.js +134 -0
- package/dist/es/print.js +162 -0
- package/dist/es/report-viewer/report-viewer-settings.js +134 -0
- package/dist/es/reportViewer.js +650 -0
- package/dist/es/scroll.js +533 -0
- package/dist/es/search.js +630 -0
- package/dist/es/sendEmail.js +431 -0
- package/dist/es/service-client-sentinel.js +48 -0
- package/dist/es/serviceClient.js +401 -0
- package/dist/es/sideMenu.js +221 -0
- package/dist/es/sr.js +162 -0
- package/dist/es/stringResources.js +7 -0
- package/dist/es/telerikReportViewer.kendo.js +60194 -0
- package/dist/es/telerikReportViewer.kendo.min.js +19774 -0
- package/dist/es/template-cache.js +35 -0
- package/dist/es/touch.js +82 -0
- package/dist/es/uiController.js +138 -0
- package/dist/es/uiFreezeCoordinator.js +277 -0
- package/dist/es/utils.js +447 -0
- package/dist/font/font-icons.css +4 -4
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +8562 -8606
- package/dist/js/telerikReportViewer.min.js +1 -17
- package/dist/js/telerikReportViewer.stringResources.js +166 -173
- package/dist/styles/telerikReportViewer.css +1 -1
- package/dist/styles/telerikReportViewer.min.css +1 -1
- package/dist/templates/telerikReportViewerTemplate-FA.html +3 -3
- package/dist/templates/telerikReportViewerTemplate.html +3 -3
- package/package.json +13 -7
- /package/dist/font/{ReportingIcons-18.0.24.305.ttf → ReportingIcons-18.1.24.514.ttf} +0 -0
@@ -0,0 +1,167 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var utils = require('./utils.js');
|
6
|
+
var stringResources = require('./stringResources.js');
|
7
|
+
var enums = require('./enums.js');
|
8
|
+
|
9
|
+
var ParameterValidators = function() {
|
10
|
+
var validators = {};
|
11
|
+
function validateParameter(parameter, value, validatorFunc, compareFunc) {
|
12
|
+
var values = [].concat(value).map(function(value1) {
|
13
|
+
return checkAvailableValues(parameter, validatorFunc(value1), compareFunc);
|
14
|
+
});
|
15
|
+
if (parameter.multivalue) {
|
16
|
+
if (value == null || value.length == 0) {
|
17
|
+
if (parameter.allowNull) {
|
18
|
+
return value;
|
19
|
+
} else {
|
20
|
+
throw stringResources.stringResources.invalidParameter;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return values;
|
24
|
+
}
|
25
|
+
return values[0];
|
26
|
+
}
|
27
|
+
function isNull(parameter, value) {
|
28
|
+
return parameter.allowNull && -1 != [null, "", void 0].indexOf(value);
|
29
|
+
}
|
30
|
+
function checkAvailableValues(parameter, value, compareFunc) {
|
31
|
+
if (parameter.availableValues) {
|
32
|
+
var found = false;
|
33
|
+
utils.each(parameter.availableValues, function(i, av) {
|
34
|
+
found = compareFunc(value, av.value);
|
35
|
+
return !found;
|
36
|
+
});
|
37
|
+
if (!found) {
|
38
|
+
if (parameter.allowNull && !value) {
|
39
|
+
return value;
|
40
|
+
}
|
41
|
+
throw stringResources.stringResources.invalidParameter;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
return value;
|
45
|
+
}
|
46
|
+
validators[enums.ParameterTypes.STRING] = {
|
47
|
+
validate: function(parameter, value) {
|
48
|
+
return validateParameter(
|
49
|
+
parameter,
|
50
|
+
value,
|
51
|
+
function(value2) {
|
52
|
+
if (!value2) {
|
53
|
+
if (parameter.allowNull) {
|
54
|
+
return null;
|
55
|
+
}
|
56
|
+
if (parameter.allowBlank) {
|
57
|
+
return "";
|
58
|
+
}
|
59
|
+
throw stringResources.stringResources.parameterIsEmpty;
|
60
|
+
}
|
61
|
+
return value2;
|
62
|
+
},
|
63
|
+
function(s1, s2) {
|
64
|
+
return s1 == s2;
|
65
|
+
}
|
66
|
+
);
|
67
|
+
}
|
68
|
+
};
|
69
|
+
validators[enums.ParameterTypes.FLOAT] = {
|
70
|
+
validate: function(parameter, value) {
|
71
|
+
return validateParameter(
|
72
|
+
parameter,
|
73
|
+
value,
|
74
|
+
function(value2) {
|
75
|
+
var num = utils.tryParseFloat(value2);
|
76
|
+
if (isNaN(num)) {
|
77
|
+
if (isNull(parameter, value2)) {
|
78
|
+
return null;
|
79
|
+
}
|
80
|
+
throw stringResources.stringResources.parameterIsEmpty;
|
81
|
+
}
|
82
|
+
return num;
|
83
|
+
},
|
84
|
+
function(f1, f2) {
|
85
|
+
return utils.tryParseFloat(f1) == utils.tryParseFloat(f2);
|
86
|
+
}
|
87
|
+
);
|
88
|
+
}
|
89
|
+
};
|
90
|
+
validators[enums.ParameterTypes.INTEGER] = {
|
91
|
+
validate: function(parameter, value) {
|
92
|
+
return validateParameter(
|
93
|
+
parameter,
|
94
|
+
value,
|
95
|
+
function(value2) {
|
96
|
+
var num = utils.tryParseInt(value2);
|
97
|
+
if (isNaN(num)) {
|
98
|
+
if (isNull(parameter, value2)) {
|
99
|
+
return null;
|
100
|
+
}
|
101
|
+
throw stringResources.stringResources.parameterIsEmpty;
|
102
|
+
}
|
103
|
+
return num;
|
104
|
+
},
|
105
|
+
function(n1, n2) {
|
106
|
+
return utils.tryParseInt(n1) == utils.tryParseFloat(n2);
|
107
|
+
}
|
108
|
+
);
|
109
|
+
}
|
110
|
+
};
|
111
|
+
validators[enums.ParameterTypes.DATETIME] = {
|
112
|
+
validate: function(parameter, value) {
|
113
|
+
return validateParameter(
|
114
|
+
parameter,
|
115
|
+
value,
|
116
|
+
function(value2) {
|
117
|
+
if (parameter.allowNull && (value2 === null || value2 === "" || value2 === void 0)) {
|
118
|
+
return null;
|
119
|
+
}
|
120
|
+
if (!isNaN(Date.parse(value2))) {
|
121
|
+
if (parameter.availableValues) {
|
122
|
+
return value2;
|
123
|
+
}
|
124
|
+
return utils.parseToLocalDate(value2);
|
125
|
+
}
|
126
|
+
throw stringResources.stringResources.invalidDateTimeValue;
|
127
|
+
},
|
128
|
+
function(d1, d2) {
|
129
|
+
d1 = utils.parseToLocalDate(d1);
|
130
|
+
d2 = utils.parseToLocalDate(d2);
|
131
|
+
return d1.getTime() == d2.getTime();
|
132
|
+
}
|
133
|
+
);
|
134
|
+
}
|
135
|
+
};
|
136
|
+
validators[enums.ParameterTypes.BOOLEAN] = {
|
137
|
+
validate: function(parameter, value) {
|
138
|
+
return validateParameter(
|
139
|
+
parameter,
|
140
|
+
value,
|
141
|
+
function(value2) {
|
142
|
+
if (-1 != ["true", "false"].indexOf(("" + value2).toLowerCase())) {
|
143
|
+
return Boolean(value2);
|
144
|
+
}
|
145
|
+
if (isNull(parameter, value2)) {
|
146
|
+
return null;
|
147
|
+
}
|
148
|
+
throw stringResources.stringResources.parameterIsEmpty;
|
149
|
+
},
|
150
|
+
function(b1, b2) {
|
151
|
+
return Boolean(b1) == Boolean(b2);
|
152
|
+
}
|
153
|
+
);
|
154
|
+
}
|
155
|
+
};
|
156
|
+
return {
|
157
|
+
validate: function(parameter, value) {
|
158
|
+
var v = validators[parameter.type];
|
159
|
+
if (!v) {
|
160
|
+
throw utils.stringFormat(stringResources.stringResources.cannotValidateType, parameter);
|
161
|
+
}
|
162
|
+
return v.validate(parameter, value);
|
163
|
+
}
|
164
|
+
};
|
165
|
+
}();
|
166
|
+
|
167
|
+
exports.ParameterValidators = ParameterValidators;
|