@nocobase/client 0.9.2-alpha.4 → 0.9.3-alpha.1

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 (211) hide show
  1. package/es/block-provider/DetailsBlockProvider.js +13 -1
  2. package/es/block-provider/FormBlockProvider.js +30 -13
  3. package/es/block-provider/hooks/index.d.ts +10 -0
  4. package/es/block-provider/hooks/index.js +498 -281
  5. package/es/collection-manager/Configuration/CollectionFields.js +1 -2
  6. package/es/collection-manager/Configuration/EditFieldAction.js +0 -1
  7. package/es/collection-manager/Configuration/OverridingCollectionField.js +0 -1
  8. package/es/collection-manager/action-hooks.d.ts +1 -1
  9. package/es/collection-manager/action-hooks.js +18 -7
  10. package/es/collection-manager/interfaces/createdBy.js +1 -1
  11. package/es/collection-manager/interfaces/linkTo.js +3 -39
  12. package/es/collection-manager/interfaces/m2m.js +4 -38
  13. package/es/collection-manager/interfaces/m2o.js +4 -38
  14. package/es/collection-manager/interfaces/o2m.js +4 -68
  15. package/es/collection-manager/interfaces/o2o.js +25 -119
  16. package/es/collection-manager/interfaces/updatedBy.js +1 -1
  17. package/es/collection-manager/templates/tree.js +2 -2
  18. package/es/filter-provider/FilterProvider.js +3 -1
  19. package/es/locale/en_US.d.ts +3 -0
  20. package/es/locale/en_US.js +5 -2
  21. package/es/locale/ja_JP.d.ts +3 -0
  22. package/es/locale/ja_JP.js +3 -0
  23. package/es/locale/zh_CN.d.ts +4 -0
  24. package/es/locale/zh_CN.js +4 -0
  25. package/es/schema-component/antd/action/Action.Designer.js +4 -5
  26. package/es/schema-component/antd/association-field/AssociationFieldProvider.d.ts +2 -0
  27. package/es/schema-component/antd/association-field/AssociationFieldProvider.js +19 -0
  28. package/es/schema-component/antd/association-field/AssociationSelect.d.ts +14 -0
  29. package/es/schema-component/antd/association-field/AssociationSelect.js +118 -0
  30. package/es/schema-component/antd/association-field/Editable.d.ts +2 -0
  31. package/es/schema-component/antd/association-field/Editable.js +88 -0
  32. package/es/schema-component/antd/association-field/FileManager.d.ts +4 -0
  33. package/es/schema-component/antd/association-field/FileManager.js +243 -0
  34. package/es/schema-component/antd/association-field/InternalNester.d.ts +1 -0
  35. package/es/schema-component/antd/association-field/InternalNester.js +28 -0
  36. package/es/schema-component/antd/association-field/InternalPicker.d.ts +2 -0
  37. package/es/schema-component/antd/association-field/InternalPicker.js +267 -0
  38. package/es/schema-component/antd/association-field/InternalSubTable.d.ts +1 -0
  39. package/es/schema-component/antd/association-field/InternalSubTable.js +28 -0
  40. package/es/schema-component/antd/association-field/InternalViewer.d.ts +2 -0
  41. package/es/schema-component/antd/association-field/InternalViewer.js +115 -0
  42. package/es/schema-component/antd/association-field/Nester.d.ts +1 -0
  43. package/es/schema-component/antd/association-field/Nester.js +80 -0
  44. package/es/schema-component/antd/association-field/ReadPretty.d.ts +2 -0
  45. package/es/schema-component/antd/association-field/ReadPretty.js +38 -0
  46. package/es/schema-component/antd/association-field/SubTable.d.ts +1 -0
  47. package/es/schema-component/antd/association-field/SubTable.js +25 -0
  48. package/es/schema-component/antd/association-field/context.d.ts +7 -0
  49. package/es/schema-component/antd/association-field/context.js +2 -0
  50. package/es/schema-component/antd/association-field/hooks.d.ts +8 -0
  51. package/es/schema-component/antd/association-field/hooks.js +96 -0
  52. package/es/schema-component/antd/association-field/index.d.ts +1 -0
  53. package/es/schema-component/antd/association-field/index.js +14 -0
  54. package/es/schema-component/antd/association-field/schema.d.ts +142 -0
  55. package/es/schema-component/antd/association-field/schema.js +141 -0
  56. package/es/schema-component/antd/association-field/util.d.ts +8 -0
  57. package/es/schema-component/antd/association-field/util.js +84 -0
  58. package/es/schema-component/antd/expand-action/Expand.Action.Design.d.ts +1 -0
  59. package/es/schema-component/antd/expand-action/Expand.Action.Design.js +112 -0
  60. package/es/schema-component/antd/expand-action/Expand.Action.d.ts +1 -0
  61. package/es/schema-component/antd/expand-action/Expand.Action.js +40 -0
  62. package/es/schema-component/antd/expand-action/index.d.ts +1 -0
  63. package/es/schema-component/antd/expand-action/index.js +5 -0
  64. package/es/schema-component/antd/filter/Filter.Action.Designer.js +10 -12
  65. package/es/schema-component/antd/filter/FilterItem.js +1 -1
  66. package/es/schema-component/antd/filter/useOperators.d.ts +1 -1
  67. package/es/schema-component/antd/form-item/FormItem.d.ts +2 -1
  68. package/es/schema-component/antd/form-item/FormItem.js +183 -52
  69. package/es/schema-component/antd/form-item/SchemaSettingOptions.js +36 -58
  70. package/es/schema-component/antd/form-v2/utils.js +3 -1
  71. package/es/schema-component/antd/gantt/components/other/tooltip.js +1 -1
  72. package/es/schema-component/antd/index.d.ts +3 -1
  73. package/es/schema-component/antd/index.js +3 -1
  74. package/es/schema-component/antd/menu/Menu.js +6 -3
  75. package/es/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -0
  76. package/es/schema-component/antd/record-picker/InputRecordPicker.js +32 -12
  77. package/es/schema-component/antd/remote-select/RemoteSelect.js +16 -18
  78. package/es/schema-component/antd/table-v2/Table.Column.Designer.js +18 -9
  79. package/es/schema-component/antd/table-v2/Table.Index.d.ts +1 -0
  80. package/es/schema-component/antd/table-v2/Table.Index.js +6 -0
  81. package/es/schema-component/antd/table-v2/Table.js +9 -5
  82. package/es/schema-component/antd/table-v2/index.js +3 -1
  83. package/es/schema-component/antd/table-v2/utils.js +1 -1
  84. package/es/schema-component/antd/variable/Input.js +5 -5
  85. package/es/schema-component/antd/variable/TextArea.js +2 -5
  86. package/es/schema-component/common/dnd-context/index.js +3 -2
  87. package/es/schema-component/common/sortable-item/SortableItem.js +4 -1
  88. package/es/schema-component/common/utils/uitls.js +1 -1
  89. package/es/schema-component/hooks/index.d.ts +1 -0
  90. package/es/schema-component/hooks/index.js +2 -1
  91. package/es/schema-component/hooks/useFieldModeOptions.d.ts +4 -0
  92. package/es/schema-component/hooks/useFieldModeOptions.js +105 -0
  93. package/es/schema-initializer/components/CreateRecordAction.d.ts +1 -1
  94. package/es/schema-initializer/components/CreateRecordAction.js +4 -3
  95. package/es/schema-initializer/items/ExpandActionInitializer.d.ts +0 -1
  96. package/es/schema-initializer/items/ExpandActionInitializer.js +9 -34
  97. package/es/schema-initializer/items/SelectActionInitializer.d.ts +1 -0
  98. package/es/schema-initializer/items/SelectActionInitializer.js +65 -0
  99. package/es/schema-initializer/items/index.d.ts +1 -0
  100. package/es/schema-initializer/items/index.js +2 -1
  101. package/es/schema-initializer/utils.js +20 -8
  102. package/es/schema-settings/LinkageRules/FilterDynamicComponent.js +1 -1
  103. package/es/schema-settings/LinkageRules/Variables.d.ts +1 -1
  104. package/es/schema-settings/LinkageRules/Variables.js +7 -4
  105. package/es/schema-settings/SchemaSettings.js +2 -2
  106. package/lib/block-provider/DetailsBlockProvider.js +13 -1
  107. package/lib/block-provider/FormBlockProvider.js +31 -15
  108. package/lib/block-provider/hooks/index.d.ts +10 -0
  109. package/lib/block-provider/hooks/index.js +509 -289
  110. package/lib/collection-manager/Configuration/CollectionFields.js +1 -2
  111. package/lib/collection-manager/Configuration/EditFieldAction.js +0 -1
  112. package/lib/collection-manager/Configuration/OverridingCollectionField.js +0 -1
  113. package/lib/collection-manager/action-hooks.d.ts +1 -1
  114. package/lib/collection-manager/action-hooks.js +18 -7
  115. package/lib/collection-manager/interfaces/createdBy.js +1 -1
  116. package/lib/collection-manager/interfaces/linkTo.js +2 -38
  117. package/lib/collection-manager/interfaces/m2m.js +3 -37
  118. package/lib/collection-manager/interfaces/m2o.js +3 -37
  119. package/lib/collection-manager/interfaces/o2m.js +6 -70
  120. package/lib/collection-manager/interfaces/o2o.js +30 -124
  121. package/lib/collection-manager/interfaces/updatedBy.js +1 -1
  122. package/lib/collection-manager/templates/tree.js +2 -2
  123. package/lib/filter-provider/FilterProvider.js +3 -1
  124. package/lib/locale/en_US.d.ts +3 -0
  125. package/lib/locale/en_US.js +5 -2
  126. package/lib/locale/ja_JP.d.ts +3 -0
  127. package/lib/locale/ja_JP.js +3 -0
  128. package/lib/locale/zh_CN.d.ts +4 -0
  129. package/lib/locale/zh_CN.js +4 -0
  130. package/lib/schema-component/antd/action/Action.Designer.js +4 -5
  131. package/lib/schema-component/antd/association-field/AssociationFieldProvider.d.ts +2 -0
  132. package/lib/schema-component/antd/association-field/AssociationFieldProvider.js +28 -0
  133. package/lib/schema-component/antd/association-field/AssociationSelect.d.ts +14 -0
  134. package/lib/schema-component/antd/association-field/AssociationSelect.js +129 -0
  135. package/lib/schema-component/antd/association-field/Editable.d.ts +2 -0
  136. package/lib/schema-component/antd/association-field/Editable.js +97 -0
  137. package/lib/schema-component/antd/association-field/FileManager.d.ts +4 -0
  138. package/lib/schema-component/antd/association-field/FileManager.js +253 -0
  139. package/lib/schema-component/antd/association-field/InternalNester.d.ts +1 -0
  140. package/lib/schema-component/antd/association-field/InternalNester.js +39 -0
  141. package/lib/schema-component/antd/association-field/InternalPicker.d.ts +2 -0
  142. package/lib/schema-component/antd/association-field/InternalPicker.js +277 -0
  143. package/lib/schema-component/antd/association-field/InternalSubTable.d.ts +1 -0
  144. package/lib/schema-component/antd/association-field/InternalSubTable.js +39 -0
  145. package/lib/schema-component/antd/association-field/InternalViewer.d.ts +2 -0
  146. package/lib/schema-component/antd/association-field/InternalViewer.js +126 -0
  147. package/lib/schema-component/antd/association-field/Nester.d.ts +1 -0
  148. package/lib/schema-component/antd/association-field/Nester.js +89 -0
  149. package/lib/schema-component/antd/association-field/ReadPretty.d.ts +2 -0
  150. package/lib/schema-component/antd/association-field/ReadPretty.js +47 -0
  151. package/lib/schema-component/antd/association-field/SubTable.d.ts +1 -0
  152. package/lib/schema-component/antd/association-field/SubTable.js +33 -0
  153. package/lib/schema-component/antd/association-field/context.d.ts +7 -0
  154. package/lib/schema-component/antd/association-field/context.js +9 -0
  155. package/lib/schema-component/antd/association-field/hooks.d.ts +8 -0
  156. package/lib/schema-component/antd/association-field/hooks.js +107 -0
  157. package/lib/schema-component/antd/association-field/index.d.ts +1 -0
  158. package/lib/schema-component/antd/association-field/index.js +21 -0
  159. package/lib/schema-component/antd/association-field/schema.d.ts +142 -0
  160. package/lib/schema-component/antd/association-field/schema.js +148 -0
  161. package/lib/schema-component/antd/association-field/util.d.ts +8 -0
  162. package/lib/schema-component/antd/association-field/util.js +98 -0
  163. package/lib/schema-component/antd/expand-action/Expand.Action.Design.d.ts +1 -0
  164. package/lib/schema-component/antd/expand-action/Expand.Action.Design.js +120 -0
  165. package/lib/schema-component/antd/expand-action/Expand.Action.d.ts +1 -0
  166. package/lib/schema-component/antd/expand-action/Expand.Action.js +48 -0
  167. package/lib/schema-component/antd/expand-action/index.d.ts +1 -0
  168. package/lib/schema-component/antd/expand-action/index.js +12 -0
  169. package/lib/schema-component/antd/filter/Filter.Action.Designer.js +10 -12
  170. package/lib/schema-component/antd/filter/FilterItem.js +1 -1
  171. package/lib/schema-component/antd/filter/useOperators.d.ts +1 -1
  172. package/lib/schema-component/antd/form-item/FormItem.d.ts +2 -1
  173. package/lib/schema-component/antd/form-item/FormItem.js +180 -48
  174. package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +34 -56
  175. package/lib/schema-component/antd/form-v2/utils.js +3 -1
  176. package/lib/schema-component/antd/gantt/components/other/tooltip.js +1 -1
  177. package/lib/schema-component/antd/index.d.ts +3 -1
  178. package/lib/schema-component/antd/index.js +33 -11
  179. package/lib/schema-component/antd/menu/Menu.js +6 -3
  180. package/lib/schema-component/antd/record-picker/InputRecordPicker.d.ts +1 -0
  181. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +34 -13
  182. package/lib/schema-component/antd/remote-select/RemoteSelect.js +15 -17
  183. package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +18 -9
  184. package/lib/schema-component/antd/table-v2/Table.Index.d.ts +1 -0
  185. package/lib/schema-component/antd/table-v2/Table.Index.js +14 -0
  186. package/lib/schema-component/antd/table-v2/Table.js +9 -5
  187. package/lib/schema-component/antd/table-v2/index.js +3 -1
  188. package/lib/schema-component/antd/table-v2/utils.js +1 -1
  189. package/lib/schema-component/antd/variable/Input.js +5 -5
  190. package/lib/schema-component/antd/variable/TextArea.js +2 -5
  191. package/lib/schema-component/common/dnd-context/index.js +3 -2
  192. package/lib/schema-component/common/sortable-item/SortableItem.js +4 -1
  193. package/lib/schema-component/common/utils/uitls.js +1 -1
  194. package/lib/schema-component/hooks/index.d.ts +1 -0
  195. package/lib/schema-component/hooks/index.js +11 -0
  196. package/lib/schema-component/hooks/useFieldModeOptions.d.ts +4 -0
  197. package/lib/schema-component/hooks/useFieldModeOptions.js +112 -0
  198. package/lib/schema-initializer/components/CreateRecordAction.d.ts +1 -1
  199. package/lib/schema-initializer/components/CreateRecordAction.js +4 -3
  200. package/lib/schema-initializer/items/ExpandActionInitializer.d.ts +0 -1
  201. package/lib/schema-initializer/items/ExpandActionInitializer.js +11 -37
  202. package/lib/schema-initializer/items/SelectActionInitializer.d.ts +1 -0
  203. package/lib/schema-initializer/items/SelectActionInitializer.js +73 -0
  204. package/lib/schema-initializer/items/index.d.ts +1 -0
  205. package/lib/schema-initializer/items/index.js +11 -0
  206. package/lib/schema-initializer/utils.js +20 -8
  207. package/lib/schema-settings/LinkageRules/FilterDynamicComponent.js +1 -1
  208. package/lib/schema-settings/LinkageRules/Variables.d.ts +1 -1
  209. package/lib/schema-settings/LinkageRules/Variables.js +7 -4
  210. package/lib/schema-settings/SchemaSettings.js +3 -3
  211. package/package.json +5 -6
