@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,168 @@
|
|
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
|
+
var globalSettings = require('./globalSettings.js');
|
9
|
+
|
10
|
+
var defaultOptions = {};
|
11
|
+
function DocumentMapArea(placeholder, options, otherOptions) {
|
12
|
+
options = $.extend({}, defaultOptions, options, otherOptions);
|
13
|
+
var controller = options.controller;
|
14
|
+
if (!controller) {
|
15
|
+
throw "No controller (telerikReporting.reportViewerController) has been specified.";
|
16
|
+
}
|
17
|
+
var $placeholder = $(placeholder);
|
18
|
+
var $documentMap;
|
19
|
+
var documentMapVisible = options.documentMapVisible !== false;
|
20
|
+
var enableAccessibility = options.enableAccessibility;
|
21
|
+
var currentReport = null;
|
22
|
+
var documentMapNecessary = false;
|
23
|
+
init();
|
24
|
+
function init() {
|
25
|
+
$documentMap = $('<div id="' + options.viewerSelector + '-documentMap"></div>');
|
26
|
+
$documentMap.appendTo(placeholder);
|
27
|
+
attach();
|
28
|
+
replaceStringResources($placeholder);
|
29
|
+
}
|
30
|
+
function onTreeViewSelectionChanged(e) {
|
31
|
+
var documentMapNode = this.dataItem(e.node);
|
32
|
+
var page = documentMapNode.page;
|
33
|
+
var id = documentMapNode.id;
|
34
|
+
controller.navigateToPage(page, {
|
35
|
+
type: "bookmark",
|
36
|
+
id
|
37
|
+
});
|
38
|
+
}
|
39
|
+
function onTreeViewNodeExpand(e) {
|
40
|
+
if (enableAccessibility) {
|
41
|
+
window.setTimeout(function() {
|
42
|
+
setNodeAccessibilityAttributes(e.node);
|
43
|
+
}, 100);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
function setNodeAccessibilityAttributes(node) {
|
47
|
+
var $items = $(node).find("li");
|
48
|
+
utils.each($items, function() {
|
49
|
+
var $li = $(this);
|
50
|
+
$li.attr("aria-label", $li[0].innerText);
|
51
|
+
});
|
52
|
+
}
|
53
|
+
function clearDocumentMap() {
|
54
|
+
displayDocumentMap([]);
|
55
|
+
}
|
56
|
+
function displayDocumentMap(documentMap) {
|
57
|
+
var hasDocumentMap = documentMap && !$.isEmptyObject(documentMap);
|
58
|
+
var $treeView = $documentMap.data("kendoTreeView");
|
59
|
+
if (!$treeView) {
|
60
|
+
try {
|
61
|
+
$documentMap.kendoTreeView({
|
62
|
+
dataTextField: "text",
|
63
|
+
select: onTreeViewSelectionChanged
|
64
|
+
});
|
65
|
+
$treeView = $documentMap.data("kendoTreeView");
|
66
|
+
} catch (e) {
|
67
|
+
console.error("Instantiation of Kendo TreeView as Document Map threw an exception", e);
|
68
|
+
throw e;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
$treeView.setDataSource(documentMap);
|
72
|
+
if (enableAccessibility) {
|
73
|
+
setAccessibilityAttributes($treeView);
|
74
|
+
}
|
75
|
+
showDocumentMap(hasDocumentMap);
|
76
|
+
}
|
77
|
+
function setAccessibilityAttributes(treeView) {
|
78
|
+
treeView.bind("expand", onTreeViewNodeExpand);
|
79
|
+
treeView.element.attr("aria-label", stringResources.stringResources.ariaLabelDocumentMap);
|
80
|
+
var listItems = treeView.element.find("ul");
|
81
|
+
utils.each(listItems, function() {
|
82
|
+
setNodeAccessibilityAttributes(this);
|
83
|
+
});
|
84
|
+
if (documentMapNecessary) {
|
85
|
+
setSplitbarAccessibilityAttributes();
|
86
|
+
}
|
87
|
+
}
|
88
|
+
function setSplitbarAccessibilityAttributes() {
|
89
|
+
var splitbar = $placeholder.next();
|
90
|
+
if (options.documentMapAreaPosition === enums.DocumentMapAreaPositions.RIGHT) {
|
91
|
+
splitbar = $placeholder.prev();
|
92
|
+
}
|
93
|
+
splitbar.attr("aria-label", stringResources.stringResources.ariaLabelDocumentMapSplitter);
|
94
|
+
}
|
95
|
+
function isVisible() {
|
96
|
+
var args = {};
|
97
|
+
controller.getDocumentMapState(args);
|
98
|
+
return args.visible;
|
99
|
+
}
|
100
|
+
function beginLoad() {
|
101
|
+
$placeholder.addClass("trv-loading");
|
102
|
+
}
|
103
|
+
function endLoad() {
|
104
|
+
$placeholder.removeClass("trv-loading");
|
105
|
+
}
|
106
|
+
function showDocumentMap(show) {
|
107
|
+
var splitter = globalSettings.GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance;
|
108
|
+
var sibling = $placeholder.next();
|
109
|
+
if (options.documentMapAreaPosition === enums.DocumentMapAreaPositions.RIGHT) {
|
110
|
+
sibling = $placeholder.prev();
|
111
|
+
}
|
112
|
+
if (splitter) {
|
113
|
+
(documentMapNecessary ? $.fn.removeClass : $.fn.addClass).call(sibling, "trv-hidden");
|
114
|
+
splitter.toggle(".trv-document-map", show);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
function attach() {
|
118
|
+
controller.beginLoadReport(function() {
|
119
|
+
beginLoad();
|
120
|
+
var r = controller.getReportSource().report;
|
121
|
+
var clearMapItems = currentReport !== r || !isVisible();
|
122
|
+
currentReport = r;
|
123
|
+
if (clearMapItems) {
|
124
|
+
clearDocumentMap();
|
125
|
+
}
|
126
|
+
}).reportLoadComplete(function(event, args) {
|
127
|
+
if (args.documentMapAvailable) {
|
128
|
+
documentMapNecessary = true;
|
129
|
+
displayDocumentMap(args.documentMapNodes);
|
130
|
+
controller.setDocumentMapVisible({ enabled: true, visible: documentMapVisible });
|
131
|
+
} else {
|
132
|
+
documentMapNecessary = false;
|
133
|
+
showDocumentMap(documentMapNecessary);
|
134
|
+
}
|
135
|
+
endLoad();
|
136
|
+
}).error(function(event, error) {
|
137
|
+
endLoad();
|
138
|
+
clearDocumentMap();
|
139
|
+
}).renderingStopped(function() {
|
140
|
+
documentMapNecessary = false;
|
141
|
+
showDocumentMap(false);
|
142
|
+
});
|
143
|
+
controller.setDocumentMapVisible(function(event, args) {
|
144
|
+
documentMapVisible = args.visible;
|
145
|
+
showDocumentMap(documentMapVisible && documentMapNecessary);
|
146
|
+
}).getDocumentMapState(function(event, args) {
|
147
|
+
args.enabled = documentMapNecessary;
|
148
|
+
args.visible = documentMapVisible;
|
149
|
+
});
|
150
|
+
}
|
151
|
+
function replaceStringResources($documentMap2) {
|
152
|
+
var $documentMapOverlay = $documentMap2.find(".trv-document-map-overlay");
|
153
|
+
if (!$documentMapOverlay) {
|
154
|
+
return;
|
155
|
+
}
|
156
|
+
$documentMapOverlay.attr("aria-label", stringResources.stringResources[$documentMapOverlay.attr("aria-label")]);
|
157
|
+
}
|
158
|
+
}
|
159
|
+
var pluginName = "telerik_ReportViewer_DocumentMapArea";
|
160
|
+
$.fn[pluginName] = function(options, otherOptions) {
|
161
|
+
return utils.each(this, function() {
|
162
|
+
if (!$.data(this, pluginName)) {
|
163
|
+
$.data(this, pluginName, new DocumentMapArea(this, options, otherOptions));
|
164
|
+
}
|
165
|
+
});
|
166
|
+
};
|
167
|
+
|
168
|
+
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,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
function EventEmitter() {
|
6
|
+
var _emitter = $({});
|
7
|
+
return {
|
8
|
+
on: function(eventName, handler) {
|
9
|
+
_emitter.on(eventName, handler);
|
10
|
+
},
|
11
|
+
trigger: function(eventName, ...args) {
|
12
|
+
_emitter.trigger(eventName, ...args);
|
13
|
+
}
|
14
|
+
};
|
15
|
+
}
|
16
|
+
|
17
|
+
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,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);
|