Socket
Socket
Sign inDemoInstall

@semcore/utils

Package Overview
Dependencies
Maintainers
1
Versions
305
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semcore/utils - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

lib/use/useEnhancedEffect.d.ts

11

CHANGELOG.md

@@ -5,2 +5,13 @@ # Changelog

## [3.8.0] - 2020-02-12
### Added
- Добавили возможность изменить свойство `getText` для компонентов, которые обернуты в `WithI18n`
- Добавили новые функции `useEnhancedEffect, useEventCallback`, которые могут быть использованы вместо одноименных `useEffect, useLayoutEffect, useCallback`, но с небольшими модификациями для предсказуемости поведения
### Changed
- Убрали неиспользуемые цвета `violet`, `dark-violet` и добавили `keyborad-focus` в палитре цветов `sellerly`
## [3.7.0] - 2020-02-04

@@ -7,0 +18,0 @@

8

lib/enhances/WithI18n.d.ts

@@ -11,6 +11,7 @@ import React from "react";

declare const I18nProvider: React.Provider<LocaleKeys>, I18nConsumer: React.Consumer<LocaleKeys>;
declare function getText(dictionary: Dictionary, locale: LocaleKeys): (key: React.ReactText) => string;
interface IWithI18nInjectedProps {
getText: WithI18n['getText'];
}
interface IWithI18nProps {
interface IWithI18nProps extends IWithI18nInjectedProps {
locale?: LocaleKeys;

@@ -22,3 +23,6 @@ children?(props: IWithI18nInjectedProps): React.ReactNode;

static contextType: React.Context<LocaleKeys>;
getText: (dictionary: Dictionary, selfLocale: any) => (key: React.ReactText) => string;
static defaultProps: {
getText: typeof getText;
};
getText: (dictionary: Dictionary, selfLocale: any) => any;
render(): React.ReactNode;

@@ -25,0 +29,0 @@ }

@@ -47,3 +47,5 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

_this.getText = function (dictionary, selfLocale) {
var locale = _this.props.locale;
var _this$props = _this.props,
locale = _this$props.locale,
getText = _this$props.getText;
var contextLocale = _this.context;

@@ -69,2 +71,5 @@ return getText(dictionary, selfLocale || locale || contextLocale);

WithI18n.contextType = Context;
WithI18n.defaultProps = {
getText: getText
};

@@ -71,0 +76,0 @@ var useI18n = function useI18n(dictionary) {

@@ -23,3 +23,3 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

// @ts-ignore
var version = "3.7.0";
var version = "3.8.0";
sh = document.createElement('style');

@@ -26,0 +26,0 @@ sh.setAttribute('data-ui-v', version);

{
"name": "@semcore/utils",
"description": "SEMRush Utils Component",
"version": "3.7.0",
"version": "3.8.0",
"author": "Roman Lysov <r.lysov@semrush.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc