drapcode-utility 1.9.6 → 1.9.78

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.
@@ -4,9 +4,7 @@ export declare const clearSpaceAndReformat: (text: string, separator?: string) =
4
4
  export declare const isEmpty: (obj: any) => boolean;
5
5
  export declare const isEmptyObject: (object: any) => boolean;
6
6
  export declare const isObject: (item: any) => any;
7
- export declare const checkValidArray: (object: any) => any;
8
7
  export declare const dynamicSort: (property: any) => (a: any, b: any) => number;
9
- export declare const snakeCaseToTitleCase: (str: string, checkForUnderscore?: boolean) => string;
10
8
  export declare const validateEmail: (email: string) => false | RegExpMatchArray | null;
11
9
  export declare const validateUuidString: (uuid: string) => false | RegExpMatchArray | null;
12
10
  export declare const getSpecialCharectorReplacedExpression: (expression: string) => string;
@@ -26,7 +24,7 @@ export declare const parseValueFromData: (data: any, fieldName: string) => any;
26
24
  export declare const unflattenObject: (obj: any) => {};
27
25
  export declare const replaceTransferObjectValueIntoExpression: (expression: string, transferObject: any) => string;
28
26
  export declare const removeMongoDbId: (result: any[]) => any[];
29
- export declare const processFieldsInlcude: (fieldsInclude: any) => any;
27
+ export declare const processFieldsInclude: (fieldsInclude: any) => any;
30
28
  export declare const replaceValueFromSource: (variableName: any, environment: any, tenant: any) => any;
31
29
  export declare const fillDefaultValues: (collection: any, itemdata: any) => any;
32
30
  export declare const validateData: (fields: any, data: any) => {
@@ -37,3 +35,79 @@ export declare const validateUrl: (url: any) => boolean;
37
35
  export declare const toggleConsoleLogs: (enable: boolean) => void;
38
36
  export declare const replaceSlashWithUnderscore: (value: string) => string;
39
37
  export declare const replaceUnderscoreWithSlash: (value: string) => string;
38
+ export declare const capitalize: (str: string, restToLower: string) => string;
39
+ export declare const lowerCase: (subject: string) => string;
40
+ export declare const upperCase: (subject: string) => string;
41
+ export declare const slugify: (subject: string) => string;
42
+ export declare const trim: (subject: string, whitespace: string, type: string) => string;
43
+ export declare const titleCase: (subject: string, noSplitopt: string) => string;
44
+ export declare const truncate: (subject: string, length: number, endopt: string) => string;
45
+ export declare const substr: (subject: string, startLength: number, endLength: number) => string;
46
+ export declare const markdownToHtml: (subject: string) => string;
47
+ export declare const strJoin: (dataArr: any, separator: string, startString: string, endString: string) => string;
48
+ export declare const evaluateCustomSentence: (expression: string, data: string, user: any, envConstants: any) => string;
49
+ export declare const checkAndConvertNumber: (number: any) => number;
50
+ export declare const validateNumbers: (numbers: any[]) => number[];
51
+ export declare const addition: (formatType: string, { numbers }: any) => string;
52
+ export declare const substraction: (formatType: string, { numbers1, numbers2 }: any) => string;
53
+ export declare const average: (formatType: string, { numbers }: any) => string;
54
+ export declare const multiply: (formatType: string, { numbers }: any) => string;
55
+ export declare const divide: (formatType: string, { number1, number2 }: any) => string;
56
+ export declare const evaluateExpression: (expression: string, data: any, user: any, formatType: string, envConstants: any) => string;
57
+ export declare const evaluateCurrency: (formatType: string, subject: number | string | any, currency: string, position: string, maxFraction: number) => string;
58
+ export declare const evaluateJSLogic: (expression: string, data: any, user: any, envConstants: any) => any;
59
+ export declare const formatDate: (formatType: string, datentime: any, timezone: string, unixType: any, offset?: boolean) => string;
60
+ export declare const dateDifference: (formatType: string, datentime1: any, datentime2: any, timezone: string) => string;
61
+ export declare const mergeObjects: (arrayOfObjects: any, data?: any, user?: any, tenant?: any, userSetting?: any, subTenant?: any, sessionValue?: any, envConstants?: any, sessionFormValue?: any, dataTransferObject?: any, localStorageValue?: any, cookiesValue?: any) => any;
62
+ export declare const getFindQuery: (dataSourceType: string, item: any, customKey?: string) => {
63
+ [x: string]: any;
64
+ _data_source_rest_api_primary_id?: undefined;
65
+ } | {
66
+ _data_source_rest_api_primary_id: any;
67
+ };
68
+ export declare const getFileObjectList: (fileUrls: any, projectId: string) => any;
69
+ export declare const getItemDataForArrayFields: (item: any, dataSourceItemKey: string) => any[];
70
+ export declare const getMappingObjKey: (collectionMapping: any, fieldName: any) => any;
71
+ export declare const getFieldSchemaForDataSourcePrimaryId: (dataSourceType: string) => {
72
+ required: boolean;
73
+ staticOptions: never[];
74
+ unique: boolean;
75
+ isMultiSelect: boolean;
76
+ isPluginField: boolean;
77
+ fieldTitle: {
78
+ en: string;
79
+ };
80
+ type: string;
81
+ placeholder: {
82
+ en: string;
83
+ };
84
+ validation: {
85
+ min: null;
86
+ max: null;
87
+ regex: string;
88
+ allowedFileTypes: never[];
89
+ noAllowedFiles: number;
90
+ };
91
+ refCollection: {
92
+ collectionName: string;
93
+ collectionField: string;
94
+ displayType: string;
95
+ parentCollectionField: string;
96
+ isShowAsText: boolean;
97
+ };
98
+ extraFieldSetting: {
99
+ dateDisplayType: string;
100
+ textareaDisplayType: string;
101
+ };
102
+ fieldName: string;
103
+ };
104
+ export declare const getPrimaryFieldNameOfDataSource: (dataSourceType: string) => string;
105
+ export declare const checkFieldValueType: (val: string) => boolean;
106
+ export declare const replaceValuesFromObjArr: (dataArr: any[], mappingArray: any[]) => any[];
107
+ export declare const replaceValuesFromRequestMapping: (dataArr: any[], mappingArray: any[]) => any[];
108
+ type responseDataType = {
109
+ error: string;
110
+ data: any;
111
+ };
112
+ export declare const getAwsSignature: (axiosConfig: any, awsSignPluginConfig: any) => Promise<responseDataType>;
113
+ export {};