@tachybase/client 0.23.48 → 1.0.6

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 (215) hide show
  1. package/es/api-client/APIClient.d.ts +5 -2
  2. package/es/api-client/APIClient.mjs +93 -49
  3. package/es/api-client/hooks/useRequest.d.ts +2 -0
  4. package/es/application/Application.d.ts +6 -0
  5. package/es/application/Application.mjs +19 -0
  6. package/es/application/CustomRouterContextProvider.d.ts +54 -0
  7. package/es/application/CustomRouterContextProvider.mjs +209 -0
  8. package/es/application/RouterManager.d.ts +8 -3
  9. package/es/application/RouterManager.mjs +48 -15
  10. package/es/application/hooks/index.d.ts +1 -0
  11. package/es/application/hooks/index.mjs +1 -0
  12. package/es/application/hooks/useGlobalVariable.d.ts +1 -0
  13. package/es/application/hooks/useGlobalVariable.mjs +18 -0
  14. package/es/application/schema-initializer/context/index.d.ts +1 -1
  15. package/es/application/schema-settings/hooks/index.d.ts +1 -1
  16. package/es/application/schema-settings/hooks/index.mjs +6 -8
  17. package/es/block-provider/hooks/index.d.ts +2 -0
  18. package/es/block-provider/hooks/index.mjs +29 -22
  19. package/es/built-in/context-menu/ContextMenu.provider.mjs +6 -6
  20. package/es/built-in/context-menu/ContextMenuItemsProps.d.ts +4 -4
  21. package/es/built-in/context-menu/ContextMenuItemsProps.mjs +6 -6
  22. package/es/built-in/context-menu/index.mjs +1 -1
  23. package/es/built-in/context-menu/useContextMenu.d.ts +2 -2
  24. package/es/built-in/index.mjs +8 -0
  25. package/es/built-in/locale/LocalePlugin.mjs +5 -1
  26. package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
  27. package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
  28. package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
  29. package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
  30. package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
  31. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
  32. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
  33. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
  34. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
  35. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
  36. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
  37. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
  38. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
  39. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
  40. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
  41. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
  42. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
  43. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
  44. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
  45. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
  46. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
  47. package/es/collection-manager/collectionPlugin.mjs +3 -1
  48. package/es/collection-manager/templates/import.mjs +1 -1
  49. package/es/collection-manager/templates/sql.d.ts +1 -1
  50. package/es/collection-manager/templates/view.d.ts +1 -1
  51. package/es/collection-manager/templates/xlsx.d.ts +11 -0
  52. package/es/collection-manager/templates/xlsx.mjs +19 -0
  53. package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
  54. package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +18 -0
  55. package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.d.ts +8 -1
  56. package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +20 -0
  57. package/es/data-source/commonsSettingsItem/fieldComponent.mjs +3 -1
  58. package/es/data-source/data-source/DataSource.d.ts +1 -1
  59. package/es/filter-provider/utils.mjs +6 -0
  60. package/es/i18n/i18n.mjs +7 -12
  61. package/es/modules/actions/delete/deleteActionSettings.mjs +10 -0
  62. package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +1 -1
  63. package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +9 -4
  64. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +6 -4
  65. package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +4 -0
  66. package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +44 -0
  67. package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +4 -0
  68. package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +9 -0
  69. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
  70. package/es/modules/fields/component/SubTable/secondLevelSelect.d.ts +11 -0
  71. package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +102 -0
  72. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +79 -41
  73. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +103 -100
  74. package/es/powered-by/index.mjs +4 -7
  75. package/es/schema-component/antd/action/Action.Designer.mjs +43 -5
  76. package/es/schema-component/antd/action/Action.Modal.mjs +19 -31
  77. package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
  78. package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
  79. package/es/schema-component/antd/action/Action.mjs +1 -3
  80. package/es/schema-component/antd/action/utils.d.ts +1 -1
  81. package/es/schema-component/antd/action/utils.mjs +70 -70
  82. package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
  83. package/es/schema-component/antd/checkbox/Checkbox.mjs +9 -2
  84. package/es/schema-component/antd/index.d.ts +1 -0
  85. package/es/schema-component/antd/index.mjs +1 -0
  86. package/es/schema-component/antd/media-card/MediaCard.d.ts +11 -0
  87. package/es/schema-component/antd/media-card/MediaCard.mjs +35 -0
  88. package/es/schema-component/antd/media-card/index.d.ts +1 -0
  89. package/es/schema-component/antd/media-card/index.mjs +1 -0
  90. package/es/schema-component/antd/media-card/style.d.ts +3 -0
  91. package/es/schema-component/antd/media-card/style.mjs +25 -0
  92. package/es/schema-component/antd/page/Page.d.ts +1 -5
  93. package/es/schema-component/antd/page/Page.mjs +235 -144
  94. package/es/schema-component/antd/page/Page.style.d.ts +5 -0
  95. package/es/schema-component/antd/page/Page.style.mjs +45 -0
  96. package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
  97. package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
  98. package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
  99. package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
  100. package/es/schema-component/antd/page/style.d.ts +1 -1
  101. package/es/schema-component/antd/page/style.mjs +3 -13
  102. package/es/schema-component/antd/password/Password.d.ts +1 -1
  103. package/es/schema-component/antd/password/utils.d.ts +1 -1
  104. package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
  105. package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
  106. package/es/schema-component/antd/variable/TextArea.mjs +1 -1
  107. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
  108. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
  109. package/es/schema-component/antd/variable/index.d.ts +1 -0
  110. package/es/schema-component/antd/variable/index.mjs +3 -0
  111. package/es/schema-component/common/dnd-context/index.mjs +1 -7
  112. package/es/schema-component/common/sortable-item/DragHandlePageTab.d.ts +1 -0
  113. package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +71 -0
  114. package/es/schema-component/common/sortable-item/DragHandlePageTab.style.d.ts +3 -0
  115. package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +25 -0
  116. package/es/schema-items/GeneralSettings.mjs +5 -0
  117. package/es/schema-settings/EditCustomDefaultValue.mjs +1 -1
  118. package/es/schema-settings/SchemaSettings.mjs +1 -1
  119. package/es/schema-settings/SchemaSettingsDefaultValue.mjs +2 -0
  120. package/es/schema-settings/utils/createModalSettingsItem.d.ts +26 -0
  121. package/es/schema-settings/utils/createModalSettingsItem.mjs +46 -0
  122. package/es/schema-settings/utils/createSelectSettingsItem.d.ts +25 -0
  123. package/es/schema-settings/utils/createSelectSettingsItem.mjs +40 -0
  124. package/es/schema-settings/utils/createSwitchSettingsItem.d.ts +21 -0
  125. package/es/schema-settings/utils/createSwitchSettingsItem.mjs +38 -0
  126. package/es/schema-settings/utils/createTextSettingsItem.d.ts +9 -0
  127. package/es/schema-settings/utils/createTextSettingsItem.mjs +21 -0
  128. package/es/schema-settings/utils/index.d.ts +4 -0
  129. package/es/schema-settings/utils/index.mjs +4 -0
  130. package/es/schema-settings/utils/util.d.ts +12 -0
  131. package/es/schema-settings/utils/util.mjs +24 -0
  132. package/es/user/CurrentUserProvider.mjs +6 -3
  133. package/lib/api-client/APIClient.js +93 -49
  134. package/lib/application/Application.js +19 -0
  135. package/lib/application/CustomRouterContextProvider.js +276 -0
  136. package/lib/application/RouterManager.js +49 -15
  137. package/lib/application/hooks/index.js +9 -0
  138. package/lib/application/hooks/useGlobalVariable.js +52 -0
  139. package/lib/application/schema-initializer/hooks/index.js +2 -2
  140. package/lib/application/schema-settings/hooks/index.js +6 -8
  141. package/lib/block-provider/hooks/index.js +80 -59
  142. package/lib/built-in/context-menu/ContextMenu.provider.js +6 -6
  143. package/lib/built-in/context-menu/ContextMenuItemsProps.js +6 -6
  144. package/lib/built-in/context-menu/index.js +1 -1
  145. package/lib/built-in/index.js +8 -0
  146. package/lib/built-in/locale/LocalePlugin.js +5 -1
  147. package/lib/built-in/page-style/PageStyle.provider.js +2 -2
  148. package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
  149. package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
  150. package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
  151. package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
  152. package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
  153. package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
  154. package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
  155. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
  156. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
  157. package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
  158. package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
  159. package/lib/collection-manager/collectionPlugin.js +3 -1
  160. package/lib/collection-manager/templates/import.js +1 -1
  161. package/lib/collection-manager/templates/xlsx.js +53 -0
  162. package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +18 -0
  163. package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +20 -0
  164. package/lib/data-source/commonsSettingsItem/fieldComponent.js +3 -1
  165. package/lib/filter-provider/utils.js +6 -0
  166. package/lib/i18n/i18n.js +7 -12
  167. package/lib/locale/en_US.js +1 -0
  168. package/lib/locale/zh-CN.js +14 -2
  169. package/lib/modules/actions/delete/deleteActionSettings.js +10 -0
  170. package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +1 -1
  171. package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +9 -4
  172. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +6 -4
  173. package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +4 -0
  174. package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +44 -0
  175. package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +4 -0
  176. package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +9 -0
  177. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
  178. package/lib/modules/fields/component/SubTable/secondLevelSelect.js +136 -0
  179. package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +104 -103
  180. package/lib/powered-by/index.js +4 -7
  181. package/lib/schema-component/antd/action/Action.Designer.js +43 -5
  182. package/lib/schema-component/antd/action/Action.Modal.js +19 -31
  183. package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
  184. package/lib/schema-component/antd/action/Action.js +1 -3
  185. package/lib/schema-component/antd/action/utils.js +70 -70
  186. package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
  187. package/lib/schema-component/antd/checkbox/Checkbox.js +9 -2
  188. package/lib/schema-component/antd/index.js +18 -4
  189. package/lib/schema-component/antd/media-card/MediaCard.js +69 -0
  190. package/lib/schema-component/antd/media-card/index.js +65 -0
  191. package/lib/schema-component/antd/media-card/style.js +59 -0
  192. package/lib/schema-component/antd/page/Page.js +235 -144
  193. package/lib/schema-component/antd/page/Page.style.js +79 -0
  194. package/lib/schema-component/antd/page/PageDesigner.js +62 -0
  195. package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
  196. package/lib/schema-component/antd/page/style.js +3 -13
  197. package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
  198. package/lib/schema-component/antd/variable/TextArea.js +1 -1
  199. package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
  200. package/lib/schema-component/antd/variable/index.js +13 -1
  201. package/lib/schema-component/common/dnd-context/index.js +1 -7
  202. package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +105 -0
  203. package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +59 -0
  204. package/lib/schema-items/GeneralSettings.js +5 -0
  205. package/lib/schema-settings/EditCustomDefaultValue.js +1 -1
  206. package/lib/schema-settings/SchemaSettings.js +1 -1
  207. package/lib/schema-settings/SchemaSettingsDefaultValue.js +2 -0
  208. package/lib/schema-settings/utils/createModalSettingsItem.js +94 -0
  209. package/lib/schema-settings/utils/createSelectSettingsItem.js +88 -0
  210. package/lib/schema-settings/utils/createSwitchSettingsItem.js +86 -0
  211. package/lib/schema-settings/utils/createTextSettingsItem.js +55 -0
  212. package/lib/schema-settings/utils/index.js +92 -0
  213. package/lib/schema-settings/utils/util.js +74 -0
  214. package/lib/user/CurrentUserProvider.js +6 -3
  215. package/package.json +7 -7