@@ -1,2 +1 @@
1
1
  export declare const ExpandActionInitializer: (props: any) => JSX.Element;
2
- export declare const ExpandActionComponent: (props: any) => JSX.Element;
@@ -1,28 +1,25 @@
1
- var _templateObject;
2
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
7
  import React from 'react';
10
- import { Button } from 'antd';
11
- import { css } from '@emotion/css';
12
- import { useTranslation } from 'react-i18next';
13
- import { useFieldSchema } from '@formily/react';
14
8
  import { ActionInitializer } from './ActionInitializer';
15
- import { useTableBlockContext, useTableSelectorContext } from '../../';
16
- import { NodeCollapseOutlined, NodeExpandOutlined } from '@ant-design/icons';
9
+ import { useTranslation } from 'react-i18next';
17
10
  export var ExpandActionInitializer = function ExpandActionInitializer(props) {
11
+ var _useTranslation = useTranslation(),
12
+ t = _useTranslation.t;
18
13
  var schema = {
19
14
  'x-action': 'expandAll',
20
15
  'x-component': 'Action',
21
- 'x-designer': 'Action.Designer',
16
+ 'x-designer': 'Expand.Action.Design',
22
17
  'x-component-props': {
23
- icon: '{{ expandIcon}}',
24
- useProps: '{{ useExpandAllActionProps }}',
25
- component: 'ExpandActionComponent',
18
+ titleExpand: t("Expand all"),
19
+ titleCollapse: t("Collapse all"),
20
+ iconExpand: 'nodeexpandoutlined',
21
+ iconCollapse: 'nodecollapseoutlined',
22
+ component: 'Expand.Action',
26
23
  useAction: function useAction() {
27
24
  return {
28
25
  run: function run() {}
@@ -33,26 +30,4 @@ export var ExpandActionInitializer = function ExpandActionInitializer(props) {
33
30
  return /*#__PURE__*/React.createElement(ActionInitializer, _objectSpread(_objectSpread({}, props), {}, {
34
31
  schema: schema
35
32
  }));
36
- };
37
- var actionDesignerCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n &:hover {\n .general-schema-designer {\n display: block;\n }\n }\n .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: rgba(241, 139, 98, 0.06);\n border: 0;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: #f18b62;\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n"])));
38
- export var ExpandActionComponent = function ExpandActionComponent(props) {
39
- var _schema$parent, _schema$parent$parent;
40
- var _useTranslation = useTranslation(),
41
- t = _useTranslation.t;
42
- var schema = useFieldSchema();
43
- var isTableSelector = ((_schema$parent = schema.parent) === null || _schema$parent === void 0 ? void 0 : (_schema$parent$parent = _schema$parent.parent) === null || _schema$parent$parent === void 0 ? void 0 : _schema$parent$parent['x-decorator']) === 'TableSelectorProvider';
44
- var ctx = isTableSelector ? useTableSelectorContext() : useTableBlockContext();
45
- return /*#__PURE__*/React.createElement("div", {
46
- className: actionDesignerCss
47
- }, ctx.params['tree'] && /*#__PURE__*/React.createElement(Button, {
48
- onClick: function onClick() {
49
- ctx === null || ctx === void 0 ? void 0 : ctx.setExpandFlag();
50
- },
51
- icon: (ctx === null || ctx === void 0 ? void 0 : ctx.expandFlag) ? /*#__PURE__*/React.createElement(NodeCollapseOutlined, null) : /*#__PURE__*/React.createElement(NodeExpandOutlined, null),
52
- type: props.type
53
- }, props.children[1], /*#__PURE__*/React.createElement("span", {
54
- style: {
55
- marginLeft: 10
56
- }
57
- }, (ctx === null || ctx === void 0 ? void 0 : ctx.expandFlag) ? t('Collapse all') : t('Expand all'))));
58
33
  };
@@ -0,0 +1 @@
1
+ export declare const SelectActionInitializer: (props: any) => JSX.Element;
@@ -0,0 +1,65 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ import React from 'react';
8
+ import { ActionInitializer } from './ActionInitializer';
9
+ export var SelectActionInitializer = function SelectActionInitializer(props) {
10
+ var schema = {
11
+ type: 'void',
12
+ title: '{{ t("Select") }}',
13
+ 'x-action': 'update',
14
+ 'x-designer': 'Action.Designer',
15
+ 'x-component': 'Action',
16
+ 'x-component-props': {
17
+ openMode: 'drawer'
18
+ },
19
+ properties: {
20
+ drawer: {
21
+ type: 'void',
22
+ 'x-component': 'AssociationField.Selector',
23
+ title: '{{ t("Select record") }}',
24
+ 'x-component-props': {
25
+ className: 'nb-record-picker-selector'
26
+ },
27
+ properties: {
28
+ grid: {
29
+ type: 'void',
30
+ 'x-component': 'Grid',
31
+ 'x-initializer': 'TableSelectorInitializers',
32
+ properties: {}
33
+ },
34
+ footer: {
35
+ 'x-component': 'Action.Container.Footer',
36
+ 'x-component-props': {},
37
+ properties: {
38
+ actions: {
39
+ type: 'void',
40
+ 'x-component': 'ActionBar',
41
+ 'x-component-props': {},
42
+ properties: {
43
+ submit: {
44
+ title: '{{ t("Submit") }}',
45
+ 'x-action': 'submit',
46
+ 'x-component': 'Action',
47
+ 'x-designer': 'Action.Designer',
48
+ 'x-component-props': {
49
+ type: 'primary',
50
+ htmlType: 'submit',
51
+ useProps: '{{ usePickActionProps }}'
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ };
62
+ return /*#__PURE__*/React.createElement(ActionInitializer, _objectSpread(_objectSpread({}, props), {}, {
63
+ schema: schema
64
+ }));
65
+ };
@@ -48,3 +48,4 @@ export * from './TableSelectorInitializer';
48
48
  export * from './UpdateActionInitializer';
49
49
  export * from './UpdateSubmitActionInitializer';
50
50
  export * from './ViewActionInitializer';
51
+ export * from './SelectActionInitializer';
@@ -48,4 +48,5 @@ export * from './TableCollectionFieldInitializer';
48
48
  export * from './TableSelectorInitializer';
49
49
  export * from './UpdateActionInitializer';
50
50
  export * from './UpdateSubmitActionInitializer';
51
- export * from './ViewActionInitializer';
51
+ export * from './ViewActionInitializer';
52
+ export * from './SelectActionInitializer';
@@ -263,12 +263,15 @@ export var useFormItemInitializerFields = function useFormItemInitializerFields(
263
263
  var _field$uiSchema3, _field$uiSchema4;
264
264
  var interfaceConfig = getInterface(field.interface);
265
265
  var targetCollection = getCollection(field.target);
266
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
266
+ // const component =
267
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
268
+ // ? 'TableField'
269
+ // : 'CollectionField';
267
270
  var schema = {
268
271
  type: 'string',
269
272
  name: field.name,
270
273
  'x-designer': 'FormItem.Designer',
271
- 'x-component': component,
274
+ 'x-component': 'CollectionField',
272
275
  'x-decorator': 'FormItem',
273
276
  'x-collection-field': "".concat(name, ".").concat(field.name),
274
277
  'x-component-props': {},
@@ -327,13 +330,16 @@ export var useFilterFormItemInitializerFields = function useFilterFormItemInitia
327
330
  var _field$uiSchema6;
328
331
  var interfaceConfig = getInterface(field.interface);
329
332
  var targetCollection = getCollection(field.target);
330
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
333
+ // const component =
334
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
335
+ // ? 'TableField'
336
+ // : 'CollectionField';
331
337
  var schema = {
332
338
  type: 'string',
333
339
  name: field.name,
334
340
  required: false,
335
341
  'x-designer': 'FormItem.FilterFormDesigner',
336
- 'x-component': component,
342
+ 'x-component': 'CollectionField',
337
343
  'x-decorator': 'FormItem',
338
344
  'x-collection-field': "".concat(name, ".").concat(field.name),
339
345
  'x-component-props': {}
@@ -518,13 +524,16 @@ export var useInheritsFormItemInitializerFields = function useInheritsFormItemIn
518
524
  var _field$uiSchema10, _field$uiSchema11, _field$uiSchema12;
519
525
  var interfaceConfig = getInterface(field.interface);
520
526
  var targetCollection = getCollection(field.target);
521
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
527
+ // const component =
528
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
529
+ // ? 'TableField'
530
+ // : 'CollectionField';
522
531
  var schema = {
523
532
  type: 'string',
524
533
  name: field.name,
525
534
  title: (field === null || field === void 0 ? void 0 : (_field$uiSchema10 = field.uiSchema) === null || _field$uiSchema10 === void 0 ? void 0 : _field$uiSchema10.title) || field.name,
526
535
  'x-designer': 'FormItem.Designer',
527
- 'x-component': component,
536
+ 'x-component': 'CollectionField',
528
537
  'x-decorator': 'FormItem',
529
538
  'x-collection-field': "".concat(name, ".").concat(field.name),
530
539
  'x-component-props': {},
@@ -578,14 +587,17 @@ export var useFilterInheritsFormItemInitializerFields = function useFilterInheri
578
587
  var _field$uiSchema13, _field$uiSchema14, _field$uiSchema15;
579
588
  var interfaceConfig = getInterface(field.interface);
580
589
  var targetCollection = getCollection(field.target);
581
- var component = field.interface === 'o2m' && (targetCollection === null || targetCollection === void 0 ? void 0 : targetCollection.template) !== 'file' && !snapshot ? 'TableField' : 'CollectionField';
590
+ // const component =
591
+ // field.interface === 'o2m' && targetCollection?.template !== 'file' && !snapshot
592
+ // ? 'TableField'
593
+ // : 'CollectionField';
582
594
  var schema = {
583
595
  type: 'string',
584
596
  name: field.name,
585
597
  title: (field === null || field === void 0 ? void 0 : (_field$uiSchema13 = field.uiSchema) === null || _field$uiSchema13 === void 0 ? void 0 : _field$uiSchema13.title) || field.name,
586
598
  required: false,
587
599
  'x-designer': 'FormItem.FilterFormDesigner',
588
- 'x-component': component,
600
+ 'x-component': 'CollectionField',
589
601
  'x-decorator': 'FormItem',
590
602
  'x-collection-field': "".concat(name, ".").concat(field.name),
591
603
  'x-component-props': {},
@@ -6,7 +6,7 @@ export function FilterDynamicComponent(props) {
6
6
  onChange = props.onChange,
7
7
  renderSchemaComponent = props.renderSchemaComponent,
8
8
  collectionName = props.collectionName;
9
- var scope = useVariableOptions(collectionName);
9
+ var scope = useVariableOptions(collectionName, ['o2m', 'm2m']);
10
10
  return /*#__PURE__*/React.createElement(Variable.Input, {
11
11
  value: value,
12
12
  onChange: onChange,
@@ -1,4 +1,4 @@
1
- export declare function useVariableOptions(collectionName: any): {
1
+ export declare function useVariableOptions(collectionName: any, excludes?: any): {
2
2
  label: any;
3
3
  value: any;
4
4
  key: any;
@@ -6,8 +6,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
6
6
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
7
  import { useCompile } from '../../schema-component';
8
8
  import { useCollectionManager } from '../../collection-manager';
9
- var supportsType = ['checkbox', 'number', 'percent', 'integer', 'input', 'textarea', 'email', 'phone', 'datetime', 'createdAt', 'updatedAt', 'radioGroup', 'checkboxGroup', 'select', 'multipleSelect', 'formula', 'oho', 'obo', 'm2o', 'o2m', 'm2m'];
9
+ var supportsType = ['id', 'checkbox', 'number', 'percent', 'integer', 'input', 'textarea', 'email', 'phone', 'datetime', 'createdAt', 'updatedAt', 'radioGroup', 'checkboxGroup', 'select', 'multipleSelect', 'formula', 'oho', 'obo', 'm2o', 'o2m', 'm2m'];
10
10
  var useVariableTypes = function useVariableTypes(currentCollection) {
11
+ var excludes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
11
12
  var _useCollectionManager = useCollectionManager(),
12
13
  getCollectionFields = _useCollectionManager.getCollectionFields,
13
14
  getInterface = _useCollectionManager.getInterface,
@@ -20,7 +21,9 @@ var useVariableTypes = function useVariableTypes(currentCollection) {
20
21
  options: function options() {
21
22
  var field2option = function field2option(field, depth) {
22
23
  var _field$uiSchema;
23
- if (!field.interface || !supportsType.includes(field.interface)) {
24
+ if (!field.interface || !supportsType.filter(function (v) {
25
+ return !excludes.includes(v);
26
+ }).includes(field.interface)) {
24
27
  return;
25
28
  }
26
29
  var fieldInterface = getInterface(field.interface);
@@ -76,9 +79,9 @@ var useVariableTypes = function useVariableTypes(currentCollection) {
76
79
  }]
77
80
  }];
78
81
  };
79
- export function useVariableOptions(collectionName) {
82
+ export function useVariableOptions(collectionName, excludes) {
80
83
  var compile = useCompile();
81
- var options = useVariableTypes(collectionName).map(function (item) {
84
+ var options = useVariableTypes(collectionName, excludes).map(function (item) {
82
85
  var options = typeof item.options === 'function' ? item.options() : item.options;
83
86
  return {
84
87
  label: compile(item.title),
@@ -50,6 +50,7 @@ import { useBlockTemplateContext } from '../schema-templates/BlockTemplate';
50
50
  import { FormDataTemplates } from './DataTemplates';
51
51
  import { FormLinkageRules } from './LinkageRules';
52
52
  import { useLinkageCollectionFieldOptions } from './LinkageRules/action-hooks';
53
+ import { EnableChildCollections } from './EnableChildCollections';
53
54
  var SchemaSettingsContext = /*#__PURE__*/createContext(null);
54
55
  export var useSchemaSettings = function useSchemaSettings() {
55
56
  return useContext(SchemaSettingsContext);
@@ -1200,7 +1201,7 @@ SchemaSettings.DataTemplates = function DataTemplates(props) {
1200
1201
  }
1201
1202
  });
1202
1203
  };
1203
- SchemaSettings.EnableChildCollections = function EnableChildCollections(props) {
1204
+ SchemaSettings.EnableChildCollections = function EnableChildCollectionsItem(props) {
1204
1205
  var collectionName = props.collectionName;
1205
1206
  var fieldSchema = useFieldSchema();
1206
1207
  var _useDesignable5 = useDesignable(),
@@ -1240,7 +1241,6 @@ SchemaSettings.EnableChildCollections = function EnableChildCollections(props) {
1240
1241
  }
1241
1242
  },
1242
1243
  onSubmit: function onSubmit(v) {
1243
- console.log(v);
1244
1244
  var enableChildren = [];
1245
1245
  var _iterator2 = _createForOfIteratorHelper(v.enableChildren.childrenCollections),
1246
1246
  _step2;
@@ -10,6 +10,7 @@ var _antd = require("antd");
10
10
  var _react2 = _interopRequireWildcard(require("react"));
11
11
  var _recordProvider = require("../record-provider");
12
12
  var _BlockProvider = require("./BlockProvider");
13
+ var _hooks = require("./hooks");
13
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
16
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -50,7 +51,18 @@ var InternalDetailsBlockProvider = function InternalDetailsBlockProvider(props)
50
51
  }, props.children));
51
52
  };
52
53
  var DetailsBlockProvider = function DetailsBlockProvider(props) {
53
- return /*#__PURE__*/_react2.default.createElement(_BlockProvider.BlockProvider, _objectSpread({}, props), /*#__PURE__*/_react2.default.createElement(InternalDetailsBlockProvider, _objectSpread({}, props)));
54
+ var params = _objectSpread({}, props.params);
55
+ var collection = props.collection;
56
+ var _useAssociationNames = (0, _hooks.useAssociationNames)(collection),
57
+ appends = _useAssociationNames.appends;
58
+ if (!Object.keys(params).includes('appends')) {
59
+ params['appends'] = appends;
60
+ }
61
+ return /*#__PURE__*/_react2.default.createElement(_BlockProvider.BlockProvider, _objectSpread(_objectSpread({}, props), {}, {
62
+ params: params
63
+ }), /*#__PURE__*/_react2.default.createElement(InternalDetailsBlockProvider, _objectSpread(_objectSpread({}, props), {}, {
64
+ params: params
65
+ })));
54
66
  };
55
67
  exports.DetailsBlockProvider = DetailsBlockProvider;
56
68
  var useDetailsBlockContext = function useDetailsBlockContext() {
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useIsEmptyRecord = exports.useFormBlockProps = exports.useFormBlockContext = exports.findFormBlock = exports.FormBlockProvider = exports.FormBlockContext = void 0;
7
7
  var _core = require("@formily/core");
8
8
  var _react = require("@formily/react");
9
- var _antd = require("antd");
10
- var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
9
+ var _lodash = require("lodash");
11
10
  var _react2 = _interopRequireWildcard(require("react"));
12
11
  var _collectionManager = require("../collection-manager");
13
12
  var _recordProvider = require("../record-provider");
14
13
  var _schemaComponent = require("../schema-component");
15
14
  var _Templates = require("../schema-component/antd/form-v2/Templates");
16
15
  var _BlockProvider = require("./BlockProvider");
16
+ var _hooks = require("./hooks");
17
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
19
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
21
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
21
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -28,7 +27,9 @@ exports.FormBlockContext = FormBlockContext;
28
27
  var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
29
28
  var _service$data;
30
29
  var action = props.action,
31
- readPretty = props.readPretty;
30
+ readPretty = props.readPretty,
31
+ params = props.params,
32
+ updateAssociationValues = props.updateAssociationValues;
32
33
  var field = (0, _react.useField)();
33
34
  var form = (0, _react2.useMemo)(function () {
34
35
  return (0, _core.createForm)({
@@ -40,21 +41,22 @@ var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
40
41
  service = _useBlockRequestConte.service;
41
42
  var formBlockRef = (0, _react2.useRef)();
42
43
  var record = (0, _recordProvider.useRecord)();
43
- if (service.loading) {
44
- return /*#__PURE__*/_react2.default.createElement(_antd.Spin, null);
45
- }
44
+ // if (service.loading) {
45
+ // return <Spin />;
46
+ // }
46
47
  return /*#__PURE__*/_react2.default.createElement(FormBlockContext.Provider, {
47
48
  value: {
49
+ params: params,
48
50
  action: action,
49
51
  form: form,
50
52
  field: field,
51
53
  service: service,
52
54
  resource: resource,
53
- updateAssociationValues: [],
55
+ updateAssociationValues: updateAssociationValues,
54
56
  formBlockRef: formBlockRef
55
57
  }
56
58
  }, readPretty ? /*#__PURE__*/_react2.default.createElement(_recordProvider.RecordProvider, {
57
- parent: (0, _isEmpty.default)(record === null || record === void 0 ? void 0 : record.__parent) ? record : record === null || record === void 0 ? void 0 : record.__parent,
59
+ parent: (0, _lodash.isEmpty)(record === null || record === void 0 ? void 0 : record.__parent) ? record : record === null || record === void 0 ? void 0 : record.__parent,
58
60
  record: service === null || service === void 0 ? void 0 : (_service$data = service.data) === null || _service$data === void 0 ? void 0 : _service$data.data
59
61
  }, /*#__PURE__*/_react2.default.createElement("div", {
60
62
  ref: formBlockRef
@@ -79,10 +81,17 @@ var FormBlockProvider = function FormBlockProvider(props) {
79
81
  var record = (0, _recordProvider.useRecord)();
80
82
  var collection = props.collection;
81
83
  var __collection = record.__collection;
84
+ var params = _objectSpread({}, props.params);
82
85
  var currentCollection = (0, _collectionManager.useCollection)();
83
86
  var _useDesignable = (0, _schemaComponent.useDesignable)(),
84
87
  designable = _useDesignable.designable;
85
88
  var isEmptyRecord = useIsEmptyRecord();
89
+ var _useAssociationNames = (0, _hooks.useAssociationNames)(collection),
90
+ appends = _useAssociationNames.appends,
91
+ updateAssociationValues = _useAssociationNames.updateAssociationValues;
92
+ if (!Object.keys(params).includes('appends')) {
93
+ params['appends'] = appends;
94
+ }
86
95
  var detailFlag = false;
87
96
  if (isEmptyRecord) {
88
97
  detailFlag = true;
@@ -92,8 +101,12 @@ var FormBlockProvider = function FormBlockProvider(props) {
92
101
  }
93
102
  var createFlag = currentCollection.name === ((collection === null || collection === void 0 ? void 0 : collection.name) || collection) && !isEmptyRecord || !currentCollection.name;
94
103
  return (detailFlag || createFlag) && /*#__PURE__*/_react2.default.createElement(_BlockProvider.BlockProvider, _objectSpread(_objectSpread({}, props), {}, {
95
- block: 'form'
96
- }), /*#__PURE__*/_react2.default.createElement(InternalFormBlockProvider, _objectSpread({}, props)));
104
+ block: 'form',
105
+ params: params
106
+ }), /*#__PURE__*/_react2.default.createElement(InternalFormBlockProvider, _objectSpread(_objectSpread({}, props), {}, {
107
+ params: params,
108
+ updateAssociationValues: updateAssociationValues
109
+ })));
97
110
  };
98
111
  exports.FormBlockProvider = FormBlockProvider;
99
112
  var useFormBlockContext = function useFormBlockContext() {
@@ -101,7 +114,7 @@ var useFormBlockContext = function useFormBlockContext() {
101
114
  };
102
115
  exports.useFormBlockContext = useFormBlockContext;
103
116
  var useFormBlockProps = function useFormBlockProps() {
104
- var _fieldSchema$xCompon;
117
+ var _fieldSchema$xCompon, _ctx$service3;
105
118
  var ctx = useFormBlockContext();
106
119
  var record = (0, _recordProvider.useRecord)();
107
120
  var _useActionContext = (0, _schemaComponent.useActionContext)(),
@@ -117,9 +130,12 @@ var useFormBlockProps = function useFormBlockProps() {
117
130
  }
118
131
  });
119
132
  (0, _react2.useEffect)(function () {
120
- var _ctx$form2, _ctx$service, _ctx$service$data;
121
- (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setInitialValues((_ctx$service = ctx.service) === null || _ctx$service === void 0 ? void 0 : (_ctx$service$data = _ctx$service.data) === null || _ctx$service$data === void 0 ? void 0 : _ctx$service$data.data);
122
- }, []);
133
+ var _ctx$service;
134
+ if (!(ctx === null || ctx === void 0 ? void 0 : (_ctx$service = ctx.service) === null || _ctx$service === void 0 ? void 0 : _ctx$service.loading)) {
135
+ var _ctx$form2, _ctx$service2, _ctx$service2$data;
136
+ (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setInitialValues((_ctx$service2 = ctx.service) === null || _ctx$service2 === void 0 ? void 0 : (_ctx$service2$data = _ctx$service2.data) === null || _ctx$service2$data === void 0 ? void 0 : _ctx$service2$data.data);
137
+ }
138
+ }, [ctx === null || ctx === void 0 ? void 0 : (_ctx$service3 = ctx.service) === null || _ctx$service3 === void 0 ? void 0 : _ctx$service3.loading]);
123
139
  return {
124
140
  form: ctx.form
125
141
  };
@@ -5,6 +5,9 @@ export declare const usePickActionProps: () => {
5
5
  export declare const useCreateActionProps: () => {
6
6
  onClick(): Promise<void>;
7
7
  };
8
+ export declare const useAssociationCreateActionProps: () => {
9
+ onClick(): Promise<void>;
10
+ };
8
11
  export interface FilterTarget {
9
12
  targets?: {
10
13
  /** field uid */
@@ -40,6 +43,9 @@ export declare const useUpdateActionProps: () => {
40
43
  export declare const useDestroyActionProps: () => {
41
44
  onClick(): Promise<void>;
42
45
  };
46
+ export declare const useRemoveActionProps: (associationName: any) => {
47
+ onClick(value: any): Promise<void>;
48
+ };
43
49
  export declare const useDetailPrintActionProps: () => {
44
50
  onClick(): Promise<void>;
45
51
  };
@@ -80,3 +86,7 @@ export declare const useAssociationFilterBlockProps: () => {
80
86
  valueKey: any;
81
87
  labelKey: any;
82
88
  };
89
+ export declare const useAssociationNames: (collection: any) => {
90
+ appends: any[];
91
+ updateAssociationValues: any[];
92
+ };