@tachybase/client 1.0.6 → 1.0.25

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 (120) hide show
  1. package/es/application/Application.d.ts +2 -0
  2. package/es/application/Application.mjs +15 -0
  3. package/es/application/NoticesManager.d.ts +12 -3
  4. package/es/application/NoticesManager.mjs +27 -3
  5. package/es/application/TrackingManager.d.ts +13 -0
  6. package/es/application/TrackingManager.mjs +30 -0
  7. package/es/application/components/SharePage.d.ts +4 -0
  8. package/es/application/components/SharePage.mjs +113 -0
  9. package/es/application/components/ShareSchemaComponent.d.ts +1 -0
  10. package/es/application/components/ShareSchemaComponent.mjs +10 -0
  11. package/es/application/components/index.d.ts +2 -0
  12. package/es/application/components/index.mjs +2 -0
  13. package/es/built-in/admin-layout/index.d.ts +1 -0
  14. package/es/built-in/admin-layout/index.mjs +1 -0
  15. package/es/built-in/pm/PluginManager.mjs +45 -45
  16. package/es/collection-manager/interfaces/__tests__/json.mjs +2 -2
  17. package/es/collection-manager/interfaces/email.d.ts +0 -1
  18. package/es/collection-manager/interfaces/input.d.ts +0 -2
  19. package/es/collection-manager/interfaces/integer.d.ts +12 -2
  20. package/es/collection-manager/interfaces/integer.mjs +13 -1
  21. package/es/collection-manager/interfaces/number.d.ts +16 -1
  22. package/es/collection-manager/interfaces/number.mjs +22 -1
  23. package/es/collection-manager/interfaces/password.d.ts +0 -1
  24. package/es/collection-manager/interfaces/percent.d.ts +12 -1
  25. package/es/collection-manager/interfaces/percent.mjs +12 -0
  26. package/es/collection-manager/interfaces/phone.d.ts +0 -1
  27. package/es/collection-manager/interfaces/properties/index.d.ts +0 -2
  28. package/es/collection-manager/interfaces/properties/index.mjs +0 -2
  29. package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.d.ts +3 -0
  30. package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.mjs +67 -0
  31. package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.d.ts +3 -0
  32. package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.mjs +37 -0
  33. package/es/data-source/collection-fields-to-initializer-items/index.d.ts +1 -0
  34. package/es/data-source/collection-fields-to-initializer-items/index.mjs +1 -0
  35. package/es/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.d.ts +3 -0
  36. package/es/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.mjs +59 -0
  37. package/es/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.d.ts +3 -0
  38. package/es/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.mjs +34 -0
  39. package/es/data-source/collection-fields-to-initializer-items/items/SelfFields.d.ts +3 -0
  40. package/es/data-source/collection-fields-to-initializer-items/items/SelfFields.mjs +14 -0
  41. package/es/data-source/collection-fields-to-initializer-items/items/index.d.ts +3 -0
  42. package/es/data-source/collection-fields-to-initializer-items/items/index.mjs +7 -0
  43. package/es/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.d.ts +5 -0
  44. package/es/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.mjs +91 -0
  45. package/es/data-source/collection-fields-to-initializer-items/utils/index.d.ts +3 -0
  46. package/es/data-source/collection-fields-to-initializer-items/utils/index.mjs +3 -0
  47. package/es/data-source/collection-fields-to-initializer-items/utils/type.d.ts +108 -0
  48. package/es/data-source/collection-fields-to-initializer-items/utils/type.mjs +0 -0
  49. package/es/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.d.ts +21 -0
  50. package/es/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.mjs +31 -0
  51. package/es/data-source/index.d.ts +1 -0
  52. package/es/data-source/index.mjs +1 -0
  53. package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +0 -8
  54. package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.d.ts +1 -3
  55. package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.mjs +4 -1
  56. package/es/modules/fields/component/InputNumber/inputNumberComponentFieldSettings.mjs +91 -0
  57. package/es/schema-component/antd/index.d.ts +2 -0
  58. package/es/schema-component/antd/index.mjs +2 -0
  59. package/es/schema-component/antd/page/Page.Settings.mjs +33 -0
  60. package/es/schema-component/antd/page/Page.mjs +113 -18
  61. package/es/schema-component/antd/page/hooks/index.d.ts +1 -0
  62. package/es/schema-component/antd/page/hooks/index.mjs +1 -0
  63. package/es/schema-component/antd/page/hooks/useShareActions.d.ts +7 -0
  64. package/es/schema-component/antd/page/hooks/useShareActions.mjs +245 -0
  65. package/es/schema-component/antd/page/index.d.ts +1 -0
  66. package/es/schema-component/antd/page/index.mjs +1 -0
  67. package/es/schema-component/antd/page/style.d.ts +5 -0
  68. package/es/schema-component/antd/page/style.mjs +59 -2
  69. package/es/schema-component/antd/slider/index.d.ts +1 -0
  70. package/es/schema-component/antd/slider/index.mjs +1 -0
  71. package/es/schema-component/antd/slider/slider.d.ts +3 -0
  72. package/es/schema-component/antd/slider/slider.mjs +11 -0
  73. package/es/schema-component/antd/tracking-link/index.d.ts +10 -0
  74. package/es/schema-component/antd/tracking-link/index.mjs +25 -0
  75. package/es/schema-initializer/utils.d.ts +1 -0
  76. package/es/schema-initializer/utils.mjs +1 -1
  77. package/lib/application/Application.js +15 -0
  78. package/lib/application/NoticesManager.js +27 -3
  79. package/lib/application/TrackingManager.js +66 -0
  80. package/lib/application/components/SharePage.js +150 -0
  81. package/lib/application/components/ShareSchemaComponent.js +44 -0
  82. package/lib/application/components/index.js +18 -0
  83. package/lib/application/schema-initializer/hooks/index.js +2 -2
  84. package/lib/block-provider/hooks/index.js +2 -2
  85. package/lib/built-in/admin-layout/index.js +9 -0
  86. package/lib/built-in/pm/PluginManager.js +45 -45
  87. package/lib/collection-manager/interfaces/__tests__/json.js +4 -4
  88. package/lib/collection-manager/interfaces/integer.js +13 -1
  89. package/lib/collection-manager/interfaces/number.js +22 -1
  90. package/lib/collection-manager/interfaces/percent.js +12 -0
  91. package/lib/collection-manager/interfaces/properties/index.js +0 -2
  92. package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.js +102 -0
  93. package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.js +71 -0
  94. package/lib/data-source/collection-fields-to-initializer-items/index.js +65 -0
  95. package/lib/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.js +93 -0
  96. package/lib/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.js +68 -0
  97. package/lib/data-source/collection-fields-to-initializer-items/items/SelfFields.js +48 -0
  98. package/lib/data-source/collection-fields-to-initializer-items/items/index.js +40 -0
  99. package/lib/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.js +127 -0
  100. package/lib/data-source/collection-fields-to-initializer-items/utils/index.js +83 -0
  101. package/lib/data-source/collection-fields-to-initializer-items/utils/type.js +19 -0
  102. package/lib/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.js +65 -0
  103. package/lib/data-source/index.js +12 -3
  104. package/lib/locale/en_US.js +3 -0
  105. package/lib/locale/zh-CN.js +21 -0
  106. package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +0 -8
  107. package/lib/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.js +4 -1
  108. package/lib/modules/fields/component/InputNumber/inputNumberComponentFieldSettings.js +91 -0
  109. package/lib/schema-component/antd/index.js +161 -133
  110. package/lib/schema-component/antd/page/Page.Settings.js +33 -0
  111. package/lib/schema-component/antd/page/Page.js +113 -18
  112. package/lib/schema-component/antd/page/hooks/index.js +65 -0
  113. package/lib/schema-component/antd/page/hooks/useShareActions.js +293 -0
  114. package/lib/schema-component/antd/page/index.js +9 -0
  115. package/lib/schema-component/antd/page/style.js +60 -2
  116. package/lib/schema-component/antd/slider/index.js +65 -0
  117. package/lib/schema-component/antd/slider/slider.js +46 -0
  118. package/lib/schema-component/antd/tracking-link/index.js +59 -0
  119. package/lib/schema-initializer/utils.js +2 -1
  120. package/package.json +8 -7
