@libs-ui/utils 0.2.8 → 0.2.10-6.2

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/helpers.d.ts CHANGED
@@ -1,6 +1,14 @@
1
- export declare const isNil: (value: unknown) => boolean;
1
+ import { TYPE_OBJECT } from "@libs-ui/interfaces-types";
2
+ /**Các hàm tương tự thư viện lodash */
3
+ export declare const isNil: (value: unknown) => value is null | undefined;
2
4
  export declare const isEmpty: (value: unknown) => boolean;
3
- export declare const get: (obj: Record<string, any>, path: string | string[], defaultValue?: any) => any;
4
- export declare const set: (obj: Record<string, any>, path: string | string[], value: any) => any;
5
- export declare const cloneDeep: (value: any) => any;
5
+ export declare const omitBy: <T>(objData: Record<string, any>, predicate: (val: any) => boolean) => T;
6
+ export declare const get: <T = any>(obj: any, path: string | string[], defaultValue?: any) => T;
7
+ export declare const set: <T = any>(obj: any, path: string | string[], value: any) => T;
8
+ export declare const cloneDeep: <T = any>(data: any) => T;
9
+ export declare const keyBy: (data: Array<TYPE_OBJECT>, key: string) => TYPE_OBJECT;
10
+ export declare const groupBy: (data: Array<TYPE_OBJECT>, key: string) => TYPE_OBJECT;
11
+ export declare const range: (start: number, end?: number, step?: number) => Array<number>;
12
+ export declare const isEqual: (value1: any, value2: any) => boolean;
13
+ export declare const uniqBy: <T>(data: Array<T>, key?: string) => Array<T>;
6
14
  export declare const generateInterface: (obj: any, interfaceName: string) => string;
package/http-params.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { HttpParameterCodec, HttpParams } from "@angular/common/http";
2
- export declare const HttpParamsRequestInstance: <Type>(options?: HttpParamsOptions<Type>, instance?: HttpParams) => UtilsHttpParamsRequest<Type>;
2
+ export declare const UtilsHttpParamsRequestInstance: <Type>(options?: HttpParamsOptions<Type>, instance?: HttpParams) => UtilsHttpParamsRequest<Type>;
3
3
  export declare class UtilsHttpParamsRequest<Type = {
4
4
  pem: string;
5
5
  }> extends HttpParams {
package/index.d.ts CHANGED
@@ -19,3 +19,8 @@ export * from './delete-unicode';
19
19
  export * from './get-color-by-id';
20
20
  export * from './constants';
21
21
  export * from './pattern';
22
+ export * from './xss-filter';
23
+ export * from './two-way-signal-object';
24
+ export * from './format-date';
25
+ export * from './encode-url.define';
26
+ export * from './file';
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@libs-ui/utils",
3
- "version": "0.2.8",
3
+ "version": "0.2.106.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.0",
6
6
  "@angular/core": "^18.2.0",
7
- "crypto-es": "^2.1.0"
7
+ "crypto-es": "^2.1.0",
8
+ "dayjs": "1.11.5"
8
9
  },
9
10
  "sideEffects": false,
10
11
  "module": "fesm2022/libs-ui-utils.mjs",
package/pattern.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export declare const PATTERN_EMAIL: () => RegExp;
2
- export declare const PATTERN_URL: () => RegExp;
3
- export declare const PATTERN_HOST_URL: () => RegExp;
4
- export declare const PATTERN_DOMAIN: () => RegExp;
5
- export declare const PATTERN_MOBILE_PHONE: () => RegExp;
6
- export declare const PATTERN_PHONE: () => RegExp;
7
- export declare const PATTERN_PHONE_NORMAL: () => RegExp;
8
- export declare const PATTERN_NUMBER: () => RegExp;
9
- export declare const PATTERN_ENCODE_URI: () => RegExp;
10
- export declare const PATTERN_NAME: () => RegExp;
11
- export declare const PATTERN_NAME_UTF8: () => RegExp;
12
- export declare const PATTERN_NAME_SPECIAL: () => RegExp;
13
- export declare const PATTERN_NAME_PROFILE: () => RegExp;
14
- export declare const PATTERN_EMOJI: () => RegExp;
15
- export declare const PATTERN_RULE_FIELD_REPLACE: () => RegExp;
16
- export declare const PATTERN_GET_FIELD_BY_RULE_FIELD_REPLACE: () => RegExp;
17
- export declare const PATTERN_PEM: () => RegExp;
18
- export declare const PATTERN_TAX: () => RegExp;
19
- export declare const PATTERN_KEY: () => RegExp;
20
- export declare const PATTERN_ACCOUNT: () => RegExp;
1
+ export declare const patternEmail: () => RegExp;
2
+ export declare const patternUrl: () => RegExp;
3
+ export declare const patternHostUrl: () => RegExp;
4
+ export declare const patternDomain: () => RegExp;
5
+ export declare const patternMobilePhone: () => RegExp;
6
+ export declare const patternPhone: () => RegExp;
7
+ export declare const patternPhoneNormal: () => RegExp;
8
+ export declare const patternNumber: () => RegExp;
9
+ export declare const patternEncodeUri: () => RegExp;
10
+ export declare const patternName: () => RegExp;
11
+ export declare const patternNameUtf8: () => RegExp;
12
+ export declare const patternNameSpecial: () => RegExp;
13
+ export declare const patternNameProfile: () => RegExp;
14
+ export declare const patternEmoji: () => RegExp;
15
+ export declare const patternRuleFieldReplace: () => RegExp;
16
+ export declare const patternGetFieldByRuleFieldReplace: () => RegExp;
17
+ export declare const patternPem: () => RegExp;
18
+ export declare const patternTax: () => RegExp;
19
+ export declare const patternKey: () => RegExp;
20
+ export declare const patternAccount: () => RegExp;
@@ -0,0 +1,2 @@
1
+ export declare const convertObjectToSignal: <T = any>(data: any, isCloneDeep?: boolean) => T;
2
+ export declare const convertSignalToObject: <T = any>(data: any, isCloneDeep?: boolean) => T;
@@ -0,0 +1,3 @@
1
+ export type TYPE_FUNCTION_XSS = (data: string) => Promise<string>;
2
+ export declare const updateFunctionXssFilter: (functionCustom: TYPE_FUNCTION_XSS) => void;
3
+ export declare const xssFilter: TYPE_FUNCTION_XSS;