@nocobase/client 0.9.2-alpha.2 → 0.9.2-alpha.4

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 (338) hide show
  1. package/es/acl/Configuration/FilterDynamicComponent.d.ts +2 -0
  2. package/es/{schema-component/antd/table-v2/hooks/useUserVariable.js → acl/Configuration/FilterDynamicComponent.js} +32 -4
  3. package/es/acl/Configuration/schemas/scopes.js +3 -0
  4. package/es/acl/Configuration/schemas/useRoleResourceValues.d.ts +1 -14
  5. package/es/api-client/hooks/useRequest.d.ts +1 -14
  6. package/es/api-client/hooks/useRequest.js +48 -53
  7. package/es/application/Application.d.ts +1 -0
  8. package/es/application/Application.js +12 -2
  9. package/es/block-provider/FormFieldProvider.js +9 -1
  10. package/es/block-provider/TableSelectorProvider.js +3 -2
  11. package/es/block-provider/hooks/index.d.ts +1 -1
  12. package/es/block-provider/hooks/index.js +49 -35
  13. package/es/board/CardAdder.js +1 -1
  14. package/es/board/ColumnForm.js +4 -4
  15. package/es/board/DefaultColumnHeader.d.ts +1 -1
  16. package/es/board/DefaultColumnHeader.js +6 -6
  17. package/es/collection-manager/CollectionField.js +16 -13
  18. package/es/collection-manager/CollectionManagerProvider.js +10 -2
  19. package/es/collection-manager/Configuration/AddCollectionAction.js +1 -1
  20. package/es/collection-manager/Configuration/CollectionFields.d.ts +2 -0
  21. package/es/collection-manager/Configuration/CollectionFields.js +458 -0
  22. package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +3 -3
  23. package/es/collection-manager/Configuration/ConfigurationTable.js +4 -2
  24. package/es/collection-manager/Configuration/ConfigurationTabs.js +6 -2
  25. package/es/collection-manager/Configuration/EditCollectionAction.d.ts +1 -14
  26. package/es/collection-manager/Configuration/EditCollectionAction.js +4 -4
  27. package/es/collection-manager/Configuration/EditFieldAction.js +2 -1
  28. package/es/collection-manager/Configuration/OverridingCollectionField.js +2 -1
  29. package/es/collection-manager/Configuration/schemas/collectionFields.d.ts +2 -0
  30. package/es/collection-manager/Configuration/schemas/collectionFields.js +1 -1
  31. package/es/collection-manager/Configuration/schemas/collections.js +8 -5
  32. package/es/collection-manager/action-hooks.d.ts +5 -43
  33. package/es/collection-manager/action-hooks.js +10 -7
  34. package/es/collection-manager/hooks/useCollectionDataSource.js +2 -2
  35. package/es/collection-manager/hooks/useCollectionManager.d.ts +1 -0
  36. package/es/collection-manager/hooks/useCollectionManager.js +2 -0
  37. package/es/collection-manager/interfaces/checkbox.js +7 -0
  38. package/es/collection-manager/interfaces/checkboxGroup.js +7 -0
  39. package/es/collection-manager/interfaces/components/index.js +1 -1
  40. package/es/collection-manager/interfaces/createdBy.js +5 -1
  41. package/es/collection-manager/interfaces/email.js +7 -0
  42. package/es/collection-manager/interfaces/linkTo.js +8 -1
  43. package/es/collection-manager/interfaces/m2m.js +8 -1
  44. package/es/collection-manager/interfaces/m2o.js +8 -1
  45. package/es/collection-manager/interfaces/multipleSelect.js +10 -0
  46. package/es/collection-manager/interfaces/o2m.js +10 -2
  47. package/es/collection-manager/interfaces/o2o.js +12 -3
  48. package/es/collection-manager/interfaces/percent.js +10 -0
  49. package/es/collection-manager/interfaces/select.js +10 -0
  50. package/es/collection-manager/interfaces/types.d.ts +2 -0
  51. package/es/collection-manager/interfaces/updatedBy.js +5 -1
  52. package/es/collection-manager/sub-table.d.ts +1 -14
  53. package/es/collection-manager/types.d.ts +1 -0
  54. package/es/filter-provider/utils.d.ts +8 -3
  55. package/es/filter-provider/utils.js +42 -27
  56. package/es/locale/en_US.d.ts +8 -1
  57. package/es/locale/en_US.js +9 -2
  58. package/es/locale/ja_JP.d.ts +16 -1
  59. package/es/locale/ja_JP.js +18 -3
  60. package/es/locale/pt_BR.d.ts +17 -1
  61. package/es/locale/pt_BR.js +19 -3
  62. package/es/locale/ru_RU.d.ts +15 -0
  63. package/es/locale/ru_RU.js +17 -2
  64. package/es/locale/tr_TR.d.ts +16 -1
  65. package/es/locale/tr_TR.js +18 -3
  66. package/es/locale/zh_CN.d.ts +17 -1
  67. package/es/locale/zh_CN.js +18 -2
  68. package/es/pm/PluginManagerLink.js +5 -3
  69. package/es/pm/index.js +1 -1
  70. package/es/schema-component/antd/action/Action.js +1 -1
  71. package/es/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.js +2 -2
  72. package/es/schema-component/antd/association-select/AssociationSelect.js +67 -37
  73. package/es/schema-component/antd/association-select/useServiceOptions.js +3 -2
  74. package/es/schema-component/antd/checkbox/Checkbox.js +4 -3
  75. package/es/schema-component/antd/collection-select/CollectionSelect.d.ts +2 -2
  76. package/es/schema-component/antd/collection-select/CollectionSelect.js +6 -6
  77. package/es/schema-component/antd/error-fallback/ErrorFallback.d.ts +3 -0
  78. package/es/schema-component/antd/error-fallback/ErrorFallback.js +47 -0
  79. package/es/schema-component/antd/error-fallback/index.d.ts +1 -0
  80. package/es/schema-component/antd/error-fallback/index.js +1 -0
  81. package/es/schema-component/antd/filter/useFilterActionProps.d.ts +2 -0
  82. package/es/schema-component/antd/filter/useFilterActionProps.js +127 -7
  83. package/es/schema-component/antd/filter/useValues.js +7 -8
  84. package/es/schema-component/antd/form-item/FormItem.d.ts +3 -0
  85. package/es/schema-component/antd/form-item/FormItem.js +101 -19
  86. package/es/schema-component/antd/form-item/SchemaSettingOptions.js +2 -3
  87. package/es/schema-component/antd/form-v2/Templates.js +24 -18
  88. package/es/schema-component/antd/form-v2/utils.js +3 -3
  89. package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +1 -1
  90. package/es/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +3 -3
  91. package/es/schema-component/antd/gantt/components/gantt/gantt.js +3 -3
  92. package/es/schema-component/antd/gantt/components/gantt/style.js +1 -1
  93. package/es/schema-component/antd/gantt/components/grid/grid.d.ts +2 -2
  94. package/es/schema-component/antd/gantt/components/grid/grid.js +2 -2
  95. package/es/schema-component/antd/gantt/components/grid/style.js +1 -1
  96. package/es/schema-component/antd/gantt/components/other/arrow.d.ts +2 -2
  97. package/es/schema-component/antd/gantt/components/other/arrow.js +3 -3
  98. package/es/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +1 -1
  99. package/es/schema-component/antd/gantt/components/other/horizontal-scroll.js +1 -1
  100. package/es/schema-component/antd/gantt/components/other/style.js +1 -1
  101. package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +1 -1
  102. package/es/schema-component/antd/gantt/components/task-item/bar/bar-display.js +1 -1
  103. package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +2 -2
  104. package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +6 -6
  105. package/es/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +2 -2
  106. package/es/schema-component/antd/gantt/components/task-item/bar/bar.js +9 -9
  107. package/es/schema-component/antd/gantt/components/task-item/bar/style.js +2 -2
  108. package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +2 -2
  109. package/es/schema-component/antd/gantt/components/task-item/milestone/milestone.js +2 -2
  110. package/es/schema-component/antd/gantt/types/bar-task.d.ts +2 -2
  111. package/es/schema-component/antd/gantt/types/date-setup.d.ts +1 -1
  112. package/es/schema-component/antd/gantt/types/gantt-task-actions.d.ts +3 -3
  113. package/es/schema-component/antd/gantt/types/public-types.d.ts +1 -1
  114. package/es/schema-component/antd/grid/Grid.js +23 -9
  115. package/es/schema-component/antd/icon-picker/IconPicker.js +1 -1
  116. package/es/schema-component/antd/input/EllipsisWithTooltip.js +21 -2
  117. package/es/schema-component/antd/menu/util.js +0 -1
  118. package/es/schema-component/antd/page/Page.js +10 -2
  119. package/es/schema-component/antd/pagination/index.js +1 -1
  120. package/es/schema-component/antd/record-picker/InputRecordPicker.js +11 -9
  121. package/es/schema-component/antd/record-picker/useFieldNames.js +1 -1
  122. package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
  123. package/es/schema-component/antd/remote-select/RemoteSelect.js +75 -13
  124. package/es/schema-component/antd/select/ReadPretty.js +5 -2
  125. package/es/schema-component/antd/select/Select.js +3 -9
  126. package/es/schema-component/antd/table/Table.Array.js +2 -2
  127. package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +2 -138
  128. package/es/schema-component/antd/table-v2/Table.Column.Designer.js +6 -5
  129. package/es/schema-component/antd/table-v2/Table.js +2 -2
  130. package/es/schema-component/antd/upload/ReadPretty.js +2 -1
  131. package/es/schema-component/antd/variable/Input.js +12 -7
  132. package/es/schema-component/antd/variable/JSONInput.js +4 -4
  133. package/es/schema-component/antd/variable/TextArea.js +1 -1
  134. package/es/schema-component/antd/variable/Variable.d.ts +2 -0
  135. package/es/schema-component/antd/variable/Variable.js +7 -4
  136. package/es/schema-component/antd/variable/VariableSelect.js +8 -8
  137. package/es/schema-component/antd/variable/XButton.d.ts +1 -1
  138. package/es/schema-component/antd/variable/XButton.js +4 -4
  139. package/es/schema-component/common/utils/uitls.d.ts +9 -0
  140. package/es/schema-component/common/utils/uitls.js +37 -3
  141. package/es/schema-component/core/DesignableSwitch.js +5 -3
  142. package/es/schema-component/hooks/useComponent.js +2 -2
  143. package/es/schema-component/hooks/useDesignable.js +2 -2
  144. package/es/schema-component/hooks/useFieldTitle.js +4 -4
  145. package/es/schema-initializer/SchemaInitializer.js +2 -2
  146. package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +14 -7
  147. package/es/schema-initializer/items/DestroyActionInitializer.js +2 -2
  148. package/es/schema-initializer/items/FilterActionInitializer.js +2 -2
  149. package/es/schema-initializer/items/FormBlockInitializer.js +3 -3
  150. package/es/schema-initializer/items/G2PlotInitializer.js +1 -1
  151. package/es/schema-initializer/items/KanbanBlockInitializer.js +9 -9
  152. package/es/schema-initializer/items/MarkdownBlockInitializer.js +3 -3
  153. package/es/schema-initializer/items/PrintActionInitializer.js +2 -2
  154. package/es/schema-initializer/items/RecordAssociationBlockInitializer.js +5 -5
  155. package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +9 -9
  156. package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +5 -5
  157. package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.js +4 -4
  158. package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +5 -5
  159. package/es/schema-initializer/items/RefreshActionInitializer.js +2 -2
  160. package/es/schema-initializer/items/SubmitActionInitializer.js +2 -2
  161. package/es/schema-initializer/items/TableActionColumnInitializer.js +2 -2
  162. package/es/schema-initializer/items/TableCollectionFieldInitializer.js +2 -2
  163. package/es/schema-initializer/items/TableSelectorInitializer.js +5 -5
  164. package/es/schema-initializer/items/UpdateActionInitializer.js +2 -2
  165. package/es/schema-initializer/items/UpdateSubmitActionInitializer.js +2 -2
  166. package/es/schema-initializer/items/ViewActionInitializer.js +2 -2
  167. package/es/schema-initializer/utils.js +54 -45
  168. package/es/schema-settings/DataTemplates/FormDataTemplates.js +28 -12
  169. package/es/schema-settings/DataTemplates/hooks/useCollectionState.js +2 -1
  170. package/es/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +9 -2
  171. package/es/schema-settings/LinkageRules/ValueDynamicComponent.js +2 -1
  172. package/es/schema-settings/SchemaSettings.d.ts +4 -1
  173. package/es/schema-settings/SchemaSettings.js +32 -19
  174. package/es/schema-settings/VariableInput/VariableInput.d.ts +14 -0
  175. package/es/schema-settings/VariableInput/VariableInput.js +39 -0
  176. package/es/schema-settings/VariableInput/hooks/useDateVariable.d.ts +4 -0
  177. package/es/schema-settings/VariableInput/hooks/useDateVariable.js +129 -0
  178. package/es/schema-settings/VariableInput/hooks/useUserVariable.d.ts +5 -0
  179. package/es/schema-settings/VariableInput/hooks/useUserVariable.js +68 -0
  180. package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +1 -0
  181. package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +18 -0
  182. package/es/user/VerificationCode.js +7 -8
  183. package/lib/acl/Configuration/FilterDynamicComponent.d.ts +2 -0
  184. package/lib/{schema-component/antd/table-v2/hooks/useUserVariable.js → acl/Configuration/FilterDynamicComponent.js} +32 -4
  185. package/lib/acl/Configuration/schemas/scopes.js +3 -0
  186. package/lib/acl/Configuration/schemas/useRoleResourceValues.d.ts +1 -14
  187. package/lib/api-client/hooks/useRequest.d.ts +1 -14
  188. package/lib/api-client/hooks/useRequest.js +48 -53
  189. package/lib/application/Application.d.ts +1 -0
  190. package/lib/application/Application.js +12 -2
  191. package/lib/block-provider/FormFieldProvider.js +9 -1
  192. package/lib/block-provider/TableSelectorProvider.js +3 -2
  193. package/lib/block-provider/hooks/index.d.ts +1 -1
  194. package/lib/block-provider/hooks/index.js +47 -33
  195. package/lib/board/CardAdder.js +1 -1
  196. package/lib/board/ColumnForm.js +4 -4
  197. package/lib/board/DefaultColumnHeader.d.ts +1 -1
  198. package/lib/board/DefaultColumnHeader.js +6 -6
  199. package/lib/collection-manager/CollectionField.js +16 -13
  200. package/lib/collection-manager/CollectionManagerProvider.js +10 -2
  201. package/lib/collection-manager/Configuration/AddCollectionAction.js +1 -1
  202. package/lib/collection-manager/Configuration/CollectionFields.d.ts +2 -0
  203. package/lib/collection-manager/Configuration/CollectionFields.js +468 -0
  204. package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +3 -3
  205. package/lib/collection-manager/Configuration/ConfigurationTable.js +4 -2
  206. package/lib/collection-manager/Configuration/ConfigurationTabs.js +5 -1
  207. package/lib/collection-manager/Configuration/EditCollectionAction.d.ts +1 -14
  208. package/lib/collection-manager/Configuration/EditCollectionAction.js +4 -4
  209. package/lib/collection-manager/Configuration/EditFieldAction.js +2 -1
  210. package/lib/collection-manager/Configuration/OverridingCollectionField.js +2 -1
  211. package/lib/collection-manager/Configuration/schemas/collectionFields.d.ts +2 -0
  212. package/lib/collection-manager/Configuration/schemas/collectionFields.js +2 -1
  213. package/lib/collection-manager/Configuration/schemas/collections.js +8 -5
  214. package/lib/collection-manager/action-hooks.d.ts +5 -43
  215. package/lib/collection-manager/action-hooks.js +13 -9
  216. package/lib/collection-manager/hooks/useCollectionManager.d.ts +1 -0
  217. package/lib/collection-manager/hooks/useCollectionManager.js +2 -0
  218. package/lib/collection-manager/interfaces/checkbox.js +7 -0
  219. package/lib/collection-manager/interfaces/checkboxGroup.js +7 -0
  220. package/lib/collection-manager/interfaces/components/index.js +1 -1
  221. package/lib/collection-manager/interfaces/createdBy.js +5 -1
  222. package/lib/collection-manager/interfaces/email.js +7 -0
  223. package/lib/collection-manager/interfaces/linkTo.js +8 -1
  224. package/lib/collection-manager/interfaces/m2m.js +8 -1
  225. package/lib/collection-manager/interfaces/m2o.js +8 -1
  226. package/lib/collection-manager/interfaces/multipleSelect.js +10 -0
  227. package/lib/collection-manager/interfaces/o2m.js +10 -2
  228. package/lib/collection-manager/interfaces/o2o.js +12 -3
  229. package/lib/collection-manager/interfaces/percent.js +10 -0
  230. package/lib/collection-manager/interfaces/select.js +10 -0
  231. package/lib/collection-manager/interfaces/types.d.ts +2 -0
  232. package/lib/collection-manager/interfaces/updatedBy.js +5 -1
  233. package/lib/collection-manager/sub-table.d.ts +1 -14
  234. package/lib/collection-manager/types.d.ts +1 -0
  235. package/lib/filter-provider/utils.d.ts +8 -3
  236. package/lib/filter-provider/utils.js +44 -28
  237. package/lib/locale/en_US.d.ts +8 -1
  238. package/lib/locale/en_US.js +9 -2
  239. package/lib/locale/ja_JP.d.ts +16 -1
  240. package/lib/locale/ja_JP.js +18 -3
  241. package/lib/locale/pt_BR.d.ts +17 -1
  242. package/lib/locale/pt_BR.js +19 -3
  243. package/lib/locale/ru_RU.d.ts +15 -0
  244. package/lib/locale/ru_RU.js +17 -2
  245. package/lib/locale/tr_TR.d.ts +16 -1
  246. package/lib/locale/tr_TR.js +18 -3
  247. package/lib/locale/zh_CN.d.ts +17 -1
  248. package/lib/locale/zh_CN.js +18 -2
  249. package/lib/pm/PluginManagerLink.js +4 -2
  250. package/lib/pm/index.js +1 -1
  251. package/lib/schema-component/antd/action/Action.js +1 -1
  252. package/lib/schema-component/antd/association-filter/AssociationFilter.FilterBlockInitializer.js +2 -2
  253. package/lib/schema-component/antd/association-select/AssociationSelect.js +65 -35
  254. package/lib/schema-component/antd/association-select/useServiceOptions.js +3 -2
  255. package/lib/schema-component/antd/checkbox/Checkbox.js +4 -3
  256. package/lib/schema-component/antd/collection-select/CollectionSelect.d.ts +2 -2
  257. package/lib/schema-component/antd/error-fallback/ErrorFallback.d.ts +3 -0
  258. package/lib/schema-component/antd/error-fallback/ErrorFallback.js +55 -0
  259. package/lib/schema-component/antd/error-fallback/index.d.ts +1 -0
  260. package/lib/schema-component/antd/error-fallback/index.js +16 -0
  261. package/lib/schema-component/antd/filter/useFilterActionProps.d.ts +2 -0
  262. package/lib/schema-component/antd/filter/useFilterActionProps.js +130 -8
  263. package/lib/schema-component/antd/filter/useValues.js +6 -7
  264. package/lib/schema-component/antd/form-item/FormItem.d.ts +3 -0
  265. package/lib/schema-component/antd/form-item/FormItem.js +102 -19
  266. package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +1 -2
  267. package/lib/schema-component/antd/form-v2/Templates.js +24 -18
  268. package/lib/schema-component/antd/form-v2/utils.js +3 -4
  269. package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.d.ts +1 -1
  270. package/lib/schema-component/antd/gantt/components/calendar/top-part-of-calendar.js +2 -2
  271. package/lib/schema-component/antd/gantt/components/gantt/gantt.js +3 -3
  272. package/lib/schema-component/antd/gantt/components/gantt/style.js +1 -1
  273. package/lib/schema-component/antd/gantt/components/grid/grid.d.ts +2 -2
  274. package/lib/schema-component/antd/gantt/components/grid/style.js +1 -1
  275. package/lib/schema-component/antd/gantt/components/other/arrow.d.ts +2 -2
  276. package/lib/schema-component/antd/gantt/components/other/arrow.js +2 -2
  277. package/lib/schema-component/antd/gantt/components/other/horizontal-scroll.d.ts +1 -1
  278. package/lib/schema-component/antd/gantt/components/other/style.js +1 -1
  279. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-display.d.ts +1 -1
  280. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.d.ts +2 -2
  281. package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +2 -2
  282. package/lib/schema-component/antd/gantt/components/task-item/bar/bar.d.ts +2 -2
  283. package/lib/schema-component/antd/gantt/components/task-item/bar/bar.js +4 -4
  284. package/lib/schema-component/antd/gantt/components/task-item/bar/style.js +2 -2
  285. package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.d.ts +2 -2
  286. package/lib/schema-component/antd/gantt/components/task-item/milestone/milestone.js +1 -1
  287. package/lib/schema-component/antd/gantt/types/bar-task.d.ts +2 -2
  288. package/lib/schema-component/antd/gantt/types/date-setup.d.ts +1 -1
  289. package/lib/schema-component/antd/gantt/types/gantt-task-actions.d.ts +3 -3
  290. package/lib/schema-component/antd/gantt/types/public-types.d.ts +1 -1
  291. package/lib/schema-component/antd/grid/Grid.js +23 -9
  292. package/lib/schema-component/antd/input/EllipsisWithTooltip.js +20 -1
  293. package/lib/schema-component/antd/menu/util.js +0 -1
  294. package/lib/schema-component/antd/page/Page.js +9 -1
  295. package/lib/schema-component/antd/pagination/index.js +1 -1
  296. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +11 -9
  297. package/lib/schema-component/antd/remote-select/RemoteSelect.d.ts +2 -0
  298. package/lib/schema-component/antd/remote-select/RemoteSelect.js +75 -12
  299. package/lib/schema-component/antd/select/ReadPretty.js +5 -2
  300. package/lib/schema-component/antd/select/Select.js +3 -9
  301. package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +3 -139
  302. package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +6 -5
  303. package/lib/schema-component/antd/table-v2/Table.js +2 -2
  304. package/lib/schema-component/antd/upload/ReadPretty.js +2 -1
  305. package/lib/schema-component/antd/variable/Input.js +11 -6
  306. package/lib/schema-component/antd/variable/JSONInput.js +2 -2
  307. package/lib/schema-component/antd/variable/TextArea.js +1 -1
  308. package/lib/schema-component/antd/variable/Variable.d.ts +2 -0
  309. package/lib/schema-component/antd/variable/Variable.js +6 -2
  310. package/lib/schema-component/antd/variable/VariableSelect.js +4 -4
  311. package/lib/schema-component/antd/variable/XButton.d.ts +1 -1
  312. package/lib/schema-component/antd/variable/XButton.js +1 -1
  313. package/lib/schema-component/common/utils/uitls.d.ts +9 -0
  314. package/lib/schema-component/common/utils/uitls.js +43 -4
  315. package/lib/schema-component/core/DesignableSwitch.js +4 -2
  316. package/lib/schema-component/hooks/useComponent.js +2 -2
  317. package/lib/schema-component/hooks/useDesignable.js +2 -2
  318. package/lib/schema-initializer/SchemaInitializer.js +2 -2
  319. package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +14 -7
  320. package/lib/schema-initializer/utils.js +53 -44
  321. package/lib/schema-settings/DataTemplates/FormDataTemplates.js +28 -12
  322. package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +2 -1
  323. package/lib/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +9 -2
  324. package/lib/schema-settings/LinkageRules/ValueDynamicComponent.js +2 -1
  325. package/lib/schema-settings/SchemaSettings.d.ts +4 -1
  326. package/lib/schema-settings/SchemaSettings.js +37 -21
  327. package/lib/schema-settings/VariableInput/VariableInput.d.ts +14 -0
  328. package/lib/schema-settings/VariableInput/VariableInput.js +49 -0
  329. package/lib/schema-settings/VariableInput/hooks/useDateVariable.d.ts +4 -0
  330. package/lib/schema-settings/VariableInput/hooks/useDateVariable.js +136 -0
  331. package/lib/schema-settings/VariableInput/hooks/useUserVariable.d.ts +5 -0
  332. package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +75 -0
  333. package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +1 -0
  334. package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +25 -0
  335. package/lib/user/VerificationCode.js +1 -2
  336. package/package.json +6 -5
  337. package/es/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +0 -10
  338. package/lib/schema-component/antd/table-v2/hooks/useUserVariable.d.ts +0 -10
