@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,159 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var stringResources = require('./stringResources.js');
6
+ var enums = require('./enums.js');
7
+ var globalSettings = require('./globalSettings.js');
8
+
9
+ var defaultOptions = {};
10
+ function DocumentMapArea(placeholder, options, otherOptions) {
11
+ options = $.extend({}, defaultOptions, options, otherOptions);
12
+ var controller = options.controller;
13
+ if (!controller) {
14
+ throw "No controller (telerikReporting.reportViewerController) has been specified.";
15
+ }
16
+ var $placeholder = $(placeholder);
17
+ var $documentMap;
18
+ var documentMapVisible = options.documentMapVisible !== false;
19
+ var enableAccessibility = options.enableAccessibility;
20
+ var currentReport = null;
21
+ var documentMapNecessary = false;
22
+ init();
23
+ function init() {
24
+ $documentMap = $('<div id="' + options.viewerSelector + '-documentMap"></div>');
25
+ $documentMap.appendTo(placeholder);
26
+ attach();
27
+ replaceStringResources($placeholder);
28
+ }
29
+ function onTreeViewSelectionChanged(e) {
30
+ var documentMapNode = this.dataItem(e.node);
31
+ var page = documentMapNode.page;
32
+ var id = documentMapNode.id;
33
+ controller.navigateToPage(page, {
34
+ type: "bookmark",
35
+ id
36
+ });
37
+ }
38
+ function onTreeViewNodeExpand(e) {
39
+ if (enableAccessibility) {
40
+ window.setTimeout(function() {
41
+ setNodeAccessibilityAttributes(e.node);
42
+ }, 100);
43
+ }
44
+ }
45
+ function setNodeAccessibilityAttributes(node) {
46
+ var $items = $(node).find("li");
47
+ Array.from($items).forEach((item) => {
48
+ var $li = $(item);
49
+ $li.attr("aria-label", $li[0].innerText);
50
+ });
51
+ }
52
+ function clearDocumentMap() {
53
+ displayDocumentMap([]);
54
+ }
55
+ function displayDocumentMap(documentMap) {
56
+ var hasDocumentMap = documentMap && !$.isEmptyObject(documentMap);
57
+ var $treeView = $documentMap.data("kendoTreeView");
58
+ if (!$treeView) {
59
+ try {
60
+ $documentMap.kendoTreeView({
61
+ dataTextField: "text",
62
+ select: onTreeViewSelectionChanged
63
+ });
64
+ $treeView = $documentMap.data("kendoTreeView");
65
+ } catch (e) {
66
+ console.error("Instantiation of Kendo TreeView as Document Map threw an exception", e);
67
+ throw e;
68
+ }
69
+ }
70
+ $treeView.setDataSource(documentMap);
71
+ if (enableAccessibility) {
72
+ setAccessibilityAttributes($treeView);
73
+ }
74
+ showDocumentMap(hasDocumentMap);
75
+ }
76
+ function setAccessibilityAttributes(treeView) {
77
+ treeView.bind("expand", onTreeViewNodeExpand);
78
+ treeView.element.attr("aria-label", stringResources.stringResources.ariaLabelDocumentMap);
79
+ var listItems = treeView.element.find("ul");
80
+ Array.from(listItems).forEach((list) => {
81
+ setNodeAccessibilityAttributes(list);
82
+ });
83
+ if (documentMapNecessary) {
84
+ setSplitbarAccessibilityAttributes();
85
+ }
86
+ }
87
+ function setSplitbarAccessibilityAttributes() {
88
+ var splitbar = $placeholder.next();
89
+ if (options.documentMapAreaPosition === enums.DocumentMapAreaPositions.RIGHT) {
90
+ splitbar = $placeholder.prev();
91
+ }
92
+ splitbar.attr("aria-label", stringResources.stringResources.ariaLabelDocumentMapSplitter);
93
+ }
94
+ function isVisible() {
95
+ var args = {};
96
+ controller.getDocumentMapState(args);
97
+ return args.visible;
98
+ }
99
+ function beginLoad() {
100
+ $placeholder.addClass("trv-loading");
101
+ }
102
+ function endLoad() {
103
+ $placeholder.removeClass("trv-loading");
104
+ }
105
+ function showDocumentMap(show) {
106
+ var splitter = globalSettings.GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance;
107
+ var sibling = $placeholder.next();
108
+ if (options.documentMapAreaPosition === enums.DocumentMapAreaPositions.RIGHT) {
109
+ sibling = $placeholder.prev();
110
+ }
111
+ if (splitter) {
112
+ (documentMapNecessary ? $.fn.removeClass : $.fn.addClass).call(sibling, "trv-hidden");
113
+ splitter.toggle(".trv-document-map", show);
114
+ }
115
+ }
116
+ function attach() {
117
+ controller.beginLoadReport(function() {
118
+ beginLoad();
119
+ var r = controller.getReportSource().report;
120
+ var clearMapItems = currentReport !== r || !isVisible();
121
+ currentReport = r;
122
+ if (clearMapItems) {
123
+ clearDocumentMap();
124
+ }
125
+ }).reportLoadComplete(function(event, args) {
126
+ if (args.documentMapAvailable) {
127
+ documentMapNecessary = true;
128
+ displayDocumentMap(args.documentMapNodes);
129
+ controller.setDocumentMapVisible({ enabled: true, visible: documentMapVisible });
130
+ } else {
131
+ documentMapNecessary = false;
132
+ showDocumentMap(documentMapNecessary);
133
+ }
134
+ endLoad();
135
+ }).error(function(event, error) {
136
+ endLoad();
137
+ clearDocumentMap();
138
+ }).renderingStopped(function() {
139
+ documentMapNecessary = false;
140
+ showDocumentMap(false);
141
+ });
142
+ controller.setDocumentMapVisible(function(event, args) {
143
+ documentMapVisible = args.visible;
144
+ showDocumentMap(documentMapVisible && documentMapNecessary);
145
+ }).getDocumentMapState(function(event, args) {
146
+ args.enabled = documentMapNecessary;
147
+ args.visible = documentMapVisible;
148
+ });
149
+ }
150
+ function replaceStringResources($documentMap2) {
151
+ var $documentMapOverlay = $documentMap2.find(".trv-document-map-overlay");
152
+ if (!$documentMapOverlay) {
153
+ return;
154
+ }
155
+ $documentMapOverlay.attr("aria-label", stringResources.stringResources[$documentMapOverlay.attr("aria-label")]);
156
+ }
157
+ }
158
+
159
+ exports.DocumentMapArea = DocumentMapArea;
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils = require('./utils.js');
6
+
7
+ function toPixels(value) {
8
+ return parseInt(value, 10) || 0;
9
+ }
10
+ function getMargins(dom) {
11
+ var $target = $(dom);
12
+ return {
13
+ left: toPixels($target.css("marginLeft")),
14
+ right: toPixels($target.css("marginRight")),
15
+ top: toPixels($target.css("marginTop")),
16
+ bottom: toPixels($target.css("marginBottom"))
17
+ };
18
+ }
19
+ function getPadding(dom) {
20
+ var $target = $(dom);
21
+ return {
22
+ left: toPixels($target.css("paddingLeft")),
23
+ right: toPixels($target.css("paddingRight")),
24
+ top: toPixels($target.css("paddingTop")),
25
+ bottom: toPixels($target.css("paddingBottom"))
26
+ };
27
+ }
28
+ function getBorderWidth(dom) {
29
+ var $target = $(dom);
30
+ return {
31
+ left: toPixels($target.css("borderLeftWidth")),
32
+ right: toPixels($target.css("borderRightWidth")),
33
+ top: toPixels($target.css("borderTopWidth")),
34
+ bottom: toPixels($target.css("borderBottomWidth"))
35
+ };
36
+ }
37
+ function scale(dom, scaleX, scaleY, originX, originY) {
38
+ scaleX = scaleX || 1;
39
+ scaleY = scaleY || 1;
40
+ originX = originX || 0;
41
+ originY = originY || 0;
42
+ var scale2 = utils.stringFormat("scale({0}, {1})", [scaleX, scaleY]);
43
+ var origin = utils.stringFormat("{0} {1}", [originX, originY]);
44
+ $(dom).css("transform", scale2).css("transform-origin", origin);
45
+ }
46
+
47
+ exports.getBorderWidth = getBorderWidth;
48
+ exports.getMargins = getMargins;
49
+ exports.getPadding = getPadding;
50
+ exports.scale = scale;
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const ViewModes = {
6
+ INTERACTIVE: "INTERACTIVE",
7
+ PRINT_PREVIEW: "PRINT_PREVIEW"
8
+ };
9
+ const PrintModes = {
10
+ AUTO_SELECT: "AUTO_SELECT",
11
+ FORCE_PDF_PLUGIN: "FORCE_PDF_PLUGIN",
12
+ FORCE_PDF_FILE: "FORCE_PDF_FILE"
13
+ };
14
+ const PageModes = {
15
+ SINGLE_PAGE: "SINGLE_PAGE",
16
+ CONTINUOUS_SCROLL: "CONTINUOUS_SCROLL"
17
+ };
18
+ const ScaleModes = {
19
+ FIT_PAGE_WIDTH: "FIT_PAGE_WIDTH",
20
+ FIT_PAGE: "FIT_PAGE",
21
+ SPECIFIC: "SPECIFIC"
22
+ };
23
+ const ParameterTypes = {
24
+ INTEGER: "System.Int64",
25
+ FLOAT: "System.Double",
26
+ STRING: "System.String",
27
+ DATETIME: "System.DateTime",
28
+ BOOLEAN: "System.Boolean"
29
+ };
30
+ const ParameterEditorTypes = {
31
+ COMBO_BOX: "COMBO_BOX",
32
+ LIST_VIEW: "LIST_VIEW"
33
+ };
34
+ const ParametersAreaPositions = {
35
+ RIGHT: "RIGHT",
36
+ LEFT: "LEFT",
37
+ TOP: "TOP",
38
+ BOTTOM: "BOTTOM"
39
+ };
40
+ const DocumentMapAreaPositions = {
41
+ RIGHT: "RIGHT",
42
+ LEFT: "LEFT"
43
+ };
44
+
45
+ exports.DocumentMapAreaPositions = DocumentMapAreaPositions;
46
+ exports.PageModes = PageModes;
47
+ exports.ParameterEditorTypes = ParameterEditorTypes;
48
+ exports.ParameterTypes = ParameterTypes;
49
+ exports.ParametersAreaPositions = ParametersAreaPositions;
50
+ exports.PrintModes = PrintModes;
51
+ exports.ScaleModes = ScaleModes;
52
+ exports.ViewModes = ViewModes;
@@ -0,0 +1,131 @@
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 EventEmitter extends EventTarget {
12
+ constructor() {
13
+ super();
14
+ __publicField(this, "_events");
15
+ __publicField(this, "_eventsCount");
16
+ this._events = {};
17
+ this._eventsCount = 0;
18
+ }
19
+ /**
20
+ * @param {string} type
21
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
22
+ * @returns
23
+ */
24
+ addListener(type, listener) {
25
+ if (typeof listener !== "function") {
26
+ throw new TypeError("listener must be a function");
27
+ }
28
+ if (!this._events[type]) {
29
+ this._events[type] = [];
30
+ }
31
+ function wrappedListener(event) {
32
+ listener.call(this, event, ...event.detail);
33
+ }
34
+ wrappedListener.listener = listener;
35
+ this._events[type].push(wrappedListener);
36
+ this._eventsCount++;
37
+ this.addEventListener(type, wrappedListener.bind(this));
38
+ return this;
39
+ }
40
+ /**
41
+ * @alias addListener
42
+ * @param {string} type
43
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
44
+ * @returns
45
+ */
46
+ on(type, listener) {
47
+ return this.addListener(type, listener);
48
+ }
49
+ /**
50
+ * @param {string} type
51
+ * @param {any[]} args
52
+ * @returns
53
+ */
54
+ trigger(type, ...args) {
55
+ if (!this._events[type]) {
56
+ return void 0;
57
+ }
58
+ const event = new CustomEvent(type, {
59
+ detail: args,
60
+ cancelable: true
61
+ });
62
+ return this.dispatchEvent(event);
63
+ }
64
+ /**
65
+ * @alias trigger
66
+ * @param {string} type
67
+ * @param {any[]} args
68
+ * @returns
69
+ */
70
+ emit(type, ...args) {
71
+ return this.trigger(type, ...args);
72
+ }
73
+ /**
74
+ * @param {string} type
75
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
76
+ * @returns
77
+ */
78
+ removeListener(type, listener) {
79
+ if (!this._events[type]) {
80
+ return this;
81
+ }
82
+ this._events[type] = this._events[type].filter((wrappedListener) => {
83
+ if (wrappedListener.listener !== listener) {
84
+ return true;
85
+ }
86
+ this.removeEventListener(type, wrappedListener);
87
+ return false;
88
+ });
89
+ if (this._events[type].length === 0) {
90
+ delete this._events[type];
91
+ this._eventsCount--;
92
+ }
93
+ return this;
94
+ }
95
+ /**
96
+ * @param {string} type
97
+ * @returns
98
+ */
99
+ removeAllListeners(type) {
100
+ if (type === void 0) {
101
+ Object.keys(this._events).forEach((eventType) => {
102
+ this.removeAllListeners(eventType);
103
+ });
104
+ return this;
105
+ }
106
+ if (this._events[type]) {
107
+ this._events[type].forEach((wrappedListener) => {
108
+ this.removeEventListener(type, wrappedListener);
109
+ });
110
+ delete this._events[type];
111
+ this._eventsCount--;
112
+ }
113
+ return this;
114
+ }
115
+ /**
116
+ * @param {string} type
117
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
118
+ * @returns
119
+ */
120
+ off(type, listener) {
121
+ if (type === void 0) {
122
+ return this.removeAllListeners();
123
+ }
124
+ if (listener === void 0) {
125
+ return this.removeAllListeners(type);
126
+ }
127
+ return this.removeListener(type, listener);
128
+ }
129
+ }
130
+
131
+ exports.EventEmitter = EventEmitter;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const Events = {
6
+ EXPORT_BEGIN: "EXPORT_BEGIN",
7
+ EXPORT_END: "EXPORT_END",
8
+ PRINT_BEGIN: "PRINT_BEGIN",
9
+ PRINT_END: "PRINT_END",
10
+ RENDERING_BEGIN: "RENDERING_BEGIN",
11
+ RENDERING_END: "RENDERING_END",
12
+ PAGE_READY: "PAGE_READY",
13
+ ERROR: "ERROR",
14
+ UPDATE_UI: "UPDATE_UI",
15
+ INTERACTIVE_ACTION_EXECUTING: "INTERACTIVE_ACTION_EXECUTING",
16
+ INTERACTIVE_ACTION_ENTER: "INTERACTIVE_ACTION_ENTER",
17
+ INTERACTIVE_ACTION_LEAVE: "INTERACTIVE_ACTION_LEAVE",
18
+ VIEWER_TOOLTIP_OPENING: "VIEWER_TOOLTIP_OPENING",
19
+ SEND_EMAIL_BEGIN: "SEND_EMAIL_BEGIN",
20
+ SEND_EMAIL_END: "SEND_EMAIL_END"
21
+ };
22
+
23
+ exports.Events = Events;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const GlobalSettings = {
6
+ viewerInstances: []
7
+ };
8
+
9
+ exports.GlobalSettings = GlobalSettings;
@@ -0,0 +1,131 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils = require('./utils.js');
6
+
7
+ function HistoryManager(options) {
8
+ var controller = options.controller;
9
+ if (!controller) {
10
+ throw "No controller (telerikReporting.reportViewerController) has been specified.";
11
+ }
12
+ var settings = options.settings;
13
+ var history = settings.getHistory() || { records: [], position: -1 };
14
+ controller.loadedReportChange(function() {
15
+ addToHistory(true);
16
+ }).currentPageChanged(function() {
17
+ updatePageInfo();
18
+ }).reportLoadComplete(function(event, args) {
19
+ addToHistory(false);
20
+ }).clientExpired(function() {
21
+ var records = history.records;
22
+ for (var i = 0; i < records.length; i++) {
23
+ records[i].reportDocumentId = null;
24
+ }
25
+ });
26
+ function getCurrentRecord() {
27
+ var records = history.records;
28
+ if (records.length > 0) {
29
+ return records[history.position];
30
+ }
31
+ return null;
32
+ }
33
+ function pushRecord(rec) {
34
+ var records = history.records;
35
+ var position = history.position;
36
+ records = Array.prototype.slice.call(records, 0, position + 1);
37
+ records.push(rec);
38
+ history.records = records;
39
+ history.position = records.length - 1;
40
+ saveSettings();
41
+ }
42
+ function saveSettings() {
43
+ settings.setHistory(history);
44
+ }
45
+ function updatePageInfo() {
46
+ var currentRecord = getCurrentRecord();
47
+ if (currentRecord) {
48
+ currentRecord.pageNumber = controller.getCurrentPageNumber();
49
+ currentRecord.viewMode = controller.getViewMode();
50
+ currentRecord.reportDocumentId = controller.getReportDocumentId();
51
+ saveSettings();
52
+ }
53
+ }
54
+ function addToHistory(temp) {
55
+ removeTempRecordsFromHistory();
56
+ var currentRecord = getCurrentRecord();
57
+ var rs = controller.getReportSource();
58
+ if (!currentRecord || !utils.reportSourcesAreEqual(currentRecord.reportSource, rs)) {
59
+ pushRecord({
60
+ reportSource: rs,
61
+ pageNumber: 1,
62
+ temp
63
+ });
64
+ }
65
+ }
66
+ function exec(currentRecord) {
67
+ controller.setReportDocumentId(currentRecord.reportDocumentId);
68
+ controller.setViewMode(currentRecord.viewMode);
69
+ controller.setReportSource(currentRecord.reportSource);
70
+ controller.refreshReport(false, currentRecord.reportDocumentId);
71
+ controller.navigateToPage(currentRecord.pageNumber);
72
+ }
73
+ function canMove(step) {
74
+ var position = history.position;
75
+ var length = history.records.length;
76
+ var newPos = position + step;
77
+ return 0 <= newPos && newPos < length;
78
+ }
79
+ function move(step) {
80
+ var position = history.position;
81
+ var length = history.records.length;
82
+ var newPos = position + step;
83
+ if (newPos < 0) {
84
+ newPos = 0;
85
+ } else if (newPos >= length) {
86
+ newPos = length - 1;
87
+ }
88
+ if (newPos != position) {
89
+ history.position = newPos;
90
+ saveSettings();
91
+ exec(getCurrentRecord());
92
+ }
93
+ }
94
+ function removeTempRecordsFromHistory() {
95
+ var lastIndex = history.records.length - 1;
96
+ while (lastIndex >= 0) {
97
+ if (history.records[lastIndex].temp === true) {
98
+ history.records.splice(lastIndex, 1);
99
+ if (history.position >= lastIndex) {
100
+ history.position--;
101
+ }
102
+ } else {
103
+ break;
104
+ }
105
+ lastIndex--;
106
+ }
107
+ }
108
+ return {
109
+ back: function() {
110
+ move(-1);
111
+ },
112
+ forward: function() {
113
+ move(1);
114
+ },
115
+ canMoveBack: function() {
116
+ return canMove(-1);
117
+ },
118
+ canMoveForward: function() {
119
+ return canMove(1);
120
+ },
121
+ loadCurrent: function() {
122
+ var rec = getCurrentRecord();
123
+ if (rec) {
124
+ exec(rec);
125
+ }
126
+ return Boolean(rec);
127
+ }
128
+ };
129
+ }
130
+
131
+ exports.HistoryManager = HistoryManager;
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var domUtils = require('./domUtils.js');
6
+ var utils = require('./utils.js');
7
+ var accessibility = require('./accessibility.js');
8
+ var binder = require('./binder.js');
9
+ var commandSet = require('./commandSet.js');
10
+ var controller = require('./controller.js');
11
+ var enums = require('./enums.js');
12
+ var events = require('./events.js');
13
+ var globalSettings = require('./globalSettings.js');
14
+ var history = require('./history.js');
15
+ var pagesArea = require('./pagesArea.js');
16
+ var parameters = require('./parameters.js');
17
+ var parameterValidators = require('./parameterValidators.js');
18
+ var perspectives = require('./perspectives.js');
19
+ var print = require('./print.js');
20
+ var reportViewer = require('./reportViewer.js');
21
+ var scroll = require('./scroll.js');
22
+ var serviceClient = require('./serviceClient.js');
23
+ require('./sr.js');
24
+ var touch = require('./touch.js');
25
+ var uiController = require('./uiController.js');
26
+ var uiFreezeCoordinator = require('./uiFreezeCoordinator.js');
27
+
28
+
29
+
30
+ exports.domUtils = domUtils;
31
+ exports.utils = utils;
32
+ exports.Accessibility = accessibility.Accessibility;
33
+ exports.Binder = binder.Binder;
34
+ exports.CommandSet = commandSet.CommandSet;
35
+ exports.ReportViewerController = controller.ReportViewerController;
36
+ exports.DocumentMapAreaPositions = enums.DocumentMapAreaPositions;
37
+ exports.PageModes = enums.PageModes;
38
+ exports.ParameterEditorTypes = enums.ParameterEditorTypes;
39
+ exports.ParameterTypes = enums.ParameterTypes;
40
+ exports.ParametersAreaPositions = enums.ParametersAreaPositions;
41
+ exports.PrintModes = enums.PrintModes;
42
+ exports.ScaleModes = enums.ScaleModes;
43
+ exports.ViewModes = enums.ViewModes;
44
+ exports.Events = events.Events;
45
+ exports.GlobalSettings = globalSettings.GlobalSettings;
46
+ exports.HistoryManager = history.HistoryManager;
47
+ exports.PagesArea = pagesArea.PagesArea;
48
+ exports.ParameterEditors = parameters.ParameterEditors;
49
+ exports.parameterEditorsMatch = parameters.parameterEditorsMatch;
50
+ exports.ParameterValidators = parameterValidators.ParameterValidators;
51
+ exports.PerspectiveManager = perspectives.PerspectiveManager;
52
+ exports.PrintManager = print.PrintManager;
53
+ exports.ReportViewer = reportViewer.ReportViewer;
54
+ exports.Scroll = scroll.Scroll;
55
+ exports.ServiceClient = serviceClient.ServiceClient;
56
+ exports.TouchBehavior = touch.TouchBehavior;
57
+ exports.UIController = uiController.UIController;
58
+ exports.UIFreezeCoordinator = uiFreezeCoordinator.UIFreezeCoordinator;
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ /*!
4
+ * jQuery throttle / debounce - v1.1 - 3/7/2010
5
+ * http://benalman.com/projects/jquery-throttle-debounce-plugin/
6
+ *
7
+ * Copyright (c) 2010 "Cowboy" Ben Alman
8
+ * Dual licensed under the MIT and GPL licenses.
9
+ * http://benalman.com/about/license/
10
+ */
11
+ (function(window2, undefined$1) {
12
+ "$:nomunge";
13
+ var $ = window2.Cowboy || (window2.Cowboy = {}), jq_throttle;
14
+ $.throttle = jq_throttle = function(delay, no_trailing, callback, debounce_mode) {
15
+ var timeout_id, last_exec = 0;
16
+ if (typeof no_trailing !== "boolean") {
17
+ debounce_mode = callback;
18
+ callback = no_trailing;
19
+ no_trailing = undefined$1;
20
+ }
21
+ function wrapper() {
22
+ var that = this, elapsed = +/* @__PURE__ */ new Date() - last_exec, args = arguments;
23
+ function exec() {
24
+ last_exec = +/* @__PURE__ */ new Date();
25
+ callback.apply(that, args);
26
+ }
27
+ function clear() {
28
+ timeout_id = undefined$1;
29
+ }
30
+ if (debounce_mode && !timeout_id) {
31
+ exec();
32
+ }
33
+ timeout_id && clearTimeout(timeout_id);
34
+ if (debounce_mode === undefined$1 && elapsed > delay) {
35
+ exec();
36
+ } else if (no_trailing !== true) {
37
+ timeout_id = setTimeout(debounce_mode ? clear : exec, debounce_mode === undefined$1 ? delay - elapsed : delay);
38
+ }
39
+ }
40
+ if ($.guid) {
41
+ wrapper.guid = callback.guid = callback.guid || $.guid++;
42
+ }
43
+ return wrapper;
44
+ };
45
+ $.debounce = function(delay, at_begin, callback) {
46
+ return callback === undefined$1 ? jq_throttle(delay, at_begin, false) : jq_throttle(delay, callback, at_begin !== false);
47
+ };
48
+ })(window);
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ require('kendo-ui-core/esm/kendo.ui.core');
4
+