@gravity-ui/data-source 0.10.0-alpha.0 → 0.10.0-alpha.10

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.
Files changed (77) hide show
  1. package/build/cjs/react/components/Async/Async.d.ts +3 -0
  2. package/build/cjs/react/components/Async/Async.js +18 -0
  3. package/build/cjs/react/components/Async/Async.js.map +1 -0
  4. package/build/cjs/react/components/Async/index.d.ts +3 -0
  5. package/build/cjs/react/components/Async/index.js +20 -0
  6. package/build/cjs/react/components/Async/index.js.map +1 -0
  7. package/build/cjs/react/components/Async/types.d.ts +9 -0
  8. package/build/cjs/react/components/Async/types.js +6 -0
  9. package/build/cjs/react/components/Async/types.js.map +1 -0
  10. package/build/cjs/react/components/Async/withAsync.d.ts +3 -0
  11. package/build/cjs/react/components/Async/withAsync.js +26 -0
  12. package/build/cjs/react/components/Async/withAsync.js.map +1 -0
  13. package/build/cjs/react/components/AsyncBoundary/AsyncBoundary.js +3 -2
  14. package/build/cjs/react/components/AsyncBoundary/AsyncBoundary.js.map +1 -1
  15. package/build/cjs/react/components/AsyncBoundary/types.d.ts +3 -3
  16. package/build/cjs/react/components/AsyncBoundary/types.js.map +1 -1
  17. package/build/cjs/react/components/AsyncBoundary/withAsyncBoundary.d.ts +3 -2
  18. package/build/cjs/react/components/AsyncBoundary/withAsyncBoundary.js +9 -5
  19. package/build/cjs/react/components/AsyncBoundary/withAsyncBoundary.js.map +1 -1
  20. package/build/cjs/react/index.d.ts +1 -0
  21. package/build/cjs/react/index.js +12 -0
  22. package/build/cjs/react/index.js.map +1 -1
  23. package/build/cjs/react-query/components/QueryAsyncBoundary/types.d.ts +5 -4
  24. package/build/cjs/react-query/components/QueryAsyncBoundary/types.js.map +1 -1
  25. package/build/cjs/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.d.ts +3 -2
  26. package/build/cjs/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js +9 -5
  27. package/build/cjs/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js.map +1 -1
  28. package/build/esm/react/components/Async/Async.d.ts +3 -0
  29. package/build/esm/react/components/Async/Async.js +11 -0
  30. package/build/esm/react/components/Async/Async.js.map +1 -0
  31. package/build/esm/react/components/Async/index.d.ts +3 -0
  32. package/build/esm/react/components/Async/index.js +3 -0
  33. package/build/esm/react/components/Async/index.js.map +1 -0
  34. package/build/esm/react/components/Async/types.d.ts +9 -0
  35. package/build/esm/react/components/Async/types.js +2 -0
  36. package/build/esm/react/components/Async/types.js.map +1 -0
  37. package/build/esm/react/components/Async/withAsync.d.ts +3 -0
  38. package/build/esm/react/components/Async/withAsync.js +19 -0
  39. package/build/esm/react/components/Async/withAsync.js.map +1 -0
  40. package/build/esm/react/components/AsyncBoundary/AsyncBoundary.js +3 -2
  41. package/build/esm/react/components/AsyncBoundary/AsyncBoundary.js.map +1 -1
  42. package/build/esm/react/components/AsyncBoundary/types.d.ts +3 -3
  43. package/build/esm/react/components/AsyncBoundary/types.js.map +1 -1
  44. package/build/esm/react/components/AsyncBoundary/withAsyncBoundary.d.ts +3 -2
  45. package/build/esm/react/components/AsyncBoundary/withAsyncBoundary.js +9 -5
  46. package/build/esm/react/components/AsyncBoundary/withAsyncBoundary.js.map +1 -1
  47. package/build/esm/react/index.d.ts +1 -0
  48. package/build/esm/react/index.js +1 -0
  49. package/build/esm/react/index.js.map +1 -1
  50. package/build/esm/react-query/components/QueryAsyncBoundary/types.d.ts +5 -4
  51. package/build/esm/react-query/components/QueryAsyncBoundary/types.js.map +1 -1
  52. package/build/esm/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.d.ts +3 -2
  53. package/build/esm/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js +9 -5
  54. package/build/esm/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js.map +1 -1
  55. package/build/plugin/esbuild.cjs +5 -0
  56. package/build/plugin/esbuild.d.cts +6 -0
  57. package/build/plugin/esbuild.mjs +1 -1
  58. package/build/plugin/factory-B49Ym3ij.cjs +696 -0
  59. package/build/plugin/{factory-2tSt4Rte.mjs → factory-C_-OCKcW.mjs} +197 -56
  60. package/build/plugin/index-Dv4gZVjD.d.cts +23 -0
  61. package/build/plugin/index.cjs +12 -0
  62. package/build/plugin/index.d.cts +7 -0
  63. package/build/plugin/index.mjs +1 -1
  64. package/build/plugin/rollup.cjs +5 -0
  65. package/build/plugin/rollup.d.cts +5 -0
  66. package/build/plugin/rollup.mjs +1 -1
  67. package/build/plugin/rspack.cjs +5 -0
  68. package/build/plugin/rspack.d.cts +6 -0
  69. package/build/plugin/rspack.mjs +1 -1
  70. package/build/plugin/typings/client.d.ts +16 -4
  71. package/build/plugin/vite.cjs +5 -0
  72. package/build/plugin/vite.d.cts +5 -0
  73. package/build/plugin/vite.mjs +1 -1
  74. package/build/plugin/webpack.cjs +5 -0
  75. package/build/plugin/webpack.d.cts +6 -0
  76. package/build/plugin/webpack.mjs +1 -1
  77. package/package.json +13 -10