@@ -31,7 +31,7 @@ var findOption = function findOption() {
31
31
  var options = arguments.length > 1 ? arguments[1] : undefined;
32
32
  var items = options;
33
33
  var option;
34
- dataIndex === null || dataIndex === void 0 ? void 0 : (_dataIndex$forEach = dataIndex.forEach) === null || _dataIndex$forEach === void 0 ? void 0 : _dataIndex$forEach.call(dataIndex, function (name, index) {
34
+ dataIndex === null || dataIndex === void 0 ? void 0 : (_dataIndex$forEach = dataIndex.forEach) === null || _dataIndex$forEach === void 0 ? void 0 : _dataIndex$forEach.call(dataIndex, function (name) {
35
35
  var item = items.find(function (item) {
36
36
  return item.name === name;
37
37
  });
@@ -44,9 +44,8 @@ var findOption = function findOption() {
44
44
  };
45
45
  var useValues = function useValues() {
46
46
  var field = (0, _react.useField)();
47
- var logic = (0, _react2.useContext)(_context.FilterLogicContext);
48
- var _useContext = (0, _react2.useContext)(_context.FilterContext),
49
- options = _useContext.options;
47
+ var _ref = (0, _react2.useContext)(_context.FilterContext) || {},
48
+ options = _ref.options;
50
49
  var data2value = function data2value() {
51
50
  var _field$data$dataIndex, _field$data, _field$data$operator, _field$data2;
52
51
  field.value = _flat.default.unflatten(_defineProperty({}, "".concat((_field$data$dataIndex = field.data.dataIndex) === null || _field$data$dataIndex === void 0 ? void 0 : _field$data$dataIndex.join('.'), ".").concat((_field$data = field.data) === null || _field$data === void 0 ? void 0 : (_field$data$operator = _field$data.operator) === null || _field$data$operator === void 0 ? void 0 : _field$data$operator.value), (_field$data2 = field.data) === null || _field$data2 === void 0 ? void 0 : _field$data2.value));
@@ -56,7 +55,7 @@ var useValues = function useValues() {
56
55
  field.data = field.data || {};
57
56
  var values = (0, _flat.default)(field.value);
58
57
  var path = Object.keys(values).shift() || '';
59
- if (!path) {
58
+ if (!path || !options) {
60
59
  return;
61
60
  }
62
61
  var _path$split = path.split('.$'),
@@ -80,10 +79,10 @@ var useValues = function useValues() {
80
79
  field.data.schema = (0, _shared.merge)(option === null || option === void 0 ? void 0 : option.schema, operator === null || operator === void 0 ? void 0 : operator.schema);
81
80
  field.data.value = (0, _get.default)(field.value, "".concat(fieldPath, ".$").concat(operatorValue));
82
81
  };
83
- (0, _react2.useEffect)(value2data, [logic]);
82
+ (0, _react2.useEffect)(value2data, [field.path.entire]);
84
83
  return _objectSpread(_objectSpread({
85
84
  fields: options
86
- }, field.data), {}, {
85
+ }, (field === null || field === void 0 ? void 0 : field.data) || {}), {}, {
87
86
  setDataIndex: function setDataIndex(dataIndex) {
88
87
  var _option$operators;
89
88
  var option = findOption(dataIndex, options);
@@ -1 +1,4 @@
1
+ import { ISchema } from '@formily/react';
2
+ import { CollectionFieldOptions } from '../../../collection-manager';
1
3
  export declare const FormItem: any;
4
+ export declare function getFieldDefaultValue(fieldSchema: ISchema, collectionField: CollectionFieldOptions): any;
@@ -1,39 +1,47 @@
1
1
  "use strict";
2
2
 
3
+ 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
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.FormItem = void 0;
8
+ exports.getFieldDefaultValue = getFieldDefaultValue;
7
9
  var _css = require("@emotion/css");
8
10
  var _antd = require("@formily/antd");
9
11
  var _react = require("@formily/react");
10
12
  var _shared = require("@formily/shared");
11
13
  var _lodash = _interopRequireDefault(require("lodash"));
14
+ var _moment = _interopRequireDefault(require("moment"));
12
15
  var _react2 = _interopRequireWildcard(require("react"));
13
16
  var _reactI18next = require("react-i18next");
14
17
  var _ACLProvider = require("../../../acl/ACLProvider");
15
18
  var _blockProvider = require("../../../block-provider");
16
19
  var _collectionManager = require("../../../collection-manager");
20
+ var _CollectionFields = require("../../../collection-manager/Configuration/CollectionFields");
17
21
  var _schemaSettings = require("../../../schema-settings");
22
+ var _VariableInput = require("../../../schema-settings/VariableInput/VariableInput");
23
+ var _uitls = require("../../common/utils/uitls");
24
+ var _core = require("../../core");
18
25
  var _hooks = require("../../hooks");
19
26
  var _blockItem = require("../block-item");
20
27
  var _shared2 = require("../input/shared");
28
+ var _variable = require("../variable");
21
29
  var _FormItem = require("./FormItem.FilterFormDesigner");
22
30
  var _SchemaSettingOptions = require("./SchemaSettingOptions");
23
- var _templateObject;
31
+ var _templateObject, _templateObject2;
24
32
  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); }
25
33
  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; }
26
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
- 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); }
28
35
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
29
36
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
30
37
  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; }
31
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
32
38
  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; }
33
39
  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; }
34
40
  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; }
35
41
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
36
42
  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); }