@@ -56,9 +56,7 @@ const external_schema_component_index_js_namespaceObject = require("../../../../
56
56
  const FormItem_Settings_js_namespaceObject = require("../../../../schema-component/antd/form-item/FormItem.Settings.js");
57
57
  const utils_js_namespaceObject = require("../../../../schema-component/antd/form-v2/utils.js");
58
58
  const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
59
- const useIsAllowToSetDefaultValue_js_namespaceObject = require("../../../../schema-settings/hooks/useIsAllowToSetDefaultValue.js");
60
59
  const type_js_namespaceObject = require("../../../../schema-settings/LinkageRules/type.js");
61
- const SchemaSettingsDefaultValue_js_namespaceObject = require("../../../../schema-settings/SchemaSettingsDefaultValue.js");
62
60
  const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettings({
63
61
  name: 'fieldSettings:FormItem',
64
62
  items: [
@@ -261,10 +259,10 @@ const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettin
261
259
  {
262
260
  name: 'setDefaultValue',
263
261
  useVisible () {
264
- const { isAllowToSetDefaultValue } = (0, useIsAllowToSetDefaultValue_js_namespaceObject.useIsAllowToSetDefaultValue)();
262
+ const { isAllowToSetDefaultValue } = (0, external_schema_settings_index_js_namespaceObject.useIsAllowToSetDefaultValue)();
265
263
  return isAllowToSetDefaultValue();
266
264
  },
267
- Component: SchemaSettingsDefaultValue_js_namespaceObject.SchemaSettingsDefaultValue
265
+ Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
268
266
  },
269
267
  {
270
268
  name: 'layoutDirection',
@@ -522,6 +520,13 @@ const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettin
522
520
  const validateSchema = (0, external_schema_component_index_js_namespaceObject.useValidateSchema)();
523
521
  return form && !isFormReadPretty && validateSchema;
524
522
  }
523
+ },
524
+ {
525
+ ...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
526
+ },
527
+ {
528
+ name: 'editDefaultValue',
529
+ Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
525
530
  }
526
531
  ];
527
532
  }
@@ -51,11 +51,11 @@ const FilterProvider_js_namespaceObject = require("../../../../../filter-provide
51
51
  const utils_js_namespaceObject = require("../../../../../filter-provider/utils.js");
52
52
  const external_schema_component_index_js_namespaceObject = require("../../../../../schema-component/index.js");
53
53
  const useTableBlockProps = ()=>{
54
- var _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service, _ctx_service1, _ctx_field_data, _ctx_field, _ctx_service2, _ctx_service3, _fieldSchema_xcomponentprops;
54
+ var _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _fieldSchema_parent_xdecoratorprops1, _fieldSchema_parent1, _ctx_service, _ctx_service1, _ctx_field_data, _ctx_field, _ctx_service2, _ctx_service3, _fieldSchema_xcomponentprops;
55
55
  const field = (0, schema_namespaceObject.useField)();
56
56
  const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
57
57
  const ctx = (0, TableBlockProvider_js_namespaceObject.useTableBlockContext)();
58
- const globalSort = null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : _fieldSchema_parent_xdecoratorprops['dragSortBy'];
58
+ const globalSort = (null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : _fieldSchema_parent_xdecoratorprops['dragSort']) === true ? null === (_fieldSchema_parent1 = fieldSchema.parent) || void 0 === _fieldSchema_parent1 ? void 0 : null === (_fieldSchema_parent_xdecoratorprops1 = _fieldSchema_parent1['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops1 ? void 0 : _fieldSchema_parent_xdecoratorprops1['dragSortBy'] : void 0;
59
59
  const { getDataBlocks } = (0, FilterProvider_js_namespaceObject.useFilterBlock)();
60
60
  const isLoading = null == ctx ? void 0 : null === (_ctx_service = ctx.service) || void 0 === _ctx_service ? void 0 : _ctx_service.loading;
61
61
  null == ctx || null === (_ctx_service1 = ctx.service) || void 0 === _ctx_service1 || _ctx_service1.params;
@@ -107,7 +107,7 @@ const useTableBlockProps = ()=>{
107
107
  },
108
108
  onChange (param, filters, sorter) {
109
109
  let { current, pageSize } = param;
110
- var _fieldSchema_parent_xdecoratorprops_params, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service_params;
110
+ var _fieldSchema_parent_xdecoratorprops_params, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service_params_;
111
111
  const parentSort = null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : null === (_fieldSchema_parent_xdecoratorprops_params = _fieldSchema_parent_xdecoratorprops['params']) || void 0 === _fieldSchema_parent_xdecoratorprops_params ? void 0 : _fieldSchema_parent_xdecoratorprops_params.sort;
112
112
  const sortParams = ctx.params.sort || [];
113
113
  const parentSortReal = [
@@ -122,10 +122,12 @@ const useTableBlockProps = ()=>{
122
122
  "-".concat(sorter.field)
123
123
  ] : parentSortReal;
124
124
  ctx.service.run({
125
- ...null === (_ctx_service_params = ctx.service.params) || void 0 === _ctx_service_params ? void 0 : _ctx_service_params[0],
125
+ ...ctx.service.params[0],
126
126
  page: current,
127
127
  pageSize,
128
128
  sort
129
+ }, {
130
+ filters: null === (_ctx_service_params_ = ctx.service.params[1]) || void 0 === _ctx_service_params_ ? void 0 : _ctx_service_params_.filters
129
131
  });
130
132
  },
131
133
  onClickRow (record, setSelectedRow, selectedRow) {
@@ -121,6 +121,10 @@ const tableBlockSettings = new SchemaSettings_js_namespaceObject.SchemaSettings(
121
121
  const sortBy = null == data ? void 0 : null === (_data_data = data.data) || void 0 === _data_data ? void 0 : null === (_data_data_ = _data_data[0]) || void 0 === _data_data_ ? void 0 : _data_data_.sortBy;
122
122
  fieldSchema['x-decorator-props'].dragSortBy = sortBy;
123
123
  }
124
+ if (!dragSort) {
125
+ fieldSchema['x-decorator-props'].dragSortBy = null;
126
+ field.decoratorProps.dragSortBy = null;
127
+ }
124
128
  field.decoratorProps.dragSort = dragSort;
125
129
  fieldSchema['x-decorator-props'].dragSort = dragSort;
126
130
  service.run({
@@ -138,6 +138,50 @@ const tableColumnSettings = new SchemaSettings_js_namespaceObject.SchemaSettings
138
138
  };
139
139
  }
140
140
  },
141
+ {
142
+ name: 'columnAlign',
143
+ type: 'select',
144
+ useComponentProps () {
145
+ var _fieldSchema_xcomponentprops;
146
+ const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
147
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
148
+ const field = (0, schema_namespaceObject.useField)();
149
+ const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
150
+ return {
151
+ key: 'align',
152
+ title: t('Align'),
153
+ options: [
154
+ {
155
+ label: t('Left'),
156
+ value: 'left'
157
+ },
158
+ {
159
+ label: t('Center'),
160
+ value: 'center'
161
+ },
162
+ {
163
+ label: t('Right'),
164
+ value: 'right'
165
+ }
166
+ ],
167
+ value: (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops.align) || 'left',
168
+ onChange: (align)=>{
169
+ const props = fieldSchema['x-component-props'] || {};
170
+ props['align'] = align;
171
+ const schema = {
172
+ ['x-uid']: fieldSchema['x-uid']
173
+ };
174
+ schema['x-component-props'] = props;
175
+ fieldSchema['x-component-props'] = props;
176
+ field.componentProps.align = align;
177
+ dn.emit('patch', {
178
+ schema
179
+ });
180
+ dn.refresh();
181
+ }
182
+ };
183
+ }
184
+ },
141
185
  {
142
186
  name: 'sortable',
143
187
  type: 'switch',
@@ -48,6 +48,7 @@ const external_react_i18next_namespaceObject = require("react-i18next");
48
48
  const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
49
49
  const index_js_namespaceObject = require("../../../../block-provider/index.js");
50
50
  const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
51
+ const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
51
52
  const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
52
53
  const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
53
54
  const SchemaSettingsDataScope_js_namespaceObject = require("../../../../schema-settings/SchemaSettingsDataScope.js");
@@ -227,6 +228,9 @@ const filterCollapseItemFieldSettings = new SchemaSettings_js_namespaceObject.Sc
227
228
  onChange: onTitleFieldChange
228
229
  };
229
230
  }
231
+ },
232
+ {
233
+ ...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
230
234
  }
231
235
  ];
232
236
  }
@@ -50,7 +50,9 @@ const index_js_namespaceObject = require("../../../../application/index.js");
50
50
  const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
51
51
  const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
52
52
  const useFieldComponentName_js_namespaceObject = require("../../../../common/useFieldComponentName.js");
53
+ const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
53
54
  const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
55
+ const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
54
56
  const filterFormItemFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
55
57
  name: 'fieldSettings:FilterFormItem',
56
58
  items: [
@@ -352,6 +354,13 @@ const filterFormItemFieldSettings = new SchemaSettings_js_namespaceObject.Schema
352
354
  {
353
355
  name: 'operator',
354
356
  Component: external_schema_component_index_js_namespaceObject.EditOperator
357
+ },
358
+ {
359
+ ...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
360
+ },
361
+ {
362
+ name: 'editDefaultValue',
363
+ Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
355
364
  }
356
365
  ];
357
366
  }
@@ -54,10 +54,6 @@ const radioComponentFieldSettings = new SchemaSettings_js_namespaceObject.Schema
54
54
  {
55
55
  label: t('Radio group'),
56
56
  value: 'Radio group'
57
- },
58
- {
59
- label: t('Select'),
60
- value: 'Select'
61
57
  }
62
58
  ];
