@pisell/materials 1.0.472 → 1.0.474

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 (291) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +18 -18
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +17 -17
  11. package/es/components/cardMetricItem/index.less +1 -0
  12. package/es/components/dataSourceComponents/dataSourceForm/index.less +1 -1
  13. package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
  14. package/es/components/dataSourceComponents/dataSourceForm/serve.js +4 -3
  15. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
  16. package/es/components/dataSourceComponents/dataSourceForm/utils.js +41 -17
  17. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
  18. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +4 -0
  19. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
  20. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +4 -0
  21. package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
  22. package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +15 -0
  23. package/es/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
  24. package/es/components/dataSourceComponents/dataSourceShow/utils.js +82 -0
  25. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +33 -139
  26. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
  27. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +162 -0
  28. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
  29. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +135 -0
  30. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  31. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
  32. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +35 -39
  33. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
  34. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +65 -11
  35. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
  36. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +105 -6
  37. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
  38. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +245 -0
  39. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
  40. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +41 -12
  41. package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
  42. package/es/components/dataSourceComponents/dataSourceTable/index.js +1 -0
  43. package/es/components/dataSourceComponents/dataSourceTable/index.less +5 -0
  44. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
  45. package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
  46. package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +23 -0
  47. package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
  48. package/es/components/dataSourceComponents/dataSourceWrapper/index.js +17 -2
  49. package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +7 -1
  50. package/es/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
  51. package/es/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
  52. package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
  53. package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +7 -0
  54. package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
  55. package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +5 -0
  56. package/es/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
  57. package/es/components/dataSourceComponents/fields/DateRangePicker/index.js +5 -0
  58. package/es/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
  59. package/es/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
  60. package/es/components/dataSourceComponents/fields/DateRangePicker/type.js +1 -0
  61. package/es/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
  62. package/es/components/dataSourceComponents/fields/Input/index.js +4 -0
  63. package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
  64. package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +5 -0
  65. package/es/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
  66. package/es/components/dataSourceComponents/fields/Input.Email/WithMode.js +17 -0
  67. package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
  68. package/es/components/dataSourceComponents/fields/Input.Email/index.js +4 -0
  69. package/es/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
  70. package/es/components/dataSourceComponents/fields/Input.Email/type.js +1 -0
  71. package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
  72. package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
  73. package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +41 -1
  74. package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
  75. package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
  76. package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +5 -0
  77. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
  78. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +12 -0
  79. package/es/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
  80. package/es/components/dataSourceComponents/fields/Input.Phone/index.js +4 -0
  81. package/es/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
  82. package/es/components/dataSourceComponents/fields/Input.Phone/type.js +1 -0
  83. package/es/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
  84. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  85. package/es/components/dataSourceComponents/fields/index.d.ts +46 -5
  86. package/es/components/dataSourceComponents/fields/index.js +7 -2
  87. package/es/components/dataSourceComponents/fields/type.d.ts +18 -0
  88. package/es/components/dataSourceComponents/fields/type.js +1 -0
  89. package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
  90. package/es/components/dataSourceComponents/fields/utils.js +111 -0
  91. package/es/components/dataSourceComponents/hooks/useActions.js +22 -7
  92. package/es/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
  93. package/es/components/dataSourceComponents/hooks/useComponentId.js +9 -0
  94. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
  95. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
  96. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +37 -27
  97. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
  98. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +19 -13
  99. package/es/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
  100. package/es/components/dataSourceComponents/provider/variables/utils.js +9 -0
  101. package/es/components/filter/components/Dropdown/index.d.ts +1 -0
  102. package/es/components/filter/components/Dropdown/index.js +6 -2
  103. package/es/components/filter/components/FilterButton/index.js +5 -3
  104. package/es/components/filter/components/FilterButton/types.d.ts +2 -0
  105. package/es/components/pisellAnchor/index.less +77 -77
  106. package/es/components/pisellStatisticList/index.less +1 -1
  107. package/es/components/pisellWalletPassCard/index.js +3 -1
  108. package/es/components/pisellWalletPassCard/index.less +23 -9
  109. package/es/components/table/Actions/index.js +16 -7
  110. package/es/components/table/Gallery/index.d.ts +3 -3
  111. package/es/components/table/Gallery/index.js +25 -7
  112. package/es/components/table/Gallery/index.less +1 -0
  113. package/es/components/table/Header/index.d.ts +10 -3
  114. package/es/components/table/Header/index.js +37 -11
  115. package/es/components/table/Header/index.less +10 -2
  116. package/es/components/table/Table/utils.js +4 -0
  117. package/es/components/table/Tabs/index.d.ts +14 -0
  118. package/es/components/table/Tabs/index.js +37 -0
  119. package/es/components/table/hooks/useTriggerValuesChange.js +3 -0
  120. package/es/components/table/index.js +16 -3
  121. package/es/components/table/types.d.ts +14 -2
  122. package/es/components/typography/index.d.ts +2 -2
  123. package/es/components/typography/index.js +4 -3
  124. package/es/components/walletCard/index.d.ts +6 -4
  125. package/es/components/walletCard/index.js +34 -15
  126. package/es/index.d.ts +4 -0
  127. package/es/index.js +5 -1
  128. package/es/locales/en-US.d.ts +7 -0
  129. package/es/locales/en-US.js +16 -1
  130. package/es/locales/zh-CN.d.ts +7 -0
  131. package/es/locales/zh-CN.js +16 -1
  132. package/es/locales/zh-TW.d.ts +7 -0
  133. package/es/locales/zh-TW.js +16 -1
  134. package/lib/components/cardMetricItem/index.less +1 -0
  135. package/lib/components/dataSourceComponents/dataSourceForm/index.less +1 -1
  136. package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
  137. package/lib/components/dataSourceComponents/dataSourceForm/serve.js +3 -2
  138. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
  139. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +58 -11
  140. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
  141. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +38 -0
  142. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
  143. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +38 -0
  144. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
  145. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +44 -0
  146. package/lib/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
  147. package/lib/components/dataSourceComponents/dataSourceShow/utils.js +95 -0
  148. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +29 -90
  149. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
  150. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +176 -0
  151. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
  152. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +176 -0
  153. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  154. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
  155. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +24 -37
  156. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
  157. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +53 -7
  158. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
  159. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +73 -3
  160. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
  161. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +236 -0
  162. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
  163. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +38 -11
  164. package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
  165. package/lib/components/dataSourceComponents/dataSourceTable/index.js +1 -0
  166. package/lib/components/dataSourceComponents/dataSourceTable/index.less +5 -0
  167. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
  168. package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
  169. package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +51 -0
  170. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
  171. package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +14 -2
  172. package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +3 -1
  173. package/lib/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
  174. package/lib/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
  175. package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
  176. package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +41 -0
  177. package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
  178. package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +42 -0
  179. package/lib/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
  180. package/lib/components/dataSourceComponents/fields/DateRangePicker/index.js +39 -0
  181. package/lib/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
  182. package/lib/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
  183. package/lib/components/dataSourceComponents/fields/DateRangePicker/type.js +17 -0
  184. package/lib/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
  185. package/lib/components/dataSourceComponents/fields/Input/index.js +4 -0
  186. package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
  187. package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +39 -0
  188. package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
  189. package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.js +57 -0
  190. package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
  191. package/lib/components/dataSourceComponents/fields/Input.Email/index.js +38 -0
  192. package/lib/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
  193. package/lib/components/dataSourceComponents/fields/Input.Email/type.js +17 -0
  194. package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
  195. package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
  196. package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +30 -2
  197. package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
  198. package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
  199. package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +39 -0
  200. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
  201. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +43 -0
  202. package/lib/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
  203. package/lib/components/dataSourceComponents/fields/Input.Phone/index.js +38 -0
  204. package/lib/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
  205. package/lib/components/dataSourceComponents/fields/Input.Phone/type.js +17 -0
  206. package/lib/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
  207. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  208. package/lib/components/dataSourceComponents/fields/index.d.ts +46 -5
  209. package/lib/components/dataSourceComponents/fields/index.js +6 -1
  210. package/lib/components/dataSourceComponents/fields/type.d.ts +18 -0
  211. package/lib/components/dataSourceComponents/fields/type.js +17 -0
  212. package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
  213. package/lib/components/dataSourceComponents/fields/utils.js +134 -0
  214. package/lib/components/dataSourceComponents/hooks/useActions.js +14 -5
  215. package/lib/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
  216. package/lib/components/dataSourceComponents/hooks/useComponentId.js +32 -0
  217. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
  218. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
  219. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +29 -16
  220. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
  221. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +17 -8
  222. package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
  223. package/lib/components/dataSourceComponents/provider/variables/utils.js +15 -2
  224. package/lib/components/filter/components/Dropdown/index.d.ts +1 -0
  225. package/lib/components/filter/components/Dropdown/index.js +6 -2
  226. package/lib/components/filter/components/FilterButton/index.js +5 -3
  227. package/lib/components/filter/components/FilterButton/types.d.ts +2 -0
  228. package/lib/components/pisellAnchor/index.less +77 -77
  229. package/lib/components/pisellStatisticList/index.less +1 -1
  230. package/lib/components/pisellWalletPassCard/index.js +1 -1
  231. package/lib/components/pisellWalletPassCard/index.less +23 -9
  232. package/lib/components/table/Actions/index.js +18 -9
  233. package/lib/components/table/Gallery/index.d.ts +3 -3
  234. package/lib/components/table/Gallery/index.js +17 -0
  235. package/lib/components/table/Gallery/index.less +1 -0
  236. package/lib/components/table/Header/index.d.ts +10 -3
  237. package/lib/components/table/Header/index.js +29 -4
  238. package/lib/components/table/Header/index.less +10 -2
  239. package/lib/components/table/Table/utils.js +4 -0
  240. package/lib/components/table/Tabs/index.d.ts +14 -0
  241. package/lib/components/table/Tabs/index.js +70 -0
  242. package/lib/components/table/hooks/useTriggerValuesChange.js +3 -0
  243. package/lib/components/table/index.js +17 -2
  244. package/lib/components/table/types.d.ts +14 -2
  245. package/lib/components/typography/index.d.ts +2 -2
  246. package/lib/components/typography/index.js +4 -3
  247. package/lib/components/walletCard/index.d.ts +6 -4
  248. package/lib/components/walletCard/index.js +24 -13
  249. package/lib/index.d.ts +4 -0
  250. package/lib/index.js +12 -0
  251. package/lib/locales/en-US.d.ts +7 -0
  252. package/lib/locales/en-US.js +8 -1
  253. package/lib/locales/zh-CN.d.ts +7 -0
  254. package/lib/locales/zh-CN.js +8 -1
  255. package/lib/locales/zh-TW.d.ts +7 -0
  256. package/lib/locales/zh-TW.js +8 -1
  257. package/lowcode/_utils/defaultSchema.ts +452 -83
  258. package/lowcode/_utils/type.ts +5 -0
  259. package/lowcode/_utils/utils.ts +1 -0
  260. package/lowcode/button/meta.ts +1 -2
  261. package/lowcode/data-source-form/constants.ts +5 -0
  262. package/lowcode/data-source-form/meta.ts +259 -273
  263. package/lowcode/data-source-form/snippets.ts +9 -0
  264. package/lowcode/data-source-form/utils.ts +80 -15
  265. package/lowcode/data-source-image/meta.ts +74 -0
  266. package/lowcode/data-source-image/snippets.ts +14 -0
  267. package/lowcode/data-source-qrcode/meta.ts +158 -0
  268. package/lowcode/data-source-qrcode/snippets.ts +20 -0
  269. package/lowcode/data-source-table/meta.ts +4577 -2285
  270. package/lowcode/data-source-table/snippets.ts +10 -4
  271. package/lowcode/data-source-table/utils.tsx +254 -0
  272. package/lowcode/data-source-typography/meta.ts +54 -0
  273. package/lowcode/data-source-typography.text/meta.ts +212 -0
  274. package/lowcode/data-source-typography.text/snippets.ts +12 -0
  275. package/lowcode/data-source-wrapper/meta.ts +243 -0
  276. package/lowcode/data-source-wrapper/snippets.ts +11 -0
  277. package/lowcode/data-source-wrapper/utils.ts +45 -0
  278. package/lowcode/form-item-color-picker/snippets.ts +1 -0
  279. package/lowcode/form-item-input/meta.ts +2 -1
  280. package/lowcode/form-item-input/snippets.ts +2 -1
  281. package/lowcode/form-item-input.email/meta.ts +284 -0
  282. package/lowcode/form-item-input.email/snippets.ts +35 -0
  283. package/lowcode/form-item-input.phone/meta.ts +295 -0
  284. package/lowcode/form-item-input.phone/snippets.ts +16 -0
  285. package/lowcode/form-item-input.text-area/meta.ts +243 -32
  286. package/lowcode/form-item-input.text-area/snippets.ts +2 -1
  287. package/lowcode/form-item-input.url/meta.ts +44 -20
  288. package/lowcode/form-item-input.url/snippets.ts +5 -5
  289. package/lowcode/table/snippets.ts +6 -0
  290. package/lowcode/test/meta.ts +1 -2
  291. package/package.json +4 -4
