You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

831 lines
26 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var ProProvider =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 3);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
module.exports = React;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.warning = warning;
exports.note = note;
exports.resetWarned = resetWarned;
exports.call = call;
exports.warningOnce = warningOnce;
exports.noteOnce = noteOnce;
exports.default = void 0;
/* eslint-disable no-console */
var warned = {};
function warning(valid, message) {
// Support uglify
if (false) {}
}
function note(valid, message) {
// Support uglify
if (false) {}
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
function warningOnce(valid, message) {
call(warning, valid, message);
}
function noteOnce(valid, message) {
call(note, valid, message);
}
var _default = warningOnce;
/* eslint-enable */
exports.default = _default;
/***/ }),
/* 2 */
/***/ (function(module, exports) {
module.exports = antd/lib/config-provider;
/***/ }),
/* 3 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, "getLang", function() { return /* binding */ getLang; });
__webpack_require__.d(__webpack_exports__, "enUSIntl", function() { return /* binding */ enUSIntl; });
__webpack_require__.d(__webpack_exports__, "zhCNIntl", function() { return /* binding */ zhCNIntl; });
__webpack_require__.d(__webpack_exports__, "viVNIntl", function() { return /* binding */ viVNIntl; });
__webpack_require__.d(__webpack_exports__, "itITIntl", function() { return /* binding */ itITIntl; });
__webpack_require__.d(__webpack_exports__, "jaJPIntl", function() { return /* binding */ jaJPIntl; });
__webpack_require__.d(__webpack_exports__, "esESIntl", function() { return /* binding */ esESIntl; });
__webpack_require__.d(__webpack_exports__, "ruRUIntl", function() { return /* binding */ ruRUIntl; });
__webpack_require__.d(__webpack_exports__, "msMYIntl", function() { return /* binding */ msMYIntl; });
__webpack_require__.d(__webpack_exports__, "zhTWIntl", function() { return /* binding */ zhTWIntl; });
__webpack_require__.d(__webpack_exports__, "frFRIntl", function() { return /* binding */ frFRIntl; });
__webpack_require__.d(__webpack_exports__, "ptBRIntl", function() { return /* binding */ ptBRIntl; });
__webpack_require__.d(__webpack_exports__, "intlMap", function() { return /* binding */ intlMap; });
__webpack_require__.d(__webpack_exports__, "intlMapKeys", function() { return /* binding */ intlMapKeys; });
__webpack_require__.d(__webpack_exports__, "ConfigConsumer", function() { return /* binding */ ConfigConsumer; });
__webpack_require__.d(__webpack_exports__, "ConfigProvider", function() { return /* binding */ ConfigProvider; });
__webpack_require__.d(__webpack_exports__, "ConfigProviderWarp", function() { return /* binding */ src_ConfigProviderWarp; });
__webpack_require__.d(__webpack_exports__, "createIntl", function() { return /* binding */ createIntl; });
__webpack_require__.d(__webpack_exports__, "useIntl", function() { return /* binding */ useIntl; });
// EXTERNAL MODULE: external "React"
var external_React_ = __webpack_require__(0);
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
// EXTERNAL MODULE: external "antd/lib/config-provider"
var config_provider_ = __webpack_require__(2);
// EXTERNAL MODULE: ./node_modules/rc-util/lib/warning.js
var warning = __webpack_require__(1);
// CONCATENATED MODULE: ./packages/provider/src/locale/zh_CN.tsx
/* harmony default export */ var zh_CN = ({
moneySymbol: '¥',
tableForm: {
search: '查询',
reset: '重置',
submit: '提交',
collapsed: '展开',
expand: '收起',
inputPlaceholder: '请输入',
selectPlaceholder: '请选择'
},
alert: {
clear: '清空',
selected: '已选择',
item: '项'
},
pagination: {
total: {
range: '第',
total: '条/总共',
item: '条'
}
},
tableToolBar: {
leftPin: '固定在列首',
rightPin: '固定在列尾',
noPin: '不固定',
leftFixedTitle: '固定在左侧',
rightFixedTitle: '固定在右侧',
noFixedTitle: '不固定',
reset: '重置',
columnDisplay: '列展示',
columnSetting: '列设置',
fullScreen: '全屏',
exitFullScreen: '退出全屏',
reload: '刷新',
density: '密度',
densityDefault: '正常',
densityLarger: '默认',
densityMiddle: '中等',
densitySmall: '紧凑'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/en_US.tsx
/* harmony default export */ var en_US = ({
moneySymbol: '$',
tableForm: {
search: 'Query',
reset: 'Reset',
submit: 'Submit',
collapsed: 'Expand',
expand: 'Collapse',
inputPlaceholder: 'Please enter',
selectPlaceholder: 'Please select'
},
alert: {
clear: 'Clear',
selected: 'Selected',
item: 'Item'
},
pagination: {
total: {
range: ' ',
total: 'of',
item: 'items'
}
},
tableToolBar: {
leftPin: 'Pin to left',
rightPin: 'Pin to right',
noPin: 'Unpinned',
leftFixedTitle: 'Fixed the left',
rightFixedTitle: 'Fixed the right',
noFixedTitle: 'Not Fixed',
reset: 'Reset',
columnDisplay: 'Column Display',
columnSetting: 'Settings',
fullScreen: 'Full Screen',
exitFullScreen: 'Exit Full Screen',
reload: 'Refresh',
density: 'Density',
densityDefault: 'Default',
densityLarger: 'Larger',
densityMiddle: 'Middle',
densitySmall: 'Compact'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/vi_VN.tsx
/* harmony default export */ var vi_VN = ({
moneySymbol: '₫',
tableForm: {
search: 'Tìm kiếm',
reset: 'Làm lại',
submit: 'Gửi đi',
collapsed: 'Mở rộng',
expand: 'Thu gọn',
inputPlaceholder: 'nhập dữ liệu',
selectPlaceholder: 'Vui lòng chọn'
},
alert: {
clear: 'Xóa',
selected: 'đã chọn',
item: 'mục'
},
pagination: {
total: {
range: ' ',
total: 'trên',
item: 'mặt hàng'
}
},
tableToolBar: {
leftPin: 'Ghim trái',
rightPin: 'Ghim phải',
noPin: 'Bỏ ghim',
leftFixedTitle: 'Cố định trái',
rightFixedTitle: 'Cố định phải',
noFixedTitle: 'Chưa cố định',
reset: 'Làm lại',
columnDisplay: 'Cột hiển thị',
columnSetting: 'Cấu hình',
fullScreen: 'Chế độ toàn màn hình',
exitFullScreen: 'Thoát chế độ toàn màn hình',
reload: 'Làm mới',
density: 'Mật độ hiển thị',
densityDefault: 'Mặc định',
densityLarger: 'Mặc định',
densityMiddle: 'Trung bình',
densitySmall: 'Chật'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/it_IT.tsx
/* harmony default export */ var it_IT = ({
moneySymbol: '€',
tableForm: {
search: 'Filtra',
reset: 'Pulisci',
submit: 'Invia',
collapsed: 'Espandi',
expand: 'Contrai',
inputPlaceholder: 'Digita',
selectPlaceholder: 'Seleziona'
},
alert: {
clear: 'Rimuovi',
selected: 'Selezionati',
item: 'elementi'
},
pagination: {
total: {
range: ' ',
total: 'di',
item: 'elementi'
}
},
tableToolBar: {
leftPin: 'Fissa a sinistra',
rightPin: 'Fissa a destra',
noPin: 'Ripristina posizione',
leftFixedTitle: 'Fissato a sinistra',
rightFixedTitle: 'Fissato a destra',
noFixedTitle: 'Non fissato',
reset: 'Ripristina',
columnDisplay: 'Disposizione colonne',
columnSetting: 'Impostazioni',
fullScreen: 'Modalità schermo intero',
exitFullScreen: 'Esci da modalità schermo intero',
reload: 'Ricarica',
density: 'Grandezza tabella',
densityLarger: 'Grande',
densityMiddle: 'Media',
densitySmall: 'Compatta'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/es_ES.tsx
/* harmony default export */ var es_ES = ({
moneySymbol: '€',
tableForm: {
search: 'Buscar',
reset: 'Limpiar',
submit: 'Submit',
collapsed: 'Expandir',
expand: 'Colapsar',
inputPlaceholder: 'Ingrese valor',
selectPlaceholder: 'Seleccione valor'
},
alert: {
clear: 'Limpiar',
selected: 'Seleccionado',
item: 'Articulo'
},
pagination: {
total: {
range: ' ',
total: 'de',
item: 'artículos'
}
},
tableToolBar: {
leftPin: 'Pin a la izquierda',
rightPin: 'Pin a la derecha',
noPin: 'Sin Pin',
leftFixedTitle: 'Fijado a la izquierda',
rightFixedTitle: 'Fijado a la derecha',
noFixedTitle: 'Sin Fijar',
reset: 'Reiniciar',
columnDisplay: 'Mostrar Columna',
columnSetting: 'Configuración',
fullScreen: 'Pantalla Completa',
exitFullScreen: 'Salir Pantalla Completa',
reload: 'Refrescar',
density: 'Densidad',
densityDefault: 'Por Defecto',
densityLarger: 'Largo',
densityMiddle: 'Medio',
densitySmall: 'Compacto'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/ja_JP.tsx
/* harmony default export */ var ja_JP = ({
moneySymbol: '¥',
tableForm: {
search: '検索',
reset: 'リセット',
submit: '提交',
collapsed: '展開',
expand: '収納',
inputPlaceholder: '入力してください',
selectPlaceholder: '選択してください'
},
alert: {
clear: 'クリア',
selected: '選択した',
item: '項目'
},
pagination: {
total: {
range: '記事',
total: '/合計',
item: ' '
}
},
tableToolBar: {
leftPin: '左に固定',
rightPin: '右に固定',
noPin: 'キャンセル',
leftFixedTitle: '左に固定された項目',
rightFixedTitle: '右に固定された項目',
noFixedTitle: '固定されてない項目',
reset: 'リセット',
columnDisplay: '表示列',
columnSetting: '列表示設定',
fullScreen: 'フルスクリーン',
exitFullScreen: '終了',
reload: '更新',
density: '行高',
densityLarger: '默认',
densityMiddle: '中',
densitySmall: '小'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/ru_RU.tsx
/* harmony default export */ var ru_RU = ({
moneySymbol: '₽',
tableForm: {
search: 'Найти',
reset: 'Сброс',
submit: 'Отправить',
collapsed: 'Развернуть',
expand: 'Свернуть',
inputPlaceholder: 'Введите значение',
selectPlaceholder: 'Выберите значение'
},
alert: {
clear: 'Очистить',
selected: 'выбранный',
item: 'предмет'
},
pagination: {
total: {
range: ' ',
total: 'из',
item: 'предметов'
}
},
tableToolBar: {
leftPin: 'Закрепить слева',
rightPin: 'Закрепить справа',
noPin: 'Открепить',
leftFixedTitle: 'Закреплено слева',
rightFixedTitle: 'Закреплено справа',
noFixedTitle: 'Не закреплено',
reset: 'Сброс',
columnDisplay: 'Отображение столбца',
columnSetting: 'Настройки',
fullScreen: 'Полный экран',
exitFullScreen: 'Выйти из полноэкранного режима',
reload: 'Обновить',
density: 'Размер',
densityDefault: 'По умолчанию',
densityLarger: 'Большой',
densityMiddle: 'Средний',
densitySmall: 'Сжатый'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/ms_MY.tsx
/* harmony default export */ var ms_MY = ({
moneySymbol: 'RM',
tableForm: {
search: 'Cari',
reset: 'Menetapkan semula',
submit: 'Hantar',
collapsed: 'Kembang',
expand: 'Kuncup',
inputPlaceholder: 'Sila masuk',
selectPlaceholder: 'Sila pilih'
},
alert: {
clear: 'Padam',
selected: 'Dipilih',
item: 'Item'
},
pagination: {
total: {
range: ' ',
total: 'daripada',
item: 'item'
}
},
tableToolBar: {
leftPin: 'Pin ke kiri',
rightPin: 'Pin ke kanan',
noPin: 'Tidak pin',
leftFixedTitle: 'Tetap ke kiri',
rightFixedTitle: 'Tetap ke kanan',
noFixedTitle: 'Tidak Tetap',
reset: 'Menetapkan semula',
columnDisplay: 'Lajur',
columnSetting: 'Settings',
fullScreen: 'Full Screen',
exitFullScreen: 'Keluar Full Screen',
reload: 'Muat Semula',
density: 'Densiti',
densityDefault: 'Biasa',
densityLarger: 'Besar',
densityMiddle: 'Tengah',
densitySmall: 'Kecil'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/zh_TW.tsx
/* harmony default export */ var zh_TW = ({
moneySymbol: '¥',
tableForm: {
search: '查詢',
reset: '重置',
submit: '提交',
collapsed: '展開',
expand: '收起',
inputPlaceholder: '請輸入',
selectPlaceholder: '請選擇'
},
alert: {
clear: '清空',
selected: '已選擇',
item: '項'
},
pagination: {
total: {
range: '第',
total: '條/總共',
item: '條'
}
},
tableToolBar: {
leftPin: '固定到左邊',
rightPin: '固定到右邊',
noPin: '不固定',
leftFixedTitle: '固定在左側',
rightFixedTitle: '固定在右側',
noFixedTitle: '不固定',
reset: '重置',
columnDisplay: '列展示',
columnSetting: '列設置',
fullScreen: '全屏',
exitFullScreen: '退出全屏',
reload: '刷新',
density: '密度',
densityDefault: '正常',
densityLarger: '默認',
densityMiddle: '中等',
densitySmall: '緊湊'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/fr_FR.tsx
/* harmony default export */ var fr_FR = ({
moneySymbol: '€',
tableForm: {
search: 'Rechercher',
reset: 'Réinitialiser',
submit: 'Envoyer',
collapsed: 'Agrandir',
expand: 'Réduire',
inputPlaceholder: 'Entrer une valeur',
selectPlaceholder: 'Sélectionner une valeur'
},
alert: {
clear: 'Réinitialiser',
selected: 'Sélectionné',
item: 'Item'
},
pagination: {
total: {
range: ' ',
total: 'sur',
item: 'éléments'
}
},
tableToolBar: {
leftPin: 'Épingler à gauche',
rightPin: 'Épingler à gauche',
noPin: 'Sans épingle',
leftFixedTitle: 'Fixer à gauche',
rightFixedTitle: 'Fixer à droite',
noFixedTitle: 'Non fixé',
reset: 'Réinitialiser',
columnDisplay: 'Affichage colonne',
columnSetting: 'Réglages',
fullScreen: 'Plein écran',
exitFullScreen: 'Quitter Plein écran',
reload: 'Rafraichir',
density: 'Densité',
densityDefault: 'Par défaut',
densityLarger: 'Larger',
densityMiddle: 'Moyenne',
densitySmall: 'Compacte'
}
});
// CONCATENATED MODULE: ./packages/provider/src/locale/pt_BR.tsx
/* harmony default export */ var pt_BR = ({
moneySymbol: 'R$',
tableForm: {
search: 'Filtrar',
reset: 'Limpar',
submit: 'Confirmar',
collapsed: 'Expandir',
expand: 'Colapsar',
inputPlaceholder: 'Por favor insira',
selectPlaceholder: 'Por favor selecione'
},
alert: {
clear: 'Limpar',
selected: 'Selecionado(s)',
item: 'Item(s)'
},
pagination: {
total: {
range: ' ',
total: 'de',
item: 'items'
}
},
tableToolBar: {
leftPin: 'Fixar à esquerda',
rightPin: 'Fixar à direita',
noPin: 'Desfixado',
leftFixedTitle: 'Fixado à esquerda',
rightFixedTitle: 'Fixado à direita',
noFixedTitle: 'Não fixado',
reset: 'Limpar',
columnDisplay: 'Mostrar Coluna',
columnSetting: 'Configurações',
fullScreen: 'Tela Cheia',
exitFullScreen: 'Sair da Tela Cheia',
reload: 'Atualizar',
density: 'Densidade',
densityDefault: 'Padrão',
densityLarger: 'Largo',
densityMiddle: 'Médio',
densitySmall: 'Compacto'
}
});
// CONCATENATED MODULE: ./packages/provider/src/index.tsx
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var getLang = function getLang() {
var isNavigatorLanguageValid = typeof navigator !== 'undefined' && typeof navigator.language === 'string';
var browserLang = isNavigatorLanguageValid ? navigator.language.split('-').join('{{BaseSeparator}}') : '';
var lang = typeof localStorage !== 'undefined' ? window.localStorage.getItem('umi_locale') : '';
return lang || browserLang || '';
};
function get(source, path, defaultValue) {
// a[3].b -> a.3.b
var paths = path.replace(/\[(\d+)\]/g, '.$1').split('.');
var result = source;
var message = defaultValue; // eslint-disable-next-line no-restricted-syntax
for (var _iterator = _createForOfIteratorHelperLoose(paths), _step; !(_step = _iterator()).done;) {
var p = _step.value;
message = Object(result)[p];
result = Object(result)[p];
if (message === undefined) {
return defaultValue;
}
}
return message;
}
/**
* 创建一个操作函数
* @param locale
* @param localeMap
*/
var createIntl = function createIntl(locale, localeMap) {
return {
getMessage: function getMessage(id, defaultMessage) {
return get(localeMap, id, defaultMessage) || defaultMessage;
},
locale: locale
};
};
var zhCNIntl = createIntl('zh_CN', zh_CN);
var enUSIntl = createIntl('en_US', en_US);
var viVNIntl = createIntl('vi_VN', vi_VN);
var itITIntl = createIntl('it_IT', it_IT);
var jaJPIntl = createIntl('ja_JP', ja_JP);
var esESIntl = createIntl('es_ES', es_ES);
var ruRUIntl = createIntl('ru_RU', ru_RU);
var msMYIntl = createIntl('ms_MY', ms_MY);
var zhTWIntl = createIntl('zh_TW', zh_TW);
var frFRIntl = createIntl('fr_FR', fr_FR);
var ptBRIntl = createIntl('pt_BR', pt_BR);
var intlMap = {
'zh-CN': zhCNIntl,
'en-US': enUSIntl,
'vi-VN': viVNIntl,
'it-IT': itITIntl,
'js-JP': jaJPIntl,
'es-ES': esESIntl,
'ru-RU': ruRUIntl,
'ms-MY': msMYIntl,
'zh-TW': zhTWIntl,
'fr-FR': frFRIntl,
'pt-BR': ptBRIntl
};
var intlMapKeys = Object.keys(intlMap);
var ConfigContext = /*#__PURE__*/external_React_default.a.createContext({
intl: _objectSpread(_objectSpread({}, zhCNIntl), {}, {
locale: 'default'
})
});
var ConfigConsumer = ConfigContext.Consumer,
ConfigProvider = ConfigContext.Provider;
/**
* 根据 antd 的 key 来找到的 locale 插件的 key
* @param localeKey
*/
var findIntlKeyByAntdLocaleKey = function findIntlKeyByAntdLocaleKey(localeKey) {
if (!localeKey) {
return 'zh-CN';
}
var localeName = localeKey.toLocaleLowerCase();
return intlMapKeys.find(function (intlKey) {
var LowerCaseKey = intlKey.toLocaleLowerCase();
return LowerCaseKey.includes(localeName);
}) || 'zh-CN';
};
/**
* 如果没有配置 locale这里组件会根据 antd 的 key 来自动选择
* @param param0
*/
var src_ConfigProviderWarp = function ConfigProviderWarp(_ref) {
var children = _ref.children;
var _useContext = Object(external_React_["useContext"])(config_provider_["ConfigContext"]),
locale = _useContext.locale;
return /*#__PURE__*/external_React_default.a.createElement(ConfigConsumer, null, function (value) {
var localeName = locale == null ? void 0 : locale.locale;
var key = findIntlKeyByAntdLocaleKey(localeName); // antd 的 key 存在的时候以 antd 的为主
var intl = localeName && value.intl.locale === 'default' ? intlMap[key] : value || intlMap[key];
return /*#__PURE__*/external_React_default.a.createElement(ConfigProvider, {
value: intl || zhCNIntl
}, children);
});
};
function useIntl() {
var context = Object(external_React_["useContext"])(ConfigContext);
Object(warning["noteOnce"])(!!context.intl, "\n\u4E3A\u4E86\u63D0\u5347\u517C\u5BB9\u6027 \n<IntlProvider value={zhCNIntl}/>\n\u9700\u8981\u4FEE\u6539\u4E3A:\n<ConfigProvider\n value={{\n intl: zhCNIntl,\n }}\n/>\n\u6211\u4EEC\u5C06\u4F1A\u5728\u4E0B\u4E2A\u7248\u672C\u4E2D\u5220\u9664\u5B83\n ");
Object(warning["noteOnce"])(!!context.intl, "\nTo improve compatibility\n <IntlProvider value={zhCNIntl}/>\nNeed to be modified to:\n <ConfigProvider\n value={{\n intl: zhCNIntl,\n }}\n />\nWe will remove it in the next version\n ");
if (!context.intl) {
return context || zhCNIntl;
}
return context.intl || zhCNIntl;
}
/* harmony default export */ var src = __webpack_exports__["default"] = (ConfigContext);
/***/ })
/******/ ])["default"];