@tachybase/module-web 0.23.18 → 0.23.20

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 (42) hide show
  1. package/dist/client/MAppNotFound.d.ts +1 -2
  2. package/dist/client/MobileClientProvider.d.ts +1 -1
  3. package/dist/client/MobileLinkProvider.d.ts +1 -2
  4. package/dist/client/configuration/App.d.ts +1 -2
  5. package/dist/client/configuration/Interface.d.ts +1 -2
  6. package/dist/client/core/assets/svg/index.d.ts +4 -5
  7. package/dist/client/core/schema/components/container/Container.Designer.d.ts +1 -2
  8. package/dist/client/core/schema/components/header/Header.Designer.d.ts +1 -2
  9. package/dist/client/core/schema/components/header/Header.d.ts +1 -2
  10. package/dist/client/core/schema/components/image-search/ImageSearch.initializer.d.ts +1 -2
  11. package/dist/client/core/schema/components/image-search/ImageSearch.provider.d.ts +1 -2
  12. package/dist/client/core/schema/components/image-search/ImageSearch.view.d.ts +1 -2
  13. package/dist/client/core/schema/components/image-search/search-item/ImageSearchItem.intializer.d.ts +1 -2
  14. package/dist/client/core/schema/components/image-search/search-item/ImageSearchItem.toolbar.d.ts +1 -2
  15. package/dist/client/core/schema/components/menu/MenuBlockInitializer.d.ts +1 -2
  16. package/dist/client/core/schema/components/notice/schema-initializer/NoticeBlockInitializer.d.ts +2 -3
  17. package/dist/client/core/schema/components/page/Page.Designer.d.ts +1 -2
  18. package/dist/client/core/schema/components/settings/Settings.Designer.d.ts +1 -2
  19. package/dist/client/core/schema/components/settings/Settings.d.ts +1 -2
  20. package/dist/client/core/schema/components/settings/SettingsBlockInitializer.d.ts +1 -2
  21. package/dist/client/core/schema/components/swiper/SwiperBlockInitializer.d.ts +1 -2
  22. package/dist/client/core/schema/components/swiper/SwiperPage.d.ts +1 -2
  23. package/dist/client/core/schema/components/tab-bar/TabBar.Item.d.ts +1 -1
  24. package/dist/client/core/schema/components/tab-search/components/TabSearch.d.ts +1 -2
  25. package/dist/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputItemChild.d.ts +4 -5
  26. package/dist/client/core/schema/components/tab-search/components/field-item/TabSearchCollapsibleInputMItemChild.d.ts +4 -5
  27. package/dist/client/core/schema/components/tab-search/initializer/TabSearchAssociated.fields.d.ts +1 -2
  28. package/dist/client/core/schema/components/tab-search/initializer/TabSearchBlockInitializer.d.ts +1 -2
  29. package/dist/client/core/schema/components/tab-search/initializer/TabSearchFieldSchemaInitializerGadget.d.ts +1 -2
  30. package/dist/client/core/schema/components/tab-search/provider/TabSearchProvider.d.ts +1 -2
  31. package/dist/client/index.d.ts +2 -1
  32. package/dist/client/index.js +34 -34
  33. package/dist/client/plugin-data-select/DataSelect.d.ts +33 -0
  34. package/dist/client/plugin-data-select/PluginDataSelect.d.ts +4 -0
  35. package/dist/client/plugin-data-select/settings.d.ts +7 -0
  36. package/dist/client/router/InterfaceProvider.d.ts +1 -1
  37. package/dist/client/router/InterfaceRouter.d.ts +1 -1
  38. package/dist/client/router/OpenInNewTab.d.ts +1 -2
  39. package/dist/externalVersion.js +8 -8
  40. package/dist/node_modules/cronstrue/package.json +1 -1
  41. package/dist/server/server.js +2 -3
  42. package/package.json +9 -9