@@ -14,6 +14,7 @@ import { ComponentTypeAndString, RouterManager, RouterOptions } from './RouterMa
14
14
  import { SchemaInitializer, SchemaInitializerManager } from './schema-initializer';
15
15
  import { SchemaSettings, SchemaSettingsManager } from './schema-settings';
16
16
  import { PluginSettingOptions, SystemSettingsManager } from './SystemSettingsManager';
17
+ import { TrackingManager } from './TrackingManager';
17
18
  import { UserSettingOptions, UserSettingsManager } from './UserSettingsManager';
18
19
  import { WebSocketClient, WebSocketClientOptions } from './WebSocketClient';
19
20
  declare global {
@@ -68,6 +69,7 @@ export declare class Application {
68
69
  schemaSettingsManager: SchemaSettingsManager;
69
70
  dataSourceManager: DataSourceManager;
70
71
  noticeManager: NoticeManager;
72
+ trackingManager: TrackingManager;
71
73
  pluginContextMenu: PluginContextMenu;
72
74
  AttachmentPreviewManager: AttachmentPreviewManager;
73
75
  name: string;
@@ -26,6 +26,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__schema_initializer_index_mjs__ from "./sc
26
26
  import * as __WEBPACK_EXTERNAL_MODULE__schema_initializer_components_index_mjs__ from "./schema-initializer/components/index.mjs";
27
27
  import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__ from "./schema-settings/index.mjs";
28
28
  import * as __WEBPACK_EXTERNAL_MODULE__SystemSettingsManager_mjs__ from "./SystemSettingsManager.mjs";
29
+ import * as __WEBPACK_EXTERNAL_MODULE__TrackingManager_mjs__ from "./TrackingManager.mjs";
29
30
  import * as __WEBPACK_EXTERNAL_MODULE__UserSettingsManager_mjs__ from "./UserSettingsManager.mjs";
30
31
  import * as __WEBPACK_EXTERNAL_MODULE__utils_index_mjs__ from "./utils/index.mjs";
31
32
  import * as __WEBPACK_EXTERNAL_MODULE__utils_globalDeps_mjs__ from "./utils/globalDeps.mjs";
@@ -86,6 +87,18 @@ class Application {
86
87
  path: '*',
87
88
  Component: this.components['AppNotFound']
88
89
  });
90
+ this.router.add('share', {
91
+ path: '/share',
92
+ Component: __WEBPACK_EXTERNAL_MODULE__components_index_mjs__.SharePage
93
+ });
94
+ this.router.add('share.page', {
95
+ path: '/share/:name',
96
+ Component: __WEBPACK_EXTERNAL_MODULE__components_index_mjs__.ShareSchemaComponent
97
+ });
98
+ this.router.add('share.notAuthorized', {
99
+ path: '/share/not-authorized',
100
+ element: null
101
+ });
89
102
  }