63
59
  const { dn } = (0, index_js_namespaceObject.useDesignable)();
@@ -0,0 +1,136 @@
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
+ SecondLevelSelect: ()=>SecondLevelSelect
30
+ });
31
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const external_react_namespaceObject = require("react");
33
+ const schema_namespaceObject = require("@tachybase/schema");
34
+ const icons_namespaceObject = require("@ant-design/icons");
35
+ const external_antd_namespaceObject = require("antd");
36
+ const external_react_i18next_namespaceObject = require("react-i18next");
37
+ const index_js_namespaceObject = require("../../../../data-source/index.js");
38
+ const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
39
+ const ReadPretty_js_namespaceObject = require("../../../../schema-component/antd/select/ReadPretty.js");
40
+ const filterOption = (input, option)=>{
41
+ var _option_label;
42
+ return (null !== (_option_label = null == option ? void 0 : option.label) && void 0 !== _option_label ? _option_label : '').toLowerCase().includes((input || '').toLowerCase());
43
+ };
44
+ const SecondLevelSelect = (0, schema_namespaceObject.connect)((props)=>{
45
+ const { objectValue, loading, value, rawOptions, defaultValue, firstLevelValue, collectionField, ...others } = props;
46
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
47
+ const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
48
+ const cm = (0, index_js_namespaceObject.useCollectionManager)();
49
+ let mode = props.multiple ? 'multiple' : props.mode;
50
+ if (mode && ![
51
+ 'multiple',
52
+ 'tags'
53
+ ].includes(mode)) mode = void 0;
54
+ const toValue = (v)=>{
55
+ if ([
56
+ 'tags',
57
+ 'multiple'
58
+ ].includes(props.mode) || props.multiple) {
59
+ if (v) return (0, schema_namespaceObject.toArr)(v);
60
+ return;
61
+ }
62
+ return v;
63
+ };
64
+ const Parentoptions = cm.getCollectionFields("".concat(collectionField, ".").concat(firstLevelValue));
65
+ const fieldParentTabsOptions = Parentoptions.map((item)=>{
66
+ if ('m2o' === item.interface) return {
67
+ ...item,
68
+ label: compile(item.uiSchema.title),
69
+ value: item.name
70
+ };
71
+ }).filter(Boolean);
72
+ fieldParentTabsOptions.unshift({
73
+ label: t('none'),
74
+ value: 'none'
75
+ });
76
+ const matchedOption = fieldParentTabsOptions.find((option)=>option.value === value);
77
+ const newValue = matchedOption ? value : 'none';
78
+ (0, external_react_namespaceObject.useEffect)(()=>{
79
+ if (!matchedOption) {
80
+ var _props_onChange;
81
+ null === (_props_onChange = props.onChange) || void 0 === _props_onChange || _props_onChange.call(props, 'none');
82
+ }
83
+ }, [
84
+ value,
85
+ fieldParentTabsOptions
86
+ ]);
87
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Select, {
88
+ role: "button",
89
+ "data-testid": "select-".concat(mode || 'single'),
90
+ showSearch: true,
91
+ filterOption: filterOption,
92
+ allowClear: {
93
+ clearIcon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseCircleFilled, {
94
+ role: "button",
95
+ "aria-label": "icon-close-select"
96
+ })
97
+ },
98
+ popupMatchSelectWidth: false,
99
+ notFoundContent: loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Empty, {
100
+ image: external_antd_namespaceObject.Empty.PRESENTED_IMAGE_SIMPLE
101
+ }),
102
+ value: toValue(newValue),
103
+ defaultValue: toValue(defaultValue),
104
+ tagRender: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tag, {
105
+ role: "button",
106
+ "aria-label": props.label,
107
+ closeIcon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseOutlined, {
108
+ role: "button",
109
+ "aria-label": "icon-close-tag"
110
+ }),
111
+ ...props,
112
+ children: props.label
113
+ }),
114
+ options: fieldParentTabsOptions,
115
+ ...others,
116
+ onChange: (changed)=>{
117
+ var _props_onChange;
118
+ null === (_props_onChange = props.onChange) || void 0 === _props_onChange || _props_onChange.call(props, void 0 === changed ? null : changed);
119
+ },
120
+ mode: mode
121
+ });
122
+ }, (0, schema_namespaceObject.mapProps)({
123
+ dataSource: 'options'
124
+ }, (props, field)=>({
125
+ ...props,
126
+ fieldNames: {
127
+ ...external_schema_component_index_js_namespaceObject.defaultFieldNames,
128
+ ...props.fieldNames
129
+ },
130
+ suffixIcon: (null == field ? void 0 : field['loading']) || (null == field ? void 0 : field['validating']) ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.LoadingOutlined, {}) : props.suffixIcon
131
+ })), (0, schema_namespaceObject.mapReadPretty)(ReadPretty_js_namespaceObject.ReadPretty));
132
+ var __webpack_export_target__ = exports;
133
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
134
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
135
+ value: true
136
+ });
@@ -26,13 +26,12 @@ var __webpack_require__ = {};
26
26
  var __webpack_exports__ = {};
