@etsoo/react 1.7.44 → 1.7.45

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.
@@ -71,4 +71,4 @@ export interface DnDListPros<D extends object, K extends DataTypes.Keys<D>> {
71
71
  */
72
72
  export declare function DnDList<D extends {
73
73
  id: UniqueIdentifier;
74
- }, K extends DataTypes.Keys<D, UniqueIdentifier> = DataTypes.Keys<D, UniqueIdentifier>>(props: DnDListPros<D, K>): React.JSX.Element;
74
+ }, K extends DataTypes.Keys<D, UniqueIdentifier> = DataTypes.Keys<D, UniqueIdentifier>>(props: DnDListPros<D, K>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { DndContext } from '@dnd-kit/core';
2
3
  import { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
3
4
  import { CSS } from '@dnd-kit/utilities';
@@ -122,9 +123,8 @@ export function DnDList(props) {
122
123
  React.useEffect(() => {
123
124
  setItems(props.items);
124
125
  }, [props.items]);
125
- return (React.createElement(DndContext, { onDragStart: handleDragStart, onDragEnd: handleDragEnd },
126
- React.createElement(SortableContext, { items: items, strategy: verticalListSortingStrategy }, items.map((item, index) => {
127
- const id = item[keyField];
128
- return (React.createElement(SortableItem, { id: id, key: id, style: getItemStyle(index, id === activeId), itemRenderer: (nodeRef, actionNodeRef) => itemRenderer(item, index, nodeRef, actionNodeRef) }));
129
- }))));
126
+ return (_jsx(DndContext, { onDragStart: handleDragStart, onDragEnd: handleDragEnd, children: _jsx(SortableContext, { items: items, strategy: verticalListSortingStrategy, children: items.map((item, index) => {
127
+ const id = item[keyField];
128
+ return (_jsx(SortableItem, { id: id, style: getItemStyle(index, id === activeId), itemRenderer: (nodeRef, actionNodeRef) => itemRenderer(item, index, nodeRef, actionNodeRef) }, id));
129
+ }) }) }));
130
130
  }
@@ -13,4 +13,4 @@ export type DynamicRouterProps = {
13
13
  * @param props Props
14
14
  * @returns Component
15
15
  */
16
- export declare function DynamicRouter(props: React.PropsWithChildren<DynamicRouterProps>): React.JSX.Element;
16
+ export declare function DynamicRouter(props: React.PropsWithChildren<DynamicRouterProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { BridgeUtils } from '@etsoo/appscript';
2
- import React from 'react';
3
3
  import { BrowserRouter, MemoryRouter } from 'react-router-dom';
4
4
  function getEntries(host) {
5
5
  const startUrl = host.getStartUrl();
@@ -15,5 +15,5 @@ export function DynamicRouter(props) {
15
15
  const { basename, children } = props;
16
16
  // Layout
17
17
  const host = BridgeUtils.host;
18
- return host == null ? (React.createElement(BrowserRouter, { basename: basename }, children)) : (React.createElement(MemoryRouter, { basename: basename, initialEntries: getEntries(host) }, children));
18
+ return host == null ? (_jsx(BrowserRouter, { basename: basename, children: children })) : (_jsx(MemoryRouter, { basename: basename, initialEntries: getEntries(host), children: children }));
19
19
  }
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  /**
3
2
  * Scroll restoration
4
3
  */
5
- export declare function ScrollRestoration(): React.JSX.Element;
4
+ export declare function ScrollRestoration(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { useLocation } from 'react-router-dom';
3
4
  import { useWindowScroll } from '../uses/useWindowScroll';
@@ -26,5 +27,5 @@ export function ScrollRestoration() {
26
27
  mounted.current = false;
27
28
  };
28
29
  }, [key]);
29
- return React.createElement(React.Fragment, null);
30
+ return _jsx(React.Fragment, {});
30
31
  }
@@ -114,4 +114,4 @@ export interface ScrollerGridForwardRef<T> extends GridMethodRef<T> {
114
114
  * @param props Props
115
115
  * @returns Component
116
116
  */
117
- export declare const ScrollerGrid: <T extends object>(props: ScrollerGridProps<T>) => React.JSX.Element;
117
+ export declare const ScrollerGrid: <T extends object>(props: ScrollerGridProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import { VariableSizeGrid } from 'react-window';
3
4
  /**
@@ -237,15 +238,12 @@ export const ScrollerGrid = (props) => {
237
238
  loadDataLocal();
238
239
  }
239
240
  // Layout
240
- return (React.createElement(React.Fragment, null,
241
- headerRenderer && headerRenderer(refs.current),
242
- React.createElement(VariableSizeGrid, { itemKey: ({ columnIndex, rowIndex, data }) => {
243
- if (data == null)
244
- return [rowIndex, columnIndex].join(',');
245
- // ${data[idField]}-${rowIndex} always unique but no cache for the same item
246
- return [`${data[idField]}`, columnIndex].join(',');
247
- }, onItemsRendered: onItemsRenderedLocal, ref: ref, rowCount: rowCount, rowHeight: typeof rowHeight === 'function'
248
- ? rowHeight
249
- : () => rowHeight, style: { overflowX: 'hidden' }, width: width, ...rest }, (props) => itemRendererLocal(props, refs.current)),
250
- footerRenderer && footerRenderer(rows, refs.current)));
241
+ return (_jsxs(React.Fragment, { children: [headerRenderer && headerRenderer(refs.current), _jsx(VariableSizeGrid, { itemKey: ({ columnIndex, rowIndex, data }) => {
242
+ if (data == null)
243
+ return [rowIndex, columnIndex].join(',');
244
+ // ${data[idField]}-${rowIndex} always unique but no cache for the same item
245
+ return [`${data[idField]}`, columnIndex].join(',');
246
+ }, onItemsRendered: onItemsRenderedLocal, ref: ref, rowCount: rowCount, rowHeight: typeof rowHeight === 'function'
247
+ ? rowHeight
248
+ : () => rowHeight, style: { overflowX: 'hidden' }, width: width, ...rest, children: (props) => itemRendererLocal(props, refs.current) }), footerRenderer && footerRenderer(rows, refs.current)] }));
251
249
  };
@@ -67,4 +67,4 @@ export interface ScrollerListForwardRef<T> extends GridMethodRef<T> {
67
67
  * @param props Props
68
68
  * @returns Component
69
69
  */
70
- export declare const ScrollerList: <T extends object>(props: ScrollerListProps<T>) => React.JSX.Element;
70
+ export declare const ScrollerList: <T extends object>(props: ScrollerListProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { DataTypes, Utils } from '@etsoo/shared';
2
3
  import React from 'react';
3
4
  import { FixedSizeList, VariableSizeList } from 'react-window';
@@ -190,5 +191,5 @@ export const ScrollerList = (props) => {
190
191
  loadDataLocal();
191
192
  }
192
193
  // Layout
193
- return typeof itemSize === 'function' ? (React.createElement(VariableSizeList, { height: height, width: width, itemCount: itemCount, itemKey: (index, data) => DataTypes.getIdValue1(data, idField) ?? index, itemSize: itemSize, outerRef: refs, ref: listRef, style: style, onItemsRendered: onItemsRenderedLocal, ...rest }, itemRendererLocal)) : (React.createElement(FixedSizeList, { height: height, width: width, itemCount: itemCount, itemKey: (index, data) => DataTypes.getIdValue1(data, idField) ?? index, itemSize: itemSize, outerRef: refs, ref: listRef, style: style, onItemsRendered: onItemsRenderedLocal, ...rest }, itemRendererLocal));
194
+ return typeof itemSize === 'function' ? (_jsx(VariableSizeList, { height: height, width: width, itemCount: itemCount, itemKey: (index, data) => DataTypes.getIdValue1(data, idField) ?? index, itemSize: itemSize, outerRef: refs, ref: listRef, style: style, onItemsRendered: onItemsRenderedLocal, ...rest, children: itemRendererLocal })) : (_jsx(FixedSizeList, { height: height, width: width, itemCount: itemCount, itemKey: (index, data) => DataTypes.getIdValue1(data, idField) ?? index, itemSize: itemSize, outerRef: refs, ref: listRef, style: style, onItemsRendered: onItemsRenderedLocal, ...rest, children: itemRendererLocal }));
194
195
  };
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  /**
3
4
  * State
@@ -28,7 +29,7 @@ export class State {
28
29
  else {
29
30
  // Context new value
30
31
  const value = { ...calls, state, dispatch };
31
- return (React.createElement(context.Provider, { value: value }, children));
32
+ return (_jsx(context.Provider, { value: value, children: children }));
32
33
  }
33
34
  };
34
35
  // Return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.7.44",
3
+ "version": "1.7.45",
4
4
  "description": "TypeScript ReactJs UI Independent Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/tsconfig.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "strict": true,
13
13
  "esModuleInterop": true,
14
14
  "skipLibCheck": true,
15
- "jsx": "react",
15
+ "jsx": "react-jsx",
16
16
  "forceConsistentCasingInFileNames": true
17
17
  },
18
18
  "include": ["src"]