@@ -0,0 +1,38 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/dataSourceComponents/fields/Input.Email/index.tsx
30
+ var Input_exports = {};
31
+ __export(Input_exports, {
32
+ default: () => Input_default
33
+ });
34
+ module.exports = __toCommonJS(Input_exports);
35
+ var import_utils = require("../../dataSourceForm/utils");
36
+ var import_WithMode = __toESM(require("./WithMode"));
37
+ var Email = (0, import_utils.withFormItem)(import_WithMode.default);
38
+ var Input_default = Email;
@@ -0,0 +1,5 @@
1
+ import { InputProps as AntInputProps } from 'antd';
2
+ import { ModeType } from "../../dataSourceForm/type";
3
+ export interface InputProps extends AntInputProps {
4
+ renderMode: ModeType;
5
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/dataSourceComponents/fields/Input.Email/type.ts
16
+ var type_exports = {};
17
+ module.exports = __toCommonJS(type_exports);
@@ -36,9 +36,9 @@ var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var JsonReadPretty = (props) => {
38
38
  if ((0, import_utils.isString)(props.value)) {
39
- return /* @__PURE__ */ import_react.default.createElement("span", null, props.value);
39
+ return /* @__PURE__ */ import_react.default.createElement("pre", null, props.value);
40
40
  } else if ((0, import_utils.isPlainObject)(props.value)) {
41
- return /* @__PURE__ */ import_react.default.createElement("span", null, JSON.stringify(props.value, null, 2));
41
+ return /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(props.value, null, 2));
42
42
  }
43
43
  return null;
44
44
  };
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const JsonWithMode: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../../dataSourceForm/utils").WithModeProps>;
1
+ import React from 'react';
2
+ declare const JsonWithMode: React.FC<any>;
3
3
  export default JsonWithMode;