90
103
  getOptions() {
91
104
  return this.options;
@@ -272,6 +285,7 @@ class Application {
272
285
  _define_property(this, "schemaSettingsManager", void 0);
273
286
  _define_property(this, "dataSourceManager", void 0);
274
287
  _define_property(this, "noticeManager", void 0);
288
+ _define_property(this, "trackingManager", void 0);
275
289
  _define_property(this, "pluginContextMenu", void 0);
276
290
  _define_property(this, "AttachmentPreviewManager", void 0);
277
291
  _define_property(this, "name", void 0);
@@ -313,6 +327,7 @@ class Application {
313
327
  this.schemaInitializerManager = new __WEBPACK_EXTERNAL_MODULE__schema_initializer_index_mjs__.SchemaInitializerManager(options.schemaInitializers, this);
314
328
  this.dataSourceManager = new __WEBPACK_EXTERNAL_MODULE__data_source_data_source_DataSourceManager_mjs__.DataSourceManager(options.dataSourceManager, this);
315
329
  this.noticeManager = new __WEBPACK_EXTERNAL_MODULE__NoticesManager_mjs__.NoticeManager(this);
330
+ this.trackingManager = new __WEBPACK_EXTERNAL_MODULE__TrackingManager_mjs__.TrackingManager(this);
316
331
  this.addDefaultProviders();
317
332
  this.addReactRouterComponents();
318
333
  this.addProviders(options.providers || []);
@@ -11,7 +11,8 @@ export declare enum NoticeType {
11
11
  STATUS = "status",
12
12
  TOAST = "toast",
13
13
  NOTIFICATION = "notification",
14
- CUSTOM = "custom"
14
+ CUSTOM = "custom",
15
+ MODAL = "modal"
15
16
  }
16
17
  export declare enum NoticeDuration {
17
18
  Short = "SHORT"
@@ -39,8 +40,16 @@ export declare class NoticeManager {
39
40
  level: NoticeLevel;
40
41
  eventType?: string;
41
42
  event?: any;
43
+ duration: null | number;
42
44
  }): void;
43
45
  status(content: string, level: NoticeLevel, duration?: NoticeDuration): void;
44
- toast(content: string, level: NoticeLevel): void;
45
- notification(title: string, content: string, level: NoticeLevel): void;
46
+ toast(content: string, level: NoticeLevel, duration?: number): void;
47
+ notification(title: string, content: string, level: NoticeLevel, duration?: null | number, placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'top' | 'bottom'): void;
48
+ modal(title: string, content: string, level: NoticeLevel, duration?: null | number, options?: {
49
+ destroyOnClose?: boolean;
50
+ maskClosable?: boolean;
51
+ okText?: string;
52
+ onOk?: () => void;
53
+ onCancel?: () => void;
54
+ }): void;
46
55
  }
@@ -26,6 +26,7 @@ var NoticesManager_rslib_entry_NoticeType = /*#__PURE__*/ function(NoticeType) {
26
26
  NoticeType["TOAST"] = "toast";
27
27
  NoticeType["NOTIFICATION"] = "notification";
28
28
  NoticeType["CUSTOM"] = "custom";
29
+ NoticeType["MODAL"] = "modal";
29
30
  return NoticeType;
30
31
  }({});
31
32
  var NoticesManager_rslib_entry_NoticeDuration = /*#__PURE__*/ function(NoticeDuration) {
@@ -59,7 +60,9 @@ const useNoticeSub = (name, handler)=>{
59
60
  };
60
61
  class NoticeManager {
61
62
  on(data) {
62
- if ("notification" === data.type) this[data.type](data.title, data.content, data.level);
63
+ if ("notification" === data.type) this.notification(data.title, data.content, data.level, data.duration);
64
+ else if ("modal" === data.type) this.modal(data.title, data.content, data.level, data.duration);
65
+ else if ("toast" === data.type) this.toast(data.content, data.level, data.duration);
63
66
  else if ("custom" === data.type) this.emitter.emit(data.eventType, data.event);
64
67
  else this[data.type](data.content, data.level);
65
68
  }
@@ -68,13 +71,34 @@ class NoticeManager {
68
71
  this.currentStatusUpdatedAt = Date.now();
69
72
  }
70
73
  toast(content, level) {
71
- __WEBPACK_EXTERNAL_MODULE_antd__.message[level](content);
74
+ let duration = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 3;
75
+ __WEBPACK_EXTERNAL_MODULE_antd__.message[level]({
76
+ content,
77
+ duration
78
+ });
72
79
  }
73
80
  notification(title, content, level) {
81
+ let duration = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, placement = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 'topRight';
74
82
  __WEBPACK_EXTERNAL_MODULE_antd__.notification[level]({
75
83
  message: title,
76
- description: content
84
+ description: content,
85
+ placement,
86
+ duration
87
+ });
88
+ }
89
+ modal(title, content, level) {
90
+ let duration = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, options = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {};
91
+ const modal = __WEBPACK_EXTERNAL_MODULE_antd__.Modal[level]({
92
+ title,
93
+ content,
94
+ destroyOnClose: true,
95
+ maskClosable: false,
96
+ ...options
77
97
  });
98
+ if (!duration) duration = 30;
99
+ setTimeout(()=>{
100
+ null == modal || modal.destroy();
101
+ }, 1000 * duration);
78
102
  }
79
103
  constructor(app){
80
104
  _define_property(this, "app", void 0);
@@ -0,0 +1,13 @@
1
+ import { Application } from '.';
2
+ import { APIClient } from '../api-client';
3
+ export interface TrackingData {
4
+ type: string;
5
+ key: string;
6
+ values?: Record<string, any>;
7
+ }
8
+ export declare class TrackingManager {
9
+ private app;
10
+ api: APIClient;
11
+ constructor(app: Application);
12
+ logEvent(type: string, key: string, values?: Record<string, any>): Promise<void>;
13
+ }
@@ -0,0 +1,30 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) Object.defineProperty(obj, key, {
3
+ value: value,
4
+ enumerable: true,
5
+ configurable: true,
6
+ writable: true
7
+ });
8
+ else obj[key] = value;
9
+ return obj;
10
+ }
11
+ class TrackingManager {
12
+ async logEvent(type, key, values) {
13
+ const data = {
14
+ type,
15
+ key,
16
+ values
17
+ };
18
+ this.api.resource('instrumentation').create({
19
+ values: {
20
+ ...data
21
+ }
22
+ });
23
+ }
24
+ constructor(app){
25
+ _define_property(this, "app", void 0);
26
+ _define_property(this, "api", void 0);
27
+ this.app = app;
28
+ }
29
+ }
30
+ export { TrackingManager };
@@ -0,0 +1,4 @@
1
+ export declare function useShareToken(): string;
2
+ export declare const ShareLayout: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const SharePage: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare function NotAuthorityResult(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,113 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__emotion_css__ from "@emotion/css";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
5
+ import * as __WEBPACK_EXTERNAL_MODULE_react_router__ from "react-router";
6
+ import * as __WEBPACK_EXTERNAL_MODULE_react_router_dom__ from "react-router-dom";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__ from "../../api-client/index.mjs";
8
+ import * as __WEBPACK_EXTERNAL_MODULE__built_in_admin_layout_index_mjs__ from "../../built-in/admin-layout/index.mjs";
9
+ import * as __WEBPACK_EXTERNAL_MODULE__built_in_pinned_list_index_mjs__ from "../../built-in/pinned-list/index.mjs";
10
+ import * as __WEBPACK_EXTERNAL_MODULE__built_in_system_settings_index_mjs__ from "../../built-in/system-settings/index.mjs";
11
+ import * as __WEBPACK_EXTERNAL_MODULE__user_index_mjs__ from "../../user/index.mjs";
12
+ import * as __WEBPACK_EXTERNAL_MODULE__hooks_index_mjs__ from "../hooks/index.mjs";
13
+ function _tagged_template_literal(strings, raw) {
14
+ if (!raw) raw = strings.slice(0);
15
+ return Object.freeze(Object.defineProperties(strings, {
16
+ raw: {
17
+ value: Object.freeze(raw)
18
+ }
19
+ }));
20
+ }
21
+ function _templateObject() {
22
+ const data = _tagged_template_literal([
23
+ "\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-y: auto;\n > div {\n position: relative;\n }\n .ant-layout-footer {\n position: absolute;\n bottom: 0;\n text-align: center;\n width: 100%;\n z-index: 0;\n padding: 0px 50px;\n }\n "
24
+ ]);
25
+ _templateObject = function() {
26
+ return data;
27
+ };
28
+ return data;
29
+ }
30
+ function useShareToken() {
31
+ const url = new URL(window.location.href);
32
+ const api = (0, __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__.useAPIClient)();
33
+ const token = url.searchParams.get('token');
34
+ return token && api.auth.setToken(token), api.auth.getToken();
35
+ }
36
+ const ShareLayout = ()=>{
37
+ var _result_data_data_logo, _result_data_data, _result_data, _result_data_data1, _result_data1;
38
+ const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__built_in_admin_layout_index_mjs__.useStyles)();
39
+ const app = (0, __WEBPACK_EXTERNAL_MODULE__hooks_index_mjs__.useApp)();
40
+ const result = (0, __WEBPACK_EXTERNAL_MODULE__built_in_system_settings_index_mjs__.useSystemSettings)();
41
+ const sideMenuRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)();
42
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Layout, {
43
+ style: {
44
+ height: '100%'
45
+ },
46
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd__.Layout.Content, {
47
+ className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(_templateObject()),
48
+ children: [
49
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Layout.Header, {
50
+ className: styles.header,
51
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
52
+ className: styles.headerA,
53
+ children: [
54
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
55
+ className: styles.headerB,
56
+ children: [
57
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
58
+ className: styles.titleContainer,
59
+ onClick: ()=>{
60
+ location.href = app.adminUrl;
61
+ },
62
+ children: [
63
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("img", {
64
+ className: styles.logo,
65
+ src: null == result ? void 0 : null === (_result_data = result.data) || void 0 === _result_data ? void 0 : null === (_result_data_data = _result_data.data) || void 0 === _result_data_data ? void 0 : null === (_result_data_data_logo = _result_data_data.logo) || void 0 === _result_data_data_logo ? void 0 : _result_data_data_logo.url
66
+ }),
67
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("h1", {
68
+ className: styles.title,
69
+ children: null == result ? void 0 : null === (_result_data1 = result.data) || void 0 === _result_data1 ? void 0 : null === (_result_data_data1 = _result_data1.data) || void 0 === _result_data_data1 ? void 0 : _result_data_data1.title
70
+ })
71
+ ]
72
+ }),
73
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__built_in_admin_layout_index_mjs__.MenuEditor, {
74
+ sideMenuRef: sideMenuRef
75
+ }),
76
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
77
+ className: styles.headerTabs,
78
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__built_in_admin_layout_index_mjs__.AdminTabs, {})
79
+ })
80
+ ]
81
+ }),
82
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
83
+ className: styles.right,
84
+ children: [
85
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__built_in_pinned_list_index_mjs__.PinnedPluginList, {
86
+ belongToFilter: "pinnedmenu"
87
+ }),
88
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__user_index_mjs__.CurrentUser, {})
89
+ ]
90
+ })
91
+ ]
92
+ })
93
+ }),
94
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_router_dom__.Outlet, {})
95
+ ]
96
+ })
97
+ });
98
+ };
99
+ const SharePage = ()=>{
100
+ const shareToken = useShareToken();
101
+ return shareToken ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__built_in_admin_layout_index_mjs__.AdminProvider, {
102
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ShareLayout, {})
103
+ }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(NotAuthorityResult, {});
104
+ };
105
+ function NotAuthorityResult() {
106
+ const { pathname, search } = (0, __WEBPACK_EXTERNAL_MODULE_react_router__.useLocation)();
107
+ const redirect = "?redirect=".concat(pathname).concat(search);
108
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_router__.Navigate, {
109
+ replace: true,
110
+ to: "/signin".concat(redirect)
111
+ });
112
+ }
113
+ export { NotAuthorityResult, ShareLayout, SharePage, useShareToken };
@@ -0,0 +1 @@
1
+ export declare function ShareSchemaComponent(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_react_router__ from "react-router";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../schema-component/index.mjs";
4
+ function ShareSchemaComponent() {
5
+ const params = (0, __WEBPACK_EXTERNAL_MODULE_react_router__.useParams)();
6
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.RemoteSchemaComponent, {
7
+ uid: params.name
8
+ });
9
+ }
10
+ export { ShareSchemaComponent };
@@ -2,3 +2,5 @@ export * from './AppComponent';
2
2
  export * from './BlankComponent';
