@ant-design/pro-provider
Advanced tools
Comparing version 2.11.1 to 2.12.0
@@ -6,2 +6,3 @@ import type { Theme } from '@ant-design/cssinjs'; | ||
import type { ProAliasToken } from './useStyle'; | ||
import 'dayjs/locale/zh-cn'; | ||
export * from './intl'; | ||
@@ -100,3 +101,3 @@ export * from './useStyle'; | ||
valueTypeMap?: Record<string, ProRenderFieldPropsType>; | ||
token?: ProAliasToken; | ||
token: ProAliasToken; | ||
hashId?: string; | ||
@@ -103,0 +104,0 @@ hashed?: boolean; |
@@ -14,2 +14,3 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
import { findIntlKeyByAntdLocaleKey, intlMap, zhCNIntl } from "./intl"; | ||
import dayjs from 'dayjs'; | ||
import { getLayoutDesignToken } from "./typing/layoutToken"; | ||
@@ -19,2 +20,3 @@ import { proTheme } from "./useStyle"; | ||
import { merge } from "./utils/merge"; | ||
import 'dayjs/locale/zh-cn'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
@@ -179,2 +181,5 @@ import { Fragment as _Fragment } from "react/jsx-runtime"; | ||
}, [nativeHashId, proProvide.hashed, props.hashed]); | ||
useEffect(function () { | ||
dayjs.locale((locale === null || locale === void 0 ? void 0 : locale.locale) || 'zh-cn'); | ||
}, [locale === null || locale === void 0 ? void 0 : locale.locale]); | ||
var configProviderDom = useMemo(function () { | ||
@@ -181,0 +186,0 @@ var themeConfig = _objectSpread(_objectSpread({}, restConfig.theme), {}, { |
@@ -38,2 +38,3 @@ export declare type IntlType = { | ||
declare const skSKIntl: IntlType; | ||
declare const heILIntl: IntlType; | ||
declare const intlMap: { | ||
@@ -66,2 +67,3 @@ 'mn-MN': IntlType; | ||
'sk-SK': IntlType; | ||
'he-IL': IntlType; | ||
}; | ||
@@ -75,2 +77,2 @@ declare const intlMapKeys: string[]; | ||
export declare const findIntlKeyByAntdLocaleKey: <T extends string>(localeKey?: T | undefined) => T; | ||
export { mnMNIntl, arEGIntl, enUSIntl, enGBIntl, zhCNIntl, viVNIntl, itITIntl, jaJPIntl, esESIntl, caESIntl, ruRUIntl, srRSIntl, msMYIntl, zhTWIntl, frFRIntl, ptBRIntl, koKRIntl, idIDIntl, deDEIntl, faIRIntl, trTRIntl, plPLIntl, hrHRIntl, thTHIntl, csCZIntl, skSKIntl, intlMap, intlMapKeys, }; | ||
export { mnMNIntl, arEGIntl, enUSIntl, enGBIntl, zhCNIntl, viVNIntl, itITIntl, jaJPIntl, esESIntl, caESIntl, ruRUIntl, srRSIntl, msMYIntl, zhTWIntl, frFRIntl, ptBRIntl, koKRIntl, idIDIntl, deDEIntl, faIRIntl, trTRIntl, plPLIntl, hrHRIntl, thTHIntl, csCZIntl, skSKIntl, heILIntl, intlMap, intlMapKeys, }; |
@@ -28,2 +28,3 @@ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper"; | ||
import zhTW from "./locale/zh_TW"; | ||
import heIL from "./locale/he_IL"; | ||
@@ -101,2 +102,3 @@ /** | ||
var skSKIntl = createIntl('sk_SK', skSK); | ||
var heILIntl = createIntl('he_IL', heIL); | ||
var intlMap = { | ||
@@ -128,3 +130,4 @@ 'mn-MN': mnMNIntl, | ||
'cs-CZ': csCZIntl, | ||
'sk-SK': skSKIntl | ||
'sk-SK': skSKIntl, | ||
'he-IL': heILIntl | ||
}; | ||
@@ -145,2 +148,2 @@ var intlMapKeys = Object.keys(intlMap); | ||
}; | ||
export { mnMNIntl, arEGIntl, enUSIntl, enGBIntl, zhCNIntl, viVNIntl, itITIntl, jaJPIntl, esESIntl, caESIntl, ruRUIntl, srRSIntl, msMYIntl, zhTWIntl, frFRIntl, ptBRIntl, koKRIntl, idIDIntl, deDEIntl, faIRIntl, trTRIntl, plPLIntl, hrHRIntl, thTHIntl, csCZIntl, skSKIntl, intlMap, intlMapKeys }; | ||
export { mnMNIntl, arEGIntl, enUSIntl, enGBIntl, zhCNIntl, viVNIntl, itITIntl, jaJPIntl, esESIntl, caESIntl, ruRUIntl, srRSIntl, msMYIntl, zhTWIntl, frFRIntl, ptBRIntl, koKRIntl, idIDIntl, deDEIntl, faIRIntl, trTRIntl, plPLIntl, hrHRIntl, thTHIntl, csCZIntl, skSKIntl, heILIntl, intlMap, intlMapKeys }; |
@@ -6,2 +6,3 @@ import type { Theme } from '@ant-design/cssinjs'; | ||
import type { ProAliasToken } from './useStyle'; | ||
import 'dayjs/locale/zh-cn'; | ||
export * from './intl'; | ||
@@ -100,3 +101,3 @@ export * from './useStyle'; | ||
valueTypeMap?: Record<string, ProRenderFieldPropsType>; | ||
token?: ProAliasToken; | ||
token: ProAliasToken; | ||
hashId?: string; | ||
@@ -103,0 +104,0 @@ hashed?: boolean; |
@@ -39,2 +39,3 @@ "use strict"; | ||
}); | ||
var _dayjs = _interopRequireDefault(require("dayjs")); | ||
var _layoutToken = require("./typing/layoutToken"); | ||
@@ -55,2 +56,3 @@ var _useStyle = require("./useStyle"); | ||
var _merge = require("./utils/merge"); | ||
require("dayjs/locale/zh-cn"); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
@@ -213,2 +215,5 @@ var _excluded = ["locale", "getPrefixCls"], | ||
}, [nativeHashId, proProvide.hashed, props.hashed]); | ||
(0, _react.useEffect)(function () { | ||
_dayjs.default.locale((locale === null || locale === void 0 ? void 0 : locale.locale) || 'zh-cn'); | ||
}, [locale === null || locale === void 0 ? void 0 : locale.locale]); | ||
var configProviderDom = (0, _react.useMemo)(function () { | ||
@@ -215,0 +220,0 @@ var themeConfig = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, restConfig.theme), {}, { |
@@ -38,2 +38,3 @@ export declare type IntlType = { | ||
declare const skSKIntl: IntlType; | ||
declare const heILIntl: IntlType; | ||
declare const intlMap: { | ||
@@ -66,2 +67,3 @@ 'mn-MN': IntlType; | ||
'sk-SK': IntlType; | ||
'he-IL': IntlType; | ||
}; | ||
@@ -75,2 +77,2 @@ declare const intlMapKeys: string[]; | ||
export declare const findIntlKeyByAntdLocaleKey: <T extends string>(localeKey?: T | undefined) => T; | ||
export { mnMNIntl, arEGIntl, enUSIntl, enGBIntl, zhCNIntl, viVNIntl, itITIntl, jaJPIntl, esESIntl, caESIntl, ruRUIntl, srRSIntl, msMYIntl, zhTWIntl, frFRIntl, ptBRIntl, koKRIntl, idIDIntl, deDEIntl, faIRIntl, trTRIntl, plPLIntl, hrHRIntl, thTHIntl, csCZIntl, skSKIntl, intlMap, intlMapKeys, }; | ||
export { mnMNIntl, arEGIntl, enUSIntl, enGBIntl, zhCNIntl, viVNIntl, itITIntl, jaJPIntl, esESIntl, caESIntl, ruRUIntl, srRSIntl, msMYIntl, zhTWIntl, frFRIntl, ptBRIntl, koKRIntl, idIDIntl, deDEIntl, faIRIntl, trTRIntl, plPLIntl, hrHRIntl, thTHIntl, csCZIntl, skSKIntl, heILIntl, intlMap, intlMapKeys, }; |
@@ -7,3 +7,3 @@ "use strict"; | ||
}); | ||
exports.zhTWIntl = exports.zhCNIntl = exports.viVNIntl = exports.trTRIntl = exports.thTHIntl = exports.srRSIntl = exports.skSKIntl = exports.ruRUIntl = exports.ptBRIntl = exports.plPLIntl = exports.msMYIntl = exports.mnMNIntl = exports.koKRIntl = exports.jaJPIntl = exports.itITIntl = exports.intlMapKeys = exports.intlMap = exports.idIDIntl = exports.hrHRIntl = exports.frFRIntl = exports.findIntlKeyByAntdLocaleKey = exports.faIRIntl = exports.esESIntl = exports.enUSIntl = exports.enGBIntl = exports.deDEIntl = exports.csCZIntl = exports.createIntl = exports.caESIntl = exports.arEGIntl = void 0; | ||
exports.zhTWIntl = exports.zhCNIntl = exports.viVNIntl = exports.trTRIntl = exports.thTHIntl = exports.srRSIntl = exports.skSKIntl = exports.ruRUIntl = exports.ptBRIntl = exports.plPLIntl = exports.msMYIntl = exports.mnMNIntl = exports.koKRIntl = exports.jaJPIntl = exports.itITIntl = exports.intlMapKeys = exports.intlMap = exports.idIDIntl = exports.hrHRIntl = exports.heILIntl = exports.frFRIntl = exports.findIntlKeyByAntdLocaleKey = exports.faIRIntl = exports.esESIntl = exports.enUSIntl = exports.enGBIntl = exports.deDEIntl = exports.csCZIntl = exports.createIntl = exports.caESIntl = exports.arEGIntl = void 0; | ||
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper")); | ||
@@ -36,2 +36,3 @@ var _ar_EG = _interopRequireDefault(require("./locale/ar_EG")); | ||
var _zh_TW = _interopRequireDefault(require("./locale/zh_TW")); | ||
var _he_IL = _interopRequireDefault(require("./locale/he_IL")); | ||
/** | ||
@@ -135,2 +136,4 @@ * 安全的从一个对象中读取相应的值 | ||
exports.skSKIntl = skSKIntl; | ||
var heILIntl = createIntl('he_IL', _he_IL.default); | ||
exports.heILIntl = heILIntl; | ||
var intlMap = { | ||
@@ -162,3 +165,4 @@ 'mn-MN': mnMNIntl, | ||
'cs-CZ': csCZIntl, | ||
'sk-SK': skSKIntl | ||
'sk-SK': skSKIntl, | ||
'he-IL': heILIntl | ||
}; | ||
@@ -165,0 +169,0 @@ exports.intlMap = intlMap; |
{ | ||
"name": "@ant-design/pro-provider", | ||
"version": "2.11.1", | ||
"version": "2.12.0", | ||
"description": "@ant-design/pro-provider", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
283127
134
10775