@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,323 @@
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
+
8
+ var lastSelectedMenuItem;
9
+ var lastSelectedSubmenuItem;
10
+ function MainMenu(dom, rootOptions, otherOptions) {
11
+ var options = $.extend({}, rootOptions, otherOptions);
12
+ var menu = $(dom).data("kendoMenu");
13
+ var childrenL1 = dom.childNodes;
14
+ var controller = options.controller;
15
+ var enableAccessibility = options.enableAccessibility;
16
+ if (!controller) {
17
+ throw "No controller (telerikReporting.ReportViewerController) has been specified.";
18
+ }
19
+ if (!menu) {
20
+ init();
21
+ }
22
+ controller.reportLoadComplete(function(e, args) {
23
+ if (!enableAccessibility) {
24
+ if (menu && menu._oldHoverItem) {
25
+ menu._oldHoverItem.toggleClass("k-focus");
26
+ }
27
+ }
28
+ if (!args.renderingExtensions) {
29
+ controller.getDocumentFormats().then(fillFormats);
30
+ } else {
31
+ fillFormats(args.renderingExtensions);
32
+ }
33
+ });
34
+ function init() {
35
+ try {
36
+ menu = $(dom).kendoMenu().data("kendoMenu");
37
+ } catch (e) {
38
+ console.error("Instantiation of Kendo Menu as Main Menu threw an exception", e);
39
+ throw e;
40
+ }
41
+ menu.bind("activate", onSubmenuActivate);
42
+ menu.bind("deactivate", onSubmenuDeactivate);
43
+ menu.element.off("keydown", onMenuKeyDown);
44
+ menu.element.on("keydown", onMenuKeyDown);
45
+ if (options.enableAccessibility) {
46
+ setTabIndexes();
47
+ }
48
+ replaceStringResources();
49
+ }
50
+ function setTabIndexes() {
51
+ var $menus = $('[data-role="telerik_ReportViewer_MainMenu"]');
52
+ Array.from($menus).forEach((menu2) => {
53
+ var $menuArea = $(menu2);
54
+ var listItems = $menuArea.find("li");
55
+ var menuTabIndex = 0;
56
+ var tabIndexAttr = $menuArea.attr("tabIndex");
57
+ if (tabIndexAttr) {
58
+ menuTabIndex = utils.tryParseInt(tabIndexAttr);
59
+ if (!menuTabIndex || isNaN(menuTabIndex)) {
60
+ menuTabIndex = 0;
61
+ }
62
+ }
63
+ setMenuItemsTabIndexes(listItems, menuTabIndex);
64
+ var pager = listItems.find('input[data-role="telerik_ReportViewer_PageNumberInput"]');
65
+ if (pager.length > 0) {
66
+ pager.attr("tabindex", menuTabIndex);
67
+ }
68
+ });
69
+ }
70
+ function setMenuItemsTabIndexes(listItems, menuTabIndex) {
71
+ Array.from(listItems).forEach((item) => {
72
+ var $item = $(item);
73
+ $item.attr("tabindex", menuTabIndex);
74
+ $item.on("focus", (event) => {
75
+ $item.addClass("k-focus");
76
+ });
77
+ $item.on("blur", (event) => {
78
+ $item.removeClass("k-focus");
79
+ });
80
+ var anchor = $item.children("a");
81
+ if (anchor.length > 0) {
82
+ var $anchor = $(anchor);
83
+ $anchor.attr("tabindex", -1);
84
+ $item.attr("title", $anchor.attr("title"));
85
+ }
86
+ $item.off("keydown");
87
+ $item.on("keydown", function(event) {
88
+ if (event.which == kendo.keys.ENTER) {
89
+ clickOnMenuItem($item);
90
+ lastSelectedMenuItem = $item;
91
+ }
92
+ });
93
+ });
94
+ }
95
+ function fillFormats(formats) {
96
+ Array.from($(dom).find("ul[data-command-list=export-format-list]")).forEach((list) => {
97
+ var $list = $(list);
98
+ var $parent = $list.parents("li");
99
+ var tabIndex = enableAccessibility ? $parent.attr("tabindex") : -1;
100
+ if (!tabIndex) {
101
+ tabIndex = 1;
102
+ }
103
+ $list.empty();
104
+ Array.from(formats).forEach((format) => {
105
+ var ariaLabel = enableAccessibility ? utils.stringFormat('aria-label="{localizedName}" ', format) : " ";
106
+ var li = "<li " + ariaLabel + utils.stringFormat('tabindex="' + tabIndex + '"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>', format);
107
+ menu.append(li, $parent);
108
+ });
109
+ if (enableAccessibility) {
110
+ setInternalListAccessibilityKeyEvents($parent.find("li"));
111
+ }
112
+ });
113
+ }
114
+ function setInternalListAccessibilityKeyEvents(listItems) {
115
+ Array.from(listItems).forEach((item) => {
116
+ var $item = $(item);
117
+ $item.off("keydown");
118
+ $item.on("keydown", (event) => {
119
+ switch (event.which) {
120
+ case kendo.keys.ENTER:
121
+ clickOnMenuItem($item);
122
+ break;
123
+ case kendo.keys.UP:
124
+ var $prev = $item.prev();
125
+ if ($prev.length > 0) {
126
+ $prev.trigger("focus");
127
+ } else {
128
+ $item.parents("li").trigger("focus");
129
+ }
130
+ break;
131
+ case kendo.keys.DOWN:
132
+ var $next = $item.next();
133
+ if ($next.length > 0) {
134
+ $next.trigger("focus");
135
+ } else {
136
+ $item.parent().children("li").first().trigger("focus");
137
+ }
138
+ break;
139
+ }
140
+ });
141
+ });
142
+ }
143
+ function clickOnMenuItem(item) {
144
+ if (isItemExportContainer(item)) {
145
+ clickOnExportDropdown();
146
+ } else if (item && item.length > 0) {
147
+ var anchor = item.children("a");
148
+ if (anchor.length > 0) {
149
+ anchor.click();
150
+ }
151
+ }
152
+ }
153
+ function clickOnExportDropdown() {
154
+ var dropDownItemID = "#trv-main-menu-export-command";
155
+ var mainMenu = $("[data-role='telerik_ReportViewer_MainMenu']").data("kendoMenu");
156
+ mainMenu.open(dropDownItemID);
157
+ }
158
+ function onSubmenuActivate(e) {
159
+ var $item = $(e.item);
160
+ focusOnFirstSubmenuItem($item);
161
+ }
162
+ function onSubmenuDeactivate(e) {
163
+ lastSelectedSubmenuItem = void 0;
164
+ }
165
+ function focusOnFirstSubmenuItem(parentItem) {
166
+ if (lastSelectedMenuItem && lastSelectedMenuItem.is(parentItem)) {
167
+ window.setTimeout(function() {
168
+ var li = parentItem.find("li");
169
+ if (li.length > 0) {
170
+ li[0].focus();
171
+ }
172
+ }, 100);
173
+ }
174
+ }
175
+ function onMenuKeyDown(e) {
176
+ switch (e.which) {
177
+ case kendo.keys.ENTER:
178
+ if (!enableAccessibility) {
179
+ var $item = getFocusedItem();
180
+ if ($item.length > 0) {
181
+ if (isItemExportContainer($item) && lastSelectedSubmenuItem) {
182
+ $item = lastSelectedSubmenuItem;
183
+ }
184
+ clickOnMenuItem($item);
185
+ }
186
+ }
187
+ break;
188
+ case kendo.keys.RIGHT:
189
+ enableAccessibility ? focusNextItemAccessibilitySelection() : focusNextItemNativeMenuSelection();
190
+ break;
191
+ case kendo.keys.LEFT:
192
+ enableAccessibility ? focusPreviousItemAccessibilitySelection() : focusPreviousItemNativeMenuSelection();
193
+ break;
194
+ case kendo.keys.DOWN:
195
+ case kendo.keys.UP:
196
+ if (!enableAccessibility) {
197
+ lastSelectedSubmenuItem = getKendoFocusedNestedItem();
198
+ }
199
+ }
200
+ }
201
+ function getFocusedItem() {
202
+ var $item;
203
+ var focusedItem = document.activeElement;
204
+ if (focusedItem && focusedItem.localName == "li") {
205
+ var items = $(childrenL1).filter("li.k-item");
206
+ for (var i = 0; i < items.length; i++) {
207
+ var listItem = items[i];
208
+ if (focusedItem === listItem) {
209
+ $item = $(listItem);
210
+ break;
211
+ }
212
+ }
213
+ } else if (focusedItem && focusedItem.localName == "input") {
214
+ $item = $(focusedItem).closest("li.k-item");
215
+ } else {
216
+ $item = menu.element.children("li.k-item.k-focus");
217
+ if ($item.length === 0) {
218
+ $item = menu.element.children("li.k-item").first();
219
+ }
220
+ }
221
+ return $item;
222
+ }
223
+ function focusNextItemAccessibilitySelection() {
224
+ var $item = getFocusedItem();
225
+ if (!$item || !$item.length > 0) {
226
+ return;
227
+ }
228
+ var $next = $item.next();
229
+ if ($next.css("display") == "none") {
230
+ $next = $next.next();
231
+ }
232
+ if (!$next.length > 0) {
233
+ $next = $(childrenL1).filter("li.k-item").first();
234
+ }
235
+ $next.focus();
236
+ }
237
+ var lastKendoFocusedItem;
238
+ function focusNextItemNativeMenuSelection() {
239
+ var allItems = menu.element.children("li.k-item");
240
+ var $focused = allItems.filter(".k-focus");
241
+ if (kendo.version >= "2017.3.913") {
242
+ lastKendoFocusedItem = $focused;
243
+ return;
244
+ }
245
+ if ($focused.hasClass("k-disabled")) {
246
+ if (!lastKendoFocusedItem || $focused.is(lastKendoFocusedItem)) {
247
+ var $next = $focused.next();
248
+ if (!$next.length > 0) {
249
+ $next = allItems.first();
250
+ }
251
+ $focused.toggleClass("k-focus");
252
+ $next.toggleClass("k-focus");
253
+ lastKendoFocusedItem = $next;
254
+ menu._oldHoverItem = $next;
255
+ } else {
256
+ lastKendoFocusedItem = $focused;
257
+ }
258
+ } else {
259
+ menu._oldHoverItem = $focused;
260
+ lastKendoFocusedItem = $focused;
261
+ }
262
+ }
263
+ function focusPreviousItemAccessibilitySelection() {
264
+ var $item = getFocusedItem();
265
+ if (!$item || !$item.length > 0) {
266
+ return;
267
+ }
268
+ var $prev = $item.prev();
269
+ if ($prev.css("display") == "none") {
270
+ $prev = $prev.prev();
271
+ }
272
+ if (!$prev.length > 0) {
273
+ $prev = $(childrenL1).filter("li.k-item").last();
274
+ }
275
+ $prev.focus();
276
+ }
277
+ function focusPreviousItemNativeMenuSelection() {
278
+ var $focused = menu.element.children("li.k-item.k-focus");
279
+ lastKendoFocusedItem = $focused;
280
+ }
281
+ function getKendoFocusedNestedItem() {
282
+ var $focused = menu.element.find('li.k-item.k-focus [data-command="telerik_ReportViewer_export"]');
283
+ if ($focused.length === 1) {
284
+ return $focused.parent("li");
285
+ }
286
+ return void 0;
287
+ }
288
+ function isItemExportContainer(item) {
289
+ if (item.length === 0) {
290
+ return;
291
+ }
292
+ var id = item.attr("id");
293
+ return id == "trv-main-menu-export-command" || id == "trv-side-menu-export-command";
294
+ }
295
+ function replaceStringResources() {
296
+ var menuAreas = findMenuArea();
297
+ if (!menuAreas) {
298
+ return;
299
+ }
300
+ Array.from(menuAreas).forEach((menu2) => {
301
+ var $menu = $(menu2);
302
+ var menuItems = $menu.children("li.k-item");
303
+ $menu.attr("aria-label", stringResources.stringResources[$menu.attr("aria-label")]);
304
+ Array.from(menuItems).forEach((menuItem) => {
305
+ var $menuItem = $(menuItem);
306
+ $menuItem.attr("aria-label", stringResources.stringResources[$menuItem.attr("aria-label")]);
307
+ if (!$menuItem.hasClass("trv-report-pager")) {
308
+ var $a = $menuItem.find("a");
309
+ if ($a) {
310
+ $a.attr("title", stringResources.stringResources[$a.attr("title")]);
311
+ }
312
+ } else {
313
+ $menuItem.attr("title", stringResources.stringResources[$menuItem.attr("title")]);
314
+ }
315
+ });
316
+ });
317
+ }
318
+ function findMenuArea() {
319
+ return $("ul[data-role=telerik_ReportViewer_MainMenu]");
320
+ }
321
+ }
322
+
323
+ exports.MainMenu = MainMenu;
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => {
8
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9
+ return value;
10
+ };
11
+ class MemStorage {
12
+ // #endregion
13
+ // #region constructor
14
+ constructor() {
15
+ // #region fields
16
+ __publicField(this, "_data", {});
17
+ this._data = {};
18
+ }
19
+ // #endregion
20
+ // #region properties
21
+ get length() {
22
+ return Object.keys(this._data).length;
23
+ }
24
+ // #endregion
25
+ // #region methods
26
+ getItem(key) {
27
+ return this._data[key] || null;
28
+ }
29
+ setItem(key, value) {
30
+ this._data[key] = value;
31
+ }
32
+ removeItem(key) {
33
+ delete this._data[key];
34
+ }
35
+ key(index) {
36
+ return Object.keys(this._data)[index] || null;
37
+ }
38
+ clear() {
39
+ this._data = {};
40
+ }
41
+ // #endregion
42
+ }
43
+
44
+ exports.MemStorage = MemStorage;