@@ -26,14 +26,42 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // src/components/dataSourceComponents/fields/Input.Json/WithMode.ts
29
+ // src/components/dataSourceComponents/fields/Input.Json/WithMode.tsx
30
30
  var WithMode_exports = {};
31
31
  __export(WithMode_exports, {
32
32
  default: () => WithMode_default
33
33
  });
34
34
  module.exports = __toCommonJS(WithMode_exports);
35
+ var import_react = __toESM(require("react"));
35
36
  var import_antd = require("antd");
36
37
  var import_ReadPretty = __toESM(require("./ReadPretty"));
37
38
  var import_utils = require("../../dataSourceForm/utils");
38
- var JsonWithMode = (0, import_utils.withMode)(import_antd.Input.TextArea, import_ReadPretty.default);
39
+ var JsonInput = (props) => {
40
+ const { onChange, onBlur, value, ...restProps } = props;
41
+ const [innerValue, setInnerValue] = (0, import_react.useState)(value);
42
+ (0, import_react.useEffect)(() => {
43
+ setInnerValue(value);
44
+ }, [value]);
45
+ const handleChange = (e) => {
46
+ setInnerValue(e.target.value);
47
+ };
48
+ const handleBlur = (e) => {
49
+ if (onBlur) {
50
+ onBlur(e);
51
+ }
52
+ if (onChange) {
53
+ onChange(e.target.value);
54
+ }
55
+ };
56
+ return /* @__PURE__ */ import_react.default.createElement(
57
+ import_antd.Input.TextArea,
58
+ {
59
+ ...restProps,
60
+ value: innerValue,
61
+ onChange: handleChange,
62
+ onBlur: handleBlur
63
+ }
64
+ );
65
+ };
66
+ var JsonWithMode = (0, import_utils.withMode)(JsonInput, import_ReadPretty.default);
39
67
  var WithMode_default = JsonWithMode;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const Json: React.FC<import("antd/es/input").TextAreaProps & React.RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
