@synerise/ds-utils 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +203 -856
- package/README.md +1 -0
- package/dist/doubleClickListener/doubleClickListener.d.ts +2 -2
- package/dist/doubleClickListener/doubleClickListener.js +0 -2
- package/dist/focusWithArrowKeys/focusWithArrowKeys.d.ts +1 -1
- package/dist/getPopupContainer/getPopupContainer.js +3 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +2 -2
- package/dist/regex/regex.js +1 -2
- package/dist/renderWithHighlight/renderWithHighlight.d.ts +1 -1
- package/dist/selectColorByLetter/selectColorByLetter.js +4 -2
- package/dist/testing/index.js +0 -1
- package/dist/testing/renderWithProvider/renderWithProvider.d.ts +6 -5
- package/dist/testing/renderWithProvider/renderWithProvider.js +9 -6
- package/dist/types/types.d.ts +7 -1
- package/dist/useBreakpoint/useBreakpoint.d.ts +3 -2
- package/dist/useBreakpoint/useBreakpoint.js +1 -1
- package/dist/useCombinedRefs/useCombinedRefs.d.ts +1 -1
- package/dist/useCombinedRefs/useCombinedRefs.js +0 -1
- package/dist/useElementInView/useElementInView.d.ts +1 -1
- package/dist/useIsMounted/useIsMounted.d.ts +0 -1
- package/dist/useLatestRef/useLatestRef.d.ts +0 -1
- package/dist/useOnClickOutside/useOnClickOutside.d.ts +9 -4
- package/dist/useOnClickOutside/useOnClickOutside.js +2 -2
- package/dist/useOverscrollBlock/useOverscrollBlock.d.ts +0 -1
- package/dist/useResize/useResize.js +3 -3
- package/dist/useResizeObserver/useResizeObserver.d.ts +2 -2
- package/dist/useResizeObserver/useResizeObserver.js +1 -1
- package/dist/useResizeToFit/useResizeToFit.d.ts +1 -2
- package/dist/useResizeToFit/useResizeToFit.js +1 -1
- package/dist/useScrollContain/useScrollContain.d.ts +0 -1
- package/dist/useSearchResults/search.utils.d.ts +5 -5
- package/dist/useSearchResults/search.utils.js +5 -3
- package/dist/useSearchResults/useSearchResults.d.ts +4 -4
- package/dist/useSearchResults/useSearchResults.js +3 -1
- package/dist/useTraceUpdate/index.js +0 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare function doubleClickListener<T
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
declare function doubleClickListener<T>(onClick: (e: React.SyntheticEvent<T>) => void, onDblClick: (e: React.SyntheticEvent<T>) => void, delay?: number): React.ReactEventHandler<T>;
|
|
3
3
|
export default doubleClickListener;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as hexToRgba } from './hexToRgba/hexToRgba';
|
|
2
2
|
export { default as toCamelCase } from './toCamelCase/toCamelCase';
|
|
3
|
-
export { useOnClickOutside } from './useOnClickOutside/useOnClickOutside';
|
|
3
|
+
export { useOnClickOutside, type HandledEventsType, } from './useOnClickOutside/useOnClickOutside';
|
|
4
4
|
export { renderWithHighlight } from './renderWithHighlight/renderWithHighlight';
|
|
5
5
|
export { default as selectColorByLetter } from './selectColorByLetter/selectColorByLetter';
|
|
6
6
|
export { default as focusWithArrowKeys } from './focusWithArrowKeys/focusWithArrowKeys';
|
|
@@ -8,7 +8,7 @@ export { default as escapeRegEx } from './regex/regex';
|
|
|
8
8
|
export { default as doubleClickListener } from './doubleClickListener/doubleClickListener';
|
|
9
9
|
export { default as useResize } from './useResize/useResize';
|
|
10
10
|
export { default as useResizeObserver } from './useResizeObserver/useResizeObserver';
|
|
11
|
-
export
|
|
11
|
+
export * from './useBreakpoint/useBreakpoint';
|
|
12
12
|
export { default as useCombinedRefs } from './useCombinedRefs/useCombinedRefs';
|
|
13
13
|
export { default as usePrevious } from './usePrevious/usePrevious';
|
|
14
14
|
export { useIsMounted } from './useIsMounted/useIsMounted';
|
|
@@ -24,5 +24,4 @@ export * from './useTraceUpdate';
|
|
|
24
24
|
export * from './getPopupContainer';
|
|
25
25
|
export * from './useLatestRef';
|
|
26
26
|
export declare const NOOP: () => void;
|
|
27
|
-
export type {
|
|
28
|
-
export type { DataAttributes, ExactlyOne, LiteralStringUnion, WithHTMLAttributes, DeepPartial, RequiredProps, } from './types/types';
|
|
27
|
+
export type { DataAttributes, ExactlyOne, LiteralStringUnion, WithHTMLAttributes, DeepPartial, RequiredProps, ObjectStringKeys, } from './types/types';
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { default as escapeRegEx } from './regex/regex';
|
|
|
8
8
|
export { default as doubleClickListener } from './doubleClickListener/doubleClickListener';
|
|
9
9
|
export { default as useResize } from './useResize/useResize';
|
|
10
10
|
export { default as useResizeObserver } from './useResizeObserver/useResizeObserver';
|
|
11
|
-
export
|
|
11
|
+
export * from './useBreakpoint/useBreakpoint';
|
|
12
12
|
export { default as useCombinedRefs } from './useCombinedRefs/useCombinedRefs';
|
|
13
13
|
export { default as usePrevious } from './usePrevious/usePrevious';
|
|
14
14
|
export { useIsMounted } from './useIsMounted/useIsMounted';
|
|
@@ -23,4 +23,4 @@ export * from './omitKeys/omitKeys';
|
|
|
23
23
|
export * from './useTraceUpdate';
|
|
24
24
|
export * from './getPopupContainer';
|
|
25
25
|
export * from './useLatestRef';
|
|
26
|
-
export var NOOP = function NOOP() {};
|
|
26
|
+
export var NOOP = function NOOP() {};
|
package/dist/regex/regex.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
export declare const renderWithHighlight: (name: string, highlight?: string, className?: string, testId?: string) => ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { theme } from '@synerise/ds-core';
|
|
2
1
|
import latinize from 'latinize';
|
|
2
|
+
import { theme } from '@synerise/ds-core';
|
|
3
3
|
export var palette = ['blue', 'cyan', 'fern', 'green', 'orange', 'yellow', 'red', 'mars', 'pink', 'violet', 'purple'];
|
|
4
4
|
function getColorByLetter() {
|
|
5
5
|
var colors = {};
|
|
@@ -10,7 +10,9 @@ function getColorByLetter() {
|
|
|
10
10
|
}
|
|
11
11
|
export var colorByLetter = getColorByLetter();
|
|
12
12
|
export function getColor(colorString, forAvatar) {
|
|
13
|
-
if (!forAvatar)
|
|
13
|
+
if (!forAvatar) {
|
|
14
|
+
return theme.palette[colorString];
|
|
15
|
+
}
|
|
14
16
|
return {
|
|
15
17
|
color: colorString.split('-')[0],
|
|
16
18
|
hue: colorString.split('-')[1]
|
package/dist/testing/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type DSProviderProps } from '@synerise/ds-core';
|
|
3
|
+
import { type DataFormatNotationType } from '@synerise/ds-data-format';
|
|
4
|
+
import { type RenderOptions, type RenderResult } from '@testing-library/react';
|
|
5
5
|
type Options = Omit<RenderOptions, 'queries'>;
|
|
6
|
-
declare const renderWithProvider: (node: ReactNode, options?: Options, props?: Partial<Omit<DSProviderProps,
|
|
6
|
+
declare const renderWithProvider: (node: ReactNode, options?: Options, props?: Partial<Omit<DSProviderProps, "onErrorIntl" | "dataFormatConfig">> & {
|
|
7
7
|
notation?: DataFormatNotationType;
|
|
8
|
+
applyTimeZoneOffset?: boolean;
|
|
8
9
|
}) => RenderResult;
|
|
9
10
|
export default renderWithProvider;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
var _excluded = ["notation"];
|
|
1
|
+
var _excluded = ["notation", "applyTimeZoneOffset"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { render } from '@testing-library/react';
|
|
6
5
|
import { DSProvider } from '@synerise/ds-core';
|
|
7
6
|
import { getDataFormatConfigFromNotation } from '@synerise/ds-data-format';
|
|
7
|
+
import { render } from '@testing-library/react';
|
|
8
8
|
import { NOOP } from '../../index';
|
|
9
9
|
var _renderWithProvider = function renderWithProvider(node, options, props) {
|
|
10
10
|
var _ref = props || {},
|
|
11
11
|
notation = _ref.notation,
|
|
12
|
+
applyTimeZoneOffset = _ref.applyTimeZoneOffset,
|
|
12
13
|
providerProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
|
+
var dataFormatConfigProps = applyTimeZoneOffset !== undefined || notation ? _extends({}, notation ? getDataFormatConfigFromNotation(notation) : {}, {
|
|
15
|
+
applyTimeZoneOffset: applyTimeZoneOffset
|
|
16
|
+
}) : {};
|
|
13
17
|
var rendered = render(/*#__PURE__*/React.createElement(DSProvider, _extends({
|
|
14
|
-
onErrorIntl: NOOP
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} : {}, providerProps), node), options);
|
|
18
|
+
onErrorIntl: NOOP,
|
|
19
|
+
dataFormatConfig: dataFormatConfigProps
|
|
20
|
+
}, providerProps), node), options);
|
|
18
21
|
return _extends({}, rendered, {
|
|
19
22
|
rerender: function rerender(ui, opt) {
|
|
20
23
|
return _renderWithProvider(ui, _extends({
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Allows creating a literal string union type with auto-completion in IDEs
|
|
4
4
|
*/
|
|
@@ -20,3 +20,9 @@ export type DeepPartial<T> = T extends object ? {
|
|
|
20
20
|
* Makes selected props of the base type required
|
|
21
21
|
*/
|
|
22
22
|
export type RequiredProps<BaseType, PropName extends keyof BaseType> = Required<Pick<BaseType, PropName>> & Omit<BaseType, PropName>;
|
|
23
|
+
/**
|
|
24
|
+
* Literal string union of keys from object
|
|
25
|
+
*/
|
|
26
|
+
export type ObjectStringKeys<T> = {
|
|
27
|
+
[K in keyof T]: T[K] extends string ? K : never;
|
|
28
|
+
}[keyof T];
|
|
@@ -2,15 +2,16 @@ export type Dimensions = {
|
|
|
2
2
|
width: number;
|
|
3
3
|
height: number;
|
|
4
4
|
};
|
|
5
|
+
export type BreakpointKey = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
5
6
|
export type Breakpoint = {
|
|
6
7
|
min: number;
|
|
7
8
|
max: number;
|
|
8
9
|
columns: number;
|
|
9
|
-
name:
|
|
10
|
+
name: BreakpointKey;
|
|
10
11
|
};
|
|
11
12
|
export type DimensionsWithBreakpoint = {
|
|
12
13
|
dimensions: Dimensions;
|
|
13
14
|
breakpoint?: Breakpoint;
|
|
14
15
|
};
|
|
15
|
-
declare const useBreakpoint: () => DimensionsWithBreakpoint;
|
|
16
|
+
export declare const useBreakpoint: () => DimensionsWithBreakpoint;
|
|
16
17
|
export default useBreakpoint;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const useCombinedRefs: <T
|
|
2
|
+
declare const useCombinedRefs: <T>(...refs: React.Ref<T | null>[]) => React.MutableRefObject<T | null>;
|
|
3
3
|
export default useCombinedRefs;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
2
|
declare const MOUSEDOWN = "mousedown";
|
|
3
3
|
declare const TOUCHSTART = "touchstart";
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
type HandledEvents = [
|
|
4
|
+
declare const _CLICK = "click";
|
|
5
|
+
declare const _CONTEXTMENU = "contextmenu";
|
|
6
|
+
type HandledEvents = [
|
|
7
|
+
typeof MOUSEDOWN,
|
|
8
|
+
typeof TOUCHSTART,
|
|
9
|
+
typeof _CLICK,
|
|
10
|
+
typeof _CONTEXTMENU
|
|
11
|
+
];
|
|
7
12
|
export type HandledEventsType = HandledEvents[number];
|
|
8
13
|
type PossibleEvent = {
|
|
9
14
|
[Type in HandledEventsType]: HTMLElementEventMap[Type];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
2
|
var MOUSEDOWN = 'mousedown';
|
|
3
3
|
var TOUCHSTART = 'touchstart';
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var _CLICK = 'click';
|
|
5
|
+
var _CONTEXTMENU = 'contextmenu';
|
|
6
6
|
var defaultEvents = [MOUSEDOWN, TOUCHSTART];
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
2
|
var useResize = function useResize(componentRef, visible) {
|
|
4
3
|
if (visible === void 0) {
|
|
5
4
|
visible = true;
|
|
@@ -12,9 +11,10 @@ var useResize = function useResize(componentRef, visible) {
|
|
|
12
11
|
setDimensions = _React$useState[1];
|
|
13
12
|
React.useEffect(function () {
|
|
14
13
|
var getDimensions = function getDimensions() {
|
|
14
|
+
var _componentRef$current, _componentRef$current2;
|
|
15
15
|
return {
|
|
16
|
-
width: (componentRef == null ? void 0 :
|
|
17
|
-
height: (componentRef == null ? void 0 :
|
|
16
|
+
width: (componentRef == null || (_componentRef$current = componentRef.current) == null ? void 0 : _componentRef$current.offsetWidth) || 0,
|
|
17
|
+
height: (componentRef == null || (_componentRef$current2 = componentRef.current) == null ? void 0 : _componentRef$current2.offsetHeight) || 0
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
var handleResize = function handleResize() {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
declare const useResizeObserver: (elementRef: RefObject<HTMLElement | undefined>, resizeHandler?: (
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
declare const useResizeObserver: (elementRef: RefObject<HTMLElement | undefined>, resizeHandler?: (dimensions: DOMRect) => void) => DOMRect;
|
|
3
3
|
export default useResizeObserver;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
var useResizeObserver = function useResizeObserver(elementRef, resizeHandler) {
|
|
3
3
|
var _useState = useState(new DOMRect()),
|
|
4
4
|
dimensions = _useState[0],
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type useResizeToFitProps = {
|
|
3
2
|
onResize: (width: number) => void;
|
|
4
3
|
autoObserve?: boolean;
|
|
5
4
|
};
|
|
6
|
-
declare const useResizeToFit: <T extends HTMLElement = HTMLDivElement>({ onResize, autoObserve }: useResizeToFitProps) => {
|
|
5
|
+
declare const useResizeToFit: <T extends HTMLElement = HTMLDivElement>({ onResize, autoObserve, }: useResizeToFitProps) => {
|
|
7
6
|
elementRef: import("react").RefObject<T>;
|
|
8
7
|
disconnect: () => void;
|
|
9
8
|
observe: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactText } from 'react';
|
|
2
|
-
import { BaseGroupType } from './useSearchResults';
|
|
3
|
-
export declare const isItemInGroup: <GroupType extends BaseGroupType<GroupType>>(groupId?: ReactText, currentGroup?: GroupType
|
|
4
|
-
export declare const getActiveTabGroup: <GroupType extends BaseGroupType<GroupType>>(tabIndex: number, groups?: GroupType[]
|
|
5
|
-
export declare const getGroupName: <GroupType extends BaseGroupType<GroupType>>(groupId: ReactText, groups: BaseGroupType<GroupType>[]) => string | undefined;
|
|
1
|
+
import { type ReactText } from 'react';
|
|
2
|
+
import { type BaseGroupType } from './useSearchResults';
|
|
3
|
+
export declare const isItemInGroup: <GroupType extends BaseGroupType<GroupType>>(groupId?: ReactText, currentGroup?: GroupType) => boolean;
|
|
4
|
+
export declare const getActiveTabGroup: <GroupType extends BaseGroupType<GroupType>>(tabIndex: number, groups?: GroupType[]) => GroupType | undefined;
|
|
5
|
+
export declare const getGroupName: <GroupType extends BaseGroupType<GroupType>>(groupId: ReactText | undefined, groups: BaseGroupType<GroupType>[]) => string | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export var isItemInGroup = function isItemInGroup(groupId, currentGroup) {
|
|
2
|
-
if (!currentGroup || !groupId)
|
|
2
|
+
if (!currentGroup || !groupId) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
3
5
|
return currentGroup.subGroups ? (currentGroup == null ? void 0 : currentGroup.subGroups.findIndex(function (group) {
|
|
4
6
|
return group.id === groupId;
|
|
5
7
|
})) > -1 : groupId === currentGroup.id;
|
|
@@ -9,9 +11,9 @@ export var getActiveTabGroup = function getActiveTabGroup(tabIndex, groups) {
|
|
|
9
11
|
};
|
|
10
12
|
export var getGroupName = function getGroupName(groupId, groups) {
|
|
11
13
|
var _groups$flatMap$find;
|
|
12
|
-
return (_groups$flatMap$find = groups.flatMap(function (group) {
|
|
14
|
+
return groupId ? (_groups$flatMap$find = groups.flatMap(function (group) {
|
|
13
15
|
return group.subGroups ? group.subGroups : group;
|
|
14
16
|
}).find(function (group) {
|
|
15
17
|
return group.id === groupId;
|
|
16
|
-
})) == null ? void 0 : _groups$flatMap$find.name;
|
|
18
|
+
})) == null ? void 0 : _groups$flatMap$find.name : undefined;
|
|
17
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactText } from 'react';
|
|
1
|
+
import { type ReactText } from 'react';
|
|
2
2
|
export type BaseItemType = {
|
|
3
3
|
id: ReactText | null;
|
|
4
4
|
groupId?: ReactText;
|
|
@@ -10,8 +10,8 @@ export type BaseGroupType<SubGroupType> = {
|
|
|
10
10
|
name: string;
|
|
11
11
|
subGroups?: SubGroupType[];
|
|
12
12
|
};
|
|
13
|
-
export declare const useSearchResults: <ItemType extends BaseItemType, GroupType extends BaseGroupType<GroupType>, GroupedListItemType>(items: ItemType[], groups: GroupType[], activeTab: number, groupByGroupName: (items: ItemType[], max?: number) => GroupedListItemType[], activeGroup?: GroupType
|
|
13
|
+
export declare const useSearchResults: <ItemType extends BaseItemType, GroupType extends BaseGroupType<GroupType>, GroupedListItemType>(items: ItemType[], groups: GroupType[], activeTab: number, groupByGroupName: (items: ItemType[], max?: number) => GroupedListItemType[], activeGroup?: GroupType, searchQuery?: string, maxSearchResultsInGroup?: number) => {
|
|
14
14
|
searchResults: GroupedListItemType[];
|
|
15
|
-
getActiveTabGroup: <GroupType_1 extends BaseGroupType<GroupType_1>>(tabIndex: number, groups?: GroupType_1[]
|
|
16
|
-
getGroupName: <
|
|
15
|
+
getActiveTabGroup: <GroupType_1 extends BaseGroupType<GroupType_1>>(tabIndex: number, groups?: GroupType_1[]) => GroupType_1 | undefined;
|
|
16
|
+
getGroupName: <GroupType_1 extends BaseGroupType<GroupType_1>>(groupId: ReactText | undefined, groups: BaseGroupType<GroupType_1>[]) => string | undefined;
|
|
17
17
|
};
|
|
@@ -14,7 +14,9 @@ export var useSearchResults = function useSearchResults(items, groups, activeTab
|
|
|
14
14
|
});
|
|
15
15
|
}, [groups]);
|
|
16
16
|
var searchResults = useMemo(function () {
|
|
17
|
-
if (!searchQuery)
|
|
17
|
+
if (!searchQuery) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
18
20
|
var result = [];
|
|
19
21
|
var itemsNumber = items.length;
|
|
20
22
|
for (var i = 0; i < itemsNumber; i += 1) {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
4
2
|
export var useTraceUpdate = function useTraceUpdate(props) {
|
|
5
3
|
var prev = useRef(props);
|
|
6
4
|
useEffect(function () {
|
|
@@ -8,7 +6,6 @@ export var useTraceUpdate = function useTraceUpdate(props) {
|
|
|
8
6
|
var k = _ref[0],
|
|
9
7
|
v = _ref[1];
|
|
10
8
|
if (prev.current[k] !== v) {
|
|
11
|
-
// eslint-disable-next-line no-param-reassign
|
|
12
9
|
ps[k] = [prev.current[k], v];
|
|
13
10
|
}
|
|
14
11
|
return ps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Utils UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@synerise/ds-data-format": "^1.
|
|
36
|
+
"@synerise/ds-data-format": "^1.1.0",
|
|
37
37
|
"latinize": "^0.5.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"react": ">=16.9.0 <= 18.3.1",
|
|
42
42
|
"styled-components": "^5.3.3"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b35b1875727156fe9f5b3bad55aed5ca447c8c8d"
|
|
45
45
|
}
|