@progress/telerik-jquery-report-viewer 21.24.305 → 22.24.709

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/accessibility.js +208 -0
  3. package/dist/cjs/base-component.js +26 -0
  4. package/dist/cjs/binder.js +79 -0
  5. package/dist/cjs/command.js +32 -0
  6. package/dist/cjs/commandSet.js +167 -0
  7. package/dist/cjs/controller.js +1204 -0
  8. package/dist/cjs/documentMapArea.js +159 -0
  9. package/dist/cjs/domUtils.js +50 -0
  10. package/dist/cjs/enums.js +52 -0
  11. package/dist/cjs/event-emitter.js +131 -0
  12. package/dist/cjs/events.js +23 -0
  13. package/dist/cjs/globalSettings.js +9 -0
  14. package/dist/cjs/history.js +131 -0
  15. package/dist/cjs/index.js +58 -0
  16. package/dist/cjs/jqueryThrottleDebounce.js +48 -0
  17. package/dist/cjs/kendo-jquery.js +4 -0
  18. package/dist/cjs/mainMenu.js +323 -0
  19. package/dist/cjs/mem-storage.js +44 -0
  20. package/dist/cjs/pagesArea.js +622 -0
  21. package/dist/cjs/parameterValidators.js +164 -0
  22. package/dist/cjs/parameters.js +921 -0
  23. package/dist/cjs/parametersArea.js +486 -0
  24. package/dist/cjs/perspectives.js +138 -0
  25. package/dist/cjs/print.js +165 -0
  26. package/dist/cjs/report-viewer/report-viewer-settings.js +138 -0
  27. package/dist/cjs/reportViewer.js +665 -0
  28. package/dist/cjs/scroll.js +535 -0
  29. package/dist/cjs/search.js +584 -0
  30. package/dist/cjs/sendEmail.js +392 -0
  31. package/dist/cjs/service-client-sentinel.js +52 -0
  32. package/dist/cjs/serviceClient.js +311 -0
  33. package/dist/cjs/sideMenu.js +216 -0
  34. package/dist/cjs/sr.js +164 -0
  35. package/dist/cjs/stringResources.js +11 -0
  36. package/dist/cjs/telerikReportViewer.kendo.js +60196 -0
  37. package/dist/cjs/telerikReportViewer.kendo.min.js +19776 -0
  38. package/dist/cjs/template-cache.js +39 -0
  39. package/dist/cjs/toolbar/link-button.js +42 -0
  40. package/dist/cjs/toolbar/page-count-label.js +18 -0
  41. package/dist/cjs/toolbar/page-number-input.js +64 -0
  42. package/dist/cjs/touch.js +86 -0
  43. package/dist/cjs/uiController.js +142 -0
  44. package/dist/cjs/uiFreezeCoordinator.js +282 -0
  45. package/dist/cjs/utils.js +489 -0
  46. package/dist/es/accessibility.js +204 -0
  47. package/dist/es/base-component.js +22 -0
  48. package/dist/es/binder.js +75 -0
  49. package/dist/es/command.js +28 -0
  50. package/dist/es/commandSet.js +163 -0
  51. package/dist/es/controller.js +1200 -0
  52. package/dist/es/documentMapArea.js +155 -0
  53. package/dist/es/domUtils.js +43 -0
  54. package/dist/es/enums.js +41 -0
  55. package/dist/es/event-emitter.js +127 -0
  56. package/dist/es/events.js +19 -0
  57. package/dist/es/globalSettings.js +5 -0
  58. package/dist/es/history.js +127 -0
  59. package/dist/es/index.js +24 -0
  60. package/dist/es/jqueryThrottleDebounce.js +46 -0
  61. package/dist/es/kendo-jquery.js +1 -0
  62. package/dist/es/mainMenu.js +319 -0
  63. package/dist/es/mem-storage.js +40 -0
  64. package/dist/es/pagesArea.js +618 -0
  65. package/dist/es/parameterValidators.js +160 -0
  66. package/dist/es/parameters.js +916 -0
  67. package/dist/es/parametersArea.js +482 -0
  68. package/dist/es/perspectives.js +134 -0
  69. package/dist/es/print.js +161 -0
  70. package/dist/es/report-viewer/report-viewer-settings.js +134 -0
  71. package/dist/es/reportViewer.js +661 -0
  72. package/dist/es/scroll.js +531 -0
  73. package/dist/es/search.js +580 -0
  74. package/dist/es/sendEmail.js +388 -0
  75. package/dist/es/service-client-sentinel.js +48 -0
  76. package/dist/es/serviceClient.js +307 -0
  77. package/dist/es/sideMenu.js +212 -0
  78. package/dist/es/sr.js +162 -0
  79. package/dist/es/stringResources.js +7 -0
  80. package/dist/es/telerikReportViewer.kendo.js +60194 -0
  81. package/dist/es/telerikReportViewer.kendo.min.js +19774 -0
  82. package/dist/es/template-cache.js +35 -0
  83. package/dist/es/toolbar/link-button.js +38 -0
  84. package/dist/es/toolbar/page-count-label.js +14 -0
  85. package/dist/es/toolbar/page-number-input.js +60 -0
  86. package/dist/es/touch.js +82 -0
  87. package/dist/es/uiController.js +138 -0
  88. package/dist/es/uiFreezeCoordinator.js +278 -0
  89. package/dist/es/utils.js +444 -0
  90. package/dist/font/font-icons.css +4 -4
  91. package/dist/font/font-icons.min.css +3 -3
  92. package/dist/js/telerikReportViewer.js +8346 -8507
  93. package/dist/js/telerikReportViewer.min.js +1 -17
  94. package/dist/js/telerikReportViewer.stringResources.js +166 -173
  95. package/dist/styles/telerikReportViewer.css +3 -3
  96. package/dist/styles/telerikReportViewer.min.css +3 -3
  97. package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
  98. package/dist/templates/telerikReportViewerTemplate.html +6 -6
  99. package/package.json +14 -7
  100. /package/dist/font/{ReportingIcons-18.0.24.305.ttf → ReportingIcons-18.1.24.709.ttf} +0 -0
