UNPKG

@progress/kendo-react-intl

Version:

React Internationalization package provides services for parsing and formatting of dates and numbers. KendoReact Internationalization package

10 lines (9 loc) 1.27 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use client"; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),s=require("prop-types"),u=require("./LocalizationService.js"),c=require("../globalization/GlobalizationContext.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=p(l),i=class i extends r.Component{getLocalizationService(){return new u.LocalizationService(this.props.language)}render(){return r.createElement(c.GlobalizationContext.Consumer,null,t=>r.createElement(c.GlobalizationContext.Provider,{value:{...t,localization:this.getLocalizationService()}},this.props.children))}};i.propTypes={language:s.string};let o=i;exports.LocalizationProvider=o;