27
27
  __webpack_require__.r(__webpack_exports__);
28
28
  __webpack_require__.d(__webpack_exports__, {
29
- setQuickAddTabs: ()=>setQuickAddTabs,
30
29
  subTablePopoverComponentFieldSettings: ()=>subTablePopoverComponentFieldSettings,
31
30
  allowAddNewData: ()=>allowAddNewData,
32
- isQuickAddTabs: ()=>isQuickAddTabs,
33
- setDefaultSortingRules: ()=>setDefaultSortingRules,
34
- setQuickAddParentTabs: ()=>setQuickAddParentTabs
31
+ clickToSelect: ()=>clickToSelect,
32
+ setDefaultSortingRules: ()=>setDefaultSortingRules
35
33
  });
34
+ const external_react_namespaceObject = require("react");
36
35
  const components_namespaceObject = require("@tachybase/components");
37
36
  const schema_namespaceObject = require("@tachybase/schema");
38
37
  const external_react_i18next_namespaceObject = require("react-i18next");
@@ -43,6 +42,7 @@ const external_data_source_index_js_namespaceObject = require("../../../../data-
43
42
  const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
44
43
  const util_js_namespaceObject = require("../../../../schema-component/antd/association-field/util.js");
45
44
  const form_item_index_js_namespaceObject = require("../../../../schema-component/antd/form-item/index.js");
45
+ const external_secondLevelSelect_js_namespaceObject = require("./secondLevelSelect.js");
46
46
  const fieldComponent = {
47
47
  name: 'fieldComponent',
48
48
  type: 'select',
@@ -268,51 +268,24 @@ const allowAddNewData = {
268
268
  };
269
269
  }
270
270
  };