@@ -0,0 +1,160 @@
1
+ import { stringFormat, 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
+ }
16
+ throw stringResources.invalidParameter;
17
+ }
18
+ return values;
19
+ }
20
+ return values[0];
21
+ }
22
+ function isNull(parameter, value) {
23
+ return parameter.allowNull && -1 != [null, "", void 0].indexOf(value);
24
+ }
25
+ function checkAvailableValues(parameter, value, compareFunc) {
26
+ if (parameter.availableValues) {
27
+ var found = Array.from(parameter.availableValues).some(function(av) {
28
+ return compareFunc(value, av.value);
29
+ });
30
+ if (!found) {
31
+ if (parameter.allowNull && !value) {
32
+ return value;
33
+ }
34
+ throw stringResources.invalidParameter;
35
+ }
36
+ }
37
+ return value;
38
+ }
39
+ validators[ParameterTypes.STRING] = {
40
+ validate: function(parameter, value) {
41
+ return validateParameter(
42
+ parameter,
43
+ value,
44
+ function(value2) {
45
+ if (!value2) {
46
+ if (parameter.allowNull) {
47
+ return null;
48
+ }
49
+ if (parameter.allowBlank) {
50
+ return "";
51
+ }
52
+ throw stringResources.parameterIsEmpty;
53
+ }
54
+ return value2;
55
+ },
56
+ function(s1, s2) {
57
+ return s1 == s2;
58
+ }
59
+ );
60
+ }
61
+ };
62
+ validators[ParameterTypes.FLOAT] = {
63
+ validate: function(parameter, value) {
64
+ return validateParameter(
65
+ parameter,
66
+ value,
67
+ function(value2) {
68
+ var num = tryParseFloat(value2);
69
+ if (isNaN(num)) {
70
+ if (isNull(parameter, value2)) {
71
+ return null;
72
+ }
73
+ throw stringResources.parameterIsEmpty;
74
+ }
75
+ return num;
76
+ },
77
+ function(f1, f2) {
78
+ return tryParseFloat(f1) == tryParseFloat(f2);
79
+ }
80
+ );
81
+ }
82
+ };
83
+ validators[ParameterTypes.INTEGER] = {
84
+ validate: function(parameter, value) {
85
+ return validateParameter(
86
+ parameter,
87
+ value,
88
+ function(value2) {
89
+ var num = tryParseInt(value2);
90
+ if (isNaN(num)) {
91
+ if (isNull(parameter, value2)) {
92
+ return null;
93
+ }
94
+ throw stringResources.parameterIsEmpty;
95
+ }
96
+ return num;
97
+ },
98
+ function(n1, n2) {
99
+ return tryParseInt(n1) == tryParseFloat(n2);
100
+ }
101
+ );
102
+ }
103
+ };
104
+ validators[ParameterTypes.DATETIME] = {
105
+ validate: function(parameter, value) {
106
+ return validateParameter(
107
+ parameter,
108
+ value,
109
+ function(value2) {
110
+ if (parameter.allowNull && (value2 === null || value2 === "" || value2 === void 0)) {
111
+ return null;
112
+ }
113
+ if (!isNaN(Date.parse(value2))) {
114
+ if (parameter.availableValues) {
115
+ return value2;
116
+ }
117
+ return parseToLocalDate(value2);
118
+ }
119
+ throw stringResources.invalidDateTimeValue;
120
+ },
121
+ function(d1, d2) {
122
+ d1 = parseToLocalDate(d1);
123
+ d2 = parseToLocalDate(d2);
124
+ return d1.getTime() == d2.getTime();
125
+ }
126
+ );
127
+ }
128
+ };
129
+ validators[ParameterTypes.BOOLEAN] = {
130
+ validate: function(parameter, value) {
131
+ return validateParameter(
132
+ parameter,
133
+ value,
134
+ function(value2) {
135
+ if (-1 != ["true", "false"].indexOf(String(value2).toLowerCase())) {
136
+ return Boolean(value2);
137
+ }
138
+ if (isNull(parameter, value2)) {
139
+ return null;
140
+ }
141
+ throw stringResources.parameterIsEmpty;
142
+ },
143
+ function(b1, b2) {
144
+ return Boolean(b1) == Boolean(b2);
145
+ }
146
+ );
147
+ }
148
+ };
149
+ return {
150
+ validate: function(parameter, value) {
151
+ var v = validators[parameter.type];
152
+ if (!v) {
153
+ throw stringFormat(stringResources.cannotValidateType, parameter);
154
+ }
155
+ return v.validate(parameter, value);
156
+ }
157
+ };
158
+ }();
159
+
160
+ export { ParameterValidators };