2
+ declare const Json: React.FC<any>;
3
3
  export default Json;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { InputProps } from "./type";
3
+ declare const InputReadPretty: (props: InputProps) => React.JSX.Element;
4
+ export default InputReadPretty;
@@ -0,0 +1,39 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/dataSourceComponents/fields/Input.Phone/ReadPretty.tsx
30
+ var ReadPretty_exports = {};
31
+ __export(ReadPretty_exports, {
32
+ default: () => ReadPretty_default
33
+ });
34
+ module.exports = __toCommonJS(ReadPretty_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var InputReadPretty = (props) => {
37
+ return /* @__PURE__ */ import_react.default.createElement("span", null, props.value);
38
+ };
39
+ var ReadPretty_default = InputReadPretty;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ declare const PhoneWithMode: React.FC<InputProps & import("../../dataSourceForm/utils").WithModeProps>;
4
+ export default PhoneWithMode;
@@ -0,0 +1,43 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/dataSourceComponents/fields/Input.Phone/WithMode.tsx
30
+ var WithMode_exports = {};
31
+ __export(WithMode_exports, {
32
+ default: () => WithMode_default
33
+ });
34
+ module.exports = __toCommonJS(WithMode_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_ReadPretty = __toESM(require("./ReadPretty"));
38
+ var import_utils = require("../../dataSourceForm/utils");
39
+ var Phone = (props) => {
40
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { ...props, type: "tel" });
41
+ };
42
+ var PhoneWithMode = (0, import_utils.withMode)(Phone, import_ReadPretty.default);
43
+ var WithMode_default = PhoneWithMode;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Phone: React.FC<import("antd").InputProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
3
+ export default Phone;
@@ -0,0 +1,38 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/dataSourceComponents/fields/Input.Phone/index.tsx
30
+ var Input_exports = {};
31
+ __export(Input_exports, {
32
+ default: () => Input_default
33
+ });
34
+ module.exports = __toCommonJS(Input_exports);
35
+ var import_utils = require("../../dataSourceForm/utils");
36
+ var import_WithMode = __toESM(require("./WithMode"));
37
+ var Phone = (0, import_utils.withFormItem)(import_WithMode.default);
38
+ var Input_default = Phone;
@@ -0,0 +1,5 @@
1
+ import { InputProps as AntInputProps } from 'antd';
2
+ import { ModeType } from "../../dataSourceForm/type";
3
+ export interface InputProps extends AntInputProps {
4
+ renderMode: ModeType;
5
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/dataSourceComponents/fields/Input.Phone/type.ts
16
+ var type_exports = {};
17
+ module.exports = __toCommonJS(type_exports);
@@ -34,5 +34,9 @@ __export(InputNumber_exports, {
34
34
  module.exports = __toCommonJS(InputNumber_exports);
35
35
  var import_utils = require("../../dataSourceForm/utils");
36
36
  var import_WithMode = __toESM(require("./WithMode"));
37
- var InputNumber = (0, import_utils.withFormItem)(import_WithMode.default);
37
+ var InputNumber = (0, import_utils.withFormItem)(import_WithMode.default, {
38
+ innerStyle: {
39
+ width: "100%"
40
+ }
41
+ });
38
42
  var InputNumber_default = InputNumber;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
3
3
  options?: any;
4
- optionSourceType?: string | undefined;
4
+ optionSourceType?: "default" | "custom" | "api" | undefined;
5
5
  labelField: string;
6
6
  valueField: string;
7
7
  } & {
@@ -1,23 +1,64 @@
1
1
  /// <reference types="react" />
2
+ declare const formFieldMap: {
3
+ Checkbox: import("react").FC<{}> & {
4
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
5
+ } & {
6
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
7
+ };
8
+ ColorPicker: import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
9
+ DatePicker: import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps>;
10
+ Input: import("react").FC<import("./Input/type").InputProps> & {
11
+ JSON: import("react").FC<any>;
12
+ Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
13
+ TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
14
+ URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
15
+ Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
16
+ Phone: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
17
+ };
18
+ Radio: import("react").FC<{}> & {
19
+ Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
20
+ } & {
21
+ Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
22
+ };
23
+ Select: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
24
+ options?: any;
25
+ optionSourceType?: "default" | "custom" | "api" | undefined;
26
+ labelField: string;
27
+ valueField: string;
28
+ } & {
29
+ dataSource?: any;
30
+ }) => import("react").JSX.Element;
31
+ InputNumber: import("react").FC<any>;
32
+ Percent: import("react").FC<any>;
33
+ TimePicker: import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
34
+ 'Input.JSON': import("react").FC<any>;
35
+ 'Input.URL': import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
36
+ 'Input.Password': import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
37
+ 'Radio.Group': import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
38
+ 'Checkbox.Group': import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
39
+ DateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
40
+ };
2
41
  declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
3
42
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
4
43
  } & {
5
44
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
6
- }) | import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
7
- JSON: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
45
+ }) | import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
46
+ JSON: import("react").FC<any>;
8
47
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
9
48
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
10
49
  URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
