UNPKG

tfp

Version:

A Web UI framework for TaskBuilder

744 lines (722 loc) 127 kB
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>选择图标</title> <link rel="stylesheet" type="text/css" href="iconfont/iconfont.css" /> <script type="text/javascript" src="/node_modules/jquery/dist/jquery.min.js"></script> <script type="text/javascript"> function page1_onLoad() { let args = JSON.parse(tfp.getDialogArgs()); if(args.iconChoose == false && args.localChoose == true && args.urlChoose == true){ left_icon.hide(); icon_col_panel.hide(); bg_col_panel.hide(); example.hide(); panel3.hide(); }else if(args.localChoose == false && args.iconChoose == true && args.urlChoose == true){ photoUpload1.hide(); }else if(args.urlChoose == false && args.iconChoose == true && args.localChoose == true){ flexBox1.hide(); }else if(args.iconChoose == false && args.localChoose == false && args.urlChoose == true){ left_icon.hide(); icon_col_panel.hide(); bg_col_panel.hide(); example.hide(); panel3.hide(); photoUpload1.hide(); }else if(args.iconChoose == false && args.urlChoose == false && args.localChoose == true){ left_icon.hide(); icon_col_panel.hide(); bg_col_panel.hide(); example.hide(); panel3.hide(); flexBox1.hide(); }else if(args.localChoose == false && args.urlChoose == false && args.iconChoose == true){ photoUpload1.hide(); flexBox1.hide(); }else if(args.iconChoose == false && args.localChoose == false && args.urlChoose == false){ left_icon.hide(); icon_col_panel.hide(); bg_col_panel.hide(); example.hide(); panel3.hide(); photoUpload1.hide(); flexBox1.hide(); } // 图标 icons = [ { "name": "默认", "code": "icon-default" }, { "name": "添加", "code": "icon-insert" }, { "name": "修改", "code": "icon-update" }, { "name": "查看", "code": "icon-get" }, { "name": "申请", "code": "icon-apply" }, { "name": "审批", "code": "icon-approve" }, { "name": "查询", "code": "icon-query" }, { "name": "统计", "code": "icon-statistics" }, { "name": "日志", "code": "icon-diary" }, { "name": "日程", "code": "icon-schedule" }, { "name": "文件", "code": "icon-file" }, { "name": "相册", "code": "icon-album" }, { "name": "邮件", "code": "icon-mail" }, { "name": "通讯录", "code": "icon-addressbook" }, { "name": "消息", "code": "icon-msg" }, { "name": "考勤", "code": "icon-attendance" }, { "name": "薪酬", "code": "icon-salary" }, { "name": "考评", "code": "icon-evaluate" }, { "name": "绩效", "code": "icon-achievement" }, { "name": "新闻", "code": "icon-news" }, { "name": "公告", "code": "icon-notice" }, { "name": "期刊", "code": "icon-journal" }, { "name": "规章", "code": "icon-regulations" }, { "name": "发起", "code": "icon-startwork" }, { "name": "待办", "code": "icon-working" }, { "name": "已办", "code": "icon-worked" }, { "name": "办结", "code": "icon-endwork" }, { "name": "微博", "code": "icon-blog" }, { "name": "论坛", "code": "icon-forum" }, { "name": "问答", "code": "icon-questions" }, { "name": "组织", "code": "icon-org" }, { "name": "集团", "code": "icon-group" }, { "name": "部门", "code": "icon-dep" }, { "name": "岗位", "code": "icon-post" }, { "name": "人员", "code": "icon-user" }, { "name": "角色", "code": "icon-role" }, { "name": "签名", "code": "icon-signature" }, { "name": "应用", "code": "icon-app" }, { "name": "门户", "code": "icon-door" }, { "name": "系统设置", "code": "icon-systemset" }, { "name": "系统日志", "code": "icon-systemlog" }, { "name": "系统任务", "code": "icon-systemtask" }, { "name": "系统服务", "code": "icon-systemservice" }, { "name": "外出", "code": "icon-goout" }, { "name": "出差", "code": "icon-travel" }, { "name": "请假", "code": "icon-leave" }, { "name": "加班", "code": "icon-overtime" }, { "name": "补签", "code": "icon-reissue" }, { "name": "调休", "code": "icon-replace" }, { "name": "入职", "code": "icon-hr-entry" }, { "name": "转正", "code": "icon-hr-normal" }, { "name": "调岗", "code": "icon-hr-transfer" }, { "name": "离职", "code": "icon-hr-leave" }, { "name": "客户", "code": "icon-customer" }, { "name": "供应商", "code": "icon-supplier" }, { "name": "商品", "code": "icon-goods" }, { "name": "机会", "code": "icon-visit" }, { "name": "售后", "code": "icon-aftersales" }, { "name": "销售", "code": "icon-sale" }, { "name": "采购", "code": "icon-purchase" }, { "name": "合同", "code": "icon-contract" }, { "name": "收款", "code": "icon-collection" }, { "name": "付款", "code": "icon-payment" }, { "name": "发票", "code": "icon-invoice" }, { "name": "入库", "code": "icon-erp-enter" }, { "name": "出库", "code": "icon-erp-leave" }, { "name": "调拨", "code": "icon-erp-transfer" }, { "name": "盘点", "code": "icon-erp-inventory" }, { "name": "库存", "code": "icon-erp-stock" }, { "name": "台账", "code": "icon-erp-account" }, { "name": "凭证", "code": "icon-erp-voucher" }, { "name": "余额", "code": "icon-erp-balance" }, { "name": "图表", "code": "icon-chart" }, { "name": "报表", "code": "icon-report" }, { "name": "效率", "code": "icon-efficiency" }, { "name": "驾驶舱", "code": "icon-cockpit" }, { "name": "表单", "code": "icon-form" }, { "name": "流程", "code": "icon-flow" }, { "name": "档案", "code": "icon-record" }, { "name": "监控", "code": "icon-control" }, { "name": "管理", "code": "icon-manage" }, { "name": "会议", "code": "icon-meeting" }, { "name": "车辆", "code": "icon-car" }, { "name": "资产", "code": "icon-assets" }, { "name": "用品", "code": "icon-supplies" }, { "name": "证照", "code": "icon-licence" }, { "name": "印鉴", "code": "icon-seal" }, { "name": "预算", "code": "icon-budget" }, { "name": "费用", "code": "icon-expenses" }, { "name": "借方", "code": "icon-debit" }, { "name": "贷方", "code": "icon-credit" }, { "name": "招投标", "code": "icon-bidding" }, { "name": "计划", "code": "icon-plan" }, { "name": "总结", "code": "icon-summary" }, { "name": "协同", "code": "icon-teamwork" }, { "name": "分配", "code": "icon-assignment" }, { "name": "上报", "code": "icon-reporting" }, { "name": "项目", "code": "icon-project" }, { "name": "收文", "code": "icon-receipt" }, { "name": "发文", "code": "icon-issue" }, { "name": "交换", "code": "icon-exchange" }, { "name": "督办", "code": "icon-supervise" }, { "name": "党建", "code": "icon-party" }, { "name": "招聘", "code": "icon-recruit" }, { "name": "培训", "code": "icon-train" }, { "name": "学习", "code": "icon-study" }, { "name": "考试", "code": "icon-test" }, { "name": "应用管理", "code": "icon-yingyongguanli" }, { "name": "商品管理", "code": "icon-shangpinguanli" }, { "name": "库存", "code": "icon-kucun" }, { "name": "客户", "code": "icon-kehu" }, { "name": "收支分析", "code": "icon-shouzhifenxi" }, { "name": "采购", "code": "icon-caigouguanli-caigouzhihang" }, { "name": "供应商", "code": "icon-gongyingshangxinxi" } ]; // 颜色 icon_color = [ // 灰色 {"color":"#ffffff"}, {"color":"#eeeeee"}, {"color":"#e0e0e0"}, {"color":"#bdbdbd"}, {"color":"#9e9e9e"}, {"color":"#757575"}, {"color":"#616161"}, {"color":"#424242"}, // 红色 {"color":"#f9bdbb"}, {"color":"#f69988"}, {"color":"#f36c60"}, {"color":"#e84e40"}, {"color":"#e51c23"}, {"color":"#dd191d"}, {"color":"#d01716"}, {"color":"#c41411"}, // 橙色 {"color":"#ffecb3"}, {"color":"#ffe082"}, {"color":"#ffd54f"}, {"color":"#ffca28"}, {"color":"#ffc107"}, {"color":"#ffb300"}, {"color":"#ffa000"}, {"color":"#ff8f00"}, // 黄色 {"color":"#fff9c4"}, {"color":"#fff59d"}, {"color":"#fff176"}, {"color":"#ffee58"}, {"color":"#ffeb3b"}, {"color":"#fdd835"}, {"color":"#fbc02d"}, {"color":"#f9a825"}, // 绿色 {"color":"#a3e9a4"}, {"color":"#72d572"}, {"color":"#42bd41"}, {"color":"#2baf2b"}, {"color":"#259b24"}, {"color":"#0a8f08"}, {"color":"#0a7e07"}, {"color":"#056f00"}, // 蓝色 {"color":"#b3e5fc"}, {"color":"#81d4fa"}, {"color":"#4fc3f7"}, {"color":"#29b6f6"}, {"color":"#03a9f4"}, {"color":"#039be5"}, {"color":"#0288d1"}, {"color":"#0277bd"}, // 紫色 {"color":"#e1bee7"}, {"color":"#ce93d8"}, {"color":"#ba68c8"}, {"color":"#ab47bc"}, {"color":"#9c27b0"}, {"color":"#8e24aa"}, {"color":"#7b1fa2"}, {"color":"#6a1b9a"}, // 粉色 {"color":"#f8bbd0"}, {"color":"#f48fb1"}, {"color":"#f06292"}, {"color":"#ec407a"}, {"color":"#e91e63"}, {"color":"#d81b60"}, {"color":"#c2185b"}, {"color":"#ad1457"}, ]; // 选择图标 for (var i = 0; i < icons.length; i++) { $("#left_icon").append( '<li class="dib" style="list-style: none; cursor:pointer; width:32px; height:32px; ' +'line-height:32px; text-align:center; margin:6px;"><span class="iconfont ' + icons[i].code + '" title="' + icons[i].name + '" style="font-size:30px; color:#666666;"></span></li>'); } $(".dib").hover(function () { $(this).addClass('hover1'); }, function () { $(this).removeClass('hover1'); }); var icon_html = []; var icon_class = []; $(".dib").bind("click",function(){ $(this).addClass('click1').siblings(".dib").removeClass('click1'); icon_class = $(this).children("span").attr("class"); icon_html = []; icon_html.push($(this).html()); $("#example").empty().append("<div>"+$(this).html()+"</div>"); $(".col").removeClass('border1'); $(".col1").removeClass('border1'); icon_col_text.value = ''; bg_col_text.value = ''; }); // 图标颜色 for(var i = 0; i<icon_color.length; i++){ $("#icon_col").append('<div class="col" style="width:15px; height:15px; margin:1px; background-color:'+icon_color[i].color+';"></div>'); } $(".col").bind("click",function(){ $(this).addClass('border1').siblings(".col").removeClass('border1'); icon_col = $(this).css('background-color'); const rgbToHex = (color) => { let arr = color.split(','); let r = +arr[0].split('(')[1]; let g = +arr[1]; let b = +arr[2].split(')')[0]; let value = (1 << 24) + r * (1 << 16) + g * (1 << 8) + b; value = value.toString(16); return '#' + value.slice(1); }; icon_col_text.value = rgbToHex(icon_col); $("#example").find("div").children("span").css("color",icon_col_text.value); }); // 图标背景颜色 for(var i = 0; i<icon_color.length; i++){ $("#bg_col").append('<div class="col1" style="width:15px; height:15px; margin:1px; background-color:'+icon_color[i].color+';"></div>'); } $(".col1").bind("click",function(){ $(this).addClass('border1').siblings(".col1").removeClass('border1'); bg_col = $(this).css('background-color'); const rgbToHex = (color) => { let arr = color.split(','); let r = +arr[0].split('(')[1]; let g = +arr[1]; let b = +arr[2].split(')')[0]; let value = (1 << 24) + r * (1 << 16) + g * (1 << 8) + b; value = value.toString(16); return '#' + value.slice(1); }; bg_col_text.value = rgbToHex(bg_col); $("#example").children("div").css("background-color",bg_col_text.value); }); // 保存按钮被触发 $("#btn_save").on("click",function(){ let ret = {}; if(tab1.pageIndex == 0 && icon_html.length == 0 || tab1.pageIndex == 1 && photoUpload1.value.length == 0 || tab1.pageIndex == 2 && isNull(icon_lj.val())){ tfp.showMsg("请选择应用图标!"); return; }else{ if(tab1.pageIndex == 0 && !icon_html.length == 0){ ret = { type: "iconfont", class: icon_class, color: icon_col_text.value, bgColor: bg_col_text.value }; }else if(tab1.pageIndex == 1 && !photoUpload1.value.length == 0){ ret = { type: "url", url: "/Download?fileCode="+photoUpload1.value[0].code } }else if(tab1.pageIndex == 2 && !isNull(icon_lj.val())){ ret = { type: "url", url: icon_lj.value } } tfp.closeCurDialog(ret); } }); // 关闭按钮被触发 $("#btn_close").on("click",function(){ tfp.closeCurDialog(); }); // 图标颜色被选中 $("#label_icon_col").on("click",function(){ label_icon_col.css( 'color' , '#000000' ); label_bg_col.css( 'color' , '#999999' ); icon_col_panel.show( ); bg_col_panel.hide( ); }); // 图标背景颜色被选中 $("#label_bg_col").on("click",function(){ label_icon_col.css( 'color' , '#999999' ); label_bg_col.css( 'color' , '#000000' ); bg_col_panel.show( ); icon_col_panel.hide( ); }); // 图标颜色清空按钮触发 $("#btn_col_empty").on("click",function(){ $(".col").removeClass('border1'); icon_col_text.value = ''; $("#example").find("div").children("span").css("color",icon_col_text.value); }); // 图标背景颜色清空按钮触发 $("#btn_bg_empty").on("click",function(){ $(".col1").removeClass('border1'); bg_col_text.value = ''; $("#example").children("div").css("background-color",bg_col_text.value); }); // 背景颜色输入框失去光标后给图标添加背景颜色 $("#bg_col_text").blur(function(){ $("#example").children("div").css("background-color",bg_col_text.value); }); // 图标颜色输入框失去光标后给图标添加字体颜色 $("#icon_col_text").blur(function(){ $("#example").children("div").css("color",icon_col_text.value); }); } function btn_clear_onClick() { icon_lj.value = ''; img_pre.attr( 'src' ,''); img_pre.hide( ); } function btn_pre_onClick() { if(!isNull(icon_lj.val())){ img_pre.attr( 'src' , icon_lj.val()); img_pre.show(); } } </script> <script type="text/javascript"> !function i(r,a,o){function s(t,e){if(!a[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=a[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,i,r,a,o)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e<o.length;e++)s(o[e]);return s}({1:[function(e,t,n){t.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],2:[function(e,t,n){function l(e,t,n,i,r,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,r)}t.exports=function(s){return function(){var e=this,o=arguments;return new Promise(function(t,n){var i=s.apply(e,o);function r(e){l(i,t,n,r,a,"next",e)}function a(e){l(i,t,n,r,a,"throw",e)}r(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],3:[function(e,t,n){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],4:[function(e,t,n){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}t.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},t.exports.__esModule=!0,t.exports.default=t.exports},{}],5:[function(e,t,n){var r=e("./superPropBase.js");function i(){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(e,t,n){var i=r(e,t);if(i){i=Object.getOwnPropertyDescriptor(i,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},t.exports.__esModule=!0,t.exports.default=t.exports,i.apply(this,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{"./superPropBase.js":11}],6:[function(e,t,n){function i(e){return t.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{}],7:[function(e,t,n){var i=e("./setPrototypeOf.js");t.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./setPrototypeOf.js":10}],8:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],9:[function(e,t,n){var i=e("./typeof.js").default,r=e("./assertThisInitialized.js");t.exports=function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./assertThisInitialized.js":1,"./typeof.js":12}],10:[function(e,n,t){function i(e,t){return n.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n.exports.__esModule=!0,n.exports.default=n.exports,i(e,t)}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports},{}],11:[function(e,t,n){var i=e("./getPrototypeOf.js");t.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e},t.exports.__esModule=!0,t.exports.default=t.exports},{"./getPrototypeOf.js":6}],12:[function(e,t,n){function i(e){return t.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},{}],13:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":14}],14:[function(e,t,n){t=function(o){"use strict";var l,e=Object.prototype,u=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},i=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(e){a=function(e,t,n){return e[t]=n}}function s(e,t,n,i){var r,a,o,s,t=t&&t.prototype instanceof m?t:m,t=Object.create(t.prototype),i=new O(i||[]);return t._invoke=(r=e,a=n,o=i,s=p,function(e,t){if(s===c)throw new Error("Generator is already running");if(s===f){if("throw"===e)throw t;return k()}for(o.method=e,o.arg=t;;){var n=o.delegate;if(n){var i=function e(t,n){var i=t.iterator[n.method];if(i===l){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=l,e(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=d(i,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;i=i.arg;if(!i)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g;{if(!i.done)return i;n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=l)}n.delegate=null;return g}(n,o);if(i){if(i===g)continue;return i}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(s===p)throw s=f,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s=c;i=d(r,a,o);if("normal"===i.type){if(s=o.done?f:h,i.arg!==g)return{value:i.arg,done:o.done}}else"throw"===i.type&&(s=f,o.method="throw",o.arg=i.arg)}}),t}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}o.wrap=s;var p="suspendedStart",h="suspendedYield",c="executing",f="completed",g={};function m(){}function b(){}function y(){}var v={};a(v,i,function(){return this});t=Object.getPrototypeOf,t=t&&t(t(w([])));t&&t!==e&&u.call(t,i)&&(v=t);var _=y.prototype=m.prototype=Object.create(v);function j(e){["next","throw","return"].forEach(function(t){a(e,t,function(e){return this._invoke(t,e)})})}function M(o,s){var t;this._invoke=function(n,i){function e(){return new s(function(e,t){!function t(e,n,i,r){e=d(o[e],o,n);if("throw"!==e.type){var a=e.arg;return(n=a.value)&&"object"==typeof n&&u.call(n,"__await")?s.resolve(n.__await).then(function(e){t("next",e,i,r)},function(e){t("throw",e,i,r)}):s.resolve(n).then(function(e){a.value=e,i(a)},function(e){return t("throw",e,i,r)})}r(e.arg)}(n,i,e,t)})}return t=t?t.then(e,e):e()}}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function w(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,e=function e(){for(;++n<t.length;)if(u.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=l,e.done=!0,e};return e.next=e}}return{next:k}}function k(){return{value:l,done:!0}}return a(_,"constructor",b.prototype=y),a(y,"constructor",b),b.displayName=a(y,r,"GeneratorFunction"),o.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,a(e,r,"GeneratorFunction")),e.prototype=Object.create(_),e},o.awrap=function(e){return{__await:e}},j(M.prototype),a(M.prototype,n,function(){return this}),o.AsyncIterator=M,o.async=function(e,t,n,i,r){void 0===r&&(r=Promise);var a=new M(s(e,t,n,i),r);return o.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},j(_),a(_,r,"Generator"),a(_,i,function(){return this}),a(_,"toString",function(){return"[object Generator]"}),o.keys=function(n){var e,i=[];for(e in n)i.push(e);return i.reverse(),function e(){for(;i.length;){var t=i.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},o.values=w,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&u.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=l)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var i=this;function e(e,t){return a.type="throw",a.arg=n,i.next=e,t&&(i.method="next",i.arg=l),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t],a=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var o=u.call(r,"catchLoc"),s=u.call(r,"finallyLoc");if(o&&s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(o){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&u.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}var a=(r=r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc?null:r)?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i,r=n.completion;return"throw"===r.type&&(i=r.arg,C(n)),i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=l),g}},o}("object"==typeof t?t.exports:{});try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},{}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=[{id:"Container",name:"容器组件",components:[{name:"Panel",comment:"面板",matchAllClient:!0},{name:"FlexBox",comment:"弹性栅格",matchAllClient:!0,dependencies:["Panel"]},{name:"Form",comment:"表单",matchAllClient:!0},{name:"TabPage",comment:"选项页",matchAllClient:!0,dependent:!0},{name:"Tab",comment:"选项卡",matchAllClient:!0,dependencies:["TabPage"]},{name:"Grid",comment:"数据表格"},{name:"DataSet",comment:"可编辑表格",dependencies:["DateTime","Date"]},{name:"Tree",comment:"树形组件"},{name:"Iframe",comment:"嵌入页面",matchAllClient:!0}]},{id:"Input",name:"表单输入项",components:[{name:"Button",comment:"按钮",matchAllClient:!0},{name:"Link",comment:"链接",matchAllClient:!0},{name:"Label",comment:"文本标签",matchAllClient:!0},{name:"Pre",comment:"文本段落",matchAllClient:!0},{name:"Text",comment:"单行输入框",matchAllClient:!0},{name:"TextArea",comment:"多行输入框",matchAllClient:!0},{name:"Radio",comment:"单选框",matchAllClient:!0},{name:"CheckBox",comment:"复选框",matchAllClient:!0},{name:"Select",comment:"下拉列表"},{name:"PopupList",comment:"弹出列表"},{name:"List",comment:"只读列表",matchAllClient:!0},{name:"Switch",comment:"开关",matchAllClient:!0},{name:"Password",comment:"密码",matchAllClient:!0},{name:"Hidden",comment:"隐藏域",matchAllClient:!0},{name:"Date",comment:"日期"},{name:"Time",comment:"时间"},{name:"DateTime",comment:"日期时间"},{name:"RichText",comment:"富文本"},{name:"Image",comment:"图片",matchAllClient:!0},{name:"FileUpload",comment:"文件上传",matchAllClient:!0},{name:"PhotoUpload",comment:"图片上传",matchAllClient:!0},{name:"Dep",comment:"部门"},{name:"User",comment:"用户"},{name:"Role",comment:"角色"},{name:"QrCode",comment:"二维码",matchAllClient:!0},{name:"BarCode",comment:"条形码",matchAllClient:!0}]},{id:"Invisible",name:"不可视组件",components:[{name:"Service",comment:"后台服务",matchAllClient:!0,isInvisible:!0},{name:"Timer",comment:"定时器",matchAllClient:!0,isInvisible:!0}]},{id:"ImportExport",name:"导入导出",components:[{name:"ExcelImport",comment:"Excel导入"},{name:"ExcelExport",comment:"Excel导出"}]},{id:"media",name:"媒体组件",components:[{name:"Audio",comment:"音频",matchAllClient:!0},{name:"Video",comment:"视频",matchAllClient:!0}]},{id:"Chart",name:"统计图表",components:[{name:"ChartLine",comment:"折线图",matchAllClient:!0},{name:"ChartBar",comment:"柱状图",matchAllClient:!0},{name:"ChartBarY",comment:"条形图",matchAllClient:!0},{name:"ChartLineBar",comment:"线柱结合图",matchAllClient:!0},{name:"ChartPie",comment:"饼状图",matchAllClient:!0},{name:"ChartAnnular",comment:"环形图",matchAllClient:!0}]}]},{}],16:[function(e,t,n){"use strict";var i=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("@babel/runtime/helpers/classCallCheck")),o=i(e("@babel/runtime/helpers/createClass")),s=i(e("@babel/runtime/helpers/get")),l=i(e("@babel/runtime/helpers/inherits")),r=i(e("@babel/runtime/helpers/possibleConstructorReturn")),u=i(e("@babel/runtime/helpers/getPrototypeOf"));function d(n){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=(0,u.default)(n);return t=i?(e=(0,u.default)(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),(0,r.default)(this,t)}}e=function(e){(0,l.default)(r,e);var i=d(r);function r(e,t,n){return(0,a.default)(this,r),i.call(this,e,"Button",t,n)}return(0,o.default)(r,[{key:"value",get:function(){return this.dataModel.value},set:function(e){this.dataModel.value=e,this._jqObj&&(this._jqObj.find("label").text(e),this.exeEventHandler("onChange"))}},{key:"buttonType",get:function(){return this.dataModel.buttonType},set:function(e){e=e||"default";this.checkAttrOption("buttonType",e)?(this.dataModel.buttonType=e,this._jqObj&&(this._jqObj.removeClass("tfp-button-default tfp-button-primary tfp-button-info tfp-button-warning tfp-button-success tfp-button-danger"),this._jqObj.removeClass("tfp-button-default-plain tfp-button-primary-plain tfp-button-info-plain tfp-button-warning-plain tfp-button-success-plain tfp-button-danger-plain"),this.plain?this._jqObj.addClass("tfp-button-"+e+"-plain"):this._jqObj.addClass("tfp-button-"+e))):this._tfp.showMsg("按钮组件不支持类型:"+e+"!")}},{key:"theme",get:function(){return this.dataModel.theme},set:function(e){e=e||"rect";this.checkAttrOption("theme",e)?(this.dataModel.theme=e,this._jqObj&&(this._jqObj.removeClass("tfp-button-round tfp-button-rect tfp-button-circle"),this._jqObj.addClass("tfp-button-"+e))):this._tfp.showMsg("按钮组件不支持风格:"+e+"!")}},{key:"plain",get:function(){return this.dataModel.plain},set:function(e){this.dataModel.plain=!!e,this._jqObj&&(this._jqObj.removeClass("tfp-button-default tfp-button-primary tfp-button-info tfp-button-warning tfp-button-success tfp-button-danger"),this._jqObj.removeClass("tfp-button-default-plain tfp-button-primary-plain tfp-button-info-plain tfp-button-warning-plain tfp-button-success-plain tfp-button-danger-plain"),e=this.buttonType||"default",this.dataModel.plain?this._jqObj.addClass("tfp-button-"+e+"-plain"):this._jqObj.addClass("tfp-button-"+e))}},{key:"showImage",get:function(){return this.dataModel.showImage},set:function(e){var t,n;this.dataModel.showImage=!!e,this._jqObj&&(e?0<this._jqObj.find("img").length?this._jqObj.find("img").parent().show():(this._tfp.isDesigning&&(uiDesigner.showAttrSettingRow("imageUrl"),uiDesigner.showAttrSettingRow("imageWidth"),uiDesigner.showAttrSettingRow("imageHeight"),uiDesigner.showAttrSettingRow("portrait"),uiDesigner.showAttrSettingRow("hiddenText")),(t=this.dataModel.imageUrl)?this._tfp.isDesigning&&(t=this._tfp.getUrlRealPath(t)):t=this._tfp.rootPath+"/src/components/button/images/default-photo.png",n=24,((n=this.dataModel.imageWidth?this.dataModel.imageWidth:n)+"").indexOf("px")<0&&(n+="px"),e=24,((e=this.dataModel.imageHeight?this.dataModel.imageHeight:e)+"").indexOf("px")<0&&(e+="px"),$('<div style="float:left;display:block;">'+('<img src="'+t+'" style="width:'+n+";height:"+e+';margin-top:3px;margin-bottom:3px;" />')+"</div>").insertBefore(this._jqObj.find("label")),this._jqObj.find("label").css("margin-left","7px"),this._jqObj.find("label").css("line-height",this._jqObj.height()+"px")):(this._jqObj.find("img").parent().remove(),this.dataModel.portrait=!1,this.dataModel.hiddenText=!1,this.dataModel.imageUrl="",this.dataModel.imageWidth=24,this.dataModel.imageHeight=24,this._jqObj.find("label").css("margin-left","0"),this._jqObj.find("label").css("line-height","30px"),this._jqObj.find("label").show(),this._tfp.isDesigning&&(uiDesigner.hideAttrSettingRow("imageUrl"),uiDesigner.hideAttrSettingRow("imageWidth"),uiDesigner.hideAttrSettingRow("imageHeight"),uiDesigner.setCurCptAttrSettingVal("imageWidth","24"),uiDesigner.setCurCptAttrSettingVal("imageHeight","24"),uiDesigner.setCurCptAttrSettingVal("portrait",!1),uiDesigner.hideAttrSettingRow("portrait"),uiDesigner.setCurCptAttrSettingVal("hiddenText",!1),uiDesigner.hideAttrSettingRow("hiddenText"))))}},{key:"imageUrl",get:function(){return this.dataModel.imageUrl},set:function(e){this.dataModel.imageUrl=e,this._jqObj&&(this._tfp.isDesigning&&e?this._jqObj.find("img").attr("src",this._tfp.getUrlRealPath(e)):this._jqObj.find("img").attr("src",e))}},{key:"imageWidth",get:function(){return this.dataModel.imageWidth},set:function(e){this.dataModel.imageWidth=e,this._jqObj&&this._jqObj.find("img").attr("width",e)}},{key:"imageHeight",get:function(){return this.dataModel.imageHeight},set:function(e){this.dataModel.imageHeight=e,this._jqObj&&(this._jqObj.find("img").attr("height",e),this.portrait||this._jqObj.find("label").css("line-height",this._jqObj.find("img").height()+6+"px"))}},{key:"hiddenText",get:function(){return this.dataModel.hiddenText},set:function(e){this.dataModel.hiddenText=!!e,this._jqObj&&0!=this._jqObj.find("label").length&&(e?(this.portrait=!1,uiDesigner.setCurCptAttrSettingVal("portrait",!1),uiDesigner.hideAttrSettingRow("portrait"),this._jqObj.find("img").css("margin-top","3px"),this._jqObj.find("label").hide()):(this._jqObj.find("label").show(),this._jqObj.find("div").css("float","left"),this._jqObj.find("div").css("width",""),this._jqObj.find("img").css("margin-top","3px"),this._jqObj.find("label").css("margin-left","7px"),this._jqObj.find("label").css("line-height",this._jqObj.find("img").height()+6+"px"),uiDesigner.showAttrSettingRow("portrait")))}},{key:"portrait",get:function(){return this.dataModel.portrait},set:function(e){this.dataModel.portrait=!!e,this._jqObj&&0!=this._jqObj.find("div").length&&(e?(this._jqObj.find("div").css("float","none"),this._jqObj.find("div").css("width","100%"),this._jqObj.find("img").css("margin-top","10px"),this._jqObj.find("label").css("margin-left","0"),this._jqObj.find("label").css("line-height","30px")):(this._jqObj.find("div").css("float","left"),this._jqObj.find("div").css("width",""),this._jqObj.find("img").css("margin-top","3px"),this._jqObj.find("label").css("margin-left","7px"),this._jqObj.find("label").css("line-height",this._jqObj.find("img").height()+6+"px")))}},{key:"title",get:function(){return this.dataModel.title},set:function(e){this.dataModel.title=e,this._jqObj&&this._jqObj.attr("title",e)}},{key:"labelHeight",get:function(){return this.dataModel.labelHeight?this._tfp.getPixel(this.dataModel.labelHeight):30},set:function(e){this.dataModel.labelHeight=e,this._jqObj&&(((e=e)+"").indexOf("px")<0&&(e+="px"),this._jqObj.find("label").css("line-height",e))}},{key:"css",value:function(e,t){(0,s.default)((0,u.default)(r.prototype),"css",this).call(this,e,t),"height"==e&&this._jqObj&&!this.showImage&&this._jqObj.find("label").css("line-height",t)}}]),r}(e("../controller.js").VisibleComponent);n.default=e},{"../controller.js":17,"@babel/runtime/helpers/classCallCheck":3,"@babel/runtime/helpers/createClass":4,"@babel/runtime/helpers/get":5,"@babel/runtime/helpers/getPrototypeOf":6,"@babel/runtime/helpers/inherits":7,"@babel/runtime/helpers/interopRequireDefault":8,"@babel/runtime/helpers/possibleConstructorReturn":9}],17:[function(require,module,exports){"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.VisibleComponent=exports.InvisibleComponent=exports.FormInput=exports.ContainerComponent=exports.Component=void 0;var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits")),_possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")),_getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));function _createSuper(n){var i=_isNativeReflectConstruct();return function(){var e,t=(0,_getPrototypeOf2.default)(n);return t=i?(e=(0,_getPrototypeOf2.default)(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),(0,_possibleConstructorReturn2.default)(this,t)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var _parent=Symbol("parent"),Component=function(){function Component(e,t,n,i){if((0,_classCallCheck2.default)(this,Component),!e)throw new Error("请提供tfp对象!");if(!t)throw console.log(n),new Error("请提供组件类型!");if(this._tfp=e,this.level=0,this.index=0,n)this.dataModel=n,this.dataModel.type||(this.dataModel.type=t);else{var r=this._tfp.type(t);if(!r)throw new Error("请提供正确的组件类型!");this.dataModel={type:t},this.dataModel.id=this.dataModel.type.substr(0,1).toLowerCase()+this.dataModel.type.substr(1)+this._tfp.getNewCptIndex(this.dataModel.type);for(var a=this.attrTypes,o=0;o<a.length;o++){var s=a[o];!s.default&&0!=s.default&&0!=s.default||("string"==s.type.toLowerCase()?this.dataModel[s.name]=s.default.replace("{id}",this.id):this.dataModel[s.name]=s.default)}if(r.defaultStyles)for(var l in this.dataModel.styles={},r.defaultStyles)this.dataModel.styles[l]=r.defaultStyles[l]}if(this.dataModel.id||(this.dataModel.id=this.dataModel.type.substr(0,1).toLowerCase()+this.dataModel.type.substr(1)+this._tfp.getNewCptIndex(this.dataModel.type)),(this._tfp.components[this.dataModel.id]=this)._tfp.isRuntime&&(window[this.dataModel.id]=this),i&&(this[_parent]=i,this.level=i.level+1,!this._tfp.isLoadingPage)){i.dataModel.components||(i.dataModel.components=[]);for(var u=!1,d=0;d<i.dataModel.components.length;d++){var p=i.dataModel.components[d];p.id!=this.dataModel.id?p.index>=this.index&&(this.index=p.index+1):u=!0}u||i.dataModel.components.push(this.dataModel)}}return(0,_createClass2.default)(Component,[{key:"id",get:function(){return this.dataModel.id},set:function(e){if(e){var t=this.dataModel.id;if(t!=e){for(var n in this._tfp.components)if(n==e)throw new Error("ID为的"+e+"组件已存在!");this.dataModel.id=e,delete this._tfp.components[t],(this._tfp.components[this.dataModel.id]=this)._tfp.isRuntime&&(delete window[t],window[this.dataModel.id]=this),0<$("#"+t).length&&$("#"+t).attr("id",this.dataModel.id)}}}},{key:"type",get:function(){return this.dataModel.type},set:function(e){}},{key:"metadata",get:function(){return this._tfp.type(this.dataModel.type)},set:function(e){}},{key:"parent",get:function(){return this[_parent]},set:function(e){if(this[_parent]){if(this[_parent].id==e.id)return;this[_parent].dataModel.components.remove(this.dataModel),this[_parent]=e,this[_parent].dataModel.components||(this[_parent].dataModel.components=[]),this[_parent].dataModel.components.push(this.dataModel)}else this[_parent]=e,this[_parent].dataModel.components||(this[_parent].dataModel.components=[]),this[_parent].dataModel.components.push(this.dataModel);this.level=this[_parent].level+1;for(var t=0;t<this[_parent].dataModel.components.length;t++){var n=this[_parent].dataModel.components[t];n.index>=this.index&&(this.index=n.index+1)}}},{key:"attrTypes",get:function(){var e=[],t=this._tfp.type(this.type);if(t.attrs)for(var n=0;n<t.attrs.length;n++){var i=t.attrs[n];if("group"==i.type||i.items)for(var r=0;r<i.items.length;r++)e.push(i.items[r]);else e.push(i)}return e},set:function(e){}},{key:"attr",value:function(e,t){if(0!=arguments.length)return 1==arguments.length?this[e]:void(this[e]=t)}},{key:"getAttrTypeInfo",value:function(e){if(!this.metadata)throw new Error("没有找到组件类型定义信息,请先引用类型信息!");if(!this.metadata.attrs)return null;for(var t=0;t<this.metadata.attrs.length;t++){var n=this.metadata.attrs[t];if("group"==n.type||n.items){for(var i=0;i<n.items.length;i++)if(n.items[i].name==e)return n.items[i]}else if(this.metadata.attrs[t].name==e)return this.metadata.attrs[t]}return null}},{key:"checkAttrOption",value:function(e,t){e=this.getAttrTypeInfo(e);if(!e)return!1;var n=e.options;if(!n)return!1;for(var i=0;i<n.length;i++)if(n[i].value==t)return!0;return!1}},{key:"exeEventHandler",value:function exeEventHandler(eventName){var ret;if(!this._tfp.isDesigning)return this[eventName]&&"function"==typeof this[eventName]?ret=this[eventName](arguments):this.dataModel[eventName]&&(ret=eval(this.dataModel[eventName])),ret||void 0}}]),Component}();exports.Component=Component;var InvisibleComponent=function(){(0,_inherits2.default)(a,Component);var r=_createSuper(a);function a(e,t,n,i){return(0,_classCallCheck2.default)(this,a),r.call(this,e,t,n,i)}return(0,_createClass2.default)(a,[{key:"isInvisible",get:function(){return!0},set:function(e){}},{key:"render",value:function(){this._tfp.isDesigning&&(window.parent.uiDesigner.addInvisibleComponent(this),this._tfp.initCptDesignSetting(this))}}]),a}();exports.InvisibleComponent=InvisibleComponent;var VisibleComponent=function(){(0,_inherits2.default)(a,Component);var r=_createSuper(a);function a(e,t,n,i){return(0,_classCallCheck2.default)(this,a),(i=r.call(this,e,t,n,i))._jqObj=null,i.el=null,i.isRendered=!1,i}return(0,_createClass2.default)(a,[{key:"isInvisible",get:function(){return!1},set:function(e){}},{key:"isContainer",get:function(){return!1},set:function(e){}},{key:"styles",get:function(){return this.dataModel.styles},set:function(e){}},{key:"style",get:function(){return this.dataModel.style},set:function(e){if(this.dataModel.style=e=e||"",this._jqObj){var t=e.trim();if(""==t||t.endsWith(";")||(t+=";"),this.dataModel.styles)for(var n in this.dataModel.styles)t+=n+": "+this.dataModel.styles[n]+";";e=this._jqObj.css("outline");this._jqObj.attr("style",t),this._jqObj.css("outline",e)}}},{key:"class",get:function(){return this.dataModel.class},set:function(e){this.dataModel.class=e=e||"",this._jqObj&&this._jqObj.attr("class",e)}},{key:"indent",get:function(){for(var e="",t=0;t<this.level;t++)e+="\t";return e},set:function(e){}},{key:"css",value:function(e,t){if(0!=arguments.length){if(1==arguments.length)return this.dataModel.styles?this.dataModel.styles[e]:null;this._jqObj&&this._jqObj.css(e,t),this.dataModel.styles||(this.dataModel.styles={}),""==t||null==t?delete this.dataModel.styles[e]:this.dataModel.styles[e]=t}}},{key:"val",value:function(e){if(0==arguments.length)return this.value;this.value=e}},{key:"show",value:function(){this._jqObj&&this._jqObj.show()}},{key:"hide",value:function(){this._jqObj&&this._jqObj.hide()}},{key:"toggle",value:function(){this._jqObj&&this._jqObj.toggle()}},{key:"focus",value:function(){this._jqObj&&this._jqObj.focus()}},{key:"getHtmlIndent",value:function(){if(this.indent)return this.indent;for(var e="",t=0;t<this.level;t++)e+="\t";return e}},{key:"render",value:function(){if(this.parent&&this.parent.containerEl||"Page"==this.type){var e=new this._tfp.renders[this.type](this._tfp,this.dataModel,this.level);if("Page"==this.type?(this.dataModel.pageElId&&this._tfp.isRuntime?this._jqObj=$("#"+this.dataModel.pageElId):this._jqObj=$("body"),this._jqObj.append(e.getHtml()),this._tfp.curPage=this):($(this.parent.containerEl).append(e.getHtml()),this._jqObj=$("#"+this.id)),0<this._jqObj.length&&(this.el=this._jqObj.get(0)),!this.isRendered&&this._tfp.isDesigning&&this._tfp.initCptDesignSetting(this),"undefined"==typeof window||this._tfp.isDesigning||(window[this.id]=this),this.dataModel.components)for(var t=0;t<this.dataModel.components.length;t++){var n=this.dataModel.components[t];this._tfp.render(n,this)}this.onRender&&this.onRender(),this.isRendered=!0}}},{key:"clear",value:function(){if(this.dataModel.components)for(var e=0;e<this.dataModel.components.length;e++){var t=this.dataModel.components[e],t=this._tfp.get(t.id);t.clear(),t._jqObj&&t._jqObj.remove(),delete this._tfp.components[t.id]}}}]),a}();exports.VisibleComponent=VisibleComponent;var ContainerComponent=function(){(0,_inherits2.default)(a,VisibleComponent);var r=_createSuper(a);function a(e,t,n,i){return(0,_classCallCheck2.default)(this,a),(i=r.call(this,e,t,n,i)).dataModel.components||(i.dataModel.components=[]),i}return(0,_createClass2.default)(a,[{key:"isContainer",get:function(){return!0},set:function(e){}},{key:"containerEl",get:function(){return this.el},set:function(e){this.el=e}},{key:"components",get:function(){return this.dataModel.components},set:function(e){}},{key:"addChild",value:function(e){e.parent=this}},{key:"removeChild",value:function(e){for(var t=0;t<this.dataModel.components.length;t++){var n=this.dataModel.components[t];if(n.id==e){n=this._tfp.components[n.id];return n.clear(),n._jqObj&&n._jqObj.remove(),this._tfp.isRuntime&&(delete this._tfp.components[n.id],delete window[n.id]),void(n=null)}}}},{key:"clearChildren",value:function(){for(var e=0;e<this.dataModel.components.length;e++){var t=this.dataModel.components[e],t=this._tfp.components[t.id];t.clear(),t._jqObj&&t._jqObj.remove(),delete this._tfp.components[t.id],this._tfp.isRuntime&&delete window[t.id],t=null}this.dataModel.components=[]}}]),a}();exports.ContainerComponent=ContainerComponent;var FormInput=function(_VisibleComponent2){(0,_inherits2.default)(FormInput,_VisibleComponent2);var _super4=_createSuper(FormInput);function FormInput(e,t,n,i){return(0,_classCallCheck2.default)(this,FormInput),_super4.call(this,e,t,n,i)}return(0,_createClass2.default)(FormInput,[{key:"isFormInput",get:function(){return!0}},{key:"comment",get:function(){return this.dataModel.comment},set:function(e){this.dataModel.comment=e}},{key:"dataBindingFormat",get:function(){return this.dataModel.dataBindingFormat},set:function(e){this.dataModel.dataBindingFormat=e}},{key:"required",get:function(){return this.dataModel.required},set:function(e){this.dataModel.required=!!e}},{key:"readonly",get:function(){return this.dataModel.readonly},set:function(e){this.dataModel.readonly=!!e,this.dataModel.readonly||delete this.dataModel.readonly,this._jqObj&&0<this._jqObj.length&&!this._tfp.isDesigning&&("INPUT"==(e=this._jqObj.get(0)).tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName?e.readOnly=this.dataModel.readonly:"DIV"==e.tagName&&this._jqObj.find("input").each(function(){$(this).get(0).readOnly=this.dataModel.readonly}))}},{key:"disabled",get:function(){return this.dataModel.disabled},set:function(e){this.dataModel.disabled=!!e,this.dataModel.disabled||delete this.dataModel.disabled,this._jqObj&&0<this._jqObj.length&&!this._tfp.isDesigning&&("INPUT"==(e=this._jqObj.get(0)).tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName?e.disabled=this.dataModel.disabled:"DIV"==e.tagName&&this._jqObj.find("input").each(function(){$(this).get(0).disabled=this.dataModel.disabled}))}},{key:"formula",get:function(){return this.dataModel.formula},set:function(e){isNull(e)?delete this.dataModel.formula:this.dataModel.form