@qrvey/utils 1.2.4-23 → 1.2.4-24

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.4-23*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.4-24*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
80
80
 
81
81
 
82
82
 
83
- ### dist/dates/adapters/mdyDateToDate.js
83
+ ### dist/dates/adapters/monthYearToDate.js
84
84
 
85
85
 
86
- #### mdyDateToDate(monthYearDate, time)
86
+ #### monthYearToDate(monthYearDate, time)
87
87
 
88
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
88
+ Transforms String Date from a [Month Year] format to Date object.
89
89
 
90
90
 
91
91
 
@@ -94,7 +94,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
94
94
 
95
95
  | Name | Type | Description | |
96
96
  | ---- | ---- | ----------- | -------- |
97
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
97
+ | monthYearDate | | String of [Month Year] date |   |
98
98
  | time | | Flag to parse the object date to milliseconds. |   |
99
99
 
100
100
 
@@ -108,12 +108,12 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
108
108
 
109
109
 
110
110
 
111
- ### dist/dates/adapters/monthYearToDate.js
111
+ ### dist/dates/adapters/mdyDateToDate.js
112
112
 
113
113
 
114
- #### monthYearToDate(monthYearDate, time)
114
+ #### mdyDateToDate(monthYearDate, time)
115
115
 
116
- Transforms String Date from a [Month Year] format to Date object.
116
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
117
117
 
118
118
 
119
119
 
@@ -122,7 +122,7 @@ Transforms String Date from a [Month Year] format to Date object.
122
122
 
123
123
  | Name | Type | Description | |
124
124
  | ---- | ---- | ----------- | -------- |
125
- | monthYearDate | | String of [Month Year] date |   |
125
+ | monthYearDate | | String of [mm/dd/yyyy] date |   |
126
126
  | time | | Flag to parse the object date to milliseconds. |   |
127
127
 
128
128
 
@@ -276,12 +276,12 @@ Gets an array of regular expressions by the given date format
276
276
 
277
277
 
278
278
 
279
- ### dist/dates/helpers/getSeparatorByDateFormat.js
279
+ ### dist/dates/helpers/getDateFormatByProperty.js
280
280
 
281
281
 
282
- #### getSeparatorByDateFormat(format)
282
+ #### getDateFormatByProperty(property)
283
283
 
284
- Gets the separator of the date format
284
+ Gets the date format by the given property
285
285
 
286
286
 
287
287
 
@@ -290,7 +290,7 @@ Gets the separator of the date format
290
290
 
291
291
  | Name | Type | Description | |
292
292
  | ---- | ---- | ----------- | -------- |
293
- | format | | the date format |   |
293
+ | property | | The Column Property |   |
294
294
 
295
295
 
296
296
 
@@ -298,17 +298,17 @@ Gets the separator of the date format
298
298
  ##### Returns
299
299
 
300
300
 
301
- - a separator string
301
+ - The date format
302
302
 
303
303
 
304
304
 
305
305
 
306
- ### dist/dates/helpers/getDateFormatByProperty.js
306
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
307
307
 
308
308
 
309
- #### getDateFormatByProperty(property)
309
+ #### getSeparatorByDateFormat(format)
310
310
 
311
- Gets the date format by the given property
311
+ Gets the separator of the date format
312
312
 
313
313
 
314
314
 
@@ -317,7 +317,7 @@ Gets the date format by the given property
317
317
 
318
318
  | Name | Type | Description | |
319
319
  | ---- | ---- | ----------- | -------- |
320
- | property | | The Column Property |   |
320
+ | format | | the date format |   |
321
321
 
322
322
 
323
323
 
@@ -325,7 +325,7 @@ Gets the date format by the given property
325
325
  ##### Returns
326
326
 
327
327
 
328
- - The date format
328
+ - a separator string
329
329
 
330
330
 
331
331
 
@@ -1003,6 +1003,34 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1003
1003
 
1004
1004
 
1005
1005
 
1006
+ ### dist/filters/adapters/adaptFilterValues.js
1007
+
1008
+
1009
+ #### adaptFilterValues(filter)
1010
+
1011
+ [TODO: For 2022, eliminate this adapter]
1012
+ Gets an adapted filter value array. Validates the enabled property and sets
1013
+
1014
+
1015
+
1016
+
1017
+ ##### Parameters
1018
+
1019
+ | Name | Type | Description | |
1020
+ | ---- | ---- | ----------- | -------- |
1021
+ | filter | | The filter |   |
1022
+
1023
+
1024
+
1025
+
1026
+ ##### Returns
1027
+
1028
+
1029
+ - A new value array with the filled properties.
1030
+
1031
+
1032
+
1033
+
1006
1034
  ### dist/filters/adapters/flatUIToFD.js
