@synerise/ds-utils 1.1.0 → 1.1.1
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 +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +0 -1
- package/dist/useLatestRef/index.d.ts +1 -0
- package/dist/useLatestRef/index.js +1 -0
- package/dist/useLatestRef/useLatestRef.d.ts +2 -0
- package/dist/useLatestRef/useLatestRef.js +8 -0
- package/package.json +2 -2
- package/dist/testing/renderWithLocalesLoaded/renderWithLocalesLoaded.d.ts +0 -10
- package/dist/testing/renderWithLocalesLoaded/renderWithLocalesLoaded.js +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@1.1.0...@synerise/ds-utils@1.1.1) (2025-05-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** make translation imports static ([76df190](https://github.com/synerise/synerise-design/commit/76df19067366d42ab324eeb25c6b7418991b2d6b))
|
|
12
|
+
* **item-picker:** invoke latest loadItems function on refresh ([f358c0a](https://github.com/synerise/synerise-design/commit/f358c0ac4ccefb6ed51f7ad641376a80c70a1fa4))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [1.1.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@1.0.1...@synerise/ds-utils@1.1.0) (2025-05-07)
|
|
7
19
|
|
|
8
20
|
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './useKeyboardShortcuts/useKeyboardShortcuts';
|
|
|
20
20
|
export * from './omitKeys/omitKeys';
|
|
21
21
|
export * from './useTraceUpdate';
|
|
22
22
|
export * from './getPopupContainer';
|
|
23
|
+
export * from './useLatestRef';
|
|
23
24
|
export declare const NOOP: () => void;
|
|
24
25
|
export type { HandledEventsType } from './useOnClickOutside/useOnClickOutside';
|
|
25
26
|
export type { DataAttributes, ExactlyOne, LiteralStringUnion, WithHTMLAttributes, DeepPartial, RequiredProps, } from './types/types';
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,5 @@ export * from './useKeyboardShortcuts/useKeyboardShortcuts';
|
|
|
20
20
|
export * from './omitKeys/omitKeys';
|
|
21
21
|
export * from './useTraceUpdate';
|
|
22
22
|
export * from './getPopupContainer';
|
|
23
|
+
export * from './useLatestRef';
|
|
23
24
|
export var NOOP = function NOOP() {}; // eslint-disable-line @typescript-eslint/no-empty-function
|
package/dist/testing/index.d.ts
CHANGED
package/dist/testing/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
// eslint-disable-next-line import/prefer-default-export
|
|
2
2
|
export { default as renderWithProvider } from './renderWithProvider/renderWithProvider';
|
|
3
|
-
export { default as renderWithLocalesLoaded } from './renderWithLocalesLoaded/renderWithLocalesLoaded';
|
|
4
3
|
export { sleep } from './sleep';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLatestRef';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLatestRef';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Utils UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -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": "9e9cc54e3690b4d51323f91c81b3b79305984da6"
|
|
45
45
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { RenderOptions, RenderResult } from '@testing-library/react';
|
|
3
|
-
import { DataFormatNotationType } from '@synerise/ds-data-format';
|
|
4
|
-
type Options = Omit<RenderOptions, 'queries'>;
|
|
5
|
-
declare const renderWithLocalesLoaded: (node: ReactNode, options?: Options, props?: {
|
|
6
|
-
locale?: string;
|
|
7
|
-
notation?: DataFormatNotationType;
|
|
8
|
-
timeZone?: string;
|
|
9
|
-
}) => Promise<RenderResult>;
|
|
10
|
-
export default renderWithLocalesLoaded;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from '@testing-library/react';
|
|
4
|
-
import { DSProvider } from '@synerise/ds-core';
|
|
5
|
-
import { getDataFormatConfigFromNotation } from '@synerise/ds-data-format';
|
|
6
|
-
import renderWithProvider from '../renderWithProvider/renderWithProvider';
|
|
7
|
-
import { NOOP } from '../../index';
|
|
8
|
-
var renderWithLocalesLoaded = function renderWithLocalesLoaded(node, options, props) {
|
|
9
|
-
return new Promise(function (resolve) {
|
|
10
|
-
var _props$locale, _props$timeZone;
|
|
11
|
-
var onDSLocalesLoaded = function onDSLocalesLoaded() {
|
|
12
|
-
return resolve(_extends({}, rendered, {
|
|
13
|
-
rerender: function rerender(ui, opt) {
|
|
14
|
-
return renderWithProvider(ui, _extends({
|
|
15
|
-
container: rendered.container
|
|
16
|
-
}, opt));
|
|
17
|
-
}
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
20
|
-
var rendered = render(/*#__PURE__*/React.createElement(DSProvider, _extends({
|
|
21
|
-
locale: (_props$locale = props == null ? void 0 : props.locale) != null ? _props$locale : undefined,
|
|
22
|
-
onErrorIntl: NOOP,
|
|
23
|
-
onDSLocalesLoaded: onDSLocalesLoaded,
|
|
24
|
-
timeZone: (_props$timeZone = props == null ? void 0 : props.timeZone) != null ? _props$timeZone : undefined
|
|
25
|
-
}, props != null && props.notation ? {
|
|
26
|
-
dataFormatConfig: getDataFormatConfigFromNotation(props.notation)
|
|
27
|
-
} : {}), node), options);
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
export default renderWithLocalesLoaded;
|