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.22 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 a=require("react"),s=require("prop-types"),u=require("./IntlService.js"),c=require("../globalization/GlobalizationContext.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,l.get?l:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=p(a),i=class i extends n.Component{getIntlService(){return new u.IntlService(this.props.locale)}render(){return n.createElement(c.GlobalizationContext.Consumer,null,t=>n.createElement(c.GlobalizationContext.Provider,{value:{...t,intl:this.getIntlService()}},this.props.children))}};i.propTypes={locale:s.string};let o=i;exports.IntlProvider=o;