1007
1035
 
1008
1036
 
@@ -1124,34 +1152,6 @@ Gets an filter structure for the filter data
1124
1152
 
1125
1153
 
1126
1154
 
1127
- ### dist/filters/adapters/adaptFilterValues.js
1128
-
1129
-
1130
- #### adaptFilterValues(filter)
1131
-
1132
- [TODO: For 2022, eliminate this adapter]
1133
- Gets an adapted filter value array. Validates the enabled property and sets
1134
-
1135
-
1136
-
1137
-
1138
- ##### Parameters
1139
-
1140
- | Name | Type | Description | |
1141
- | ---- | ---- | ----------- | -------- |
1142
- | filter | | The filter |   |
1143
-
1144
-
1145
-
1146
-
1147
- ##### Returns
1148
-
1149
-
1150
- - A new value array with the filled properties.
1151
-
1152
-
1153
-
1154
-
1155
1155
  ### dist/filters/adapters/flatUIToLogic.js
1156
1156
 
1157
1157
 
@@ -1729,12 +1729,12 @@ Filters a nested tree array by a custom condition on the last child node
1729
1729
 
1730
1730
 
1731
1731
 
1732
- ### dist/general/array/flattenDeep.js
1732
+ ### dist/general/array/getFirstIndexFromArray.js
1733
1733
 
1734
1734
 
1735
- #### flattenDeep(arr)
1735
+ #### getFirstIndexFromArray(array, callback)
1736
1736
 
1737
- Flat deeply an array
1737
+ Gets the first index from the array by a callback condition
1738
1738
 
1739
1739
 
1740
1740
 
@@ -1743,7 +1743,8 @@ Flat deeply an array
1743
1743
 
1744
1744
  | Name | Type | Description | |
1745
1745
  | ---- | ---- | ----------- | -------- |
1746
- | arr | | Array to flat deeply |   |
1746
+ | array | | |   |
1747
+ | callback | | function callback |   |
1747
1748
 
1748
1749
 
1749
1750
 
@@ -1751,17 +1752,17 @@ Flat deeply an array
1751
1752
  ##### Returns
1752
1753
 
1753
1754
 
1754
- - flatten array
1755
+ - the first index of the array. -1 when the condition is not satisfied
1755
1756
 
1756
1757
 
1757
1758
 
1758
1759
 
1759
- ### dist/general/array/getFirstIndexFromArray.js
1760
+ ### dist/general/array/flattenDeep.js
1760
1761
 
1761
1762
 
1762
- #### getFirstIndexFromArray(array, callback)
1763
+ #### flattenDeep(arr)
1763
1764
 
1764
- Gets the first index from the array by a callback condition
1765
+ Flat deeply an array
1765
1766
 
1766
1767
 
1767
1768
 
@@ -1770,8 +1771,7 @@ Gets the first index from the array by a callback condition
1770
1771
 
1771
1772
  | Name | Type | Description | |
1772
1773
  | ---- | ---- | ----------- | -------- |
1773
- | array | | |   |
1774
- | callback | | function callback |   |
1774
+ | arr | | Array to flat deeply |   |
1775
1775
 
1776
1776
 
1777
1777
 
@@ -1779,7 +1779,7 @@ Gets the first index from the array by a callback condition
1779
1779
  ##### Returns
1780
1780
 
1781
1781
 
1782
- - the first index of the array. -1 when the condition is not satisfied
1782
+ - flatten array
1783
1783
 
1784
1784
 
1785
1785
 
@@ -1868,13 +1868,12 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1868
1868
 
1869
1869
 
1870
1870
 
1871
- ### dist/general/mix/compareDeep.js
1871
+ ### dist/general/mix/getTag.js
1872
1872
 
1873
1873
 
1874
- #### compareDeep(object1, object2)
1874
+ #### getTag(value)
1875
1875
 
1876
- Compares two objects to know if they are equals. Go across nested objects.
1877
- Includes arrays in the comparison.
1876
+ Gets the `toStringTag` of `value`.
1878
1877
 
1879
1878
 
1880
1879
 
@@ -1883,8 +1882,7 @@ Includes arrays in the comparison.
1883
1882
 
1884
1883
  | Name | Type | Description | |
1885
1884
  | ---- | ---- | ----------- | -------- |