3
3
  export * from './defaultComponents';
4
4
  export * from './RouterContextCleaner';
5
+ export * from './SharePage';
6
+ export * from './ShareSchemaComponent';
@@ -2,3 +2,5 @@ export * from "./AppComponent.mjs";
2
2
  export * from "./BlankComponent.mjs";
3
3
  export * from "./defaultComponents.mjs";
4
4
  export * from "./RouterContextCleaner.mjs";
5
+ export * from "./SharePage.mjs";
6
+ export * from "./ShareSchemaComponent.mjs";
@@ -7,3 +7,4 @@ export * from './InternalAdminLayout';
7
7
  export * from './MenuEditor';
8
8
  export * from './NoticeArea';
9
9
  export * from './filterByACL';
10
+ export * from './style';
@@ -7,3 +7,4 @@ export * from "./InternalAdminLayout.mjs";
7
7
  export * from "./MenuEditor.mjs";
8
8
  export * from "./NoticeArea.mjs";
9
9
  export * from "./filterByACL.mjs";
10
+ export * from "./style.mjs";
@@ -39,51 +39,6 @@ const PluginDescription = (param)=>{
39
39
  children: record.isCompatible ? description : __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Plugin dependencies check failed')
40
40
  });
41
41
  };
42
- const columns = [
43
- {
44
- title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Name'),
45
- dataIndex: 'name',
46
- key: 'name',
47
- render: (_, param)=>{
48
- let { displayName, name, packageName } = param;
49
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("span", {
50
- children: displayName || name || packageName
51
- });
52
- }
53
- },
54
- {
55
- title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Keywords'),
56
- dataIndex: 'keywords',
57
- key: 'keywords',
58
- render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tag, {
59
- children: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t(keyword)
60
- }, keyword))
61
- },
62
- {
63
- title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Description'),
64
- dataIndex: 'description',
65
- key: 'description',
66
- render: (description, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(PluginDescription, {
67
- description: description,
68
- record: record
69
- })
70
- },
71
- {
72
- title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Action'),
73
- key: 'action',
74
- render: (_, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd__.Space, {
75
- size: "middle",
76
- children: [
77
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ViewAction, {
78
- record: record
79
- }),
80
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__PluginCard_mjs__.SwitchAction, {
81
- ...record
82
- })
83
- ]
84
- })
85
- }
86
- ];
87
42
  const LocalPlugins = ()=>{
88
43
  const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
89
44
  const { theme } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__.useStyles)();