@@ -1,8 +1,9 @@
1
- import type { AsyncBoundaryProps } from '../../../react';
1
+ import type { ComponentType } from 'react';
2
+ import type { AsyncBoundaryProps, ErrorViewProps } from '../../../react';
2
3
  export interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {
3
4
  }
4
- export interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {
5
+ export interface QueryAsyncBoundaryComponent<TProps extends object = {}, TLoadingProps extends object = {}, TErrorProps extends object = {}> extends React.FC<TProps & TLoadingProps & Omit<TErrorProps, keyof ErrorViewProps>> {
5
6
  Content: React.ComponentType<TProps>;
6
- Loading: QueryAsyncBoundaryProps['LoadingView'];
7
- Error: QueryAsyncBoundaryProps['ErrorView'];
7
+ Loading: ComponentType<TLoadingProps & Partial<TProps>>;
8
+ Error: ComponentType<ErrorViewProps & TErrorProps & Partial<TProps>>;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {AsyncBoundaryProps} from '../../../react';\n\nexport interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {}\n\nexport interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: QueryAsyncBoundaryProps['LoadingView'];\n Error: QueryAsyncBoundaryProps['ErrorView'];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType} from 'react';\n\nimport type {AsyncBoundaryProps, ErrorViewProps} from '../../../react';\n\nexport interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {}\n\nexport interface QueryAsyncBoundaryComponent<\n TProps extends object = {},\n TLoadingProps extends object = {},\n TErrorProps extends object = {},\n> extends React.FC<TProps & TLoadingProps & Omit<TErrorProps, keyof ErrorViewProps>> {\n Content: React.ComponentType<TProps>;\n Loading: ComponentType<TLoadingProps & Partial<TProps>>;\n Error: ComponentType<ErrorViewProps & TErrorProps & Partial<TProps>>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import type { QueryAsyncBoundaryComponent, QueryAsyncBoundaryProps } from './types';
3
- export declare const withQueryAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: QueryAsyncBoundaryProps["LoadingView"], ErrorView: QueryAsyncBoundaryProps["ErrorView"]) => QueryAsyncBoundaryComponent<TProps>;
2
+ import type { ErrorViewProps } from '../../../react';
3
+ import type { QueryAsyncBoundaryComponent } from './types';
4
+ export declare const withQueryAsyncBoundary: <TProps extends object = {}, TLoadingProps extends object = {}, TErrorProps extends object = {}>(Component: React.ComponentType<TProps>, LoadingView: React.ComponentType<TLoadingProps & Partial<TProps>>, ErrorView: React.ComponentType<ErrorViewProps & TErrorProps & Partial<TProps>>) => QueryAsyncBoundaryComponent<TProps, TLoadingProps, TErrorProps>;
@@ -2,18 +2,22 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import React from 'react';
3
3
  import { QueryAsyncBoundary } from './QueryAsyncBoundary';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- export var withQueryAsyncBoundary = function withQueryAsyncBoundary(Component, LoadingView, ErrorView) {
5
+ export var withQueryAsyncBoundary = function withQueryAsyncBoundary(Component, _LoadingView, _ErrorView) {
6
6
  var WrappedComponent = function WrappedComponent(props) {
7
7
  return /*#__PURE__*/_jsx(QueryAsyncBoundary, {
8
- LoadingView: LoadingView,
9
- ErrorView: ErrorView,
8
+ LoadingView: function LoadingView() {
9
+ return /*#__PURE__*/_jsx(_LoadingView, _objectSpread({}, props));
10
+ },
11
+ ErrorView: function ErrorView(errorProps) {
12
+ return /*#__PURE__*/_jsx(_ErrorView, _objectSpread(_objectSpread({}, props), errorProps));
13
+ },
10
14
  children: /*#__PURE__*/_jsx(Component, _objectSpread({}, props))
11
15
  });
12
16
  };
13
17
  WrappedComponent.displayName = "WithQueryAsyncBoundary(".concat(Component.displayName || Component.name, ")");
14
18
  WrappedComponent.Content = Component;
15
- WrappedComponent.Loading = LoadingView;
16
- WrappedComponent.Error = ErrorView;
19
+ WrappedComponent.Loading = _LoadingView;
20
+ WrappedComponent.Error = _ErrorView;
17
21
  return WrappedComponent;
18
22
  };
19
23
  // #sourceMappingURL=withQueryAsyncBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","QueryAsyncBoundary","jsx","_jsx","withQueryAsyncBoundary","Component","LoadingView","ErrorView","WrappedComponent","props","children","_objectSpread","displayName","concat","name","Content","Loading","Error"],"sources":["withQueryAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport {QueryAsyncBoundary} from './QueryAsyncBoundary';\nimport type {QueryAsyncBoundaryComponent, QueryAsyncBoundaryProps} from './types';\n\nexport const withQueryAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: QueryAsyncBoundaryProps['LoadingView'],\n ErrorView: QueryAsyncBoundaryProps['ErrorView'],\n) => {\n const WrappedComponent = ((props: TProps) => (\n <QueryAsyncBoundary LoadingView={LoadingView} ErrorView={ErrorView}>\n <Component {...props} />\n </QueryAsyncBoundary>\n )) as QueryAsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithQueryAsyncBoundary(${\n Component.displayName || Component.name\n })`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,kBAAkB,QAAO,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxD,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAC/BC,SAAsC,EACtCC,WAAmD,EACnDC,SAA+C,EAC9C;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpCN,IAAA,CAACF,kBAAkB;MAACK,WAAW,EAAEA,WAAY;MAACC,SAAS,EAAEA,SAAU;MAAAG,QAAA,eAC/DP,IAAA,CAACE,SAAS,EAAAM,aAAA,KAAKF,KAAK,CAAG;IAAC,CACR,CAAC;EAAA,CACgB;EAEzCD,gBAAgB,CAACI,WAAW,6BAAAC,MAAA,CACxBR,SAAS,CAACO,WAAW,IAAIP,SAAS,CAACS,IAAI,MACxC;EAEHN,gBAAgB,CAACO,OAAO,GAAGV,SAAS;EACpCG,gBAAgB,CAACQ,OAAO,GAAGV,WAAW;EACtCE,gBAAgB,CAACS,KAAK,GAAGV,SAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","QueryAsyncBoundary","jsx","_jsx","withQueryAsyncBoundary","Component","LoadingView","ErrorView","WrappedComponent","props","_LoadingView","_objectSpread","errorProps","_ErrorView","children","displayName","concat","name","Content","Loading","Error"],"sources":["withQueryAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {ErrorViewProps} from '../../../react';\n\nimport {QueryAsyncBoundary} from './QueryAsyncBoundary';\nimport type {QueryAsyncBoundaryComponent} from './types';\n\nexport const withQueryAsyncBoundary = <\n TProps extends object = {},\n TLoadingProps extends object = {},\n TErrorProps extends object = {},\n>(\n Component: React.ComponentType<TProps>,\n LoadingView: React.ComponentType<TLoadingProps & Partial<TProps>>,\n ErrorView: React.ComponentType<ErrorViewProps & TErrorProps & Partial<TProps>>,\n) => {\n const WrappedComponent = ((props: TProps & TLoadingProps & TErrorProps) => (\n <QueryAsyncBoundary\n LoadingView={() => <LoadingView {...props} />}\n ErrorView={(errorProps) => <ErrorView {...props} {...errorProps} />}\n >\n <Component {...props} />\n </QueryAsyncBoundary>\n )) as QueryAsyncBoundaryComponent<TProps, TLoadingProps, TErrorProps>;\n\n WrappedComponent.displayName = `WithQueryAsyncBoundary(${\n Component.displayName || Component.name\n })`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,SAAQC,kBAAkB,QAAO,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxD,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAK/BC,SAAsC,EACtCC,YAAiE,EACjEC,UAA8E,EAC7E;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAA2C;IAAA,oBAClEN,IAAA,CAACF,kBAAkB;MACfK,WAAW,EAAE,SAAbA,WAAWA,CAAA;QAAA,oBAAQH,IAAA,CAACO,YAAW,EAAAC,aAAA,KAAKF,KAAK,CAAG,CAAC;MAAA,CAAC;MAC9CF,SAAS,EAAE,SAAXA,SAASA,CAAGK,UAAU;QAAA,oBAAKT,IAAA,CAACU,UAAS,EAAAF,aAAA,CAAAA,aAAA,KAAKF,KAAK,GAAMG,UAAU,CAAG,CAAC;MAAA,CAAC;MAAAE,QAAA,eAEpEX,IAAA,CAACE,SAAS,EAAAM,aAAA,KAAKF,KAAK,CAAG;IAAC,CACR,CAAC;EAAA,CAC4C;EAErED,gBAAgB,CAACO,WAAW,6BAAAC,MAAA,CACxBX,SAAS,CAACU,WAAW,IAAIV,SAAS,CAACY,IAAI,MACxC;EAEHT,gBAAgB,CAACU,OAAO,GAAGb,SAAS;EACpCG,gBAAgB,CAACW,OAAO,GAAGb,YAAW;EACtCE,gBAAgB,CAACY,KAAK,GAAGb,UAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ const require_factory = require("./factory-B49Ym3ij.cjs");
2
+ //#region src/plugin/esbuild.ts
3
+ var esbuild_default = (0, require("unplugin").createEsbuildPlugin)(require_factory.dataSourceLazyUnpluginFactory);
4
+ //#endregion
5
+ module.exports = esbuild_default;
@@ -0,0 +1,6 @@
1
+ import { r as DataSourceLazyPluginOptions } from "./index-Dv4gZVjD.cjs";
2
+ import * as _$esbuild from "esbuild";
3
+
4
+ //#region src/plugin/esbuild.d.ts
5
+ declare const _default: (options?: DataSourceLazyPluginOptions | undefined) => _$esbuild.Plugin;
6
+ export = _default;
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory } from "./factory-2tSt4Rte.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory } from "./factory-C_-OCKcW.mjs";
2
2
  import { createEsbuildPlugin } from "unplugin";
3
3
  //#region src/plugin/esbuild.ts
4
4
  var esbuild_default = createEsbuildPlugin(dataSourceLazyUnpluginFactory);