1886
- | object1 | | First Object to compare |   |
1887
- | object2 | | Second Object to compare |   |
1885
+ | value | | The value to query. |   |
1888
1886
 
1889
1887
 
1890
1888
 
@@ -1892,17 +1890,18 @@ Includes arrays in the comparison.
1892
1890
  ##### Returns
1893
1891
 
1894
1892
 
1895
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
1893
+ - `string` Returns the `toStringTag`.
1896
1894
 
1897
1895
 
1898
1896
 
1899
1897
 
1900
- ### dist/general/mix/getTag.js
1898
+ ### dist/general/mix/compareDeep.js
1901
1899
 
1902
1900
 
1903
- #### getTag(value)
1901
+ #### compareDeep(object1, object2)
1904
1902
 
1905
- Gets the `toStringTag` of `value`.
1903
+ Compares two objects to know if they are equals. Go across nested objects.
1904
+ Includes arrays in the comparison.
1906
1905
 
1907
1906
 
1908
1907
 
@@ -1911,7 +1910,8 @@ Gets the `toStringTag` of `value`.
1911
1910
 
1912
1911
  | Name | Type | Description | |
1913
1912
  | ---- | ---- | ----------- | -------- |
1914
- | value | | The value to query. |   |
1913
+ | object1 | | First Object to compare |   |
1914
+ | object2 | | Second Object to compare |   |
1915
1915
 
1916
1916
 
1917
1917
 
@@ -1919,7 +1919,7 @@ Gets the `toStringTag` of `value`.
1919
1919
  ##### Returns
1920
1920
 
1921
1921
 
1922
- - `string` Returns the `toStringTag`.
1922
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1923
1923
 
1924
1924
 
1925
1925
 
@@ -2153,6 +2153,33 @@ Gets the length of the given array.
2153
2153
 
2154
2154
 
2155
2155
 
2156
+ ### dist/general/string/capitalize.js
2157
+
2158
+
2159
+ #### capitalize(text)
2160
+
2161
+ Upper case the first letter of a given text
2162
+
2163
+
2164
+
2165
+
2166
+ ##### Parameters
2167
+
2168
+ | Name | Type | Description | |
2169
+ | ---- | ---- | ----------- | -------- |
2170
+ | text | `String` | |   |
2171
+
2172
+
2173
+
2174
+
2175
+ ##### Returns
2176
+
2177
+
2178
+ - `String` a capitalized text
2179
+
2180
+
2181
+
2182
+
2156
2183
  ### dist/general/object/cloneDeep.js
2157
2184
 
2158
2185
 
@@ -2377,13 +2404,12 @@ and return a mapped object
2377
2404
 
2378
2405
 
2379
2406
 
2380
- ### dist/general/object/mergeDeep.js
2407
+ ### dist/general/object/objectCopy.js
2381
2408
 
2382
2409
 
2383
- #### mergeDeep(obj1, obj2, settings)
2410
+ #### objectCopy(entity, cache)
2384
2411
 
2385
- Merges two objects into a new one.
2386
- The second given argument to the first given argument.
2412
+ Created a new reference of the given argument
2387
2413
 
2388
2414
 
2389
2415
 
@@ -2392,9 +2418,8 @@ The second given argument to the first given argument.
2392
2418
 
2393
2419
  | Name | Type | Description | |
2394
2420
  | ---- | ---- | ----------- | -------- |
2395
- | obj1 | | The target object |   |
2396
- | obj2 | | The object to be merged |   |
2397
- | settings | | Object settings for this function |   |
2421
+ | entity | | The variable to be copied |   |
2422
+ | cache | | |   |
2398
2423
 
2399
2424
 
2400
2425
 
@@ -2402,13 +2427,18 @@ The second given argument to the first given argument.
2402
2427
  ##### Returns
2403
2428
 
2404
2429
 
2405
- - a new merged object
2430
+ - A new reference of the given argument
2406
2431
 
2407
2432
 
2408
2433
 
2409
- #### isValid(obj1, obj2)
2410
2434
 
2411
- Validates if the two arguments are objects
2435
+ ### dist/general/object/mergeDeep.js
2436
+
2437
+
2438
+ #### mergeDeep(obj1, obj2, settings)
2439
+
2440
+ Merges two objects into a new one.
2441
+ The second given argument to the first given argument.
2412
2442
 
2413
2443
 
2414
2444
 
@@ -2419,6 +2449,7 @@ Validates if the two arguments are objects
2419
2449
  | ---- | ---- | ----------- | -------- |
2420
2450
  | obj1 | | The target object |   |
2421
2451
  | obj2 | | The object to be merged |   |
