@hzab/utils 1.1.5 → 1.1.7
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.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/dist/index.cjs +1532 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +741 -0
- package/dist/index.d.ts +741 -0
- package/dist/index.js +1423 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -49
- package/src/color.ts +8 -8
- package/src/file/file.ts +4 -3
- package/src/file/fileType.ts +1 -1
- package/src/formily/field.ts +142 -0
- package/src/global.d.ts +9 -0
- package/src/idCardVerify.ts +1 -1
- package/src/img-utils.ts +9 -9
- package/src/index.ts +43 -0
- package/src/nanoid.ts +19 -19
- package/src/options.ts +248 -226
- package/src/sizeAdapter.ts +108 -0
- package/src/upload/OfflineUpload.ts +2 -2
- package/src/upload/OssUploadUtil.ts +1 -1
- package/src/upload/fileDataNormalization.ts +3 -3
- package/src/upload/ossUpload.ts +3 -2
- package/src/upload/uploadUtils.ts +6 -1
- package/src/url.ts +181 -155
- package/README.md +0 -137
- package/changelog.md +0 -52
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @hzab/utils@1.1.7
|
|
2
|
+
|
|
3
|
+
chore: 本仓迁移版本首次发布(源码直出 `main: "src"` + 类型入口指向 `dist`)
|
|
4
|
+
|
|
5
|
+
- 包由 `foundation` 层移至 `react` 层(`packages/react/utils`),包名与 `@hzab/utils/src/*` 深路径不变
|
|
6
|
+
- 新增根入口 barrel `src/index.ts`(此前仅深路径可用);`file/*`、`formily/*`、`upload/*` 因存在重名导出仍走深路径
|
|
7
|
+
- 新增 `src/formily/field.ts`(`getVal` 簇,含 dayjs `advancedFormat` / `weekOfYear` 插件 extend),供 `@hzab/edit-table` 复用
|
|
8
|
+
- `url.ts`:`searchToObj` 支持纯 query 串(无 `?`),并补 `try/catch` 容错非法转义序列;
|
|
9
|
+
`addQuery` / `addSearch` 新增可选 `opt.isEncode`(默认 `false` ⇒ 既有输出逐字不变)
|
|
10
|
+
- 恢复 2.0 API `normalizeOption(item, fieldNames)`
|
|
11
|
+
- `@hzab/data-model` 由 `peerDependencies` 移入 `dependencies`
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CaiYansong
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|