@libs-ui/utils 0.2.305 → 0.2.306-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.
- package/dom.d.ts +4 -4
- package/esm2022/cache.mjs +4 -3
- package/esm2022/dom.mjs +4 -4
- package/esm2022/file.mjs +3 -2
- package/esm2022/helpers.mjs +29 -19
- package/fesm2022/libs-ui-utils.mjs +106 -94
- package/fesm2022/libs-ui-utils.mjs.map +1 -1
- package/file.d.ts +1 -1
- package/helpers.d.ts +4 -3
- package/package.json +2 -2
package/file.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export declare const isIncludeAudioExtList: (ext: string, listExt?: Array<string
|
|
|
15
15
|
export declare const getFileExtension: (file: IFile | File) => string | undefined;
|
|
16
16
|
export declare const getLabelBySizeFile: (size: number, toFixed?: number) => string;
|
|
17
17
|
export declare const convertBlobToFile: (blob: Blob, fileName?: string) => File;
|
|
18
|
-
export declare const convertUrlToFile: (url: string, fileName?: string) => Promise<File>;
|
|
18
|
+
export declare const convertUrlToFile: (url: string, fileName?: string) => Promise<File | undefined>;
|
package/helpers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
import { GetValueByPath, PathsToStringProps, TYPE_OBJECT } from '@libs-ui/interfaces-types';
|
|
2
3
|
/**Các hàm tương tự thư viện lodash */
|
|
3
4
|
/**
|
|
4
5
|
* Kiểm tra xem một giá trị có phải là null hoặc undefined hay không
|
|
@@ -98,7 +99,7 @@ export declare const omitBy: <T>(objData: Record<string, any>, predicate: (val:
|
|
|
98
99
|
* get(null, 'any.path'); // undefined
|
|
99
100
|
* get(undefined, 'any.path', 'fallback'); // 'fallback'
|
|
100
101
|
*/
|
|
101
|
-
export declare const get: <T =
|
|
102
|
+
export declare const get: <O, P extends PathsToStringProps<O> = PathsToStringProps<O>, E extends boolean = false, T extends GetValueByPath<O, P, E> = GetValueByPath<O, P, E>>(obj: Signal<O> | O, path: P, defaultValue?: T, keepLastValueIfSignal?: E) => T;
|
|
102
103
|
/**
|
|
103
104
|
* Thiết lập giá trị cho một thuộc tính trong đối tượng theo đường dẫn chỉ định
|
|
104
105
|
* @param obj Đối tượng cần thiết lập giá trị
|
|
@@ -110,7 +111,7 @@ export declare const get: <T = any>(obj: any, path: string | string[], defaultVa
|
|
|
110
111
|
* const obj = { a: { b: 1 } };
|
|
111
112
|
* set(obj, 'a.b', 2); // { a: { b: 2 } }
|
|
112
113
|
*/
|
|
113
|
-
export declare const set: <T =
|
|
114
|
+
export declare const set: <O, P extends PathsToStringProps<O> = PathsToStringProps<O>, T extends GetValueByPath<O, P, true> = GetValueByPath<O, P, true>>(obj: Signal<O> | O, path: P, value: T) => O;
|
|
114
115
|
/**
|
|
115
116
|
* Tạo một bản sao sâu của một đối tượng hoặc giá trị bất kỳ
|
|
116
117
|
* @param data Dữ liệu cần sao chép
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.306-4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.0.0",
|
|
6
6
|
"@angular/core": ">=18.0.0",
|
|
7
7
|
"crypto-es": "^2.1.0",
|
|
8
8
|
"dayjs": "1.11.5",
|
|
9
|
-
"@libs-ui/interfaces-types": "0.2.
|
|
9
|
+
"@libs-ui/interfaces-types": "0.2.306-4",
|
|
10
10
|
"rxjs": "~7.8.0"
|
|
11
11
|
},
|
|
12
12
|
"sideEffects": false,
|