@innoways/utils
Version:
drip-form通用方法
419 lines (248 loc) • 18.6 kB
Markdown
# Change Log
## 8.0.15
### Patch Changes
- Fix: fixed country state city field reset issue on change
## 8.0.14
### Patch Changes
- fix checkbox field not checked issue
## 8.0.13
### Patch Changes
- version 8.0.13
## 8.0.12
### Patch Changes
- 8.0.12
## 8.0.11
### Patch Changes
- Added loader for formvalue add api call
## 8.0.10
### Patch Changes
- fixed title set issue version 8.1.0
## 8.0.9
### Patch Changes
- Fixed auto details fetch issue using formValue api, version 8.0.9
## 8.0.8
### Patch Changes
- Feature: added autoFormValue get and save, version 8.0.8
## 8.0.7
### Patch Changes
- fixed fieldKey default to apiKey version 8.0.7
## 8.0.6
### Patch Changes
- fixed fieldKey default to apiKey version 8.0.6
## 8.0.5
### Patch Changes
- fixed payload issues 8.0.5
## 8.0.4
### Patch Changes
- fixed null field issues 8.0.4
## 8.0.3
### Patch Changes
- fixed select field issues 8.0.3
## 8.0.2
### Patch Changes
- feature: input box view mode fix 8.0.2
## 8.0.1
### Patch Changes
- feature: date view mode format 8.0.1
## 8.0.0
### Major Changes
- console.log(showCurrentDate, 'showCurrentDate', fieldData)
## 7.0.0
### Major Changes
- feature: nested api key support and data fetch and post changes 6.3.4
## 6.3.5
### Patch Changes
- feature: nested api key support and data fetch and post changes 6.3.4
## 6.3.4
### Patch Changes
- feature: place auto complete search feature added, version 6.3.3
## 6.3.3
### Patch Changes
- feature: place auto complete search feature added, version 6.3.3
## 6.3.2
### Patch Changes
- feature: Added new field component place auto complete, version 6.3.2
## 6.3.1
### Patch Changes
- Added hideOnViewMode feature version 6.3.1.
## 6.3.0
### Minor Changes
- Fixed token issues added version 6.3.0
## 6.2.10
### Patch Changes
- Fixed thme issues added version 6.2.10
## 6.2.9
### Patch Changes
- Fixed thme issues added version 6.2.8
## 6.2.8
### Patch Changes
- Fixed valication errors, added version 6.2.8
## 6.2.7
### Patch Changes
- Added version 6.2.7 fixed date issue
## 6.2.6
### Patch Changes
- disabled form data reset after submit
## 6.2.5
### Patch Changes
- Added single checkbox feature
## 6.2.4
### Patch Changes
- Added bottom button bgcolor and global bgcolor config, changed date picker to flatpickr
## 6.2.3
### Patch Changes
- Fix: modified antd peer dependency
## 6.2.2
### Patch Changes
- added callback on submit
## 6.2.1
### Patch Changes
- modified feature to post data on submit
## 6.2.0
### Minor Changes
- adde version 6.2.0
## 6.1.1
### Patch Changes
- modified tree table styles
## 6.1.0
### Minor Changes
- Added tree table feature
## 6.0.0
### Major Changes
- major datefix
## 5.0.0
### Major Changes
- changed all jdfed imports to innoways
## 4.0.0
### Major Changes
- ajv update
## 3.0.0
### Major Changes
- Initial version
## 2.0.0
### Major Changes
- Initial changelog
## 1.0.0
### Major Changes
- Initial changelog
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
### [0.8.2](https://github.com/jdfed/drip-form/compare/v0.8.1...v0.8.2) (2022-07-15)
### Bug Fixes
- inaccurate width calculation when margin contains extra spaces ([#233](https://github.com/jdfed/drip-form/issues/233)) ([22f4eeb](https://github.com/jdfed/drip-form/commit/22f4eeb96f5a0f2b39eae69705f0a2e65e1e8ee1))
### [0.8.1](https://github.com/jdfed/drip-form/compare/v0.8.0...v0.8.1) (2022-06-29)
### Bug Fixes
- **generator:** compatibility with old data ([#217](https://github.com/jdfed/drip-form/issues/217)) ([ece5bfc](https://github.com/jdfed/drip-form/commit/ece5bfc9755d53c598ad2a577100a79abd4119d9))
- **utils:** handleMargin function cannot properly handle the width when margin is set to 4 values ([#222](https://github.com/jdfed/drip-form/issues/222)) ([70f9a4c](https://github.com/jdfed/drip-form/commit/70f9a4cfeb28aa232e6ef3aad5779bca27d8c4f2))
## [0.8.0](https://github.com/jdfed/drip-form/compare/v0.7.0...v0.8.0) (2022-06-01)
### Features
- **form:** array container supports sorting ([#206](https://github.com/jdfed/drip-form/issues/206)) ([7a60b0b](https://github.com/jdfed/drip-form/commit/7a60b0b3e2eb9af8d6b479356ceee659bba86947))
- **generator:** support the same type for different themes ([#211](https://github.com/jdfed/drip-form/issues/211)) ([23cf581](https://github.com/jdfed/drip-form/commit/23cf581dca35b93b6d33640f67250fcd37c32009))
- combine method supports configuring the configuration to transform fieldkeys ([f3fef68](https://github.com/jdfed/drip-form/commit/f3fef681cccc7f5b900e65fa796e995090d316b2))
- title add showColon configuration ([#199](https://github.com/jdfed/drip-form/issues/199)) ([d8d32ef](https://github.com/jdfed/drip-form/commit/d8d32ef06f77015a4c76a37254daae5eedb28379))
- **utils:** parseUnitedSchema supports transparent DataSchema keywords ([#190](https://github.com/jdfed/drip-form/issues/190)) ([a1062c3](https://github.com/jdfed/drip-form/commit/a1062c3195bf9000d1c7e0016131965d55d6d77d))
- customize component fontSize and fontColor ([#178](https://github.com/jdfed/drip-form/issues/178)) ([3199e29](https://github.com/jdfed/drip-form/commit/3199e29e7338cb78cd8c6d702b3c55df9562c157))
- title support fontSize、color configuration ([#177](https://github.com/jdfed/drip-form/issues/177)) ([d83836c](https://github.com/jdfed/drip-form/commit/d83836ce1827bf0af082e345e0710391b6f963ff))
### Bug Fixes
- margin affect the number of layout columns ([#210](https://github.com/jdfed/drip-form/issues/210)) ([e5ebb44](https://github.com/jdfed/drip-form/commit/e5ebb44591ccea9bccd261becac251737dce6b8e))
- **generator:** default configuration is not effective ([7e97006](https://github.com/jdfed/drip-form/commit/7e9700633a66b8221bbe43782fc998b564e044a4))
## [0.7.0](https://github.com/jdfed/drip-form/compare/v0.6.0...v0.7.0) (2022-03-14)
### Features
- **generator:** datepicker add default configuration ([a238424](https://github.com/jdfed/drip-form/commit/a238424c1aed9382735d1e2de1ec60890dd851c4))
- containerStyle configuration add padding prop ([27cefed](https://github.com/jdfed/drip-form/commit/27cefeda6cf880cc1d113a70624eea6789683937))
- unitedSchema JSON add requiredMode configuration ([#150](https://github.com/jdfed/drip-form/issues/150)) ([7e717ef](https://github.com/jdfed/drip-form/commit/7e717ef9431228809fd5f2d3908a274f181225ec))
- **generator:** support change fieldKey in the property configuration panel ([#144](https://github.com/jdfed/drip-form/issues/144)) ([9681f62](https://github.com/jdfed/drip-form/commit/9681f62083c8c4feba7c4b1538b3ae99838545a3))
## [0.6.0](https://github.com/jdfed/drip-form/compare/v0.5.0...v0.6.0) (2022-01-24)
### Bug Fixes
- reset 导致 visbleFieldKey 清空,错误信息无法展示 ([c4d839c](https://github.com/jdfed/drip-form/commit/c4d839c6cf9199459c7c90244f75d29c687b326b))
- 修复 errorMessage 在对象数组未透传问题 ([d69d1d6](https://github.com/jdfed/drip-form/commit/d69d1d6b98bf73a630d78c47537e154ace7d2616))
- 数组内部子元素校验失效 ([#126](https://github.com/jdfed/drip-form/issues/126)) ([6f0a89e](https://github.com/jdfed/drip-form/commit/6f0a89e20c276c35699607956668152100b28e45))
- 数组容器组件 key 兜底使用数组下标导致删除错乱 ([#131](https://github.com/jdfed/drip-form/issues/131)) ([cc73d8d](https://github.com/jdfed/drip-form/commit/cc73d8d558114eb5ed339a9a6e98cc37fe435332))
- 校验配置 0,错误文案配置不展示 ([5f0f211](https://github.com/jdfed/drip-form/commit/5f0f2118488df32f1d579ca024a3556e4f91e049))
## [0.5.0](https://github.com/jdfed/drip-form/compare/v0.4.0...v0.5.0) (2022-01-13)
### Features
- setError 支持配置 action.ignore ([#125](https://github.com/jdfed/drip-form/issues/125)) ([b84aa5e](https://github.com/jdfed/drip-form/commit/b84aa5eead2b3f384d70bb45ce2961fcb1afbd1d))
## 0.4.0 (2022-01-11)
### Features
- upload support img size limit ([#102](https://github.com/jdfed/drip-form/issues/102)) ([acbd278](https://github.com/jdfed/drip-form/commit/acbd27861a44004abf3afb7ae5ca5d210c70c28d))
- 数组容器样式优化 & 支持序号文案自定义 ([#109](https://github.com/jdfed/drip-form/issues/109)) ([2ca6f67](https://github.com/jdfed/drip-form/commit/2ca6f67a2b894fc0152230f3bee69f279bce640c))
### Bug Fixes
- custom keyword duplicate error ([#84](https://github.com/jdfed/drip-form/issues/84)) ([afcaa7d](https://github.com/jdfed/drip-form/commit/afcaa7df4d0a2255de1685e37c59962d192c2b7e))
- provide a default key for dynamic children ([#53](https://github.com/jdfed/drip-form/issues/53)) ([3abe606](https://github.com/jdfed/drip-form/commit/3abe6068e20d2d567426eb7ee637e2b6a0c93af5))
- 修复元祖无数据不展示问题 ([#112](https://github.com/jdfed/drip-form/issues/112)) ([a67ae0e](https://github.com/jdfed/drip-form/commit/a67ae0e441d06d26812d257e34f82a245c9a84ea))
- **utils:** 修复 parse 无法解析顶层$:xxx 自定义属性的问题 ([36235e5](https://github.com/jdfed/drip-form/commit/36235e56f477461c49b4f59149c6da7e6ede99d9))
## 0.3.0 (2022-01-11)
### Features
- upload support img size limit ([#102](https://github.com/jdfed/drip-form/issues/102)) ([acbd278](https://github.com/jdfed/drip-form/commit/acbd27861a44004abf3afb7ae5ca5d210c70c28d))
- 数组容器样式优化 & 支持序号文案自定义 ([#109](https://github.com/jdfed/drip-form/issues/109)) ([2ca6f67](https://github.com/jdfed/drip-form/commit/2ca6f67a2b894fc0152230f3bee69f279bce640c))
### Bug Fixes
- custom keyword duplicate error ([#84](https://github.com/jdfed/drip-form/issues/84)) ([afcaa7d](https://github.com/jdfed/drip-form/commit/afcaa7df4d0a2255de1685e37c59962d192c2b7e))
- provide a default key for dynamic children ([#53](https://github.com/jdfed/drip-form/issues/53)) ([3abe606](https://github.com/jdfed/drip-form/commit/3abe6068e20d2d567426eb7ee637e2b6a0c93af5))
- 修复元祖无数据不展示问题 ([#112](https://github.com/jdfed/drip-form/issues/112)) ([a67ae0e](https://github.com/jdfed/drip-form/commit/a67ae0e441d06d26812d257e34f82a245c9a84ea))
- **utils:** 修复 parse 无法解析顶层$:xxx 自定义属性的问题 ([36235e5](https://github.com/jdfed/drip-form/commit/36235e56f477461c49b4f59149c6da7e6ede99d9))
## 0.2.0 (2022-01-07)
### Features
- upload support img size limit ([#102](https://github.com/jdfed/drip-form/issues/102)) ([acbd278](https://github.com/jdfed/drip-form/commit/acbd27861a44004abf3afb7ae5ca5d210c70c28d))
### Bug Fixes
- custom keyword duplicate error ([#84](https://github.com/jdfed/drip-form/issues/84)) ([afcaa7d](https://github.com/jdfed/drip-form/commit/afcaa7df4d0a2255de1685e37c59962d192c2b7e))
- provide a default key for dynamic children ([#53](https://github.com/jdfed/drip-form/issues/53)) ([3abe606](https://github.com/jdfed/drip-form/commit/3abe6068e20d2d567426eb7ee637e2b6a0c93af5))
- **utils:** 修复 parse 无法解析顶层$:xxx 自定义属性的问题 ([36235e5](https://github.com/jdfed/drip-form/commit/36235e56f477461c49b4f59149c6da7e6ede99d9))
**Note:** Version bump only for package @jdfed/utils
## 0.1.0 (2021-11-24)
### Features
- 打包&文档 ([a65b57e](https://github.com/jdfed/drip-form/commit/a65b57e1fa390dc38d1bd3d9a5cb2c98f446744f))
- 关键字插件化处理 ([591d492](https://github.com/jdfed/drip-form/commit/591d492018cc6dcb092dec533d9d078ed8810b83))
- 关键字插件化处理 ([b560f22](https://github.com/jdfed/drip-form/commit/b560f220bd7bda8614a8f94a60cf5a2a3417e584))
- 迁移 babel-form 至 drip-form ([7687505](https://github.com/jdfed/drip-form/commit/768750518a8fdd9de93234fb8fbd5fc1cbd555b6))
- 嵌套表单 ([b939eed](https://github.com/jdfed/drip-form/commit/b939eed9bf23db5efa9a6c8177a24b397f4e8ba8))
- 删除 Spin loading ([1a6d7df](https://github.com/jdfed/drip-form/commit/1a6d7df9e638d49bb3b938c2bbc46fb274bb6ea3))
- 升级 ajv ([1708e2c](https://github.com/jdfed/drip-form/commit/1708e2c8ad8581a78be9923f194c494e2f970a4c))
- 添加自定义 export 函数,测试 iframe 外部控制导出逻辑 ([de01461](https://github.com/jdfed/drip-form/commit/de014610c37d43959a3311148e27b0bf7ec49d27))
- 添加 combine & 修复 addField 类型引用错误的问题 ([cd5fb7d](https://github.com/jdfed/drip-form/commit/cd5fb7d73704739073f734dcd1ca384299ba2f67))
- 添加 typePath 入参 reducer ([22d9af6](https://github.com/jdfed/drip-form/commit/22d9af63b4a218ccb20971a6ac0ebda3916647e1))
- 拖拽优化 ([90e2251](https://github.com/jdfed/drip-form/commit/90e22517082fe2a432bb443fc1961451da7b2ba0))
- 完成嵌套解析 ([f98dca4](https://github.com/jdfed/drip-form/commit/f98dca4a27999a3839bb9721a3e83b114799fb05))
- 完善拖拽区操作 ([08cc07a](https://github.com/jdfed/drip-form/commit/08cc07ab74260d233ece26051142680ae89e8c03))
- 文件结构优化 & 添加 combine 和 parse 的 errMsg 单测数据 ([108a6e4](https://github.com/jdfed/drip-form/commit/108a6e456782ca6f8cfe242520a34aa540af943f))
- 支持跨表单获取数据 ([ff9eecb](https://github.com/jdfed/drip-form/commit/ff9eecbfcbf7b87527e060cb6637e7b8a009137c))
- 支持配置底部按钮&优化属性配置 ([db07029](https://github.com/jdfed/drip-form/commit/db070296f612a2ff3394424f319f0e27b2734fae))
- 支持拖拽 ([45bba5c](https://github.com/jdfed/drip-form/commit/45bba5c4f75a268b06310105b6865bb42f3eca39))
- **generator:** 支持校验 ([93367c5](https://github.com/jdfed/drip-form/commit/93367c5d965007638b51653459f1faeff9d637c5))
- **generator:** 支持校验联动 ([ed519f5](https://github.com/jdfed/drip-form/commit/ed519f559ea5ceb0524787f6a8e343fbe845024b))
- 支持 set、get、merge ([dc267b6](https://github.com/jdfed/drip-form/commit/dc267b6a23d7d9a8b5bf3edff303adfed7a98056))
- babel-form 初始化 ([51fd2af](https://github.com/jdfed/drip-form/commit/51fd2af04a66c1d84970a8060174e20b0d859746))
- container 外部封装高阶拖拽组件 ([45f8427](https://github.com/jdfed/drip-form/commit/45f842764601aaa44b267a39f3530827be11c0a3))
- generator 可视化拖拽区域进度 80% ([b999cfd](https://github.com/jdfed/drip-form/commit/b999cfde748d98ee6cac457636893a7a7f74ee02))
- jest 单元测试&&utils 单测&&fix: seetDeepProp ([30748ee](https://github.com/jdfed/drip-form/commit/30748eea8f48260184a92c0bf300b7033b33cb8f))
- merge master ([1f5d45c](https://github.com/jdfed/drip-form/commit/1f5d45ce1cdd7b86a80cd049631eb9d46a6310e7))
- setDeepProp typeMap 未定义,默认未对象 ([312db6e](https://github.com/jdfed/drip-form/commit/312db6e073b574e9ad292373bd4dde9591d14e28))
- upload 支持 maxFileNumber 和 customUpload ([54c3611](https://github.com/jdfed/drip-form/commit/54c361148e66e65ea0ec505b2bf6cb059048eba2))
### Bug Fixes
- 必填校验失效 ([393e65a](https://github.com/jdfed/drip-form/commit/393e65a964594430a5f856e6cbba605cbe414693))
- 修复导出包无法被 vite 或 snowpack 使用的问题 ([37f6636](https://github.com/jdfed/drip-form/commit/37f6636124ecd3223eac7152fb19a4accf2c5ca8))
- 修复合并冲突 ([2fcc913](https://github.com/jdfed/drip-form/commit/2fcc9132017b121ad849a5d7f6186ba7cd628673))
- 修复如时间选择器这类一个 fieldKey 对应多个值的组件,在 parse 和 combine 中子项被错误解析的问题 ([e11e0e1](https://github.com/jdfed/drip-form/commit/e11e0e1d55c4aaf90405a6c3387a8bb5fbbd2843))
- 修复样式包的问题 ([7a87bdf](https://github.com/jdfed/drip-form/commit/7a87bdf9e7364493e541fe60f653067336bef9a0))
- 修复一系列问题 ([52d3e42](https://github.com/jdfed/drip-form/commit/52d3e4258f962958189f1c8ced9b8c20dcf24653))
- 修复因 ajv 版本不一致导致的报错问题 ([ecf0901](https://github.com/jdfed/drip-form/commit/ecf09018d51c66c2e9d328c0696a7cb15ff45188))
- 修复元组类型解析错误问题 ([b4ada65](https://github.com/jdfed/drip-form/commit/b4ada65f857184c7a3c15012ea5d5d385aac89d4))
- 修复 combine theme 丢失问题 ([f9979f1](https://github.com/jdfed/drip-form/commit/f9979f168e5f15bbbae27d6c3a8f49c3cbc6b409))
- 修复 combine 未针对 errorMessage 处理的问题 ([46b3027](https://github.com/jdfed/drip-form/commit/46b30273fbbefcf38fae1bbccdcfdc2a3dec2503))
- 修复 common.ts ([86c0d9a](https://github.com/jdfed/drip-form/commit/86c0d9a3f3b7a68f0b212dd030fea84f6ea0381f))
- 修复 dataSchema 中包含$container 的问题 ([044ee44](https://github.com/jdfed/drip-form/commit/044ee44d71c27b3ab83328797c2131d20ea2c4da))
- 修复 errMsg 在 combine 中丢失的问题 ([f106ab6](https://github.com/jdfed/drip-form/commit/f106ab6c0463913b4e636aeb2d7d4c310f30623a))
- 修复 errorMessage parse 时放置位置错误的问题 ([82d77a2](https://github.com/jdfed/drip-form/commit/82d77a2d69646864287302e8c88ac166236795da))
- 修复 exports 被删除后无法打包的问题 ([9d54151](https://github.com/jdfed/drip-form/commit/9d54151a8445fd0b7849b1ce2f806f4db8ef07a1))
- 修复 typePath 没有动态生成的问题 ([f338118](https://github.com/jdfed/drip-form/commit/f338118011f394e74975a73d09f7168ef4e7692a))
- 修复 usefield 删除校验状态异常&number 为 0 非空判断 ([242d503](https://github.com/jdfed/drip-form/commit/242d50319875eb007440e36800e08158aef8022b))
- 修复 viewport 无法更新 schema 的问题 & parse 对于无 fieldKey 状态的兜底处理逻辑 ([007cd89](https://github.com/jdfed/drip-form/commit/007cd897855c8b680d16823c5dca6a6f3e6afa05))
- 一系列问题 ([52f612a](https://github.com/jdfed/drip-form/commit/52f612a37c20c55ae5957365aa249e9ffff96db3))
- 移除多余 console & 调整代码结构 ([bc17f1a](https://github.com/jdfed/drip-form/commit/bc17f1aca8e9e5dfdbca23ea01d51af869dfd056))
- combine 方法中的判空处理 ([97c8f45](https://github.com/jdfed/drip-form/commit/97c8f454ea176edfa1c38c7c0f00f819c0032295))
- fieldKey 第一层级为数字索引时,typeMap 正则解析错误 ([069aabc](https://github.com/jdfed/drip-form/commit/069aabcb6d365ed2e414be9181d92d6828554394))
- isEmpty 传布尔值,返回 false ([2d5624b](https://github.com/jdfed/drip-form/commit/2d5624bf326cb2ef204fdd9b54595211d08f93eb))
- ts 声明 ([7800503](https://github.com/jdfed/drip-form/commit/7800503addeaf8b2a75ac8fd205934d00a0c8479))
- ts 支持 ([f75b705](https://github.com/jdfed/drip-form/commit/f75b705eaa00890bcd9c7f442c5521e770b16849))
### Performance Improvements
- 优化右侧面板联动渲染区的逻辑 ([2233a14](https://github.com/jdfed/drip-form/commit/2233a1472d630df83da6984fcdba0f52a93ccfaa))
- parse 移除 delete null 操作 ([aae5528](https://github.com/jdfed/drip-form/commit/aae55288b99f778c6d2cad86749acf0ea73927e8))