devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
73 lines (72 loc) • 3.14 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (designer\controls\xrPdfContent.js)
* Version: 20.2.13
* Build date: Apr 10, 2023
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var xrControl_1 = require("./xrControl");
var xrPdfContent_1 = require("./metadata/xrPdfContent");
var ko = require("knockout");
var $ = require("jquery");
var XRPdfContentViewModel = (function (_super) {
__extends(XRPdfContentViewModel, _super);
function XRPdfContentViewModel(model, parent, serializer) {
var _this = _super.call(this, model, parent, serializer) || this;
if (!!_this.sourceUrl())
_this.source(null);
_this._disposables.push(_this.sourceUrl.subscribe(function (newVal) {
if (!!newVal)
_this.source(null);
}), _this.source.subscribe(function (newVal) {
if (!!newVal)
_this.sourceUrl(null);
}), _this.size.width = ko.computed({
read: function () { return (_this.parentModel() ? _this.parentModel().size.width() : 0); },
write: $.noop
}), _this.location.x = ko.computed({
read: function () { return 0; },
write: $.noop
}));
return _this;
}
XRPdfContentViewModel.prototype._getExpressionNameByPropertyName = function (propertyName) {
var modelName = _super.prototype._getExpressionNameByPropertyName.call(this, propertyName);
if (!!modelName && xrPdfContent_1.pdfSource.modelName.indexOf(modelName) !== -1)
return 'Source';
return modelName;
};
return XRPdfContentViewModel;
}(xrControl_1.XRControlViewModel));
exports.XRPdfContentViewModel = XRPdfContentViewModel;
var XRPdfContentSurface = (function (_super) {
__extends(XRPdfContentSurface, _super);
function XRPdfContentSurface(control, context) {
var _this = _super.call(this, control, context) || this;
_this.selectiontemplate = 'dxrd-pdfcontent-selection';
_this.displayText = function () { return _this.getControlModel().name(); };
return _this;
}
XRPdfContentSurface.prototype.getResizableOptions = function (resizeHandler) {
return $.extend(true, {}, resizeHandler, {
handles: 's,n'
});
};
return XRPdfContentSurface;
}(xrControl_1.XRControlSurface));
exports.XRPdfContentSurface = XRPdfContentSurface;