@para-ui/core 2.2.64 → 2.2.66
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/ComboSelect/index.js +1 -1
- package/ComboSelect/interface.d.ts +2 -0
- package/DynamicMultiBox/index.js +1 -1
- package/Form/index.js +1 -1
- package/FormItem/index.js +1 -1
- package/GlobalContext/index.js +1 -16
- package/GlobalContext/intl.d.ts +4 -3
- package/ParauiProvider/index.js +1 -1
- package/README.md +10 -0
- package/cdn/ComboSelect/index.js +1 -1
- package/cdn/DynamicMultiBox/index.js +1 -1
- package/cdn/Form/index.js +1 -1
- package/cdn/FormItem/index.js +1 -1
- package/cdn/GlobalContext/index.js +1 -1
- package/cdn/ParauiProvider/index.js +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
package/GlobalContext/index.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
!function(e,
|
|
2
|
-
/*
|
|
3
|
-
object-assign
|
|
4
|
-
(c) Sindre Sorhus
|
|
5
|
-
@license MIT
|
|
6
|
-
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,c,u=o(e),f=1;f<arguments.length;f++){for(var l in a=Object(arguments[f]))n.call(a,l)&&(u[l]=a[l]);if(r){c=r(a);for(var p=0;p<c.length;p++)t.call(a,c[p])&&(u[c[p]]=a[c[p]])}}return u}},5251:function(e,r,n){
|
|
8
|
-
/** @license React v17.0.2
|
|
9
|
-
* react-jsx-runtime.production.min.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
n(7418);var t=n(8156),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function f(e,r,n){var t,i={},f=null,l=null;for(t in void 0!==n&&(f=""+n),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(l=r.ref),r)c.call(r,t)&&!u.hasOwnProperty(t)&&(i[t]=r[t]);if(e&&e.defaultProps)for(t in r=e.defaultProps)void 0===i[t]&&(i[t]=r[t]);return{$$typeof:o,type:e,key:f,ref:l,props:i,_owner:a.current}}r.jsx=f},5893:function(e,r,n){e.exports=n(5251)},7332:function(e,r,n){n.d(r,{e:function(){return a}});var t=n(5893),o=n(8156),i=n.n(o),a=function(e){var r,n,o,a,c=e.ops,u=e.i18nData,f=e.lang,l=e.params,p=e.defI18nData;if("string"==typeof c)a=c;else if("object"==typeof c){if("string"!=typeof c.id)return'i18n intl object "id" is missing';a=c.id}return void 0!==a&&void 0===(o=null===(r=u[f])||void 0===r?void 0:r[a])&&p&&(o=null===(n=p[f])||void 0===n?void 0:n[a]),"string"!=typeof o?"{".concat(a,"}"):function(e,r){if(!r)return e;var n=!1,o=(e=e.replace(/\"/g,'\\"')).replace(/\{(.*?)\}/gi,(function(e,t){return"object"==typeof r[t]&&(n=!0),'",vars.'.concat(t,',"')}));return n?new Function("vars",'return ["'.concat(o,'"];'))(r).map((function(e){return(0,t.jsx)(i().Fragment,{children:e},Math.random())})):new Function("vars",'return ["'.concat(o,"\"].join('');"))(r)}(o,l)}},4779:function(e,r,n){n.d(r,{Z:function(){return t}});var t={zh:{cancel:"取消",ok:"确定"},en:{cancel:"Cancel",ok:"Ok"}}},8543:function(e){e.exports=r},8156:function(r){r.exports=e}},t={};function o(e){var r=t[e];if(void 0!==r)return r.exports;var i=t[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var n in r)o.o(r,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.r(i),o.d(i,{changeConfirmLocale:function(){return f},default:function(){return s},getConfirmLocale:function(){return l}});var e=o(8156),r=o.n(e),n=o(7332),t=o(8543),a=o(4779),c=function(){return c=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},c.apply(this,arguments)},u=c({},a.Z.zh),f=function(e){var r=e.Confirm;u=r?c(c({},u),r):c({},a.Z.zh)},l=function(){return u},p=r().createContext({language:(0,t.GetLanguage)(),intlFormat:function(e,r){return function(e,o){var i=(0,t.GetLanguage)();return(0,n.e)({ops:e,i18nData:{},lang:i,params:o,defI18nData:r})}},componentsProps:{}}),s=p}(),i}()}));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("@paraview/lib")):"function"==typeof define&&define.amd?define(["react","@paraview/lib"],n):"object"==typeof exports?exports.ParaUI=n(require("react"),require("@paraview/lib")):e.ParaUI=n(e.react,e["@paraview/lib"])}(self,(function(e,n){return function(){"use strict";var r={7332:function(e,n,r){r.d(n,{ex:function(){return o}});var t=function(e,n){if(!n)return e;e=e.replace(/\"/g,'\\"');var r=/({[^{}]+})/g;return e.split(r).map((function(e){if(e.match(r)){var t=e.replace(/({|})/g,"");return function(e,n,r){for(var t=e,o=0,i=n.replace(/\[(\d+)\]/g,".$1").split(".");o<i.length;o++){var a=i[o];if(void 0===(t=Object(t)[a]))return r}return t}(n,t)||t}return e}))},o=function(e){var n,r,o,i,a=e.ops,u=e.i18nData,c=e.lang,f=e.params,p=e.defI18nData;if("string"==typeof a)i=a;else if("object"==typeof a){if("string"!=typeof a.id)return'i18n intl object "id" is missing';i=a.id}return void 0!==i&&void 0===(o=null===(n=u[c])||void 0===n?void 0:n[i])&&p&&(o=null===(r=p[c])||void 0===r?void 0:r[i]),"string"!=typeof o?"{".concat(i,"}"):t(o,f)}},4779:function(e,n,r){r.d(n,{Z:function(){return t}});var t={zh:{cancel:"取消",ok:"确定"},en:{cancel:"Cancel",ok:"Ok"}}},8543:function(e){e.exports=n},8156:function(n){n.exports=e}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,{a:n}),n},o.d=function(e,n){for(var r in n)o.o(n,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.r(i),o.d(i,{changeConfirmLocale:function(){return f},default:function(){return d},getConfirmLocale:function(){return p}});var e=o(8156),n=o.n(e),r=o(7332),t=o(8543),a=o(4779),u=function(){return u=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},u.apply(this,arguments)},c=u({},a.Z.zh),f=function(e){var n=e.Confirm;c=n?u(u({},c),n):u({},a.Z.zh)},p=function(){return c},l=n().createContext({language:(0,t.GetLanguage)(),intlFormat:function(e,n){return function(e,o){var i=(0,t.GetLanguage)();return(0,r.ex)({ops:e,i18nData:{},lang:i,params:o,defI18nData:n})}},componentsProps:{}}),d=l}(),i}()}));
|
package/GlobalContext/intl.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
export declare const get: (obj: any, path: string, defaultValue?: any) => any;
|
|
1
2
|
/**
|
|
2
3
|
* 替换字符串模版变量
|
|
3
4
|
* @param str
|
|
4
|
-
* @param
|
|
5
|
+
* @param vars
|
|
5
6
|
*/
|
|
6
|
-
export declare const replaceStrTemplateVars: (str: string, vars?: any) => any;
|
|
7
|
+
export declare const replaceStrTemplateVars: (str: string, vars?: any) => string | any[];
|
|
7
8
|
export interface I18nData {
|
|
8
9
|
/**
|
|
9
10
|
* 语言
|
|
@@ -31,4 +32,4 @@ export declare const i18nIntl: (props: {
|
|
|
31
32
|
lang: string;
|
|
32
33
|
params?: object | undefined;
|
|
33
34
|
defI18nData?: I18nData | undefined;
|
|
34
|
-
}) => any;
|
|
35
|
+
}) => string | any[];
|
package/ParauiProvider/index.js
CHANGED
|
@@ -12,4 +12,4 @@ object-assign
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
a(7418);var t=a(8156),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(r,e,a){var t,i={},u=null,s=null;for(t in void 0!==a&&(u=""+a),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(s=e.ref),e)l.call(e,t)&&!c.hasOwnProperty(t)&&(i[t]=e[t]);if(r&&r.defaultProps)for(t in e=r.defaultProps)void 0===i[t]&&(i[t]=e[t]);return{$$typeof:o,type:r,key:u,ref:s,props:i,_owner:n.current}}e.jsx=u},5893:function(r,e,a){"use strict";r.exports=a(5251)},2216:function(r,e,a){var t=a(3379),o=a(5223);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[r.id,o,""]]);var i={insert:("body","body"),singleton:!1};t(o,i);r.exports=o.locals||{}},3379:function(r,e,a){"use strict";var t,o=function(){return void 0===t&&(t=Boolean(window&&document&&document.all&&!window.atob)),t},i=function(){var r={};return function(e){if(void 0===r[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(r){a=null}r[e]=a}return r[e]}}(),n=[];function l(r){for(var e=-1,a=0;a<n.length;a++)if(n[a].identifier===r){e=a;break}return e}function c(r,e){for(var a={},t=[],o=0;o<r.length;o++){var i=r[o],c=e.base?i[0]+e.base:i[0],u=a[c]||0,s="".concat(c," ").concat(u);a[c]=u+1;var b=l(s),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==b?(n[b].references++,n[b].updater(p)):n.push({identifier:s,updater:g(p,e),references:1}),t.push(s)}return t}function u(r){var e=document.createElement("style"),t=r.attributes||{};if(void 0===t.nonce){var o=a.nc;o&&(t.nonce=o)}if(Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])})),"function"==typeof r.insert)r.insert(e);else{var n=i(r.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var s,b=(s=[],function(r,e){return s[r]=e,s.filter(Boolean).join("\n")});function p(r,e,a,t){var o=a?"":t.media?"@media ".concat(t.media," {").concat(t.css,"}"):t.css;if(r.styleSheet)r.styleSheet.cssText=b(e,o);else{var i=document.createTextNode(o),n=r.childNodes;n[e]&&r.removeChild(n[e]),n.length?r.insertBefore(i,n[e]):r.appendChild(i)}}function d(r,e,a){var t=a.css,o=a.media,i=a.sourceMap;if(o?r.setAttribute("media",o):r.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(t+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),r.styleSheet)r.styleSheet.cssText=t;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(t))}}var
|
|
15
|
+
a(7418);var t=a(8156),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(r,e,a){var t,i={},u=null,s=null;for(t in void 0!==a&&(u=""+a),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(s=e.ref),e)l.call(e,t)&&!c.hasOwnProperty(t)&&(i[t]=e[t]);if(r&&r.defaultProps)for(t in e=r.defaultProps)void 0===i[t]&&(i[t]=e[t]);return{$$typeof:o,type:r,key:u,ref:s,props:i,_owner:n.current}}e.jsx=u},5893:function(r,e,a){"use strict";r.exports=a(5251)},2216:function(r,e,a){var t=a(3379),o=a(5223);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[r.id,o,""]]);var i={insert:("body","body"),singleton:!1};t(o,i);r.exports=o.locals||{}},3379:function(r,e,a){"use strict";var t,o=function(){return void 0===t&&(t=Boolean(window&&document&&document.all&&!window.atob)),t},i=function(){var r={};return function(e){if(void 0===r[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(r){a=null}r[e]=a}return r[e]}}(),n=[];function l(r){for(var e=-1,a=0;a<n.length;a++)if(n[a].identifier===r){e=a;break}return e}function c(r,e){for(var a={},t=[],o=0;o<r.length;o++){var i=r[o],c=e.base?i[0]+e.base:i[0],u=a[c]||0,s="".concat(c," ").concat(u);a[c]=u+1;var b=l(s),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==b?(n[b].references++,n[b].updater(p)):n.push({identifier:s,updater:g(p,e),references:1}),t.push(s)}return t}function u(r){var e=document.createElement("style"),t=r.attributes||{};if(void 0===t.nonce){var o=a.nc;o&&(t.nonce=o)}if(Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])})),"function"==typeof r.insert)r.insert(e);else{var n=i(r.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var s,b=(s=[],function(r,e){return s[r]=e,s.filter(Boolean).join("\n")});function p(r,e,a,t){var o=a?"":t.media?"@media ".concat(t.media," {").concat(t.css,"}"):t.css;if(r.styleSheet)r.styleSheet.cssText=b(e,o);else{var i=document.createTextNode(o),n=r.childNodes;n[e]&&r.removeChild(n[e]),n.length?r.insertBefore(i,n[e]):r.appendChild(i)}}function d(r,e,a){var t=a.css,o=a.media,i=a.sourceMap;if(o?r.setAttribute("media",o):r.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(t+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),r.styleSheet)r.styleSheet.cssText=t;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(t))}}var f=null,m=0;function g(r,e){var a,t,o;if(e.singleton){var i=m++;a=f||(f=u(e)),t=p.bind(null,a,i,!1),o=p.bind(null,a,i,!0)}else a=u(e),t=d.bind(null,a,e),o=function(){!function(r){if(null===r.parentNode)return!1;r.parentNode.removeChild(r)}(a)};return t(r),function(e){if(e){if(e.css===r.css&&e.media===r.media&&e.sourceMap===r.sourceMap)return;t(r=e)}else o()}}r.exports=function(r,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var a=c(r=r||[],e);return function(r){if(r=r||[],"[object Array]"===Object.prototype.toString.call(r)){for(var t=0;t<a.length;t++){var o=l(a[t]);n[o].references--}for(var i=c(r,e),u=0;u<a.length;u++){var s=l(a[u]);0===n[s].references&&(n[s].updater(),n.splice(s,1))}a=i}}}},7332:function(r,e,a){"use strict";a.d(e,{ex:function(){return o}});var t=function(r,e){if(!e)return r;r=r.replace(/\"/g,'\\"');var a=/({[^{}]+})/g;return r.split(a).map((function(r){if(r.match(a)){var t=r.replace(/({|})/g,"");return function(r,e,a){for(var t=r,o=0,i=e.replace(/\[(\d+)\]/g,".$1").split(".");o<i.length;o++){var n=i[o];if(void 0===(t=Object(t)[n]))return a}return t}(e,t)||t}return r}))},o=function(r){var e,a,o,i,n=r.ops,l=r.i18nData,c=r.lang,u=r.params,s=r.defI18nData;if("string"==typeof n)i=n;else if("object"==typeof n){if("string"!=typeof n.id)return'i18n intl object "id" is missing';i=n.id}return void 0!==i&&void 0===(o=null===(e=l[c])||void 0===e?void 0:e[i])&&s&&(o=null===(a=s[c])||void 0===a?void 0:a[i]),"string"!=typeof o?"{".concat(i,"}"):t(o,u)}},8793:function(r){"use strict";r.exports=e},5395:function(r){"use strict";r.exports=a},8543:function(r){"use strict";r.exports=t},8156:function(e){"use strict";e.exports=r}},i={};function n(r){var e=i[r];if(void 0!==e)return e.exports;var a=i[r]={id:r,exports:{}};return o[r](a,a.exports,n),a.exports}n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,{a:e}),e},n.d=function(r,e){for(var a in e)n.o(e,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:e[a]})},n.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.nc=void 0;var l={};return function(){"use strict";n.r(l),n.d(l,{ParauiProvider:function(){return b}});var r=n(5893),e=n(8156),a=n.n(e),t=n(8793),o=n(5395),i=n.n(o),c=n(8543),u=n(7332),s=(n(2216),function(){return s=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},s.apply(this,arguments)}),b=function(e){var n,l=(0,t.createGenerateClassName)({seed:e.seed||"",productionPrefix:e.productionPrefix||"paraui"});n=e.theme?(0,t.createMuiTheme)(s({},e.theme)):(0,t.createMuiTheme)({});return a().useEffect((function(){var r=e.language||(0,c.GetLanguage)(),a=(e.locale||{})[r]||{};null===o.changeConfirmLocale||void 0===o.changeConfirmLocale||(0,o.changeConfirmLocale)(a)}),[e.language,e.locale]),(0,r.jsx)(t.StylesProvider,s({generateClassName:l,injectFirst:!0},{children:(0,r.jsx)(t.ThemeProvider,s({theme:n},{children:(0,r.jsx)(i().Provider,s({value:s(s({},e),{language:e.language||(0,c.GetLanguage)(),intlFormat:function(r,a){return function(t,o){var i,n=e.language||(0,c.GetLanguage)(),l=(e.locale||{})[n]||{};return(i={})[n]=l[r]||{},l=i,(0,u.ex)({ops:t,i18nData:l,lang:n,params:o,defI18nData:a})}}})},{children:e.children}))}))}))};l.default=b}(),l}()}));
|