43
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
44
+ var defaultInputStyle = (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > .nb-form-item {\n flex: 1;\n }\n"])));
37
45
  var divWrap = function divWrap(schema) {
38
46
  return {
39
47
  type: 'void',
@@ -49,17 +57,23 @@ var FormItem = (0, _react.observer)(function (props) {
49
57
  var field = (0, _react.useField)();
50
58
  var ctx = (0, _react2.useContext)(_blockProvider.BlockRequestContext);
51
59
  var schema = (0, _react.useFieldSchema)();
60
+ var variablesCtx = (0, _uitls.useVariablesCtx)();
52
61
  (0, _react2.useEffect)(function () {
53
62
  if ((ctx === null || ctx === void 0 ? void 0 : ctx.block) === 'form') {
54
63
  ctx.field.data = ctx.field.data || {};
55
64
  ctx.field.data.activeFields = ctx.field.data.activeFields || new Set();
56
65
  ctx.field.data.activeFields.add(schema.name);
66
+ // 如果默认值是一个变量,则需要解析之后再显示出来
67
+ if ((0, _uitls.isVariable)(schema === null || schema === void 0 ? void 0 : schema.default)) {
68
+ var _field$setInitialValu;
69
+ (_field$setInitialValu = field.setInitialValue) === null || _field$setInitialValu === void 0 ? void 0 : _field$setInitialValu.call(field, (0, _uitls.parseVariables)(schema.default, variablesCtx));
70
+ }
57
71
  }
58
72
  }, []);
59
73
  return /*#__PURE__*/_react2.default.createElement(_ACLProvider.ACLCollectionFieldProvider, null, /*#__PURE__*/_react2.default.createElement(_blockItem.BlockItem, {
60
74
  className: 'nb-form-item'
61
75
  }, /*#__PURE__*/_react2.default.createElement(_antd.FormItem, _objectSpread(_objectSpread({
62
- className: "".concat((0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & .ant-space {\n flex-wrap: wrap;\n }\n "]))))
76
+ className: "".concat((0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & .ant-space {\n flex-wrap: wrap;\n }\n "]))))
63
77
  }, props), {}, {
64
78
  extra: typeof field.description === 'string' ? /*#__PURE__*/_react2.default.createElement("div", {
65
79
  dangerouslySetInnerHTML: {
@@ -69,8 +83,8 @@ var FormItem = (0, _react.observer)(function (props) {
69
83
  }))));
70
84
  });
71
85
  exports.FormItem = FormItem;
72
- FormItem.Designer = function () {
73
- var _interfaceConfig$vali, _collectionField$uiSc, _getCollectionFields, _collectionField$uiSc2, _fieldSchema$xDecora, _fieldSchema$xCompon, _fieldSchema$xCompon2, _collectionField$uiSc4, _fieldSchema$xCompon3, _fieldSchema$xCompon4, _fieldSchema$xCompon5, _field$componentProps, _field$componentProps2;
86
+ FormItem.Designer = function Designer() {
87
+ var _interfaceConfig$vali, _collectionField$uiSc, _getCollectionFields, _collectionField$uiSc2, _fieldSchema$xDecora, _fieldSchema$xCompon, _fieldSchema$xCompon2, _fieldSchema$xCompon3, _fieldSchema$xCompon4, _fieldSchema$xCompon5, _field$componentProps, _field$componentProps2;
74
88
  var _useCollectionManager = (0, _collectionManager.useCollectionManager)(),
75
89
  getCollectionFields = _useCollectionManager.getCollectionFields,
76
90
  getInterface = _useCollectionManager.getInterface,
@@ -90,6 +104,7 @@ FormItem.Designer = function () {
90
104
  refresh = _useDesignable.refresh,
91
105
  insertAdjacent = _useDesignable.insertAdjacent;
92
106
  var compile = (0, _hooks.useCompile)();
107
+ var variablesCtx = (0, _uitls.useVariablesCtx)();
93
108
  var collectionField = getField(fieldSchema['name']) || getCollectionJoinField(fieldSchema['x-collection-field']);
94
109
  var targetCollection = getCollection(collectionField === null || collectionField === void 0 ? void 0 : collectionField.target);
95
110
  var interfaceConfig = getInterface(collectionField === null || collectionField === void 0 ? void 0 : collectionField.interface);
@@ -105,7 +120,7 @@ FormItem.Designer = function () {
105
120
  initialValue['required'] = field.required;
106
121
  }
107
122
  var options = targetFields.filter(function (field) {
108
- return !(field === null || field === void 0 ? void 0 : field.target) && field.type !== 'boolean';
123
+ return (0, _CollectionFields.isTitleField)(field);
109
124
  }).map(function (field) {
110
125
  var _field$uiSchema;
111
126
  return {
@@ -386,28 +401,72 @@ FormItem.Designer = function () {
386
401
  });
387
402
  refresh();
388
403
  }
389
- }), form && !(form === null || form === void 0 ? void 0 : form.readPretty) && (collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc4 = collectionField.uiSchema) === null || _collectionField$uiSc4 === void 0 ? void 0 : _collectionField$uiSc4.type) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ModalItem, {
404
+ }), form && !(form === null || form === void 0 ? void 0 : form.readPretty) && (0, _schemaSettings.isShowDefaultValue)(collectionField, getInterface) && !(0, _schemaSettings.isPatternDisabled)(fieldSchema) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ModalItem, {
390
405
  title: t('Set default value'),
391
406
  components: {
392
407
  ArrayCollapse: _antd.ArrayCollapse,
393
- FormLayout: _antd.FormLayout
408
+ FormLayout: _antd.FormLayout,
409
+ VariableInput: _VariableInput.VariableInput
394
410
  },
411
+ width: 800,
395
412
  schema: {
396
413
  type: 'object',
397
414
  title: t('Set default value'),
398
415
  properties: {
399
- default: _objectSpread(_objectSpread({}, collectionField === null || collectionField === void 0 ? void 0 : collectionField.uiSchema), {}, {
416
+ default: (0, _variable.isInvariable)(interfaceConfig) ? _objectSpread(_objectSpread({}, fieldSchema || {}), {}, {
417
+ 'x-decorator': 'FormItem',
418
+ 'x-component-props': _objectSpread(_objectSpread({}, fieldSchema['x-component-props']), {}, {
419
+ component: (collectionField === null || collectionField === void 0 ? void 0 : collectionField.target) && collectionField.interface !== 'chinaRegion' ? 'AssociationSelect' : undefined,
420
+ service: {
421
+ resource: collectionField === null || collectionField === void 0 ? void 0 : collectionField.target
422
+ },
423
+ style: {
424
+ width: '100%',
425
+ verticalAlign: 'top'
426
+ }
427
+ }),
400
428
  name: 'default',
401
429
  title: t('Default value'),
430
+ default: getFieldDefaultValue(fieldSchema, collectionField),
431
+ 'x-read-pretty': false,
432
+ 'x-disabled': false
433
+ }) : _objectSpread(_objectSpread({}, fieldSchema || {}), {}, {
402
434
  'x-decorator': 'FormItem',
403
- default: fieldSchema.default || (collectionField === null || collectionField === void 0 ? void 0 : collectionField.defaultValue)
435
+ 'x-component': 'VariableInput',
436
+ 'x-component-props': _objectSpread(_objectSpread({}, (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema['x-component-props']) || {}), {}, {
437
+ collectionName: collectionField === null || collectionField === void 0 ? void 0 : collectionField.collectionName,
438
+ schema: collectionField === null || collectionField === void 0 ? void 0 : collectionField.uiSchema,
439
+ className: defaultInputStyle,
440
+ renderSchemaComponent: function Com(props) {
441
+ var s = _lodash.default.cloneDeep(fieldSchema) || {};
442
+ s.title = '';
443
+ s['x-read-pretty'] = false;
444
+ s['x-disabled'] = false;
445
+ return /*#__PURE__*/_react2.default.createElement(_core.SchemaComponent, {
446
+ schema: _objectSpread(_objectSpread({}, s || {}), {}, {
447
+ 'x-component-props': _objectSpread(_objectSpread({}, s['x-component-props']), {}, {
448
+ onChange: props.onChange,
449
+ value: props.value,
450
+ defaultValue: getFieldDefaultValue(s, collectionField),
451
+ style: {
452
+ width: '100%',
453
+ verticalAlign: 'top'
454
+ }
455
+ })
456
+ })
457
+ });
458
+ }
459
+ }),
460
+ name: 'default',
461
+ title: t('Default value'),
462
+ default: getFieldDefaultValue(fieldSchema, collectionField)
404
463
  })
405
464
  }
406
465
  },
407
466
  onSubmit: function onSubmit(v) {
408
467
  var schema = _defineProperty({}, 'x-uid', fieldSchema['x-uid']);
409
468
  if (field.value !== v.default) {
410
- field.value = v.default;
469
+ field.value = (0, _uitls.parseVariables)(v.default, variablesCtx);
411
470
  }
412
471
  fieldSchema.default = v.default;
413
472
  schema.default = v.default;
@@ -421,7 +480,7 @@ FormItem.Designer = function () {
421
480
  options: fieldComponentOptions,
422
481
  value: fieldSchema['x-component'],
423
482
  onChange: function onChange(type) {
424
- var _collectionField$uiSc5, _interfaceConfig$sche;
483
+ var _collectionField$uiSc4, _interfaceConfig$sche;
425
484
  var schema = {
426
485
  name: collectionField === null || collectionField === void 0 ? void 0 : collectionField.name,
427
486
  type: 'void',
@@ -434,7 +493,7 @@ FormItem.Designer = function () {
434
493
  'x-validator': fieldSchema['x-validator'],
435
494
  'x-collection-field': fieldSchema['x-collection-field'],
436
495
  'x-decorator-props': fieldSchema['x-decorator-props'],
437
- 'x-component-props': _objectSpread(_objectSpread({}, collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc5 = collectionField.uiSchema) === null || _collectionField$uiSc5 === void 0 ? void 0 : _collectionField$uiSc5['x-component-props']), fieldSchema['x-component-props'])
496
+ 'x-component-props': _objectSpread(_objectSpread({}, collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc4 = collectionField.uiSchema) === null || _collectionField$uiSc4 === void 0 ? void 0 : _collectionField$uiSc4['x-component-props']), fieldSchema['x-component-props'])
438
497
  };
439
498
  interfaceConfig === null || interfaceConfig === void 0 ? void 0 : (_interfaceConfig$sche = interfaceConfig.schemaInitialize) === null || _interfaceConfig$sche === void 0 ? void 0 : _interfaceConfig$sche.call(interfaceConfig, schema, {
440
499
  field: collectionField,
@@ -454,9 +513,25 @@ FormItem.Designer = function () {
454
513
  }
455
514
  });
456
515
  }
516
+ }), form && !(form === null || form === void 0 ? void 0 : form.readPretty) && ['o2m', 'm2m'].includes(collectionField === null || collectionField === void 0 ? void 0 : collectionField.interface) && fieldSchema['x-component'] !== 'TableField' && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
517
+ key: "multiple",
518
+ title: t('Multiple'),
519
+ checked: ((_fieldSchema$xCompon3 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon3 === void 0 ? void 0 : _fieldSchema$xCompon3.multiple) === undefined ? true : fieldSchema['x-component-props'].multiple,
520
+ onChange: function onChange(value) {
521
+ var schema = _defineProperty({}, 'x-uid', fieldSchema['x-uid']);
522
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
523
+ field.componentProps = field.componentProps || {};
524
+ fieldSchema['x-component-props'].multiple = value;
525
+ field.componentProps.multiple = value;
526
+ schema['x-component-props'] = fieldSchema['x-component-props'];
527
+ dn.emit('patch', {
528
+ schema: schema
529
+ });
530
+ refresh();
531
+ }
457
532
  }), field.readPretty && options.length > 0 && fieldSchema['x-component'] === 'CollectionField' && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
458
533
  title: t('Enable link'),
459
- checked: ((_fieldSchema$xCompon3 = (_fieldSchema$xCompon4 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon4 === void 0 ? void 0 : _fieldSchema$xCompon4.mode) !== null && _fieldSchema$xCompon3 !== void 0 ? _fieldSchema$xCompon3 : 'links') === 'links',
534
+ checked: ((_fieldSchema$xCompon4 = (_fieldSchema$xCompon5 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon5 === void 0 ? void 0 : _fieldSchema$xCompon5.mode) !== null && _fieldSchema$xCompon4 !== void 0 ? _fieldSchema$xCompon4 : 'links') === 'links',
460
535
  onChange: function onChange(flag) {
461
536
  fieldSchema['x-component-props'] = _objectSpread(_objectSpread({}, fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema['x-component-props']), {}, {
462
537
  mode: flag ? 'links' : 'tags'
@@ -469,7 +544,7 @@ FormItem.Designer = function () {
469
544
  });
470
545
  dn.refresh();
471
546
  }
472
- }), form && !(form === null || form === void 0 ? void 0 : form.readPretty) && (collectionField === null || collectionField === void 0 ? void 0 : collectionField.interface) !== 'o2m' && (fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon5 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon5 === void 0 ? void 0 : _fieldSchema$xCompon5['pattern-disable']) != true && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
547
+ }), form && !(form === null || form === void 0 ? void 0 : form.readPretty) && (collectionField === null || collectionField === void 0 ? void 0 : collectionField.interface) !== 'o2m' && !(0, _schemaSettings.isPatternDisabled)(fieldSchema) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
473
548
  key: "pattern",
474
549
  title: t('Pattern'),
475
550
  options: [{
@@ -527,9 +602,9 @@ FormItem.Designer = function () {
527
602
  options: options,
528
603
  value: field === null || field === void 0 ? void 0 : (_field$componentProps = field.componentProps) === null || _field$componentProps === void 0 ? void 0 : (_field$componentProps2 = _field$componentProps.fieldNames) === null || _field$componentProps2 === void 0 ? void 0 : _field$componentProps2.label,
529
604
  onChange: function onChange(label) {
530
- var _collectionField$uiSc6, _collectionField$uiSc7;
605
+ var _collectionField$uiSc5, _collectionField$uiSc6;
531
606
  var schema = _defineProperty({}, 'x-uid', fieldSchema['x-uid']);
532
- var fieldNames = _objectSpread(_objectSpread(_objectSpread({}, collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc6 = collectionField.uiSchema) === null || _collectionField$uiSc6 === void 0 ? void 0 : (_collectionField$uiSc7 = _collectionField$uiSc6['x-component-props']) === null || _collectionField$uiSc7 === void 0 ? void 0 : _collectionField$uiSc7['fieldNames']), field.componentProps.fieldNames), {}, {
607
+ var fieldNames = _objectSpread(_objectSpread(_objectSpread({}, collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc5 = collectionField.uiSchema) === null || _collectionField$uiSc5 === void 0 ? void 0 : (_collectionField$uiSc6 = _collectionField$uiSc5['x-component-props']) === null || _collectionField$uiSc6 === void 0 ? void 0 : _collectionField$uiSc6['fieldNames']), field.componentProps.fieldNames), {}, {
533
608
  label: label
534
609
  });
535
610
  fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
@@ -554,4 +629,12 @@ FormItem.Designer = function () {
554
629
  function isFileCollection(collection) {
555
630
  return (collection === null || collection === void 0 ? void 0 : collection.template) === 'file';
556
631
  }
557
- FormItem.FilterFormDesigner = _FormItem.FilterFormDesigner;
632
+ FormItem.FilterFormDesigner = _FormItem.FilterFormDesigner;
633
+ function getFieldDefaultValue(fieldSchema, collectionField) {
634
+ var _collectionField$uiSc7;
635
+ var result = (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.default) || (collectionField === null || collectionField === void 0 ? void 0 : collectionField.defaultValue);
636
+ if ((collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc7 = collectionField.uiSchema) === null || _collectionField$uiSc7 === void 0 ? void 0 : _collectionField$uiSc7['x-component']) === 'DatePicker' && result) {
637
+ return (0, _moment.default)(result);
638
+ }
639
+ return result;
640
+ }
@@ -464,7 +464,6 @@ var EditComponent = function EditComponent() {
464
464
  };
465
465
  exports.EditComponent = EditComponent;
466
466
  var EditPattern = function EditPattern() {
467
- var _fieldSchema$xCompon;
468
467
  var _useCollectionManager5 = (0, _collectionManager.useCollectionManager)(),
469
468
  getCollectionJoinField = _useCollectionManager5.getCollectionJoinField;
470
469
  var _useCollection5 = (0, _collectionManager.useCollection)(),
@@ -485,7 +484,7 @@ var EditPattern = function EditPattern() {
485
484
  if (fieldSchema['x-read-pretty'] === true) {
486
485
  readOnlyMode = 'read-pretty';
487
486
  }
488
- return form && !(form === null || form === void 0 ? void 0 : form.readPretty) && (collectionField === null || collectionField === void 0 ? void 0 : collectionField.interface) !== 'o2m' && (fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon === void 0 ? void 0 : _fieldSchema$xCompon['pattern-disable']) != true ? /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
487
+ return form && !(form === null || form === void 0 ? void 0 : form.readPretty) && (collectionField === null || collectionField === void 0 ? void 0 : collectionField.interface) !== 'o2m' && !(0, _schemaSettings.isPatternDisabled)(fieldSchema) ? /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
489
488
  key: "pattern",
490
489
  title: t('Pattern'),
491
490
  options: [{
@@ -5,12 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Templates = void 0;
7
7
  var _react = require("@formily/react");
8
+ var _client = require("@nocobase/utils/client");
8
9
  var _antd = require("antd");
9
10
  var _lodash = _interopRequireDefault(require("lodash"));
10
11
  var _react2 = _interopRequireWildcard(require("react"));
11
12
  var _reactI18next = require("react-i18next");
12
13
  var _apiClient = require("../../../api-client");
13
14
  var _blockProvider = require("../../../block-provider");
15
+ var _collectionManager = require("../../../collection-manager");
14
16
  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); }
15
17
  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; }
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -65,6 +67,8 @@ var Templates = function Templates(_ref) {
65
67
  display = _useDataTemplates.display,
66
68
  enabled = _useDataTemplates.enabled,
67
69
  defaultTemplate = _useDataTemplates.defaultTemplate;
70
+ var _useCollectionManager = (0, _collectionManager.useCollectionManager)(),
71
+ getCollectionField = _useCollectionManager.getCollectionField;
68
72
  var _React$useState = _react2.default.useState((defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.key) || 'none'),
69
73
  _React$useState2 = _slicedToArray(_React$useState, 2),
70
74
  value = _React$useState2[0],
@@ -76,8 +80,14 @@ var Templates = function Templates(_ref) {
76
80
  if (defaultTemplate) {
77
81
  fetchTemplateData(api, defaultTemplate).then(function (data) {
78
82
  if (form) {
79
- form.values = data;
83
+ (0, _client.forEach)(data, function (value, key) {
84
+ if (value) {
85
+ form.values[key] = value;
86
+ }
87
+ });
80
88
  }
89
+ }).catch(function (err) {
90
+ console.error(err);
81
91
  });
82
92
  }
83
93
  }, []);
@@ -87,24 +97,20 @@ var Templates = function Templates(_ref) {
87
97
  while (1) switch (_context.prev = _context.next) {
88
98
  case 0:
89
99
  setValue(value);
90
- if (!(option.key !== 'none')) {
91
- _context.next = 8;
92
- break;
93
- }
94
- if (!form) {
95
- _context.next = 6;
96
- break;
100
+ if (option.key !== 'none') {
101
+ fetchTemplateData(api, option).then(function (data) {
102
+ if (form) {
103
+ (0, _client.forEach)(data, function (value, key) {
104
+ if (value) {
105
+ form.values[key] = value;
106
+ }
107
+ });
108
+ }
109
+ });
110
+ } else {
111
+ form === null || form === void 0 ? void 0 : form.reset();
97
112
  }
98
- _context.next = 5;
99
- return fetchTemplateData(api, option);
100
- case 5:
101
- form.values = _context.sent;
102
- case 6:
103
- _context.next = 9;
104
- break;
105
- case 8:
106
- form === null || form === void 0 ? void 0 : form.reset();
107
- case 9:
113
+ case 2:
108
114
  case "end":
109
115
  return _context.stop();
110
116
  }
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.linkageMergeAction = void 0;
7
+ var _client = require("@nocobase/evaluators/client");
7
8
  var _lodash = require("lodash");
8
- var _uitls = require("../../common/utils/uitls");
9
9
  var _type = require("../../../schema-settings/LinkageRules/type");
10
- var _client = _interopRequireDefault(require("@nocobase/evaluators/client"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ var _uitls = require("../../common/utils/uitls");
12
11
  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); }
13
12
  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; }
14
13
  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; }
@@ -23,7 +22,7 @@ var linkageMergeAction = function linkageMergeAction(_ref, field, condition, val
23
22
  var displayResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert2 = field.linkageProperty) === null || _field$linkagePropert2 === void 0 ? void 0 : _field$linkagePropert2.display) || [field === null || field === void 0 ? void 0 : (_field$initProperty2 = field.initProperty) === null || _field$initProperty2 === void 0 ? void 0 : _field$initProperty2.display];
24
23
  var patternResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert3 = field.linkageProperty) === null || _field$linkagePropert3 === void 0 ? void 0 : _field$linkagePropert3.pattern) || [field === null || field === void 0 ? void 0 : (_field$initProperty3 = field.initProperty) === null || _field$initProperty3 === void 0 ? void 0 : _field$initProperty3.pattern];
25
24
  var valueResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert4 = field.linkageProperty) === null || _field$linkagePropert4 === void 0 ? void 0 : _field$linkagePropert4.value) || [field.value || (field === null || field === void 0 ? void 0 : (_field$initProperty4 = field.initProperty) === null || _field$initProperty4 === void 0 ? void 0 : _field$initProperty4.value)];
26
- var _evaluators$get = _client.default.get('formula.js'),
25
+ var _evaluators$get = _client.evaluators.get('formula.js'),
27
26
  evaluate = _evaluators$get.evaluate;
28
27
  switch (operator) {
29
28
  case _type.ActionType.Required:
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare type TopPartOfCalendarProps = {
3
3
  value: string;
4
4
  x1Line: number;
@@ -23,9 +23,9 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
23
23
  x2: x1Line,
24
24
  y2: y2Line,
25
25
  className: (0, _css.cx)(_style.calendarTopTick),
26
- key: value + "line"
26
+ key: value + 'line'
27
27
  }), /*#__PURE__*/_react.default.createElement("text", {
28
- key: value + "text",
28
+ key: value + 'text',
29
29
  y: yText,
30
30
  x: xText,
31
31
  className: (0, _css.cx)(_style.calendarTopText)
@@ -484,7 +484,7 @@ var Gantt = function Gantt(props) {
484
484
  _context.next = 2;
485
485
  return resource.update({
486
486
  filterByTk: task.id,
487
- values: _objectSpread(_objectSpread({}, task), {}, _defineProperty({}, fieldNames.progress, task.progress / 100))
487
+ values: _defineProperty({}, fieldNames.progress, task.progress / 100)
488
488
  });
489
489
  case 2:
490
490
  _antd.message.success(t('Saved successfully'));
@@ -502,14 +502,14 @@ var Gantt = function Gantt(props) {
502
502
  }();
503
503
  var handleTaskChange = /*#__PURE__*/function () {
504
504
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(task) {
505
- var _objectSpread3;
505
+ var _values2;
506
506
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
507
507
  while (1) switch (_context2.prev = _context2.next) {
508
508
  case 0:
509
509
  _context2.next = 2;
510
510
  return resource.update({
511
511
  filterByTk: task.id,
512
- values: _objectSpread(_objectSpread({}, task), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, fieldNames.start, task.start), _defineProperty(_objectSpread3, fieldNames.end, task.end), _objectSpread3))
512
+ values: (_values2 = {}, _defineProperty(_values2, fieldNames.start, task.start), _defineProperty(_values2, fieldNames.end, task.end), _values2)
513
513
  });
514
514
  case 2:
515
515
  _antd.message.success(t('Saved successfully'));
@@ -7,7 +7,7 @@ exports.wrapper = exports.horizontalContainer = exports.ganttVerticalContainer =
7
7
  var _css = require("@emotion/css");
8
8
  var _templateObject, _templateObject2, _templateObject3;
9
9
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
10
- var ganttVerticalContainer = (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n font-size: 0;\n margin: 0;\n padding: 0;\n width:100%;\n border-left: 2px solid #f4f2f2;\n"])));
10
+ var ganttVerticalContainer = (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n font-size: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n border-left: 2px solid #f4f2f2;\n"])));
11
11
  exports.ganttVerticalContainer = ganttVerticalContainer;
12
12
  var horizontalContainer = (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n overflow: hidden;\n"])));
13
13
  exports.horizontalContainer = horizontalContainer;
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { GridBodyProps } from "./grid-body";
1
+ import React from 'react';
2
+ import { GridBodyProps } from './grid-body';
3
3
  export declare type GridProps = GridBodyProps;
4
4
  export declare const Grid: React.FC<GridProps>;
@@ -11,7 +11,7 @@ var gridRow = (0, _css.css)(_templateObject || (_templateObject = _taggedTemplat
11
11
  exports.gridRow = gridRow;
12
12
  var gridHeightRow = (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n fill: #e6f7ff;\n border-color: rgba(0, 0, 0, 0.03);\n"])));
13
13
  exports.gridHeightRow = gridHeightRow;
14
- var gridRowLine = (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n stroke: #f0f0f0;\n stroke-width:0;\n border-bottom: 1px solid #f0f0f0;\n"])));
14
+ var gridRowLine = (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n stroke: #f0f0f0;\n stroke-width: 0;\n border-bottom: 1px solid #f0f0f0;\n"])));
15
15
  exports.gridRowLine = gridRowLine;
16
16
  var gridTick = (0, _css.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n stroke: #f0f0f0;\n"])));
17
17
  exports.gridTick = gridTick;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { BarTask } from "../../types/bar-task";
1
+ import React from 'react';
2
+ import { BarTask } from '../../types/bar-task';
3
3
  declare type ArrowProps = {
4
4
  taskFrom: BarTask;
5
5
  taskTo: BarTask;
@@ -47,7 +47,7 @@ var drownPathAndTriangle = function drownPathAndTriangle(taskFrom, taskTo, rowHe
47
47
  var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
48
48
  var taskToEndPosition = taskTo.y + taskHeight / 2;
49
49
  var taskFromEndPosition = taskFrom.x2 + arrowIndent * 2;
50
- var taskFromHorizontalOffsetValue = taskFromEndPosition < taskTo.x1 ? "" : "H ".concat(taskTo.x1 - arrowIndent);
50
+ var taskFromHorizontalOffsetValue = taskFromEndPosition < taskTo.x1 ? '' : "H ".concat(taskTo.x1 - arrowIndent);
51
51
  var taskToHorizontalOffsetValue = taskFromEndPosition > taskTo.x1 ? arrowIndent : taskTo.x1 - taskFrom.x2 - arrowIndent;
52
52
  var path = "M ".concat(taskFrom.x2, " ").concat(taskFrom.y + taskHeight / 2, " \n h ").concat(arrowIndent, " \n v ").concat(indexCompare * rowHeight / 2, " \n ").concat(taskFromHorizontalOffsetValue, "\n V ").concat(taskToEndPosition, " \n h ").concat(taskToHorizontalOffsetValue);
53
53
  var trianglePoints = "".concat(taskTo.x1, ",").concat(taskToEndPosition, " \n ").concat(taskTo.x1 - 5, ",").concat(taskToEndPosition - 5, " \n ").concat(taskTo.x1 - 5, ",").concat(taskToEndPosition + 5);
@@ -57,7 +57,7 @@ var drownPathAndTriangleRTL = function drownPathAndTriangleRTL(taskFrom, taskTo,
57
57
  var indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
58
58
  var taskToEndPosition = taskTo.y + taskHeight / 2;
59
59
  var taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
60
- var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : "H ".concat(taskTo.x2 + arrowIndent);
60
+ var taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? '' : "H ".concat(taskTo.x2 + arrowIndent);
61
61
  var taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
62
62
  var path = "M ".concat(taskFrom.x1, " ").concat(taskFrom.y + taskHeight / 2, " \n h ").concat(-arrowIndent, " \n v ").concat(indexCompare * rowHeight / 2, " \n ").concat(taskFromHorizontalOffsetValue, "\n V ").concat(taskToEndPosition, " \n h ").concat(taskToHorizontalOffsetValue);
63
63
  var trianglePoints = "".concat(taskTo.x2, ",").concat(taskToEndPosition, " \n ").concat(taskTo.x2 + 5, ",").concat(taskToEndPosition + 5, " \n ").concat(taskTo.x2 + 5, ",").concat(taskToEndPosition - 5);
@@ -1,4 +1,4 @@
1
- import React, { SyntheticEvent } from "react";
1
+ import React, { SyntheticEvent } from 'react';
2
2
  export declare const HorizontalScroll: React.FC<{
3
3
  scroll: number;
4
4
  svgWidth: number;
@@ -7,7 +7,7 @@ exports.verticalScroll = exports.tooltipDetailsContainerHidden = exports.tooltip
7
7
  var _css = require("@emotion/css");
8
8
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
9
9
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
10
- var scrollWrapper = (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: auto;\n position: absolute;\n bottom: -4px;\n max-width: 100%;\n /*firefox*/\n scrollbar-width: thin;\n /*iPad*/\n height: 1.2rem;\n &::-webkit-scrollbar {\n width: 1.1rem;\n height: 1.1rem;\n }\n &::-webkit-scrollbar-corner {\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n border: 5px solid transparent;\n background: #5c5858cc;\n border-radius: 10px;\n background-clip: padding-box;\n }\n &::-webkit-scrollbar-thumb:hover {\n border: 4px solid transparent;\n background: #5c5858bd;\n background-clip: padding-box;\n }\n"])));
10
+ var scrollWrapper = (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: auto;\n position: absolute;\n bottom: -4px;\n max-width: 100%;\n /*firefox*/\n scrollbar-width: thin;\n /*iPad*/\n height: 1.2rem;\n &::-webkit-scrollbar {\n width: 1.1rem;\n height: 1.1rem;\n }\n &::-webkit-scrollbar-corner {\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n border: 5px solid transparent;\n background: #5c5858cc;\n border-radius: 10px;\n background-clip: padding-box;\n }\n &::-webkit-scrollbar-thumb:hover {\n border: 4px solid transparent;\n background: #5c5858bd;\n background-clip: padding-box;\n }\n"])));
11
11
  exports.scrollWrapper = scrollWrapper;
12
12
  var horizontalScroll = (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 1px;\n"])));
13
13
  exports.horizontalScroll = horizontalScroll;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare type BarDisplayProps = {
3
3
  x: number;
4
4
  y: number;
@@ -1,3 +1,3 @@
1
- import React from "react";
2
- import { TaskItemProps } from "../task-item";
1
+ import React from 'react';
2
+ import { TaskItemProps } from '../task-item';
3
3
  export declare const BarSmall: React.FC<TaskItemProps>;
@@ -32,14 +32,14 @@ var BarSmall = function BarSmall(_ref) {
32
32
  styles: task.styles,
33
33
  isSelected: isSelected,
34
34
  onMouseDown: function onMouseDown(e) {
35
- isDateChangeable && onEventStart("move", task, e);
35
+ isDateChangeable && onEventStart('move', task, e);
36
36
  }
37
37
  }), /*#__PURE__*/_react.default.createElement("g", {
38
38
  className: "handleGroup"
39
39
  }, isProgressChangeable && /*#__PURE__*/_react.default.createElement(_barProgressHandle.BarProgressHandle, {
40
40
  progressPoint: progressPoint,
41
41
  onMouseDown: function onMouseDown(e) {
42
- onEventStart("progress", task, e);
42
+ onEventStart('progress', task, e);
43
43
  }
44
44
  })));
45
45
  };
@@ -1,3 +1,3 @@
1
- import React from "react";
2
- import { TaskItemProps } from "../task-item";
1
+ import React from 'react';
2
+ import { TaskItemProps } from '../task-item';
3
3
  export declare const Bar: React.FC<TaskItemProps>;