2452
+ | settings | | Object settings for this function |   |
2422
2453
 
2423
2454
 
2424
2455
 
@@ -2426,13 +2457,13 @@ Validates if the two arguments are objects
2426
2457
  ##### Returns
2427
2458
 
2428
2459
 
2429
- - true: they are valid; false: they are not
2460
+ - a new merged object
2430
2461
 
2431
2462
 
2432
2463
 
2433
- #### getParamsToMergeDeep(settings)
2464
+ #### isValid(obj1, obj2)
2434
2465
 
2435
- Validates and gets the settings with all set parameters.
2466
+ Validates if the two arguments are objects
2436
2467
 
2437
2468
 
2438
2469
 
@@ -2441,7 +2472,8 @@ Validates and gets the settings with all set parameters.
2441
2472
 
2442
2473
  | Name | Type | Description | |
2443
2474
  | ---- | ---- | ----------- | -------- |
2444
- | settings | | the settings object |   |
2475
+ | obj1 | | The target object |   |
2476
+ | obj2 | | The object to be merged |   |
2445
2477
 
2446
2478
 
2447
2479
 
@@ -2449,17 +2481,13 @@ Validates and gets the settings with all set parameters.
2449
2481
  ##### Returns
2450
2482
 
2451
2483
 
2452
- - a new settings object with all set parameters.
2453
-
2454
-
2455
-
2484
+ - true: they are valid; false: they are not
2456
2485
 
2457
- ### dist/general/object/objectCopy.js
2458
2486
 
2459
2487
 
2460
- #### objectCopy(entity, cache)
2488
+ #### getParamsToMergeDeep(settings)
2461
2489
 
2462
- Created a new reference of the given argument
2490
+ Validates and gets the settings with all set parameters.
2463
2491
 
2464
2492
 
2465
2493
 
@@ -2468,8 +2496,7 @@ Created a new reference of the given argument
2468
2496
 
2469
2497
  | Name | Type | Description | |
2470
2498
  | ---- | ---- | ----------- | -------- |
2471
- | entity | | The variable to be copied |   |
2472
- | cache | | |   |
2499
+ | settings | | the settings object |   |
2473
2500
 
2474
2501
 
2475
2502
 
@@ -2477,7 +2504,7 @@ Created a new reference of the given argument
2477
2504
  ##### Returns
2478
2505
 
2479
2506
 
2480
- - A new reference of the given argument
2507
+ - a new settings object with all set parameters.
2481
2508
 
2482
2509
 
2483
2510
 
@@ -2565,33 +2592,6 @@ serialize object to url param
2565
2592
 
2566
2593
 
2567
2594
 
2568
- ### dist/general/string/capitalize.js
2569
-
2570
-
2571
- #### capitalize(text)
2572
-
2573
- Upper case the first letter of a given text
2574
-
2575
-
2576
-
2577
-
2578
- ##### Parameters
2579
-
2580
- | Name | Type | Description | |
2581
- | ---- | ---- | ----------- | -------- |
2582
- | text | `String` | |   |
2583
-
2584
-
2585
-
2586
-
2587
- ##### Returns
2588
-
2589
-
2590
- - `String` a capitalized text
2591
-
2592
-
2593
-
2594
-
2595
2595
  ### dist/services/api/getAllDatasets.api.js
2596
2596
 
2597
2597
 
@@ -2839,12 +2839,12 @@ try to find this string as a variable on Windows object
2839
2839
 
2840
2840
 
2841
2841
 
2842
- ### dist/dates/relative/helpers/getStatementCase.js
2842
+ ### dist/dates/relative/helpers/formatStatement.js
2843
2843
 
2844
2844
 
2845
- #### getStatementCase(includeCurrent, isCalendarDate)
2845
+ #### formatStatement(statement)
2846
2846
 
2847
- Returns a number/constant that identifies a relative date case
2847
+ Build a proper relative date statement type
2848
2848
 
2849
2849
 
2850
2850
 
@@ -2853,8 +2853,7 @@ Returns a number/constant that identifies a relative date case
2853
2853
 
2854
2854
  | Name | Type | Description | |
2855
2855
  | ---- | ---- | ----------- | -------- |
2856
- | includeCurrent | `boolean` | |   |
2857
- | isCalendarDate | `boolean` | |   |
2856
+ | statement | `RelativeStatement` | |   |
2858
2857
 
2859
2858
 
2860
2859
 
@@ -2862,17 +2861,17 @@ Returns a number/constant that identifies a relative date case
2862
2861
  ##### Returns