@@ -0,0 +1,33 @@
1
+ export interface ITemplate {
2
+ config?: {
3
+ [key: string]: {
4
+ /** 设置的数据范围 */
5
+ filter?: any;
6
+ /** 设置的标题字段 */
7
+ titleField?: string;
8
+ };
9
+ };
10
+ items: {
11
+ key: string;
12
+ title: string;
13
+ collection: string;
14
+ dataId?: number;
15
+ fields: string[];
16
+ default?: boolean;
17
+ dataScope?: object;
18
+ titleField?: string;
19
+ }[];
20
+ /** 是否在 Form 卡片显示模板选择器 */
21
+ display: boolean;
22
+ }
23
+ export declare const useDataTemplates: () => any;
24
+ export declare const DataSelect: ({ style, templateKey, collection }: {
25
+ style?: {};
26
+ templateKey?: string;
27
+ collection: any;
28
+ }) => import("react/jsx-runtime").JSX.Element;
29
+ export declare function fetchTemplateData(api: any, template: {
30
+ collection: string;
31
+ dataId: number;
32
+ fields: string[];
33
+ }, t: any): Promise<any>;
@@ -0,0 +1,4 @@
1
+ import { Plugin } from '@tachybase/client';
2
+ export declare class PluginDataSelect extends Plugin {
3
+ load(): Promise<void>;
4
+ }
@@ -0,0 +1,7 @@
1
+ import { SchemaSettings } from '@tachybase/client';
2
+ import { SelectProps } from 'antd';
3
+ export type CollectionSelectProps = SelectProps<any, any> & {
4
+ filter?: (item: any, index: number, array: any[]) => boolean;
5
+ isTableOid?: boolean;
6
+ };
7
+ export declare const dataSelectSettings: SchemaSettings<{}>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  export declare const InterfaceContext: React.Context<any>;
3
- export declare const InterfaceProvider: (props: any) => React.JSX.Element;
3
+ export declare const InterfaceProvider: (props: any) => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const useInterfaceContext: () => any;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const InterfaceRouter: React.MemoExoticComponent<() => React.JSX.Element>;
2
+ export declare const InterfaceRouter: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,2 +1 @@
1
- import React from 'react';
2
- export declare const OpenInNewTab: () => React.JSX.Element;
1
+ export declare const OpenInNewTab: () => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,16 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "0.23.18",
3
+ "@tachybase/client": "0.23.20",
4
4
  "react-router-dom": "6.28.1",
5
5
  "@ant-design/icons": "5.3.7",
6
6
  "antd": "5.22.5",
7
- "@tachybase/utils": "0.23.18",
8
- "@tachybase/actions": "0.23.18",
9
- "@tachybase/server": "0.23.18",
7
+ "@tachybase/utils": "0.23.20",
8
+ "@tachybase/actions": "0.23.20",
9
+ "@tachybase/server": "0.23.20",
10
10
  "react-i18next": "15.1.4",
11
- "@tachybase/database": "0.23.18",
12
- "@tachybase/schema": "0.23.18",
13
- "ahooks": "3.8.4",
11
+ "@tachybase/schema": "0.23.20",
14
12
  "lodash": "4.17.21",
15
- "@tachybase/components": "0.23.18"
13
+ "@tachybase/database": "0.23.20",
14
+ "ahooks": "3.8.4",
15
+ "@tachybase/components": "0.23.20"
16
16
  };
@@ -1 +1 @@
1
- {"name":"cronstrue","title":"cRonstrue","version":"2.52.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2024-12-26T09:15:52.526Z"}
1
+ {"name":"cronstrue","title":"cRonstrue","version":"2.52.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2024-12-29T05:57:29.484Z"}
@@ -128,11 +128,10 @@ class ModuleWeb extends import_server.Plugin {
128
128
  const requestETag = ctx.get("If-None-Match");
129
129
  if (eTag && eTag === requestETag.substring(0, 36)) {
130
130
  ctx.status = 304;
131
- ctx.set("ETag", requestETag);
131
+ ctx.res.setHeader("ETag", requestETag);
132
132
  } else {
133
133
  const newTag = `${eTag}-${requestETag.substring(36 + 1)}`;
134
- ctx.set("ETag", newTag);
135
- console.log(ctx.get("ETag"));
134
+ ctx.res.setHeader("ETag", newTag);
136
135
  }
137
136
  ctx.body = {
138
137
  lang,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/module-web",
3
3
  "displayName": "WEB client",
4
- "version": "0.23.18",
4
+ "version": "0.23.20",
5
5
  "description": "Provides a client interface for the TachyBase server",
6
6
  "license": "Apache-2.0",
7
7
  "main": "./dist/server/index.js",
@@ -22,16 +22,16 @@
22
22
  "react-dom": "~18.3.1",
23
23
  "react-i18next": "~15.1.4",
24
24
  "react-router-dom": "6.28.1",
25
- "@tachybase/components": "0.23.18",
26
- "@tachybase/schema": "0.23.18"
25
+ "@tachybase/components": "0.23.20",
26
+ "@tachybase/schema": "0.23.20"
27
27
  },
28
28
  "peerDependencies": {
29
- "@tachybase/actions": "0.23.18",
30
- "@tachybase/database": "0.23.18",
31
- "@tachybase/server": "0.23.18",
32
- "@tachybase/client": "0.23.18",
33
- "@tachybase/utils": "0.23.18",
34
- "@tachybase/test": "0.23.18"
29
+ "@tachybase/actions": "0.23.20",
30
+ "@tachybase/client": "0.23.20",
31
+ "@tachybase/database": "0.23.20",
32
+ "@tachybase/server": "0.23.20",
33
+ "@tachybase/test": "0.23.20",
34
+ "@tachybase/utils": "0.23.20"
35
35
  },
36
36
  "description.zh-CN": "为 TachyBase 服务端提供客户端界面",
37
37
  "displayName.zh-CN": "WEB 客户端",