@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
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ useShareToken: ()=>useShareToken,
30
+ SharePage: ()=>SharePage,
31
+ NotAuthorityResult: ()=>NotAuthorityResult,
32
+ ShareLayout: ()=>ShareLayout
33
+ });
34
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
35
+ const external_react_namespaceObject = require("react");
36
+ const css_namespaceObject = require("@emotion/css");
37
+ const external_antd_namespaceObject = require("antd");
38
+ const external_react_router_namespaceObject = require("react-router");
39
+ const external_react_router_dom_namespaceObject = require("react-router-dom");
40
+ const index_js_namespaceObject = require("../../api-client/index.js");
41
+ const admin_layout_index_js_namespaceObject = require("../../built-in/admin-layout/index.js");
42
+ const pinned_list_index_js_namespaceObject = require("../../built-in/pinned-list/index.js");
43
+ const system_settings_index_js_namespaceObject = require("../../built-in/system-settings/index.js");
44
+ const external_user_index_js_namespaceObject = require("../../user/index.js");
45
+ const external_hooks_index_js_namespaceObject = require("../hooks/index.js");
46
+ function _tagged_template_literal(strings, raw) {
47
+ if (!raw) raw = strings.slice(0);
48
+ return Object.freeze(Object.defineProperties(strings, {
49
+ raw: {
50
+ value: Object.freeze(raw)
51
+ }
52
+ }));
53
+ }
54
+ function _templateObject() {
55
+ const data = _tagged_template_literal([
56
+ "\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 "
57
+ ]);
58
+ _templateObject = function() {
59
+ return data;
60
+ };
61
+ return data;
62
+ }
63
+ function useShareToken() {
64
+ const url = new URL(window.location.href);
65
+ const api = (0, index_js_namespaceObject.useAPIClient)();
66
+ const token = url.searchParams.get('token');
67
+ return token && api.auth.setToken(token), api.auth.getToken();
68
+ }
69
+ const ShareLayout = ()=>{
70
+ var _result_data_data_logo, _result_data_data, _result_data, _result_data_data1, _result_data1;
71
+ const { styles } = (0, admin_layout_index_js_namespaceObject.useStyles)();
72
+ const app = (0, external_hooks_index_js_namespaceObject.useApp)();
73
+ const result = (0, system_settings_index_js_namespaceObject.useSystemSettings)();
74
+ const sideMenuRef = (0, external_react_namespaceObject.useRef)();
75
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Layout, {
76
+ style: {
77
+ height: '100%'
78
+ },
79
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Layout.Content, {
80
+ className: (0, css_namespaceObject.css)(_templateObject()),
81
+ children: [
82
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Layout.Header, {
83
+ className: styles.header,
84
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
85
+ className: styles.headerA,
86
+ children: [
87
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
88
+ className: styles.headerB,
89
+ children: [
90
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
91
+ className: styles.titleContainer,
92
+ onClick: ()=>{
93
+ location.href = app.adminUrl;
94
+ },
95
+ children: [
96
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
97
+ className: styles.logo,
98
+ 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
99
+ }),
100
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
101
+ className: styles.title,
102
+ 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
103
+ })
104
+ ]
105
+ }),
106
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(admin_layout_index_js_namespaceObject.MenuEditor, {
107
+ sideMenuRef: sideMenuRef
108
+ }),
109
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
110
+ className: styles.headerTabs,
111
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(admin_layout_index_js_namespaceObject.AdminTabs, {})
112
+ })
113
+ ]
114
+ }),
115
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
116
+ className: styles.right,
117
+ children: [
118
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pinned_list_index_js_namespaceObject.PinnedPluginList, {
119
+ belongToFilter: "pinnedmenu"
120
+ }),
121
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_user_index_js_namespaceObject.CurrentUser, {})
122
+ ]
123
+ })
124
+ ]
125
+ })
126
+ }),
127
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_dom_namespaceObject.Outlet, {})
128
+ ]
129
+ })
130
+ });
131
+ };
132
+ const SharePage = ()=>{
133
+ const shareToken = useShareToken();
134
+ return shareToken ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(admin_layout_index_js_namespaceObject.AdminProvider, {
135
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ShareLayout, {})
136
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NotAuthorityResult, {});
137
+ };
138
+ function NotAuthorityResult() {
139
+ const { pathname, search } = (0, external_react_router_namespaceObject.useLocation)();
140
+ const redirect = "?redirect=".concat(pathname).concat(search);
141
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_namespaceObject.Navigate, {
142
+ replace: true,
143
+ to: "/signin".concat(redirect)
144
+ });
145
+ }
146
+ var __webpack_export_target__ = exports;
147
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
148
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
149
+ value: true
150
+ });
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ ShareSchemaComponent: ()=>ShareSchemaComponent
30
+ });
31
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const external_react_router_namespaceObject = require("react-router");
33
+ const index_js_namespaceObject = require("../../schema-component/index.js");
34
+ function ShareSchemaComponent() {
35
+ const params = (0, external_react_router_namespaceObject.useParams)();
36
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.RemoteSchemaComponent, {
37
+ uid: params.name
38
+ });
39
+ }
40
+ var __webpack_export_target__ = exports;
41
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
42
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
43
+ value: true
44
+ });
@@ -9,6 +9,12 @@ var __webpack_modules__ = {
9
9
  "./RouterContextCleaner": function(module) {
10
10
  module.exports = require("./RouterContextCleaner.js");
11
11
  },
12
+ "./SharePage": function(module) {
13
+ module.exports = require("./SharePage.js");
14
+ },
15
+ "./ShareSchemaComponent": function(module) {
16
+ module.exports = require("./ShareSchemaComponent.js");
17
+ },
12
18
  "./defaultComponents": function(module) {
13
19
  module.exports = require("./defaultComponents.js");
14
20
  }
@@ -85,6 +91,18 @@ for(var __WEBPACK_IMPORT_KEY__ in _RouterContextCleaner__WEBPACK_IMPORTED_MODULE
85
91
  return _RouterContextCleaner__WEBPACK_IMPORTED_MODULE_3__[key];
86
92
  }).bind(0, __WEBPACK_IMPORT_KEY__);
