@nocobase/plugin-field-china-region 1.9.0-beta.9 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +6 -6
- package/package.json +6 -6
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client"),require("@formily/react"),require("@formily/shared")):"function"==typeof define&&define.amd?define("@nocobase/plugin-field-china-region",["@nocobase/client","@formily/react","@formily/shared"],t):"object"==typeof exports?exports["@nocobase/plugin-field-china-region"]=t(require("@nocobase/client"),require("@formily/react"),require("@formily/shared")):e["@nocobase/plugin-field-china-region"]=t(e["@nocobase/client"],e["@formily/react"],e["@formily/shared"])}(self,function(e,t,r){return function(){"use strict";var n={505:function(e){e.exports=t},875:function(e){e.exports=r},772:function(t){t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return!function(){i.r(a),i.d(a,{PluginFieldChinaRegionClient:function(){return g},default:function(){return O}});var e=i(772),t=i(505);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var n=function(r){var n,o,i=(0,t.useField)().componentProps.maxLevel;return(0,e.useRequest)({resource:"chinaRegions",action:"list",params:{sort:"code",paginate:!1,filter:{level:1}}},(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},r),o=o={onSuccess:function(e){var t;null==r||r.onSuccess({data:(null==e||null==(t=e.data)?void 0:t.map(function(e){return 1!==i&&(e.isLeaf=!1),e}))||[]})},manual:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))},o=function(){var n=(0,e.useAPIClient)(),o=(0,t.useField)(),i=o.componentProps.maxLevel;return function(e){var t,a=e[e.length-1];(null==a||null==(t=a.children)?void 0:t.length)>0||(a.loading=!0,n.resource("chinaRegions").list({sort:"code",paginate:!1,filter:{parentCode:a.code}}).then(function(e){var t,n,c=e.data;a.loading=!1,a.children=(null==c||null==(n=c.data)?void 0:n.map(function(e){return i>e.level&&(e.isLeaf=!1),e}))||[],o.dataSource=function(e){if(Array.isArray(e))return r(e)}(t=o.dataSource)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return r(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}).catch(function(e){console.error(e)}))}},c=i(875);function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var p=function(t){var r;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function n(){var t,r,o,i,a;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=arguments,r=l(r),u(t=function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,s()?Reflect.construct(r,o||[],l(this).constructor):r.apply(this,o)),"name","chinaRegion"),u(t,"type","object"),u(t,"group","choices"),u(t,"order",7),u(t,"title",'{{t("China region")}}'),u(t,"isAssociation",!0),u(t,"default",{interface:"chinaRegion",type:"belongsToMany",target:"chinaRegions",targetKey:"code",sortBy:"level",uiSchema:{type:"array","x-component":"Cascader","x-component-props":{useDataSource:"{{ useChinaRegionDataSource }}",useLoadData:"{{ useChinaRegionLoadData }}",changeOnSelectLast:!1,labelInValue:!0,maxLevel:3,fieldNames:{label:"name",value:"code",children:"children"}}}}),u(t,"availableTypes",["belongsToMany"]),u(t,"properties",(i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){u(e,t,r[t])})}return e}({},e.defaultProps),a=a={"uiSchema.x-component-props.maxLevel":{type:"number","x-component":"Radio.Group","x-decorator":"FormItem",title:'{{t("Select level")}}',default:3,enum:[{value:1,label:'{{t("Province")}}'},{value:2,label:'{{t("City")}}'},{value:3,label:'{{t("Area")}}'},{value:4,label:'{{t("Street")}}',disabled:!0},{value:5,label:'{{t("Village")}}',disabled:!0}]},"uiSchema.x-component-props.changeOnSelectLast":{type:"boolean","x-component":"Checkbox","x-content":'{{t("Must select to the last level")}}',"x-decorator":"FormItem"}},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(a)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))}),i)),u(t,"filterable",{children:[{name:"name",title:'{{t("Province/city/area name")}}',operators:e.operators.string,schema:{title:'{{t("Province/city/area name")}}',type:"string","x-component":"Input"}}]}),t}return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&f(n,t),r=[{key:"initialize",value:function(e){e.through||(e.through="t_".concat((0,c.uid)())),e.foreignKey||(e.foreignKey="f_".concat((0,c.uid)())),e.otherKey||(e.otherKey="f_".concat((0,c.uid)())),e.sourceKey||(e.sourceKey="id"),e.targetKey||(e.targetKey="id")}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,r),n}(e.CollectionFieldInterface);function y(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function b(e,t,r){return(b=m()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&h(o,r.prototype),o}).apply(null,arguments)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t="function"==typeof Map?new Map:void 0;return(v=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return b(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)})(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}var g=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=d(e),function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,m()?Reflect.construct(e,t||[],d(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&h(r,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var u=[i,c];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){return t.app.addScopes({useChinaRegionDataSource:n,useChinaRegionLoadData:o}),t.app.dataSourceManager.addFieldInterfaces([p]),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,c,"next",e)}function c(e){y(i,n,o,a,c,"throw",e)}a(void 0)})})()}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(v(e.Plugin)),O=g}(),a}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client"),require("@formily/shared"),require("@formily/react")):"function"==typeof define&&define.amd?define("@nocobase/plugin-field-china-region",["@nocobase/client","@formily/shared","@formily/react"],t):"object"==typeof exports?exports["@nocobase/plugin-field-china-region"]=t(require("@nocobase/client"),require("@formily/shared"),require("@formily/react")):e["@nocobase/plugin-field-china-region"]=t(e["@nocobase/client"],e["@formily/shared"],e["@formily/react"])}(self,function(e,t,r){return function(){"use strict";var n={505:function(e){e.exports=r},875:function(e){e.exports=t},772:function(t){t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return!function(){i.r(a),i.d(a,{PluginFieldChinaRegionClient:function(){return g},default:function(){return O}});var e=i(772),t=i(505);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var n=function(r){var n,o,i=(0,t.useField)().componentProps.maxLevel;return(0,e.useRequest)({resource:"chinaRegions",action:"list",params:{sort:"code",paginate:!1,filter:{level:1}}},(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},r),o=o={onSuccess:function(e){var t;null==r||r.onSuccess({data:(null==e||null==(t=e.data)?void 0:t.map(function(e){return 1!==i&&(e.isLeaf=!1),e}))||[]})},manual:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))},o=function(){var n=(0,e.useAPIClient)(),o=(0,t.useField)(),i=o.componentProps.maxLevel;return function(e){var t,a=e[e.length-1];(null==a||null==(t=a.children)?void 0:t.length)>0||(a.loading=!0,n.resource("chinaRegions").list({sort:"code",paginate:!1,filter:{parentCode:a.code}}).then(function(e){var t,n,c=e.data;a.loading=!1,a.children=(null==c||null==(n=c.data)?void 0:n.map(function(e){return i>e.level&&(e.isLeaf=!1),e}))||[],o.dataSource=function(e){if(Array.isArray(e))return r(e)}(t=o.dataSource)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return r(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}).catch(function(e){console.error(e)}))}},c=i(875);function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var p=function(t){var r;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function n(){var t,r,o,i,a;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=arguments,r=l(r),u(t=function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,s()?Reflect.construct(r,o||[],l(this).constructor):r.apply(this,o)),"name","chinaRegion"),u(t,"type","object"),u(t,"group","choices"),u(t,"order",7),u(t,"title",'{{t("China region")}}'),u(t,"isAssociation",!0),u(t,"default",{interface:"chinaRegion",type:"belongsToMany",target:"chinaRegions",targetKey:"code",sortBy:"level",uiSchema:{type:"array","x-component":"Cascader","x-component-props":{useDataSource:"{{ useChinaRegionDataSource }}",useLoadData:"{{ useChinaRegionLoadData }}",changeOnSelectLast:!1,labelInValue:!0,maxLevel:3,fieldNames:{label:"name",value:"code",children:"children"}}}}),u(t,"availableTypes",["belongsToMany"]),u(t,"properties",(i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){u(e,t,r[t])})}return e}({},e.defaultProps),a=a={"uiSchema.x-component-props.maxLevel":{type:"number","x-component":"Radio.Group","x-decorator":"FormItem",title:'{{t("Select level")}}',default:3,enum:[{value:1,label:'{{t("Province")}}'},{value:2,label:'{{t("City")}}'},{value:3,label:'{{t("Area")}}'},{value:4,label:'{{t("Street")}}',disabled:!0},{value:5,label:'{{t("Village")}}',disabled:!0}]},"uiSchema.x-component-props.changeOnSelectLast":{type:"boolean","x-component":"Checkbox","x-content":'{{t("Must select to the last level")}}',"x-decorator":"FormItem"}},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(a)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))}),i)),u(t,"filterable",{children:[{name:"name",title:'{{t("Province/city/area name")}}',operators:e.operators.string,schema:{title:'{{t("Province/city/area name")}}',type:"string","x-component":"Input"}}]}),t}return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&f(n,t),r=[{key:"initialize",value:function(e){e.through||(e.through="t_".concat((0,c.uid)())),e.foreignKey||(e.foreignKey="f_".concat((0,c.uid)())),e.otherKey||(e.otherKey="f_".concat((0,c.uid)())),e.sourceKey||(e.sourceKey="id"),e.targetKey||(e.targetKey="id")}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,r),n}(e.CollectionFieldInterface);function y(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function b(e,t,r){return(b=m()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&h(o,r.prototype),o}).apply(null,arguments)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t="function"==typeof Map?new Map:void 0;return(v=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return b(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)})(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}var g=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=d(e),function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,m()?Reflect.construct(e,t||[],d(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&h(r,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var u=[i,c];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){return t.app.addScopes({useChinaRegionDataSource:n,useChinaRegionLoadData:o}),t.app.dataSourceManager.addFieldInterfaces([p]),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,c,"next",e)}function c(e){y(i,n,o,a,c,"throw",e)}a(void 0)})})()}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,t),r}(v(e.Plugin)),O=g}(),a}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@formily/core": "2.3.
|
|
12
|
-
"@formily/react": "2.3.
|
|
13
|
-
"@nocobase/client": "
|
|
14
|
-
"@formily/shared": "2.3.
|
|
15
|
-
"@nocobase/server": "
|
|
11
|
+
"@formily/core": "2.3.7",
|
|
12
|
+
"@formily/react": "2.3.7",
|
|
13
|
+
"@nocobase/client": "2.0.0-alpha.3",
|
|
14
|
+
"@formily/shared": "2.3.7",
|
|
15
|
+
"@nocobase/server": "2.0.0-alpha.3",
|
|
16
16
|
"china-division": "2.7.0",
|
|
17
|
-
"@nocobase/database": "
|
|
17
|
+
"@nocobase/database": "2.0.0-alpha.3"
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-field-china-region",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"displayName": "Collection field: administrative divisions of China",
|
|
5
5
|
"displayName.zh-CN": "数据表字段:中国行政区划",
|
|
6
6
|
"description": "Provides data and field type for administrative divisions of China.",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"cross-spawn": "^7.0.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@nocobase/client": "
|
|
21
|
-
"@nocobase/database": "
|
|
22
|
-
"@nocobase/server": "
|
|
23
|
-
"@nocobase/test": "
|
|
20
|
+
"@nocobase/client": "2.x",
|
|
21
|
+
"@nocobase/database": "2.x",
|
|
22
|
+
"@nocobase/server": "2.x",
|
|
23
|
+
"@nocobase/test": "2.x"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "8efc23aa78058d871e98a91419f3c4a61762cc15",
|
|
26
26
|
"keywords": [
|
|
27
27
|
"Collection fields"
|
|
28
28
|
]
|