2863
2862
 
2864
2863
 
2865
- - `number`
2864
+ - `RelativeStatement`
2866
2865
 
2867
2866
 
2868
2867
 
2869
2868
 
2870
- ### dist/dates/relative/helpers/formatStatement.js
2869
+ ### dist/dates/relative/helpers/getStatementCase.js
2871
2870
 
2872
2871
 
2873
- #### formatStatement(statement)
2872
+ #### getStatementCase(includeCurrent, isCalendarDate)
2874
2873
 
2875
- Build a proper relative date statement type
2874
+ Returns a number/constant that identifies a relative date case
2876
2875
 
2877
2876
 
2878
2877
 
@@ -2881,7 +2880,8 @@ Build a proper relative date statement type
2881
2880
 
2882
2881
  | Name | Type | Description | |
2883
2882
  | ---- | ---- | ----------- | -------- |
2884
- | statement | `RelativeStatement` | |   |
2883
+ | includeCurrent | `boolean` | |   |
2884
+ | isCalendarDate | `boolean` | |   |
2885
2885
 
2886
2886
 
2887
2887
 
@@ -2889,7 +2889,7 @@ Build a proper relative date statement type
2889
2889
  ##### Returns
2890
2890
 
2891
2891
 
2892
- - `RelativeStatement`
2892
+ - `number`
2893
2893
 
2894
2894
 
2895
2895
 
@@ -19,8 +19,8 @@ export interface II18nFormulaBuilderCreateModal {
19
19
  search_column: string;
20
20
  box_function_empty: string;
21
21
  add_formula: string;
22
- cancel_buttom: string;
23
- apply_buttom: string;
22
+ cancel_button: string;
23
+ apply_button: string;
24
24
  no_columns_available: string;
25
25
  create_toast: string;
26
26
  update_toast: string;
@@ -44,8 +44,8 @@ exports.I18N_FORMULA_BUILDER = {
44
44
  search_column: 'Search',
45
45
  box_function_empty: 'No Function Selected',
46
46
  add_formula: 'Add to Formula',
47
- cancel_buttom: 'Cancel',
48
- apply_buttom: 'Save',
47
+ cancel_button: 'Cancel',
48
+ apply_button: 'Save',
49
49
  no_columns_available: 'No Columns Available',
50
50
  create_toast: 'Formula Created Successfully.',
51
51
  update_toast: 'Formula Updated Successfully',
@@ -19,8 +19,8 @@ export interface II18nFormulaBuilderCreateModal {
19
19
  search_column: string;
20
20
  box_function_empty: string;
21
21
  add_formula: string;
22
- cancel_buttom: string;
23
- apply_buttom: string;
22
+ cancel_button: string;
23
+ apply_button: string;
24
24
  no_columns_available: string;
25
25
  create_toast: string;
26
26
  update_toast: string;
@@ -41,8 +41,8 @@ export const I18N_FORMULA_BUILDER = {
41
41
  search_column: 'Search',
42
42
  box_function_empty: 'No Function Selected',
43
43
  add_formula: 'Add to Formula',
44
- cancel_buttom: 'Cancel',
45
- apply_buttom: 'Save',
44
+ cancel_button: 'Cancel',
45
+ apply_button: 'Save',
46
46
  no_columns_available: 'No Columns Available',
47
47
  create_toast: 'Formula Created Successfully.',
48
48
  update_toast: 'Formula Updated Successfully',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.2.4-23",
3
+ "version": "1.2.4-24",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/index.js",
@@ -19,8 +19,8 @@ export interface II18nFormulaBuilderCreateModal {
19
19
  search_column: string;
20
20
  box_function_empty: string;
21
21
  add_formula: string;
22
- cancel_buttom: string;
23
- apply_buttom: string;
22
+ cancel_button: string;
23
+ apply_button: string;
24
24
  no_columns_available: string;
25
25
  create_toast: string;
26
26
  update_toast: string;
@@ -43,8 +43,8 @@ export const I18N_FORMULA_BUILDER: II18nFormulaBuilder = {
43
43
  search_column: 'Search',
44
44
  box_function_empty: 'No Function Selected',
45
45
  add_formula: 'Add to Formula',
46
- cancel_buttom: 'Cancel',
47
- apply_buttom: 'Save',
46
+ cancel_button: 'Cancel',
47
+ apply_button: 'Save',
48
48
  no_columns_available: 'No Columns Available',
49
49
  create_toast: 'Formula Created Successfully.',
50
50
  update_toast: 'Formula Updated Successfully',