87
93
  __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
94
+ var _SharePage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./SharePage");
95
+ var __WEBPACK_REEXPORT_OBJECT__ = {};
96
+ for(var __WEBPACK_IMPORT_KEY__ in _SharePage__WEBPACK_IMPORTED_MODULE_4__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
97
+ return _SharePage__WEBPACK_IMPORTED_MODULE_4__[key];
98
+ }).bind(0, __WEBPACK_IMPORT_KEY__);
99
+ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
100
+ var _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./ShareSchemaComponent");
101
+ var __WEBPACK_REEXPORT_OBJECT__ = {};
102
+ for(var __WEBPACK_IMPORT_KEY__ in _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
103
+ return _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__[key];
104
+ }).bind(0, __WEBPACK_IMPORT_KEY__);
105
+ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
88
106
  var __webpack_export_target__ = exports;
89
107
  for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
90
108
  if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  var __webpack_modules__ = {
3
- "../../../schema-component?2c44": function(module) {
3
+ "../../../schema-component": function(module) {
4
4
  module.exports = require("../../../schema-component/index.js");
5
5
  },
6
6
  "../../hooks": function(module) {
@@ -83,7 +83,7 @@ __webpack_require__.d(__webpack_exports__, {
83
83
  });
84
84
  var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
85
85
  var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
86
- var _schema_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../schema-component?2c44");
86
+ var _schema_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../schema-component");
87
87
  var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../hooks");
88
88
  var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../components");
89
89
  var _components_SchemaInitializerButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../components/SchemaInitializerButton");
@@ -15,7 +15,7 @@ var __webpack_modules__ = {
15
15
  "../../filter-provider/utils": function(module) {
16
16
  module.exports = require("../../filter-provider/utils.js");
17
17
  },
18
- "../../../schema-component?8d08": function(module) {
18
+ "../..": function(module) {
19
19
  module.exports = require("../../index.js");
20
20
  },
21
21
  "../../record-provider": function(module) {
@@ -235,7 +235,7 @@ var lodash_omit__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/ __webpack_r
235
235
  var react_i18next__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("react-i18next");
236
236
  var react_router_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-router-dom");
237
237
  var react_to_print__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-to-print");
238
- var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../../schema-component?8d08");
238
+ var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../..");
239
239
  var _api_client__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../api-client");
240
240
  var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../built-in/dynamic-page/utils");
241
241
  var _collection_manager__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../collection-manager");
@@ -26,6 +26,9 @@ var __webpack_modules__ = {
26
26
  },
27
27
  "./filterByACL": function(module) {
28
28
  module.exports = require("./filterByACL.js");
29
+ },
30
+ "./style?6351": function(module) {
31
+ module.exports = require("./style.js");
29
32
  }
30
33
  };
31
34
  var __webpack_module_cache__ = {};
@@ -130,6 +133,12 @@ for(var __WEBPACK_IMPORT_KEY__ in _filterByACL__WEBPACK_IMPORTED_MODULE_8__)if (
130
133
  return _filterByACL__WEBPACK_IMPORTED_MODULE_8__[key];
131
134
  }).bind(0, __WEBPACK_IMPORT_KEY__);
132
135
  __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
136
+ var _style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./style?6351");
137
+ var __WEBPACK_REEXPORT_OBJECT__ = {};
138
+ for(var __WEBPACK_IMPORT_KEY__ in _style__WEBPACK_IMPORTED_MODULE_9__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
139
+ return _style__WEBPACK_IMPORTED_MODULE_9__[key];
140
+ }).bind(0, __WEBPACK_IMPORT_KEY__);
141
+ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
133
142
  var __webpack_export_target__ = exports;
134
143
  for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
135
144
  if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
@@ -83,51 +83,6 @@ const PluginDescription = (param)=>{
83
83
  children: record.isCompatible ? description : external_i18n_index_js_namespaceObject.i18n.t('Plugin dependencies check failed')
84
84
  });
85
85
  };
86
- const columns = [
87
- {
88
- title: external_i18n_index_js_namespaceObject.i18n.t('Name'),
89
- dataIndex: 'name',
90
- key: 'name',
91
- render: (_, param)=>{
92
- let { displayName, name, packageName } = param;
93
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
94
- children: displayName || name || packageName
95
- });
96
- }
97
- },
98
- {
99
- title: external_i18n_index_js_namespaceObject.i18n.t('Keywords'),
100
- dataIndex: 'keywords',
101
- key: 'keywords',
102
- render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tag, {
103
- children: external_i18n_index_js_namespaceObject.i18n.t(keyword)
104
- }, keyword))
105
- },
106
- {
107
- title: external_i18n_index_js_namespaceObject.i18n.t('Description'),
108
- dataIndex: 'description',
109
- key: 'description',
110
- render: (description, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PluginDescription, {
111
- description: description,
112
- record: record
113
- })
114
- },
115
- {
116
- title: external_i18n_index_js_namespaceObject.i18n.t('Action'),
117
- key: 'action',
118
- render: (_, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
119
- size: "middle",
120
- children: [
121
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewAction, {
122
- record: record
123
- }),
124
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_PluginCard_js_namespaceObject.SwitchAction, {
125
- ...record
126
- })
127
- ]
128
- })
129
- }
130
- ];
131
86
  const LocalPlugins = ()=>{
132
87
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
133
88
  const { theme } = (0, external_style_js_namespaceObject.useStyles)();
@@ -137,6 +92,51 @@ const LocalPlugins = ()=>{
137
92
  const [searchValue, setSearchValue] = (0, external_react_namespaceObject.useState)('');
138
93
  const [enabled, setEnabled] = (0, external_react_namespaceObject.useState)('all');
139
94
  const [keywords, setKeywords] = (0, external_react_namespaceObject.useState)([]);
95
+ const columns = (0, external_react_namespaceObject.useMemo)(()=>[
96
+ {
97
+ title: t('Name'),
98
+ dataIndex: 'name',
99
+ key: 'name',
100
+ render: (_, param)=>{
101
+ let { displayName, name, packageName } = param;
102
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
103
+ children: displayName || name || packageName
104
+ });
105
+ }
106
+ },
107
+ {
108
+ title: t('Keywords'),
109
+ dataIndex: 'keywords',
110
+ key: 'keywords',
111
+ render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tag, {
112
+ children: t(keyword)
113
+ }, keyword))
114
+ },
115
+ {
116
+ title: t('Description'),
117
+ dataIndex: 'description',
118
+ key: 'description',
119
+ render: (description, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PluginDescription, {
120
+ description: description,
121
+ record: record
122
+ })
123
+ },
124
+ {
125
+ title: t('Action'),
126
+ key: 'action',
127
+ render: (_, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
128
+ size: "middle",
129
+ children: [
130
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewAction, {
131
+ record: record
132
+ }),
133
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_PluginCard_js_namespaceObject.SwitchAction, {
134
+ ...record
135
+ })
136
+ ]
137
+ })
138
+ }
139
+ ], []);
140
140
  const filteredList = ((null == data ? void 0 : data.data) || []).filter((data)=>{
141
141
  var _data_description;
142
142
  return (0, client_namespaceObject.fuzzysearch)(searchValue, data.name) || (0, client_namespaceObject.fuzzysearch)(searchValue, data.packageName) || (0, client_namespaceObject.fuzzysearch)(searchValue, null !== (_data_description = data.description) && void 0 !== _data_description ? _data_description : '') || (0, client_namespaceObject.fuzzysearch)(searchValue, data.displayName);
@@ -3,8 +3,8 @@ var __webpack_exports__ = {};
3
3
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
4
4
  require("react");
5
5
  const client_namespaceObject = require("@tachybase/test/client");
6
- const external_appInfo_js_namespaceObject = require("../../../appInfo.js");
7
- const index_js_namespaceObject = require("../../../schema-component/antd/checkbox/index.js");
6
+ const index_js_namespaceObject = require("../../../common/appInfo/index.js");
7
+ const checkbox_index_js_namespaceObject = require("../../../schema-component/antd/checkbox/index.js");
8
8
  const input_index_js_namespaceObject = require("../../../schema-component/antd/input/index.js");
9
9
  const SchemaComponent_js_namespaceObject = require("../../../schema-component/core/SchemaComponent.js");
10
10
  const SchemaComponentProvider_js_namespaceObject = require("../../../schema-component/core/SchemaComponentProvider.js");
@@ -12,7 +12,7 @@ const external_json_js_namespaceObject = require("../json.js");
12
12
  const Component = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaComponentProvider_js_namespaceObject.SchemaComponentProvider, {
13
13
  components: {
14
14
  Input: input_index_js_namespaceObject.Input,
15
- Checkbox: index_js_namespaceObject.Checkbox
15
+ Checkbox: checkbox_index_js_namespaceObject.Checkbox
16
16
  },
17
17
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaComponent_js_namespaceObject.SchemaComponent, {
18
18
  schema: external_json_js_namespaceObject.json
@@ -23,7 +23,7 @@ describe('JSON', ()=>{
23
23
  (0, client_namespaceObject.render)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {}), {
24
24
  wrapper: (param)=>{
25
25
  let { children } = param;
26
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_appInfo_js_namespaceObject.CurrentAppInfoContext.Provider, {
26
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.CurrentAppInfoContext.Provider, {
27
27
  value: {
28
28
  data: {
29
29
  database: {
@@ -80,7 +80,19 @@ class IntegerFieldInterface extends CollectionFieldInterface_js_namespaceObject.
80
80
  unique: external_properties_index_js_namespaceObject.unique
81
81
  }
82
82
  },
83
- autoIncrement: external_properties_index_js_namespaceObject.autoIncrement
83
+ autoIncrement: external_properties_index_js_namespaceObject.autoIncrement,
84
+ 'uiSchema.x-component-props.addonBefore': {
85
+ type: 'string',
86
+ title: '{{t("Prefix")}}',
87
+ 'x-decorator': 'FormItem',
88
+ 'x-component': 'Input'
89
+ },
90
+ 'uiSchema.x-component-props.addonAfter': {
91
+ type: 'string',
92
+ title: '{{t("Suffix")}}',
93
+ 'x-decorator': 'FormItem',
94
+ 'x-component': 'Input'
95
+ }
84
96
  }), _define_property(this, "filterable", {
85
97
  operators: external_properties_index_js_namespaceObject.operators.number
86
98
  }), _define_property(this, "titleUsable", true), _define_property(this, "validateSchema", (fieldSchema)=>({
@@ -113,7 +113,16 @@ class NumberFieldInterface extends CollectionFieldInterface_js_namespaceObject.C
113
113
  step: '1'
114
114
  }
115
115
  }
116
- }), _define_property(this, "availableTypes", [
116
+ }), _define_property(this, "componentOptions", [
117
+ {
118
+ label: '{{t("InputNumber")}}',
119
+ value: 'InputNumber'
120
+ },
121
+ {
122
+ label: '{{t("Slider")}}',
123
+ value: 'Slider'
124
+ }
125
+ ]), _define_property(this, "availableTypes", [
117
126
  'double',
118
127
  'float',
119
128
  'decimal'
@@ -152,6 +161,18 @@ class NumberFieldInterface extends CollectionFieldInterface_js_namespaceObject.C
152
161
  label: '1.00000'
153
162
  }
154
163
  ]
164
+ },
165
+ 'uiSchema.x-component-props.addonBefore': {
166
+ type: 'string',
167
+ title: '{{t("Prefix")}}',
168
+ 'x-decorator': 'FormItem',
169
+ 'x-component': 'Input'
170
+ },
171
+ 'uiSchema.x-component-props.addonAfter': {
172
+ type: 'string',
173
+ title: '{{t("Suffix")}}',
174
+ 'x-decorator': 'FormItem',
175
+ 'x-component': 'Input'
155
176
  }
156
177
  }), _define_property(this, "filterable", {
157
178
  operators: external_properties_index_js_namespaceObject.operators.number
@@ -128,6 +128,18 @@ class PercentFieldInterface extends CollectionFieldInterface_js_namespaceObject.
128
128
  label: '1.00000%'
129
129
  }
130
130
  ]
131
+ },
132
+ 'uiSchema.x-component-props.addonBefore': {
133
+ type: 'string',
134
+ title: '{{t("Prefix")}}',
135
+ 'x-decorator': 'FormItem',
136
+ 'x-component': 'Input'
137
+ },
138
+ 'uiSchema.x-component-props.addonAfter': {
139
+ type: 'string',
140
+ title: '{{t("Suffix")}}',
141
+ 'x-decorator': 'FormItem',
142
+ 'x-component': 'Input'
131
143
  }
132
144
  }), _define_property(this, "filterable", {
133
145
  operators: external_properties_index_js_namespaceObject.operators.number
@@ -133,7 +133,6 @@ const unique = {
133
133
  'x-content': '{{t("Unique")}}',
134
134
  'x-decorator': 'FormItem',
135
135
  'x-component': 'Checkbox',
136
- 'x-disabled': '{{ !createMainOnly }}',
137
136
  'x-reactions': [
138
137
  {
139
138
  dependencies: [
@@ -153,7 +152,6 @@ const primaryKey = {
153
152
  'x-content': '{{t("Primary")}}',
154
153
  'x-decorator': 'FormItem',
155
154
  'x-component': 'Checkbox',
156
- 'x-disabled': '{{ !createMainOnly }}',
157
155
  'x-reactions': [
158
156
  {
159
157
  dependencies: [
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = function(exports1, definition) {
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = function(obj, prop) {
13
+ return Object.prototype.hasOwnProperty.call(obj, prop);
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.r = function(exports1) {
18
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
19
+ value: 'Module'
20
+ });
21
+ Object.defineProperty(exports1, '__esModule', {
22
+ value: true
23
+ });
24
+ };
25
+ })();
26
+ var __webpack_exports__ = {};
27
+ __webpack_require__.r(__webpack_exports__);
28
+ __webpack_require__.d(__webpack_exports__, {
29
+ CollectionFieldsToFormInitializerItems: ()=>CollectionFieldsToFormInitializerItems,
30
+ findKanbanFormItem: ()=>findKanbanFormItem
31
+ });
32
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
+ const utils_js_namespaceObject = require("../../schema-initializer/utils.js");
34
+ const external_CollectionFieldsToInitializerItems_js_namespaceObject = require("./CollectionFieldsToInitializerItems.js");
35
+ const findKanbanFormItem = (schema, key, action)=>{
36
+ const s = (0, utils_js_namespaceObject.findSchema)(schema, 'x-component', 'Kanban');
37
+ return (0, utils_js_namespaceObject.findSchema)(s, key, action);
38
+ };
39
+ const CollectionFieldsToFormInitializerItems = (props)=>{
40
+ const block = (null == props ? void 0 : props.block) || 'Form';
41
+ const fieldItemSchema = {
42
+ 'x-toolbar': 'FormItemSchemaToolbar',
43
+ 'x-settings': 'fieldSettings:FormItem',
44
+ 'x-decorator': 'FormItem'
45
+ };
46
+ const initializerItem = {
47
+ remove: utils_js_namespaceObject.removeGridFormItem
48
+ };
49
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CollectionFieldsToInitializerItems_js_namespaceObject.CollectionFieldsToInitializerItems, {
50
+ block: block,
51
+ selfField: {
52
+ filter: (field)=>!field.treeChildren,
53
+ getSchema: (field, param)=>{
54
+ let { targetCollection } = param;
55
+ var _field_uiSchema_xcomponentprops, _field_uiSchema;
56
+ const isFileCollection = (null == targetCollection ? void 0 : targetCollection.template) === 'file';
57
+ const isAssociationField = targetCollection;
58
+ const fieldNames = null == field ? void 0 : null === (_field_uiSchema = field.uiSchema) || void 0 === _field_uiSchema ? void 0 : null === (_field_uiSchema_xcomponentprops = _field_uiSchema['x-component-props']) || void 0 === _field_uiSchema_xcomponentprops ? void 0 : _field_uiSchema_xcomponentprops['fieldNames'];
59
+ return {
60
+ ...fieldItemSchema,
61
+ 'x-component-props': isFileCollection ? {
62
+ fieldNames: {
63
+ label: 'preview',
64
+ value: 'id'
65
+ }
66
+ } : isAssociationField && fieldNames ? {
67
+ fieldNames: {
68
+ ...fieldNames,
69
+ label: (null == targetCollection ? void 0 : targetCollection.titleField) || fieldNames.label
70
+ }
71
+ } : {}
72
+ };
73
+ },
74
+ getInitializerItem: ()=>({
75
+ ...initializerItem,
76
+ find: (null == props ? void 0 : props.block) === 'Kanban' ? findKanbanFormItem : void 0
77
+ })
78
+ },
79
+ parentField: {
80
+ getSchema: ()=>fieldItemSchema,
81
+ getInitializerItem: ()=>initializerItem
82
+ },
83
+ associationField: {
84
+ filterSelfField: (field)=>{
85
+ if ('Form' !== block) return true;
86
+ return (null == field ? void 0 : field.interface) === 'm2o';
87
+ },
88
+ filterAssociationField (collectionField) {
89
+ return (null == collectionField ? void 0 : collectionField.interface) && ![
90
+ 'subTable'
91
+ ].includes(null == collectionField ? void 0 : collectionField.interface) && !collectionField.treeChildren;
92
+ },
93
+ getSchema: ()=>fieldItemSchema,
94
+ getInitializerItem: ()=>initializerItem
95
+ }
96
+ });
97
+ };
98
+ var __webpack_export_target__ = exports;
99
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
100
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
101
+ value: true
102
+ });