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