/**
* jQuery Hiprint 2.5.4
*
* Copyright (c) 2016-2021 www.hinnn.com. All rights reserved.
*
* Licensed under the LGPL or commercial licenses
* To use it on other terms please contact us: hinnn.com@gmail.com
*
*/
"use strict";
function _instanceof(left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return !!right[Symbol.hasInstance](left);
} else {
return left instanceof right;
}
}
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
// js颜色选择
import "./plugins/jquery.minicolors.min.js";
//引入标尺
import lImg from "./css/image/l_img.svg";
import vImg from "./css/image/v_img.svg";
// pdf
import {jsPDF} from "jspdf";
import html2canvas from "@wtto00/html2canvas";
var hiprint = (function (t) {
var e = {};
function n(i) {
if (e[i]) return e[i].exports;
var o = (e[i] = {
i: i,
l: !1,
exports: {}
});
return t[i].call(o.exports, o, o.exports, n), (o.l = !0), o.exports;
}
return (
(n.m = t),
(n.c = e),
(n.d = function (t, e, i) {
n.o(t, e) ||
Object.defineProperty(t, e, {
enumerable: !0,
get: i
});
}),
(n.r = function (t) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(t, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(t, "__esModule", {
value: !0
});
}),
(n.t = function (t, e) {
if ((1 & e && (t = n(t)), 8 & e)) return t;
if (4 & e && "object" == _typeof(t) && t && t.__esModule) return t;
var i = Object.create(null);
if (
(n.r(i),
Object.defineProperty(i, "default", {
enumerable: !0,
value: t
}),
2 & e && "string" != typeof t)
)
for (var o in t) {
n.d(
i,
o,
function (e) {
return t[e];
}.bind(null, o)
);
}
return i;
}),
(n.n = function (t) {
var e =
t && t.__esModule
? function () {
return t.default;
}
: function () {
return t;
};
return n.d(e, "a", e), e;
}),
(n.o = function (t, e) {
return Object.prototype.hasOwnProperty.call(t, e);
}),
(n.p = "/"),
n((n.s = 21))
);
})([
function (t, e, n) {
"use strict";
var i;
n.d(e, "a", function () {
return hinnn;
}),
(window.hinnn = {}),
(hinnn.event =
((i = {}),
{
on: function on(t, e) {
i[t] || (i[t] = []), i[t].push(e);
},
id: 0,
off: function off(t, e) {
var n = i[t];
if (n) {
for (var o = -1, r = 0; r < n.length; r++) {
if (n[r] === e) {
o = r;
break;
}
}
o < 0 || i[t].splice(o, 1);
}
},
trigger: function trigger(t) {
var e = i[t];
if (e && e.length)
for (var n = Array.prototype.slice.call(arguments, 1), o = 0; o < e.length; o++) {
e[o].apply(this, n);
}
},
clear: function clear(t) {
i[t] = [];
},
getId: function getId() {
return (this.id += 1), this.id;
},
getNameWithId: function getNameWithId(t) {
return t + "-" + this.getId();
}
})),
(hinnn.form = {
serialize: function serialize(t) {
var e = $(t).serializeArray(),
n = {};
return (
$.each(e, function () {
n[this.name]
? "[object Array]" == Object.prototype.toString.call(n[this.name])
? n[this.name].push(this.value)
: (n[this.name] = [n[this.name], this.value])
: (n[this.name] = this.value);
}),
n
);
}
}),
(hinnn.pt = {
toPx: function toPx(t) {
return t * (this.getDpi() / 72);
},
dpi: 0,
getDpi: function getDpi() {
if (!this.dpi) {
var _t2 = document.createElement("DIV");
(_t2.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden"), document.body.appendChild(_t2), (this.dpi = _t2.offsetHeight);
}
return this.dpi;
}
}),
(hinnn.px = {
toPt: function toPt(t) {
return t * (72 / this.getDpi());
},
dpi: 0,
getDpi: function getDpi() {
if (!this.dpi) {
var _t3 = document.createElement("DIV");
(_t3.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden"), document.body.appendChild(_t3), (this.dpi = _t3.offsetHeight);
}
return this.dpi;
}
}),
(hinnn.mm = {
toPt: function toPt(t) {
return (72 / 25.4) * t;
},
toPx: function toPx(t) {
return hinnn.pt.toPx(hinnn.mm.toPt(t));
}
}),
(hinnn.throttle = function (t, e, n) {
var i,
o,
r,
a = null,
p = 0;
n || (n = {});
var s = function s() {
(p = !1 === n.leading ? 0 : _.now()), (a = null), (r = t.apply(i, o)), a || (i = o = null);
};
return function () {
var l = _.now();
p || !1 !== n.leading || (p = l);
var u = e - (l - p);
return (
(i = this), (o = arguments), u <= 0 || u > e ? (a && (clearTimeout(a), (a = null)), (p = l), (r = t.apply(i, o)), a || (i = o = null)) : a || !1 === n.trailing || (a = setTimeout(s, u)), r
);
};
}),
(hinnn.debounce = function (t, e, n) {
var i,
o,
r,
a,
p,
s = function s() {
var l = _.now() - a;
l < e && l >= 0 ? (i = setTimeout(s, e - l)) : ((i = null), n || ((p = t.apply(r, o)), i || (r = o = null)));
};
return function () {
(r = this), (o = arguments), (a = _.now());
var l = n && !i;
return i || (i = setTimeout(s, e)), l && ((p = t.apply(r, o)), (r = o = null)), p;
};
}),
(hinnn.toUtf8 = function (t) {
var e, n, i, o;
for (e = "", i = t.length, n = 0; n < i; n++) {
(o = t.charCodeAt(n)) >= 1 && o <= 127
? (e += t.charAt(n))
: o > 2047
? ((e += String.fromCharCode(224 | ((o >> 12) & 15))), (e += String.fromCharCode(128 | ((o >> 6) & 63))), (e += String.fromCharCode(128 | ((o >> 0) & 63))))
: ((e += String.fromCharCode(192 | ((o >> 6) & 31))), (e += String.fromCharCode(128 | ((o >> 0) & 63))));
}
return e;
}),
(hinnn.groupBy = function (t, e, n) {
var i = {};
return (
t.forEach(function (t) {
var o = JSON.stringify(n(t));
i[o] ||
((i[o] = {
rows: []
}),
e.forEach(function (e) {
i[o][e] = t[e];
})),
i[o].rows.push(t);
}),
Object.keys(i).map(function (t) {
return i[t];
})
);
}),
(hinnn.orderBy = function (t, e) {
if (t.length <= 1) return t;
var n = Math.floor(t.length / 2),
i = t.splice(n, 1)[0],
o = [],
r = [];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var _n = _step.value;
e(_n) < e(i) ? o.push(_n) : r.push(_n);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return this.orderBy(o, e).concat([i], this.orderBy(r, e));
}),
(hinnn.dateFormat = function (t, e) {
if (t)
try {
var o = "string" == typeof t ? new Date(t) : t;
var n = {
"M+": o.getMonth() + 1,
"d+": o.getDate(),
"H+": o.getHours(),
"m+": o.getMinutes(),
"s+": o.getSeconds(),
"q+": Math.floor((o.getMonth() + 3) / 3),
S: o.getMilliseconds()
};
for (var i in (/(y+)/.test(e) && (e = e.replace(RegExp.$1, (o.getFullYear() + "").substr(4 - RegExp.$1.length))), n)) {
new RegExp("(" + i + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? n[i] : ("00" + n[i]).substr(("" + n[i]).length)));
}
return e;
} catch (t) {
return console.log(t), "";
}
return "";
});
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return o;
});
var i = n(9),
o = (function () {
function t() {
// see hiprint.config.js
}
return (
(t.prototype.init = function (t) {
t && $.extend(this, t);
}),
Object.defineProperty(t, "instance", {
get: function get() {
return (
t._instance ||
((t._instance = new t()),
window.HIPRINT_CONFIG && $.extend(t._instance, HIPRINT_CONFIG),
t._instance.optionItems &&
t._instance.optionItems.forEach(function (t) {
i.a.registerItem(t);
})),
t._instance
);
},
enumerable: !0,
configurable: !0
}),
t
);
})();
},
function (t, e, n) {
"use strict";
var i = (function () {
function t(t) {
this.printElement = t;
}
return (
(t.prototype.updatePosition = function (t, e) {
(this.left = t), (this.top = e);
}),
t
);
})();
n.d(e, "a", function () {
return o;
});
var o = (function () {
function t() {
(this.printTemplateContainer = {}),
(this.A1 = {
width: 841,
height: 594
}),
(this.A2 = {
width: 420,
height: 594
}),
(this.A3 = {
width: 420,
height: 297
}),
(this.A4 = {
width: 210,
height: 297
}),
(this.A5 = {
width: 210,
height: 148
}),
(this.A6 = {
width: 105,
height: 148
}),
(this.A7 = {
width: 105,
height: 74
}),
(this.A8 = {
width: 52,
height: 74
}),
(this.B1 = {
width: 1e3,
height: 707
}),
(this.B2 = {
width: 500,
height: 707
}),
(this.B3 = {
width: 500,
height: 353
}),
(this.B4 = {
width: 250,
height: 353
}),
(this.B5 = {
width: 250,
height: 176
}),
(this.B6 = {
width: 125,
height: 176
}),
(this.B7 = {
width: 125,
height: 88
}),
(this.B8 = {
width: 62,
height: 88
}),
(this.dragLengthCNum = function (t, e) {
var n = 0.75 * t;
return e && (e = e), Math.round(n / e) * e;
});
}
return (
Object.defineProperty(t, "instance", {
get: function get() {
return this._instance || (this._instance = new t()), this._instance;
},
enumerable: !0,
configurable: !0
}),
(t.prototype.getDragingPrintElement = function () {
return t.instance.dragingPrintElement;
}),
(t.prototype.setDragingPrintElement = function (e) {
t.instance.dragingPrintElement = new i(e);
}),
(t.prototype.guid = function () {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
var e = (16 * Math.random()) | 0;
return ("x" == t ? e : (3 & e) | 8).toString(16);
});
}),
(t.prototype.imageToBase64 = function (t) {
if (-1 == $(t).attr("src").indexOf("base64"))
try {
var e = document.createElement("canvas"),
n = new Image();
(n.src = t.attr("src")), (e.width = n.width), (e.height = n.height), e.getContext("2d").drawImage(n, 0, 0), t.attr("src", e.toDataURL("image/png"));
} catch (e) {
try {
this.xhrLoadImage(t);
} catch (t) {
console.log(t);
}
}
}),
(t.prototype.xhrLoadImage = function (t) {}),
(t.prototype.transformImg = function (t) {
var e = this;
t.map(function (t, n) {
e.imageToBase64($(n));
});
}),
(t.prototype.getPrintTemplateById = function (e) {
return t.instance.printTemplateContainer[e];
}),
(t.prototype.setPrintTemplateById = function (e, n) {
return (t.instance.printTemplateContainer[e] = n);
}),
t
);
})();
},
function (t, e, n) {
"use strict";
var i = (function () {
return function () {};
})();
n.d(e, "a", function () {
return o;
});
var o = (function () {
function t(t) {
(t = t || {}), (this.left = t.left), (this.top = t.top), (this.topInDesign = this.top), (this.height = t.height), (this.width = t.width), this.init(t);
}
return (
(t.prototype.setDefault = function (t) {
(this.defaultOptions = t), this.initSize();
}),
(t.prototype.initSize = function () {
this.width || this.setWidth(this.defaultOptions.width), this.height || this.setHeight(this.defaultOptions.height);
}),
(t.prototype.initSizeByHtml = function (t, e) {
this.width || this.setWidth(t), this.height || this.setHeight(e);
}),
(t.prototype.getLeft = function () {
return this.left;
}),
(t.prototype.displayLeft = function () {
return this.left + "pt";
}),
(t.prototype.setLeft = function (t) {
null != t && (this.left = t);
}),
(t.prototype.getTop = function () {
return this.top;
}),
(t.prototype.getTopInDesign = function () {
return this.topInDesign;
}),
(t.prototype.displayTop = function () {
return this.top + "pt";
}),
(t.prototype.setTop = function (t) {
null != t && (this.top = t);
}),
(t.prototype.copyDesignTopFromTop = function () {
this.topInDesign = this.top;
}),
(t.prototype.getHeight = function () {
return this.height;
}),
(t.prototype.displayHeight = function () {
return this.height + "pt";
}),
(t.prototype.setHeight = function (t) {
null != t && (this.height = t);
}),
(t.prototype.getWidth = function () {
return this.width;
}),
(t.prototype.displayWidth = function () {
return this.width + "pt";
}),
(t.prototype.setWidth = function (t) {
null != t && (this.width = t);
}),
(t.prototype.getValueFromOptionsOrDefault = function (t) {
return null == this[t] ? this.defaultOptions[t] : this[t];
}),
(t.prototype.getPrintElementOptionEntity = function () {
var t = new i(),
e = this;
return (
Object.keys(this)
.filter(function (t) {
return "topInDesign" != t;
})
.forEach(function (n) {
if ((("number" != typeof e[n] && "string" != typeof e[n] && _typeof(e[n]) != _typeof(!0)) || (t[n] = e[n]), "style" == n)) {
t.style = {};
var i = e[n];
if (i)
Object.keys(i).forEach(function (e) {
("number" != typeof i[e] && "string" != typeof i[e]) || (t.style[e] = i[e]);
});
}
}),
t
);
}),
(t.prototype.init = function (t) {
var e = this;
t &&
Object.keys(t).forEach(function (n) {
e[n] = t[n];
});
}),
t
);
})();
},
function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "a", function () {
return BasePrintElement;
});
var _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17),
_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
_print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9),
_dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0),
_PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8),
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2),
BasePrintElement = (function () {
function BasePrintElement(t) {
(this.printElementType = t), (this.id = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.guid());
}
return (
(BasePrintElement.prototype.getConfigOptionsByName = function (t) {
return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance[t];
}),
(BasePrintElement.prototype.getProxyTarget = function (t) {
t && this.SetProxyTargetOption(t);
var e = this.getData(),
n = this.createTarget(this.getTitle(), e);
return this.updateTargetSize(n), this.css(n, e), n;
}),
(BasePrintElement.prototype.SetProxyTargetOption = function (t) {
this.options.getPrintElementOptionEntity();
$.extend(this.options, t);
}),
(BasePrintElement.prototype.showInPage = function (t, e) {
var n = this.options.showInPage,
i = this.options.unShowInPage;
if (n) {
if ("first" == n) return 0 == t;
if (t == e - 1 && "last" == i) return !1;
if ("odd" == n) return (0 != t || "first" != i) && t % 2 == 0;
if ("even" == n) return t % 2 == 1;
if ("last" == n) return t == e - 1;
}
return (0 != t || "first" != i) && (t != e - 1 || "last" != i);
}),
(BasePrintElement.prototype.setTemplateId = function (t) {
this.templateId = t;
}),
(BasePrintElement.prototype.setPanel = function (t) {
this.panel = t;
}),
(BasePrintElement.prototype.getField = function () {
return this.options.field || this.printElementType.field;
}),
(BasePrintElement.prototype.getTitle = function () {
return this.printElementType.title;
}),
(BasePrintElement.prototype.updateSizeAndPositionOptions = function (t, e, n, i) {
this.options.setLeft(t),
this.options.setTop(e),
this.options.copyDesignTopFromTop(),
this.options.setWidth(n),
this.options.setHeight(i),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId);
}),
(BasePrintElement.prototype.initSizeByHtml = function (t) {
if (t && t.length) {
this.createTempContainer();
var e = t.clone();
this.getTempContainer().append(e),
this.options.initSizeByHtml(
parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(e.width()).toString()),
parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(e.height()).toString())
),
this.removeTempContainer();
}
}),
(BasePrintElement.prototype.updateTargetSize = function (t) {
t.css("width", this.options.displayWidth()), t.css("height", this.options.displayHeight());
}),
(BasePrintElement.prototype.updateTargetWidth = function (t) {
t.css("width", this.options.displayWidth());
}),
(BasePrintElement.prototype.getDesignTarget = function (t) {
var e = this;
return (
(this.designTarget = this.getHtml(t)[0].target),
(this.designPaper = t),
this.designTarget.click(function () {
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger(e.getPrintElementSelectEventKey(), {
printElement: e
});
}),
this.designTarget
);
}),
(BasePrintElement.prototype.getPrintElementSelectEventKey = function () {
return "PrintElementSelectEventKey_" + this.templateId;
}),
(BasePrintElement.prototype.design = function (t, e) {
var n = this;
this.designTarget.hidraggable({
axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
onDrag: function onDrag(t, i, o) {
n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
},
moveUnit: "pt",
minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
onBeforeDrag: function onBeforeDrag(t) {
(_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0), n.designTarget.focus(), n.createLineOfPosition(e);
},
onStopDrag: function onStopDrag(t) {
(_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1), n.removeLineOfPosition();
}
}),
this.designTarget.hireizeable({
showPoints: n.getReizeableShowPoints(),
onBeforeResize: function onBeforeResize() {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0;
},
onResize: function onResize(t, i, o, r, a) {
n.onResize(t, i, o, r, a), n.createLineOfPosition(e);
},
onStopResize: function onStopResize() {
(_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1), n.removeLineOfPosition();
}
}),
this.bingCopyEvent(this.designTarget),
this.bingKeyboardMoveEvent(this.designTarget, e);
}),
(BasePrintElement.prototype.getPrintElementEntity = function (t) {
return t
? new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(void 0, this.options.getPrintElementOptionEntity(), this.printElementType.getPrintElementTypeEntity())
: new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(this.printElementType.tid, this.options.getPrintElementOptionEntity());
}),
(BasePrintElement.prototype.submitOption = function () {
var t = this;
this.getPrintElementOptionItems().forEach(function (e) {
var n = e.getValue();
n && "object" == _typeof(n)
? Object.keys(n).forEach(function (e) {
t.options[e] = n[e];
})
: (t.options[e.name] = n);
}),
this.updateDesignViewFromOptions(),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId);
}),
(BasePrintElement.prototype.getReizeableShowPoints = function () {
return ["s", "e"];
}),
(BasePrintElement.prototype.onResize = function (t, e, n, i, o) {
this.updateSizeAndPositionOptions(o, i, n, e);
}),
(BasePrintElement.prototype.getOrderIndex = function () {
return this.options.getTop();
}),
(BasePrintElement.prototype.getHtml = function (t, e, n) {
var i = 0;
this.setCurrenttemplateData(e);
var o = [],
r = this.getBeginPrintTopInPaperByReferenceElement(t),
a = t.getPaperFooter(i);
this.isHeaderOrFooter() ||
this.isFixed() ||
(r > a &&
(o.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: void 0,
printLine: void 0
})
),
(r = r - a + t.paperHeader),
i++,
(a = t.getPaperFooter(i))));
var p = this.getData(e),
s = this.createTarget(this.getTitle(), p, n);
return (
this.updateTargetSize(s),
this.css(s, p),
s.css("position", "absolute"),
s.css("left", this.options.displayLeft()),
s.css("top", r + "pt"),
o.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: s,
printLine: r + this.options.getHeight()
})
),
o
);
}),
(BasePrintElement.prototype.getHtml2 = function (t, e, n) {
var i = 0;
this.setCurrenttemplateData(e);
var o = [],
r = this.getBeginPrintTopInPaperByReferenceElement(t),
a = t.getPaperFooter(i);
this.isHeaderOrFooter() ||
this.isFixed() ||
(r > a &&
(o.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: void 0,
printLine: void 0
})
),
(r = r - a + t.paperHeader),
i++,
(a = t.getPaperFooter(i))),
r <= a &&
r + this.options.getHeight() > a &&
(o.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: void 0,
printLine: void 0
})
),
(r = t.paperHeader),
i++,
(a = t.getPaperFooter(i))));
var p = this.getData(e),
s = this.createTarget(this.getTitle(), p);
return (
this.updateTargetSize(s),
this.css(s, p),
s.css("position", "absolute"),
s.css("left", this.options.displayLeft()),
s.css("top", r + "pt"),
o.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: s,
printLine: r + this.options.getHeight(),
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: r + this.options.getHeight(),
printTopInPaper: r
})
})
),
o
);
}),
(BasePrintElement.prototype.getBeginPrintTopInPaperByReferenceElement = function (t) {
var e = this.options.getTop();
return this.isHeaderOrFooter() || this.isFixed()
? e
: t.referenceElement.isPositionLeftOrRight(e)
? t.referenceElement.printTopInPaper + (e - t.referenceElement.top)
: t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height));
}),
(BasePrintElement.prototype.css = function (t, e) {
var n = this,
i = [],
o = this.getConfigOptions();
if (o) {
var r = o.supportOptions;
r &&
r.forEach(function (e) {
var o = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(e.name);
if (o && o.css) {
var r = o.css(t, n.options.getValueFromOptionsOrDefault(e.name));
r && i.push(r);
}
});
}
this.stylerCss(t, e);
}),
(BasePrintElement.prototype.stylerCss = function (t, e) {
var n = this.getStyler();
if (n) {
var i = n(e, this.options, t, this._currenttemplateData);
if (i)
Object.keys(i).forEach(function (e) {
t.css(e, i[e]);
});
}
}),
(BasePrintElement.prototype.getData = function (t) {
return t ? t[this.getField()] || "" : this.printElementType.getData();
}),
(BasePrintElement.prototype.getPrintElementOptionItems = function () {
if (this._printElementOptionItems) return this._printElementOptionItems;
var t = [],
e = this.getConfigOptions();
if (e) {
var n = e.supportOptions;
n &&
n
.filter(function (t) {
return !t.hidden;
})
.forEach(function (e) {
var n = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(e.name);
t.push(n);
});
}
return (this._printElementOptionItems = this.filterOptionItems(t.concat())), this._printElementOptionItems;
}),
(BasePrintElement.prototype.getPrintElementOptionItemsByName = function (t) {
var e = [],
n = this.getConfigOptionsByName(t);
if (n) {
var i = n.supportOptions;
i &&
i
.filter(function (t) {
return !t.hidden;
})
.forEach(function (t) {
var n = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
e.push(n);
});
}
return e.concat();
}),
(BasePrintElement.prototype.filterOptionItems = function (t) {
return this.printElementType.field
? t.filter(function (t) {
return "field" != t.name;
})
: t;
}),
(BasePrintElement.prototype.createTempContainer = function () {
this.removeTempContainer(), $("body").append($('
'));
}),
(BasePrintElement.prototype.removeTempContainer = function () {
$(".hiprint_temp_Container").remove();
}),
(BasePrintElement.prototype.getTempContainer = function () {
return $(".hiprint_temp_Container");
}),
(BasePrintElement.prototype.isHeaderOrFooter = function () {
return this.options.getTopInDesign() < this.panel.paperHeader || this.options.getTopInDesign() >= this.panel.paperFooter;
}),
(BasePrintElement.prototype.delete = function () {
this.designTarget && this.designTarget.remove();
}),
(BasePrintElement.prototype.setCurrenttemplateData = function (t) {
this._currenttemplateData = t;
}),
(BasePrintElement.prototype.isFixed = function () {
return this.options.fixed;
}),
(BasePrintElement.prototype.onRendered = function (t, e) {
this.printElementType && this.printElementType.onRendered && this.printElementType.onRendered(e, this.options, t.getTarget());
}),
(BasePrintElement.prototype.createLineOfPosition = function (t) {
var e = $(".toplineOfPosition" + this.id),
n = $(".leftlineOfPosition" + this.id),
i = $(".rightlineOfPosition" + this.id),
o = $(".bottomlineOfPosition" + this.id);
if (
(e.length
? e.css("top", this.options.displayTop())
: ((e = $('')).css(
"top",
this.options.displayTop()
),
e.css("width", t.displayWidth()),
this.designTarget.parents(".hiprint-printPaper-content").append(e)),
n.length)
)
n.css("left", this.options.displayLeft());
else {
var r = $('');
r.css("left", this.options.displayLeft()), r.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(r);
}
if (i.length) i.css("left", this.options.getLeft() + this.options.getWidth() + "pt");
else {
var a = $('');
a.css("left", this.options.getLeft() + this.options.getWidth() + "pt"), a.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(a);
}
if (o.length) o.css("top", this.options.getTop() + this.options.getHeight() + "pt");
else {
var p = $('');
p.css("top", this.options.getTop() + this.options.getHeight() + "pt"), p.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(p);
}
}),
(BasePrintElement.prototype.removeLineOfPosition = function () {
$(".toplineOfPosition" + this.id).remove(), $(".leftlineOfPosition" + this.id).remove(), $(".rightlineOfPosition" + this.id).remove(), $(".bottomlineOfPosition" + this.id).remove();
}),
(BasePrintElement.prototype.getFields = function () {
var t = this.printElementType.getFields();
return t || (t = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFields());
}),
(BasePrintElement.prototype.bingCopyEvent = function (t) {}),
(BasePrintElement.prototype.getFormatter = function () {
var formatter = void 0;
if ((this.printElementType.formatter && (formatter = this.printElementType.formatter), this.options.formatter))
try {
var s = "formatter=" + this.options.formatter;
eval(s);
} catch (t) {
console.log(t);
}
return formatter;
}),
(BasePrintElement.prototype.getStyler = function () {
var fnstyler = void 0;
if ((this.printElementType.styler && (fnstyler = this.printElementType.styler), this.options.styler))
try {
var s = "fnstyler=" + this.options.styler;
eval(s);
} catch (t) {
console.log(t);
}
return fnstyler;
}),
(BasePrintElement.prototype.bingKeyboardMoveEvent = function (t, e) {
var n = this,
i = void 0,
o = void 0;
t.attr("tabindex", "1"),
t.keydown(function (r) {
switch (r.keyCode) {
case 37:
(i = n.options.getLeft()),
n.updateSizeAndPositionOptions(i - _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance),
t.css("left", n.options.displayLeft()),
n.createLineOfPosition(e),
r.preventDefault();
break;
case 38:
(o = n.options.getTop()),
n.updateSizeAndPositionOptions(void 0, o - _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance),
t.css("top", n.options.displayTop()),
n.createLineOfPosition(e),
r.preventDefault();
break;
case 39:
(i = n.options.getLeft()),
n.updateSizeAndPositionOptions(i + _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance),
t.css("left", n.options.displayLeft()),
n.createLineOfPosition(e),
r.preventDefault();
break;
case 40:
(o = n.options.getTop()),
n.updateSizeAndPositionOptions(void 0, o + _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance),
t.css("top", n.options.displayTop()),
n.createLineOfPosition(e),
r.preventDefault();
}
});
}),
(BasePrintElement.prototype.inRect = function (t) {
var e = this.designTarget.offset().left,
n = this.designTarget.offset().top;
return t.minX < e && t.minY < n && t.maxX > e && t.maxY > n;
}),
(BasePrintElement.prototype.multipleSelect = function (t) {
t ? this.designTarget.addClass("multipleSelect") : this.designTarget.removeClass("multipleSelect");
}),
(BasePrintElement.prototype.updatePositionByMultipleSelect = function (t, e) {
this.updateSizeAndPositionOptions(t + this.options.getLeft(), e + this.options.getTop()),
this.designTarget.css("left", this.options.displayLeft()),
this.designTarget.css("top", this.options.displayTop());
}),
BasePrintElement
);
})();
},
function (t, e, n) {
"use strict";
var i = (function () {
function t() {}
return (
(t.prototype.init = function (t) {
(this.target = $('')), t.getTarget().append(this.target), this.target.focus();
}),
(t.prototype.getValue = function () {
return this.target.val();
}),
(t.prototype.setValue = function (t) {
this.target.val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
o = (function () {
function t() {
this.text = new i();
}
return (
Object.defineProperty(t, "Instance", {
get: function get() {
return t._instance || (t._instance = new t()), t._instance;
},
enumerable: !0,
configurable: !0
}),
t
);
})(),
r = (function () {
function t() {}
return (
Object.defineProperty(t, "Instance", {
get: function get() {
return o._instance || (t._instance = new t()), t._instance;
},
enumerable: !0,
configurable: !0
}),
(t.prototype.createEditor = function (t) {
return $.extend({}, o.Instance[t]);
}),
t
);
})(),
a = n(10),
p = n(14),
s = n(11),
l = (function () {
function t() {}
return (
(t.prototype.init = function (t, e) {
var n = this;
(this.tableOptions = e),
(this.title = t.title),
(this.field = t.field),
t
.getTarget()
.unbind("dblclick.hitable")
.bind("dblclick.hitable", function () {
(t.isEditing = !0), n.beginEdit(t);
});
}),
(t.prototype.getDisplayHtml = function () {
return this.title;
}),
(t.prototype.beginEdit = function (t) {
var e = this;
(this.editor = r.Instance.createEditor("text")),
t.getTarget().html(""),
this.editor.init(t),
(this.title || this.field) &&
(this.tableOptions.options.isEnableEditField ? this.editor.setValue((this.title || "") + "#" + (this.field || "")) : this.editor.setValue(this.title || "")),
$(this.editor.target).keydown(function (n) {
13 == n.keyCode && e.endEdit(t);
}),
$(this.editor.target).blur(function (n) {
e.endEdit(t);
}),
this.tableOptions.editingCell && this.tableOptions.editingCell.id != t.id && this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell),
(this.tableOptions.editingCell = t);
}),
(t.prototype.endEdit = function (t) {
var e = this.editor.getValue();
if (e) {
if (this.tableOptions.options.isEnableEditField) {
var n = e.split("#");
(t.title = this.title = n[0]), n.length > 0 && (t.field = this.field = n[1]);
} else t.title = this.title = e;
} else this.tableOptions.options.isEnableEditField ? ((t.title = this.title = ""), (t.field = this.field = "")) : (t.title = this.title = "");
this.editor.destroy(), t.getTarget().html(this.title);
}),
t
);
})(),
u = (function () {
return function (t) {
(this.title = t.title),
(this.field = t.field),
(this.width = t.width),
(this.align = t.align),
(this.halign = t.halign),
(this.vAlign = t.vAlign),
(this.colspan = t.colspan),
(this.rowspan = t.rowspan),
(this.checked = t.checked),
(this.columnId = t.columnId),
(this.formatter2 = t.formatter2),
(this.styler2 = t.styler2);
};
})(),
d = (function () {
function t() {
this.id = s.a.createId();
}
return (
(t.prototype.init = function (t, e, n, i) {
(this.isHead = i), (this.rowId = n), (this.isEditing = !1);
var o = /^[0-9]*$/;
(this.target = t), (this.tableOptions = e);
var r = this.target.attr("colspan");
this.colspan = o.test(r) ? parseInt(r) : 1;
var a = this.target.attr("rowspan");
(this.rowspan = o.test(a) ? parseInt(a) : 1), this.initEvent(), this.isHead && this.initInnerEelement();
}),
(t.prototype.beginEdit = function () {
if (!this.isEditing && this.tableOptions.isEnableEdit && this.tableOptions.onBeforEdit(this)) {
var t = this.getValue();
(this.editor = r.Instance.createEditor("text")), (this.isEditing = !0), (this.tableOptions.editingCell = this), this.target.html(""), this.editor.init(this), this.editor.setValue(t);
}
}),
(t.prototype.endEdit = function () {
this.isEditing = !1;
var t = this.editor.getValue();
this.editor.destroy(), this.target.html(t);
}),
(t.prototype.getTarget = function () {
return this.target;
}),
(t.prototype.getValue = function () {
return this.target.html();
}),
(t.prototype.setValue = function (t) {}),
(t.prototype.initInnerEelement = function () {
(this.innerElement = new l()), this.innerElement.init(this, this.tableOptions);
}),
(t.prototype.initEvent = function () {}),
(t.prototype.isXYinCell = function (t, e) {
var n = new a.b({
x: t,
y: e,
height: 0,
width: 0
});
return this.isOverlap(n);
}),
(t.prototype.getTableRect = function () {
return new a.b({
x: this.target.offset().left,
y: this.target.offset().top,
height: this.target[0].offsetHeight,
width: this.target[0].offsetWidth
});
}),
(t.prototype.isOverlap = function (t) {
var e = this.getTableRect();
return t.x + t.width > e.x && e.x + e.width > t.x && t.y + t.height > e.y && e.y + e.height > t.y;
}),
(t.prototype.isInRect = function (t) {
var e = t.rect,
n = this.getTableRect();
if (e.x + e.width > n.x && n.x + n.width > e.x && e.y + e.height > n.y && n.y + n.height > e.y) {
var i = p.a.mergeRect(e, n);
return JSON.stringify(e) == JSON.stringify(i) || ((t.changed = !0), (t.rect = i), !0);
}
return !1;
}),
(t.prototype.isSelected = function () {
return this.target.hasClass("selected");
}),
(t.prototype.select = function () {
this.target.addClass("selected");
}),
(t.prototype.isHeader = function () {
return !1;
}),
(t.prototype.setAlign = function (t) {
(this.align = t), t ? this.target.css("text-align", t) : (this.target[0].style.textAlign = "");
}),
(t.prototype.setVAlign = function (t) {
(this.vAlign = t), t ? this.target.css("vertical-align", t) : (this.target[0].style.verticalAlign = "");
}),
(t.prototype.getEntity = function () {
return new u(this);
}),
t
);
})();
n.d(e, "a", function () {
return f;
});
var _c,
h =
((_c = function c(t, e) {
return (_c =
Object.setPrototypeOf ||
(_instanceof(
{
__proto__: []
},
Array
) &&
function (t, e) {
t.__proto__ = e;
}) ||
function (t, e) {
for (var n in e) {
e.hasOwnProperty(n) && (t[n] = e[n]);
}
})(t, e);
}),
function (t, e) {
function n() {
this.constructor = t;
}
_c(t, e), (t.prototype = null === e ? Object.create(e) : ((n.prototype = e.prototype), new n()));
}),
f = (function (t) {
function e(e) {
var n = this;
return (
(e = e || {}),
((n = t.call(this) || this).width = e.width ? parseFloat(e.width.toString()) : 100),
(n.title = e.title),
(n.descTitle = e.descTitle),
(n.field = e.field),
(n.fixed = e.fixed),
(n.rowspan = e.rowspan ? parseInt(e.rowspan) : 1),
(n.colspan = e.colspan ? parseInt(e.colspan) : 1),
(n.align = e.align),
(n.halign = e.halign),
(n.vAlign = e.vAlign),
(n.formatter = e.formatter),
(n.styler = e.styler),
(n.formatter2 = e.formatter2),
(n.styler2 = e.styler2),
(n.checkbox = e.checkbox),
(n.checked = 0 != e.checked),
(n.columnId = e.columnId || e.field),
n
);
}
return h(e, t), (e.prototype.css = function (t) {}), e;
})(d);
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return i;
});
var i = (function () {
return function (t) {
(this.printLine = t.printLine), (this.target = t.target), (this.referenceElement = t.referenceElement);
};
})();
},
function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "a", function () {
return TableExcelHelper;
});
var _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0),
TableExcelHelper = (function () {
function TableExcelHelper() {}
return (
(TableExcelHelper.createTableHead = function (t, e) {
for (
var n = TableExcelHelper.reconsitutionTableColumnTree(t),
i = $(""),
o = TableExcelHelper.getColumnsWidth(n, e),
r = function r(t) {
var e = $("
");
n[t].forEach(function (t) {
var n = $("
");
t.id && n.attr("id", t.id),
t.columnId && n.attr("column-id", t.columnId),
(t.align || t.halign) && n.css("text-align", t.halign || t.align),
t.vAlign && n.css("vertical-align", t.vAlign),
t.colspan > 1 && n.attr("colspan", t.colspan),
t.rowspan > 1 && n.attr("rowspan", t.rowspan),
n.html(t.title),
o[t.id] ? ((t.hasWidth = !0), (t.targetWidth = o[t.id]), n.attr("haswidth", "haswidth"), n.css("width", o[t.id] + "pt")) : (t.hasWidth = !1),
e.append(n);
}),
i.append(e);
},
a = 0;
a < n.totalLayer;
a++
) {
r(a);
}
return TableExcelHelper.syncTargetWidthToOption(t), i;
}),
(TableExcelHelper.createTableFooter = function (t, e, n, i, o, r) {
var a = $(""),
p = this.getFooterFormatter(n, i);
return p && a.append(p(n, e, o, r)), a;
}),
(TableExcelHelper.createTableRow = function (t, e, n, i) {
var o = TableExcelHelper.reconsitutionTableColumnTree(t),
r = $("");
(e || (e = []), i.groupFields.length)
? _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a
.groupBy(e, i.groupFields, function (t) {
var e = {};
return (
i.groupFields.forEach(function (n) {
return (e[n] = t[n]);
}),
e
);
})
.forEach(function (t) {
if (i.groupFormatter) {
var e = $("
");
e.find("td").append(i.groupFormatter(t, n)), r.append(e);
}
if (
(t.rows.forEach(function (t) {
var e = TableExcelHelper.createRowTarget(o, t, n, i);
r.append(e);
}),
i.groupFooterFormatter)
) {
var a = $("
");
a.find("td").append(i.groupFooterFormatter(t, n)), r.append(a);
}
})
: e.forEach(function (t) {
var e = TableExcelHelper.createRowTarget(o, t, n, i);
r.append(e);
});
return r;
}),
(TableExcelHelper.createRowTarget = function (t, e, n, i) {
var o = $("
");
o.data("rowData", e),
t.rowColumns.forEach(function (t, i) {
var r = $("
");
t.field && r.attr("field", t.field), t.align && r.css("text-align", t.align), t.vAlign && r.css("vertical-align", t.vAlign);
var a = TableExcelHelper.getColumnFormatter(t),
p = a ? a(e[t.field], e, i, n) : e[t.field];
r.html(p);
var s = TableExcelHelper.getColumnStyler(t);
if (s) {
var l = s(e[t.field], e, i, n);
if (l)
Object.keys(l).forEach(function (t) {
r.css(t, l[t]);
});
}
o.append(r);
});
var r = TableExcelHelper.getRowStyler(n, i);
if (r) {
var a = r(e, n);
if (a)
Object.keys(a).forEach(function (t) {
o.css(t, a[t]);
});
}
return o;
}),
(TableExcelHelper.createEmptyRowTarget = function (t) {
var e = TableExcelHelper.reconsitutionTableColumnTree(t),
n = $("
");
return (
e.rowColumns.forEach(function (t, e) {
var i = $("
");
t.field && i.attr("field", t.field), t.align && i.css("text-align", t.align), t.vAlign && i.css("vertical-align", t.vAlign), n.append(i);
}),
n
);
}),
(TableExcelHelper.getColumnsWidth = function (t, e) {
var n = {},
i = TableExcelHelper.allAutoWidth(t),
o = TableExcelHelper.allFixedWidth(t);
return (
t.rowColumns.forEach(function (t) {
if (t.fixed) n[t.id] = t.width;
else {
var r = e - o,
a = (t.width / i) * (r > 0 ? r : 0);
n[t.id] = a;
}
}),
n
);
}),
(TableExcelHelper.resizeTableCellWidth = function (t, e, n) {
var i = TableExcelHelper.reconsitutionTableColumnTree(e),
o = TableExcelHelper.getColumnsWidth(i, n);
t.find("thead tr td[haswidth]").map(function (t, e) {
var n = $(e).attr("id"),
i = o[n];
$(e).css("width", i + "pt");
});
}),
(TableExcelHelper.allAutoWidth = function (t) {
var e = 0;
return (
t.rowColumns.forEach(function (t) {
e += t.fixed ? 0 : t.width;
}),
e
);
}),
(TableExcelHelper.allFixedWidth = function (t) {
var e = 0;
return (
t.rowColumns.forEach(function (t) {
e += t.fixed ? t.width : 0;
}),
e
);
}),
(TableExcelHelper.reconsitutionTableColumnTree = function (t, e, n) {
var i = e || new _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__.a();
i.colspan = 0;
for (
var o = function o(e) {
(i.totalLayer = e + 1),
(i[e] = t[e].columns),
0 == e &&
t[e].columns.forEach(function (t) {
0 == e && (i.colspan += t.colspan);
});
},
r = 0;
r < t.length;
r++
) {
o(r);
}
return (i.rowColumns = TableExcelHelper.getOrderdColumns(i)), i;
}),
(TableExcelHelper.syncTargetWidthToOption = function (t) {
t.forEach(function (t) {
t.columns.forEach(function (t) {
t.hasWidth && (t.width = t.targetWidth);
});
});
}),
(TableExcelHelper.getFooterFormatter = function (options, tablePrintElementType) {
var footerFormatter = void 0;
if ((tablePrintElementType.footerFormatter && (footerFormatter = tablePrintElementType.footerFormatter), options.footerFormatter))
try {
var s = "footerFormatter=" + options.footerFormatter;
eval(s);
} catch (t) {
console.log(t);
}
return footerFormatter;
}),
(TableExcelHelper.getRowStyler = function (options, tablePrintElementType) {
var rowStyler = void 0;
if ((tablePrintElementType.rowStyler && (rowStyler = tablePrintElementType.rowStyler), options.rowStyler))
try {
var s = "rowStyler=" + options.rowStyler;
eval(s);
} catch (t) {
console.log(t);
}
return rowStyler;
}),
(TableExcelHelper.getColumnStyler = function (column) {
var styler = void 0;
if ((column.styler && (styler = column.styler), column.styler2))
try {
var s = "styler=" + column.styler2;
eval(s);
} catch (t) {
console.log(t);
}
return styler;
}),
(TableExcelHelper.getColumnFormatter = function (column) {
var formatter = void 0;
if ((column.formatter && (formatter = column.formatter), column.formatter2))
try {
var s = "formatter=" + column.formatter2;
eval(s);
} catch (t) {
console.log(t);
}
return formatter;
}),
(TableExcelHelper.getOrderdColumns = function (t) {
for (
var e = {},
n = function n(_n2) {
t[_n2].forEach(function (t) {
for (var i = 0; i < t.rowspan; i++) {
(e[_n2 + i] = e[_n2 + i] ? e[_n2 + i] : []), e[_n2 + i].push(t);
}
});
},
i = 0;
i < t.totalLayer;
i++
) {
n(i);
}
return e[t.totalLayer - 1];
}),
TableExcelHelper
);
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return i;
});
var i = (function () {
function t(t) {
(this.top = t.top),
(this.left = t.left),
(this.height = t.height),
(this.width = t.width),
(this.bottomInLastPaper = t.bottomInLastPaper),
(this.beginPrintPaperIndex = t.beginPrintPaperIndex),
(this.printTopInPaper = t.printTopInPaper),
(this.endPrintPaperIndex = t.endPrintPaperIndex);
}
return (
(t.prototype.isPositionLeftOrRight = function (t) {
return this.top <= t && this.top + this.height > t;
}),
t
);
})();
},
function (t, e, n) {
"use strict";
var i = (function () {
function t() {
this.name = "lineHeight";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("line-height", e + "pt"), "line-height:" + e + "pt";
t[0].style.lineHeight = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 字体行高\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
o = (function () {
function t() {
this.name = "fontFamily";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 字体\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("font-family", e), "font-family:" + e;
t[0].style.fontFamily = "";
}
return null;
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
r = (function () {
function t() {
this.name = "fontSize";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("font-size", e + "pt"), "font-size:" + e + "pt";
t[0].style.fontSize = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 字体大小\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
a = (function () {
function t() {
this.name = "fontWeight";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("font-weight", e), "font-weight:" + e;
t[0].style.fontWeight = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 字体粗细\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
p = (function () {
function t() {
this.name = "letterSpacing";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("letter-spacing", e + "pt"), "letter-spacing:" + e + "pt";
t[0].style.letterSpacing = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 字间距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
s = (function () {
function t() {
this.name = "textAlign";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e)
return (
t.css("text-align", e),
"justify" == e ? (t.css("text-align-last", "justify"), t.css("text-justify", "distribute-all-lines")) : ((t[0].style.textAlignLast = ""), (t[0].style.textJustify = "")),
"text-align:" + e
);
(t[0].style.textAlign = ""), (t[0].style.textAlignLast = ""), (t[0].style.textJustify = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 左右对齐\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
l = (function () {
function t() {
this.name = "hideTitle";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 标题显示隐藏\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString());
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
u = (function () {
function t() {
this.name = "tableBorder";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("table").length) {
if ("border" == e) return t.find("table").css("border", "1px solid"), "border:1px solid";
"noBorder" == e ? t.find("table").css("border", "0px solid") : (t.find("table")[0].style.border = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表格边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
d = (function () {
function t() {
this.name = "tableHeaderBorder";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("thead tr").length) {
if ("border" == e) return t.find("thead tr").css("border", "1px solid"), "border:1pt solid";
"noBorder" == e
? t.find("thead tr").css("border", "0px solid")
: "topBorder" == e
? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-top", "1px solid"))
: "bottomBorder" == e
? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-bottom", "1px solid"))
: "topBottomBorder" == e
? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-top", "1px solid"), t.find("thead tr").css("border-bottom", "1px solid"))
: t.find("thead tr").map(function (t, e) {
e.style.border = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表头边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
c = (function () {
function t() {
this.name = "tableHeaderCellBorder";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("thead tr td").length) {
if ("border" == e) return t.find("thead tr td").css("border", "1px solid"), "border:1px solid";
"noBorder" == e
? t.find("thead tr td").css("border", "0px solid")
: t.find("thead tr td").map(function (t, e) {
e.style.border = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表头单元格边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
h = (function () {
function t() {
this.name = "tableHeaderRowHeight";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("thead tr td").length) {
if (e) return t.find("thead tr td:not([rowspan])").css("height", e + "pt"), "height:" + e + "pt";
t.find("thead tr td").map(function (t, e) {
e.style.height = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表头行高\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
f = (function () {
function t() {
this.name = "tableHeaderFontSize";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("thead").length) {
if (e) return t.find("thead").css("font-size", e + "pt"), "font-size:" + e + "pt";
t.find("thead").map(function (t, e) {
e.style.fontSize = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表头字体大小\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
g = (function () {
function t() {
this.name = "tableHeaderFontWeight";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("thead").length) {
if (e) return t.find("thead tr td").css("font-weight", e), "font-weight:" + e;
t.find("thead tr td").map(function (t, e) {
e.style.fontWeight = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表头字体粗细\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
m = (function () {
function t() {
this.name = "tableBodyCellBorder";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("tbody tr td").length) {
if ("border" == e) return t.find("tbody tr td").css("border", "1px solid"), "border:1px solid";
"noBorder" == e
? t.find("tbody tr td").css("border", "0px solid")
: t.find("tbody tr td").map(function (t, e) {
e.style.border = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表体单元格\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
v = (function () {
function t() {
this.name = "tableBodyRowHeight";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("tbody tr td").length) {
if (e) return t.find("tbody tr td:not([rowspan])").css("height", e + "pt"), "height:" + e + "pt";
t.find("tbody tr td").map(function (t, e) {
e.style.height = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表体行高\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
y = (function () {
function t() {
this.name = "tableHeaderBackground";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("thead").length) {
if (e) return t.find("thead").css("background", e), "background:" + e;
t.find("thead").map(function (t, e) {
e.style.background = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表头背景\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").minicolors({
defaultValue: t || "",
theme: "bootstrap"
}),
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
b = (function () {
function t() {
this.name = "borderWidth";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 边框大小\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-width", e + "pt"), "border-width:" + e + "pt";
t[0].style.borderWidth = "";
}
return null;
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
E = (function () {
function t() {
this.name = "barcodeMode";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 条形码格式\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
return t || void 0;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
T = (function () {
function t() {
this.name = "color";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("color", e), "color:" + e;
t[0].style.color = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 字体颜色\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").minicolors({
defaultValue: t || "",
theme: "bootstrap"
}),
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
P = (function () {
function t() {
this.name = "textDecoration";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 文本修饰\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("text-decoration", e), "text-decoration:" + e;
t[0].style.textDecoration = "";
}
return null;
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
_ = (function () {
function t() {
this.name = "field";
}
return (
(t.prototype.createTarget = function (t) {
var e = void 0;
if ((t && (e = t.getFields()), e)) {
this.isSelect = !0;
var n =
'
'
);
}
return this.target;
}),
(t.prototype.getValue = function () {
return (this.isSelect ? this.target.find("select").val() : this.target.find("input").val()) || void 0;
}),
(t.prototype.setValue = function (t) {
this.isSelect
? t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"), this.target.find("select").val(t))
: this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
w = (function () {
function t() {
this.name = "title";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 标题\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
x = (function () {
function t() {
this.name = "testData";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 测试数据\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
C = (function () {
function t() {
this.name = "src";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 图片地址\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
O = (function () {
function t() {
this.name = "borderColor";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-color", e), "border-color:" + e;
t[0].style.borderColor = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 边框颜色\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").minicolors({
defaultValue: t || "",
theme: "bootstrap"
}),
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
H = (function () {
function t() {
this.name = "paperNumberFormat";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 页码格式\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
D = (function () {
function t() {
this.name = "paperNumberDisabled";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 启用/禁用\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
I = (function () {
function t() {
this.name = "longTextIndent";
}
return (
(t.prototype.css = function (t, e) {
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 每行缩进\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
R = (function () {
function t() {
this.name = "showInPage";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 显示规则\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
M = (function () {
function t() {
this.name = "panelPaperRule";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 打印规则\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
S = (function () {
function t() {
this.name = "leftSpaceRemoved";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 移除段落左侧空白\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
if ("false" == this.target.find("select").val()) return !1;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString());
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
B = (function () {
function t() {
this.name = "firstPaperFooter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 首页页尾\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
F = (function () {
function t() {
this.name = "lastPaperFooter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 尾页页尾\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
L = (function () {
function t() {
this.name = "evenPaperFooter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 偶数页页尾\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
A = (function () {
function t() {
this.name = "oddPaperFooter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 奇数页页尾\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
z = (function () {
function t() {
this.name = "fixed";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 位置固定\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString());
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
k = (function () {
function t() {
this.name = "axis";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 拖动方向\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
return t || void 0;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
N = (function () {
function t() {
this.name = "leftOffset";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 左偏移\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
V = (function () {
function t() {
this.name = "lHeight";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 最低高度\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
W = (function () {
function t() {
this.name = "unShowInPage";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 隐藏规则\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
j = (function () {
function t() {
this.name = "tableBodyRowBorder";
}
return (
(t.prototype.css = function (t, e) {
if (t.find("tbody tr").length) {
if ("border" == e) return t.find("tbody tr").css("border", "1px solid"), "border:1pt solid";
"noBorder" == e
? t.find("tbody tr").css("border", "0px solid")
: "topBorder" == e
? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-top", "1px solid"))
: "bottomBorder" == e
? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-bottom", "1px solid"))
: "topBottomBorder" == e
? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-top", "1px solid"), t.find("tbody tr").css("border-bottom", "1px solid"))
: t.find("tbody tr").map(function (t, e) {
e.style.border = "";
});
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表体行边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
U = (function () {
function t() {
this.name = "transform";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
var n = t.find(".hiprint-printElement-content");
if (e)
return (
n.css("transform", "rotate(" + e + "deg)"),
n.css("-ms-transform", "rotate(" + e + "deg)"),
n.css("-moz-transform", "rotate(" + e + "deg)"),
n.css("-webkit-transform", "rotate(" + e + "deg)"),
n.css("-o-transform", "rotate(" + e + "deg)"),
"transform:rotate(" + e + "deg)"
);
n.length && (n[0].style.transform = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 旋转角度\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
K = (function () {
function t() {
this.name = "optionsGroup";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $('
\n
\n 边框设置\n
\n \n
')),
this.target
);
}),
(t.prototype.getValue = function () {}),
(t.prototype.setValue = function (t) {}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
G = (function () {
function t() {
this.name = "borderTop";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-top-style", e), "border-top:1px";
(t[0].style.borderTopStyle = ""), (t[0].style.borderTopWidth = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 上边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
q = (function () {
function t() {
this.name = "borderLeft";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-left-style", e), "border-left:1px";
(t[0].style.borderLeftStyle = ""), (t[0].style.borderLeftWidth = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 左边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
X = (function () {
function t() {
this.name = "borderRight";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-right-style", e), "border-right:1px";
(t[0].style.borderRightStyle = ""), (t[0].style.borderRightWidth = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 右边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
Y = (function () {
function t() {
this.name = "borderBottom";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-bottom-style", e), "border-bottom-style:1px solid";
(t[0].style.borderBottomStyle = ""), (t[0].style.borderBottomWidth = "");
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 下边框\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
J = (function () {
function t() {
this.name = "contentPaddingLeft";
}
return (
(t.prototype.css = function (t, e) {
var n = t.find(".hiprint-printElement-content");
if (n && n.length) {
if (e) return n.css("padding-left", e + "pt"), "padding-left";
n[0].style.paddingLeft = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 左内边距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
Q = (function () {
function t() {
this.name = "contentPaddingTop";
}
return (
(t.prototype.css = function (t, e) {
var n = t.find(".hiprint-printElement-content");
if (n && n.length) {
if (e) return n.css("padding-top", e + "pt"), "padding-top";
n[0].style.paddingTop = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 上内边距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
Z = (function () {
function t() {
this.name = "contentPaddingRight";
}
return (
(t.prototype.css = function (t, e) {
var n = t.find(".hiprint-printElement-content");
if (n && n.length) {
if (e) return n.css("padding-right", e + "pt"), "padding-right";
n[0].style.paddingRight = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 右内边距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
tt = (function () {
function t() {
this.name = "contentPaddingBottom";
}
return (
(t.prototype.css = function (t, e) {
var n = t.find(".hiprint-printElement-content");
if (n && n.length) {
if (e) return n.css("padding-bottom", e + "pt"), "padding-bottom";
n[0].style.paddingBottom = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 下内边距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
et = (function () {
function t() {
this.name = "borderStyle";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-style", e), "border-style:1px";
t[0].style.borderStyle = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 边框样式\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
nt = (function () {
function t() {
this.name = "backgroundColor";
}
return (
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("background-color", e), "background-color:" + e;
t[0].style.backgroundColor = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 背景颜色\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("input").minicolors({
defaultValue: t || "",
theme: "bootstrap"
}),
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
it = (function () {
function t() {
this.name = "orient";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 纸张方向(仅自定义纸质有效)\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
ot = (function () {
function t() {
this.name = "textContentVerticalAlign";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 上下对齐\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return "middle" === e && t.addClass("hiprint-text-content-middle"), "bottom" === e && t.addClass("hiprint-text-content-bottom"), "";
t.removeClass("hiprint-text-content-middle"), t.removeClass("hiprint-text-content-bottom");
}
return null;
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
rt = n(5),
at = (function () {
function t() {
this.name = "columns";
}
return (
(t.prototype.createTarget = function () {
$('').appendTo("body");
return (
" \n \n ",
(this.target = $(
'
\n
\n
\n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
return this.buildData();
}),
(t.prototype.setValue = function (t, e, n) {
var i = this,
o = this;
(this.value = t), (this.options = e), (this.printElementType = n);
var r = n.columns[0]
.filter(function (e) {
return (
0 ==
t[0].columns.filter(function (t) {
return e.columnId == t.columnId;
}).length
);
})
.map(function (t) {
var e = new rt.a(t);
return (e.checked = !1), e;
});
(this.allColumns = t[0].columns.concat(r)),
t &&
1 == t.length &&
(this.target.find("ul").html(
this.allColumns
.map(function (t, e) {
return (
'
\n ' +
(t.checked ? '' : '') +
'\n
\n \n
\n
' +
(t.title || t.descTitle || "") +
"
"
);
})
.join("")
),
this.target.find("input").change(function () {
i.submit();
}),
this.printElementType.columnDisplayIndexEditable &&
this.target
.find("li")
.hidraggable({
revert: !0,
handle: ".column-title",
moveUnit: "pt",
deltaX: 0,
deltaY: 0
})
.hidroppable({
onDragOver: function onDragOver(t, e) {
$(this).css("border-bottom-color", "red");
},
onDragLeave: function onDragLeave(t, e) {
$(this).css("border-bottom-color", "");
},
onDrop: function onDrop(t, e) {
$(e).insertAfter(this), $(this).css("border-bottom-color", ""), o.submit();
}
}));
}),
(t.prototype.buildData = function () {
var t = this,
e = [];
return (
this.allColumns.filter(function (t) {
t.checked = !1;
}),
(this.printElementType.columnDisplayEditable ? this.target.find("input:checked") : this.target.find("input")).map(function (n, i) {
var o = $(i).attr("column-id"),
r = t.options.makeColumnObj();
if (r[o]) (r[o].checked = !0), e.push(r[o]);
else {
var a = t.printElementType.getColumnByColumnId(o);
if (a) {
var p = new rt.a(a);
(p.checked = !0), e.push(p);
}
}
}),
(this.value[0].columns = e),
this.value
);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
pt = (function () {
function t() {
this.name = "textType";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 打印类型\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
st = (function () {
function t() {
this.name = "topOffset";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 顶部偏移\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
this.target.find("input").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
lt = (function () {
function t() {
this.name = "gridColumns";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 一行多组\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
ut = (function () {
function t() {
this.name = "gridColumnsGutter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 一行多组间隔\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.css = function (t, e) {
if (t && t.length) {
if (e)
return (
t
.find(".table-grid-row")
.css("margin-left", "-" + e + "pt")
.css("margin-right", "-" + e + "pt"),
t
.find(".tableGridColumnsGutterRow")
.css("padding-left", e + "pt")
.css("padding-right", e + "pt"),
null
);
t.find(".table-grid-row").map(function (t, e) {
(e.style.marginLeft = ""), (e.style.marginRight = "");
}),
t.find(".tableGridColumnsGutterRow").map(function (t, e) {
(e.style.paddingLeft = ""), (e.style.paddingRight = "");
});
}
return null;
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
dt = (function () {
function t() {
this.name = "paddingLeft";
}
return (
(t.prototype.css = function (t, e) {
var n = t;
if (n && n.length) {
if (e) return n.css("padding-left", e + "pt"), "padding-left";
n[0].style.paddingLeft = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 左内边距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
ct = (function () {
function t() {
this.name = "paddingRight";
}
return (
(t.prototype.css = function (t, e) {
var n = t;
if (n && n.length) {
if (e) return n.css("padding-right", e + "pt"), "padding-right";
n[0].style.paddingRight = "";
}
return null;
}),
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 右内边距\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString());
}),
(t.prototype.setValue = function (t) {
t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"));
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
ht = (function () {
function t() {
this.name = "dataType";
}
return (
(t.prototype.createTarget = function () {
var t = this;
return (
(this.target = $(
'\n
\n
\n
\n 数据类型\n
\n
\n \n
\n
\n
\n
\n 格式\n
\n
\n \n \n
\n
\n
\n '
)),
$(this.target.find(".hiprint-option-item-datatype")).change(function () {
var e = $(t.target.find(".hiprint-option-item-datatype")).val();
t.loadFormatSelectByDataType(e), t.submit(t.getValue());
}),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find(".hiprint-option-item-datatype").val();
if (t) {
var e = this.target.find(".hiprint-option-item-datatype-format").val();
return {
dataType: t,
format: e || void 0
};
}
return {
dataType: void 0,
format: void 0
};
}),
(t.prototype.setValue = function (t, e) {
this.target.find(".hiprint-option-item-datatype").val(e.dataType || ""),
this.loadFormatSelectByDataType(e.dataType),
this.target.find(".hiprint-option-item-datatype-format").val(e.format || "");
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
(t.prototype.loadFormatSelectByDataType = function (t) {
"boolean" === t
? (this.target.find(".hiprint-option-item-datatype-select-format").removeClass("hiprint-option-item-datatype-format").hide().val(""),
this.target.find(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").show())
: "datetime" === t
? (this.target.find(".hiprint-option-item-datatype-select-format").addClass("hiprint-option-item-datatype-format").show(),
this.target.find(".hiprint-option-item-datatype-input-format").removeClass("hiprint-option-item-datatype-format").hide().val(""),
this.target
.find(".hiprint-option-item-datatype-select-format")
.html(
'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '
))
: (this.target.find(".hiprint-option-item-datatype-select-format").show(),
this.target.find(".hiprint-option-item-datatype-input-format").hide().val(""),
this.target.find(".hiprint-option-item-datatype-format").html('\n \n '));
}),
t
);
})(),
ft = (function () {
function t() {
this.name = "formatter";
}
return (
(t.prototype.createTarget = function () {
var t =
'
\n
\n 格式化函数\n
\n
\n \n
\n
';
return (this.target = $(t)), this.target;
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
gt = (function () {
function t() {
this.name = "styler";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 样式函数\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
mt = (function () {
function t() {
this.name = "footerFormatter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表格脚函数\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
vt = (function () {
function t() {
this.name = "gridColumnsFooterFormatter";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 多组表格脚函数\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
yt = (function () {
function t() {
this.name = "rowStyler";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 行样式函数\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
bt = (function () {
function t() {
this.name = "align";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 单元格左右对齐\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
Et = (function () {
function t() {
this.name = "vAlign";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 单元格上下对齐\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
Tt = (function () {
function t() {
this.name = "halign";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表格头单元格左右对齐\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
Pt = (function () {
function t() {
this.name = "styler2";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 单元格样式函数\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
_t = (function () {
function t() {
this.name = "formatter2";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 单元格格式化函数\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t;
}),
(t.prototype.setValue = function (t) {
this.target.find("textarea").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
wt = (function () {
function t() {
this.name = "autoCompletion";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 自动补全\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0;
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString());
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})(),
xt = (function () {
function t() {
this.name = "tableFooterRepeat";
}
return (
(t.prototype.createTarget = function () {
return (
(this.target = $(
'
\n
\n 表格脚显示\n
\n
\n \n
\n
'
)),
this.target
);
}),
(t.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString();
}),
(t.prototype.setValue = function (t) {
this.target.find("select").val(t);
}),
(t.prototype.destroy = function () {
this.target.remove();
}),
t
);
})();
n.d(e, "a", function () {
return Ct;
});
var Ct = (function () {
function t() {}
return (
(t.init = function () {
t.printElementOptionItems ||
((t.printElementOptionItems = {}),
t._printElementOptionItems.forEach(function (e) {
t.printElementOptionItems[e.name] = e;
}));
}),
(t.registerItem = function (e) {
if (!e.name) throw new Error("styleItem must have name");
t.init(), (t.printElementOptionItems[e.name] = e);
}),
(t.getItem = function (e) {
return t.init(), t.printElementOptionItems[e];
}),
(t._printElementOptionItems = [
new o(),
new r(),
new a(),
new p(),
new i(),
new s(),
new l(),
new pt(),
new u(),
new d(),
new c(),
new h(),
new f(),
new g(),
new m(),
new v(),
new y(),
new b(),
new E(),
new T(),
new P(),
new _(),
new w(),
new x(),
new C(),
new O(),
new H(),
new D(),
new I(),
new R(),
new M(),
new S(),
new B(),
new F(),
new L(),
new A(),
new z(),
new k(),
new st(),
new N(),
new V(),
new W(),
new j(),
new U(),
new K(),
new G(),
new q(),
new X(),
new Y(),
new Q(),
new J(),
new Z(),
new tt(),
new et(),
new nt(),
new it(),
new ot(),
new at(),
new lt(),
new ut(),
new dt(),
new ct(),
new ht(),
new ft(),
new gt(),
new mt(),
new vt(),
new yt(),
new bt(),
new Tt(),
new Et(),
new Pt(),
new _t(),
new wt(),
new xt()
]),
t
);
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return o;
}),
n.d(e, "b", function () {
return r;
});
var i = n(14),
o = (function () {
function t(t, e) {
(this.selectedCells = []), (this.rows = t), (this.tableTatget = e);
}
return (
(t.prototype.clear = function () {
this.tableTatget.find("td").removeClass("selected");
}),
(t.prototype.setSingleSelect = function (t) {
(this.startCell = t), (this.selectedCells = []);
}),
(t.prototype.getSingleSelect = function () {
if (this.selectedCells.length) {
if (1 == this.selectedCells.length) return 1 == this.selectedCells[0].length ? this.selectedCells[0][0] : void 0;
if (this.selectedCells.length > 1) return;
}
return this.startCell;
}),
(t.prototype.singleSelectByXY = function (t, e) {
var n = this.getCellByXY(t, e);
n && (this.clear(), n && (n.cell.select(), (this.startCell = n), (this.selectedCells = [])));
}),
(t.prototype.multipleSelectByXY = function (t, e) {
this.clear();
var n = [];
if (this.startCell) {
var o = this.getCellByXY(t, e);
if (o) {
var r = i.a.mergeRect(this.startCell.cell.getTableRect(), o.cell.getTableRect());
this.selectByRect(new a(r), n);
}
}
this.selectedCells = n;
}),
(t.prototype.selectByRect = function (t, e) {
this.rows.forEach(function (n, i) {
var o = [];
n.columns.forEach(function (e) {
e.isInRect(t) && (o.push(new p(i, e)), e.select());
}),
o.length && e.push(o);
}),
t.changed && ((t.changed = !1), e.splice(0, e.length), this.selectByRect(t, e));
}),
(t.prototype.getSelectedCells = function () {
return this.selectedCells;
}),
(t.prototype.getCellByXY = function (t, e) {
var n;
return (
this.rows.forEach(function (i, o) {
var r = i.columns.filter(function (n) {
return n.isXYinCell(t, e);
});
r.length && (n = new p(o, r[0]));
}),
n
);
}),
t
);
})(),
r = (function () {
return function (t) {
(this.x = t.x), (this.y = t.y), (this.height = t.height), (this.width = t.width);
};
})(),
a = (function () {
return function (t) {
this.rect = t;
};
})(),
p = (function () {
return function (t, e) {
(this.rowIndex = t), (this.cell = e);
};
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return i;
});
var i = (function () {
function t() {}
return (
(t.createId = function () {
return (this.id += 1), this.id;
}),
(t.id = 1),
t
);
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return p;
});
var _i,
o = n(5),
r = n(13),
a =
((_i = function i(t, e) {
return (_i =
Object.setPrototypeOf ||
(_instanceof(
{
__proto__: []
},
Array
) &&
function (t, e) {
t.__proto__ = e;
}) ||
function (t, e) {
for (var n in e) {
e.hasOwnProperty(n) && (t[n] = e[n]);
}
})(t, e);
}),
function (t, e) {
function n() {
this.constructor = t;
}
_i(t, e), (t.prototype = null === e ? Object.create(e) : ((n.prototype = e.prototype), new n()));
}),
p = (function (t) {
function e(e) {
var n = t.call(this) || this;
((n.columns = []), e && e.constructor === Array)
? (e || []).forEach(function (t) {
n.columns.push(new o.a(t));
})
: e.columns &&
(e.columns || []).forEach(function (t) {
n.columns.push(new o.a(t));
});
return n;
}
return (
a(e, t),
(e.prototype.getPrintElementOptionEntity = function () {
var t = [];
return (
this.columns.forEach(function (e) {
t.push(e.getEntity());
}),
t
);
}),
e
);
})(r.a);
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return r;
});
var i = n(11),
o = n(5),
r = (function () {
function t() {
this.id = i.a.createId();
}
return (
(t.prototype.init = function (t, e, n) {
(this.isHead = n), (this.target = e || $("
")), (this.tableOptions = t), this.initCells(this.columns);
}),
(t.prototype.getTarget = function () {
return this.target;
}),
(t.prototype.initCells = function (t) {
var e = this;
t
? t.forEach(function (t, n) {
t.init(e.target.find("td:eq(" + n + ")"), e.tableOptions, e.id, e.isHead);
})
: ((this.columns = []),
this.target.find("td").map(function (t, n) {
var i = new o.a();
i.init($(n), e.tableOptions, e.id, e.isHead), e.columns.push(i);
}));
}),
(t.prototype.removeCell = function (t) {
var e = this.columns.indexOf(t);
this.columns[e].getTarget().remove(), this.columns.splice(e, 1);
}),
(t.prototype.createTableCell = function (t, e) {
var n = new o.a();
return (
n.init($("
"), this.tableOptions, this.id, this.isHead),
t > 1 && (n.getTarget().attr("rowspan", t), (n.rowspan = t)),
e > 1 && (n.getTarget().attr("colspan", e), (n.colspan = e)),
n
);
}),
(t.prototype.insertToTargetCellLeft = function (t, e) {
var n = this.columns.indexOf(t);
t.getTarget().before(e.getTarget()), this.columns.splice(n, 0, e);
}),
(t.prototype.insertToTargetCellRight = function (t, e) {
var n = this.columns.indexOf(t);
this.columns[n].getTarget().after(e.getTarget()), this.columns.splice(n + 1, 0, e);
}),
(t.prototype.insertCellToFirst = function (t) {
this.target.prepend(t.getTarget()), this.columns.splice(0, 0, t);
}),
(t.prototype.insertCellToLast = function (t) {
this.columns.push(t), this.target.append(t.getTarget());
}),
(t.prototype.getPrintElementOptionEntity = function () {
var t = [];
return (
this.columns.forEach(function (e) {
t.push(e.getEntity());
}),
t
);
}),
t
);
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return o;
});
var i = n(10),
o = (function () {
function t() {}
return (
(t.mergeRect = function (t, e) {
var n = Math.min(t.x, e.x),
o = Math.min(t.y, e.y);
return new i.b({
x: n,
y: o,
height: Math.max(t.y + t.height, e.y + e.height) - o,
width: Math.max(t.x + t.width, e.x + e.width) - n
});
}),
(t.Rect = function (t, e, n, i) {
return {
minX: t < n ? t : n,
minY: e < i ? e : i,
maxX: t < n ? n : t,
maxY: e < i ? i : e
};
}),
t
);
})();
},
function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "a", function () {
return TablePrintElement;
});
var _BasePrintElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4),
_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
_dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0),
_PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8),
_option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18),
_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7),
_hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16),
_table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(20),
_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2),
__extends =
((_extendStatics = function extendStatics(t, e) {
return (_extendStatics =
Object.setPrototypeOf ||
(_instanceof(
{
__proto__: []
},
Array
) &&
function (t, e) {
t.__proto__ = e;
}) ||
function (t, e) {
for (var n in e) {
e.hasOwnProperty(n) && (t[n] = e[n]);
}
})(t, e);
}),
function (t, e) {
function n() {
this.constructor = t;
}
_extendStatics(t, e), (t.prototype = null === e ? Object.create(e) : ((n.prototype = e.prototype), new n()));
}),
_extendStatics,
TablePrintElement = (function (_super) {
function TablePrintElement(t, e) {
var n = _super.call(this, t) || this;
return (
(n.gridColumnsFooterCss = "hiprint-gridColumnsFooter"),
(n.tableGridRowCss = "table-grid-row"),
(n.options = new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(e, n.printElementType)),
n.options.setDefault(
new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table.default).getPrintElementOptionEntity()
),
n
);
}
return (
__extends(TablePrintElement, _super),
(TablePrintElement.prototype.getColumns = function () {
return this.options.columns;
}),
(TablePrintElement.prototype.getColumnByColumnId = function (t) {
return this.options.getColumnByColumnId(t);
}),
(TablePrintElement.prototype.updateDesignViewFromOptions = function () {
if (this.designTarget) {
this.css(this.designTarget, this.getData());
var t = this.designTarget.find(".hiprint-printElement-table-content"),
e = this.getHtml(this.designPaper);
t.html(""), t.append(e[0].target.find(".table-grid-row")), this.printElementType.editable && this.setHitable(), this.setColumnsOptions();
}
}),
(TablePrintElement.prototype.css = function (t, e) {
if ((this.getField() || !this.options.content) && !this.printElementType.formatter) return _super.prototype.css.call(this, t, e);
}),
(TablePrintElement.prototype.getDesignTarget = function (t) {
return (
(this.designTarget = this.getHtml(t)[0].target),
(this.designPaper = t),
this.designTarget.find("td").hidroppable({
accept: ".rn-draggable-item",
onDrop: function onDrop(t, e) {},
onDragEnter: function onDragEnter(t, e) {
$(e).removeClass("rn-draggable-item");
},
onDragLeave: function onDragLeave(t, e) {
$(e).addClass("rn-draggable-item");
}
}),
this.designTarget
);
}),
(TablePrintElement.prototype.getConfigOptions = function () {
return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table;
}),
(TablePrintElement.prototype.createTarget = function (t, e, n) {
for (
var i = $(
'
'
),
o = this.createGridColumnsStructure(n),
r = 0;
r < o.gridColumns;
r++
) {
o.getByIndex(r).append(this.getTableHtml(e, n));
}
return i.find(".hiprint-printElement-table-content").append(o.target), i;
}),
(TablePrintElement.prototype.createGridColumnsStructure = function (t) {
for (var e = $(''), n = 0; n < this.options.getGridColumns(); n++) {
var i = $('');
e.append(i);
}
var o = this.getGridColumnsFooterFormatter();
if (o) {
var r = $('');
r.append(o(this.options, this.getData(t), t, [])), e.append(r);
}
return new _table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__.a(this.options.getGridColumns(), e);
}),
(TablePrintElement.prototype.createtempEmptyRowsTargetStructure = function (t) {
if (this.getField()) return this.createTarget(this.printElementType.title, []);
var e = this.createTarget(this.printElementType.title, []).clone();
return e.find(".hiprint-printElement-tableTarget tbody tr").remove(), e;
}),
(TablePrintElement.prototype.getTableHtml = function (t, e) {
var n, i;
if (!this.getField() && this.options.content) return (n = $("")).append(this.options.content), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i;
if (this.printElementType.formatter) return (n = $("")).append(this.printElementType.formatter(t)), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i;
var o = $('
');
return (
o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableHead(this.getColumns(), this.options.getWidth() / this.options.getGridColumns())),
o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableRow(this.getColumns(), t, this.options, this.printElementType)),
this.getFooterFormatter() &&
("no" == this.options.tableFooterRepeat ||
("last" == this.options.tableFooterRepeat
? o
.find("tbody")
.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, t).html())
: o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, [])))),
o
);
}),
(TablePrintElement.prototype.getEmptyRowTarget = function () {
return _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createEmptyRowTarget(this.getColumns());
}),
(TablePrintElement.prototype.getHtml = function (t, e) {
this.createTempContainer();
var n = this.getPaperHtmlResult(t, e);
return this.removeTempContainer(), n;
}),
(TablePrintElement.prototype.getPaperHtmlResult = function (t, e) {
var n = [],
i = this.getData(e),
o = this.getTableHtml(i, e),
r = this.createtempEmptyRowsTargetStructure(e);
e ? this.updateTargetWidth(r) : this.updateTargetSize(r), this.css(r, i), this.css(o, i), this.getTempContainer().html(""), this.getTempContainer().append(r);
for (var a, p = this.getBeginPrintTopInPaperByReferenceElement(t), s = 0, l = !1; !l; ) {
var u = 0,
d = t.getPaperFooter(s);
0 == s &&
p > d &&
((p = p - d + t.paperHeader),
n.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
target: void 0,
printLine: void 0
})
),
(u = t.getContentHeight(s) - (p - t.paperHeader)),
s++,
(d = t.getPaperFooter(s)));
var c = n.length > 0 ? n[n.length - 1].target : void 0,
h = this.getRowsInSpecificHeight(e, u > 0 ? u : 0 == s ? d - p : t.getContentHeight(s), r, o, s, c);
l = h.isEnd;
var f = void 0;
h.target && (h.target.css("left", this.options.displayLeft()), (h.target[0].height = "")),
0 == s || u > 0
? (h.target && ((a = p), h.target.css("top", p + "pt")),
(f = l && null != this.options.lHeight ? p + (h.height > this.options.lHeight ? h.height : this.options.lHeight) : p + h.height))
: (h.target && ((a = t.paperHeader), h.target.css("top", t.paperHeader + "pt")), (f = t.paperHeader + h.height)),
n.push(
new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
target: h.target,
printLine: f,
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: f,
printTopInPaper: a
})
})
),
s++;
}
return n;
}),
(TablePrintElement.prototype.getRowsInSpecificHeight = function (t, e, n, i, o, r) {
var a = i.find("tbody"),
p = _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.pt.toPx(e);
n.find(".hiprint-printElement-tableTarget tbody").html("");
var s = n.outerHeight();
if (s > p)
return {
target: void 0,
length: 0,
height: 0,
isEnd: !1
};
for (var l = [], u = 0; u < this.options.getGridColumns(); u++) {
for (var d = n.find(".hiprint-printElement-tableTarget:eq(" + u + ")"), c = void 0, h = []; ; ) {
console.log(u);
if (s <= p)
if (0 == a.find("tr").length)
(c = {
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
isEnd: !0
}),
t && this.options.autoCompletion && (this.autoCompletion(p, d), (s = n.outerHeight()));
else {
var f = a.find("tr:lt(1)");
d.find("tbody").append(f);
var g = f.data("rowData");
l.push(g),
h.push(g),
(s = n.outerHeight()) > p &&
(a.prepend(f),
l.pop(),
h.pop(),
(s = n.outerHeight()),
(c = {
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
isEnd: !1
}));
}
if (c) {
if (this.getFooterFormatter())
d.find("tfoot").length &&
d
.find("tfoot")
.html(
_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, this.getData(t), this.options, this.printElementType, t, h).html()
);
break;
}
}
}
var m = n.find(".hiprint-printElement-tableTarget tbody tr").length,
v = this.getGridColumnsFooterFormatter();
return (
v && n.find(this.gridColumnsFooterCss).html(v(this.options, this.getData(t), t, l)),
0 == a.find("tr").length
? 0 == m && r
? {
target: void 0,
length: 0,
height: 0,
isEnd: !0
}
: {
target: n.clone(),
length: m,
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
isEnd: !0
}
: {
target: n.clone(),
length: m,
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
isEnd: !1
}
);
}),
(TablePrintElement.prototype.autoCompletion = function (t, e) {
for (var n, i = this.getEmptyRowTarget(), o = e.outerHeight(); t > o; ) {
(n = i.clone()), e.find("tbody").append(n), (o = e.outerHeight());
}
n && n.remove();
}),
(TablePrintElement.prototype.getData = function (t) {
if (!t) return [{}];
var e = t[this.getField()];
return e ? JSON.parse(JSON.stringify(e)) : [];
}),
(TablePrintElement.prototype.onResize = function (t, e, n, i, o) {
_super.prototype.updateSizeAndPositionOptions.call(this, o, i, n, e),
_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.resizeTableCellWidth(this.designTarget, this.getColumns(), this.options.getWidth());
}),
(TablePrintElement.prototype.getReizeableShowPoints = function () {
return ["s", "e"];
}),
(TablePrintElement.prototype.design = function (t, e) {
var n = this;
this.designTarget.hidraggable({
handle: this.designTarget.find(".hiprint-printElement-table-handle"),
axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
onDrag: function onDrag(t, i, o) {
n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
},
moveUnit: "pt",
minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
onBeforeDrag: function onBeforeDrag(t) {
(_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0), n.createLineOfPosition(e);
},
onStopDrag: function onStopDrag(t) {
(_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1), n.removeLineOfPosition();
}
}),
this.printElementType.editable && this.setHitable(),
this.setColumnsOptions(),
this.designTarget.hireizeable({
showPoints: n.getReizeableShowPoints(),
noContainer: !0,
onBeforeResize: function onBeforeResize() {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0;
},
onResize: function onResize(t, i, o, r, a) {
n.onResize(t, i, o, r, a), n.hitable && n.hitable.updateColumnGrips(), n.createLineOfPosition(e);
},
onStopResize: function onStopResize() {
(_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1), n.removeLineOfPosition();
}
}),
this.bingKeyboardMoveEvent(this.designTarget, e);
}),
(TablePrintElement.prototype.setHitable = function () {
var t = this;
(this.hitable = new _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__.a({
table: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),
rows: this.getColumns(),
resizeRow: !1,
resizeColumn: !0,
trs: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),
handle: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),
isEnableEdit: this.printElementType.editable,
columnDisplayEditable: this.printElementType.columnDisplayEditable,
columnDisplayIndexEditable: this.printElementType.columnDisplayIndexEditable,
columnResizable: this.printElementType.columnResizable,
columnAlignEditable: this.printElementType.columnAlignEditable,
isEnableEditText: this.printElementType.columnTitleEditable,
isEnableEditField: !1,
isEnableContextMenu: !0,
isEnableInsertRow: !1,
isEnableDeleteRow: !1,
isEnableInsertColumn: !1,
isEnableDeleteColumn: !1,
isEnableMergeCell: !1
})),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.on("updateTable" + this.hitable.id, function () {
t.updateDesignViewFromOptions();
});
}),
(TablePrintElement.prototype.setColumnsOptions = function () {
var t = this;
this.designTarget
.find(".hiprint-printElement-tableTarget:eq(0)")
.find("thead td")
.bind("click.hiprint", function (e) {
var n = $(e.target).attr("column-id"),
i = t.getColumnByColumnId(n);
if (i) {
var o = t.getPrintElementOptionItemsByName("tableColumn");
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(t.getPrintElementSelectEventKey(), {
printElement: t,
customOptionsInput: [
{
title: i.title + "-列属性",
optionItems: o,
options: i,
callback: function callback(t) {
o.forEach(function (t) {
var e = t.getValue();
i[t.name] = e;
});
}
}
]
});
} else
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(t.getPrintElementSelectEventKey(), {
printElement: t
});
});
}),
(TablePrintElement.prototype.filterOptionItems = function (t) {
var e = _super.prototype.filterOptionItems.call(this, t);
return this.printElementType.editable && 1 == this.options.columns.length
? e
: t.filter(function (t) {
return "columns" != t.name;
});
}),
(TablePrintElement.prototype.getFooterFormatter = function () {
var footerFormatter = void 0;
if ((this.printElementType.footerFormatter && (footerFormatter = this.printElementType.footerFormatter), this.options.footerFormatter))
try {
var s = "footerFormatter=" + this.options.footerFormatter;
eval(s);
} catch (t) {
console.log(t);
}
return footerFormatter;
}),
(TablePrintElement.prototype.getGridColumnsFooterFormatter = function () {
var gridColumnsFooterFormatter = void 0;
if ((this.printElementType.gridColumnsFooterFormatter && (gridColumnsFooterFormatter = this.printElementType.gridColumnsFooterFormatter), this.options.gridColumnsFooterFormatter))
try {
var s = "gridColumnsFooterFormatter=" + this.options.gridColumnsFooterFormatter;
eval(s);
} catch (t) {
console.log(t);
}
return gridColumnsFooterFormatter;
}),
TablePrintElement
);
})(_BasePrintElement__WEBPACK_IMPORTED_MODULE_0__.a);
},
function (t, e, n) {
"use strict";
var i = (function () {
return function (t) {
(this.table = t.table),
(this.isEnableEdit = t.isEnableEdit),
(this.trs = t.trs),
(this.resizeRow = t.resizeRow),
(this.resizeColumn = t.resizeColumn),
(this.isEnableEditField = t.isEnableEditField),
(this.isEnableContextMenu = t.isEnableContextMenu),
(this.isEnableEditField = t.isEnableEditField),
(this.isEnableInsertRow = t.isEnableInsertRow),
(this.isEnableDeleteRow = t.isEnableDeleteRow),
(this.isEnableInsertColumn = t.isEnableInsertColumn),
(this.isEnableDeleteColumn = t.isEnableDeleteColumn),
(this.isEnableMergeCell = t.isEnableMergeCell),
(this.columnResizable = t.columnResizable),
(this.columnAlignEditable = t.columnAlignEditable);
};
})(),
o = (function () {
function t(t) {
this.options = new i(t);
}
return (
(t.prototype.enableEidt = function () {
this.options.isEnableEdit;
}),
(t.prototype.disableEdit = function () {
this.options.isEnableEdit;
}),
(t.prototype.isEnableEdit = function () {
return this.options.isEnableEdit;
}),
t
);
})(),
r = n(0),
a = (function () {
return function (t) {
(this.cell = t.cell),
(this.link = t.link),
(this.linkType = t.linkType),
(this.bottom = t.bottom),
(this.rightMost = t.rightMost),
(this.rowLevel = t.rowLevel),
(this.columnLevel = t.columnLevel),
(this.indexInTableGridRow = t.indexInTableGridRow),
(this.indexInTableGridColumn = t.indexInTableGridColumn);
};
})(),
p = n(10),
s = (function () {
function t() {}
return (
(t.getLeftTableCell = function (t, e) {
var n;
return (
t.forEach(function (t, i) {
t.cell && i < e && (n = t.cell);
}),
n
);
}),
(t.getIndex = function (t, e) {
var n;
return (
t.forEach(function (t, i) {
t.cell && t.cell.id == e && (n = i);
}),
n
);
}),
t
);
})(),
l = n(13),
u = n(11),
d = (function () {
return function (t, e) {
(this.target = t), (this.grips = e);
};
})(),
c = (function () {
return function (t) {
this.target = t;
};
})(),
h = (function () {
return function () {
this.rowColumns = [];
};
})(),
f = (function () {
function t() {}
return (
(t.getColumnsWidth = function (e, n) {
var i = {},
o = t.allAutoWidth(e);
return (
e.rowColumns.forEach(function (t) {
var e = n - 0,
r = (t.width / o) * (e > 0 ? e : 0);
i[t.id] = r;
}),
i
);
}),
(t.resizeTableCellWeight = function (t) {
t.forEach(function (t) {
t.columns.forEach(function (t) {
t.hasWidth && $(t.getTarget()).css("width", t.width + "pt");
});
});
}),
(t.allAutoWidth = function (t) {
var e = 0;
return (
t.rowColumns.forEach(function (t) {
e += t.width;
}),
e
);
}),
(t.reconsitutionTableColumnTree = function (t, e, n) {
for (
var i = e || new h(),
o = function o(e) {
(i.totalLayer = e + 1),
(i[e] = t[e].columns),
(i.rowColumns = i.rowColumns.concat(
i[e].filter(function (n) {
return n.rowspan == t.length - e;
})
));
},
r = 0;
r < t.length;
r++
) {
o(r);
}
return i;
}),
t
);
})(),
g = n(2),
m = (function () {
function t(t) {
(this.signature = "HiTresizer"), (this.hitable = t), (this.rows = t.rows), (this.target = t.target);
}
return (
(t.prototype.init = function () {
this.addResizeRowAndColumn(), this.hitable.optionsCoat.options.resizeColumn && this.createColumnGrips(), this.hitable.optionsCoat.options.resizeRow && this.createRowGrips();
}),
(t.prototype.resizeTableCellWidth = function () {
f.resizeTableCellWeight(this.rows);
}),
(t.prototype.addResizeRowAndColumn = function () {}),
(t.prototype.createColumnGrips = function () {
var t = this,
e = this,
n = [],
i = $('');
i.width(this.target.width()),
this.rows.forEach(function (o) {
o.columns.forEach(function (o, a) {
if (o.getTarget().attr("haswidth")) {
var p = $('
');
i.append(p);
var s = new c(p);
n.length > 0 && (n[n.length - 1].nextGrip = s),
n.push(s),
t.syncGrips(o, s),
$(p).hidraggable({
axis: "h",
onDrag: function onDrag(t, e, n) {},
moveUnit: "pt",
minMove: 1,
onBeforeDrag: function onBeforeDrag(t) {
if (((g.a.instance.draging = !0), !s.nextGrip)) return !1;
(e.dragingGrip = s), (e.dragingGrip.left = parseFloat(e.dragingGrip.target.css("left").replace("px", ""))), s.target.addClass("columngripDraging");
},
onStopDrag: function onStopDrag(n) {
g.a.instance.draging = !1;
var i = parseFloat(e.dragingGrip.target.css("left").replace("px", "")),
o = r.a.px.toPt(i - e.dragingGrip.left);
(s.cell.width = s.cell.width + o),
(s.nextGrip.cell.width = s.nextGrip.cell.width - o),
t.resizeTableCellWidth(),
s.target.removeClass("columngripDraging"),
e.updateColumnGrips();
}
});
}
});
}),
this.target.before(i),
(this.cgripContariner = new d(i, n));
}),
(t.prototype.updateColumnGrips = function () {
this.cgripContariner && (this.cgripContariner.target.remove(), this.createColumnGrips());
}),
(t.prototype.updateRowGrips = function () {
this.rgripContariner && (this.rgripContariner.target.remove(), this.createRowGrips());
}),
(t.prototype.createRowGrips = function () {
var t = this,
e = this,
n = [],
i = $('');
this.rows.forEach(function (o, a) {
var p = $('
');
i.append(p);
var s = new c(p);
n.push(s),
a > 0 &&
a < t.rows.length &&
$(p).hidraggable({
axis: "v",
onDrag: function onDrag(t, e, n) {},
moveUnit: "pt",
minMove: 1,
onBeforeDrag: function onBeforeDrag(t) {
(e.dragingGrip = s), (e.dragingGrip.top = parseFloat(e.dragingGrip.target.css("top").replace("px", ""))), s.target.addClass("rowgripDraging");
},
onStopDrag: function onStopDrag(t) {
var n = parseFloat(e.dragingGrip.target.css("top").replace("px", "")),
i = r.a.px.toPt(n - e.dragingGrip.top + e.rows[a].columns[0].getTarget().height());
e.rows[a].columns[0].getTarget().css("height", i + "pt"), e.syncRowGrips(), s.target.removeClass("rowgripDraging");
}
});
}),
this.target.before(i),
(this.rgripContariner = new d(i, n)),
this.syncRowGrips();
}),
(t.prototype.syncGrips = function (t, e) {
var n = t.getTarget();
(e.cell = t),
e.target.css({
left: n.offset().left - this.target.offset().left + n.outerWidth(!1),
height: 30
});
}),
(t.prototype.syncRowGrips = function () {
var t = this;
this.rgripContariner.target.height(this.target.height()),
this.rows.forEach(function (e, n) {
var i = e.columns[0].getTarget();
t.rgripContariner.grips[n].target.css({
top: i.offset().top - t.target.offset().top + i.outerHeight(!1),
width: 30
});
});
}),
(t.prototype.addResizerHeadRow = function () {
this.target.find("thead").prepend();
}),
t
);
})(),
v = (function () {
function t() {}
return (t.prototype.init = function () {}), (t.prototype.updateRowGrips = function () {}), (t.prototype.updateColumnGrips = function () {}), t;
})();
n.d(e, "a", function () {
return y;
});
var y = (function () {
function t(t) {
(this.id = u.a.createId()),
(this.optionsCoat = new o(t)),
(this.handle = t.handle),
(this.target = t.table),
this.initRows(t.rows),
this.init(t),
(this.tableCellSelector = new p.a(this.rows, this.target)),
(this.resizer = this.optionsCoat.options.columnResizable ? new m(this) : new v()),
this.resizer.init();
}
return (
(t.prototype.insertRow = function (t, e, n) {
var i = e || this.tableCellSelector.getSingleSelect(),
o = i.cell,
a = this.rows[i.rowIndex],
p = i.rowIndex,
s = this.getCellGrid(),
u = new l.a();
if ((u.init(this.optionsCoat, void 0, a.isHead), n && u.getTarget().addClass(n), "above" == t))
s[p].forEach(function (t) {
var e = t.link ? t.link : t.cell,
n = e.width / e.colspan;
if (0 == t.columnLevel) {
var i = u.createTableCell();
(i.width = n), u.insertCellToLast(i);
} else {
if ("column" == t.linkType) {
var o = t.link.getTarget();
(t.link.rowspan += 1), o.attr("rowspan", t.link.rowspan);
}
t.linkType;
}
}),
this.rows.splice(p, 0, u),
a.getTarget().before(u.getTarget()),
r.a.event.trigger("newRow" + this.id, u);
else {
var d = p + o.rowspan - 1;
s[d].forEach(function (t) {
var e = t.link ? t.link : t.cell,
n = e.width / e.colspan;
if (t.bottom) {
var i = u.createTableCell();
(i.width = n), u.insertCellToLast(i);
} else {
if (t.cell) {
var o = t.cell.getTarget();
(t.cell.rowspan += 1), o.attr("rowspan", t.cell.rowspan);
}
if ("column" == t.linkType) {
o = t.link.getTarget();
(t.link.rowspan += 1), o.attr("rowspan", t.link.rowspan);
}
}
}),
this.rows.splice(d + 1, 0, u),
this.rows[d].getTarget().after(u.getTarget()),
r.a.event.trigger("newRow" + this.id, u);
}
}),
(t.prototype.insertColumn = function (t, e, n, i) {
var o = this,
a = this.rows.concat(this.trRows),
p = e || this.tableCellSelector.getSingleSelect(),
s = p.cell,
l = p.rowIndex,
u = this.getCellGrid(a),
d = u[l].filter(function (t) {
return (t.cell && t.cell.id == s.id) || (t.link && t.link.id == s.id);
});
if ("left" == t) {
var c = d[0].indexInTableGridRow;
u.forEach(function (t, e) {
var p = t[c],
s = t.filter(function (t, e) {
return e >= c && t.cell;
});
if (0 == p.rowLevel) {
var l = a[e],
u = a[e].createTableCell();
n && u.getTarget().addClass(n), null != i && (u.width = i), s.length ? l.insertToTargetCellLeft(s[0].cell, u) : l.insertCellToLast(u), r.a.event.trigger("newCell" + o.id, u);
} else if ("row" == p.linkType) {
var d = p.link.getTarget();
(p.link.colspan += 1), d.attr("colspan", p.link.colspan);
}
});
} else {
var h = d[d.length - 1].indexInTableGridRow;
u.forEach(function (t, e) {
var p = t[h],
s = t.filter(function (t, e) {
return e <= h && t.cell;
});
if (p.rightMost) {
var l = a[e],
u = l.createTableCell();
n && u.getTarget().addClass(n),
null != i && (u.width = i),
s.length ? l.insertToTargetCellRight(s[s.length - 1].cell, u) : l.insertCellToFirst(u),
r.a.event.trigger("newCell" + o.id, u);
} else {
var d = p.link || p.cell;
if ("row" == p.linkType) {
var c = d.getTarget();
(d.colspan += 1), c.attr("colspan", d.colspan);
}
if (p.cell) {
c = d.getTarget();
(d.colspan += 1), c.attr("colspan", d.colspan);
}
}
});
}
}),
(t.prototype.deleteRow = function () {
var t = this,
e = this.tableCellSelector.getSingleSelect(),
n = (e.cell, this.rows[e.rowIndex], e.rowIndex),
i = this.getCellGrid(),
o = this.rows[n];
i[n].forEach(function (e, r) {
if (e.cell) {
if (1 == e.cell.rowspan) o.removeCell(e.cell);
else {
o.removeCell(e.cell);
var a = i[n + 1].filter(function (t, e) {
return t.cell && e > r;
}),
p = t.rows[n + 1],
s = p.createTableCell(e.cell.rowspan - 1, e.cell.colspan);
a.length ? p.insertToTargetCellLeft(a[0].cell, s) : p.insertCellToLast(s);
}
} else if ("column" == e.linkType) {
var l = e.link;
(l.rowspan -= 1), l.getTarget().attr("rowspan", l.rowspan);
}
}),
o.getTarget().remove(),
this.rows.splice(n, 1);
}),
(t.prototype.deleteColums = function () {
var t = this.rows.concat(this.trRows),
e = this.tableCellSelector.getSingleSelect(),
n = e.cell,
i = e.rowIndex,
o = this.getCellGrid(t),
r = o[i].filter(function (t) {
return (t.cell && t.cell.id == n.id) || (t.link && t.link.id == n.id);
})[0].indexInTableGridRow;
o.forEach(function (e, n) {
var i = e[r];
i.cell
? 1 == i.cell.colspan
? t[n].removeCell(i.cell)
: ((i.cell.colspan -= 1), i.cell.getTarget().attr("colspan", i.cell.colspan))
: "row" == i.linkType && ((i.link.colspan -= 1), i.link.getTarget().attr("colspan", i.link.colspan));
});
}),
(t.prototype.mergeCell = function () {
var t = this,
e = this.tableCellSelector.getSelectedCells();
if (0 != e.length) {
var n = e[0][0].cell;
e.forEach(function (i, o) {
i.forEach(function (i, r) {
0 == o ? 0 != r && ((n.colspan += i.cell.colspan), t.rows[i.rowIndex].removeCell(i.cell)) : t.rows[i.rowIndex].removeCell(i.cell),
0 == r && e[0][0].rowIndex + n.rowspan - 1 < i.rowIndex && (n.rowspan += i.cell.rowspan);
});
}),
n.getTarget().attr("colspan", n.colspan),
n.getTarget().attr("rowspan", n.rowspan),
this.tableCellSelector.setSingleSelect(e[0][0]);
}
}),
(t.prototype.splitCell = function () {
var t = this.tableCellSelector.getSingleSelect(),
e = this.getCellGrid(),
n = s.getIndex(e[t.rowIndex], t.cell.id);
if (t) {
for (var i = t.rowIndex; i < t.rowIndex + t.cell.rowspan; i++) {
for (var o = this.rows[i], r = i == t.rowIndex ? t.cell : s.getLeftTableCell(e[i], n), a = 0; a < t.cell.colspan; a++) {
(i == t.rowIndex && 0 == a) || (r ? o.insertToTargetCellRight(r, o.createTableCell()) : o.insertCellToFirst(o.createTableCell()));
}
}
(t.cell.rowspan = 1), (t.cell.colspan = 1), t.cell.getTarget().attr("colspan", t.cell.colspan), t.cell.getTarget().attr("rowspan", t.cell.rowspan);
}
}),
(t.prototype.init = function (t) {
var e = this;
$(this.target).addClass("hitable"),
(this.optionsCoat.onBeforEdit = function (n) {
if (e.optionsCoat.options.onBeforEdit && !1 === t.onBeforEdit(n)) return !1;
return e.optionsCoat.editingCell && e.optionsCoat.editingCell.endEdit(), !0;
}),
$(this.target).mousedown(function (t) {
e.optionsCoat.isLeftMouseButtonDown = !0;
}),
$(this.target).mouseup(function (t) {
e.optionsCoat.isLeftMouseButtonDown = !1;
}),
this.initContext(),
this.target
.on("mousemove", function (t) {
1 === t.buttons && e.tableCellSelector.multipleSelectByXY(t.pageX, t.pageY);
})
.on("mousedown", function (t) {
1 === t.buttons && e.tableCellSelector.singleSelectByXY(t.pageX, t.pageY);
});
}),
(t.prototype.initRows = function (t) {
var e = this;
if (((this.trRows = []), t)) {
(this.rows = t),
t.forEach(function (t, n) {
t.init(e.optionsCoat, e.target.find("tr:eq(" + n + ")"), !0);
});
var n = this.optionsCoat.options.trs;
n &&
this.initRowsByTrs(n).forEach(function (t) {
e.trRows.push(t);
});
} else this.rows = this.initRowsByTrs(this.target.find("tr"));
}),
(t.prototype.initRowsByTrs = function (t) {
var e = this;
return t
.map(function (t, n) {
var i = new l.a();
return i.init(e.optionsCoat, $(n)), i;
})
.get();
}),
(t.prototype.enableEidt = function () {
this.optionsCoat.enableEidt();
}),
(t.prototype.disableEdit = function () {
this.optionsCoat.disableEdit();
}),
(t.prototype.getCellGrid = function (t) {
var e = t || this.rows,
n = this.getColumnStep(),
i = new Array();
return (
e.forEach(function (t, e) {
t.columns.forEach(function (t, o) {
for (var r = 0; r < t.colspan; r++) {
for (var p = 0, s = !1; p < n && !s; ) {
if (((i[e] = i[e] || []), i[e][p]));
else {
i[e][p] = new a({
cell: 0 == r ? t : void 0,
link: 0 != r ? t : void 0,
linkType: r > 0 ? "row" : void 0,
rightMost: r == t.colspan - 1 || void 0,
bottom: 0 == t.rowspan - 1,
rowLevel: r,
columnLevel: 0,
indexInTableGridRow: p,
indexInTableGridColumn: e
});
for (var l = e + 1, u = 1; u < t.rowspan; u++) {
(i[l] = i[l] || []),
(i[l][p] = new a({
cell: void 0,
link: t,
linkType: r > 0 ? "rowColumn" : "column",
rightMost: r == t.colspan - 1 || void 0,
bottom: u == t.rowspan - 1,
rowLevel: r,
columnLevel: u,
indexInTableGridRow: p,
indexInTableGridColumn: l
})),
(l += 1);
}
s = !0;
}
p++;
}
}
});
}),
i
);
}),
(t.prototype.setAlign = function (t) {
var e = this.tableCellSelector.getSingleSelect();
e && e.cell.setAlign(t);
}),
(t.prototype.setVAlign = function (t) {
var e = this.tableCellSelector.getSingleSelect();
e && e.cell.setVAlign(t);
}),
(t.prototype.getColumnStep = function (t) {
var e = 0;
return (
this.rows.length &&
this.rows[t || 0].columns.forEach(function (t) {
e += t.colspan;
}),
e
);
}),
(t.prototype.initContext = function () {
var t = this;
if (!this.optionsCoat.options.isEnableContextMenu) return !1;
$(this.handle).hicontextMenu({
menus: [
{
text: "在上方插入行",
enabled: this.optionsCoat.options.isEnableInsertRow,
disable: function disable() {
return !t.tableCellSelector.getSingleSelect();
},
callback: function callback() {
t.insertRow("above"), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "在下方插入行",
borderBottom: !0,
enabled: this.optionsCoat.options.isEnableInsertRow,
disable: function disable() {
return !t.tableCellSelector.getSingleSelect();
},
callback: function callback() {
t.insertRow("below"), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "向左方插入列",
enabled: this.optionsCoat.options.isEnableInsertColumn,
disable: function disable() {
return !t.tableCellSelector.getSingleSelect();
},
callback: function callback() {
t.insertColumn("left"), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "向右方插入列",
enabled: this.optionsCoat.options.isEnableInsertColumn,
disable: function disable() {
return !t.tableCellSelector.getSingleSelect();
},
borderBottom: !0,
callback: function callback() {
t.insertColumn("right"), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "删除行",
enabled: this.optionsCoat.options.isEnableDeleteRow,
disable: function disable() {
return !t.tableCellSelector.getSingleSelect();
},
callback: function callback() {
t.deleteRow(), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "删除列",
borderBottom: !0,
enabled: this.optionsCoat.options.isEnableDeleteColumn,
disable: function disable() {
return !t.tableCellSelector.getSingleSelect();
},
callback: function callback() {
t.deleteColums(), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "对齐",
borderBottom: !0,
enabled: this.optionsCoat.options.columnAlignEditable,
menus: [
{
text: "左",
callback: function callback() {
t.setAlign("left");
}
},
{
text: "左右居中",
callback: function callback() {
t.setAlign("center");
}
},
{
text: "右",
callback: function callback() {
t.setAlign("right");
}
},
{
text: "默认",
borderBottom: !0,
callback: function callback() {
t.setAlign("");
}
},
{
text: "上",
callback: function callback() {
t.setVAlign("top");
}
},
{
text: "垂直居中",
callback: function callback() {
t.setVAlign("middle");
}
},
{
text: "下",
callback: function callback() {
t.setVAlign("bottom");
}
},
{
text: "默认",
callback: function callback() {
t.setVAlign("");
}
}
]
},
{
text: "合并单元格",
enabled: this.optionsCoat.options.isEnableMergeCell,
disable: function disable() {
return t.tableCellSelector.getSingleSelect();
},
callback: function callback() {
t.mergeCell(), r.a.event.trigger("updateTable" + t.id);
}
},
{
text: "解开单元格",
enabled: this.optionsCoat.options.isEnableMergeCell,
disable: function disable() {
var e = t.tableCellSelector.getSingleSelect();
return !e || (1 == e.cell.rowspan && 1 == e.cell.colspan);
},
callback: function callback() {
t.splitCell(), r.a.event.trigger("updateTable" + t.id);
}
}
].filter(function (t) {
return t.enabled;
})
});
}),
(t.prototype.getTableWidth = function () {
return r.a.px.toPt(this.target.outerWidth(!1));
}),
(t.prototype.updateColumnGrips = function () {
this.resizer.updateColumnGrips();
}),
(t.prototype.updateRowGrips = function () {
this.resizer.updateRowGrips();
}),
t
);
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return i;
});
var i = (function () {
return function (t, e, n) {
(this.tid = t), (this.options = e), (this.printElementType = n);
};
})();
},
function (t, e, n) {
"use strict";
var i = n(3),
o = n(12),
r =
((function () {})(),
(function () {
return function (t) {
(this.width = t.width),
(this.title = t.title),
(this.columnId = t.columnId),
(this.fixed = !1),
(this.rowspan = t.rowspan || 1),
(this.colspan = t.colspan || 1),
(this.align = t.align),
(this.halign = t.halign),
(this.vAlign = t.vAlign),
(this.formatter2 = t.formatter2),
(this.styler2 = t.styler2);
};
})()),
a = n(5);
n.d(e, "a", function () {
return l;
});
var _p,
s =
((_p = function p(t, e) {
return (_p =
Object.setPrototypeOf ||
(_instanceof(
{
__proto__: []
},
Array
) &&
function (t, e) {
t.__proto__ = e;
}) ||
function (t, e) {
for (var n in e) {
e.hasOwnProperty(n) && (t[n] = e[n]);
}
})(t, e);
}),
function (t, e) {
function n() {
this.constructor = t;
}
_p(t, e), (t.prototype = null === e ? Object.create(e) : ((n.prototype = e.prototype), new n()));
}),
l = (function (t) {
function e(e, n) {
var i = this;
((e = e || {}), ((i = t.call(this, e) || this).lHeight = e.lHeight), (i.autoCompletion = e.autoCompletion), (i.tableFooterRepeat = e.tableFooterRepeat), n) &&
((i.columns = []),
n.editable && e.columns && e.columns.length
? e.columns.forEach(function (t) {
var e = [];
t.forEach(function (t) {
var i = new r(t),
o = n.getColumnByColumnId(i.columnId),
p = o ? $.extend(o, i) : new a.a(i);
(p.checked = !0), e.push(p);
}),
i.columns.push(new o.a(e));
})
: n.columns.forEach(function (t) {
i.columns.push(
new o.a(
t.filter(function (t) {
return t.checked;
})
)
);
}));
return i;
}
return (
s(e, t),
(e.prototype.getColumnByColumnId = function (t) {
return this.makeColumnObj()[t];
}),
(e.prototype.makeColumnObj = function () {
var t = {};
return (
this.columns &&
this.columns.forEach(function (e) {
e.columns.forEach(function (e) {
e.columnId && (t[e.columnId] = e);
});
}),
t
);
}),
(e.prototype.getGridColumns = function () {
return this.gridColumns || 1;
}),
(e.prototype.getPrintElementOptionEntity = function () {
var e = t.prototype.getPrintElementOptionEntity.call(this);
return (
this.columns &&
((e.columns = []),
this.columns.forEach(function (t) {
var n = t
.getPrintElementOptionEntity()
.filter(function (t) {
return t.checked;
})
.map(function (t) {
return new r(t);
});
e.columns.push(n);
})),
e
);
}),
e
);
})(i.a);
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return i;
});
var i = (function () {
return function () {
this.rowColumns = [];
};
})();
},
function (t, e, n) {
"use strict";
n.d(e, "a", function () {
return i;
});
var i = (function () {
function t(t, e) {
(this.gridColumns = t), (this.target = e);
}
return (
(t.prototype.getByIndex = function (t) {
return this.target.find(".hi-grid-col:eq(" + t + ")");
}),
t
);
})();
},
function (t, e, n) {
t.exports = n(33);
},
function (t, e) {
!(function (t) {
function e(e) {
var n = t.data(e.data.target, "hidraggable"),
i = n.options,
o = n.proxy,
r = e.data,
a = r.startLeft + e.pageX - r.startX,
p = r.startTop + e.pageY - r.startY;
o &&
(o.parent()[0] == document.body
? ((a = null != i.deltaX && null != i.deltaX ? e.pageX + i.deltaX : e.pageX - e.data.offsetWidth),
(p = null != i.deltaY && null != i.deltaY ? e.pageY + i.deltaY : e.pageY - e.data.offsetHeight))
: (null != i.deltaX && null != i.deltaX && (a += e.data.offsetWidth + i.deltaX), null != i.deltaY && null != i.deltaY && (p += e.data.offsetHeight + i.deltaY))),
e.data.parent != document.body && ((a += t(e.data.parent).scrollLeft()), (p += t(e.data.parent).scrollTop())),
"h" == i.axis ? (r.left = a) : "v" == i.axis ? (r.top = p) : ((r.left = a), (r.top = p));
}
function n(e) {
var n = t.data(e.data.target, "hidraggable"),
i = n.options,
o = n.proxy;
o || (o = t(e.data.target)),
o.css({
left: t.fn.dragLengthC(e.data.left, i),
top: t.fn.dragLengthC(e.data.top, i)
}),
t("body").css("cursor", i.cursor);
}
function i(i) {
t.fn.hidraggable.isDragging = !0;
var o = t.data(i.data.target, "hidraggable"),
r = o.options,
a = t(".hidroppable")
.filter(function () {
return i.data.target != this;
})
.filter(function () {
var e = t.data(this, "hidroppable").options.accept;
return (
!e ||
t(e).filter(function () {
return this == i.data.target;
}).length > 0
);
});
o.hidroppables = a;
var p = o.proxy;
return (
p || (r.proxy ? ((p = "clone" == r.proxy ? t(i.data.target).clone().insertAfter(i.data.target) : r.proxy.call(i.data.target, i.data.target)), (o.proxy = p)) : (p = t(i.data.target))),
p.css("position", "absolute"),
e(i),
n(i),
r.onStartDrag.call(i.data.target, i),
!1
);
}
function o(i) {
var o = t.data(i.data.target, "hidraggable");
e(i), 0 != o.options.onDrag.call(i.data.target, i, t.fn.dragLengthCNum(i.data.left, o.options), t.fn.dragLengthCNum(i.data.top, o.options)) && n(i);
var r = i.data.target;
return (
o.hidroppables.each(function () {
var e = t(this);
if (!e.hidroppable("options").disabled) {
var n = e.offset();
i.pageX > n.left && i.pageX < n.left + e.outerWidth() && i.pageY > n.top && i.pageY < n.top + e.outerHeight()
? (this.entered || (t(this).trigger("_dragenter", [r]), (this.entered = !0)), t(this).trigger("_dragover", [r]))
: this.entered && (t(this).trigger("_dragleave", [r]), (this.entered = !1));
}
}),
!1
);
}
function r(e) {
(t.fn.hidraggable.isDragging = !1), o(e);
var n,
i,
r = t.data(e.data.target, "hidraggable"),
a = r.proxy,
p = r.options;
p.revert
? 1 == l()
? t(e.data.target).css({
position: e.data.startPosition,
left: e.data.startLeft,
top: e.data.startTop
})
: a
? (a.parent()[0] == document.body ? ((n = e.data.startX - e.data.offsetWidth), (i = e.data.startY - e.data.offsetHeight)) : ((n = e.data.startLeft), (i = e.data.startTop)),
a.animate(
{
left: n,
top: i
},
function () {
s();
}
))
: t(e.data.target).animate(
{
left: e.data.startLeft,
top: e.data.startTop
},
function () {
t(e.data.target).css("position", e.data.startPosition);
}
)
: (t(e.data.target).css({
position: "absolute",
left: t.fn.dragLengthC(e.data.left, p),
top: t.fn.dragLengthC(e.data.top, p)
}),
l());
function s() {
a && a.remove(), (r.proxy = null);
}
function l() {
var n = !1;
return (
r.hidroppables.each(function () {
var i = t(this);
if (!i.hidroppable("options").disabled) {
var o = i.offset();
return e.pageX > o.left && e.pageX < o.left + i.outerWidth() && e.pageY > o.top && e.pageY < o.top + i.outerHeight()
? (p.revert &&
t(e.data.target).css({
position: e.data.startPosition,
left: e.data.startLeft,
top: e.data.startTop
}),
t(this).trigger("_drop", [e.data.target]),
s(),
(n = !0),
(this.entered = !1),
!1)
: void 0;
}
}),
n || p.revert || s(),
n
);
}
return (
p.onStopDrag.call(e.data.target, e),
t(document).unbind(".hidraggable"),
setTimeout(function () {
t("body").css("cursor", "");
}, 100),
!1
);
}
(t.fn.hidraggable = function (e, n) {
return "string" == typeof e
? t.fn.hidraggable.methods[e](this, n)
: this.each(function () {
var n,
a = t.data(this, "hidraggable");
a ? (a.handle.unbind(".hidraggable"), (n = t.extend(a.options, e))) : (n = t.extend({}, t.fn.hidraggable.defaults, t.fn.hidraggable.parseOptions(this), e || {}));
var p = n.handle ? ("string" == typeof n.handle ? t(n.handle, this) : n.handle) : t(this);
function s(e) {
var n = t.data(e.data.target, "hidraggable"),
i = n.handle,
o = t(i).offset(),
r = t(i).outerWidth(),
a = t(i).outerHeight(),
p = e.pageY - o.top,
s = o.left + r - e.pageX,
l = o.top + a - e.pageY,
u = e.pageX - o.left;
return Math.min(p, s, l, u) > n.options.edge;
}
t.data(this, "hidraggable", {
options: n,
handle: p
}),
n.disabled
? t(this).css("cursor", "")
: p
.unbind(".hidraggable")
.bind(
"mousemove.hidraggable",
{
target: this
},
function (e) {
if (!t.fn.hidraggable.isDragging) {
var n = t.data(e.data.target, "hidraggable").options;
s(e) ? t(this).css("cursor", n.cursor) : t(this).css("cursor", "");
}
}
)
.bind(
"mouseleave.hidraggable",
{
target: this
},
function (e) {
t(this).css("cursor", "");
}
)
.bind(
"mousedown.hidraggable",
{
target: this
},
function (e) {
if (0 != s(e)) {
t(this).css("cursor", "");
var n = t(e.data.target).position(),
a = t(e.data.target).offset(),
p = {
startPosition: t(e.data.target).css("position"),
startLeft: n.left,
startTop: n.top,
left: n.left,
top: n.top,
startX: e.pageX,
startY: e.pageY,
offsetWidth: e.pageX - a.left,
offsetHeight: e.pageY - a.top,
target: e.data.target,
parent: t(e.data.target).parent()[0]
};
t.extend(e.data, p),
0 != t.data(e.data.target, "hidraggable").options.onBeforeDrag.call(e.data.target, e) &&
(t(document).bind("mousedown.hidraggable", e.data, i), t(document).bind("mousemove.hidraggable", e.data, o), t(document).bind("mouseup.hidraggable", e.data, r));
}
}
);
});
}),
(t.fn.hidraggable.methods = {
options: function options(e) {
return t.data(e[0], "hidraggable").options;
},
proxy: function proxy(e) {
return t.data(e[0], "hidraggable").proxy;
},
enable: function enable(e) {
return e.each(function () {
t(this).hidraggable({
disabled: !1
});
});
},
disable: function disable(e) {
return e.each(function () {
t(this).hidraggable({
disabled: !0
});
});
}
}),
(t.fn.hidraggable.parseOptions = function (e) {
var n = t(e);
return t.extend(
{},
t.hiprintparser.parseOptions(e, [
"cursor",
"handle",
"axis",
{
revert: "boolean",
deltaX: "number",
deltaY: "number",
edge: "number"
}
]),
{
disabled: !!n.attr("disabled") || void 0
}
);
}),
(t.fn.hidraggable.defaults = {
proxy: null,
revert: !1,
cursor: "move",
deltaX: null,
deltaY: null,
handle: null,
disabled: !1,
edge: 0,
axis: null,
onBeforeDrag: function onBeforeDrag(t) {},
onStartDrag: function onStartDrag(t) {},
onDrag: function onDrag(t) {},
onStopDrag: function onStopDrag(t) {}
}),
(t.fn.hidraggable.isDragging = !1);
})(jQuery);
},
function (t, e) {
!(function (t) {
(t.fn.hidroppable = function (e, n) {
return "string" == typeof e
? t.fn.hidroppable.methods[e](this, n)
: ((e = e || {}),
this.each(function () {
var n,
i = t.data(this, "hidroppable");
i
? t.extend(i.options, e)
: (t((n = this)).addClass("hidroppable"),
t(n).bind("_dragenter", function (e, i) {
t.data(n, "hidroppable").options.onDragEnter.apply(n, [e, i]);
}),
t(n).bind("_dragleave", function (e, i) {
t.data(n, "hidroppable").options.onDragLeave.apply(n, [e, i]);
}),
t(n).bind("_dragover", function (e, i) {
t.data(n, "hidroppable").options.onDragOver.apply(n, [e, i]);
}),
t(n).bind("_drop", function (e, i) {
t.data(n, "hidroppable").options.onDrop.apply(n, [e, i]);
}),
t.data(this, "hidroppable", {
options: t.extend({}, t.fn.hidroppable.defaults, t.fn.hidroppable.parseOptions(this), e)
}));
}));
}),
(t.fn.hidroppable.methods = {
options: function options(e) {
return t.data(e[0], "hidroppable").options;
},
enable: function enable(e) {
return e.each(function () {
t(this).hidroppable({
disabled: !1
});
});
},
disable: function disable(e) {
return e.each(function () {
t(this).hidroppable({
disabled: !0
});
});
}
}),
(t.fn.hidroppable.parseOptions = function (e) {
var n = t(e);
return t.extend({}, t.hiprintparser.parseOptions(e, ["accept"]), {
disabled: !!n.attr("disabled") || void 0
});
}),
(t.fn.hidroppable.defaults = {
accept: null,
disabled: !1,
onDragEnter: function onDragEnter(t, e) {},
onDragOver: function onDragOver(t, e) {},
onDragLeave: function onDragLeave(t, e) {},
onDrop: function onDrop(t, e) {}
});
})(jQuery);
},
function (t, e) {
var n;
((n = jQuery).hiprintparser = {
parseOptions: function parseOptions(t, e) {
var i = n(t),
o = {},
r = n.trim(i.attr("data-options"));
if ((r && ("{" != r.substring(0, 1) && (r = "{" + r + "}"), (o = new Function("return " + r)())), e)) {
for (var a = {}, p = 0; p < e.length; p++) {
var s = e[p];
if ("string" == typeof s) a[s] = "width" == s || "height" == s || "left" == s || "top" == s ? parseInt(t.style[s]) || void 0 : i.attr(s);
else
for (var l in s) {
var u = s[l];
"boolean" == u ? (a[l] = i.attr(l) ? "true" == i.attr(l) : void 0) : "number" == u && (a[l] = "0" == i.attr(l) ? 0 : parseFloat(i.attr(l)) || void 0);
}
}
n.extend(o, a);
}
return o;
}
}),
(n.fn.dragLengthC = function (t, e) {
return "pt" == e.moveUnit ? n.fn.dragLengthCNum(t, e) + "pt" : n.fn.dragLengthCNum(t, e);
}),
(n.fn.dragLengthCNum = function (t, e) {
var n = 3;
if ("pt" == e.moveUnit) {
var i = 0.75 * t;
return e.minMove && (n = e.minMove), Math.round(i / n) * n;
}
return Math.round(i / n) * n;
});
},
function (t, e) {
var n, i, o;
(n = jQuery),
(i = {
maxPanelIndex: 0
}),
((o = function o(t) {
(this.options = n.data(t.target, "hireizeable").options), this.init(t.target);
}).prototype = {
numHandlerText: function numHandlerText(t) {
return this.numHandler(t) + "pt";
},
numHandler: function numHandler(t) {
var e = 1.5,
n = 0.75 * t;
return this.options.minResize && (e = this.options.minResize), Math.round(n / e) * e;
},
init: function init(t) {
this.initResizeBox(t);
},
initResizeBox: function initResizeBox(t) {
var e = this;
n(t).each(function () {
var o;
(i.maxPanelIndex += 1),
e.options.noContainer
? (o = n(t))
: (o = n("')).css({
width: "100%",
height: "100%",
top: 0,
left: 0,
position: "absolute",
"background-color": "rgba(0,0,0,0.5)",
cursor: "move",
display: "none"
}),
e.appendHandler(o, n(this));
var r = {
name: "n",
target: n('')
},
a = {
name: "s",
target: n('')
},
p = {
name: "w",
target: n('')
},
s = {
name: "e",
target: n('')
},
l = {
name: "ne",
target: n('')
},
u = {
name: "nw",
target: n('')
},
d = {
name: "se",
target: n('')
},
c = {
name: "sw",
target: n('')
},
h = function h() {
var t = [],
i = e.options.showPoints;
return (
n.each([r, a, p, s, l, u, d, c], function (e, o) {
n.inArray(o.name, i) > -1 && t.push(o.target);
}),
t
);
};
e.addHandlerCss(h()), e.appendHandler(h(), o), e.bindResizeEvent(o, n(this));
var f = n(this);
n(o).on("mousedown", ".resizebtn", function () {
f.addClass("resizeing");
}),
n(".easyui-droppable").on("mouseup", function () {
f.removeClass("resizeing");
}),
e.bindTrigger(n(this));
}),
e.bindHidePanel();
},
addHandlerCss: function addHandlerCss(t) {
for (var e = 0; e < t.length; e++) {
t[e].css({
position: "absolute",
width: "8px",
height: "8px",
background: "#ff6600",
"border-radius": "50%"
});
}
},
appendHandler: function appendHandler(t, e) {
for (var n = 0; n < t.length; n++) {
e.append(t[n]);
}
},
triggerResize: function triggerResize(t) {
t.siblings().children("div[panelindex]").css({
display: "none"
}),
t.children("div[panelindex]").css({
display: "block"
});
},
bindResizeEvent: function bindResizeEvent(t, e) {
var i = this,
o = 0,
r = 0,
a = t.width(),
p = t.height(),
s = t.offset().left,
l = t.offset().top,
u = i.options.noContainer ? n(e) : t.parent(),
d = !1;
t.on("mousedown", ".e", function (e) {
(o = e.pageX), (a = t.width()), (d = !0);
});
var c = !1;
t.on("mousedown", ".s", function (e) {
(r = e.pageY), (p = t.height()), (c = !0);
});
var h = !1;
t.on("mousedown", ".w", function (e) {
(o = e.pageX), (a = t.width()), (h = !0), (s = u.offset().left);
});
var f = !1;
t.on("mousedown", ".n", function (e) {
(r = e.pageY), (p = t.height()), (f = !0), (l = u.offset().top);
});
var g = !1;
t.on("mousedown", ".ne", function (e) {
(o = e.pageX), (r = e.pageY), (a = t.width()), (p = t.height()), (g = !0), (l = u.offset().top);
});
var m = !1;
t.on("mousedown", ".nw", function (e) {
(o = e.pageX), (r = e.pageY), (a = t.width()), (p = t.height()), (l = u.offset().top), (s = u.offset().left), (m = !0);
});
var v = !1;
t.on("mousedown", ".se", function (e) {
(o = e.pageX), (r = e.pageY), (a = t.width()), (p = t.height()), (v = !0);
});
var y = !1;
t.on("mousedown", ".sw", function (e) {
(o = e.pageX), (r = e.pageY), (a = t.width()), (p = t.height()), (y = !0), (s = u.offset().left);
});
var b = !1;
t.on("mousedown", function (t) {
i.options.onBeforeResize(), (o = t.pageX), (r = t.pageY), (l = u.offset().top), (s = u.offset().left), (b = !1);
}),
n(i.options.stage)
.on("mousemove", function (e) {
if (d) {
var n = e.pageX - o;
t.css({
width: "100%"
}),
u.css({
width: i.numHandlerText(a + n)
}),
i.options.onResize(e, void 0, i.numHandler(a + n), void 0, void 0);
} else if (c) {
var E = e.pageY - r;
t.css({
height: "100%"
}),
u.css({
height: i.numHandlerText(p + E)
}),
i.options.onResize(e, i.numHandler(p + E), void 0, void 0, void 0);
} else
h
? ((n = e.pageX - o),
t.css({
width: "100%"
}),
u.css({
width: i.numHandlerText(a - n),
left: i.numHandlerText(i.options.noDrag ? void 0 : i.numHandler(s + n))
}),
i.options.onResize(e, void 0, i.numHandler(a - n), void 0, i.options.noDrag ? void 0 : i.numHandler(s + n)))
: f
? ((E = e.pageY - r),
t.css({
height: "100%"
}),
u.css({
height: i.numHandlerText(p - E),
top: i.numHandlerText(i.options.noDrag ? void 0 : l + E)
}),
i.options.onResize(e, i.numHandler(p - E), void 0, i.options.noDrag ? void 0 : i.numHandler(l + E), void 0))
: g
? ((n = e.pageX - o),
(E = e.pageY - r),
t.css({
height: "100%",
width: "100%"
}),
u.css({
height: i.numHandlerText(p - E),
top: i.numHandlerText(i.options.noDrag ? void 0 : l + E),
width: i.numHandlerText(a + n)
}),
i.options.onResize(e, i.numHandler(p - E), i.numHandler(a + n), i.options.noDrag ? void 0 : i.numHandler(l + E), void 0))
: m
? ((n = e.pageX - o),
(E = e.pageY - r),
t.css({
height: "100%",
width: "100%"
}),
u.css({
height: i.numHandlerText(p - E),
top: i.numHandlerText(i.options.noDrag ? void 0 : l + E),
width: i.numHandlerText(a - n),
left: i.numHandlerText(i.options.noDrag ? void 0 : s + n)
}),
i.options.onResize(e, i.numHandler(p - E), i.numHandler(a - n), i.options.noDrag ? void 0 : i.numHandler(l + E), i.options.noDrag ? void 0 : i.numHandler(s + n)))
: v
? ((n = e.pageX - o),
(E = e.pageY - r),
t.css({
width: "100%",
height: "100%"
}),
u.css({
width: i.numHandlerText(a + n),
height: i.numHandlerText(p + E)
}),
i.options.onResize(e, i.numHandler(p + E), i.numHandler(a + n), void 0, void 0))
: y
? ((n = e.pageX - o),
(E = e.pageY - r),
t.css({
width: "100%",
height: "100%"
}),
u.css({
width: i.numHandlerText(a - n),
left: i.numHandlerText(i.options.noDrag ? void 0 : s + n),
height: i.numHandlerText(p + E)
}),
i.options.onResize(e, i.numHandler(p + E), i.numHandler(a - n), i.numHandler(otundefinedop), i.options.noDrag ? void 0 : i.numHandler(s + n)))
: b &&
((n = e.pageX - o),
(E = e.pageY - r),
u.css({
left: i.numHandlerText(i.options.noDrag ? void 0 : s + n),
top: i.numHandlerText(i.options.noDrag ? void 0 : l + E)
}),
i.options.onResize(e, void 0, void 0, i.options.noDrag ? void 0 : i.numHandler(l + E), i.options.noDrag ? void 0 : i.numHandler(s + n)));
})
.on("mouseup", function (t) {
(d = !1), (c = !1), (h = !1), (f = !1), (g = !1), (m = !1), (y = !1), (v = !1), (b = !1), i.options.onStopResize();
});
},
bindTrigger: function bindTrigger(t) {
var e = this;
t.on("click", function (n) {
n.stopPropagation(), e.triggerResize(t);
});
},
bindHidePanel: function bindHidePanel(t) {
if (i.maxPanelIndex < 2) {
var e = this.options.stage;
n(e).bind("click", function (t) {
t.stopPropagation(),
n("div[panelindex]").css({
display: "none"
});
});
}
}
}),
n.fn.extend({
hireizeable: function hireizeable(t) {
return this.each(function () {
var e,
i = n.data(this, "hireizeable");
(e = i ? n.extend(i.options, _1f) : n.extend({}, n.fn.hireizeable.defaults, t || {})),
n.data(this, "hireizeable", {
options: e
}),
new o({
target: this,
onResize: function onResize(t, e, n, i, o) {},
onStopResize: function onStopResize(t, e, n, i, o) {}
});
});
}
}),
(n.fn.hireizeable.defaults = {
stage: document,
reizeUnit: "pt",
minResize: 1.5,
showPoints: ["s", "e"],
noContainer: !1,
onBeforeResize: function onBeforeResize(t, e, n, i, o) {},
onResize: function onResize(t, e, n, i, o) {},
onStopResize: function onStopResize(t, e, n, i, o) {},
noDrag: !1
});
},
function (t, e) {
var n, i;
jQuery,
(n = "connected"),
(i = "reconnecting"),
(window.hiwebSocket = {
opened: !1,
name: "webSockets",
reconnectTimeout: 6e4,
reconnectWindowSetTimeout: null,
reconnectDelay: 2e3,
supportsKeepAlive: function supportsKeepAlive() {
return !0;
},
hasIo: function hasIo(t) {
return window.io;
},
send: function send(t) {
try {
this.socket.emit("news", t);
} catch (e) {
console.log("send data error:" + (t || "") + JSON.stringify(e));
}
},
getPrinterList: function getPrinterList() {
return this.printerList;
},
start: function start() {
var _this = this;
var t = this;
window.WebSocket
? this.socket ||
((this.socket = io("http://localhost:17521", {
reconnectionAttempts: 5
})),
this.socket.on("connect", function (e) {
(t.opened = !0),
console.log("Websocket opened."),
_this.socket.on("successs", function (t) {
hinnn.event.trigger("printSuccess_" + t.templateId, t);
}),
_this.socket.on("error", function (t) {
hinnn.event.trigger("printError_" + t.templateId, t);
}),
_this.socket.on("printerList", function (e) {
t.printerList = e;
}),
(t.state = n);
}),
this.socket.on("disconnect", function () {
t.opened = !1;
}))
: console.log("WebSocket start fail");
},
reconnect: function reconnect() {
(this.state !== n && this.state !== i) || (this.stop(), this.ensureReconnectingState() && (console.log("Websocket reconnecting."), this.start()));
},
stop: function stop() {
this.socket && (console.log("Closing the Websocket."), this.socket.close(), (this.socket = null));
},
ensureReconnectingState: function ensureReconnectingState() {
return (this.state = i), this.state === i;
}
});
},
function (t, e, n) {
var i = n(28);
"string" == typeof i && (i = [[t.i, i, ""]]);
var o = {
hmr: !0,
transform: void 0,
insertInto: void 0
};
n(30)(i, o);
i.locals && (t.exports = i.locals);
},
function (t, e, n) {
(t.exports = n(29)(!1)).push([
t.i,
".hicontextmenu {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 215px;\r\n\tpadding: 0 0;\r\n\tmargin: 0;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tlist-style-type: none;\r\n\tlist-style: none;\r\n\tbackground: #fff;\r\n\tborder: 1px solid #bebebe;\r\n\tborder-radius: 2px;\r\n\tfont-size: 13px;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem {\r\n\tposition: relative;\r\n\t-webkit-box-sizing: content-box;\r\n\t-moz-box-sizing: content-box;\r\n\tbox-sizing: content-box;\r\n\tpadding: .2em 12px;\r\n\tcolor: #2f2f2f;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\ttext-decoration: none;\r\n\r\n\tuser-select: none;\r\n\tbackground-color: #fff;\r\n\r\n}\r\n\r\n.hicontextmenuroot>.hicontextmenuitem:hover,\r\n.hicontextmenuroot .hicontextmenuitem > a:hover {\r\n\tbackground-color: #f3f3f3;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem>a {\r\n\ttext-decoration: none;\r\n\tcolor: #363636;\r\n\tline-height: 22px;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu>ul {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu:hover>ul {\r\n\tdisplay: block;\r\n\tleft: 100%;\r\n\ttop: -1px;\r\n\tmargin-left: 0px;\r\n}\r\n\r\n.hicontextmenuroot .borderBottom {\r\n\tborder-bottom: 1px solid #efe6e6;\r\n}\r\n\r\n.hicontextmenuroot .disable> a {\r\n \r\n color: #ccc;\r\n \r\n}\r\n.hicontextmenuroot>.disable:hover,\r\n.hicontextmenuroot .disable> a:hover {\r\n\tbackground-color:#fff;\r\n}",
""
]);
},
function (t, e, n) {
"use strict";
t.exports = function (t) {
var e = [];
return (
(e.toString = function () {
return this.map(function (e) {
var n = (function (t, e) {
var n = t[1] || "",
i = t[3];
if (!i) return n;
if (e && "function" == typeof btoa) {
var o = ((a = i), "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(a)))) + " */"),
r = i.sources.map(function (t) {
return "/*# sourceURL=" + i.sourceRoot + t + " */";
});
return [n].concat(r).concat([o]).join("\n");
}
var a;
return [n].join("\n");
})(e, t);
return e[2] ? "@media " + e[2] + "{" + n + "}" : n;
}).join("");
}),
(e.i = function (t, n) {
"string" == typeof t && (t = [[null, t, ""]]);
for (var i = {}, o = 0; o < this.length; o++) {
var r = this[o][0];
null != r && (i[r] = !0);
}
for (o = 0; o < t.length; o++) {
var a = t[o];
(null != a[0] && i[a[0]]) || (n && !a[2] ? (a[2] = n) : n && (a[2] = "(" + a[2] + ") and (" + n + ")"), e.push(a));
}
}),
e
);
};
},
function (t, e, n) {
var i,
o,
r = {},
a =
((i = function i() {
return window && document && document.all && !window.atob;
}),
function () {
return void 0 === o && (o = i.apply(this, arguments)), o;
}),
p = (function (t) {
var e = {};
return function (t, n) {
if ("function" == typeof t) return t();
if (void 0 === e[t]) {
var i = function (t, e) {
return e ? e.querySelector(t) : document.querySelector(t);
}.call(this, t, n);
if (window.HTMLIFrameElement && _instanceof(i, window.HTMLIFrameElement))
try {
i = i.contentDocument.head;
} catch (t) {
i = null;
}
e[t] = i;
}
return e[t];
};
})(),
s = null,
l = 0,
u = [],
d = n(31);
function c(t, e) {
for (var n = 0; n < t.length; n++) {
var i = t[n],
o = r[i.id];
if (o) {
o.refs++;
for (var a = 0; a < o.parts.length; a++) {
o.parts[a](i.parts[a]);
}
for (; a < i.parts.length; a++) {
o.parts.push(y(i.parts[a], e));
}
} else {
var p = [];
for (a = 0; a < i.parts.length; a++) {
p.push(y(i.parts[a], e));
}
r[i.id] = {
id: i.id,
refs: 1,
parts: p
};
}
}
}
function h(t, e) {
for (var n = [], i = {}, o = 0; o < t.length; o++) {
var r = t[o],
a = e.base ? r[0] + e.base : r[0],
p = {
css: r[1],
media: r[2],
sourceMap: r[3]
};
i[a]
? i[a].parts.push(p)
: n.push(
(i[a] = {
id: a,
parts: [p]
})
);
}
return n;
}
function f(t, e) {
var n = p(t.insertInto);
if (!n) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
var i = u[u.length - 1];
if ("top" === t.insertAt) i ? (i.nextSibling ? n.insertBefore(e, i.nextSibling) : n.appendChild(e)) : n.insertBefore(e, n.firstChild), u.push(e);
else if ("bottom" === t.insertAt) n.appendChild(e);
else {
if ("object" != _typeof(t.insertAt) || !t.insertAt.before)
throw new Error(
"[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n"
);
var o = p(t.insertAt.before, n);
n.insertBefore(e, o);
}
}
function g(t) {
if (null === t.parentNode) return !1;
t.parentNode.removeChild(t);
var e = u.indexOf(t);
e >= 0 && u.splice(e, 1);
}
function m(t) {
var e = document.createElement("style");
if ((void 0 === t.attrs.type && (t.attrs.type = "text/css"), void 0 === t.attrs.nonce)) {
var i = (function () {
0;
return n.nc;
})();
i && (t.attrs.nonce = i);
}
return v(e, t.attrs), f(t, e), e;
}
function v(t, e) {
Object.keys(e).forEach(function (n) {
t.setAttribute(n, e[n]);
});
}
function y(t, e) {
var n, i, o, r;
if (e.transform && t.css) {
if (!(r = "function" == typeof e.transform ? e.transform(t.css) : e.transform.default(t.css))) return function () {};
t.css = r;
}
if (e.singleton) {
var a = l++;
(n = s || (s = m(e))), (i = T.bind(null, n, a, !1)), (o = T.bind(null, n, a, !0));
} else
t.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa
? ((n = (function (t) {
var e = document.createElement("link");
return void 0 === t.attrs.type && (t.attrs.type = "text/css"), (t.attrs.rel = "stylesheet"), v(e, t.attrs), f(t, e), e;
})(e)),
(i = function (t, e, n) {
var i = n.css,
o = n.sourceMap,
r = void 0 === e.convertToAbsoluteUrls && o;
(e.convertToAbsoluteUrls || r) && (i = d(i));
o && (i += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + " */");
var a = new Blob([i], {
type: "text/css"
}),
p = t.href;
(t.href = URL.createObjectURL(a)), p && URL.revokeObjectURL(p);
}.bind(null, n, e)),
(o = function o() {
g(n), n.href && URL.revokeObjectURL(n.href);
}))
: ((n = m(e)),
(i = function (t, e) {
var n = e.css,
i = e.media;
i && t.setAttribute("media", i);
if (t.styleSheet) t.styleSheet.cssText = n;
else {
for (; t.firstChild; ) {
t.removeChild(t.firstChild);
}
t.appendChild(document.createTextNode(n));
}
}.bind(null, n)),
(o = function o() {
g(n);
}));
return (
i(t),
function (e) {
if (e) {
if (e.css === t.css && e.media === t.media && e.sourceMap === t.sourceMap) return;
i((t = e));
} else o();
}
);
}
t.exports = function (t, e) {
if ("undefined" != typeof DEBUG && DEBUG && "object" != (typeof document === "undefined" ? "undefined" : _typeof(document)))
throw new Error("The style-loader cannot be used in a non-browser environment");
((e = e || {}).attrs = "object" == _typeof(e.attrs) ? e.attrs : {}),
e.singleton || "boolean" == typeof e.singleton || (e.singleton = a()),
e.insertInto || (e.insertInto = "head"),
e.insertAt || (e.insertAt = "bottom");
var n = h(t, e);
return (
c(n, e),
function (t) {
for (var i = [], o = 0; o < n.length; o++) {
var a = n[o];
(p = r[a.id]).refs--, i.push(p);
}
t && c(h(t, e), e);
for (o = 0; o < i.length; o++) {
var p;
if (0 === (p = i[o]).refs) {
for (var s = 0; s < p.parts.length; s++) {
p.parts[s]();
}
delete r[p.id];
}
}
}
);
};
var b,
E =
((b = []),
function (t, e) {
return (b[t] = e), b.filter(Boolean).join("\n");
});
function T(t, e, n, i) {
var o = n ? "" : i.css;
if (t.styleSheet) t.styleSheet.cssText = E(e, o);
else {
var r = document.createTextNode(o),
a = t.childNodes;
a[e] && t.removeChild(a[e]), a.length ? t.insertBefore(r, a[e]) : t.appendChild(r);
}
}
},
function (t, e) {
t.exports = function (t) {
var e = "undefined" != typeof window && window.location;
if (!e) throw new Error("fixUrls requires window.location");
if (!t || "string" != typeof t) return t;
var n = e.protocol + "//" + e.host,
i = n + e.pathname.replace(/\/[^\/]*$/, "/");
return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (t, e) {
var o,
r = e
.trim()
.replace(/^"(.*)"$/, function (t, e) {
return e;
})
.replace(/^'(.*)'$/, function (t, e) {
return e;
});
return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)
? t
: ((o = 0 === r.indexOf("//") ? r : 0 === r.indexOf("/") ? n + r : i + r.replace(/^\.\//, "")), "url(" + JSON.stringify(o) + ")");
});
};
},
function (t, e) {
var n, i;
window,
document,
(n = jQuery),
((i = function i(t, e) {
this.init(t, e);
}).prototype = {
init: function init(t, e) {
(this.ele = t),
(this.defaults = {
menu: [
{
text: "text",
menus: [{}, {}],
callback: function callback() {}
}
],
target: function target(t) {},
width: 100,
itemHeight: 28,
bgColor: "#fff",
color: "#333",
fontSize: 14,
hoverBgColor: "#f5f5f5"
}),
(this.opts = n.extend(!0, {}, this.defaults, e)),
(this.random = new Date().getTime() + parseInt(1e3 * Math.random())),
this.eventBind();
},
renderMenu: function renderMenu(t, e) {
var n = this,
i = e;
if (t && t.length) {
var o = $('
');
i || (i = o).addClass("hicontextmenuroot"),
$.each(t, function (t, e) {
var i = !!e.disable && e.disable(),
r = $('