1386 lines
1.2 MiB
JavaScript
1386 lines
1.2 MiB
JavaScript
|
;/*!src/theme.tsx*/
|
|||
|
amis.define("256b65d",function(e,t){"use strict";function n(e,t){h[e]=i.__assign({},t)}function s(e){if(e&&p[e])return p[e];var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var s=f.default.apply(void 0,t);return s&&e?s.replace(/(^|\s)([A-Z])/g,"$1"+e+"$2").replace(/(^|\s)\:/g,"$1"):s||""};return e&&(p[e]=t),t}function a(e){return!!h[e]}function r(e){a(e)&&(t.defaultTheme=e)}function o(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return(e=m(t.defaultTheme)).classnames.apply(e,n)}function l(){return m(t.defaultTheme).classPrefix}function m(e){if(!h[e])throw new Error('Theme with name "'+e+'" does not exist!');var t=h[e];if(t.getRendererConfig||(t.getRendererConfig=function(e){return t.renderers&&e?t.renderers[e]:null}),!t.classnames){var n=t.classPrefix;t.classnames=t.classnames||s(n)}return t.getComponentConfig||(t.getComponentConfig=function(e){return t.components&&e?t.components[e]:null}),t}function u(e){var n,s=d.default((n=function(n){function s(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(s,n),s.prototype.render=function(){var n=this.props.theme||this.context||t.defaultTheme,s=m(a(n)?n:t.defaultTheme),r={classPrefix:s.classPrefix,classnames:s.classnames,theme:n};return c.default.createElement(t.ThemeContext.Provider,{value:n},c.default.createElement(e,i.__assign({},s.getComponentConfig(e.themeKey),this.props,r)))},s}(c.default.Component),n.displayName="Themeable("+(e.displayName||e.name)+")",n.contextType=t.ThemeContext,n.ComposedComponent=e,n),e);return s}Object.defineProperty(t,"__esModule",{value:!0}),t.themeable=t.ThemeContext=t.defaultTheme=t.getTheme=t.getClassPrefix=t.classnames=t.setDefaultTheme=t.hasTheme=t.makeClassnames=t.theme=void 0;var i=e("node_modules/tslib/tslib"),f=i.__importDefault(e("node_modules/classnames/index")),c=i.__importDefault(e("node_modules/react/index")),d=i.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),h={"default":{}};t.theme=n;var p={};t.makeClassnames=s,t.hasTheme=a,t.setDefaultTheme=r,t.classnames=o,t.getClassPrefix=l,t.getTheme=m,t.defaultTheme="default",t.ThemeContext=c.default.createContext(""),t.themeable=u});
|
|||
|
;/*!src/components/404.tsx*/
|
|||
|
amis.define("bb0be5b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFound=void 0;var l=e("node_modules/tslib/tslib"),a=l.__importDefault(e("node_modules/react/index")),n=e("256b65d"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.links,l=e.footerText,n=e.description,d=e.children,s=e.code;return a.default.createElement("div",{className:"container w-xxl w-auto-xs"},a.default.createElement("div",{className:"text-center m-b-lg"},a.default.createElement("h1",{className:"text-shadow text-white"},s||"404"),n?a.default.createElement("div",{className:"text-danger"},n):null),d,t?a.default.createElement("div",{className:"list-group bg-info auto m-b-sm m-b-lg"},t):null,l?a.default.createElement("div",{className:"text-center"},a.default.createElement("p",null,a.default.createElement("small",{className:"text-muted"},l))):null)},t}(a.default.Component);t.NotFound=d,t.default=n.themeable(d)});
|
|||
|
;/*!src/components/Layout.tsx*/
|
|||
|
amis.define("4c26fd3",function(e,a){"use strict";function t(e){var a,t=e.header,d=e.aside,s=e.asideClassName,l=e.children,u=e.className,i=e.contentClassName,n=e.folded,r=e.asideFixed,c=e.headerFixed,f=e.footer,m=e.offScreen,y=e.size,L=e.boxed,N=e.classnames,v=e.bodyClassName,b=o.default.createElement("div",{className:N("Layout-body",i)},l);return d&&(b=o.default.createElement("div",{className:N("Layout-content"),role:"main"},b)),o.default.useEffect(function(){return v&&document.body.classList.add(v),function(){v&&document.body.classList.remove(v)}},[v]),o.default.createElement("div",{className:N("Layout",u,(a={"Layout--boxed":L,"Layout--withAside":!!d,"Layout--headerFixed":t?c:!1,"Layout--asideFixed":d?r:!1,"Layout--folded":n,"Layout--offScreen":m},a["Layout--"+y]=y,a["Layout--noFooter"]=!f,a))},t?o.default.createElement("div",{className:N("Layout-header")},t):null,d?o.default.createElement("div",{className:N("Layout-aside",s)},o.default.createElement("div",{className:N("Layout-asideWrap")},o.default.createElement("div",{id:"asideInner",className:N("Layout-asideInner")},d))):null,b,f?o.default.createElement("footer",{className:N("Layout-footer"),role:"footer"},f):null)}Object.defineProperty(a,"__esModule",{value:!0}),a.Layout=void 0;var d=e("node_modules/tslib/tslib"),o=d.__importDefault(e("node_modules/react/index")),s=e("256b65d");a.Layout=t,t.defaultProps={asideFixed:!0,asideClassName:"",headerFixed:!0,offScreen:!1,footer:!1},a.default=s.themeable(t)});
|
|||
|
;/*!src/utils/tpl-builtin.ts*/
|
|||
|
amis.define("f2e345e",function(e,t){"use strict";function r(e){for(var t=["秒","分","时","天","月","季","年"],r=[1,60,3600,86400,2592e3,7776e3,31104e3],n=r.length,i=[];n--;)r[n]&&e>=r[n]?(i.push(Math.floor(e/r[n])+t[n]),e%=r[n]):0===n&&e&&i.push((e.toFixed?e.toFixed(2):"0")+t[0]);return i.join("")}function n(e,r){return/^('|")(.*)\1$/.test(e)?RegExp.$2:/^-?\d+$/.test(e)?parseInt(e,10):/^(-?\d+)\.\d+?$/.test(e)?parseFloat(e):/,/.test(e)?e.split(/\s*,\s*/):t.resolveVariable(e,r)}function i(e,t,r,i,u){return t||!t&&i?n(t?r:i,u):e}function u(e,r){t.filters[e]=r}function a(){return t.filters}function s(e,r){var n,i;if(!e||(i=e.split(","))&&i.length<2){var u=e.indexOf("~");if(~u){var a=e.substring(0,u),s=e.substring(u+1);return n={},n[a]=t.resolveVariable(s,r),n}return t.resolveVariable(e,r)}var o={};return i.forEach(function(e){var n=e.indexOf("~"),i=e;~n&&(i=e.substring(n+1),e=e.substring(0,n)),v.setVariable(o,e,t.resolveVariable(i,r))}),o}function o(e,r,n){return void 0===n&&(n="| raw"),"string"==typeof e&&t.isPureVariable(e)?t.resolveVariableAndFilter(e,r,n):"string"==typeof e&&~e.indexOf("$")?t.tokenize(e,r,n):e}function f(e,t){var r={};return Array.isArray(e)?e.map(function(e){return f(e,t)}):e?(Object.keys(e).forEach(function(n){var i,u=e[n];if("&"===n&&"$$"===u)r=c.__assign(c.__assign({},r),t);else if("&"===n){var a=g.default(u)&&(i=Object.keys(u))&&1===i.length&&t[i[0].substring(1)]&&Array.isArray(t[i[0].substring(1)])?t[i[0].substring(1)].map(function(e){return f(u[i[0]],v.createObject(t,e))}):o(u,t);r=Array.isArray(a)||"string"==typeof a?a:"function"==typeof a?c.__assign(c.__assign({},r),a(t)):c.__assign(c.__assign({},r),a)}else if("$$"===u)r[n]=t;else if(u&&"$"===u[0]){var a=o(u,t);r[n]=a,"__undefined"===a&&delete r[n]}else if(g.default(u)&&(i=Object.keys(u))&&1===i.length&&t[i[0].substring(1)]&&Array.isArray(t[i[0].substring(1)])){var s=t[i[0].substring(1)],l=u[i[0]];r[n]=s.map(function(e){return f(l,v.createObject(t,e))})}else g.default(u)?r[n]=f(u,t):Array.isArray(u)?r[n]=u.map(function(e){return g.default(e)?f(e,t):o(e,t)}):"string"==typeof u&&~u.indexOf("$")?r[n]=o(u,t):"function"==typeof u?r[n]=u(t):(r[n]=u,"__undefined"===u&&delete r[n])}),r):r}function l(){d.reigsterTplEnginer("builtin",{test:function(e){return!!~e.indexOf("$")},compile:function(e,r,n){return void 0===n&&(n="| html"),t.tokenize(e,r,n)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.register=t.dataMapping=t.tokenize=t.resolveVariableAndFilter=t.isPureVariable=t.resolveVariable=t.pickValues=t.getFilters=t.registerFilter=t.filters=t.filterDate=t.relativeValueRe=t.formatDuration=t.escapeHtml=t.prettyBytes=void 0;var c=e("node_modules/tslib/tslib"),d=e("6a2dbb7"),p=c.__importDefault(e("node_modules/moment/moment")),g=c.__importDefault(e("node_modules/lodash/isPlainObject")),v=e("9a80175"),y=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];t.prettyBytes=function(e){if(!Number.isFinite(e))throw new TypeError("Expected a finite number, got "+typeof e+": "+e);var t=0>e;if(t&&(e=-e),1>e)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1e3)),y.length-1),n=Number((e/Math.pow(1e3,r)).toPrecision(3)),i=y[r];return(t?"-":"")+n+" "+i};var h={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};t.escapeHtml=function(e){return String(e).replace(/[&<>"'\/]/g,function(e){return h[e]})},t.formatDuration=r;var m={year:"Y",month:"M",week:"w",weekday:"W",day:"d",hour:"h",minute:"m",min:"m",second:"s",millisecond:"ms"};t.relativeValueRe=/^(.+)?(\+|-)(\d+)(minute|min|hour|day|week|month|year|weekday|second|millisecond)s?$/i,t.filterDate=function(e,r,n,i){void 0===r&&(r={}),void 0===n&&(n="X"),void 0===i&&(i=!1);var u,a=i?p.default.utc:p.default;if("string"==typeof e&&(e=e.trim()),e=d.filter(e,r),e&&"string"==typeof e&&(u=t.relativeValueRe.exec(e))){var s=new Date,o=parseInt(u[3],10),f=u[1]?t.filterDate(u[1],r,n,i):a(/(minute|min|hour|second)s?/.test(u[4])?[s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()]:[s.getFullYear(),s.getMonth(),s.getDate()]);return"-"===u[2]?f.subtract(o,m
|
|||
|
;/*!src/utils/tpl-lodash.ts*/
|
|||
|
amis.define("1267928",function(e,t){"use strict";function a(e,t){try{var a=u.getFilters(),n=r.__assign(r.__assign(r.__assign({},a),{formatTimeStamp:a.date,formatNumber:a.number,defaultValue:a.defaut}),d);delete n.default;var i=o.default(e,{imports:n,variable:"data"});return i(t)}catch(s){return'<span class="text-danger">'+s.message+"</span>"}}function n(){i.reigsterTplEnginer("lodash",{test:function(e){return!!~e.indexOf("<%")},compile:function(e,t){return a(e,t)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.register=void 0;var r=e("node_modules/tslib/tslib"),i=e("6a2dbb7"),o=r.__importDefault(e("node_modules/lodash/template")),u=e("f2e345e"),s=r.__importDefault(e("node_modules/moment/moment")),d={"default":void 0,moment:s.default,countDown:function(e){if(!e)return"--";var t=new Date(1e3*parseInt(e,10)),a=Date.now();return t.getTime()<a?"已结束":Math.ceil((t.getTime()-a)/864e5)+"天"},formatDate:function(e,t,a){return void 0===t&&(t="LLL"),void 0===a&&(a=""),s.default(e,a).format(t)}};t.register=n});
|
|||
|
;/*!src/utils/tpl.ts*/
|
|||
|
amis.define("6a2dbb7",function(e,t){"use strict";function r(e,t){c[e]=t}function n(e,t){void 0===t&&(t={});for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e||"string"!=typeof e)return"";for(var i=Object.keys(c),s=0,u=i.length;u>s;s++){var a=c[i[s]];if(a.test(e))return a.compile.apply(a,o.__spreadArrays([e,t],r))}return e}function i(e){g=e}function s(e,t){if("function"==typeof g)return g(e,t);if(!e||"string"!=typeof e)return!1;try{var r=!1,n=e.indexOf("debugger");~n&&(r=!0,e=e.replace(/debugger;?/,""));var i=new Function("data","utils","with(data) {"+(r?"debugger;":"")+"return !!("+e+");}");return t=t||{},i.call(t,t,l.getFilters())}catch(s){return console.warn(s),!1}}function u(e){v=e}function a(e,t){if("function"==typeof v)return v(e,t);try{var r=new Function("data","utils","with(data) {"+(/^\s*return\b/.test(e)?"":"return ")+e+";}");return t=t||{},r.call(t,t,l.getFilters())}catch(n){return console.warn(n),null}}Object.defineProperty(t,"__esModule",{value:!0}),t.evalJS=t.setCustomEvalJs=t.evalExpression=t.setCustomEvalExpression=t.filter=t.reigsterTplEnginer=void 0;var o=e("node_modules/tslib/tslib"),l=e("f2e345e"),f=e("1267928"),c={};t.reigsterTplEnginer=r,[l.register,f.register].forEach(function(e){return e()}),t.filter=n;var g;t.setCustomEvalExpression=i,t.evalExpression=s;var v;t.setCustomEvalJs=u,t.evalJS=a});
|
|||
|
;/*!src/utils/helper.ts*/
|
|||
|
amis.define("9a80175",function(e,n){"use strict";function r(e,n,r){e&&Object.isFrozen(e)&&(e=t(e));var i=e?Object.create(e,on.__assign(on.__assign({},r),{__super:{value:e,writable:!1,enumerable:!1}})):Object.create(Object.prototype,r);return n&&A(n)&&Object.keys(n).forEach(function(e){return i[e]=n[e]}),i}function t(e,n){void 0===n&&(n=!0);var r=e&&e.__super?Object.create(e.__super,{__super:{value:e.__super,writable:!1,enumerable:!1}}):Object.create(Object.prototype);return n&&e&&Object.keys(e).forEach(function(n){return r[n]=e[n]}),r}function i(e,n,r){void 0===r&&(r=!0);var i=t(e,r);return n&&Object.keys(n).forEach(function(e){return i[e]=n[e]}),i}function o(e,n,r,t,i){var o=on.__assign({},e),a=[];return t&&"FormStore"===t.storeType?a=sn.default(t.items.map(function(e){return(""+e.name).replace(/\..*$/,"")}).concat(Object.keys(o))):i&&(a=Object.keys(o)),(n||r)&&a.forEach(function(e){e&&(n&&"undefined"!=typeof n[e]||r&&"undefined"!=typeof r[e])&&(r&&!n||!r&&n||r[e]!==n[e])&&(o[e]=n[e])}),o}function a(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()}function u(e,n){for(var r=0,t=e.length;t>r;r++)if(n(e[r],r))return r;return-1}function c(e,n,r){return void 0===r&&(r=!0),e&&n?(r?n in e:e.hasOwnProperty(n))?e[n]:n.split(".").reduce(function(e,n){return e&&"object"==typeof e&&(r?n in e:e.hasOwnProperty(n))?e[n]:void 0},e):void 0}function s(e,n,r){if(e=e||{},n in e)return void(e[n]=r);for(var t=n.split("."),i=t.pop();t.length;){var o=t.shift();an.default(e[o])?e=e[o]=on.__assign({},e[o]):Array.isArray(e[o])?(e[o]=e[o].concat(),e=e[o]):e[o]?(e[o]={},e=e[o]):(e[o]={},e=e[o])}e[i]=r}function l(e,n){if(e){if(e.hasOwnProperty(n))return void delete e[n];for(var r=n.split("."),t=r.pop();r.length;){var i=r.shift();if(!an.default(e[i])){if(e[i])throw new Error("目标路径不是纯对象,不能修改");break}e=e[i]=on.__assign({},e[i])}e&&e.hasOwnProperty&&e.hasOwnProperty(t)&&delete e[t]}}function f(e,n){for(var r=n.split(".");r.length;){var t=r.shift();if(!A(e)||!e.hasOwnProperty(t))return!1;e=e[t]}return!0}function d(){}function p(e,n,r,t){return void 0===t&&(t=!0),("string"==typeof e?e.split(/\s*,\s*/):e).some(function(e){return t?n[e]!==r[e]:n[e]!=r[e]})}function h(e){var n={};if("object"!=typeof e)return e;var r=Object.keys(e);return r.forEach(function(r){void 0!==e[r]&&(n[r]=e[r])}),n}function v(e,n,r,t){if(void 0===r&&(r=!0),void 0===t&&(t=!1),null==e||null==n||!A(e)||!A(n))return r?e!==n:e!=n;t&&(e=h(e),n=h(n));var i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length||i.join(",")!==o.join(","))return!0;for(var a=i.length-1;a>=0;a--){var u=i[a];if(r?n[u]!==e[u]:v(n[u],e[u],!1,t))return!0}return!1}function m(e,n,r){if(void 0===r&&(r=!0),!Array.isArray(e)||!Array.isArray(n))return r?e!==n:e!=n;if(e.length!==n.length)return!0;for(var t=e.length-1;t>=0;t--)if(r?e[t]!==n[t]:e[t]!=n[t])return!0;return!1}function y(e,n,r){if(void 0===r&&(r=!1),!A(e)||!A(n))return e;var t=e;return Object.keys(n).forEach(function(r){var i=e[r],o=n[r];i!==o&&(t=t!==e?t:on.__assign({},e),t[r]=o)}),t}function b(e,n){void 0===n&&(n="col-sm-$value");var r=12,t=Math.floor(r/e);return function(i){if(i.columnClassName&&/\bcol-(?:xs|sm|md|lg)-(\d+)\b/.test(i.columnClassName)){var o=parseInt(RegExp.$1,10);return r-=o,e--,t=Math.floor(r/e),i.columnClassName}return i.columnClassName?(r-=t,e--,i.columnClassName):(r-=t,e--,n.replace("$value",""+t))}}function g(e,n){return!(e.hidden||e.visible===!1||e.hiddenOn&&ln.evalExpression(e.hiddenOn,n)===!0||e.visibleOn&&ln.evalExpression(e.visibleOn,n)===!1)}function _(e,n){return e.disabled||e.disabledOn&&ln.evalExpression(e.disabledOn,n)}function O(e,n,r,t){return void 0===t&&(t=!0),e.hasOwnProperty(n)?e[n]:e.hasOwnProperty(n+"On")?ln.evalExpression(e[n+"On"],r||e):t}function j(e,n){if(n>1&&/\bcol-(xs|sm|md|lg)-(\d+)\b/.test(e.left)){var r=parseInt(RegExp.$2,10)*n;return{leftFixed:e.leftFixed,left:r,right:12-r,offset:r}}if(n>1&&"number"==typeof e.left){var r=e.left*n;return{leftFixed:e.leftFixed,left:r,right:12-r,offset:r}}return e}function w(e){var n=function(){t
|
|||
|
;/*!src/components/AsideNav.tsx*/
|
|||
|
amis.define("4e7c54b",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AsideNav=void 0;var a=e("node_modules/tslib/tslib"),i=a.__importDefault(e("node_modules/react/index")),t=e("9a80175"),s=e("256b65d"),r=function(e){function n(n){var i=e.call(this,n)||this,s=n.isOpen,r=1;return i.state={navigations:t.mapTree(n.navigations,function(e){var i="undefined"==typeof e.active?n.isActive(e):e.active;return a.__assign(a.__assign({},e),{id:r++,active:i,open:i||s(e)})},1,!0)},i.renderLink=i.renderLink.bind(i),i.toggleExpand=i.toggleExpand.bind(i),i}return a.__extends(n,e),n.prototype.componentWillReceiveProps=function(e){var n=this.props,i=n.isOpen;if(n.navigations!==e.navigations||n.isActive!==e.isActive){var s=1;this.setState({navigations:t.mapTree(e.navigations,function(n){var t="undefined"==typeof n.active?e.isActive(n):n.active;return a.__assign(a.__assign({},n),{id:s++,active:t,open:t||i(n)})},1,!0)})}},n.prototype.toggleExpand=function(e,n){n&&(n.stopPropagation(),n.preventDefault()),this.setState({navigations:t.mapTree(this.state.navigations,function(n){return a.__assign(a.__assign({},n),{open:e.id===n.id?!n.open:n.open})},1,!0)})},n.prototype.renderLink=function(e,n,t,s){var r;void 0===t&&(t={}),void 0===s&&(s=1);var l=this.props,o=l.renderLink,c=(l.isActive,l.renderSubLinks),d=l.classnames,u=a.__rest(l,["renderLink","isActive","renderSubLinks","classnames"]),p=o(a.__assign({link:e,active:e.active,open:e.open,toggleExpand:this.toggleExpand,depth:s,classnames:d},u));return p?i.default.createElement("li",a.__assign({},t,{key:n,className:d("AsideNav-item",e.className,(r={},r["is-open"]=e.open,r["is-active"]=e.active,r))}),p,c(e,this.renderLink,s,this.props)):void 0},n.prototype.render=function(){var e=this,n=this.state.navigations,t=[],s=this.props,r=s.className,l=s.classnames;return n.forEach(function(n,s){if(n.prefix){var r="function"==typeof n.prefix?n.prefix(e.props):n.prefix;t.push(i.default.cloneElement(r,a.__assign(a.__assign({},r.props),{key:s+"-prefix"})))}if(n.label&&t.push(i.default.createElement("li",{key:s+"-label",className:l("AsideNav-label",n.className)},i.default.createElement("span",null,n.label))),n.children.forEach(function(n,a){var i=e.renderLink(n,s+"-"+a);i&&t.push(i)}),n.affix){var o="function"==typeof n.affix?n.affix(e.props):n.affix;t.push(i.default.cloneElement(o,a.__assign(a.__assign({},o.props),{key:s+"-affix"})))}}),i.default.createElement("nav",{className:l("AsideNav",r)},i.default.createElement("ul",{className:l("AsideNav-list")},t))},n.defaultProps={renderLink:function(e){return i.default.createElement("a",null,e.label)},renderSubLinks:function(e,n,a,t){var s=t.classnames;return e.children&&e.children.length?i.default.createElement("ul",{className:s("AsideNav-subList")},e.label?i.default.createElement("li",{key:"subHeader",className:s("AsideNav-subHeader")},i.default.createElement("a",null,e.label)):null,e.children.map(function(e,i){return n(e,i,{},a+1)})):e.label&&1===a?i.default.createElement("div",{className:s("AsideNav-tooltip")},e.label):null},isActive:function(e){return e.open},isOpen:function(e){return e.children?e.children.some(function(e){return e.open}):!1}},n}(i.default.Component);n.AsideNav=r,n.default=s.themeable(r)});
|
|||
|
;/*!src/components/ModalManager.ts*/
|
|||
|
amis.define("8768414",function(e,n){"use strict";function o(){return l.length}function d(){return l[l.length-1]}function r(e){l.push(e)}function t(){l.pop()}function i(e){var n=a.default(e);if("esc"===n){var o=d();if(o){var r=o.props,t=r.disabled,i=r.closeOnEsc;i&&!t&&o.props.onHide(e)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.removeModal=n.addModal=n.currentModal=n.current=void 0;var u=e("node_modules/tslib/tslib"),a=u.__importDefault(e("node_modules/keycode/index")),l=[];n.current=o,n.currentModal=d,n.addModal=r,n.removeModal=t,window.addEventListener("keydown",i)});
|
|||
|
;/*!src/icons/close.svg*/
|
|||
|
amis.define('src/icons/close.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Close = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 12", className: "icon" }, props),
|
|||
|
react_1.default.createElement("polygon", { id: "path-1", points: "6.0003653 5.2970518 10.5993691 0.6980479600000002 11.3064759 1.4051547400000004 6.7074721 6.0041586 11.3009516 10.5976381 10.5938448 11.3047449 6.0003653 6.7112654 1.4056713299999997 11.3059593 0.6985645500000004 10.5988525 5.2932585 6.0041586 0.6956119200000002 1.4065120000000002 1.4027187000000003 0.69940522" })); };
|
|||
|
exports.default = Close;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/undo.svg*/
|
|||
|
amis.define('src/icons/undo.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Undo = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 854 768", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "undo", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M576.333333,213.333333 L82.04,213.333333 L265.293333,30.08 L235,0 L0.333333,234.666667 L235,469.333333 L265.08,439.253333 L82.04,256 L576.333333,256 C705.930172,256.00846 810.984681,361.069827 810.984681,490.666667 C810.984681,620.263506 705.930172,725.324873 576.333333,725.333333 L363,725.333333 L363,768 L576.333333,768 C729.500304,768 853.666667,643.833637 853.666667,490.666667 C853.666667,337.499696 729.500304,213.333333 576.333333,213.333333 Z", id: "\\u8DEF\\u5F84" }))); };
|
|||
|
exports.default = Undo;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/redo.svg*/
|
|||
|
amis.define('src/icons/redo.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Redo = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 854 768", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "redo", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M619,0 L588.92,30.08 L771.96,213.333333 L277.666667,213.333333 C124.499696,213.333333 0.3333335,337.499696 0.3333335,490.666667 C0.3333335,643.833637 124.499696,768 277.666667,768 L491,768 L491,725.333333 L277.666667,725.333333 C148.069828,725.324873 43.0153188,620.263506 43.0153188,490.666667 C43.0153188,361.069827 148.069828,256.00846 277.666667,256 L771.96,256 L588.706667,439.253333 L619,469.333333 L853.666667,234.666667 L619,0 Z", id: "\\u8DEF\\u5F84" }))); };
|
|||
|
exports.default = Redo;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/enter.svg*/
|
|||
|
amis.define('src/icons/enter.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Enter = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 1024 1024", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("path", { d: "M864 192c-19.2 0-32 12.8-32 32v224c0 89.6-70.4 160-160 160H236.8l105.6-105.6c12.8-12.8 12.8-32 0-44.8s-32-12.8-44.8 0l-160 160c-3.2 3.2-6.4 6.4-6.4 9.6-3.2 6.4-3.2 16 0 25.6 3.2 3.2 3.2 6.4 6.4 9.6l160 160c6.4 6.4 12.8 9.6 22.4 9.6s16-3.2 22.4-9.6c12.8-12.8 12.8-32 0-44.8L236.8 672H672c124.8 0 224-99.2 224-224V224c0-19.2-12.8-32-32-32z" })); };
|
|||
|
exports.default = Enter;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/volume.svg*/
|
|||
|
amis.define('src/icons/volume.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Volume = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 1024 1024", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("path", { d: "M536.319574 5.11991a63.99888 63.99888 0 0 0-69.758779 13.439765L229.764939 255.99552H64.00784a63.99888 63.99888 0 0 0-63.99888 63.99888v383.99328a63.99888 63.99888 0 0 0 63.99888 63.99888h165.757099l236.795856 237.435845A63.99888 63.99888 0 0 0 512 1023.98208a53.759059 53.759059 0 0 0 24.319574-5.11991A63.99888 63.99888 0 0 0 575.99888 959.9832V63.99888a63.99888 63.99888 0 0 0-39.679306-58.87897zM192.0056 639.9888H128.00672V383.99328h63.99888z m255.99552 165.757099l-127.99776-127.99776V346.233941l127.99776-127.99776zM879.353571 148.477402a63.99888 63.99888 0 0 0-94.718342 87.038476 402.552955 402.552955 0 0 1 0 552.950324A63.99888 63.99888 0 0 0 831.9944 895.98432a63.99888 63.99888 0 0 0 46.719183-20.479641 531.830693 531.830693 0 0 0 0-727.027277z", fill: "#606670", "p-id": 3605 }),
|
|||
|
react_1.default.createElement("path", { d: "M751.9958 277.11515a63.99888 63.99888 0 0 0-95.99832 85.7585A218.236181 218.236181 0 0 1 703.99664 511.99104a221.436125 221.436125 0 0 1-47.359171 149.117391 63.99888 63.99888 0 0 0 4.479921 90.23842A63.99888 63.99888 0 0 0 703.99664 767.98656a63.99888 63.99888 0 0 0 47.359171-21.11963A349.433885 349.433885 0 0 0 831.9944 511.99104a353.273818 353.273818 0 0 0-79.9986-234.87589z", fill: "#606670", "p-id": 3606 })); };
|
|||
|
exports.default = Volume;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/mute.svg*/
|
|||
|
amis.define('src/icons/mute.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Mute = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 1024 1024", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("path", { d: "M536.310615 5.11991a63.99888 63.99888 0 0 0-69.75878 13.439765L229.755979 255.99552H63.99888a63.99888 63.99888 0 0 0-63.99888 63.99888v383.99328a63.99888 63.99888 0 0 0 63.99888 63.99888h165.757099l236.795856 237.435845A63.99888 63.99888 0 0 0 511.99104 1023.98208a53.759059 53.759059 0 0 0 24.319575-5.11991A63.99888 63.99888 0 0 0 575.98992 959.9832V63.99888a63.99888 63.99888 0 0 0-39.679305-58.87897zM191.99664 639.9888H127.99776V383.99328h63.99888z m255.99552 165.757099l-127.99776-127.99776V346.233941l127.99776-127.99776zM914.543995 511.99104l90.87841-90.238421a63.99888 63.99888 0 1 0-90.87841-90.878409l-90.23842 90.878409-90.238421-90.878409a63.99888 63.99888 0 0 0-90.87841 90.878409L734.067154 511.99104l-90.87841 90.238421a63.99888 63.99888 0 0 0 90.87841 90.87841l90.238421-90.87841 90.23842 90.87841a63.99888 63.99888 0 1 0 90.87841-90.87841z", fill: "#606670", "p-id": 2312 })); };
|
|||
|
exports.default = Mute;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/play.svg*/
|
|||
|
amis.define('src/icons/play.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Play = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 14 16", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("path", { d: "M13.5722,7.254 L1.2838,0.115 C1.019,-0.038 0.6926,-0.038 0.4278,0.115 C0.163,0.269 -1.83725092e-07,0.554 -1.83725092e-07,0.861 L-1.83725092e-07,15.139 C-0.0002,15.446 0.1629,15.731 0.4278,15.885 C0.6927,16.039 1.019,16.038 1.2838,15.884 L13.5721,8.746 C13.8368,8.592 13.9999998,8.308 13.9999998,8 C13.9999998,7.692 13.837,7.408 13.5722,7.254 Z", id: "path-1" })); };
|
|||
|
exports.default = Play;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/pause.svg*/
|
|||
|
amis.define('src/icons/pause.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Pause = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 1024 1024", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("path", { d: "M757.52 73.107h-62.493c-34.526 0-62.498 27.984-62.498 62.511v749.948c0 34.526 27.974 62.493 62.498 62.493h62.493c34.516 0 62.502-27.968 62.502-62.493v-749.953c-0.001-34.524-27.984-62.509-62.502-62.509z", "p-id": 7567, fill: "#606670" }),
|
|||
|
react_1.default.createElement("path", { d: "M320.054 73.107h-62.502c-34.526 0-62.498 27.984-62.498 62.511v749.948c0 34.526 27.974 62.493 62.498 62.493h62.502c34.505 0 62.493-27.968 62.493-62.493v-749.953c-0.001-34.524-27.984-62.509-62.493-62.509z", "p-id": 7568, fill: "#606670" })); };
|
|||
|
exports.default = Pause;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/left-arrow.svg*/
|
|||
|
amis.define('src/icons/left-arrow.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var LeftArrow = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 577 1024", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "left-arrow", transform: "translate(-1.000000, 0.000000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M101.211517,511.805631 L564.889594,73.082583 C581.083814,56.452218 581.083814,29.107879 564.889594,12.477515 C548.695374,-4.15285 522.393987,-4.15285 506.275618,12.477515 L12.750113,479.360302 C4.103082,488.3297 0.405338,500.295219 1.03111,511.805631 C0.386375,523.714261 4.103082,535.67978 12.750113,544.630216 L506.256655,1011.513 C522.375024,1028.16233 548.695373,1028.16233 564.870631,1011.513 C581.064851,994.427533 581.064851,967.5383 564.870631,950.907936 L101.211517,511.805631", id: "\\u8DEF\\u5F84" }))); };
|
|||
|
exports.default = LeftArrow;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/right-arrow.svg*/
|
|||
|
amis.define('src/icons/right-arrow.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var RightArrow = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 513 1021", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "right-arrow", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M56.559054,1013.77369 L512.908116,512.684524 L56.559054,12.234501 C49.4114678,2.93455912 37.6664238,-1.59188176 26.1262324,0.505948246 C14.586041,2.60377825 5.18544409,10.9741727 1.76815516,22.1946471 C-1.64913377,33.4151214 1.48980228,45.6045351 9.901516,53.778884 L424.706197,512.684524 L12.458094,969.672731 C2.45820596,982.551498 4.01297737,1000.9483 16.0324422,1011.96615 C28.0519071,1022.98399 46.5142346,1022.93619 58.476487,1011.85626 L56.559054,1013.77369 Z", id: "\\u8DEF\\u5F84" }))); };
|
|||
|
exports.default = RightArrow;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/check.svg*/
|
|||
|
amis.define('src/icons/check.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Check = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 13 9", "p-id": 3506, className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { transform: "translate(6.656854, 2.656854) scale(-1, 1) rotate(-315.000000) translate(-6.656854, -2.656854) " },
|
|||
|
react_1.default.createElement("polygon", { id: "path-1", points: "11.1568542 5.15685425 11.1568542 -0.843145751 12.1568542 -0.843145751 12.1568542 6.15685425 1.15685425 6.15685425 1.15685425 5.15685425" }))); };
|
|||
|
exports.default = Check;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/plus.svg*/
|
|||
|
amis.define('src/icons/plus.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Plus = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 12", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "\\u9875\\u9762-1", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { id: "plus", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("polygon", { id: "path-1", points: "6.6 6.6 6.6 12 5.4 12 5.4 6.6 0 6.6 0 5.4 5.4 5.4 5.4 0 6.6 0 6.6 5.4 12 5.4 12 6.6" })))); };
|
|||
|
exports.default = Plus;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/minus.svg*/
|
|||
|
amis.define('src/icons/minus.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Minus = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 2", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "minus", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("polygon", { id: "path-1", points: "0 1.6 0 0.4 12 0.4 12 1.6" }))); };
|
|||
|
exports.default = Minus;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/pencil.svg*/
|
|||
|
amis.define('src/icons/pencil.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Pencil = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 14 14", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "pencil", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M10.496,0.834 L13.168,3.506 C13.48,3.818 13.48,4.322 13.168,4.634 L10.904,6.898 L4.4,13.402 L0.6,13.402 L0.6,9.602 L7.848,2.354 L7.848,2.354 L9.368,0.834 C9.68,0.522 10.184,0.522 10.496,0.834 Z M7.67,3.663 L1.4,9.9333708 L1.4,12.602 L4.06862915,12.602 L10.338,6.331 L7.67,3.663 Z M9.932,1.40137085 L8.23537085,3.098 L10.904,5.76662915 L12.6006292,4.07 L9.932,1.40137085 Z M7,12.6 L11.8,12.6 L11.8,13.4 L7,13.4 L7,12.6 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = Pencil;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/view.svg*/
|
|||
|
amis.define('src/icons/view.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var View = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 16 10", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", null,
|
|||
|
react_1.default.createElement("path", { d: "M8,1 C11,1 13.7,3.8 14.7,5 C13.7,6.2 11,9 8,9 C5,9 2.3,6.2 1.3,5 C2.3,3.8 5,1 8,1 L8,1 Z M8,0 C3.6,0 0,5 0,5 C0,5 3.6,10 8,10 C12.4,10 16,5 16,5 C16,5 12.4,0 8,0 L8,0 Z" }),
|
|||
|
react_1.default.createElement("path", { d: "M8,2 C9.7,2 11,3.3 11,5 C11,6.7 9.7,8 8,8 C6.3,8 5,6.7 5,5 C5,3.3 6.3,2 8,2 L8,2 Z M8,1 C5.8,1 4,2.8 4,5 C4,7.2 5.8,9 8,9 C10.2,9 12,7.2 12,5 C12,2.8 10.2,1 8,1 L8,1 Z" }))); };
|
|||
|
exports.default = View;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/remove.svg*/
|
|||
|
amis.define('src/icons/remove.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Remove = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 12", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", null,
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 4, y: 5, width: 1, height: 4 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 7, y: 5, width: 1, height: 4 }),
|
|||
|
react_1.default.createElement("path", { d: "M0,2 L0,3 L1,3 L1,11 L1,11.5 L1,12 L11,12 L11,11.5 L11,11 L11,3 L12,3 L12,2 L0,2 Z M10,11 L2,11 L2,3 L10,3 L10,11 Z", id: "Shape" }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 4, y: 0, width: 4, height: 1 }))); };
|
|||
|
exports.default = Remove;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/retry.svg*/
|
|||
|
amis.define('src/icons/retry.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Retry = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 15 17", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { transform: "translate(1.000000, 0.000000)" },
|
|||
|
react_1.default.createElement("polygon", { id: "Fill-1", fill: "#666666", points: "5.0003 0.0003 5.0003 7.0703 9.5353 3.5353" }),
|
|||
|
react_1.default.createElement("path", { fill: "none", d: "M13,9.5355 C13,13.1255 10.09,16.0355 6.5,16.0355 C2.91,16.0355 0,13.1255 0,9.5355 C0,5.9455 2.91,3.0355 6.5,3.0355", stroke: "#666666", strokeWidth: 2 }))); };
|
|||
|
exports.default = Retry;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/upload.svg*/
|
|||
|
amis.define('src/icons/upload.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Upload = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 16 16", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "currentColor", strokeWidth: 2, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("path", { d: "M8,12.2426 L8,1.2426" }),
|
|||
|
react_1.default.createElement("path", { d: "M4.4648,4.9496 L8.7068,0.7076" }),
|
|||
|
react_1.default.createElement("path", { d: "M11.5352,4.9496 L7.2932,0.7076" }),
|
|||
|
react_1.default.createElement("path", { d: "M0,14.2426 L16,14.2426" }),
|
|||
|
react_1.default.createElement("path", { d: "M1,9.2426 L1,15.2426" }),
|
|||
|
react_1.default.createElement("path", { d: "M15,9.2426 L15,15.2426" }))); };
|
|||
|
exports.default = Upload;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/file.svg*/
|
|||
|
amis.define('src/icons/file.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var File = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 14 16", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", null,
|
|||
|
react_1.default.createElement("path", { d: "M0,0 L0,16 L14,16 L14,4.001 L9.939,0 L0,0 Z M1,1 L9,1 L9,4.001 L9,5 L10,5 L13,5 L13,15 L1,15 L1,1 Z M10,1.464 L12.575,4.001 L10,4.001 L10,1.464 Z", id: "Fill-1" }),
|
|||
|
react_1.default.createElement("polygon", { points: "4 12.0002 10 12.0002 10 10.9992 4 10.9992" }),
|
|||
|
react_1.default.createElement("polygon", { points: "4 9.0002 10 9.0002 10 8.0002 4 8.0002" }))); };
|
|||
|
exports.default = File;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/success.svg*/
|
|||
|
amis.define('src/icons/success.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Success = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 32 32", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "Group-5" },
|
|||
|
react_1.default.createElement("circle", { stroke: "currentColor", fill: "none", cx: 16, cy: 16, r: 15.5 }),
|
|||
|
react_1.default.createElement("g", { transform: "translate(5.647059, 7.529412)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("polygon", { id: "Shape", points: "21.1764706 2.76408669 18.7058824 0.26749226 7.41176471 11.6804954 2.47058824 6.50897833 0 9.18390093 4.94117647 14.1770898 4.94117647 14.1770898 7.41176471 16.6736842 9.88235294 14.1770898 9.88235294 14.1770898" })))); };
|
|||
|
exports.default = Success;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/fail.svg*/
|
|||
|
amis.define('src/icons/fail.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Fail = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 34 34", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { transform: "translate(1.000000, 1.000000)" },
|
|||
|
react_1.default.createElement("circle", { stroke: "currentColor", cx: 16, cy: 16, r: 16, fill: "none" }),
|
|||
|
react_1.default.createElement("polygon", { fill: "currentColor", fillRule: "nonzero", points: "24 10.1052632 21.8947368 8 16 14.0350877 10.1052632 8 8 10.1052632 14.0350877 16 8 21.8947368 10.1052632 24 16 17.9649123 21.8947368 24 24 21.8947368 17.9649123 16" }))); };
|
|||
|
exports.default = Fail;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/search.svg*/
|
|||
|
amis.define('src/icons/search.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Search = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 18 18", className: "icon" }, props),
|
|||
|
react_1.default.createElement("path", { d: "M2,8 C2,4.691 4.691,2 8,2 C11.309,2 14,4.691 14,8 C14,11.309 11.309,14 8,14 C4.691,14 2,11.309 2,8 L2,8 Z M18,16.586 L14.314,12.9 C15.367,11.545 16,9.849 16,8 C16,3.582 12.418,0 8,0 C3.582,0 0,3.582 0,8 C0,12.418 3.582,16 8,16 C9.849,16 11.545,15.367 12.9,14.314 L16.586,18 L18,16.586 Z" })); };
|
|||
|
exports.default = Search;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/back.svg*/
|
|||
|
amis.define('src/icons/back.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Back = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 9 12", "p-id": 3506, className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { transform: "translate(-11.000000, -9.000000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("g", { transform: "translate(11.000000, 9.000000)" },
|
|||
|
react_1.default.createElement("polygon", { transform: "translate(4.294118, 6.000000) rotate(-270.000000) translate(-4.294118, -6.000000) ", points: "8.76684493 2 4.29411765 6.79999999 -0.178609633 2 -1.70588235 3.6 4.29411765 10 10.2941176 3.6" }))))); };
|
|||
|
exports.default = Back;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/move.svg*/
|
|||
|
amis.define('src/icons/move.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Move = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 16 16", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { fill: "currentColor" },
|
|||
|
react_1.default.createElement("polygon", { points: "8.02 0 5.161 2.859 6.161 3.859 7.02 3.001 7.02 7.02 3.001 7.02 3.859 6.16 2.859 5.161 0 8.02 2.82 10.84 3.82 9.84 3.001 9.02 7.02 9.02 7.02 13.001 6.161 12.141 5.161 13.141 8.02 16 10.839 13.18 9.839 12.181 9.02 13.001 9.02 9.02 13.001 9.02 12.18 9.84 13.18 10.84 16 8.02 13.141 5.161 12.141 6.16 13.001 7.02 9.02 7.02 9.02 3.001 9.839 3.82 10.839 2.82" })))); };
|
|||
|
exports.default = Move;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/info.svg*/
|
|||
|
amis.define('src/icons/info.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Info = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 16 16", "p-id": 1463, className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "Group-9" },
|
|||
|
react_1.default.createElement("circle", { id: "Oval-7", stroke: "currentColor", fill: "transparent", cx: 8, cy: 8, r: 7.5 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-26", fill: "currentColor", x: 7, y: 3, width: 2, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-26-Copy", fill: "currentColor", x: 7, y: 6, width: 2, height: 7 }))); };
|
|||
|
exports.default = Info;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/location.svg*/
|
|||
|
amis.define('src/icons/location.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Location = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ t: 1585402743083, className: "icon", viewBox: "0 0 1024 1024", "p-id": 2408 }, props),
|
|||
|
react_1.default.createElement("defs", null,
|
|||
|
react_1.default.createElement("style", { type: "text/css" })),
|
|||
|
react_1.default.createElement("path", { d: "M511.968 0c-207.84 0-376.96 169.12-376.96 376.992 0 54.208 11.104 105.984 32.96 153.888 94.24 206.24 274.976 424 328.128 485.824 3.968 4.608 9.792 7.296 15.904 7.296s11.904-2.656 15.904-7.296c53.12-61.824 233.856-279.552 328.128-485.824 21.888-47.904 32.96-99.648 32.96-153.888-0.032-207.872-169.152-376.992-376.992-376.992zM511.968 572.8c-107.968 0-195.808-87.84-195.808-195.808s87.84-195.84 195.808-195.84 195.808 87.84 195.808 195.84c0 107.968-87.84 195.808-195.808 195.808z", "p-id": 2409 })); };
|
|||
|
exports.default = Location;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/drag-bar.svg*/
|
|||
|
amis.define('src/icons/drag-bar.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var DragBar = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 428 684", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "drag-bar", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M171.333333,86 C171.333333,133.128298 133.128298,171.333333 86,171.333333 C38.8717015,171.333333 0.666667,133.128298 0.666667,86 C0.666667,38.8717015 38.8717015,0.666667 86,0.666667 C133.128298,0.666667 171.333333,38.8717015 171.333333,86 L171.333333,86 Z M86,256.666667 C38.8717015,256.666667 0.666667,294.871702 0.666667,342 C0.666667,389.128298 38.8717015,427.333333 86,427.333333 C133.128298,427.333333 171.333333,389.128298 171.333333,342 C171.333333,294.871702 133.128298,256.666667 86,256.666667 L86,256.666667 Z M86,512.666667 C38.8717015,512.666667 0.666667,550.871702 0.666667,598 C0.666667,645.128298 38.8717015,683.333333 86,683.333333 C133.128298,683.333333 171.333333,645.128298 171.333333,598 C171.333333,550.871702 133.128298,512.666667 86,512.666667 L86,512.666667 Z M342,171.333333 C389.128298,171.333333 427.333333,133.128298 427.333333,86 C427.333333,38.8717015 389.128298,0.666667 342,0.666667 C294.871702,0.666667 256.666667,38.8717015 256.666667,86 C256.666667,133.128298 294.871702,171.333333 342,171.333333 L342,171.333333 Z M342,256.666667 C294.871702,256.666667 256.666667,294.871702 256.666667,342 C256.666667,389.128298 294.871702,427.333333 342,427.333333 C389.128298,427.333333 427.333333,389.128298 427.333333,342 C427.333333,294.871702 389.128298,256.666667 342,256.666667 L342,256.666667 Z M342,512.666667 C294.871702,512.666667 256.666667,550.871702 256.666667,598 C256.666667,645.128298 294.871702,683.333333 342,683.333333 C389.128298,683.333333 427.333333,645.128298 427.333333,598 C427.333333,575.368193 418.342883,553.663326 402.339778,537.660222 C386.336674,521.657117 364.631807,512.666667 342,512.666667 L342,512.666667 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = DragBar;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/reload.svg*/
|
|||
|
amis.define('src/icons/reload.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Reload = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 16 16", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M8.05031447,14.0555556 C5.93710692,14.0555556 4.02515723,12.9861111 2.91823899,11.2361111 L5.03144654,9.19444444 L0,9.19444444 L0,14.0555556 L1.40880503,12.6944444 C2.91823899,14.7361111 5.33333333,16 8.05031447,16 C12.0754717,16 15.4968553,13.1805556 16,9.29166667 L13.9874214,9 C13.5849057,11.9166667 11.0691824,14.0555556 8.05031447,14.0555556 Z M14.591195,3.30555556 C13.081761,1.26388889 10.6666667,0 7.94968553,0 C3.9245283,0 0.503144654,2.81944444 0,6.70833333 L2.01257862,7 C2.41509434,4.08333333 4.93081761,1.94444444 7.94968553,1.94444444 C10.0628931,1.94444444 11.9748428,3.01388889 13.081761,4.76388889 L10.9685535,6.80555556 L16,6.80555556 L16,1.94444444 L14.591195,3.30555556 Z", id: "Shape" }))); };
|
|||
|
exports.default = Reload;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/exchange.svg*/
|
|||
|
amis.define('src/icons/exchange.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Exchange = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 175 201", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("path", { d: "M-1.01710969,84.1828903 L176.48289,84.1828903 C182.68289,84.1828903 187.78289,79.0828903 187.78289,72.8828903 C187.78289,69.4828903 186.28289,66.3828903 183.68289,64.1828903 C183.08289,63.3828903 182.28289,62.6828903 181.48289,62.0828903 L115.18289,15.5828903 C110.08289,11.9828903 103.08289,13.1828903 99.4828903,18.2828903 C95.8828903,23.3828903 97.1828903,30.3828903 102.28289,33.9828903 L141.58289,61.5828903 L-1.01710969,61.5828903 C-7.21710969,61.6828903 -12.3171097,66.7828903 -12.3171097,72.9828903 C-12.3171097,79.1828903 -7.21710969,84.1828903 -1.01710969,84.1828903 Z M-1.01710969,117.38289 C-7.21710969,117.38289 -12.3171097,122.48289 -12.3171097,128.68289 C-12.3171097,132.08289 -10.8171097,135.18289 -8.21710969,137.38289 C-7.51710969,138.18289 -6.81710969,138.88289 -6.01710969,139.48289 L60.2828903,185.98289 C62.1828903,187.28289 64.3828903,187.98289 66.7828903,187.98289 C70.4828903,187.98289 73.8828903,186.18289 75.9828903,183.18289 C77.6828903,180.68289 78.3828903,177.78289 77.8828903,174.78289 C77.3828903,171.78289 75.6828903,169.28289 73.2828903,167.48289 L33.9828903,139.88289 L176.48289,139.88289 C182.68289,139.88289 187.78289,134.78289 187.78289,128.58289 C187.68289,122.38289 182.58289,117.38289 176.38289,117.38289 L-1.01710969,117.38289 Z", fill: "currentColor", fillRule: "nonzero", transform: "translate(87.732890, 100.745312) rotate(-270.000000) translate(-87.732890, -100.745312) " }))); };
|
|||
|
exports.default = Exchange;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/columns.svg*/
|
|||
|
amis.define('src/icons/columns.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Columns = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 122 123", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "th", transform: "translate(0.062500, 0.671875)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M5.5208334,0.078125 L27.6041666,0.078125 C29.2708332,0.078125 30.5208332,0.494791602 31.3541666,1.7447916 C32.1875,2.9947916 33.0208334,4.2447916 33.0208334,5.4947916 L33.0208334,27.578125 C33.0208334,29.2447916 32.6041666,30.4947916 31.3541666,31.328125 C30.1041666,32.1614584 28.8541666,32.9947916 27.6041666,32.9947916 L5.5208334,32.9947916 C3.8541668,32.9947916 2.6041666,32.578125 1.7708334,31.328125 C0.520833398,30.078125 0.104166602,28.828125 0.104166602,27.578125 L0.104166602,5.4947916 C0.104166602,3.828125 0.520833203,2.578125 1.7708334,1.7447916 C2.6041666,0.911458203 3.8541668,0.078125 5.5208334,0.078125 Z M49.6875,0.078125 L71.7708334,0.078125 C73.4375,0.078125 74.6875,0.494791602 75.5208334,1.7447916 C76.7708334,2.9947916 77.1875,4.2447916 77.1875,5.4947916 L77.1875,27.578125 C77.1875,29.2447916 76.7708334,30.4947916 75.5208334,31.328125 C74.2708334,32.578125 73.0208334,32.9947916 71.7708334,32.9947916 L49.6875,32.9947916 C48.0208334,32.9947916 46.7708334,32.578125 45.9375,31.328125 C44.6875,30.078125 44.2708334,28.828125 44.2708334,27.578125 L44.2708334,5.4947916 C44.2708334,3.828125 44.6875,2.578125 45.9375,1.7447916 C46.7708334,0.911458203 48.4375,0.078125 49.6875,0.078125 L49.6875,0.078125 Z M94.2708334,0.078125 L116.354167,0.078125 C118.020833,0.078125 119.270833,0.494791602 120.104167,1.7447916 C120.9375,2.9947916 121.770833,4.2447916 121.770833,5.4947916 L121.770833,27.578125 C121.770833,29.2447916 121.354167,30.4947916 120.104167,31.328125 C118.854167,32.1614584 117.604167,32.9947916 116.354167,32.9947916 L94.2708334,32.9947916 C92.6041668,32.9947916 91.3541666,32.578125 90.5208334,31.328125 C89.6875,30.078125 88.8541666,28.828125 88.8541666,27.578125 L88.8541666,5.4947916 C88.8541666,3.828125 89.2708332,2.578125 90.5208334,1.7447916 C91.7708336,0.911458203 92.6041668,0.078125 94.2708334,0.078125 Z M5.5208334,44.6614584 L27.6041666,44.6614584 C29.2708332,44.6614584 30.5208332,45.078125 31.3541666,46.328125 C32.6041666,47.578125 33.0208334,48.828125 33.0208334,50.078125 L33.0208334,72.1614584 C33.0208334,73.828125 32.6041666,75.078125 31.3541666,75.9114584 C30.1041666,76.7447918 28.8541666,77.578125 27.6041666,77.578125 L5.5208334,77.578125 C3.8541668,77.578125 2.6041666,77.1614584 1.7708334,75.9114584 C0.520833398,74.6614584 0.104166602,73.4114584 0.104166602,72.1614584 L0.104166602,50.078125 C0.104166602,48.4114584 0.520833203,47.1614584 1.7708334,46.328125 C2.6041666,45.078125 3.8541668,44.6614584 5.5208334,44.6614584 Z M49.6875,44.6614584 L71.7708334,44.6614584 C73.4375,44.6614584 74.6875,45.078125 75.5208334,46.328125 C76.7708334,47.578125 77.1875,48.828125 77.1875,50.078125 L77.1875,72.1614584 C77.1875,73.828125 76.7708334,75.078125 75.5208334,75.9114584 C74.2708334,77.1614584 73.0208334,77.578125 71.7708334,77.578125 L49.6875,77.578125 C48.0208334,77.578125 46.7708334,77.1614584 45.9375,75.9114584 C44.6875,74.6614584 44.2708334,73.4114584 44.2708334,72.1614584 L44.2708334,50.078125 C44.2708334,48.4114584 44.6875,47.1614584 45.9375,46.328125 C46.7708334,45.078125 48.4375,44.6614584 49.6875,44.6614584 L49.6875,44.6614584 Z M94.2708334,44.6614584 L116.354167,44.6614584 C118.020833,44.6614584 119.270833,45.078125 120.104167,46.328125 C121.354167,47.578125 121.770833,48.828125 121.770833,50.078125 L121.770833,72.1614584 C121.770833,73.828125 121.354167,75.078125 120.104167,75.9114584 C118.854167,76.7447918 117.604167,77.578125 116.354167,77.578125 L94.2708334,77.578125 C92.6041668,77.578125 91.3541666,77.1614584 90.5208334,75.9114584 C89.6875,74.6614584 88.8541666,73.4114584 88.8541666,72.1614584 L88.8541666,50.078125 C88.8541666,48.4114584 89.2708332,47.1614584 90.5208334,46.328125 C91.3541666,45.078125 92.6041668,44.6614584 94.2708334,44.6614584 Z M5.5208334,89.2447916 L27.6041666,89.2447916 C29.2708332,89.2447916 30.5208332,89.6614582 31.3541666,90.9114584 C32.1875,92.1614586 33.0208334,93.4114584 33.0208334,94.6614584 L33.0208334,116.744792 C33.0208334,118.411458 32.6041666,119.661458 31.3541666,120.494792 C30.1041666,121.328125 28.8541666,122.
|
|||
|
exports.default = Columns;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/calendar.svg*/
|
|||
|
amis.define('src/icons/calendar.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Calendar = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 14 14", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { transform: "translate(-136.000000, -8.000000)" },
|
|||
|
react_1.default.createElement("path", { d: "M159.5,0.5 L0.5,0.5 L0.5,29.5 L159.5,29.5 L159.5,0.5 Z", stroke: "currentColor" }),
|
|||
|
react_1.default.createElement("g", { transform: "translate(136.000000, 8.000000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M0,14 L14,14 L14,3 L0,3 L0,14 Z M2,5 L12,5 L12,12 L2,12 L2,5 Z", id: "Shape" }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 0, y: 0, width: 14, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 9, y: 6, width: 2, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 9, y: 9, width: 2, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 6, y: 6, width: 2, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 6, y: 9, width: 2, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 3, y: 6, width: 2, height: 2 }),
|
|||
|
react_1.default.createElement("rect", { id: "Rectangle-path", x: 3, y: 9, width: 2, height: 2 }))))); };
|
|||
|
exports.default = Calendar;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/copy.svg*/
|
|||
|
amis.define('src/icons/copy.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Copy = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 12", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("polyline", { id: "Stroke-1", stroke: "currentColor", points: "2.5 9.5 0.5 9.5 0.5 0.5 9.5 0.5 9.5 2.5" }),
|
|||
|
react_1.default.createElement("polygon", { id: "Stroke-3", stroke: "currentColor", points: "2.5 11.5 11.5 11.5 11.5 2.5 2.5 2.5" }))); };
|
|||
|
exports.default = Copy;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/filter.svg*/
|
|||
|
amis.define('src/icons/filter.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Filter = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 150 100", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M58.3333334,100 L91.6666666,100 L91.6666666,83.3333334 L58.3333334,83.3333334 L58.3333334,100 L58.3333334,100 Z M0,0 L0,16.6666666 L150,16.6666666 L150,0 L0,0 Z M25,58.3333334 L125,58.3333334 L125,41.6666666 L25,41.6666666 L25,58.3333334 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = Filter;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/caret.svg*/
|
|||
|
amis.define('src/icons/caret.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Caret = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 8", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "04\\u4E0B\\u62C9/24px/\\u9ED8\\u8BA4\\u7981\\u7528", transform: "translate(-115.000000, -8.000000)" },
|
|||
|
react_1.default.createElement("polygon", { id: "Shape", fill: "currentColor", fillRule: "nonzero", points: "125.472727 8 121 12.8 116.527273 8 115 9.6 121 16 127 9.6" }))); };
|
|||
|
exports.default = Caret;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/right-arrow-bold.svg*/
|
|||
|
amis.define('src/icons/right-arrow-bold.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var RightArrowBold = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 99 176", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { transform: "translate(-0.132812, 0.304688)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M95.6353697,79.4031346 C95.3433678,79.1111326 95.037575,78.8417152 94.7219891,78.5906854 L19.819373,3.29993262 C15.6492004,-0.870040234 8.88818437,-0.870040234 4.71821172,3.29993262 C0.548238867,7.47010527 0.548238867,14.2309215 4.71821172,18.4010939 L72.9329621,87.0041811 L3.25320488,156.617783 C-0.916767969,160.787956 -0.916767969,167.548772 3.25320488,171.719144 C7.42317773,175.889117 14.1841937,175.889117 18.3543662,171.719144 L94.7211895,95.4180764 C95.0369754,95.1668467 95.342968,94.8976293 95.6351697,94.6054273 C97.7329475,92.5076496 98.7744412,89.7539166 98.7615739,87.0043809 C98.7746414,84.2544453 97.7331475,81.5009123 95.6353697,79.4031346 Z", id: "\\u8DEF\\u5F84" }))); };
|
|||
|
exports.default = RightArrowBold;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/column-filter.svg*/
|
|||
|
amis.define('src/icons/column-filter.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var ColumnFilter = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 12 12", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "\\u7EC4\\u4EF6", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { fill: "currentColor" },
|
|||
|
react_1.default.createElement("path", { d: "M0,0 L4,4.999 L4.082,10 L8,12 L8,4.999 L12,0 L0,0 Z M5.0528196,9.05445227 L4.97933146,4.82735426 L4.97320745,4.49967969 L4.75580505,4.24311339 L2,1 L10,1 L7.24419495,4.24311339 L7.02066854,4.50640615 L7.02066854,4.84272902 L7.02066854,10 L5.0528196,9.05445227 Z", id: "Page-1" })))); };
|
|||
|
exports.default = ColumnFilter;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/zoom-in.svg*/
|
|||
|
amis.define('src/icons/zoom-in.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var ZoomIn = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 201 200", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "Zoom-In-(1)", transform: "translate(-0.195312, 0.000000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M200.969037,185.426237 L186.577193,199.885458 L132.526927,145.673486 C118.265005,157.063662 100.555788,163.269253 82.3037053,163.2725 C44.3450876,163.501364 11.2373309,137.535745 2.41322763,100.616316 C-6.41087568,63.6968867 11.3773428,25.5666334 45.3369837,8.60633202 C79.2966246,-8.35396931 120.465786,0.331480961 144.679988,29.5647067 C168.894189,58.7979325 169.763336,100.864327 146.777278,131.072772 L200.969037,185.426237 Z M82.3037053,18.6663447 C56.751881,18.5686211 33.6615322,33.8854576 23.8157876,57.4644032 C13.970043,81.0433489 19.3114596,108.232298 37.3456107,126.334087 C55.3797618,144.435876 82.5485248,149.879037 106.164163,140.121629 C129.779801,130.364221 145.182969,107.331373 145.180448,81.7793602 C145.206592,47.004448 117.078472,18.7708318 82.3037053,18.6663447 L82.3037053,18.6663447 Z M91.4198871,118.452958 L73.1605725,118.452958 L73.1605725,90.9427063 L45.7783383,90.9427063 L45.7783383,72.6092764 L73.1605725,72.6092764 L73.1605725,45.1192381 L91.4198871,45.1192381 L91.4198871,72.6092764 L118.822334,72.6092764 L118.822334,90.9427063 L91.4198871,90.9427063 L91.4198871,118.452958 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = ZoomIn;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/zoom-out.svg*/
|
|||
|
amis.define('src/icons/zoom-out.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var ZoomOut = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 187 187", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "Zoom-In", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M45.4545455,90.9090908 L118.181818,90.9090908 L118.181818,72.7272727 L45.4545455,72.7272727 L45.4545455,90.9090908 Z M145.709091,132.854546 C157.32865,118.383803 163.653932,100.376636 163.636364,81.8181818 C163.636364,36.6272727 127.009091,0 81.8181818,0 C36.6272727,0 0,36.6272727 0,81.8181818 C0,127.009091 36.6272727,163.636364 81.8181818,163.636364 C101.136364,163.636364 118.854546,156.909091 132.854546,145.709091 L173.827273,186.681818 L186.681818,173.827273 L145.709091,132.854546 Z M81.8181818,145.454546 C46.6727886,145.454546 18.1818182,116.963575 18.1818182,81.8181818 C18.1818182,46.6727886 46.6727886,18.1818182 81.8181818,18.1818182 C116.963575,18.1818182 145.454546,46.6727886 145.454546,81.8181818 C145.454546,116.963575 116.963575,145.454546 81.8181818,145.454546 L81.8181818,145.454546 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = ZoomOut;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/question.svg*/
|
|||
|
amis.define('src/icons/question.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Question = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 175 175", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "question-(1)", transform: "translate(0.304688, 0.500000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M167.56875,53.3876953 C163.179297,43.0103516 156.89707,33.6917969 148.896094,25.6910156 C140.895312,17.6902344 131.576758,11.4078125 121.199414,7.01855469 C110.452539,2.47285156 99.0396484,0.16796875 87.2785156,0.16796875 C75.5173828,0.16796875 64.1046875,2.47285156 53.3574219,7.01855469 C42.9800781,11.4078125 33.6615234,17.6902344 25.6607422,25.6910156 C17.6599609,33.6917969 11.3775391,43.0103516 6.98828125,53.3876953 C2.44257813,64.1349609 0.137695313,75.5474609 0.137695313,87.3087891 C0.137695313,99.0701172 2.44257813,110.482617 6.98828125,121.229883 C11.3775391,131.607227 17.6599609,140.925781 25.6607422,148.926562 C33.6615234,156.927539 42.9800781,163.209766 53.3574219,167.599219 C64.1046875,172.144727 75.5171875,174.449609 87.2785156,174.449609 C99.0396484,174.449609 110.452344,172.144727 121.199609,167.599219 C131.576953,163.209766 140.895508,156.927539 148.896289,148.926562 C156.897266,140.925781 163.179492,131.607227 167.568945,121.229883 C172.114453,110.482617 174.419336,99.0699219 174.419336,87.3087891 C174.419336,75.5476562 172.114453,64.1349609 167.56875,53.3876953 L167.56875,53.3876953 Z M95.5601563,149.20625 C93.1902344,151.314648 90.4513672,152.366016 87.3447266,152.366016 C84.1318359,152.366016 81.328125,151.326172 78.9310547,149.246484 C76.5353516,147.166797 75.3375,144.256836 75.3375,140.519727 C75.3375,137.199023 76.4951172,134.409766 78.8132813,132.143359 C81.1300781,129.879883 83.9738281,128.748047 87.3447266,128.748047 C90.6625,128.748047 93.453125,129.879883 95.7181641,132.143359 C97.9816406,134.409766 99.1150391,137.199023 99.1150391,140.519727 C99.1150391,144.205273 97.9298828,147.100781 95.5601563,149.20625 Z M125.063867,76.0599609 C123.248437,79.4294922 121.088281,82.3392578 118.586328,84.7867187 C116.085742,87.2369141 111.595898,91.35625 105.118359,97.1501953 C103.327344,98.7818359 101.892578,100.218164 100.813867,101.456055 C99.7337891,102.694141 98.9294922,103.825977 98.4037109,104.851367 C97.8765625,105.879688 97.46875,106.905273 97.1800781,107.933594 C96.8900391,108.95918 96.4546875,110.763086 95.8759766,113.345508 C94.875,118.820508 91.7410156,121.560937 86.4755859,121.560937 C83.7365234,121.560937 81.4328125,120.664648 79.5628906,118.872266 C77.6943359,117.082617 76.759375,114.422656 76.759375,110.895312 C76.759375,106.47168 77.4429687,102.639648 78.8132812,99.4023437 C80.1820312,96.1621094 81.9990234,93.3183594 84.2638672,90.8708984 C86.5273437,88.4207031 89.5824219,85.5107422 93.4273437,82.1412109 C96.796875,79.1910156 99.2341797,76.9677734 100.733594,75.4654297 C102.225903,73.9792131 103.50228,72.290943 104.525391,70.45 C105.553711,68.6058594 106.066602,66.6066406 106.066602,64.4464844 C106.066602,60.2324219 104.499609,56.6791016 101.365625,53.7806641 C98.2332031,50.8851562 94.1900391,49.4373047 89.240625,49.4373047 C83.4466797,49.4373047 79.1810547,50.8994141 76.4433594,53.8207031 C73.7044922,56.7449219 71.3876953,61.0480469 69.4917969,66.7357422 C67.7007812,72.6876953 64.3039062,75.6636719 59.3015625,75.6636719 C56.3515625,75.6636719 53.8638672,74.6238281 51.8373047,72.5441406 C49.809375,70.4644531 48.7953125,68.2123047 48.7953125,65.7878906 C48.7953125,60.7867187 50.4009766,55.7167969 53.6140625,50.5835937 C56.8255859,45.4474609 61.5134766,41.1960937 67.6751953,37.8265625 C73.8367187,34.4542969 81.0253906,32.7708984 89.2408203,32.7708984 C96.8759766,32.7708984 103.617969,34.1785156 109.463477,36.9964844 C115.308984,39.8144531 119.824805,43.6435547 123.010352,48.4894531 C126.197461,53.3353516 127.790234,58.6007812 127.790234,64.2884766 C127.790234,68.7636719 126.882227,72.6875 125.063867,76.0599609 L125.063867,76.0599609 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = Question;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/window-restore.svg*/
|
|||
|
amis.define('src/icons/window-restore.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var WindowRestore = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 200 200", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "window-restore", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M181.25,0 L56.25,0 C45.8984375,0 37.5,8.3984375 37.5,18.75 L37.5,37.5 L18.75,37.5 C8.3984375,37.5 0,45.8984375 0,56.25 L0,181.25 C0,191.601562 8.3984375,200 18.75,200 L143.75,200 C154.101562,200 162.5,191.601562 162.5,181.25 L162.5,162.5 L181.25,162.5 C191.601562,162.5 200,154.101562 200,143.75 L200,18.75 C200,8.3984375 191.601562,0 181.25,0 Z M143.75,181.25 L18.75,181.25 L18.75,100 L143.75,100 L143.75,181.25 Z M181.25,143.75 L162.5,143.75 L162.5,56.25 C162.5,45.8984375 154.101562,37.5 143.75,37.5 L56.25,37.5 L56.25,18.75 L181.25,18.75 L181.25,143.75 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = WindowRestore;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/info-circle.svg*/
|
|||
|
amis.define('src/icons/info-circle.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var InfoCircle = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 172 172", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "info-circle", transform: "translate(0.257812, 0.257812)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M114.313616,139.313616 L114.313616,121.456473 C114.313616,120.414807 113.978795,119.559152 113.309152,118.889509 C112.639509,118.219866 111.783854,117.885045 110.742187,117.885045 L100.027902,117.885045 L100.027902,60.7421875 C100.027902,59.7005208 99.6930803,58.8448661 99.0234375,58.1752232 C98.3537947,57.5055804 97.4981399,57.170759 96.4564732,57.170759 L60.7421875,57.170759 C59.7005208,57.170759 58.8448661,57.5055804 58.1752232,58.1752232 C57.5055804,58.8448661 57.170759,59.7005208 57.170759,60.7421875 L57.170759,78.5993303 C57.170759,79.6409969 57.5055804,80.4966517 58.1752232,81.1662945 C58.8448661,81.8359374 59.7005208,82.170759 60.7421875,82.170759 L71.4564732,82.170759 L71.4564732,117.885045 L60.7421875,117.885045 C59.7005208,117.885045 58.8448661,118.219866 58.1752232,118.889509 C57.5055804,119.559152 57.170759,120.414806 57.170759,121.456473 L57.170759,139.313616 C57.170759,140.355282 57.5055804,141.210937 58.1752232,141.88058 C58.8448661,142.550223 59.7005208,142.885044 60.7421875,142.885044 L110.742187,142.885044 C111.783854,142.885044 112.639509,142.550223 113.309152,141.88058 C113.978795,141.210937 114.313616,140.355282 114.313616,139.313616 L114.313616,139.313616 Z M100.027902,39.313616 L100.027902,21.4564732 C100.027902,20.4148066 99.6930803,19.5591518 99.0234375,18.889509 C98.3537947,18.2198661 97.4981399,17.8850447 96.4564732,17.8850447 L75.0279018,17.8850447 C73.9862351,17.8850447 73.1305803,18.2198661 72.4609375,18.889509 C71.7912947,19.5591518 71.4564732,20.4148066 71.4564732,21.4564732 L71.4564732,39.313616 C71.4564732,40.3552827 71.7912947,41.2109374 72.4609375,41.8805803 C73.1305803,42.5502231 73.9862351,42.8850447 75.0279018,42.8850447 L96.4564732,42.8850447 C97.4981399,42.8850447 98.3537947,42.5502231 99.0234375,41.8805803 C99.6930803,41.2109374 100.027902,40.3552827 100.027902,39.313616 Z M171.456473,85.7421875 C171.456473,101.292783 167.624628,115.634301 159.960938,128.766741 C152.297247,141.899182 141.899182,152.297247 128.766741,159.960938 C115.634301,167.624628 101.292783,171.456473 85.7421875,171.456473 C70.1915923,171.456473 55.8500745,167.624628 42.717634,159.960938 C29.5851935,152.297247 19.187128,141.899182 11.5234375,128.766741 C3.85974701,115.634301 0.0279017578,101.292783 0.0279017578,85.7421875 C0.0279017578,70.1915923 3.85974701,55.8500745 11.5234375,42.717634 C19.187128,29.5851935 29.5851935,19.187128 42.717634,11.5234375 C55.8500745,3.85974701 70.1915923,0.0279017578 85.7421875,0.0279017578 C101.292783,0.0279017578 115.634301,3.85974701 128.766741,11.5234375 C141.899182,19.187128 152.297247,29.5851935 159.960938,42.717634 C167.624628,55.8500745 171.456473,70.1915923 171.456473,85.7421875 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = InfoCircle;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/warning.svg*/
|
|||
|
amis.define('src/icons/warning.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Warning = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 150 138", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "warning", transform: "translate(0.390625, 0.882812)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M80.6802084,1.5963541 C82.7195697,2.72968791 84.4010413,4.41115959 85.534375,6.4505209 L147.626042,118.213021 C149.777654,122.085674 149.718692,126.807897 147.471057,130.62562 C145.223423,134.443344 141.122931,136.78617 136.692708,136.783856 L12.5260416,136.783856 C8.09656245,136.783856 3.99742458,134.441281 1.75080345,130.623824 C-0.495817677,126.806367 -0.554375449,122.085024 1.596875,118.213021 L63.684375,6.4505209 C67.0377886,0.417546946 74.64639,-1.7555398 80.6802084,1.5963541 Z M74.609375,12.5213541 L12.521875,124.283854 L136.692708,124.283854 L74.609375,12.5213541 Z M80.859375,99.2838541 L80.859375,111.783854 L68.359375,111.783854 L68.359375,99.2838541 L80.859375,99.2838541 Z M80.859375,45.2921875 L80.859375,90.9505209 L68.359375,90.9505209 L68.359375,45.2921875 L80.859375,45.2921875 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = Warning;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/schedule.svg*/
|
|||
|
amis.define('src/icons/schedule.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Schedule = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 176 176", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "schedule", transform: "translate(0.500000, 0.304688)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M87.4999,0.154665039 C39.4624693,0.154665039 0.159116992,39.4580174 0.159116992,87.495448 C0.159116992,135.532879 39.4624693,174.836231 87.4999,174.836231 C135.537331,174.836231 174.840683,135.532879 174.840683,87.495448 C174.840683,39.4580174 135.537131,0.154665039 87.4999,0.154665039 Z M87.4999,157.368074 C49.075152,157.368074 17.6272736,125.92879 17.6272736,87.495448 C17.6272736,49.0621059 49.075152,17.6228217 87.4999,17.6228217 C125.924648,17.6228217 157.372526,49.0621059 157.372526,87.495448 C157.372526,125.92879 125.924648,157.368074 87.4999,157.368074 Z", id: "\\u5F62\\u72B6" }),
|
|||
|
react_1.default.createElement("polygon", { id: "\\u8DEF\\u5F84", points: "91.8667393 43.8250564 78.7656219 43.8250564 78.7656219 96.2295262 124.184628 124.180176 131.170092 112.827673 91.8667393 89.2438625" }))); };
|
|||
|
exports.default = Schedule;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/home.svg*/
|
|||
|
amis.define('src/icons/home.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Home = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 200 189", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { transform: "translate(0.000000, -0.195312)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M195.85125,93.1203125 L110.60125,7.9453125 L104.91375,2.1953125 C102.202931,-0.499697856 97.8245686,-0.499697856 95.11375,2.1953125 L4.15125,93.1203125 C1.45507434,95.8051128 -0.0415864607,99.4656205 0.000355140024,103.270313 C0.158203791,111.052241 6.53032046,117.268533 14.31375,117.232812 L23.68875,117.232812 L23.68875,189.082812 L176.31375,189.082812 L176.31375,117.232812 L185.88875,117.232812 C189.65125,117.232812 193.20125,115.757812 195.87625,113.095312 C198.55125,110.420312 200.00125,106.870312 200.00125,103.095312 C200.00125,99.3453125 198.52625,95.7953125 195.85125,93.1203125 Z M112.35125,173.207812 L87.65125,173.207812 L87.65125,128.207812 L112.35125,128.207812 L112.35125,173.207812 L112.35125,173.207812 Z M160.42625,101.357812 L160.42625,173.207812 L126.47625,173.207812 L126.47625,122.907812 C126.47625,118.0339 122.525163,114.082812 117.65125,114.082812 L82.35125,114.082812 C77.4773371,114.082812 73.52625,118.0339 73.52625,122.907812 L73.52625,173.207812 L39.57625,173.207812 L39.57625,101.357812 L18.40125,101.357812 L100.02625,19.7953125 L105.11375,24.8953125 L181.61375,101.357812 L160.42625,101.357812 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = Home;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/folder.svg*/
|
|||
|
amis.define('src/icons/folder.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Folder = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 200 168", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "folder-(1)", transform: "translate(0.000000, 0.601562)", fill: "currentFolder", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M166.666667,166.731771 L8.3333334,166.731771 C3.3333334,166.731771 0,163.398437 0,158.398437 L0,8.3984375 C0,3.3984375 3.3333334,0.0651041016 8.3333334,0.0651041016 L66.6666668,0.0651041016 C71.6666668,0.0651041016 75,3.3984375 75,8.3984375 L75,16.7317709 L166.666667,16.7317709 C171.666667,16.7317709 175,20.0651041 175,25.0651041 L175,58.3984377 C175,63.3984377 171.666667,66.7317711 166.666667,66.7317711 C161.666667,66.7317711 158.333333,63.3984377 158.333333,58.3984377 L158.333333,33.3984375 L66.6666666,33.3984375 C61.6666666,33.3984375 58.3333334,30.0651041 58.3333334,25.0651041 L58.3333334,16.7317709 L16.6666666,16.7317709 L16.6666666,150.065104 L166.666667,150.065104 C171.666667,150.065104 175,153.398438 175,158.398438 C175,163.398438 171.666667,166.731771 166.666667,166.731771 Z", id: "\\u8DEF\\u5F84" }),
|
|||
|
react_1.default.createElement("path", { d: "M166.666667,166.731771 L8.3333334,166.731771 C5.8333334,166.731771 3.3333334,165.898438 1.6666668,163.398438 C0,160.898438 0,159.231771 0,156.731771 L25,56.7317709 C25.8333334,52.5651041 29.1666666,50.0651041 33.3333334,50.0651041 L191.666667,50.0651041 C194.166667,50.0651041 196.666667,50.8984375 198.333333,53.3984375 C200,55.8984375 200,57.5651041 200,60.0651041 L175,160.065104 C174.166667,164.231771 170.833333,166.731771 166.666667,166.731771 Z M19.1666666,150.065104 L160,150.065104 L180.833333,66.7317707 L40,66.7317707 L19.1666666,150.065104 Z", id: "\\u5F62\\u72B6" }))); };
|
|||
|
exports.default = Folder;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/sort-default.svg*/
|
|||
|
amis.define('src/icons/sort-default.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var SortDefault = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 7 12", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { fill: "currentColor" },
|
|||
|
react_1.default.createElement("polygon", { points: "3.5354 0.0004 2.8284 0.7064 0.0004 3.5344 0.7074 4.2424 3.0354 1.9134 3.0354 5.0354 4.0354 5.0354 4.0354 1.9134 6.3634 4.2424 7.0704 3.5344 4.2424 0.7064" }),
|
|||
|
react_1.default.createElement("polygon", { points: "3.035 7.0348 3.035 10.1558 0.708 7.8278 0 8.5348 2.828 11.3628 3.535 12.0708 4.243 11.3628 7.071 8.5348 6.363 7.8278 4.036 10.1558 4.036 7.0348" }))); };
|
|||
|
exports.default = SortDefault;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/sort-asc.svg*/
|
|||
|
amis.define('src/icons/sort-asc.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var SortAsc = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 7 10", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { fill: "currentColor" },
|
|||
|
react_1.default.createElement("polygon", { points: "3.5 0 2.8 0.703 0 3.514 0.7 4.217 3.005 1.903 3.005 10 3.995 10 3.995 1.903 6.3 4.217 7 3.514 4.2 0.703" }))); };
|
|||
|
exports.default = SortAsc;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/sort-desc.svg*/
|
|||
|
amis.define('src/icons/sort-desc.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var SortDesc = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 7 10", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "07icon/\\u8868\\u5934/\\u6392\\u5E8F\\u4E0B", fill: "currentColor" },
|
|||
|
react_1.default.createElement("polygon", { id: "07icon/\\u6392\\u5E8F/\\u6B63\\u5E8F", transform: "translate(3.500000, 5.000000) scale(1, -1) translate(-3.500000, -5.000000) ", points: "3.5 0 2.8 0.703 0 3.514 0.7 4.217 3.005 1.903 3.005 10 3.995 10 3.995 1.903 6.3 4.217 7 3.514 4.2 0.703" }))); };
|
|||
|
exports.default = SortDesc;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/setting.svg*/
|
|||
|
amis.define('src/icons/setting.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var Setting = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 196 200", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { transform: "translate(0.343750, 0.000000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M170.546281,170.220341 C167.664808,169.153129 165.637105,168.512801 163.716123,167.765753 C157.846456,165.524607 152.190232,162.963298 146.213844,160.935595 C144.506304,160.401989 142.051716,160.615431 140.450898,161.469201 C136.28877,163.496904 132.233364,165.844771 128.3914,168.512802 C127.110746,169.366571 126.043534,171.287553 125.72337,172.888371 C124.442715,179.931972 123.482224,187.082293 122.628455,194.232615 C122.094849,198.288021 120.173867,200.102282 116.011739,199.995561 C103.738799,199.888839 91.4658594,199.888839 79.1929195,199.995561 C75.1375133,199.995561 73.0030889,198.394742 72.4694828,194.339336 C71.5089918,187.189015 70.3350584,180.145414 69.4812887,172.995093 C69.161125,170.540505 68.3073553,169.046408 65.9594885,167.872474 C62.0108035,165.951493 58.4890033,163.283462 54.5403184,161.36248 C53.1529426,160.615432 51.0185182,160.295268 49.5244211,160.828874 C42.587542,163.283462 35.8641053,166.058214 29.0339475,168.726244 C24.1247715,170.647226 22.7373957,170.220341 19.9626439,165.524608 C13.8795346,155.17265 7.90314648,144.820692 1.9267582,134.468734 C-0.847993359,129.666279 -0.741272266,128.492346 3.63429766,125.077267 C9.39724336,120.488254 15.2669104,116.112685 20.9231348,111.416951 C21.9903469,110.563181 22.7373955,108.642199 22.7373955,107.254823 C22.9508379,103.306138 22.0970682,99.1440109 22.7373955,95.3020471 C23.4844439,91.1399195 21.7769045,89.0054953 18.7887105,86.7643498 C13.4526496,82.9223859 8.54347363,78.6535373 3.31413418,74.8115734 C0.219218945,72.4637066 -0.527829688,70.0091187 1.49987344,66.5940396 C8.00986758,55.6017543 14.4131406,44.5027479 20.8164137,33.4037412 C22.6306744,30.308826 24.9785412,29.6684986 28.2868988,30.9491533 C35.3304992,33.7239049 42.3740994,36.6053777 49.5244209,39.1666871 C51.018518,39.7002932 53.3663848,39.3801295 54.8604818,38.6330811 C58.9158881,36.6053779 62.5444094,33.9373475 66.5998156,31.9096443 C68.73424,30.8424322 69.4812885,29.5617775 69.6947309,27.4273533 C70.6552219,20.1703105 71.8291553,12.9132678 72.7896461,5.656225 C73.1098098,1.49409707 75.3509555,0 79.2996404,0 C91.5725803,0.106721289 103.84552,0.106721289 116.11846,0 C119.960424,0 122.094848,1.60081816 122.521733,5.44278203 C123.482224,12.5931035 124.656158,19.6367039 125.509927,26.7870254 C125.830091,29.4550559 126.790582,31.055874 129.351891,32.2298074 C133.087134,33.9373469 136.608934,36.0717713 140.024013,38.4196381 C142.265158,40.0204563 144.18614,40.0204563 146.640728,38.9532441 C153.257444,36.1784926 159.98088,33.7239045 166.704317,30.9491529 C170.43956,29.4550559 173.000869,30.2021045 175.028572,33.8306258 C181.111681,44.6094688 187.514954,55.2815904 193.704785,65.9537121 C196.159373,70.2225607 195.839209,71.6099365 191.890524,74.704852 C186.2343,79.0804219 180.578075,83.5627129 174.815129,87.9382828 C172.894148,89.4323799 172.360542,90.8197557 172.573984,93.2743437 C173.000869,97.7566348 172.467263,102.345647 172.680705,106.827938 C172.787427,108.428756 173.534475,110.349738 174.708408,111.310229 C180.364633,116.005963 186.2343,120.381533 191.997246,124.863824 C195.94593,127.958739 196.159373,129.346115 193.704785,133.614964 C187.408233,144.500528 181.111681,155.279371 174.708408,166.058214 C173.641196,167.979195 171.826935,169.046407 170.546281,170.220341 Z M97.335526,135.216323 C116.652066,135.322503 132.660249,119.634484 132.767515,100.531386 C132.873691,80.8946824 117.292394,64.9932211 97.869132,64.8859622 C78.4458705,64.7797785 62.4371504,80.5745187 62.4371504,99.9977801 C62.330967,119.207599 78.125707,135.109061 97.335526,135.216323 Z" })))); };
|
|||
|
exports.default = Setting;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/plus-cicle.svg*/
|
|||
|
amis.define('src/icons/plus-cicle.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var PlusCicle = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 163 163", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { id: "\\u9875\\u9762-1", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { id: "plus-border", transform: "translate(0.500000, 0.500000)", fill: "#000000", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M81.25,0 C36.4054066,0.0688329588 0.0688329588,36.4054066 1.11022302e-14,81.25 C0.0688329588,126.094593 36.4054066,162.431167 81.25,162.5 C126.094593,162.431167 162.431167,126.094593 162.5,81.25 C162.431167,36.4054066 126.094593,0.0688329588 81.25,0 Z M81.25,12.5 C119.2875,12.5 150,43.2125 150,81.25 C150,119.2875 119.2875,150.000056 81.25,150.000056 C63.0092456,150.02326 45.5088964,142.787447 32.6107248,129.889275 C19.7125532,116.991104 12.4767401,99.4907544 12.4999441,81.25 C12.4999441,43.2125 43.2125,12.5 81.25,12.5 Z M75,37.5 L75,75 L37.5,75 L37.5,87.5 L75,87.5 L75,125 L87.5,125 L87.5,87.5 L125,87.5 L125,75 L87.5,75 L87.5,37.5 L75,37.5 Z", id: "\\u5F62\\u72B6" })))); };
|
|||
|
exports.default = PlusCicle;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/icons/ellipsis-v.svg*/
|
|||
|
amis.define('src/icons/ellipsis-v.svg', function(require, exports, module, define) {
|
|||
|
|
|||
|
"use strict";
|
|||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|||
|
var tslib_1 = require("node_modules/tslib/tslib");
|
|||
|
var react_1 = tslib_1.__importDefault(require("node_modules/react/index"));
|
|||
|
var EllipsisV = function (props) { return react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 26 126", className: "icon" }, props),
|
|||
|
react_1.default.createElement("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|||
|
react_1.default.createElement("g", { id: "ellipsis-vertical", transform: "translate(0.500000, 0.500000)", fill: "currentColor", fillRule: "nonzero" },
|
|||
|
react_1.default.createElement("path", { d: "M12.5,0 C5.625,0 0,5.625 0,12.5 C0,19.375 5.625,25 12.5,25 C19.375,25 25,19.375 25,12.5 C25,5.625 19.375,0 12.5,0 Z M12.5,50 C5.625,50 0,55.625 0,62.5 C0,69.375 5.625,75 12.5,75 C19.375,75 25,69.375 25,62.5 C25,55.625 19.375,50 12.5,50 Z M12.5,100 C5.625,100 0,105.625 0,112.5 C0,119.375 5.625,125 12.5,125 C19.375,125 25,119.375 25,112.5 C25,105.625 19.375,100 12.5,100 Z", id: "\\u5F62\\u72B6" })))); };
|
|||
|
exports.default = EllipsisV;
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
;/*!src/components/icons.tsx*/
|
|||
|
amis.define("b7bbd16",function(e,t){"use strict";function o(e){return at[e]}function l(e,t){at[e]=t}function a(e){var t=e.icon,l=e.className,a=c.__rest(e,["icon","className"]);"undefined"!=typeof jest&&(a.icon=t);var s=o(t);return s?r.default.createElement(s,c.__assign({},a,{className:(l||"")+" icon-"+t})):r.default.createElement("span",{className:"text-danger"},"没有 icon ",t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PencilIcon=t.MinusIcon=t.PlusIcon=t.CheckIcon=t.RightArrowIcon=t.LeftArrowIcon=t.PauseIcon=t.PlayIcon=t.MuteIcon=t.VolumeIcon=t.EnterIcon=t.ReDoIcon=t.UnDoIcon=t.CloseIcon=t.Icon=t.registerIcon=t.getIcon=t.rightArrowIcon=t.leftArrowIcon=t.pauseIcon=t.playIcon=t.muteIcon=t.volumeIcon=t.enterIcon=t.reDoIcon=t.unDoIcon=t.closeIcon=void 0;var c=e("node_modules/tslib/tslib"),r=c.__importDefault(e("node_modules/react/index")),s=c.__importDefault(e("src/icons/close.svg"));t.CloseIcon=s.default;var u=c.__importDefault(e("src/icons/undo.svg"));t.UnDoIcon=u.default;var n=c.__importDefault(e("src/icons/redo.svg"));t.ReDoIcon=n.default;var i=c.__importDefault(e("src/icons/enter.svg"));t.EnterIcon=i.default;var f=c.__importDefault(e("src/icons/volume.svg"));t.VolumeIcon=f.default;var d=c.__importDefault(e("src/icons/mute.svg"));t.MuteIcon=d.default;var _=c.__importDefault(e("src/icons/play.svg"));t.PlayIcon=_.default;var m=c.__importDefault(e("src/icons/pause.svg"));t.PauseIcon=m.default;var v=c.__importDefault(e("src/icons/left-arrow.svg"));t.LeftArrowIcon=v.default;var p=c.__importDefault(e("src/icons/right-arrow.svg"));t.RightArrowIcon=p.default;var g=c.__importDefault(e("src/icons/check.svg"));t.CheckIcon=g.default;var D=c.__importDefault(e("src/icons/plus.svg"));t.PlusIcon=D.default;var I=c.__importDefault(e("src/icons/minus.svg"));t.MinusIcon=I.default;var w=c.__importDefault(e("src/icons/pencil.svg"));t.PencilIcon=w.default;var h=c.__importDefault(e("src/icons/view.svg")),E=c.__importDefault(e("src/icons/remove.svg")),b=c.__importDefault(e("src/icons/retry.svg")),y=c.__importDefault(e("src/icons/upload.svg")),P=c.__importDefault(e("src/icons/file.svg")),A=c.__importDefault(e("src/icons/success.svg")),k=c.__importDefault(e("src/icons/fail.svg")),x=c.__importDefault(e("src/icons/search.svg")),M=c.__importDefault(e("src/icons/back.svg")),z=c.__importDefault(e("src/icons/move.svg")),C=c.__importDefault(e("src/icons/info.svg")),N=c.__importDefault(e("src/icons/location.svg")),R=c.__importDefault(e("src/icons/drag-bar.svg")),j=c.__importDefault(e("src/icons/reload.svg")),q=c.__importDefault(e("src/icons/exchange.svg")),L=c.__importDefault(e("src/icons/columns.svg")),U=c.__importDefault(e("src/icons/calendar.svg")),V=c.__importDefault(e("src/icons/copy.svg")),O=c.__importDefault(e("src/icons/filter.svg")),B=c.__importDefault(e("src/icons/caret.svg")),F=c.__importDefault(e("src/icons/right-arrow-bold.svg")),G=c.__importDefault(e("src/icons/column-filter.svg")),H=c.__importDefault(e("src/icons/zoom-in.svg")),J=c.__importDefault(e("src/icons/zoom-out.svg")),K=c.__importDefault(e("src/icons/question.svg")),Q=c.__importDefault(e("src/icons/window-restore.svg")),S=c.__importDefault(e("src/icons/info-circle.svg")),T=c.__importDefault(e("src/icons/warning.svg")),W=c.__importDefault(e("src/icons/schedule.svg")),X=c.__importDefault(e("src/icons/home.svg")),Y=c.__importDefault(e("src/icons/folder.svg")),Z=c.__importDefault(e("src/icons/sort-default.svg")),$=c.__importDefault(e("src/icons/sort-asc.svg")),et=c.__importDefault(e("src/icons/sort-desc.svg")),tt=c.__importDefault(e("src/icons/setting.svg")),ot=c.__importDefault(e("src/icons/plus-cicle.svg")),lt=c.__importDefault(e("src/icons/ellipsis-v.svg"));t.closeIcon=r.default.createElement(s.default,null),t.unDoIcon=r.default.createElement(u.default,null),t.reDoIcon=r.default.createElement(n.default,null),t.enterIcon=r.default.createElement(i.default,null),t.volumeIcon=r.default.createElement(f.default,null),t.muteIcon=r.default.createElement(d.default,null),t.playIcon=r.default.createElement(_.default,null),t.pauseIcon=r.default.createElement(m.default,null),t.leftArr
|
|||
|
;/*!src/locale.tsx*/
|
|||
|
amis.define("5ab4e9d",function(e,t){"use strict";function n(e,t){p[e]=t}function a(e,t){return e.replace(/(\\)?\{\{([\s\S]+?)\}\}/g,function(e,n,a){return n?e.substring(1):f.resolveVariable(a,t||{})})}function r(e){if(e&&m[e])return m[e];var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!t||"string"!=typeof t)return t;var o=p[e]||p[d];return a.apply(void 0,i.__spreadArrays([(null===o||void 0===o?void 0:o[t])||t],n))};return e&&(m[e]=t),t}function o(){return d}function l(e){d=e}function s(e){var n,a=c.default((n=function(n){function a(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(a,n),a.prototype.render=function(){var n=this.props.locale||this.context||d,a=this.props.translate||r(n),o={locale:n,translate:a};return u.default.createElement(t.LocaleContext.Provider,{value:n},u.default.createElement(e,i.__assign({},this.props,o)))},a}(u.default.Component),n.displayName="I18N("+(e.displayName||e.name)+")",n.contextType=t.LocaleContext,n.ComposedComponent=e,n),e);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.localeable=t.LocaleContext=t.setDefaultLocale=t.getDefaultLocale=t.makeTranslator=t.register=void 0;var i=e("node_modules/tslib/tslib"),u=i.__importDefault(e("node_modules/react/index")),c=i.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),f=e("f2e345e"),d="zh-cn",p={};t.register=n;var m={};t.makeTranslator=r,t.getDefaultLocale=o,t.setDefaultLocale=l,t.LocaleContext=u.default.createContext(""),t.localeable=s});
|
|||
|
;/*!src/components/Modal.tsx*/
|
|||
|
amis.define("628f736",function(e,a){"use strict";var t;Object.defineProperty(a,"__esModule",{value:!0}),a.Modal=void 0;var s=e("node_modules/tslib/tslib"),l=s.__importDefault(e("node_modules/react/index")),n=s.__importStar(e("node_modules/react-transition-group/Transition")),o=e("node_modules/react-overlays/lib/index"),r=e("8768414"),d=e("256b65d"),i=e("b7bbd16"),c=e("5ab4e9d"),m=(t={},t[n.ENTERING]="in",t[n.ENTERED]="in",t[n.EXITING]="out",t),u=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.handleEntered=function(){var e=a.props.onEntered;document.body.classList.add("is-modalOpened"),e&&e()},a.handleExited=function(){var e=a.props.onExited;e&&e(),setTimeout(function(){document.querySelector(".amis-dialog-widget")||document.body.classList.remove("is-modalOpened")},200)},a.modalRef=function(e){var t=a.props.classPrefix;e?(r.addModal(a),e.classList.add(t+"Modal--"+r.current()+"th")):r.removeModal()},a}return s.__extends(a,e),a.prototype.componentDidMount=function(){this.props.show&&this.handleEntered()},a.prototype.componentWillUnmount=function(){this.props.show&&this.handleExited()},a.prototype.render=function(){var e=this,a=this.props,t=a.className,s=a.contentClassName,r=a.children,d=a.container,i=a.show,c=a.size,u=a.overlay,f=a.classnames;return l.default.createElement(o.Portal,{container:d},l.default.createElement(n.default,{mountOnEnter:!0,unmountOnExit:!0,"in":i,timeout:500,onExited:this.handleExited,onEntered:this.handleEntered},function(a){var n;return l.default.createElement("div",{ref:e.modalRef,role:"dialog",className:f("amis-dialog-widget Modal",(n={},n["Modal--"+c]=c,n),t)},u?l.default.createElement("div",{className:f("Modal-overlay",m[a])}):null,l.default.createElement("div",{className:f("Modal-content",s,m[a])},r))}))},a.defaultProps={container:document.body,size:"",overlay:!0},a.Header=d.themeable(c.localeable(function(e){var a=e.classnames,t=e.className,n=e.showCloseButton,o=e.onClose,r=e.children,d=(e.classPrefix,e.translate),c=s.__rest(e,["classnames","className","showCloseButton","onClose","children","classPrefix","translate"]);return l.default.createElement("div",s.__assign({},c,{className:a("Modal-header",t)}),n!==!1?l.default.createElement("a",{"data-tooltip":d("关闭弹窗"),"data-position":"left",onClick:o,className:a("Modal-close")},l.default.createElement(i.Icon,{icon:"close",className:"icon"})):null,r)})),a.Title=d.themeable(function(e){var a=e.classnames,t=e.className,n=e.children,o=(e.classPrefix,s.__rest(e,["classnames","className","children","classPrefix"]));return l.default.createElement("div",s.__assign({},o,{className:a("Modal-title",t)}),n)}),a.Body=d.themeable(function(e){var a=e.classnames,t=e.className,n=e.children,o=(e.classPrefix,s.__rest(e,["classnames","className","children","classPrefix"]));return l.default.createElement("div",s.__assign({},o,{className:a("Modal-body",t)}),n)}),a.Footer=d.themeable(function(e){var a=e.classnames,t=e.className,n=e.children,o=(e.classPrefix,s.__rest(e,["classnames","className","children","classPrefix"]));return l.default.createElement("div",s.__assign({},o,{className:a("Modal-footer",t)}),n)}),a}(l.default.Component);a.Modal=u;var f=d.themeable(c.localeable(u));a.default=f});
|
|||
|
;/*!src/components/Html.tsx*/
|
|||
|
amis.define("580df19",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Html=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),r=n.__importDefault(e("node_modules/classnames/index")),i=e("256b65d"),l=function(e){function t(t){var n=e.call(this,t)||this;return n.htmlRef=n.htmlRef.bind(n),n}return n.__extends(t,e),t.prototype.componentDidUpdate=function(e){this.props.html!==e.html&&this._render()},t.prototype.htmlRef=function(e){this.dom=e,e&&this._render()},t.prototype._render=function(){var e=this.props.html;e&&(this.dom.innerHTML=e)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.wrapperComponent,i=e.inline,l=e.classPrefix,s=n||(i?"span":"div");return o.default.createElement(s,{ref:this.htmlRef,className:r.default(l+"Html",t)})},t.defaultProps={inline:!0},t}(o.default.Component);t.Html=l,t.default=i.themeable(l)});
|
|||
|
;/*!src/components/Tooltip.tsx*/
|
|||
|
amis.define("007c3b6",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;var o=e("node_modules/tslib/tslib"),s=o.__importDefault(e("node_modules/react/index")),l=e("256b65d"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.render=function(){var e=this.props,t=(e.classPrefix,e.className),l=e.title,a=e.children,i=e.arrowProps,r=e.style,n=(e.placement,e.arrowOffsetLeft,e.arrowOffsetTop,e.positionLeft,e.positionTop,e.classnames),c=e.activePlacement,p=o.__rest(e,["classPrefix","className","title","children","arrowProps","style","placement","arrowOffsetLeft","arrowOffsetTop","positionLeft","positionTop","classnames","activePlacement"]);return s.default.createElement("div",o.__assign({},p,{className:n("Tooltip",c?"Tooltip--"+c:"",t),style:r,role:"tooltip"}),s.default.createElement("div",o.__assign({className:n("Tooltip-arrow")},i)),l?s.default.createElement("div",{className:n("Tooltip-title")},l):null,s.default.createElement("div",{className:n("Tooltip-body")},a))},t.defaultProps={className:""},t}(s.default.Component);t.Tooltip=a,t.default=l.themeable(a)});
|
|||
|
;/*!src/utils/dom.tsx*/
|
|||
|
amis.define("fb7767a",function(t,e){"use strict";function o(t,e){return t="function"==typeof t?t():t,u.default.findDOMNode(t)||e}function i(t){return h.default(u.default.findDOMNode(t))}function n(t){var e,o,n,r;return"BODY"===t.tagName?(o=window.innerWidth,n=window.innerHeight,r=m.default(i(t).documentElement)||m.default(t)):(e=p.default(t),o=e.width,n=e.height,r=m.default(t)),{width:o,height:n,scroll:r}}function r(t,e,o,i){var r=n(o),f=r.scroll,l=r.height,s=t-i-f,d=t+i-f+e;return 0>s?-s:d>l?l-d:0}function f(t,e,o,i){var r=n(o),f=r.width,l=t-i,s=t+i+e;return 0>l?-l:s>f?f-s:0}function l(t,e,o,i,n){void 0===n&&(n=0);var l="BODY"===i.tagName?p.default(o):c.default(o,i),s=p.default(e),d=s.height,u=s.width,a=i.getBoundingClientRect(),h=e.getBoundingClientRect(),m=e.offsetWidth?h.width/e.offsetWidth:1,g=e.offsetHeight?h.height/e.offsetHeight:1;t="auto"===t?"left-bottom-left-top right-bottom-right-top left-top-left-bottom right-top-right-bottom left-bottom-left-top":t;var _=0,w=0,v="",b="",y=t;if(~t.indexOf("-"))for(var D=t.split(/\s+/);D.length;){var P=y=D.shift(),O=P.split("-"),x=O[0],B=O[1],C=O[2],H=O[3];if(C=C||x,H=H||B,_="left"===x?l.left:"right"===x?l.left+l.width:l.left+l.width/2,w="top"===B?l.top:"bottom"===B?l.top+l.height:l.top+l.height/2,_-="left"===C?0:"right"===C?u:u/2,w-="top"===H?0:"bottom"===H?d:d/2,D.length){var N={x:a.x+_/m,y:a.y+w/g,width:u,height:d};if(N.x>0&&N.x+N.width<window.innerWidth&&N.y>0&&N.y+N.height<window.innerHeight)break}}else if("left"===t||"right"===t){_="left"===t?l.left-u:l.left+l.width,w=l.top+(l.height-d)/2;var E=r(w,d,i,n);w+=E,b=50*(1-2*E/d)+"%"}else if("top"===t||"bottom"===t){w="top"===t?l.top-d:l.top+l.height,_=l.left+(l.width-u)/2;var W=f(_,u,i,n);_+=W,v=50*(1-2*W/d)+"%"}else{if("center"!==t)throw new Error('calcOverlayPosition(): No such placement of "'+t+'" found.');_=l.left+(l.width-u)/2,w=l.top+(l.height-d)/2,v=b=void 0}return{positionLeft:_/m,positionTop:w/g,arrowOffsetLeft:v/m,arrowOffsetTop:b/g,activePlacement:y}}Object.defineProperty(e,"__esModule",{value:!0}),e.calculatePosition=e.ownerDocument=e.getContainer=e.props2BsPropsHoc=e.props2BsProps=void 0;var s=t("node_modules/tslib/tslib"),d=s.__importDefault(t("node_modules/react/index")),u=s.__importDefault(t("node_modules/react-dom/index")),a=s.__importDefault(t("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),h=s.__importDefault(t("node_modules/dom-helpers/ownerDocument")),p=s.__importDefault(t("node_modules/dom-helpers/query/offset")),c=s.__importDefault(t("node_modules/dom-helpers/query/position")),m=s.__importDefault(t("node_modules/dom-helpers/query/scrollTop")),g={level:"bsStyle",classPrefix:"bsClass",size:"bsSize"};e.props2BsProps=function(t){var e={};return Object.keys(t).forEach(function(o){return e[g[o]||o]=t[o]}),e},e.props2BsPropsHoc=function(t){var o=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return s.__extends(i,o),i.prototype.render=function(){return d.default.createElement(t,s.__assign({},e.props2BsProps(this.props)))},i}(d.default.Component);return a.default(o,t),o},e.getContainer=o,e.ownerDocument=i,e.calculatePosition=l});
|
|||
|
;/*!src/utils/resize-sensor.ts*/
|
|||
|
amis.define("67d35e6",function(e,t){"use strict";function i(e,t){if(e.currentStyle)return e.currentStyle[t];if(window.getComputedStyle){var i=window.getComputedStyle(e,void 0);return i?i.getPropertyValue(t):void 0}return e.style[t]}function n(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new r,e.resizedAttached.add(t);var n=e.resizeSensor=document.createElement("div");n.className="resize-sensor";var s="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: scroll; z-index: -1; visibility: hidden;",o="position: absolute; left: 0; top: 0;";n.style.cssText=s,n.innerHTML='\n <div class="resize-sensor-expand" style="'+s+'">\n <div style="'+o+'"></div>\n </div>\n <div class="resize-sensor-shrink" style="'+s+'">\n <div style="'+o+' width: 200%; height: 200%"></div>\n </div>\n <div class="resize-sensor-appear" style="'+s+'animation-name: apearSensor; animation-duration: 0.2s;"></div>',e.appendChild(n),e.hasInlineStyle=e.hasAttribute("style");var l=e.originPosition=i(e,"position");~["fixed","absolute"].indexOf(l)||(e.style.position="relative");var d,a,c=n.children[0],h=c.children[0],f=n.children[1],u=n.children[2],v=function(){h.style.width=c.offsetWidth+10+"px",h.style.height=c.offsetHeight+10+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight,f.scrollLeft=f.scrollWidth,f.scrollTop=f.scrollHeight,d=e.offsetWidth,a=e.offsetHeight};v();var p=function(){e.resizedAttached&&e.resizedAttached.call()},y=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)},g=function(){(e.offsetWidth!=d||e.offsetHeight!=a)&&p(),v()};y(c,"scroll",g),y(f,"scroll",g),y(u,"animationstart",v)}function s(e){if(e.resizeSensor){e.hasInlineStyle?e.style.position=e.originPosition:e.removeAttribute("style");try{e.removeChild(e.resizeSensor)}catch(t){}delete e.resizeSensor,delete e.resizedAttached,delete e.hasInlineStyle,delete e.originPosition}}function o(e,t,i){if(void 0===i&&(i=!1),i)return void n(e,function(){t.apply(this,arguments),s(e)});n(e,t);var o=!1;return function(){o||(o=!0,s(e))}}Object.defineProperty(t,"__esModule",{value:!0}),t.resizeSensor=t.getComputedStyle=void 0;var r=function(){function e(){this.q=[]}return e.prototype.add=function(e){this.q.push(e)},e.prototype.call=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.q.forEach(function(t){t.apply(void 0,e)})},e}();t.getComputedStyle=i,t.resizeSensor=o});
|
|||
|
;/*!src/components/Overlay.tsx*/
|
|||
|
amis.define("997df41",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t("node_modules/tslib/tslib"),o=t("node_modules/react-overlays/lib/index"),i=t("node_modules/react-dom/index"),r=n.__importDefault(t("node_modules/react/index")),s=t("fb7767a"),a=t("9a80175"),d=t("67d35e6");o.Position.propTypes.placement=function(){return null};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.updatePosition=function(t){var e,n=this;if(this._lastTarget=t,!t)return this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null});var o=i.findDOMNode(this),r=s.getContainer(this.props.container,s.ownerDocument(this).body);this.watchedTarget&&this.watchedTarget===t||"static"===d.getComputedStyle(t,"position")||(null===(e=this.resizeDispose)||void 0===e?void 0:e.forEach(function(t){return t()}),this.watchedTarget=t,this.resizeDispose=[d.resizeSensor(t,function(){return n.updatePosition(t)}),d.resizeSensor(o,function(){return n.updatePosition(t)})]),this.setState(s.calculatePosition(this.props.placement,o,t,r,this.props.containerPadding))},e.prototype.componentWillUnmount=function(){var t;null===(t=this.resizeDispose)||void 0===t?void 0:t.forEach(function(t){return t()})},e}(o.Position),p=function(t){function e(e){var n=t.call(this,e)||this;return n.state={exited:!e.show},n}n.__extends(e,t),e.prototype.componentWillReceiveProps=function(t){t.show?this.setState({exited:!1}):t.transition||this.setState({exited:!0})},e.prototype.onHiddenListener=function(t){this.setState({exited:!0}),this.props.onExited&&this.props.onExited(t)},e.prototype.render=function(){var t=this.props,e=t.container,i=t.containerPadding,s=t.target,a=t.placement,d=t.shouldUpdatePosition,p=t.rootClose,u=t.children,c=t.transition,f=n.__rest(t,["container","containerPadding","target","placement","shouldUpdatePosition","rootClose","children","transition"]),h=f.show||c&&!this.state.exited;if(!h)return null;var m=u;if(m=r.default.createElement(l,n.__assign({},{container:e,containerPadding:i,target:s,placement:a,shouldUpdatePosition:d}),m),c){var _=f.onExit,g=f.onExiting,E=f.onEnter,v=f.onEntering,x=f.onEntered;m=r.default.createElement(c,{"in":f.show,appear:!0,onExit:_,onExiting:g,onExited:this.onHiddenListener,onEnter:E,onEntering:v,onEntered:x},m)}return p&&(m=r.default.createElement(o.RootCloseWrapper,{onRootClose:f.onHide},m)),r.default.createElement(o.Portal,{container:e},m)};var i;return e.defaultProps={placement:"auto"},n.__decorate([a.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(i="undefined"!=typeof HTMLElement&&HTMLElement)?i:Object]),n.__metadata("design:returntype",void 0)],e.prototype,"onHiddenListener",null),e}(r.default.Component);e.default=p});
|
|||
|
;/*!src/components/TooltipWrapper.tsx*/
|
|||
|
amis.define("8d5abcb",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TooltipWrapper=void 0;var o=e("node_modules/tslib/tslib"),n=o.__importDefault(e("node_modules/react/index")),i=o.__importDefault(e("580df19")),l=e("node_modules/uncontrollable/cjs/index"),r=e("node_modules/react-dom/index"),d=o.__importDefault(e("007c3b6")),a=e("256b65d"),h=o.__importDefault(e("997df41")),s=null,u=function(e){function t(t){var o=e.call(this,t)||this;return o.moutned=!0,o.getTarget=o.getTarget.bind(o),o.show=o.show.bind(o),o.hide=o.hide.bind(o),o.handleShow=o.handleShow.bind(o),o.handleHide=o.handleHide.bind(o),o.handleClick=o.handleClick.bind(o),o.handleFocus=o.handleFocus.bind(o),o.handleBlur=o.handleBlur.bind(o),o.handleMouseOver=o.handleMouseOver.bind(o),o.handleMouseOut=o.handleMouseOut.bind(o),o.state={show:!1},o}return o.__extends(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.timer),this.moutned=!1},t.prototype.getTarget=function(){return r.findDOMNode(this)},t.prototype.show=function(){this.setState({show:!0})},t.prototype.hide=function(){s=null,this.moutned&&this.setState({show:!1})},t.prototype.getChildProps=function(){var e=n.default.Children.only(this.props.children);return e&&e.props},t.prototype.handleShow=function(){s&&s(),this.show()},t.prototype.handleHide=function(){clearTimeout(this.timer);var e=this.props.delay;s=this.hide.bind(this),this.timer=setTimeout(this.hide,e)},t.prototype.handleFocus=function(e){var t=this.getChildProps().onFocus;this.handleShow(),t&&t(e)},t.prototype.handleBlur=function(e){var t=this.getChildProps().onBlur;this.handleHide(),t&&t(e)},t.prototype.handleMouseOver=function(e){this.handleMouseOverOut(this.handleShow,e,"fromElement")},t.prototype.handleMouseOut=function(e){this.handleMouseOverOut(this.handleHide,e,"toElement")},t.prototype.handleMouseOverOut=function(e,t,o){var n=t.currentTarget,i=t.relatedTarget||t.nativeEvent[o];i&&i===n||n.contains(i)||e(t)},t.prototype.handleClick=function(e){var t=this.getChildProps().onClick;this.state.show?this.hide():this.show(),t&&t(e)},t.prototype.render=function(){var e=this.props,t=e.tooltip,o=e.children,l=e.placement,r=e.container,a=e.trigger,s=e.rootClose,u=e.tooltipClassName,c=n.default.Children.only(o);if(!t)return c;var p={key:"target"},f=Array.isArray(a)?a.concat():[a];return~f.indexOf("click")&&(p.onClick=this.handleClick),~f.indexOf("focus")&&(p.onFocus=this.handleShow,p.onBlur=this.handleHide),~f.indexOf("hover")&&(p.onMouseOver=this.handleMouseOver,p.onMouseOut=this.handleMouseOut),[c?n.default.cloneElement(c,p):null,n.default.createElement(h.default,{key:"overlay",target:this.getTarget,show:this.state.show,onHide:this.handleHide,rootClose:s,placement:l,container:r},n.default.createElement(d.default,{title:"string"!=typeof t?t.title:void 0,className:u},t&&t.render?t.render():t&&t.dom?t.dom:n.default.createElement(i.default,{html:"string"==typeof t?t:t.content})))]},t.defaultProps={placement:"top",trigger:["hover","focus"],rootClose:!1,delay:200},t}(n.default.Component);t.TooltipWrapper=u,t.default=a.themeable(l.uncontrollable(u,{show:"onVisibleChange"}))});
|
|||
|
;/*!src/components/Button.tsx*/
|
|||
|
amis.define("a67acca",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;var o=e("node_modules/tslib/tslib"),l=o.__importDefault(e("node_modules/react/index")),n=o.__importDefault(e("8d5abcb")),a=e("9a80175"),s=e("256b65d"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.renderButton=function(){var e,t=this.props,n=t.level,s=t.size,i=t.disabled,r=t.className,d=t.componentClass,c=t.classnames,u=t.children,p=(t.disabledTip,t.block),m=t.type,f=t.active,b=t.iconOnly,v=t.href,_=o.__rest(t,["level","size","disabled","className","componentClass","classnames","children","disabledTip","block","type","active","iconOnly","href"]);return v&&(d="a"),l.default.createElement(d,o.__assign({type:"a"===d?void 0:m},a.pickEventsProps(_),{href:v,className:c("Button",(e={},e["Button--"+n]=n,e["Button--"+s]=s,e["Button--block"]=p,e["Button--iconOnly"]=b,e["is-disabled"]=i,e["is-active"]=f,e),r),disabled:i}),u)},t.prototype.render=function(){var e=this.props,t=e.tooltip,o=e.placement,a=e.tooltipContainer,s=e.tooltipTrigger,i=e.tooltipRootClose,r=e.disabled,d=e.disabledTip,c=(e.classPrefix,e.classnames);return l.default.createElement(n.default,{placement:o,tooltip:r?d:t,container:a,trigger:s,rootClose:i},r&&d?l.default.createElement("div",{className:c("Button--disabled-wrap")},this.renderButton()):this.renderButton())},t.defaultProps={componentClass:"button",level:"default",type:"button",placement:"top",tooltipTrigger:["hover","focus"],tooltipRootClose:!1},t}(l.default.Component);t.Button=i,t.default=s.themeable(i)});
|
|||
|
;/*!src/utils/SimpleMap.ts*/
|
|||
|
amis.define("398dbab",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleMap=void 0;var i=t("node_modules/tslib/tslib"),n=i.__importDefault(t("node_modules/lodash/find")),o=i.__importDefault(t("node_modules/lodash/findIndex")),s=function(){function t(){this.list=[]}return t.prototype.has=function(t){var e=n.default(this.list,function(e){return e.key===t});return!!e},t.prototype.set=function(t,e){this.list.push({key:t,value:e})},t.prototype.get=function(t){var e=n.default(this.list,function(e){return e.key===t});return e?e.value:null},t.prototype.delete=function(t){var e=o.default(this.list,function(e){return e.key===t});~e&&this.list.splice(e,1)},t.prototype.dispose=function(){this.list.splice(0,this.list.length)},t}();e.SimpleMap=s});
|
|||
|
;/*!src/store/iRenderer.ts*/
|
|||
|
amis.define("7820b08",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iRendererStore=void 0;var a=e("node_modules/tslib/tslib"),i=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),n=e("9a80175"),o=e("f2e345e"),r=e("398dbab");t.iRendererStore=i.types.model("iRendererStore",{id:i.types.identifier,path:"",storeType:i.types.string,hasRemoteData:i.types.optional(i.types.boolean,!1),data:i.types.optional(i.types.frozen(),{}),initedAt:0,updatedAt:0,pristine:i.types.optional(i.types.frozen(),{}),disposed:!1,parentId:"",childrenIds:i.types.optional(i.types.array(i.types.string),[]),action:i.types.optional(i.types.frozen(),void 0),dialogOpen:!1,dialogData:i.types.optional(i.types.frozen(),void 0),drawerOpen:!1,drawerData:i.types.optional(i.types.frozen(),void 0)}).views(function(e){return{get parentStore(){return i.isAlive(e)&&e.parentId&&i.getRoot(e)&&"RendererStore"===i.getRoot(e).storeType?i.getRoot(e).stores.get(e.parentId):null},get __(){return i.isAlive(e)&&i.getRoot(e)&&"RendererStore"===i.getRoot(e).storeType?i.getRoot(e).__:function(e){return e}}}}).actions(function(e){function t(){e.disposed=!0;var t=e.parentStore;if(!e.childrenIds.length){var a=e.id;i.destroy(e),t&&t.onChildDispose(a)}}var d=new r.SimpleMap;return{initData:function(t){void 0===t&&(t={}),e.initedAt=Date.now(),e.pristine=t,e.data=t},reset:function(){e.data=e.pristine},updateData:function(t,i,o){void 0===t&&(t={});var r,d=e.data;if(i){var s=n.createObject(e.data.__super||null,i);r=n.createObject(s,a.__assign(a.__assign({},o?{}:e.data),t))}else r=n.extendObject(e.data,t,!o);Object.defineProperty(r,"__prev",{value:a.__assign({},d),enumerable:!1,configurable:!1,writable:!1}),e.data=r},setCurrentAction:function(t){e.action=t},openDialog:function(t,i,r){var s=t.__super?t.__super:e.data;i&&(s=n.createObject(s,i));var p=n.createObject(s,a.__assign({},t));if(e.action.dialog&&e.action.dialog.data){e.dialogData=o.dataMapping(e.action.dialog.data,p);var l=a.__assign(a.__assign({},e.action),{dialog:a.__assign({},e.action.dialog)});delete l.dialog.data,e.action=l}else e.dialogData=p;e.dialogOpen=!0,r&&d.set(e.dialogData,r)},closeDialog:function(t){var a=d.get(e.dialogData);e.dialogOpen=!1,a&&(d.delete(e.dialogData),setTimeout(function(){return a(t)},200))},openDrawer:function(t,i,r){var s=t.__super?t.__super:e.data;i&&(s=n.createObject(s,i));var p=n.createObject(s,a.__assign({},t));if(e.action.drawer.data){e.drawerData=o.dataMapping(e.action.drawer.data,p);var l=a.__assign(a.__assign({},e.action),{dialog:a.__assign({},e.action.dialog)});delete l.dialog.data,e.action=l}else e.drawerData=p;e.drawerOpen=!0,r&&d.set(e.drawerData,r)},closeDrawer:function(t){var a=d.get(e.drawerData);e.drawerOpen=!1,a&&(d.delete(e.drawerData),setTimeout(function(){return a(t)},200))},onChildDispose:function(a){var i=e.childrenIds.filter(function(e){return e!==a});e.childrenIds.replace(i),e.disposed&&t()},dispose:t}})});
|
|||
|
;/*!src/utils/errors.ts*/
|
|||
|
amis.define("bc87d08",function(r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerError=void 0;var t=r("node_modules/tslib/tslib"),n=function(r){function e(e,t){var n=r.call(this,e)||this;return n.type="ServerError",n.response=t,n}return t.__extends(e,r),e}(Error);e.ServerError=n});
|
|||
|
;/*!src/store/service.ts*/
|
|||
|
amis.define("57d76d7",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceStore=void 0;var s=e("node_modules/tslib/tslib"),r=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),n=e("7820b08"),a=e("9a80175"),o=e("bc87d08");t.ServiceStore=n.iRendererStore.named("ServiceStore").props({msg:"",error:!1,fetching:!1,saving:!1,busying:!1,checking:!1,initializing:!1,schema:r.types.optional(r.types.frozen(),null),schemaKey:""}).views(function(e){return{get loading(){return e.fetching||e.saving||e.busying||e.initializing}}}).actions(function(e){function t(t){void 0===t&&(t=!0),e.fetching=t}function n(t){void 0===t&&(t=!0),e.saving=t}function i(t){void 0===t&&(t=!0),e.busying=t}function c(t,s){void 0===s&&(s=!1);var r=a.extendObject(e.pristine,t,!s);e.data=e.pristine=r}function u(t,s){void 0===s&&(s=!1),e.msg=t&&String(t)||"",e.error=s}function g(){u("")}var l,d,m=r.flow(function(n,a,o){var i,g,d,m,f,h;return s.__generator(this,function(v){switch(v.label){case 0:return v.trys.push([0,6,,7]),l&&(l(),l=null,e.fetching=!1),e.fetching?[2]:(o&&o.silent||t(!0),[4,r.getRoot(e).fetcher(n,a,s.__assign(s.__assign({},o),{cancelExecutor:function(e){return l=e}}))]);case 1:return i=v.sent(),l=null,i.ok?[3,2]:(u(i.msg||o&&o.errorMessage,!0),r.getRoot(e).notify("error",i.msg,void 0!==i.msgTimeout?{closeButton:!0,timeout:i.msgTimeout}:void 0),[3,5]);case 2:return e.updatedAt=Date.now(),g=!!n.replaceData,d=s.__assign(s.__assign({},g?{}:e.data),i.data),c(d,g),e.hasRemoteData=!0,o&&o.onSuccess?(m=o.onSuccess(i),m&&m.then?[4,m]:[3,4]):[3,4];case 3:v.sent(),v.label=4;case 4:u(i.msg||o&&o.successMessage),o&&o.successMessage&&r.getRoot(e).notify("success",e.msg),v.label=5;case 5:return t(!1),[2,i];case 6:return f=v.sent(),h=r.getRoot(e),r.isAlive(h)&&"RendererStore"===h.storeType?h.isCancel(f)?[2]:(t(!1),f.stack&&console.error(f.stack),h.notify("error",f.message||f),[2]):[2];case 7:return[2]}})}),f=r.flow(function(n,o,i){var c,g,d,m;return s.__generator(this,function(f){switch(f.label){case 0:return f.trys.push([0,6,,7]),l&&(l(),l=null,e.fetching=!1),e.fetching?[2]:(i&&i.silent||t(!0),[4,r.getRoot(e).fetcher(n,o,s.__assign(s.__assign({},i),{cancelExecutor:function(e){return l=e}}))]);case 1:return c=f.sent(),l=null,(!a.isEmpty(c.data)||c.ok)&&(e.updatedAt=Date.now(),c.data&&e.updateData(c.data,void 0,!!n.replaceData),e.hasRemoteData=!0),c.ok?[3,2]:(u(c.msg||i&&i.errorMessage,!0),r.getRoot(e).notify("error",e.msg,void 0!==c.msgTimeout?{closeButton:!0,timeout:c.msgTimeout}:void 0),[3,5]);case 2:return i&&i.onSuccess?(g=i.onSuccess(c),g&&g.then?[4,g]:[3,4]):[3,4];case 3:f.sent(),f.label=4;case 4:u(c.msg||i&&i.successMessage),i&&i.successMessage&&r.getRoot(e).notify("success",e.msg),f.label=5;case 5:return t(!1),[2,c];case 6:return d=f.sent(),m=r.getRoot(e),r.isAlive(m)&&"RendererStore"===m.storeType?m.isCancel(d)?[2]:(t(!1),d.stack&&console.error(d.stack),m.notify("error",d.message||d),[2]):[2];case 7:return[2]}})}),h=r.flow(function(t,i,c){var g,l,d,m;return void 0===c&&(c={}),s.__generator(this,function(f){switch(f.label){case 0:return f.trys.push([0,6,,7]),c=s.__assign({method:"post"},c),e.saving?[2]:(n(!0),[4,r.getRoot(e).fetcher(t,i,c)]);case 1:if(g=f.sent(),(!a.isEmpty(g.data)||g.ok)&&(e.updatedAt=Date.now(),g.data&&e.updateData(g.data,void 0,!!t.replaceData)),g.ok)return[3,2];throw u(g.msg||c&&c.errorMessage||e.__("保存失败"),!0),new o.ServerError(e.msg,g);case 2:return c&&c.onSuccess?(l=c.onSuccess(g),l&&l.then?[4,l]:[3,4]):[3,4];case 3:f.sent(),f.label=4;case 4:u(g.msg||c&&c.successMessage),e.msg&&r.getRoot(e).notify("success",e.msg),f.label=5;case 5:return n(!1),[2,g.data];case 6:throw d=f.sent(),e.saving=!1,"ServerError"===d.type?(m=d.response,r.getRoot(e).notify("error",d.message,void 0!==m.msgTimeout?{closeButton:!0,timeout:m.msgTimeout}:void 0)):r.getRoot(e).notify("error",d.message),d;case 7:return[2]}})}),v=r.flow(function(t,n,o){var i,c,g;return void 0===o&&(o={}),s.__generator(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),o=s.__assign(s.__assign({method:"post"},o),{cancelExecut
|
|||
|
;/*!src/utils/validations.ts*/
|
|||
|
amis.define("943464a",function(u,t){"use strict";function F(u,F,n){void 0===n&&(n=""),t.validations[u]=F,t.validateMessages[u]=n}function n(u,F,n,e,i){void 0===i&&(i=function(u){return u});var s=[];return n&&Object.keys(n).forEach(function(d){if(n[d]||0===n[d]){if("function"!=typeof t.validations[d])throw new Error("Validation `"+d+"` not exists!");var o=t.validations[d];o.apply(void 0,a.__spreadArrays([F,u],Array.isArray(n[d])?n[d]:[n[d]]))||s.push(r.filter(i(e&&e[d]||t.validateMessages[d]),a.__assign({},[""].concat(n[d]))))}}),s}function e(u,t,F,e){void 0===e&&(e=function(u){return u});var i={};return Object.keys(t).forEach(function(a){var r=n(u[a],u,t[a]===!0?{isRequired:!0}:t[a],F,e);r.length&&(i[a]=r)}),i}function i(u){return"string"==typeof u?u?c(u).reduce(function(u,t){var F=t.indexOf(":"),n=t,e=[];return~F&&(n=t.substring(0,F),e=/^matchRegexp/.test(n)?[t.substring(F+1).trim()]:t.substring(F+1).split(",").map(function(u){try{return JSON.parse(u)}catch(t){return u}})),u[n]=e.length?e:!0,u},{}):{}:u||{}}Object.defineProperty(t,"__esModule",{value:!0}),t.str2rules=t.validateObject=t.validate=t.validateMessages=t.addRule=t.validations=void 0;var a=u("node_modules/tslib/tslib"),r=u("6a2dbb7"),s=function(u){return null!==u&&void 0!==u},d=function(u){return""===u},o=function(u){return u instanceof RegExp?u:/^(?:matchRegexp\:)?\/(.+)\/([gimuy]*)$/.test(u)?new RegExp(RegExp.$1,RegExp.$2||""):"string"==typeof u?new RegExp(u):/^$/};t.validations={isRequired:function(u,t){return!(void 0===t||""===t||null===t||Array.isArray(t)&&!t.length)},isExisty:function(u,t){return s(t)},matchRegexp:function(u,t,F){return!s(t)||d(t)||o(F).test(t)},isUndefined:function(u,t){return void 0===t},isEmptyString:function(u,t){return d(t)},isEmail:function(u,F){return t.validations.matchRegexp(u,F,/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i)},isUrl:function(u,F){return t.validations.matchRegexp(u,F,/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i)},isTrue:function(u,t){return t===!0},isFalse:function(u,t){return t===!1},isNumeric:function(u,F){return"number"==typeof F?!0:t.validati
|
|||
|
;/*!src/components/virtual-list/constants.ts*/
|
|||
|
amis.define("7be5389",function(o,r){"use strict";var i,e,t,E,R;Object.defineProperty(r,"__esModule",{value:!0}),r.oppositeMarginProp=r.marginProp=r.positionProp=r.sizeProp=r.scrollProp=r.SCROLL_CHANGE_REASON=r.DIRECTION=r.ALIGNMENT=void 0;var T;!function(o){o.AUTO="auto",o.START="start",o.CENTER="center",o.END="end"}(T=r.ALIGNMENT||(r.ALIGNMENT={}));var O;!function(o){o.HORIZONTAL="horizontal",o.VERTICAL="vertical"}(O=r.DIRECTION||(r.DIRECTION={}));var n;!function(o){o.OBSERVED="observed",o.REQUESTED="requested"}(n=r.SCROLL_CHANGE_REASON||(r.SCROLL_CHANGE_REASON={})),r.scrollProp=(i={},i[O.VERTICAL]="scrollTop",i[O.HORIZONTAL]="scrollLeft",i),r.sizeProp=(e={},e[O.VERTICAL]="height",e[O.HORIZONTAL]="width",e),r.positionProp=(t={},t[O.VERTICAL]="top",t[O.HORIZONTAL]="left",t),r.marginProp=(E={},E[O.VERTICAL]="marginTop",E[O.HORIZONTAL]="marginLeft",E),r.oppositeMarginProp=(R={},R[O.VERTICAL]="marginBottom",R[O.HORIZONTAL]="marginRight",R)});
|
|||
|
;/*!src/components/virtual-list/SizeAndPositionManager.ts*/
|
|||
|
amis.define("24dc9aa",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=t("7be5389"),s=function(){function t(t){var e=t.itemCount,i=t.itemSizeGetter,s=t.estimatedItemSize;this.itemSizeGetter=i,this.itemCount=e,this.estimatedItemSize=s,this.itemSizeAndPositionData={},this.lastMeasuredIndex=-1}return t.prototype.updateConfig=function(t){var e=t.itemCount,i=t.itemSizeGetter,s=t.estimatedItemSize;null!=e&&(this.itemCount=e),null!=s&&(this.estimatedItemSize=s),null!=i&&(this.itemSizeGetter=i)},t.prototype.getLastMeasuredIndex=function(){return this.lastMeasuredIndex},t.prototype.getSizeAndPositionForIndex=function(t){if(0>t||t>=this.itemCount)throw Error("Requested index "+t+" is outside of range 0.."+this.itemCount);if(t>this.lastMeasuredIndex){for(var e=this.getSizeAndPositionOfLastMeasuredItem(),i=e.offset+e.size,s=this.lastMeasuredIndex+1;t>=s;s++){var n=this.itemSizeGetter(s);if(null==n||isNaN(n))throw Error("Invalid size returned for index "+s+" of value "+n);this.itemSizeAndPositionData[s]={offset:i,size:n},i+=n}this.lastMeasuredIndex=t}return this.itemSizeAndPositionData[t]},t.prototype.getSizeAndPositionOfLastMeasuredItem=function(){return this.lastMeasuredIndex>=0?this.itemSizeAndPositionData[this.lastMeasuredIndex]:{offset:0,size:0}},t.prototype.getTotalSize=function(){var t=this.getSizeAndPositionOfLastMeasuredItem();return t.offset+t.size+(this.itemCount-this.lastMeasuredIndex-1)*this.estimatedItemSize},t.prototype.getUpdatedOffsetForIndex=function(t){var e=t.align,s=void 0===e?i.ALIGNMENT.START:e,n=t.containerSize,o=t.currentOffset,r=t.targetIndex;if(0>=n)return 0;var a,f=this.getSizeAndPositionForIndex(r),d=f.offset,h=d-n+f.size;switch(s){case i.ALIGNMENT.END:a=h;break;case i.ALIGNMENT.CENTER:a=d-(n-f.size)/2;break;case i.ALIGNMENT.START:a=d;break;default:a=Math.max(h,Math.min(d,o))}var u=this.getTotalSize();return Math.max(0,Math.min(u-n,a))},t.prototype.getVisibleRange=function(t){var e=t.containerSize,i=t.offset,s=t.overscanCount,n=this.getTotalSize();if(0===n)return{};var o=i+e,r=this.findNearestItem(i);if("undefined"==typeof r)throw Error("Invalid offset "+i+" specified");var a=this.getSizeAndPositionForIndex(r);i=a.offset+a.size;for(var f=r;o>i&&f<this.itemCount-1;)f++,i+=this.getSizeAndPositionForIndex(f).size;return s&&(r=Math.max(0,r-s),f=Math.min(f+s,this.itemCount-1)),{start:r,stop:f}},t.prototype.resetItem=function(t){this.lastMeasuredIndex=Math.min(this.lastMeasuredIndex,t-1)},t.prototype.findNearestItem=function(t){if(isNaN(t))throw Error("Invalid offset "+t+" specified");t=Math.max(0,t);var e=this.getSizeAndPositionOfLastMeasuredItem(),i=Math.max(0,this.lastMeasuredIndex);return e.offset>=t?this.binarySearch({high:i,low:0,offset:t}):this.exponentialSearch({index:i,offset:t})},t.prototype.binarySearch=function(t){for(var e=t.low,i=t.high,s=t.offset,n=0,o=0;i>=e;){if(n=e+Math.floor((i-e)/2),o=this.getSizeAndPositionForIndex(n).offset,o===s)return n;s>o?e=n+1:o>s&&(i=n-1)}return e>0?e-1:0},t.prototype.exponentialSearch=function(t){for(var e=t.index,i=t.offset,s=1;e<this.itemCount&&this.getSizeAndPositionForIndex(e).offset<i;)e+=s,s*=2;return this.binarySearch({high:Math.min(e,this.itemCount-1),low:Math.floor(e/2),offset:i})},t}();e.default=s});
|
|||
|
;/*!src/components/virtual-list/index.tsx*/
|
|||
|
amis.define("df63c13",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),i=o.__importStar(e("node_modules/react/index")),n=o.__importStar(e("node_modules/prop-types/index")),s=o.__importDefault(e("24dc9aa")),r=e("7be5389"),l=e("7be5389");Object.defineProperty(t,"ScrollDirection",{enumerable:!0,get:function(){return l.DIRECTION}});var a={overflow:"auto",willChange:"transform",WebkitOverflowScrolling:"touch"},d={position:"relative",width:"auto",whiteSpace:"nowrap",minHeight:"100%"},c={position:"absolute",top:0,left:0,width:"100%"},p=o.__assign(o.__assign({},c),{position:"sticky"}),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemSizeGetter=function(e){return function(o){return t.getSize(o,e)}},t.sizeAndPositionManager=new s.default({itemCount:t.props.itemCount,itemSizeGetter:t.itemSizeGetter(t.props.itemSize),estimatedItemSize:t.getEstimatedItemSize()}),t.state={offset:t.props.scrollOffset||null!=t.props.scrollToIndex&&t.getOffsetForIndex(t.props.scrollToIndex)||0,scrollChangeReason:r.SCROLL_CHANGE_REASON.REQUESTED},t.styleCache={},t.getRef=function(e){t.rootNode=e},t.handleScroll=function(e){var o=t.props.onScroll,i=t.getNodeOffset();0>i||t.state.offset===i||e.target!==t.rootNode||(t.setState({offset:i,scrollChangeReason:r.SCROLL_CHANGE_REASON.OBSERVED}),"function"==typeof o&&o(i,e))},t}return o.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.scrollOffset,o=e.scrollToIndex;this.rootNode.addEventListener("scroll",this.handleScroll,{passive:!0}),this.updateRootWidth(),null!=t?this.scrollTo(t):null!=o&&this.scrollTo(this.getOffsetForIndex(o))},t.prototype.updateRootWidth=function(){for(var e=this.rootNode.children[0].children,t=this.rootNode.parentElement.getBoundingClientRect().width,o=0,i=0;i<e.length;i++){var n=e[i].getBoundingClientRect().width;n>o&&(o=n)}this.rootNode.style.width=t>=o?t+"px":o+"px"},t.prototype.componentWillReceiveProps=function(e){var t=this.props,o=t.estimatedItemSize,i=t.itemCount,n=t.itemSize,s=t.scrollOffset,l=t.scrollToAlignment,a=t.scrollToIndex,d=e.scrollToIndex!==a||e.scrollToAlignment!==l,c=e.itemCount!==i||e.itemSize!==n||e.estimatedItemSize!==o;e.itemSize!==n&&this.sizeAndPositionManager.updateConfig({itemSizeGetter:this.itemSizeGetter(e.itemSize)}),(e.itemCount!==i||e.estimatedItemSize!==o)&&this.sizeAndPositionManager.updateConfig({itemCount:e.itemCount,estimatedItemSize:this.getEstimatedItemSize(e)}),c&&this.recomputeSizes(),e.scrollOffset!==s?this.setState({offset:e.scrollOffset||0,scrollChangeReason:r.SCROLL_CHANGE_REASON.REQUESTED}):"number"==typeof e.scrollToIndex&&(d||c)&&this.setState({offset:this.getOffsetForIndex(e.scrollToIndex,e.scrollToAlignment,e.itemCount),scrollChangeReason:r.SCROLL_CHANGE_REASON.REQUESTED})},t.prototype.componentDidUpdate=function(e,t){this.updateRootWidth();var o=this.state,i=o.offset,n=o.scrollChangeReason;t.offset!==i&&n===r.SCROLL_CHANGE_REASON.REQUESTED&&this.scrollTo(i)},t.prototype.componentWillUnmount=function(){this.rootNode.removeEventListener("scroll",this.handleScroll)},t.prototype.scrollTo=function(e){var t=this.props.scrollDirection,o=void 0===t?r.DIRECTION.VERTICAL:t;this.rootNode[r.scrollProp[o]]=e},t.prototype.getOffsetForIndex=function(e,t,o){void 0===t&&(t=this.props.scrollToAlignment),void 0===o&&(o=this.props.itemCount);var i=this.props.scrollDirection,n=void 0===i?r.DIRECTION.VERTICAL:i;return(0>e||e>=o)&&(e=0),this.sizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:this.props[r.sizeProp[n]],currentOffset:this.state&&this.state.offset||0,targetIndex:e})},t.prototype.recomputeSizes=function(e){void 0===e&&(e=0),this.styleCache={},this.sizeAndPositionManager.resetItem(e)},t.prototype.render=function(){var e,t=this,n=this.props,s=(n.estimatedItemSize,n.height),l=n.overscanCount,c=void 0===l?3:l,p=n.renderItem,f=(n.itemCount,n.itemSize,n.onItemsRendered),u=(n.onScroll,n.scrollDirection),m=void 0===u?r.DIRECTION.VERTICAL:u,h=(n.scrollOffset,n.scrollToIndex,n.scrollToAlignment,n.stickyIndices),g=
|
|||
|
;/*!src/components/PopOver.tsx*/
|
|||
|
amis.define("2b3dcdf",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopOver=void 0;var s=e("node_modules/tslib/tslib"),o=s.__importDefault(e("node_modules/react/index")),a=e("node_modules/react-dom/index"),n=e("256b65d"),i=e("9a80175"),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={xOffset:0,yOffset:0},t}return s.__extends(t,e),t.prototype.componentDidMount=function(){this.mayUpdateOffset();var e=a.findDOMNode(this);this.parent=e.parentNode,this.parent.classList.add("has-popover")},t.prototype.componentDidUpdate=function(){this.mayUpdateOffset()},t.prototype.componentWillUnmount=function(){this.parent&&this.parent.classList.remove("has-popover")},t.prototype.mayUpdateOffset=function(){var e,t=this.props.offset;if(t&&"function"==typeof t){var s=this.props,o=s.placement,n=s.positionTop,i=s.positionLeft;e=t(a.findDOMNode(this).getBoundingClientRect(),{x:i,y:n,placement:o})}else e=t;this.setState({xOffset:e&&e.x?e.x:0,yOffset:e&&e.y?e.y:0})},t.prototype.render=function(){var e=this.props,t=(e.placement,e.activePlacement),a=e.positionTop,n=e.positionLeft,f=(e.arrowOffsetLeft,e.arrowOffsetTop,e.style),r=e.children,p=(e.offset,e.overlay),l=e.onHide,c=e.classPrefix,d=e.classnames,m=e.className,u=s.__rest(e,["placement","activePlacement","positionTop","positionLeft","arrowOffsetLeft","arrowOffsetTop","style","children","offset","overlay","onHide","classPrefix","classnames","className"]),y=this.state,v=y.xOffset,O=y.yOffset,h=s.__assign(s.__assign({display:"block"},f),{top:a+O,left:n+v});return o.default.createElement("div",s.__assign({className:d(c+"PopOver",m,c+"PopOver--"+i.camel(t)),style:h},u),p?o.default.createElement("div",{className:c+"PopOver-overlay",onClick:l}):null,r)},t.defaultProps={className:"",offset:{x:0,y:0},overlay:!1,placement:"auto"},t}(o.default.PureComponent);t.PopOver=f,t.default=n.themeable(f)});
|
|||
|
;/*!src/utils/api.ts*/
|
|||
|
amis.define("1caead1",function(e,t){"use strict";function a(e,t){if("string"==typeof e){var a=y.test(e)?RegExp.$1:"";a&&(e=e.replace(a+":","")),e={method:a||t,url:e}}else e=g.__assign({},e);return e}function r(e,t,r){void 0===r&&(r={}),e=a(e,r.method);var i=r.autoAppend,s=r.ignoreData,o=g.__rest(r,["autoAppend","ignoreData"]);if(e.config=g.__assign({},o),e.method=e.method||r.method||"get",!t)return e;if(t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer)return e.data=t,e;var d=e.url=e.url||"",u=e.url.indexOf("?");if(~u){var p=e.url.indexOf("#"),l=A.default.parse(e.url.substring(u+1,~p?p:void 0));e.url=m.tokenize(e.url.substring(0,u+1),t,"| url_encode")+v.qsstringify(m.dataMapping(l,t))+(~p?e.url.substring(p):"")}else e.url=m.tokenize(e.url,t,"| url_encode");if(s)return e;if(e.data?e.data=m.dataMapping(e.data,t):("post"===e.method||"put"===e.method)&&(e.data=v.cloneObject(t)),"get"===e.method&&(~d.indexOf("$")||e.data||!i||(e.data=t),e.data)){var f=e.url.indexOf("?");if(~f){var l=g.__assign(g.__assign({},A.default.parse(e.url.substring(f+1))),e.data);e.url=e.url.substring(0,f)+"?"+v.qsstringify(l)}else e.url+="?"+v.qsstringify(e.data);delete e.data}return e.headers&&(e.headers=m.dataMapping(e.headers,t)),e.requestAdaptor&&"string"==typeof e.requestAdaptor&&(e.requestAdaptor=n(e.requestAdaptor,"api")),e.adaptor&&"string"==typeof e.adaptor&&(e.adaptor=n(e.adaptor,"payload","response","api")),e}function n(e){for(var t=[],a=1;a<arguments.length;a++)t[a-1]=arguments[a];try{var r=new(Function.bind.apply(Function,g.__spreadArrays([void 0],t,[e])));return r}catch(n){return console.warn(n),null}}function i(e){var t=e.data;if(!t)throw new Error("Response is empty!");if(!t.hasOwnProperty("status"))throw new Error("接口返回格式不符合,请参考 http://amis.baidu.com/v2/docs/api");var a={ok:0==t.status,status:t.status,msg:t.msg,msgTimeout:t.msgTimeout,data:t.data};return 422==a.status&&(a.errors=t.errors),a}function s(e){return function(t,a,n){if(t=r(t,a,n),t.requestAdaptor&&(t=t.requestAdaptor(t)||t),t.data&&(v.hasFile(t.data)||"form-data"===t.dataType)?t.data=v.object2formData(t.data,t.qsOptions):t.data&&"string"!=typeof t.data&&"form"===t.dataType?(t.data=v.qsstringify(t.data,t.qsOptions),t.headers=t.headers||(t.headers={}),t.headers["Content-Type"]="application/x-www-form-urlencoded"):t.data&&"string"!=typeof t.data&&"json"===t.dataType&&(t.data=JSON.stringify(t.data),t.headers=t.headers||(t.headers={}),t.headers["Content-Type"]="application/json"),"number"==typeof t.cache&&t.cache>0){var i=f(t);return o(i?i.cachedPromise:c(t,e(t)),t)}return o(e(t),t)}}function o(e,t){var a=t.adaptor;return a?e.then(function(e){return g.__assign(g.__assign({},e),{data:a(e.data,e,t)})}).then(i):e.then(i)}function d(e,t,a,n){var i=t&&t.url||t;return t&&t.autoRefresh===!1?!1:i&&"string"==typeof i&&~i.indexOf("$")?(e=r(e,a,{ignoreData:!0}),t=r(t,n,{ignoreData:!0}),!(e.url===t.url||!u(t.url)||t.sendOn&&!_.evalExpression(t.sendOn,n))):!1}function u(e){return e&&/^(?:(https?|wss?|taf):\/\/[^\/]+)?(\/[^\s\/\?]*){1,}(\?.*)?$/.test(e)}function p(e,t,a,r){return e?a===!1?!1:r&&t&&!_.evalExpression(r,t)?!1:"string"==typeof e&&e.length?!0:v.isObject(e)&&e.url?e.sendOn&&t&&!_.evalExpression(e.sendOn,t)?!1:!0:!1:!1}function l(e,t){return e.method===t.method&&e.url===t.url&&!v.isObjectShallowModified(e.data,t.data,!1)}function f(e){for(var t,a=Date.now(),r=0,n=b.length;n>r;r++){var i=b[r];if(a-i.requestTime>i.cache)b.splice(r,1),n--,r--;else if(l(e,i)){t=i;break}}return t}function c(e,t){return b.push(g.__assign(g.__assign({},e),{cachedPromise:t,requestTime:Date.now()})),t}function h(){b.splice(0,b.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.clearApiCache=t.setApiCache=t.getApiCache=t.isSameApi=t.isEffectiveApi=t.isValidApi=t.isApiOutdated=t.wrapAdaptor=t.wrapFetcher=t.buildApi=t.normalizeApi=void 0;var g=e("node_modules/tslib/tslib"),m=e("f2e345e"),A=g.__importDefault(e("node_modules/qs/lib/index")),_=e("6a2dbb7"),v=e("9a80175"),y=/(?:^|raw\:)(get|post|put|delete|patch|options|head):/i,b=[];t.normalizeApi=a,t.buildApi=r,
|
|||
|
;/*!src/types.ts*/
|
|||
|
amis.define("8f9f9e3",function(e,f){"use strict";Object.defineProperty(f,"__esModule",{value:!0})});
|
|||
|
;/*!src/renderers/Form/Item.tsx*/
|
|||
|
amis.define("567b83c",function(e,t){"use strict";function r(e){return function(r){var a,n=!(r.prototype instanceof l.default.Component);if(e.validate&&!r.prototype.validate){var s=e.validate;r.prototype.validate=function(){var e={input:this};return s.apply(e,arguments)}}else e.validate&&console.error("FormItem配置中的 validate 将不起作用,因为类的成员函数中已经定义了 validate 方法,将优先使用类里面的实现。");return e.storeType&&(r=m.HocStoreFactory({storeType:e.storeType,extendsData:e.extendsData})(c.observer(r)),delete e.storeType),i.default((a=function(a){function i(e){var t=a.call(this,e)||this;return t.refFn=t.refFn.bind(t),t}return o.__extends(i,a),i.prototype.componentWillMount=function(){var t=this.props,r=t.validations,n=t.formItem;n&&!r&&e.validations&&n.config({rules:e.validations}),a.prototype.componentWillMount.call(this)},i.prototype.shouldComponentUpdate=function(r){return r.strictMode===!1||e.strictMode===!1?!0:d.anyChanged(t.detectProps,this.props,r)?!0:!1},i.prototype.getWrappedInstance=function(){return this.ref},i.prototype.refFn=function(e){this.ref=e},i.prototype.renderControl=function(){var t,a=this.props,i=a.inputClassName,s=a.formItem,m=a.classnames,c=(a.children,a.type),p=a.size,u=a.defaultSize,f=o.__rest(a,["inputClassName","formItem","classnames","children","type","size","defaultSize"]),h=p||u;return l.default.createElement(r,o.__assign({},f,{onOpenDialog:this.handleOpenDialog,size:e.sizeMutable!==!1?void 0:p,onFocus:this.handleFocus,onBlur:this.handleBlur,type:c,classnames:m,ref:n?void 0:this.refFn,forwardedRef:n?this.refFn:void 0,formItem:s,className:m("Form-control",(t={"is-inline":!!f.inline,"is-error":s&&!s.valid},t["Form-control--withSize Form-control--size"+d.ucFirst(h)]=e.sizeMutable!==!1&&"string"==typeof h&&!!h&&"full"!==h,t),i)}))},i}(f),a.defaultProps=o.__assign({className:"",renderLabel:e.renderLabel,renderDescription:e.renderDescription,sizeMutable:e.sizeMutable,wrap:e.wrap,showErrorMsg:e.showErrorMsg},r.defaultProps),a.propsList=o.__spreadArrays(["value","defaultValue","onChange","setPrinstineValue","readOnly","strictMode"],r.propsList||[]),a.displayName="FormItem"+(e.type?"("+e.type+")":""),a.ComposedComponent=r,a),r)}}function a(e){var t=r(e)(e.component);return m.registerRenderer(o.__assign(o.__assign({},e),{name:e.name||e.type+"-control",weight:"undefined"!=typeof e.weight?e.weight:-100,test:e.test||new RegExp("(^|/)form(?:/.+)?/control/(?:d+/)?"+e.type+"$","i"),component:t,isFormItem:!0}))}function n(e){return function(t){var r=a(o.__assign(o.__assign({},e),{component:t}));return r.component}}Object.defineProperty(t,"__esModule",{value:!0}),t.FormItem=t.registerFormItem=t.asFormItem=t.detectProps=t.FormItemWrap=void 0;var o=e("node_modules/tslib/tslib"),l=o.__importDefault(e("node_modules/react/index")),i=o.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),s=e("node_modules/mobx/lib/index"),m=e("0f9ebdf"),d=e("9a80175"),c=e("node_modules/mobx-react/dist/index"),p=e("8f9f9e3"),u=e("6a2dbb7"),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o.__extends(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props.formItem;t&&(this.reaction=s.reaction(function(){return""+t.errors.join("")+t.isFocused+t.dialogOpen},function(){return e.forceUpdate()}))},t.prototype.componentWillUnmount=function(){this.reaction&&this.reaction()},t.prototype.handleFocus=function(e){var t=this.props.formItem;t&&t.focus(),this.props.onFocus&&this.props.onFocus(e)},t.prototype.handleBlur=function(e){var t=this.props.formItem;t&&t.blur(),this.props.onBlur&&this.props.onBlur(e)},t.prototype.handleOpenDialog=function(e,t){return o.__awaiter(this,void 0,void 0,function(){var r;return o.__generator(this,function(){return r=this.props.formItem,r?[2,new Promise(function(a){return r.openDialog(e,t,function(e){return a(e)})})]:[2]})})},t.prototype.handleDialogConfirm=function(e){var t=e[0],r=this.props.formItem;r&&r.closeDialog(t)},t.prototype.handleDialogClose=function(){var e=this.props.formIte
|
|||
|
;/*!src/renderers/Form/Options.tsx*/
|
|||
|
amis.define("b86428a",function(e,t){"use strict";function o(e){var o=e.component,n=function(n){function a(){return null!==n&&n.apply(this,arguments)||this}i.__extends(a,n),a.prototype.componentWillMount=function(){var t=this,o=this.props,n=o.initFetch,a=o.formItem,i=(o.source,o.data,o.setPrinstineValue),r=o.defaultValue,s=o.multiple,p=o.joinValues,d=o.extractValue,u=o.addHook,c=o.formInited,f=o.valueField,_=o.options,y=o.value;a&&(a.setOptions(m.normalizeOptions(_)),this.reaction=l.reaction(function(){return JSON.stringify([a.loading,a.filteredOptions])},function(){return t.forceUpdate()}));var g=n!==!1;if(a&&p===!1&&r){var h=d?a.getSelectedOptions(y).map(function(e){return e[f||"value"]}):a.getSelectedOptions(y);i(s?h.concat():h[0])}g&&e.autoLoadOptionsFromSource!==!1&&(c?this.reload():u&&u(this.initOptions,"init"))},a.prototype.componentDidMount=function(){this.normalizeValue()},a.prototype.shouldComponentUpdate=function(o){return e.strictMode===!1||o.strictMode===!1?!0:o.source||o.autoComplete?!0:p.anyChanged(t.detectProps,this.props,o)?!0:!1},a.prototype.componentDidUpdate=function(t){var o=this,n=this.props,a=n.formItem;if(a&&n.formInited)if(!t.formItem,(t.value!==n.value||a.expressionsInOptions)&&a.syncOptions(),t.options!==n.options&&a)a.setOptions(m.normalizeOptions(n.options||[])),this.normalizeValue();else if(e.autoLoadOptionsFromSource!==!1&&n.source&&a&&(t.source!==n.source||t.data!==n.data))if(c.isPureVariable(n.source)){var i=c.resolveVariableAndFilter(t.source,t.data,"| raw"),s=c.resolveVariableAndFilter(n.source,n.data,"| raw");i!==s&&a.setOptions(m.normalizeOptions(s||[])),this.normalizeValue()}else r.isEffectiveApi(n.source,n.data)&&r.isApiOutdated(t.source,n.source,t.data,n.data)&&a.loadOptions(n.source,n.data,void 0,!0,n.onChange).then(function(){return o.normalizeValue()})},a.prototype.componentWillUnmount=function(){this.props.removeHook&&this.props.removeHook(this.reload,"init"),this.reaction&&this.reaction()},a.prototype.normalizeValue=function(){var e=this.props,t=e.joinValues,o=e.extractValue,n=e.value,a=e.multiple,i=e.formItem,r=e.valueField;if(i&&t===!1&&i.options.length)if(o!==!1||"string"!=typeof n&&"number"!=typeof n){if(o===!0&&n&&!(Array.isArray(n)&&n.every(function(e){return"string"==typeof e||"number"==typeof e})||"string"==typeof n||"number"==typeof n)){var s=i.getSelectedOptions(n).map(function(e){return e[r||"value"]});i.changeValue(a?s.concat():s[0])}}else{var s=i.getSelectedOptions(n);i.changeValue(a?s.concat():s[0])}},a.prototype.getWrappedInstance=function(){return this.input},a.prototype.inputRef=function(e){this.input=e},a.prototype.handleToggle=function(e,t,o){var n=this.props,a=n.onChange,i=n.joinValues,r=n.extractValue,s=n.valueField,p=n.delimiter,l=n.clearable,d=n.resetValue,u=n.multiple,c=n.formItem,f=n.value;if(c){var y=c.getSelectedOptions(f).concat(),g=_.default(y,m.optionValueCompare(e[s||"value"],s||"value")),h="";u?(~g?y.splice(g,1):y.push(e),h=y,i?h=h.map(function(e){return e[s||"value"]}).join(p):r&&(h=h.map(function(e){return e[s||"value"]}))):(~g&&l?y.splice(g,1):y=[e],h=y[0]||d,(i||r)&&h&&(h=h[s||"value"])),a&&a(h,t,o)}},a.prototype.handleToggleAll=function(){var e=this.props,t=e.value,o=e.onChange,n=e.joinValues,a=e.extractValue,i=e.valueField,r=e.delimiter,s=e.resetValue,p=e.multiple,l=e.formItem;if(l){var d=l.getSelectedOptions(t),u=d.length===l.filteredOptions.length?[]:l.filteredOptions.concat(),c="";p?(c=u,n?c=c.map(function(e){return e[i||"value"]}).join(r):a&&(c=c.map(function(e){return e[i||"value"]}))):(c=u[0]||s,n&&c&&(c=c[i||"value"])),o&&o(c)}},a.prototype.reload=function(){return this.reloadOptions()},a.prototype.reloadOptions=function(e){var t=this.props,o=t.source,n=t.formItem,a=t.data,i=t.onChange;if(n&&c.isPureVariable(o))return void n.setOptions(m.normalizeOptions(c.resolveVariableAndFilter(o,a,"| raw")||[]));if(n&&r.isEffectiveApi(o,a))return n.loadOptions(o,a,void 0,!1,i,e)},a.prototype.deferLoad=function(e){var t=this.props,o=t.deferApi,n=t.source,a=t.env,i=t.formItem,r=t.data;if(!e.loaded){var s=e.deferApi||o||n;return s?void(null===i||vo
|
|||
|
;/*!src/components/Checkbox.tsx*/
|
|||
|
amis.define("0a43d97",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Checkbox=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=e("256b65d"),d=e("9a80175"),u=function(e){return e.stopPropagation()},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a.__extends(t,e),t.prototype.handleCheck=function(e){var t=this.props,a=t.trueValue,n=t.falseValue,l=t.onChange;l&&l(e.currentTarget.checked?a:n)},t.prototype.render=function(){var e,t=this.props,a=t.size,l=t.className,d=t.classnames,o=t.value,r=t.label,c=t.partial,s=t.trueValue,i=t.children,p=t.disabled,f=t.description,h=t.readOnly,m=t.checked,b=t.type,y=t.name,C=t.labelClassName;return n.default.createElement("label",{className:d("Checkbox Checkbox--"+b,l,(e={"Checkbox--full":!c},e["Checkbox--"+a]=a,e))},n.default.createElement("input",{type:b,checked:"undefined"!=typeof m?m:"undefined"==typeof o?o:o==s,onChange:this.handleCheck,onClick:u,disabled:p,readOnly:h,name:y}),n.default.createElement("i",null),n.default.createElement("span",{className:d(C)},i||r),f?n.default.createElement("div",{className:d("Checkbox-desc")},f):null)};var l;return t.defaultProps={trueValue:!0,falseValue:!1,type:"checkbox"},a.__decorate([d.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(l="undefined"!=typeof n.default&&n.default.ChangeEvent)?l:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleCheck",null),t}(n.default.Component);t.Checkbox=o,t.default=l.themeable(o)});
|
|||
|
;/*!src/components/Input.tsx*/
|
|||
|
amis.define("4ee46ff",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),a=e("9a80175"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isOnComposition=!1,t.state={value:t.props.value},t}n.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.value!==e.value&&this.setState({value:e.value})},t.prototype.handleComposition=function(e){this.isOnComposition="compositionend"!==e.type,this.isOnComposition||this.handleChange(e)},t.prototype.handleChange=function(e){var t=this.props.onChange,n=e.currentTarget.value;this.isOnComposition||t&&t(e),this.setState({value:n})},t.prototype.render=function(){var e=this.props,t=e.forwardedRef,a=n.__rest(e,["forwardedRef"]);return o.default.createElement("input",n.__assign({type:"text"},a,{value:this.state.value,ref:t,onChange:this.handleChange,onCompositionStart:this.handleComposition,onCompositionUpdate:this.handleComposition,onCompositionEnd:this.handleComposition}))};var i,s;return n.__decorate([a.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(i="undefined"!=typeof o.default&&o.default.CompositionEvent)?i:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleComposition",null),n.__decorate([a.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(s="undefined"!=typeof o.default&&o.default.ChangeEvent)?s:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),t}(o.default.Component);t.default=o.default.forwardRef(function(e,t){return o.default.createElement(i,n.__assign({},e,{forwardedRef:t}))})});
|
|||
|
;/*!src/components/Spinner.tsx*/
|
|||
|
amis.define("acad559",function(e,n){"use strict";var t;Object.defineProperty(n,"__esModule",{value:!0}),n.Spinner=void 0;var r=e("node_modules/tslib/tslib"),a=r.__importDefault(e("node_modules/react/index")),i=e("256b65d"),l=r.__importStar(e("node_modules/react-transition-group/Transition")),o=e("b7bbd16"),u=(t={},t[l.ENTERING]="in",t[l.ENTERED]="in",t),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.div=a.default.createRef(),n.overlay=a.default.createRef(),n}return r.__extends(n,e),n.prototype.render=function(){var e=this,n=this.props,t=n.show,r=n.classnames,i=n.spinnerClassName,s=n.mode,d=n.size,c=n.overlay,f=n.icon;return a.default.createElement(l.default,{mountOnEnter:!0,unmountOnExit:!0,"in":t,timeout:350},function(n){var t;return n===l.ENTERING&&e.overlay.current&&e.overlay.current.offsetWidth,a.default.createElement(a.default.Fragment,null,c?a.default.createElement("div",{ref:e.overlay,className:r("Spinner-overlay",u[n])}):null,a.default.createElement("div",{ref:e.div,className:r("Spinner",i,u[n],(t={},t["Spinner--"+s]=s,t["Spinner--overlay"]=c,t["Spinner--"+d]=d,t["Spinner--icon"]=f,t))},f?a.default.createElement(o.Icon,{icon:f,className:"icon"}):null))})},n.defaultProps={overlay:!1,spinnerClassName:"",mode:"",size:"",show:!0},n}(a.default.Component);n.Spinner=s,n.default=i.themeable(s)});
|
|||
|
;/*!src/components/Select.tsx*/
|
|||
|
amis.define("d57879c",function(e,t){"use strict";function n(e,t){if(t.multi||t.multiple){if("string"==typeof e&&(e=e.split(t.delimiter||",")),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return a(e,t.options,t.valueField)}).filter(function(e){return e})}Array.isArray(e)&&(e=e[0]);var n=a(e,t.options,t.valueField);return n?[n]:[]}function a(e,t,n){var a;void 0===n&&(n="value");var l=typeof e;return"string"!==l&&"number"!==l&&"boolean"!==l&&"object"!==l?e:t?("object"===l&&e&&e.hasOwnProperty(n||"value")&&(e=null!==(a=e[n||"value"])&&void 0!==a?a:""),g.findTree(t,i(e,n||"value"))):null}function l(e,t,n){return void 0===n&&(n="value"),g.isObject(e)?e===t[n||"value"]:String(t[n||"value"])===String(e)}function i(e,t){return void 0===t&&(t="value"),function(n){return l(e,n,t)}}function o(e,t){return void 0===t&&(t={values:[],options:[]}),"string"==typeof e?e.split(",").map(function(e){var n=t.values.indexOf(e);if(~n)return t.options[n];var a={label:e,value:e};return t.values.push(a.value),t.options.push(a),a}):Array.isArray(e)&&"string"==typeof e[0]?e.map(function(e){var n=t.values.indexOf(e);if(~n)return t.options[n];var a={label:e,value:e};return t.values.push(a.value),t.options.push(a),a}):Array.isArray(e)?e.map(function(e){var n=e&&e.value,a=void 0!==n?t.values.indexOf(n):-1;if(~a)return t.options[a];var l=s.__assign(s.__assign({},e),{value:n});return"undefined"!=typeof l.children?l.children=o(l.children,t):void 0!==n&&(t.values.push(n),t.options.push(l)),l}):v.default(e)?Object.keys(e).map(function(n){var a=t.values.indexOf(n);if(~a)return t.options[a];var l={label:e[n],value:n};return t.values.push(l.value),t.options.push(l),l}):[]}Object.defineProperty(t,"__esModule",{value:!0}),t.Select=t.normalizeOptions=t.optionValueCompare=t.matchOptionValue=t.expandValue=t.value2array=void 0;var s=e("node_modules/tslib/tslib"),r=e("node_modules/uncontrollable/cjs/index"),u=s.__importDefault(e("node_modules/react/index")),c=s.__importDefault(e("df63c13")),d=s.__importDefault(e("997df41")),p=s.__importDefault(e("2b3dcdf")),h=s.__importDefault(e("node_modules/downshift/dist/downshift.cjs")),f=e("b7bbd16"),m=s.__importDefault(e("node_modules/match-sorter/dist/match-sorter.cjs")),g=e("9a80175"),v=s.__importDefault(e("node_modules/lodash/isPlainObject")),b=s.__importDefault(e("node_modules/lodash/union")),y=e("b86428a"),_=e("node_modules/react-dom/index"),C=e("256b65d"),k=s.__importDefault(e("0a43d97")),S=s.__importDefault(e("4ee46ff")),O=e("5ab4e9d"),E=s.__importDefault(e("acad559"));t.value2array=n,t.expandValue=a,t.matchOptionValue=l,t.optionValueCompare=i,t.normalizeOptions=o;var x=h.default.stateChangeTypes,A=function(e){function t(t){var a=e.call(this,t)||this;return a.menu=u.default.createRef(),a.open=a.open.bind(a),a.close=a.close.bind(a),a.toggle=a.toggle.bind(a),a.onBlur=a.onBlur.bind(a),a.onFocus=a.onFocus.bind(a),a.focus=a.focus.bind(a),a.inputRef=a.inputRef.bind(a),a.handleChange=a.handleChange.bind(a),a.handleInputChange=a.handleInputChange.bind(a),a.clearValue=a.clearValue.bind(a),a.handleStateChange=a.handleStateChange.bind(a),a.handleKeyPress=a.handleKeyPress.bind(a),a.getTarget=a.getTarget.bind(a),a.toggleCheckAll=a.toggleCheckAll.bind(a),a.handleAddClick=a.handleAddClick.bind(a),a.handleEditClick=a.handleEditClick.bind(a),a.handleDeleteClick=a.handleDeleteClick.bind(a),a.state={isOpen:t.defaultOpen||!1,isFocused:!1,inputValue:"",highlightedIndex:-1,selection:n(t.value,t),itemHeight:35},a}return s.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.loadOptions,n=e.options,a=e.multiple,l=e.defaultCheckAll,i=e.onChange,o=e.simpleValue,s=this.state.selection;a&&l&&n.length&&(s=b.default(n,s),this.setState({selection:s}),i(o?s.map(function(e){return e.value}):s)),t&&t("")},t.prototype.componentDidUpdate=function(e){var t=this.props,a=g.noop;if(t.value!==e.value||JSON.stringify(t.options)!==JSON.stringify(e.options)){var l;if(e.options&&e.options.length||!t.options.length)l=n(t.value,t);else{var i=this.state.selection,o=t.multiple,s=t.defaultCheckAll,r=t.options,
|
|||
|
;/*!src/store/formItem.ts*/
|
|||
|
amis.define("4ad5d54",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormItemStore=void 0;var n=e("node_modules/tslib/tslib"),i=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),a=e("943464a"),o=e("3fbfd93"),r=e("6a2dbb7"),l=n.__importDefault(e("node_modules/lodash/findIndex")),s=e("9a80175"),u=e("9a80175"),d=e("d57879c"),f=n.__importDefault(e("node_modules/lodash/find")),p=e("398dbab"),c=i.types.model("ErrorDetail",{msg:"",tag:""});t.FormItemStore=i.types.model("FormItemStore",{identifier:i.types.identifier,isFocused:!1,type:"",unique:!1,loading:!1,required:!1,rules:i.types.optional(i.types.frozen(),{}),messages:i.types.optional(i.types.frozen(),{}),errorData:i.types.optional(i.types.array(c),[]),name:i.types.string,id:"",unsetValueOnInvisible:!1,validated:!1,validating:!1,multiple:!1,delimiter:",",valueField:"value",labelField:"label",joinValues:!0,extractValue:!1,options:i.types.optional(i.types.array(i.types.frozen()),[]),expressionsInOptions:!1,selectedOptions:i.types.optional(i.types.frozen(),[]),filteredOptions:i.types.optional(i.types.frozen(),[]),dialogSchema:i.types.frozen(),dialogOpen:!1,dialogData:i.types.frozen()}).views(function(e){function t(){return i.hasParent(e,2)?i.getParent(e,2):null}function n(){return t()?t().getValueByName(e.name):void 0}function a(){return e.selectedOptions.length?e.selectedOptions[e.selectedOptions.length-1].value:""}function o(){return e.errorData.map(function(e){return e.msg})}return{get form(){return t()},get value(){return n()},get prinstine(){return i.getParent(e,2).getPristineValueByName(e.name)},get errors(){return o()},get valid(){var e=o();return!(e&&e.length)},get lastSelectValue(){return a()},getSelectedOptions:function(t){if(void 0===t&&(t=n()),"undefined"==typeof t)return[];var i=Array.isArray(t)?t:"string"==typeof t?t.split(e.delimiter||","):[t],a=i.map(function(t){return t&&t.hasOwnProperty(e.valueField||"value")?t[e.valueField||"value"]:t}),o=[];return a.forEach(function(t,n){var a,r,l=s.findTree(e.filteredOptions,d.optionValueCompare(t,e.valueField||"value"));if(l)o.push(l);else{var u=i&&i[n]||t;!u||"string"!=typeof u&&"number"!=typeof u?u&&e.extractValue&&(r={},r[e.valueField||"value"]=t,r[e.labelField||"label"]="UnKnown",r.__unmatched=!0,u=r):(a={},a[e.valueField||"value"]=t,a[e.labelField||"label"]=t,a.__unmatched=!0,u=a),u&&o.push(u)}}),o},get __(){return i.isAlive(e)&&i.getRoot(e)&&"RendererStore"===i.getRoot(e).storeType?i.getRoot(e).__:function(e){return e}}}}).actions(function(e){function t(t){var i=t.required,o=t.unique,r=t.value,l=t.rules,u=t.messages,d=t.delimiter,f=t.multiple,p=t.valueField,c=t.labelField,v=t.joinValues,g=t.extractValue,m=t.type,y=t.id;"string"==typeof l&&(l=a.str2rules(l)),"undefined"!=typeof m&&(e.type=m),"undefined"!=typeof y&&(e.id=y),"undefined"!=typeof u&&(e.messages=u),"undefined"!=typeof i&&(e.required=!!i),"undefined"!=typeof o&&(e.unique=!!o),"undefined"!=typeof f&&(e.multiple=!!f),"undefined"!=typeof v&&(e.joinValues=!!v),"undefined"!=typeof g&&(e.extractValue=!!g),"undefined"!=typeof d&&(e.delimiter=d||","),"undefined"!=typeof p&&(e.valueField=p||"value"),"undefined"!=typeof c&&(e.labelField=c||"label"),l=l||{},l=n.__assign(n.__assign({},l),{isRequired:e.required}),s.isObjectShallowModified(l,e.rules)&&(e.rules=l,b("bultin"),e.validated=!1),void 0!==r&&void 0===e.value&&x.setValueByName(e.name,r,!0)}function c(){e.isFocused=!0}function v(){e.isFocused=!1}function g(t,n){void 0===n&&(n=!1),"undefined"==typeof t||"__undefined"===t?e.form.deleteValueByName(e.name):e.form.setValueByName(e.name,t,n)}function m(e,t){void 0===t&&(t="bultin"),b(),y(e,t)}function y(t,n){void 0===n&&(n="bultin");var i=Array.isArray(t)?t:[t];i.forEach(function(t){return e.errorData.push({msg:t,tag:n})})}function b(t){if(t){var n=e.errorData.filter(function(e){return e.tag!==t});e.errorData.replace(n)}else e.errorData.clear()}function _(t){if(Array.isArray(t)){t=t.filter(function(e){return e});var n=e.options.concat();t.length?e.options.replace(t):e.options.clear(),h(n)}}function h(t){var i;if(!e.options.length&&"u
|
|||
|
;/*!src/store/form.ts*/
|
|||
|
amis.define("956950c",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFormItemStore=t.FormStore=void 0;var r=e("node_modules/tslib/tslib"),a=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),n=r.__importDefault(e("node_modules/lodash/debounce")),i=e("57d76d7"),s=e("4ad5d54");Object.defineProperty(t,"IFormItemStore",{enumerable:!0,get:function(){return s.IFormItemStore}});var o=e("bc87d08"),c=e("9a80175"),u=r.__importDefault(e("node_modules/lodash/isEqual"));t.FormStore=i.ServiceStore.named("FormStore").props({inited:!1,validated:!1,submited:!1,submiting:!1,validating:!1,items:a.types.optional(a.types.array(a.types.late(function(){return s.FormItemStore})),[]),canAccessSuperData:!0,persistData:!1}).views(function(e){return{get loading(){return e.saving||e.fetching},get errors(){var t={};return e.items.forEach(function(e){e.valid||(t[e.name]=Array.isArray(t[e.name])?t[e.name].concat(e.errors):e.errors.concat())}),t},getValueByName:function(t){return c.getVariable(e.data,t,e.canAccessSuperData)},getPristineValueByName:function(t){return c.getVariable(e.pristine,t)},getItemById:function(t){return e.items.find(function(e){return e.id===t})},getItemByName:function(t){return e.items.find(function(e){return e.name===t})},getItemsByName:function(t){return e.items.filter(function(e){return e.name===t})},get valid(){return e.items.every(function(e){return e.valid})},get isPristine(){return u.default(e.pristine,e.data)}}}).actions(function(e){function t(t,r,a){e.updateData(t,r,a),e.items.forEach(function(e){return e.reset()}),h()}function i(t,a,n,i){void 0===n&&(n=!1),void 0===i&&(i=!1);var s=c.getVariable(e.data,t,!1),o=e.data,u=c.cloneObject(e.data);if(a!==s)if(o.__prev){var l=c.cloneObject(o.__prev);c.setVariable(l,t,s),Object.defineProperty(u,"__prev",{value:l,enumerable:!1,configurable:!1,writable:!1})}else Object.defineProperty(u,"__prev",{value:r.__assign({},o),enumerable:!1,configurable:!1,writable:!1});else if(!i)return;if(c.setVariable(u,t,a),n){var f=c.cloneObject(e.pristine);c.setVariable(f,t,a),e.pristine=f}u.__pristine||Object.defineProperty(u,"__pristine",{value:e.pristine,enumerable:!1,configurable:!1,writable:!1}),e.data=u,e.persistData&&w(),h()}function s(t){var a=e.data,n=c.cloneObject(e.data);if(a.__prev){var i=c.cloneObject(a.__prev);c.setVariable(i,t,c.getVariable(a,t)),Object.defineProperty(n,"__prev",{value:i,enumerable:!1,configurable:!1,writable:!1})}else Object.defineProperty(n,"__prev",{value:r.__assign({},a),enumerable:!1,configurable:!1,writable:!1});c.deleteVariable(n,t),e.data=n}function u(){var t=c.mapObject(e.data,function(e){return"string"==typeof e?e.trim():e});e.updateData(t)}function l(){var t=e.items.concat();t.forEach(function(e){return e.reset()})}function f(t,r){void 0===r&&(r=!0),r&&(e.data=e.pristine),e.validated=!1,e.submited=!1,e.items.forEach(function(e){return e.reset()}),t&&t(e.data)}function d(t,r){var a;return e.items.push({identifier:c.guid(),name:t}),a=e.items[e.items.length-1],i(a.name,a.value,!1,!1),r&&a.config(r),a}function m(e){a.detach(e)}function g(){if(e.parentStore&&"ComboStore"===e.parentStore.storeType){var t=e.parentStore;e.items.forEach(function(e){e.unique&&t.unBindUniuqueItem(e)}),t.removeForm(e),t.forms.forEach(function(e){return e.items.forEach(function(e){return e.unique&&e.syncOptions()})})}e.items.forEach(function(e){return a.detach(e)})}function b(t){void 0===t&&(t=!0),e.canAccessSuperData=t}function p(t){e.inited=t}function v(){e.persistData=!0;var t=localStorage.getItem(location.pathname+e.path);t&&e.updateData(JSON.parse(t))}function _(){localStorage.removeItem(location.pathname+e.path)}var h=n.default(function(){return e.items.forEach(function(e){return e.syncOptions()})},250,{trailing:!0,leading:!1}),y=a.flow(function(n,i,s){var u,l,f,u,d,m;return void 0===s&&(s={}),r.__generator(this,function(g){switch(g.label){case 0:return g.trys.push([0,9,,10]),s=r.__assign({method:"post"},s),s&&s.beforeSend?(u=s.beforeSend(i),u&&u.then?[4,u]:[3,2]):[3,3];case 1:u=g.sent(),g.label=2;case 2:if(u===!1)return[2];g.label=3;case 3:return
|
|||
|
;/*!src/store/combo.ts*/
|
|||
|
amis.define("3fbfd93",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ComboStore=n.UniqueGroup=void 0;var t=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),i=e("7820b08"),r=e("4ad5d54"),u=e("956950c");n.UniqueGroup=t.types.model("UniqueGroup",{name:t.types.identifier,items:t.types.array(t.types.reference(t.types.late(function(){return r.FormItemStore})))}),n.ComboStore=i.iRendererStore.named("ComboStore").props({uniques:t.types.map(n.UniqueGroup),forms:t.types.array(t.types.reference(t.types.late(function(){return u.FormStore}))),minLength:0,maxLength:0,length:0,activeKey:0}).views(function(e){return{get addable(){if(e.maxLength&&e.length>=e.maxLength)return!1;if(e.uniques.size){var n=!1;if(e.uniques.forEach(function(e){if(!n&&e.items.length){var t=e.items[0].options.length,i=e.items.reduce(function(e,n){return e+n.selectedOptions.length},0);n=t&&i>=t?!0:!1}}),n)return!1}return!0},get removable(){return e.minLength&&e.minLength>=e.length?!1:!0}}}).actions(function(e){function n(n){"undefined"!=typeof n.minLength&&(e.minLength=parseInt(n.minLength,10)),"undefined"!=typeof n.maxLength&&(e.maxLength=parseInt(n.maxLength,10)),"undefined"!=typeof n.length&&(e.length=n.length)}function t(n){e.uniques.has(n.name)||e.uniques.put({name:n.name});var t=e.uniques.get(n.name);t.items.push(n)}function i(n){var t=e.uniques.get(n.name);t.items.remove(n),t.items.length||e.uniques.delete(n.name)}function r(n){e.forms.push(n)}function u(n){e.forms.includes(n)&&e.forms.remove(n)}function o(n){e.activeKey=n}return{config:n,setActiveKey:o,bindUniuqueItem:t,unBindUniuqueItem:i,addForm:r,removeForm:u}})});
|
|||
|
;/*!src/store/crud.ts*/
|
|||
|
amis.define("7b0821e",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRUDStore=void 0;var a=e("node_modules/tslib/tslib"),r=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),s=e("57d76d7"),o=e("9a80175"),n=a.__importDefault(e("node_modules/lodash/pick")),i=e("f2e345e"),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="ServerError",t}return a.__extends(t,e),t}(Error);t.CRUDStore=s.ServiceStore.named("CRUDStore").props({pristineQuery:r.types.optional(r.types.frozen(),{}),query:r.types.optional(r.types.frozen(),{}),prevPage:1,page:1,perPage:10,total:0,mode:"normal",hasNext:!1,selectedAction:r.types.frozen(),items:r.types.optional(r.types.array(r.types.frozen()),[]),selectedItems:r.types.optional(r.types.array(r.types.frozen()),[]),unSelectedItems:r.types.optional(r.types.array(r.types.frozen()),[]),filterTogggable:!1,filterVisible:!0,hasInnerModalOpen:!1}).views(function(e){return{get lastPage(){return Math.max(Math.ceil(e.total/(e.perPage<1?10:e.perPage)),1)},get filterData(){return o.createObject(e.data,a.__assign({},e.query))},get mergedData(){return o.extendObject(e.data,a.__assign(a.__assign(a.__assign({},e.query),e.data),{selectedItems:e.selectedItems,unSelectedItems:e.unSelectedItems}))},get hasModalOpened(){return e.dialogOpen||e.drawerOpen||e.hasInnerModalOpen},get selectedItemsAsArray(){return e.selectedItems.concat()}}}).actions(function(e){function t(){e.pristineQuery=e.query}function s(t,r,s,n,i){void 0===s&&(s="page"),void 0===n&&(n="perPage"),void 0===i&&(i=!1);var c=e.query;e.query=i?a.__assign({},t):a.__assign(a.__assign({},e.query),t),e.query[s||"page"]&&(e.page=parseInt(e.query[s||"page"],10)),e.query[n||"perPage"]&&(e.perPage=parseInt(e.query[n||"perPage"],10)),r&&o.isObjectShallowModified(c,e.query,!1)&&setTimeout(r.bind(null,"?"+o.qsstringify(e.query)),4)}function u(t,a){e.page=t,a&&(e.perPage=a)}function l(t){e.selectedAction=t}var g=null,d=r.flow(function(t,c,u){var l,d,p,m,y,f,_,b,v,h,w,I,D,l,P,q,d,O,A,R;return void 0===u&&(u={}),a.__generator(this,function(S){switch(S.label){case 0:return S.trys.push([0,2,,3]),!u.forceReload&&u.loadDataOnce&&e.total?(l=u.source?i.resolveVariableAndFilter(u.source,o.createObject(e.mergedData,{items:e.data.itemsRaw,rows:e.data.itemsRaw}),"| raw"):e.items.concat(),e.query.orderBy&&(d=/desc/i.test(e.query.orderDir)?-1:1,l=o.sortArray(l,e.query.orderBy,d)),p=a.__assign(a.__assign({},e.data),{total:l.length,items:l.slice((e.page-1)*e.perPage,e.page*e.perPage)}),e.total=parseInt(p.total||p.count,10)||0,e.reInitData(p),[2]):(g&&(g(),g=null,e.fetching=!1),u.silent||e.markFetching(!0),m=o.createObject(e.data,a.__assign(a.__assign(a.__assign({},e.query),(R={},R[u.pageField||"page"]=e.page,R[u.perPageField||"perPage"]=e.perPage,R)),c)),u.loadDataOnce&&delete m[u.perPageField||"perPage"],[4,r.getRoot(e).fetcher(t,m,a.__assign(a.__assign({},u),{cancelExecutor:function(e){return g=e}}))]);case 1:if(y=S.sent(),g=null,y.ok){if(!y.data)throw new Error(e.__("返回数据格式不正确,payload.data 没有数据"));if(e.updatedAt=Date.now(),f=y.data,Array.isArray(f)&&(f={items:f}),_=f.total,b=f.count,v=f.page,h=f.hasNext,w=f.items,I=f.rows,D=a.__rest(f,["total","count","page","hasNext","items","rows"]),l=void 0,l=u.source?i.resolveVariableAndFilter(u.source,o.createObject(e.filterData,f),"| raw"):f.items||f.rows,!Array.isArray(l))throw new Error(e.__("返回数据格式不正确,payload.data.items 必须是数组"));l.map(function(e){return"string"==typeof e?{text:e}:e}),P=[],P=u.loadDataMode&&Array.isArray(e.data.items)?e.data.items.concat(l):l,q=a.__assign(a.__assign(a.__assign({},t.replaceData?{}:e.pristine),{items:P,count:b,total:_}),D),u.loadDataOnce&&(q.itemsRaw=w||I,e.query.orderBy&&(d=/desc/i.test(e.query.orderDir)?-1:1,P=o.sortArray(P,e.query.orderBy,d)),q.items=P.slice((e.page-1)*e.perPage,e.page*e.perPage),q.count=q.total=P.length),e.items.replace(P),e.reInitData(q,!!t.replaceData),u.syncResponse2Query!==!1&&s(n.default(D,Object.keys(e.query)),void 0,u.pageField||"page",u.perPageField||"perPage")
|
|||
|
;/*!src/store/table.ts*/
|
|||
|
amis.define("4fbfbc8",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableStore=t.Row=t.Column=void 0;var n=e("node_modules/tslib/tslib"),r=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),o=e("7820b08"),i=e("f2e345e"),a=n.__importDefault(e("node_modules/lodash/isEqual")),l=n.__importDefault(e("node_modules/lodash/find")),c=e("9a80175"),d=e("6a2dbb7");t.Column=r.types.model("Column",{label:r.types.optional(r.types.frozen(),void 0),type:r.types.string,name:r.types.maybe(r.types.string),value:r.types.frozen(),groupName:"",toggled:!1,toggable:!0,expandable:!1,isPrimary:!1,searchable:r.types.maybe(r.types.frozen()),sortable:!1,filterable:r.types.optional(r.types.frozen(),void 0),fixed:"",index:0,rawIndex:0,breakpoint:r.types.optional(r.types.frozen(),void 0),pristine:r.types.optional(r.types.frozen(),void 0),remark:r.types.optional(r.types.frozen(),void 0),className:""}).actions(function(e){return{toggleToggle:function(){e.toggled=!e.toggled;var t=r.getParent(e,2);t.activeToggaleColumns.length||(e.toggled=!0),t.persistSaveToggledColumns()},setToggled:function(t){e.toggled=t}}}),t.Row=r.types.model("Row",{id:r.types.identifier,parentId:"",key:r.types.string,pristine:r.types.frozen({}),data:r.types.frozen({}),rowSpans:r.types.frozen({}),index:r.types.number,newIndex:r.types.number,expandable:!1,isHover:!1,children:r.types.optional(r.types.array(r.types.late(function(){return t.Row})),[]),depth:r.types.number}).views(function(e){return{get checked(){return r.getParent(e,2*e.depth).isSelected(e)},get modified(){return e.data?Object.keys(e.data).some(function(t){return!a.default(e.data[t],e.pristine[t])}):!1},getDataWithModifiedChilden:function(){var t=n.__assign({},e.data);return t.children&&e.children&&(t.children=e.children.map(function(e){return e.getDataWithModifiedChilden()})),t},get expanded(){return r.getParent(e,2*e.depth).isExpanded(e)},get moved(){return e.index!==e.newIndex},get locals(){return c.createObject(c.extendObject(r.getParent(e,2*e.depth).data,{index:e.index}),e.data)},get checkable(){var t=r.getParent(e,2*e.depth);return t&&t.itemCheckableOn?d.evalExpression(t.itemCheckableOn,e.locals):!0},get draggable(){var t=r.getParent(e,2*e.depth);return t&&t.itemDraggableOn?d.evalExpression(t.itemDraggableOn,e.locals):!0}}}).actions(function(e){return{toggle:function(){r.getParent(e,2*e.depth).toggle(e)},toggleExpanded:function(){r.getParent(e,2*e.depth).toggleExpanded(e)},change:function(t,n){e.data=c.immutableExtends(e.data,t),n&&(e.pristine=e.data)},reset:function(){e.newIndex=e.index,e.data=e.pristine},setIsHover:function(t){e.isHover=t}}}),t.TableStore=o.iRendererStore.named("TableStore").props({columns:r.types.array(t.Column),rows:r.types.array(t.Row),selectedRows:r.types.array(r.types.reference(t.Row)),expandedRows:r.types.array(r.types.reference(t.Row)),primaryField:"id",orderBy:"",orderDir:r.types.optional(r.types.union(r.types.literal("asc"),r.types.literal("desc")),"asc"),draggable:!1,dragging:!1,selectable:!1,multiple:!0,footable:r.types.frozen(),expandConfig:r.types.frozen(),isNested:!1,columnsTogglable:r.types.optional(r.types.union(r.types.boolean,r.types.literal("auto")),"auto"),itemCheckableOn:"",itemDraggableOn:"",hideCheckToggler:!1,combineNum:0}).views(function(e){function t(){return e.columns.filter(function(t){return c.isVisible(t.pristine,e.data)&&("__checkme"===t.type?e.selectable&&!e.dragging&&!e.hideCheckToggler&&e.rows.length:"__dragme"===t.type?e.dragging:"__expandme"===t.type?(n().length||e.isNested)&&!e.dragging:!(!t.toggled&&t.toggable||e.footable&&t.breakpoint&&c.isBreakpoint(t.breakpoint)))})}function n(){return e.columns.filter(function(t){return"__checkme"===t.type||"__dragme"===t.type||"__expandme"===t.type?!1:(t.toggled||!t.toggable)&&e.footable&&t.breakpoint&&c.isBreakpoint(t.breakpoint)})}function r(){if(e.dragging)return[];var n=t().filter(function(e){return"left"===e.fixed});return n.length&&(n=t().filter(function(e){return"left"===e.fixed||/^__/.test(e.type)})),n}function o(){return e.dragging?[]:t().filter(function(e){return"right"===e.fi
|
|||
|
;/*!src/store/list.ts*/
|
|||
|
amis.define("4e9b495",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListStore=t.Item=void 0;var n=e("node_modules/tslib/tslib"),i=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),r=e("7820b08"),c=n.__importDefault(e("node_modules/lodash/isEqual")),a=n.__importDefault(e("node_modules/lodash/find")),l=e("9a80175"),o=e("6a2dbb7");t.Item=i.types.model("Item",{id:i.types.identifier,pristine:i.types.frozen(),data:i.types.frozen(),index:i.types.number,newIndex:i.types.number}).views(function(e){return{get checked(){return i.getParent(e,2).isSelected(e)},get modified(){return e.data?Object.keys(e.data).some(function(t){return!c.default(e.data[t],e.pristine[t])}):!1},get moved(){return e.index!==e.newIndex},get locals(){return l.createObject(l.extendObject(i.getParent(e,2).data,{index:e.index}),e.data)},get checkable(){var t=i.getParent(e,2);return t&&t.itemCheckableOn?o.evalExpression(t.itemCheckableOn,e.locals):!0},get draggable(){var t=i.getParent(e,2);return t&&t.itemDraggableOn?o.evalExpression(t.itemDraggableOn,e.locals):!0}}}).actions(function(e){return{toggle:function(){i.getParent(e,2).toggle(e)},change:function(t,n){e.data=l.immutableExtends(e.data,t),n&&(e.pristine=e.data)},reset:function(){e.newIndex=e.index,e.data=e.pristine}}}),t.ListStore=r.iRendererStore.named("ListStore").props({items:i.types.array(t.Item),selectedItems:i.types.array(i.types.reference(t.Item)),primaryField:"id",orderBy:"",orderDir:i.types.optional(i.types.union(i.types.literal("asc"),i.types.literal("desc")),"asc"),draggable:!1,dragging:!1,multiple:!0,selectable:!1,itemCheckableOn:"",itemDraggableOn:"",hideCheckToggler:!1}).views(function(e){function t(t){return!!~e.selectedItems.indexOf(t)}function n(){return e.items.filter(function(e){return e.modified})}function i(){return n().length}function r(){return e.items.filter(function(e){return e.moved})}function c(){return r().length}return{get allChecked(){return!(e.selectedItems.length!==e.checkableItems.length||!e.checkableItems.length)},get checkableItems(){return e.items.filter(function(e){return e.checkable})},get unSelectedItems(){return e.items.filter(function(e){return!e.checked})},isSelected:t,get modified(){return i()},get modifiedItems(){return n()},get moved(){return c()},get movedItems(){return r()}}}).actions(function(e){function t(t){void 0===t.selectable||(e.selectable=t.selectable),void 0===t.draggable||(e.draggable=t.draggable),void 0===t.multiple||(e.multiple=t.multiple),void 0===t.hideCheckToggler||(e.hideCheckToggler=t.hideCheckToggler),"undefined"!=typeof t.orderBy&&s(t.orderBy,"desc"===t.orderDir?"desc":"asc"),void 0===t.itemCheckableOn||(e.itemCheckableOn=t.itemCheckableOn),void 0===t.itemDraggableOn||(e.itemDraggableOn=t.itemDraggableOn)}function n(t){var n=t.map(function(e,t){return e=l.isObject(e)?e:{item:e},{id:l.guid(),index:t,newIndex:t,pristine:e,data:e,modified:!1}});e.selectedItems.clear(),e.items.replace(n),e.dragging=!1}function i(t,n){e.selectedItems.clear(),e.items.forEach(function(i){~t.indexOf(i.pristine)?e.selectedItems.push(i):a.default(t,function(e){return e[n||"value"]==i.pristine[n||"value"]})&&e.selectedItems.push(i)})}function r(){e.allChecked?e.selectedItems.clear():e.selectedItems.replace(e.checkableItems)}function c(t){if(t.checkable){var n=e.selectedItems.indexOf(t);e.multiple?~n?e.selectedItems.splice(n,1):e.selectedItems.push(t):~n?e.selectedItems.splice(n,1):e.selectedItems.replace([t])}}function o(){e.selectedItems.clear()}function s(t,n){e.orderBy=t,e.orderDir=n}function d(){e.items.forEach(function(e){return e.reset()}),e.dragging=!1}function u(){e.dragging=!e.dragging}function g(){e.dragging=!1}function m(t,n){var i=e.items[t];i.newIndex=n;var r=e.items.slice();r.splice(t,1),r.splice(n,0,i),e.items.replace(r)}return{update:t,initItems:n,updateSelected:i,toggleAll:r,toggle:c,clear:o,setOrderByInfo:s,reset:d,toggleDragging:u,stopDragging:g,exchange:m}})});
|
|||
|
;/*!src/store/modal.ts*/
|
|||
|
amis.define("4550477",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalStore=void 0;var o=e("57d76d7"),r=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),n=e("9a80175");t.ModalStore=o.ServiceStore.named("ModalStore").props({form:r.types.frozen()}).views(function(e){return{get formData(){return n.createObject(e.data,e.form)}}}).actions(function(e){return{setFormData:function(t){e.form=t}}})});
|
|||
|
;/*!src/store/index.ts*/
|
|||
|
amis.define("448f42f",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterStore=t.IIRendererStore=t.iRendererStore=t.RendererStore=void 0;var r=e("node_modules/tslib/tslib"),n=e("node_modules/mobx-state-tree/dist/mobx-state-tree");e("node_modules/setimmediate/setImmediate");var o=e("7820b08");Object.defineProperty(t,"iRendererStore",{enumerable:!0,get:function(){return o.iRendererStore}}),Object.defineProperty(t,"IIRendererStore",{enumerable:!0,get:function(){return o.IIRendererStore}});var i=e("57d76d7"),s=e("3fbfd93"),d=e("956950c"),u=e("7b0821e"),c=e("4fbfbc8"),a=e("4e9b495"),f=e("4550477");n.setLivelynessChecking("ignore");var b=[i.ServiceStore,d.FormStore,s.ComboStore,u.CRUDStore,c.TableStore,a.ListStore,f.ModalStore];t.RendererStore=n.types.model("RendererStore",{storeType:"RendererStore",stores:n.types.map(n.types.union.apply(n.types,r.__spreadArrays([{eager:!1,dispatcher:function(e){for(var t=0,r=b;t<r.length;t++){var n=r[t];if(n.name===e.storeType)return n}return o.iRendererStore}},o.iRendererStore],b)))}).views(function(e){return{get fetcher(){return n.getEnv(e).fetcher},get notify(){return n.getEnv(e).notify},get isCancel(){return n.getEnv(e).isCancel},get __(){return n.getEnv(e).translate}}}).views(function(e){return{getStoreById:function(t){return e.stores.get(t)}}}).actions(function(e){return{addStore:function(t){if(e.stores.has(t.id))return e.stores.get(t.id);if(t.parentId){var r=e.stores.get(t.parentId);r.childrenIds.push(t.id)}return e.stores.put(t),e.stores.get(t.id)},removeStore:function(e){e.dispose()}}}),t.RegisterStore=function(e){b.push(e)}});
|
|||
|
;/*!src/utils/filter-schema.ts*/
|
|||
|
amis.define("01e2bb4",function(e,n){"use strict";function r(e,n,r){void 0===n&&(n={}),void 0===r&&(r=["addOn"]);var i={};return Object.getOwnPropertyNames(e).forEach(function(a){if(!r||!~r.indexOf(a)){var f=/^(.*)(On|Expr)$/.exec(a),o=e[a];o&&"string"==typeof o&&f&&("On"===f[2]||"Expr"===f[2])&&(a=f[1],("On"===f[2]||"Expr"===f[2])&&(o="On"===f[2]?t.evalExpression(o,n):t.filter(o,n)),i[a]=o)}}),i}Object.defineProperty(n,"__esModule",{value:!0});var t=e("6a2dbb7");n.default=r});
|
|||
|
;/*!src/Scoped.tsx*/
|
|||
|
amis.define("919cbd9",function(e,t){"use strict";function n(e,t,n){var r=[];return{parent:t,registerComponent:function(n){return n.props.$path===e&&t?t.registerComponent(n):void(~r.indexOf(n)||r.push(n))},unRegisterComponent:function(n){if(n.props.$path===e&&t)return t.unRegisterComponent(n);var o=r.indexOf(n);~o&&r.splice(o,1)},getComponentByName:function(e){if(~e.indexOf(".")){var n=e.split("."),o=n.length;return n.reduce(function(e,t,n){if(e&&e.getComponentByName){var r=e.getComponentByName(t);return r&&o-1>n?r.context:r}return null},this)}var i=a.default(r,function(t){return t.props.name===e||t.props.id===e});return i||t&&t.getComponentByName(e)},getComponents:function(){return r.concat()},reload:function(e,t){var n=this;if("window"===e)return location.reload();var o="string"==typeof e?e.split(/\s*,\s*/):e;o.forEach(function(e){var o=e.indexOf("?"),r=null;~o&&(r=c.dataMapping(u.default.parse(e.substring(o+1)),t),e=e.substring(0,o));var i=e.indexOf("."),s="";~i&&(s=e.substring(1+i),e=e.substring(0,i));var a=n.getComponentByName(e);a&&a.reload&&a.reload(s,r,t)})},send:function(e,t){var o=this,r="string"==typeof e?e.split(/\s*,\s*/):e;r.forEach(function(e){var r=e.indexOf("."),s="";~r&&(s=e.substring(1+r),e=e.substring(0,r));var a=o.getComponentByName(e);if(a&&a.receive)a.receive(t,s);else if("window"===e&&n&&n.updateLocation){var p=i.__assign(i.__assign({},location.search?u.default.parse(location.search.substring(1)):{}),t),c=location.pathname+"?"+d.qsstringify(p);n.updateLocation(c)}})},close:function(e){var t=this;"string"==typeof e&&e.split(/\s*,\s*/).map(function(e){return t.getComponentByName(e)}).filter(function(e){return e&&e.props.show}).forEach(o)}}}function o(e){e.context.getComponents().filter(function(e){return e&&("dialog"===e.props.type||"drawer"===e.props.type)&&e.props.show}).forEach(o),e.props.onClose&&e.props.onClose()}function r(e){var o=function(o){function r(){var e=null!==o&&o.apply(this,arguments)||this;return e.scoped=n(e.props.$path,e.context,e.props.env),e}return i.__extends(r,o),r.prototype.getWrappedInstance=function(){return this.ref},r.prototype.childRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.ref=e},r.prototype.componentWillMount=function(){var e=this.props.scopeRef;e&&e(this.scoped)},r.prototype.componentWillUnmount=function(){var e=this.props.scopeRef;e&&e(null)},r.prototype.render=function(){var n=this.props,o=(n.scopeRef,i.__rest(n,["scopeRef"]));return s.default.createElement(t.ScopedContext.Provider,{value:this.scoped},s.default.createElement(e,i.__assign({},o,{ref:this.childRef})))},r.displayName="Scoped("+(e.displayName||e.name)+")",r.contextType=t.ScopedContext,r.ComposedComponent=e,i.__decorate([d.autobind,i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],r.prototype,"childRef",null),r}(s.default.Component);return p.default(o,e),o}Object.defineProperty(t,"__esModule",{value:!0}),t.HocScoped=t.ScopedContext=void 0;var i=e("node_modules/tslib/tslib"),s=i.__importDefault(e("node_modules/react/index")),a=i.__importDefault(e("node_modules/lodash/find")),p=i.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),u=i.__importDefault(e("node_modules/qs/lib/index")),c=e("f2e345e"),d=e("9a80175");t.ScopedContext=s.default.createContext(n("")),t.HocScoped=r,t.default=r});
|
|||
|
;/*!src/components/Alert2.tsx*/
|
|||
|
amis.define("15e4197",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alert=void 0;var l=e("node_modules/tslib/tslib"),s=l.__importDefault(e("node_modules/react/index")),o=e("256b65d"),n=e("b7bbd16"),a=function(e){function t(t){var l=e.call(this,t)||this;return l.handleClick=l.handleClick.bind(l),l.state={show:!0},l}return l.__extends(t,e),t.prototype.handleClick=function(){this.setState({show:!1},this.props.onClose)},t.prototype.render=function(){var e=this.props,t=e.classnames,l=e.className,o=e.level,a=e.children,i=e.showCloseButton;return this.state.show?s.default.createElement("div",{className:t("Alert",o?"Alert--"+o:"",l)},i?s.default.createElement("button",{className:t("Alert-close"),onClick:this.handleClick,type:"button"},s.default.createElement(n.Icon,{icon:"close",className:"icon"})):null,a):null},t.defaultProps={level:"info",className:"",showCloseButton:!1},t.propsList=["level","className","showCloseButton","onClose"],t}(s.default.Component);t.Alert=a,t.default=o.themeable(a)});
|
|||
|
;/*!src/components/ImageGallery.tsx*/
|
|||
|
amis.define("1134c30",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageGallery=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=e("256b65d"),i=e("9a80175"),s=a.__importDefault(e("628f736")),d=e("b7bbd16"),r=e("5ab4e9d"),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isOpened:!1,index:-1,items:[]},t}a.__extends(t,e),t.prototype.handleImageEnlarge=function(e){this.setState({isOpened:!0,items:e.list?e.list:[e],index:e.index||0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.prev=function(){var e=this.state.index;this.setState({index:e-1})},t.prototype.next=function(){var e=this.state.index;this.setState({index:e+1})},t.prototype.handleItemClick=function(e){var t=parseInt(e.currentTarget.getAttribute("data-index"),10);this.setState({index:t})},t.prototype.render=function(){var e=this,t=this.props,a=t.children,l=t.classnames,i=t.modalContainer,r=this.state,o=r.index,c=r.items,m=this.props.translate;return n.default.createElement(n.default.Fragment,null,n.default.cloneElement(a,{onImageEnlarge:this.handleImageEnlarge}),n.default.createElement(s.default,{closeOnEsc:!0,size:"full",onHide:this.close,show:this.state.isOpened,contentClassName:l("ImageGallery"),container:i},n.default.createElement("a",{"data-tooltip":m("关闭"),"data-position":"left",className:l("ImageGallery-close"),onClick:this.close},n.default.createElement(d.Icon,{icon:"close",className:"icon"})),~o&&c[o]?n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{className:l("ImageGallery-title")},c[o].title),n.default.createElement("div",{className:l("ImageGallery-main")},n.default.createElement("img",{src:c[o].originalSrc}),c.length>1?n.default.createElement(n.default.Fragment,null,n.default.createElement("a",{className:l("ImageGallery-prevBtn",0>=o?"is-disabled":""),onClick:this.prev},n.default.createElement(d.Icon,{icon:"prev",className:"icon"})),n.default.createElement("a",{className:l("ImageGallery-nextBtn",o>=c.length-1?"is-disabled":""),onClick:this.next},n.default.createElement(d.Icon,{icon:"next",className:"icon"}))):null)):null,c.length>1?n.default.createElement("div",{className:l("ImageGallery-footer")},n.default.createElement("a",{className:l("ImageGallery-prevList is-disabled")},n.default.createElement(d.Icon,{icon:"prev",className:"icon"})),n.default.createElement("div",{className:l("ImageGallery-itemsWrap")},n.default.createElement("div",{className:l("ImageGallery-items")},c.map(function(t,a){return n.default.createElement("div",{key:a,"data-index":a,onClick:e.handleItemClick,className:l("ImageGallery-item",a===o?"is-active":"")},n.default.createElement("img",{src:t.src}))}))),n.default.createElement("a",{className:l("ImageGallery-nextList is-disabled")},n.default.createElement(d.Icon,{icon:"next",className:"icon"}))):null))};var l;return a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleImageEnlarge",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"close",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"prev",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"next",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(l="undefined"!=typeof n.default&&n.default.MouseEvent)?l:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleItemClick",null),t}(n.default.Component);t.ImageGallery=o,t.default=l.themeable(r.localeable(o))});
|
|||
|
;/*!src/factory.tsx*/
|
|||
|
amis.define("0f9ebdf",function(e,t){"use strict";function r(e){M.push(e)}function n(e,t,r){return M.reduce(function(e,n){return n(e,t,r)},e)}function a(e){return function(t){var r=s(v.__assign(v.__assign({},e),{component:t}));return r.component}}function s(e){if(!e.test)throw new TypeError("config.test is required");if(!e.component)throw new TypeError("config.component is required");if(e.weight=e.weight||0,e.Renderer=e.component,e.name=e.name||"anonymous-"+N++,~W.indexOf(e.name))throw new Error('The renderer with name "'+e.name+'" has already exists, please try another name!');e.storeType&&e.component&&(e.component=l({storeType:e.storeType,extendsData:e.storeExtendsData})(S.observer(e.component))),e.isolateScope&&(e.component=$.default(e.component));var t=C.findIndex(I,function(t){return e.weight<t.weight});return~t?I.splice(t,0,e):I.push(e),W.push(e.name),e}function o(e){var t="string"==typeof e?C.findIndex(I,function(t){return t.name===e}):I.indexOf(e);~t&&I.splice(t,1),G={}}function i(e,t,r){return Array.isArray(t)?t.map(function(t,n){return d(e+"/"+n,t,v.__assign(v.__assign({},r),{key:""+(r.key?r.key+"-":"")+n}))}):d(e,t,r)}function d(e,t,r){if(Array.isArray(t))return i(e,t,r);var n=typeof t,a="string"===n||"number"===n?{type:"tpl",tpl:String(t)}:t,s="&"===a.detectField?r:r[a.detectField||"data"],o=s?x.default(a,s):null;if(o&&(o.hidden||o.visible===!1||a.hidden||a.visible===!1||r.hidden||r.visible===!1))return null;var d=r.propsTransform;return d&&(delete r.propsTransform,r=d(r)),y.default.createElement(V,v.__assign({},r,o,{schema:a,$path:""+(e?e+"/":"")+(a&&a.type||"")}))}function l(e){return function(t){var r=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return v.__extends(n,r),n.prototype.getWrappedInstance=function(){return this.ref},n.prototype.refFn=function(e){this.ref=e},n.prototype.formatData=function(e){return Array.isArray(e)?{items:e}:e},n.prototype.componentWillMount=function(){var t=this.context;this.renderChild=this.renderChild.bind(this),this.refFn=this.refFn.bind(this);var r=this.store=t.addStore({id:C.guid(),path:this.props.$path,storeType:e.storeType,parentId:this.props.store?this.props.store.id:""});r.initData(e.extendsData===!1?C.createObject(this.props.data?this.props.data.__super:null,v.__assign(v.__assign({},this.formatData(this.props.defaultData)),this.formatData(this.props.data))):this.props.scope||this.props.data&&this.props.data.__super?this.props.store&&this.props.data===this.props.store.data?C.createObject(this.props.store.data,v.__assign({},this.formatData(this.props.defaultData))):C.createObject(this.props.data.__super||this.props.scope,v.__assign(v.__assign({},this.formatData(this.props.defaultData)),this.formatData(this.props.data))):v.__assign(v.__assign({},this.formatData(this.props.defaultData)),this.formatData(this.props.data)))},n.prototype.componentWillReceiveProps=function(t){var r=this.props,n=this.store;e.extendsData===!1?(r.defaultData!==t.defaultData||C.isObjectShallowModified(r.data,t.data)||t.data&&r.data&&t.data.__super!==r.data.__super)&&n.initData(C.extendObject(t.data,v.__assign(v.__assign(v.__assign({},n.hasRemoteData?n.data:null),this.formatData(t.defaultData)),this.formatData(t.data)))):C.isObjectShallowModified(r.data,t.data)?n.initData(t.store&&t.store.data===t.data?C.createObject(t.store.data,t.syncSuperStore===!1?v.__assign({},n.data):C.syncDataFromSuper(n.data,t.store.data,r.scope,n,t.syncSuperStore===!0)):t.data&&t.data.__super?C.extendObject(t.data):C.createObject(t.scope,t.data)):t.store&&t.data===t.store.data||!t.data||!t.data.__super?t.scope&&t.data===t.store.data&&r.data!==t.data&&n.initData(C.createObject(t.scope,v.__assign({},n.data))):(!r.data||C.isObjectShallowModified(t.data.__super,r.data.__super,!1))&&n.initData(C.createObject(t.data.__super,v.__assign(v.__assign({},t.data),n.data)))},n.prototype.componentWillUnmount=function(){var e=this.context,t=this.store;e.removeStore(t),delete this.store},n.prototype.renderChild=function(e,t,r){void 0===r&&(r={});var n=this.props.render;return n(e,t,v.__assign(v.__assign({data:thi
|
|||
|
;/*!src/components/Alert.tsx*/
|
|||
|
amis.define("bfe4ee0",function(t,e){"use strict";function n(t,e,n,o,i){return void 0===e&&(e={}),m.render({name:"form",type:"form",wrapWithPanel:!1,mode:"horizontal",controls:t,messages:{validateFailed:""}},{data:e,onFinished:n,scopeRef:o,theme:i},{session:"prompt"})}Object.defineProperty(e,"__esModule",{value:!0}),e.FinnalAlert=e.prompt=e.confirm=e.alert=e.Alert=void 0;var o=t("node_modules/tslib/tslib"),i=o.__importDefault(t("node_modules/react/index")),a=t("node_modules/react-dom/index"),l=o.__importDefault(t("628f736")),r=o.__importDefault(t("a67acca")),s=t("256b65d"),c=t("5ab4e9d"),d=o.__importDefault(t("580df19")),m=t("0f9ebdf"),f=function(t){function s(e){var n=t.call(this,e)||this;return n.state={show:!1,title:"",content:"",confirm:!1},n.close=n.close.bind(n),n.handleConfirm=n.handleConfirm.bind(n),n.handleCancel=n.handleCancel.bind(n),n.modalRef=n.modalRef.bind(n),n.handleFormSubmit=n.handleFormSubmit.bind(n),n.scopeRef=n.scopeRef.bind(n),n}return o.__extends(s,t),s.getInstance=function(){if(!s.instance){console.warn("Alert 组件应该没有被渲染,所以隐性的渲染到 body 了");var t=document.body,n=document.createElement("div");t.appendChild(n),a.render(i.default.createElement(e.FinnalAlert,null),n)}return s.instance},s.prototype.componentWillMount=function(){s.instance=this},s.prototype.componentDidMount=function(){this._body&&(this._body.innerHTML=this.state.content)},s.prototype.componentDidUpdate=function(t,e){e.content!==this.state.content&&this._body&&(this._body.innerHTML=this.state.content)},s.prototype.componentWillUnmount=function(){s.instance=null},s.prototype.scopeRef=function(t){this.schemaSope=t},s.prototype.handleConfirm=function(){var t,e=null===(t=this.schemaSope)||void 0===t?void 0:t.getComponentByName("form");e?e.doAction({type:"submit"}):this.close(!0)},s.prototype.handleCancel=function(){this.close(!1)},s.prototype.close=function(t){var e=this,n=this.state.confirm||this.state.prompt;this.setState({show:!1},n?function(){return e._resolve(t)}:void 0)},s.prototype.alert=function(t,e){this.setState({title:e,content:t,show:!0,confirm:!1})},s.prototype.confirm=function(t,e,n){var o=this;return this.setState({title:e,content:t,show:!0,confirm:!0,confirmText:n}),new Promise(function(t){o._resolve=t})},s.prototype.prompt=function(t,e,n,o){var i=this;return void 0===n&&(n="请输入"),void 0===o&&(o="确认"),"string"==typeof t?(t=[{name:"text",label:t,type:"text"}],"string"==typeof e&&(e={text:e})):Array.isArray(t)||(t=[t]),this.setState({title:n,controls:t,show:!0,prompt:!0,value:e,confirmText:o}),new Promise(function(t){i._resolve=t})},s.prototype.modalRef=function(t){this._modal=t},s.prototype.handleFormSubmit=function(t){this.close(t)},s.prototype.render=function(){var t,e,o=this.props,a=o.container,s=o.cancelText,c=o.confirmText,m=o.title,f=o.confirmBtnLevel,u=o.alertBtnLevel,p=o.classnames,h=o.theme,v=this.props.translate,y=v(null!==(t=this.state.title)&&void 0!==t?t:m),b=v(null!==(e=this.state.confirmText)&&void 0!==e?e:c);return i.default.createElement(l.default,{show:this.state.show,onHide:this.handleCancel,container:a,ref:this.modalRef,closeOnEsc:!0},y?i.default.createElement("div",{className:p("Modal-header")},i.default.createElement("div",{className:p("Modal-title")},y)):null,i.default.createElement("div",{className:p("Modal-body")},this.state.prompt?n(this.state.controls,this.state.value,this.handleFormSubmit,this.scopeRef,h):i.default.createElement(d.default,{html:this.state.content})),b?i.default.createElement("div",{className:p("Modal-footer")},this.state.confirm||this.state.prompt?i.default.createElement(r.default,{onClick:this.handleCancel},v(s)):null,i.default.createElement(r.default,{level:this.state.confirm||this.state.prompt?f:u,onClick:this.handleConfirm},b)):null)},s.instance=null,s.defaultProps={confirmText:"确认",cancelText:"取消",title:"系统消息",alertBtnLevel:"primary",confirmBtnLevel:"danger"},s}(i.default.Component);e.Alert=f,e.alert=function(t,e){return f.getInstance().alert(t,e)},e.confirm=function(t,e,n){return f.getInstance().confirm(t,e,n)},e.pr
|
|||
|
;/*!src/components/ContextMenu.tsx*/
|
|||
|
amis.define("703f435",function(e,t){"use strict";function n(e,t){return p.getInstance().openContextMenus(e,t)}var a;Object.defineProperty(t,"__esModule",{value:!0}),t.openContextMenus=t.ThemedContextMenu=t.ContextMenu=void 0;var o=e("node_modules/tslib/tslib"),i=e("256b65d"),d=o.__importDefault(e("node_modules/react/index")),u=e("node_modules/react-dom/index"),s=e("9a80175"),l=o.__importStar(e("node_modules/react-transition-group/Transition")),r=e("fb7767a"),c=(a={},a[l.ENTERING]="in",a[l.ENTERED]="in",a[l.EXITING]="out",a),p=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isOpened:!1,menus:[],x:-99999,y:-99999},t.menuRef=d.default.createRef(),t}o.__extends(n,e),n.getInstance=function(){if(!n.instance){var e=document.body,a=document.createElement("div");e.appendChild(a),u.render(d.default.createElement(t.ThemedContextMenu,null),a)}return n.instance},n.prototype.componentWillMount=function(){this.originInstance=n.instance,n.instance=this},n.prototype.componentDidMount=function(){document.body.addEventListener("click",this.handleOutClick,!0),document.addEventListener("keydown",this.handleKeyDown)},n.prototype.componentWillUnmount=function(){n.instance=this.originInstance,document.body.removeEventListener("click",this.handleOutClick,!0),document.removeEventListener("keydown",this.handleKeyDown),delete this.originInstance},n.prototype.openContextMenus=function(e,t){this.setState({isOpened:!0,x:e.x,y:e.y,menus:t})},n.prototype.close=function(){this.setState({isOpened:!1,x:-99999,y:-99999,menus:[]})},n.prototype.handleOutClick=function(e){e.target&&this.menuRef.current&&!this.menuRef.current.contains(e.target)&&this.state.isOpened&&(e.preventDefault(),this.close())},n.prototype.handleClick=function(e){e.disabled||Array.isArray(e.children)&&e.children.length||this.setState({isOpened:!1,x:-99999,y:-99999,menus:[]},function(){return e.onSelect?e.onSelect(e.data):null})},n.prototype.handleKeyDown=function(e){27===e.keyCode&&this.state.isOpened&&(e.preventDefault(),this.close())},n.prototype.handleMouseEnter=function(e){e.disabled||!e.onHighlight||e.onHighlight(!0,e.data)},n.prototype.handleMouseLeave=function(e){e.disabled||!e.onHighlight||e.onHighlight(!1,e.data)},n.prototype.handleEnter=function(e){var t=r.calculatePosition("auto",e.lastChild,e.children[1],document.body),n=t.positionLeft+300<window.innerWidth?"right":"left";this.setState({x:t.positionLeft,y:t.positionTop,align:n})},n.prototype.handleSelfContextMenu=function(e){e.preventDefault()},n.prototype.renderMenus=function(e){var t=this,n=this.props.classnames;return e.map(function(e,a){if("|"===e)return d.default.createElement("li",{key:a,className:n("ContextMenu-divider")});var o=Array.isArray(e.children)&&e.children.length;return d.default.createElement("li",{key:e.label+"-"+a,className:n("ContextMenu-item",{"has-child":o,"is-disabled":e.disabled})},d.default.createElement("a",{onClick:t.handleClick.bind(t,e),onMouseEnter:t.handleMouseEnter.bind(t,e),onMouseLeave:t.handleMouseLeave.bind(t,e)},e.icon?d.default.createElement("span",{className:n("ContextMenu-itemIcon",e.icon)}):null,e.label),o?d.default.createElement("ul",{className:n("ContextMenu-subList")},t.renderMenus(e.children)):null)})},n.prototype.render=function(){var e=this,t=this.props,n=t.className,a=(t.container,t.classnames);return d.default.createElement(l.default,{mountOnEnter:!0,unmountOnExit:!0,onEnter:this.handleEnter,"in":this.state.isOpened,timeout:500},function(t){return d.default.createElement("div",{ref:e.menuRef,role:"contextmenu",className:a("ContextMenu",{"ContextMenu--left":"left"===e.state.align},n),onContextMenu:e.handleSelfContextMenu},d.default.createElement("div",{className:a("ContextMenu-overlay",c[t])}),d.default.createElement("div",{className:a("ContextMenu-cursor"),style:{left:e.state.x+"px",top:e.state.y+"px"}}),d.default.createElement("div",{style:{left:e.state.x+"px",top:e.state.y+"px"},className:a("ContextMenu-menu",c[t])},d.default.createElement("ul",{className:a("ContextMenu-list")},e.renderMenus(e.state.menus))))})};var a,i,p,m,f;return n.i
|
|||
|
;/*!src/components/Checkboxes.tsx*/
|
|||
|
amis.define("f203847",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Checkboxes=t.BaseCheckboxes=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),l=e("node_modules/uncontrollable/cjs/index"),r=n.__importDefault(e("0a43d97")),o=e("256b65d"),i=e("9a80175"),s=n.__importDefault(e("node_modules/lodash/isEqual")),u=e("5ab4e9d"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.value2array=function(e,t,n){return void 0===n&&(n=function(e){return e}),void 0===e?[]:(Array.isArray(e)||(e=[e]),e.map(function(e){var a=i.findTree(t,function(t){return s.default(n(t),e)});return a||e}))},t.prototype.toggleOption=function(e){var n=this.props,a=n.value,l=n.onChange,r=n.option2value,o=n.options;if(!e.disabled){var i=t.value2array(a,o,r),s=i.indexOf(e);~s?i.splice(s,1):i.push(e);var u=r?i.map(function(e){return r(e)}):i;l&&l(u)}},t.prototype.toggleAll=function(){var e=this.props,t=e.value,n=e.onChange,a=e.option2value,l=e.options,r=[];Array.isArray(t)&&t.length||(r=l.filter(function(e){return!e.disabled}));var o=a?r.map(function(e){return a(e)}):r;n&&n(o)},t.prototype.render=function(){var e=this,n=this.props,l=n.value,o=n.options,i=n.className,s=n.placeholder,u=n.inline,d=n.labelClassName,c=n.disabled,p=n.classnames,f=n.option2value,m=n.itemClassName,h=n.itemRender,v=this.props.translate,b=t.value2array(l,o,f),_=[];return Array.isArray(o)&&o.length&&(_=o.map(function(t,n){return a.default.createElement(r.default,{className:p(m,t.className),key:n,onChange:function(){return e.toggleOption(t)},checked:!!~b.indexOf(t),disabled:c||t.disabled,labelClassName:d,description:t.description},h(t))})),a.default.createElement("div",{className:p("Checkboxes",i,u?"Checkboxes--inline":"")},_&&_.length?_:a.default.createElement("div",null,v(s)))},t.defaultProps={placeholder:"暂无选项",itemRender:function(e){return a.default.createElement("span",null,e.label)}},n.__decorate([i.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"toggleAll",null),t}(a.default.Component);t.BaseCheckboxes=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(d);t.Checkboxes=c,t.default=o.themeable(u.localeable(l.uncontrollable(c,{value:"onChange"})))});
|
|||
|
;/*!src/components/Collapse.tsx*/
|
|||
|
amis.define("0d13109",function(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Collapse=void 0;var o=t("node_modules/tslib/tslib"),a=o.__importDefault(t("node_modules/react/index")),i=o.__importDefault(t("node_modules/dom-helpers/style/index")),d=t("256b65d"),r=o.__importStar(t("node_modules/react-transition-group/Transition")),l=t("9a80175"),u=(n={},n[r.EXITED]="out",n[r.EXITING]="out",n[r.ENTERING]="in",n),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.contentRef=function(t){return e.contentDom=t},e}o.__extends(e,t),e.prototype.handleEnter=function(t){t.style.height=""},e.prototype.handleEntering=function(t){t.style.height=t.scrollHeight+"px"},e.prototype.handleEntered=function(t){t.style.height=""},e.prototype.handleExit=function(t){var e=t.offsetHeight,n=e+parseInt(i.default(t,"marginTop"),10)+parseInt(i.default(t,"marginBottom"),10);t.style.height=n+"px",t.offsetHeight},e.prototype.handleExiting=function(t){t.style.height=""},e.prototype.render=function(){var t=this,e=this.props,n=e.show,i=e.children,d=e.classnames,l=e.mountOnEnter,p=e.unmountOnExit;return a.default.createElement(r.default,{mountOnEnter:l,unmountOnExit:p,"in":n,timeout:300,onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered,onExit:this.handleExit,onExiting:this.handleExiting},function(e){return e===r.ENTERING&&t.contentDom.offsetWidth,a.default.cloneElement(i,o.__assign(o.__assign({},i.props),{ref:t.contentRef,className:d("Collapse-content",i.props.className,u[e])}))})};var n,d,p,s,m;return e.defaultProps={show:!1,mountOnEnter:!1,unmountOnExit:!1},o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",["function"==typeof(n="undefined"!=typeof HTMLElement&&HTMLElement)?n:Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleEnter",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",["function"==typeof(d="undefined"!=typeof HTMLElement&&HTMLElement)?d:Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleEntering",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",["function"==typeof(p="undefined"!=typeof HTMLElement&&HTMLElement)?p:Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleEntered",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",["function"==typeof(s="undefined"!=typeof HTMLElement&&HTMLElement)?s:Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleExit",null),o.__decorate([l.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",["function"==typeof(m="undefined"!=typeof HTMLElement&&HTMLElement)?m:Object]),o.__metadata("design:returntype",void 0)],e.prototype,"handleExiting",null),e}(a.default.Component);e.Collapse=p,e.default=d.themeable(p)});
|
|||
|
;/*!src/components/ColorPicker.tsx*/
|
|||
|
amis.define("f11d26b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorControl=void 0;var o=e("node_modules/tslib/tslib"),l=o.__importDefault(e("node_modules/react/index")),a=e("node_modules/react-dom/index"),n=e("node_modules/react-color/lib/index"),r=e("b7bbd16"),s=o.__importDefault(e("997df41")),i=e("node_modules/uncontrollable/cjs/index"),u=o.__importDefault(e("2b3dcdf")),c=e("256b65d"),d=e("9a80175"),p=e("5ab4e9d"),h=function(e){function t(t){var o=e.call(this,t)||this;return o.state={isOpened:!1,isFocused:!1,inputValue:o.props.value||""},o.open=o.open.bind(o),o.close=o.close.bind(o),o.focus=o.focus.bind(o),o.blur=o.blur.bind(o),o.handleChange=o.handleChange.bind(o),o.handleFocus=o.handleFocus.bind(o),o.handleBlur=o.handleBlur.bind(o),o.clearValue=o.clearValue.bind(o),o.handleInputChange=o.handleInputChange.bind(o),o.handleClick=o.handleClick.bind(o),o.preview=l.default.createRef(),o.input=l.default.createRef(),o}return o.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props;t.value!==e.value&&this.setState({inputValue:e.value||""})},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1,inputValue:this.props.value})},t.prototype.focus=function(){this.input.current&&this.input.current.focus()},t.prototype.blur=function(){this.input.current&&this.input.current.blur()},t.prototype.open=function(e){this.props.disabled||this.setState({isOpened:!0},e)},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,o=e.resetValue;t(o||"")},t.prototype.handleClick=function(){this.state.isOpened?this.close():this.open(this.focus)},t.prototype.handleInputChange=function(e){var t=this;if(this.props.allowCustomColor){var o=this.props.onChange;this.setState({inputValue:e.currentTarget.value},function(){var e=t.validateColor(t.state.inputValue);e&&o(t.state.inputValue)})}},t.prototype.validateColor=function(e){if(""===e)return!1;if("inherit"===e)return!1;if("transparent"===e)return!1;var t=document.createElement("img");return t.style.color="rgb(0, 0, 0)",t.style.color=e,"rgb(0, 0, 0)"!==t.style.color?!0:(t.style.color="rgb(255, 255, 255)",t.style.color=e,"rgb(255, 255, 255)"!==t.style.color)},t.prototype.handleChange=function(e){var t=this.props,o=t.onChange,l=t.format;o("rgba"===l?"rgba("+e.rgb.r+", "+e.rgb.g+", "+e.rgb.b+", "+e.rgb.a+")":"rgb"===l?"rgb("+e.rgb.r+", "+e.rgb.g+", "+e.rgb.b+")":"hsl"===l?"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)":e.hex)},t.prototype.render=function(){var e=this,t=this.props,o=t.classPrefix,i=t.className,c=t.value,d=t.placeholder,p=t.disabled,h=t.popOverContainer,f=t.format,b=t.clearable,C=t.placement,m=t.classnames,g=t.presetColors,v=t.allowCustomColor,y=this.props.translate,_=this.state.isOpened,k=this.state.isFocused;return l.default.createElement("div",{className:m("ColorPicker",{"is-disabled":p,"is-focused":k},i)},l.default.createElement("input",{ref:this.input,type:"text",autoComplete:"off",size:10,className:m("ColorPicker-input"),value:this.state.inputValue||"",placeholder:y(d),disabled:p,onChange:this.handleInputChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick}),b&&!p&&c?l.default.createElement("a",{onClick:this.clearValue,className:m("ColorPicker-clear")},l.default.createElement(r.Icon,{icon:"close",className:"icon"})):null,l.default.createElement("span",{onClick:this.handleClick,className:m("ColorPicker-preview")},l.default.createElement("i",{ref:this.preview,className:o+"ColorPicker-previewIcon",style:{background:this.state.inputValue||"#ccc"}})),_?l.default.createElement(s.default,{placement:C||"auto",target:function(){return a.findDOMNode(e)},onHide:this.close,container:h||function(){return a.findDOMNode(e)},rootClose:!1,show:!0},l.default.createElement(u.default,{classPrefix:o,className:m("ColorPicker-popover"),onHide:this.close,overlay:!0},v?l.default.createElement(n.SketchPicker,{disableAlpha:!!~["rgb","hex"].in
|
|||
|
;/*!src/components/calendar/DaysView.tsx*/
|
|||
|
amis.define("a905d95",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDaysView=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react-datetime/src/DaysView")),n=a.__importDefault(e("node_modules/react/index")),s=e("5ab4e9d"),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.updateSelectedDate=function(e){if(t.props.requiredConfirm){var a=t.props.viewDate.clone(),r=t.props.selectedDate||a,n=e.target,s=0;return~n.className.indexOf("rdtNew")&&(s=1),~n.className.indexOf("rdtOld")&&(s=-1),a.month(a.month()+s).date(parseInt(n.getAttribute("data-value"),10)).hours(r.hours()).minutes(r.minutes()).seconds(r.seconds()).milliseconds(r.milliseconds()),void t.props.setDateTimeState({viewDate:a,selectedDate:a.clone()})}t.props.updateSelectedDate(e,!0)},t.setTime=function(e,a){var r=(t.props.selectedDate||t.props.viewDate).clone();r[e](a),t.props.setDateTimeState({viewDate:r.clone(),selectedDate:r.clone()}),t.props.requiredConfirm||t.props.onChange(r)},t.confirm=function(){var e=(t.props.selectedDate||t.props.viewDate).clone();t.props.setDateTimeState({selectedDate:e}),t.props.onChange(e),t.props.onClose&&t.props.onClose()},t.cancel=function(){t.props.onClose&&t.props.onClose()},t.renderDay=function(e,t){return n.default.createElement("td",a.__assign({},e),t.date())},t.renderTimes=function(){var e=t.props,a=e.timeFormat,r=e.selectedDate,s=e.viewDate,l=e.isEndDate,o=r||(l?s.endOf("day"):s),i=[];return a.split(":").forEach(function(e,a){var r=/h/i.test(e)?"hours":/m/i.test(e)?"minutes":"seconds",s=0,l="hours"===r?23:59;i.push(n.default.createElement("input",{key:a+"input",type:"text",value:o.format(e),min:s,max:l,onChange:function(e){return t.setTime(r,Math.max(s,Math.min(parseInt(e.currentTarget.value.replace(/\D/g,""),10)||0,l)))}})),i.push(n.default.createElement("span",{key:a+"divider"},":"))}),i.length&&i.pop(),n.default.createElement("div",null,i)},t.renderFooter=function(){if(!t.props.timeFormat&&!t.props.requiredConfirm)return null;var e=t.props.translate;return n.default.createElement("tfoot",{key:"tf"},n.default.createElement("tr",null,n.default.createElement("td",{colSpan:7},t.props.timeFormat?t.renderTimes():null,t.props.requiredConfirm?n.default.createElement("div",{key:"button",className:"rdtActions"},n.default.createElement("a",{className:"rdtBtn rdtBtnConfirm",onClick:t.confirm},e("确认")),n.default.createElement("a",{className:"rdtBtn rdtBtnCancel",onClick:t.cancel},e("取消"))):null)))},t}return a.__extends(t,e),t.prototype.render=function(){var e=this.renderFooter(),t=this.props.viewDate,a=t.localeData(),r=this.props.translate,s=[n.default.createElement("thead",{key:"th"},n.default.createElement("tr",null,n.default.createElement("th",{colSpan:7},n.default.createElement("div",{className:"rdtHeader"},n.default.createElement("a",{className:"rdtPrev",onClick:this.props.subtractTime(1,"years")},"«"),n.default.createElement("a",{className:"rdtPrev",onClick:this.props.subtractTime(1,"months")},"‹"),n.default.createElement("div",{className:"rdtCenter"},n.default.createElement("a",{className:"rdtSwitch",onClick:this.props.showView("years")},t.format(r("YYYY年"))),n.default.createElement("a",{className:"rdtSwitch",onClick:this.props.showView("months")},t.format(r("MMM")))),n.default.createElement("a",{className:"rdtNext",onClick:this.props.addTime(1,"months")},"›"),n.default.createElement("a",{className:"rdtNext",onClick:this.props.addTime(1,"years")},"»")))),n.default.createElement("tr",null,this.getDaysOfWeek(a).map(function(e,t){return n.default.createElement("th",{key:e+t,className:"dow"},e)}))),n.default.createElement("tbody",{key:"tb"},this.renderDays())];return e&&s.push(e),n.default.createElement("div",{className:"rdtDays"},n.default.createElement("table",null,s))},t}(r.default);t.CustomDaysView=l,t.default=s.localeable(l)});
|
|||
|
;/*!src/components/calendar/YearsView.tsx*/
|
|||
|
amis.define("9e2700e",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomYearsView=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react-datetime/src/YearsView")),l=a.__importDefault(e("node_modules/react/index")),n=e("5ab4e9d"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderYear=function(e,t){return l.default.createElement("td",a.__assign({},e),l.default.createElement("span",null,t))},t}return a.__extends(t,e),t.prototype.render=function(){var e=this.props.viewDate.year();e-=e%10;var t=this.props.translate;return l.default.createElement("div",{className:"rdtYears"},l.default.createElement("table",null,l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",{className:"rdtPrev",onClick:this.props.subtractTime(10,"years")},"«"),l.default.createElement("th",{className:"rdtSwitch"},t("{{from}}年-{{to}}年",{from:e,to:e+9})),l.default.createElement("th",{className:"rdtNext",onClick:this.props.addTime(10,"years")},"»")))),l.default.createElement("table",null,l.default.createElement("tbody",null,this.renderYears(e))))},t}(r.default);t.CustomYearsView=s,t.default=n.localeable(s)});
|
|||
|
;/*!src/components/calendar/MonthsView.tsx*/
|
|||
|
amis.define("fe2e511",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomMonthsView=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react-datetime/src/MonthsView")),n=a.__importDefault(e("node_modules/react/index")),r=e("5ab4e9d"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderMonth=function(e,l){var r=t.props.viewDate,s=r.localeData().monthsShort(r.month(l)),u=3,d=s.substring(0,u);return n.default.createElement("td",a.__assign({},e),n.default.createElement("span",null,d))},t}return a.__extends(t,e),t.prototype.render=function(){var e=this.props.translate;return n.default.createElement("div",{className:"rdtMonths"},n.default.createElement("table",null,n.default.createElement("thead",null,n.default.createElement("tr",null,n.default.createElement("th",{className:"rdtPrev",onClick:this.props.subtractTime(1,"years")},"«"),n.default.createElement("th",{className:"rdtSwitch"},this.props.viewDate.format(e("YYYY年"))),n.default.createElement("th",{className:"rdtNext",onClick:this.props.addTime(1,"years")},"»")))),n.default.createElement("table",null,n.default.createElement("tbody",null,this.renderMonths())))},t}(l.default);t.CustomMonthsView=s,t.default=r.localeable(s)});
|
|||
|
;/*!src/components/calendar/CalendarContainer.tsx*/
|
|||
|
amis.define("3af2f48",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react-datetime/src/CalendarContainer")),s=a.__importDefault(e("a905d95")),i=a.__importDefault(e("9e2700e")),u=a.__importDefault(e("fe2e511")),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.viewComponents=a.__assign(a.__assign({},t.viewComponents),{days:s.default,years:i.default,months:u.default}),t}return a.__extends(t,e),t}(n.default);t.default=l});
|
|||
|
;/*!src/components/calendar/Calendar.tsx*/
|
|||
|
amis.define("4c30e45",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react-datetime/DateTime")),a=n.__importDefault(e("node_modules/react/index")),o=n.__importDefault(e("3af2f48")),s=n.__importDefault(e("node_modules/classnames/index")),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getComponentProps=function(e){return function(){var n=e.call(t);return n.setDateTimeState=t.setState.bind(t),["onChange","onClose","requiredConfirm","classPrefix","prevIcon","nextIcon","isEndDate"].forEach(function(e){return n[e]=t.props[e]}),n}}(t.getComponentProps),t.setDate=function(e){var n={month:"days",year:"days"};return function(r){t.setState({viewDate:t.state.viewDate.clone()[e](parseInt(r.target.closest("td").getAttribute("data-value"),10)).startOf(e),currentView:n[e]}),t.props.onViewModeChange(n[e])}},t}return n.__extends(t,e),t.prototype.render=function(){var e=o.default;return a.default.createElement("div",{className:s.default("rdt rdtStatic rdtOpen",this.props.className)},a.default.createElement("div",{key:"dt",className:"rdtPicker"},a.default.createElement(e,{view:this.state.currentView,viewProps:this.getComponentProps()})))},t}(r.default),u=i;t.default=u});
|
|||
|
;/*!src/components/DatePicker.tsx*/
|
|||
|
amis.define("dd24912",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatePicker=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),n=a.__importDefault(e("node_modules/classnames/index")),o=a.__importDefault(e("node_modules/moment/moment"));e("node_modules/moment/locale/zh-cn");var s=e("b7bbd16"),l=a.__importDefault(e("2b3dcdf")),i=a.__importDefault(e("997df41")),u=e("256b65d"),d=a.__importDefault(e("4c30e45")),c=e("5ab4e9d"),f={now:{label:"现在",date:function(e){return e}},today:{label:"今天",date:function(e){return e.startOf("day")}},yesterday:{label:"昨天",date:function(e){return e.add(-1,"days").startOf("day")}},thisweek:{label:"本周一",date:function(e){return e.startOf("week").startOf("day")}},thismonth:{label:"本月初",date:function(e){return e.startOf("month")}},prevmonth:{label:"上个月初",date:function(e){return e.startOf("month").add(-1,"month")}},prevquarter:{label:"上个季节初",date:function(e){return e.startOf("quarter").add(-1,"quarter")}},thisquarter:{label:"本季度初",date:function(e){return e.startOf("quarter")}},tomorrow:{label:"明天",date:function(e){return e.add(1,"days").startOf("day")}},endofthisweek:{label:"本周日",date:function(e){return e.endOf("week")}},endofthismonth:{label:"本月底",date:function(e){return e.endOf("month")}}},h=[{regexp:/^(\d+)hoursago$/,resolve:function(e,t,a){return{label:e("{{hours}}小时前",{hours:a}),date:function(e){return e.subtract(a,"hours")}}}},{regexp:/^(\d+)hourslater$/,resolve:function(e,t,a){return{label:e("{{hours}}小时后",{hours:a}),date:function(e){return e.add(a,"hours")}}}},{regexp:/^(\d+)daysago$/,resolve:function(e,t,a){return{label:e("{{days}}天前",{days:a}),date:function(e){return e.subtract(a,"days")}}}},{regexp:/^(\d+)dayslater$/,resolve:function(e,t,a){return{label:e("{{days}}天后",{days:a}),date:function(e){return e.add(a,"days")}}}},{regexp:/^(\d+)weeksago$/,resolve:function(e,t,a){return{label:e("{{weeks}}周前",{weeks:a}),date:function(e){return e.subtract(a,"weeks")}}}},{regexp:/^(\d+)weekslater$/,resolve:function(e,t,a){return{label:e("{{weeks}}周后",{weeks:a}),date:function(e){return e.add(a,"weeks")}}}},{regexp:/^(\d+)monthsago$/,resolve:function(e,t,a){return{label:e("{{months}}月前",{months:a}),date:function(e){return e.subtract(a,"months")}}}},{regexp:/^(\d+)monthslater$/,resolve:function(e,t,a){return{label:e("{{months}}月后",{months:a}),date:function(e){return e.add(a,"months")}}}},{regexp:/^(\d+)quartersago$/,resolve:function(e,t,a){return{label:e("{{quarters}}季度前",{quarters:a}),date:function(e){return e.subtract(a,"quarters")}}}},{regexp:/^(\d+)quarterslater$/,resolve:function(e,t,a){return{label:e("{{quarters}}季度后",{quarters:a}),date:function(e){return e.add(a,"quarters")}}}}],p=function(e){function t(t){var a=e.call(this,t)||this;return a.state={isOpened:!1,isFocused:!1,value:a.props.value?o.default(a.props.value,a.props.format):void 0},a.domRef=function(e){a.dom=e},a.handleChange=a.handleChange.bind(a),a.selectRannge=a.selectRannge.bind(a),a.checkIsValidDate=a.checkIsValidDate.bind(a),a.open=a.open.bind(a),a.close=a.close.bind(a),a.handleFocus=a.handleFocus.bind(a),a.handleBlur=a.handleBlur.bind(a),a.clearValue=a.clearValue.bind(a),a.handleClick=a.handleClick.bind(a),a.handleKeyPress=a.handleKeyPress.bind(a),a.getParent=a.getParent.bind(a),a.getTarget=a.getTarget.bind(a),a.handlePopOverClick=a.handlePopOverClick.bind(a),a.renderShortCuts=a.renderShortCuts.bind(a),a}return a.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.value!==e.value&&this.setState({value:e.value?o.default(e.value,e.format):void 0})},t.prototype.focus=function(){this.dom&&this.dom.focus()},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleKeyPress=function(e){" "===e.key&&(this.handleClick(),e.preventDefault())},t.prototype.handleClick=function(){this.state.isOpened?this.close():this.open()},t.prototype.handlePo
|
|||
|
;/*!src/components/DateRangePicker.tsx*/
|
|||
|
amis.define("eaae631",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateRangePicker=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),r=a.__importDefault(e("node_modules/moment/moment")),s=e("node_modules/react-dom/index"),i=a.__importDefault(e("node_modules/classnames/index")),o=e("b7bbd16"),d=a.__importDefault(e("997df41")),l=a.__importDefault(e("4c30e45")),c=a.__importDefault(e("2b3dcdf")),u=e("256b65d"),f=e("9a80175"),h=e("5ab4e9d"),p={today:{label:"今天",startDate:function(e){return e.startOf("day")},endDate:function(e){return e}},yesterday:{label:"昨天",startDate:function(e){return e.add(-1,"days").startOf("day")},endDate:function(e){return e.add(-1,"days").endOf("day")}},"1dayago":{label:"最近1天",startDate:function(e){return e.add(-1,"days")},endDate:function(e){return e}},"7daysago":{label:"最近7天",startDate:function(e){return e.add(-7,"days").startOf("day")},endDate:function(e){return e.add(-1,"days").endOf("day")}},"90daysago":{label:"最近90天",startDate:function(e){return e.add(-90,"days").startOf("day")},endDate:function(e){return e.add(-1,"days").endOf("day")}},prevweek:{label:"上周",startDate:function(e){return e.startOf("week").add(-1,"weeks")},endDate:function(e){return e.startOf("week").add(-1,"days").endOf("day")}},thismonth:{label:"本月",startDate:function(e){return e.startOf("month")},endDate:function(e){return e}},prevmonth:{label:"上个月",startDate:function(e){return e.startOf("month").add(-1,"month")},endDate:function(e){return e.startOf("month").add(-1,"day").endOf("day")}},prevquarter:{label:"上个季节",startDate:function(e){return e.startOf("quarter").add(-1,"quarter")},endDate:function(e){return e.startOf("quarter").add(-1,"day").endOf("day")}},thisquarter:{label:"本季度",startDate:function(e){return e.startOf("quarter")},endDate:function(e){return e}}},m=function(e){function t(s){var i=e.call(this,s)||this;i.nextMonth=r.default().add(1,"months"),i.open=i.open.bind(i),i.close=i.close.bind(i),i.handleStartChange=i.handleStartChange.bind(i),i.handleEndChange=i.handleEndChange.bind(i),i.handleFocus=i.handleFocus.bind(i),i.handleBlur=i.handleBlur.bind(i),i.checkStartIsValidDate=i.checkStartIsValidDate.bind(i),i.checkEndIsValidDate=i.checkEndIsValidDate.bind(i),i.confirm=i.confirm.bind(i),i.clearValue=i.clearValue.bind(i),i.dom=n.default.createRef(),i.handleClick=i.handleClick.bind(i),i.handleKeyPress=i.handleKeyPress.bind(i),i.handlePopOverClick=i.handlePopOverClick.bind(i),i.renderDay=i.renderDay.bind(i);var o=i.props,d=o.format,l=o.joinValues,c=o.delimiter,u=o.value;return i.state=a.__assign({isOpened:!1,isFocused:!1},t.unFormatValue(u,d,l,c)),i}return a.__extends(t,e),t.formatValue=function(e,t,a,n,s){return void 0===s&&(s=!1),e=[(s?r.default.utc(e.startDate):e.startDate).format(t),(s?r.default.utc(e.endDate):e.endDate).format(t)],a&&(e=e.join(n)),e},t.unFormatValue=function(e,t,a,n){return e?(a&&"string"==typeof e&&(e=e.split(n)),{startDate:e[0]?r.default(e[0],t):void 0,endDate:e[1]?r.default(e[1],t):void 0}):{startDate:void 0,endDate:void 0}},t.prototype.componentWillReceiveProps=function(e){var n=this.props,r=e.value,s=e.format,i=e.joinValues,o=e.delimiter;n.value!==r&&this.setState(a.__assign({},t.unFormatValue(r,s,i,o)))},t.prototype.focus=function(){this.dom.current&&!this.props.disabled&&this.dom.current.focus()},t.prototype.blur=function(){this.dom.current&&!this.props.disabled&&this.dom.current.blur()},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.open=function(){this.props.disabled||this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1},this.blur)},t.prototype.handleClick=function(){this.state.isOpened?this.close():this.open()},t.prototype.handlePopOverClick=function(e){e.stopPropagation(),e.preventDefault()},t.prototype.handleKeyPress=function(e){" "===e.key&&(this.handleClick(),e.preventDefault())},t.prototype.confirm=function(){this.state.startDate&&thi
|
|||
|
;/*!src/components/Drawer.tsx*/
|
|||
|
amis.define("01a937e",function(e,t){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Drawer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),d=n.__importStar(e("node_modules/react-transition-group/Transition")),i=e("node_modules/react-overlays/lib/index"),r=e("b7bbd16"),l=n.__importDefault(e("node_modules/classnames/index")),s=e("8768414"),c=e("256b65d"),u=e("9a80175"),m=(o={},o[d.ENTERING]="in",o[d.ENTERED]="in",o),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isRootClosed=!1,t.contentRef=function(e){return t.contentDom=e},t.handleEntered=function(){var e=t.props.onEntered;document.body.classList.add("is-modalOpened"),e&&e()},t.handleExited=function(){var e=t.props.onExited;document.activeElement&&document.activeElement.blur(),e&&e(),setTimeout(function(){document.querySelector(".amis-dialog-widget")||document.body.classList.remove("is-modalOpened")},200)},t.modalRef=function(e){t.modalDom=e,e?(s.addModal(t),e.classList.add(t.props.classPrefix+"Modal--"+s.current()+"th")):s.removeModal()},t}n.__extends(t,e),t.prototype.componentDidMount=function(){this.props.show&&this.handleEntered(),document.body.addEventListener("click",this.handleRootClickCapture,!0),document.body.addEventListener("click",this.handleRootClick)},t.prototype.componentWillUnmount=function(){this.props.show&&this.handleExited(),document.body.removeEventListener("click",this.handleRootClick),document.body.removeEventListener("click",this.handleRootClickCapture,!0)},t.prototype.handleRootClickCapture=function(e){var t=e.target,o=this.props,n=o.closeOnOutside,a=o.classPrefix,d=1===e.button&&null!==window.event||0===e.button;this.isRootClosed=!!(d&&n&&t&&this.modalDom&&(!this.modalDom.contains(t)&&!t.closest("[role=dialog]")||t.matches("."+a+"Drawer-overlay")&&t.parentElement===this.modalDom))},t.prototype.handleRootClick=function(e){var t=this.props.onHide;this.isRootClosed&&!e.defaultPrevented&&t(e)},t.prototype.render=function(){var e=this,t=this.props,o=t.classPrefix,n=t.className,s=t.children,c=t.container,u=t.show,p=t.position,f=t.size,h=t.onHide,v=t.disabled,E=t.overlay,y=t.bodyClassName;return a.default.createElement(i.Portal,{container:c},a.default.createElement(d.default,{mountOnEnter:!0,unmountOnExit:!0,"in":u,timeout:500,onExited:this.handleExited,onEntered:this.handleEntered},function(t){var i;return t===d.ENTERING&&e.contentDom.offsetWidth,a.default.createElement("div",{ref:e.modalRef,role:"dialog",className:l.default("amis-dialog-widget "+o+"Drawer",(i={},i[o+"Drawer--"+p]=p,i[o+"Drawer--"+f]=f,i[o+"Drawer--noOverlay"]=!E,i),n)},E?a.default.createElement("div",{className:l.default(o+"Drawer-overlay",m[t])}):null,a.default.createElement("div",{ref:e.contentRef,className:l.default(o+"Drawer-content",y,m[t])},a.default.createElement("a",{onClick:v?void 0:h,className:o+"Drawer-close"},a.default.createElement(r.Icon,{icon:"close",className:"icon"})),s))}))};var o,c;return t.defaultProps={container:document.body,position:"left",size:"md",overlay:!0},n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof MouseEvent&&MouseEvent)?o:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleRootClickCapture",null),n.__decorate([u.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(c="undefined"!=typeof MouseEvent&&MouseEvent)?c:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleRootClick",null),t}(a.default.Component);t.Drawer=p,t.default=c.themeable(p)});
|
|||
|
;/*!src/components/Tabs.tsx*/
|
|||
|
amis.define("8ac7656",function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Tabs=t.Tab=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),s=a.__importStar(e("node_modules/react-transition-group/Transition")),l=e("256b65d"),o=e("node_modules/uncontrollable/cjs/index"),i=(n={},n[s.ENTERING]="in",n[s.ENTERED]="in",n),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contentRef=function(e){return t.contentDom=e},t}return a.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.classnames,a=t.mountOnEnter,l=t.reload,o=t.unmountOnExit,u=t.eventKey,c=t.activeKey,d=t.children,m=t.className;return r.default.createElement(s.default,{"in":c===u,mountOnEnter:a,unmountOnExit:"boolean"==typeof l?l:o,timeout:500},function(t){return t===s.ENTERING&&e.contentDom.offsetWidth,r.default.createElement("div",{ref:e.contentRef,className:n(i[t],c===u?"is-active":"","Tabs-pane",m)},d)})},t}(r.default.PureComponent);t.Tab=l.themeable(u);var c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(n,e),n.prototype.handleSelect=function(e){var t=this.props.onSelect;t&&t(e)},n.prototype.renderNav=function(e,t){var n=this;if(e){var a=this.props,s=a.classnames,l=a.activeKey,o=e.props,i=o.eventKey,u=o.disabled,c=o.icon,d=o.title,m=o.toolbar,f=void 0===l&&0===t?i:l;return r.default.createElement("li",{className:s("Tabs-link",f===i?"is-active":"",u?"is-disabled":""),key:t,onClick:function(){return u?"":n.handleSelect(i)}},r.default.createElement("a",null,c?r.default.createElement("i",{className:c}):null," ",d),r.default.isValidElement(m)?m:null)}},n.prototype.renderTab=function(e,t){if(e){var n=this.props,s=n.activeKey,l=n.classnames,o=e.props.eventKey,i=void 0===s&&0===t?o:s;return r.default.cloneElement(e,a.__assign(a.__assign({},e.props),{key:t,classnames:l,activeKey:i}))}},n.prototype.render=function(){var e,t=this,n=this.props,a=n.classnames,s=n.contentClassName,l=n.className,o=n.mode,i=n.tabsMode,u=n.children,c=n.additionBtns,d=n.toolbar;if(!Array.isArray(u))return null;var m=i||o;return r.default.createElement("div",{className:a("Tabs",(e={},e["Tabs--"+m]=m,e),l)},r.default.createElement("ul",{className:a("Tabs-links"),role:"tablist"},u.map(function(e,n){return t.renderNav(e,n)}),c,d),r.default.createElement("div",{className:a("Tabs-content",s)},u.map(function(e,n){return t.renderTab(e,n)})))},n.defaultProps={mode:"",contentClassName:""},n.Tab=t.Tab,n}(r.default.Component);t.Tabs=c;var d=l.themeable(o.uncontrollable(c,{activeKey:"onSelect"}));t.default=d});
|
|||
|
;/*!src/components/Editor.tsx*/
|
|||
|
amis.define("997c87d",function(t,e){"use strict";function o(t){return t}function i(t,e,o){return e.editor.create(t,s.__assign({autoIndent:!0,formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,minimap:{enabled:!1}},o))}Object.defineProperty(e,"__esModule",{value:!0}),e.Editor=e.monacoFactory=void 0;var s=t("node_modules/tslib/tslib"),n=s.__importDefault(t("node_modules/react/index")),r=s.__importDefault(t("node_modules/classnames/index")),a=t("256b65d");window.MonacoEnvironment={getWorkerUrl:function(t,e){var i="/pkg/editor.worker.js";return"json"===e?i="/pkg/json.worker.js":"css"===e?i="/pkg/css.worker.js":"html"===e?i="/pkg/html.worker.js":("typescript"===e||"javascript"===e)&&(i="/pkg/ts.worker.js"),i=o(i),/^https?/.test(i)?"data:text/javascript;charset=utf-8,"+encodeURIComponent("\n importScripts('"+i+"');")+"\n ":i}},e.monacoFactory=i;var p=function(e){function o(t){var o=e.call(this,t)||this;return o.disposes=[],o.wrapperRef=o.wrapperRef.bind(o),o.currentValue=t.value,o}return s.__extends(o,e),o.prototype.componentWillReceiveProps=function(t){this.props.options.readOnly!==t.options.readOnly&&this.editor&&this.editor.updateOptions&&this.editor.updateOptions(t.options)},o.prototype.componentDidUpdate=function(){if(this.props.value!==this.currentValue&&this.editor){var t=String(this.props.value);if("json"===this.props.language)try{t=JSON.stringify(JSON.parse(t),null,4)}catch(e){}this.preventTriggerChangeEvent=!0,this.editor.setValue&&this.editor.setValue(t),this.preventTriggerChangeEvent=!1}},o.prototype.componentWillUnmount=function(){if(this.editor){var t=this.props.context||window,e=t.monaco||window.monaco,o=this.props.editorWillUnmount;o&&o(this.editor,e)}this.disposes.forEach(function(t){var e=t.dispose;return e()}),this.disposes=[]},o.prototype.wrapperRef=function(t){if(this.container=t,t)this.loadMonaco();else try{this.disposes.forEach(function(t){var e=t.dispose;return e()}),this.disposes=[],this.editor&&(this.editor.getModel().dispose(),this.editor.dispose()),this.editor=null}catch(e){}},o.prototype.loadMonaco=function(){var e=this;t(["b961301"],function(t){e.initMonaco(t)})},o.prototype.initMonaco=function(t){var e,o=null!==this.props.value?this.props.value:this.props.defaultValue,n=this.props,r=n.language,a=n.editorTheme,p=n.options,d=n.editorFactory,u=this.container;if(u){if(this.editorWillMount(t),"json"===this.props.language)try{o=JSON.stringify("string"==typeof o?JSON.parse(o):o,null,4)}catch(l){}var h=d||i;this.editor=h(u,t,s.__assign(s.__assign({},p),{automaticLayout:!0,value:o,language:r,editorTheme:a,theme:a})),null===(e=t.languages.json)||void 0===e?void 0:e.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,validate:!0,allowComments:!0}),this.editorDidMount(this.editor,t)}},o.prototype.editorWillMount=function(t){var e=this.props.editorWillMount;e&&e(t)},o.prototype.editorDidMount=function(t,e){var o=this,i=this.props,s=i.editorDidMount,n=i.onChange,r=i.onFocus,a=i.onBlur;s&&s(t,e),t.onDidChangeModelContent&&this.disposes.push(t.onDidChangeModelContent(function(e){var i=t.getValue();o.currentValue=i,!o.preventTriggerChangeEvent&&n&&n(i,e)})),r&&t.onDidFocusEditorWidget&&this.disposes.push(t.onDidFocusEditorWidget(r)),a&&t.onDidBlurEditorWidget&&this.disposes.push(t.onDidBlurEditorWidget(a))},o.prototype.render=function(){var t=this.props,e=t.className,o=t.classPrefix,i=t.width,s=t.height,a=this.props.style||{};return a.width=i,a.height=s,n.default.createElement("div",{className:r.default(o+"MonacoEditor",e),style:a,ref:this.wrapperRef})},o.defaultProps={language:"javascript",editorTheme:"vs",width:"100%",height:"100%",options:{}},o}(n.default.Component);e.Editor=p,e.default=a.themeable(p)});
|
|||
|
;/*!src/components/LazyComponent.tsx*/
|
|||
|
amis.define("4783ce8",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),n=i.__importDefault(e("node_modules/react/index")),l=i.__importDefault(e("node_modules/react-visibility-sensor/visibility-sensor")),a=i.__importDefault(e("acad559")),o=function(e){function t(t){var i=e.call(this,t)||this;return i.mounted=!1,i.handleVisibleChange=i.handleVisibleChange.bind(i),i.state={visible:!1,component:t.component},i}return i.__extends(t,e),t.prototype.componentWillMount=function(){this.mounted=!0},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.handleVisibleChange=function(e){var t=this;this.setState({visible:e}),e&&!this.state.component&&this.props.getComponent&&this.props.getComponent().then(function(e){return t.mounted&&"function"==typeof e&&t.setState({component:e})}).catch(function(e){return t.mounted&&t.setState({component:function(){return n.default.createElement("div",{className:"alert alert-danger"},String(e))}})})},t.prototype.render=function(){var e=this.props,t=e.placeholder,a=e.unMountOnHidden,o=e.childProps,s=e.visiblilityProps,r=e.partialVisibility,d=e.children,u=i.__rest(e,["placeholder","unMountOnHidden","childProps","visiblilityProps","partialVisibility","children"]),c=this.state,p=c.visible,m=c.component;return a?n.default.createElement(l.default,i.__assign({},s,{partialVisibility:r,onChange:this.handleVisibleChange}),n.default.createElement("div",{className:"visibility-sensor"},m&&p?n.default.createElement(m,i.__assign({},u,o)):d&&p?d:t)):p?m?n.default.createElement(m,i.__assign({},u,o)):d?d:n.default.createElement("div",null,t):n.default.createElement(l.default,i.__assign({},s,{partialVisibility:r,onChange:this.handleVisibleChange}),n.default.createElement("div",{className:"visibility-sensor"},t))},t.defaultProps={placeholder:n.default.createElement(a.default,null),unMountOnHidden:!1,partialVisibility:!0},t}(n.default.Component);t.default=o});
|
|||
|
;/*!src/components/Radios.tsx*/
|
|||
|
amis.define("8e37af0",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.Radios=void 0;var a=e("node_modules/tslib/tslib"),t=a.__importDefault(e("node_modules/react/index")),n=e("node_modules/uncontrollable/cjs/index"),r=a.__importDefault(e("0a43d97")),i=e("d57879c"),o=a.__importDefault(e("node_modules/lodash/chunk")),s=e("256b65d"),d=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(l,e),l.prototype.toggleOption=function(e){var l=this.props,a=l.value,t=l.onChange,n=l.valueField,r=l.clearable,o=l.delimiter,s=l.options,d=i.value2array(a,{multiple:!1,delimiter:o,valueField:n,options:s}),u=d.indexOf(e);~u?r&&d.splice(u,1):d=[e];var c=d[0];t&&t(c)},l.prototype.renderGroup=function(e,l,a){var n=this,r=this.props.classnames;return t.default.createElement("div",{key:l,className:r("RadiosControl-group",e.className)},t.default.createElement("label",{className:r("RadiosControl-groupLabel",e.labelClassName)},e.label),e.children&&e.children.length?e.children.map(function(e,l){return n.renderItem(e,l,a)}):null)},l.prototype.renderItem=function(e,l,a){var n=this;if(e.children)return this.renderGroup(e,l,a);var i=this.props,o=i.disabled,s=i.inline,d=i.itemClassName,u=i.classnames,c=i.labelClassName,m=i.labelField;return t.default.createElement(r.default,{type:"radio",key:l,onChange:function(){return n.toggleOption(e)},checked:!!~a.indexOf(e),className:u(d,e.className),disabled:o||e.disabled,description:e.description,inline:s,labelClassName:c},e[m||"label"])},l.prototype.render=function(){var e=this,l=this.props,a=l.value,n=l.options,r=l.className,s=l.classnames,d=l.placeholder,u=l.columnsCount,c=(l.joinValues,l.extractValue,l.disabled,l.inline),m=l.delimiter,p=l.valueField,f=(l.classPrefix,i.value2array(a,{multiple:!1,delimiter:m,valueField:p,options:n})),h=[];if(n&&(h=n.map(function(l,a){return e.renderItem(l,a,f)})),!c&&u>1){var v=12/u,b="Grid-col--sm"+(v===Math.round(v)?v:"");h=o.default(h,u).map(function(e,l){return t.default.createElement("div",{className:s("Grid"),key:l},Array.from({length:u}).map(function(l,a){return t.default.createElement("div",{key:a,className:s(b)},e[a])}))})}return t.default.createElement("div",{className:r},h&&h.length?h:d)},l.defaultProps={type:"radio",joinValues:!0,clearable:!1,columnsCount:1},l}(t.default.Component);l.Radios=d,l.default=s.themeable(n.uncontrollable(d,{value:"onChange"}))});
|
|||
|
;/*!src/components/Range.tsx*/
|
|||
|
amis.define("736bbb6",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Range=void 0;var a=e("node_modules/tslib/tslib"),t=a.__importDefault(e("node_modules/react/index")),l=a.__importDefault(e("node_modules/react-input-range/lib/js/index")),u=e("node_modules/uncontrollable/cjs/index"),i=e("256b65d"),r=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.min,u=e.max,i=e.value,r=(e.className,e.classPrefix),s=e.multiple,o={activeTrack:s?r+"InputRange-track is-active":r+"InputRange-track",disabledInputRange:r+"InputRange is-disabled",inputRange:r+"InputRange",labelContainer:r+"InputRange-labelContainer",maxLabel:r+"InputRange-label "+r+"InputRange-label--max",minLabel:r+"InputRange-label "+r+"InputRange-label--min",slider:r+"InputRange-slider",sliderContainer:r+"InputRange-sliderContainer",track:r+"InputRange-track "+r+"InputRange-track--background",valueLabel:r+"InputRange-label "+r+"InputRange-label--value"};return t.default.createElement(l.default,a.__assign({},this.props,{classNames:o,minValue:n,maxValue:u,value:i}))},n.defaultProps={min:1,max:100},n}(t.default.Component);n.Range=r,n.default=i.themeable(u.uncontrollable(r,{value:"onChange"}))});
|
|||
|
;/*!src/components/Rating.tsx*/
|
|||
|
amis.define("1b690d8",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rating=void 0;var a=t("node_modules/tslib/tslib"),s=a.__importDefault(t("node_modules/react/index")),r=a.__importDefault(t("node_modules/classnames/index")),n=t("256b65d"),i=function(t){function e(e){var a=t.call(this,e)||this;return a.state={value:e.value||0,stars:[],halfStar:{at:Math.floor(e.value),hidden:e.half&&e.value%1<.5}},a.getRate=a.getRate.bind(a),a.getStars=a.getStars.bind(a),a.moreThanHalf=a.moreThanHalf.bind(a),a.mouseOver=a.mouseOver.bind(a),a.mouseLeave=a.mouseLeave.bind(a),a.handleClick=a.handleClick.bind(a),a}return a.__extends(e,t),e.prototype.componentDidMount=function(){var t=this.state.value;this.setState({stars:this.getStars(t)})},e.prototype.componentWillReceiveProps=function(t){this.setState({stars:this.getStars(t.value),value:t.value,halfStar:{at:Math.floor(t.value),hidden:t.half&&t.value%1<.5}})},e.prototype.getRate=function(){var t,e=this.state.value,a=this.props.half;return t=a?Math.floor(e):Math.round(e)},e.prototype.getStars=function(t){"undefined"==typeof t&&(t=this.getRate());for(var e=[],a=this.props.count,s=0;a>s;s++)e.push({active:t-1>=s});return e},e.prototype.mouseOver=function(t){var e=this.props,a=e.readOnly,s=e.size,r=e.half;if(!a){var n=Number(t.target.getAttribute("data-index"));if(r){var i=this.moreThanHalf(t,s);i&&(n+=1),this.setState({halfStar:{at:n,hidden:i}})}else n+=1;this.setState({stars:this.getStars(n)})}},e.prototype.moreThanHalf=function(t,e){var a=t.target,s=t.clientX-a.getBoundingClientRect().left;return s=Math.round(Math.abs(s)),s>e/2},e.prototype.mouseLeave=function(){var t=this.state.value,e=this.props,a=e.half,s=e.readOnly;s||(a&&this.setState({halfStar:{at:Math.floor(t),hidden:t%1===0}}),this.setState({stars:this.getStars()}))},e.prototype.handleClick=function(t){var e=this.props,a=e.half,s=e.readOnly,r=e.onChange,n=e.size;if(!s){var i,o=Number(t.target.getAttribute("data-index"));if(a){var l=this.moreThanHalf(t,n);l&&(o+=1),i=l?o:o+.5,this.setState({halfStar:{at:o,hidden:l}})}else i=o+=1;this.setState({value:i,stars:this.getStars(o)}),r&&r(i)}},e.prototype.renderStars=function(){var t=this,e=this.state,a=e.halfStar,r=e.stars,n=this.props,i=n.char,o=n.half,l=n.readOnly,h=n.classnames;return r.map(function(e,r){var n=h("Rating",{"Rating-half":o&&!a.hidden&&a.at===r,"is-active":e.active,"is-disabled":l});return s.default.createElement("span",{className:n,key:r,"data-index":r,"data-forhalf":i,onMouseOver:t.mouseOver,onMouseMove:t.mouseOver,onMouseLeave:t.mouseLeave,onClick:t.handleClick},i)})},e.prototype.render=function(){var t=this.props.className;return s.default.createElement("div",{className:r.default(t?t:"")},this.renderStars())},e.defaultProps={containerClass:"rating",readOnly:!1,half:!0,value:0,count:5,"char":"★",size:24},e}(s.default.Component);e.Rating=i,e.default=n.themeable(i)});
|
|||
|
;/*!src/components/Switch.tsx*/
|
|||
|
amis.define("aa2413a",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Switch=void 0;var l=e("node_modules/tslib/tslib"),n=l.__importDefault(e("node_modules/react/index")),t=e("256b65d"),i={md:"i-switch-md",lg:"i-switch-lg",middle:"i-switch-md",large:"i-switch-lg"},s={info:"bg-info",primary:"bg-primary",danger:"bg-danger"},d=function(e){function a(a){var l=e.call(this,a)||this;return l.hanldeCheck=l.hanldeCheck.bind(l),l}return l.__extends(a,e),a.prototype.hanldeCheck=function(e){var a=this.props,l=a.trueValue,n=a.falseValue,t=a.onChange;t&&t(e.currentTarget.checked?l:n)},a.prototype.render=function(){var e=this.props,a=e.size,t=e.level,d=e.className,r=(e.classPrefix,e.onChange,e.value),c=(e.inline,e.trueValue),u=(e.falseValue,e.disabled),o=e.readOnly,h=e.checked,f=e.classnames,m=l.__rest(e,["size","level","className","classPrefix","onChange","value","inline","trueValue","falseValue","disabled","readOnly","checked","classnames"]);return d=(d?d:"")+(a&&i[a]?" "+i[a]:"")+(t&&s[t]?" "+s[t]:""),n.default.createElement("label",{className:f("Switch",u?"is-disabled":"",d)},n.default.createElement("input",l.__assign({type:"checkbox",checked:"undefined"!=typeof h?h:"undefined"==typeof r?!1:r==c,onChange:this.hanldeCheck,disabled:u,readOnly:o},m)),n.default.createElement("i",null))},a.defaultProps={trueValue:!0,falseValue:!1},a}(n.default.PureComponent);a.Switch=d,a.default=t.themeable(d)});
|
|||
|
;/*!src/components/Textarea.tsx*/
|
|||
|
amis.define("05807e2",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=e("node_modules/tslib/tslib"),a=i.__importDefault(e("node_modules/react-textarea-autosize/lib/index"));t.default=a.default});
|
|||
|
;/*!src/components/TitleBar.tsx*/
|
|||
|
amis.define("06d307c",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),r=e("256b65d"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,a=e.title,r=e.titleClassName,s=e.right,i=e.classnames,d=a?l.default.createElement("div",{className:r},a):null,n=d;return n=s?l.default.createElement("div",{className:"hbox hbox-auto-xs h-auto"},l.default.createElement("div",{className:"col bg-light b-b wrapper"},d),l.default.createElement("div",{className:"col v-middle padder-md text-right bg-light b-b wrapper-sm"},s)):l.default.createElement("div",{className:"wrapper"},d),l.default.createElement("div",{className:i(t,"TitleBar")},n)},t.defaultProps={className:"bg-light lter b-b",title:"标题",titleClassName:"m-n font-thin h3",right:!1},t}(l.default.PureComponent);t.TitleBar=s,t.default=r.themeable(s)});
|
|||
|
;/*!src/components/Toast.tsx*/
|
|||
|
amis.define("6ae88e0",function(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.toast=e.ToastMessage=e.ToastComponent=void 0;var o=t("node_modules/tslib/tslib"),a=o.__importStar(t("node_modules/react-transition-group/Transition")),i=o.__importDefault(t("node_modules/react/index")),s=o.__importDefault(t("580df19")),r=t("9a80175"),l=t("256b65d"),d=t("b7bbd16"),u=t("5ab4e9d"),c=(n={},n[a.ENTERING]="in",n[a.ENTERED]="in",n[a.EXITING]="out",n),p=null,m=function(t,e,n,a){void 0===e&&(e=""),void 0===n&&(n={}),p&&p[a]&&p[a](t,e||"",o.__assign({},n))},_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasRendered=!1,e.state={items:[]},e}return o.__extends(e,t),e.prototype.componentDidMount=function(){this.hasRendered=!0,p=this},e.prototype.componentWillUnmount=function(){this.hasRendered&&(p=null)},e.prototype.notifiy=function(t,e,n,a){var i=this.state.items.concat();i.push(o.__assign(o.__assign({title:n,body:e,level:t},a),{id:r.uuid()})),this.setState({items:i})},e.prototype.success=function(t,e,n){this.notifiy("success",t,e,n)},e.prototype.error=function(t,e,n){this.notifiy("error",t,e,n)},e.prototype.info=function(t,e,n){this.notifiy("info",t,e,n)},e.prototype.warning=function(t,e,n){this.notifiy("warning",t,e,n)},e.prototype.handleDismissed=function(t){var e=this.state.items.concat();e.splice(t,1),this.setState({items:e})},e.prototype.render=function(){var t=this;if(p&&!this.hasRendered)return null;var e=this.props,n=e.classnames,o=e.className,a=e.timeout,s=e.position,r=e.showIcon,l=e.translate,d=e.closeButton,u=this.state.items;return i.default.createElement("div",{className:n("Toast-wrap Toast-wrap--"+s.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),o)},u.map(function(e,o){var s,u;return i.default.createElement(f,{classnames:n,key:e.id,title:e.title,body:e.body,level:e.level||"info",timeout:null!==(s=e.timeout)&&void 0!==s?s:a,closeButton:null!==(u=e.closeButton)&&void 0!==u?u:d,onDismiss:t.handleDismissed.bind(t,o),translate:l,showIcon:r})}))},e.defaultProps={position:"top-right",closeButton:!1,timeout:5e3},e.themeKey="toast",o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String,String,Object]),o.__metadata("design:returntype",void 0)],e.prototype,"success",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String,String,Object]),o.__metadata("design:returntype",void 0)],e.prototype,"error",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String,String,Object]),o.__metadata("design:returntype",void 0)],e.prototype,"info",null),o.__decorate([r.autobind,o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[String,String,Object]),o.__metadata("design:returntype",void 0)],e.prototype,"warning",null),e}(i.default.Component);e.ToastComponent=_,e.default=l.themeable(u.localeable(_));var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={visible:!1},e.mounted=!1,e}return o.__extends(e,t),e.prototype.componentDidMount=function(){this.mounted=!0,this.setState({visible:!0})},e.prototype.componentWillUnmount=function(){clearTimeout(this.timer),this.mounted=!1},e.prototype.handleMouseEnter=function(){clearTimeout(this.timer)},e.prototype.handleMouseLeave=function(){this.handleEntered()},e.prototype.handleEntered=function(){var t=this.props.timeout;this.mounted&&t&&(this.timer=setTimeout(this.close,t))},e.prototype.close=function(){clearTimeout(this.timer),this.setState({visible:!1})},e.prototype.render=function(){var t=this,e=this.props,n=e.onDismiss,o=e.classnames,l=e.closeButton,u=e.title,p=e.body,m=e.allowHtml,_=e.level,f=e.showIcon,y=e.translate;return i.default.createElement(a.default,{mountOnEnter:!0,unmountOnExit:!0,"in":this.state.visible,timeout:750,onEntered:this.handleEntered,onExited:n},function(e){return i.default.createElement("div",{className:o("Toast Toast--"+_,c[e]),onMouseEnter:t.handleMouseEnter,onMouseLeave:t.handleMouseLeave,onClick:l?r.noop:t.
|
|||
|
;/*!src/components/Tree.tsx*/
|
|||
|
amis.define("d233af4",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeSelector=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=e("9a80175"),i=e("d57879c"),d=e("256b65d"),o=e("b86428a"),r=e("b7bbd16"),s=a.__importDefault(e("0a43d97")),c=e("5ab4e9d"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a.__extends(t,e),t.prototype.componentWillMount=function(){var e=this.props;this.setState({value:i.value2array(e.value,{multiple:e.multiple,delimiter:e.delimiter,valueField:e.valueField,options:e.options}),unfolded:this.syncUnFolded(e),inputValue:"",addingParent:null,isAdding:!1,isEditing:!1,editingItem:null})},t.prototype.componentWillReceiveProps=function(e){var t={};(this.props.value!==e.value||this.props.options!==e.options)&&(t.value=i.value2array(e.value,{multiple:e.multiple,delimiter:e.delimiter,valueField:e.valueField,options:e.options})),this.props.options!==e.options&&(t.unfolded=this.syncUnFolded(e)),this.setState(t)},t.prototype.syncUnFolded=function(e){var t={},a=this.props,n=a.foldedField,i=a.unfoldedField;return l.eachTree(e.options,function(a,l,d){if(a.children&&a.children.length){var o=!0;i&&"undefined"!=typeof a[i]?o=!!a[i]:n&&"undefined"!=typeof a[n]?o=!a[n]:(o=!!e.initiallyOpen,!o&&d<=e.unfoldedLevel&&(o=!0)),t[a[e.valueField]]=o}}),t},t.prototype.toggleUnfolded=function(e){var t;this.setState({unfolded:a.__assign(a.__assign({},this.state.unfolded),(t={},t[e[this.props.valueField]]=!this.state.unfolded[e[this.props.valueField]],t))})},t.prototype.clearSelect=function(){var e=this;this.setState({value:[]},function(){var t=e.props,a=t.joinValues,n=t.rootValue,l=t.onChange;l(a?n:[])})},t.prototype.handleSelect=function(e){var t=this;this.setState({value:[e]},function(){var a=t.props,n=a.joinValues,l=a.valueField,i=a.onChange;i(n?e[l]:e)})},t.prototype.handleCheck=function(e,t){var a=this,n=this.props,l=this.state.value.concat(),i=l.indexOf(e),d=this.props.onlyChildren;if(t){if(~i||l.push(e),!n.cascade){var o=e.children?e.children.concat([]):[];if(d)for(!~i&&o.length&&l.pop();o.length;){var r=o.shift(),s=l.indexOf(r);~s||"undefined"===r.value||l.push(r),r.children&&o.push.apply(o,r.children)}else for(;o.length;){var r=o.shift(),s=l.indexOf(r);~s&&l.splice(s,1),n.withChildren&&l.push(r),r.children&&r.children.length&&o.push.apply(o,r.children)}}}else if(~i&&l.splice(i,1),!n.cascade&&(n.withChildren||d))for(var o=e.children?e.children.concat([]):[];o.length;){var r=o.shift(),s=l.indexOf(r);~s&&l.splice(s,1),r.children&&r.children.length&&o.push.apply(o,r.children)}this.setState({value:l},function(){var e=a.props,t=e.joinValues,n=e.extractValue,i=e.valueField,d=e.delimiter,o=e.onChange;o(t?l.map(function(e){return e[i]}).join(d):n?l.map(function(e){return e[i]}):l)})},t.prototype.handleAdd=function(e){void 0===e&&(e=null);var t=this.props,a=t.bultinCUD,n=t.onAdd,i=t.options,d=void 0;return a?void this.setState({isEditing:!1,isAdding:!0,addingParent:e}):(d=e?l.findTreeIndex(i,function(t){return t===e}):void 0,n&&n(d))},t.prototype.handleEdit=function(e){var t=this.props.labelField;this.setState({isEditing:!0,isAdding:!1,editingItem:e,inputValue:e[t]})},t.prototype.handleRemove=function(e){var t=this.props.onDelete;t&&t(e)},t.prototype.handleInputChange=function(e){this.setState({inputValue:e.currentTarget.value})},t.prototype.handleConfirm=function(){var e=this.state,t=e.inputValue,n=e.isAdding,i=e.addingParent,d=e.editingItem,o=e.isEditing;if(t){var r=this.props,s=r.labelField,c=r.onAdd,u=r.options,p=r.onEdit;this.setState({inputValue:"",isAdding:!1,isEditing:!1},function(){var e,r;if(n&&c){var m=i&&l.findTreeIndex(u,function(e){return e===i})||[];c(m.concat(0),(e={},e[s]=t,e),!0)}else o&&p&&p(a.__assign(a.__assign({},d),(r={},r[s]=t,r)),d,!0)})}},t.prototype.handleCancel=function(){this.setState({inputValue:"",isAdding:!1,isEditing:!1})},t.prototype.renderInput=function(e){void 0===e&&(e=null);var t=this.props,a=t.classnames,l=t.translate,i=this.state.inputValue;return n.default.createElement("div",{className
|
|||
|
;/*!src/components/ResultList.tsx*/
|
|||
|
amis.define("bb67122",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResultList=void 0;var l=e("node_modules/tslib/tslib"),n=l.__importDefault(e("node_modules/react/index")),a=e("256b65d"),o=e("b7bbd16"),i=e("9a80175"),s=l.__importDefault(e("node_modules/sortablejs/Sortable")),d=e("node_modules/react-dom/index"),r=e("5ab4e9d"),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.id=i.guid(),t}l.__extends(t,e),t.prototype.componentDidMount=function(){this.props.sortable&&this.initSortable()},t.prototype.componentDidUpdate=function(){this.props.sortable?this.sortable||this.initSortable():this.desposeSortable()},t.prototype.componentWillUnmount=function(){this.desposeSortable()},t.prototype.handleRemove=function(e){var t=parseInt(e.currentTarget.getAttribute("data-index"),10),l=this.props,n=l.value,a=l.onChange;if(Array.isArray(n)){var o=n.concat();o.splice(t,1),null===a||void 0===a?void 0:a(o)}},t.prototype.initSortable=function(){var e=this,t=this.props.classPrefix,l=d.findDOMNode(this),n=l.querySelector("."+t+"Selections-items");n&&(this.sortable=new s.default(n,{group:"selections-"+this.id,animation:150,handle:"."+t+"Selections-dragbar",ghostClass:t+"Selections-item--dragging",onEnd:function(t){var l,n;if(t.newIndex!==t.oldIndex){var a=t.to;t.newIndex<t.oldIndex&&t.oldIndex<a.childNodes.length-1?a.insertBefore(t.item,a.childNodes[t.oldIndex+1]):t.oldIndex<a.childNodes.length-1?a.insertBefore(t.item,a.childNodes[t.oldIndex]):a.appendChild(t.item);var o=e.props.value;if(Array.isArray(o)){var i=o.concat();i.splice(t.newIndex,0,i.splice(t.oldIndex,1)[0]),null===(n=(l=e.props).onChange)||void 0===n?void 0:n.call(l,i)}}}}))},t.prototype.desposeSortable=function(){var e;null===(e=this.sortable)||void 0===e?void 0:e.destroy(),delete this.sortable},t.prototype.render=function(){var e=this,t=this.props,l=t.classnames,a=t.className,i=t.value,s=t.placeholder,d=t.itemRender,r=t.disabled,c=t.title,u=t.itemClassName,p=t.sortable,m=t.translate;return n.default.createElement("div",{className:l("Selections",a)},c?n.default.createElement("div",{className:l("Selections-title")},c):null,Array.isArray(i)&&i.length?n.default.createElement("div",{className:l("Selections-items")},i.map(function(t,a){return n.default.createElement("div",{className:l("Selections-item",u,null===t||void 0===t?void 0:t.className),key:a},p&&!r&&i.length>1?n.default.createElement(o.Icon,{className:l("Selections-dragbar icon"),icon:"drag-bar"}):null,n.default.createElement("label",null,d(t)),r?null:n.default.createElement("a",{className:l("Selections-delBtn"),"data-index":a,onClick:e.handleRemove},n.default.createElement(o.Icon,{icon:"close",className:"icon"})))})):n.default.createElement("div",{className:l("Selections-placeholder")},m(s)))};var a;return t.defaultProps={placeholder:"请先选择数据",itemRender:function(e){return n.default.createElement("span",null,""+(e.scopeLabel||"")+e.label)}},l.__decorate([i.autobind,l.__metadata("design:type",Function),l.__metadata("design:paramtypes",["function"==typeof(a="undefined"!=typeof n.default&&n.default.MouseEvent)?a:Object]),l.__metadata("design:returntype",void 0)],t.prototype,"handleRemove",null),t}(n.default.Component);t.ResultList=c,t.default=a.themeable(r.localeable(c))});
|
|||
|
;/*!src/components/TableCheckboxes.tsx*/
|
|||
|
amis.define("899a736",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableCheckboxes=void 0;var a=e("node_modules/tslib/tslib"),l=e("f203847"),n=e("256b65d"),r=a.__importDefault(e("node_modules/react/index")),s=e("node_modules/uncontrollable/cjs/index"),o=a.__importDefault(e("0a43d97")),u=e("f2e345e"),c=e("5ab4e9d"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.getColumns=function(){var e=this.props.columns;return Array.isArray(e)&&e.length||(e=[{label:"Label",name:"label"}]),e},t.prototype.renderTHead=function(){var e=this.props,t=e.options,a=e.classnames,n=e.value,s=e.option2value,u=this.getColumns(),c=l.BaseCheckboxes.value2array(n,t,s),d=t.filter(function(e){return!e.disabled}),i=!1,m=!!d.length;return d.forEach(function(e){var t=!!~c.indexOf(e);t&&!i?i=!0:!t&&m&&(m=!1)}),r.default.createElement("thead",null,r.default.createElement("tr",null,Array.isArray(t)&&t.length?r.default.createElement("th",{className:a("Table-checkCell")},r.default.createElement(o.default,{size:"sm",onChange:this.toggleAll,checked:i,partial:i&&!m})):null,u.map(function(e,t){return r.default.createElement("th",{key:t},e.label)})))},t.prototype.renderTBody=function(){var e=this,t=this.props,a=t.options,n=t.placeholder,s=t.classnames,u=t.cellRender,c=t.value,d=t.option2value,i=t.translate,m=this.getColumns(),f=l.BaseCheckboxes.value2array(c,a,d);return r.default.createElement("tbody",null,Array.isArray(a)&&a.length?a.map(function(t,a){var l=-1!==f.indexOf(t);return r.default.createElement("tr",{key:a,onClick:function(a){return a.defaultPrevented||e.toggleOption(t)}},r.default.createElement("td",{className:s("Table-checkCell")},r.default.createElement(o.default,{size:"sm",checked:l})),m.map(function(e,l){return r.default.createElement("td",{key:l},u(e,t,l,a))}))}):r.default.createElement("tr",null,r.default.createElement("td",{colSpan:m.length},i(n))))},t.prototype.render=function(){var e=this,t=this.props,a=t.value,n=t.options,s=t.className,u=t.labelClassName,c=t.disabled,d=t.classnames,i=t.option2value,m=t.itemClassName,f=t.itemRender,b=l.BaseCheckboxes.value2array(a,n,i),h=[];return Array.isArray(n)&&n.length&&(h=n.map(function(t,a){return r.default.createElement("div",{key:a,className:d("TableCheckboxes-item",m,t.className,c||t.disabled?"is-disabled":""),onClick:function(){return e.toggleOption(t)}},r.default.createElement("div",{className:d("TableCheckboxes-itemLabel")},f(t)),r.default.createElement(o.default,{size:"sm",checked:!!~b.indexOf(t),disabled:c||t.disabled,labelClassName:u,description:t.description}))})),r.default.createElement("div",{className:d("TableCheckboxes",s)},r.default.createElement("div",{className:d("Table-content")},r.default.createElement("table",{className:d("Table-table")},this.renderTHead(),this.renderTBody())))},t.defaultProps=a.__assign(a.__assign({},l.BaseCheckboxes.defaultProps),{cellRender:function(e,t){return r.default.createElement("span",null,u.resolveVariable(e.name,t))}}),t}(l.BaseCheckboxes);t.TableCheckboxes=d,t.default=n.themeable(c.localeable(s.uncontrollable(d,{value:"onChange"})))});
|
|||
|
;/*!src/components/ListCheckboxes.tsx*/
|
|||
|
amis.define("0afdbca",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ListCheckboxes=void 0;var t=e("node_modules/tslib/tslib"),s=e("f203847"),l=e("256b65d"),i=t.__importDefault(e("node_modules/react/index")),r=e("node_modules/uncontrollable/cjs/index"),n=t.__importDefault(e("0a43d97")),o=e("5ab4e9d"),c=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a.prototype.renderOption=function(e,a){var t=this,s=this.props,l=s.labelClassName,r=s.disabled,o=s.classnames,c=s.itemClassName,d=s.itemRender,u=this.valueArray;return Array.isArray(e.children)?i.default.createElement("div",{key:a,className:o("ListCheckboxes-group",e.className)},i.default.createElement("div",{className:o("ListCheckboxes-itemLabel")},d(e)),i.default.createElement("div",{className:o("ListCheckboxes-items",e.className)},e.children.map(function(e,a){return t.renderOption(e,a)}))):i.default.createElement("div",{key:a,className:o("ListCheckboxes-item",c,e.className,r||e.disabled?"is-disabled":""),onClick:function(){return t.toggleOption(e)}},i.default.createElement("div",{className:o("ListCheckboxes-itemLabel")},d(e)),i.default.createElement(n.default,{size:"sm",checked:!!~u.indexOf(e),disabled:r||e.disabled,labelClassName:l,description:e.description}))},a.prototype.render=function(){var e=this,a=this.props,t=a.value,l=a.options,r=a.className,n=a.placeholder,o=a.classnames,c=a.option2value,d=this.props.translate;this.valueArray=s.BaseCheckboxes.value2array(t,l,c);var u=[];return Array.isArray(l)&&l.length&&(u=l.map(function(a,t){return e.renderOption(a,t)})),i.default.createElement("div",{className:o("ListCheckboxes",r)},u&&u.length?u:i.default.createElement("div",{className:o("ListCheckboxes-placeholder")},d(n)))},a}(s.BaseCheckboxes);a.ListCheckboxes=c,a.default=l.themeable(o.localeable(r.uncontrollable(c,{value:"onChange"})))});
|
|||
|
;/*!src/components/TreeCheckboxes.tsx*/
|
|||
|
amis.define("832511b",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.TreeCheckboxes=void 0;var r=e("node_modules/tslib/tslib"),t=e("f203847"),n=e("256b65d"),i=r.__importDefault(e("node_modules/react/index")),l=e("node_modules/uncontrollable/cjs/index"),s=r.__importDefault(e("0a43d97")),o=e("9a80175"),d=r.__importDefault(e("acad559")),c=e("5ab4e9d"),u=e("b7bbd16"),p=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.state={expanded:[]},a}return r.__extends(a,e),a.prototype.componentDidMount=function(){this.syncExpanded()},a.prototype.componentDidUpdate=function(e){var a=this.props;this.state.expanded.length||a.expand===e.expand&&a.options===e.options||this.syncExpanded()},a.prototype.syncExpanded=function(){var e=this.props.options,a=this.props.expand,r=[];Array.isArray(e)&&("first"===a||"root"===a?e.every(function(e,t){return Array.isArray(e.children)?(r.push(""+t),"root"===a):!0}):"all"===a&&o.everyTree(e,function(e,a,t,n,i){return Array.isArray(e.children)&&r.push(""+i.concat(a).join("-")),!0}),this.setState({expanded:r}))},a.prototype.toggleOption=function(e){var a=this.props,r=a.value,n=a.onChange,i=a.option2value,l=a.options,s=a.onDeferLoad;if(!e.disabled){if(e.defer&&!e.loaded)return void(null===s||void 0===s?void 0:s(e));var o=t.BaseCheckboxes.value2array(r,l,i);if(void 0===e.value&&Array.isArray(e.children)&&e.children.length){var d=function(e){return(Array.isArray(e.children)&&e.children.length?e.children.some(d):!1)||void 0!==e.value&&~o.indexOf(e)},c=e.children.some(d),u=function(e){if(Array.isArray(e.children)&&e.children.length&&e.children.forEach(u),void 0!==e.value){var a=o.indexOf(e);~a&&o.splice(a,1),c||o.push(e)}};e.children.forEach(u)}else{var p=o.indexOf(e);~p?o.splice(p,1):o.push(e)}var h=i?o.map(function(e){return i(e)}):o;n&&n(h)}},a.prototype.toggleCollapsed=function(e,a){var r=this.props.onDeferLoad,t=this.state.expanded.concat(),n=t.indexOf(a);~n?t.splice(n,1):t.push(a),this.setState({expanded:t},e.defer&&r?function(){return r(e)}:void 0)},a.prototype.renderItem=function(e,a,r){var t=this;void 0===r&&(r=[]);var n=this.props,l=n.labelClassName,o=n.disabled,c=n.classnames,p=n.itemClassName,h=n.itemRender,f=r.join("-"),v=this.valueArray,m=!1,b=!1,x=Array.isArray(e.children)&&e.children.length;if(void 0===e.value&&x){var y=!0,g=!1,C=function(e){if(Array.isArray(e.children)&&e.children.length&&e.children.forEach(C),void 0!==e.value){var a=!!~v.indexOf(e);a&&!g?g=!0:!a&&y&&(y=!1),b=g,m=g&&!y}};e.children.forEach(C)}else b=!!~v.indexOf(e);var A=!!~this.state.expanded.indexOf(f);return i.default.createElement("div",{key:a,className:c("TreeCheckboxes-item",o||e.disabled||e.defer&&e.loading?"is-disabled":"",A?"is-expanded":"")},i.default.createElement("div",{className:c("TreeCheckboxes-itemInner",p,e.className),onClick:function(){return t.toggleOption(e)}},x||e.defer?i.default.createElement("a",{onClick:function(a){a.stopPropagation(),t.toggleCollapsed(e,f)},className:c("Table-expandBtn",A?"is-active":"")},i.default.createElement(u.Icon,{icon:"right-arrow-bold",className:"icon"})):null,i.default.createElement("div",{className:c("TreeCheckboxes-itemLabel")},h(e)),e.defer&&e.loading?i.default.createElement(d.default,{show:!0,size:"sm"}):null,!e.defer||e.loaded?i.default.createElement(s.default,{size:"sm",checked:b,partial:m,disabled:o||e.disabled,labelClassName:l,description:e.description}):null),x?i.default.createElement("div",{className:c("TreeCheckboxes-sublist")},e.children.map(function(e,a){return t.renderItem(e,a,r.concat(a))})):null)},a.prototype.render=function(){var e=this,a=this.props,r=a.value,n=a.options,l=a.className,s=a.placeholder,o=a.classnames,d=a.option2value,c=a.translate;this.valueArray=t.BaseCheckboxes.value2array(r,n,d);var u=[];return Array.isArray(n)&&n.length&&(u=n.map(function(a,r){return e.renderItem(a,r,[r])})),i.default.createElement("div",{className:o("TreeCheckboxes",l)},u&&u.length?u:i.default.createElement("div",{className:o("TreeCheckboxes-placeholder")},c(s)))},a.defaultProps=r.__assign(r.__assign({},t.BaseCheckb
|
|||
|
;/*!src/components/InputBox.tsx*/
|
|||
|
amis.define("fe0e0e4",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputBox=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),o=e("256b65d"),s=a.__importDefault(e("4ee46ff")),l=e("9a80175"),r=e("b7bbd16"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isFocused:!1},t}a.__extends(t,e),t.prototype.clearValue=function(e){e.preventDefault();var t=this.props.onChange,a=this.props.onChange;null===t||void 0===t?void 0:t(e),null===a||void 0===a?void 0:a("")},t.prototype.handleChange=function(e){var t=this.props.onChange;t&&t(e.currentTarget.value)},t.prototype.handleFocus=function(e){var t=this.props.onFocus;t&&t(e),this.setState({isFocused:!0})},t.prototype.handleBlur=function(e){var t=this.props.onBlur;t&&t(e),this.setState({isFocused:!1})},t.prototype.render=function(){var e=this.props,t=e.className,o=e.classnames,l=(e.classPrefix,e.clearable),d=e.disabled,i=e.hasError,u=e.value,c=e.placeholder,p=e.prefix,_=e.children,h=a.__rest(e,["className","classnames","classPrefix","clearable","disabled","hasError","value","placeholder","prefix","children"]),f=this.state.isFocused;return n.default.createElement("div",{className:o("InputBox",t,f?"is-focused":"",d?"is-disabled":"",i?"is-error":"",h.onClick?"is-clickable":"")},p,n.default.createElement(s.default,a.__assign({},h,{value:u||"",onChange:this.handleChange,placeholder:c,onFocus:this.handleFocus,onBlur:this.handleBlur,size:12})),_,l&&!d&&u?n.default.createElement("a",{onClick:this.clearValue,className:o("InputBox-clear")},n.default.createElement(r.Icon,{icon:"close",className:"icon"})):null)};var o;return t.defaultProps={clearable:!0,placeholder:""},a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"clearValue",null),a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof n.default&&n.default.ChangeEvent)?o:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),t}(n.default.Component);t.InputBox=d,t.default=o.themeable(d)});
|
|||
|
;/*!src/components/ChainedCheckboxes.tsx*/
|
|||
|
amis.define("5b21367",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainedCheckboxes=void 0;var a=e("node_modules/tslib/tslib"),l=e("f203847"),s=e("256b65d"),n=a.__importDefault(e("node_modules/react/index")),i=e("node_modules/uncontrollable/cjs/index"),d=a.__importDefault(e("0a43d97")),o=e("9a80175"),r=a.__importDefault(e("node_modules/lodash/times")),c=a.__importDefault(e("acad559")),u=e("5ab4e9d"),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={selected:[]},t}return a.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props.defaultSelectedIndex;void 0!==e&&this.setState({selected:[""+e]})},t.prototype.selectOption=function(e,t,a){var l=this.props.onDeferLoad,s=this.state.selected.concat();s.splice(t,s.length-t),s.push(a),this.setState({selected:s},e.defer&&l?function(){return l(e)}:void 0)},t.prototype.renderOption=function(e,t,a,l){var s=this,i=this.props,o=i.labelClassName,r=i.disabled,u=i.classnames,h=i.itemClassName,m=i.itemRender,p=this.valueArray;return Array.isArray(e.children)||e.defer?n.default.createElement("div",{key:t,className:u("ChainedCheckboxes-item",h,e.className,r||e.disabled?"is-disabled":"",~this.state.selected.indexOf(l)?"is-active":""),onClick:function(){return s.selectOption(e,a,l)}},n.default.createElement("div",{className:u("ChainedCheckboxes-itemLabel")},m(e)),e.defer&&e.loading?n.default.createElement(c.default,{size:"sm",show:!0}):null):n.default.createElement("div",{key:t,className:u("ChainedCheckboxes-item",h,e.className,r||e.disabled?"is-disabled":""),onClick:function(){return s.toggleOption(e)}},n.default.createElement("div",{className:u("ChainedCheckboxes-itemLabel")},m(e)),n.default.createElement(d.default,{size:"sm",checked:!!~p.indexOf(e),disabled:r||e.disabled,labelClassName:o,description:e.description}))},t.prototype.render=function(){var e=this,t=this.props,a=t.value,s=t.options,i=t.className,d=t.placeholder,c=t.classnames,u=t.option2value,h=(t.itemRender,t.translate);this.valueArray=l.BaseCheckboxes.value2array(a,s,u);var m=[];if(Array.isArray(s)&&s.length){var p=this.state.selected.concat(),f=Math.min(o.getTreeDepth(s),3);r.default(Math.max(f-p.length,1),function(){return p.push(null)}),p.reduce(function(t,a,l){var s=t.body,i=t.options,d=t.subTitle,o=t.indexes,r=t.placeholder,u=[],m="",p="",f=o;return s.push(n.default.createElement("div",{key:l,className:c("ChainedCheckboxes-col")},d?n.default.createElement("div",{className:c("ChainedCheckboxes-subTitle")},d):null,Array.isArray(i)&&i.length?i.map(function(t,s){var n=o.concat(s).join("-");return n===a&&(m=t.subTitle,u=t.children,f=o.concat(s),p=t.placeholder),e.renderOption(t,s,l,n)}):n.default.createElement("div",{className:c("ChainedCheckboxes-placeholder")},h(r)))),{options:u,subTitle:m,placeholder:p,indexes:f,body:s}},{options:s,body:m,indexes:[],placeholder:d})}return n.default.createElement("div",{className:c("ChainedCheckboxes",i)},m&&m.length?m:n.default.createElement("div",{className:c("ChainedCheckboxes-placeholder")},h(d)))},t}(l.BaseCheckboxes);t.ChainedCheckboxes=h,t.default=s.themeable(u.localeable(i.uncontrollable(h,{value:"onChange"})))});
|
|||
|
;/*!src/components/ListRadios.tsx*/
|
|||
|
amis.define("aff578b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListRadios=t.BaseRadios=void 0;var a=e("node_modules/tslib/tslib"),n=e("256b65d"),l=a.__importDefault(e("node_modules/react/index")),i=e("node_modules/uncontrollable/cjs/index"),s=a.__importDefault(e("0a43d97")),o=e("d57879c"),r=e("9a80175"),d=a.__importDefault(e("node_modules/lodash/isEqual")),u=e("5ab4e9d"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a.__extends(t,e),t.resolveSelected=function(e,t,a){return void 0===a&&(a=function(e){return e}),r.findTree(t,function(t){return d.default(a(t),e)})},t.prototype.toggleOption=function(e){var a=this.props,n=a.onChange,l=a.clearable,i=a.value,s=a.options,o=a.option2value,r=e;if(l){var d=t.resolveSelected(i,s,o);d&&(r=null)}null===n||void 0===n?void 0:n(r&&o?o(r):r)},t.prototype.renderOption=function(e,t){var a=this,n=this.props,i=n.disabled,o=n.classnames,r=n.itemClassName,d=n.itemRender,u=n.showRadio,c=this.selected;return Array.isArray(e.children)?l.default.createElement("div",{key:t,className:o("ListRadios-group",e.className)},l.default.createElement("div",{className:o("ListRadios-itemLabel")},d(e)),l.default.createElement("div",{className:o("ListRadios-items",e.className)},e.children.map(function(e,t){return a.renderOption(e,t)}))):l.default.createElement("div",{key:t,className:o("ListRadios-item",r,e.className,i||e.disabled?"is-disabled":"",c===e?"is-active":""),onClick:function(){return a.toggleOption(e)}},l.default.createElement("div",{className:o("ListRadios-itemLabel")},d(e)),u!==!1?l.default.createElement(s.default,{type:"radio",size:"sm",checked:c===e,disabled:i||e.disabled}):null)},t.prototype.render=function(){var e=this,a=this.props,n=a.value,i=a.options,s=a.className,o=a.placeholder,r=a.classnames,d=a.option2value,u=a.onClick,c=this.props.translate;this.selected=t.resolveSelected(n,i,d);var p=[];return Array.isArray(i)&&i.length&&(p=i.map(function(t,a){return e.renderOption(t,a)})),l.default.createElement("div",{className:r("ListRadios",s),onClick:u},p&&p.length?p:l.default.createElement("div",{className:r("ListRadios-placeholder")},c(o)))};var n;return t.defaultProps={placeholder:"暂无选项",itemRender:function(e){return l.default.createElement("span",null,e.label)}},a.__decorate([r.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(n="undefined"!=typeof o.Option&&o.Option)?n:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"toggleOption",null),t}(l.default.Component);t.BaseRadios=c;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t}(c);t.ListRadios=p;var m=n.themeable(u.localeable(i.uncontrollable(p,{value:"onChange"})));m.resolveSelected=c.resolveSelected,t.default=m});
|
|||
|
;/*!src/components/TreeRadios.tsx*/
|
|||
|
amis.define("5281626",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeRadios=void 0;var a=e("node_modules/tslib/tslib"),n=e("256b65d"),s=a.__importDefault(e("node_modules/react/index")),r=e("node_modules/uncontrollable/cjs/index"),i=a.__importDefault(e("0a43d97")),d=e("9a80175"),o=a.__importDefault(e("acad559")),l=e("aff578b"),c=e("5ab4e9d"),p=e("b7bbd16"),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={expanded:[]},t}return a.__extends(t,e),t.prototype.componentDidMount=function(){this.syncExpanded()},t.prototype.componentDidUpdate=function(e){var t=this.props;this.state.expanded.length||t.expand===e.expand&&t.options===e.options||this.syncExpanded()},t.prototype.syncExpanded=function(){var e=this.props.options,t=this.props.expand,a=[];Array.isArray(e)&&("first"===t||"root"===t?e.every(function(e,n){return Array.isArray(e.children)?(a.push(""+n),"root"===t):!0}):"all"===t&&d.everyTree(e,function(e,t,n,s,r){return Array.isArray(e.children)&&a.push(""+r.concat(t).join("-")),!0}),this.setState({expanded:a}))},t.prototype.toggleCollapsed=function(e,t){var a=this.props.onDeferLoad,n=this.state.expanded.concat(),s=n.indexOf(t);~s?n.splice(s,1):n.push(t),this.setState({expanded:n},e.defer&&a?function(){return a(e)}:void 0)},t.prototype.renderItem=function(e,t,a){var n=this;void 0===a&&(a=[]);var r=this.props,d=r.disabled,l=r.classnames,c=r.itemClassName,u=r.itemRender,f=r.showRadio,m=a.join("-"),h=Array.isArray(e.children)&&e.children.length,v=e===this.selected,y=!!~this.state.expanded.indexOf(m);return s.default.createElement("div",{key:t,className:l("TreeRadios-item",d||e.disabled||e.defer&&e.loading?"is-disabled":"",y?"is-expanded":"",v?"is-active":"")},s.default.createElement("div",{className:l("TreeRadios-itemInner",c,e.className,v?"is-active":""),onClick:function(){return n.toggleOption(e)}},h||e.defer?s.default.createElement("a",{onClick:function(t){t.stopPropagation(),n.toggleCollapsed(e,m)},className:l("Table-expandBtn",y?"is-active":"")},s.default.createElement(p.Icon,{icon:"right-arrow-bold",className:"icon"})):null,s.default.createElement("div",{className:l("TreeRadios-itemLabel")},u(e)),e.defer&&e.loading?s.default.createElement(o.default,{show:!0,size:"sm"}):null,e.defer&&!e.loaded||void 0===e.value||f===!1?null:s.default.createElement(i.default,{type:"radio",size:"sm",checked:v,disabled:d||e.disabled})),h?s.default.createElement("div",{className:l("TreeRadios-sublist")},e.children.map(function(e,t){return n.renderItem(e,t,a.concat(t))})):null)},t.prototype.render=function(){var e=this,t=this.props,a=t.value,n=t.options,r=t.className,i=t.placeholder,d=t.classnames,o=t.option2value,c=t.translate;this.selected=l.BaseRadios.resolveSelected(a,n,o);var p=[];return Array.isArray(n)&&n.length&&(p=n.map(function(t,a){return e.renderItem(t,a,[a])})),s.default.createElement("div",{className:d("TreeRadios",r)},p&&p.length?p:s.default.createElement("div",{className:d("TreeRadios-placeholder")},c(i)))},t.defaultProps=a.__assign(a.__assign({},l.BaseRadios.defaultProps),{expand:"first"}),t}(l.BaseRadios);t.TreeRadios=u,t.default=n.themeable(c.localeable(r.uncontrollable(u,{value:"onChange"})))});
|
|||
|
;/*!src/components/AssociatedCheckboxes.tsx*/
|
|||
|
amis.define("5e86ffe",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssociatedCheckboxes=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),o=e("f203847"),n=e("d57879c"),i=e("9a80175"),s=a.__importDefault(e("aff578b")),d=e("256b65d"),u=e("node_modules/uncontrollable/cjs/index"),r=a.__importDefault(e("0afdbca")),c=a.__importDefault(e("899a736")),f=a.__importDefault(e("832511b")),p=a.__importDefault(e("5b21367")),h=a.__importDefault(e("5281626")),m=e("b7bbd16"),v=e("5ab4e9d"),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={leftValue:t.props.leftDefaultValue},t}a.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.state.leftValue,t=this.props,a=t.options,l=t.onDeferLoad;if(e){var o=s.default.resolveSelected(e,a,function(e){return e.ref});o&&l&&o.defer&&l(o)}},t.prototype.leftOption2Value=function(e){return e.value},t.prototype.handleLeftSelect=function(e){var t=this.props,a=t.options,l=t.onDeferLoad;this.setState({leftValue:e});var o=s.default.resolveSelected(e,a,function(e){return e.ref});o&&l&&o.defer&&l(o)},t.prototype.handleRetry=function(e){var t=this.props.onDeferLoad;null===t||void 0===t?void 0:t(e)},t.prototype.render=function(){var e=this.props,t=e.classnames,a=e.className,o=e.leftOptions,n=e.options,i=e.option2value,d=e.rightMode,u=e.onChange,v=e.columns,_=e.value,b=e.leftMode,y=e.cellRender,g=s.default.resolveSelected(this.state.leftValue,n,function(e){return e.ref}),C=this.props.translate;return l.default.createElement("div",{className:t("AssociatedCheckboxes",a)},l.default.createElement("div",{className:t("AssociatedCheckboxes-left")},"tree"===b?l.default.createElement(h.default,{option2value:this.leftOption2Value,options:o,value:this.state.leftValue,onChange:this.handleLeftSelect,showRadio:!1}):l.default.createElement(s.default,{option2value:this.leftOption2Value,options:o,value:this.state.leftValue,onChange:this.handleLeftSelect,showRadio:!1})),l.default.createElement("div",{className:t("AssociatedCheckboxes-right")},this.state.leftValue?g?g.defer&&!g.loaded?l.default.createElement("div",{className:t("AssociatedCheckboxes-box")},l.default.createElement("div",{className:t("AssociatedCheckboxes-reload",g.loading?"is-spin":"is-clickable"),onClick:g.loading?void 0:this.handleRetry.bind(this,g)},l.default.createElement(m.Icon,{icon:"reload",className:"icon"})),g.loading?l.default.createElement("p",null,C("加载中")):l.default.createElement("p",null,C("点击刷新重新加载"))):"table"===d?l.default.createElement(c.default,{columns:v,value:_,options:g.children||[],onChange:u,option2value:i,cellRender:y}):"tree"===d?l.default.createElement(f.default,{value:_,options:g.children||[],onChange:u,option2value:i}):"chained"===d?l.default.createElement(p.default,{value:_,options:g.children||[],onChange:u,option2value:i}):l.default.createElement(r.default,{value:_,options:g.children||[],onChange:u,option2value:i}):l.default.createElement("div",{className:t("AssociatedCheckboxes-box")},C("配置错误,选项无法与左侧选项对应")):l.default.createElement("div",{className:t("AssociatedCheckboxes-box")},C("请先选择左侧数据"))))};var o,d;return a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof n.Option&&n.Option)?o:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"leftOption2Value",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(d="undefined"!=typeof n.Option&&n.Option)?d:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleLeftSelect",null),t}(o.BaseCheckboxes);t.AssociatedCheckboxes=_,t.default=d.themeable(v.localeable(u.uncontrollable(_,{value:"onChange"})))});
|
|||
|
;/*!src/components/Transfer.tsx*/
|
|||
|
amis.define("0573406",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Transfer=void 0;var t=e("node_modules/tslib/tslib"),l=t.__importDefault(e("node_modules/react/index")),n=e("256b65d"),r=e("f203847"),s=e("node_modules/uncontrollable/cjs/index"),o=t.__importDefault(e("bb67122")),c=t.__importDefault(e("899a736")),u=t.__importDefault(e("0afdbca")),i=t.__importDefault(e("832511b")),d=e("9a80175"),h=t.__importDefault(e("fe0e0e4")),f=e("b7bbd16"),p=t.__importDefault(e("node_modules/lodash/debounce")),m=t.__importDefault(e("5b21367")),v=t.__importDefault(e("5e86ffe")),_=e("5ab4e9d"),g=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.state={inputValue:"",searchResult:null},a.unmounted=!1,a.lazySearch=p.default(function(e){(function(e){return t.__awaiter(a,void 0,void 0,function(){var a,l,n=this;return t.__generator(this,function(t){switch(t.label){case 0:return a=this.props.onSearch,[4,a(e,function(e){return n.cancelSearch=e})];case 1:if(l=t.sent(),this.unmounted)return[2];if(!Array.isArray(l))throw new Error("onSearch 需要返回数组");return this.setState({searchResult:l}),[2]}})})})(e).catch(function(e){return console.error(e)})},250,{trailing:!0,leading:!1}),a}return t.__extends(a,e),a.prototype.componentWillUnmount=function(){this.lazySearch.cancel(),this.unmounted=!0},a.prototype.toggleAll=function(){var e=this.props,a=e.options,t=e.option2value,l=e.onChange,n=e.value,s=r.BaseCheckboxes.value2array(n,a,t),o=d.flattenTree(a).filter(function(e,a,t){return!e.disabled&&void 0!==e.value&&t.indexOf(e)===a});s=s.length<o.length?o:[];var c=t?s.map(function(e){return t(e)}):s;l&&l(c)},a.prototype.clearAll=function(){var e=this.props.onChange;e&&e([])},a.prototype.handleSearch=function(e){var a=this;this.setState({inputValue:e},function(){a.cancelSearch&&a.cancelSearch(),a.lazySearch(e)})},a.prototype.handleSeachCancel=function(){this.setState({inputValue:"",searchResult:null})},a.prototype.renderSelect=function(){var e=this.props,a=e.selectRender,n=e.selectMode,r=e.classnames,s=e.selectTitle,o=e.onSearch,c=e.disabled,u=e.options,i=e.statistics,d=e.translate;return a?a(t.__assign(t.__assign({},this.props),{onSearch:this.handleSearch,onSearchCancel:this.handleSeachCancel,searchResult:this.state.searchResult})):l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:r("Transfer-title","table"===n?"Transfer-title--light":"")},l.default.createElement("span",null,d(s),i!==!1?l.default.createElement("span",null,"(",this.valueArray.length,"/",this.availableOptions.length,")"):null),"table"!==n?l.default.createElement("a",{onClick:this.toggleAll,className:r("Transfer-checkAll",c||!u.length?"is-disabled":"")},d("全选")):null),o?l.default.createElement("div",{className:r("Transfer-search")},l.default.createElement(h.default,{value:this.state.inputValue,onChange:this.handleSearch,placeholder:d("请输入关键字"),clearable:!1},null!==this.state.searchResult?l.default.createElement("a",{onClick:this.handleSeachCancel},l.default.createElement(f.Icon,{icon:"close",className:"icon"})):l.default.createElement(f.Icon,{icon:"search",className:"icon"}))):null,null!==this.state.searchResult?this.renderSearchResult():this.renderOptions())},a.prototype.renderSearchResult=function(){var e=this.props,a=e.searchResultMode,t=e.selectMode,n=e.noResultsText,r=e.searchResultColumns,s=e.classnames,o=e.value,d=e.onChange,h=e.option2value,f=e.cellRender,p=this.state.searchResult||[],v=a||t;return"table"===v?l.default.createElement(c.default,{placeholder:n,className:s("Transfer-checkboxes"),columns:r,options:p,value:o,onChange:d,option2value:h,cellRender:f}):"tree"===v?l.default.createElement(i.default,{placeholder:n,className:s("Transfer-checkboxes"),options:p,value:o,onChange:d,option2value:h}):"chained"===v?l.default.createElement(m.default,{placeholder:n,className:s("Transfer-checkboxes"),options:p,value:o,onChange:d,option2value:h}):l.default.createElement(u.default,{placeholder:n,className:s("Transfer-checkboxes"),options:p,value:o,onChange:d,option2va
|
|||
|
;/*!src/components/SearchBox.tsx*/
|
|||
|
amis.define("3c38360",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SearchBox=void 0;var t=e("node_modules/tslib/tslib"),n=t.__importDefault(e("node_modules/react/index")),o=e("256b65d"),l=e("b7bbd16"),i=e("node_modules/uncontrollable/cjs/index"),d=e("9a80175"),c=e("5ab4e9d"),r=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.inputRef=n.default.createRef(),a}t.__extends(a,e),a.prototype.handleActive=function(){var e,a=this.props.onActiveChange;null===a||void 0===a?void 0:a(!0),null===(e=this.inputRef.current)||void 0===e?void 0:e.focus()},a.prototype.handleCancel=function(){var e=this.props,a=e.onActiveChange,t=e.onChange,n=e.onCancel;null===a||void 0===a?void 0:a(!1),null===n||void 0===n?void 0:n(),null===t||void 0===t?void 0:t("")},a.prototype.handleChange=function(e){var a=this.props,t=a.onChange,n=a.onSearch;null===t||void 0===t?void 0:t(e.currentTarget.value),null===n||void 0===n?void 0:n(e.currentTarget.value)},a.prototype.render=function(){var e=this.props,a=e.classnames,t=e.value,o=e.active,i=e.name,d=(e.onChange,e.placeholder),c=e.translate;return n.default.createElement("div",{className:a("SearchBox",o?"is-active":"")},n.default.createElement("input",{name:i,onChange:this.handleChange,value:t||"",placeholder:c(d||"输入关键字"),ref:this.inputRef}),o?n.default.createElement("a",{className:a("SearchBox-cancelBtn"),onClick:this.handleCancel},n.default.createElement(l.Icon,{icon:"close",className:"icon"})):n.default.createElement("a",{className:a("SearchBox-activeBtn"),onClick:this.handleActive},n.default.createElement(l.Icon,{icon:"search",className:"icon"})))};var o;return t.__decorate([d.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[]),t.__metadata("design:returntype",void 0)],a.prototype,"handleActive",null),t.__decorate([d.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[]),t.__metadata("design:returntype",void 0)],a.prototype,"handleCancel",null),t.__decorate([d.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof n.default&&n.default.ChangeEvent)?o:Object]),t.__metadata("design:returntype",void 0)],a.prototype,"handleChange",null),a}(n.default.Component);a.SearchBox=r,a.default=o.themeable(c.localeable(i.uncontrollable(r,{active:"onActiveChange",value:"onChange"})))});
|
|||
|
;/*!src/components/TabsTransfer.tsx*/
|
|||
|
amis.define("5c35784",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.TabsTransfer=void 0;var t=e("node_modules/tslib/tslib"),l=t.__importDefault(e("node_modules/react/index")),n=e("9a80175"),r=t.__importStar(e("8ac7656")),o=t.__importDefault(e("3c38360")),s=t.__importDefault(e("899a736")),c=t.__importDefault(e("832511b")),u=t.__importDefault(e("5b21367")),d=t.__importDefault(e("0afdbca")),f=t.__importDefault(e("0573406")),i=e("256b65d"),p=t.__importDefault(e("5e86ffe")),m=e("5ab4e9d"),h=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a.prototype.renderSearchResult=function(e){var a=this.props,t=a.searchResultMode,n=a.noResultsText,r=a.searchResultColumns,o=a.classnames,f=a.value,i=a.onChange,p=a.option2value,m=a.cellRender,h=e||[],b=t;return"table"===b?l.default.createElement(s.default,{placeholder:n,className:o("Transfer-checkboxes"),columns:r,options:h,value:f,onChange:i,option2value:p,cellRender:m}):"tree"===b?l.default.createElement(c.default,{placeholder:n,className:o("Transfer-checkboxes"),options:h,value:f,onChange:i,option2value:p}):"chained"===b?l.default.createElement(u.default,{placeholder:n,className:o("Transfer-checkboxes"),options:h,value:f,onChange:i,option2value:p}):l.default.createElement(d.default,{placeholder:n,className:o("Transfer-checkboxes"),options:h,value:f,onChange:i,option2value:p})},a.prototype.renderSelect=function(e){var a=e.onSearch,t=e.onSearchCancel,n=e.searchResult,f=this.props,i=f.options,m=f.placeholder,h=f.classnames,b=f.value,v=f.onChange,_=f.onSearch,T=f.option2value,g=f.onDeferLoad,E=f.cellRender,y=f.translate;return Array.isArray(i)&&i.length?l.default.createElement(r.default,{mode:"card",className:h("Transfer-tabs"),activeKey:null!==n?0:void 0,toolbar:_?l.default.createElement(l.default.Fragment,null,l.default.createElement("span",{className:h("TabsTransfer-tabsMid")}),l.default.createElement(o.default,{onSearch:a,onCancel:t})):null},null!==n?[l.default.createElement(r.Tab,{title:y("搜索结果"),key:0,eventKey:0},this.renderSearchResult(n))]:i.map(function(e,a){return l.default.createElement(r.Tab,{eventKey:a,key:a,title:e.label||e.title},"table"===e.selectMode?l.default.createElement(s.default,{className:h("Transfer-checkboxes"),columns:e.columns,options:e.children||[],value:b,onChange:v,option2value:T,onDeferLoad:g,cellRender:E}):"tree"===e.selectMode?l.default.createElement(c.default,{className:h("Transfer-checkboxes"),options:e.children||[],value:b,onChange:v,option2value:T,onDeferLoad:g}):"chained"===e.selectMode?l.default.createElement(u.default,{className:h("Transfer-checkboxes"),options:e.children||[],value:b,onChange:v,option2value:T,onDeferLoad:g,defaultSelectedIndex:e.defaultSelectedIndex}):"associated"===e.selectMode?l.default.createElement(p.default,{className:h("Transfer-checkboxes"),options:e.children||[],value:b,onChange:v,option2value:T,onDeferLoad:g,leftMode:e.leftMode,leftOptions:e.leftOptions,leftDefaultValue:e.leftDefaultValue}):l.default.createElement(d.default,{className:h("Transfer-checkboxes"),options:e.children||[],value:b,onChange:v,option2value:T,onDeferLoad:g}))})):l.default.createElement("div",{className:h("TabsTransfer-placeholder")},y(m||"暂无选项"))},a.prototype.render=function(){var e=this.props,a=e.className,n=e.classnames;return l.default.createElement(f.default,t.__assign({},this.props,{statistics:!1,className:n("TabsTransfer",a),selectRender:this.renderSelect}))},a.defaultProps={selectTitle:"请选择",resultTitle:"当前选择",itemRender:function(e){return l.default.createElement("span",null,e.label)}},t.__decorate([n.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[Object]),t.__metadata("design:returntype",void 0)],a.prototype,"renderSelect",null),a}(l.default.Component);a.TabsTransfer=h,a.default=i.themeable(m.localeable(h))});
|
|||
|
;/*!src/components/ResultBox.tsx*/
|
|||
|
amis.define("d14c6a1",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResultBox=void 0;var a=e("node_modules/tslib/tslib"),n=e("256b65d"),l=a.__importDefault(e("node_modules/react/index")),o=e("node_modules/uncontrollable/cjs/index"),r=e("b7bbd16"),s=a.__importDefault(e("4ee46ff")),u=e("9a80175"),d=e("5ab4e9d"),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isFocused:!1},t.inputRef=l.default.createRef(),t}a.__extends(t,e),t.prototype.focus=function(){var e;null===(e=this.inputRef.current)||void 0===e?void 0:e.focus()},t.prototype.blur=function(){var e;null===(e=this.inputRef.current)||void 0===e?void 0:e.blur()},t.prototype.clearValue=function(e){e.preventDefault();var t=this.props.onResultChange;t&&t([])},t.prototype.handleFocus=function(e){var t=this.props.onFocus;t&&t(e),this.setState({isFocused:!0})},t.prototype.handleBlur=function(e){var t=this.props.onBlur;t&&t(e),this.setState({isFocused:!1})},t.prototype.removeItem=function(e){e.stopPropagation(),e.preventDefault();var t=this.props,a=t.result,n=t.onResultChange,l=parseInt(e.currentTarget.getAttribute("data-index"),10),o=Array.isArray(a)?a.concat():[];o.splice(l,1),n&&n(o)},t.prototype.handleChange=function(e){var t=this.props.onChange;null===t||void 0===t?void 0:t(e.currentTarget.value)},t.prototype.render=function(){var e=this,t=this.props,n=t.className,o=t.classnames,u=(t.classPrefix,t.clearable),d=t.disabled,i=t.hasError,c=t.result,p=t.value,f=t.placeholder,m=t.children,h=t.itemRender,_=t.allowInput,y=t.inputPlaceholder,v=(t.onResultChange,t.onChange,t.onResultClick),g=t.translate,b=(t.locale,t.onKeyPress),R=t.onFocus,C=t.onBlur,F=a.__rest(t,["className","classnames","classPrefix","clearable","disabled","hasError","result","value","placeholder","children","itemRender","allowInput","inputPlaceholder","onResultChange","onChange","onResultClick","translate","locale","onKeyPress","onFocus","onBlur"]),x=this.state.isFocused;return l.default.createElement("div",{className:o("ResultBox",n,x?"is-focused":"",d?"is-disabled":"",i?"is-error":"",v?"is-clickable":""),onClick:v,tabIndex:_||d||!R?-1:0,onKeyPress:_?void 0:b,onFocus:_?void 0:R,onBlur:_?void 0:C},Array.isArray(c)&&c.length?c.map(function(t,a){return l.default.createElement("div",{className:o("ResultBox-value"),key:a},l.default.createElement("span",{className:o("ResultBox-valueLabel")},h(t)),d?null:l.default.createElement("a",{"data-index":a,onClick:e.removeItem},l.default.createElement(r.Icon,{icon:"close",className:"icon"})))}):c&&!Array.isArray(c)?l.default.createElement("span",{className:o("ResultBox-singleValue")},c):_&&!d?null:l.default.createElement("span",{className:o("ResultBox-placeholder")},g(f||"无")),_&&!d?l.default.createElement(s.default,a.__assign({},F,{onKeyPress:b,ref:this.inputRef,value:p||"",onChange:this.handleChange,placeholder:g(Array.isArray(c)&&c.length?y:f),onFocus:this.handleFocus,onBlur:this.handleBlur})):null,m,u&&!d&&(Array.isArray(c)?c.length:c)?l.default.createElement("a",{onClick:this.clearValue,className:o("ResultBox-clear")},l.default.createElement(r.Icon,{icon:"close",className:"icon"})):null)};var n,o,d;return t.defaultProps={clearable:!1,placeholder:"暂无结果",inputPlaceholder:"手动输入内容",itemRender:function(e){return l.default.createElement("span",null,""+(e.scopeLabel||"")+e.label)}},a.__decorate([u.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(n="undefined"!=typeof l.default&&l.default.MouseEvent)?n:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"clearValue",null),a.__decorate([u.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),a.__decorate([u.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),a.__decorate([u.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"
|
|||
|
;/*!src/components/ListGroup.tsx*/
|
|||
|
amis.define("fc16070",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListGroup=void 0;var a=e("node_modules/tslib/tslib"),s=e("256b65d"),r=a.__importDefault(e("node_modules/react/index")),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.classnames,s=e.className,l=e.expand,n=e.placeholder,i=e.items,d=e.children,u=e.itemClassName,m=e.itemRender,o=e.getItemProps,c=(e.classPrefix,a.__rest(e,["classnames","className","expand","placeholder","items","children","itemClassName","itemRender","getItemProps","classPrefix"]));return r.default.createElement("div",a.__assign({},c,{className:t("ListGroup",s,l?"ListGroup--expanded":"")}),Array.isArray(i)&&i.length?i.map(function(e,s){var l=(null===o||void 0===o?void 0:o({item:e,index:s}))||{};return r.default.createElement("div",a.__assign({key:s},l,{className:t("ListGroup-item",u,l.className)}),m(e,s))}):n?r.default.createElement("div",{className:t("Placeholder ListGroup-placeholder")}):null,d)},t.defaultProps={itemRender:function(e){return r.default.createElement(r.default.Fragment,null,""+e)}},t}(r.default.Component);t.ListGroup=l,t.default=s.themeable(l)});
|
|||
|
;/*!src/components/NumberInput.tsx*/
|
|||
|
amis.define("10d195e",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberInput=void 0;var n=e("node_modules/tslib/tslib"),s=n.__importDefault(e("node_modules/react/index")),a=n.__importDefault(e("node_modules/rc-input-number/lib/index")),l=e("256b65d"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,l=e.classPrefix,r=e.classnames,u=e.value,i=e.step,o=e.precision,d=e.max,p=e.min,m=e.disabled,c=e.placeholder,f=e.onChange,b={};return"number"==typeof o&&(b.precision=o),s.default.createElement(a.default,n.__assign({className:r(t),prefixCls:l+"Number",value:u,step:i,max:d,min:p,onChange:f,disabled:m,placeholder:c},b))},t.defaultProps={step:1},t}(s.default.Component);t.NumberInput=r,t.default=l.themeable(r)});
|
|||
|
;/*!src/components/ArrayInput.tsx*/
|
|||
|
amis.define("05f66e3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayInput=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),r=e("256b65d"),l=e("5ab4e9d"),d=a.__importDefault(e("fe0e0e4")),i=e("b7bbd16"),o=a.__importDefault(e("a67acca")),s=e("9a80175"),u=e("node_modules/uncontrollable/cjs/index"),p=a.__importDefault(e("node_modules/sortablejs/Sortable")),c=e("node_modules/react-dom/index"),m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.id=s.guid(),t}a.__extends(t,e),t.prototype.handleItemOnChange=function(e,t){var a=this.props.onChange,n=this.props.value,r=Array.isArray(n)?n.concat():[];r.splice(e,1,t),null===a||void 0===a?void 0:a(r)},t.prototype.dragTipRef=function(e){!this.dragTip&&e?this.initDragging():this.dragTip&&!e&&this.destroyDragging(),this.dragTip=e},t.prototype.handleAdd=function(){var e=this.props,t=e.value,a=e.onChange,n=e.itemInitalValue,r=Array.isArray(t)?t.concat():[];r.push(n),null===a||void 0===a?void 0:a(r)},t.prototype.handleRemove=function(e){var t=parseInt(e.currentTarget.getAttribute("data-index"),10),a=this.props,n=a.value,r=a.onChange,l=(a.itemInitalValue,Array.isArray(n)?n.concat():[]);l.splice(t,1),null===r||void 0===r?void 0:r(l)},t.prototype.initDragging=function(){var e=this,t=this.props.onChange,a=this.props.classPrefix,n=c.findDOMNode(this);this.sortable=new p.default(n.querySelector(".drag-group"),{group:"array-input-"+this.id,animation:150,handle:".drag-bar",ghostClass:a+"ArrayInput-item--dragging",onEnd:function(a){if(a.newIndex!==a.oldIndex){var n=a.to;a.newIndex<a.oldIndex&&a.oldIndex<n.childNodes.length-1?n.insertBefore(a.item,n.childNodes[a.oldIndex+1]):a.oldIndex<n.childNodes.length-1?n.insertBefore(a.item,n.childNodes[a.oldIndex]):n.appendChild(a.item);var r=e.props.value;if(Array.isArray(r)){var l=r.concat();l.splice(a.newIndex,0,l.splice(a.oldIndex,1)[0]),null===t||void 0===t?void 0:t(l)}}}})},t.prototype.destroyDragging=function(){this.sortable&&this.sortable.destroy()},t.prototype.renderItem=function(e,t,a){var r=this.props,l=r.itemRender,d=r.disabled,o=r.classnames,s=r.sortable,u=r.removable,p=r.minLength;return n.default.createElement("div",{className:o("ArrayInput-item"),key:t},s&&a.length>1&&!d?n.default.createElement("a",{className:o("ArrayInput-itemDrager drag-bar")},n.default.createElement(i.Icon,{icon:"drag-bar",className:"icon"})):null,l({value:e,onChange:this.handleItemOnChange.bind(this,t),index:t,disabled:d}),u===!1||d||p&&!(a.length>p)?null:n.default.createElement("a",{"data-index":t,className:o("ArrayInput-itemRemove"),onClick:this.handleRemove},n.default.createElement(i.Icon,{icon:"close",className:"icon"})))},t.prototype.render=function(){var e=this,t=this.props,a=t.classnames,r=t.value,l=t.placeholder,d=t.translate,s=t.maxLength,u=t.sortable,p=t.sortTip,c=t.disabled;return n.default.createElement("div",{className:a("ArrayInput")},Array.isArray(r)&&r.length?n.default.createElement("div",{className:a("ArrayInput-items drag-group")},r.map(function(t,a){return e.renderItem(t,a,r)})):n.default.createElement("div",{className:a("ArrayInput-placeholder")},d(l)),n.default.createElement("div",{className:a("ArrayInput-toolbar",u&&Array.isArray(r)&&r.length>1?"ArrayInput-toolbar--dnd":"")},!Array.isArray(r)||!s||r.length<s?n.default.createElement(o.default,{className:a("ArrayInput-addBtn"),onClick:this.handleAdd,level:"",disabled:c},n.default.createElement(i.Icon,{icon:"plus",className:"icon"}),n.default.createElement("span",null,d("新增一条"))):null,u&&Array.isArray(r)&&r.length?n.default.createElement("span",{className:a("ArrayInput-sortTip"),ref:this.dragTipRef},Array.isArray(r)&&r.length>1?d(p):""):null))};var r;return t.defaultProps={placeholder:"<空>",itemRender:function(e){var t=e.value,a=e.onChange;return n.default.createElement(d.default,{value:t,onChange:a})}},a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"dragTipRef",null),a.__de
|
|||
|
;/*!src/components/index.tsx*/
|
|||
|
amis.define("1953fc1",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayInput=t.NumberInput=t.ListGroup=t.TreeRadios=t.SearchBox=t.ListRadios=t.InputBox=t.ResultBox=t.ChainedCheckboxes=t.TreeCheckboxes=t.TableCheckboxes=t.ListCheckboxes=t.TabsTransfer=t.Transfer=t.Tree=t.TooltipWrapper=t.Tooltip=t.toast=t.ToastComponent=t.TitleBar=t.Textarea=t.Switch=t.Spinner=t.Select=t.Rating=t.Range=t.Radios=t.PopOver=t.Overlay=t.Modal=t.LazyComponent=t.Layout=t.Icons=t.Html=t.Editor=t.Tab=t.Tabs=t.Drawer=t.DateRangePicker=t.DatePicker=t.ColorPicker=t.Collapse=t.Checkboxes=t.Checkbox=t.Button=t.AsideNav=t.Alert2=t.openContextMenus=t.ContextMenu=t.prompt=t.confirm=t.alert=t.AlertComponent=t.NotFound=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("bb0be5b"));t.NotFound=r.default;var o=a.__importStar(e("bfe4ee0"));Object.defineProperty(t,"AlertComponent",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"alert",{enumerable:!0,get:function(){return o.alert}}),Object.defineProperty(t,"confirm",{enumerable:!0,get:function(){return o.confirm}}),Object.defineProperty(t,"prompt",{enumerable:!0,get:function(){return o.prompt}});var u=a.__importStar(e("703f435"));Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"openContextMenus",{enumerable:!0,get:function(){return u.openContextMenus}});var f=a.__importDefault(e("4e7c54b"));t.AsideNav=f.default;var l=a.__importDefault(e("a67acca"));t.Button=l.default;var i=a.__importDefault(e("0a43d97"));t.Checkbox=i.default;var n=a.__importDefault(e("f203847"));t.Checkboxes=n.default;var d=a.__importDefault(e("0d13109"));t.Collapse=d.default;var _=a.__importDefault(e("f11d26b"));t.ColorPicker=_.default;var p=a.__importDefault(e("dd24912"));t.DatePicker=p.default;var m=a.__importDefault(e("eaae631"));t.DateRangePicker=m.default;var c=a.__importDefault(e("01a937e"));t.Drawer=c.default;var b=a.__importStar(e("8ac7656"));Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"Tab",{enumerable:!0,get:function(){return b.Tab}});var v=a.__importDefault(e("997c87d"));t.Editor=v.default;var s=a.__importDefault(e("580df19"));t.Html=s.default;var D=a.__importStar(e("b7bbd16"));t.Icons=D;var C=a.__importDefault(e("4c26fd3"));t.Layout=C.default;var T=a.__importDefault(e("4783ce8"));t.LazyComponent=T.default;var x=a.__importDefault(e("628f736"));t.Modal=x.default;var y=a.__importDefault(e("997df41"));t.Overlay=y.default;var P=a.__importDefault(e("2b3dcdf"));t.PopOver=P.default;var h=a.__importDefault(e("8e37af0"));t.Radios=h.default;var k=a.__importDefault(e("736bbb6"));t.Range=k.default;var g=a.__importDefault(e("1b690d8"));t.Rating=g.default;var O=a.__importDefault(e("d57879c"));t.Select=O.default;var R=a.__importDefault(e("acad559"));t.Spinner=R.default;var S=a.__importDefault(e("aa2413a"));t.Switch=S.default;var j=a.__importDefault(e("05807e2"));t.Textarea=j.default;var B=a.__importDefault(e("06d307c"));t.TitleBar=B.default;var L=a.__importStar(e("6ae88e0"));Object.defineProperty(t,"ToastComponent",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"toast",{enumerable:!0,get:function(){return L.toast}});var A=a.__importDefault(e("007c3b6"));t.Tooltip=A.default;var I=a.__importDefault(e("8d5abcb"));t.TooltipWrapper=I.default;var M=a.__importDefault(e("d233af4"));t.Tree=M.default;var N=a.__importDefault(e("15e4197"));t.Alert2=N.default;var w=a.__importDefault(e("0573406"));t.Transfer=w.default;var z=a.__importDefault(e("5c35784"));t.TabsTransfer=z.default;var E=a.__importDefault(e("0afdbca"));t.ListCheckboxes=E.default;var F=a.__importDefault(e("899a736"));t.TableCheckboxes=F.default;var G=a.__importDefault(e("832511b"));t.TreeCheckboxes=G.default;var H=a.__importDefault(e("5b21367"));t.ChainedCheckboxes=H.default;var W=a.__importDefault(e("d14c6a1"));t.ResultBox=W.default;var q=a.__importDefault(e("fe0e0e4"));t.InputBox=q.default;var J=a.__importDefault(e("aff578b"));t.ListRadios=J.default;var K=a.__importDefault
|
|||
|
;/*!src/locale/en.ts*/
|
|||
|
amis.define("ee0cecb",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("5ab4e9d");a.register("en",{"确认":"Confirm","取消":"Cancel","YYYY年":"YYYY","{{from}}年-{{to}}年":"{{from}} - {{to}}","请选择日期":"Select Date","请选择日期以及时间":"Select Datetime","请选择时间":"Select Time","系统消息":"System Info","加载中":"Loading","点击刷新重新加载":"Click to refresh","请先选择左侧数据":"Select from left first.","请选择颜色":"Select color","现在":"Now","今天":"Today","昨天":"Yesterday","本周一":"Monday","本月初":"Earlier this month","上个月初":"Earlier last month","上个季节初":"Earlier last quarter","明天":"Tomorrow","本周日":"Sunday","本月底":"last day of this month","{{hours}}小时前":"{{hours}} hour(s) ago","{{hours}}小时后":"{{hours}} hour(s) after","{{days}}天前":"{{days}} day(s) ago","{{days}}天后":"{{days}} day(s) after","{{weeks}}周前":"{{weeks}} week(s) ago","{{weeks}}周后":"{{weeks}} week(s) after","{{months}}月前":"{{months}} month(s) ago","{{months}}月后":"{{months}} month(s) after","{{quarters}}季度前":"{{quarters}} quarter(s) ago","{{quarters}}季度后":"{{quarters}} quarter(s) after"," 至 ":" to ","最近1天":"Last day","最近7天":"Last 7 days","最近90天":"Last 90 days","上周":"Last week","本月":"This month","上个月":"Last month","上个季节":"Last quarter","本季度":"This quarter","请选择日期范围":"Select Daterange","关闭":"Close","暂无选项":"No options","请选择位置":"Pick location","无":"None","没有数据":"No data","请先选择数据":"Select data first","请选择":"Select","全选":"Check all","搜索结果":"Search result","清空":"Clear","当前选择":"Selected","添加一级节点":"Add root node","添加孩子节点":"Add child","编辑该节点":"Edit this node","移除该节点":"Remove this node","请输入":"Enter","请输入关键字":"Enter keywords","新增选项":"New option","请输入街道信息":"Enter street info","删除":"Delete","新增":"New","新增一条":"Add a data","新增一条数据":"Add a data","类型":"Type","拖拽排序":"Drag to sort","删除失败":"Delete failed","确认要删除?":"Are you sure you want to delete?","组合表单成员数量不够,低于设定的最小{{minLength}}个,请添加更多的成员。":"The number of combined form members is not enough. It is lower than the minimum {{minLength}} set. Please add more members.","组合表单成员数量超出,超出设定的最大{{maxLength}}个,请删除多余的成员。":"The number of combined form members exceeds the set maximum of {{MaxLength}}}. Please delete the extra members.","子表单验证失败,请仔细检查":"Validate failed, please check this Subform.","成员{{index}}":"Member {{index}}","清空数据":"Clear data","您选择的文件 {{filename}} 大小为 {{actualSize}} 超出了最大为 {{maxSize}} 的限制,请重新选择。":"The file {{filename}} you selected has a size of {actualsize}} which exceeds the maximum limit of {{maxsize}}. Please select again.","您添加的文件{{files}}不符合类型的`{{accept}}`的设定,请仔细检查。":"The file you added {{files}} does not match the setting of the type `{{accept}}`. Please check it carefully.","把文件拖到这,然后松完成添加!":"Drag the file here, then release to finish adding!","把图片拖到这,然后松开完成添加!":"Drag the picture here, then release to finish adding!","重新上传":"Repick","重试上传":"Retry","继续添加":"Continue add","上传文件":"Upload file","移除":"Remove","暂停上传":"Pause uplaod","开始上传":"Start upload","已成功上传{{uploaded}}个文件,{{failed}}个文件上传失败,":"Successfully uploaded {{uploaded}} files, failed to upload {{failed}} files,","失败文件":"Failed files.","高度{{height}}px":"height: {{height}}px","宽度{{width}}px":"width: {{width}}px","尺寸({{width}} x {{height}})":"size: ({{width}}px x {{height}}px)","您选择的图<EFBFBD>
|
|||
|
;/*!src/renderers/Form/IconPickerIcons.tsx*/
|
|||
|
amis.define("960de17",function(e,s){"use strict";function n(e){s.ICONS=e}Object.defineProperty(s,"__esModule",{value:!0}),s.setIconVendor=s.ICONS=void 0,s.ICONS=[{name:"Font Awesome 4.7",prefix:"fa fa-",icons:["slideshare","snapchat","snapchat-ghost","snapchat-square","soundcloud","spotify","stack-exchange","stack-overflow"]}],s.setIconVendor=n});
|
|||
|
;/*!src/renderers/Remark.tsx*/
|
|||
|
amis.define("4b7dfbe",function(e,t){"use strict";function n(e,t){return"string"==typeof e?i.filter(e,t):e?e.title?{title:i.filter(e.title,t),content:e.content||e.body?i.filter(e.content||e.body||"",t):void 0}:e.content||e.body?i.filter(e.content||e.body||"",t):void 0:e}Object.defineProperty(t,"__esModule",{value:!0}),t.RemarkRenderer=t.filterContents=void 0;var r=e("node_modules/tslib/tslib"),o=r.__importDefault(e("node_modules/react/index")),a=e("0f9ebdf"),l=r.__importDefault(e("8d5abcb")),i=e("6a2dbb7"),s=e("256b65d"),c=e("b7bbd16");t.filterContents=n;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,r=e.icon,a=e.tooltip,i=e.placement,s=e.rootClose,d=e.trigger,u=e.container,m=e.classPrefix,f=e.classnames,p=e.content,b=e.data,_=a&&a.icon||r;return o.default.createElement("div",{className:f("Remark",a&&a.className||t||"Remark--warning")},o.default.createElement(l.default,{classPrefix:m,classnames:f,tooltip:n(a||p,b),tooltipClassName:a&&a.tooltipClassName,placement:a&&a.placement||i,rootClose:a&&a.rootClose||s,trigger:a&&a.trigger||d,container:u,delay:a&&a.delay},_?o.default.createElement("i",{className:f("Remark-icon",_)}):o.default.createElement(c.Icon,{icon:"question",className:"icon"})))},t.propsList=[],t.defaultProps={icon:"",trigger:["hover","focus"]},t}(o.default.Component);t.default=s.themeable(d);var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([a.Renderer({test:/(^|\/)remark$/,name:"remark"})],t)}(d);t.RemarkRenderer=u});
|
|||
|
;/*!src/renderers/Action.tsx*/
|
|||
|
amis.define("7648928",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResetRenderer=t.SubmitRenderer=t.ButtonRenderer=t.ActionRenderer=t.Action=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),i=e("0f9ebdf"),r=e("6a2dbb7"),o=n.__importDefault(e("a67acca")),l=n.__importDefault(e("node_modules/lodash/pick")),s=["dialog","drawer","url","link","confirmText","tooltip","disabledTip","className","asyncApi","redirect","size","level","primary","feedback","api","blank","tooltipPlacement","to","content","required","type","actionType","label","icon","reload","target","close","messages","mergeData","index","copy","payload","requireSelected"],d=e("4b7dfbe"),u=e("256b65d"),c=e("9a80175"),p=["button","submit","reset"],m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n.__extends(t,e),t.prototype.handleAction=function(e){var t=this.props,n=t.onAction,a=t.onClick,i=t.disabled,r=a&&a(e,this.props);if(!i&&!e.isDefaultPrevented()&&r!==!1&&n){e.preventDefault();var o=l.default(this.props,s);n(e,o)}},t.prototype.render=function(){var e,t,n=this.props,i=n.type,l=n.label,s=n.icon,u=n.iconClassName,c=n.primary,m=n.size,f=n.level,_=n.disabled,b=n.block,y=n.className,v=n.componentClass,h=n.tooltip,C=n.disabledTip,g=n.tooltipPlacement,A=n.actionType,R=n.link,k=n.data,x=n.activeClassName,N=n.isCurrentUrl,D=n.isMenuItem,T=n.active,E=n.activeLevel,O=n.tooltipContainer,P=n.classnames,M=!!T;return"link"===A&&!M&&R&&N&&(M=N(R)),D?a.default.createElement("a",{className:P(y,(e={},e[x||"is-active"]=M,e["is-disabled"]=_,e)),onClick:this.handleAction},l,s?a.default.createElement("i",{className:P("Button-icon",s)}):null):a.default.createElement(o.default,{className:P(y,(t={},t[x||"is-active"]=M,t)),size:m,level:E&&M?E:f||(c?"primary":void 0),onClick:this.handleAction,type:i&&~p.indexOf(i)?i:"button",disabled:_,componentClass:v,tooltip:d.filterContents(h,k),disabledTip:d.filterContents(C,k),placement:g,tooltipContainer:O,block:b,iconOnly:!(!s||l||"link"===f)},l?a.default.createElement("span",null,r.filter(l,k)):null,s?a.default.createElement("i",{className:P("Button-icon",s,u)}):null)};var i;return t.defaultProps={type:"button",componentClass:"button",tooltipPlacement:"bottom",activeClassName:"is-active"},n.__decorate([c.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(i="undefined"!=typeof a.default&&a.default.MouseEvent)?i:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleAction",null),t}(a.default.Component);t.Action=m,t.default=u.themeable(m);var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n.__extends(t,e),t.prototype.handleAction=function(e,t){var n=this.props,a=n.env,i=n.onAction,o=n.data;t.confirmText&&a.confirm?a.confirm(r.filter(t.confirmText,o)).then(function(n){return n&&i(e,t,o)}):i(e,t,o)},t.prototype.isCurrentAction=function(e){var t=this.props,n=t.env,a=t.data;return n.isCurrentUrl(r.filter(e,a))},t.prototype.render=function(){var e=this.props,t=e.env,i=e.disabled,r=e.btnDisabled,o=n.__rest(e,["env","disabled","btnDisabled"]);return a.default.createElement(m,n.__assign({},o,{disabled:i||r,onAction:this.handleAction,isCurrentUrl:this.isCurrentAction,tooltipContainer:t.getModalContainer?t.getModalContainer:void 0}))};return n.__decorate([c.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleAction",null),n.__decorate([c.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",void 0)],t.prototype,"isCurrentAction",null),t=n.__decorate([i.Renderer({test:/(^|\/)action$/,name:"action"})],t)}(a.default.Component);t.ActionRenderer=f;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([i.Renderer({test:/(^|\/)button$/,name:"button"})],t)}(f);t.ButtonRenderer=_;var b=function(e){function t(){return null!==e&&e.apply(this,argument
|
|||
|
;/*!src/renderers/Alert.tsx*/
|
|||
|
amis.define("30de479",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TplRenderer=void 0;var r=e("node_modules/tslib/tslib"),n=e("0f9ebdf"),d=r.__importDefault(e("node_modules/react/index")),o=r.__importDefault(e("15e4197")),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.render,n=e.body,l=r.__rest(e,["render","body"]);return d.default.createElement(o.default,r.__assign({},l),t("body",n))},t=r.__decorate([n.Renderer({test:/(^|\/)alert$/,name:"alert"})],t)}(d.default.Component);t.TplRenderer=l});
|
|||
|
;/*!src/renderers/Form/ButtonGroup.tsx*/
|
|||
|
amis.define("aa22e57",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonGroupControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),o=e("b86428a"),l=e("9a80175"),s=e("f2e345e"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a.__extends(t,e),t.prototype.handleToggle=function(e){var t=this.props,a=t.onToggle,n=t.multiple,o=t.autoFill,r=t.onBulkChange,i=!n&&o&&!l.isEmpty(o)&&s.dataMapping(o,e);i&&r(i),a(e)},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.render=function(e){var t,o=this;void 0===e&&(e=this.props);var s=e.render,r=e.classPrefix,i=e.classnames,u=e.className,p=e.disabled,c=e.options,d=(e.value,e.labelField),m=e.placeholder,v=e.btnClassName,f=e.btnActiveClassName,b=e.selectedOptions,_=e.buttons,g=e.size,y=e.block,h=e.vertical,N=[],C=e.btnLevel,B=e.btnActiveLevel;return v&&(C=l.getLevelFromClassName(v)),f&&(B=l.getLevelFromClassName(f)),c&&c.length?N=c.map(function(e,t){var a=!!~b.indexOf(e);return s("option/"+t,{label:e[d||"label"],icon:e.icon,size:e.size||g,type:"button",block:y},{key:t,active:a,level:(a?B:"")||e.level||C,className:i(e.className,v),disabled:e.disabled||p,onClick:function(t){o.handleToggle(e),t.preventDefault()}})}):_&&(N=_.map(function(e,t){return s("button/"+t,a.__assign({size:g,block:y,activeLevel:B},e),{key:t,className:i(e.className,v)})})),n.default.createElement("div",{className:i("ButtonGroup",(t={"ButtonGroup--block":y,"ButtonGroup--vertical":h},t["ButtonGroup--"+g]=g,t),u)},N.length?N:n.default.createElement("span",{className:r+"ButtonGroup-placeholder"},m))};var r;return t.defaultProps={btnLevel:"default",btnActiveLevel:"primary",clearable:!1,vertical:!1},a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(r="undefined"!=typeof o.Option&&o.Option)?r:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleToggle",null),t}(n.default.Component);t.default=r;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var t=this.props,o=t.className,l=t.classnames,s=a.__rest(t,["className","classnames"]),r=e.prototype.render.call(this,a.__assign(a.__assign({},s),{classnames:l}));return n.default.createElement("div",{className:l("ButtonGroupControl",o)},r)},t=a.__decorate([o.OptionsControl({type:"button-group",sizeMutable:!1,strictMode:!1})],t)}(r);t.ButtonGroupControlRenderer=i});
|
|||
|
;/*!src/renderers/ButtonGroup.tsx*/
|
|||
|
amis.define("d539455",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonGroupRenderer=void 0;var n=e("node_modules/tslib/tslib"),u=n.__importDefault(e("aa22e57")),r=e("0f9ebdf");t.default=u.default;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([r.Renderer({test:/(^|\/)(?:button|action)\-group$/,name:"button-group"})],t)}(u.default);t.ButtonGroupRenderer=o});
|
|||
|
;/*!src/renderers/ButtonToolbar.tsx*/
|
|||
|
amis.define("10294a9",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonToolbarRenderer=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),o=e("0f9ebdf"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.buttons,n=e.className,o=e.classnames,a=e.render;return r.default.createElement("div",{className:o("ButtonToolbar",n)},Array.isArray(t)?t.map(function(e,t){return a(""+t,e,{key:t})}):null)},t.propsList=["buttons","className"],t}(r.default.Component);t.default=a;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([o.Renderer({test:/(^|\/)button-toolbar$/,name:"button-toolbar"})],t)}(a);t.ButtonToolbarRenderer=u});
|
|||
|
;/*!src/renderers/DropDownButton.tsx*/
|
|||
|
amis.define("bb5331d",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropDownButtonRenderer=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),s=e("0f9ebdf"),i=e("node_modules/react-overlays/lib/index"),r=n.__importDefault(e("997df41")),a=n.__importDefault(e("2b3dcdf")),l=e("9a80175"),d=e("6a2dbb7"),u=e("b7bbd16"),p=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isOpened:!1},n.open=n.open.bind(n),n.close=n.close.bind(n),n.toogle=n.toogle.bind(n),n.domRef=n.domRef.bind(n),n}return n.__extends(t,e),t.prototype.componentDidMount=function(){this.props.defaultIsOpened&&this.setState({isOpened:!0})},t.prototype.domRef=function(e){this.target=e},t.prototype.toogle=function(e){e.preventDefault(),this.setState({isOpened:!this.state.isOpened})},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.renderOuter=function(){var e,t=this,s=this.props,d=s.render,u=s.buttons,p=s.data,c=s.popOverContainer,f=s.classnames,m=s.classPrefix,b=s.children,h=(s.align,s.closeOnClick),y=s.closeOnOutside,D=o.default.createElement(i.RootCloseWrapper,{disabled:!this.state.isOpened,onRootClose:y!==!1?this.close:l.noop},o.default.createElement("ul",{className:f("DropDown-menu"),onClick:h?this.close:l.noop},b?b:Array.isArray(u)?u.map(function(e,t){return l.isVisible(e,p)?"divider"===e||"divider"===e.type?o.default.createElement("li",{key:t,className:f("DropDown-divider")}):o.default.createElement("li",{key:t},d("button/"+t,n.__assign(n.__assign({type:"button"},e),{isMenuItem:!0}))):null}):null));return c?o.default.createElement(r.default,{container:c,target:function(){return t.target},show:!0},o.default.createElement(a.default,{overlay:!0,onHide:this.close,classPrefix:m,className:f("DropDown-popover"),style:{minWidth:null===(e=this.target)||void 0===e?void 0:e.offsetWidth}},D)):D},t.prototype.render=function(){var e=this.props,t=e.block,n=e.disabled,s=e.btnDisabled,i=e.size,r=e.label,a=e.level,l=e.primary,p=e.className,c=e.classnames,f=e.align,m=e.iconOnly,b=e.icon,h=e.data;return o.default.createElement("div",{className:c("DropDown ",{"DropDown--block":t,"DropDown--alignRight":"right"===f,"is-opened":this.state.isOpened}),ref:this.domRef},o.default.createElement("button",{onClick:this.toogle,disabled:n||s,className:c("Button",p,"undefined"==typeof a?"Button--default":a?"Button--"+a:"",{"Button--block":t,"Button--primary":l,"Button--iconOnly":m},i?"Button--"+i:"")},b?"string"==typeof b?o.default.createElement("i",{className:c(b,"m-r-xs")}):b:null,"string"==typeof r?d.filter(r,h):r,o.default.createElement("span",{className:c("DropDown-caret")},o.default.createElement(u.Icon,{icon:"caret",className:"icon"}))),this.state.isOpened?this.renderOuter():null)},t.defaultProps={},t}(o.default.Component);t.default=p;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([s.Renderer({test:/(^|\/)dropdown-button$/,name:"dropdown-button"})],t)}(p);t.DropDownButtonRenderer=c});
|
|||
|
;/*!src/renderers/Collapse.tsx*/
|
|||
|
amis.define("d221521",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.CollapseRenderer=void 0;var a=e("node_modules/tslib/tslib"),s=a.__importDefault(e("node_modules/react/index")),t=e("0f9ebdf"),o=e("0d13109"),n=function(e){function l(l){var a=e.call(this,l)||this;return a.state={collapsed:!1},a.toggleCollapsed=a.toggleCollapsed.bind(a),a.state.collapsed=!!l.collapsed,a}return a.__extends(l,e),l.prototype.componentWillReceiveProps=function(e){var l=this.props;l.collapsed!==e.collapsed&&this.setState({collapsed:!!e.collapsed})},l.prototype.toggleCollapsed=function(){this.props.collapsable!==!1&&this.setState({collapsed:!this.state.collapsed})},l.prototype.render=function(){var e,l=this.props,a=l.classPrefix,t=l.classnames,n=l.size,p=l.wrapperComponent,d=l.headingComponent,r=l.className,c=l.title,i=l.headingClassName,m=l.children,u=l.body,C=l.bodyClassName,f=l.render,h=l.collapsable;return s.default.createElement(p,{className:t("Collapse",(e={"is-collapsed":this.state.collapsed},e["Collapse--"+n]=n,e["Collapse--collapsable"]=h,e),r)},c?s.default.createElement(d,{onClick:this.toggleCollapsed,className:t("Collapse-header",i)},f("heading",c),h&&s.default.createElement("span",{className:t("Collapse-arrow")})):null,s.default.createElement(o.Collapse,{show:h?!this.state.collapsed:!0,classnames:t,classPrefix:a},s.default.createElement("div",{className:t("Collapse-body",C)},m?"function"==typeof m?m(this.props):m:u?f("body",u):null)))},l.propsList=["wrapperComponent","headingComponent","bodyClassName","collapsed","headingClassName"],l.defaultProps={wrapperComponent:"div",headingComponent:"h4",className:"",headingClassName:"",bodyClassName:"",collapsable:!0},l}(s.default.Component);l.default=n;var p=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(l,e),l=a.__decorate([t.Renderer({test:/(^|\/)collapse$/,name:"collapse"})],l)}(n);l.CollapseRenderer=p});
|
|||
|
;/*!src/renderers/Color.tsx*/
|
|||
|
amis.define("3227a42",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.ColorFieldRenderer=l.ColorField=void 0;var r=e("node_modules/tslib/tslib"),t=r.__importDefault(e("node_modules/react/index")),o=e("0f9ebdf"),a=e("f2e345e"),n=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(l,e),l.prototype.render=function(){var e=this.props,l=e.className,r=e.data,o=e.classnames,n=e.name,s=e.value,d=e.defaultColor,u=e.showValue,i=s||(n?a.resolveVariableAndFilter(n,r,"| raw"):null);return t.default.createElement("div",{className:o("ColorField",l)},t.default.createElement("i",{className:o("ColorField-previewIcon"),style:{backgroundColor:i||d}}),u?t.default.createElement("span",{className:o("ColorField-value")},i):null)},l.defaultProps={className:"",defaultColor:"#ccc",showValue:!0},l}(t.default.Component);l.ColorField=n;var s=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(l,e),l=r.__decorate([o.Renderer({test:/(^|\/)color$/,name:"color"})],l)}(n);l.ColorFieldRenderer=s});
|
|||
|
;/*!src/renderers/CRUD.tsx*/
|
|||
|
amis.define("e5683c7",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRUDRenderer=void 0;var a=e("node_modules/tslib/tslib"),i=a.__importDefault(e("node_modules/react/index")),r=e("0f9ebdf"),n=e("7b0821e"),o=e("9a80175"),s=e("919cbd9"),l=a.__importDefault(e("a67acca")),d=a.__importDefault(e("d57879c")),c=a.__importDefault(e("01e2bb4")),p=a.__importDefault(e("node_modules/lodash/pick")),u=a.__importDefault(e("node_modules/qs/lib/index")),h=e("node_modules/react-dom/index"),f=e("6a2dbb7"),m=e("1caead1"),g=a.__importDefault(e("node_modules/lodash/omit")),v=a.__importDefault(e("node_modules/lodash/find")),b=a.__importDefault(e("node_modules/lodash/findIndex")),y=a.__importDefault(e("580df19")),_=e("1953fc1"),O=e("b7bbd16"),A=function(e){function t(t){var a=e.call(this,t)||this;return a.dataInvalid=!1,a.controlRef=a.controlRef.bind(a),a.handleFilterReset=a.handleFilterReset.bind(a),a.handleFilterSubmit=a.handleFilterSubmit.bind(a),a.handleFilterInit=a.handleFilterInit.bind(a),a.handleAction=a.handleAction.bind(a),a.handleBulkAction=a.handleBulkAction.bind(a),a.handleChangePage=a.handleChangePage.bind(a),a.handleBulkGo=a.handleBulkGo.bind(a),a.handleDialogConfirm=a.handleDialogConfirm.bind(a),a.handleDialogClose=a.handleDialogClose.bind(a),a.handleSave=a.handleSave.bind(a),a.handleSaveOrder=a.handleSaveOrder.bind(a),a.handleSelect=a.handleSelect.bind(a),a.handleChildPopOverOpen=a.handleChildPopOverOpen.bind(a),a.handleChildPopOverClose=a.handleChildPopOverClose.bind(a),a.search=a.search.bind(a),a.silentSearch=a.silentSearch.bind(a),a.handlQuery=a.handlQuery.bind(a),a.renderHeaderToolbar=a.renderHeaderToolbar.bind(a),a.renderFooterToolbar=a.renderFooterToolbar.bind(a),a.clearSelection=a.clearSelection.bind(a),a}return a.__extends(t,e),t.prototype.componentWillMount=function(){{var e=this.props,t=e.location,a=e.store,i=e.pageField,r=e.perPageField,n=e.syncLocation;e.loadDataOnce}this.mounted=!0,n&&t&&(t.query||t.search)?a.updateQuery(u.default.parse(t.search.substring(1)),void 0,i,r):n&&!t&&window.location.search&&a.updateQuery(u.default.parse(window.location.search.substring(1)),void 0,i,r),this.props.store.setFilterTogglable(!!this.props.filterTogglable,this.props.filterDefaultVisible)},t.prototype.componentDidMount=function(){var e=this.props.store;(!this.props.filter||e.filterTogggable&&!e.filterVisible)&&this.handleFilterInit({}),this.props.pickerMode&&this.props.value&&e.setSelectedItems(this.props.value)},t.prototype.componentWillReceiveProps=function(e){var t=this.props,a=t.store;if(o.anyChanged(["toolbar","headerToolbar","footerToolbar","bulkActions"],t,e)&&(this.renderHeaderToolbar=this.renderHeaderToolbar.bind(this),this.renderFooterToolbar=this.renderFooterToolbar.bind(this)),this.props.pickerMode&&this.props.value!==e.value&&a.setSelectedItems(e.value),this.props.filterTogglable!==e.filterTogglable&&a.setFilterTogglable(!!e.filterTogglable,e.filterDefaultVisible),t.syncLocation&&t.location&&t.location.search!==e.location.search)a.updateQuery(u.default.parse(e.location.search.substring(1)),void 0,e.pageField,e.perPageField),this.dataInvalid=o.isObjectShallowModified(a.query,this.lastQuery,!1);else if(!t.syncLocation&&t.api&&e.api){var i=m.buildApi(t.api,t.data,{ignoreData:!0}),r=m.buildApi(e.api,e.data,{ignoreData:!0});i.url===r.url||!m.isValidApi(r.url)||r.sendOn&&!f.evalExpression(r.sendOn,e.data)||(this.dataInvalid=!0)}},t.prototype.componentDidUpdate=function(){this.dataInvalid&&(this.dataInvalid=!1,this.search())},t.prototype.componentWillUnmount=function(){this.mounted=!1,clearTimeout(this.timer)},t.prototype.controlRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.control=e},t.prototype.handleAction=function(e,t,i,r,n){var s=this;void 0===r&&(r=!1);var l=this.props,d=l.onAction,c=l.store,p=l.messages,u=l.pickerMode,h=l.env,m=(l.pageField,l.stopAutoRefreshWhenModalIsOpen);if("dialog"===t.actionType){c.setCurrentAction(t);var g=i.index,v=c.items.length;m&&clearTimeout(this.timer),c.openDialog(i,{hasNext:v-1>g,nextIndex:g+1,hasPrev:g>0,prevIndex:g-1,index:
|
|||
|
;/*!src/renderers/Pagination.tsx*/
|
|||
|
amis.define("4fd96cf",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),l=e("0f9ebdf"),r=e("9a80175"),i=e("b7bbd16"),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={pageNum:String(t.props.activePage)||""},t}n.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.activePage!==e.activePage&&this.setState({pageNum:String(e.activePage)||""})},t.prototype.renderSimple=function(){var e=this.props,t=e.activePage,n=e.hasNext,l=e.onPageChange,r=e.classnames;return a.default.createElement("ul",{className:r("Pagination","Pagination--sm")},a.default.createElement("li",{className:r({"is-disabled":2>t}),onClick:2>t?function(e){return e.preventDefault()}:function(){return l(t-1)}},a.default.createElement("a",null,a.default.createElement(i.Icon,{icon:"left-arrow",className:"icon"}))),a.default.createElement("li",{className:r({"is-disabled":!n}),onClick:n?function(){return l(t+1)}:function(e){return e.preventDefault()}},a.default.createElement("a",null,a.default.createElement(i.Icon,{icon:"right-arrow",className:"icon"}))))},t.prototype.handlePageChange=function(e){var t=this.props.items,n=e.currentTarget.value;/^\d+$/.test(n)&&parseInt(n,10)>t&&(n=String(t)),this.setState({pageNum:n})},t.prototype.renderNormal=function(){var e,t,n=this.props,l=n.activePage,r=n.items,u=n.maxButtons,o=n.onPageChange,s=n.classnames,c=n.showPageInput,d=this.state.pageNum,m=[];(u-1)/2+2>l&&(u=l+(u-1)/2),(u-1)/2+2>r-l&&(u=r-l+(u-1)/2+1),u&&r>u?(e=Math.max(Math.min(l-Math.floor(u/2),r-u+1),1),t=e+u-1):(e=1,t=r);for(var f=function(e){m.push(a.default.createElement("li",{onClick:function(){return o(e)},key:e,className:s({"is-active":e===l})},a.default.createElement("a",{role:"button"},e)))},p=e;t>=p;++p)f(p);return e>1&&(e>2&&m.unshift(a.default.createElement("li",{onClick:function(){return o(e-1)},key:"prev-ellipsis"},a.default.createElement("a",{role:"button"},"..."))),m.unshift(a.default.createElement("li",{onClick:function(){return o(1)},key:1,className:s({"is-active":1===l})},a.default.createElement("a",{role:"button"},1)))),r>t&&(r-t>1&&m.push(a.default.createElement("li",{className:s("Pagination-ellipsis"),onClick:function(){return o(t+1)},key:"next-ellipsis"},a.default.createElement("a",{role:"button"},a.default.createElement("span",null,"...")))),m.push(a.default.createElement("li",{onClick:function(){return o(r)},key:r,className:s({"is-active":r===l})},a.default.createElement("a",{role:"button"},r)))),m.unshift(a.default.createElement("li",{className:s("Pagination-prev",{"is-disabled":1===l}),onClick:1===l?function(e){return e.preventDefault()}:function(){return o(l-1)},key:"prev"},a.default.createElement("span",null,a.default.createElement(i.Icon,{icon:"left-arrow",className:"icon"})))),m.push(a.default.createElement("li",{className:s("Pagination-next",{"is-disabled":l===r}),onClick:l===r?function(e){return e.preventDefault()}:function(){return o(l+1)},key:"next"},a.default.createElement("span",null,a.default.createElement(i.Icon,{icon:"right-arrow",className:"icon"})))),a.default.createElement("div",null,a.default.createElement("ul",{className:s("Pagination","Pagination--sm")},m),r>9&&c?a.default.createElement("div",{className:"inline m-l-xs w-xs",key:"toPage"},a.default.createElement("span",{className:s("Pagination-inputGroup")},a.default.createElement("input",{type:"text",className:s("Pagination-input"),onChange:this.handlePageChange,onFocus:function(e){return e.currentTarget.select()},onKeyUp:function(e){return 13==e.keyCode&&o(parseInt(e.currentTarget.value,10))},value:d}),a.default.createElement("span",null,a.default.createElement("button",{onClick:function(){return o(parseInt(d,10))},type:"submit",className:s("Button","Button--default")},"Go")))):null)},t.prototype.render=function(){var e=this.props.mode;return"simple"===e?this.renderSimple():this.renderNormal()};var l;return t.defaultProps={activePage:1,items:1,maxButtons:5,mode:"normal",hasN
|
|||
|
;/*!src/renderers/Cards.tsx*/
|
|||
|
amis.define("0afb30b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardsRenderer=void 0;var r=e("node_modules/tslib/tslib"),a=r.__importDefault(e("node_modules/react/index")),n=e("node_modules/react-dom/index"),o=e("0f9ebdf"),i=r.__importDefault(e("a67acca")),s=e("4e9b495"),l=e("9a80175"),d=e("f2e345e"),c=r.__importDefault(e("node_modules/sortablejs/Sortable")),u=e("6a2dbb7"),m=e("b7bbd16"),h=function(e){function t(t){var r=e.call(this,t)||this;return r.handleAction=r.handleAction.bind(r),r.handleCheck=r.handleCheck.bind(r),r.handleCheckAll=r.handleCheckAll.bind(r),r.handleQuickChange=r.handleQuickChange.bind(r),r.handleSave=r.handleSave.bind(r),r.handleSaveOrder=r.handleSaveOrder.bind(r),r.reset=r.reset.bind(r),r.dragTipRef=r.dragTipRef.bind(r),r.bodyRef=r.bodyRef.bind(r),r.affixDetect=r.affixDetect.bind(r),r.itemsRef=r.itemsRef.bind(r),r.renderToolbar=r.renderToolbar.bind(r),r}return r.__extends(t,e),t.syncItems=function(e,t,r){var a=t.source,n=t.value||t.items,o=[],i=!0;if(Array.isArray(n))o=n;else if("string"==typeof a){var s=d.resolveVariable(a,t.data),l=r?d.resolveVariable(a,r.data):null;l&&l===s?i=!1:Array.isArray(s)&&(o=s)}i&&e.initItems(o),"undefined"!=typeof t.selected&&e.updateSelected(t.selected,t.valueField)},t.prototype.componentWillMount=function(){var e=this.props,r=e.store,a=e.selectable,n=e.draggable,o=e.orderBy,i=e.orderDir,s=e.multiple,l=e.hideCheckToggler,d=e.itemCheckableOn,c=e.itemDraggableOn;r.update({selectable:a,draggable:n,orderBy:o,orderDir:i,multiple:s,hideCheckToggler:l,itemCheckableOn:d,itemDraggableOn:c}),t.syncItems(r,this.props),this.syncSelected()},t.prototype.componentDidMount=function(){var e=l.getScrollParent(n.findDOMNode(this));e&&e!==document.body||(e=window),this.parentNode=e,this.affixDetect(),e.addEventListener("scroll",this.affixDetect),window.addEventListener("resize",this.affixDetect)},t.prototype.componentWillReceiveProps=function(e){var r=this.props,a=e.store;l.anyChanged(["selectable","draggable","orderBy","orderDir","multiple","hideCheckToggler","itemCheckableOn","itemDraggableOn"],r,e)&&a.update({selectable:e.selectable,draggable:e.draggable,orderBy:e.orderBy,orderDir:e.orderDir,multiple:e.multiple,hideCheckToggler:e.hideCheckToggler,itemCheckableOn:e.itemCheckableOn,itemDraggableOn:e.itemDraggableOn}),l.anyChanged(["source","value","items"],r,e)||!e.value&&!e.items&&e.data!==r.data?(t.syncItems(a,e,r),this.syncSelected()):r.selected!==e.selected&&a.updateSelected(e.selected||[],e.valueField)},t.prototype.componentWillUnmount=function(){var e=this.parentNode;e&&e.removeEventListener("scroll",this.affixDetect),window.removeEventListener("resize",this.affixDetect)},t.prototype.bodyRef=function(e){this.body=e},t.prototype.itemsRef=function(e){e||(this.unSensor&&this.unSensor(),delete this.unSensor)},t.prototype.affixDetect=function(){if(this.props.affixHeader&&this.body){var e=this.props.classPrefix,t=n.findDOMNode(this),r=this.body.getBoundingClientRect(),a=this.props.env.affixOffsetTop||0,o=r.top<a&&r.top+r.height-40>a,i=t.querySelector("."+e+"Cards-fixedTop");this.body.offsetWidth&&(i.style.cssText="top: "+a+"px;width: "+this.body.offsetWidth+"px;"),o?i.classList.add("in"):i.classList.remove("in")}},t.prototype.handleAction=function(e,t,r){var a=this.props.onAction;a(e,t,r)},t.prototype.handleCheck=function(e){e.toggle(),this.syncSelected()},t.prototype.handleCheckAll=function(){var e=this.props.store;e.toggleAll(),this.syncSelected()},t.prototype.syncSelected=function(){var e=this.props,t=e.store,r=e.onSelect;r&&r(t.selectedItems.map(function(e){return e.data}),t.unSelectedItems.map(function(e){return e.data}))},t.prototype.handleQuickChange=function(e,t,r,a){if(e.change(t,a),r&&!a){if(r&&r.api)return void this.props.onAction(null,{actionType:"ajax",api:r.api},t);var n=this.props,o=n.onSave,i=n.primaryField;o&&o(e.data,l.difference(e.data,e.pristine,["id",i]),e.index,void 0,e.pristine)}},t.prototype.handleSave=function(){var e=this.props,t=e.store,r=e.onSave,a=e.primaryField;if(r&&t.modifiedItems.length){var n=t.modifiedItems.map(funct
|
|||
|
;/*!src/renderers/QuickEdit.tsx*/
|
|||
|
amis.define("b497f17",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HocQuickEdit=void 0;var i,n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),a=e("node_modules/react-dom/index"),d=n.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),s=n.__importDefault(e("node_modules/keycode/index")),l=n.__importDefault(e("node_modules/dom-helpers/query/matches")),r=n.__importDefault(e("997df41")),c=n.__importDefault(e("2b3dcdf")),u=e("b7bbd16"),p=!1;t.HocQuickEdit=function(e){return void 0===e&&(e={}),function(e){var t=function(t){function d(e){var i=t.call(this,e)||this;return i.openQuickEdit=i.openQuickEdit.bind(i),i.closeQuickEdit=i.closeQuickEdit.bind(i),i.handleAction=i.handleAction.bind(i),i.handleSubmit=i.handleSubmit.bind(i),i.handleKeyUp=i.handleKeyUp.bind(i),i.overlayRef=i.overlayRef.bind(i),i.handleWindowKeyPress=i.handleWindowKeyPress.bind(i),i.handleWindowKeyDown=i.handleWindowKeyDown.bind(i),i.formRef=i.formRef.bind(i),i.handleInit=i.handleInit.bind(i),i.handleChange=i.handleChange.bind(i),i.state={isOpened:!1},i}return n.__extends(d,t),d.prototype.componentDidMount=function(){this.target=a.findDOMNode(this),p||(p=!0,document.body.addEventListener("keypress",this.handleWindowKeyPress),document.body.addEventListener("keydown",this.handleWindowKeyDown))},d.prototype.formRef=function(e){var t=this.props,i=t.quickEditFormRef,n=t.rowIndex,o=t.colIndex;if(i){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();i(e,o,n)}},d.prototype.handleWindowKeyPress=function(e){var t=this.props.classPrefix,i=e.target.closest("."+t+"Field--quickEditable");if(i){var n=i.closest("table");n&&("space"!==s.default(e)||~["INPUT","TEXTAREA"].indexOf(i.tagName)||(e.preventDefault(),e.stopPropagation()))}},d.prototype.handleWindowKeyDown=function(e){var t=s.default(e);if("esc"===t&&i)i.closeQuickEdit();else if(~["INPUT","TEXTAREA"].indexOf(e.target.tagName)||"true"===e.target.contentEditable||!~["up","down","left","right"].indexOf(t))return;e.preventDefault();var n=this.props.classPrefix,o=e.target.closest("."+n+"Field--quickEditable")||document.querySelector("."+n+"Field--quickEditable");if(o){var a=o.closest("table");if(a){var d=a.querySelector("."+n+"Field--quickEditable:focus");if(d){var r=void 0,c=void 0,u=void 0,p=void 0;switch(t){case"up":if(r=d.parentNode.previousSibling){var f=d.cellIndex;r.children[f].focus()}break;case"down":if(c=d.parentNode.nextSibling){var f=d.cellIndex;c.children[f].focus()}break;case"left":for(u=d.previousElementSibling;u&&!l.default(u,"."+n+"Field--quickEditable[tabindex]");)u=u.previousElementSibling;if(u)u.focus();else if(d.parentNode.previousSibling){var h=d.parentNode.previousSibling.querySelectorAll("."+n+"Field--quickEditable[tabindex]");h.length&&h[h.length-1].focus()}break;case"right":for(p=d.nextSibling;p&&!l.default(p,"."+n+"Field--quickEditable[tabindex]");)p=p.nextSibling;p?p.focus():d.parentNode.nextSibling&&(p=d.parentNode.nextSibling.querySelector("."+n+"Field--quickEditable[tabindex]"),p&&p.focus())}}else{var m=a.querySelector("."+n+"Field--quickEditable[tabindex]");m&&m.focus()}}}},d.prototype.overlayRef=function(e){this.overlay=e},d.prototype.handleAction=function(e,t,i){var n=this.props.onAction;return"cancel"===t.actionType||"close"===t.actionType?void this.closeQuickEdit():void(n&&n(e,t,i))},d.prototype.handleSubmit=function(e){var t=this.props,i=t.onQuickChange,n=t.quickEdit;this.closeQuickEdit(),i(e,n.saveImmediately)},d.prototype.handleInit=function(e){var t=this.props.onQuickChange;t(e,!1,!0)},d.prototype.handleChange=function(e){var t=this.props,i=t.onQuickChange,n=t.quickEdit;i(e,n.saveImmediately)},d.prototype.openQuickEdit=function(){i=this,this.setState({isOpened:!0})},d.prototype.closeQuickEdit=function(){var e=this;if(this.state.isOpened){i=null;var t=this.props.classPrefix;this.setState({isOpened:!1},function(){var i=a.findDOMNode(e),n=i.closest("table");(n&&n.querySelectorAll("td."+t+"Field--quickEditable:focus").length||i)&&i.focus()})}},d.prototype.buildSchema=function(){v
|
|||
|
;/*!src/renderers/PopOver.tsx*/
|
|||
|
amis.define("bcd7efc",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HocPopOver=void 0;var o=e("node_modules/tslib/tslib"),r=o.__importDefault(e("node_modules/react/index")),n=e("node_modules/react-dom/index"),s=o.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),a=e("node_modules/react-overlays/lib/index"),p=o.__importDefault(e("2b3dcdf")),i=o.__importDefault(e("997df41")),l=e("b7bbd16");t.HocPopOver=function(e){return void 0===e&&(e={}),function(e){var t=function(t){function s(e){var o=t.call(this,e)||this;return o.openPopOver=o.openPopOver.bind(o),o.closePopOver=o.closePopOver.bind(o),o.targetRef=o.targetRef.bind(o),o.state={isOpened:!1},o}return o.__extends(s,t),s.prototype.targetRef=function(e){this.target=e},s.prototype.openPopOver=function(){var e=this,t=this.props.onPopOverOpened;this.setState({isOpened:!0},function(){return t&&t(e.props.popOver)})},s.prototype.closePopOver=function(){var e=this;if(this.state.isOpened){var t=this.props.onPopOverClosed;this.setState({isOpened:!1},function(){return t&&t(e.props.popOver)})}},s.prototype.buildSchema=function(){var e,t=this.props,r=t.popOver,n=(t.name,t.label,t.translate);return r===!0?e={type:"panel",body:"${name}"}:!r||"dialog"!==r.mode&&"drawer"!==r.mode?r&&(e=o.__assign({type:"panel"},r)):e=o.__assign({type:r.mode,actions:[{label:n("关闭"),type:"button",actionType:"cancel"}]},r),e||"error"},s.prototype.renderPopOver=function(){var e=this,t=this.props,o=t.popOver,s=t.render,l=t.popOverContainer,d=t.classnames,c=t.classPrefix;if(o&&("dialog"===o.mode||"drawer"===o.mode))return s("popover-detail",this.buildSchema(),{show:!0,onClose:this.closePopOver,onConfirm:this.closePopOver});var u=s("popover-detail",this.buildSchema(),{className:d(o.className)});l||(l=function(){return n.findDOMNode(e)});var f=o&&o.position||"",v=/^fixed\-/.test(f);return v?r.default.createElement(a.RootCloseWrapper,{disabled:!this.state.isOpened,onRootClose:this.closePopOver},r.default.createElement("div",{className:d("PopOverAble--fixed PopOverAble--"+f)},u)):r.default.createElement(i.default,{container:l,placement:f||"center",target:function(){return e.target},onHide:this.closePopOver,rootClose:!0,show:!0},r.default.createElement(p.default,{classPrefix:c,className:d("PopOverAble-popover"),offset:o.offset},u))},s.prototype.render=function(){var t=this.props,n=t.popOver,s=t.popOverEnabled,a=t.className,p=t.noHoc,i=t.classnames;return!n||s===!1||p?r.default.createElement(e,o.__assign({},this.props)):r.default.createElement(e,o.__assign({},this.props,{className:i("Field--popOverAble",a,{"in":this.state.isOpened})}),r.default.createElement(e,o.__assign({},this.props,{wrapperComponent:"",noHoc:!0,ref:this.targetRef})),r.default.createElement("span",{key:"popover-btn",className:i("Field-popOverBtn"),onClick:this.openPopOver},r.default.createElement(l.Icon,{icon:"zoom-in",className:"icon"})),this.state.isOpened?this.renderPopOver():null)},s.ComposedComponent=e,s}(r.default.Component);return s.default(t,e),t}},t.default=t.HocPopOver});
|
|||
|
;/*!src/renderers/Copyable.tsx*/
|
|||
|
amis.define("705a434",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HocCopyable=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),a=n.__importDefault(e("node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs")),s=e("6a2dbb7"),i=e("b7bbd16");t.HocCopyable=function(){return function(e){var t=function(t){function a(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(a,t),a.prototype.handleClick=function(e){var t=this.props.env;t.copy&&t.copy(e)},a.prototype.render=function(){var t=this.props,a=t.copyable,r=t.name,l=t.className,c=t.data,p=t.noHoc,d=t.classnames,u=t.translate;if(a&&!p){var f=s.filter(a.content||"${"+r+" | raw }",c);if(f)return o.default.createElement(e,n.__assign({},this.props,{className:d("Field--copyable",l)}),o.default.createElement(e,n.__assign({},this.props,{wrapperComponent:"",noHoc:!0})),o.default.createElement("a",{key:"edit-btn","data-tooltip":u("点击复制"),className:d("Field-copyBtn"),onClick:this.handleClick.bind(this,f)},o.default.createElement(i.Icon,{icon:"copy",className:"icon"})))}return o.default.createElement(e,n.__assign({},this.props))},a.ComposedComponent=e,a}(o.default.PureComponent);return a.default(t,e),t}},t.default=t.HocCopyable});
|
|||
|
;/*!src/renderers/Table.tsx*/
|
|||
|
amis.define("f6086a9",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldRenderer=t.TableCellRenderer=t.TableCell=t.HeadCellFilterDropDown=t.HeadCellSearchDropDown=t.TableRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),r=e("node_modules/react-dom/index"),l=e("0f9ebdf"),o=a.__importDefault(e("node_modules/lodash/forEach")),i=e("6a2dbb7"),s=a.__importDefault(e("node_modules/classnames/index")),d=a.__importDefault(e("bb5331d")),c=a.__importDefault(e("0a43d97")),u=a.__importDefault(e("a67acca")),p=e("4fbfbc8"),f=e("node_modules/mobx-react/dist/index"),h=e("9a80175"),m=e("f2e345e"),g=e("1caead1"),b=a.__importDefault(e("node_modules/lodash/debounce")),v=a.__importDefault(e("node_modules/lodash/xor")),y=a.__importDefault(e("b497f17")),C=a.__importDefault(e("2b3dcdf")),x=a.__importDefault(e("705a434")),_=a.__importDefault(e("node_modules/sortablejs/Sortable")),T=e("67d35e6"),N=a.__importDefault(e("node_modules/lodash/find")),E=a.__importDefault(e("997df41")),k=a.__importDefault(e("bcd7efc")),w=e("b7bbd16"),D=function(e){function t(t){var a=e.call(this,t)||this;return a.lastScrollLeft=-1,a.totalWidth=0,a.totalHeight=0,a.outterWidth=0,a.outterHeight=0,a.widths={},a.heights={},a.renderedToolbars=[],a.subForms={},a.handleOutterScroll=a.handleOutterScroll.bind(a),a.affixDetect=a.affixDetect.bind(a),a.updateTableInfoLazy=b.default(a.updateTableInfo.bind(a),250,{trailing:!0,leading:!0}),a.tableRef=a.tableRef.bind(a),a.affixedTableRef=a.affixedTableRef.bind(a),a.handleAction=a.handleAction.bind(a),a.handleCheck=a.handleCheck.bind(a),a.handleCheckAll=a.handleCheckAll.bind(a),a.handleQuickChange=a.handleQuickChange.bind(a),a.handleSave=a.handleSave.bind(a),a.handleSaveOrder=a.handleSaveOrder.bind(a),a.reset=a.reset.bind(a),a.dragTipRef=a.dragTipRef.bind(a),a.getPopOverContainer=a.getPopOverContainer.bind(a),a.renderCell=a.renderCell.bind(a),a.renderToolbar=a.renderToolbar.bind(a),a.handleMouseMove=a.handleMouseMove.bind(a),a.handleMouseLeave=a.handleMouseLeave.bind(a),a.subFormRef=a.subFormRef.bind(a),a}a.__extends(t,e),t.syncRows=function(e,t,a){var n=t.source,r=t.value||t.items,l=[],o=!0;if(Array.isArray(r))l=r;else if("string"==typeof n){var i=m.resolveVariable(n,t.data),s=a?m.resolveVariable(n,a.data):null;s&&s===i?o=!1:Array.isArray(i)&&(l=i)}o&&e.initRows(l,t.getEntryId),"undefined"!=typeof t.selected&&e.updateSelected(t.selected,t.valueField)},t.prototype.componentWillMount=function(){var e=this.props,a=e.store,n=e.columns,r=e.selectable,l=e.columnsTogglable,o=e.draggable,i=e.orderBy,s=e.orderDir,d=e.multiple,c=e.footable,u=e.primaryField,p=e.itemCheckableOn,f=e.itemDraggableOn,h=e.hideCheckToggler,m=e.combineNum,g=e.expandConfig;a.update({selectable:r,draggable:o,columns:n,columnsTogglable:l,orderBy:i,orderDir:s,multiple:d,footable:c,expandConfig:g,primaryField:u,itemCheckableOn:p,itemDraggableOn:f,hideCheckToggler:h,combineNum:m}),t.syncRows(a,this.props),this.syncSelected()},t.prototype.componentDidMount=function(){var e=h.getScrollParent(r.findDOMNode(this));e&&e!==document.body||(e=window),this.parentNode=e,this.updateTableInfo();var t=r.findDOMNode(this);t.closest(".modal-body")||(this.affixDetect(),e.addEventListener("scroll",this.affixDetect),window.addEventListener("resize",this.affixDetect))},t.prototype.componentWillReceiveProps=function(e){var a=this.props,n=e.store;h.anyChanged(["selectable","columnsTogglable","draggable","orderBy","orderDir","multiple","footable","primaryField","itemCheckableOn","itemDraggableOn","hideCheckToggler","combineNum","expandConfig"],a,e)&&n.update({selectable:e.selectable,columnsTogglable:e.columnsTogglable,draggable:e.draggable,orderBy:e.orderBy,orderDir:e.orderDir,multiple:e.multiple,primaryField:e.primaryField,footable:e.footable,itemCheckableOn:e.itemCheckableOn,itemDraggableOn:e.itemDraggableOn,hideCheckToggler:e.hideCheckToggler,combineNum:e.combineNum,expandConfig:e.expandConfig}),a.columns!==e.columns&&n.update({columns:e.columns}),h.anyChanged(["source","value","items"],a,e)||!e.value&&!e.items&
|
|||
|
return a.handleAction=a.handleAction.bind(a),a.handleQuickChange=a.handleQuickChange.bind(a),a.handleClick=a.handleClick.bind(a),a}return a.__extends(t,e),t.prototype.handleClick=function(e){var t,a=e.target,n=this.props.classPrefix;!e.currentTarget.contains(a)||~["INPUT","TEXTAREA"].indexOf(a.tagName)||(t=a.closest("button, a, ."+n+"Form-item"))&&e.currentTarget.contains(t)||this.props.onCheck(this.props.item)},t.prototype.handleAction=function(e,t,a){var n=this.props,r=n.onAction,l=n.item;r&&r(e,t,a||l.data)},t.prototype.handleQuickChange=function(e,t,a){var n=this.props,r=n.onQuickChange,l=n.item;r&&r(l,e,t,a)},t.prototype.render=function(){var e,t,r=this,l=this.props,o=l.itemClassName,i=l.itemIndex,d=l.item,c=l.columns,u=l.renderCell,p=(l.children,l.footableMode),f=l.footableColSpan,h=l.regionPrefix,m=l.checkOnItemClick,g=l.classPrefix,b=l.render,v=a.__rest(l,["itemClassName","itemIndex","item","columns","renderCell","children","footableMode","footableColSpan","regionPrefix","checkOnItemClick","classPrefix","render"]);return p?n.default.createElement("tr",{"data-id":d.id,"data-index":d.newIndex,onClick:m?this.handleClick:void 0,className:s.default(o,(e={"is-hovered":d.isHover,"is-checked":d.checked,"is-modified":d.modified,"is-moved":d.moved},e[g+"Table-tr--odd"]=i%2===0,e[g+"Table-tr--even"]=i%2===1,e))},n.default.createElement("td",{className:g+"Table-foot",colSpan:f},n.default.createElement("table",{className:g+"Table-footTable"},n.default.createElement("tbody",null,c.map(function(e){return n.default.createElement("tr",{key:e.index},e.label!==!1?n.default.createElement("th",null,b(""+h+i+"/"+e.index+"/tpl",e.label)):null,u(""+h+i+"/"+e.index,e,d,a.__assign(a.__assign({},v),{width:null,rowIndex:i,colIndex:e.rawIndex,key:e.index,onAction:r.handleAction,onQuickChange:r.handleQuickChange})))}))))):n.default.createElement("tr",{onClick:m?this.handleClick:void 0,"data-index":1===d.depth?d.newIndex:void 0,"data-id":d.id,className:s.default(o,(t={"is-hovered":d.isHover,"is-checked":d.checked,"is-modified":d.modified,"is-moved":d.moved},t[g+"Table-tr--odd"]=i%2===0,t[g+"Table-tr--even"]=i%2===1,t),g+"Table-tr--"+d.depth+"th")},c.map(function(e){return u(i+"/"+e.index,e,d,a.__assign(a.__assign({},v),{rowIndex:i,colIndex:e.rawIndex,key:e.index,onAction:r.handleAction,onQuickChange:r.handleQuickChange}))}))},t=a.__decorate([f.observer,a.__metadata("design:paramtypes",[Object])],t)}(n.default.Component),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([l.Renderer({test:function(e){return/(^|\/)table$/.test(e)},storeType:p.TableStore.name,name:"table"})],t)}(D);t.TableRenderer=S;var I=function(e){function t(t){var a=e.call(this,t)||this;return a.state={isOpened:!1},a.formItems=[],a.open=a.open.bind(a),a.close=a.close.bind(a),a.close=a.close.bind(a),a.handleSubmit=a.handleSubmit.bind(a),a.handleAction=a.handleAction.bind(a),a}return a.__extends(t,e),t.prototype.buildSchema=function(){var e,t,n=this.props,r=n.searchable,l=n.sortable,o=n.name,i=n.label,s=n.translate;if(r===!0?t={title:"",controls:[{type:"text",name:o,placeholder:i,clearable:!0}]}:r&&(t=r.controls||r.tabs||r.fieldSet?a.__assign({title:""},r):{title:"",className:r.formClassName,controls:[a.__assign({type:r.type||"text",name:r.name||o,placeholder:i},r)]}),t&&t.controls&&l&&t.controls.unshift({type:"hidden",name:"orderBy",value:o},{type:"button-group",name:"orderDir",label:s("排序"),options:[{label:s("正序"),value:"asc"},{label:s("降序"),value:"desc"}]}),t){var d=[];null===(e=t.controls)||void 0===e?void 0:e.forEach(function(e){return e.name&&"orderBy"!==e.name&&"orderDir"!==e.name&&d.push(e.name)}),this.formItems=d,t=a.__assign(a.__assign({},t),{type:"form",wrapperComponent:"div",actions:[{type:"button",label:s("重置"),actionType:"reset"},{type:"button",label:s("取消"),actionType:"cancel"},{label:s("搜索"),type:"submit",primary:!0}]})}return t||"error"},t.prototype.handleClickOutside=function(){this.close()},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function
|
|||
|
;/*!src/renderers/Card.tsx*/
|
|||
|
amis.define("8ee3b98",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CardItemFieldRenderer=a.CardRenderer=a.Card=void 0;var t=e("node_modules/tslib/tslib"),r=t.__importDefault(e("node_modules/react/index")),l=e("node_modules/react-dom/index"),s=e("0f9ebdf"),n=e("6a2dbb7"),i=t.__importDefault(e("0a43d97")),d=e("9a80175"),o=e("f2e345e"),c=t.__importDefault(e("b497f17")),m=t.__importDefault(e("bcd7efc")),u=e("f6086a9"),p=t.__importDefault(e("705a434")),h=e("b7bbd16"),C=function(e){function a(a){var t=e.call(this,a)||this;return t.getPopOverContainer=t.getPopOverContainer.bind(t),t.itemRender=t.itemRender.bind(t),t.handleAction=t.handleAction.bind(t),t.handleQuickChange=t.handleQuickChange.bind(t),t.handleClick=t.handleClick.bind(t),t.handleCheck=t.handleCheck.bind(t),t}return t.__extends(a,e),a.prototype.handleClick=function(e){var a,t=e.target,r=this.props.classPrefix;if(!(!e.currentTarget.contains(t)||~["INPUT","TEXTAREA"].indexOf(t.tagName)||(a=t.closest("button, a, ."+r+"Form-item"))&&e.currentTarget.contains(a))){var l=this.props.item;this.props.onCheck&&this.props.onCheck(l)}},a.prototype.handleCheck=function(){var e=this.props.item;this.props.onCheck&&this.props.onCheck(e)},a.prototype.handleAction=function(e,a,t){var r=this.props,l=r.onAction,s=r.item;l&&l(e,a,t||s.data)},a.prototype.handleQuickChange=function(e,a,t){var r=this.props,l=r.onQuickChange,s=r.item;l&&l(s,e,a,t)},a.prototype.getPopOverContainer=function(){return l.findDOMNode(this)},a.prototype.renderToolbar=function(){var e=this.props,a=e.dragging,t=e.selectable,l=e.checkable,s=e.selected,n=(e.onSelect,e.checkOnItemClick),o=e.multiple,c=e.hideCheckToggler,m=e.classnames,u=e.classPrefix;return a?r.default.createElement("div",{className:m("Card-dragBtn")},r.default.createElement(h.Icon,{icon:"drag-bar",className:"icon"})):t&&!c?r.default.createElement("div",{className:m("Card-checkBtn")},r.default.createElement(i.default,{classPrefix:u,type:o?"checkbox":"radio",disabled:!l,checked:s,onChange:n?d.noop:this.handleCheck})):null},a.prototype.renderActions=function(){var e=this,a=this.props,l=a.actions,s=a.render,n=a.dragging,i=a.actionsCount,o=a.data,c=a.classnames;if(Array.isArray(l)){var m=d.padArr(l.filter(function(e){return d.isVisible(e,o)}),i);return m.map(function(a,l){return r.default.createElement("div",{key:l,className:c("Card-actions")},a.map(function(a,r){var l=a.size||"sm";return s("action/"+r,t.__assign(t.__assign({level:"link",type:"button"},a),{size:l}),{isMenuItem:!0,key:r,index:r,disabled:n||d.isDisabled(a,o),className:c("Card-action",a.className||""+(l?"Card-action--"+l:"")),componentClass:"a",onAction:e.handleAction})}))})}return null},a.prototype.renderChild=function(e,a,t){void 0===a&&(a="body"),void 0===t&&(t=0);var r=this.props.render;if("string"==typeof e||"number"==typeof e)return r(a,e,{key:t});var l=e;return"hbox"===l.type||"grid"===l.type?r(a,e,{key:t,itemRender:this.itemRender}):this.renderFeild(a,l,t,this.props)},a.prototype.itemRender=function(e,a,t){return this.renderFeild("column/"+a,e,a,t)},a.prototype.renderFeild=function(e,a,l,s){var n=s.render,i=s.classnames,c=s.itemIndex,m=this.props.data;if(d.isVisible(a,m)){var u=a.$$id?a.$$id+"-field":"";return r.default.createElement("div",{className:i("Card-field"),key:l},a&&a.label?r.default.createElement("label",{className:i("Card-fieldLabel",a.labelClassName)},a.label):null,n(e,t.__assign(t.__assign({},a),{field:a,$$id:u,type:"card-item-field"}),{className:i("Card-fieldValue",a.className),rowIndex:c,colIndex:l,value:a.name?o.resolveVariable(a.name,m):void 0,popOverContainer:this.getPopOverContainer,onAction:this.handleAction,onQuickChange:this.handleQuickChange}))}},a.prototype.renderBody=function(){var e=this,a=this.props.body;return a?Array.isArray(a)?a.map(function(a,t){return e.renderChild(a,"body/"+t,t)}):this.renderChild(a,"body"):null},a.prototype.render=function(){var e=this.props,a=e.className,t=e.data,l=e.header,s=e.render,i=e.bodyClassName,d=e.highlightClassName,o=e.titleClassName,c=e.subTitleClassName,m=e.descClassName,u=e.checkOnItemCl
|
|||
|
;/*!src/renderers/Date.tsx*/
|
|||
|
amis.define("29e1f6a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeFieldRenderer=t.DateTimeFieldRenderer=t.DateFieldRenderer=t.DateField=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),s=a.__importDefault(e("node_modules/moment/moment")),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={random:0},t}return a.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,a=t.fromNow,r=t.updateFrequency;a&&r&&(this.refreshInterval=setInterval(function(){e.setState({random:Math.random()})},r))},t.prototype.componentWillUnmount=function(){clearInterval(this.refreshInterval)},t.prototype.render=function(){var e=this.props,t=e.value,a=e.valueFormat,n=e.format,o=e.placeholder,l=e.fromNow,d=e.className,i=e.classnames,u=e.translate,m=r.default.createElement("span",{className:"text-muted"},o);if(t){var f=s.default(t,s.default.ISO_8601),p=s.default(t,a);m=f.isValid()?f.format(n):p.isValid()?p.format(n):!1}return l&&(m=s.default(m).fromNow()),m=m?m:r.default.createElement("span",{className:"text-danger"},u("日期无效")),r.default.createElement("span",{className:i("DateField",d)},m)},t.defaultProps={placeholder:"-",format:"YYYY-MM-DD",valueFormat:"X",fromNow:!1,updateFrequency:6e4},t}(r.default.Component);t.DateField=o;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},o.defaultProps),{format:"YYYY-MM-DD"}),t=a.__decorate([n.Renderer({test:/(^|\/)date$/,name:"date-field"})],t)}(o);t.DateFieldRenderer=l;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},o.defaultProps),{format:"YYYY-MM-DD HH:mm:ss"}),t=a.__decorate([n.Renderer({test:/(^|\/)datetime$/,name:"datetime-field"})],t)}(o);t.DateTimeFieldRenderer=d;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},o.defaultProps),{format:"HH:mm"}),t=a.__decorate([n.Renderer({test:/(^|\/)time$/,name:"time-field"})],t)}(o);t.TimeFieldRenderer=i});
|
|||
|
;/*!src/renderers/Dialog.tsx*/
|
|||
|
amis.define("e299c64",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogRenderer=void 0;var o=e("node_modules/tslib/tslib"),n=o.__importDefault(e("node_modules/react/index")),a=e("919cbd9"),r=e("0f9ebdf"),i=e("6a2dbb7"),s=o.__importDefault(e("628f736")),l=o.__importDefault(e("node_modules/lodash/findLast")),d=e("9a80175"),c=e("node_modules/mobx/lib/index"),p=e("b7bbd16"),h=e("4550477"),u=e("node_modules/react-dom/index"),f=e("1953fc1"),m=function(e){function t(t){var o=e.call(this,t)||this;return o.isDead=!1,o.$$id=d.guid(),o.state={entered:!!o.props.show},o.handleSelfClose=o.handleSelfClose.bind(o),o.handleAction=o.handleAction.bind(o),o.handleDialogConfirm=o.handleDialogConfirm.bind(o),o.handleDialogClose=o.handleDialogClose.bind(o),o.handleDrawerConfirm=o.handleDrawerConfirm.bind(o),o.handleDrawerClose=o.handleDrawerClose.bind(o),o.handleEntered=o.handleEntered.bind(o),o.handleExited=o.handleExited.bind(o),o.handleFormInit=o.handleFormInit.bind(o),o.handleFormSaved=o.handleFormSaved.bind(o),o.handleFormChange=o.handleFormChange.bind(o),o.handleChildFinished=o.handleChildFinished.bind(o),o}return o.__extends(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props.store;this.reaction=c.reaction(function(){return""+t.loading+t.error},function(){return e.forceUpdate()})},t.prototype.componentWillUnmount=function(){this.reaction&&this.reaction(),this.isDead=!0},t.prototype.buildActions=function(){var e=this.props,t=e.actions,o=e.confirm,n=e.translate;if("undefined"!=typeof t)return t;var a=[];return a.push({type:"button",actionType:"cancel",label:n("取消")}),o&&a.push({type:"button",actionType:"confirm",label:n("确认"),primary:!0}),a},t.prototype.handleSelfClose=function(){var e=this.props,t=e.onClose,o=e.store;o.updateMessage(),t()},t.prototype.handleAction=function(e,t,o){var n=this.props,a=n.store,r=n.onAction;"reset"===t.type?a.reset():"cancel"===t.actionType?this.handleSelfClose():r&&r(e,t,o)},t.prototype.handleDialogConfirm=function(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var r=this.props.store;t.mergeData&&1===e.length&&e[0]&&r.updateData(e[0]);var i=r.action.dialog;i&&i.onConfirm&&i.onConfirm.apply(i,o.__spreadArrays([e,t],n))===!1||r.closeDialog()},t.prototype.handleDialogClose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=this.props.store,n=o.action,a=n.dialog;a.onClose&&a.onClose.apply(a,e)===!1||o.closeDialog()},t.prototype.handleDrawerConfirm=function(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var r=this.props.store;t.mergeData&&1===e.length&&e[0]&&r.updateData(e[0]);var i=r.action.drawer;i&&i.onConfirm&&i.onConfirm.apply(i,o.__spreadArrays([e,t],n))===!1||r.closeDrawer()},t.prototype.handleDrawerClose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=this.props.store,n=o.action,a=n.drawer;a.onClose&&a.onClose.apply(a,e)===!1||o.closeDrawer()},t.prototype.handleEntered=function(){this.state.entered||this.setState({entered:!0});var e=document.activeElement;if(e){var t=u.findDOMNode(this);t&&!t.contains(e)&&e.blur()}},t.prototype.handleExited=function(){var e=this.props.store;e.reset(),this.state.entered&&this.setState({entered:!1})},t.prototype.handleFormInit=function(e){var t=this.props.store;t.setFormData(e)},t.prototype.handleFormChange=function(e){var t=this.props.store;t.setFormData(e)},t.prototype.handleFormSaved=function(e,t){var n=this.props.store;n.setFormData(o.__assign(o.__assign({},e),t))},t.prototype.handleChildFinished=function(){},t.prototype.openFeedback=function(e,t){var o=this;return new Promise(function(n){var a=o.props.store;a.setCurrentAction({type:"button",actionType:"dialog",dialog:e}),a.openDialog(t,void 0,function(e){n(e)})})},t.prototype.getPopOverContainer=function(){return u.findDOMNode(this).querySelector("."+this.props.classPrefix+"Modal-content")},t.prototype.renderBody=function(e,t){var n=this,a=this.props,r=a.render,i=a.store;if(Array.isArray(e))return e.map(function(e,t){return n.renderBody(e,t)});var s={key:t,disabled:e&&e.d
|
|||
|
;/*!src/renderers/Divider.tsx*/
|
|||
|
amis.define("5cdd617",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DividerRenderer=void 0;var r=e("node_modules/tslib/tslib"),n=r.__importDefault(e("node_modules/react/index")),i=e("0f9ebdf"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.classnames,r=e.className,i=e.lineStyle;return n.default.createElement("div",{className:t("Divider",i?"Divider--"+i:"",r)})},t.defaultProps={className:"",lineStyle:"dashed"},t}(n.default.Component);t.default=d;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([i.Renderer({test:/(^|\/)(?:divider|hr)$/,name:"divider"})],t)}(d);t.DividerRenderer=s});
|
|||
|
;/*!src/renderers/Each.tsx*/
|
|||
|
amis.define("6c4a05a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EachRenderer=void 0;var r=e("node_modules/tslib/tslib"),a=r.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),s=e("f2e345e"),i=e("9a80175"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.data,r=e.name,n=e.className,u=e.render,l=e.value,d=e.items,c="undefined"!=typeof l?i.isObject(l)?Object.keys(l).map(function(e){return{key:e,value:l[e]}}):Array.isArray(l)?l:[]:s.resolveVariable(r,t);return a.default.createElement("div",{className:n},Array.isArray(c)&&d?c.map(function(e,a){var n;return u("item/"+a,d,{data:i.createObject(t,i.isObject(e)?e:(n={},n[r]=e,n.item=e,n)),key:a})}):null)},t.propsList=["name","items","value"],t.defaultProps={className:""},t}(a.default.Component);t.default=u;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([n.Renderer({test:/(^|\/)(?:repeat|each)$/,name:"each"})],t)}(u);t.EachRenderer=l});
|
|||
|
;/*!src/renderers/Form/index.tsx*/
|
|||
|
amis.define("635e59b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormRenderer=void 0;var o=e("node_modules/tslib/tslib"),n=o.__importDefault(e("node_modules/react/index")),i=e("0f9ebdf"),r=e("956950c"),a=e("6a2dbb7"),s=o.__importDefault(e("node_modules/classnames/index")),l=o.__importDefault(e("01e2bb4")),d=e("9a80175"),c=o.__importDefault(e("node_modules/lodash/debounce")),p=o.__importDefault(e("node_modules/lodash/flatten")),u=o.__importDefault(e("node_modules/lodash/find")),h=e("919cbd9"),f=o.__importDefault(e("node_modules/qs/lib/index")),m=e("f2e345e"),v=e("1caead1"),g=o.__importDefault(e("acad559")),y=e("1953fc1"),b=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),C=e("567b83c"),_=e("398dbab"),A=function(e){function t(t){var o=e.call(this,t)||this;return o.hooks={},o.shouldLoadInitApi=!1,o.lazyHandleChange=c.default(o.handleChange.bind(o),250,{trailing:!0,leading:!1}),o.componentCache=new _.SimpleMap,o.onInit=o.onInit.bind(o),o.handleAction=o.handleAction.bind(o),o.handleDialogConfirm=o.handleDialogConfirm.bind(o),o.handleDialogClose=o.handleDialogClose.bind(o),o.handleDrawerConfirm=o.handleDrawerConfirm.bind(o),o.handleDrawerClose=o.handleDrawerClose.bind(o),o.handleFormSubmit=o.handleFormSubmit.bind(o),o.validate=o.validate.bind(o),o.submit=o.submit.bind(o),o.addHook=o.addHook.bind(o),o.removeHook=o.removeHook.bind(o),o.handleChange=o.handleChange.bind(o),o.renderFormItems=o.renderFormItems.bind(o),o.reload=o.reload.bind(o),o.silentReload=o.silentReload.bind(o),o.initInterval=o.initInterval.bind(o),o}return o.__extends(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.store,o=e.canAccessSuperData,n=e.persistData;if(t.setCanAccessSuperData(o!==!1),n&&t.getPersistData(),t&&t.parentStore&&"ComboStore"===t.parentStore.storeType){var i=t.parentStore;i.addForm(t),i.forms.forEach(function(e){return e.items.forEach(function(e){return e.unique&&e.syncOptions()})})}},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.initApi,i=t.initFetch,r=t.initFetchOn,a=t.initAsyncApi,s=t.initFinishedField,l=t.initCheckInterval,c=t.store,p=t.messages,u=p.fetchSuccess,h=p.fetchFailed,f=t.onValidate;if(this.mounted=!0,f){var m=d.promisify(f);this.disposeOnValidate=this.addHook(function(){return o.__awaiter(e,void 0,void 0,function(){var e;return o.__generator(this,function(t){switch(t.label){case 0:return[4,m(c.data,c)];case 1:return e=t.sent(),e&&d.isObject(e)&&Object.keys(e).forEach(function(t){var o=e[t],n=c.getItemByName(t);n&&(o?(o=Array.isArray(o)?o:[o],n.addError(o)):n.clearError())}),[2]}})})})}v.isEffectiveApi(n,c.data,i,r)?c.fetchInitData(n,c.data,{successMessage:u,errorMessage:h,onSuccess:function(){return v.isEffectiveApi(a,c.data)&&!c.data[s||"finished"]?d.until(function(){return c.checkRemote(a,c.data)},function(e){return e&&e[s||"finished"]},function(t){return e.asyncCancel=t},l):void 0}}).then(this.initInterval).then(this.onInit):setTimeout(this.onInit.bind(this),4)},t.prototype.componentDidUpdate=function(e){var t=this.props,o=t.store;if(v.isApiOutdated(e.initApi,t.initApi,e.data,t.data)){var n=t.fetchSuccess,i=t.fetchFailed;o.fetchData(t.initApi,o.data,{successMessage:n,errorMessage:i}).then(this.initInterval)}},t.prototype.componentWillUnmount=function(){this.mounted=!1,clearTimeout(this.timer),this.lazyHandleChange.cancel(),this.asyncCancel&&this.asyncCancel(),this.disposeOnValidate&&this.disposeOnValidate(),this.componentCache.dispose();var e=this.props.store;if(e&&e.parentStore&&"ComboStore"===e.parentStore.storeType){var t=e.parentStore;b.isAlive(t)&&t.removeForm(e)}},t.prototype.onInit=function(){return o.__awaiter(this,void 0,void 0,function(){var e,t,n,i,r,a,s;return o.__generator(this,function(l){switch(l.label){case 0:return e=this.props,t=e.onInit,n=e.store,i=e.submitOnInit,b.isAlive(n)?(r=d.cloneObject(n.data),a=n.initedAt,n.setInited(!0),s=this.hooks.init||[],[4,Promise.all(s.map(function(e){return e(r)}))]):[2];case 1:return l.sent(),b.isAlive(n)?(n.initedAt!==a&&(r=o.__assign(o.__assign({},r),n.data)),t&&t(r,this.props),i&&this.h
|
|||
|
;/*!src/renderers/Form/Control.tsx*/
|
|||
|
amis.define("610fd77",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormControlRenderer=void 0;var o=e("node_modules/tslib/tslib"),i=o.__importDefault(e("node_modules/react/index")),n=o.__importDefault(e("node_modules/lodash/debounce")),r=e("0f9ebdf"),a=e("3fbfd93"),l=e("9a80175"),s=e("919cbd9"),d=e("node_modules/mobx/lib/index"),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lazyValidate=n.default(t.validate.bind(t),250,{trailing:!0,leading:!1}),t.lazyEmitChange=n.default(t.emitChange.bind(t),250,{trailing:!0,leading:!1}),t.state={value:t.value=t.props.control.value},t}return o.__extends(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props,o=t.formStore,i=t.control,n=i.name,r=i.id,l=i.type,s=i.required,h=i.validations,u=i.validationErrors,p=i.unique,m=i.value,c=i.multiple,v=i.delimiter,f=i.valueField,g=i.labelField,y=i.joinValues,C=i.extractValue;if(this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBulkChange=this.handleBulkChange.bind(this),this.setPrinstineValue=this.setPrinstineValue.bind(this),this.controlRef=this.controlRef.bind(this),this.handleBlur=this.handleBlur.bind(this),n){var b=this.model=o.registryItem(n,{id:r,type:l,required:s,unique:p,value:m,rules:h,messages:u,multiple:c,delimiter:v,valueField:f,labelField:g,joinValues:y,extractValue:C});if(this.model.unique&&o.parentStore&&o.parentStore.storeType===a.ComboStore.name){var V=o.parentStore;V.bindUniuqueItem(this.model)}this.setState({value:this.value=b.value}),this.reaction=d.reaction(function(){return b.value},function(t){return e.setState({value:e.value=t})})}},t.prototype.componentDidMount=function(){var e=this,t=this.props,o=(t.store,t.formStore),i=t.control,n=(i.name,i.validate),r=t.addHook;this.hook3=function(){e.lazyEmitChange.flush(),e.lazyValidate.flush()},r(this.hook3,"flush");var a=this.model;if(a&&n){var s=l.promisify(n.bind(a));this.hook2=function(){return a.clearError("control:valdiate"),s(o.data,a.value,a.name).then(function(e){("string"==typeof e||Array.isArray(e))&&e&&a.addError(e,"control:valdiate")})},r(this.hook2)}},t.prototype.componentWillReceiveProps=function(e){{var t=this.props;e.formStore}this.model&&l.anyChanged(["id","validations","validationErrors","value","required","unique","multiple","delimiter","valueField","labelField","joinValues","extractValue"],t.control,e.control)&&this.model.config({required:e.control.required,id:e.control.id,unique:e.control.unique,value:e.control.value,rules:e.control.validations,multiple:e.control.multiple,delimiter:e.control.delimiter,valueField:e.control.valueField,labelField:e.control.labelField,joinValues:e.control.joinValues,extractValue:e.control.extractValue,messages:e.control.validationErrors})},t.prototype.componentWillUnmount=function(){this.hook&&this.props.removeHook(this.hook),this.hook2&&this.props.removeHook(this.hook2),this.hook3&&this.props.removeHook(this.hook3,"flush"),this.lazyValidate.cancel(),this.lazyEmitChange.cancel(),this.reaction&&this.reaction(),this.disposeModel()},t.prototype.disposeModel=function(){var e=this.props.formStore;if(this.model&&this.model.unique&&e.parentStore&&e.parentStore.storeType===a.ComboStore.name){var t=e.parentStore;t.unBindUniuqueItem(this.model)}this.model&&e.unRegistryItem(this.model)},t.prototype.controlRef=function(e){for(var t=this.props,o=t.addHook,i=t.removeHook,n=t.formStore;e&&e.getWrappedInstance;)e=e.getWrappedInstance();if(e&&e.validate&&this.model){var r=this.model,a=l.promisify(e.validate.bind(e));this.hook=function(){return r.clearError("component:valdiate"),a(n.data,r.value,r.name).then(function(e){("string"==typeof e||Array.isArray(e))&&e&&r.setError(e,"component:valdiate")})},o(this.hook)}else!e&&this.hook&&(i(this.hook),this.hook=void 0);this.control=e},t.prototype.validate=function(){var e=this,t=this.props.formStore;if(this.model)if(this.model.unique&&t.parentStore&&t.parentStore.storeType===a.ComboStore.name){var o=t.parentStore,i=o.uniques.get(this.model
|
|||
|
;/*!src/renderers/Form/Hidden.tsx*/
|
|||
|
amis.define("dd5dcd2",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HiddenControlRenderer=void 0;var t=e("node_modules/tslib/tslib"),r=t.__importDefault(e("node_modules/react/index")),d=e("567b83c"),u=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.render=function(){return null},n}(r.default.Component);n.default=u;var o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n=t.__decorate([d.FormItem({type:"hidden",wrap:!1,sizeMutable:!1})],n)}(u);n.HiddenControlRenderer=o});
|
|||
|
;/*!src/renderers/Form/Text.tsx*/
|
|||
|
amis.define("a1e61d2",function(e,t){"use strict";function n(e,t,n){return void 0===n&&(n="value"),e.filter(function(e){return-1===t.indexOf(e[n||"value"])}).reduce(function(e,t,a){return e[t[n||"value"]]=a,e},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.UrlControlRenderer=t.EmailControlRenderer=t.PasswordControlRenderer=t.TextControlRenderer=t.mapItemIndex=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),o=e("b86428a"),i=a.__importDefault(e("node_modules/classnames/index")),s=a.__importDefault(e("node_modules/downshift/dist/downshift.cjs")),u=a.__importDefault(e("node_modules/match-sorter/dist/match-sorter.cjs")),r=a.__importDefault(e("node_modules/lodash/debounce")),d=e("6a2dbb7"),p=a.__importDefault(e("node_modules/lodash/find")),c=e("b7bbd16"),h=a.__importDefault(e("4ee46ff")),f=e("9a80175"),m=e("1caead1"),v=a.__importDefault(e("acad559")),C=function(e){function t(t){{var n=e.call(this,t)||this;t.value}return n.state={isOpen:!1,inputValue:"",isFocused:!1},n.focus=n.focus.bind(n),n.clearValue=n.clearValue.bind(n),n.inputRef=n.inputRef.bind(n),n.handleClick=n.handleClick.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleChange=n.handleChange.bind(n),n.handleStateChange=n.handleStateChange.bind(n),n.loadAutoComplete=r.default(n.loadAutoComplete.bind(n),250,{trailing:!0,leading:!1}),n}a.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props;if(t.value!==e.value){{e.value}this.setState({inputValue:""})}},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.formItem,l=t.autoComplete,o=t.addHook,i=t.formInited,s=t.data;m.isEffectiveApi(l,s)&&n&&(i?n.loadOptions(l,f.createObject(s,{term:""})):this.unHook=o(function(t){return a.__awaiter(e,void 0,void 0,function(){return a.__generator(this,function(e){switch(e.label){case 0:return[4,n.loadOptions(l,f.createObject(t,{term:""}))];case 1:return e.sent(),n.value&&f.setVariable(t,name,n.value),[2]}})})},"init"))},t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook()},t.prototype.inputRef=function(e){this.input=e},t.prototype.focus=function(){if(this.input){this.input.focus();var e=this.input.value.length;e&&this.input.setSelectionRange(e,e)}},t.prototype.clearValue=function(){var e=this,t=this.props,n=t.onChange,a=t.resetValue;n(a),this.setState({inputValue:a},function(){e.focus(),e.loadAutoComplete()})},t.prototype.removeItem=function(e){var t=this.props,n=t.selectedOptions,a=t.onChange,l=t.joinValues,o=t.extractValue,i=t.delimiter,s=t.valueField,u=n.concat();u.splice(e,1),a(l?u.map(function(e){return e[s||"value"]}).join(i||","):o?u.map(function(e){return e[s||"value"]}):u)},t.prototype.handleClick=function(){this.focus(),this.setState({isOpen:!0})},t.prototype.handleFocus=function(e){this.setState({isOpen:!0,isFocused:!0}),this.props.onFocus&&this.props.onFocus(e)},t.prototype.handleBlur=function(e){var t=this.props,n=t.onBlur,a=t.trimContents,l=t.value,o=t.onChange;this.setState({isFocused:!1},function(){a&&l&&"string"==typeof l&&o(l.trim())}),n&&n(e)},t.prototype.handleInputChange=function(e){var t=e.currentTarget.value;this.setState({inputValue:t},this.loadAutoComplete)},t.prototype.handleKeyDown=function(e){var t=this.props,n=t.selectedOptions,a=t.onChange,l=t.joinValues,o=t.extractValue,i=t.delimiter,s=t.multiple,u=t.valueField;if(n.length&&!this.state.inputValue&&8===e.keyCode){e.preventDefault();var r=n.concat();r.pop(),a(l?r.map(function(e){return e[u||"value"]}).join(i||","):o?r.map(function(e){return e[u||"value"]}):r),this.setState({inputValue:""},this.loadAutoComplete)}else if(13===e.keyCode&&this.state.inputValue&&"number"!=typeof this.highlightedIndex){e.preventDefault();var d=this.state.inputValue;if(s){if(d&&!p.default(n,function(e){return e.value==d})){var r=n.concat();r.push({label:d,value:d}),a(l?r.map(function(e){return e[u||"value"]}).join(i||","):o?r.map(function(e){return e[u||"value"]}):r)}}else a(d);this.setState({inpu
|
|||
|
;/*!src/components/ListMenu.tsx*/
|
|||
|
amis.define("10c485a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListMenu=void 0;var n=e("node_modules/tslib/tslib"),i=e("256b65d"),r=n.__importDefault(e("node_modules/react/index")),s=e("5ab4e9d"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.renderItem=function(e,t,i){var s=this,a=this.props,l=a.classnames,d=a.itemRender,u=a.disabled,c=a.getItemProps,o=a.highlightIndex,m=a.selectedOptions,p=a.onSelect;if(Array.isArray(t.children)&&t.children.length){var f={items:[],index:e.index};return e.items.push(r.default.createElement("div",{className:l("ListMenu-group"),key:i},r.default.createElement("div",{className:l("ListMenu-groupLabel")},d(t)),t.children.reduce(function(e,t,n){return s.renderItem(e,t,n)},f).items)),e.index=f.index,e}var h=e.index++;return e.items.push(r.default.createElement("div",n.__assign({className:l("ListMenu-item",t.className,u||t.disabled?"is-disabled":"",h===o?"is-highlight":"",~(m||[]).indexOf(t)?"is-active":""),key:h,onClick:p?function(e){return p(e,t)}:void 0},c({item:t,index:h})),r.default.createElement("div",{className:l("ListMenu-itemLabel")},d(t)))),e},t.prototype.render=function(){var e=this,t=this.props,n=t.classnames,i=t.options,s=t.placeholder,a=t.prefix,l=t.children,d=this.props.translate;return r.default.createElement("div",{className:n("ListMenu")},a,Array.isArray(i)&&i.length?i.reduce(function(t,n,i){return e.renderItem(t,n,i)},{items:[],index:0}).items:r.default.createElement("span",{className:n("ListMenu-placeholder")},d(s)),l)},t.defaultProps={placeholder:"暂无选项",itemRender:function(e){return r.default.createElement(r.default.Fragment,null,e.label)},getItemProps:function(){return null}},t}(r.default.Component);t.ListMenu=a,t.default=i.themeable(s.localeable(a))});
|
|||
|
;/*!src/renderers/Form/Tag.tsx*/
|
|||
|
amis.define("e1b1eb7",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),o=e("b86428a"),i=a.__importDefault(e("node_modules/downshift/dist/downshift.cjs")),r=a.__importDefault(e("node_modules/lodash/find")),d=e("node_modules/react-dom/index"),u=a.__importDefault(e("d14c6a1")),l=e("9a80175"),p=a.__importDefault(e("acad559")),s=a.__importDefault(e("997df41")),c=a.__importDefault(e("2b3dcdf")),m=a.__importDefault(e("10c485a")),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.input=n.default.createRef(),t.state={isOpened:!1,inputValue:"",isFocused:!1},t}a.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props;t.value!==e.value&&this.setState({inputValue:""})},t.prototype.addItem=function(e){var t=this.props,a=t.selectedOptions,n=t.onChange,o=t.joinValues,i=t.extractValue,d=t.delimiter,u=t.valueField,l=a.concat();r.default(l,function(t){return t.value==e.value})||(l.push(e),n(o?l.map(function(e){return e[u||"value"]}).join(d||","):i?l.map(function(e){return e[u||"value"]}):l))},t.prototype.handleFocus=function(e){var t,a;this.setState({isFocused:!0,isOpened:!0}),null===(a=(t=this.props).onFocus)||void 0===a?void 0:a.call(t,e)},t.prototype.handleBlur=function(e){var t,a,n=this.props,o=n.selectedOptions,i=n.onChange,d=n.joinValues,u=n.extractValue,l=n.delimiter,p=n.valueField,s=this.state.inputValue.trim();null===(a=(t=this.props).onBlur)||void 0===a?void 0:a.call(t,e),this.setState({isFocused:!1,isOpened:!1,inputValue:""},s?function(){var e=o.concat();if(!r.default(e,function(e){return e.value===s})){var t={label:s,value:s};e.push(t),i(d?e.map(function(e){return e[p||"value"]}).join(l||","):u?e.map(function(e){return e[p||"value"]}):e)}}:void 0)},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleInputChange=function(e){this.setState({inputValue:e})},t.prototype.handleChange=function(e){var t=this.props,a=t.joinValues,n=t.extractValue,o=t.delimiter,i=t.valueField,r=t.onChange,d=Array.isArray(e)?e.concat():[];(a||n)&&(d=e.map(function(e){return e[i||"value"]})),a&&(d=d.join(o||",")),r(d)},t.prototype.renderItem=function(e){var t=this.props.labelField;return e[t||"label"]},t.prototype.handleKeyDown=function(e){var t=this.props,a=t.selectedOptions,n=t.onChange,o=t.joinValues,i=t.extractValue,d=t.delimiter,u=t.valueField,l=this.state.inputValue.trim();if(a.length&&!l&&"Backspace"==e.key){var p=a.concat();p.pop(),n(o?p.map(function(e){return e[u||"value"]}).join(d||","):i?p.map(function(e){return e[u||"value"]}):p)}else if(l&&("Enter"===e.key||e.key===d)){e.preventDefault(),e.stopPropagation();var p=a.concat();r.default(p,function(e){return e.value==l})||(p.push({label:l,value:l}),n(o?p.map(function(e){return e[u||"value"]}).join(d||","):i?p.map(function(e){return e[u||"value"]}):p)),this.setState({inputValue:""})}},t.prototype.handleOptionChange=function(e){!this.state.inputValue&&e&&this.addItem(e)},t.prototype.getTarget=function(){return this.input.current},t.prototype.getParent=function(){return this.input.current&&d.findDOMNode(this.input.current).parentElement},t.prototype.reload=function(){var e=this.props.reloadOptions;null===e||void 0===e?void 0:e()},t.prototype.render=function(){var e=this,t=this.props,o=t.className,r=t.classnames,d=t.disabled,_=t.placeholder,f=t.name,h=t.clearable,g=t.selectedOptions,y=t.loading,v=t.popOverContainer,b=t.dropdown,O=t.options,C=t.optionsTip,F=t.translate,V=Array.isArray(O)?l.filterTree(O,function(e){return Array.isArray(e.children)&&!!e.children.length||void 0!==e.value&&!~g.indexOf(e)},0,!0):[];return n.default.createElement(i.default,{selectedItem:g,isOpen:this.state.isFocused,inputValue:this.state.inputValue,onChange:this.handleOptionChange,itemToString:this.renderItem},function(t){var i=t.isOpen,l=t.highlightedIndex,I=t.getItemProps,j=t.getInputProps;return n.default.createElement("div",{className:r(o,"TagControl")},n.default.createElement(u.default,a.__assign({}
|
|||
|
;/*!src/renderers/Form/Number.tsx*/
|
|||
|
amis.define("85dae7e",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),a=e("567b83c"),i=n.__importDefault(e("node_modules/classnames/index")),o=e("6a2dbb7"),l=n.__importDefault(e("10d195e")),s=function(e){function t(t){var n=e.call(this,t)||this;return n.handleChange=n.handleChange.bind(n),n}return n.__extends(t,e),t.prototype.handleChange=function(e){var t=this.props,n=(t.classPrefix,t.onChange),r=t.resetValue;n("undefined"==typeof e?r||"":e)},t.prototype.filterNum=function(e){return"number"!=typeof e&&(e=o.filter(e,this.props.data),e=/^[-]?\d+/.test(e)?parseInt(e,10):void 0),e},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classPrefix,a=e.value,o=e.step,s=e.precision,u=e.max,d=e.min,p=e.disabled,f=e.placeholder,m={};return"number"==typeof s&&(m.precision=s),r.default.createElement("div",{className:i.default(n+"NumberControl",t)},r.default.createElement(l.default,{value:a,step:o,max:this.filterNum(u),min:this.filterNum(d),onChange:this.handleChange,disabled:p,placeholder:f,precision:s}))},t.defaultProps={step:1,resetValue:""},t}(r.default.Component);t.default=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps={validations:"isNumeric"},t=n.__decorate([a.FormItem({type:"number"})],t)}(s);t.NumberControlRenderer=u});
|
|||
|
;/*!src/renderers/Form/Textarea.tsx*/
|
|||
|
amis.define("eff65fe",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextAreaControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),o=e("567b83c"),u=n.__importDefault(e("node_modules/classnames/index")),r=n.__importDefault(e("05807e2")),i=e("node_modules/react-dom/index"),d=e("9a80175"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputRef=function(e){return t.input=i.findDOMNode(e)},t}n.__extends(t,e),t.prototype.focus=function(){if(this.input){this.input.focus();var e=this.input.value.length;e&&this.input.setSelectionRange(e,e)}},t.prototype.handleChange=function(e){var t=this.props.onChange,n=e.currentTarget.value;t(n)},t.prototype.handleFocus=function(e){var t=this.props.onFocus;t&&t(e)},t.prototype.handleBlur=function(e){var t=this.props,n=t.onBlur,a=t.trimContents,o=t.value,u=t.onChange;a&&o&&"string"==typeof o&&u(o.trim()),n&&n(e)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classPrefix,o=e.value,i=e.type,d=e.placeholder,s=e.disabled,l=e.minRows,p=e.maxRows,f=e.name;return a.default.createElement(r.default,{autoComplete:"off",ref:this.inputRef,name:f,disabled:s,type:i,className:u.default(n+"TextareaControl",t),value:"undefined"==typeof o||null===o?"":"string"==typeof o?o:JSON.stringify(o),placeholder:d,minRows:l,maxRows:p,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur})};var o,s,l;return t.defaultProps={minRows:3,maxRows:20},n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof a.default&&a.default.ChangeEvent)?o:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(s="undefined"!=typeof a.default&&a.default.FocusEvent)?s:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(l="undefined"!=typeof a.default&&a.default.FocusEvent)?l:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),t}(a.default.Component);t.default=s;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([o.FormItem({type:"textarea"})],t)}(s);t.TextAreaControlRenderer=l});
|
|||
|
;/*!src/renderers/Form/Checkboxes.tsx*/
|
|||
|
amis.define("2b693f3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxesControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),l=e("b86428a"),o=n.__importDefault(e("0a43d97")),r=n.__importDefault(e("node_modules/lodash/chunk")),i=e("b7bbd16"),d=e("9a80175"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.defaultCheckAll,n=e.onToggleAll;t&&n()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.options,a=t.onToggleAll,l=t.defaultCheckAll,o=e.options;l&&o!=n&&a()},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.handleAddClick=function(){var e=this.props.onAdd;e&&e()},t.prototype.handleEditClick=function(e,t){var n=this.props.onEdit;e.preventDefault(),e.stopPropagation(),n&&n(t)},t.prototype.handleDeleteClick=function(e,t){var n=this.props.onDelete;e.preventDefault(),e.stopPropagation(),n&&n(t)},t.prototype.renderGroup=function(e,t){var n=this,l=this.props,o=l.classnames,r=l.labelField;return a.default.createElement("div",{key:t,className:o("CheckboxesControl-group",e.className)},a.default.createElement("label",{className:o("CheckboxesControl-groupLabel",e.labelClassName)},e[r||"label"]),e.children&&e.children.length?e.children.map(function(e,t){return n.renderItem(e,t)}):null)},t.prototype.renderItem=function(e,t){var n=this;if(e.children)return this.renderGroup(e,t);var l=this.props,r=l.itemClassName,d=l.onToggle,s=l.selectedOptions,c=l.disabled,u=l.inline,p=l.labelClassName,m=l.labelField,f=l.removable,h=l.editable;return a.default.createElement(o.default,{className:r,key:t,onChange:function(){return d(e)},checked:!!~s.indexOf(e),disabled:c||e.disabled,inline:u,labelClassName:p,description:e.description},f?a.default.createElement("a",{"data-tooltip":"移除","data-position":"left"},a.default.createElement(i.Icon,{icon:"minus",className:"icon",onClick:function(t){return n.handleDeleteClick(t,e)}})):null,h?a.default.createElement("a",{"data-tooltip":"编辑","data-position":"left"},a.default.createElement(i.Icon,{icon:"pencil",className:"icon",onClick:function(t){return n.handleEditClick(t,e)}})):null,e[m||"label"])},t.prototype.render=function(){var e=this,t=this.props,n=t.className,l=t.disabled,d=t.placeholder,s=t.options,c=t.inline,u=t.columnsCount,p=t.selectedOptions,m=(t.onToggle,t.onToggleAll),f=t.checkAll,h=t.classnames,b=t.itemClassName,_=t.labelClassName,C=t.creatable,g=t.addApi,y=t.createBtnLabel,k=t.translate,v=[];if(s&&s.length&&(v=s.map(function(t,n){return e.renderItem(t,n)})),f&&v.length&&v.unshift(a.default.createElement(o.default,{key:"checkall",className:b,onChange:m,checked:!!p.length,partial:!(!p.length||p.length===s.length),disabled:l,inline:c,labelClassName:_},"全选/不选")),!c&&u>1){var E=12/u,N="Grid-col--sm"+(E===Math.round(E)?E:"");v=r.default(v,u).map(function(e,t){return a.default.createElement("div",{className:h("Grid"),key:t},Array.from({length:u}).map(function(t,n){return a.default.createElement("div",{key:n,className:h(N)},e[n])}))})}return a.default.createElement("div",{className:h("CheckboxesControl",n)},v&&v.length?v:a.default.createElement("span",{className:"Form-placeholder"},k(d)),!C&&!g||l?null:a.default.createElement("a",{className:h("Checkboxes-addBtn"),onClick:this.handleAddClick},a.default.createElement(i.Icon,{icon:"plus",className:"icon"}),k(y)))};var l,s;return t.defaultProps={columnsCount:1,multiple:!0,placeholder:"暂无选项",creatable:!1,createBtnLabel:"新增选项"},n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"handleAddClick",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(l="undefined"!=typeof Event&&Event)?l:Object,Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleEditClick",null),n.__decorate([d.autobind,n.__metadata("design:t
|
|||
|
;/*!src/renderers/Form/Checkbox.tsx*/
|
|||
|
amis.define("5ade3b1",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),l=n.__importDefault(e("node_modules/react/index")),a=e("567b83c"),r=n.__importDefault(e("node_modules/classnames/index")),u=n.__importDefault(e("0a43d97")),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.value,a=e.trueValue,o=e.falseValue,s=e.option,d=e.onChange,i=e.disabled,c=e.render,f=e.classPrefix;return l.default.createElement("div",{className:r.default(f+"CheckboxControl",t)},l.default.createElement(u.default,{inline:!0,value:n||"",trueValue:a,falseValue:o,disabled:i,onChange:function(e){return d(e)}},s?c("option",s):null))},t.defaultProps={trueValue:!0,falseValue:!1},t}(l.default.Component);t.default=o;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([a.FormItem({type:"checkbox",sizeMutable:!1})],t)}(o);t.CheckboxControlRenderer=s});
|
|||
|
;/*!src/renderers/Form/CityDB.ts*/
|
|||
|
amis.define("4050e6a",function(i,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.district=t.city=t.province=void 0;var r={11e4:"北京市",110100:"北京市市辖区",110101:"东城区",110102:"西城区",110105:"朝阳区",110106:"丰台区",110107:"石景山区",110108:"海淀区",110109:"门头沟区",110111:"房山区",110112:"通州区",110113:"顺义区",110114:"昌平区",110115:"大兴区",110116:"怀柔区",110117:"平谷区",110118:"密云区",110119:"延庆区",12e4:"天津市",120100:"天津市市辖区",120101:"和平区",120102:"河东区",120103:"河西区",120104:"南开区",120105:"河北区",120106:"红桥区",120110:"东丽区",120111:"西青区",120112:"津南区",120113:"北辰区",120114:"武清区",120115:"宝坻区",120116:"滨海新区",120117:"宁河区",120118:"静海区",120119:"蓟州区",13e4:"河北省",130100:"石家庄市",130101:"石家庄市市辖区",130102:"长安区",130104:"桥西区",130105:"新华区",130107:"井陉矿区",130108:"裕华区",130109:"藁城区",130110:"鹿泉区",130111:"栾城区",130121:"井陉县",130123:"正定县",130125:"行唐县",130126:"灵寿县",130127:"高邑县",130128:"深泽县",130129:"赞皇县",130130:"无极县",130131:"平山县",130132:"元氏县",130133:"赵县",130181:"辛集市",130183:"晋州市",130184:"新乐市",130200:"唐山市",130201:"唐山市市辖区",130202:"路南区",130203:"路北区",130204:"古冶区",130205:"开平区",130207:"丰南区",130208:"丰润区",130209:"曹妃甸区",130224:"滦南县",130225:"乐亭县",130227:"迁西县",130229:"玉田县",130281:"遵化市",130283:"迁安市",130284:"滦州市",130300:"秦皇岛市",130301:"秦皇岛市市辖区",130302:"海港区",130303:"山海关区",130304:"北戴河区",130306:"抚宁区",130321:"青龙满族自治县",130322:"昌黎县",130324:"卢龙县",130400:"邯郸市",130401:"邯郸市市辖区",130402:"邯山区",130403:"丛台区",130404:"复兴区",130406:"峰峰矿区",130407:"肥乡区",130408:"永年区",130423:"临漳县",130424:"成安县",130425:"大名县",130426:"涉县",130427:"磁县",130430:"邱县",130431:"鸡泽县",130432:"广平县",130433:"馆陶县",130434:"魏县",130435:"曲周县",130481:"武安市",130500:"邢台市",130501:"邢台市市辖区",130502:"桥东区",130503:"桥西区",130521:"邢台县",130522:"临城县",130523:"内丘县",130524:"柏乡县",130525:"隆尧县",130526:"任县",130527:"南和县",130528:"宁晋县",130529:"巨鹿县",130530:"新河县",130531:"广宗县",130532:"平乡县",130533:"威县",130534:"清河县",130535:"临西县",130581:"南宫市",130582:"沙河市",130600:"保定市",130601:"保定市市辖区",130602:"竞秀区",130606:"莲池区",130607:"满城区",130608:"清苑区",130609:"徐水区",130623:"涞水县",130624:"阜平县",130626:"定兴县",130627:"唐县",130628:"高阳县",130629:"容城县",130630:"涞源县",130631:"望都县",130632:"安新县",130633:"易县",130634:"曲阳县",130635:"蠡县",130636:"顺平县",130637:"博野县",130638:"雄县",130681:"涿州市",130682:"定州市",130683:"安国市",130684:"高碑店市",130700:"张家口市",130701:"张家口市市辖区",130702:"桥东区",130703:"桥西区",130705:"宣化区",130706:"下花园区",130708:"万全区",130709:"崇礼区",130722:"张北县",130723:"康保县",130724:"沽源县",130725:"尚义县",130726:"蔚县",130727:"阳原县",130728:"怀安县",130730:"怀来县",130731:"涿鹿县",130732:"赤城县",130800:"承德市",130801:"承德市市辖区",130802:"双桥区",130803:"双滦区",130804:"鹰手营子矿区",130821:"承德县",130822:"兴隆县",130824:"滦平县",130825:"隆化县",130826:"丰宁满族自治县",130827:"宽城满族自治县",130828:"围场满族蒙古族自治县",130881:"平泉市",130900:"沧州市",130901:"沧州市市辖区",130902:"新华区",130903:"运河区",130921:"沧县",130922:"青县",130923:"东光县",130924:"海兴县",130925:"盐山县",130926:"肃宁县",130927:"南皮县",130928:"吴桥县",130929:"献县",130930:"孟村回族自治县",130981:"泊头市"
|
|||
|
t.province=[],t.city={},t.district={},Object.keys(r).forEach(function(i){var r=parseInt(i,10);if(r%1e4)if(r%100){var s=r-r%1e4,c=r-r%100;t.district[s]&&Array.isArray(t.district[s][c])?t.district[s][c].push(r):!t.district[s]||Array.isArray(t.district[s])?(t.district[s]=t.district[s]||[],t.district[s].push(r)):t.city[s].push(r)}else{var s=r-r%1e4;t.city[s].push(r),t.district[s]=t.district[s]||{},t.district[s][r]=[]}else t.province.push(r),t.city[r]=[]}),t.default=r});
|
|||
|
;/*!src/renderers/Form/City.tsx*/
|
|||
|
amis.define("99d982b",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxControlRenderer=e.LocationControl=e.CityPicker=void 0;var n=t("node_modules/tslib/tslib"),a=n.__importDefault(t("node_modules/react/index")),i=t("567b83c"),o=n.__importStar(t("4050e6a")),r=t("256b65d"),d=t("1953fc1"),l=t("9a80175"),s=t("b86428a"),c=t("5ab4e9d"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={code:0,province:"",provinceCode:0,city:"",cityCode:0,district:"",districtCode:0,street:""},e}n.__extends(e,t),e.prototype.componentDidMount=function(){this.syncIn()},e.prototype.componentDidUpdate=function(t){var e=this.props;e.value!==t.value&&this.syncIn(e)},e.prototype.handleProvinceChange=function(t){this.setState({province:t.label,provinceCode:t.value,city:"",cityCode:0,district:"",districtCode:0,street:"",code:t.value},this.syncOut)},e.prototype.handleCityChange=function(t){return t.value%100?this.handleDistrictChange(t,{cityCode:t.value}):void this.setState({city:t.label,cityCode:t.value,district:"",districtCode:0,street:"",code:t.value},this.syncOut)},e.prototype.handleDistrictChange=function(t,e){void 0===e&&(e={}),this.setState(n.__assign(n.__assign({},e),{district:t.label,districtCode:t.value,street:"",code:t.value}),this.syncOut)},e.prototype.handleStreetChange=function(t){this.setState({street:t.currentTarget.value})},e.prototype.handleStreetEnd=function(){this.syncOut()},e.prototype.syncIn=function(t){void 0===t&&(t=this.props);var e=t.value,n=t.delimiter,a={code:0,province:"",provinceCode:0,city:"",cityCode:0,district:"",districtCode:0,street:""},i=e&&e.code||"number"==typeof e&&e||"string"==typeof e&&/(\d{6})/.test(e)&&RegExp.$1;if(i&&o.default[i]){i=parseInt(i,10),a.code=i;var r=i-i%1e4;o.default[r]&&(a.provinceCode=r,a.province=o.default[r]);var d=i-i%100;o.default[d]&&(a.cityCode=d,a.city=o.default[d]),i%100&&(a.district=o.default[i],a.districtCode=i)}e&&e.street?a.street=e.street:"string"==typeof e&&~e.indexOf(n)&&(a.street=e.slice(e.indexOf(n)+n.length)),this.setState(a)},e.prototype.syncOut=function(){var t=this.props,e=t.onChange,n=t.allowStreet,a=t.joinValues,i=t.extractValue,o=t.delimiter,r=this.state,d=r.code,l=r.province,s=r.city,c=r.district,u=r.street;e(("undefined"==typeof i?a:i)?d?n&&u?[d,u].join(o):String(d):"":{code:d,province:l,city:s,district:c,street:u})},e.prototype.render=function(){var t=this.props,e=t.classnames,n=t.className,i=t.disabled,r=t.allowCity,l=t.allowDistrict,s=t.allowStreet,c=t.translate,u=this.state,p=u.provinceCode,y=u.cityCode,f=u.districtCode,h=u.street;return a.default.createElement("div",{className:e("CityPicker",n)},a.default.createElement(d.Select,{disabled:i,options:o.province.map(function(t){return{label:o.default[t],value:t}}),value:p,onChange:this.handleProvinceChange}),p&&l&&Array.isArray(o.district[p])?a.default.createElement(d.Select,{disabled:i,options:o.district[p].map(function(t){return{label:o.default[t],value:t}}),value:f,onChange:this.handleDistrictChange}):r&&o.city[p]&&o.city[p].length?a.default.createElement(d.Select,{disabled:i,options:o.city[p].map(function(t){return{label:o.default[t],value:t}}),value:y,onChange:this.handleCityChange}):null,y&&l&&o.district[p]&&o.district[p][y]?a.default.createElement(d.Select,{disabled:i,options:o.district[p][y].map(function(t){return{label:o.default[t],value:t}}),value:f,onChange:this.handleDistrictChange}):null,s&&p?a.default.createElement("input",{className:e("CityPicker-input"),value:h,onChange:this.handleStreetChange,onBlur:this.handleStreetEnd,placeholder:c("请输入街道信息")}):null)};var i,r,c,u,p;return e.defaultProps={joinValues:!0,extractValue:!0,delimiter:",",allowCity:!0,allowDistrict:!0,allowStreet:!1},n.__decorate([l.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(i="undefined"!=typeof s.Option&&s.Option)?i:Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleProvinceChange",null),n.__decorate([l.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtype
|
|||
|
;/*!src/renderers/Form/Rating.tsx*/
|
|||
|
amis.define("055a9f9",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RatingControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),r=e("567b83c"),l=n.__importDefault(e("1b690d8")),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.value,r=e.count,u=e.half,o=e.readOnly,s=e.onChange,i=(e.size,e.classnames);return a.default.createElement("div",{className:i("RatingControl",t)},a.default.createElement(l.default,{classnames:i,value:n,count:r,half:u,readOnly:o,onChange:function(e){return s(e)}}))},t.defaultProps={value:0,count:5,half:!1,readOnly:!1},t}(a.default.Component);t.default=u;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([r.FormItem({type:"rating",sizeMutable:!1})],t)}(u);t.RatingControlRenderer=o});
|
|||
|
;/*!src/renderers/Form/Switch.tsx*/
|
|||
|
amis.define("0f75897",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),n=e("567b83c"),r=a.__importDefault(e("aa2413a")),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,a=e.classPrefix,n=e.classnames,u=e.value,s=e.trueValue,o=e.falseValue,i=e.option,c=e.onChange,d=e.disabled,f=e.optionAtLeft;return l.default.createElement("div",{className:n("SwitchControl",t)},f?l.default.createElement("span",{className:n("Switch-option")},i):null,l.default.createElement(r.default,{classPrefix:a,value:u,trueValue:s,falseValue:o,disabled:d,onChange:c}),f?null:l.default.createElement("span",{className:n("Switch-option")},i))},t.defaultProps={trueValue:!0,falseValue:!1,optionAtLeft:!1},t}(l.default.Component);t.default=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([n.FormItem({type:"switch",sizeMutable:!1})],t)}(u);t.SwitchControlRenderer=s});
|
|||
|
;/*!src/renderers/Form/Button.tsx*/
|
|||
|
amis.define("c6f2783",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResetControlRenderer=t.SubmitControlRenderer=t.ButtonControlRenderer=t.ButtonControl=void 0;var r=e("node_modules/tslib/tslib"),n=r.__importDefault(e("node_modules/react/index")),o=e("567b83c"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.render,n=e.type,o=(e.children,e.data,r.__rest(e,["render","type","children","data"]));return t("action",r.__assign(r.__assign({},o),{type:n}))},t.defaultProps={},t}(n.default.Component);t.ButtonControl=u;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([o.FormItem({type:"button",renderLabel:!1,strictMode:!1,sizeMutable:!1})],t)}(u);t.ButtonControlRenderer=i;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([o.FormItem({type:"submit",renderLabel:!1,sizeMutable:!1,strictMode:!1})],t)}(u);t.SubmitControlRenderer=s;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([o.FormItem({type:"reset",renderLabel:!1,strictMode:!1,sizeMutable:!1})],t)}(u);t.ResetControlRenderer=d});
|
|||
|
;/*!src/renderers/Form/ButtonToolbar.tsx*/
|
|||
|
amis.define("d7f3dfa",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonToolbarRenderer=e.ButtonToolbarControl=void 0;var n=t("node_modules/tslib/tslib"),o=n.__importDefault(t("node_modules/react/index")),r=t("567b83c"),u=n.__importDefault(t("node_modules/classnames/index")),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.render=function(){var t=this.props,e=t.render,n=t.className,r=t.classPrefix,a=t.buttons;return o.default.createElement("div",{className:u.default(r+"ButtonToolbar",n)},Array.isArray(a)?a.map(function(t,n){return e("button/"+n,t,{key:n})}):null)},e.defaultProps={},e}(o.default.Component);e.ButtonToolbarControl=a;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e=n.__decorate([r.FormItem({type:"button-toolbar",sizeMutable:!1,strictMode:!1})],e)}(a);e.ButtonToolbarRenderer=l});
|
|||
|
;/*!src/renderers/Form/Radios.tsx*/
|
|||
|
amis.define("2dfb851",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RadiosControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=a.__importDefault(e("node_modules/classnames/index")),o=a.__importDefault(e("8e37af0")),i=e("b86428a"),s=e("9a80175"),r=e("f2e345e"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a.__extends(t,e),t.prototype.handleChange=function(e){var t=this.props,a=t.joinValues,n=t.extractValue,l=t.valueField,o=t.onChange,i=t.autoFill,d=t.onBulkChange,u=i&&!s.isEmpty(i)&&r.dataMapping(i,e);u&&d&&d(u),e&&(a||n)&&(e=e[l||"value"]),o&&o(e)},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.render=function(){var e=this.props,t=e.className,a=e.classPrefix,i=e.value,s=(e.onChange,e.disabled),r=e.joinValues,d=e.extractValue,u=e.delimiter,p=e.placeholder,f=e.options,m=e.inline,c=e.formMode,_=e.columnsCount,h=e.classPrefix,C=e.itemClassName,y=e.labelClassName,b=e.labelField,g=e.translate;return n.default.createElement(o.default,{inline:m||"inline"===c,className:l.default(a+"RadiosControl",t),value:"undefined"==typeof i||null===i?"":i,disabled:s,onChange:this.handleChange,joinValues:r,extractValue:d,delimiter:u,labelClassName:y,labelField:b,placeholder:g(p),options:f,columnsCount:_,classPrefix:h,itemClassName:C})};var d;return t.defaultProps={columnsCount:1},a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(d="undefined"!=typeof i.Option&&i.Option)?d:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),t}(n.default.Component);t.default=d;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps={multiple:!1},t=a.__decorate([i.OptionsControl({type:"radios",sizeMutable:!1})],t)}(d);t.RadiosControlRenderer=u});
|
|||
|
;/*!src/renderers/Form/List.tsx*/
|
|||
|
amis.define("64723a8",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListControlRenderer=void 0;var l=e("node_modules/tslib/tslib"),a=l.__importDefault(e("node_modules/react/index")),i=e("b86428a"),n=e("9a80175"),s=e("f2e345e"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.handleDBClick=function(e){this.props.onToggle(e,!1,!0),this.props.onAction(null,{type:"submit"})},t.prototype.handleClick=function(e,t){if(!t.target||!t.target.closest("a,button")){var l=this.props,a=l.onToggle,i=l.multiple,o=l.autoFill,r=l.onBulkChange,d=!i&&o&&!n.isEmpty(o)&&s.dataMapping(o,e);d&&r(d),a(e)}},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.render=function(){var e=this,t=this.props,l=t.render,i=t.itemClassName,s=t.classnames,o=t.className,r=t.disabled,d=t.options,u=t.placeholder,c=t.selectedOptions,m=t.imageClassName,p=t.submitOnDBClick,b=t.itemSchema,f=t.data,C=t.labelField,h=null;return d&&d.length&&(h=a.default.createElement("div",{className:s("ListControl-items")},d.map(function(t,o){return a.default.createElement("div",{key:o,className:s("ListControl-item",i,{"is-active":~c.indexOf(t),"is-disabled":t.disabled||r}),onClick:e.handleClick.bind(e,t),onDoubleClick:p?e.handleDBClick.bind(e,t):void 0},b?l(o+"/body",b,{data:n.createObject(f,t)}):t.body?l(o+"/body",t.body):[t.image?a.default.createElement("div",{key:"image",className:s("ListControl-itemImage",m)},a.default.createElement("img",{src:t.image,alt:t[C||"label"]})):null,t[C||"label"]?a.default.createElement("div",{key:"label",className:s("ListControl-itemLabel")},t[C||"label"]):null])}))),a.default.createElement("div",{className:s("ListControl",o)},h?h:a.default.createElement("span",{className:s("ListControl-placeholder")},u))},t.propsList=["itemSchema","value","renderFormItems"],t.defaultProps={clearable:!1,imageClassName:"",submitOnDBClick:!1},t}(a.default.Component);t.default=o;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t=l.__decorate([i.OptionsControl({type:"list",sizeMutable:!1})],t)}(o);t.ListControlRenderer=r});
|
|||
|
;/*!src/components/BaiduMapPicker.tsx*/
|
|||
|
amis.define("f5c1b1b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaiduMapPicker=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),i=e("256b65d"),o=e("9a80175"),l=a.__importDefault(e("node_modules/lodash/debounce")),r=e("b7bbd16"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputValue:"",locs:[],locIndex:-1,sugs:[]},t.id=o.uuid(),t.mapRef=n.default.createRef(),t.search=l.default(function(){var e;t.state.inputValue?null===(e=t.ac)||void 0===e?void 0:e.search(t.state.inputValue):t.setState({sugs:[]})},250,{trailing:!0,leading:!1}),t}a.__extends(t,e),t.prototype.componentDidMount=function(){window.BMap?this.initMap():o.loadScript("//api.map.baidu.com/api?v=2.0&ak="+this.props.ak+"&callback={{callback}}").then(this.initMap)},t.prototype.componentWillUnmount=function(){var e;null===(e=this.ac)||void 0===e?void 0:e.dispose(),document.body.removeChild(this.placeholderInput),delete this.placeholderInput,delete this.map},t.prototype.initMap=function(){return a.__awaiter(this,void 0,void 0,function(){var e,t,n,i,o,l=this;return a.__generator(this,function(){return e=new BMap.Map(this.mapRef.current,{enableMapClick:!1}),this.map=e,t=this.props.value,n=t?new BMap.Point(t.lng,t.lat):new BMap.Point(116.404,39.915),e.centerAndZoom(n,15),i=new BMap.GeolocationControl,i.addEventListener("locationSuccess",function(e){l.getLocations(e.point)}),e.addControl(i),e.addEventListener("click",function(e){l.getLocations(e.point,!0)}),o=document.createElement("input"),o.className="invisible",this.placeholderInput=o,document.body.appendChild(o),this.ac=new BMap.Autocomplete({input:o,location:e,onSearchComplete:function(e){if(l.map){var t=[];Array.isArray(e.Ir)&&(e.Ir.forEach(function(e){t.push([e.province,e.city,e.district,e.street,e.business].filter(function(e){return e}).join(" "))}),l.setState({sugs:t}))}}}),t?this.getLocations(n):i.location(),[2]})})},t.prototype.getLocations=function(e,t){var a=this,n=this.map;n.clearOverlays();var i=new BMap.Marker(e);n.addOverlay(i),n.panTo(e);var o=new BMap.Geocoder;o.getLocation(e,function(e){if(a.map){var n=0,i=[];i.push({title:"当前位置",address:e.address,city:e.addressComponents.city,lat:e.point.lat,lng:e.point.lng}),Array.isArray(e.surroundingPois)&&e.surroundingPois.forEach(function(e){i.push({title:e.title,address:e.address,city:e.city,lat:e.point.lat,lng:e.point.lng})}),a.setState({locIndex:n,locs:i},function(){var e;t&&(null===(e=a.props)||void 0===e?void 0:e.onChange({address:i[0].address,lat:i[0].lat,lng:i[0].lng,city:i[0].city}))})}})},t.prototype.handleChange=function(e){this.setState({inputValue:e.currentTarget.value},this.search)},t.prototype.handleSelect=function(e){var t=this,a=parseInt(e.currentTarget.getAttribute("data-index"),10),n=this.state.locs[a];this.setState({locIndex:a},function(){var e,a=new BMap.Point(n.lng,n.lat);t.map.clearOverlays();var i=new BMap.Marker(a);t.map.addOverlay(i),t.map.panTo(a),null===(e=t.props)||void 0===e?void 0:e.onChange({address:n.address.trim()||n.title,lat:n.lat,lng:n.lng,city:n.city})})},t.prototype.handleSugSelect=function(e){var t=this,a=e.currentTarget.innerText;this.setState({inputValue:a});var n=new BMap.LocalSearch(this.map,{onSearchComplete:function(){var e=n.getResults(),a=e.getPoi(0);t.setState({inputValue:a.title,sugs:[]}),t.getLocations(a.point,!0)}});n.search(a)},t.prototype.render=function(){var e=this,t=this.props.classnames,a=this.state,i=a.locIndex,o=a.locs,l=a.inputValue,s=a.sugs,d=Array.isArray(s)&&s.length;return n.default.createElement("div",{className:t("MapPicker")},n.default.createElement("div",{className:t("MapPicker-search TextControl-control")},n.default.createElement("div",{className:t("TextControl-input")},n.default.createElement("input",{onChange:this.handleChange,value:l,placeholder:"搜索地点"}),n.default.createElement("span",null,n.default.createElement(r.Icon,{icon:"search",className:"icon"})))),n.default.createElement("div",{ref:this.mapRef,className:t("MapPicker-map",{invisible:d})}),n.defau
|
|||
|
;/*!src/components/LocationPicker.tsx*/
|
|||
|
amis.define("0e2f942",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationPicker=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),o=e("256b65d"),d=a.__importDefault(e("997df41")),i=a.__importDefault(e("2b3dcdf")),r=e("b7bbd16"),s=e("9a80175"),l=a.__importDefault(e("15e4197")),p=a.__importDefault(e("f5c1b1b")),u=e("5ab4e9d"),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.domRef=n.default.createRef(),t.state={isFocused:!1,isOpened:!1},t}a.__extends(t,e),t.prototype.handleKeyPress=function(e){" "===e.key&&(this.handleClick(),e.preventDefault())},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!0})},t.prototype.handleClick=function(){this.state.isOpened?this.close():this.open()},t.prototype.getTarget=function(){return this.domRef.current},t.prototype.getParent=function(){var e;return null===(e=this.domRef.current)||void 0===e?void 0:e.parentElement},t.prototype.open=function(e){this.props.disabled||this.setState({isOpened:!0},e)},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.clearValue=function(e){e.preventDefault(),e.stopPropagation();var t=this.props.onChange;t("")},t.prototype.handlePopOverClick=function(e){e.stopPropagation(),e.preventDefault()},t.prototype.handleChange=function(e){e&&(e=a.__assign(a.__assign({},e),{vendor:this.props.vendor})),this.props.onChange(e)},t.prototype.render=function(){var e,t=this.props,a=t.classnames,o=t.value,s=t.className,u=t.disabled,c=t.placeholder,_=t.clearable,m=t.popOverContainer,f=t.vendor,y=t.ak,h=this.props.translate,g=this.state,v=g.isFocused,b=g.isOpened;return n.default.createElement("div",{tabIndex:0,onKeyPress:this.handleKeyPress,onFocus:this.handleFocus,onBlur:this.handleBlur,className:a("LocationPicker",{"is-disabled":u,"is-focused":v,"is-active":b},s),ref:this.domRef,onClick:this.handleClick},o?n.default.createElement("span",{className:a("LocationPicker-value")},o.address):n.default.createElement("span",{className:a("LocationPicker-placeholder")},h(c)),_&&!u&&o?n.default.createElement("a",{className:a("LocationPicker-clear"),onClick:this.clearValue},n.default.createElement(r.Icon,{icon:"close",className:"icon"})):null,n.default.createElement("a",{className:a("LocationPicker-toggler")},n.default.createElement(r.Icon,{icon:"location",className:"icon"})),n.default.createElement(d.default,{target:this.getTarget,container:m||this.getParent,rootClose:!1,show:b},n.default.createElement(i.default,{className:a("LocationPicker-popover"),onHide:this.close,overlay:!0,onClick:this.handlePopOverClick,style:{width:null===(e=this.getTarget())||void 0===e?void 0:e.offsetWidth}},"baidu"===f?n.default.createElement(p.default,{ak:y,value:o,onChange:this.handleChange}):n.default.createElement(l.default,null,h("${vendor} 地图控件不支持",{vendor:f})))))};var o,u,c;return t.defaultProps={placeholder:"请选择位置",clearable:!1},a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof n.default&&n.default.KeyboardEvent)?o:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleKeyPress",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"handleFocus",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"handleBlur",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"handleClick",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"getTarget",null),a.__decorate([s.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("desi
|
|||
|
;/*!src/renderers/Form/Location.tsx*/
|
|||
|
amis.define("05b43e3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationRenderer=t.LocationControl=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),r=n.__importDefault(e("567b83c")),a=n.__importDefault(e("0e2f942")),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){return o.default.createElement("div",{className:this.props.classnames("LocationControl")},o.default.createElement(a.default,n.__assign({},this.props)))},t.defaultProps={vendor:"baidu"},t}(o.default.Component);t.LocationControl=i;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([r.default({type:"location"})],t)}(i);t.LocationRenderer=u});
|
|||
|
;/*!src/renderers/Form/Select.tsx*/
|
|||
|
amis.define("86ddd97",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSelectControlRenderer=t.SelectControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),a=n.__importDefault(e("node_modules/classnames/index")),i=e("b86428a"),r=n.__importDefault(e("d57879c")),l=n.__importDefault(e("node_modules/lodash/find")),s=n.__importDefault(e("node_modules/lodash/debounce")),u=e("1caead1"),d=e("9a80175"),p=e("f2e345e"),c=function(e){function t(t){var n=e.call(this,t)||this;return n.changeValue=n.changeValue.bind(n),n.loadRemote=s.default(n.loadRemote.bind(n),250,{trailing:!0,leading:!1}),n.inputRef=n.inputRef.bind(n),n}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook()},t.prototype.inputRef=function(e){this.input=e},t.prototype.foucs=function(){this.input&&this.input.focus()},t.prototype.changeValue=function(e){var t=this.props,n=t.joinValues,o=t.extractValue,a=t.delimiter,i=t.multiple,r=(t.type,t.valueField),s=t.onChange,u=t.setOptions,c=t.options,f=t.autoFill,h=t.onBulkChange,m=e,v=[];(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t=l.default(c,function(t){return t[r||"value"]==e[r||"value"]});t||v.push(e)}),n?m=i?Array.isArray(e)?e.map(function(e){return e[r||"value"]}).join(a):e?e[r||"value"]:"":m?m[r||"value"]:"":o&&(m=i?Array.isArray(e)?e.map(function(e){return e[r||"value"]}):e?[e[r||"value"]]:[""]:m?m[r||"value"]:""),v.length&&u(c.concat(v));var _=!i&&f&&!d.isEmpty(f)&&p.dataMapping(f,e);_&&h(_),s(m)},t.prototype.loadRemote=function(e){var t=this,n=this.props,o=n.autoComplete,a=n.env,i=n.data,r=n.setOptions,l=n.setLoading,s=n.formInited,p=n.addHook;if(!a||!a.fetcher)throw new Error("fetcher is required");if(!s)return this.unHook&&this.unHook(),this.unHook=p(this.loadRemote.bind(this,e),"init");var c=d.createObject(i,{term:e,value:e});return u.isEffectiveApi(o,c)?(l(!0),a.fetcher(o,c).then(function(e){var n=e.data&&e.data.options||e.data||[],o=t.mergeOptions(n);return r(o),{options:o}}).finally(function(){return l(!1)})):Promise.resolve({options:[]})},t.prototype.mergeOptions=function(e){var t=this.props.selectedOptions,o=e.concat();return Array.isArray(t)&&t.length&&t.forEach(function(e){l.default(o,function(t){return t.value==e.value})||o.push(n.__assign(n.__assign({},e),{hidden:!0}))}),o},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.render=function(){var e=this.props,t=e.autoComplete,i=e.searchable,l=e.options,s=e.className,d=e.loading,p=(e.value,e.selectedOptions),c=e.multi,f=e.multiple,h=e.placeholder,m=(e.id,e.classPrefix),v=(e.classnames,e.creatable),_=(e.inline,e.noResultsText),y=e.render,g=n.__rest(e,["autoComplete","searchable","options","className","loading","value","selectedOptions","multi","multiple","placeholder","id","classPrefix","classnames","creatable","inline","noResultsText","render"]);return _&&/<\w+/.test(_)&&(_=y("noResultText",_)),o.default.createElement("div",{className:a.default(m+"SelectControl",s)},o.default.createElement(r.default,n.__assign({},g,{placeholder:h,multiple:f||c,ref:this.inputRef,value:p,options:l,loadOptions:u.isEffectiveApi(t)?this.loadRemote:void 0,creatable:v,searchable:i||!!t,onChange:this.changeValue,loading:d,noResultsText:_})))},t.defaultProps={clearable:!1,searchable:!1},t}(o.default.Component);t.default=c;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([i.OptionsControl({type:"select"})],t)}(c);t.SelectControlRenderer=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps={multiple:!0},t=n.__decorate([i.OptionsControl({type:"multi-select"})],t)}(c);t.MultiSelectControlRenderer=h});
|
|||
|
;/*!src/renderers/Form/Static.tsx*/
|
|||
|
amis.define("d09e479",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StaticFieldRenderer=t.StaticControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=e("567b83c"),s=e("f6086a9"),r=a.__importDefault(e("bcd7efc")),i=a.__importDefault(e("b497f17")),d=e("0f9ebdf"),o=a.__importDefault(e("705a434")),c=e("9a80175"),u=function(e){function t(t){var a=e.call(this,t)||this;return a.handleQuickChange=a.handleQuickChange.bind(a),a}return a.__extends(t,e),t.prototype.handleQuickChange=function(e,t){var a=this.props,n=a.onBulkChange,l=a.onAction,s=a.data;n(e,t===!0),t&&t.api&&l(null,{actionType:"ajax",api:t.api},c.extendObject(s,e))},t.prototype.render=function(){var e=this.props,t=e.className,l=e.value,s=e.label,r=e.type,i=e.render,d=(e.children,e.data,e.classnames),o=a.__rest(e,["className","value","label","type","render","children","data","classnames"]),c=/^static/.test(r)?r.substring(7)||"tpl":r,u=a.__assign(a.__assign({label:s,name:name},o),{type:c});return n.default.createElement("div",{className:d("Form-static")},i("field",a.__assign(a.__assign({},u),{type:"static-field",field:u}),{value:l,className:t,onQuickChange:this.handleQuickChange}))},t.defaultProps={placeholder:"-"},t}(n.default.Component);t.default=u;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([l.FormItem({test:function(e,t,a){return/(^|\/)form(?:\/.+)?\/control\/static(\-[^\/]+)?$/.test(e)?!0:/(^|\/)form(?:\/.+)?\/control\/[^\/]+$/.test(e)&&t&&t.type&&(t.name||t.label)&&a&&a(e+"/static-field/"+t.type)?!0:!1},weight:-90,strictMode:!1,sizeMutable:!1,name:"static-control"})],t)}(u);t.StaticControlRenderer=p;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=(e.type,e.className),l=e.render,s=e.style,r=e.wrapperComponent,i=(e.labelClassName,e.value),d=e.data,o=e.children,c=e.width,u=e.inputClassName,p=(e.label,e.tabIndex),_=e.onKeyUp,f=e.field,m=a.__rest(e,["type","className","render","style","wrapperComponent","labelClassName","value","data","children","width","inputClassName","label","tabIndex","onKeyUp","field"]),h=a.__assign(a.__assign({},f),{className:u,type:f&&f.type||"plain"}),b=o?o:l("field",h,a.__assign(a.__assign({},m),{value:i,data:d}));return c&&(s=s||{},s.width=s.width||c),r?n.default.createElement(r,{style:s,className:t,tabIndex:p,onKeyUp:_},b):b},t.defaultProps=a.__assign(a.__assign({},s.TableCell.defaultProps),{wrapperComponent:"div"}),t=a.__decorate([d.Renderer({test:/(^|\/)static\-field$/}),i.default(),r.default(),o.default()],t)}(s.TableCell);t.StaticFieldRenderer=_});
|
|||
|
;/*!src/renderers/Form/Date.tsx*/
|
|||
|
amis.define("b0a035c",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeControlRenderer=t.DatetimeControlRenderer=t.DateControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),n=e("567b83c"),o=e("f2e345e"),s=a.__importDefault(e("node_modules/moment/moment"));e("node_modules/moment/locale/zh-cn");var i=a.__importDefault(e("dd24912")),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.minDate,a=e.maxDate,r=e.value,n=e.defaultValue,i=e.setPrinstineValue,l=e.data,m=e.format,u=e.utc;if(n&&r===n){var d=o.filterDate(n,l,m);i((u?s.default.utc(d):d).format(m))}this.setState({minDate:t?o.filterDate(t,l,m):void 0,maxDate:a?o.filterDate(a,l,m):void 0})},t.prototype.componentWillReceiveProps=function(e){var t=this.props;if(t.defaultValue!==e.defaultValue){var a=o.filterDate(e.defaultValue,e.data,e.format);e.setPrinstineValue((e.utc?s.default.utc(a):a).format(e.format))}(t.minDate!==e.minDate||t.maxDate!==e.maxDate||t.data!==e.data)&&this.setState({minDate:e.minDate?o.filterDate(e.minDate,e.data,this.props.format):void 0,maxDate:e.maxDate?o.filterDate(e.maxDate,e.data,this.props.format):void 0})},t.prototype.render=function(){var e=this.props,t=e.className,n=(e.defaultValue,e.defaultData,e.classnames),o=(e.minDate,e.maxDate,a.__rest(e,["className","defaultValue","defaultData","classnames","minDate","maxDate"]));return r.default.createElement("div",{className:n("DateControl",t)},r.default.createElement(i.default,a.__assign({},o,this.state,{classnames:n})))},t.defaultProps={format:"X",viewMode:"days",inputFormat:"YYYY-MM-DD",timeConstraints:{minutes:{step:1}},clearable:!0},t}(r.default.PureComponent);t.default=l;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},l.defaultProps),{placeholder:"请选择日期",dateFormat:"YYYY-MM-DD",timeFormat:"",strictMode:!1}),t=a.__decorate([n.FormItem({type:"date",weight:-150})],t)}(l);t.DateControlRenderer=m;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},l.defaultProps),{placeholder:"请选择日期以及时间",inputFormat:"YYYY-MM-DD HH:mm:ss",dateFormat:"LL",timeFormat:"HH:mm:ss",closeOnSelect:!1,strictMode:!1}),t=a.__decorate([n.FormItem({type:"datetime"})],t)}(l);t.DatetimeControlRenderer=u;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},l.defaultProps),{placeholder:"请选择时间",inputFormat:"HH:mm",dateFormat:"",timeFormat:"HH:mm",viewMode:"time",closeOnSelect:!1}),t=a.__decorate([n.FormItem({type:"time"})],t)}(l);t.TimeControlRenderer=d});
|
|||
|
;/*!src/renderers/Form/DateRange.tsx*/
|
|||
|
amis.define("48cac0f",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimeRangeControlRenderer=t.DateRangeControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),n=e("567b83c"),i=a.__importDefault(e("node_modules/classnames/index")),o=e("f2e345e");e("node_modules/moment/locale/zh-cn");var l=a.__importStar(e("eaae631")),s=function(e){function t(t){var a=e.call(this,t)||this,r=t.minDate,n=t.maxDate,i=t.data,l=t.format;return a.state={minDate:r?o.filterDate(r,i,l):void 0,maxDate:n?o.filterDate(n,i,l):void 0},a}return a.__extends(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.defaultValue,a=e.setPrinstineValue,r=e.delimiter,n=e.format,i=e.data,s=e.value,u=e.joinValues,d=e.utc;if(t&&s===t){var m="string"==typeof t?t.split(r):t;a(l.DateRangePicker.formatValue({startDate:o.filterDate(m[0],i,n),endDate:o.filterDate(m[1],i,n)},n,u,r,d))}},t.prototype.componentWillReceiveProps=function(e){var t=e.data,a=e.minDate,r=e.maxDate,n=e.format,i=this.props;(i.minDate!==a||i.maxDate!==r||i.data!==t)&&this.setState({minDate:a?o.filterDate(a,t,n):void 0,maxDate:r?o.filterDate(r,t,n):void 0})},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.defaultValue,r=t.delimiter,n=t.joinValues,i=t.setPrinstineValue,s=t.data,u=t.utc,d=t.format;if(e.defaultValue!==a){var m="string"==typeof a?a.split(r):a;i(m?l.DateRangePicker.formatValue({startDate:o.filterDate(m[0],s,d),endDate:o.filterDate(m[1],s,d)},d,n,r,u):void 0)}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classPrefix,o=(e.defaultValue,e.defaultData,a.__rest(e,["className","classPrefix","defaultValue","defaultData"]));return r.default.createElement("div",{className:i.default(n+"DateRangeControl",t)},r.default.createElement(l.default,a.__assign({},o,this.state,{classPrefix:n})))},t.defaultProps={format:"X",joinValues:!0,delimiter:","},t}(r.default.Component);t.default=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},s.defaultProps),{timeFormat:""}),t=a.__decorate([n.FormItem({type:"date-range"})],t)}(s);t.DateRangeControlRenderer=u;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.defaultProps=a.__assign(a.__assign({},s.defaultProps),{timeFormat:"HH:mm",inputFormat:"YYYY-MM-DD HH:mm"}),t=a.__decorate([n.FormItem({type:"datetime-range",sizeMutable:!1})],t)}(s);t.DateTimeRangeControlRenderer=d});
|
|||
|
;/*!src/renderers/Form/Repeat.tsx*/
|
|||
|
amis.define("d7f8ee3",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.RepeatControlRenderer=void 0;var t=e("node_modules/tslib/tslib"),n=t.__importDefault(e("node_modules/react/index")),l=t.__importDefault(e("node_modules/classnames/index")),r=e("567b83c"),s={secondly:"秒",minutely:"分",hourly:"时",daily:"天",weekdays:"周中",weekly:"周",monthly:"月",yearly:"年"},i=t.__importDefault(e("d57879c")),d=t.__importDefault(e("736bbb6")),u=function(e){function a(a){var t=e.call(this,a)||this;return t.handleOptionChange=t.handleOptionChange.bind(t),t.handleChange=t.handleChange.bind(t),t}return t.__extends(a,e),a.prototype.handleOptionChange=function(e){this.props.onChange(e.value)},a.prototype.handleChange=function(e){var a=this.props.value,t=a?a.split(":"):[];this.props.onChange(t[0]+":"+e)},a.prototype.renderInput=function(){var e=this,a=this.props.value,t=a?a.split(":"):[],l=this.props,r=l.options,u=l.placeholder,o=l.disabled,c=l.classPrefix,p=l.translate,h=[];h=r.split(",").map(function(e){return{label:s[e]||"不支持",value:e}}),h.unshift({label:p(u),value:""});var f;switch(t[1]=parseInt(t[1],10)||1,t[0]){case"secondly":f=n.default.createElement(d.default,{key:"input",classPrefix:c,value:t[1],min:1,step:5,max:60,disabled:o,onChange:function(a){return e.handleChange(a)}});break;case"minutely":f=n.default.createElement(d.default,{key:"input",classPrefix:c,value:t[1],min:1,step:5,max:60,disabled:o,onChange:function(a){return e.handleChange(a)}});break;case"hourly":f=n.default.createElement(d.default,{key:"input",classPrefix:c,value:t[1],min:1,step:1,max:24,disabled:o,onChange:function(a){return e.handleChange(a)}});break;case"daily":f=n.default.createElement(d.default,{key:"input",classPrefix:c,value:t[1],min:1,step:1,max:30,disabled:o,onChange:function(a){return e.handleChange(a)}});break;case"weekly":f=n.default.createElement(d.default,{key:"input",classPrefix:c,value:t[1],min:1,step:1,max:12,disabled:o,onChange:function(a){return e.handleChange(a)}});break;case"monthly":f=n.default.createElement(d.default,{key:"input",classPrefix:c,value:t[1],min:1,step:1,max:12,disabled:o,onChange:function(a){return e.handleChange(a)}});break;case"yearly":f=n.default.createElement(d.default,{classPrefix:c,key:"input",className:"v-middle",value:t[1],min:1,step:1,max:20,disabled:o,onChange:function(a){return e.handleChange(a)}})}return n.default.createElement("div",{className:"repeat-control hbox"},f?n.default.createElement("div",{className:"col v-middle",style:{width:30}},n.default.createElement("span",null,p("每"))):null,f?n.default.createElement("div",{className:"col v-middle"},f):null,n.default.createElement("div",{className:"col v-middle repeat-btn"},n.default.createElement(i.default,{classPrefix:c,className:f?"pull-right":"",options:h,placeholder:p(u),onChange:this.handleOptionChange,value:t[0],clearable:!1,searchable:!1,disabled:o,joinValues:!1})))},a.prototype.render=function(){var e=this.props,a=e.className,t=e.classPrefix;return n.default.createElement("div",{className:l.default(t+"RepeatControl",a)},this.renderInput())},a.defaultProps={options:"hourly,daily,weekly,monthly",placeholder:"不重复"},a}(n.default.Component);a.default=u;var o=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a=t.__decorate([r.FormItem({type:"repeat",sizeMutable:!1})],a)}(u);a.RepeatControlRenderer=o});
|
|||
|
;/*!src/renderers/Form/Tree.tsx*/
|
|||
|
amis.define("ee37b69",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.TreeControlRenderer=void 0;var t=e("node_modules/tslib/tslib"),o=t.__importDefault(e("node_modules/react/index")),a=t.__importDefault(e("node_modules/classnames/index")),r=t.__importDefault(e("d233af4")),i=e("b86428a"),n=e("1953fc1"),d=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(l,e),l.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},l.prototype.render=function(){var e=this.props,l=e.className,t=e.classPrefix,i=e.value,d=e.onChange,s=e.disabled,u=e.joinValues,p=e.extractValue,c=e.delimiter,f=e.placeholder,h=e.options,m=e.multiple,b=e.valueField,C=e.initiallyOpen,v=e.unfoldedLevel,_=e.withChildren,y=e.onlyChildren,T=e.loading,w=e.hideRoot,x=e.rootLabel,D=e.cascade,V=e.rootValue,R=e.showIcon,g=e.showRadio,E=e.onAdd,F=e.creatable,L=e.createTip,O=e.addControls,P=e.onEdit,j=e.editable,A=e.editTip,I=e.editControls,N=e.removable,k=e.removeTip,z=e.onDelete,M=e.rootCreatable,S=e.rootCreateTip,U=e.labelField,q=e.translate;return o.default.createElement("div",{className:a.default(t+"TreeControl",l)},o.default.createElement(n.Spinner,{size:"sm",key:"info",show:T}),T?null:o.default.createElement(r.default,{classPrefix:t,labelField:U,valueField:b,disabled:s,onChange:d,joinValues:u,extractValue:p,delimiter:c,placeholder:q(f),options:h,multiple:m,initiallyOpen:C,unfoldedLevel:v,withChildren:_,onlyChildren:y,hideRoot:w,rootLabel:q(x),rootValue:V,showIcon:R,showRadio:g,cascade:D,foldedField:"collapsed",value:i||"",selfDisabledAffectChildren:!1,onAdd:E,creatable:F,createTip:L,rootCreatable:M,rootCreateTip:S,onEdit:P,editable:j,editTip:A,removable:N,removeTip:k,onDelete:z,bultinCUD:!O&&!I}))},l.defaultProps={placeholder:"选项加载中...",multiple:!1,rootLabel:"顶级",rootValue:"",showIcon:!0},l}(o.default.Component);l.default=d;var s=function(e){function l(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(l,e),l=t.__decorate([i.OptionsControl({type:"tree"})],l)}(d);l.TreeControlRenderer=s});
|
|||
|
;/*!src/renderers/Form/TreeSelect.tsx*/
|
|||
|
amis.define("90765dc",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeSelectControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),i=n.__importDefault(e("997df41")),l=n.__importDefault(e("2b3dcdf")),o=e("b86428a"),r=n.__importDefault(e("d233af4")),s=n.__importDefault(e("node_modules/match-sorter/dist/match-sorter.cjs")),u=n.__importDefault(e("node_modules/lodash/debounce")),d=n.__importDefault(e("node_modules/lodash/find")),p=e("1caead1"),c=n.__importDefault(e("acad559")),h=n.__importDefault(e("d14c6a1")),f=e("9a80175"),m=e("node_modules/react-dom/index"),v=function(e){function t(t){var n=e.call(this,t)||this;return n.container=a.default.createRef(),n.input=a.default.createRef(),n.cache={},n.targetRef=function(e){return n.target=e?m.findDOMNode(e):null},n.state={inputValue:"",isOpened:!1,isFocused:!1},n.open=n.open.bind(n),n.close=n.close.bind(n),n.handleChange=n.handleChange.bind(n),n.clearValue=n.clearValue.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.handleInputKeyDown=n.handleInputKeyDown.bind(n),n.loadRemote=u.default(n.loadRemote.bind(n),250,{trailing:!0,leading:!1}),n}n.__extends(t,e),t.prototype.componentDidMount=function(){this.loadRemote("")},t.prototype.open=function(e){this.props.disabled||this.setState({isOpened:!0},e)},t.prototype.close=function(){var e=this;this.setState({isOpened:!1,inputValue:this.props.multiple?this.state.inputValue:""},function(){return e.loadRemote(e.state.inputValue)})},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleKeyPress=function(e){" "===e.key&&(this.handleOutClick(e),e.preventDefault())},t.prototype.validate=function(){var e=this.props,t=e.value,n=e.minLength,a=e.maxLength,i=e.delimiter,l=e.translate,o=Array.isArray(t)?t:(t?String(t):"").split(i||",");return n&&o.length<n?l("已选择数量低于设定的最小个数${minLength},请选择更多的选项。",{minLength:n}):a&&o.length>a?l("已选择数量超出设定的最大个数{{maxLength}},请取消选择超出的选项。",{maxLength:a}):void 0},t.prototype.removeItem=function(e,t){var n=this.props,a=n.selectedOptions,i=n.joinValues,l=n.extractValue,o=n.delimiter,r=n.valueField,s=n.onChange,u=n.disabled;if(t&&t.stopPropagation(),!u){var d=a.concat();d.splice(e,1);var p=d;i?p=d.map(function(e){return e[r||"value"]}).join(o||","):l&&(p=d.map(function(e){return e[r||"value"]})),s(p)}},t.prototype.handleChange=function(e){var t=this.props,n=t.onChange,a=t.multiple;a||this.close(),a||!this.state.inputValue?n(e):this.setState({inputValue:""},function(){return n(e)})},t.prototype.handleInputChange=function(e){var t=this,n=this.props,a=n.autoComplete,i=n.data;this.setState({inputValue:e},p.isEffectiveApi(a,i)?function(){return t.loadRemote(t.state.inputValue)}:void 0)},t.prototype.handleInputKeyDown=function(e){var t=this.state.inputValue,n=this.props,a=n.multiple,i=n.selectedOptions;"Backspace"===e.key&&!t&&i.length&&a&&this.removeItem(i.length-1)},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,n=e.resetValue;t("undefined"==typeof n?"":n)},t.prototype.filterOptions=function(e,t){var a=this,i=this.props,l=i.labelField,o=i.valueField;return e.map(function(e){if(e=n.__assign({},e),e.visible=!!s.default([e],t,{keys:[l||"label",o||"value"]}).length,!e.visible&&e.children){e.children=a.filterOptions(e.children,t);var i=e.children.filter(function(e){return e.visible}).length;e.visible=!!i}return e.visible&&(e.collapsed=!1),e})},t.prototype.loadRemote=function(e){var t=this,a=this.props,i=a.autoComplete,l=a.env,o=a.data,r=a.setOptions,s=a.setLoading;if(p.isEffectiveApi(i,o)){if(!l||!l.fetcher)throw new Error("fetcher is required");if(this.cache[e]||~e.indexOf("'")){var u=this.cache[e]||[],d=this.mergeOptions(u);return r(d),Promise.resolve({options:d})}return s(!0),l.fetcher(i,n.__assign(n.__assign({},o),{t
|
|||
|
;/*!src/renderers/Form/File.tsx*/
|
|||
|
amis.define("162bd80",function(e,t){"use strict";function a(e){return/(?:\/|^)([^\/]+?)$/.test(e)?decodeURIComponent(RegExp.$1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.FileControlRenderer=t.getNameFromUrl=void 0;var n=e("node_modules/tslib/tslib"),i=n.__importDefault(e("node_modules/react/index")),l=e("567b83c"),r=n.__importDefault(e("node_modules/lodash/find")),o=n.__importDefault(e("node_modules/lodash/isPlainObject")),s=n.__importDefault(e("node_modules/async/mapLimit")),u=n.__importDefault(e("cf6ad73")),d=e("9a80175"),p=e("1caead1"),c=n.__importDefault(e("a67acca")),f=e("b7bbd16"),m=n.__importDefault(e("node_modules/react-dropzone/dist/index")),h=e("f2e345e"),g=function(e){return e.stopPropagation()};t.getNameFromUrl=a;var v=function(e){function t(a){var n=e.call(this,a)||this;n.dropzone=i.default.createRef();var l=a.value,r=(a.multiple,a.joinValues),o=a.delimiter,s=[];return l&&l instanceof Blob?s=[l]:l&&(s=(Array.isArray(l)?l:r?(l.value||l).split(o):[l.value||l]).map(function(e){return t.valueToFile(e,a)}).filter(function(e){return e})),n.state={files:s,uploading:!1},n.sendFile=n.sendFile.bind(n),n.removeFile=n.removeFile.bind(n),n.clearError=n.clearError.bind(n),n.handleDrop=n.handleDrop.bind(n),n.handleDropRejected=n.handleDropRejected.bind(n),n.startUpload=n.startUpload.bind(n),n.stopUpload=n.stopUpload.bind(n),n.retry=n.retry.bind(n),n.toggleUpload=n.toggleUpload.bind(n),n.tick=n.tick.bind(n),n.onChange=n.onChange.bind(n),n.uploadFile=n.uploadFile.bind(n),n.uploadBigFile=n.uploadBigFile.bind(n),n.handleSelect=n.handleSelect.bind(n),n}return n.__extends(t,e),t.valueToFile=function(e,t,i){var l=i&&"string"==typeof e?r.default(i,function(t){return t.value===e}):void 0;return e?e instanceof File?{state:"ready",value:e,name:e.name,url:"",id:d.guid()}:n.__assign({},"string"==typeof e?{state:l&&l.state?l.state:"init",value:e,name:l&&l.name||(/^data:/.test(e)?"base64数据":a(e)),id:d.guid(),url:"string"==typeof t.downloadUrl&&e&&!/^data:/.test(e)?""+t.downloadUrl+e:void 0}:e):void 0},t.prototype.componentWillReceiveProps=function(e){var a=this,i=this.props;if(i.value!==e.value&&this.emitValue!==e.value){var l=e.value,o=(e.multiple,e.joinValues),s=e.delimiter,u=[];l&&(u=(Array.isArray(l)?l:o&&"string"==typeof l?l.split(s):[l]).map(function(i){var l,o=t.valueToFile(i,e,a.state.files);return o&&(l=r.default(a.state.files,function(e){return e.value===o.value}))&&(o=n.__assign(n.__assign(n.__assign({},l),o),{id:o.id||l.id})),o}).filter(function(e){return e})),this.setState({files:u})}},t.prototype.handleDrop=function(e){var t=this;if(e.length){var a=this.props,n=a.maxSize,i=a.multiple,l=a.maxLength,r=a.translate,o=i&&l?l-this.state.files.length:e.length,s=[];[].slice.call(e,0,o).forEach(function(e){n&&e.size>n?(t.props.env.alert(r("您选择的文件 {{filename}} 大小为 {{actualSize}} 超出了最大为 {{maxSize}} 的限制,请重新选择。",{filename:e.name,actualSize:u.default.formatFileSize(e.size),maxSize:u.default.formatFileSize(n)})),e.state="invalid"):e.state="pending",e.id=d.guid(),s.push(e)}),s.length&&this.setState({error:null,files:i?this.state.files.concat(s):s},function(){var e=t.props.autoUpload;e&&t.startUpload()})}},t.prototype.handleDropRejected=function(e,t){if("change"===t.type||"drop"===t.type){var a=this.props,i=a.multiple,l=a.env,r=a.accept,o=a.translate,s=e.map(function(e){return n.__assign(n.__assign({},e),{state:"invalid",id:d.guid(),name:e.name})});this.setState({files:i?this.state.files.concat(s):this.state.files.length?this.state.files:s.slice(0,1)}),l.alert(o("您添加的文件{{files}}不符合类型的`{{accept}}`的设定,请仔细检查。",{files:s.map(function(e){return"「"+e.name+"」"}).join(" "),accept:r}))}},t.prototype.handleSelect=function(){this.dropzone.current&&this.dropzone.current.open()},t.prototype.startUpload=function(e){void 0===e&&(e=!1),this.state.uploading||this.setState({uploading:!0,files:this.state.files.map(function(t){return e&&"error"===t.state&&(t.state="pending",t.progress=0),t})},this.tick)},t.prototype.toggleUpload=function(e){return e
|
|||
|
;/*!src/renderers/Image.tsx*/
|
|||
|
amis.define("fcb3580",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ImageFieldRenderer=a.ImageField=a.ImageThumb=void 0;var t=e("node_modules/tslib/tslib"),n=t.__importDefault(e("node_modules/react/index")),l=e("0f9ebdf"),r=e("6a2dbb7"),i=e("256b65d"),o=e("9a80175"),s=e("b7bbd16"),d=e("5ab4e9d"),m=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a.prototype.handleEnlarge=function(){var e=this.props,a=e.onEnlarge,n=t.__rest(e,["onEnlarge"]);a&&a(n)},a.prototype.render=function(){var e=this.props,a=e.classnames,t=e.className,l=e.imageClassName,r=e.thumbMode,i=e.thumbRatio,o=e.src,d=e.alt,m=e.title,u=e.caption,c=e.onLoad,p=e.enlargeAble,g=e.translate;return n.default.createElement("div",{className:a("Image",t)},n.default.createElement("div",{className:a("Image-thumb",r?"Image-thumb--"+r:"",i?"Image-thumb--"+i.replace(/:/g,"-"):"")},n.default.createElement("img",{onLoad:c,className:a(l),src:o,alt:d}),p?n.default.createElement("div",{key:"overlay",className:a("Image-overlay")},n.default.createElement("a",{"data-tooltip":g("查看大图"),"data-position":"bottom",target:"_blank",onClick:this.handleEnlarge},n.default.createElement(s.Icon,{icon:"view",className:"icon"}))):null),m||u?n.default.createElement("div",{key:"caption",className:a("Image-info")},m?n.default.createElement("div",{className:a("Image-title")},m):null,u?n.default.createElement("div",{className:a("Image-caption")},u):null):null)},t.__decorate([o.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[]),t.__metadata("design:returntype",void 0)],a.prototype,"handleEnlarge",null),a}(n.default.Component);a.ImageThumb=m;var u=i.themeable(d.localeable(m));a.default=u;var c=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a.prototype.handleEnlarge=function(e){var a=e.src,t=e.originalSrc,n=e.title,l=e.caption,r=e.thumbMode,i=e.thumbRatio,o=this.props,s=o.onImageEnlarge,d=o.enlargeTitle,m=o.enlargeCaption;s&&s({src:a,originalSrc:t||a,title:d||n,caption:m||l,thumbMode:r,thumbRatio:i},this.props)},a.prototype.render=function(){var e=this.props,a=e.className,t=e.defaultImage,l=e.imageCaption,i=e.title,o=e.data,s=e.imageClassName,d=e.classnames,m=e.src,c=e.thumbMode,p=e.thumbRatio,g=e.placeholder,h=e.originalSrc,f=e.enlargeAble,b=e.showDimensions,_=m?r.filter(m,o,"| raw"):"",v=_||this.props.value||t;return n.default.createElement("div",{className:d("ImageField",a)},v?n.default.createElement(u,{imageClassName:s,src:v,title:r.filter(i,o),caption:r.filter(l,o),thumbMode:c,thumbRatio:p,originalSrc:r.filter(h,o,"| raw"),enlargeAble:f&&v!==t,onEnlarge:this.handleEnlarge,showDimensions:b}):n.default.createElement("span",{className:"text-muted"},g))},a.defaultProps={defaultImage:"https://fex.bdstatic.com/n/static/amis/renderers/crud/field/placeholder_cfad9b1.png",thumbMode:"contain",thumbRatio:"1:1",placeholder:"-"},t.__decorate([o.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[Object]),t.__metadata("design:returntype",void 0)],a.prototype,"handleEnlarge",null),a}(n.default.Component);a.ImageField=c;var p=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a=t.__decorate([l.Renderer({test:/(^|\/)image$/,name:"image"})],a)}(c);a.ImageFieldRenderer=p});
|
|||
|
;/*!src/renderers/Form/Image.tsx*/
|
|||
|
amis.define("cf6ad73",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),i=a.__importDefault(e("node_modules/react/index")),n=e("567b83c"),o=a.__importDefault(e("node_modules/react-cropper/dist/react-cropper")),l=a.__importDefault(e("node_modules/react-dropzone/dist/index"));e("node_modules/blueimp-canvastoblob/js/canvas-to-blob");var r=a.__importDefault(e("node_modules/lodash/find")),s=a.__importDefault(e("node_modules/qs/lib/index")),d=e("1caead1"),c=e("9a80175"),p=e("b7bbd16"),u=a.__importDefault(e("a67acca")),f=a.__importDefault(e("node_modules/attr-accept/dist/index")),m=e("162bd80"),h=a.__importDefault(e("fcb3580")),g=e("f2e345e"),v=function(e){return e.stopPropagation()},_=function(e){function t(n){var o=e.call(this,n)||this;o.state={uploading:!1,locked:!1,files:[]},o.files=[],o.cropper=i.default.createRef(),o.dropzone=i.default.createRef(),o.current=null,o.unmounted=!1;var l=n.value,r=n.multiple,s=n.joinValues,d=n.delimiter,c=[];return l&&(c=(Array.isArray(l)?l:s&&"string"==typeof l&&r?l.split(d):[l]).map(function(e){return t.valueToFile(e)}).filter(function(e){return e})),o.state=a.__assign(a.__assign({},o.state),{files:o.files=c,crop:o.buildCrop(n)}),o.sendFile=o.sendFile.bind(o),o.removeFile=o.removeFile.bind(o),o.handleDrop=o.handleDrop.bind(o),o.handleClick=o.handleClick.bind(o),o.handleClick=o.handleClick.bind(o),o.handleCrop=o.handleCrop.bind(o),o.handleDropRejected=o.handleDropRejected.bind(o),o.cancelCrop=o.cancelCrop.bind(o),o.handleImageLoaded=o.handleImageLoaded.bind(o),o.startUpload=o.startUpload.bind(o),o.stopUpload=o.stopUpload.bind(o),o.toggleUpload=o.toggleUpload.bind(o),o.tick=o.tick.bind(o),o.onChange=o.onChange.bind(o),o.addFiles=o.addFiles.bind(o),o.handleSelect=o.handleSelect.bind(o),o.handlePaste=o.handlePaste.bind(o),o}return a.__extends(t,e),t.formatFileSize=function(e,t){for(void 0===t&&(t=[" B"," KB"," M"," G"]),e=parseInt(e,10)||0;e>1024&&t.length>1;)e/=1024,t.shift();return e.toFixed(2)+t[0]},t.valueToFile=function(e){return e?a.__assign(a.__assign({},"string"==typeof e?{value:e,url:e,id:c.guid()}:e),{state:"init"}):void 0},t.sizeInfo=function(e,t,a){return e?t?a("尺寸({{width}} x {{height}})",{width:e,height:t}):a("宽度{{width}}px",{width:e}):a("高度{{height}}px",{height:t})},t.prototype.componentWillReceiveProps=function(e){var i=this,n=this.props;if(n.value!==e.value&&this.emitValue!==e.value){var o=e.value,l=(e.multiple,e.joinValues),s=e.delimiter,d=[];o&&(d=(Array.isArray(o)?o:l&&"string"==typeof o?o.split(s):[o]).map(function(n){var o,l=t.valueToFile(n,e);return l&&(o=r.default(i.files,function(e){return e.value===l.value}))&&(l=a.__assign(a.__assign(a.__assign({},o),l),{id:o.id||l.id})),l}).filter(function(e){return e})),this.setState({files:this.files=d})}n.crop!==e.crop&&this.setState({crop:this.buildCrop(e)})},t.prototype.componentWillUnmount=function(){this.unmounted=!0},t.prototype.buildCrop=function(e){var t=e.crop,i=this.props.translate;return t&&e.multiple?(e.env&&e.env.alert&&e.env.alert(i("图片多选配置和裁剪配置冲突,目前不能二者都支持!")),null):(t===!0&&(t={}),t&&(t=a.__assign({aspectRatio:void 0,guides:!0,dragMode:"move",viewMode:1,rotatable:!1,scalable:!1},t)),t)},t.prototype.handleDropRejected=function(e,t){if("change"===t.type||"drop"===t.type){var i=this.props,n=(i.multiple,i.env),o=i.accept,l=i.translate,r=e.map(function(e){return a.__assign(a.__assign({},e),{state:"invalid",id:c.guid(),name:e.name})});n.alert(l("您添加的文件{{files}}不符合类型的`{{accept}}`的设定,请仔细检查。",{files:r.map(function(e){return"「"+e.name+"」"}).join(" "),accept:o}))}},t.prototype.startUpload=function(e){void 0===e&&(e=!1),this.state.uploading||this.setState({uploading:!0,locked:!0,files:this.files=this.files.map(function(t){return e&&"error"===t.state&&(t.state="pending",t.progress=0),t})},this.tick)},t.prototype.toggleUpload=function(){return this.state.uploading?this.stopUpload():this.startUpload()},t.prototype.stopUpload=funct
|
|||
|
;/*!src/renderers/Form/Matrix.tsx*/
|
|||
|
amis.define("690a2f4",function(e,t){"use strict";function n(e,t){return Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.map(function(e){return t.map(function(t){return a.__assign(a.__assign(a.__assign({},t),e),{checked:!1})})})}function r(e,t,n){return e.map(function(e,r){return e.map(function(e,o){return a.__assign(a.__assign(a.__assign({},t[r]),n[o]),e)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.MatrixRenderer=void 0;var a=e("node_modules/tslib/tslib"),o=a.__importDefault(e("node_modules/react/index")),s=e("567b83c"),i=e("1caead1"),l=e("1953fc1"),u=e("9a80175"),c=function(e){function t(t){var n=e.call(this,t)||this;return n.sourceInvalid=!1,n.mounted=!1,n.state={columns:t.columns||[],rows:t.rows||[],loading:!1},n.toggleItem=n.toggleItem.bind(n),n.reload=n.reload.bind(n),n.initOptions=n.initOptions.bind(n),n}return a.__extends(t,e),t.prototype.componentWillMount=function(){this.mounted=!0},t.prototype.componentDidMount=function(){var e=this.props,t=e.formInited,n=e.addHook;t?this.reload():n(this.initOptions,"init")},t.prototype.componentWillReceiveProps=function(e){var t=this.props;if(t.columns!==e.columns||t.rows!==e.rows)this.setState({columns:e.columns||[],rows:e.rows||[]});else if(e.formInited&&(e.source!==t.source||t.data!==e.data)){var n=i.buildApi(t.source,t.data,{ignoreData:!0}),r=i.buildApi(e.source,e.data,{ignoreData:!0});n.url!==r.url&&i.isValidApi(r.url)&&(this.sourceInvalid=!0)}},t.prototype.componentDidUpdate=function(){this.sourceInvalid&&(this.sourceInvalid=!1,this.reload())},t.prototype.componentWillUnmount=function(){this.mounted=!1;var e=this.props.removeHook;e(this.initOptions,"init")},t.prototype.initOptions=function(e){return a.__awaiter(this,void 0,void 0,function(){var t,n,r;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.reload()];case 1:return a.sent(),t=this.props,n=t.formItem,r=t.name,n?(n.value&&u.setVariable(e,r,n.value),[2]):[2]}})})},t.prototype.reload=function(){return a.__awaiter(this,void 0,void 0,function(){var e,t,n,o,s,l,u=this;return a.__generator(this,function(a){switch(a.label){case 0:if(e=this.props,t=e.source,n=e.data,o=e.env,s=e.onChange,l=e.translate,!i.isEffectiveApi(t,n)||this.state.loading)return[2];if(!o||!o.fetcher)throw new Error("fetcher is required");return[4,new Promise(function(e){return u.mounted?void u.setState({loading:!0},function(){return u.mounted?void o.fetcher(t,n).then(function(n){if(!n.ok)throw new Error(n.msg||l("数据请求错误"));return u.mounted?void u.setState({loading:!1,rows:n.data.rows||[],columns:n.data.columns||[]},function(){var a=(t&&t.replaceData,n.data.value);a&&(a=t.replaceData?a:r(a,u.state.columns,u.state.rows),s(a)),e()}):e()}).catch(function(t){return u.setState({error:t,loading:!1},e)}):e()}):e()})];case 1:return[2,a.sent()]}})})},t.prototype.toggleItem=function(e,t,r){var o=this.state,s=o.columns,i=o.rows,l=this.props,u=l.multiple,c=l.singleSelectMode,d=this.props.value||n(s,i);if(u)d[t][r]=a.__assign(a.__assign({},d[t][r]),{checked:e});else if("row"===c)for(var m=0,p=s.length;p>m;m++)d[m][r]=a.__assign(a.__assign({},d[m][r]),{checked:t===m?e:!e});else if("column"===c)for(var f=0,p=i.length;p>f;f++)d[t][f]=a.__assign(a.__assign({},d[t][f]),{checked:r===f?e:!e});else for(var f=0,p=i.length;p>f;f++)for(var m=0,h=s.length;h>m;m++)d[m][f]=a.__assign(a.__assign({},d[m][f]),{checked:t===m&&r===f?e:!e});this.props.onChange(d.concat())},t.prototype.renderInput=function(){var e=this,t=this.state,r=t.columns,a=t.rows,s=this.props,i=s.rowLabel,u=(s.className,s.classnames),c=s.multiple,d=this.props.value||n(r,a);return o.default.createElement("div",{className:u("Table m-b-none")},o.default.createElement("div",{className:u("Table-content")},o.default.createElement("table",{className:u("Table-table")},o.default.createElement("thead",null,o.default.createElement("tr",null,o.default.createElement("th",null,i),r.map(function(e,t){return o.default.createElement("th",{key:t,className:"text-center"},e.label)}))),o.default.createElement("tbody",null,a.map(function(t,n){return o.default.createElement("tr",{key:
|
|||
|
;/*!src/renderers/Form/Range.tsx*/
|
|||
|
amis.define("db77605",function(e,t){"use strict";function a(e,t){if(t.multiple){if("string"==typeof e){var a=e.split(t.delimiter||",").map(function(e){return Number(e)}),n=a[0],l=a[1];return{min:t.min&&n<t.min&&t.min||n||t.min,max:t.max&&l>t.max&&t.max||l||t.max}}if("object"==typeof e)return{min:t.min&&e.min<t.min&&t.min||e.min||t.min,max:t.max&&e.max>t.max&&t.max||e.max||t.max}}return null!==e&&void 0!==e?e:t.min}Object.defineProperty(t,"__esModule",{value:!0}),t.RangeControlRenderer=t.formatValue=void 0;var n=e("node_modules/tslib/tslib"),l=n.__importDefault(e("node_modules/react/index")),i=n.__importDefault(e("node_modules/lodash/isNumber")),u=n.__importDefault(e("node_modules/lodash/isObject")),s=n.__importDefault(e("node_modules/lodash/isEqual")),r=e("567b83c"),m=n.__importDefault(e("736bbb6")),o=e("b7bbd16");t.formatValue=a;var p=function(e){function t(t){var n=e.call(this,t)||this,l=n.props,i=l.value,s=l.multiple,r=l.delimiter,m=l.min,o=l.max,p=a(i,{multiple:s,delimiter:r,min:m,max:o});return n.state={value:p,minValue:u.default(p)?p.min:m,maxValue:u.default(p)?p.max:o},n.handleChange=n.handleChange.bind(n),n.handleEnd=n.handleEnd.bind(n),n.handleInputChange=n.handleInputChange.bind(n),n.midLabelRef=n.midLabelRef.bind(n),n.clearValue=n.clearValue.bind(n),n.handleMinInputBlur=n.handleMinInputBlur.bind(n),n.handleMaxInputBlur=n.handleMaxInputBlur.bind(n),n.handleMinInputChange=n.handleMinInputChange.bind(n),n.handleMaxInputChange=n.handleMaxInputChange.bind(n),n}return n.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props.value,n=e.value,l=e.multiple,i=e.delimiter,s=e.min,r=e.max;if(t!==n){var m=a(n,{multiple:l,delimiter:i,min:s,max:r});this.setState({value:m,minValue:u.default(m)?m.min:s,maxValue:u.default(m)?m.max:r})}},t.prototype.componentDidMount=function(){this.updateStyle()},t.prototype.componentDidUpdate=function(e){e.showInput!==this.props.showInput&&this.updateStyle()},t.prototype.updateStyle=function(){var e=this.props,t=e.showInput,a=e.classPrefix,n=this.midLabel.offsetWidth,l="calc(50% - "+n/2+"px)";document.querySelector("."+a+"InputRange-label--value").style.left=l,t&&(l="calc(50% - "+(n/2+60)+"px)"),this.midLabel.style.left=l},t.prototype.midLabelRef=function(e){this.midLabel=e},t.prototype.handleChange=function(e){this.setState({value:e,minValue:e.min,maxValue:e.max})},t.prototype.clearValue=function(){var e=this.props,t=e.multiple,a=e.min,n=e.max;this.setState(t?{value:{min:a,max:n},minValue:a,maxValue:n}:{value:a})},t.prototype.handleEnd=function(e){var t=this.props,a=t.multiple,n=t.joinValues,l=t.delimiter,i=e;a&&n&&(i=[e.min,e.max].join(l||","));var u=this.props.onChange;this.setState({value:e},function(){return u(i)})},t.prototype.getStepPrecision=function(){var e=this.props.step;return"number"!=typeof e||e>=1||0>e?0:e.toString().split(".")[1].length},t.prototype.getValue=function(e,t){var a=this.props,n=a.max,l=a.min,s=a.step,r=this.state.value;if(""===e||"-"===e||new RegExp("^[-]?\\d+[.]{1}[0]{0,"+this.getStepPrecision()+"}$").test(e))return e;switch(e=Math.round(parseFloat(e)/s)*s,e=1>s?parseFloat(e.toFixed(this.getStepPrecision())):~~e,t){case"min":if(u.default(r)&&i.default(r.max)){if(e>=r.max&&l<=r.max-s)return r.max-s;if(e<r.max-s)return e}return l;case"max":return u.default(r)&&i.default(r.min)?e>n&&n||e<=r.min&&r.min+s||e:n;default:return l>e&&l||e>n&&n||e}},t.prototype.handleInputChange=function(e){this.setState({value:this.getValue(e.target.value)})},t.prototype.handleMinInputBlur=function(e){var t=this.getValue(e.target.value,"min"),a=this.state.value;u.default(a)?this.setState({value:{min:t,max:a.max},minValue:t}):null},t.prototype.handleMaxInputBlur=function(e){var t=this.getValue(e.target.value,"max"),a=this.state.value;u.default(a)?this.setState({value:{min:a.min,max:t},maxValue:t}):null},t.prototype.handleMinInputChange=function(e){this.setState({minValue:e.target.value})},t.prototype.handleMaxInputChange=function(e){this.setState({maxValue:e.target.value})},t.prototype.render=function(){var e=this,t=this.props,a=t.max,n=t.min,i=t.step,r=t.unit,p=t
|
|||
|
;/*!src/renderers/Form/Combo.tsx*/
|
|||
|
amis.define("3919ee5",function(e,t){"use strict";function a(e,t){return t.reduce(function(t,a){return t[a]=h.resolveVariable(a,e),t},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.ComboControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),l=e("node_modules/react-dom/index"),r=e("567b83c"),i=e("3fbfd93"),s=n.__importStar(e("8ac7656")),d=e("9a80175"),u=n.__importDefault(e("node_modules/sortablejs/Sortable")),m=e("6a2dbb7"),c=n.__importDefault(e("node_modules/lodash/find")),p=n.__importDefault(e("d57879c")),h=e("f2e345e"),f=e("1caead1"),b=e("1953fc1"),g=n.__importDefault(e("node_modules/lodash/memoize")),v=e("b7bbd16"),y=e("node_modules/mobx-state-tree/dist/mobx-state-tree"),C=function(e){function t(t){var o=e.call(this,t)||this;return o.subForms=[],o.subFormDefaultValues=[],o.keys=[],o.toDispose=[],o.id=d.guid(),o.refsMap={},o.makeFormRef=g.default(function(e){return function(t){return o.formRef(t,e)}}),o.memoizedFormatValue=g.default(function(e,t,o,l,r){return d.createObject(d.extendObject(r,n.__assign({index:l,__index:l},r)),n.__assign(n.__assign({},o),Array.isArray(t)?a(r,t):null))},function(e,t,n,o,l){return JSON.stringify(Array.isArray(t)?[n,o,l,a(l,t)]:e?[n,o]:[n,o,l])}),o.handleChange=o.handleChange.bind(o),o.handleSingleFormChange=o.handleSingleFormChange.bind(o),o.handleSingleFormInit=o.handleSingleFormInit.bind(o),o.handleFormInit=o.handleFormInit.bind(o),o.handleAction=o.handleAction.bind(o),o.addItem=o.addItem.bind(o),o.removeItem=o.removeItem.bind(o),o.dragTipRef=o.dragTipRef.bind(o),o.flush=o.flush.bind(o),o.handleComboTypeChange=o.handleComboTypeChange.bind(o),o.defaultValue=n.__assign({},t.scaffold),o}n.__extends(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.store,a=(e.value,e.minLength),n=e.maxLength,o=e.formItem,l=e.addHook;t.config({minLength:a,maxLength:n,length:this.getValueAsArray().length}),o&&o.setSubStore(t),l&&this.toDispose.push(l(this.flush,"flush"))},t.prototype.componentWillReceiveProps=function(e){var t=this.props;if(d.anyChanged(["minLength","maxLength","value"],t,e)){var a=e.store,o=e.minLength,l=e.maxLength,r=this.getValueAsArray(e);a.config({minLength:o,maxLength:l,length:r.length}),a.activeKey>=r.length&&a.setActiveKey(Math.max(0,r.length-1)),e.value!==t.value&&!t.formInited&&this.subFormDefaultValues.length&&(this.subFormDefaultValues=this.subFormDefaultValues.map(function(e,t){return n.__assign(n.__assign({},e),{values:r[t]})}))}},t.prototype.componentWillUnmount=function(){var e,t,a,n,o=this.props.formItem;o&&o.setSubStore(null),this.toDispose.forEach(function(e){return e()}),this.toDispose=[],null===(t=(e=this.memoizedFormatValue.cache).clear)||void 0===t?void 0:t.call(e),null===(n=(a=this.makeFormRef.cache).clear)||void 0===n?void 0:n.call(a)},t.prototype.getValueAsArray=function(e){void 0===e&&(e=this.props);var t=e.flat,a=e.joinValues,n=e.delimiter,o=e.value;return o=a&&t&&"string"==typeof o?o.split(n||","):Array.isArray(o)?o.concat():[]},t.prototype.addItemWith=function(e){var t=this.props,a=t.flat,o=t.joinValues,l=t.delimiter,r=t.scaffold,i=t.disabled,s=t.submitOnChange;if(!i){var u=this.getValueAsArray();u.push(a?e.scaffold||r||"":n.__assign({},e.scaffold||r)),this.keys.push(d.guid()),a&&o&&(u=u.join(l||",")),this.props.onChange(u,s,!0)}},t.prototype.addItem=function(){var e=this.props,t=e.flat,a=e.joinValues,o=e.delimiter,l=e.scaffold,r=e.disabled,i=e.submitOnChange;if(!r){var s=this.getValueAsArray();s.push(t?l||"":n.__assign({},l)),this.keys.push(d.guid()),t&&a&&(s=s.join(o||",")),this.props.onChange(s,i,!0)}},t.prototype.removeItem=function(e){return n.__awaiter(this,void 0,void 0,function(){var t,a,o,l,r,i,s,u,c,p,h,b,g,v;return n.__generator(this,function(n){switch(n.label){case 0:return t=this.props,a=t.flat,o=t.joinValues,l=t.delimiter,r=t.disabled,i=t.deleteApi,s=t.deleteConfirmText,u=t.data,c=t.env,p=t.translate,r?[2]:(h=this.getValueAsArray(),b=d.createObject(u,h[e]),f.isEffectiveApi(i,b)?[4,c.confirm(s?m.filter(s,b):p("确认要删除?"))]:[3,3]);case 1:return g=n.sent(),g?[4,c.
|
|||
|
;/*!src/renderers/Form/Array.tsx*/
|
|||
|
amis.define("9b389bb",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayControlRenderer=void 0;var o=e("node_modules/tslib/tslib"),n=o.__importDefault(e("node_modules/react/index")),r=e("567b83c"),i=e("3fbfd93"),a=o.__importDefault(e("3919ee5")),s=function(e){function t(t){var o=e.call(this,t)||this;return o.comboRef=o.comboRef.bind(o),o}return o.__extends(t,e),t.prototype.comboRef=function(e){this.comboInstance=e},t.prototype.validate=function(e){var t;return this.comboInstance?(t=this.comboInstance).validate.apply(t,e):null},t.prototype.render=function(){var e=this.props,t=e.items,r=o.__rest(e,["items"]);return n.default.createElement(a.default,o.__assign({},r,{controls:[t],flat:!0,multiple:!0,multiLine:!1,ref:this.comboRef}))},t}(n.default.Component);t.default=s;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t=o.__decorate([r.FormItem({type:"array",storeType:i.ComboStore.name})],t)}(s);t.ArrayControlRenderer=l});
|
|||
|
;/*!src/components/condition-builder/types.ts*/
|
|||
|
amis.define("f1fcd54",function(e,f){"use strict";Object.defineProperty(f,"__esModule",{value:!0})});
|
|||
|
;/*!src/components/PopOverContainer.tsx*/
|
|||
|
amis.define("f312a54",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopOverContainer=void 0;var a=t("node_modules/tslib/tslib"),n=a.__importDefault(t("node_modules/react/index")),i=t("9a80175"),o=a.__importDefault(t("997df41")),d=a.__importDefault(t("2b3dcdf")),r=t("node_modules/react-dom/index"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={isOpened:!1},e}return a.__extends(e,t),e.prototype.targetRef=function(t){this.target=t?r.findDOMNode(t):null},e.prototype.handleClick=function(){this.setState({isOpened:!0})},e.prototype.close=function(){this.setState({isOpened:!1})},e.prototype.getTarget=function(){return this.target||r.findDOMNode(this)},e.prototype.getParent=function(){var t;return null===(t=this.getTarget())||void 0===t?void 0:t.parentElement},e.prototype.render=function(){var t=this.props,e=t.children,a=t.popOverContainer,i=t.popOverClassName,r=t.popOverRender;return n.default.createElement(n.default.Fragment,null,e({isOpened:this.state.isOpened,onClick:this.handleClick,ref:this.targetRef}),n.default.createElement(o.default,{container:a||this.getParent,target:this.getTarget,placement:"auto",show:this.state.isOpened},n.default.createElement(d.default,{overlay:!0,className:i,style:{minWidth:this.target?Math.max(this.target.offsetWidth,100):"auto"},onHide:this.close},r({onClose:this.close}))))},a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],e.prototype,"targetRef",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"handleClick",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"close",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"getTarget",null),a.__decorate([i.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"getParent",null),e}(n.default.Component);e.PopOverContainer=s,e.default=s});
|
|||
|
;/*!src/components/condition-builder/Field.tsx*/
|
|||
|
amis.define("e210798",function(e,t){"use strict";function n(e){var t=e.options,n=e.onChange,a=e.value,r=e.classnames;return l.default.createElement(o.default,{popOverRender:function(e){var o=e.onClose;return l.default.createElement(i.default,{onClick:o,showRadio:!1,options:t,value:a,option2value:c,onChange:n})}},function(e){var n,o=e.onClick,i=e.ref,c=e.isOpened;return l.default.createElement("div",{className:r("CBGroup-field")},l.default.createElement(u.default,{className:r("CBGroup-fieldInput",c?"is-active":""),ref:i,allowInput:!1,result:a?null===(n=f.findTree(t,function(e){return e.name===a}))||void 0===n?void 0:n.label:"",onResultChange:f.noop,onResultClick:o,placeholder:"请选择字段"},l.default.createElement("span",{className:r("CBGroup-fieldCaret")},l.default.createElement(d.Icon,{icon:"caret",className:"icon"}))))})}Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionField=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),o=a.__importDefault(e("f312a54")),i=a.__importDefault(e("aff578b")),u=a.__importDefault(e("d14c6a1")),r=e("256b65d"),d=e("b7bbd16"),f=e("9a80175"),c=function(e){return e.name};t.ConditionField=n,t.default=r.themeable(n)});
|
|||
|
;/*!src/components/condition-builder/Value.tsx*/
|
|||
|
amis.define("b96af67",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Value=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),u=e("256b65d"),o=a.__importDefault(e("fe0e0e4")),n=a.__importDefault(e("10d195e")),m=a.__importDefault(e("dd24912")),d=a.__importDefault(e("d57879c")),r=a.__importDefault(e("aa2413a")),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.classnames,a=e.field,u=e.value,i=e.onChange,f=e.op,p=void 0;return"text"===a.type?p=l.default.createElement(o.default,{value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i,placeholder:a.placeholder}):"number"===a.type?p=l.default.createElement(n.default,{placeholder:a.placeholder||"请输入数字",min:a.minimum,max:a.maximum,value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i}):"date"===a.type?p=l.default.createElement(m.default,{placeholder:a.placeholder||"请选择日期",format:a.format||"YYYY-MM-DD",inputFormat:a.inputFormat||"YYYY-MM-DD",value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i,timeFormat:""}):"time"===a.type?p=l.default.createElement(m.default,{viewMode:"time",placeholder:a.placeholder||"请选择时间",format:a.format||"HH:mm",inputFormat:a.inputFormat||"HH:mm",value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i,dateFormat:"",timeFormat:a.format||"HH:mm"}):"datetime"===a.type?p=l.default.createElement(m.default,{placeholder:a.placeholder||"请选择日期时间",format:a.format||"",inputFormat:a.inputFormat||"YYYY-MM-DD HH:mm",value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i,timeFormat:a.timeFormat||"HH:mm"}):"select"===a.type?p=l.default.createElement(d.default,{simpleValue:!0,options:a.options,value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i,multiple:"select_any_in"===f||"select_not_any_in"===f}):"boolean"===a.type&&(p=l.default.createElement(r.default,{value:null!==u&&void 0!==u?u:a.defaultValue,onChange:i})),l.default.createElement("div",{className:t("CBValue")},p)},t}(l.default.Component);t.Value=i,t.default=u.themeable(i)});
|
|||
|
;/*!src/components/condition-builder/InputSwitch.tsx*/
|
|||
|
amis.define("6c142fb",function(e,t){"use strict";function n(e){var t=e.options,n=e.value,a=e.onChange,r=e.classnames;return l.default.createElement(i.default,{popOverRender:function(e){var i=e.onClose;return l.default.createElement(u.default,{onClick:i,option2value:c,onChange:a,options:t,value:n,showRadio:!1})}},function(e){var t=e.onClick,n=e.isOpened,a=e.ref;return l.default.createElement("div",{className:r("CBInputSwitch",n?"is-active":"")},l.default.createElement("a",{onClick:t,ref:a},l.default.createElement(o.Icon,{icon:"ellipsis-v"})))})}Object.defineProperty(t,"__esModule",{value:!0}),t.InputSwitch=void 0;var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),i=a.__importDefault(e("f312a54")),o=e("b7bbd16"),u=a.__importDefault(e("aff578b")),r=e("256b65d"),c=function(e){return e.value};t.InputSwitch=n,t.default=r.themeable(n)});
|
|||
|
;/*!src/components/condition-builder/Func.tsx*/
|
|||
|
amis.define("82ce996",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionFunc=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=e("256b65d"),r=a.__importDefault(e("f312a54")),u=a.__importDefault(e("aff578b")),o=e("9a80175"),s=a.__importDefault(e("d14c6a1")),i=e("b7bbd16"),d=a.__importDefault(e("8a8e30a")),c=function(e){return e.type},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.handleFuncChange=function(e){var t=a.__assign({},this.props.value);t.func=e,this.props.onChange(t)},t.prototype.handleArgChange=function(e,t){var n=a.__assign({},this.props.value);n.args=Array.isArray(n.args)?n.args.concat():[],n.args.splice(t,1,e),this.props.onChange(n)},t.prototype.renderFunc=function(e){{var t=this,a=this.props,l=a.classnames,r=a.fields,u=a.value,o=a.funcs,s=a.defaultType;a.allowedTypes}return n.default.createElement("div",{className:l("CBFunc-args")},n.default.createElement("span",null,"("),Array.isArray(e.args)&&e.args.length?n.default.createElement("div",null,e.args.map(function(e,a){return n.default.createElement(d.default,{key:a,index:a,fields:r,value:null===u||void 0===u?void 0:u.args[a],valueField:{type:e.type},onChange:t.handleArgChange,funcs:o,defaultType:s})})):null,n.default.createElement("span",null,")"))},t.prototype.render=function(){var e=this,t=this.props,a=t.value,l=t.classnames,d=t.funcs,p=a?o.findTree(d,function(e){return e.type===a.func}):null;return n.default.createElement("div",{className:l("CBFunc")},n.default.createElement(r.default,{popOverRender:function(t){var a,l=t.onClose;return n.default.createElement(u.default,{onClick:l,showRadio:!1,options:d,value:null===(a=p)||void 0===a?void 0:a.type,option2value:c,onChange:e.handleFuncChange})}},function(e){var t=e.onClick,a=e.ref,r=e.isOpened;return n.default.createElement("div",{className:l("CBFunc-select")},n.default.createElement(s.default,{className:l("CBGroup-fieldInput",r?"is-active":""),ref:a,allowInput:!1,result:null===p||void 0===p?void 0:p.label,onResultChange:o.noop,onResultClick:t,placeholder:"请选择字段"},n.default.createElement("span",{className:l("CBGroup-fieldCaret")},n.default.createElement(i.Icon,{icon:"caret",className:"icon"}))))}),p?this.renderFunc(p):n.default.createElement("span",{className:l("CBFunc-error")},"方法未定义"))},a.__decorate([o.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[String]),a.__metadata("design:returntype",void 0)],t.prototype,"handleFuncChange",null),a.__decorate([o.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object,Number]),a.__metadata("design:returntype",void 0)],t.prototype,"handleArgChange",null),t}(n.default.Component);t.ConditionFunc=p,t.default=l.themeable(p)});
|
|||
|
;/*!src/components/condition-builder/Expression.tsx*/
|
|||
|
amis.define("8a8e30a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Expression=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),l=n.__importDefault(e("e210798")),d=e("9a80175"),i=n.__importDefault(e("b96af67")),u=n.__importDefault(e("6c142fb")),o=n.__importDefault(e("82ce996")),p=e("256b65d"),r={value:"值",field:"字段",func:"函数",raw:"公式"},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.handleInputTypeChange=function(e){var t,n=this.props.value,a=this.props.onChange;"value"===e?n="":"func"===e?n={type:"func",func:null===(t=d.findTree(this.props.funcs,function(e){return e.type}))||void 0===t?void 0:t.type,args:[]}:"field"===e?n={type:"field",field:""}:"raw"===e&&(n={type:"raw",value:""}),a(n,this.props.index)},t.prototype.handleValueChange=function(e){this.props.onChange(e,this.props.index)},t.prototype.handleFieldChange=function(e){var t=this.props.value,n=this.props.onChange;t={type:"field",field:e},n(t,this.props.index)},t.prototype.handleFuncChange=function(e){var t=this.props.value,a=this.props.onChange;t=n.__assign(n.__assign({},e),{type:"func"}),a(t,this.props.index)},t.prototype.handleRawChange=function(){},t.prototype.render=function(){var e,t,n,p,s=this.props,f=s.value,_=s.valueField,h=s.defaultType,c=s.allowedTypes,y=s.funcs,g=s.fields,v=s.op,m=("field"===(null===(e=f)||void 0===e?void 0:e.type)?"field":"func"===(null===(t=f)||void 0===t?void 0:t.type)?"func":"raw"===(null===(n=f)||void 0===n?void 0:n.type)?"raw":void 0!==f?"value":void 0)||h||(null===c||void 0===c?void 0:c[0])||"value",C=c||["value","field","func"];return Array.isArray(y)&&y.length||!~C.indexOf("func")||C.splice(C.indexOf("func"),1),a.default.createElement(a.default.Fragment,null,"value"===m?a.default.createElement(i.default,{field:_,value:f,onChange:this.handleValueChange,op:v}):null,"field"===m?a.default.createElement(l.default,{value:null===(p=f)||void 0===p?void 0:p.field,onChange:this.handleFieldChange,options:_?d.filterTree(g,function(e){return e.children||e.type===_.type}):g}):null,"func"===m?a.default.createElement(o.default,{value:f,onChange:this.handleFuncChange,funcs:y,fields:g,defaultType:h,allowedTypes:c}):null,C.length>1?a.default.createElement(u.default,{value:m,onChange:this.handleInputTypeChange,options:C.map(function(e){return{label:r[e],value:e}})}):null)},n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",void 0)],t.prototype,"handleInputTypeChange",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleValueChange",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",void 0)],t.prototype,"handleFieldChange",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleFuncChange",null),n.__decorate([d.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"handleRawChange",null),t}(a.default.Component);t.Expression=s,t.default=p.themeable(s)});
|
|||
|
;/*!src/components/condition-builder/config.ts*/
|
|||
|
amis.define("0fe0f76",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationMap=void 0,t.OperationMap={equal:"等于",not_equal:"不等于",less:"小于",less_or_equal:"小于或等于",greater:"大于",greater_or_equal:"大于或等于",between:"属于范围",not_between:"不属于范围",is_empty:"为空",is_not_empty:"不为空",like:"模糊匹配",not_like:"不匹配",starts_with:"匹配开头",ends_with:"匹配结尾",select_equals:"等于",select_not_equals:"不等于",select_any_in:"包含",select_not_any_in:"不包含"};var _={valueTypes:["value"],types:{text:{placeholder:"请输入文本",defaultOp:"equal",operators:["equal","not_equal","is_empty","is_not_empty","like","not_like","starts_with","ends_with"]},number:{operators:["equal","not_equal","less","less_or_equal","greater","greater_or_equal","between","not_between","is_empty","is_not_empty"]},date:{operators:["equal","not_equal","less","less_or_equal","greater","greater_or_equal","between","not_between","is_empty","is_not_empty"]},time:{operators:["equal","not_equal","less","less_or_equal","greater","greater_or_equal","between","not_between","is_empty","is_not_empty"]},datetime:{operators:["equal","not_equal","less","less_or_equal","greater","greater_or_equal","between","not_between","is_empty","is_not_empty"]},select:{operators:["select_equals","select_not_equals","select_any_in","select_not_any_in"],valueTypes:["value"]},"boolean":{operators:["equal","not_equal"]}}};t.default=_});
|
|||
|
;/*!src/components/condition-builder/Item.tsx*/
|
|||
|
amis.define("7ca2b99",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionItem=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),i=e("f1fcd54"),o=e("256b65d"),l=e("b7bbd16"),r=e("9a80175"),d=n.__importDefault(e("8a8e30a")),u=e("0fe0f76"),s=n.__importDefault(e("f312a54")),p=n.__importDefault(e("aff578b")),f=n.__importDefault(e("d14c6a1")),v=function(e){return e.value},h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n.__extends(t,e),t.prototype.handleLeftFieldSelect=function(e){var t=n.__assign({},this.props.value),a=this.props.onChange;t.left=e,a(t,this.props.index)},t.prototype.handleLeftInputTypeChange=function(e){var t=n.__assign({},this.props.value),a=this.props.onChange;t.left="func"===e?{type:"func"}:"",a(t,this.props.index)},t.prototype.handleLeftChange=function(e){var t=n.__assign(n.__assign({},this.props.value),{left:e,op:void 0,right:void 0}),a=this.props.onChange;a(t,this.props.index)},t.prototype.handleOperatorChange=function(e){var t=n.__assign(n.__assign({},this.props.value),{op:e,right:void 0});this.props.onChange(t,this.props.index)},t.prototype.handleRightChange=function(e){var t=n.__assign(n.__assign({},this.props.value),{right:e}),a=this.props.onChange;a(t,this.props.index)},t.prototype.handleRightSubChange=function(e,t){var a,i=Array.isArray(null===(a=this.props.value)||void 0===a?void 0:a.right)?this.props.value.right.concat():[];i[e]=t;var o=n.__assign(n.__assign({},this.props.value),{right:i}),l=this.props.onChange;l(o,this.props.index)},t.prototype.renderLeft=function(){var e=this.props,t=e.value,n=e.fields,i=e.funcs,o=e.config;return a.default.createElement(d.default,{funcs:i,value:t.left,onChange:this.handleLeftChange,fields:n,defaultType:"field",allowedTypes:(o.valueTypes||["field","func"]).filter(function(e){return"field"===e||"func"===e})})},t.prototype.renderOperator=function(){var e,t,n,i,o=this,d=this.props,h=d.funcs,c=d.config,_=d.fields,g=d.value,y=d.classnames,m=null===g||void 0===g?void 0:g.left,C=[];if("func"===(null===(e=m)||void 0===e?void 0:e.type)){var b=r.findTree(h,function(e){return e.type===m.func});b&&(C=null===(t=c.types[b.returnType])||void 0===t?void 0:t.operators)}else if("field"===(null===(n=m)||void 0===n?void 0:n.type)){var T=r.findTree(_,function(e){return e.name===m.field});T&&(C=T.operators||(null===(i=c.types[T.type])||void 0===i?void 0:i.operators))}return Array.isArray(C)&&C.length?a.default.createElement(s.default,{popOverRender:function(e){var t=e.onClose;return a.default.createElement(p.default,{onClick:t,option2value:v,onChange:o.handleOperatorChange,options:C.map(function(e){return{label:u.OperationMap[e],value:e}}),value:g.op,showRadio:!1})}},function(e){var t=e.onClick,n=e.isOpened,i=e.ref;return a.default.createElement("div",{className:y("CBGroup-operator")},a.default.createElement(f.default,{className:y("CBGroup-operatorInput",n?"is-active":""),ref:i,allowInput:!1,result:u.OperationMap[null===g||void 0===g?void 0:g.op],onResultChange:r.noop,onResultClick:t,placeholder:"请选择操作"},a.default.createElement("span",{className:y("CBGroup-operatorCaret")},a.default.createElement(l.Icon,{icon:"caret",className:"icon"}))))}):null},t.prototype.renderRight=function(){var e,t,n=this.props,a=n.value,i=n.funcs,o=n.fields;if(!(null===a||void 0===a?void 0:a.op))return null;var l=null===a||void 0===a?void 0:a.left,d="";if("func"===(null===(e=l)||void 0===e?void 0:e.type)){var u=r.findTree(i,function(e){return e.type===l.func});u&&(d=u.returnType)}else if("field"===(null===(t=l)||void 0===t?void 0:t.type)){var s=r.findTree(o,function(e){return e.name===l.field});s&&(d=s.type)}return d?this.renderRightWidgets(d,a.op):null},t.prototype.renderRightWidgets=function(e,t){var i,o,l,u=this.props,s=u.funcs,p=u.value,f=u.fields,v=u.config,h=u.classnames,c=n.__assign(n.__assign({},v.types[e]),{type:e});if("field"===(null===(i=null===p||void 0===p?void 0:p.left)||void 0===i?void 0:i.type)){var _=r.findTree(f,function(e){return e.name===(null===p||void 0===p?void 0:p.left).
|
|||
|
;/*!src/components/condition-builder/GroupOrItem.tsx*/
|
|||
|
amis.define("0e2a303",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CBGroupOrItem=void 0;var a=e("node_modules/tslib/tslib"),n=e("256b65d"),o=a.__importDefault(e("node_modules/react/index")),l=e("b7bbd16"),d=e("9a80175"),r=a.__importDefault(e("beab8ef")),i=a.__importDefault(e("7ca2b99")),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.handleItemChange=function(e){this.props.onChange(e,this.props.index)},t.prototype.handleItemRemove=function(){var e,t;null===(t=(e=this.props).onRemove)||void 0===t?void 0:t.call(e,this.props.index)},t.prototype.render=function(){var e=this.props,t=e.classnames,a=e.value,n=e.config,d=e.fields,u=e.funcs,s=e.draggable,m=e.onDragStart;return o.default.createElement("div",{className:t("CBGroupOrItem"),"data-id":null===a||void 0===a?void 0:a.id},o.default.createElement("div",{className:t("CBGroupOrItem-body")},s?o.default.createElement("a",{draggable:!0,onDragStart:m,className:t("CBGroupOrItem-dragbar")},o.default.createElement(l.Icon,{icon:"drag-bar",className:"icon"})):null,(null===a||void 0===a?void 0:a.conjunction)?o.default.createElement(r.default,{onDragStart:m,config:n,fields:d,value:a,onChange:this.handleItemChange,funcs:u,removeable:!0,onRemove:this.handleItemRemove}):o.default.createElement(o.default.Fragment,null,o.default.createElement(i.default,{config:n,fields:d,value:a,onChange:this.handleItemChange,funcs:u}),o.default.createElement("a",{className:t("CBDelete"),onClick:this.handleItemRemove},o.default.createElement(l.Icon,{icon:"close",className:"icon"})))))},a.__decorate([d.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleItemChange",null),a.__decorate([d.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"handleItemRemove",null),t}(o.default.Component);t.CBGroupOrItem=u,t.default=n.themeable(u)});
|
|||
|
;/*!src/components/condition-builder/Group.tsx*/
|
|||
|
amis.define("beab8ef",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionGroup=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),o=e("256b65d"),i=n.__importDefault(e("a67acca")),d=n.__importDefault(e("0e2a303")),l=e("9a80175"),r=e("b7bbd16"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.getValue=function(){return n.__assign({id:l.guid(),conjunction:"and"},this.props.value)},t.prototype.handleNotClick=function(){var e=this.props.onChange,t=this.getValue();t.not=!t.not,e(t)},t.prototype.handleConjunctionClick=function(){var e=this.props.onChange,t=this.getValue();t.conjunction="and"===t.conjunction?"or":"and",e(t)},t.prototype.handleAdd=function(){var e=this.props.onChange,t=this.getValue();t.children=Array.isArray(t.children)?t.children.concat():[],t.children.push({id:l.guid()}),e(t)},t.prototype.handleAddGroup=function(){var e=this.props.onChange,t=this.getValue();t.children=Array.isArray(t.children)?t.children.concat():[],t.children.push({id:l.guid(),conjunction:"and",children:[{id:l.guid()}]}),e(t)},t.prototype.handleItemChange=function(e,t){var n=this.props.onChange,a=this.getValue();a.children=Array.isArray(a.children)?a.children.concat():[],a.children.splice(t,1,e),n(a)},t.prototype.handleItemRemove=function(e){var t=this.props.onChange,n=this.getValue();n.children=Array.isArray(n.children)?n.children.concat():[],n.children.splice(e,1),t(n)},t.prototype.render=function(){var e=this,t=this.props,n=t.classnames,o=t.value,l=t.fields,c=t.funcs,u=t.config,s=t.removeable,p=t.onRemove,m=t.onDragStart,h=t.showNot;return a.default.createElement("div",{className:n("CBGroup"),"data-group-id":null===o||void 0===o?void 0:o.id},a.default.createElement("div",{className:n("CBGroup-toolbar")},a.default.createElement("div",{className:n("CBGroup-toolbarLeft")},h?a.default.createElement(i.default,{onClick:this.handleNotClick,className:"m-r-xs",size:"xs",active:null===o||void 0===o?void 0:o.not,level:(null===o||void 0===o?void 0:o.not)?"info":"default"},"非"):null,a.default.createElement("div",{className:n("ButtonGroup")},a.default.createElement(i.default,{size:"xs",onClick:this.handleConjunctionClick,active:"or"!==(null===o||void 0===o?void 0:o.conjunction),level:"or"!==(null===o||void 0===o?void 0:o.conjunction)?"info":"default"},"并且"),a.default.createElement(i.default,{size:"xs",onClick:this.handleConjunctionClick,active:"or"===(null===o||void 0===o?void 0:o.conjunction),level:"or"===(null===o||void 0===o?void 0:o.conjunction)?"info":"default"},"或者"))),a.default.createElement("div",{className:n("CBGroup-toolbarRight")},a.default.createElement("div",{className:n("ButtonGroup")},a.default.createElement(i.default,{onClick:this.handleAdd,size:"xs"},a.default.createElement(r.Icon,{icon:"plus",className:"icon"}),"添加条件"),a.default.createElement(i.default,{onClick:this.handleAddGroup,size:"xs"},a.default.createElement(r.Icon,{icon:"plus-cicle",className:"icon"}),"添加条件组")),s?a.default.createElement("a",{className:n("CBDelete"),onClick:p},a.default.createElement(r.Icon,{icon:"close",className:"icon"})):null)),a.default.createElement("div",{className:n("CBGroup-body")},Array.isArray(null===o||void 0===o?void 0:o.children)&&o.children.length?o.children.map(function(t,n){return a.default.createElement(d.default,{draggable:o.children.length>1,onDragStart:m,config:u,key:t.id,fields:l,value:t,index:n,onChange:e.handleItemChange,funcs:c,onRemove:e.handleItemRemove})}):a.default.createElement("div",{className:n("CBGroup-placeholder")},"空")))},n.__decorate([l.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"handleNotClick",null),n.__decorate([l.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],t.prototype,"handleConjunctionClick",null),n.__decorate([l.autobind,n.__metadata("design:type",Function),n.__metadata("design:par
|
|||
|
;/*!src/utils/Animation.ts*/
|
|||
|
amis.define("1b51c22",function(t,i){"use strict";function n(t){return"undefined"!=typeof window&&window.navigator?!!navigator.userAgent.match(t):void 0}function e(t){var i="";if("string"==typeof t)i=t;else{var n=o(t,"transform");n&&"none"!==n&&(i=n+" "+i)}var e=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return e&&new e(i)}function o(t,i,n){var e=t&&t.style;if(e){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===i?n:n[i];i in e||-1!==i.indexOf("webkit")||(i="-webkit-"+i),e[i]=n+("string"==typeof n?"":"px")}}function a(t,i){return Math.round(t.top)===Math.round(i.top)&&Math.round(t.left)===Math.round(i.left)&&Math.round(t.height)===Math.round(i.height)&&Math.round(t.width)===Math.round(i.width)}function r(t,i,n){return Math.sqrt(Math.pow(i.top-t.top,2)+Math.pow(i.left-t.left,2))/Math.sqrt(Math.pow(i.top-n.top,2)+Math.pow(i.left-n.left,2))*l}function d(){var t=document.scrollingElement;return t?t:document.documentElement}function s(t,i,n,a,r){if(t.getBoundingClientRect||t===window){var s,f,l,m,c,h,p;if(t!==window&&t!==d()?(s=t.getBoundingClientRect(),f=s.top,l=s.left,m=s.bottom,c=s.right,h=s.height,p=s.width):(f=0,l=0,m=window.innerHeight,c=window.innerWidth,h=window.innerHeight,p=window.innerWidth),(i||n)&&t!==window&&(r=r||t.parentNode,!u))do if(r&&r.getBoundingClientRect&&("none"!==o(r,"transform")||n&&"static"!==o(r,"position"))){var w=r.getBoundingClientRect();f-=w.top+parseInt(o(r,"border-top-width")),l-=w.left+parseInt(o(r,"border-left-width")),m=f+s.height,c=l+s.width;break}while(r=r.parentNode);if(a&&t!==window){var g=e(r||t),v=g&&g.a,M=g&&g.d;g&&(f/=M,l/=v,p/=v,h/=M,m=f+h,c=l+p)}return{top:f,left:l,bottom:m,right:c,width:p,height:h}}}Object.defineProperty(i,"__esModule",{value:!0}),i.AnimationManager=void 0;var f=t("node_modules/tslib/tslib"),u=n(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),l=150,m="cubic-bezier(1, 0, 0, 1)",c=function(){function t(){this.animating=!1,this.states=[]}return t.prototype.capture=function(t){var i=this;this.states=[];var n=[].slice.call(t.children);n.forEach(function(t){if(!t.classList.contains("is-ghost")){var n=s(t);if(n.width){var o=f.__assign({},n),a={target:t,rect:n};if(t.thisAnimationDuration){var r=e(t);r&&(o.top-=r.f,o.left-=r.e)}t.fromRect=o,i.states.push(a)}}})},t.prototype.animateAll=function(t){var i=this;this.animating=!1;var n=0;this.states.forEach(function(t){var o=0,d=t.target,u=d.fromRect,m=f.__assign({},s(d)),c=d.prevFromRect,h=d.prevToRect,p=t.rect,w=e(d);w&&(m.top-=w.f,m.left-=w.e),d.toRect=m,d.thisAnimationDuration&&a(c,m)&&!a(u,m)&&(p.top-m.top)/(p.left-m.left)===(u.top-m.top)/(u.left-m.left)&&(o=r(p,c,h)),a(m,u)||(d.prevFromRect=u,d.prevToRect=m,o||(o=l),i.animate(d,p,m,o)),o&&(i.animating=!0,n=Math.max(n,o),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},o),d.thisAnimationDuration=o)}),clearTimeout(this.animationCallbackId),this.animating?this.animationCallbackId=setTimeout(function(){i.animating=!1,"function"==typeof t&&t()},n):"function"==typeof t&&t(),this.states=[]},t.prototype.animate=function(t,i,n,e){if(e){var a=!1;o(t,"transition",""),o(t,"transform","");var r=i.left-n.left,d=i.top-n.top;t.animatingX=!!r,t.animatingY=!!d,o(t,"transform","translate3d("+r+"px,"+d+"px,0)"),"inline"===o(t,"display")&&(a=!0,o(t,"display","inline-block")),t.offsetWidth,o(t,"transition","transform "+e+"ms"+(m?" "+m:"")),o(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){o(t,"transition",""),o(t,"transform",""),a&&o(t,"display",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},e)}},t}();i.AnimationManager=c,i.default=new c});
|
|||
|
;/*!src/components/condition-builder/index.tsx*/
|
|||
|
amis.define("b00c0ce",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryBuilder=void 0;var a=t("node_modules/tslib/tslib"),n=a.__importDefault(t("node_modules/react/index")),i=t("256b65d"),s=t("5ab4e9d"),r=t("node_modules/uncontrollable/cjs/index"),d=a.__importDefault(t("beab8ef")),o=a.__importDefault(t("0fe0f76")),l=t("9a80175"),h=a.__importDefault(t("1b51c22")),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.config=o.default,e.lastMoveAt=0,e}a.__extends(e,t),e.prototype.handleDragStart=function(t){var e=t.currentTarget,a=e.closest("[data-id]");this.dragTarget=a,this.host=a.closest("[data-group-id]");var n=a.cloneNode(!0);n.classList.add("is-ghost"),this.ghost=n,t.dataTransfer.setDragImage(a.firstChild,0,0),e.addEventListener("dragend",this.handleDragEnd),document.body.addEventListener("dragover",this.handleDragOver),document.body.addEventListener("drop",this.handleDragDrop),this.lastX=t.clientX,this.lastY=t.clientY,setTimeout(function(){a.classList.add("is-dragging")},5)},e.prototype.handleDragOver=function(t){t.preventDefault();var e=t.target.closest("[data-id]"),a=t.clientX-this.lastX,n=t.clientY-this.lastY,i=Math.max(Math.abs(a),Math.abs(n)),s=Date.now();if(5>i){if(0===this.lastMoveAt);else if(s-this.lastMoveAt>500){var r=t.target.closest("[data-group-id]");if(r)return this.host=r,this.lastMoveAt=s,this.lastX=0,this.lastY=0,void this.handleDragOver(t)}}else if(this.lastMoveAt=s,this.lastX=t.clientX,this.lastY=t.clientY,e&&!e.classList.contains("is-ghost")&&e.closest("[data-group-id]")===this.host){var d=e.parentElement,o=[].slice.apply(d.children),l=o.indexOf(e);this.ghost.parentElement!==d&&d.appendChild(this.ghost);var g=e.getBoundingClientRect(),u=n>0&&t.clientY>g.top+g.height/2,c=u?l:l-1,p=o.indexOf(this.ghost);c!==p&&(h.default.capture(d),c===o.length-1?d.appendChild(this.ghost):d.insertBefore(this.ghost,o[c+1]),h.default.animateAll())}},e.prototype.handleDragDrop=function(){var t=this.props.onChange,e=this.dragTarget.getAttribute("data-id"),a=this.host.getAttribute("data-group-id"),n=[].slice.call(this.ghost.parentElement.children),i=n.indexOf(this.dragTarget);~i&&n.splice(i,1);var s=n.indexOf(this.ghost),r=this.props.value,d=l.findTreeIndex([r],function(t){return t.id===e});if(d){var o=l.getTree([r],d.concat());r=l.spliceTree([r],d,1)[0];var h=l.findTreeIndex([r],function(t){return t.id===a});h&&(r=l.spliceTree([r],h.concat(s),0,o)[0],t(r))}},e.prototype.handleDragEnd=function(t){var e,a=t.target;a.removeEventListener("dragend",this.handleDragEnd),document.body.removeEventListener("dragover",this.handleDragOver),document.body.removeEventListener("drop",this.handleDragDrop),this.dragTarget.classList.remove("is-dragging"),delete this.dragTarget,null===(e=this.ghost.parentElement)||void 0===e?void 0:e.removeChild(this.ghost),delete this.ghost},e.prototype.render=function(){var t=this.props,e=t.classnames,a=t.fields,i=t.funcs,s=t.onChange,r=t.value,o=t.showNot;return n.default.createElement(d.default,{config:this.config,funcs:i||this.config.funcs,fields:a||this.config.fields,value:r,onChange:s,classnames:e,removeable:!1,onDragStart:this.handleDragStart,showNot:o})};var i,s,r;return a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(i="undefined"!=typeof n.default&&n.default.DragEvent)?i:Object]),a.__metadata("design:returntype",void 0)],e.prototype,"handleDragStart",null),a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(s="undefined"!=typeof DragEvent&&DragEvent)?s:Object]),a.__metadata("design:returntype",void 0)],e.prototype,"handleDragOver",null),a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"handleDragDrop",null),a.__decorate([l.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(r="undefined"!=typeof Event&&Event)?r:Object]),a.__metadata("design:returntype",void
|
|||
|
;/*!src/renderers/Form/ConditionBuilder.tsx*/
|
|||
|
amis.define("044f1d7",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionBuilderRenderer=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),i=e("567b83c"),s=n.__importDefault(e("b00c0ce")),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,i=e.classnames,o=n.__rest(e,["className","classnames"]);return r.default.createElement("div",{className:i("ConditionBuilderControl",t)},r.default.createElement(s.default,n.__assign({},o)))},t}(r.default.PureComponent);t.default=o;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([i.FormItem({type:"condition-builder"})],t)}(o);t.ConditionBuilderRenderer=u});
|
|||
|
;/*!src/renderers/Container.tsx*/
|
|||
|
amis.define("2390f9f",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContainerRenderer=void 0;var t=e("node_modules/tslib/tslib"),r=t.__importDefault(e("node_modules/react/index")),s=e("0f9ebdf"),a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.renderBody=function(){var e=this.props,n=e.children,t=e.body,s=e.render,a=e.classnames,o=e.bodyClassName;return r.default.createElement("div",{className:a("Container-body",o)},n?"function"==typeof n?n(this.props):n:t?s("body",t):null)},n.prototype.render=function(){var e=this.props,n=e.className,t=(e.size,e.classnames);return r.default.createElement("div",{className:t("Container",n)},this.renderBody())},n.propsList=["body","className"],n.defaultProps={className:""},n}(r.default.Component);n.default=a;var o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n=t.__decorate([s.Renderer({test:/(^|\/)container$/,name:"container"})],n)}(a);n.ContainerRenderer=o});
|
|||
|
;/*!src/renderers/Form/Container.tsx*/
|
|||
|
amis.define("647fc2f",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerControlRenderer=void 0;var r=e("node_modules/tslib/tslib"),o=r.__importDefault(e("node_modules/react/index")),n=r.__importDefault(e("node_modules/classnames/index")),a=r.__importDefault(e("2390f9f")),d=r.__importDefault(e("567b83c")),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.renderBody=function(){var t=this.props,r=t.renderFormItems,a=t.body,d=t.bodyClassName,l=t.controls,s=t.tabs,i=t.fieldSet,u=t.mode,f=t.formMode,m=t.horizontal,c=t.$path,p=t.classPrefix,_=t.store,b=t.render;if(!a&&(l||s||i)){var y={store:_,data:_.data,render:b};return u&&(y.mode=u),m&&(y.horizontal=m),o.default.createElement("div",{className:n.default(p+"Form--"+(y.mode||f||"normal"),d)},r({controls:l,tabs:s,fieldSet:i},c.replace(/^.*form\//,""),y))}return e.prototype.renderBody.call(this)},t.propsList=["onChange"],t=r.__decorate([d.default({type:"container",strictMode:!1,sizeMutable:!1})],t)}(a.default);t.ContainerControlRenderer=l});
|
|||
|
;/*!src/renderers/Form/SubForm.tsx*/
|
|||
|
amis.define("8a88f1c",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubFormControlRenderer=void 0;var a,n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),l=e("567b83c"),s=n.__importDefault(e("node_modules/classnames/index")),r=n.__importDefault(e("node_modules/lodash/omit")),i=n.__importDefault(e("node_modules/lodash/pick")),d=e("9a80175"),u=e("b7bbd16"),p=function(e){return e?(a=a||document.createElement("div"),a.innerHTML=e,a.innerText):e},m=function(e){function t(t){var a=e.call(this,t)||this;return a.state={openedIndex:-1,optionIndex:-1},a.addItem=a.addItem.bind(a),a.removeItem=a.removeItem.bind(a),a.open=a.open.bind(a),a.close=a.close.bind(a),a.handleDialogConfirm=a.handleDialogConfirm.bind(a),a}return n.__extends(t,e),t.prototype.addItem=function(){var e=this.props.value;e=Array.isArray(e)?e.concat():[],e.push({}),this.props.onChange(e)},t.prototype.removeItem=function(e,t){t.stopPropagation(),t.preventDefault();var a=this.props.value;Array.isArray(a)&&(a=a.concat(),a.splice(e,1),this.props.onChange(a))},t.prototype.open=function(e){void 0===e&&(e=0),this.setState({openedIndex:e})},t.prototype.close=function(){this.setState({openedIndex:-1})},t.prototype.handleDialogConfirm=function(e){var t=this.props,a=t.multiple,o=t.onChange,l=t.value;if(a){var s=Array.isArray(l)?l.concat():[];s[this.state.openedIndex]=n.__assign(n.__assign({},s[this.state.openedIndex]),e[0]),o(s)}else o(n.__assign(n.__assign({},l),e[0]));this.close()},t.prototype.buildDialogSchema=function(){var e=this.props.form,t=["title","actions","name","size","closeOnEsc","showCloseButton","bodyClassName","type"];return n.__assign(n.__assign({},i.default(e,t)),{type:"dialog",body:n.__assign({type:"form"},r.default(e,t))})},t.prototype.renderMultipe=function(){var e=this,t=this.props,a=t.classPrefix,n=t.addButtonClassName,l=t.editButtonClassName,r=t.disabled,i=t.labelField,m=t.value,c=t.btnLabel,b=t.render,f=t.data,h=t.translate;return[o.default.createElement("div",{className:a+"SubForm-values",key:"values"},Array.isArray(m)?m.map(function(t,n){return o.default.createElement("div",{className:s.default(a+"SubForm-value",{"is-disabled":r},l),key:n},o.default.createElement("span",{"data-tooltip":h("删除"),"data-position":"bottom",className:a+"Select-valueIcon",onClick:e.removeItem.bind(e,n)},"×"),o.default.createElement("span",{onClick:e.open.bind(e,n),className:a+"SubForm-valueLabel","data-tooltip":h("编辑详情"),"data-position":"bottom"},t&&i&&t[i]&&p(t[i])||b("label",{type:"tpl",tpl:h(c)},{data:d.createObject(f,t)})))}):null),o.default.createElement("button",{key:"add",type:"button",onClick:this.addItem,className:s.default(a+"Button "+a+"SubForm-addBtn",n),disabled:r,"data-tooltip":h("新增一条数据")},o.default.createElement(u.Icon,{icon:"plus",className:"icon"}),o.default.createElement("span",null,h("新增")))]},t.prototype.renderSingle=function(){var e=this.props,t=e.classPrefix,a=e.btnClassName,n=e.disabled,l=e.value,r=e.labelField,i=e.btnLabel,u=e.render,m=e.data,c=e.translate;return o.default.createElement("div",{className:t+"SubForm-values",key:"values"},o.default.createElement("div",{className:s.default(t+"SubForm-value",{"is-disabled":n},a),onClick:this.open.bind(this,0),"data-tooltip":c("编辑详情"),"data-position":"bottom"},o.default.createElement("span",{className:t+"SubForm-valueLabel"},l&&r&&l[r]&&p(l[r])||u("label",{type:"tpl",tpl:c(i)},{data:d.createObject(m,l)}))))},t.prototype.render=function(){var e=this.props,t=e.multiple,a=e.classPrefix,n=e.className,l=e.render,r=e.value,i=e.data,u=this.state.openedIndex;return o.default.createElement("div",{className:s.default(a+"SubFormControl",n)},t?this.renderMultipe():this.renderSingle(),l("dalog/"+u,this.buildDialogSchema(),{show:-1!==u,onClose:this.close,onConfirm:this.handleDialogConfirm,data:d.createObject(i,(t?Array.isArray(r)&&r[u]:r)||{})}))},t.defaultProps={minLength:0,maxLength:0,multiple:!1,btnClassName:"",addButtonClassName:"",editButtonClassName:"",labelField:"label",btnLabel:"设置"},t}(o.default.PureCompo
|
|||
|
;/*!src/renderers/Form/RichText.tsx*/
|
|||
|
amis.define("a57a440",function(e,t){"use strict";function o(t){return void 0===t&&(t="froala"),function(){return new Promise(function(o){return"tinymce"===t?e(["82fac39"],function(e){return o(e.default)}):e(["1e5b785"],function(e){return o(e.default)})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.RichTextControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),i=e("567b83c"),r=n.__importDefault(e("node_modules/classnames/index")),l=n.__importDefault(e("4783ce8")),s=e("9a80175"),u=function(e){function t(t){var o=e.call(this,t)||this;o.state={focused:!1},o.config=null;var a=t.vendor||(t.env.richTextToken?"froala":"tinymce");if(o.handleFocus=o.handleFocus.bind(o),o.handleBlur=o.handleBlur.bind(o),"froala"===a)o.config=n.__assign(n.__assign({imageAllowedTypes:["jpeg","jpg","png","gif"],imageDefaultAlign:"left",imageEditButtons:t.imageEditable?["imageReplace","imageAlign","imageRemove","|","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"]:[],key:t.env.richTextToken},t.options),{editorClass:t.editorClass,placeholderText:t.placeholder,imageUploadURL:t.reciever,imageUploadParams:{from:"rich-text"},videoUploadURL:t.videoReciever,videoUploadParams:{from:"rich-text"},events:n.__assign(n.__assign({},t.options&&t.options.events),{"froalaEditor.focus":o.handleFocus,"froalaEditor.blur":o.handleBlur}),language:o.props.locale&&"zh-cn"!==o.props.locale?"":"zh_cn"}),t.buttons&&(o.config.toolbarButtonsSM=t.buttons,o.config.toolbarButtonsMD=t.buttons,o.config.toolbarButtonsXS=t.buttons,o.config.toolbarButtons=t.buttons);else{var i=t.env.fetcher;o.config=n.__assign(n.__assign({},t.options),{images_upload_url:t.reciever,images_upload_handler:function(e,a,r){return n.__awaiter(o,void 0,void 0,function(){var o,l,s,u,d,c;return n.__generator(this,function(n){switch(n.label){case 0:o=new FormData,o.append("file",e.blob(),e.filename()),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,i(t.reciever,o,{method:"post"})];case 2:return l=n.sent(),l.ok&&a((null===(u=l.data)||void 0===u?void 0:u.link)||(null===(d=l.data)||void 0===d?void 0:d.url)||(null===(c=l.data)||void 0===c?void 0:c.value)||l.link),[3,4];case 3:return s=n.sent(),r(s),[3,4];case 4:return[2]}})})}})}return o}return n.__extends(t,e),t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classPrefix,i=e.value,u=e.onChange,d=e.disabled,c=(e.size,e.vendor),f=e.env,m=e.locale,g=e.translate,p=c||(f.richTextToken?"froala":"tinymce");return a.default.createElement("div",{className:r.default(n+"RichTextControl",t,{"is-focused":this.state.focused,"is-disabled":d})},a.default.createElement(l.default,{getComponent:o(p),model:i,onModelChange:d?s.noop:u,onFocus:this.handleFocus,onBlur:this.handleBlur,config:this.config,disabled:d,locale:m,translate:g}))},t.defaultProps={imageEditable:!0,reciever:"/api/upload/image",videoReciever:"/api/upload/video",placeholder:"请输入",options:{toolbarButtonsSM:["paragraphFormat","quote","color","|","bold","italic","underline","strikeThrough","|","formatOL","formatUL","align","|","insertLink","insertImage","insertEmotion","insertTable","|","undo","redo","html"],toolbarButtonsMD:["paragraphFormat","quote","color","|","bold","italic","underline","strikeThrough","|","formatOL","formatUL","align","|","insertLink","insertImage","insertEmotion","insertTable","|","undo","redo","html"],toolbarButtons:["paragraphFormat","quote","color","|","bold","italic","underline","strikeThrough","|","formatOL","formatUL","align","|","insertLink","insertImage","insertEmotion","insertTable","|","undo","redo","html"]}},t}(a.default.Component);t.default=u;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([i.FormItem({type:"rich-text",sizeMutable:!1})],t)}(u);t.RichTextControlRenderer=d});
|
|||
|
;/*!src/renderers/Form/Editor.tsx*/
|
|||
|
amis.define("27eb5b8",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorControlRenderer=t.EditorControls=t.availableLanguages=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),s=e("567b83c"),a=n.__importDefault(e("4783ce8")),i=n.__importDefault(e("node_modules/lodash/debounce")),r=n.__importDefault(e("997c87d")),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.toDispose=[],n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleEditorMounted=n.handleEditorMounted.bind(n),n.updateContainerSize=i.default(n.updateContainerSize.bind(n),250,{trailing:!0,leading:!1}),n.toDispose.push(n.updateContainerSize.cancel),n}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){this.toDispose.forEach(function(e){return e()})},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t.prototype.handleEditorMounted=function(e,t){this.editor=e,this.toDispose.push(e.onDidFocusEditorWidget(this.updateContainerSize).dispose),this.toDispose.push(e.onDidChangeModelContent(this.updateContainerSize).dispose),this.props.editorDidMount&&this.props.editorDidMount(e,t)},t.prototype.updateContainerSize=function(){var e=this.editor,t=e._domElement.parentNode,n=e.getConfiguration(),o=n.lineHeight,s=e.getModel().getLineCount(),a=o*s,i=n.layoutInfo.horizontalScrollbarHeight,r=a+i;t.style.cssText="height:"+r+"px"},t.prototype.render=function(){var e,t=this.props,s=t.className,i=t.classPrefix,l=t.classnames,u=t.value,d=t.onChange,p=t.disabled,c=t.options,h=t.language,f=t.editorTheme,g=t.size,_=u;return _&&"string"!=typeof _&&(_=JSON.stringify(_,null,4)),o.default.createElement("div",{className:l("EditorControl",(e={"is-focused":this.state.focused},e["EditorControl--"+g]=g,e),s)},o.default.createElement(a.default,{classPrefix:i,component:r.default,value:_,onChange:d,disabled:p,onFocus:this.handleFocus,onBlur:this.handleBlur,language:h,editorTheme:f,editorDidMount:this.handleEditorMounted,options:n.__assign(n.__assign({},c),{readOnly:p})}))},t.defaultProps={language:"javascript",editorTheme:"vs",options:{automaticLayout:!0,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,minimap:{enabled:!1}}},t}(o.default.Component);t.default=l,t.availableLanguages=["bat","c","coffeescript","cpp","csharp","css","dockerfile","fsharp","go","handlebars","html","ini","java","javascript","json","less","lua","markdown","msdax","objective-c","php","plaintext","postiats","powershell","pug","python","r","razor","ruby","sb","scss","sol","sql","swift","typescript","vb","xml","yaml"],t.EditorControls=t.availableLanguages.map(function(e){var t=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(o,t),o.lang=e,o.displayName=""+e[0].toUpperCase()+e.substring(1)+"EditorControlRenderer",o.defaultProps=n.__assign(n.__assign({},l.defaultProps),{language:e}),o=n.__decorate([s.FormItem({type:e+"-editor",sizeMutable:!1})],o)}(l);return t});var u=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},l.defaultProps),{language:"javascript"}),t=n.__decorate([s.FormItem({type:"js-editor",sizeMutable:!1})],t)}(l),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},l.defaultProps),{language:"typescript"}),t=n.__decorate([s.FormItem({type:"ts-editor",sizeMutable:!1})],t)}(l),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},l.defaultProps),{language:"javascript"}),t=n.__decorate([s.FormItem({type:"editor",sizeMutable:!1})],t)}(l));t.EditorControlRenderer=u});
|
|||
|
;/*!src/renderers/Form/DiffEditor.tsx*/
|
|||
|
amis.define("138c832",function(e,t){"use strict";function i(){return new Promise(function(t){return e(["997c87d"],function(e){return t(e.default)})})}function o(e,t){if(e&&"string"!=typeof e&&(e=JSON.stringify(e,null,4)),t&&"json"===t)try{e=JSON.stringify("string"==typeof e?JSON.parse(e):e,null,4)}catch(i){}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorRenderer=t.DiffEditorControlRenderer=t.DiffEditor=void 0;var n=e("node_modules/tslib/tslib"),d=n.__importDefault(e("node_modules/react/index")),r=e("0f9ebdf"),a=e("567b83c"),s=e("6a2dbb7"),l=n.__importDefault(e("4783ce8")),u=n.__importDefault(e("node_modules/lodash/debounce")),f=e("f2e345e"),h=function(e){function t(t){var i=e.call(this,t)||this;return i.state={focused:!1},i.toDispose=[],i.handleFocus=i.handleFocus.bind(i),i.handleBlur=i.handleBlur.bind(i),i.editorFactory=i.editorFactory.bind(i),i.handleEditorMounted=i.handleEditorMounted.bind(i),i.handleModifiedEditorChange=i.handleModifiedEditorChange.bind(i),i.updateContainerSize=u.default(i.updateContainerSize.bind(i),250,{trailing:!0,leading:!1}),i.toDispose.push(i.updateContainerSize.cancel),i}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){this.toDispose.forEach(function(e){return e()})},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t.prototype.componentDidUpdate=function(e){var t=this.props,i=t.data,n=t.value,d=t.diffValue,r=t.language;this.originalEditor&&d&&(d!==e.diffValue||i!==e.data)&&this.originalEditor.getModel().setValue(f.isPureVariable(d)?o(s.filter(d||"",i,"| raw"),r):o(d,r)),this.modifiedEditor&&n&&n!==e.value&&!this.state.focused&&this.modifiedEditor.getModel().setValue(o(n,r))},t.prototype.editorFactory=function(e,t,i){return t.editor.createDiffEditor(e,i)},t.prototype.handleEditorMounted=function(e,t){var i=this.props,n=i.value,d=i.data,r=i.language,a=i.diffValue;this.monaco=t,this.editor=e,this.modifiedEditor=e.getModifiedEditor(),this.originalEditor=e.getOriginalEditor(),this.toDispose.push(this.modifiedEditor.onDidFocusEditorWidget(this.handleFocus).dispose),this.toDispose.push(this.modifiedEditor.onDidBlurEditorWidget(this.handleBlur).dispose),this.toDispose.push(this.modifiedEditor.onDidChangeModelContent(this.handleModifiedEditorChange).dispose),this.editor.setModel({original:this.monaco.editor.createModel(f.isPureVariable(a)?o(s.filter(a||"",d,"| raw"),r):o(a,r),r),modified:this.monaco.editor.createModel(o(n,r),r)}),this.updateContainerSize()},t.prototype.handleModifiedEditorChange=function(){var e=this.props.onChange;e&&e(this.modifiedEditor.getModel().getValue()),this.updateContainerSize()},t.prototype.updateContainerSize=function(){var e=this.modifiedEditor,t=e._domElement.parentNode.parentNode.parentNode,i=e.getConfiguration(),o=i.lineHeight,n=e.getModel().getLineCount(),d=o*n,r=i.layoutInfo.horizontalScrollbarHeight,a=d+r;t.style.cssText="height:"+a+"px"},t.prototype.render=function(){var e=this.props,t=e.className,o=e.value,r=e.onChange,a=e.disabled,s=e.size,u=e.options,f=e.language,h=e.theme,p=e.classnames;return d.default.createElement("div",{className:p("EditorControl",s?"EditorControl--"+s:"",t,{"is-focused":this.state.focused})},d.default.createElement(l.default,{getComponent:i,value:o,onChange:r,disabled:a,language:f,theme:h,editorDidMount:this.handleEditorMounted,editorFactory:this.editorFactory,options:n.__assign(n.__assign({},u),{readOnly:a})}))},t.defaultProps={language:"javascript",theme:"vs",options:{automaticLayout:!1,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,minimap:{enabled:!1}},diffValue:""},t}(d.default.Component);t.DiffEditor=h;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign({},h.defaultProps),t=n.__decorate([a.FormItem({type:"diff-editor",sizeMutable:!1})],t)}(h);t.DiffEditorControlRenderer=p;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.defaultProps=n.__assign(n.__assign({},h.defaultProps),{di
|
|||
|
;/*!src/renderers/Grid.tsx*/
|
|||
|
amis.define("5e68c3c",function(e,r){"use strict";function n(e){return"string"==typeof e&&e?e.replace(/\bcol-(xs|sm|md|lg)-(\d+)\b/g,function(e,r,n){return"Grid-col--"+r+n}):e}function t(e){var n=[],t=r.ColProps;return t.forEach(function(r){return e&&e[r]&&n.push("Grid-col--"+r+e[r])}),n.length||n.push("Grid-col--sm"),n.join(" ")}Object.defineProperty(r,"__esModule",{value:!0}),r.GridRenderer=r.ColProps=void 0;var s=e("node_modules/tslib/tslib"),o=s.__importDefault(e("node_modules/react/index")),i=e("0f9ebdf"),u=s.__importDefault(e("node_modules/lodash/pick"));r.ColProps=["lg","md","sm","xs"];var l=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(i,e),i.prototype.renderChild=function(e,r,n,t){var s=this.props,o=s.render,i=s.itemRender;return i?i(r,n,t,this.props):o(e,r)},i.prototype.renderColumn=function(e,i,l){var d=this,a=u.default(e,r.ColProps);a=s.__assign({},a);var c=this.props.classnames;return o.default.createElement("div",{key:i,className:c(t(a),n(e.columnClassName))},Array.isArray(e)?o.default.createElement("div",{className:c("Grid")},e.map(function(e,r){return d.renderColumn(e,r,e.length)})):this.renderChild("column/"+i,e,i,l))},i.prototype.renderColumns=function(e){var r=this;return e.map(function(n,t){return r.renderColumn(n,t,e.length)})},i.prototype.render=function(){var e=this.props,r=e.className,n=e.classnames;return o.default.createElement("div",{className:n("Grid",r)},this.renderColumns(this.props.columns))},i.propsList=["columns"],i.defaultProps={},i}(o.default.Component);r.default=l;var d=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(r,e),r=s.__decorate([i.Renderer({test:/(^|\/)grid$/,name:"grid"})],r)}(l);r.GridRenderer=d});
|
|||
|
;/*!src/renderers/Form/Grid.tsx*/
|
|||
|
amis.define("d5c9577",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridRenderer=void 0;var r=e("node_modules/tslib/tslib"),o=r.__importDefault(e("5e68c3c")),s=e("567b83c"),d=r.__importDefault(e("node_modules/react/index")),n={left:"col-sm-4",right:"col-sm-8",offset:"col-sm-offset-4"},i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.renderChild=function(e,t,r,o){var s=this.props,i=s.render,a=s.renderFormItems,l=s.classnames,m=s.$path,c=s.itemRender,u=s.store;return t&&!t.type&&(t.controls||t.tabs||t.feildSet)?d.default.createElement("div",{className:l("Grid-form Form--"+(t.mode||"normal"))},a(t,m.replace(/^.*form\//,""),{mode:t.mode||"normal",horizontal:t.horizontal||n,store:u,data:u.data,render:i})):c?c(t,r,o,this.props):i(e,t.body||t)},t.propsList=["columns","onChange"],t.defaultProps={},t=r.__decorate([s.FormItem({type:"grid",strictMode:!1,sizeMutable:!1})],t)}(o.default);t.GridRenderer=i});
|
|||
|
;/*!src/renderers/Form/HBox.tsx*/
|
|||
|
amis.define("4be33a0",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HBoxRenderer=void 0;var r=e("node_modules/tslib/tslib"),o=r.__importDefault(e("node_modules/react/index")),n=e("567b83c"),s=r.__importDefault(e("node_modules/classnames/index")),a=e("9a80175"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.renderColumn=function(e,t,n){var l=this.props,i=l.itemRender,d=l.data,u=l.classPrefix;if(!a.isVisible(e,d))return null;var m=r.__assign({width:e.width,height:e.height},e.style);return o.default.createElement("div",{key:t,style:m,className:s.default(u+"Hbox-col",u+"Form--"+(e.mode||"normal"),e.columnClassName)},i?i(e,t,n,this.props):this.renderChild("column/"+t,e))},t.prototype.renderChild=function(e,t){var r=this.props,o=r.render,n=r.renderFormItems,s=(r.formMode,r.store),a=r.$path;return t&&!t.type&&(t.controls||t.tabs||t.feildSet)?n(t,a.replace(/^.*form\//,""),{mode:t.mode||"normal",horizontal:t.horizontal||{left:4,right:8,offset:4},store:s,data:s.data,render:o}):o(e,t.body||t)},t.prototype.render=function(){var e=this,t=this.props,r=t.className,n=t.columns,a=t.gap,l=t.classPrefix;return o.default.createElement("div",{className:s.default(l+"FormHbox",a?l+"Hbox--"+a:"",r)},o.default.createElement("div",{className:l+"Hbox"},n.map(function(t,r){return e.renderColumn(t,r,n.length)})))},t.propsList=["columns","onChange"],t.defaultProps={},t=r.__decorate([n.FormItem({type:"hbox",strictMode:!1,sizeMutable:!1})],t)}(o.default.Component);t.HBoxRenderer=l});
|
|||
|
;/*!src/renderers/Panel.tsx*/
|
|||
|
amis.define("244f74d",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PanelRenderer=void 0;var a=e("node_modules/tslib/tslib"),s=a.__importDefault(e("node_modules/react/index")),r=e("0f9ebdf"),n=e("9a80175"),o=e("node_modules/react-dom/index"),i=e("67d35e6"),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.affixDom=s.default.createRef(),t.footerDom=s.default.createRef(),t}return a.__extends(t,e),t.prototype.componentDidMount=function(){var e=o.findDOMNode(this),t=e?n.getScrollParent(e):null;t&&t!==document.body||(t=window),this.parentNode=t,t.addEventListener("scroll",this.affixDetect),this.unSensor=i.resizeSensor(e,this.affixDetect),this.affixDetect()},t.prototype.componentWillUnmount=function(){var e=this.parentNode;e&&e.removeEventListener("scroll",this.affixDetect),this.unSensor&&this.unSensor(),clearTimeout(this.timer)},t.prototype.affixDetect=function(){if(this.props.affixFooter&&this.affixDom.current&&this.footerDom.current){var e=this.affixDom.current,t=this.footerDom.current,a=!1;if(!t.offsetWidth)return void(this.timer=setTimeout(this.affixDetect,250));if(e.style.cssText="width: "+t.offsetWidth+"px","always"===this.props.affixFooter)a=!0,t.classList.add("invisible2");else{var s=t.getBoundingClientRect(),r=window.innerHeight;a=s.top+s.height/2>r}a?e.classList.add("in"):e.classList.remove("in")}},t.prototype.renderBody=function(){var e=this.props,t=(e.type,e.className,e.data),s=(e.header,e.body),r=e.render,n=(e.bodyClassName,e.headerClassName,e.actionsClassName,e.footerClassName,e.children),o=(e.title,e.actions,e.footer,e.classPrefix,a.__rest(e,["type","className","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","children","title","actions","footer","classPrefix"])),i=a.__assign({data:t},o);return n?"function"==typeof n?n(this.props):n:s?r("body",s,i):null},t.prototype.renderActions=function(){var e=this.props,t=e.actions,a=e.render;return Array.isArray(t)&&t.length?t.map(function(e,t){return a("action",e,{type:e.type||"button",key:t})}):null},t.prototype.render=function(){var e=this.props,t=(e.type,e.className),r=e.data,n=e.header,o=(e.body,e.render),i=e.bodyClassName,l=e.headerClassName,d=e.actionsClassName,f=e.footerClassName,c=(e.children,e.title),m=e.footer,u=e.affixFooter,h=e.classPrefix,p=e.classnames,y=a.__rest(e,["type","className","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","children","title","footer","affixFooter","classPrefix","classnames"]),N=a.__assign({data:r},y),_=[],v=this.renderActions();v&&_.push(s.default.createElement("div",{key:"actions",className:p("Panel-btnToolbar",d||"Panel-footer")},v)),m&&_.push(s.default.createElement("div",{key:"footer",className:p(f||"Panel-footer")},o("footer",m,N)));var x=_.length?s.default.createElement("div",{ref:this.footerDom},_):null;return s.default.createElement("div",{className:p("Panel",t||"Panel--default")},n?s.default.createElement("div",{className:p(l||"Panel-heading")},o("header",n,N)):c?s.default.createElement("div",{className:p(l||"Panel-heading")},s.default.createElement("h3",{className:p("Panel-title")},o("title",c,N))):null,s.default.createElement("div",{className:i||h+"Panel-body"},this.renderBody()),x,u&&_.length?s.default.createElement("div",{ref:this.affixDom,className:p("Panel-fixedBottom")},_):null)},t.propsList=["header","headerClassName","footerClassName","actionsClassName","bodyClassName"],t.defaultProps={},a.__decorate([n.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"affixDetect",null),t}(s.default.Component);t.default=l;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([r.Renderer({test:/(^|\/)panel$/,name:"panel"})],t)}(l);t.PanelRenderer=d});
|
|||
|
;/*!src/renderers/Form/Panel.tsx*/
|
|||
|
amis.define("2406202",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PanelRenderer=void 0;var t=e("node_modules/tslib/tslib"),o=t.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),d=t.__importDefault(e("244f74d")),a=t.__importDefault(e("node_modules/classnames/index")),l=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r.prototype.renderBody=function(){var r=this.props,t=(r.render,r.renderFormItems),n=r.body,d=r.bodyClassName,l=r.controls,s=r.tabs,i=r.fieldSet,m=r.mode,f=r.formMode,u=r.horizontal,c=r.$path,p=r.classPrefix;if(!n&&(l||s||i)){var _={};return m&&(_.mode=m),u&&(_.horizontal=u),o.default.createElement("div",{className:a.default(p+"Form--"+(_.mode||f||"normal"),d)},t({controls:l,tabs:s,fieldSet:i},c.replace(/^.*form\//,""),_))}return e.prototype.renderBody.call(this)},r.propsList=["onChange"],r=t.__decorate([n.Renderer({test:/(^|\/)form(?:\/.+)?\/control\/(?:\d+\/)?panel$/,weight:-100,name:"panel-control"})],r)}(d.default);r.PanelRenderer=l});
|
|||
|
;/*!src/renderers/Form/Color.tsx*/
|
|||
|
amis.define("5271012",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorControlRenderer=void 0;var r=e("node_modules/tslib/tslib"),n=r.__importDefault(e("node_modules/react/index")),o=e("567b83c"),l=r.__importDefault(e("node_modules/classnames/index")),a=r.__importDefault(e("f11d26b")),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={open:!1},t}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,o=e.classPrefix,s=r.__rest(e,["className","classPrefix"]);return n.default.createElement("div",{className:l.default(o+"ColorControl",t)},n.default.createElement(a.default,r.__assign({classPrefix:o},s)))},t.defaultProps={format:"hex",clearable:!0},t}(n.default.PureComponent);t.default=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t=r.__decorate([o.FormItem({type:"color"})],t)}(s);t.ColorControlRenderer=u});
|
|||
|
;/*!src/renderers/Form/ChainedSelect.tsx*/
|
|||
|
amis.define("d2efb65",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainedSelectControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),i=a.__importDefault(e("node_modules/classnames/index")),o=e("b86428a"),s=a.__importDefault(e("d57879c")),l=e("1caead1"),r=function(e){function t(t){var a=e.call(this,t)||this;return a.state={stack:[]},a.handleChange=a.handleChange.bind(a),a.loadMore=a.loadMore.bind(a),a}return a.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props.formInited;e?this.loadMore():this.props.addHook(this.loadMore,"init")},t.prototype.componentWillReceiveProps=function(e){var t=this.props;t.options!==e.options&&this.setState({stack:[]})},t.prototype.componentDidUpdate=function(e){var t=this.props;t.formInited&&t.value!==e.value&&this.loadMore()},t.prototype.loadMore=function(){for(var e=this,t=this.props,n=t.value,i=t.delimiter,o=t.onChange,s=t.joinValues,r=t.extractValue,d=t.source,p=t.data,c=t.env,u=Array.isArray(n)?n.concat():n&&"string"==typeof n?n.split(i||","):[],h=0,f=this.state.stack.length;f>h&&u[h]&&this.state.stack[h].parentId==(s||r?u[h]:u[h].value);)h++;if(u[h]&&c&&l.isEffectiveApi(d,p)){var v=s||r?u[h]:u[h].value,m=this.state.stack.concat();m.splice(h,m.length-h),m.push({parentId:v,loading:!0,options:[]}),this.setState({stack:m},function(){c.fetcher(d,a.__assign(a.__assign({},p),{value:u,level:h+1,parentId:v,parent:u[h]})).then(function(t){var a=e.state.stack.concat(),l=t.data?t.data.value:void 0,r=t.data&&t.data.options||t.data;a.splice(h,a.length-h),"undefined"!=typeof l&&(u.splice(h+1,n.length-h-1),u.push(l),o(s?u.join(i||","):u)),a.push({options:r,parentId:v,loading:!1,visible:!!r}),e.setState({stack:a},e.loadMore)}).catch(function(e){c.notify("error",e.message)})})}},t.prototype.handleChange=function(e,t){var a=this.props,n=a.value,i=a.delimiter,o=a.onChange,s=a.joinValues,l=a.extractValue,r=Array.isArray(n)?n.concat():n&&"string"==typeof n?n.split(i||","):[];r.splice(e,r.length-e),r.push(s?t.value:t),o(s?r.join(i||","):l?r.map(function(e){return e.value||e}):r)},t.prototype.reload=function(){var e=this.props.reloadOptions;e&&e()},t.prototype.render=function(){var e=this,t=this.props,o=t.options,l=t.classPrefix,r=t.className,d=(t.inline,t.loading),p=t.value,c=t.delimiter,u=(t.joinValues,t.extractValue,t.multiple,a.__rest(t,["options","classPrefix","className","inline","loading","value","delimiter","joinValues","extractValue","multiple"])),h=Array.isArray(p)?p.concat():p&&"string"==typeof p?p.split(c||","):[];return n.default.createElement("div",{className:i.default(l+"ChainedSelectControl",r)},n.default.createElement(s.default,a.__assign({},u,{classPrefix:l,key:"base",options:o,value:h[0],onChange:this.handleChange.bind(this,0),loading:d,inline:!0})),this.state.stack.map(function(t,i){var o=t.options,r=t.loading,d=t.visible;return d===!1?null:n.default.createElement(s.default,a.__assign({},u,{classPrefix:l,key:"x-"+(i+1),options:o,value:h[i+1],onChange:e.handleChange.bind(e,i+1),loading:r,inline:!0}))}))},t.defaultProps={clearable:!1,searchable:!1,multiple:!0},t}(n.default.Component);t.default=r;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([o.OptionsControl({type:"chained-select",sizeMutable:!1})],t)}(r);t.ChainedSelectControlRenderer=d});
|
|||
|
;/*!src/renderers/Form/NestedSelect.tsx*/
|
|||
|
amis.define("9d9f047",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NestedSelectControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=a.__importDefault(e("node_modules/lodash/xorBy")),i=a.__importDefault(e("node_modules/lodash/unionBy")),s=a.__importDefault(e("997df41")),r=a.__importDefault(e("0a43d97")),o=a.__importDefault(e("2b3dcdf")),d=e("node_modules/react-overlays/lib/index"),u=e("b7bbd16"),c=e("9a80175"),p=e("f2e345e"),h=e("b86428a"),m=a.__importDefault(e("4ee46ff")),f=e("node_modules/react-dom/index"),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isOpened:!1,isFocused:!1,inputValue:"",stack:[]},t}a.__extends(t,e),t.prototype.domRef=function(e){this.target=e},t.prototype.open=function(){var e=this.props,t=e.options,a=e.disabled;a||this.setState({isOpened:!0,stack:[t]})},t.prototype.close=function(){this.setState({isOpened:!1,stack:[]})},t.prototype.removeItem=function(e,t){var a=this.props,n=a.onChange,l=a.selectedOptions,i=a.disabled,s=a.joinValues,r=a.valueField,o=a.extractValue,d=a.delimiter,u=a.value;i||(t&&t.stopPropagation(),l.splice(e,1),s?u=l.map(function(e){return e[r||"value"]}).join(d||","):o&&(u=l.map(function(e){return e[r||"value"]})),n(u))},t.prototype.renderValue=function(){var e=this,t=this.props,a=t.multiple,l=t.classnames,i=t.selectedOptions,s=t.labelField,r=t.placeholder,o=t.disabled;return i&&i.length>0?i.map(function(t,i){return a?n.default.createElement("div",{className:l("Select-value"),key:i},n.default.createElement("span",{className:l("Select-valueIcon",{"is-disabled":o||t.disabled}),onClick:e.removeItem.bind(e,i)},"×"),n.default.createElement("span",{className:l("Select-valueLabel")},t[s||"label"])):n.default.createElement("div",{className:l("Select-value"),key:i},t[s||"label"])}):n.default.createElement("div",{className:l("NestedSelect-placeholder")},r)},t.prototype.renderClear=function(){var e=this.props,t=e.clearable,a=e.value,l=e.disabled,i=e.classnames;return t&&!l&&(Array.isArray(a)?a.length:a)?n.default.createElement("a",{onClick:this.clearValue,className:i("NestedSelect-clear")},n.default.createElement(u.Icon,{icon:"close",className:"icon"})):null},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,a=e.resetValue;t("undefined"==typeof a?"":a)},t.prototype.handleOptionClick=function(e,t){var a=this.props,n=a.multiple,l=a.onChange,i=a.joinValues,s=a.extractValue,r=a.valueField,o=a.autoFill,d=a.onBulkChange;if(!n){t.stopPropagation();var u=!n&&o&&!c.isEmpty(o)&&p.dataMapping(o,e);u&&d(u),l(i?e[r||"value"]:s?e[r||"value"]:e),!n&&this.close()}},t.prototype.handleCheck=function(e,t){var n=this.props,s=n.onChange,r=n.selectedOptions,o=n.joinValues,d=n.delimiter,u=n.extractValue,p=n.withChildren,h=n.cascade,m=n.multiple,f=this.state.stack,_=this.props.valueField||"value";if(!Array.isArray(e)&&e.children&&e.children.length&&"number"==typeof t){var y=r.some(function(t){return t[_]==e[_]}),g=h?!1:e.uncheckable||m&&!y,v=e.children.map(function(e){return a.__assign(a.__assign({},e),{uncheckable:g})});f[t]?f.splice(t+1,1,v):f.push(v)}var b,k=r.concat();if(Array.isArray(e))e=p?c.flattenTree(e):e,b=k.length===e.length?[]:e;else if(Array.isArray(e.children))if(h)b=l.default(k,[e],_);else if(p){e=c.flattenTree([e]);var C=e.every(function(e){return!!~k.findIndex(function(t){return t[_]===e[_]})})?l.default:i.default;b=C(k,e,_)}else b=k.filter(function(t){return!~c.flattenTree([e],function(e){return e[_]}).indexOf(t[_])}),!~k.map(function(e){return e[_]}).indexOf(e[_])&&b.push(e);else b=l.default(k,[e],_);o?b=b.map(function(e){return e[_]}).join(d||","):u&&(b=b.map(function(e){return e[_]})),s(b)},t.prototype.allChecked=function(e){var t=this,a=this.props,n=a.selectedOptions,l=a.withChildren,i=a.valueField;return e.every(function(e){return l&&e.children?t.allChecked(e.children):n.some(function(t){return t[i||"value"]==e[i||"value"]})})},t.prototype.partialChecked=function(e){var t=this,a=this.props,n=a.selectedOptions,l=a.withChildren,i=a.valueField;retu
|
|||
|
;/*!src/renderers/Form/Transfer.tsx*/
|
|||
|
amis.define("399400a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferRender=t.BaseTransferRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=e("b86428a"),r=n.__importDefault(e("node_modules/react/index")),o=n.__importDefault(e("0573406")),i=e("b86428a"),s=e("9a80175"),l=n.__importDefault(e("acad559")),d=n.__importDefault(e("node_modules/lodash/find")),u=e("d57879c"),p=e("f2e345e"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n.__extends(t,e),t.prototype.handleChange=function(e){var t=this.props,n=t.onChange,a=t.joinValues,r=t.delimiter,o=t.valueField,i=t.extractValue,l=t.options,d=t.setOptions,p=e,c=l.concat();Array.isArray(e)&&((a||i)&&(p=e.map(function(e){var t=s.findTree(l,u.optionValueCompare(e[o||"value"],o||"value"));return t||c.push(e),e[o||"value"]})),a&&(p=p.join(r||","))),c.length>l.length&&d(c,!0),n(p)},t.prototype.option2value=function(e){return e},t.prototype.handleSearch=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var a,r,o,i,l,p,c,f,_,h,m;return n.__generator(this,function(n){switch(n.label){case 0:if(a=this.props,r=a.searchApi,o=a.options,i=a.labelField,l=a.valueField,p=a.env,c=a.data,!r)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,p.fetcher(r,s.createObject(c,{term:e}),{cancelExecutor:t})];case 2:if(f=n.sent(),!f.ok)throw new Error(f.msg||"搜索请求异常");if(_=f.data.options||f.data.items||f.data,!Array.isArray(_))throw new Error("期望接口返回数组信息");return[2,_.map(function(e){var t=null;return Array.isArray(o)&&(t=d.default(o,u.optionValueCompare(e[l||"value"],l))),t||e})];case 3:return h=n.sent(),p.isCancel(h)||p.notify("error",h.message),[2,[]];case 4:return[3,6];case 5:return e?(m=s.string2regExp(e),[2,s.filterTree(o,function(e){return!!(Array.isArray(e.children)&&e.children.length||m.test(e[i||"label"])||m.test(e[l||"value"]))},0,!0)]):[2,o];case 6:return[2]}})})},t.prototype.renderCell=function(e,t,a,r){var o=this.props,i=o.render,l=o.data;return i("cell/"+a+"/"+r,n.__assign({type:"text"},e),{value:p.resolveVariable(e.name,t),data:s.createObject(l,t)})},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classnames,a=e.options,i=e.selectedOptions,s=e.showArrow,d=e.sortable,u=e.selectMode,p=e.columns,c=e.loading,f=e.searchable,_=e.searchResultMode,h=e.deferLoad,m=e.leftOptions,y=e.leftMode,v=e.rightMode;return r.default.createElement("div",{className:n("TransferControl",t)},r.default.createElement(o.default,{value:i,options:a,onChange:this.handleChange,option2value:this.option2value,sortable:d,showArrow:s,selectMode:u,searchResultMode:_,columns:p,onSearch:f?this.handleSearch:void 0,onDeferLoad:h,leftOptions:m,leftMode:y,rightMode:v,cellRender:this.renderCell}),r.default.createElement(l.default,{overlay:!0,key:"info",show:c}))};var a,c,f,_;return n.__decorate([s.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(a="undefined"!=typeof Array&&Array)?a:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"handleChange",null),n.__decorate([s.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",["function"==typeof(c="undefined"!=typeof i.Option&&i.Option)?c:Object]),n.__metadata("design:returntype",void 0)],t.prototype,"option2value",null),n.__decorate([s.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String,"function"==typeof(f="undefined"!=typeof Function&&Function)?f:Object]),n.__metadata("design:returntype",Promise)],t.prototype,"handleSearch",null),n.__decorate([s.autobind,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object,"function"==typeof(_="undefined"!=typeof i.Option&&i.Option)?_:Object,Number,Number]),n.__metadata("design:returntype",void 0)],t.prototype,"renderCell",null),t}(r.default.Component);t.BaseTransferRenderer=c;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(c);t.TransferRender=f,t.default=a.OptionsControl({type:"transfer"})(f)});
|
|||
|
;/*!src/renderers/Service.tsx*/
|
|||
|
amis.define("3a449e1",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceRenderer=void 0;var a=e("node_modules/tslib/tslib"),i=a.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),s=e("57d76d7"),r=e("6a2dbb7"),o=e("919cbd9"),c=e("1caead1"),d=e("1953fc1"),h=e("9a80175"),p=function(e){function t(t){var a=e.call(this,t)||this;return a.handleQuery=a.handleQuery.bind(a),a.handleAction=a.handleAction.bind(a),a.reload=a.reload.bind(a),a.silentReload=a.silentReload.bind(a),a.initInterval=a.initInterval.bind(a),a.afterDataFetch=a.afterDataFetch.bind(a),a.afterSchemaFetch=a.afterSchemaFetch.bind(a),a}return a.__extends(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.initFetch()},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.store,i=t.messages,n=i.fetchSuccess,s=i.fetchFailed;c.isApiOutdated(e.api,t.api,e.data,t.data)&&a.fetchData(t.api,a.data,{successMessage:n,errorMessage:s}).then(this.afterDataFetch),c.isApiOutdated(e.schemaApi,t.schemaApi,e.data,t.data)&&a.fetchSchema(t.schemaApi,a.data,{successMessage:n,errorMessage:s}).then(this.afterSchemaFetch)},t.prototype.componentWillUnmount=function(){this.mounted=!1,clearTimeout(this.timer)},t.prototype.initFetch=function(){var e=this.props,t=e.schemaApi,a=e.initFetchSchema,i=e.api,n=e.initFetch,s=e.initFetchOn,r=e.store,o=e.messages,d=o.fetchSuccess,h=o.fetchFailed;c.isEffectiveApi(t,r.data,a)&&r.fetchSchema(t,r.data,{successMessage:d,errorMessage:h}).then(this.afterSchemaFetch),c.isEffectiveApi(i,r.data,n,s)&&r.fetchInitData(i,r.data,{successMessage:d,errorMessage:h}).then(this.afterDataFetch)},t.prototype.afterDataFetch=function(e){this.initInterval(e)},t.prototype.afterSchemaFetch=function(e){this.initInterval(e)},t.prototype.initInterval=function(e){var t=this.props,a=t.interval,i=t.silentPolling,n=t.stopAutoRefreshWhen,s=t.data;return clearTimeout(this.timer),a&&this.mounted&&(!n||!r.evalExpression(n,s))&&(this.timer=setTimeout(i?this.silentReload:this.reload,Math.max(a,3e3))),e},t.prototype.reload=function(e,t,a,i){if(t)return this.receive(t);var n=this.props,s=n.schemaApi,r=(n.initFetchSchema,n.api),o=(n.initFetch,n.initFetchOn,n.store),d=n.messages,h=d.fetchSuccess,p=d.fetchFailed;clearTimeout(this.timer),c.isEffectiveApi(s,o.data)&&o.fetchSchema(s,o.data,{successMessage:h,errorMessage:p}).then(this.afterSchemaFetch),c.isEffectiveApi(r,o.data)&&o.fetchData(r,o.data,{silent:i,successMessage:h,errorMessage:p}).then(this.afterDataFetch)},t.prototype.silentReload=function(e,t){this.reload(e,t,void 0,!0)},t.prototype.receive=function(e){var t=this.props.store;t.updateData(e),this.reload()},t.prototype.handleQuery=function(e){this.receive(e)},t.prototype.reloadTarget=function(){},t.prototype.openFeedback=function(e,t){var a=this;return new Promise(function(i){var n=a.props.store,s=n.parentStore;s&&s.openDialog&&(n.setCurrentAction({type:"button",actionType:"dialog",dialog:e}),n.openDialog(t,void 0,function(e){i(e)}))})},t.prototype.handleAction=function(e,t,i,n,s){var o=this;void 0===n&&(n=!1);var c=this.props,d=c.onAction,p=c.store,l=c.env,u=c.api,f=c.translate;u&&"ajax"===t.actionType?(p.setCurrentAction(t),p.saveRemote(t.api,i,{successMessage:f(t.messages&&t.messages.success),errorMessage:f(t.messages&&t.messages.failed)}).then(function(e){return a.__awaiter(o,void 0,void 0,function(){var i;return a.__generator(this,function(a){switch(a.label){case 0:return this.afterDataFetch(e),t.feedback&&h.isVisible(t.feedback,p.data)?[4,this.openFeedback(t.feedback,p.data)]:[3,2];case 1:a.sent(),a.label=2;case 2:return i=t.redirect&&r.filter(t.redirect,p.data),i&&l.jumpTo(i,t),t.reload&&this.reloadTarget(t.reload,p.data),[2]}})})}).catch(function(){})):d(e,t,i,n,s||this.context)},t.prototype.renderBody=function(){var e=this.props,t=e.render,a=e.store,n=e.body,s=e.classnames;return i.default.createElement("div",{className:s("Service-body")},t("body",a.schema||n,{key:a.schemaKey||"body",onQuery:this.handleQuery,onAction:this.handleAction}))},t.prototype.render=function(){var e=this.props,t=e.className,a=e.store,
|
|||
|
;/*!src/renderers/Form/Service.tsx*/
|
|||
|
amis.define("40fc403",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceRenderer=void 0;var o=t("node_modules/tslib/tslib"),r=o.__importDefault(t("node_modules/react/index")),n=t("0f9ebdf"),s=o.__importDefault(t("3a449e1")),i=t("919cbd9"),a=t("57d76d7"),d=t("9a80175"),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e.prototype.componentWillMount=function(){var t=this.context;t.registerComponent(this)},e.prototype.componentDidMount=function(){var e=this.props,o=e.formInited,r=e.addHook;this.mounted=!0,o!==!1?t.prototype.componentDidMount.call(this):r&&r(this.initFetch,"init")},e.prototype.componentDidUpdate=function(e){var o=this.props.formInited;o!==!1&&t.prototype.componentDidUpdate.call(this,e)},e.prototype.componentWillUnmount=function(){var e=this.context;e.unRegisterComponent(this);var o=this.props.removeHook;o&&o(this.initFetch,"init"),t.prototype.componentWillUnmount.call(this)},e.prototype.afterDataFetch=function(e){var o=this.props.formStore,r=this.props.onChange;if(o&&this.isFormMode()){var n=d.isObject(null===e||void 0===e?void 0:e.data)?Object.keys(e.data):[];n.length&&(o.setValues(e.data),r(e.data[n[0]],n[0]))}return t.prototype.afterDataFetch.call(this,e)},e.prototype.afterSchemaFetch=function(e){var o=this.props.formStore,r=this.props.onChange;if(o&&this.isFormMode()){var n=d.isObject(null===e||void 0===e?void 0:e.data)?Object.keys(e.data):[];n.length&&(o.setValues(e.data),r(e.data[n[0]],n[0]))}return t.prototype.afterSchemaFetch.call(this,e)},e.prototype.isFormMode=function(){var t=this.props,e=t.store,o=t.body,r=t.controls,n=t.tabs,s=t.feildSet,i=t.renderFormItems,a=(t.classnames,e.schema||o||{controls:r,tabs:n,feildSet:s});return a&&!a.type&&(a.controls||a.tabs||a.feildSet)&&i},e.prototype.renderBody=function(){var e=this.props,o=e.render,n=e.store,s=e.body,i=e.controls,a=e.tabs,d=e.feildSet,p=e.renderFormItems,c=e.formMode,l=e.classnames;if(this.isFormMode()){var m=n.schema||s||{controls:i,tabs:a,feildSet:d};return r.default.createElement("div",{key:n.schemaKey||"forms",className:l("Form--"+(c||"normal"))},p(m,"controls",{store:n,data:n.data,render:o}))}return t.prototype.renderBody.call(this)},e.propsList=["onChange"],e.contextType=i.ScopedContext,e=o.__decorate([n.Renderer({test:/(^|\/)form\/(.*)\/service$/,weight:-100,storeType:a.ServiceStore.name,storeExtendsData:!1,name:"service-control"})],e)}(s.default);e.ServiceRenderer=p});
|
|||
|
;/*!src/renderers/Form/Table.tsx*/
|
|||
|
amis.define("f6d94c0",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),i=e("567b83c"),r=n.__importDefault(e("node_modules/classnames/index")),o=n.__importDefault(e("a67acca")),l=e("9a80175"),s=e("1caead1"),d=e("6a2dbb7"),c=n.__importDefault(e("node_modules/lodash/omit")),u=e("f2e345e"),p=n.__importDefault(e("node_modules/lodash/findIndex")),f=n.__importDefault(e("node_modules/lodash/memoize")),m=e("398dbab"),h=e("b7bbd16"),v=function(e){function t(t){var n=e.call(this,t)||this;return n.entityId=1,n.subForms={},n.editting={},n.buildItems=f.default(function(e,t){return e.map(function(e,a){return a===t?n.state.editting:e})},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return JSON.stringify(e)}),n.state={columns:n.buildColumns(t),editIndex:-1},n.entries=new m.SimpleMap,n.buildItemProps=n.buildItemProps.bind(n),n.confirmEdit=n.confirmEdit.bind(n),n.cancelEdit=n.cancelEdit.bind(n),n.handleSaveTableOrder=n.handleSaveTableOrder.bind(n),n.handleTableSave=n.handleTableSave.bind(n),n.getEntryId=n.getEntryId.bind(n),n.subFormRef=n.subFormRef.bind(n),n}return n.__extends(t,e),t.prototype.componentWillUnmount=function(){var e,t;this.entries.dispose(),null===(t=(e=this.buildItems.cache).clear)||void 0===t?void 0:t.call(e)},t.prototype.subFormRef=function(e,t,n){this.subForms[t+"-"+n]=e},t.prototype.validate=function(){var e=this,t=this.props,n=t.value,a=t.minLength,i=t.maxLength,r=t.translate;if(a&&(!Array.isArray(n)||n.length<a))return r("组合表单成员数量不够,低于设定的最小{{minLength}}个,请添加更多的成员。",{minLength:a});if(i&&Array.isArray(n)&&n.length>i)return r("组合表单成员数量超出,超出设定的最大{{maxLength}}个,请删除多余的成员。",{maxLength:i});var o=[];return Object.keys(this.subForms).forEach(function(t){return e.subForms[t]&&o.push(e.subForms[t])}),o.length?Promise.all(o.map(function(e){return e.validate()})).then(function(e){return~e.indexOf(!1)?r("内部表单验证失败"):void 0}):void 0},t.prototype.doAction=function(e,t){for(var a=[],i=2;i<arguments.length;i++)a[i-2]=arguments[i];var r=this.props,o=r.onAction,l=r.value,s=r.valueField,d=r.env,c=r.onChange,f=r.editable,m=r.translate;if("add"===e.actionType){var h=Array.isArray(l)?l.concat():[];if(e.payload){var v=u.dataMapping(e.payload,t);return v=Array.isArray(v)?v:[v],v.forEach(function(e){var t=p.default(h,function(t){return t[s]==e[s]});~t&&h.splice(t,1),h.push(e)}),c(h),void(f&&this.startEdit(h.length-1,h[h.length-1],!0))}return this.addItem(h.length-1)}if("remove"===e.actionType||"delete"===e.actionType){if(!s)return d.alert(m("请配置 valueField"));if(!e.payload)return d.alert(m("action 上请配置 payload, 否则不清楚要删除哪个"));var b=Array.isArray(l)?l.concat():[],g=u.dataMapping(e.payload,t);return g=Array.isArray(g)?g:[g],g.forEach(function(e){var t=p.default(b,function(t){return t[s]==e[s]});~t&&b.splice(t,1)}),void c(b)}return o&&o.apply(void 0,n.__spreadArrays([e,t],a))},t.prototype.addItem=function(e,t){void 0===t&&(t=this.props.scaffold);var a=this.props,i=a.value,r=a.onChange,o=a.needConfirm,l=Array.isArray(i)?i.concat():[];l.splice(e+1,0,n.__assign({},t)),r(l),e=Math.min(e+1,l.length-1),o===!1?r(l):this.startEdit(e,l[e],!0)},t.prototype.startEdit=function(e,t,n){void 0===n&&(n=!1);var a=this.props.value,i=this.props.scaffold;this.setState({editIndex:e,editting:t||a&&a[e]||i||{},isCreateMode:n,columns:this.state.isCreateMode===n?this.state.columns:this.buildColumns(this.props,n)})},t.prototype.confirmEdit=function(){return n.__awaiter(this,void 0,void 0,function(){var e,t,a,i,r,o,d,c,u,p,f,m,h,v,b,g=this;return n.__generator(this,function(y){switch(y.label){case 0:return e=this.props,t=e.value,a=e.onChange,i=e.scaffold,r=e.addApi,o=e.updateApi,d=e.data,c=e.env,u=e.translate,p=[],Object.keys(this.subForms).forEach(function(e){return g.subForms[e]&&p.push(g.subForms[e])}),p.forEach(function(e){return e.flush()}),f=
|
|||
|
;/*!src/renderers/Form/Picker.tsx*/
|
|||
|
amis.define("06cfa10",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PickerControlRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),o=e("b86428a"),i=a.__importDefault(e("node_modules/classnames/index")),l=e("8f9f9e3"),r=a.__importDefault(e("node_modules/lodash/find")),d=e("9a80175"),s=a.__importDefault(e("node_modules/lodash/findIndex")),p=a.__importDefault(e("580df19")),u=e("6a2dbb7"),c=e("b7bbd16"),m=e("9a80175"),f=e("f2e345e"),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isOpened:!1,schema:t.buildSchema(t.props),isFocused:!1},t.input=n.default.createRef(),t}a.__extends(t,e),t.prototype.componentDidMount=function(){this.fetchOptions()},t.prototype.componentWillReceiveProps=function(e){var t=this.props;d.anyChanged(["pickerSchema","multiple","source"],t,e)&&this.setState({schema:this.buildSchema(e)})},t.prototype.componentDidUpdate=function(e){var t=this.props;JSON.stringify(t.value)!==JSON.stringify(e.value)&&this.fetchOptions()},t.prototype.fetchOptions=function(){var e,t=this.props,a=t.value,n=t.formItem,o=t.valueField,i=t.labelField,l=t.source,r=t.data;l&&n&&(!(e=n.getSelectedOptions(a))||e.length&&e[0][o||"value"]===e[0][i||"label"])&&n.loadOptions(l,d.createObject(r,{value:a,op:"loadOptions"}),{autoAppend:!0})},t.prototype.buildSchema=function(e){return a.__assign(a.__assign({},e.pickerSchema),{type:"crud",pickerMode:!0,syncLocation:!1,api:e.source,keepItemSelectionOnPageChange:!0,valueField:e.valueField,labelField:e.labelField,checkOnItemClick:!0,bulkActions:e.multiple?e.pickerSchema.bulkActions:[]})},t.prototype.crudRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.crud=e},t.prototype.reload=function(){if(this.crud)this.crud.search();else{var e=this.props.reloadOptions;e&&e()}},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleModalConfirm=function(e,t,a,n){var o=s.default(n,function(e){return"crud"===e.props.type});this.handleChange(e[o].items),this.close()},t.prototype.handleChange=function(e){var t=this.props,a=t.joinValues,n=t.valueField,o=t.delimiter,i=t.extractValue,l=t.multiple,d=t.options,s=t.setOptions,p=t.onChange,u=t.autoFill,c=t.onBulkChange,_=e;_=a?e.map(function(e){return e[n||"value"]}).join(o||","):i?l?e.map(function(e){return e[n||"value"]}):e[0]&&e[0][n||"value"]||"":l?e:e[0];var h=[];e.forEach(function(e){r.default(d,function(t){return e[n||"value"]==t[n||"value"]})||h.push(e)}),h.length&&s(d.concat(h));var y=!l&&u&&!m.isEmpty(u)&&f.dataMapping(u,_);y&&c(y),p(_)},t.prototype.removeItem=function(e){var t=this.props,a=t.selectedOptions,n=t.joinValues,o=t.extractValue,i=t.delimiter,l=t.valueField,r=t.onChange,d=t.multiple,s=a.concat();s.splice(e,1);var p=s;p=n?s.map(function(e){return e[l||"value"]}).join(i||","):o?d?s.map(function(e){return e[l||"value"]}):s[0]&&s[0][l||"value"]||"":d?s:s[0],r(p)},t.prototype.handleKeyDown=function(e){var t=this.props.selectedOptions;" "===e.key?(this.open(),e.preventDefault()):t.length&&"Backspace"==e.key&&this.removeItem(t.length-1)},t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleClick=function(){this.input.current&&this.input.current.focus()},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,a=e.resetValue;t(void 0!==a?a:"")},t.prototype.renderValues=function(){var e=this,t=this.props,a=t.classPrefix,o=t.selectedOptions,l=t.labelField,r=t.labelTpl,s=t.disabled;return n.default.createElement("div",{className:a+"Picker-values"},o.map(function(t,o){return n.default.createElement("div",{key:o,className:i.default(a+"Picker-value",{"is-disabled":s})},n.default.createElement("span",{"data-tooltip":"删除","data-position":"bottom",className:a+"Picker-valueIcon",onClick:e.removeItem.bind(e,o)},"×"),n.default.createElement("span",{className:a+"Picker-valueLabel"},r?n.default.createElement(p.default,{html:u.filter(r,t)
|
|||
|
;/*!src/renderers/Form/IconPicker.tsx*/
|
|||
|
amis.define("3ced9f1",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconPickerControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),a=n.__importDefault(e("node_modules/react/index")),o=n.__importDefault(e("node_modules/classnames/index")),i=n.__importDefault(e("node_modules/match-sorter/dist/match-sorter.cjs")),s=n.__importDefault(e("node_modules/keycode/index")),r=n.__importStar(e("node_modules/downshift/dist/downshift.cjs")),d=e("9a80175"),u=e("960de17"),l=e("567b83c"),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isOpen:!1,inputValue:"",isFocused:!1,vendorIndex:0},t}n.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props;t.value!==e.value&&this.setState({inputValue:""})},t.prototype.changeVendor=function(e){this.setState({vendorIndex:e},this.formatOptions)},t.prototype.formatOptions=function(){var e=this.state.vendorIndex||0,t=u.ICONS[e],n=t.prefix,a=t.icons;return a.map(function(e){return{label:n+e,value:n+e}})},t.prototype.getVendors=function(){return u.ICONS.map(function(e){return e.name})},t.prototype.inputRef=function(e){this.input=e},t.prototype.focus=function(){if(this.input){this.input.focus();var e=this.input.value.length;e&&this.input.setSelectionRange(e,e)}},t.prototype.handleClick=function(){this.focus(),this.setState({isOpen:!0})},t.prototype.handleFocus=function(e){this.setState({isOpen:!0,isFocused:!0}),this.props.onFocus&&this.props.onFocus(e)},t.prototype.handleBlur=function(e){var t=this.props,n=t.onBlur,a=t.trimContents,o=t.value,i=t.onChange;this.setState({isFocused:!1},function(){a&&o&&"string"==typeof o&&i(o.trim())}),n&&n(e)},t.prototype.handleInputChange=function(e){var t=e.currentTarget.value;this.setState({inputValue:t})},t.prototype.handleKeyDown=function(e){var t=s.default(e.keyCode);if("backspace"===t){var n=this.props.onChange;this.state.inputValue||(n(""),this.setState({inputValue:""}))}},t.prototype.handleChange=function(e){var t=this.props.onChange;t(e),this.setState({isFocused:!1,inputValue:""})},t.prototype.handleStateChange=function(e){switch(e.type){case r.default.stateChangeTypes.itemMouseEnter:case r.default.stateChangeTypes.changeInput:this.setState({isOpen:!0});break;default:var t={};"undefined"!=typeof e.isOpen&&(t.isOpen=e.isOpen),this.state.isOpen&&e.isOpen===!1&&(t.inputValue=""),this.setState(t)}},t.prototype.renderFontIcons=function(){var e=this,t=this.props,o=t.className,s=t.inputOnly,d=t.placeholder,u=t.classnames,l=t.name,p=t.value,c=t.noDataTip,_=t.translate,m=this.formatOptions(),h=this.getVendors();return a.default.createElement(r.default,{isOpen:this.state.isOpen,inputValue:this.state.inputValue,onChange:this.handleChange,onOuterClick:this.handleBlur,onStateChange:this.handleStateChange,selectedItem:[p]},function(t){var r=t.getInputProps,f=t.getItemProps,y=t.isOpen,g=t.inputValue,v=g&&y?i.default(m,g,{keys:["label","value"]}):m;return a.default.createElement("div",{className:u("IconPickerControl-input IconPickerControl-input--withAC",s?o:"",{"is-opened":y}),onClick:e.handleClick},a.default.createElement("div",{className:u("IconPickerControl-valueWrap")},!d||p||e.state.inputValue?null:a.default.createElement("div",{className:u("IconPickerControl-placeholder")},d),!p||g&&y?null:a.default.createElement("div",{className:u("IconPickerControl-value")},a.default.createElement("i",{className:u(p)}),p),a.default.createElement("input",n.__assign({},r({name:l,ref:e.inputRef,onFocus:e.handleFocus,onChange:e.handleInputChange,onKeyDown:e.handleKeyDown,value:e.state.inputValue}),{autoComplete:"off",size:10}))),y?a.default.createElement("div",{className:u("IconPickerControl-sugsPanel")},h.length>1?a.default.createElement("div",{className:u("IconPickerControl-tabs")},h.map(function(t,n){return a.default.createElement("div",{className:u("IconPickerControl-tab",{active:e.state.vendorIndex===n}),onClick:function(){return e.changeVendor(n)},key:n},t)})):null,v.length?a.default.createElement("div",{className:u("IconPickerControl-sugs",h.length>1?"IconPickerControl-multiVendor":"
|
|||
|
;/*!src/renderers/Form/Formula.tsx*/
|
|||
|
amis.define("33d5c8a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormulaControlRenderer=void 0;var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),a=e("567b83c"),i=e("6a2dbb7"),r=e("9a80175"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.formula,n=e.data,o=e.setPrinstineValue,a=e.initSet,r=e.condition;if(t&&a!==!1&&(!r||~r.indexOf("$")||~r.indexOf("<%")||i.evalJS(r,n))){var l=i.evalJS(t,n);null!==l&&o(l)}},t.prototype.componentWillReceiveProps=function(e){var t=this.props,n=t.formula,o=t.data,a=t.onChange,l=t.autoSet,u=t.value,d=t.condition;if(l!==!1&&n&&e.formula&&r.isObjectShallowModified(o,e.data,!1)&&u===e.value){var f=i.evalJS(e.formula,e.data);if(d&&e.condition)~d.indexOf("$")||~d.indexOf("<%")?i.filter(d,o)!==i.filter(e.condition,e.data)&&a(f):i.evalJS(e.condition,e.data)&&a(f);else{var s=i.evalJS(n,o);JSON.stringify(s)!==JSON.stringify(f)&&a(f||"")}}},t.prototype.doAction=function(){var e=this.props,t=e.formula,n=e.data,o=e.onChange,a=(e.autoSet,e.value,i.evalJS(t,n));o(a)},t.prototype.render=function(){return null},t}(o.default.Component);t.default=l;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([a.FormItem({type:"formula",wrap:!1,strictMode:!1,sizeMutable:!1})],t)}(l);t.FormulaControlRenderer=u});
|
|||
|
;/*!src/renderers/Form/FieldSet.tsx*/
|
|||
|
amis.define("760e4be",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FieldSetRenderer=void 0;var t=e("node_modules/tslib/tslib"),o=t.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),d=t.__importDefault(e("d221521")),a=function(e){function r(r){var t=e.call(this,r)||this;return t.renderBody=t.renderBody.bind(t),t}return t.__extends(r,e),r.prototype.renderBody=function(){var e=this.props,r=e.renderFormItems,t=e.controls,n=e.body,d=e.collapsable,a=e.horizontal,l=e.render,s=e.mode,i=e.formMode,m=e.$path,u=e.classnames,c=e.store,f=e.formClassName;if(!t)return l("body",n);var p={store:c,data:c.data,render:l};return s&&(p.mode=s),"undefined"!=typeof d&&(p.collapsable=d),a&&(p.horizontal=a),o.default.createElement("div",{className:u("Form--"+(p.mode||i||"normal"),f)},r({controls:t},m.replace(/^.*form\//,""),p))},r.prototype.render=function(){var e=this.props,r=(e.controls,e.className),n=(e.mode,t.__rest(e,["controls","className","mode"]));return o.default.createElement(d.default,t.__assign({},n,{className:r,children:this.renderBody,wrapperComponent:"fieldset",headingComponent:"legend"}))},r.defaultProps={headingClassName:"",collapsable:!1},r}(o.default.Component);r.default=a;var l=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r=t.__decorate([n.Renderer({test:/(^|\/)form(?:.+)?\/control\/fieldSet$/i,weight:-100,name:"fieldset"})],r)}(a);r.FieldSetRenderer=l});
|
|||
|
;/*!src/renderers/Tabs.tsx*/
|
|||
|
amis.define("605b41a",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabsRenderer=void 0;var a=t("node_modules/tslib/tslib"),n=a.__importDefault(t("node_modules/react/index")),s=t("0f9ebdf"),r=a.__importDefault(t("node_modules/lodash/find")),o=t("9a80175"),i=a.__importDefault(t("node_modules/lodash/findIndex")),u=t("8ac7656"),d=function(t){function e(e){var a=t.call(this,e)||this,n=e.location||window.location,s=e.tabs,o=0;if("undefined"!=typeof e.activeKey)o=e.activeKey;else if(n&&Array.isArray(s)){var i=n.hash.substring(1),u=r.default(s,function(t){return t.hash===i});o=u&&u.hash?u.hash:s[0]&&s[0].hash||0}return a.state={prevKey:void 0,activeKey:o},a}return a.__extends(e,t),e.prototype.componentDidMount=function(){this.autoJumpToNeighbour()},e.prototype.componentWillReceiveProps=function(t){var e=this.props;if(t.location&&t.location.hash!==e.location.hash){var a=t.location.hash.substring(1);if(!a)return;var n=r.default(t.tabs,function(t){return t.hash===a});n&&n.hash&&n.hash!==this.state.activeKey&&this.setState({activeKey:n.hash,prevKey:this.state.activeKey})}else if(e.tabs!==t.tabs){var s=this.state.activeKey,o=t.location,n=null;if(o&&Array.isArray(t.tabs)){var i=o.hash.substring(1);n=r.default(t.tabs,function(t){return t.hash===i})}n?s=n.hash:t.tabs&&t.tabs.some(function(t,e){return t.hash?t.hash===s:e===s})||(s=t.tabs&&t.tabs[0]&&t.tabs[0].hash||0),this.setState({prevKey:void 0,activeKey:s})}},e.prototype.componentDidUpdate=function(){this.autoJumpToNeighbour()},e.prototype.autoJumpToNeighbour=function(){var t=this,e=this.props,a=e.tabs,n=e.data;if(Array.isArray(a)){var s=i.default(a,function(e,a){return e.hash?e.hash===t.state.activeKey:a===t.state.activeKey});if(a[s]&&!o.isVisible(a[s],this.props.data))for(var r=a.length,u=s-1+r,d=r-1;d--;){var l=u--%r;if(o.isVisible(a[l],n)){var h=a[l].hash||l;this.setState({activeKey:h});break}}}},e.prototype.handleSelect=function(t){var e=this.props.env;"string"==typeof t&&e?e.updateLocation("#"+t):"string"==typeof this.state.activeKey&&e&&e.updateLocation("#"),this.setState({activeKey:t,prevKey:this.state.activeKey})},e.prototype.switchTo=function(t){var e=this.props.tabs;Array.isArray(e)&&e[t]&&this.setState({activeKey:e[t].hash||t})},e.prototype.currentIndex=function(){var t=this,e=this.props.tabs;return Array.isArray(e)?i.default(e,function(e,a){return e.hash?e.hash===t.state.activeKey:a===t.state.activeKey}):-1},e.prototype.renderToolbar=function(){var t=this.props,e=t.toolbar,a=t.render,s=t.classnames,r=t.toolbarClassName;return e?n.default.createElement("div",{className:s("Tabs-toolbar",r)},a("toolbar",e)):null},e.prototype.renderTabs=function(){var t=this,e=this.props,s=e.classnames,r=e.classPrefix,i=e.contentClassName,d=e.tabs,l=e.tabRender,h=e.className,p=e.render,c=e.data,y=e.mode,b=e.tabsMode,m=e.mountOnEnter,f=e.unmountOnExit;if(!Array.isArray(d))return null;var v=b||y;return n.default.createElement(u.Tabs,{classPrefix:r,classnames:s,mode:v,className:h,contentClassName:i,onSelect:this.handleSelect,activeKey:this.state.activeKey,toolbar:this.renderToolbar()},d.map(function(e,s){return o.isVisible(e,c)?n.default.createElement(u.Tab,a.__assign({},e,{disabled:o.isDisabled(e,c),key:s,eventKey:e.hash||s,mountOnEnter:m,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:f}),t.renderTab?t.renderTab(e,t.props,s):l?l(e,t.props,s):p("tab/"+s,e.tab||e.body||"")):null}))},e.prototype.render=function(){return this.renderTabs()},e.defaultProps={className:"",mode:"",mountOnEnter:!0,unmountOnExit:!1},a.__decorate([o.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"autoJumpToNeighbour",null),a.__decorate([o.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],e.prototype,"handleSelect",null),a.__decorate([o.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Number]),a.__metadata("design:returntype",void 0)],e.pr
|
|||
|
;/*!src/renderers/Form/Tabs.tsx*/
|
|||
|
amis.define("3abf50d",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabsRenderer=void 0;var r=e("node_modules/tslib/tslib"),o=r.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),a=r.__importDefault(e("605b41a")),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderTab=function(e,r,n){var a=t.props,s=a.renderFormItems,d=a.formMode,l=a.formHorizontal,i=a.$path,m=a.render,u=a.classnames;return s&&!e.type&&(e.controls||e.fieldSet||e.tabs)?o.default.createElement("div",{className:u("Form--"+(e.mode||d||"normal"))},s(e,i.replace(/^.*form\//,"")+"/"+n,{mode:e.mode||d,horizontal:e.horizontal||l})):m("tab/"+n,e.body||e.tab||e)},t}return r.__extends(t,e),t.defaultProps={mountOnEnter:!1},t.propsList=["onChange","tabs"],t=r.__decorate([n.Renderer({test:/(^|\/)form(?:.+)?\/control\/tabs$/i,weight:-100,name:"tabs-control"})],t)}(a.default);t.TabsRenderer=s});
|
|||
|
;/*!src/renderers/Form/TabsTransfer.tsx*/
|
|||
|
amis.define("13e7e33",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.TabsTransferRenderer=void 0;var t=e("node_modules/tslib/tslib"),r=e("b86428a"),o=t.__importDefault(e("node_modules/react/index")),n=t.__importDefault(e("acad559")),s=e("399400a"),l=t.__importDefault(e("5c35784")),d=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a.prototype.render=function(){var e=this.props,a=e.className,t=e.classnames,r=e.options,s=e.selectedOptions,d=e.sortable,i=e.loading,u=e.searchable,c=e.searchResultMode,f=e.showArrow,h=e.deferLoad;return o.default.createElement("div",{className:t("TabsTransferControl",a)},o.default.createElement(l.default,{value:s,options:r,onChange:this.handleChange,option2value:this.option2value,sortable:d,searchResultMode:c,onSearch:u?this.handleSearch:void 0,showArrow:f,onDeferLoad:h}),o.default.createElement(n.default,{overlay:!0,key:"info",show:i}))},a=t.__decorate([r.OptionsControl({type:"tabs-transfer"})],a)}(s.BaseTransferRenderer);a.TabsTransferRenderer=d});
|
|||
|
;/*!src/renderers/Form/Group.tsx*/
|
|||
|
amis.define("7f271f4",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ControlGroupRenderer=void 0;var o=e("node_modules/tslib/tslib"),n=o.__importDefault(e("node_modules/react/index")),t=e("0f9ebdf"),a=e("9a80175"),i=e("567b83c"),l=o.__importDefault(e("01e2bb4")),s=function(e){function r(r){var o=e.call(this,r)||this;return o.renderInput=o.renderInput.bind(o),o}return o.__extends(r,e),r.prototype.renderControl=function(e,r,n){var t=this.props,a=t.render,i=t.disabled,s=t.data;if(!e)return null;var d=e&&"control"===e.type?e:{type:"control",control:e};if(d.control){var u=d.control;u=d.control=o.__assign(o.__assign({},u),l.default(u,s)),u.hiddenOn&&(d.hiddenOn=u.hiddenOn),u.visibleOn&&(d.visibleOn=u.visibleOn)}return a(""+r,d,o.__assign(o.__assign({},n),{disabled:i}))},r.prototype.renderVertical=function(e){var r=this;void 0===e&&(e=this.props);var o=e.controls,t=e.className,i=e.classnames,l=e.mode,s=e.formMode,d=e.data;return s=l||s,n.default.createElement("div",{className:i("Form-group Form-group--ver Form-group--"+s,t)},o.map(function(e,o){if(!a.isVisible(e,d))return null;var n=e&&e.mode||s;return r.renderControl(e,o,{key:o,formMode:n})}))},r.prototype.renderHorizontal=function(e){var r=this;void 0===e&&(e=this.props);var o=e.controls,t=e.className,i=e.classPrefix,l=e.classnames,s=e.mode,d=e.horizontal,u=e.formMode,m=e.formHorizontal,p=e.data,c=e.gap;u=s||u;var f=d||a.makeHorizontalDeeper(m,o.filter(function(e){return"inline"!==e.mode&&a.isVisible(e,p)}).length);return n.default.createElement("div",{className:l("Form-group Form-group--hor Form-group--"+u,c?"Form-group--"+c:"",t)},o.map(function(e,o){if(!a.isVisible(e,p))return null;var t=e&&e.mode||u;if("inline"===t||e&&"formula"===e.type)return r.renderControl(e,o,{formMode:"inline",key:o,className:l(e.className,e.columnClassName)});var s=e.columnRatio||a.getWidthRate(e&&e.columnClassName,!0);return n.default.createElement("div",{key:o,className:l(i+"Form-groupColumn",s?i+"Form-groupColumn--"+s:"",e&&e.columnClassName)},r.renderControl(e,o,{formHorizontal:f,formMode:t}))}))},r.prototype.renderInput=function(e){void 0===e&&(e=this.props);var r=e.direction;return"vertical"===r?this.renderVertical(e):this.renderHorizontal(e)},r.prototype.render=function(){var e=this.props,r=e.label,t=o.__rest(e,["label"]);return r?n.default.createElement(i.FormItemWrap,o.__assign({},t,{sizeMutable:!1,label:r,renderControl:this.renderInput})):this.renderInput()},r=o.__decorate([t.Renderer({test:/(^|\/)form(?:\/.+)?\/control\/(?:\d+\/)?group$/,name:"group-control"}),o.__metadata("design:paramtypes",[Object])],r)}(n.default.Component);r.ControlGroupRenderer=s});
|
|||
|
;/*!src/renderers/Form/InputGroup.tsx*/
|
|||
|
amis.define("fe6117b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputGroup=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),o=e("9a80175"),i=n.__importDefault(e("01e2bb4")),a=e("567b83c"),s=function(e){function t(t){var n=e.call(this,t)||this;return n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.state={isFocused:!1},n}return n.__extends(t,e),t.prototype.handleFocus=function(){this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.renderControl=function(e,t,r){var o=this.props,i=o.render,a=o.onChange;if(!e)return null;var s=e&&"control"===e.type?e:{type:"control",control:e};if(s.control){var u=s.control;u.hiddenOn&&(s.hiddenOn=u.hiddenOn),u.visibleOn&&(s.visibleOn=u.visibleOn)}return i(""+t,s,n.__assign({onChange:a},r))},t.prototype.validate=function(){var e=this.props,t=e.formStore,n=e.controls,r=[];return n.forEach(function(e){var n=e.name,o=n?t.getItemByName(n):null;o&&o.errors.length&&r.push.apply(r,o.errors)}),r.length?r:""},t.prototype.render=function(){var e=this,t=this.props,n=t.controls,a=t.className,s=t.mode,u=t.horizontal,l=t.formMode,d=t.formHorizontal,p=t.data,c=t.classnames;l=s||l,n=n.filter(function(e){if(e&&(e.hidden||e.visible===!1))return!1;var t=i.default(e||{},p);return t.hidden||t.visible===!1?!1:!0});var f=u||o.makeHorizontalDeeper(d,n.length);return r.default.createElement("div",{className:c("InputGroup",a,{"is-focused":this.state.isFocused})},n.map(function(t,n){var o=~["icon","plain","tpl","button","submit","reset"].indexOf(t&&t.type),i=e.renderControl(t,n,{formHorizontal:f,formMode:"normal",inputOnly:!0,key:n,onFocus:e.handleFocus,onBlur:e.handleBlur});return o?r.default.createElement("span",{key:n,className:c(t.addOnclassName,~["button","submit","reset"].indexOf(t&&t.type)?"InputGroup-btn":"InputGroup-addOn")},i):i}))},t}(r.default.Component);t.InputGroup=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([a.FormItem({type:"input-group",strictMode:!1})],t)}(s);t.default=u});
|
|||
|
;/*!src/renderers/HBox.tsx*/
|
|||
|
amis.define("aab7b91",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HBoxRenderer=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),s=e("0f9ebdf"),o=n.__importDefault(e("node_modules/classnames/index")),i=e("9a80175"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.renderChild=function(e,t){var n=this.props.render;return n(e,t)},t.prototype.renderColumn=function(e,t,s){var l=this.props,u=l.itemRender,a=l.data,d=l.classPrefix;if(!i.isVisible(e,a))return null;var p=n.__assign({width:e.width,height:e.height},e.style);return r.default.createElement("div",{key:t,className:o.default(d+"Hbox-col",e.columnClassName),style:p},u?u(e,t,s,this.props):this.renderChild("column/"+t,e))},t.prototype.renderColumns=function(){var e=this,t=this.props.columns;return t.map(function(n,r){return e.renderColumn(n,r,t.length)})},t.prototype.render=function(){var e=this.props,t=e.className,n=e.classnames;return r.default.createElement("div",{className:n("Hbox",t)},this.renderColumns())},t.propsList=["columns"],t.defaultProps={},t}(r.default.Component);t.default=l;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([s.Renderer({test:/(^|\/)hbox$/,name:"hbox"})],t)}(l);t.HBoxRenderer=u});
|
|||
|
;/*!src/renderers/VBox.tsx*/
|
|||
|
amis.define("ae1a7f3",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.VBoxRenderer=void 0;var t=e("node_modules/tslib/tslib"),n=t.__importDefault(e("node_modules/react/index")),s=e("0f9ebdf"),a=t.__importDefault(e("node_modules/classnames/index")),l=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r.prototype.renderChild=function(e,r){var t=this.props.render;return t(e,r)},r.prototype.renderCell=function(e,r){var t=this.props.classPrefix;return n.default.createElement("div",{className:a.default(t+"Vbox-cell",e.cellClassName)},this.renderChild("row/"+r,e))},r.prototype.render=function(){var e=this,r=this.props,t=r.className,s=r.rows,l=r.classPrefix;return n.default.createElement("div",{className:a.default(l+"Vbox",t)},Array.isArray(s)?s.map(function(r,t){return n.default.createElement("div",{className:a.default("row-row",r.rowClassName),key:t},e.renderCell(r,t))}):null)},r.propsList=["rows"],r.defaultProps={},r}(n.default.Component);r.default=l;var o=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r=t.__decorate([s.Renderer({test:/(^|\/)vbox$/,name:"vbox"})],r)}(l);r.VBoxRenderer=o});
|
|||
|
;/*!src/renderers/Images.tsx*/
|
|||
|
amis.define("011f81c",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagesFieldRenderer=t.ImagesField=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),i=e("0f9ebdf"),n=e("6a2dbb7"),s=e("f2e345e"),l=a.__importStar(e("fcb3580")),o=e("9a80175"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.list=[],t}a.__extends(t,e),t.prototype.handleEnlarge=function(e){var t=this.props,r=t.onImageEnlarge,i=t.src,s=t.originalSrc;r&&r(a.__assign(a.__assign({},e),{originalSrc:e.originalSrc||e.src,list:this.list.map(function(e){return{src:i?n.filter(i,e,"| raw"):e&&e.image||e,originalSrc:s?n.filter(s,e,"| raw"):e&&e.src||e,title:e&&(e.enlargeTitle||e.title),caption:e&&(e.enlargeCaption||e.description||e.caption)}})}),this.props)},t.prototype.render=function(){var e,t=this,a=this.props,i=a.className,o=a.defaultImage,d=a.thumbMode,c=a.thumbRatio,m=a.data,u=a.name,p=a.value,g=a.placeholder,f=a.classnames,h=a.source,_=a.delimiter,b=a.enlargeAble,y=a.src,v=a.originalSrc;return"string"==typeof h&&s.isPureVariable(h)?e=s.resolveVariable(h,m)||void 0:Array.isArray(p)?e=p:u&&m[u]&&(e=m[u]),"string"==typeof e?e=e.split(_):e&&!Array.isArray(e)&&(e=[e]),this.list=e,r.default.createElement("div",{className:f("ImagesField",i)},Array.isArray(e)?r.default.createElement("div",{className:f("Images")},e.map(function(e,a){return r.default.createElement(l.default,{index:a,className:f("Images-item"),key:a,src:(y?n.filter(y,e,"| raw"):e&&e.image)||e,originalSrc:(v?n.filter(v,e,"| raw"):e&&e.src)||e,title:e&&e.title,caption:e&&(e.description||e.caption),thumbMode:d,thumbRatio:c,enlargeAble:b,onEnlarge:t.handleEnlarge})})):o?r.default.createElement(l.default,{className:f("Images-item"),src:o,thumbMode:d,thumbRatio:c}):g)};var i;return t.defaultProps={className:"",delimiter:",",defaultImage:"https://fex.bdstatic.com/n/static/amis/renderers/crud/field/placeholder_cfad9b1.png",placehoder:"-",thumbMode:"contain",thumbRatio:"1:1"},a.__decorate([o.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(i="undefined"!=typeof l.ImageThumbProps&&l.ImageThumbProps)?i:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleEnlarge",null),t}(r.default.Component);t.ImagesField=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([i.Renderer({test:/(^|\/)images$/})],t)}(d);t.ImagesFieldRenderer=c});
|
|||
|
;/*!src/renderers/List.tsx*/
|
|||
|
amis.define("20f7ce6",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListItemFieldRenderer=t.ListItemRenderer=t.ListItem=t.ListRenderer=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),a=e("node_modules/react-dom/index"),i=e("0f9ebdf"),s=e("6a2dbb7"),l=n.__importDefault(e("a67acca")),o=n.__importDefault(e("0a43d97")),d=e("4e9b495"),c=e("9a80175"),u=e("f2e345e"),p=n.__importDefault(e("b497f17")),m=n.__importDefault(e("bcd7efc")),h=n.__importDefault(e("node_modules/sortablejs/Sortable")),f=e("f6086a9"),g=n.__importDefault(e("705a434")),b=e("b7bbd16"),y=function(e){function t(t){var n=e.call(this,t)||this;return n.handleAction=n.handleAction.bind(n),n.handleCheck=n.handleCheck.bind(n),n.handleCheckAll=n.handleCheckAll.bind(n),n.handleQuickChange=n.handleQuickChange.bind(n),n.handleSave=n.handleSave.bind(n),n.handleSaveOrder=n.handleSaveOrder.bind(n),n.reset=n.reset.bind(n),n.dragTipRef=n.dragTipRef.bind(n),n.getPopOverContainer=n.getPopOverContainer.bind(n),n.affixDetect=n.affixDetect.bind(n),n.bodyRef=n.bodyRef.bind(n),n.renderToolbar=n.renderToolbar.bind(n),n}return n.__extends(t,e),t.syncItems=function(e,t,n){var r=t.source,a=t.value||t.items,i=[],s=!0;if(Array.isArray(a))i=a;else if("string"==typeof r){var l=u.resolveVariable(r,t.data),o=n?u.resolveVariable(r,n.data):null;o&&o===l?s=!1:Array.isArray(l)&&(i=l)}s&&e.initItems(i),Array.isArray(t.selected)&&e.updateSelected(t.selected,t.valueField)},t.prototype.componentWillMount=function(){var e=this.props,n=e.store,r=e.selectable,a=e.draggable,i=e.orderBy,s=e.orderDir,l=e.multiple,o=e.hideCheckToggler,d=e.itemCheckableOn,c=e.itemDraggableOn;n.update({multiple:l,selectable:r,draggable:a,orderBy:i,orderDir:s,hideCheckToggler:o,itemCheckableOn:d,itemDraggableOn:c}),t.syncItems(n,this.props),this.syncSelected()},t.prototype.componentDidMount=function(){var e=c.getScrollParent(a.findDOMNode(this));e&&e!==document.body||(e=window),this.parentNode=e,this.affixDetect(),e.addEventListener("scroll",this.affixDetect),window.addEventListener("resize",this.affixDetect)},t.prototype.componentWillReceiveProps=function(e){var n=this.props,r=e.store;c.anyChanged(["selectable","draggable","orderBy","orderDir","multiple","hideCheckToggler","itemCheckableOn","itemDraggableOn"],n,e)&&r.update({multiple:e.multiple,selectable:e.selectable,draggable:e.draggable,orderBy:e.orderBy,orderDir:e.orderDir,hideCheckToggler:e.hideCheckToggler,itemCheckableOn:e.itemCheckableOn,itemDraggableOn:e.itemDraggableOn}),c.anyChanged(["source","value","items"],n,e)||!e.value&&!e.items&&e.data!==n.data?(t.syncItems(r,e,n),this.syncSelected()):n.selected!==e.selected&&r.updateSelected(e.selected||[],e.valueField)},t.prototype.componentWillUnmount=function(){var e=this.parentNode;e&&e.removeEventListener("scroll",this.affixDetect),window.removeEventListener("resize",this.affixDetect)},t.prototype.bodyRef=function(e){this.body=e},t.prototype.affixDetect=function(){if(this.props.affixHeader&&this.body){var e=this.props.classPrefix,t=a.findDOMNode(this),n=t.querySelector("."+e+"List-fixedTop");if(n){var r=this.body.getBoundingClientRect(),i=this.props.env.affixOffsetTop||0,s=r.top<i&&r.top+r.height-40>i;this.body.offsetWidth&&(n.style.cssText="top: "+i+"px;width: "+this.body.offsetWidth+"px;"),s?n.classList.add("in"):n.classList.remove("in")}}},t.prototype.getPopOverContainer=function(){return a.findDOMNode(this)},t.prototype.handleAction=function(e,t,n){var r=this.props.onAction;r(e,t,n)},t.prototype.handleCheck=function(e){e.toggle(),this.syncSelected()},t.prototype.handleCheckAll=function(){var e=this.props.store;e.toggleAll(),this.syncSelected()},t.prototype.syncSelected=function(){var e=this.props,t=e.store,n=e.onSelect;n&&n(t.selectedItems.map(function(e){return e.data}),t.unSelectedItems.map(function(e){return e.data}))},t.prototype.handleQuickChange=function(e,t,n,r){if(e.change(t,r),n&&!r){if(n&&n.api)return void this.props.onAction(null,{actionType:"ajax",api:n.api},t);var a=this.props,i=a.onSave,s=a.primaryField;i&&i(e.data,c.differe
|
|||
|
;/*!src/renderers/Operation.tsx*/
|
|||
|
amis.define("0341968",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationFieldRenderer=t.OperationField=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),i=e("0f9ebdf"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,i=e.buttons,s=e.render,a=e.classnames;return r.default.createElement("div",{className:a("OperationField",t)},Array.isArray(i)?i.map(function(e,t){return s(""+t,n.__assign({type:"button",size:e.size||"sm",level:e.level||(e.icon&&!e.label?"link":"")},e),{key:t})}):null)},t.propsList=["buttons","label"],t.defaultProps={},t}(r.default.Component);t.OperationField=s;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([i.Renderer({test:function(e){return/(^|\/)table\/(.*\/)operation$/.test(e)},name:"operation"})],t)}(s);t.OperationFieldRenderer=a});
|
|||
|
;/*!src/renderers/Page.tsx*/
|
|||
|
amis.define("100b8cb",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageRenderer=void 0;var a=e("node_modules/tslib/tslib"),o=a.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),r=e("57d76d7"),i=e("6a2dbb7"),s=e("9a80175"),l=e("919cbd9"),c=a.__importDefault(e("15e4197")),d=e("1caead1"),p=e("1953fc1"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.componentWillMount=function(){{var e=this.props;e.store,e.location}s.bulkBindFunctions(this,["handleAction","handleDialogConfirm","handleDialogClose","handleDrawerConfirm","handleDrawerClose","handleClick","reload","silentReload","initInterval"])},t.prototype.componentDidMount=function(){var e=this.props,t=e.initApi,a=e.initFetch,o=e.initFetchOn,n=e.store,r=e.messages;this.mounted=!0,d.isEffectiveApi(t,n.data,a,o)&&n.fetchInitData(t,n.data,{successMessage:r&&r.fetchSuccess,errorMessage:r&&r.fetchFailed}).then(this.initInterval)},t.prototype.componentWillReceiveProps=function(){{var e=this.props;e.store}},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.store,o=t.initApi;if(t.initFetchOn&&t.initFetch&&!e.initFetch||t.initFetch!==!1&&d.isApiOutdated(e.initApi,o,e.data,t.data)){var n=t.messages;d.isEffectiveApi(o,a.data)&&a.fetchData(o,a.data,{successMessage:n&&n.fetchSuccess,errorMessage:n&&n.fetchFailed}).then(this.initInterval)}},t.prototype.componentWillUnmount=function(){this.mounted=!1,clearTimeout(this.timer)},t.prototype.reloadTarget=function(){},t.prototype.handleAction=function(e,t,o,n){var r=this;void 0===n&&(n=!1);var l=this.props,c=l.env,d=l.store,p=l.messages;if("url"===t.actionType||"link"===t.actionType||"jump"===t.actionType){if(!c||!c.jumpTo)throw new Error("env.jumpTo is required!");c.jumpTo(i.filter(t.to||t.url||t.link,o,"| raw"),t,o)}else"dialog"===t.actionType?(d.setCurrentAction(t),d.openDialog(o)):"drawer"===t.actionType?(d.setCurrentAction(t),d.openDrawer(o)):"ajax"===t.actionType?(d.setCurrentAction(t),d.saveRemote(t.api,o,{successMessage:t.messages&&t.messages.success||p&&p.saveSuccess,errorMessage:t.messages&&t.messages.failed||p&&p.saveSuccess}).then(function(){return a.__awaiter(r,void 0,void 0,function(){var e;return a.__generator(this,function(a){switch(a.label){case 0:return t.feedback&&s.isVisible(t.feedback,d.data)?[4,this.openFeedback(t.feedback,d.data)]:[3,2];case 1:a.sent(),a.label=2;case 2:return e=t.redirect&&i.filter(t.redirect,d.data),e&&c.jumpTo(e,t),t.reload&&this.reloadTarget(t.reload,d.data),[2]}})})}).catch(function(){})):"copy"===t.actionType&&(t.content||t.copy)&&c.copy&&c.copy(i.filter(t.content||t.copy,o,"| raw"))},t.prototype.handleDialogConfirm=function(e,t){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];var r=this.props.store;t.mergeData&&1===e.length&&e[0]&&r.updateData(e[0]);var i=r.action.dialog;i&&i.onConfirm&&i.onConfirm.apply(i,a.__spreadArrays([e,t],o))===!1||r.closeDialog()},t.prototype.handleDialogClose=function(){var e=this.props.store;e.closeDialog()},t.prototype.handleDrawerConfirm=function(e,t){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];var r=this.props.store;t.mergeData&&1===e.length&&e[0]&&r.updateData(e[0]);var i=r.action.dialog;i&&i.onConfirm&&i.onConfirm.apply(i,a.__spreadArrays([e,t],o))===!1||r.closeDrawer()},t.prototype.handleDrawerClose=function(){var e=this.props.store;e.closeDrawer()},t.prototype.handleClick=function(e){var t=e.target,a=this.props.env;a&&"A"===t.tagName&&t.hasAttribute("data-link")&&(a.jumpTo(t.getAttribute("data-link")),e.preventDefault())},t.prototype.openFeedback=function(e,t){var a=this;return new Promise(function(o){var n=a.props.store;n.setCurrentAction({type:"button",actionType:"dialog",dialog:e}),n.openDialog(t,void 0,function(e){o(e)})})},t.prototype.reload=function(e,t,a,o){if(t)return this.receive(t);var n=this.props,r=n.store,i=n.initApi;clearTimeout(this.timer),d.isEffectiveApi(i,r.data)&&r.fetchData(i,r.data,{silent:o}).then(this.initInterval)},t.prototype.receive=function(e){var t=this.props.store;t.updateData(e),this.reloa
|
|||
|
;/*!src/renderers/Plain.tsx*/
|
|||
|
amis.define("9708de1",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PlainRenderer=n.Plain=void 0;var t=e("node_modules/tslib/tslib"),a=t.__importDefault(e("node_modules/react/index")),l=e("0f9ebdf"),r=e("6a2dbb7"),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.className,t=e.wrapperComponent,l=e.value,i=e.text,d=e.data,s=e.tpl,u=e.inline,o=e.placeholder,p=e.classnames,c=t||(u?"span":"div");return a.default.createElement(c,{className:p("PlainField",n)},s||i?r.filter(s||i,d):"undefined"==typeof l||""===l||null===l?a.default.createElement("span",{className:"text-muted"},o):String(l))},n.defaultProps={wrapperComponent:"",inline:!0,placeholder:"-"},n}(a.default.Component);n.Plain=i;var d=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n=t.__decorate([l.Renderer({test:/(^|\/)(?:plain|text)$/,name:"plain"})],n)}(i);n.PlainRenderer=d});
|
|||
|
;/*!src/renderers/Spinner.tsx*/
|
|||
|
amis.define("66c3054",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SpinnerRenderer=void 0;var t=e("node_modules/tslib/tslib"),r=t.__importDefault(e("acad559")),i=e("0f9ebdf"),d=t.__importDefault(e("node_modules/react/index")),o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.render=function(){return d.default.createElement(r.default,t.__assign({},this.props))},n=t.__decorate([i.Renderer({test:/(^|\/)spinner$/,name:"spinner"})],n)}(d.default.Component);n.SpinnerRenderer=o});
|
|||
|
;/*!src/renderers/Tpl.tsx*/
|
|||
|
amis.define("66d455f",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TplRenderer=t.Tpl=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),l=e("0f9ebdf"),i=e("6a2dbb7"),o=e("9a80175"),a=e("f2e345e"),s=function(e){function t(t){var n=e.call(this,t)||this;return n.htmlRef=n.htmlRef.bind(n),n}return n.__extends(t,e),t.prototype.componentDidUpdate=function(e){o.anyChanged(["data","tpl","html","text","raw","value"],this.props,e)&&this._render()},t.prototype.htmlRef=function(e){this.dom=e,this._render()},t.prototype.getContent=function(){var e=this.props,t=e.tpl,n=e.html,r=e.text,l=e.raw,o=e.value,s=e.data,p=e.placeholder;return l?l:n?i.filter(n,s):t?i.filter(t,s):r?a.escapeHtml(i.filter(r,s)):null==o||""===o?'<span class="text-muted">'+p+"</span>":"string"==typeof o?o:JSON.stringify(o)},t.prototype._render=function(){this.dom&&(this.dom.innerHTML=this.getContent())},t.prototype.render=function(){var e=this.props,t=e.className,n=e.wrapperComponent,l=e.inline,i=e.classnames,o=n||(l?"span":"div");return r.default.createElement(o,{children:this.getContent(),ref:this.htmlRef,className:i("TplField",t)})},t.defaultProps={inline:!0,placeholder:"",value:""},t}(r.default.Component);t.Tpl=s;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t=n.__decorate([l.Renderer({test:/(^|\/)(?:tpl|html)$/,name:"tpl"})],t)}(s);t.TplRenderer=p});
|
|||
|
;/*!src/renderers/Mapping.tsx*/
|
|||
|
amis.define("c2029c1",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MappingFieldRenderer=n.MappingField=void 0;var t=e("node_modules/tslib/tslib"),a=t.__importDefault(e("node_modules/react/index")),r=e("0f9ebdf"),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.render=function(){var e,n,t=this.props,r=t.className,i=t.placeholder,l=t.map,p=t.render,d=t.classnames,s=this.props.value,u=a.default.createElement("span",{className:"text-muted"},i);return s="string"==typeof s?s.trim():s,"undefined"!=typeof s&&l&&(null!==(e=l[s])&&void 0!==e?e:l["*"])&&(u=p("tpl",null!==(n=l[s])&&void 0!==n?n:s===!0&&l[1]?l[1]:s===!1&&l[0]?l[0]:l["*"])),a.default.createElement("span",{className:d("MappingField",r)},u)},n.defaultProps={placeholder:"-",map:{"*":"通配值"}},n}(a.default.Component);n.MappingField=i;var l=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n=t.__decorate([r.Renderer({test:/(^|\/)(?:map|mapping)$/,name:"mapping"})],n)}(i);n.MappingFieldRenderer=l});
|
|||
|
;/*!src/renderers/Progress.tsx*/
|
|||
|
amis.define("f52f675",function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ProgressFieldRenderer=s.ProgressField=void 0;var r=e("node_modules/tslib/tslib"),t=r.__importDefault(e("node_modules/react/index")),a=e("0f9ebdf"),l=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(s,e),s.prototype.autoClassName=function(e){var s=this.props.map,r=Math.floor(e*s.length/100);return r=Math.max(0,Math.min(s.length-1,r)),s[r]},s.prototype.render=function(){var e=this.props,s=e.className,r=e.placeholder,a=e.progressClassName,l=e.progressBarClassName,n=(e.map,e.showLabel),o=e.classnames,d=this.props.value,i=t.default.createElement("span",{className:"text-muted"},r);return/^\d*\.?\d+$/.test(d)&&(d=parseFloat(d)),"number"==typeof d&&(i=[t.default.createElement("div",{key:"progress",className:o("progress",a)},t.default.createElement("div",{className:o("progress-bar",l||this.autoClassName(d)),title:d+"%",style:{width:d+"%"}})),n?t.default.createElement("div",{key:"value"},d,"%"):null]),t.default.createElement("span",{className:o("ProgressField",s)},i)},s.defaultProps={placeholder:"-",progressClassName:"progress-xs progress-striped active m-b-none",progressBarClassName:"",map:["bg-danger","bg-warning","bg-info","bg-success","bg-success"],showLabel:!0},s}(t.default.Component);s.ProgressField=l;var n=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(s,e),s=r.__decorate([a.Renderer({test:/(^|\/)progress$/,name:"progress"})],s)}(l);s.ProgressFieldRenderer=n});
|
|||
|
;/*!src/renderers/Status.tsx*/
|
|||
|
amis.define("da6cdad",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusFieldRenderer=t.StatusField=void 0;var a=e("node_modules/tslib/tslib"),s=a.__importDefault(e("node_modules/react/index")),l=e("0f9ebdf"),n=e("6a2dbb7"),u=e("b7bbd16"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,a=e.placeholder,l=e.map,i=e.labelMap,r=e.classnames,d=e.data,c=this.props.value,o=s.default.createElement("span",{className:"text-muted"},a),p="";if(void 0!==c&&""!==c&&l){"boolean"==typeof c?c=c?1:0:/^\d+$/.test(c)&&(c=parseInt(c,10)||0),p="StatusField--"+c;var f=l[c]||"",m="";f=f.replace(/\bsvg-([^\s|$]+)\b/g,function(e,t){return m=t,"icon"}),m?o=s.default.createElement(u.Icon,{icon:m,className:r("Status-icon icon",f),key:"icon"}):f&&(o=s.default.createElement("i",{className:r("Status-icon",f),key:"icon"})),i&&i[c]&&(o=[o,s.default.createElement("span",{className:r("StatusField-label"),key:"label"},n.filter(i[c],d))])}return s.default.createElement("span",{className:r("StatusField",p,t)},o)},t.defaultProps={placeholder:"-",map:{0:"svg-fail",1:"svg-success",success:"svg-success",pending:"rolling",fail:"svg-fail",queue:"svg-warning",schedule:"svg-schedule"},labelMap:{success:"成功",pending:"运行中",fail:"失败",queue:"排队中",schedule:"调度中"}},t}(s.default.Component);t.StatusField=i;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t=a.__decorate([l.Renderer({test:/(^|\/)status$/,name:"status"})],t)}(i);t.StatusFieldRenderer=r});
|
|||
|
;/*!src/renderers/Json.tsx*/
|
|||
|
amis.define("386af39",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.JSONFieldRenderer=a.JSONField=void 0;var t=e("node_modules/tslib/tslib"),n=t.__importDefault(e("node_modules/react/index")),s=e("0f9ebdf"),r=t.__importDefault(e("node_modules/react-json-tree/lib/index")),d=e("9a80175"),o={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f",tree:{border:0,padding:"0 0.625em 0.425em",marginTop:"-0.25em",marginBottom:"0",marginLeft:"0",marginRight:0,listStyle:"none",MozUserSelect:"none",WebkitUserSelect:"none",backgroundColor:"rgba(255, 255, 255, 0.4)",whiteSpace:"nowrap",display:"inline-block",width:"100%"}},i={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53",tree:{border:0,padding:"0 0.625em 0.425em",marginTop:"-0.25em",marginBottom:"0",marginLeft:"0",marginRight:0,listStyle:"none",MozUserSelect:"none",WebkitUserSelect:"none",backgroundColor:"#2D2D2D",whiteSpace:"nowrap",display:"inline-block",width:"100%"}},l={twilight:o,eighties:i},c=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.shouldExpandNode=function(e,t,n){var s=a.props.levelExpand;return s>n},a}return t.__extends(a,e),a.prototype.valueRenderer=function(e){var a=this.props.classnames;return"string"==typeof e&&/^\"?https?:\/\//.test(e)?n.default.createElement("a",{className:a("JsonField-nodeValue"),href:e.replace(/^\"(.*)\"$/,"$1"),target:"_blank"},e):n.default.createElement("span",{className:a("JsonField-nodeValue")},e)},a.prototype.render=function(){var e=this.props,a=e.className,t=e.value,s=e.jsonTheme,d=e.classnames,o=t;if("string"==typeof t)try{o=JSON.parse(t)}catch(i){o={error:i.message}}var c=l[s]?l[s]:l.twilight;return n.default.createElement("div",{className:d("JsonField",a)},n.default.createElement(r.default,{data:o,theme:c,shouldExpandNode:this.shouldExpandNode,valueRenderer:this.valueRenderer}))},a.defaultProps={placeholder:"-",levelExpand:1,jsonTheme:"twilight"},t.__decorate([d.autobind,t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[Object]),t.__metadata("design:returntype",void 0)],a.prototype,"valueRenderer",null),a}(n.default.Component);a.JSONField=c;var b=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a=t.__decorate([s.Renderer({test:/(^|\/)json$/,name:"json"})],a)}(c);a.JSONFieldRenderer=b});
|
|||
|
;/*!src/renderers/Link.tsx*/
|
|||
|
amis.define("8f3f322",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LinkFieldRenderer=n.LinkField=void 0;var t=e("node_modules/tslib/tslib"),r=t.__importDefault(e("node_modules/react/index")),a=e("0f9ebdf"),l=e("6a2dbb7"),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.className,t=e.body,a=e.href,i=e.classnames,s=e.blank,d=e.htmlTarget,u=e.data,o=e.render,f=e.translate,c=this.props.value,m=a?l.filter(a,u):"";return r.default.createElement("a",{href:m||c,target:d||(s?"_blank":"_self"),className:i("Link",n)},t?o("body",t):m||c||f("链接"))},n.defaultProps={className:"",blank:!1},n}(r.default.Component);n.LinkField=i;var s=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n=t.__decorate([a.Renderer({test:/(^|\/)link$/,name:"link"})],n)}(i);n.LinkFieldRenderer=s});
|
|||
|
;/*!src/renderers/Switch.tsx*/
|
|||
|
amis.define("94e9d59",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SwitchFieldRenderer=a.SwitchField=void 0;var t=e("node_modules/tslib/tslib"),l=t.__importDefault(e("node_modules/react/index")),n=e("0f9ebdf"),d=t.__importDefault(e("node_modules/classnames/index")),i=t.__importDefault(e("aa2413a")),r=e("f2e345e"),s=function(e){function a(a){var t=e.call(this,a)||this;return t.handleChange=t.handleChange.bind(t),t}return t.__extends(a,e),a.prototype.handleChange=function(e){var a,t=this.props,l=t.onQuickChange,n=t.name,d=t.trueValue,i=t.falseValue,r=t.saveImmediately,s=t.readOnly,u=t.disabled;l&&!s&&!u&&l((a={},a[n]=e?d:i,a),r)},a.prototype.render=function(){var e=this.props,a=e.className,t=e.classPrefix,n=e.placeholder,s=e.trueValue,u=(e.falseValue,e.onQuickChange),o=e.option,c=e.disabled,h=e.name,f=e.data,m=this.props.value,p=l.default.createElement("span",{className:"text-muted"},n),_=!1;return void 0===m&&h&&(m=r.resolveVariable(h,f)),void 0!==m&&(_=!!o,p=l.default.createElement(i.default,{inline:!0,classPrefix:t,checked:m==s,onChange:this.handleChange,disabled:c||!u})),l.default.createElement("span",{className:d.default(t+"SwitchField",a)},p,_?o:null)},a.defaultProps={placeholder:"-",trueValue:!0,falseValue:!1,readOnly:!0,saveImmediately:!1},a}(l.default.Component);a.SwitchField=s;var u=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(a,e),a=t.__decorate([n.Renderer({test:/(^|\/)switch$/,name:"switch"})],a)}(s);a.SwitchFieldRenderer=u});
|
|||
|
;/*!src/renderers/Wizard.tsx*/
|
|||
|
amis.define("29937cf",function(t,e){"use strict";function a(t,e,a,n){var i=!1;return i=t&&t.hasOwnProperty("jumpable")?t.jumpable:t&&t.jumpableOn?c.evalExpression(t.jumpableOn,p.createObject(n,{currentStep:a})):a>e+1}Object.defineProperty(e,"__esModule",{value:!0}),e.WizardRenderer=void 0;var n=t("node_modules/tslib/tslib"),i=n.__importDefault(t("node_modules/react/index")),o=t("919cbd9"),r=t("0f9ebdf"),s=t("57d76d7"),d=t("8f9f9e3"),c=t("6a2dbb7"),p=t("9a80175"),l=t("1caead1"),u=t("1953fc1"),f=t("node_modules/react-dom/index"),h=t("67d35e6"),m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.affixDom=i.default.createRef(),e.footerDom=i.default.createRef(),e.initalValues={},e.state={currentStep:-1},e}n.__extends(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props,a=e.initApi,n=e.initFetch,i=e.initAsyncApi,o=e.initFinishedField,r=e.store,s=e.messages,d=s.fetchSuccess,c=s.fetchFailed,u=e.onInit;l.isEffectiveApi(a,r.data,n)?r.fetchInitData(a,r.data,{successMessage:d,errorMessage:c,onSuccess:function(){return l.isEffectiveApi(i,r.data)&&!r.data[o||"finished"]?p.until(function(){return r.checkRemote(i,r.data)},function(t){return t&&t[o||"finished"]},function(e){return t.asyncCancel=e}):void 0}}).then(function(e){u&&u(r.data);var a={currentStep:1};return e&&e.data&&("number"==typeof e.data.step||"string"==typeof e.data.step&&/^\d+$/.test(e.data.step))&&(a.currentStep=parseInt(e.data.step,10)),t.setState(a,function(){e&&e.data&&(e.data.submiting||e.data.submited)&&t.checkSubmit()}),e}):this.setState({currentStep:1},function(){return u&&u(r.data)});var m=f.findDOMNode(this),y=m?p.getScrollParent(m):null;y&&y!==document.body||(y=window),this.parentNode=y,y.addEventListener("scroll",this.affixDetect),this.unSensor=h.resizeSensor(m,this.affixDetect),this.affixDetect()},e.prototype.componentDidUpdate=function(t){var e=this.props,a=e.store,n=e.fetchSuccess,i=e.fetchFailed;l.isApiOutdated(t.initApi,e.initApi,t.data,e.data)&&a.fetchData(e.initApi,a.data,{successMessage:n,errorMessage:i})},e.prototype.componentWillUnmount=function(){this.asyncCancel&&this.asyncCancel();var t=this.parentNode;t&&t.removeEventListener("scroll",this.affixDetect),this.unSensor&&this.unSensor()},e.prototype.affixDetect=function(){if(this.props.affixFooter&&this.affixDom.current&&this.footerDom.current){var t=this.affixDom.current,e=this.footerDom.current,a=!1;if(e.offsetWidth&&(t.style.cssText="width: "+e.offsetWidth+"px;"),"always"===this.props.affixFooter)a=!0,e.classList.add("invisible2");else{var n=e.getBoundingClientRect(),i=window.innerHeight;a=n.top+n.height/2>i}a?t.classList.add("in"):t.classList.remove("in")}},e.prototype.gotoStep=function(t){var e=this.props.steps||[];t=Math.max(Math.min(e.length,t),1),this.setState({currentStep:t})},e.prototype.formRef=function(t){if(t){for(;t&&t.getWrappedInstance;)t=t.getWrappedInstance();this.form=t}else this.form=void 0},e.prototype.submitToTarget=function(){throw new Error("Please implements this!")},e.prototype.reloadTarget=function(){throw new Error("Please implements this!")},e.prototype.reload=function(t,e){var a=this;if(e)return this.receive(e);var n=this.props,i=n.initApi,o=n.initAsyncApi,r=n.initFinishedField,s=n.store,d=n.messages,c=d.fetchSuccess,u=d.fetchFailed;l.isEffectiveApi(i,s.data)&&1===this.state.currentStep&&s.fetchInitData(i,s.data,{successMessage:c,errorMessage:u,onSuccess:function(){return l.isEffectiveApi(o,s.data)&&!s.data[r||"finished"]?p.until(function(){return s.checkRemote(o,s.data)},function(t){return t&&t[r||"finished"]},function(t){return a.asyncCancel=t}):void 0}}).then(function(t){var e={currentStep:1};return t&&t.data&&("number"==typeof t.data.step||"string"==typeof t.data.step&&/^\d+$/.test(t.data.step))&&(e.currentStep=parseInt(t.data.step,10)),a.setState(e,function(){t&&t.data&&(t.data.submiting||t.data.submited)&&a.checkSubmit()}),t})},e.prototype.receive=function(t){var e=this.props.store;e.updateData(t),this.reload()},e.prototype.domRef=function(t){this.dom=t},e.prototype.getPopOverContainer=function(){return this.dom},e.pr
|
|||
|
;/*!src/renderers/Chart.tsx*/
|
|||
|
amis.define("3cbc777",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChartRenderer=t.Chart=void 0;var r=e("node_modules/tslib/tslib"),n=r.__importDefault(e("node_modules/react/index")),o=e("0f9ebdf"),a=e("57d76d7"),i=r.__importDefault(e("node_modules/classnames/index")),s=r.__importDefault(e("4783ce8")),c=e("67d35e6"),l=e("f2e345e"),d=e("1caead1"),h=e("919cbd9"),p=e("9a80175"),u=r.__importDefault(e("acad559")),f=function(t){function o(e){var r=t.call(this,e)||this;return r.refFn=r.refFn.bind(r),r.reload=r.reload.bind(r),r.handleClick=r.handleClick.bind(r),r}return r.__extends(o,t),o.prototype.componentWillMount=function(){var e=this.props,t=e.config,r=e.api,n=e.data,o=e.initFetch,a=e.source;if(this.mounted=!0,a&&l.isPureVariable(a)){var i=l.resolveVariableAndFilter(a,n,"| raw");i&&this.renderChart(i)}else r&&o!==!1&&this.reload();t&&this.renderChart(t)},o.prototype.componentDidUpdate=function(e){{var t=this.props;t.api&&t.api.url||t.api}if(d.isApiOutdated(e.api,t.api,e.data,t.data))this.reload();else if(t.source&&l.isPureVariable(t.source)){var r=e.source?l.resolveVariableAndFilter(e.source,e.data,"| raw"):null,n=l.resolveVariableAndFilter(t.source,t.data,"| raw");r!==n&&this.renderChart(n||{})}else t.config!==e.config&&this.renderChart(t.config||{})},o.prototype.componentWillUnmount=function(){this.mounted=!1,clearTimeout(this.timer)},o.prototype.handleClick=function(e){var t=this.props,r=t.onAction,n=t.clickAction,o=t.data;n&&r&&r(null,n,p.createObject(o,e))},o.prototype.refFn=function(t){var r=this,n=this.props.chartRef;t?e(["node_modules/echarts/index","node_modules/echarts/extension/dataTool/index","node_modules/echarts/extension/bmap/bmap","node_modules/echarts/map/js/china","node_modules/echarts/map/js/world"],function(e,o){window.echarts=e,e.dataTool=o,r.echarts=e.init(t),r.echarts.on("click",r.handleClick),r.unSensor=c.resizeSensor(t,function(){var e=t.offsetWidth,n=t.offsetHeight;r.echarts.resize({width:e,height:n})}),n&&n(r.echarts),r.renderChart()}):(n&&n(null),this.unSensor&&this.unSensor()),this.ref=t},o.prototype.reload=function(e,t){var r=this,n=this.props,o=n.api,a=n.env,i=n.store,s=n.interval;return t?this.receive(t):void(a&&a.fetcher&&d.isEffectiveApi(o,i.data)&&(clearTimeout(this.timer),this.reloadCancel&&(this.reloadCancel(),delete this.reloadCancel,this.echarts&&this.echarts.hideLoading()),this.echarts&&this.echarts.showLoading(),a.fetcher(o,i.data,{cancelExecutor:function(e){return r.reloadCancel=e}}).then(function(e){return e.ok?(delete r.reloadCancel,r.renderChart(e.data||{}),r.echarts&&r.echarts.hideLoading(),void(s&&r.mounted&&(r.timer=setTimeout(r.reload,Math.max(s,3e3))))):a.notify("error",e.msg||"加载失败,请重试!",void 0!==e.msgTimeout?{closeButton:!0,timeout:e.msgTimeout}:void 0)}).catch(function(e){a.isCancel(e)||(a.notify("error",e),r.echarts&&r.echarts.hideLoading())})))},o.prototype.receive=function(e){var t=this.props.store;t.updateData(e),this.reload()},o.prototype.renderChart=function(e){if(e&&(this.pending=e),this.echarts){var t=this.props.onDataFilter,r=this.props.dataFilter;t||"string"!=typeof r||(t=new Function("config","echarts",r)),e=e||this.pending,"string"==typeof e&&(e=new Function("return "+e)());try{t&&(e=t(e,window.echarts)||e)}catch(n){console.warn(n)}if(e)try{this.echarts.setOption(e,this.props.replaceChartOption)}catch(n){console.warn(n)}}},o.prototype.render=function(){var e=this,t=this.props,r=t.className,o=t.width,a=t.height,c=t.classPrefix,l=this.props.style||{};return o&&(l.width=o),a&&(l.height=a),n.default.createElement(s.default,{unMountOnHidden:!0,placeholder:n.default.createElement("div",{className:i.default(c+"Chart",r),style:l},n.default.createElement("div",{className:c+"Chart-placeholder"},n.default.createElement(u.default,{show:!0,icon:"reload",spinnerClassName:i.default("Chart-spinner")}))),component:function(){return n.default.createElement("div",{className:i.default(c+"Chart",r),style:l,ref:e.refFn})}})},o.defaultProps={offsetY:50,replaceChartOption:!1},o.propsList=[],o}(n.default.Component);t.Chart=f;var m=fu
|
|||
|
;/*!src/renderers/Video.tsx*/
|
|||
|
amis.define("4de0bd7",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoRenderer=t.HlsSource=t.FlvSource=void 0;var a=e("node_modules/tslib/tslib"),r=a.__importDefault(e("node_modules/react/index")),n=e("node_modules/video-react/dist/index"),o=e("9a80175"),s=a.__importDefault(e("node_modules/classnames/index")),i=e("0f9ebdf"),l=e("f2e345e"),u=e("6a2dbb7"),d=function(e){return e.indexOf(":")?e.split(":").reverse().reduce(function(e,t,a){return e+(parseInt(t,10)||0)*Math.pow(60,a)},0):parseInt(e,10)},c=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(n,t),n.prototype.componentDidMount=function(){var t=this,a=this.props,r=a.src,n=a.video,o=a.config,s=a.manager,i=a.isLive,l=a.autoPlay,u=a.actions;e(["node_modules/flv.js/dist/flv"],function(e){if(e.isSupported()){n=n||s.video&&s.video.video;var a=e.createPlayer({type:"flv",url:r,isLive:i},o);a.attachMediaElement(n),t.flvPlayer=a;var d,c=!1;s.subscribeToOperationStateChange(function(e){var t=e.operation.action;"play"===t?(clearTimeout(d),c||(c=!0,a.load()),a.play()):"pause"===t&&(a.pause(),i&&(d=setTimeout(function(){u.seek(0),a.unload(),c=!1},3e4)))}),a.on(e.Events.RECOVERED_EARLY_EOF,function(){alert("直播已经结束")}),a.on(e.Events.ERROR,function(){alert("视频加载失败")}),l&&setTimeout(function(){return u.play()},200)}})},n.prototype.componentWillUnmount=function(){this.flvPlayer&&(this.flvPlayer.unload(),this.flvPlayer.detachMediaElement())},n.prototype.render=function(){return r.default.createElement("source",{src:this.props.src,type:this.props.type||"video/x-flv"})},n}(r.default.Component);t.FlvSource=c;var p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(n,t),n.prototype.componentDidMount=function(){var t=this,a=this.props,r=a.src,n=a.video,o=(a.config,a.manager),s=(a.isLive,a.autoPlay),i=a.actions;e(["node_modules/hls.js/dist/hls"],function(e){if(e.isSupported()){n=n||o.video&&o.video.video;var a=t.hls=new e({autoStartLoad:!1});a.attachMedia(n),a.loadSource(r);var l=!1;o.subscribeToOperationStateChange(function(e){var t=e.operation.action;"play"===t?(l||(l=!0,a.startLoad()),n.play()):"pause"===t&&(n.pause(),a.stopLoad(),l=!1)}),s&&setTimeout(i.play,200)}})},n.prototype.componentWillUnmount=function(){this.hls&&(this.hls.stopLoad(),this.hls.detachMedia())},n.prototype.render=function(){return r.default.createElement("source",{src:this.props.src,type:this.props.type||"application/x-mpegURL"})},n}(r.default.Component);t.HlsSource=p;var f=function(e){function t(t){var a=e.call(this,t)||this;return a.state={posterInfo:null,videoState:{}},a.frameRef=a.frameRef.bind(a),a.cursorRef=a.cursorRef.bind(a),a.playerRef=a.playerRef.bind(a),a.onImageLoaded=a.onImageLoaded.bind(a),a.onClick=a.onClick.bind(a),a}return a.__extends(t,e),t.prototype.onImageLoaded=function(e){var t=this,a=new Image;a.onload=function(){t.setState({posterInfo:{width:a.width,height:a.height}}),a=a.onload=null},a.src=e.target.getAttribute("src")},t.prototype.frameRef=function(e){this.frameDom=e},t.prototype.cursorRef=function(e){this.cursorDom=e},t.prototype.playerRef=function(e){var t=this;this.player=e,e&&e.subscribeToStateChange(function(e){if(t.setState({videoState:e}),t.frameDom&&t.times){for(var a=t.props.jumpBufferDuration||0,r=0,n=t.times,o=n.length;o-1>r&&!(n[r+1]&&e.currentTime<n[r+1]-a);)r++;t.currentIndex!==r&&t.moveCursorToIndex(r)}})},t.prototype.moveCursorToIndex=function(e){var t=this.props.classPrefix;if(this.frameDom&&this.cursorDom){var a=this.frameDom.querySelectorAll("."+t+"Video-frame");if(a&&a.length&&a[e]){this.currentIndex=e;var r=a[e],n=this.frameDom.getBoundingClientRect(),o=r.getBoundingClientRect();this.cursorDom.setAttribute("style","width: "+(o.width-4)+"px; height: "+(o.height-4)+"px; left: "+(o.left+2-n.left)+"px; top: "+(o.top+2-n.top)+"px;")}}},t.prototype.jumpToIndex=function(e){if(this.times&&this.player&&this.props.jumpFrame){var t=this.props.jumpBufferDuration||0,a=this.times,r=this.player;r.seek(a[e]-t),r.play()}},t.prototype.onClick=function(
|
|||
|
;/*!src/renderers/Audio.tsx*/
|
|||
|
amis.define("211dcc3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AudioRenderer=t.Audio=void 0;var a=e("node_modules/tslib/tslib"),o=a.__importDefault(e("node_modules/react/index")),n=a.__importDefault(e("node_modules/lodash/upperFirst")),i=e("0f9ebdf"),s=e("9a80175"),r=e("b7bbd16"),d=e("f2e345e"),u=e("6a2dbb7"),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={src:t.props.value||(t.props.src?u.filter(t.props.src,t.props.data):"")||d.resolveVariable(t.props.name,t.props.data)||"",isReady:!1,muted:!1,playing:!1,played:0,seeking:!1,volume:.8,prevVolume:.8,loaded:0,playbackRate:1,showHandlePlaybackRate:!1,showHandleVolume:!1},t}return a.__extends(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationTimeout)},t.prototype.componentDidMount=function(){var e=this.props.autoPlay,t=e?!0:!1;this.setState({playing:t},this.progress)},t.prototype.componentWillReceiveProps=function(e){var t=this,a=this.props;(a.value!==e.value||u.filter(a.src,a.data)!==u.filter(e.src,e.data))&&this.setState({src:e.value||u.filter(e.src,e.data),playing:!1},function(){t.audio.load(),t.progress()})},t.prototype.progress=function(){if(clearTimeout(this.progressTimeout),this.state.src&&this.audio){var e=this.audio.currentTime||0,t=this.audio.duration,a=e/t,o=this.state.playing;o=1!=a&&o?!0:!1,this.setState({played:a,playing:o}),this.progressTimeout=setTimeout(this.progress,this.props.progressInterval/this.state.playbackRate)}},t.prototype.audioRef=function(e){this.audio=e},t.prototype.load=function(){this.setState({isReady:!0})},t.prototype.handlePlaybackRate=function(e){this.audio.playbackRate=e,this.setState({playbackRate:e,showHandlePlaybackRate:!1})},t.prototype.handleMute=function(){if(this.state.src){var e=this.state,t=e.muted,a=e.prevVolume,o=t?a:0;this.audio.muted=!t,this.setState({muted:!t,volume:o})}},t.prototype.handlePlaying=function(){if(this.state.src){var e=this.state.playing;e?this.audio.pause():this.audio.play(),this.setState({playing:!e})}},t.prototype.getCurrentTime=function(){if(!this.audio||!this.state.src||!this.state.isReady)return"0:00";var e=this.audio.duration,t=this.state.played;return this.formatTime(e*(t||0))},t.prototype.getDuration=function(){if(!this.audio||!this.state.src)return"0:00";if(!this.state.isReady)return this.onDurationCheck(),"0:00";var e=this.audio,t=e.duration,a=e.seekable;return 1/0===t&&a.length>0?a.end(a.length-1):this.formatTime(t)},t.prototype.onDurationCheck=function(){clearTimeout(this.durationTimeout);var e=this.audio&&this.audio.duration;e||(this.audio.load(),this.durationTimeout=setTimeout(this.onDurationCheck,500))},t.prototype.onSeekChange=function(e){if(this.state.src){var t=e.target.value;this.setState({played:t})}},t.prototype.onSeekMouseDown=function(){this.setState({seeking:!0})},t.prototype.onSeekMouseUp=function(e){if(this.state.seeking){var t=e.target.value,a=this.audio.duration;this.audio.currentTime=a*t;var o=this.props.loop,n=this.state.playing;n=1>t||o?n:!1,this.setState({playing:n,seeking:!1})}},t.prototype.setVolume=function(e){if(this.state.src){var t=e.target.value;this.audio.volume=t,this.setState({volume:t,prevVolume:t})}},t.prototype.formatTime=function(e){var t=new Date(1e3*e),a=t.getUTCHours(),o=t.getUTCMinutes(),n=this.pad(t.getUTCSeconds());return a?a+":"+this.pad(o)+":"+n:o+":"+n},t.prototype.pad=function(e){return("0"+e).slice(-2)},t.prototype.toggleHandlePlaybackRate=function(){this.state.src&&this.setState({showHandlePlaybackRate:!this.state.showHandlePlaybackRate})},t.prototype.toggleHandleVolume=function(e){this.state.src&&this.setState({showHandleVolume:e})},t.prototype.renderRates=function(){var e=this,t=this.props,a=t.rates,n=t.classnames,i=this.state,s=i.showHandlePlaybackRate,r=i.playbackRate;return a&&a.length?s?o.default.createElement("div",{className:n("Audio-rateControl")},a.map(function(t,a){return o.default.createElement("div",{key:a,className:n("Audio-rateControlItem"),onClick:function(){return e.handlePlaybackRate(t)}},"x",t.toFi
|
|||
|
;/*!src/renderers/Nav.tsx*/
|
|||
|
amis.define("e6d92e6",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationRenderer=t.Navigation=void 0;var n=e("node_modules/tslib/tslib"),i=n.__importDefault(e("node_modules/react/index")),a=e("0f9ebdf"),r=n.__importDefault(e("01e2bb4")),s=e("6a2dbb7"),o=e("9a80175"),l=e("f2e345e"),c=e("1caead1"),u=e("919cbd9"),d=e("256b65d"),p=e("b7bbd16"),f=function(e){function t(t){var n=e.call(this,t)||this;return n.mounted=!0,n.renderItem=n.renderItem.bind(n),n.state={links:n.syncLinks(t,t.source&&"string"==typeof t.source&&l.isPureVariable(t.source)&&l.resolveVariable(t.source,t.data)||t.links)},n}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props.source;e&&!l.isPureVariable(e)&&this.reload()},t.prototype.componentWillReceiveProps=function(e){var t=this.props;if(e.source&&l.isPureVariable(e.source))if(e.source!==t.source)this.setState({links:this.syncLinks(e)});else{var n=l.resolveVariable(e.source,e.data),i=l.resolveVariable(t.source,t.data);n!==i&&this.setState({links:this.syncLinks(e,n)})}else t.links!==e.links?this.setState({links:this.syncLinks(e)}):e.location&&t.location!==e.location&&this.setState({links:this.syncLinks(e,this.state.links,!0)})},t.prototype.componentDidUpdate=function(e){var t=this.props;t.source&&!l.isPureVariable(t.source)&&c.isApiOutdated(e.source,t.source,e.data,t.data)&&this.reload()},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.reload=function(e,t,n){var i=this;if(t)return this.receive(t);var a=this.props,r=a.data,l=a.env,u=a.source,d=a.translate,p=n?o.createObject(r,n):r;c.isEffectiveApi(u,r)&&l.fetcher(u,p).then(function(e){if(i.mounted)if(e.ok){var t=Array.isArray(e.data)?e.data:e.data.links||e.data.options||e.data.items||e.data.rows;if(!Array.isArray(t))throw new Error("\bpayload.data.options is not array.");i.setState({links:i.syncLinks(i.props,t)},function(){e.data&&e.data.value&&!o.someTree(i.state.links,function(e){return e.active})&&l.jumpTo(s.filter(e.data.value,r))})}else i.setState({error:e.msg||d("获取链接错误")})}).catch(function(e){return i.mounted&&i.setState({error:e.message})})},t.prototype.receive=function(e){{var t=this.props;t.store,t.initApi}this.reload(void 0,void 0,e)},t.prototype.syncLinks=function(e,t,i){void 0===t&&(t=e.links);var a=e.data,l=e.env;return Array.isArray(t)&&t.length?o.mapTree(t,function(e){return n.__assign(n.__assign(n.__assign({},e),r.default(e,a)),{active:!i&&e.active||(e.activeOn?s.evalExpression(e.activeOn,a):!!(e.hasOwnProperty("to")&&l&&l.isCurrentUrl(s.filter(e.to,a)))),unfolded:e.unfolded||e.children&&e.children.some(function(e){return!!e.active})})},1,!0):[]},t.prototype.handleClick=function(e){var t=this.props,n=t.env,i=t.data,a=t.onSelect;if(!a||a(e)!==!1)return e.to?void(n&&n.jumpTo(s.filter(e.to,i),e)):void(e.children&&e.children.length&&this.toggleLink(e))},t.prototype.toggleLink=function(e){this.setState({links:o.mapTree(this.state.links,function(t){return e===t?n.__assign(n.__assign({},t),{unfolded:!t.unfolded}):t})})},t.prototype.renderItem=function(e,t){var n=this;if(e.hidden===!0||e.visible===!1)return null;var a=!!e.active,r=this.props,s=r.disabled,o=r.togglerClassName,l=r.classnames;return i.default.createElement("li",{key:t,className:l("Nav-item",e.className,{"is-disabled":s||e.disabled,"is-active":a,"is-unfolded":e.unfolded})},i.default.createElement("a",{onClick:this.handleClick.bind(this,e)},e.icon?i.default.createElement("i",{className:l("Nav-itemIcon",e.icon)}):null,e.label),e.children&&e.children.length?i.default.createElement("span",{onClick:function(){return n.toggleLink(e)},className:l("Nav-itemToggler",o)},i.default.createElement(p.Icon,{icon:"caret",className:"icon"})):null,e.children&&e.children.length?i.default.createElement("ul",{className:l("Nav-subItems")},e.children.map(function(e,t){return n.renderItem(e,t)})):null)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.stacked,a=e.classnames,r=this.state.links;return i.default.createElement("ul",{className:a("Nav",t,n?"Nav--stacked":"Nav--tabs")},r.map(this.r
|
|||
|
;/*!src/renderers/Tasks.tsx*/
|
|||
|
amis.define("59d3d63",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskRenderer=void 0;var a=t("node_modules/tslib/tslib"),s=a.__importDefault(t("node_modules/react/index")),n=t("0f9ebdf"),i=a.__importDefault(t("node_modules/classnames/index")),r=a.__importDefault(t("node_modules/react-addons-update/index")),l=t("1caead1"),o=t("919cbd9"),u=a.__importDefault(t("acad559")),d=function(t){function e(e){var a=t.call(this,e)||this;return a.state={items:e.items?e.items.concat():[]},a.handleLoaded=a.handleLoaded.bind(a),a.tick=a.tick.bind(a),a}return a.__extends(e,t),e.prototype.componentDidMount=function(){this.tick(!!this.props.checkApi)},e.prototype.componentWillReceiveProps=function(t){var e=this.props;e.items!==t.items&&this.setState({items:t.items?t.items.concat():[]})},e.prototype.componentDidUpdate=function(t){var e=this.props;l.isApiOutdated(t.checkApi,e.checkApi,t.data,e.data)&&this.tick(!0)},e.prototype.componentWillUnmount=function(){clearTimeout(this.timer)},e.prototype.reload=function(){this.tick(!0)},e.prototype.tick=function(t){var e=this;void 0===t&&(t=!1);var a=this.props,s=a.loadingStatusCode,n=a.data,i=a.interval,r=a.checkApi,o=a.env,u=this.state.items;return clearTimeout(this.timer),t||u.some(function(t){return t.status===s})?i&&!l.isEffectiveApi(r)?alert("checkApi 没有设置, 不能及时获取任务状态"):void(l.isEffectiveApi(r,n)&&o&&o.fetcher(r,n).then(this.handleLoaded).catch(function(t){return e.setState({error:t})})):void 0},e.prototype.handleLoaded=function(t){if(!Array.isArray(t.data))return alert("返回格式不正确, 期望 response.data 为数组, 包含每个 task 的状态信息");this.setState({items:t.data});var e=this.props.interval;clearTimeout(this.timer),this.timer=setTimeout(this.tick,e)},e.prototype.submitTask=function(t,e,s){var n=this;void 0===s&&(s=!1);var i=this.props,o=i.submitApi,u=i.reSubmitApi,d=i.loadingStatusCode,c=i.errorStatusCode,m=i.data,p=i.env;if(!s&&!l.isEffectiveApi(o))return alert("submitApi 没有配置");if(s&&!l.isEffectiveApi(u))return alert("reSubmitApi 没有配置");this.setState(r.default(this.state,{items:{$splice:[[e,1,a.__assign(a.__assign({},t),{status:d})]]}}));var f=s?u:o;l.isEffectiveApi(f,m)&&p&&p.fetcher(f,a.__assign(a.__assign({},m),t)).then(function(t){if(t&&t.data)if(Array.isArray(t.data))n.handleLoaded(t);else{var e=(f&&f.replaceData,n.state.items.map(function(e){return e.key===t.data.key?a.__assign(a.__assign({},f.replaceData?{}:e),t.data):e}));n.handleLoaded(a.__assign(a.__assign({},t),{data:e}))}else clearTimeout(n.timer),n.timer=setTimeout(n.tick,4)}).catch(function(s){return n.setState(r.default(n.state,{items:{$splice:[[e,1,a.__assign(a.__assign({},t),{status:c,remark:s.message||s})]]}}))})},e.prototype.render=function(){var t=this,e=this.props,a=e.className,n=e.tableClassName,r=e.taskNameLabel,l=e.operationLabel,o=e.statusLabel,d=e.remarkLabel,c=e.btnText,m=e.retryBtnText,p=e.btnClassName,f=e.retryBtnClassName,h=e.statusLabelMap,b=e.statusTextMap,_=e.readyStatusCode,k=e.loadingStatusCode,v=e.canRetryStatusCode,y=e.render,E=this.state.items,C=this.state.error;return s.default.createElement("div",{className:a},s.default.createElement("table",{className:n},s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",null,r),s.default.createElement("th",null,l),s.default.createElement("th",null,o),s.default.createElement("th",null,d))),s.default.createElement("tbody",null,C?s.default.createElement("tr",null,s.default.createElement("td",{colSpan:4},s.default.createElement("div",{className:"text-danger"},C))):E.map(function(e,a){return s.default.createElement("tr",{key:a},s.default.createElement("td",null,e.label),s.default.createElement("td",null,e.status==k?s.default.createElement(u.default,{show:!0,icon:"reload",spinnerClassName:i.default("Task-spinner")}):e.status==v?s.default.createElement("a",{onClick:function(){return t.submitTask(e,a,!0)},className:i.default("btn",f||p)},m||c):s.default.createElement("a",{onClick:function(){return t.submitTask(e,a)},className:
|
|||
|
;/*!src/renderers/Drawer.tsx*/
|
|||
|
amis.define("a1b9b52",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawerRenderer=void 0;var o=e("node_modules/tslib/tslib"),n=o.__importDefault(e("node_modules/react/index")),r=e("919cbd9"),a=e("0f9ebdf"),i=o.__importDefault(e("01a937e")),s=o.__importDefault(e("node_modules/lodash/findLast")),l=e("9a80175"),d=e("node_modules/mobx/lib/index"),p=e("node_modules/react-dom/index"),c=e("4550477"),h=e("6a2dbb7"),u=e("1953fc1"),f=function(e){function t(t){var o=e.call(this,t)||this;return o.$$id=l.guid(),o.state={resizeCoord:0},o.handleSelfClose=o.handleSelfClose.bind(o),o.handleAction=o.handleAction.bind(o),o.handleDrawerConfirm=o.handleDrawerConfirm.bind(o),o.handleDrawerClose=o.handleDrawerClose.bind(o),o.handleDialogConfirm=o.handleDialogConfirm.bind(o),o.handleDialogClose=o.handleDialogClose.bind(o),o.handleChildFinished=o.handleChildFinished.bind(o),o.resizeMouseDown=o.resizeMouseDown.bind(o),o.bindResize=o.bindResize.bind(o),o.removeResize=o.removeResize.bind(o),o.handleExisted=o.handleExisted.bind(o),o.handleFormInit=o.handleFormInit.bind(o),o.handleFormChange=o.handleFormChange.bind(o),o.handleFormSaved=o.handleFormSaved.bind(o),o}return o.__extends(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props.store;this.reaction=d.reaction(function(){return""+t.loading+t.error},function(){return e.forceUpdate()})},t.prototype.componentWillUnmount=function(){this.reaction&&this.reaction()},t.prototype.buildActions=function(){var e=this.props,t=e.actions,o=e.confirm,n=e.translate;if("undefined"!=typeof t)return t;var r=[];return r.push({type:"button",actionType:"close",label:n("取消")}),o&&r.push({type:"button",actionType:"confirm",label:n("确认"),primary:!0}),r},t.prototype.handleSelfClose=function(){var e=this.props,t=e.onClose,o=e.store;o.dialogOpen===!1&&o.drawerOpen===!1&&(o.updateMessage(),t())},t.prototype.handleAction=function(e,t,o){var n=this.props,r=n.onClose,a=n.onAction;"close"===t.actionType||"cancel"===t.actionType?r():a&&a(e,t,o)},t.prototype.handleDrawerConfirm=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=this.props.store;t.mergeData&&1===e.length&&e[0]&&a.updateData(e[0]);var i=a.action,s=i.drawer;s.onConfirm&&s.onConfirm.apply(s,o.__spreadArrays([e,t],n))===!1||a.closeDrawer()},t.prototype.handleDrawerClose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=this.props.store,n=o.action,r=n.drawer;r.onClose&&r.onClose.apply(r,e)===!1||o.closeDrawer()},t.prototype.handleDialogConfirm=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=this.props.store;t.mergeData&&1===e.length&&e[0]&&a.updateData(e[0]);var i=a.action,s=i.dialog;s.onConfirm&&s.onConfirm.apply(s,o.__spreadArrays([e,t],n))===!1||a.closeDialog()},t.prototype.handleDialogClose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=this.props.store,n=o.action,r=n.dialog;r.onClose&&r.onClose.apply(r,e)===!1||o.closeDialog()},t.prototype.handleChildFinished=function(){},t.prototype.handleFormInit=function(e){var t=this.props.store;t.setFormData(e)},t.prototype.handleFormChange=function(e){var t=this.props.store;t.setFormData(e)},t.prototype.handleFormSaved=function(e,t){var n=this.props.store;n.setFormData(o.__assign(o.__assign({},e),t))},t.prototype.handleExisted=function(){var e=this.props.store;e.reset()},t.prototype.getPopOverContainer=function(){return p.findDOMNode(this).querySelector("."+this.props.classPrefix+"Drawer-content")},t.prototype.renderBody=function(e,t){var n=this,r=this.props,a=r.render,i=r.store;if(Array.isArray(e))return e.map(function(e,t){return n.renderBody(e,t)});var s=e,l={key:t,disabled:i.loading,onAction:this.handleAction,onFinished:this.handleChildFinished,popOverContainer:this.getPopOverContainer,onChange:this.handleFormChange,onInit:this.handleFormInit,onSaved:this.handleFormSaved};return"form"===s.type&&(s=o.__assign({mode:"horizontal",wrapWithPanel:!1,submitText:null},s)),a("body"+(t?"/"+t:""),s,l)},t.prototype.renderFooter=function(){var e=this,t=this.buildAc
|
|||
|
;/*!src/renderers/Wrapper.tsx*/
|
|||
|
amis.define("6a16931",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WrapperRenderer=void 0;var t=e("node_modules/tslib/tslib"),n=t.__importDefault(e("node_modules/react/index")),s=e("0f9ebdf"),a=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r.prototype.renderBody=function(){var e=this.props,r=e.children,t=e.body,n=e.render;return r?"function"==typeof r?r(this.props):r:t?n("body",t):null},r.prototype.render=function(){var e=this.props,r=e.className,t=e.size,s=e.classnames;return n.default.createElement("div",{className:s("Wrapper",t?"Wrapper--"+t:"",r)},this.renderBody())},r.propsList=["body","className","children","size"],r.defaultProps={className:"bg-white"},r}(n.default.Component);r.default=a;var o=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r=t.__decorate([s.Renderer({test:/(^|\/)wrapper$/,name:"wrapper"})],r)}(a);r.WrapperRenderer=o});
|
|||
|
;/*!src/renderers/IFrame.tsx*/
|
|||
|
amis.define("f277389",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameRenderer=void 0;var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),o=e("0f9ebdf"),r=e("9a80175"),i=e("919cbd9"),s=e("1caead1"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.IFrameRef=n.default.createRef(),t.state={width:t.props.width||"100%",height:t.props.height||"100%"},t}a.__extends(t,e),t.prototype.componentDidMount=function(){window.addEventListener("message",this.onMessage)},t.prototype.componentDidUpdate=function(e){var t=this.props.data;t!==e.data&&this.postMessage("update",t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("message",this.onMessage)},t.prototype.onMessage=function(e){var t=this.props,a=t.events,n=t.onAction,o=t.data;if(e.data&&""!==e.data&&a){var i=e.data.type.split(":"),s=i[0],d=i[1];if("amis"===s&&d)if("resize"===d&&e.data.data)this.setState({width:e.data.data.width||"100%",height:e.data.data.height||"100%"});else{var p=a[d];p&&n(e,p,r.createObject(o,e.data.data))}}},t.prototype.onLoad=function(){var e=this.props,t=e.src,a=e.data;t&&this.postMessage("init",a)},t.prototype.reload=function(e,t){if(t)return this.receive(t);var a=this.props,n=a.src,o=a.data;n&&(this.IFrameRef.current.src=s.buildApi(n,o).url)},t.prototype.receive=function(e){var t=this.props,a=t.src,n=t.data;a&&(this.IFrameRef.current.src=s.buildApi(a,r.createObject(n,e)).url,this.postMessage("receive",r.createObject(n,e)))},t.prototype.postMessage=function(e,t){var a;null===(a=this.IFrameRef.current.contentWindow)||void 0===a?void 0:a.postMessage({type:"amis:"+e,data:t},"*")},t.prototype.render=function(){var e=this.state,t=e.width,o=e.height,r=this.props,i=r.className,d=r.src,p=r.frameBorder,c=r.data,u=r.style;return u=a.__assign({},u),void 0!==t&&(u.width=t),void 0!==o&&(u.height=o),n.default.createElement("iframe",{className:i,frameBorder:p,style:u,ref:this.IFrameRef,onLoad:this.onLoad,src:d?s.buildApi(d,c).url:void 0})};var o;return t.propsList=["src","className"],t.defaultProps={className:"",frameBorder:0},a.__decorate([r.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",["function"==typeof(o="undefined"!=typeof MessageEvent&&MessageEvent)?o:Object]),a.__metadata("design:returntype",void 0)],t.prototype,"onMessage",null),a.__decorate([r.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],t.prototype,"onLoad",null),a.__decorate([r.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object,Object]),a.__metadata("design:returntype",void 0)],t.prototype,"reload",null),a.__decorate([r.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],t.prototype,"receive",null),a.__decorate([r.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[String,Object]),a.__metadata("design:returntype",void 0)],t.prototype,"postMessage",null),t}(n.default.Component);t.default=d;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.componentWillMount=function(){var e=this.context;e.registerComponent(this)},t.prototype.componentWillUnmount=function(){var e=this.context;e.unRegisterComponent(this)},t.contextType=i.ScopedContext,t=a.__decorate([o.Renderer({test:/(^|\/)iframe$/,name:"iframe"})],t)}(d);t.IFrameRenderer=p});
|
|||
|
;/*!src/renderers/QRCode.tsx*/
|
|||
|
amis.define("06e3087",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.QRCodeControlRenderer=r.QRCodeRenderer=void 0;var t=e("node_modules/tslib/tslib"),o=t.__importDefault(e("node_modules/react/index")),l=t.__importDefault(e("node_modules/classnames/index")),n=e("0f9ebdf"),a=e("567b83c"),d=e("6a2dbb7"),s=t.__importDefault(e("node_modules/qrcode.react/lib/index")),u=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r.prototype.render=function(){var e=this.props,r=e.className,t=e.qrcodeClassName,n=e.codeSize,a=e.backgroundColor,u=e.foregroundColor,c=e.placeholder,i=e.level,f=e.value,m=e.data,p=e.classPrefix,_=d.filter(f,m,"| raw");return o.default.createElement("div",{className:l.default(p+"QrCode",r)},_?_.length>2953?o.default.createElement("span",{className:"text-danger"},"二维码值过长,请设置2953个字符以下的文本"):o.default.createElement(s.default,{className:t,value:_,renderAs:"svg",size:n,bgColor:a,fgColor:u,level:i||"L"}):o.default.createElement("span",{className:p+"QrCode--placeholder"},c))},r.defaultProps={codeSize:128,qrcodeClassName:"",backgroundColor:"#fff",foregroundColor:"#000",level:"L",placeholder:"-"},r}(o.default.Component);r.default=u;var c=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r=t.__decorate([n.Renderer({test:/(^|\/)qr\-?code$/,name:"qrcode"})],r)}(u);r.QRCodeRenderer=c;var i=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r=t.__decorate([a.FormItem({type:"qr-code",sizeMutable:!1})],r)}(u);r.QRCodeControlRenderer=i});
|
|||
|
;/*!src/renderers/Icon.tsx*/
|
|||
|
amis.define("b81abcd",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TplRenderer=n.Icon=void 0;var t=e("node_modules/tslib/tslib"),r=t.__importDefault(e("node_modules/react/index")),o=e("0f9ebdf"),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.icon,t=e.vendor,o=e.classnames,i=e.className;return r.default.createElement("i",{className:o("iconfont"===t?"iconfont icon-"+n:t+" "+t+"-"+n,i)})},n.defaultProps={icon:"",vendor:"fa"},n}(r.default.Component);n.Icon=i;var s=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n=t.__decorate([o.Renderer({test:/(^|\/)icon$/,name:"icon"})],n)}(i);n.TplRenderer=s});
|
|||
|
;/*!src/renderers/Carousel.tsx*/
|
|||
|
amis.define("f39bdac",function(e,t){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.CarouselRenderer=t.Carousel=void 0;var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),o=n.__importStar(e("node_modules/react-transition-group/Transition")),i=e("0f9ebdf"),s=e("f2e345e"),d=e("9a80175"),l=e("b7bbd16"),u=(a={},a[o.ENTERING]="in",a[o.ENTERED]="in",a[o.EXITING]="out",a),p={type:"tpl",tpl:"\n <% if (data.hasOwnProperty('image')) { %>\n <div style=\"background-image: url('<%= data.image %>'); background-size: contain; background-repeat: no-repeat; background-position: center center;\" class=\"image <%= data.imageClassName %>\"></div>\n <% if (data.hasOwnProperty('title')) { %>\n <div class=\"title <%= data.titleClassName %>\"><%= data.title %></div>\n <% } if (data.hasOwnProperty('description')) { %> \n <div class=\"description <%= data.descriptionClassName %>\"><%= data.description %></div> \n <% } %>\n <% } else if (data.hasOwnProperty('html')) { %>\n <%= data.html %>\"\n <% } else if (data.hasOwnProperty('image')) { %>\n <div style=\"background-image: url('<%= data.image %>')\" class=\"image <%= data.imageClassName %>\"></div>\n <% if (data.title) { %>\n <div class=\"title <%= data.titleClassName %>\"><%= data.title %></div>\n <% } if (data.description) { %> \n <div class=\"description <%= data.descriptionClassName %>\"><%= data.description %></div> \n <% } %>\n <% } else if (data.hasOwnProperty('html')) { %>\n <%= data.html %>\n <% } else if (data.hasOwnProperty('item')) { %>\n <%= data.item %>\n <% } else { %>\n <%= '未找到渲染数据' %>\n <% } %>\n "},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrapperRef=r.default.createRef(),t.state={current:0,options:t.props.value||t.props.options||s.resolveVariable(t.props.name,t.props.data)||[],showArrows:!1,nextAnimation:""},t}return n.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.state.options,a=e.value||e.options||s.resolveVariable(e.name,e.data)||[];d.isArrayChildrenModified(t,a)&&this.setState({options:a})},t.prototype.componentDidMount=function(){this.prepareAutoSlide()},t.prototype.componentWillUnmount=function(){this.clearAutoTimeout()},t.prototype.prepareAutoSlide=function(){this.state.options.length<2||(this.clearAutoTimeout(),this.props.auto&&(this.intervalTimeout=setTimeout(this.autoSlide,this.props.interval)))},t.prototype.autoSlide=function(e){this.clearAutoTimeout();var t=this.props.animation,a=this.state.nextAnimation;switch(e){case"prev":a="slide"===t?"slideRight":"",this.transitFramesTowards("right",a);break;case"next":default:a="",this.transitFramesTowards("left",a)}this.durationTimeout=setTimeout(this.prepareAutoSlide,this.props.duration)},t.prototype.transitFramesTowards=function(e,t){var a=this.state.current;switch(e){case"left":a=this.getFrameId("next");break;case"right":a=this.getFrameId("prev")}this.setState({current:a,nextAnimation:t})},t.prototype.getFrameId=function(e){var t=this.state,a=t.options,n=t.current,r=a.length;switch(e){case"prev":return(n-1+r)%r;case"next":return(n+1)%r;default:return n}},t.prototype.next=function(){this.autoSlide("next")},t.prototype.prev=function(){this.autoSlide("prev")},t.prototype.clearAutoTimeout=function(){clearTimeout(this.intervalTimeout),clearTimeout(this.durationTimeout)},t.prototype.renderDots=function(){var e=this.props.classnames,t=this.state,a=t.current,n=t.options;return r.default.createElement("div",{className:e("Carousel-dotsControl"),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},Array.from({length:n.length}).map(function(t,n){return r.default.createElement("span",{key:n,className:e("Carousel-dot",a===n?"is-active":"")})}))},t.prototype.renderArrows=function(){var e=this.props.classnames;return r.default.createElement("div",{className:e("Carousel-arrowsControl"),onMouseEnter:this.handleMouseEnter,onMouseLeave
|
|||
|
;/*!src/compat.ts*/
|
|||
|
amis.define("ae4b35c",function(e,r){"use strict";function n(e){var r={},t=!1;return r.controls=Array.isArray(e.controls)?e.controls.concat():[],r.controls=r.controls.map(function(e){if(Array.isArray(e)){var r=n({type:"group",controls:e});return r!==e&&(t=!0),r}return e}),e.fieldSet&&(Array.isArray(e.fieldSet)?e.fieldSet:[e.fieldSet]).forEach(function(s){t=!0,r.controls.push(a.__assign(a.__assign({},n(s)),{type:"fieldSet",collapsable:e.collapsable}))}),e.tabs&&(t=!0)&&r.controls.push({type:"tabs",tabs:e.tabs.map(function(e){return n(e)})}),t&&(e=a.__assign(a.__assign({},e),r),delete e.fieldSet,delete e.tabs),e}function t(e){var r=!1,n=e.map(function(e){return Array.isArray(e)?(r=!0,t(e)):e});return r||(n=e),{type:"hbox",columns:n}}Object.defineProperty(r,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),s=e("0f9ebdf"),o=e("5ade3b1"),i=e("635e59b"),l=e("760e4be"),c=e("3abf50d"),d=e("8ee3b98"),u=e("20f7ce6"),f=e("aa22e57"),m=e("9a80175"),b=e("40fc403");s.addSchemaFilter(function(e,r){return r.component!==o.CheckboxControlRenderer?e:(e.label&&"undefined"==typeof e.option&&(e=a.__assign({},e),e.option=e.label,delete e.label),e)}),s.addSchemaFilter(function(e,r){if(r.component!==i.FormRenderer)return e;if(e.fieldSet||e.tabs)e=n(e);else if(Array.isArray(e.controls)){var t=!1,s=e.controls.map(function(e){if(Array.isArray(e)){var r=n({type:"group",controls:e});return r!==e&&(t=!0),r}return e});t&&(e=a.__assign(a.__assign({},e),{controls:s}))}return e}),s.addSchemaFilter(function(e,r){if(r.component!==l.FieldSetRenderer)return e;if(Array.isArray(e.controls)){var t=!1,s=e.controls.map(function(e){if(Array.isArray(e)){var r=n({type:"group",controls:e});return r!==e&&(t=!0),r}return e});t&&(e=a.__assign(a.__assign({},e),{controls:s}))}return e}),s.addSchemaFilter(function(e,r){if(r.component!==c.TabsRenderer)return e;if(Array.isArray(e.tabs)){var t=!1,s=e.tabs.map(function(e){var r=!1,s=(e.controls||[]).map(function(e){if(Array.isArray(e)){var t=n({type:"group",controls:e});return t!==e&&(r=!0),t}return e});return r&&(t=!0,e=a.__assign(a.__assign({},e),{controls:s})),e});t&&(e=a.__assign(a.__assign({},e),{tabs:s}))}return e}),s.addSchemaFilter(function(e,r){if(r.component!==d.CardRenderer&&r.component!==u.ListItemRenderer)return e;if(Array.isArray(e.body)){var n=!1,s=e.body.map(function(e){return Array.isArray(e)?(n=!0,t(e)):e});n&&(e=a.__assign(a.__assign({},e),{body:s}))}return e}),s.addSchemaFilter(function(e,r){return r.component!==f.ButtonGroupControlRenderer?e:((e.btnClassName||e.btnActiveClassName)&&(e=a.__assign(a.__assign({},e),{btnLevel:m.getLevelFromClassName(e.btnClassName),btnActiveLevel:m.getLevelFromClassName(e.btnActiveClassName)}),delete e.btnClassName,delete e.btnActiveClassName),e)}),s.addSchemaFilter(function(e,r){return r.component!==l.FieldSetRenderer?e:(e.className&&!e.size&&/\bfieldset(?:\-(xs|sm|md|lg))?\b/.test(e.className)&&(e=a.__assign(a.__assign({},e),{size:RegExp.$1||"base",className:e.className.replace(/\bfieldset(?:\-(xs|sm|md|lg))?\b/,"")}),delete e.btnClassName,delete e.btnActiveClassName),e)}),s.addSchemaFilter(function(e,r){return r.component!==b.ServiceRenderer?e:(e.body&&e.body.controls&&(e=a.__assign(a.__assign({},e),{controls:e.body.controls}),delete e.body),e)})});
|
|||
|
;/*!src/themes/default.ts*/
|
|||
|
amis.define("bbacc46",function(s,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.classnames=e.classPrefix=void 0;var a=s("256b65d");e.classPrefix="a-",e.classnames=a.makeClassnames(e.classPrefix),a.theme("default",{classPrefix:e.classPrefix,classnames:e.classnames})});
|
|||
|
;/*!src/themes/cxd.ts*/
|
|||
|
amis.define("6149e0d",function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("256b65d");o.theme("cxd",{classPrefix:"cxd-",components:{toast:{closeButton:!0}},renderers:{form:{horizontal:{leftFixed:!0}},pagination:{maxButtons:9,showPageInput:!1},fieldset:{collapsable:!1},remark:{icon:"iconfont icon-warning-mark",placement:"right"},tabs:{mode:"line"},"tabs-control":{mode:"line"},"range-control":{showInput:!0,clearable:!0}}})});
|
|||
|
;/*!src/themes/dark.ts*/
|
|||
|
amis.define("566aeed",function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.classnames=s.classPrefix=void 0;var a=e("256b65d");s.classPrefix="dark-",s.classnames=a.makeClassnames(s.classPrefix),a.theme("dark",{classPrefix:s.classPrefix,classnames:s.classnames,renderers:{json:{jsonTheme:"eighties"},"editor-control":{editorTheme:"vs-dark"}}})});
|
|||
|
;/*!src/index.tsx*/
|
|||
|
amis.define("d019970",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.makeTranslator=r.registerLocale=r.setDefaultLocale=r.getDefaultLocale=r.classnames=r.getClassPrefix=r.classPrefix=r.getTheme=r.theme=r.setDefaultTheme=r.validateObject=r.validate=r.ScopedContext=r.Scoped=r.registerIcon=r.Icon=r.setIconVendor=r.resolveVariableAndFilter=r.resolveVariable=r.relativeValueRe=r.filterDate=r.filterSchema=r.resolveRenderer=r.getRendererByName=r.normalizeOptions=r.str2rules=r.addRule=r.setCustomEvalExpression=r.setCustomEvalJs=r.evalJS=r.evalExpression=r.reigsterTplEnginer=r.registerFilter=r.resizeSensor=r.utils=r.filter=r.buildApi=r.wrapFetcher=r.OptionsControl=r.FormItem=r.RegisterStore=r.Renderer=r.updateEnv=r.clearStoresCache=r.render=void 0;var t=e("node_modules/tslib/tslib"),n=e("0f9ebdf");Object.defineProperty(r,"render",{enumerable:!0,get:function(){return n.render}}),Object.defineProperty(r,"Renderer",{enumerable:!0,get:function(){return n.Renderer}}),Object.defineProperty(r,"getRendererByName",{enumerable:!0,get:function(){return n.getRendererByName}}),Object.defineProperty(r,"resolveRenderer",{enumerable:!0,get:function(){return n.resolveRenderer}}),Object.defineProperty(r,"filterSchema",{enumerable:!0,get:function(){return n.filterSchema}}),Object.defineProperty(r,"clearStoresCache",{enumerable:!0,get:function(){return n.clearStoresCache}}),Object.defineProperty(r,"updateEnv",{enumerable:!0,get:function(){return n.updateEnv}});var a=e("1caead1");Object.defineProperty(r,"wrapFetcher",{enumerable:!0,get:function(){return a.wrapFetcher}}),Object.defineProperty(r,"buildApi",{enumerable:!0,get:function(){return a.buildApi}});var c=e("6a2dbb7");Object.defineProperty(r,"filter",{enumerable:!0,get:function(){return c.filter}}),Object.defineProperty(r,"reigsterTplEnginer",{enumerable:!0,get:function(){return c.reigsterTplEnginer}}),Object.defineProperty(r,"evalExpression",{enumerable:!0,get:function(){return c.evalExpression}}),Object.defineProperty(r,"evalJS",{enumerable:!0,get:function(){return c.evalJS}}),Object.defineProperty(r,"setCustomEvalJs",{enumerable:!0,get:function(){return c.setCustomEvalJs}}),Object.defineProperty(r,"setCustomEvalExpression",{enumerable:!0,get:function(){return c.setCustomEvalExpression}});var i=t.__importStar(e("9a80175"));r.utils=i;var o=e("67d35e6");Object.defineProperty(r,"resizeSensor",{enumerable:!0,get:function(){return o.resizeSensor}});var f=e("960de17");Object.defineProperty(r,"setIconVendor",{enumerable:!0,get:function(){return f.setIconVendor}});var u=e("b7bbd16");Object.defineProperty(r,"Icon",{enumerable:!0,get:function(){return u.Icon}}),Object.defineProperty(r,"registerIcon",{enumerable:!0,get:function(){return u.registerIcon}});var b=e("448f42f");Object.defineProperty(r,"RegisterStore",{enumerable:!0,get:function(){return b.RegisterStore}});var d=e("5ab4e9d");Object.defineProperty(r,"setDefaultLocale",{enumerable:!0,get:function(){return d.setDefaultLocale}}),Object.defineProperty(r,"getDefaultLocale",{enumerable:!0,get:function(){return d.getDefaultLocale}}),Object.defineProperty(r,"makeTranslator",{enumerable:!0,get:function(){return d.makeTranslator}}),Object.defineProperty(r,"registerLocale",{enumerable:!0,get:function(){return d.register}}),e("7648928"),e("30de479"),e("4b7dfbe"),e("d539455"),e("10294a9"),e("bb5331d"),e("d221521"),e("3227a42"),e("e5683c7"),e("4fd96cf"),e("0afb30b"),e("8ee3b98"),e("29e1f6a"),e("e299c64"),e("5cdd617"),e("6c4a05a"),e("635e59b"),e("610fd77"),e("dd5dcd2"),e("a1e61d2"),e("e1b1eb7"),e("85dae7e"),e("eff65fe"),e("2b693f3"),e("5ade3b1"),e("99d982b"),e("055a9f9"),e("0f75897"),e("c6f2783"),e("aa22e57"),e("d7f3dfa"),e("2dfb851"),e("64723a8"),e("05b43e3"),e("86ddd97"),e("d09e479"),e("b0a035c"),e("48cac0f"),e("d7f8ee3"),e("ee37b69"),e("90765dc"),e("cf6ad73"),e("162bd80"),e("690a2f4"),e("db77605"),e("9b389bb"),e("3919ee5"),e("044f1d7"),e("647fc2f"),e("8a88f1c"),e("a57a440"),e("27eb5b8"),e("138c832"),e("d5c9577"),e("4be33a0"),e("2406202"),e("5271012"),e("d2efb65"),e("9d9f047"),e("399400a"),e("40fc403"),e("f6d94c0"),e("06cfa10"
|
|||
|
;/*!examples/components/SchemaRender.jsx*/
|
|||
|
amis.define("ec59a60",function(e,t){"use strict";function n(){return new Promise(function(t){return e(["997c87d"],function(e){return t(e.default)})})}function a(e){var t;return e.$schema||(e=o.__assign({$schema:"https://houtai.baidu.com/v2/schemas/page.json"},e)),f.withRouter((t=function(t){function a(n){var a=t.call(this,n)||this;a.state={open:!1},a.toggleCode=function(){return a.setState({open:!a.state.open})},a.copyCode=function(){p.default(JSON.stringify(e)),l.toast.success("页面配置JSON已复制到粘贴板")},a.close=function(){return a.setState({open:!1})};var o=n.router,r=function(e){e=e||"";var t=o.getCurrentLocation();e&&"#"===e[0]?e=t.pathname+t.search+e:e&&"?"===e[0]&&(e=t.pathname+e);var n=e.indexOf("?"),a=e.indexOf("#"),r=~n?e.substring(0,n):~a?e.substring(0,a):e,i=~n?e.substring(n,~a?a:void 0):"",s=~a?e.substring(a):t.hash;if(r){if("/"!=r[0]&&!/^https?:\/\//.test(r)){var l=t.pathname,c=l.split("/");c.pop();for(var u=void 0;u=/^\.\.?\//.exec(r);)"../"===u[0]&&c.pop(),r=r.substring(u[0].length);r=c.concat(r).join("/")}}else r=t.pathname;return r+i+s};return a.env={updateLocation:function(e,t){o[t?"replace":"push"](r(e))},isCurrentUrl:function(e){var t=r(e);return o.isActive(t)},jumpTo:function(e,t){return e=r(e),t&&"url"===t.actionType?void(t.blank===!1?window.location.href=e:window.open(e)):void(/^https?:\/\//.test(e)?window.location.replace(e):o.push(e))},fetcher:function(e){var t=e.url,n=e.method,a=e.data,o=e.config,r=e.headers;return o=o||{},o.headers=r||{},o.cancelExecutor&&(o.cancelToken=new s.default.CancelToken(o.cancelExecutor)),a&&a instanceof FormData||!a||"string"==typeof a||a instanceof Blob||a instanceof ArrayBuffer||(a=JSON.stringify(a),o.headers["Content-Type"]="application/json"),"post"!==n&&"put"!==n&&"patch"!==n?(a&&("delete"===n?o.data=a:o.params=a),s.default[n](t,o)):s.default[n](t,a,o)},isCancel:function(e){return s.default.isCancel(e)},notify:function(e,t){return l.toast[e]?l.toast[e](t,"error"===e?"系统错误":"系统消息"):console.warn("[Notify]",e,t)},alert:c.alert,confirm:c.confirm,copy:function(e){p.default(e),l.toast.success("内容已复制到粘贴板")}},a.handleEditorMount=a.handleEditorMount.bind(a),a}return o.__extends(a,t),a.prototype.handleEditorMount=function(e,t){t.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,validate:!0})},a.prototype.renderCode=function(){return r.default.createElement(u.default,{getComponent:n,editorDidMount:this.handleEditorMount,language:"json",value:e,placeholder:"加载中,请稍后。。。",disabled:!0})},a.prototype.renderSchema=function(){var t=this.props,n=(t.router,t.location),a=t.theme,o=t.locale;return i.render(e,{location:n,theme:a,locale:o},this.env)},a.prototype.render=function(){var e=this.props.classPrefix,t=this.props.showCode;return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:"schema-wrapper"},t!==!1?r.default.createElement(d.default,{classPrefix:e,size:"lg",onHide:this.close,show:this.state.open,closeOnOutside:!0,position:"right"},this.state.open?this.renderCode():null):null,this.renderSchema()),t!==!1?r.default.createElement("div",{className:"Doc-toc"},r.default.createElement("div",null,r.default.createElement("div",{className:"Doc-headingList"},r.default.createElement("div",{className:"Doc-headingList-item"},r.default.createElement("a",{onClick:this.toggleCode},"查看页面配置 ",r.default.createElement("i",{className:"fa fa-code p-l-xs"}))),r.default.createElement("div",{className:"Doc-headingList-item"},r.default.createElement("a",{onClick:this.copyCode},"复制页面配置 ",r.default.createElement("i",{className:"fa fa-copy p-l-xs"})))))):null)},a}(r.default.Component),t.displayName="SchemaRenderer",t))}Object.defineProperty(t,"__esModule",{value:!0});var o=e("node_modules/tslib/tslib"),r=o.__importDefault(e("node_modules/react/index")),i=e("d019970"),s=o.__importDefault(e("node_modules/axios/index")),l=e("6ae88e0"),c=e("bfe4ee0"),u=o.__importDefault(e("4783ce8")),d=o.__importDefault(e("01a937e")),f=e("node_modules/react-router/lib/index"
|
|||
|
;/*!examples/components/DocSearch.jsx*/
|
|||
|
amis.define("c6757fd",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e("node_modules/tslib/tslib"),o=n.__importDefault(e("node_modules/react/index")),r=n.__importDefault(e("ec59a60")),s=r.default({type:"form",mode:"inline",wrapWithPanel:!1,className:":Doc-search",controls:[{type:"input-group",size:"sm",controls:[{type:"icon",addOnclassName:"no-bg no-border p-r-none p-l",className:"text-sm",icon:"search",vendor:"iconfont"},{type:"text",placeholder:"搜索...",inputClassName:"no-border",name:"docsearch"}]}]}),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.componentDidMount=function(){},t.prototype.render=function(){return o.default.createElement(s,{showCode:!1,theme:this.props.theme})},t}(o.default.Component);t.default=a});
|
|||
|
;/*!examples/components/MdRenderer.tsx*/
|
|||
|
amis.define("b57db8f",function(e,t){"use strict";function n(e){return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(n,t),n.prototype.renderHeading=function(e){var t=this;return e.map(function(e,n){return l.default.createElement("div",{key:e.fullPath+"-"+n,className:s.default("Doc-headingList-item",{"is-active":t.props.location.hash===e.fullPath})},l.default.createElement("a",{href:"#"+e.fragment},e.label),e.children&&e.children.length?t.renderHeading(e.children):null)})},n.prototype.render=function(){var t=this.props,n=t.prevDoc,r=t.nextDoc,i=t.ContextPath;return l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:"Doc-content"},e.title?l.default.createElement("div",{className:"Doc-title"},l.default.createElement("h1",null,e.title)):null,l.default.createElement(m,a.__assign({},this.props,{doc:e})),l.default.createElement("div",{className:"Doc-footer"},l.default.createElement("div",{className:"Doc-navLinks"},n?l.default.createElement(d.Link,{className:"Doc-navLinks--prev",to:""+i+n.path},l.default.createElement("div",{className:"Doc-navLinks-icon"},l.default.createElement("i",{className:"iconfont icon-arrow-left"})),l.default.createElement("div",{className:"Doc-navLinks-body text-right"},l.default.createElement("div",{className:"Doc-navLinks-subtitle"},"上一篇 - ",n.group||"其他"),l.default.createElement("div",{className:"Doc-navLinks-title"},n.label," "))):null,r?l.default.createElement(d.Link,{className:"Doc-navLinks--next",to:""+i+r.path},l.default.createElement("div",{className:"Doc-navLinks-body"},l.default.createElement("div",{className:"Doc-navLinks-subtitle"},"下一篇 - ",r.group||"其他"),l.default.createElement("div",{className:"Doc-navLinks-title"},r.label)),l.default.createElement("div",{className:"Doc-navLinks-icon"},l.default.createElement("i",{className:"iconfont icon-arrow-right"}))):null),l.default.createElement("div",{className:"Doc-footer-divider"}),l.default.createElement("div",{className:"Doc-footer-fixme"},"文档有误?",l.default.createElement("a",{href:"https://github.com/baidu/amis/tree/master"+location.pathname.replace(i,"")+".md",target:"_blank"},"在 Github 上编辑此页!")))),e.toc&&e.toc.children&&e.toc.children.length>0?l.default.createElement("div",{className:"Doc-toc hidden-xs hidden-sm"},l.default.createElement("div",null,l.default.createElement("div",{className:"Doc-headingList"},this.renderHeading(e.toc.children)))):null)},n}(l.default.Component)}Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),l=a.__importDefault(e("node_modules/react/index")),r=a.__importDefault(e("node_modules/react-dom/index")),i=a.__importDefault(e("4783ce8")),o=a.__importDefault(e("997df41")),c=a.__importDefault(e("2b3dcdf")),s=a.__importDefault(e("node_modules/classnames/index")),d=e("node_modules/react-router/lib/index"),u=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={PlayGround:null},e}return a.__extends(n,t),n.prototype.componentDidMount=function(){var t=this;e(["9b1667d"],function(e){return t.setState({PlayGround:e.default})})},n.prototype.render=function(){var e=this,t=this.props,n=t.container,r=t.height,i=(t.setAsideFolded,t.setHeaderVisible,a.__rest(t,["container","height","setAsideFolded","setHeaderVisible"])),s=this.state.PlayGround;return l.default.createElement("div",null,l.default.createElement("span",{style:{display:"block",height:r},ref:"span"}),s?l.default.createElement(o.default,{container:n,target:function(){return e.refs.span},placement:"bottom",show:!0},l.default.createElement(c.default,{theme:i.theme,offset:{x:0,y:-r},style:{height:r},className:":MDPreview-shcema-preview-popover"},l.default.createElement("div",{className:"MDPreview-schema-preview"},l.default.createElement(s,a.__assign({},i,{vertical:!0}))))):null)},n}(l.default.Component),m=function(e){function t(t){var n=e.call(this,t)||this;return n.ref=null,n.doms=[],n.divRef=n.divRef.bind(n),n.handleClick=n.handleClick.bind(n),n}return a.__extends(t,e),t.prototype.com
|
|||
|
;/*!examples/components/Doc.tsx*/
|
|||
|
amis.define("85a7530",function(n,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.docs=void 0;var t=n("node_modules/tslib/tslib"),e=t.__importDefault(n("node_modules/react/index")),c=t.__importDefault(n("b57db8f")),l=n("9a80175");o.docs=[{label:"📌 开始",children:[{label:"介绍",path:"/docs/index",getComponent:function(o,t){return n(["docs/index.md"],function(n){t(null,c.default(n))})}},{label:"快速开始",path:"/docs/start/getting-started",getComponent:function(o,t){return n(["docs/start/getting-started.md"],function(n){t(null,c.default(n))})}},{label:"自定义",path:"/docs/start/custom",getComponent:function(o,t){return n(["docs/start/custom.md"],function(n){t(null,c.default(n))})}}]},{label:"💡 概念",children:[{label:"配置与组件",path:"/docs/concepts/schema",getComponent:function(o,t){return n(["docs/concepts/schema.md"],function(n){t(null,c.default(n))})}},{label:"数据域与数据链",path:"/docs/concepts/datascope-and-datachain",getComponent:function(o,t){return n(["docs/concepts/datascope-and-datachain.md"],function(n){t(null,c.default(n))})}},{label:"模板",path:"/docs/concepts/template",getComponent:function(o,t){return n(["docs/concepts/template.md"],function(n){t(null,c.default(n))})}},{label:"数据映射",path:"/docs/concepts/data-mapping",getComponent:function(o,t){return n(["docs/concepts/data-mapping.md"],function(n){t(null,c.default(n))})}},{label:"表达式",path:"/docs/concepts/expression",getComponent:function(o,t){return n(["docs/concepts/expression.md"],function(n){t(null,c.default(n))})}},{label:"联动",path:"/docs/concepts/linkage",getComponent:function(o,t){return n(["docs/concepts/linkage.md"],function(n){t(null,c.default(n))})}},{label:"行为",path:"/docs/concepts/action",getComponent:function(o,t){return n(["docs/concepts/action.md"],function(n){t(null,c.default(n))})}},{label:"样式",path:"/docs/concepts/style",getComponent:function(o,t){return n(["docs/concepts/style.md"],function(n){t(null,c.default(n))})}}]},{label:"🎼 类型",children:[{label:"SchemaNode",path:"/docs/types/schemanode",getComponent:function(o,t){return n(["docs/types/schemanode.md"],function(n){t(null,c.default(n))})}},{label:"API",path:"/docs/types/api",getComponent:function(o,t){return n(["docs/types/api.md"],function(n){t(null,c.default(n))})}}]},{label:"⚙ 组件",children:[{label:"组件介绍",path:"/docs/components/component",getComponent:function(o,t){return n(["docs/components/component.md"],function(n){t(null,c.default(n))})}},{label:"Page 页面",path:"/docs/components/page",getComponent:function(o,t){return n(["docs/components/page.md"],function(n){t(null,c.default(n))})}},{label:"Form 表单",children:[{label:"Form 表单",path:"/docs/components/form/index",getComponent:function(o,t){return n(["docs/components/form/index.md"],function(n){t(null,c.default(n))})}},{label:"FormItem 表单项",path:"/docs/components/form/formitem",getComponent:function(o,t){return n(["docs/components/form/formitem.md"],function(n){t(null,c.default(n))})}},{label:"Options 选择器表单项",path:"/docs/components/form/options",getComponent:function(o,t){return n(["docs/components/form/options.md"],function(n){t(null,c.default(n))})}},{label:"Array 数组输入框",path:"/docs/components/form/array",getComponent:function(o,t){return n(["docs/components/form/array.md"],function(n){t(null,c.default(n))})}},{label:"Button 按钮",path:"/docs/components/form/button",getComponent:function(o,t){return n(["docs/components/form/button.md"],function(n){t(null,c.default(n))})}},{label:"Button-Toolbar 按钮工具栏",path:"/docs/components/form/button-toolbar",getComponent:function(o,t){return n(["docs/components/form/button-toolbar.md"],function(n){t(null,c.default(n))})}},{label:"Button-Group 按钮集合",path:"/docs/components/form/button-group",getComponent:function(o,t){return n(["docs/components/form/button-group.md"],function(n){t(null,c.default(n))})}},{label:"Chain-Select 链式下拉框",path:"/docs/components/form/chain-select",getComponent:function(o,t){return n(["docs/components/f
|
|||
|
;/*!examples/components/Page/Simple.jsx*/
|
|||
|
amis.define("da274e0",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"标题",remark:"提示 Tip",body:"内容部分. 可以使用 \\${var} 获取变量。如: `\\$date`: ${date}",aside:"边栏部分",toolbar:"工具栏",initApi:"https://houtai.baidu.com/api/mock2/page/initData"}});
|
|||
|
;/*!examples/components/Page/Error.jsx*/
|
|||
|
amis.define("2d1fe26",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"标题",remark:"提示 Tip",body:["\n <p>`initApi` 拉取失败时,页面内容区会显示对应的错误信息。</p>\n\n <p>其他提示示例</p>\n ",{type:"alert",level:"success",body:"温馨提示:对页面功能的提示说明,绿色为正向类的消息提示"},{type:"alert",level:"warning",body:"您的私有网络已达到配额,如需更多私有网络,可以通过<a>工单</a>申请"}],aside:"边栏",toolbar:"工具栏",initApi:"https://houtai.baidu.com/api/mock2/page/initDataError"}});
|
|||
|
;/*!examples/components/Page/Form.jsx*/
|
|||
|
amis.define("71fbd58",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"表单页面",body:{type:"form",mode:"horizontal",title:"",debug:!0,api:"https://houtai.baidu.com/api/mock2/form/saveForm",controls:[{label:"Name",type:"text",name:"name"},{label:"Email",type:"email",name:"email"}]}}});
|
|||
|
;/*!examples/components/Form/Mode.jsx*/
|
|||
|
amis.define("0fa6650",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"表单各种展示模式汇总",remark:"展示各种模式的 Form",body:[{type:"grid",columns:[{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"常规模式",mode:"normal",controls:[{type:"email",name:"email",required:!0,placeholder:"请输入邮箱",label:"邮箱",size:"full"},{type:"password",name:"password",label:"密码",required:!0,placeholder:"请输入密码",size:"full"},{type:"checkbox",name:"rememberMe",label:"记住登录"},{type:"submit",btnClassName:"btn-default",label:"登录"}]},{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"常规模式 input md 尺寸",mode:"normal",controls:[{type:"email",name:"email",required:!0,placeholder:"请输入邮箱",label:"邮箱",size:"md",remark:"xxxx",hint:"bla bla bla"},{type:"password",name:"password",label:"密码",required:!0,placeholder:"请输入密码",size:"md"},{type:"checkbox",name:"rememberMe",label:"记住登录"},{type:"submit",btnClassName:"btn-default",label:"登录"}]}]},{type:"grid",columns:[{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"水平模式,左右摆放 左右比率分配 ",mode:"horizontal",autoFocus:!1,horizontal:{left:"col-sm-2",right:"col-sm-10",offset:"col-sm-offset-2"},controls:[{type:"email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱",required:!0,desc:"表单描述文字"},{type:"password",name:"password",label:"密码",placeholder:"输入密码"},{type:"checkbox",name:"rememberMe",label:"记住登录"}]},{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"水平模式,左右摆放 左侧固定宽度 input md 尺寸",mode:"horizontal",autoFocus:!1,horizontal:{leftFixed:"xs"},controls:[{type:"email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱",required:!0,desc:"表单描述文字",size:"md",remark:"xxxx",hint:"bla bla bla"},{type:"password",name:"password",label:"密码",placeholder:"输入密码",size:"md"},{type:"checkbox",name:"rememberMe",label:"记住登录"}]}]},{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"内联模式",mode:"inline",autoFocus:!1,controls:[{type:"email",name:"email",placeholder:"Enter Email",label:"邮箱",size:"auto"},{type:"password",name:"password",placeholder:"密码",size:"auto",remark:"Bla bla bla"},{type:"checkbox",name:"rememberMe",label:"记住登录",size:"auto"},{type:"submit",label:"登录"},{type:"button",label:"导出",url:"http://www.baidu.com/",level:"success"}]},{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"常规模式下用数组包起来还能控制一行显示多个",mode:"normal",autoFocus:!1,controls:[{type:"text",name:"name",placeholder:"请输入...",label:"名字",size:"full"},{type:"divider"},{type:"group",controls:[{type:"email",name:"email",placeholder:"输入邮箱",label:"邮箱",size:"full"},{type:"password",name:"password",label:"密码",placeholder:"请输入密码",size:"full"}]},{type:"divider"},{type:"group",controls:[{type:"email",name:"email2",mode:"inline",placeholder:"请输入邮箱地址",label:"邮箱",size:"full"},{type:"password",name:"password2",label:"密码",mode:"inline",placeholder:"请输入密码",size:"full"}]},{type:"divider"},{type:"group",controls:[{type:"email",name:"email3",mode:"inline",placeholder:"请输入邮箱地址",label:"邮箱",size:"full",columnClassName:"v-bottom"},{type:"password",name:"password3",label:"密码",placeholder:"请输入密码",size:"full"}]},{type:"divider"},{type:"group",controls:[{type:"email",name:"email4",placeholder:"请输入邮箱地址",label:"邮箱",size:"full"},{type:"password",name:"password4",label:"密码",placeholder:"请输入密码",mode:"inline",size:"full",columnClassName:"v-bottom"}]},{type:"divider"},{type:"checkbox",name:"rememberMe",label:"记住我"},{t
|
|||
|
;/*!examples/components/Form/FieldSet.jsx*/
|
|||
|
amis.define("65795e0",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"FieldSet 示例",body:[{type:"form",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",actions:[{type:"submit",label:"提交",primary:!0}],collapsable:!0,title:"fieldSet 可以对表单元素做个分组",controls:[{type:"fieldSet",title:"基本信息",collapsable:!0,controls:[{type:"group",controls:[{type:"email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"password",name:"password",label:!1,placeholder:"Password"}]},{type:"divider"},{type:"group",controls:[{type:"email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"checkbox",name:"rememberMe",label:!1,option:"Remember me"}]}]},{title:"其他信息",type:"fieldSet",controls:[{type:"email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"divider"},{type:"checkbox",name:"rememberMe",option:"记住我"}]}]},{title:"FieldSet 样式集",type:"form",controls:[{title:"超级小",type:"fieldSet",className:"fieldset-xs",controls:[{type:"plain",text:"文本 ..."}]},{title:"小尺寸",type:"fieldSet",className:"fieldset-sm",controls:[{type:"plain",text:"文本 ..."}]},{title:"正常尺寸",type:"fieldSet",className:"fieldset",controls:[{type:"plain",text:"文本 ..."}]},{title:"中大尺寸",type:"fieldSet",className:"fieldset-md",controls:[{type:"plain",text:"文本 ..."}]},{title:"超大尺寸",type:"fieldSet",className:"fieldset-lg",controls:[{type:"plain",text:"文本 ..."}]}]}]}});
|
|||
|
;/*!examples/components/Form/Tabs.jsx*/
|
|||
|
amis.define("1e9ff20",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"Tabs 示例",body:[{type:"form",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"",actions:[{type:"button",actionType:"dialog",label:"弹框中的 Tabs",level:"info",dialog:{title:"",body:{type:"form",mode:"horizontal",horizontal:{leftFixed:"xs"},api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",actions:[{type:"submit",label:"提交",primary:!0}],controls:[{type:"tabs",tabs:[{title:"基本信息",controls:[[{type:"email",name:"email1",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"password",name:"password",placeholder:"密码",label:!1}],{type:"divider"},[{type:"email",name:"email2",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"checkbox",name:"rememberMe",label:!1,option:"记住我"}]]},{title:"其他信息",controls:[{type:"email",name:"email3",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"divider"},{type:"checkbox",name:"rememberMe2",option:"记住我"}]}]}]}}},{type:"submit",label:"提交",primary:!0}],controls:[{type:"tabs",tabs:[{title:"基本信息",hash:"tab1",controls:[[{type:"email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"password",name:"password",placeholder:"密码",label:!1}],{type:"divider"},[{type:"email",name:"email2",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"checkbox",name:"rememberMe",label:!1,option:"记住我"}]]},{title:"其他信息",hash:"tab2",controls:[{type:"email",name:"email3",placeholder:"请输入邮箱地址",label:"邮箱"},{type:"divider"},{type:"checkbox",name:"rememberMe4",label:"记住我"}]}]}]}]}});
|
|||
|
;/*!examples/components/Form/Remote.jsx*/
|
|||
|
amis.define("3d2e3d4",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"动态拉取选项",name:"page-form-remote",body:[{type:"form",title:"动态表单元素示例",name:"demo-form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",mode:"horizontal",actions:[{type:"submit",label:"提交"}],controls:[{name:"select",type:"select",label:"动态选项",source:"https://houtai.baidu.com/api/mock2/form/getOptions?waitSeconds=1",description:"通过接口一口气拉取选项",clearable:!0,searchable:!0},{type:"divider"},{name:"select2",type:"select",label:"选项自动补全",autoComplete:"https://houtai.baidu.com/api/mock2/options/autoComplete?term=$term",placeholder:"请输入",description:"通过接口自动补全"},{type:"divider"},{type:"text",name:"text",label:"文本提示",source:"https://houtai.baidu.com/api/mock2/form/getOptions?waitSeconds=1",placeholder:"请选择"},{type:"divider"},{name:"text2",type:"text",label:"文本自动补全",clearable:!0,autoComplete:"https://houtai.baidu.com/api/mock2/options/autoComplete2?term=$term",description:"通过接口自动补全"},{name:"chained",type:"chained-select",label:"级联选项",source:"https://houtai.baidu.com/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4&waiSeconds=1",desc:"无限级别, 只要 api 返回数据就能继续往下选择. 当没有下级时请返回 null.",value:"a,b"},{type:"divider"},{name:"tree",type:"tree",label:"动态树",source:"https://houtai.baidu.com/api/mock2/options/tree?waitSeconds=1"},{type:"divider"},{name:"matrix",type:"matrix",label:"动态矩阵开关",source:"https://houtai.baidu.com/api/mock2/options/matrix?waitSeconds=1"}]}]}});
|
|||
|
;/*!examples/components/Form/Reaction.jsx*/
|
|||
|
amis.define("6f89d30",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"显隐切换示例",body:[{name:"hiddenOn",type:"form",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"Hide On 和 disabledOn 示例",controls:[{type:"radios",name:"type",label:"类型选择",inline:!0,value:"1",options:[{label:"类型 1",value:"1"},{label:"类型 2",value:"2"},{label:"类型 3",value:"3"}],description:'<span class="text-danger">请切换类型来看效果</span>'},{type:"text",label:"所有可见",name:"text1"},{type:"text",label:"类型2 可见",hiddenOn:"data.type != 2",name:"text2"},{type:"text",label:"类型3 不可点",disabledOn:"data.type == 3",name:"text3"},{type:"text",required:!0,label:"必填字段",name:"test4"},{type:"button-toolbar",buttons:[{type:"submit",disabledOn:"data.type == 1",label:"类型1不可点"},{type:"reset",label:"类型3出现且不可点",visibleOn:"data.type == 3",disabledOn:"data.type == 3"},{type:"button",label:"Baidu",href:"http://www.baidu.com?a=1&b=$test4"},{type:"button",actionType:"ajax",label:"No Submit",action:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=5"},{type:"submit",actionType:"ajax",label:"Submit",action:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=5"}]}]}]}});
|
|||
|
;/*!examples/components/Form/Validation.jsx*/
|
|||
|
amis.define("ee53c68",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"表单验证示例",toolbar:"<a target='_blank' href='/docs/renderers/Form/FormItem'>文档</a>",body:[{type:"form",autoFocus:!1,messages:{validateFailed:"请仔细检查表单规则,部分表单项没通过验证"},title:"表单",actions:[{type:"submit",label:"提交"}],api:"https://houtai.baidu.com/api/mock2/form/saveFormFailed?waitSeconds=2",mode:"horizontal",controls:[{type:"text",name:"test",label:"必填",required:!0},{type:"divider"},{name:"test1",type:"email",label:"Email"},{type:"divider"},{name:"url",type:"url",label:"URL"},{type:"divider"},{name:"num",type:"text",label:"数字",validations:"isNumeric"},{type:"divider"},{name:"alpha",type:"text",label:"字母或数字",validations:"isAlphanumeric"},{type:"divider"},{name:"int",type:"text",label:"整形",validations:"isInt"},{type:"divider"},{name:"minLength",type:"text",label:"长度限制",validations:"minLength:2,maxLength:10"},{type:"divider"},{name:"min",type:"text",label:"数值限制",validations:"maximum:10,minimum:2"},{type:"divider"},{name:"reg",type:"text",label:"正则",validations:"matchRegexp:/^abc/",validationErrors:{matchRegexp:"请输入abc开头的好么?"}},{type:"divider"},{name:"test2",type:"text",label:"服务端验证"}]}]}});
|
|||
|
;/*!examples/components/Form/Full.jsx*/
|
|||
|
amis.define("c9cebe3",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"所有 Form 元素列举",data:{id:1},body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"表单项",mode:"horizontal",autoFocus:!0,controls:[{type:"html",html:"<p>html 片段, 可以用来添加说明性文字</p>"},{type:"divider"},{type:"text",name:"var1",label:"文本"},{type:"divider"},{type:"text",name:"withHelp",label:"带提示信息",desc:"这是一段描述文字"},{type:"divider"},{type:"password",name:"password",label:"密码",inline:!0},{type:"divider"},{type:"number",name:"number",label:"数字",placeholder:"",inline:!0,value:5,min:1,max:10},{type:"divider"},{type:"tag",name:"tag",label:"标签",placeholder:"",clearable:!0,options:[{label:"诸葛亮",value:"zhugeliang"},{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"},{label:"野核",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{type:"divider"},{type:"text",name:"placeholder",label:"Placeholder",placeholder:"Placeholder"},{type:"divider"},{type:"text",disabled:!0,name:"disabled",label:"禁用状态",placeholder:"这里禁止输入内容"},{type:"divider"},{type:"text",name:"text-sug",label:"文本提示",options:["lixiaolong","zhouxingxing","yipingpei","liyuanfang"],addOn:{type:"text",label:"$"}},{type:"divider"},{type:"text",name:"text-sug-multiple",label:"文本提示多选",multiple:!0,options:["lixiaolong","zhouxingxing","yipingpei","liyuanfang"]},{type:"divider"},{type:"static",name:"static",labelClassName:"text-muted",label:"静态展示",value:"这是静态展示的值"},{type:"divider"},{type:"static",name:"static2",label:"静态展示",value:"这是静态展示的值",copyable:{content:"blabla"}},{type:"divider"},{type:"checkboxes",name:"checkboxes",label:"多选框",options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",disabled:!0,value:3}]},{type:"divider"},{type:"checkboxes",name:"checkboxesInline",label:"多选内联",inline:!0,options:[{label:"选项 A",value:1},{label:"选项 B",value:2},{label:"选项 C",value:3}]},{type:"divider"},{type:"radios",name:"radios",label:"单选",options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",disabled:!0,value:3}]},{type:"divider"},{type:"radios",name:"radiosInline",label:"单选内联",inline:!0,options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",value:3}]},{type:"divider"},{type:"button-group",name:"btn-group",label:"按钮组",description:"类似于单选效果",options:[{label:"选项 A",value:1},{label:"选项 B",value:2},{label:"选项 C",value:3}]},{type:"divider"},{type:"button-group",name:"btn-group2",label:"按钮组",clearable:!0,description:"可清除",options:[{label:"选项 A",value:1},{label:"选项 B",value:2},{label:"选项 C",value:3}]},{type:"divider"},{type:"button-group",name:"btn-group3",label:"按钮组",multiple:!0,options:[{label:"选项 A",value:1},{label:"选项 B",value:2},{label:"选项 C",value:3}],desc:"可多选"},{type:"divider"},{type:"list",name:"List",label:"List",desc:"也差不多,只是展示方式不一样",options:[{label:"选项 A",value:1},{label:"选项 B",value:2},{label:"选项 C",value:3}]},{type:"divider"},{type:"list",name:"list2",label:"List",desc:"可多选",multiple:!0,options:[{label:"选项 A",value:1},{label:"选项 B",value:2},{label:"选项 C",value:3}]},{type:"divider"},{type:"list",name:"list4",label:"List",imageClassName:"thumb-lg",desc:"支持放张图片",options:[{image:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg",value:1,label:"图片1"},{image:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg",value:2,label:"图片2"},{image:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg",value:3,label:"图片3"}]},{type:"divider"},{type:"l
|
|||
|
;/*!examples/components/Form/Static.jsx*/
|
|||
|
amis.define("d2ec869",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"所有 Form 元素列举",data:{id:1,image:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg",images:[{image:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395692722/4f3cb4202335.jpeg@s_0,w_216,l_1,f_jpg,q_80",src:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395692722/4f3cb4202335.jpeg"},{image:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395692942/d8e4992057f9.jpeg@s_0,w_216,l_1,f_jpg,q_80",src:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395692942/d8e4992057f9.jpeg"},{image:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693148/1314a2a3d3f6.jpeg@s_0,w_216,l_1,f_jpg,q_80",src:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693148/1314a2a3d3f6.jpeg"},{image:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693379/8f2e79f82be0.jpeg@s_0,w_216,l_1,f_jpg,q_80",src:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693379/8f2e79f82be0.jpeg"},{image:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693566/552b175ef11d.jpeg@s_0,w_216,l_1,f_jpg,q_80",src:"https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693566/552b175ef11d.jpeg"}]},body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"表单项静态展示",mode:"horizontal",controls:[{type:"static",label:"文本",value:"文本"},{type:"divider"},{type:"static-tpl",label:"模板",tpl:"自己拼接 HTML 取变量 \\${id}: ${id}"},{type:"divider"},{type:"static-date",label:"日期",value:Math.round(Date.now()/1e3)},{type:"divider"},{type:"static-datetime",label:"日期时间",value:Math.round(Date.now()/1e3)},{type:"divider"},{type:"static-mapping",label:"映射",value:Math.floor(5*Math.random()),map:{"*":"<span class='label label-default'>-</span>",0:"<span class='label label-info'>一</span>",1:"<span class='label label-success'>二</span>",2:"<span class='label label-danger'>三</span>",3:"<span class='label label-warning'>四</span>",4:"<span class='label label-primary'>五</span>"}},{type:"divider"},{type:"static-progress",label:"进度",value:66.66},{type:"divider"},{type:"static-image",label:"图片",name:"image",thumbMode:"cover",thumbRatio:"4:3",title:"233",imageCaption:"jfe fjkda fejfkda fejk fdajf dajfe jfkda",popOver:{title:"查看大图",body:'<div class="w-xxl"><img class="w-full" src="${image}"/></div>'}},{type:"divider"},{type:"static-image",label:"图片自带放大",name:"image",thumbMode:"cover",thumbRatio:"4:3",title:"233",imageCaption:"jfe fjkda fejfkda fejk fdajf dajfe jfkda",enlargeAble:!0,originalSrc:"${image}"},{type:"static-images",label:"图片集",name:"images",thumbMode:"cover",thumbRatio:"4:3",enlargeAble:!0,originalSrc:"${src}"},{type:"divider"},{type:"static-json",label:"JSON",value:{a:1,b:2,c:{d:3}}},{type:"divider"},{type:"static",label:"可复制",value:"文本",copyable:{content:"内容,支持变量 ${id}"}},{type:"divider"},{type:"static",name:"text",label:"可快速编辑",value:"文本",quickEdit:!0}]}]}});
|
|||
|
;/*!examples/components/Form/Hint.jsx*/
|
|||
|
amis.define("435ef3d",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"其他类型演示",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"Hint demo",mode:"horizontal",horizontal:{leftFixed:!0},controls:[{name:"button",type:"button",label:"ID",value:"",size:"xs",hint:"比如输入 a-xxxx-xxx"},{type:"input-group",size:"md",label:"Icon 组合",controls:[{type:"icon",addOnclassName:"no-bg",className:"text-sm",icon:"search",vendor:"iconfont"},{type:"text",placeholder:"搜索作业ID/名称",inputClassName:"b-l-none p-l-none",name:"jobName"}]},{name:"a",type:"text",label:"ID",value:"",size:"xs",hint:"比如输入 a-xxxx-xxx"},{name:"b",type:"text",label:"ID",value:"",size:"sm",hint:"比如输入 a-xxxx-xxx"},{name:"c",type:"text",label:"ID",value:"",size:"md",hint:"比如输入 a-xxxx-xxx"},{name:"d",type:"text",label:"ID",value:"",size:"lg",hint:"比如输入 a-xxxx-xxx"},{name:"tag",type:"tag",label:"Tag",size:"md",clearable:!0,placeholder:"多个标签以逗号分隔",options:["周小度","杜小度"]}]}]}});
|
|||
|
;/*!examples/components/Form/FieldSetInTabs.jsx*/
|
|||
|
amis.define("90d3d67",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"FieldSet In Tabs",remark:"",body:{type:"form",collapsable:!0,tabs:[{title:"Tab A",fieldSet:[{title:"Group A",tabs:[{title:"SubTab A",controls:[{name:"a",type:"text",label:"Text"},{name:"a",type:"text",label:"Text"}]},{title:"SubTab B",controls:[{name:"a",type:"text",label:"Text"},{name:"a",type:"text",label:"Text"}]}]},{title:"Group B",controls:[{name:"a",type:"text",label:"Text"},{name:"a",type:"text",label:"Text"}]}]},{title:"Tab B",fieldSet:[{title:"Group A",controls:[{name:"a",type:"text",label:"Text"},{name:"a",type:"text",label:"Text"}]},{title:"Group B",controls:[{name:"a",type:"text",label:"Text"},{name:"a",type:"text",label:"Text"}]}]}]}}});
|
|||
|
;/*!examples/components/Form/Combo.jsx*/
|
|||
|
amis.define("4f1646b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"Combo 示例",body:[{type:"tabs",tabs:[{title:"基本用法",hash:"basic",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",mode:"horizontal",wrapWithPanel:!1,className:"m-t",controls:[{type:"text",label:"文本",name:"a"},{type:"divider"},{type:"combo",name:"combo1",label:"组合多条多行",multiple:!0,multiLine:!0,value:[{}],controls:[{name:"a",label:"文本",type:"text",placeholder:"文本",value:"",size:"full"},{name:"b",label:"选项",type:"select",options:["a","b","c"],size:"full"}]},{type:"button",label:"独立排序",level:"dark",className:"m-t-n-xs",size:"sm",actionType:"dialog",visibleOn:"data.combo1.length > 1",dialog:{title:"对 Combo 进行 拖拽排序",body:{type:"form",controls:[{type:"combo",name:"combo1",label:!1,multiple:!0,draggable:!0,addable:!1,removable:!1,value:[{}],controls:[{name:"a",type:"static",tpl:"${a} - ${b}"}]}]},actions:[{type:"submit",mergeData:!0,label:"确认",level:"primary"},{type:"button",actionType:"close",label:"取消"}]}},{type:"combo",name:"combo2",label:"组合多条单行",multiple:!0,value:[{}],controls:[{name:"a",type:"text",placeholder:"文本",value:"",columnClassName:"w-sm"},{name:"b",type:"select",options:["a","b","c"]}]},{type:"divider"},{type:"combo",name:"combo3",label:"组合单条多行",multiLine:!0,controls:[{name:"a",label:"文本",type:"text",placeholder:"文本",value:"",size:"full"},{name:"b",label:"选项",type:"select",options:["a","b","c"]}]},{type:"combo",name:"combo4",label:"组合单条单行",controls:[{name:"a",type:"text",placeholder:"文本",value:"",size:"full"},{name:"b",type:"select",options:["a","b","c"]}]}]}]},{title:"内联样式",hash:"inline",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",mode:"horizontal",wrapWithPanel:!1,className:"m-t",controls:[{type:"combo",name:"combo11",label:"组合多条多行内联",multiple:!0,multiLine:!0,inline:!0,value:[{}],controls:[{name:"a",label:"文本",type:"text",placeholder:"文本",value:""},{name:"b",label:"选项",type:"select",options:["a","b","c"]}]},{type:"combo",name:"combo22",label:"组合多条单行内联",multiple:!0,inline:!0,value:[{}],controls:[{name:"a",type:"text",placeholder:"文本",value:""},{name:"b",type:"select",options:["a","b","c"]}]},{type:"divider"},{type:"combo",name:"combo33",label:"组合单条多行内联",multiLine:!0,inline:!0,controls:[{name:"a",label:"文本",type:"text",placeholder:"文本",value:""},{name:"b",label:"选项",type:"select",options:["a","b","c"]}]},{type:"combo",name:"combo44",label:"组合单条单行内联",inline:!0,controls:[{name:"a",type:"text",placeholder:"文本",value:""},{name:"b",type:"select",options:["a","b","c"]}]}]}]},{title:"唯一验证",hash:"unique",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",mode:"horizontal",wrapWithPanel:!1,className:"m-t",controls:[{type:"combo",name:"combo666",label:"组合多条唯一",multiple:!0,value:[{}],controls:[{name:"a",type:"text",placeholder:"文本",value:"",unique:!0},{name:"b",type:"select",options:["a","b","c"],unique:!0}]}]}]},{title:"可拖拽排序",hash:"sortable",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",mode:"horizontal",wrapWithPanel:!1,className:"m-t",controls:[{type:"combo",name:"combo777",label:"可拖拽排序",multiple:!0,value:[{a:"1",b:"a"},{a:"2",b:"b"}],draggable:!0,controls:[{name:"a",type:"text",placeholder:"文本",unique:!0},{name:"b",type:"select",options:["a","b","c"],unique:!0}]}]}]},{title:"值打平",hash:"flat",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",mode:"horizontal",wrapWithPanel:!1,className:"m-t",controls:[{type:"combo",name:"combo888",label:"可打平只存储值",multiple:!0,flat:!0,value:["red","pink"],draggable:!0,controls:[{name:"a",type:"color",placeholder:"
|
|||
|
;/*!examples/components/Form/ConditionBuilder.jsx*/
|
|||
|
amis.define("b05683a",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"条件生成器",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",mode:"horizontal",horizontal:{leftFixed:!0},actions:[{label:"查看数据",type:"button",actionType:"dialog",dialog:{title:"数据",body:"<pre>${conditions|json:2}</pre>"}}],controls:[{type:"condition-builder",label:"条件组件",name:"conditions",description:"适合让用户自己拼查询条件,然后后端根据数据生成 query where",fields:[{label:"文本",type:"text",name:"text"},{label:"数字",type:"number",name:"number"},{label:"布尔",type:"boolean",name:"boolean"},{label:"选项",type:"select",name:"select",options:[{label:"A",value:"a"},{label:"B",value:"b"},{label:"C",value:"c"},{label:"D",value:"d"},{label:"E",value:"e"}]},{label:"日期",children:[{label:"日期",type:"date",name:"date"},{label:"时间",type:"time",name:"time"},{label:"日期时间",type:"datetime",name:"datetime"}]}]}]}]}});
|
|||
|
;/*!examples/components/Form/SubForm.jsx*/
|
|||
|
amis.define("c6bae66",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"SubForm 示例",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"Form elements",mode:"horizontal",controls:[{type:"form",label:"子表单单条",name:"subForm1",btnLabel:"点击设置",form:{title:"子表单",controls:[{name:"a",type:"text",label:"Foo"},{name:"b",type:"switch",label:"Boo"}]}},{type:"form",label:"子表单多条",name:"subForm2",labelField:"a",btnLabel:"点击设置",multiple:!0,form:{title:"子表单",controls:[{name:"a",type:"text",label:"Foo"},{name:"b",type:"switch",label:"Boo"}]}}]}]}});
|
|||
|
;/*!examples/components/Form/RichText.jsx*/
|
|||
|
amis.define("c938c8b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"富文本编辑器",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"Form elements",controls:[{name:"html",type:"rich-text",label:"富文本",value:"<p>Just do <code>IT</code></p>"}]}]}});
|
|||
|
;/*!examples/components/Form/Editor.jsx*/
|
|||
|
amis.define("9b0994b",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"Editor",body:[{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm?waitSeconds=2",title:"",controls:[{name:"javascript",type:"editor",label:"Javascript",language:"javascript",value:"console.log(1, 2, 3);"},{name:"html",type:"editor",language:"html",label:"Html",value:"<html><head><title>Hello</title></head><body><p>world</p></body></html>"},{name:"css",type:"editor",language:"css",label:"CSS",value:"body {color: red;}"},{name:"json",type:"editor",language:"json",label:"JSON",value:'{"a": 1, "b": 2}'}]}]}});
|
|||
|
;/*!examples/components/Form/Transfer.jsx*/
|
|||
|
amis.define("6bc539d",function(l,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"Transfer 穿梭器 示例",body:[{type:"form",title:"",mode:"horizontal",actions:[{type:"submit",label:"提交"}],controls:[{label:"默认",type:"transfer",name:"transfer1",options:[{label:"诸葛亮",value:"zhugeliang"},{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"},{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]},{label:"分组",type:"transfer",name:"transfer2",options:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"表格形式",type:"transfer",name:"transfer3",selectMode:"table",columns:[{name:"label",label:"英雄"},{name:"position",label:"位置"}],options:[{label:"诸葛亮",value:"zhugeliang",position:"中单"},{label:"曹操",value:"caocao",position:"上单"},{label:"钟无艳",value:"zhongwuyan",position:"上单"},{label:"李白",value:"libai",position:"打野"},{label:"韩信",value:"hanxin",position:"打野"},{label:"云中君",value:"yunzhongjun",position:"打野"}]},{label:"树型展示",type:"transfer",name:"transfer4",selectMode:"tree",options:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"级联选择",type:"transfer",name:"transfer5",selectMode:"chained",options:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"带搜索",type:"transfer",name:"transfer6",selectMode:"chained",searchable:!0,sortable:!0,options:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"组合穿梭器",type:"tabs-transfer",name:"a",sortable:!0,selectMode:"tree",searchable:!0,options:[{label:"成员",selectMode:"tree",children:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"用户",selectMode:"chained",children:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]}]},{label:"延时加载",type:"transfer",name:"transfer7",selectMode:"tree",deferApi:"https://houtai.baidu.com/api/mock2/form/deferOptions?label=${label}",options:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",defer:!0},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"关联选择模式",type:"transfer",name:"b",sortable:!0,searchable:!0,deferApi:"https://houtai.baidu.com/api/mock2/form/deferOptions?label=${label}",selectMode:"associated",leftMode:"tree",leftOptions:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caoc
|
|||
|
;/*!examples/components/Form/Table.jsx*/
|
|||
|
amis.define("4d416d7",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"表格编辑",body:{type:"form",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",actions:[{type:"submit",label:"提交",primary:!0}],controls:[{type:"combo",name:"colors",label:"Combo",multiple:!0,draggable:!0,multiLine:!0,value:[{color:"green",name:"颜色"}],controls:[{type:"color",name:"color"},{type:"text",name:"name",placeholder:"说明文字"}]},{type:"static",label:"当前值",tpl:"<pre>${colors|json}</pre>"},{type:"table",name:"colors",label:"Table",draggable:!0,addable:!0,removable:!0,needConfirm:!1,columns:[{label:"Color",name:"color",quickEdit:{type:"color"}},{label:"说明文字",name:"name"}]},{type:"button",label:"Table2新增一行",target:"table2",actionType:"add"},{type:"table",name:"table2",label:"Table2",editable:!0,addable:!0,removable:!0,draggable:!0,columns:[{name:"a",label:"A"},{name:"b",label:"B",quickEdit:{type:"select",options:[{label:"A",value:"a"},{label:"B",value:"b"}]}}]},{type:"table",name:"table3",label:"Table3(指定第2列只有update时能编辑)",editable:!0,addable:!0,removable:!0,draggable:!0,columns:[{name:"a",label:"A",quickEdit:!0},{name:"b",label:"B",quickEdit:!1,quickEditOnUpdate:{type:"select",options:[{label:"A",value:"a"},{label:"B",value:"b"}]}}]}]}}});
|
|||
|
;/*!examples/components/Form/Picker.jsx*/
|
|||
|
amis.define("48c8d88",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"表格编辑",body:{type:"form",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",actions:[{type:"submit",label:"提交",primary:!0}],controls:["<p>常规模式</p>",{type:"divider"},{type:"picker",name:"type",label:"单选",value:1,inline:!0,options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",value:3},{label:"选项4",value:4}]},{type:"picker",name:"type2",label:"多选",multiple:!0,options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",value:3},{label:"选项4",value:4}]},{type:"divider"},"<p>Table 渲染类型</p>",{type:"divider"},{type:"picker",name:"type3",joinValues:!0,valueField:"id",labelField:"engine",label:"单选",source:"https://houtai.baidu.com/api/sample",size:"lg",value:"4",pickerSchema:{mode:"table",name:"thelist",quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",draggable:!0,headerToolbar:{wrapWithPanel:!1,type:"form",className:"text-right",target:"thelist",mode:"inline",controls:[{type:"text",name:"keywords",addOn:{type:"submit",label:"搜索",level:"primary",icon:"fa fa-search pull-left"}}]},columns:[{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",quickEdit:{mode:"inline",type:"select",options:["A","B","C","D","X"],saveImmediately:!0},type:"text",toggled:!0},{type:"operation",label:"操作",width:100,buttons:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"dialog",dialog:{position:"left",size:"lg",title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"select",name:"grade",label:"CSS grade",options:["A","B","C","D","X"]}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],toggled:!0}]}},{type:"picker",name:"type4",joinValues:!0,valueField:"id",labelField:"engine",label:"多选",source:"https://houtai.baidu.com/api/sample",size:"lg",value:"4,5",multiple:!0,pickerSchema:{mode:"table",name:"thelist",quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",draggable:!0,headerToolbar:{wrapWithPanel:!1,type:"form",className:"text-right",target:"thelist",mode:"inline",controls:[{type:"text",name:"keywords",addOn:{type:"submit",label:"搜索",level:"primary",icon:"fa fa-search pull-left"}}]},columns:[{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",quickEdit:{mode:"inlin
|
|||
|
;/*!examples/components/Form/Formula.jsx*/
|
|||
|
amis.define("b382a0f",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"公式示例",body:["<p>通过公式,可以动态的设置目标值。</p>",{type:"form",title:"自动应用",api:"https://houtai.baidu.com/api/mock2/form/saveForm",controls:[{type:"number",name:"a",label:"A"},{type:"number",name:"b",label:"B"},{type:"number",name:"sum",label:"和",disabled:!0,description:"自动计算 A + B"},{type:"formula",name:"sum",value:0,formula:"a + b"}]},{type:"form",title:"手动应用",api:"https://houtai.baidu.com/api/mock2/form/saveForm",controls:[{type:"number",name:"a",label:"A"},{type:"number",name:"b",label:"B"},{type:"group",controls:[{type:"number",name:"sum",label:"和",disabled:!0,columnClassName:"col-sm-11"},{type:"button",label:"计算",columnClassName:"col-sm-1 v-bottom",target:"theFormula"}]},{type:"formula",name:"sum",id:"theFormula",value:0,formula:"a + b",initSet:!1,autoSet:!1}]},{type:"form",title:"条件应用",api:"https://houtai.baidu.com/api/mock2/form/saveForm",controls:[{type:"radios",name:"radios",inline:!0,label:"radios",options:[{label:"a",value:"a"},{label:"b",value:"b"}],description:"radios 变化会自动清空 B"},{type:"text",name:"b",label:"B"},{type:"formula",name:"b",value:"some string",formula:"''",condition:"${radios}",initSet:!1}]}]}});
|
|||
|
;/*!examples/components/Form/Custom.jsx*/
|
|||
|
amis.define("78c2565",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});{var n=e("node_modules/tslib/tslib"),r=n.__importDefault(e("node_modules/react/index")),a=e("d019970");!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.value,n=e.onChange;return r.default.createElement("div",null,r.default.createElement("p",null,"这个是个自定义组件。通过注册渲染器的方式实现。"),r.default.createElement("p",null,"当前值:",t),r.default.createElement("a",{className:"btn btn-default",onClick:function(){return n(Math.round(1e4*Math.random()))}},"随机修改"))},t=n.__decorate([a.FormItem({type:"custom"})],t)}(r.default.Component),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props.tip;return r.default.createElement("div",null,e||"非 FormItem 类型的渲染器注册, 这种不能修改 form")},t=n.__decorate([a.Renderer({test:/(^|\/)my\-renderer$/})],t)}(r.default.Component)}t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"自定义组件示例",body:[{type:"form",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",actions:[{type:"submit",label:"提交",primary:!0}],controls:[{name:"a",children:function(e){var t=e.value,n=e.onChange;return r.default.createElement("div",null,r.default.createElement("p",null,"这个是个自定义组件。最简单直接的方式,不用注册直接使用。"),r.default.createElement("p",null,"当前值:",t),r.default.createElement("a",{className:"btn btn-default",onClick:function(){return n(Math.round(1e4*Math.random()))}},"随机修改"))}},{type:"divider"},{name:"b",type:"custom",label:"自定义FormItem"},{type:"divider"},{type:"my-renderer"}]},{type:"my-renderer",tip:"他能放 controls 里面,也能放外面。"}]}});
|
|||
|
;/*!examples/components/Form/Definitions.jsx*/
|
|||
|
amis.define("efdb183",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",definitions:{options:{type:"combo",multiple:!0,multiLine:!0,controls:[{type:"group",controls:[{label:"名称",name:"label",type:"text",required:!0},{label:"值",name:"value",type:"text",required:!0}]},{$ref:"options",label:"子选项",name:"children",addButtonText:"新增子选项"}]},queryItem:{type:"combo",multiple:!0,multiLine:!0,typeSwitchable:!1,conditions:[{label:"条件",test:"!data.hasOwnProperty('connect')",scaffold:{},controls:[{type:"group",className:"m-b-none",controls:[{name:"key",type:"text",placeholder:"字段名",required:!0},{name:"type",type:"select",value:0,options:[{label:"int64",value:0},{label:"double64",value:1},{label:"string",value:2},{label:"version",value:3}]},{type:"formula",name:"opt",formula:'""',condition:"${type}"},{name:"opt",type:"select",placeholder:"请选择",required:!0,options:[{label:">",value:">",visibleOn:"~[0,1,3].indexOf(this.type)"},{label:"<",value:"<",visibleOn:"~[0,1,3].indexOf(this.type)"},{label:"==",value:"=="},{label:">=",value:">=",visibleOn:"~[0,1,3].indexOf(this.type)"},{label:"<=",value:"<=",visibleOn:"~[0,1,3].indexOf(this.type)"},{label:"in",value:"in"},{label:"not in",value:"not in"},{label:"!=",value:"!="}]},{name:"val",type:"text",placeholder:"值",required:!0,visibleOn:'~[">", "<", ">=", "<=", "==", "!="].indexOf(this.opt)'},{name:"val",type:"array",required:!0,minLength:1,items:{type:"text",placeholder:"值",required:!0},visibleOn:'~["in", "not in"].indexOf(this.opt)'}]}]},{label:"组合",test:"data.hasOwnProperty('connect')",scaffold:{connect:"&",exprs:[{}]},controls:[{type:"button-group",name:"connect",value:"&",clearable:!1,size:"xs",options:[{label:"AND",value:"&"},{label:"OR",value:"|"}]},{$ref:"queryItem",name:"exprs",minLength:1,value:[{}]}]}]},queryGroup:{type:"combo",multiple:!1,multiLine:!0,controls:[{type:"button-group",name:"connect",value:"&",clearable:!1,size:"sm",options:[{label:"AND",value:"&"},{label:"OR",value:"|"}]},{$ref:"queryItem",name:"exprs",minLength:1,value:[{}]}]}},type:"page",title:"引用",body:["<p>引用可以用来减少重复的结构定义,<code>最主要的是可以用来实现结构的递归定义</code>。</p>",{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm",mode:"horizontal",controls:[{$ref:"options",name:"options",value:[{label:"选项1",value:"1"}],minLength:1,label:"选项配置"}]},{type:"form",api:"https://houtai.baidu.com/api/mock2/saveForm",controls:[{$ref:"queryGroup",name:"q",value:{},label:"Query"},{type:"static",name:"q",label:"当前值",tpl:"<pre>${q|json}</pre>"}]}]}});
|
|||
|
;/*!examples/components/CRUD/Table.jsx*/
|
|||
|
amis.define("6f62c3a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"http://amis.baidu.com/v2/schemas/page.json#",title:"增删改查示例",remark:"bla bla bla",toolbar:[{type:"button",actionType:"dialog",label:"新增",icon:"fa fa-plus pull-left",primary:!0,dialog:{title:"新增",body:{type:"form",name:"sample-edit-form",api:"post:https://houtai.baidu.com/api/sample",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}}],body:{type:"crud",draggable:!0,api:"https://houtai.baidu.com/api/sample?waitSeconds=1",keepItemSelectionOnPageChange:!0,labelTpl:"${id} ${engine}",filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",addOn:{label:"搜索",type:"submit"}},{type:"plain",text:"这里的表单项可以配置多个"}]},bulkActions:[{label:"批量删除",actionType:"ajax",api:"delete:https://houtai.baidu.com/api/sample/${ids|raw}",confirmText:"确定要批量删除?"},{label:"批量修改",actionType:"dialog",dialog:{title:"批量编辑",name:"sample-bulk-edit",body:{type:"form",api:"https://houtai.baidu.com/api/sample/bulkUpdate2",controls:[{type:"hidden",name:"ids"},{type:"text",name:"engine",label:"Engine"}]}}}],quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:{url:"https://houtai.baidu.com/api/sample/$id",data:{requestUrl:"$requestUrl",apiAlias:"$apiAlias"}},filterTogglable:!0,headerToolbar:["filter-toggler","bulkActions",{type:"tpl",tpl:"定制内容示例:当前有 ${count} 条数据。",className:"v-middle"},{type:"link",href:"https://www.baidu.com",body:"百度一下",htmlTarget:"_parent",className:"v-middle"},{type:"columns-toggler",align:"right"},{type:"drag-toggler",align:"right"},{type:"pagination",align:"right"}],footerToolbar:["statistics","switch-per-page","pagination"],columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0,remark:"Bla bla Bla"},{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!1},{name:"platform",label:"Platform(s)",popOver:{body:"Popover 内容:${platform}"},sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0,filterable:{options:[{label:"4",value:"4"},{label:"5",value:"5"},{label:"6",value:"6"}]}},{name:"grade",label:"操作",type:"text",remark:"应用日志可编辑 设置备注",quickEdit:{type:"text",required:!0,saveImmediately:!0}},{type:"operation",label:"操作",width:100,buttons:[{type:"button",icon:"fa fa-eye",actionType:"dialog",tooltip:"查看",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",tooltip:"编辑",actionType:"drawer",drawer:{position:"left",size:"lg",title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"select",name:"grade",label:"CSS grade",options:["A","B","C","D","X"]}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"
|
|||
|
;/*!examples/components/CRUD/ItemActions.jsx*/
|
|||
|
amis.define("3ef3393",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"增删改查示例",remark:"bla bla bla",body:{type:"crud",api:"https://houtai.baidu.com/api/sample",headerToolbar:["bulkActions",{type:"columns-toggler",className:"pull-right",align:"right"},{type:"drag-toggler",className:"pull-right"},{type:"pagination",className:"pull-right"}],itemActions:[{type:"button",label:"查看",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",label:"编辑",actionType:"drawer",drawer:{position:"left",size:"lg",title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"select",name:"grade",label:"CSS grade",options:["A","B","C","D","X"]}]}}},{type:"button",label:"删除",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],bulkActions:[{label:"批量删除",actionType:"ajax",api:"delete:https://houtai.baidu.com/api/sample/${ids|raw}",confirmText:"确定要批量删除?",type:"button"},{label:"批量修改",actionType:"dialog",dialog:{title:"批量编辑",name:"sample-bulk-edit",body:{type:"form",api:"https://houtai.baidu.com/api/sample/bulkUpdate2",controls:[{type:"hidden",name:"ids"},{type:"text",name:"engine",label:"Engine"}]}},type:"button"}],columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0,remark:"Bla bla Bla"},{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!1},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",type:"text",toggled:!0},{name:"grade",label:"CSS grade",type:"text",toggled:!0}]}}});
|
|||
|
;/*!examples/components/CRUD/Grid.jsx*/
|
|||
|
amis.define("638fc16",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"增删改查示例",remark:"bla bla bla",body:{type:"crud",api:"https://houtai.baidu.com/api/sample",mode:"cards",defaultParams:{perPage:12},filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",addOn:{label:"搜索",type:"submit"}},{type:"plain",text:"这只是个示例, 目前搜索对查询结果无效."}]},bulkActions:[{label:"批量删除",actionType:"ajax",api:"delete:https://houtai.baidu.com/api/sample/${ids|raw}",confirmText:"确定要批量删除?"},{label:"批量修改",actionType:"dialog",dialog:{title:"批量编辑",name:"sample-bulk-edit",body:{type:"form",api:"https://houtai.baidu.com/api/sample/bulkUpdate2",controls:[{type:"hidden",name:"ids"},{type:"text",name:"engine",label:"Engine"}]}}}],quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",draggable:!0,card:{header:{title:"$engine",subTitle:"$platform",subTitlePlaceholder:"暂无说明",avatar:'<%= data.avatar || "https://internal-amis-res.cdn.bcebos.com/images/2019-12/1575350573496/4873dbfaf6a5.png" %>',avatarClassName:"pull-left thumb b-3x m-r"},actions:[{type:"button",label:"查看",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",label:"编辑",actionType:"dialog",dialog:{title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}},{type:"button",label:"删除",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],body:[{name:"engine",label:"engine",sortable:!0,quickEdit:!0},{name:"browser",label:"Browser"},{name:"platform",label:"Platform"},{name:"version",label:"version"}]}}}});
|
|||
|
;/*!examples/components/CRUD/List.jsx*/
|
|||
|
amis.define("c9850e3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"增删改查示例",remark:"bla bla bla",body:{type:"crud",api:"https://houtai.baidu.com/api/sample",mode:"list",draggable:!0,saveOrderApi:{url:"https://houtai.baidu.com/api/sample/saveOrder"},orderField:"weight",filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",addOn:{label:"搜索",type:"submit"}},{type:"plain",text:"这只是个示例, 目前搜索对查询结果无效."}]},bulkActions:[{label:"批量删除",actionType:"ajax",api:"delete:https://houtai.baidu.com/api/sample/${ids|raw}",confirmText:"确定要批量删除?",type:"button",level:"danger"},{label:"批量修改",actionType:"dialog",level:"info",type:"button",dialog:{title:"批量编辑",body:{type:"form",api:"https://houtai.baidu.com/api/sample/bulkUpdate2",controls:[{type:"hidden",name:"ids"},{type:"text",name:"engine",label:"Engine"}]}}}],quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",listItem:{actions:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"dialog",dialog:{title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],body:[{name:"engine",label:"Rendering engine",sortable:!0,quickEdit:!0},[{name:"browser",label:"Browser"},{name:"platform",label:"Platform(s)"}],{name:"version",label:"Engine version"}]}}}});
|
|||
|
;/*!examples/components/CRUD/LoadMore.jsx*/
|
|||
|
amis.define("660d1f0",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"增删改查示例",remark:"bla bla bla",body:{type:"crud",api:"https://houtai.baidu.com/api/sample",mode:"list",draggable:!0,saveOrderApi:{url:"https://houtai.baidu.com/api/sample/saveOrder"},orderField:"weight",filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",addOn:{label:"搜索",type:"submit"}},{type:"plain",text:"这只是个示例, 目前搜索对查询结果无效."}]},bulkActions:[{label:"批量删除",actionType:"ajax",api:"delete:https://houtai.baidu.com/api/sample/${ids|raw}",confirmText:"确定要批量删除?",type:"button",level:"danger"},{label:"批量修改",actionType:"dialog",level:"info",type:"button",dialog:{title:"批量编辑",body:{type:"form",api:"https://houtai.baidu.com/api/sample/bulkUpdate2",controls:[{type:"hidden",name:"ids"},{type:"text",name:"engine",label:"Engine"}]}}}],quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",headerToolbar:["bulkActions"],footerToolbar:["load-more"],listItem:{actions:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"dialog",dialog:{title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],body:[{name:"engine",label:"Rendering engine",sortable:!0,quickEdit:!0,labelClassName:"w-sm pull-left text-muted"},[{name:"browser",label:"Browser",labelClassName:"w-sm pull-left text-muted"},{name:"platform",label:"Platform(s)",labelClassName:"w-sm pull-left text-muted"}],{name:"version",label:"Engine version",labelClassName:"w-sm pull-left text-muted"}]}}}});
|
|||
|
;/*!examples/components/CRUD/Fix.jsx*/
|
|||
|
amis.define("a9122cf",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),r={type:"table",data:[{engine:"Other browsers",browser:"All others",platform:"-",version:"-",grade:"U",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:56,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Misc",browser:"PSP browser",platform:"PSP",version:"-",grade:"C",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:55,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Misc",browser:"PSP browser",platform:"PSP",version:"-",grade:"C",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:55,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Other browsers",browser:"All others",platform:"-",version:"-",grade:"U",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:56,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Misc",browser:"PSP browser",platform:"PSP",version:"-",grade:"C",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:55,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Misc",browser:"PSP browser",platform:"PSP",version:"-",grade:"C",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:55,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Other browsers",browser:"All others",platform:"-",version:"-",grade:"U",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:56,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Misc",browser:"PSP browser",platform:"PSP",version:"-",grade:"C",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:55,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Misc",browser:"PSP browser",platform:"PSP",version:"-",grade:"C",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:55,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"},{engine:"Other browsers",browser:"All others",platform:"-",version:"-",grade:"U",progress:50,status:!0,image:"http://hiphotos.baidu.com/fex/%70%69%63/item/0d338744ebf81a4cff2f4cd6de2a6059252da694.jpg",weight:56,others:null,createdAt:"2017-11-17T08:47:50.000Z",updatedAt:"2017-11-17T08:47:50.000Z"}].map(function(e,t){return a.__assign(a.__assign({},e),{id:t+1})}),columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0,fixed:"left"},{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0,fixed:"left"},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",quickEdit:{mode:"inline",type:"select",options:["A","B","C","D","X"],saveImmediately:!0},type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"
|
|||
|
;/*!examples/components/CRUD/Aside.jsx*/
|
|||
|
amis.define("97ac54d",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"带边栏联动",aside:{type:"form",wrapWithPanel:!1,target:"window",controls:[{type:"tree",name:"cat",inputClassName:"no-border",submitOnChange:!0,options:[{label:"分类1",value:"cat1"},{label:"分类2",value:"cat2"},{label:"分类3",value:"cat3"},{label:"分类4",value:"cat4"}]}]},toolbar:[{type:"button",actionType:"dialog",label:"新增",primary:!0,dialog:{title:"新增",body:{type:"form",name:"sample-edit-form",api:"post:https://houtai.baidu.com/api/sample",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}}],body:{type:"crud",draggable:!0,api:"https://houtai.baidu.com/api/sample",filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",addOn:{label:"搜索",type:"submit"}},{type:"plain",text:"这里的表单项可以配置多个"}]},bulkActions:[{label:"批量删除",actionType:"ajax",api:"delete:https://houtai.baidu.com/api/sample/$ids",confirmText:"确定要批量删除?"},{label:"批量修改",actionType:"dialog",dialog:{title:"批量编辑",name:"sample-bulk-edit",body:{type:"form",api:"https://houtai.baidu.com/api/sample/bulkUpdate2",controls:[{type:"hidden",name:"ids"},{type:"text",name:"engine",label:"Engine"}]}}}],quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0},{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",quickEdit:{mode:"inline",type:"select",options:["A","B","C","D","X"],saveImmediately:!0},type:"text",toggled:!0},{type:"operation",label:"操作",width:130,buttons:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"dialog",dialog:{title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],toggled:!0}]}}});
|
|||
|
;/*!examples/components/CRUD/Fields.jsx*/
|
|||
|
amis.define("11455ca",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"增删改查列类型汇总",body:{type:"crud",api:"https://houtai.baidu.com/api/mock2/crud/list",columns:[{name:"id",label:"ID",type:"text"},{name:"audio",label:"音频",type:"audio"},{name:"carousel",label:"轮播图",type:"carousel",width:"300"},{name:"text",label:"文本",type:"text"},{type:"image",label:"图片",name:"image",enlargeAble:!0,title:"233",thumbMode:"cover"},{name:"date",type:"date",label:"日期"},{name:"progress",label:"进度",type:"progress"},{name:"boolean",label:"状态",type:"status"},{name:"boolean",label:"开关",type:"switch"},{name:"type",label:"映射",type:"mapping",map:{"*":"其他:${type}",1:"<span class='label label-info'>漂亮</span>",2:"<span class='label label-success'>开心</span>",3:"<span class='label label-danger'>惊吓</span>",4:"<span class='label label-warning'>紧张</span>"}},{name:"list",type:"list",label:"List",placeholder:"-",size:"sm",listItem:{title:"${title}",subTitle:"${description}"}},{name:"json",type:"json",label:"Json"}]}}});
|
|||
|
;/*!examples/components/CRUD/JumpNext.jsx*/
|
|||
|
amis.define("4e9a795",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"操作并下一个",remark:"当存在下一条时,支持直接打开下一条操作。",body:{type:"crud",title:"",api:"https://houtai.baidu.com/api/sample/list",columnsTogglable:!1,columns:[{name:"id",label:"ID",width:20,type:"text",toggled:!0},{name:"engine",label:"Rendering engine",type:"text",toggled:!0},{name:"browser",label:"Browser",type:"text",toggled:!0},{type:"operation",label:"操作",width:130,buttons:[{type:"button",icon:"fa fa-pencil",actionType:"dialog",nextCondition:"true",_nextCondition:'可以设置条件比如: data.grade == "B"',dialog:{title:"编辑",actions:[{type:"button",actionType:"prev",level:"info",visibleOn:"data.hasPrev",label:"上一个"},{type:"button",actionType:"cancel",label:"关闭"},{type:"submit",actionType:"next",visibleOn:"data.hasNext",label:"保存并下一个",level:"primary"},{type:"submit",visibleOn:"!data.hasNext",label:"保存",level:"primary"},{type:"button",actionType:"next",level:"info",visibleOn:"data.hasNext",label:"下一个"}],body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}}],toggled:!0}]}}});
|
|||
|
;/*!examples/components/CRUD/Keyboards.jsx*/
|
|||
|
amis.define("ddb86b3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"Table 全键盘操作示例",remark:"bla bla bla",body:[{type:"plain",className:"text-danger",text:"请通过上下左右键切换单元格,按 `Space` 键进入编辑模式,按 `Enter` 提交编辑,并最后点左上角的全部保存完成操作。"},{type:"crud",className:"m-t",api:"https://houtai.baidu.com/api/sample",quickSaveApi:"https://houtai.baidu.com/api/sample/bulkUpdate",quickSaveItemApi:"https://houtai.baidu.com/api/sample/$id",columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0},{name:"engine",label:"Rendering engine",sortable:!0,quickEdit:{type:"text",required:!0,mode:"inline"},type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,quickEdit:{type:"text",required:!0},type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,quickEdit:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",quickEdit:{type:"select",options:["A","B","C","D","X"]},type:"text",toggled:!0}]}]}});
|
|||
|
;/*!examples/components/CRUD/Footable.jsx*/
|
|||
|
amis.define("cd82b91",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"开启单条底部展示功能",body:{type:"crud",draggable:!0,api:"https://houtai.baidu.com/api/sample",footable:{expand:"first",accordion:!0},columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0},{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",breakpoint:"*",quickEdit:{mode:"inline",type:"select",options:["A","B","C","D","X"],inputClassName:"w-xs",saveImmediately:!0},type:"text",toggled:!0},{type:"operation",label:"操作",width:100,breakpoint:"*",buttons:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"drawer",drawer:{position:"left",size:"lg",title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"select",name:"grade",label:"CSS grade",options:["A","B","C","D","X"]}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],toggled:!0}]}}});
|
|||
|
;/*!examples/components/CRUD/Nested.jsx*/
|
|||
|
amis.define("77adc0a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"支持多层嵌套,列数据中有 children 字段即可。(建议不超过10层)",body:{type:"crud",api:"https://houtai.baidu.com/api/mock2/crud/table2",saveOrderApi:"https://houtai.baidu.com/api/mock2/form/saveData",expandConfig:{expand:"first",accordion:!0},draggable:!0,columns:[{name:"id",label:"ID",sortable:!0,type:"text",toggled:!0,width:100},{name:"engine",label:"Rendering engine",sortable:!0,searchable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!0},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",quickEdit:!0,type:"text",toggled:!0},{name:"grade",label:"CSS grade",quickEdit:{mode:"inline",type:"select",options:["A","B","C","D","X"],inputClassName:"w-xs",saveImmediately:!0},type:"text",toggled:!0},{type:"operation",label:"操作",width:100,buttons:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"drawer",drawer:{position:"left",size:"lg",title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"select",name:"grade",label:"CSS grade",options:["A","B","C","D","X"]}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],toggled:!0}]}}});
|
|||
|
;/*!examples/components/CRUD/MergeCell.jsx*/
|
|||
|
amis.define("31055e7",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"支持自动合并单元格,从左到右,可配置从左侧起多少列内启动自动合并单元格,当前配置 3",body:{type:"table",data:{items:[{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"A"},{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"B"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 95+",version:"4",grade:"C"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"3",grade:"A"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"A"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"B"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"C"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"}]},combineNum:3,columns:[{name:"engine",label:"Rendering engine"},{name:"browser",label:"Browser"},{name:"platform",label:"Platform(s)"},{name:"version",label:"Engine version"},{name:"grade",label:"CSS grade"}]}}});
|
|||
|
;/*!examples/components/CRUD/HeaderGroup.jsx*/
|
|||
|
amis.define("aec9e68",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"支持表头分组,通过在 cloumn 上设置 groupName 实现。",body:{type:"table",data:{items:[{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"A"},{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"B"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 95+",version:"4",grade:"C"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"3",grade:"A"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"A"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"B"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"C"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"}]},columns:[{name:"engine",label:"Rendering engine",groupName:"A"},{name:"browser",label:"Browser",groupName:"A"},{name:"platform",label:"Platform(s)",groupName:"B"},{name:"version",label:"Engine version",groupName:"B"},{name:"grade",label:"CSS grade"}]}}});
|
|||
|
;/*!examples/components/CRUD/HeaderHide.jsx*/
|
|||
|
amis.define("d6f26ec",function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"当 column 每一项的 label 值都为空字符时,可以隐藏表头",body:[{type:"table",data:{items:[{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"A"},{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"B"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 95+",version:"4",grade:"C"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"3",grade:"A"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"A"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"B"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"C"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"}]},columns:[{name:"engine",label:""},{name:"browser",label:""},{name:"platform",label:""},{name:"version",label:""},{name:"grade",label:""}]},{type:"divider"},"<h4>搭配合并单元格和列上配置 isHead 可以实现超级表头放在左侧</h4>",{type:"table",data:{items:[{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"A"},{engine:"Trident",browser:"Internet Explorer 4.2",platform:"Win 95+",version:"4",grade:"B"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 95+",version:"4",grade:"C"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"3",grade:"A"},{engine:"Trident",browser:"AOL browser (AOL desktop)",platform:"Win 98",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"4",grade:"A"},{engine:"Gecko",browser:"Firefox 1.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"A"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"B"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"C"},{engine:"Gecko",browser:"Firefox 2.0",platform:"Win 98+ / OSX.2+",version:"5",grade:"D"},{engine:"Gecko",b
|
|||
|
;/*!examples/components/CRUD/LoadOnce.jsx*/
|
|||
|
amis.define("8624815",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"一次性加载,前端分页,前端排序",body:{type:"crud",loadDataOnce:!0,api:"https://houtai.baidu.com/api/sample?waitSeconds=1",filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",addOn:{label:"搜索",type:"submit"}}]},columns:[{name:"id",label:"ID",width:20,sortable:!0,type:"text",toggled:!0,remark:"Bla bla Bla"},{name:"engine",label:"Rendering engine",sortable:!0,type:"text",toggled:!0},{name:"browser",label:"Browser",sortable:!0,type:"text",toggled:!1},{name:"platform",label:"Platform(s)",sortable:!0,type:"text",toggled:!0},{name:"version",label:"Engine version",type:"text",toggled:!0},{name:"grade",label:"CSS grade",type:"text",toggled:!0},{type:"operation",label:"操作",width:100,buttons:[{type:"button",icon:"fa fa-eye",actionType:"dialog",tooltip:"查看",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"},{type:"divider"},{type:"html",html:"<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"}]}}},{type:"button",icon:"fa fa-pencil",tooltip:"编辑",actionType:"drawer",drawer:{position:"left",size:"lg",title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"select",name:"grade",label:"CSS grade",options:["A","B","C","D","X"]}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",tooltip:"删除",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],toggled:!0}]}}});
|
|||
|
;/*!examples/components/Sdk/Test.jsx*/
|
|||
|
amis.define("6baaf1a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("node_modules/tslib/tslib"),n=a.__importDefault(e("node_modules/react/index")),l=a.__importDefault(e("06d307c")),i=e("d019970"),r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={data:{name:"Amis Renderer",id:1,email:"xxx@xxx.com"}},t.handleClick=function(){t.setState({data:{name:"Amis Renderer",id:Math.round(1e3*Math.random()),email:"xxx@xxx.com"}})},t}return a.__extends(t,e),t.prototype.renderForm=function(){var e=this;return i.render({title:"",type:"form",controls:[{type:"text",name:"name",label:"Name"},{type:"text",name:"id",label:"Id"},{type:"email",name:"email",label:"Email"},{type:"static",label:"最后更新时间",name:"lastModified"}]},{data:this.state.data,onFailed:function(e,t){console.log("Submit Failed",t,"\n",e)},onSubmit:function(e){console.log("Submit",e)},onChange:function(t,n){e.setState({data:a.__assign(a.__assign({},t),{lastModified:new Date})}),console.log("Diff",n)}})},t.prototype.render=function(){return n.default.createElement("div",{className:"schema-wrapper"},n.default.createElement(l.default,{title:"API 调用 集成在你的 React 应用中"}),n.default.createElement("div",{className:"wrapper"},this.renderForm(),n.default.createElement("button",{onClick:this.handleClick},"随机修改"),n.default.createElement("h3",null,"当前值"),n.default.createElement("pre",null,n.default.createElement("code",null,JSON.stringify(this.state.data,null,2)))))},t}(n.default.Component);t.default=r});
|
|||
|
;/*!examples/components/Dialog/Simple.jsx*/
|
|||
|
amis.define("8c8c87b",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"page",title:"Dialog",body:[{type:"button-toolbar",className:"m-b",buttons:[{type:"button",label:"打开弹框",actionType:"dialog",dialog:{title:"提示",closeOnEsc:!0,body:"这是个简单的弹框"}},{type:"button",label:"多级弹框",actionType:"dialog",dialog:{title:"提示",closeOnEsc:!0,body:"这是个简单的弹框",actions:[{type:"button",actionType:"confirm",label:"确认",primary:!0},{type:"button",actionType:"dialog",label:"再弹一个",dialog:{title:"弹框中的弹框",closeOnEsc:!0,body:"如果你想,可以无限弹下去",actions:[{type:"button",actionType:"dialog",label:"来吧",level:"info",dialog:{title:"弹框中的弹框",closeOnEsc:!0,body:"如果你想,可以无限弹下去",actions:[{type:"button",actionType:"confirm",label:"不弹了",primary:!0}]}}]}}]}},{type:"button",label:"弹个表单",actionType:"dialog",dialog:{title:"在弹框中的表单",closeOnEsc:!0,actions:[{label:"取消",actionType:"close",type:"button"},{label:"确认",actionType:"confirm",type:"button",level:"primary"},{label:"提交不关闭",actionType:"submit",close:!1,type:"button",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",level:"primary"},{label:"保存不关闭",actionType:"ajax",type:"button",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=4",level:"info"},{type:"button",label:"Feedback",close:!0,actionType:"ajax",api:"https://houtai.baidu.com/api/mock2/form/initData?waitSeconds=2",tooltip:"点击我后会发送一个请求,请求回来后,弹出一个框。",feedback:{title:"操作成功",body:"xxx 已操作成功"}}],body:{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"常规模式",mode:"normal",controls:[{type:"email",name:"email",required:!0,placeholder:"请输入邮箱",label:"邮箱"},{type:"password",name:"password",label:"密码",required:!0,placeholder:"请输入密码"},{type:"checkbox",name:"rememberMe",label:"记住登录"}]}}},{type:"button",label:"再弹个表单",actionType:"dialog",dialog:{title:"在弹框中的表单",actions:[{label:"取消",actionType:"close",type:"button"},{label:"确认",actionType:"confirm",type:"button",level:"primary",disabledOn:"!data.rememberMe"}],body:{type:"form",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",title:"常规模式",mode:"normal",controls:[{type:"checkbox",name:"rememberMe",label:"勾上我才可以确认"}]}}},{type:"button",label:"Feedback",actionType:"ajax",api:"https://houtai.baidu.com/api/mock2/form/initData?waitSeconds=2",tooltip:"点击我后会发送一个请求,请求回来后,弹出一个框。",feedback:{title:"操作成功",closeOnEsc:!0,body:"xxx 已操作成功"}},{type:"button",label:"Feedback2",actionType:"ajax",api:"https://houtai.baidu.com/api/mock2/form/initData?waitSeconds=2",tooltip:"可以根据条件弹出,比如这个栗子,看当前时间戳是否可以整除3",feedback:{visibleOn:"!(this.date % 3)",title:"操作成功",body:"当前时间戳: <code>${date}</code>"}}]},{type:"button-toolbar",className:"m-l-none",buttons:[{type:"button",label:"sm 弹框",actionType:"dialog",dialog:{size:"sm",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"标准 弹框",actionType:"dialog",dialog:{title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"lg 弹框",actionType:"dialog",dialog:{size:"lg",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"xl 弹框",actionType:"dialog",dialog:{size:"xl",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"full 弹框",actionType:"dialog",dialog:{size:"full",title:"全屏弹框",body:"弹框尽可能占满,内容部分滚动。"}}]}]}});
|
|||
|
;/*!examples/components/Dialog/Drawer.jsx*/
|
|||
|
amis.define("aa693dc",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"Drawer",body:[{type:"button-toolbar",className:"block",buttons:[{type:"button",label:"左侧弹出-极小框",actionType:"drawer",drawer:{position:"left",size:"xs",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"左侧弹出-小框",actionType:"drawer",drawer:{position:"left",size:"sm",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"左侧弹出-中框",actionType:"drawer",drawer:{position:"left",size:"md",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"左侧弹出-大框",actionType:"drawer",drawer:{position:"left",size:"lg",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"左侧弹出-超大",actionType:"drawer",level:"danger",drawer:{position:"left",size:"xl",title:"提示",body:"这是个简单的弹框"}}]},{type:"button-toolbar",className:"block m-t",buttons:[{type:"button",label:"右侧弹出-极小框",level:"success",actionType:"drawer",drawer:{position:"right",size:"xs",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"右侧弹出-小框",level:"success",actionType:"drawer",drawer:{position:"right",size:"sm",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"右侧弹出-中框",level:"success",actionType:"drawer",drawer:{position:"right",size:"md",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"右侧弹出-大框",level:"success",actionType:"drawer",drawer:{position:"right",size:"lg",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"右侧弹出-超大",level:"danger",actionType:"drawer",drawer:{size:"xl",position:"right",title:"提示",body:"这是个简单的弹框"}}]},{type:"button-toolbar",className:"block m-t",buttons:[{type:"button",label:"顶部弹出-极小框",actionType:"drawer",level:"info",drawer:{position:"top",size:"xs",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"顶部弹出-小框",level:"info",actionType:"drawer",drawer:{position:"top",size:"sm",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"顶部弹出-中框",actionType:"drawer",level:"info",drawer:{position:"top",size:"md",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"顶部弹出-大框",actionType:"drawer",level:"info",drawer:{position:"top",size:"lg",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"顶部弹出 - 超大",level:"danger",actionType:"drawer",drawer:{position:"top",size:"xl",title:"提示",body:"这是个简单的弹框"}}]},{type:"button-toolbar",className:"block m-t",buttons:[{type:"button",label:"底部弹出-极小框",actionType:"drawer",level:"primary",drawer:{position:"bottom",size:"xs",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"底部弹出-小框",level:"primary",actionType:"drawer",drawer:{position:"bottom",size:"sm",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"底部弹出-中框",actionType:"drawer",level:"primary",drawer:{position:"bottom",size:"md",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"底部弹出-大框",actionType:"drawer",level:"primary",drawer:{position:"bottom",size:"lg",title:"提示",body:"这是个简单的弹框"}},{type:"button",label:"底部弹出-超大",level:"danger",actionType:"drawer",drawer:{position:"bottom",size:"xl",title:"提示",body:"这是个简单的弹框"}}]},{type:"button-toolbar",className:"block m-t",buttons:[{type:"button",label:"多级弹框",actionType:"drawer",level:"danger",drawer:{title:"提示",body:"这是个简单的弹框",closeOnEsc:!0,actions:[{type:"button",actionType:"confirm",label:"确认",primary:!0},{type:"button",actionType:"drawer",label:"再弹一个",drawer:{position:"left",title:"弹框中的弹框",closeOnEsc:!0,body:"如果你想,可以无限弹下去",actions:[{type:"button",actionType:"drawer",label:"来吧",level:"info",drawer:{position:"right",title:"弹框中的<EFBFBD><EFBFBD>
|
|||
|
;/*!examples/components/Linkage/Page.jsx*/
|
|||
|
amis.define("8744105",function(i,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",type:"page",title:"地址栏变化自动更新",initApi:"https://houtai.baidu.com/api/mock2/form/initData?id=${id}",aside:{type:"wrapper",size:"xs",className:"",body:{type:"nav",stacked:!0,links:[{label:"页面1",to:"?id=1"},{label:"页面2",children:[{label:"页面2-1",to:"?id=2-1"},{label:"页面2-2",to:"?id=2-2"},{label:"页面2-3(disabled)",disabled:!0,to:"?id=2-3"}]},{label:"页面3",to:"?id=3"}]}},body:['<p><span class="text-danger">注意 page 渲染器的 `initApi` 中有变量跟地址栏中变量关联,只要值发生了变化,就会重新拉取一次 initApi。</sapn></p>','<p>这些数据是通过 initApi 拉取到的数据。 `\\$infoId`: <span class="text-danger">${infoId|default:空}</span></p>']}});
|
|||
|
;/*!examples/components/Linkage/Form.jsx*/
|
|||
|
amis.define("34cc2e3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"表单与表单之间的联动",aside:{type:"form",target:"detailForm",className:"wrapper-sm",wrapWithPanel:!1,controls:[{type:"text",placeholder:"关键字",name:"keywords",addOn:{type:"submit",label:"搜索",primary:!0}},'<span class="text-danger">请在此输入内容后点击搜索</sapn>']},body:{name:"detailForm",type:"form",mode:"horizontal",title:"",initApi:"https://houtai.baidu.com/api/mock2/form/initData?keywords=${keywords}",actions:[],controls:["Form 模型除了用来提交数据外,还比较适合用来做详情数据的展示",{type:"divider"},{label:"名称",type:"static",labelClassName:"text-muted",name:"name"},{label:"作者",type:"static",labelClassName:"text-muted",name:"author"},{label:"输入信息",type:"static",labelClassName:"text-muted",name:"info"},{label:"请求时间",type:"static-datetime",labelClassName:"text-muted",format:"YYYY-MM-DD HH:mm:ss",name:"date"}]}}});
|
|||
|
;/*!examples/components/Linkage/Form2.jsx*/
|
|||
|
amis.define("1697a1b",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"表单初始数据自动重新拉取",body:[{type:"form",mode:"horizontal",title:"监听表单内部的修改",initApi:"https://houtai.baidu.com/api/mock2/form/initData?tpl=${tpl}",actions:[],controls:['<span class="text-danger">当 <code>initApi</code> 中有变量,且变量的值发生了变化了,则该表单就会重新初始数据。</span>',{type:"divider"},{label:"数据模板",type:"select",labelClassName:"text-muted",name:"tpl",value:"tpl1",inline:!0,options:[{label:"模板1",value:"tpl1"},{label:"模板2",value:"tpl2"},{label:"模板3",value:"tpl3"}],description:'<span class="text-danger">请修改这里看效果</span>'},{label:"名称",type:"static",labelClassName:"text-muted",name:"name"},{label:"作者",type:"static",labelClassName:"text-muted",name:"author"},{label:"请求时间",type:"static-datetime",labelClassName:"text-muted",format:"YYYY-MM-DD HH:mm:ss",name:"date"}]},{type:"grid",columns:[{type:"form",mode:"horizontal",title:"自动填充",actions:[],controls:[{label:"数据模板",type:"select",labelClassName:"text-muted",name:"tpl",value:"tpl1",inline:!0,options:[{label:"模板1",value:"tpl1"},{label:"模板2",value:"tpl2"},{label:"模板3",value:"tpl3"}],description:'<span class="text-danger">请修改这里看效果</span>'},'<div class="text-danger m-b">如果 <code>initApi</code> 已经暂用,用 <code>service</code>一样可以拉取值填充,同样以下 api 值发生变化时会自动填充。</div>',{type:"service",api:"https://houtai.baidu.com/api/mock2/form/initData?tpl=${tpl}",body:{controls:[{label:"名称",type:"text",labelClassName:"text-muted",name:"name"},{label:"作者",type:"text",labelClassName:"text-muted",name:"author"},{label:"请求时间",type:"datetime",labelClassName:"text-muted",inputFormat:"YYYY-MM-DD HH:mm:ss",name:"date"}]}}]},{type:"form",mode:"horizontal",title:"手动填充",actions:[],controls:[{type:"group",label:"数据模板",labelClassName:"text-muted",controls:[{type:"select",name:"tpl",value:"tpl1",mode:"inline",options:[{label:"模板1",value:"tpl1"},{label:"模板2",value:"tpl2"},{label:"模板3",value:"tpl3"}]},{mode:"inline",type:"button",label:"获取",level:"dark",actionType:"reload",target:"theService"}]},'<div class="text-danger m-b">如果不想自动填充,自动填充,则把参数放在 data 里面,就不会监控变化自动拉取了,同时把 <code>servcie</code> 的初始拉取关掉,然后来个刷新目标组件的按钮。</div>',{type:"service",name:"theService",api:{method:"get",url:"https://houtai.baidu.com/api/mock2/form/initData",data:{tpl:"${tpl}"}},body:{controls:[{label:"名称",type:"text",labelClassName:"text-muted",name:"name"},{label:"作者",type:"text",labelClassName:"text-muted",name:"author"},{label:"请求时间",type:"datetime",labelClassName:"text-muted",inputFormat:"YYYY-MM-DD HH:mm:ss",name:"date"}]}}]}]},{type:"divider"},{type:"form",title:"条件表单",target:"detailForm",submitOnInit:!0,mode:"inline",controls:[{label:"数据模板",type:"select",labelClassName:"text-muted",name:"tpl",value:"tpl1",options:[{label:"模板1",value:"tpl1"},{label:"模板2",value:"tpl2"},{label:"模板3",value:"tpl3"}]},{type:"submit",label:"提交",primary:!0}]},{name:"detailForm",type:"form",mode:"horizontal",title:"响应表单",initApi:"https://houtai.baidu.com/api/mock2/form/initData?tpl=${tpl}",initFetchOn:"data.tpl",actions:[],controls:['<span class="text-danger">当 <code>initApi</code> 中有变量,且变量的值发生了变化了,则该表单就会重新初始数据。</span>',{type:"divider"},{label:"名称",type:"static",labelClassName:"text-muted",name:"name"},{label:"作者",type:"static",labelClassName:"text-muted",name:"author"},{label:"请求时间",type:"static-datetime",labelClassName:"text-muted",format:"YYYY-MM-DD HH:mm:ss",name:"date"}]}]}});
|
|||
|
;/*!examples/components/Linkage/CRUD.jsx*/
|
|||
|
amis.define("84cfdf0",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"表单与列表之间的联动",body:[{title:"",type:"form",mode:"inline",target:"list",wrapWithPanel:!1,className:"m-b",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",clearable:!0,addOn:{type:"submit",icon:"fa fa-search",level:"primary"}}]},{type:"crud",name:"list",api:"https://houtai.baidu.com/api/sample",mode:"list",listItem:{actions:[{type:"button",icon:"fa fa-eye",actionType:"dialog",dialog:{title:"查看",body:{type:"form",controls:[{type:"static",name:"engine",label:"Engine"},{type:"divider"},{type:"static",name:"browser",label:"Browser"},{type:"divider"},{type:"static",name:"platform",label:"Platform(s)"},{type:"divider"},{type:"static",name:"version",label:"Engine version"},{type:"divider"},{type:"static",name:"grade",label:"CSS grade"}]}}},{type:"button",icon:"fa fa-pencil",actionType:"dialog",dialog:{title:"编辑",body:{type:"form",name:"sample-edit-form",api:"https://houtai.baidu.com/api/sample/$id",controls:[{type:"text",name:"engine",label:"Engine",required:!0},{type:"divider"},{type:"text",name:"browser",label:"Browser",required:!0},{type:"divider"},{type:"text",name:"platform",label:"Platform(s)",required:!0},{type:"divider"},{type:"text",name:"version",label:"Engine version"},{type:"divider"},{type:"text",name:"grade",label:"CSS grade"}]}}},{type:"button",icon:"fa fa-times text-danger",actionType:"ajax",confirmText:"您确认要删除?",api:"delete:https://houtai.baidu.com/api/sample/$id"}],body:[{name:"engine",label:"Rendering engine",labelClassName:"w-sm"},[{name:"browser",label:"Browser",labelClassName:"w-sm"},{name:"platform",label:"Platform(s)",labelClassName:"w-sm"}],{name:"version",label:"Engine version",labelClassName:"w-sm"}]}}]}});
|
|||
|
;/*!examples/components/Linkage/Options.jsx*/
|
|||
|
amis.define("2b09ee3",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"表单选线之间的远程联动",body:{type:"form",mode:"horizontal",title:"",actions:[],controls:['<p class="text-danger">表单选项可以设置 source 通过 API 远程拉取,同时如果 source 中有变量的话,变量值发生变化就会重新拉取,达到联动效果。</p>',{type:"divider"},{label:"选项1",type:"select",labelClassName:"text-muted",name:"a",inline:!0,options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",value:3}]},{label:"选项2",type:"select",labelClassName:"text-muted",name:"b",inline:!0,source:"https://houtai.baidu.com/api/mock2/options/level2?a=${a}",initFetchOn:"data.a"},{label:"选项3",type:"select",labelClassName:"text-muted",name:"c",inline:!0,visibleOn:"data.b",source:"https://houtai.baidu.com/api/mock2/options/level3?b=${b}"}]}}});
|
|||
|
;/*!examples/components/Linkage/OptionsLocal.jsx*/
|
|||
|
amis.define("9aaa8bb",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={type:"page",title:"表单选线的联动",body:{type:"form",mode:"horizontal",title:"",actions:[],controls:['<p class="text-danger">表单选项内也能联动,通过配置 visibleOn、hiddenOn或者disabledOn</p>',{type:"divider"},{label:"选项1",type:"list",multiple:!1,labelClassName:"text-muted",name:"a",inline:!0,options:[{label:"选项1",value:1},{label:"选项2",value:2},{label:"选项3",value:3}]},{label:"选项2",type:"radios",labelClassName:"text-muted",name:"b",inline:!0,options:[{label:"选项1",value:1,disabledOn:"data.a == 1"},{label:"选项2",value:2,hiddenOn:"data.a == 2"},{label:"选项3",value:3,visibleOn:"data.a == 3"}]}]}}});
|
|||
|
;/*!examples/components/Wizard.jsx*/
|
|||
|
amis.define("083a456",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"表单向导",body:[{type:"wizard",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",initApi:"https://houtai.baidu.com/api/mock2/form/initData?waitSeconds=2",steps:[{title:"第一步",controls:[{name:"website",label:"网址",type:"url",required:!0},{name:"name",label:"名称",type:"text",required:!0}]},{title:"Step 2",controls:[{name:"email2",label:"邮箱",type:"email",required:!0}]},{title:"Step 3",controls:["这是最后一步了"]}]},{type:"wizard",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2",mode:"vertical",steps:[{title:"第一步",controls:[{name:"website",label:"网址",type:"url",required:!0},{name:"email",label:"邮箱",type:"email",required:!0}]},{title:"Step 2",controls:[{name:"email2",label:"邮箱",type:"email",required:!0}]},{title:"Step 3",controls:["这是最后一步了"]}]},{type:"wizard",steps:[{title:"第一步",controls:[{name:"website",label:"网址",type:"url",required:!0},{name:"email",label:"邮箱",type:"email",required:!0}],api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2"},{title:"第二步",controls:[{name:"test1",type:"email",label:"Email",value:"test@test.com"},{type:"divider"},{type:"text",name:"test2",label:"必填示例",required:!0},{type:"divider"},{type:"text",name:"test3",placeholder:"可选"}],initApi:"https://houtai.baidu.com/api/mock2/form/initForm",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2"},{title:"确定",controls:["最后一步了,确认要提交吗?"],api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2"}]}]}});
|
|||
|
;/*!examples/components/Chart.jsx*/
|
|||
|
amis.define("91e25e6",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"图表示例",body:[{type:"grid",columns:[{type:"panel",title:"本地配置示例 支持交互",name:"chart-local",body:[{type:"chart",config:{title:{text:"极坐标双数值轴"},legend:{data:["line"]},polar:{center:["50%","54%"]},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},angleAxis:{type:"value",startAngle:0},radiusAxis:{min:0},series:[{coordinateSystem:"polar",name:"line",type:"line",showSymbol:!1,data:[[0,0],[.03487823687206265,1],[.06958655048003272,2],[.10395584540887964,3],[.13781867790849958,4],[.17101007166283433,5],[.2033683215379001,6],[.2347357813929454,7],[.26495963211660245,8],[.2938926261462365,9],[.3213938048432697,10]]}],animationDuration:2e3},clickAction:{actionType:"dialog",dialog:{title:"详情",body:[{type:"tpl",tpl:"<span>当前选中值 ${value|json}<span>"},{type:"chart",api:"https://houtai.baidu.com/api/mock2/chart/chart1"}]}}}]},{type:"panel",title:"远程图表示例(返回值带function)",name:"chart-remote",body:[{type:"chart",api:"https://houtai.baidu.com/api/mock2/chart/chart1"}]}]},{type:"panel",title:"Form+chart组合",body:[{type:"form",title:"过滤条件",target:"chart1,chart2",submitOnInit:!0,className:"m-b",wrapWithPanel:!1,mode:"inline",controls:[{type:"date",label:"开始日期",name:"starttime",value:"-8days",maxDate:"${endtime}"},{type:"date",label:"结束日期",name:"endtime",value:"-1days",minDate:"${starttime}"},{type:"text",label:"条件",name:"name",addOn:{type:"submit",label:"搜索",level:"primary"}}],actions:[]},{type:"divider"},{type:"grid",className:"m-t-lg",columns:[{type:"chart",name:"chart1",initFetch:!1,api:"https://houtai.baidu.com/api/mock2/chart/chart?name=$name&starttime=${starttime}&endtime=${endtime}"},{type:"chart",name:"chart2",initFetch:!1,api:"https://houtai.baidu.com/api/mock2/chart/chart2?name=$name"}]}]}]}});
|
|||
|
;/*!examples/components/Horizontal.jsx*/
|
|||
|
amis.define("07c797d",function(e,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"HBox & Grid",type:"page",body:[{type:"plain",tpl:"Grid 请参考 bootstrap 的 grid 布局",inline:!1,className:"h3 m-b-xs"},{type:"grid",columns:[{type:"tpl",tpl:"sm-2",sm:2,className:"bg-info",inline:!1},{type:"tpl",tpl:"sm-4",sm:4,className:"bg-success",inline:!1},{type:"tpl",tpl:"sm-6",sm:6,className:"bg-primary",inline:!1}]},{type:"plain",tpl:"Hbox",inline:!1,className:"h3 m-t m-b-xs"},{type:"hbox",columns:[{type:"tpl",tpl:"平均分配",className:"bg-info",inline:!1},{type:"tpl",tpl:"平均分配",className:"bg-success",inline:!1},{type:"tpl",tpl:"平均分配",className:"bg-primary",inline:!1}]},{type:"plain",tpl:"Hbox 部分定宽",inline:!1,className:"h3 m-t m-b-xs"},{type:"hbox",columns:[{type:"tpl",tpl:"w-xs",className:"bg-info",inline:!1,columnClassName:"w-xs"},{type:"tpl",tpl:"w-sm",className:"bg-info lter",inline:!1,columnClassName:"w-sm"},{type:"tpl",tpl:"w",className:"bg-info dk",inline:!1,columnClassName:"w"},{type:"tpl",tpl:"平均分配",className:"bg-success",inline:!1},{type:"tpl",tpl:"平均分配",className:"bg-primary",inline:!1}]},{type:"plain",tpl:"示例",inline:!1,className:"h3 m-t m-b-xs"},{type:"grid",columns:[{type:"panel",title:"面板1",className:"Panel--danger",body:"内容",sm:4},{type:"panel",title:"面板2",className:"Panel--primary",body:"内容",sm:8}]}]}});
|
|||
|
;/*!examples/components/Video.jsx*/
|
|||
|
amis.define("9a6615a",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"视频播放器",body:['<p class="text-danger">另外还支持直播流, flv 和 hls 格式</p>',{type:"video",autoPlay:!1,rates:[1,1.5,2],jumpFrame:!0,jumpBufferDuration:5,frames:{"00:10":"","00:20":"","00:30":""},src:"https://amis.bj.bcebos.com/amis/2019-12/1577157317579/trailer_hd.mp4",poster:"https://internal-amis-res.cdn.bcebos.com/images/2019-12/1577157239810/da6376bf988c.png"}]}});
|
|||
|
;/*!examples/components/Audio.jsx*/
|
|||
|
amis.define("62761e6",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"音频播放器",body:[{type:"audio",autoPlay:!1,rates:[1,1.5,2],src:"https://amis.bj.bcebos.com/amis/2019-7/1562137295708/chicane-poppiholla-original-radio-edit%20(1).mp3"},{type:"form",title:"",actions:[],className:"b v-middle inline w-lg h-xs",controls:[{type:"card",className:"v-middle w inline no-border",header:{title:"歌曲名称",subTitle:"专辑名称",description:"description",avatarClassName:"pull-left thumb-md avatar m-r no-border",avatar:"http://hiphotos.baidu.com/fex/%70%69%63/item/c9fcc3cec3fdfc03ccabb38edd3f8794a4c22630.jpg"}},{type:"audio",className:"v-middle no-border",src:"https://amis.bj.bcebos.com/amis/2019-7/1562137295708/chicane-poppiholla-original-radio-edit%20(1).mp3",controls:["play"]}]}]}});
|
|||
|
;/*!examples/components/Carousel.jsx*/
|
|||
|
amis.define("09f8832",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"轮播图",data:{carousel0:["https://hiphotos.baidu.com/fex/%70%69%63/item/bd3eb13533fa828b13b24500f31f4134960a5a44.jpg","https://internal-amis-res.cdn.bcebos.com/images/2019-12/1577157239810/da6376bf988c.png","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg"],carousel1:[{html:'<div style="width: 100%; height: 300px; background: #e3e3e3; text-align: center; line-height: 300px;">carousel data in form</div>'},{image:"https://hiphotos.baidu.com/fex/%70%69%63/item/bd3eb13533fa828b13b24500f31f4134960a5a44.jpg"},{image:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg"}]},body:[{type:"grid",columns:[{type:"panel",title:"直接页面配置",body:{type:"carousel",controlsTheme:"light",height:"300",options:[{image:"https://internal-amis-res.cdn.bcebos.com/images/2019-12/1577157239810/da6376bf988c.png"},{html:'<div style="width: 100%; height: 300px; background: #e3e3e3; text-align: center; line-height: 300px;">carousel data</div>'},{image:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg"}]}},{type:"panel",title:"使用itemSchema配置",body:{type:"carousel",name:"carousel0",controlsTheme:"dark",height:"300",itemSchema:{type:"tpl",tpl:'<div style="height: 100%; background-image: url(<%=data.item%>); background-position: center center; background-size: cover;"></div>'}}}]},{type:"grid",columns:[{type:"form",title:"表单内展示",sm:6,controls:[{type:"carousel",controlsTheme:"dark",name:"carousel1",label:"carousel",animation:"slide",height:"300"}]}]}]}});
|
|||
|
;/*!examples/components/Tasks.jsx*/
|
|||
|
amis.define("1aa7d40",function(a,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"异步任务",body:['<p class="text-danger"></p>',{type:"tasks",name:"tasks",items:[{label:"hive 任务",key:"hive",status:4,remark:'查看详情<a target="_blank" href="http://www.baidu.com">日志</a>。'},{label:"小流量",key:"partial",status:4},{label:"全量",key:"full",status:4}]},{type:"tasks",name:"tasks",className:"b-a bg-white table-responsive m-t",checkApi:"https://houtai.baidu.com/api/mock2/task"}]}});
|
|||
|
;/*!examples/components/Services/Data.jsx*/
|
|||
|
amis.define("45bc56b",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={type:"page",title:"动态加载数据",body:['<span class="text-danger">除了用 Page、CRUD、Form 或者 Wizard 能拉取数据外,还可以通过 Service 专门拉取数据,然后丢给其他类型的渲染器渲染。</span>',{type:"form",title:"条件输入",className:"m-t",wrapWithPanel:!1,target:"service1",mode:"inline",controls:[{type:"text",name:"keywords",placeholder:"关键字",addOn:{type:"button",icon:"fa fa-search",actionType:"submit",level:"primary"}}]},{name:"service1",type:"service",className:"m-t",api:"https://houtai.baidu.com/api/mock2/service/data?keywords=${keywords}",body:["当前关键字是 ${keywords},当前时间是: ${date|date:YYYY-MM-DD HH\\:mm}",{type:"table",className:"m-t",source:"${table1}",columns:[{name:"id",label:"ID",type:"text"},{name:"text",label:"文本",type:"text"},{type:"image",label:"图片",name:"image",popOver:{title:"查看大图",body:'<div class="w-xxl"><img class="w-full" src="${image}"/></div>'}},{name:"date",type:"date",label:"日期"}]},{type:"table",source:"${table2}",columns:[{name:"progress",label:"进度",type:"progress"},{name:"boolean",label:"状态",type:"status"},{name:"boolean",label:"开关",type:"switch"},{name:"type",label:"映射",type:"mapping",map:{"*":"其他:${type}",1:"<span class='label label-info'>漂亮</span>",2:"<span class='label label-success'>开心</span>",3:"<span class='label label-danger'>惊吓</span>",4:"<span class='label label-warning'>紧张</span>"}},{name:"list",type:"list",label:"List",placeholder:"-",listItem:{title:"${title}",subTitle:"${description}"}}]}]}]}});
|
|||
|
;/*!examples/components/Services/Schema.jsx*/
|
|||
|
amis.define("65f0d23",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"动态加载页面",body:['<span class="text-danger">可以通过 <code>service</code>的<code>schemaApi</code> 动态控制内容。</span>',{type:"form",title:"条件输入",panelClassName:"panel-info m-t",target:"service1",mode:"inline",submitOnInit:!0,controls:[{label:"加载页面类型",required:!0,type:"button-group",submitOnChange:!0,value:"crud",name:"type",options:[{label:"Crud",value:"crud"},{label:"Form",value:"form"},{label:"Tabs",value:"tabs"}]}]},{name:"service1",type:"service",className:"m-t",initFetchSchema:!1,schemaApi:"https://houtai.baidu.com/api/mock2/service/schema?type=$type"}]}});
|
|||
|
;/*!examples/components/Services/Form.jsx*/
|
|||
|
amis.define("2c4132a",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"动态加载表单中的部分",body:['<span class="text-danger">同样通过 <code>service</code>的<code>schemaApi</code> 来加载部分内容,当然也可以全部由它来加载</span>',{type:"form",panelClassName:"Panel--info m-t",target:"service1",mode:"horizontal",api:"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=1",fieldSet:[{title:"基本信息",controls:[{type:"text",label:"字段一",name:"filed1"},{type:"text",label:"字段二",name:"filed2"}]},{title:"其他信息",controls:[{name:"tpl",type:"select",label:"模板",inline:!0,required:!0,value:"tpl1",options:[{label:"模板1",value:"tpl1"},{label:"模板2",value:"tpl2"},{label:"模板3",value:"tpl3"}]},{type:"service",className:"m-t",initFetchSchemaOn:"data.tpl",schemaApi:"https://houtai.baidu.com/api/mock2/service/form?tpl=$tpl"}]}]}]}});
|
|||
|
;/*!examples/components/IFrame.jsx*/
|
|||
|
amis.define("4c89be2",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={$schema:"https://houtai.baidu.com/v2/schemas/page.json#",title:"IFrame 可以用来嵌入其他网站",body:[{type:"form",mode:"inline",target:"window",title:"",controls:[{type:"text",name:"keywords",addOn:{type:"submit",label:"搜索",level:"info",icon:"fa fa-search pull-left"}}]},{type:"iframe",className:"b-a",src:"https://www.baidu.com/s?wd=${keywords|raw}",height:500}]}});
|
|||
|
;/*!examples/components/Tabs/Normal.jsx*/
|
|||
|
amis.define("524d91c",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"选项卡示例",subTitle:"所有选项卡都在当前页面中,包括默认、line、card以及radio模式",body:[{type:"tabs",tabs:[{title:"选项卡1",hash:"tab1",body:"选项卡内容1"},{title:"选项卡2",hash:"tab2",body:{type:"form",panelClassName:"panel-primary",controls:[{type:"text",name:"a",label:"文本"}]}},{title:"选项卡3",body:{type:"crud",api:"https://houtai.baidu.com/api/sample",filter:{title:"条件搜索",submitText:"",controls:[{type:"text",name:"keywords",placeholder:"通过关键字搜索",clearable:!0,addOn:{label:"搜索",type:"submit"}},{type:"plain",text:"这里的表单项可以配置多个"}]},columns:[{name:"id",label:"ID",width:20},{name:"engine",label:"Rendering engine"},{name:"browser",label:"Browser"},{name:"platform",label:"Platform(s)"},{name:"version",label:"Engine version"},{name:"grade",label:"CSS grade"},{type:"operation",label:"操作",width:100,buttons:[]}]}}]},{type:"divider"},{type:"tabs",mode:"line",tabs:[{title:"选项卡1",body:"选项卡内容1"},{title:"选项卡2",body:"选项卡内容2"},{title:"选项卡3",body:"选项卡内容3"}]},{type:"divider"},{type:"tabs",mode:"card",tabs:[{title:"选项卡1",body:"选项卡内容1"},{title:"选项卡2",body:"选项卡内容2"},{title:"选项卡3",body:"选项卡内容3"}]},{type:"divider"},{type:"tabs",mode:"radio",tabs:[{title:"选项卡1",body:"选项卡内容1"},{title:"选项卡2",body:"选项卡内容2"},{title:"选项卡3",body:"选项卡内容3"}]}]}});
|
|||
|
;/*!examples/components/Tabs/Form.jsx*/
|
|||
|
amis.define("46b14bf",function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"page",title:"表单中选项卡分组",subTitle:"",body:["<p>多个 controls 可以通过 tabs 来分组展示,表单将作为一个整体提交。</p>",{type:"form",title:"",tabs:[{title:"选项卡1",hash:"tab1",controls:[{type:"text",label:"文本1",name:"a"}]},{title:"选项卡2",hash:"tab2",controls:[{type:"text",label:"文本2",name:"b"}]},{title:"选项卡3",hash:"tab3",controls:[{type:"text",label:"文本3",name:"c"}]}]}]}});
|
|||
|
;/*!examples/components/Tabs/Tab1.jsx*/
|
|||
|
amis.define("a5238eb",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={type:"page",title:"选项卡1页面",body:["<p>也可以多个页面,利用导航<code>nav</code>渲染期模拟 tabs 的效果。这样可以让 url 更加友好,而不是只能用 hash。</p>",{type:"nav",links:[{label:"选项卡1",icon:"fa fa-cloud",to:"./tab1"},{label:"选项卡2",to:"./tab2"},{label:"选项卡3",icon:"fa fa-youtube",to:"./tab3"}]},{type:"wrapper",className:"wrapper bg-white b-l b-b b-r",body:"选项卡1的内容"}]}});
|
|||
|
;/*!examples/components/Tabs/Tab2.jsx*/
|
|||
|
amis.define("23a8cd0",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default={type:"page",title:"选项卡2页面",body:["<p>也可以多个页面,利用导航<code>nav</code>渲染期模拟 tabs 的效果。</p>",{type:"nav",links:[{label:"选项卡1",icon:"fa fa-cloud",to:"./tab1"},{label:"选项卡2",to:"./tab2"},{label:"选项卡3",icon:"fa fa-youtube",to:"./tab3"}]},{type:"wrapper",className:"wrapper bg-white b-l b-b b-r",body:"选项卡2的内容"}]}});
|
|||
|
;/*!examples/components/Tabs/Tab3.jsx*/
|
|||
|
amis.define("a8b725e",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={type:"page",title:"选项卡3页面",body:["<p>也可以多个页面,利用导航<code>nav</code>渲染期模拟 tabs 的效果。</p>",{type:"nav",links:[{label:"选项卡1",icon:"fa fa-cloud",to:"./tab1"},{label:"选项卡2",to:"./tab2"},{label:"选项卡3",icon:"fa fa-youtube",to:"./tab3"}]},{type:"wrapper",className:"wrapper bg-white b-l b-b b-r",body:{type:"chart",config:{title:{text:"极坐标双数值轴"},legend:{data:["line"]},polar:{center:["50%","54%"]},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},angleAxis:{type:"value",startAngle:0},radiusAxis:{min:0},series:[{coordinateSystem:"polar",name:"line",type:"line",showSymbol:!1,data:[[0,0],[.03487823687206265,1],[.06958655048003272,2],[.10395584540887964,3],[.13781867790849958,4],[.17101007166283433,5],[.2033683215379001,6],[.2347357813929454,7],[.26495963211660245,8],[.2938926261462365,9],[.3213938048432697,10]]}],animationDuration:2e3}}}]}});
|
|||
|
;/*!examples/components/Example.tsx*/
|
|||
|
amis.define("9413ffe",function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.examples=void 0;var t=e("node_modules/tslib/tslib"),l=t.__importDefault(e("node_modules/react/index")),o=t.__importDefault(e("ec59a60")),p=t.__importDefault(e("da274e0")),f=t.__importDefault(e("2d1fe26")),m=t.__importDefault(e("71fbd58")),u=t.__importDefault(e("0fa6650")),d=t.__importDefault(e("65795e0")),n=t.__importDefault(e("1e9ff20")),r=t.__importDefault(e("3d2e3d4")),c=t.__importDefault(e("6f89d30")),i=t.__importDefault(e("ee53c68")),s=t.__importDefault(e("c9cebe3")),_=t.__importDefault(e("d2ec869")),b=t.__importDefault(e("435ef3d")),h=t.__importDefault(e("90d3d67")),x=t.__importDefault(e("4f1646b")),D=t.__importDefault(e("b05683a")),g=t.__importDefault(e("c6bae66")),v=t.__importDefault(e("c938c8b")),k=t.__importDefault(e("9b0994b")),y=t.__importDefault(e("6bc539d")),N=t.__importDefault(e("4d416d7")),F=t.__importDefault(e("48c8d88")),P=t.__importDefault(e("b382a0f")),E=t.__importDefault(e("78c2565")),S=t.__importDefault(e("efdb183")),j=t.__importDefault(e("6f62c3a")),w=t.__importDefault(e("3ef3393")),z=t.__importDefault(e("638fc16")),C=t.__importDefault(e("c9850e3")),M=t.__importDefault(e("660d1f0")),T=t.__importDefault(e("a9122cf")),A=t.__importDefault(e("97ac54d")),I=t.__importDefault(e("11455ca")),K=t.__importDefault(e("4e9a795")),O=t.__importDefault(e("ddb86b3")),U=t.__importDefault(e("cd82b91")),q=t.__importDefault(e("77adc0a")),B=t.__importDefault(e("31055e7")),G=t.__importDefault(e("aec9e68")),H=t.__importDefault(e("d6f26ec")),J=t.__importDefault(e("8624815")),L=t.__importDefault(e("6baaf1a")),Q=t.__importDefault(e("8c8c87b")),R=t.__importDefault(e("aa693dc")),V=t.__importDefault(e("8744105")),W=t.__importDefault(e("34cc2e3")),X=t.__importDefault(e("1697a1b")),Y=t.__importDefault(e("84cfdf0")),Z=t.__importDefault(e("2b09ee3")),$=t.__importDefault(e("9aaa8bb")),ea=t.__importDefault(e("083a456")),aa=t.__importDefault(e("91e25e6")),ta=t.__importDefault(e("07c797d")),la=t.__importDefault(e("9a6615a")),oa=t.__importDefault(e("62761e6")),pa=t.__importDefault(e("09f8832")),fa=t.__importDefault(e("1aa7d40")),ma=t.__importDefault(e("45bc56b")),ua=t.__importDefault(e("65f0d23")),da=t.__importDefault(e("2c4132a")),na=t.__importDefault(e("4c89be2")),ra=t.__importDefault(e("524d91c")),ca=t.__importDefault(e("46b14bf")),ia=t.__importDefault(e("a5238eb")),sa=t.__importDefault(e("23a8cd0")),_a=t.__importDefault(e("a8b725e"));a.examples=[{prefix:function(e){var a=e.classnames;return l.default.createElement("li",{className:a("AsideNav-divider")})},label:"示例",children:[{label:"页面",icon:"glyphicon glyphicon-th",badge:3,badgeClassName:"bg-info",children:[{label:"简单页面",path:"/examples/pages/simple",component:o.default(p.default)},{label:"初始化出错",path:"/examples/pages/error",component:o.default(f.default)},{label:"表单页面",path:"/examples/pages/form",component:o.default(m.default)}]},{label:"表单",icon:"fa fa-list-alt",children:[{label:"表单展示模式",path:"/examples/form/mode",component:o.default(u.default)},{label:"所有类型汇总",path:"/examples/form/full",component:o.default(s.default)},{label:"静态展示",path:"/examples/form/static",component:o.default(_.default)},{label:"输入提示",path:"/examples/form/hint",component:o.default(b.default)},{label:"FieldSet",path:"/examples/form/fieldset",component:o.default(d.default)},{label:"Tabs",path:"/examples/form/tabs",component:o.default(n.default)},{label:"FieldSet Tabs 组合",path:"/examples/form/fields-tabs",component:o.default(h.default)},{label:"动态数据",path:"/examples/form/remote",component:o.default(r.default)},{label:"显隐状态联动",path:"/examples/form/reaction",component:o.default(c.default)},{label:"表单验证",path:"/examples/form/validation",component:o.default(i.default)},{label:"组合类型",path:"/examples/form/combo",component:o.default(x.default)},{label:"穿梭器",path:"/examples/form/transfer",component:o.default(y.default)},{label:"多功能选择器",path:"/examples/form/picker",component:o.default(F.d
|
|||
|
;/*!examples/components/App.tsx*/
|
|||
|
amis.define("5f106aa",function(e,t){"use strict";function a(e){return e?"/"===e[0]?_+e:_+"/"+e:""}function l(e,t){void 0===e&&(e=E);var a=[];return t.forEach(function(e){e.children&&u.mapTree(e.children,function(e){e.path&&e.component?a.push(o.default.createElement(m.Route,{key:a.length+1,path:"/"===e.path[0]?_+e.path:_+"/"+e.path,component:e.component})):e.path&&e.getComponent&&a.push(o.default.createElement(m.Route,{key:a.length+1,path:"/"===e.path[0]?_+e.path:_+"/"+e.path,getComponent:e.getComponent}))})}),a}function n(e){e.pathPrefix;return o.default.createElement(m.Router,{history:m.browserHistory},o.default.createElement(m.Route,{component:k},o.default.createElement(m.Redirect,{from:_+"/",to:_+"/docs/index"}),o.default.createElement(m.Redirect,{from:_+"/docs",to:_+"/docs/index"}),o.default.createElement(m.Redirect,{from:_+"/examples",to:_+"/examples/pages/simple"}),o.default.createElement(m.Route,{path:_+"/docs",component:v.default},l(E,v.docs)),o.default.createElement(m.Route,{path:_+"/examples",component:g.default},l(b,g.examples))),o.default.createElement(m.Route,{path:"*",component:s.default}))}Object.defineProperty(t,"__esModule",{value:!0}),t.App=void 0;var i=e("node_modules/tslib/tslib"),o=i.__importDefault(e("node_modules/react/index")),s=i.__importDefault(e("bb0be5b")),r=i.__importDefault(e("4c26fd3")),d=i.__importDefault(e("4e7c54b")),c=e("1953fc1"),u=e("9a80175");e("ee0cecb");var m=e("node_modules/react-router/lib/index"),h=i.__importDefault(e("d57879c")),p=i.__importDefault(e("c6757fd")),f=i.__importDefault(e("node_modules/classnames/index")),v=i.__importStar(e("85a7530")),g=i.__importStar(e("9413ffe")),b="/examples",E="/docs",_="";b="",E="",_="/amis";var y=[{label:"默认主题",ns:"a-",value:"default"},{label:"百度云舍",ns:"cxd-",value:"cxd"},{label:"Dark",ns:"dark-",value:"dark"}],N=[{label:"中文",value:"zh-cn"},{label:"English",value:"en"}],k=function(e){function t(t){var a=e.call(this,t)||this;return a.state={asideFolded:"true"===localStorage.getItem("asideFolded"),offScreen:!1,headerVisible:!0,themeIndex:0,themes:y,theme:y[localStorage.getItem("themeIndex")||0],locale:localStorage.getItem("locale")||"",navigations:[],scrollTop:0},a.toggleAside=a.toggleAside.bind(a),a.setAsideFolded=a.setAsideFolded.bind(a),a.setHeaderVisible=a.setHeaderVisible.bind(a),a.setNavigations=a.setNavigations.bind(a),a}return i.__extends(t,e),t.prototype.componentDidMount=function(){"default"!==this.state.theme.value&&(document.querySelectorAll("link[title]").forEach(function(e){e.disabled=!0}),document.querySelector("link[title="+this.state.theme.value+"]").disabled=!1,"dark"===this.state.theme.value&&document.querySelector("body").classList.add("dark")),document.addEventListener("scroll",this.handleScroll.bind(this))},t.prototype.componentDidUpdate=function(e,t){var a=this.props;if(t.theme.value!==this.state.theme.value&&(document.querySelector("link[title="+t.theme.value+"]").disabled=!0,document.querySelector("link[title="+this.state.theme.value+"]").disabled=!1),a.location.pathname!==e.location.pathname){this.setState({offScreen:!1},function(){return window.scrollTo(0,0)});var l=a.location.pathname;_hmt&&_hmt.push(["_trackPageview",l])}},t.prototype.componentWillUnmount=function(){document.removeEventListener("scroll",this.handleScroll.bind(this))},t.prototype.handleScroll=function(e){this.setState({scrollTop:e.target.scrollingElement.scrollTop})},t.prototype.toggleAside=function(){this.setAsideFolded(!this.state.asideFolded)},t.prototype.setAsideFolded=function(e){void 0===e&&(e=!1),localStorage.setItem("asideFolded",JSON.stringify(e)),this.setState({asideFolded:e})},t.prototype.setHeaderVisible=function(e){void 0===e&&(e=!1),this.setState({headerVisible:e})},t.prototype.renderAside=function(){return o.default.createElement(d.default,{renderLink:function(){return null}})},t.prototype.setNavigations=function(e){this.setState({navigations:e})},t.prototype.toggleOpen=function(e,t){e.stopPropagation(),e.preventDefault();var l=u.mapTree(this.state.navigations,function(e){var l,n=null!==(l=e.isOpen)&&void 0!==l?l:A
|