@@ -93,6 +48,51 @@ const LocalPlugins = ()=>{
93
48
  const [searchValue, setSearchValue] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
94
49
  const [enabled, setEnabled] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('all');
95
50
  const [keywords, setKeywords] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
51
+ const columns = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>[
52
+ {
53
+ title: t('Name'),
54
+ dataIndex: 'name',
55
+ key: 'name',
56
+ render: (_, param)=>{
57
+ let { displayName, name, packageName } = param;
58
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("span", {
59
+ children: displayName || name || packageName
60
+ });
61
+ }
62
+ },
63
+ {
64
+ title: t('Keywords'),
65
+ dataIndex: 'keywords',
66
+ key: 'keywords',
67
+ render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tag, {
68
+ children: t(keyword)
69
+ }, keyword))
70
+ },
71
+ {
72
+ title: t('Description'),
73
+ dataIndex: 'description',
74
+ key: 'description',
75
+ render: (description, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(PluginDescription, {
76
+ description: description,
77
+ record: record
78
+ })
79
+ },
80
+ {
81
+ title: t('Action'),
82
+ key: 'action',
83
+ render: (_, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd__.Space, {
84
+ size: "middle",
85
+ children: [
86
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ViewAction, {
87
+ record: record
88
+ }),
89
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__PluginCard_mjs__.SwitchAction, {
90
+ ...record
91
+ })
92
+ ]
93
+ })
94
+ }
95
+ ], []);
96
96
  const filteredList = ((null == data ? void 0 : data.data) || []).filter((data)=>{
97
97
  var _data_description;
98
98
  return (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, data.name) || (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, data.packageName) || (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, null !== (_data_description = data.description) && void 0 !== _data_description ? _data_description : '') || (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, data.displayName);
@@ -1,7 +1,7 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
2
  import "react";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__ from "@tachybase/test/client";
4
- import * as __WEBPACK_EXTERNAL_MODULE__appInfo_mjs__ from "../../../appInfo.mjs";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__common_appInfo_index_mjs__ from "../../../common/appInfo/index.mjs";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_checkbox_index_mjs__ from "../../../schema-component/antd/checkbox/index.mjs";
6
6
  import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_input_index_mjs__ from "../../../schema-component/antd/input/index.mjs";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE__schema_component_core_SchemaComponent_mjs__ from "../../../schema-component/core/SchemaComponent.mjs";
@@ -21,7 +21,7 @@ describe('JSON', ()=>{
21
21
  (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(Component, {}), {
22
22
  wrapper: (param)=>{
23
23
  let { children } = param;
24
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__appInfo_mjs__.CurrentAppInfoContext.Provider, {
24
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__common_appInfo_index_mjs__.CurrentAppInfoContext.Provider, {
25
25
  value: {
26
26
  data: {
27
27
  database: {
@@ -23,7 +23,6 @@ export declare class EmailFieldInterface extends CollectionFieldInterface {
23
23
  'x-content': string;
24
24
  'x-decorator': string;
25
25
  'x-component': string;
26
- 'x-disabled': string;
27
26
  'x-reactions': {
28
27
  dependencies: string[];
29
28
  when: string;
@@ -34,7 +34,6 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
34
34
  'x-content': string;
35
35
  'x-decorator': string;
36
36
  'x-component': string;
37
- 'x-disabled': string;
38
37
  'x-reactions': {
39
38
  dependencies: string[];
40
39
  when: string;
@@ -50,7 +49,6 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
50
49
  'x-content': string;
51
50
  'x-decorator': string;
52
51
  'x-component': string;
53
- 'x-disabled': string;
54
52
  'x-reactions': {
55
53
  dependencies: string[];
56
54
  when: string;
@@ -37,7 +37,6 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
37
37
  'x-content': string;
38
38
  'x-decorator': string;
39
39
  'x-component': string;
40
- 'x-disabled': string;
41
40
  'x-reactions': {
42
41
  dependencies: string[];
43
42
  when: string;
@@ -53,7 +52,6 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
53
52
  'x-content': string;
54
53
  'x-decorator': string;
55
54
  'x-component': string;
56
- 'x-disabled': string;
57
55
  'x-reactions': {
58
56
  dependencies: string[];
59
57
  when: string;
@@ -74,6 +72,18 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
74
72
  'x-component': string;
75
73
  'x-disabled': string;
76
74
  };
75
+ 'uiSchema.x-component-props.addonBefore': {
76
+ type: string;
77
+ title: string;
78
+ 'x-decorator': string;
79
+ 'x-component': string;
80
+ };
81
+ 'uiSchema.x-component-props.addonAfter': {
82
+ type: string;
83
+ title: string;
84
+ 'x-decorator': string;
85
+ 'x-component': string;
86
+ };
77
87
  'uiSchema.title': {
78
88
  type: string;
79
89
  title: string;
@@ -50,7 +50,19 @@ class IntegerFieldInterface extends __WEBPACK_EXTERNAL_MODULE__data_source_colle
50
50
  unique: __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.unique
51
51
  }
52
52
  },
53
- autoIncrement: __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.autoIncrement
53
+ autoIncrement: __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.autoIncrement,
54
+ 'uiSchema.x-component-props.addonBefore': {
55
+ type: 'string',
56
+ title: '{{t("Prefix")}}',
57
+ 'x-decorator': 'FormItem',
58
+ 'x-component': 'Input'
59
+ },
60
+ 'uiSchema.x-component-props.addonAfter': {
61
+ type: 'string',
62
+ title: '{{t("Suffix")}}',
63
+ 'x-decorator': 'FormItem',
64
+ 'x-component': 'Input'
65
+ }
54
66
  }), _define_property(this, "filterable", {
55
67
  operators: __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.operators.number
56
68
  }), _define_property(this, "titleUsable", true), _define_property(this, "validateSchema", (fieldSchema)=>({
@@ -17,6 +17,10 @@ export declare class NumberFieldInterface extends CollectionFieldInterface {
17
17
  };
18
18
  };
19
19
  };
20
+ componentOptions: {
21
+ label: string;
22
+ value: string;
23
+ }[];
20
24
  availableTypes: string[];
21
25
  hasDefaultValue: boolean;
22
26
  properties: {
@@ -25,7 +29,6 @@ export declare class NumberFieldInterface extends CollectionFieldInterface {
25
29
  'x-content': string;
26
30
  'x-decorator': string;
27
31
  'x-component': string;
28
- 'x-disabled': string;
29
32
  'x-reactions': {
30
33
  dependencies: string[];
31
34
  when: string;
@@ -47,6 +50,18 @@ export declare class NumberFieldInterface extends CollectionFieldInterface {
47
50
  label: string;
48
51
  }[];
49
52
  };
53
+ 'uiSchema.x-component-props.addonBefore': {
54
+ type: string;
55
+ title: string;
56
+ 'x-decorator': string;
57
+ 'x-component': string;
58
+ };
59
+ 'uiSchema.x-component-props.addonAfter': {
60
+ type: string;
61
+ title: string;
62
+ 'x-decorator': string;
63
+ 'x-component': string;
64
+ };
50
65
  'uiSchema.title': {
51
66
  type: string;
52
67
  title: string;
@@ -83,7 +83,16 @@ class NumberFieldInterface extends __WEBPACK_EXTERNAL_MODULE__data_source_collec
83
83
  step: '1'
84
84
  }
85
85
  }
86
- }), _define_property(this, "availableTypes", [
86
+ }), _define_property(this, "componentOptions", [
87
+ {
88
+ label: '{{t("InputNumber")}}',
89
+ value: 'InputNumber'
90
+ },
91
+ {
92
+ label: '{{t("Slider")}}',
93
+ value: 'Slider'
94
+ }
95
+ ]), _define_property(this, "availableTypes", [
87
96
  'double',
88
97
  'float',
89
98
  'decimal'
@@ -122,6 +131,18 @@ class NumberFieldInterface extends __WEBPACK_EXTERNAL_MODULE__data_source_collec
122
131
  label: '1.00000'
123
132
  }
124
133
  ]
134
+ },
135
+ 'uiSchema.x-component-props.addonBefore': {
136
+ type: 'string',
137
+ title: '{{t("Prefix")}}',
138
+ 'x-decorator': 'FormItem',
139
+ 'x-component': 'Input'
140
+ },
141
+ 'uiSchema.x-component-props.addonAfter': {
142
+ type: 'string',
143
+ title: '{{t("Suffix")}}',
144
+ 'x-decorator': 'FormItem',
145
+ 'x-component': 'Input'
125
146
  }
126
147
  }), _define_property(this, "filterable", {
127
148
  operators: __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.operators.number
@@ -21,7 +21,6 @@ export declare class PasswordFieldInterface extends CollectionFieldInterface {
21
21
  'x-content': string;
22
22
  'x-decorator': string;
23
23
  'x-component': string;
24
- 'x-disabled': string;
25
24
  'x-reactions': {
26
25
  dependencies: string[];
27
26
  when: string;