271
- const isQuickAddTabs = {
272
- name: 'isquickaddtabs',
273
- type: 'switch',
271
+ const clickToSelect = {
272
+ name: 'clicktoselect',
273
+ type: 'modal',
274
274
  useVisible () {
275
275
  const readPretty = (0, form_item_index_js_namespaceObject.useIsFieldReadPretty)();
276
276
  const isAssociationField = (0, form_item_index_js_namespaceObject.useIsAssociationField)();
277
277
  return !readPretty && isAssociationField;
278
278
  },
279
279
  useComponentProps () {
280
- var _fieldSchema_xcomponentprops;
280
+ var _fieldSchema_xcomponentprops_quickAddField, _fieldSchema_xcomponentprops_quickAddParentCollection, _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops1;
281
281
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
282
282
  const field = (0, schema_namespaceObject.useField)();
283
283
  const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
284
284
  const { dn, refresh } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
285
- return {
286
- title: t('Is Quick Add Tabs'),
287
- checked: (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops.isQuickAdd) || false,
288
- onChange (value) {
289
- const schema = {
290
- ['x-uid']: fieldSchema['x-uid']
291
- };
292
- field.componentProps['isQuickAdd'] = value;
293
- fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
294
- fieldSchema['x-component-props']['isQuickAdd'] = value;
295
- schema['x-component-props'] = fieldSchema['x-component-props'];
296
- dn.emit('patch', {
297
- schema
298
- });
299
- refresh();
300
- }
301
- };
302
- }
303
- };
304
- const setQuickAddTabs = {
305
- name: 'setquickaddtabs',
306
- type: 'select',
307
- useComponentProps () {
308
- const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
309
- const field = (0, schema_namespaceObject.useField)();
310
285
  const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
311
- const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
312
286
  const cm = (0, external_data_source_index_js_namespaceObject.useCollectionManager)();
287
+ const [firstLevelValue, setFirstLevelValue] = (0, external_react_namespaceObject.useState)((null === (_fieldSchema_xcomponentprops_quickAddField = fieldSchema['x-component-props']['quickAddField']) || void 0 === _fieldSchema_xcomponentprops_quickAddField ? void 0 : _fieldSchema_xcomponentprops_quickAddField.value) || 'none');
313
288
  const options = cm.getCollection(fieldSchema['x-collection-field']);
314
- const defVal = fieldSchema['x-component-props']['quickAddField'] || 'none';
315
- const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
316
289
  const isAddNewForm = (0, external_schema_component_index_js_namespaceObject.useIsAddNewForm)();
317
290
  const fieldTabsOptions = options.fields.map((item)=>{
318
291
  if ('m2o' === item.interface || 'select' === item.interface) {
@@ -328,84 +301,117 @@ const setQuickAddTabs = {
328
301
  label: 'none',
329
302
  value: 'none'
330
303
  });
331
- return {
332
- title: t('Set Quick Add Tabs'),
333
- options: fieldTabsOptions,
334
- value: defVal,
335
- onChange (mode) {
336
- const schema = {
337
- ['x-uid']: fieldSchema['x-uid']
338
- };
339
- fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
340
- fieldSchema['x-component-props']['quickAddField'] = {
341
- fieldInterface: fieldTabsOptions.find((item)=>item.value === mode)['interface'] || 'none',
342
- value: mode
343
- };
344
- schema['x-component-props'] = fieldSchema['x-component-props'];
345
- field.componentProps = field.componentProps || {};
346
- field.componentProps['quickAddField'] = fieldSchema['x-component-props']['quickAddField'];
347
- if ((0, util_js_namespaceObject.isSubMode)(fieldSchema) && isAddNewForm) {
348
- schema.default = null;
349
- fieldSchema.default = null;
350
- field.setInitialValue(null);
351
- field.setValue(null);
352
- }
353
- dn.emit('patch', {
354
- schema
355
- });
356
- dn.refresh();
357
- }
358
- };
359
- },
360
- useVisible () {
361
- const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
362
- return fieldSchema['x-component-props']['isQuickAdd'];
363
- }
364
- };
365
- const setQuickAddParentTabs = {
366
- name: 'setquickaddparenttabs',
367
- type: 'select',
368
- useComponentProps () {
369
- var _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops_quickAddParentCollection, _fieldSchema_xcomponentprops1;
370
- const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
371
- const field = (0, schema_namespaceObject.useField)();
372
- const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
373
- const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
374
- const cm = (0, external_data_source_index_js_namespaceObject.useCollectionManager)();
375
- const { value: quickField } = (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops['quickAddField']) || {};
376
- const options = cm.getCollectionFields("".concat(fieldSchema['x-collection-field'], ".").concat(quickField));
377
- const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
378
- const isAddNewForm = (0, external_schema_component_index_js_namespaceObject.useIsAddNewForm)();
379
- const fieldTabsOptions = options.map((item)=>{
304
+ const Parentoptions = cm.getCollectionFields("".concat(fieldSchema['x-collection-field'], ".").concat(firstLevelValue));
305
+ const fieldParentTabsOptions = Parentoptions.map((item)=>{
380
306
  if ('m2o' === item.interface) return {
381
307
  ...item,
382
308
  label: compile(item.uiSchema.title),
383
309
  value: item.name
384
310
  };
385
311
  }).filter(Boolean);
386
- fieldTabsOptions.unshift({
312
+ fieldParentTabsOptions.unshift({
387
313
  label: t('none'),
388
314
  value: 'none'
389
315
  });
390
- const defValue = (null === (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops1 ? void 0 : null === (_fieldSchema_xcomponentprops_quickAddParentCollection = _fieldSchema_xcomponentprops1['quickAddParentCollection']) || void 0 === _fieldSchema_xcomponentprops_quickAddParentCollection ? void 0 : _fieldSchema_xcomponentprops_quickAddParentCollection.value) || 'none';
316
+ const defParentVal = (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : null === (_fieldSchema_xcomponentprops_quickAddParentCollection = _fieldSchema_xcomponentprops['quickAddParentCollection']) || void 0 === _fieldSchema_xcomponentprops_quickAddParentCollection ? void 0 : _fieldSchema_xcomponentprops_quickAddParentCollection.value) || 'none';
317
+ const schema = {
318
+ type: 'object',
319
+ title: t('Click to select'),
320
+ properties: {
321
+ isquickaddtabs: {
322
+ title: t('Enable quick create'),
323
+ type: 'boolean',
324
+ default: (null === (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops1 ? void 0 : _fieldSchema_xcomponentprops1.isQuickAdd) || false,
325
+ 'x-decorator': 'FormItem',
326
+ 'x-component': 'Switch',
327
+ 'x-component-props': {}
328
+ },
329
+ firstLevelselection: {
330
+ title: t('Set Quick Add Tabs'),
331
+ default: firstLevelValue,
332
+ 'x-decorator': 'FormItem',
333
+ 'x-component': 'Select',
334
+ enum: fieldTabsOptions,
335
+ 'x-reactions': [
336
+ {
337
+ dependencies: [
338
+ 'isquickaddtabs'
339
+ ],
340
+ fulfill: {
341
+ state: {
342
+ visible: '{{$deps[0] === true}}'
343
+ }
344
+ }
345
+ }
346
+ ],
347
+ 'x-component-props': {
348
+ onChange (value) {
349
+ setFirstLevelValue(value);
350
+ }
351
+ }
352
+ },
353
+ secondLevelselection: {
354
+ title: t('Set Quick Add Parent Tabs'),
355
+ default: defParentVal,
356
+ 'x-decorator': 'FormItem',
357
+ 'x-component': 'SecondLevelSelect',
358
+ 'x-reactions': [
359
+ {
360
+ dependencies: [
361
+ 'firstLevelselection',
362
+ 'isquickaddtabs'
363
+ ],
364
+ fulfill: {
365
+ state: {
366
+ visible: '{{$deps[0] !== "none" && $deps[1] === true}}'
367
+ },
368
+ schema: {
369
+ 'x-component-props': {
370
+ firstLevelValue: '{{$deps[0]}}',
371
+ collectionField: fieldSchema['x-collection-field']
372
+ }
373
+ }
374
+ }
375
+ }
376
+ ]
377
+ }
378
+ }
379
+ };
391
380
  return {
392
- title: t('Set Quick Add Parent Tabs'),
393
- options: fieldTabsOptions,
394
- value: defValue,
395
- onChange (mode) {
381
+ components: {
382
+ Switch: components_namespaceObject.Switch,
383
+ SecondLevelSelect: external_secondLevelSelect_js_namespaceObject.SecondLevelSelect
384
+ },
385
+ title: t('Quick create'),
386
+ schema,
387
+ onSubmit: async (param)=>{
388
+ let { isquickaddtabs, firstLevelselection, secondLevelselection } = param;
389
+ var _fieldTabsOptions_find;
396
390
  const schema = {
397
391
  ['x-uid']: fieldSchema['x-uid']
398
392
  };
393
+ field.componentProps['isQuickAdd'] = isquickaddtabs;
394
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
395
+ fieldSchema['x-component-props']['isQuickAdd'] = isquickaddtabs;
396
+ schema['x-component-props'] = fieldSchema['x-component-props'];
397
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
398
+ fieldSchema['x-component-props']['quickAddField'] = {
399
+ fieldInterface: (null === (_fieldTabsOptions_find = fieldTabsOptions.find((item)=>item.value === firstLevelselection)) || void 0 === _fieldTabsOptions_find ? void 0 : _fieldTabsOptions_find['interface']) || 'none',
400
+ value: firstLevelselection
401
+ };
402
+ schema['x-component-props'] = fieldSchema['x-component-props'];
403
+ field.componentProps = field.componentProps || {};
404
+ field.componentProps['quickAddField'] = fieldSchema['x-component-props']['quickAddField'];
399
405
  fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
400
406
  fieldSchema['x-component-props']['quickAddParentCollection'] = {
401
- collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(quickField, ".").concat(mode),
402
- value: mode
407
+ collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(firstLevelselection, ".").concat(secondLevelselection),
408
+ value: secondLevelselection
403
409
  };
404
410
  schema['x-component-props'] = fieldSchema['x-component-props'];
405
411
  field.componentProps = field.componentProps || {};
406
412
  field.componentProps['quickAddParentCollection'] = {
407
- collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(quickField, ".").concat(mode),
408
- value: mode
413
+ collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(firstLevelselection, ".").concat(secondLevelselection),
414
+ value: secondLevelselection
409
415
  };
410
416
  if ((0, util_js_namespaceObject.isSubMode)(fieldSchema) && isAddNewForm) {
411
417
  schema.default = null;
@@ -414,15 +420,12 @@ const setQuickAddParentTabs = {
414
420
  field.setValue(null);
415
421
  }
416
422
  dn.emit('patch', {
417
- schema
423
+ schema: schema
418
424
  });
425
+ refresh();
419
426
  dn.refresh();
420
427
  }
421
428
  };
422
- },
423
- useVisible () {
424
- const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
425
- return fieldSchema['x-component-props']['isQuickAdd'] && fieldSchema['x-component-props']['quickAddField'] && 'none' !== fieldSchema['x-component-props']['quickAddField'];
426
429
  }
427
430
  };
428
431
  const subTablePopoverComponentFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
@@ -432,9 +435,7 @@ const subTablePopoverComponentFieldSettings = new SchemaSettings_js_namespaceObj
432
435
  allowAddNewData,
433
436
  allowSelectExistingRecord,
434
437
  setDefaultSortingRules,
435
- isQuickAddTabs,
436
- setQuickAddTabs,
437
- setQuickAddParentTabs
438
+ clickToSelect
438
439
  ]
439
440
  });
440
441
  var __webpack_export_target__ = exports;
@@ -29,7 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  PoweredBy: ()=>PoweredBy
30
30
  });
31
31
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
- require("react");
32
+ const external_react_i18next_namespaceObject = require("react-i18next");
33
33
  const index_js_namespaceObject = require("../style/index.js");
34
34
  function _tagged_template_literal(strings, raw) {
35
35
  if (!raw) raw = strings.slice(0);
@@ -61,13 +61,10 @@ const PoweredBy = ()=>{
61
61
  const { styles } = useStyles();
62
62
  const date = new Date();
63
63
  const year = date.getFullYear();
64
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
64
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
65
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
65
66
  className: styles.powerBy,
66
- children: [
67
- "\xa92023-",
68
- year,
69
- " TachyBase Team"
70
- ]
67
+ children: "\xa92023-".concat(year, " ").concat(t('TachyBase Team'))
71
68
  });
72
69
  };
73
70
  var __webpack_export_target__ = exports;