50
+ Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
51
+ Phone: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
11
52
  }) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
12
53
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
13
54
  } & {
14
55
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
15
56
  }) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
16
57
  options?: any;
17
- optionSourceType?: string | undefined;
58
+ optionSourceType?: "default" | "custom" | "api" | undefined;
18
59
  labelField: string;
19
60
  valueField: string;
20
61
  } & {
21
62
  dataSource?: any;
22
- }) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
23
- export { getFieldComponent };
63
+ }) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
64
+ export { getFieldComponent, formFieldMap };
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/dataSourceComponents/fields/index.ts
30
30
  var fields_exports = {};
31
31
  __export(fields_exports, {
32
+ formFieldMap: () => formFieldMap,
32
33
  getFieldComponent: () => getFieldComponent
33
34
  });
34
35
  module.exports = __toCommonJS(fields_exports);
@@ -40,6 +41,7 @@ var import_Radio = __toESM(require("./Radio"));
40
41
  var import_Select = __toESM(require("./Select"));
41
42
  var import_InputNumber = __toESM(require("./InputNumber"));
42
43
  var import_TimePicker = __toESM(require("./TimePicker"));
44
+ var import_DateRangePicker = __toESM(require("./DateRangePicker"));
43
45
  var formFieldMap = {
44
46
  Checkbox: import_Checkbox.default,
45
47
  ColorPicker: import_ColorPicker.default,
@@ -48,17 +50,20 @@ var formFieldMap = {
48
50
  Radio: import_Radio.default,
49
51
  Select: import_Select.default,
50
52
  InputNumber: import_InputNumber.default,
53
+ Percent: import_InputNumber.default,
51
54
  TimePicker: import_TimePicker.default,
52
55
  "Input.JSON": import_Input.default.JSON,
53
56
  "Input.URL": import_Input.default.URL,
54
57
  "Input.Password": import_Input.default.Password,
55
58
  "Radio.Group": import_Radio.default.Group,
56
- "Checkbox.Group": import_Checkbox.default.Group
59
+ "Checkbox.Group": import_Checkbox.default.Group,
60
+ DateRangePicker: import_DateRangePicker.default
57
61
  };
58
62
  var getFieldComponent = (fieldComponent) => {
59
63
  return formFieldMap[fieldComponent];
60
64
  };
61
65
  // Annotate the CommonJS export names for ESM import in node:
62
66
  0 && (module.exports = {
67
+ formFieldMap,
63
68
  getFieldComponent
64
69
  });
@@ -0,0 +1,18 @@
1
+ import { Field } from '../provider/dataSource/DataSourceContext';
2
+ import { formFieldMap } from './index';
3
+ export declare type FormFieldComponentType = keyof typeof formFieldMap;
4
+ export declare type FilterFunctionReturnType = {
5
+ $eq?: any;
6
+ $includes?: string;
7
+ $in?: (string | number)[];
8
+ $anyOf?: (string | number)[];
9
+ $isTruly?: boolean;
10
+ $dateAfter?: string;
11
+ $dateBefore?: string;
12
+ $and?: Array<{
13
+ $dateAfter?: string;
14
+ $dateBefore?: string;
15
+ }>;
16
+ };
17
+ export declare type FilterFunction = (value: any, field: Field) => FilterFunctionReturnType | null;
18
+ export declare type FormFieldFilterFuncMapType = Record<FormFieldComponentType, FilterFunction>;
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/dataSourceComponents/fields/type.ts
16
+ var type_exports = {};
17
+ module.exports = __toCommonJS(type_exports);
@@ -0,0 +1,3 @@
1
+ import { FormFieldFilterFuncMapType } from './type';
2
+ declare const formFieldFilterFuncMap: FormFieldFilterFuncMapType;
3
+ export { formFieldFilterFuncMap };
@@ -0,0 +1,134 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/dataSourceComponents/fields/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ formFieldFilterFuncMap: () => formFieldFilterFuncMap
23
+ });
24
+ module.exports = __toCommonJS(utils_exports);
25
+ var import_utils = require("@pisell/utils");
26
+ var formFieldFilterFuncMap = {
27
+ Checkbox: (value) => {
28
+ const key = value ? "$isTruly" : "$isFalsy";
29
+ return {
30
+ [key]: true
31
+ };
32
+ },
33
+ ColorPicker: (value) => {
34
+ return {
35
+ $eq: value
36
+ };
37
+ },
38
+ DatePicker: (value) => {
39
+ const [start, end] = value;
40
+ if (!start || !end) {
41
+ return null;
42
+ }
43
+ const startDate = (0, import_utils.isString)(start) ? start : start.format("YYYY-MM-DD HH:mm:ss");
44
+ const endDate = (0, import_utils.isString)(end) ? end : end.format("YYYY-MM-DD HH:mm:ss");
45
+ return {
46
+ $and: [
47
+ {
48
+ $dateAfter: startDate
49
+ },
50
+ {
51
+ $dateBefore: endDate
52
+ }
53
+ ]
54
+ };
55
+ },
56
+ Input: (value) => {
57
+ return {
58
+ $includes: value
59
+ };
60
+ },
61
+ Radio: (value) => {
62
+ return {
63
+ $eq: value
64
+ };
65
+ },
66
+ Select: (value, field) => {
67
+ const key = field.type === "string" ? "$in" : "$anyOf";
68
+ const formatValue = Array.isArray(value) ? value : [value];
69
+ return {
70
+ [key]: formatValue
71
+ };
72
+ },
73
+ Percent: (value) => {
74
+ return {
75
+ $eq: value
76
+ };
77
+ },
78
+ InputNumber: (value) => {
79
+ return {
80
+ $eq: value
81
+ };
82
+ },
83
+ TimePicker: (value) => {
84
+ return {
85
+ $eq: value
86
+ };
87
+ },
88
+ "Input.JSON": (value) => {
89
+ return {
90
+ $includes: value
91
+ };
92
+ },
93
+ "Input.URL": (value) => {
94
+ return {
95
+ $includes: value
96
+ };
97
+ },
98
+ "Input.Password": (value) => {
99
+ return {
100
+ $includes: value
101
+ };
102
+ },
103
+ DateRangePicker: (value) => {
104
+ const [start, end] = value;
105
+ const startDate = (0, import_utils.isString)(start) ? start : start.format("YYYY-MM-DD HH:mm:ss");
106
+ const endDate = (0, import_utils.isString)(end) ? end : end.format("YYYY-MM-DD HH:mm:ss");
107
+ return {
108
+ $and: [
109
+ {
110
+ $dateAfter: startDate
111
+ },
112
+ {
113
+ $dateBefore: endDate
114
+ }
115
+ ]
116
+ };
117
+ },
118
+ "Radio.Group": (value) => {
119
+ const formatValue = Array.isArray(value) ? value : [value];
120
+ return {
121
+ $in: formatValue
122
+ };
123
+ },
124
+ "Checkbox.Group": (value) => {
125
+ const formatValue = Array.isArray(value) ? value : [value];
126
+ return {
127
+ $anyOf: formatValue
128
+ };
129
+ }
130
+ };
131
+ // Annotate the CommonJS export names for ESM import in node:
132
+ 0 && (module.exports = {
133
+ formFieldFilterFuncMap
134
+ });