@qrvey/utils 1.1.3 → 1.1.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/README.md +261 -234
- package/dist/cjs/constants/COLUMN_PROPERTY_VALUE.js +1 -1
- package/dist/cjs/filters/helpers/ui/getFilterPropertyLabel.d.ts +7 -0
- package/dist/cjs/filters/helpers/ui/getFilterPropertyLabel.js +13 -0
- package/dist/cjs/filters/helpers/ui/index.d.ts +1 -0
- package/dist/cjs/filters/helpers/ui/index.js +1 -0
- package/dist/cjs/qrvey/getPropertyLabel.d.ts +2 -0
- package/dist/cjs/qrvey/getPropertyLabel.js +14 -0
- package/dist/cjs/qrvey/index.d.ts +1 -0
- package/dist/cjs/qrvey/index.js +1 -0
- package/dist/constants/COLUMN_PROPERTY_VALUE.js +2 -2
- package/dist/filters/helpers/ui/getFilterPropertyLabel.d.ts +7 -0
- package/dist/filters/helpers/ui/getFilterPropertyLabel.js +9 -0
- package/dist/filters/helpers/ui/index.d.ts +1 -0
- package/dist/filters/helpers/ui/index.js +1 -0
- package/dist/qrvey/getPropertyLabel.d.ts +2 -0
- package/dist/qrvey/getPropertyLabel.js +10 -0
- package/dist/qrvey/index.d.ts +1 -0
- package/dist/qrvey/index.js +1 -0
- package/package.json +1 -1
- package/src/constants/COLUMN_PROPERTY_VALUE.ts +2 -2
- package/src/filters/helpers/ui/getFilterPropertyLabel.ts +11 -0
- package/src/filters/helpers/ui/index.ts +1 -0
- package/src/qrvey/getPropertyLabel.ts +9 -0
- package/src/qrvey/index.ts +1 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.1.
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.1.4*
|
|
2
2
|
|
|
3
3
|
> Helper, Utils for all Qrvey Projects
|
|
4
4
|
|
|
@@ -107,12 +107,12 @@ Get a text and evaluate if it matchs with a token box label.
|
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
### dist/filters/adapters/
|
|
110
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
####
|
|
113
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
114
114
|
|
|
115
|
-
Generates a
|
|
115
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
@@ -122,6 +122,7 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
122
122
|
| Name | Type | Description | |
|
|
123
123
|
| ---- | ---- | ----------- | -------- |
|
|
124
124
|
| filterData | | The filter data object. | |
|
|
125
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
125
126
|
|
|
126
127
|
|
|
127
128
|
|
|
@@ -129,13 +130,13 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
129
130
|
##### Returns
|
|
130
131
|
|
|
131
132
|
|
|
132
|
-
- a
|
|
133
|
+
- a flattened UI filters array
|
|
133
134
|
|
|
134
135
|
|
|
135
136
|
|
|
136
|
-
####
|
|
137
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
137
138
|
|
|
138
|
-
|
|
139
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
139
140
|
|
|
140
141
|
|
|
141
142
|
|
|
@@ -144,7 +145,8 @@ Gets the logic body
|
|
|
144
145
|
|
|
145
146
|
| Name | Type | Description | |
|
|
146
147
|
| ---- | ---- | ----------- | -------- |
|
|
147
|
-
|
|
|
148
|
+
| scopes | | The filter scope section | |
|
|
149
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
148
150
|
|
|
149
151
|
|
|
150
152
|
|
|
@@ -152,17 +154,17 @@ Gets the logic body
|
|
|
152
154
|
##### Returns
|
|
153
155
|
|
|
154
156
|
|
|
155
|
-
- a
|
|
157
|
+
- a flattened UI filters array
|
|
156
158
|
|
|
157
159
|
|
|
158
160
|
|
|
159
161
|
|
|
160
|
-
### dist/filters/adapters/
|
|
162
|
+
### dist/filters/adapters/FDToLogic.js
|
|
161
163
|
|
|
162
164
|
|
|
163
|
-
####
|
|
165
|
+
#### FDToLogic(filterData)
|
|
164
166
|
|
|
165
|
-
Generates a
|
|
167
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
166
168
|
|
|
167
169
|
|
|
168
170
|
|
|
@@ -172,7 +174,6 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
172
174
|
| Name | Type | Description | |
|
|
173
175
|
| ---- | ---- | ----------- | -------- |
|
|
174
176
|
| filterData | | The filter data object. | |
|
|
175
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
176
177
|
|
|
177
178
|
|
|
178
179
|
|
|
@@ -180,13 +181,13 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
180
181
|
##### Returns
|
|
181
182
|
|
|
182
183
|
|
|
183
|
-
- a
|
|
184
|
+
- a filter logic array
|
|
184
185
|
|
|
185
186
|
|
|
186
187
|
|
|
187
|
-
####
|
|
188
|
+
#### getLogicBodyFromFD21(filterData)
|
|
188
189
|
|
|
189
|
-
|
|
190
|
+
Gets the logic body
|
|
190
191
|
|
|
191
192
|
|
|
192
193
|
|
|
@@ -195,8 +196,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
195
196
|
|
|
196
197
|
| Name | Type | Description | |
|
|
197
198
|
| ---- | ---- | ----------- | -------- |
|
|
198
|
-
|
|
|
199
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
199
|
+
| filterData | | The filter data object | |
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
|
|
@@ -204,7 +204,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
204
204
|
##### Returns
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
- a
|
|
207
|
+
- a filter logic array
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
|
|
@@ -263,12 +263,12 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
263
263
|
|
|
264
264
|
|
|
265
265
|
|
|
266
|
-
### dist/filters/adapters/
|
|
266
|
+
### dist/filters/adapters/UIToFD.js
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
####
|
|
269
|
+
#### UIToFD(filterData)
|
|
270
270
|
|
|
271
|
-
Generates a
|
|
271
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
|
|
@@ -278,7 +278,6 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
278
278
|
| Name | Type | Description | |
|
|
279
279
|
| ---- | ---- | ----------- | -------- |
|
|
280
280
|
| filterData | | The UI filter data object. | |
|
|
281
|
-
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
282
281
|
|
|
283
282
|
|
|
284
283
|
|
|
@@ -286,13 +285,13 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
286
285
|
##### Returns
|
|
287
286
|
|
|
288
287
|
|
|
289
|
-
- a
|
|
288
|
+
- a Filter Data structure
|
|
290
289
|
|
|
291
290
|
|
|
292
291
|
|
|
293
|
-
####
|
|
292
|
+
#### UI21ToFD(uFilterData, version)
|
|
294
293
|
|
|
295
|
-
|
|
294
|
+
Builds the Fitler Data structure from UI filter data
|
|
296
295
|
|
|
297
296
|
|
|
298
297
|
|
|
@@ -301,7 +300,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
301
300
|
|
|
302
301
|
| Name | Type | Description | |
|
|
303
302
|
| ---- | ---- | ----------- | -------- |
|
|
304
|
-
|
|
|
303
|
+
| uFilterData | | The UI filter Data object | |
|
|
304
|
+
| version | | the version of the structure | |
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
|
|
@@ -309,17 +309,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
309
309
|
##### Returns
|
|
310
310
|
|
|
311
311
|
|
|
312
|
-
-
|
|
312
|
+
-
|
|
313
313
|
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
|
|
317
|
-
### dist/filters/adapters/
|
|
317
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
####
|
|
320
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
321
321
|
|
|
322
|
-
Generates a
|
|
322
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
323
323
|
|
|
324
324
|
|
|
325
325
|
|
|
@@ -329,6 +329,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
329
329
|
| Name | Type | Description | |
|
|
330
330
|
| ---- | ---- | ----------- | -------- |
|
|
331
331
|
| filterData | | The UI filter data object. | |
|
|
332
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
332
333
|
|
|
333
334
|
|
|
334
335
|
|
|
@@ -336,13 +337,13 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
336
337
|
##### Returns
|
|
337
338
|
|
|
338
339
|
|
|
339
|
-
- a
|
|
340
|
+
- a flattened UI filters array
|
|
340
341
|
|
|
341
342
|
|
|
342
343
|
|
|
343
|
-
####
|
|
344
|
+
#### UI21ToFlatUI(scopes)
|
|
344
345
|
|
|
345
|
-
|
|
346
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
346
347
|
|
|
347
348
|
|
|
348
349
|
|
|
@@ -351,8 +352,7 @@ Builds the Fitler Data structure from UI filter data
|
|
|
351
352
|
|
|
352
353
|
| Name | Type | Description | |
|
|
353
354
|
| ---- | ---- | ----------- | -------- |
|
|
354
|
-
|
|
|
355
|
-
| version | | the version of the structure | |
|
|
355
|
+
| scopes | | The filter scope section | |
|
|
356
356
|
|
|
357
357
|
|
|
358
358
|
|
|
@@ -360,7 +360,7 @@ Builds the Fitler Data structure from UI filter data
|
|
|
360
360
|
##### Returns
|
|
361
361
|
|
|
362
362
|
|
|
363
|
-
-
|
|
363
|
+
- a flattened UI filters array
|
|
364
364
|
|
|
365
365
|
|
|
366
366
|
|
|
@@ -1040,6 +1040,64 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1040
1040
|
|
|
1041
1041
|
|
|
1042
1042
|
|
|
1043
|
+
### dist/date/range/getDateRange.js
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
1047
|
+
|
|
1048
|
+
Get date range object from a string date value
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
##### Parameters
|
|
1054
|
+
|
|
1055
|
+
| Name | Type | Description | |
|
|
1056
|
+
| ---- | ---- | ----------- | -------- |
|
|
1057
|
+
| value | `String` | string date value | |
|
|
1058
|
+
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
1059
|
+
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
##### Examples
|
|
1065
|
+
|
|
1066
|
+
```javascript
|
|
1067
|
+
// 1) Year:
|
|
1068
|
+
getDateRange('2020', 'YEAR');
|
|
1069
|
+
// Will return:
|
|
1070
|
+
{
|
|
1071
|
+
from: '01/01/2020 00:00:00',
|
|
1072
|
+
to: '12/31/2020 23:59:59'
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
// 2) Quarter:
|
|
1076
|
+
getDateRange('Q3 2020', 'QUARTER');
|
|
1077
|
+
// Will return:
|
|
1078
|
+
{
|
|
1079
|
+
from: '07/01/2020 00:00:00',
|
|
1080
|
+
to: '09/30/2020 23:59:59'
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
// 3) Month:
|
|
1084
|
+
getDateRange('Oct 2020', 'MONTH');
|
|
1085
|
+
// Will return:
|
|
1086
|
+
{
|
|
1087
|
+
from: '10/01/2020 00:00:00',
|
|
1088
|
+
to: '10/31/2020 23:59:59'
|
|
1089
|
+
}
|
|
1090
|
+
```
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
##### Returns
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1043
1101
|
### dist/date/relative/Adapter.js
|
|
1044
1102
|
|
|
1045
1103
|
|
|
@@ -1253,70 +1311,12 @@ Output:
|
|
|
1253
1311
|
|
|
1254
1312
|
|
|
1255
1313
|
|
|
1256
|
-
### dist/
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
#### getDateRange(value, dateGroupLabel, withTime)
|
|
1260
|
-
|
|
1261
|
-
Get date range object from a string date value
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
##### Parameters
|
|
1267
|
-
|
|
1268
|
-
| Name | Type | Description | |
|
|
1269
|
-
| ---- | ---- | ----------- | -------- |
|
|
1270
|
-
| value | `String` | string date value | |
|
|
1271
|
-
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
1272
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
##### Examples
|
|
1278
|
-
|
|
1279
|
-
```javascript
|
|
1280
|
-
// 1) Year:
|
|
1281
|
-
getDateRange('2020', 'YEAR');
|
|
1282
|
-
// Will return:
|
|
1283
|
-
{
|
|
1284
|
-
from: '01/01/2020 00:00:00',
|
|
1285
|
-
to: '12/31/2020 23:59:59'
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
// 2) Quarter:
|
|
1289
|
-
getDateRange('Q3 2020', 'QUARTER');
|
|
1290
|
-
// Will return:
|
|
1291
|
-
{
|
|
1292
|
-
from: '07/01/2020 00:00:00',
|
|
1293
|
-
to: '09/30/2020 23:59:59'
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
// 3) Month:
|
|
1297
|
-
getDateRange('Oct 2020', 'MONTH');
|
|
1298
|
-
// Will return:
|
|
1299
|
-
{
|
|
1300
|
-
from: '10/01/2020 00:00:00',
|
|
1301
|
-
to: '10/31/2020 23:59:59'
|
|
1302
|
-
}
|
|
1303
|
-
```
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
##### Returns
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
- `Object` an object with the date range with two string date properties: from and to
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
### dist/general/function/debounce.js
|
|
1314
|
+
### dist/general/array/delete.js
|
|
1315
1315
|
|
|
1316
1316
|
|
|
1317
|
-
####
|
|
1317
|
+
#### ArrayDelete(array, index)
|
|
1318
1318
|
|
|
1319
|
-
|
|
1319
|
+
Inmutable Array Item deletion
|
|
1320
1320
|
|
|
1321
1321
|
|
|
1322
1322
|
|
|
@@ -1325,8 +1325,8 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1325
1325
|
|
|
1326
1326
|
| Name | Type | Description | |
|
|
1327
1327
|
| ---- | ---- | ----------- | -------- |
|
|
1328
|
-
|
|
|
1329
|
-
|
|
|
1328
|
+
| array | `Array` | a collection of items to delete | |
|
|
1329
|
+
| index | `Number` | the position of the item to delete | |
|
|
1330
1330
|
|
|
1331
1331
|
|
|
1332
1332
|
|
|
@@ -1334,17 +1334,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1334
1334
|
##### Returns
|
|
1335
1335
|
|
|
1336
1336
|
|
|
1337
|
-
-
|
|
1337
|
+
- a new Array or the given parameter when is empty or not an array
|
|
1338
1338
|
|
|
1339
1339
|
|
|
1340
1340
|
|
|
1341
1341
|
|
|
1342
|
-
### dist/general/
|
|
1342
|
+
### dist/general/array/flattenDeep.js
|
|
1343
1343
|
|
|
1344
1344
|
|
|
1345
|
-
####
|
|
1345
|
+
#### flattenDeep(arr)
|
|
1346
1346
|
|
|
1347
|
-
|
|
1347
|
+
Flat deeply an array
|
|
1348
1348
|
|
|
1349
1349
|
|
|
1350
1350
|
|
|
@@ -1353,8 +1353,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1353
1353
|
|
|
1354
1354
|
| Name | Type | Description | |
|
|
1355
1355
|
| ---- | ---- | ----------- | -------- |
|
|
1356
|
-
|
|
|
1357
|
-
| time | `Number` | default 500ms | |
|
|
1356
|
+
| arr | | Array to flat deeply | |
|
|
1358
1357
|
|
|
1359
1358
|
|
|
1360
1359
|
|
|
@@ -1362,17 +1361,20 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1362
1361
|
##### Returns
|
|
1363
1362
|
|
|
1364
1363
|
|
|
1365
|
-
-
|
|
1364
|
+
- flatten array
|
|
1366
1365
|
|
|
1367
1366
|
|
|
1368
1367
|
|
|
1369
1368
|
|
|
1370
|
-
### dist/general/array/
|
|
1369
|
+
### dist/general/array/filterNestedTree.js
|
|
1371
1370
|
|
|
1372
1371
|
|
|
1373
|
-
####
|
|
1372
|
+
#### filterNestedTree(arr, childArrKey, condition)
|
|
1374
1373
|
|
|
1375
|
-
|
|
1374
|
+
Filters a nested tree array by a custom condition on the last child node
|
|
1375
|
+
- If the given arguments are not valid, the function returns the first argument.
|
|
1376
|
+
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
1377
|
+
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
1376
1378
|
|
|
1377
1379
|
|
|
1378
1380
|
|
|
@@ -1381,8 +1383,9 @@ Inmutable Array Item deletion
|
|
|
1381
1383
|
|
|
1382
1384
|
| Name | Type | Description | |
|
|
1383
1385
|
| ---- | ---- | ----------- | -------- |
|
|
1384
|
-
|
|
|
1385
|
-
|
|
|
1386
|
+
| arr | | nested tree array | |
|
|
1387
|
+
| childArrKey | | property representing the children array on the nested tree | |
|
|
1388
|
+
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
1386
1389
|
|
|
1387
1390
|
|
|
1388
1391
|
|
|
@@ -1390,20 +1393,17 @@ Inmutable Array Item deletion
|
|
|
1390
1393
|
##### Returns
|
|
1391
1394
|
|
|
1392
1395
|
|
|
1393
|
-
-
|
|
1396
|
+
- array filtered
|
|
1394
1397
|
|
|
1395
1398
|
|
|
1396
1399
|
|
|
1397
1400
|
|
|
1398
|
-
### dist/general/array/
|
|
1401
|
+
### dist/general/array/getFirstIndexFromArray.js
|
|
1399
1402
|
|
|
1400
1403
|
|
|
1401
|
-
####
|
|
1404
|
+
#### getFirstIndexFromArray(array, callback)
|
|
1402
1405
|
|
|
1403
|
-
|
|
1404
|
-
- If the given arguments are not valid, the function returns the first argument.
|
|
1405
|
-
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
1406
|
-
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
1406
|
+
Gets the first index from the array by a callback condition
|
|
1407
1407
|
|
|
1408
1408
|
|
|
1409
1409
|
|
|
@@ -1412,9 +1412,8 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1412
1412
|
|
|
1413
1413
|
| Name | Type | Description | |
|
|
1414
1414
|
| ---- | ---- | ----------- | -------- |
|
|
1415
|
-
|
|
|
1416
|
-
|
|
|
1417
|
-
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
1415
|
+
| array | | | |
|
|
1416
|
+
| callback | | function callback | |
|
|
1418
1417
|
|
|
1419
1418
|
|
|
1420
1419
|
|
|
@@ -1422,17 +1421,17 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1422
1421
|
##### Returns
|
|
1423
1422
|
|
|
1424
1423
|
|
|
1425
|
-
- array
|
|
1424
|
+
- the first index of the array. -1 when the condition is not satisfied
|
|
1426
1425
|
|
|
1427
1426
|
|
|
1428
1427
|
|
|
1429
1428
|
|
|
1430
|
-
### dist/general/array/
|
|
1429
|
+
### dist/general/array/getLastIndexFromArray.js
|
|
1431
1430
|
|
|
1432
1431
|
|
|
1433
|
-
####
|
|
1432
|
+
#### getLastIndexFromArray(array, callback)
|
|
1434
1433
|
|
|
1435
|
-
|
|
1434
|
+
Gets the last index from the array by a callback condition
|
|
1436
1435
|
|
|
1437
1436
|
|
|
1438
1437
|
|
|
@@ -1441,7 +1440,8 @@ Flat deeply an array
|
|
|
1441
1440
|
|
|
1442
1441
|
| Name | Type | Description | |
|
|
1443
1442
|
| ---- | ---- | ----------- | -------- |
|
|
1444
|
-
|
|
|
1443
|
+
| array | | | |
|
|
1444
|
+
| callback | | function callback | |
|
|
1445
1445
|
|
|
1446
1446
|
|
|
1447
1447
|
|
|
@@ -1449,17 +1449,17 @@ Flat deeply an array
|
|
|
1449
1449
|
##### Returns
|
|
1450
1450
|
|
|
1451
1451
|
|
|
1452
|
-
-
|
|
1452
|
+
- the last index of the array. -1 when the condition is not satisfied
|
|
1453
1453
|
|
|
1454
1454
|
|
|
1455
1455
|
|
|
1456
1456
|
|
|
1457
|
-
### dist/general/
|
|
1457
|
+
### dist/general/function/debounce.js
|
|
1458
1458
|
|
|
1459
1459
|
|
|
1460
|
-
####
|
|
1460
|
+
#### debounce(fn, time)
|
|
1461
1461
|
|
|
1462
|
-
|
|
1462
|
+
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
1463
1463
|
|
|
1464
1464
|
|
|
1465
1465
|
|
|
@@ -1468,8 +1468,8 @@ Gets the first index from the array by a callback condition
|
|
|
1468
1468
|
|
|
1469
1469
|
| Name | Type | Description | |
|
|
1470
1470
|
| ---- | ---- | ----------- | -------- |
|
|
1471
|
-
|
|
|
1472
|
-
|
|
|
1471
|
+
| fn | `Function` | original Function | |
|
|
1472
|
+
| time | `Number` | default 500ms | |
|
|
1473
1473
|
|
|
1474
1474
|
|
|
1475
1475
|
|
|
@@ -1477,17 +1477,17 @@ Gets the first index from the array by a callback condition
|
|
|
1477
1477
|
##### Returns
|
|
1478
1478
|
|
|
1479
1479
|
|
|
1480
|
-
-
|
|
1480
|
+
- `Function` debounced functions
|
|
1481
1481
|
|
|
1482
1482
|
|
|
1483
1483
|
|
|
1484
1484
|
|
|
1485
|
-
### dist/general/
|
|
1485
|
+
### dist/general/function/throttled.js
|
|
1486
1486
|
|
|
1487
1487
|
|
|
1488
|
-
####
|
|
1488
|
+
#### throttled(fn, time)
|
|
1489
1489
|
|
|
1490
|
-
|
|
1490
|
+
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
1491
1491
|
|
|
1492
1492
|
|
|
1493
1493
|
|
|
@@ -1496,8 +1496,8 @@ Gets the last index from the array by a callback condition
|
|
|
1496
1496
|
|
|
1497
1497
|
| Name | Type | Description | |
|
|
1498
1498
|
| ---- | ---- | ----------- | -------- |
|
|
1499
|
-
|
|
|
1500
|
-
|
|
|
1499
|
+
| fn | `Function` | original Function | |
|
|
1500
|
+
| time | `Number` | default 500ms | |
|
|
1501
1501
|
|
|
1502
1502
|
|
|
1503
1503
|
|
|
@@ -1505,7 +1505,7 @@ Gets the last index from the array by a callback condition
|
|
|
1505
1505
|
##### Returns
|
|
1506
1506
|
|
|
1507
1507
|
|
|
1508
|
-
-
|
|
1508
|
+
- `Function` throttled function
|
|
1509
1509
|
|
|
1510
1510
|
|
|
1511
1511
|
|
|
@@ -1622,12 +1622,13 @@ return a Promise that is resolved when the script is loaded
|
|
|
1622
1622
|
|
|
1623
1623
|
|
|
1624
1624
|
|
|
1625
|
-
### dist/general/mix/
|
|
1625
|
+
### dist/general/mix/isNull.js
|
|
1626
1626
|
|
|
1627
1627
|
|
|
1628
|
-
####
|
|
1628
|
+
#### isNull(arg)
|
|
1629
1629
|
|
|
1630
|
-
|
|
1630
|
+
return if a given variable is either `null` or `undefined`
|
|
1631
|
+
useful to avoid falsify validating Number Zero (0)
|
|
1631
1632
|
|
|
1632
1633
|
|
|
1633
1634
|
|
|
@@ -1636,8 +1637,7 @@ Validates if the given argument is empty
|
|
|
1636
1637
|
|
|
1637
1638
|
| Name | Type | Description | |
|
|
1638
1639
|
| ---- | ---- | ----------- | -------- |
|
|
1639
|
-
|
|
|
1640
|
-
| includeFalsy | | flag to determine include the falsy variables into the validation | |
|
|
1640
|
+
| arg | `any` | | |
|
|
1641
1641
|
|
|
1642
1642
|
|
|
1643
1643
|
|
|
@@ -1645,18 +1645,17 @@ Validates if the given argument is empty
|
|
|
1645
1645
|
##### Returns
|
|
1646
1646
|
|
|
1647
1647
|
|
|
1648
|
-
-
|
|
1648
|
+
- `Boolean`
|
|
1649
1649
|
|
|
1650
1650
|
|
|
1651
1651
|
|
|
1652
1652
|
|
|
1653
|
-
### dist/general/mix/
|
|
1653
|
+
### dist/general/mix/isEmpty.js
|
|
1654
1654
|
|
|
1655
1655
|
|
|
1656
|
-
####
|
|
1656
|
+
#### isEmpty(variable, includeFalsy)
|
|
1657
1657
|
|
|
1658
|
-
|
|
1659
|
-
useful to avoid falsify validating Number Zero (0)
|
|
1658
|
+
Validates if the given argument is empty
|
|
1660
1659
|
|
|
1661
1660
|
|
|
1662
1661
|
|
|
@@ -1665,7 +1664,8 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
1665
1664
|
|
|
1666
1665
|
| Name | Type | Description | |
|
|
1667
1666
|
| ---- | ---- | ----------- | -------- |
|
|
1668
|
-
|
|
|
1667
|
+
| variable | | the given variable | |
|
|
1668
|
+
| includeFalsy | | flag to determine include the falsy variables into the validation | |
|
|
1669
1669
|
|
|
1670
1670
|
|
|
1671
1671
|
|
|
@@ -1673,7 +1673,7 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
1673
1673
|
##### Returns
|
|
1674
1674
|
|
|
1675
1675
|
|
|
1676
|
-
-
|
|
1676
|
+
- true: the given argument is empty; false: is not.
|
|
1677
1677
|
|
|
1678
1678
|
|
|
1679
1679
|
|
|
@@ -1737,6 +1737,33 @@ Gets the length of the given array.
|
|
|
1737
1737
|
|
|
1738
1738
|
|
|
1739
1739
|
|
|
1740
|
+
### dist/general/string/capitalize.js
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
#### capitalize(text)
|
|
1744
|
+
|
|
1745
|
+
Upper case the first letter of a given text
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
##### Parameters
|
|
1751
|
+
|
|
1752
|
+
| Name | Type | Description | |
|
|
1753
|
+
| ---- | ---- | ----------- | -------- |
|
|
1754
|
+
| text | `String` | | |
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
##### Returns
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
- `String` a capitalized text
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1740
1767
|
### dist/general/object/cloneDeep.js
|
|
1741
1768
|
|
|
1742
1769
|
|
|
@@ -1918,12 +1945,12 @@ and return a mapped object
|
|
|
1918
1945
|
|
|
1919
1946
|
|
|
1920
1947
|
|
|
1921
|
-
### dist/general/object/
|
|
1948
|
+
### dist/general/object/objectCopy.js
|
|
1922
1949
|
|
|
1923
1950
|
|
|
1924
|
-
####
|
|
1951
|
+
#### objectCopy(entity, cache)
|
|
1925
1952
|
|
|
1926
|
-
|
|
1953
|
+
Created a new reference of the given argument
|
|
1927
1954
|
|
|
1928
1955
|
|
|
1929
1956
|
|
|
@@ -1932,8 +1959,8 @@ return a nwe Object excluding attributes in _props_ list
|
|
|
1932
1959
|
|
|
1933
1960
|
| Name | Type | Description | |
|
|
1934
1961
|
| ---- | ---- | ----------- | -------- |
|
|
1935
|
-
|
|
|
1936
|
-
|
|
|
1962
|
+
| entity | | The variable to be copied | |
|
|
1963
|
+
| cache | | | |
|
|
1937
1964
|
|
|
1938
1965
|
|
|
1939
1966
|
|
|
@@ -1941,17 +1968,17 @@ return a nwe Object excluding attributes in _props_ list
|
|
|
1941
1968
|
##### Returns
|
|
1942
1969
|
|
|
1943
1970
|
|
|
1944
|
-
-
|
|
1971
|
+
- A new reference of the given argument
|
|
1945
1972
|
|
|
1946
1973
|
|
|
1947
1974
|
|
|
1948
1975
|
|
|
1949
|
-
### dist/general/object/
|
|
1976
|
+
### dist/general/object/omit.js
|
|
1950
1977
|
|
|
1951
1978
|
|
|
1952
|
-
####
|
|
1979
|
+
#### omit(obj, props)
|
|
1953
1980
|
|
|
1954
|
-
|
|
1981
|
+
return a nwe Object excluding attributes in _props_ list
|
|
1955
1982
|
|
|
1956
1983
|
|
|
1957
1984
|
|
|
@@ -1960,8 +1987,8 @@ Created a new reference of the given argument
|
|
|
1960
1987
|
|
|
1961
1988
|
| Name | Type | Description | |
|
|
1962
1989
|
| ---- | ---- | ----------- | -------- |
|
|
1963
|
-
|
|
|
1964
|
-
|
|
|
1990
|
+
| obj | `Object` | base object | |
|
|
1991
|
+
| props | `Array.<String>` | list of attribute to exclude | |
|
|
1965
1992
|
|
|
1966
1993
|
|
|
1967
1994
|
|
|
@@ -1969,7 +1996,7 @@ Created a new reference of the given argument
|
|
|
1969
1996
|
##### Returns
|
|
1970
1997
|
|
|
1971
1998
|
|
|
1972
|
-
-
|
|
1999
|
+
- `Object` clean object
|
|
1973
2000
|
|
|
1974
2001
|
|
|
1975
2002
|
|
|
@@ -2002,62 +2029,55 @@ return a new object just with attributes in _keys_ list
|
|
|
2002
2029
|
|
|
2003
2030
|
|
|
2004
2031
|
|
|
2005
|
-
### dist/
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
#### capitalize(text)
|
|
2009
|
-
|
|
2010
|
-
Upper case the first letter of a given text
|
|
2032
|
+
### dist/stencil/decorators/Config.js
|
|
2011
2033
|
|
|
2012
2034
|
|
|
2035
|
+
#### Config()
|
|
2013
2036
|
|
|
2037
|
+
Stencil.js - Prop Decorator
|
|
2038
|
+
Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
|
|
2039
|
+
But for this, is required ask for a property in `snake_case` style
|
|
2014
2040
|
|
|
2015
|
-
##### Parameters
|
|
2016
2041
|
|
|
2017
|
-
| Name | Type | Description | |
|
|
2018
|
-
| ---- | ---- | ----------- | -------- |
|
|
2019
|
-
| text | `String` | | |
|
|
2020
2042
|
|
|
2021
2043
|
|
|
2022
2044
|
|
|
2023
2045
|
|
|
2024
|
-
#####
|
|
2046
|
+
##### Examples
|
|
2025
2047
|
|
|
2048
|
+
```javascript
|
|
2049
|
+
\ @Config() @Prop() settings;
|
|
2026
2050
|
|
|
2027
|
-
|
|
2051
|
+
someMethod() {
|
|
2052
|
+
this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2053
|
+
}
|
|
2054
|
+
```
|
|
2028
2055
|
|
|
2029
2056
|
|
|
2057
|
+
##### Returns
|
|
2030
2058
|
|
|
2031
2059
|
|
|
2032
|
-
|
|
2060
|
+
- `Void`
|
|
2033
2061
|
|
|
2034
2062
|
|
|
2035
|
-
#### Config()
|
|
2036
2063
|
|
|
2037
|
-
Stencil.js - Prop Decorator
|
|
2038
|
-
Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
|
|
2039
|
-
But for this, is required ask for a property in `snake_case` style
|
|
2040
2064
|
|
|
2065
|
+
### dist/stencil/util/createRef.js
|
|
2041
2066
|
|
|
2042
2067
|
|
|
2068
|
+
#### createRef()
|
|
2043
2069
|
|
|
2070
|
+
lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
|
|
2044
2071
|
|
|
2045
2072
|
|
|
2046
|
-
##### Examples
|
|
2047
2073
|
|
|
2048
|
-
```javascript
|
|
2049
|
-
\ @Config() @Prop() settings;
|
|
2050
2074
|
|
|
2051
|
-
someMethod() {
|
|
2052
|
-
this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2053
|
-
}
|
|
2054
|
-
```
|
|
2055
2075
|
|
|
2056
2076
|
|
|
2057
2077
|
##### Returns
|
|
2058
2078
|
|
|
2059
2079
|
|
|
2060
|
-
-
|
|
2080
|
+
- function - Function to use in ref prop in html elements
|
|
2061
2081
|
|
|
2062
2082
|
|
|
2063
2083
|
|
|
@@ -2093,32 +2113,39 @@ try to find this string as a variable on Windows object
|
|
|
2093
2113
|
|
|
2094
2114
|
|
|
2095
2115
|
|
|
2096
|
-
### dist/
|
|
2116
|
+
### dist/typescript/decorators/Debounce.js
|
|
2097
2117
|
|
|
2098
2118
|
|
|
2099
|
-
####
|
|
2119
|
+
#### Debounce(time)
|
|
2100
2120
|
|
|
2101
|
-
|
|
2121
|
+
(Method Decorator) Debounce Class Method
|
|
2102
2122
|
|
|
2103
2123
|
|
|
2104
2124
|
|
|
2105
2125
|
|
|
2126
|
+
##### Parameters
|
|
2127
|
+
|
|
2128
|
+
| Name | Type | Description | |
|
|
2129
|
+
| ---- | ---- | ----------- | -------- |
|
|
2130
|
+
| time | | (optional) deafult 500 | |
|
|
2131
|
+
|
|
2132
|
+
|
|
2106
2133
|
|
|
2107
2134
|
|
|
2108
2135
|
##### Returns
|
|
2109
2136
|
|
|
2110
2137
|
|
|
2111
|
-
-
|
|
2138
|
+
- `Void`
|
|
2112
2139
|
|
|
2113
2140
|
|
|
2114
2141
|
|
|
2115
2142
|
|
|
2116
|
-
### dist/typescript/decorators/
|
|
2143
|
+
### dist/typescript/decorators/Throttled.js
|
|
2117
2144
|
|
|
2118
2145
|
|
|
2119
|
-
####
|
|
2146
|
+
#### Throttled(time)
|
|
2120
2147
|
|
|
2121
|
-
(Method Decorator)
|
|
2148
|
+
(Method Decorator) Throttled Class Method
|
|
2122
2149
|
|
|
2123
2150
|
|
|
2124
2151
|
|
|
@@ -2140,12 +2167,12 @@ lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom
|
|
|
2140
2167
|
|
|
2141
2168
|
|
|
2142
2169
|
|
|
2143
|
-
### dist/
|
|
2170
|
+
### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
|
|
2144
2171
|
|
|
2145
2172
|
|
|
2146
|
-
####
|
|
2173
|
+
#### getFilterBuilderGeneralConfig(config)
|
|
2147
2174
|
|
|
2148
|
-
|
|
2175
|
+
Returns a filter builder config object by a any given config
|
|
2149
2176
|
|
|
2150
2177
|
|
|
2151
2178
|
|
|
@@ -2154,7 +2181,7 @@ lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom
|
|
|
2154
2181
|
|
|
2155
2182
|
| Name | Type | Description | |
|
|
2156
2183
|
| ---- | ---- | ----------- | -------- |
|
|
2157
|
-
|
|
|
2184
|
+
| config | | any config object | |
|
|
2158
2185
|
|
|
2159
2186
|
|
|
2160
2187
|
|
|
@@ -2162,7 +2189,7 @@ lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom
|
|
|
2162
2189
|
##### Returns
|
|
2163
2190
|
|
|
2164
2191
|
|
|
2165
|
-
-
|
|
2192
|
+
- The filter builder config object
|
|
2166
2193
|
|
|
2167
2194
|
|
|
2168
2195
|
|
|
@@ -2463,12 +2490,12 @@ Gets filters from the logic by the scopes hierarchy.
|
|
|
2463
2490
|
|
|
2464
2491
|
|
|
2465
2492
|
|
|
2466
|
-
### dist/filters/helpers/
|
|
2493
|
+
### dist/filters/helpers/common/arePropertiesDateP.js
|
|
2467
2494
|
|
|
2468
2495
|
|
|
2469
|
-
####
|
|
2496
|
+
#### arePropertiesDateP(column, property)
|
|
2470
2497
|
|
|
2471
|
-
|
|
2498
|
+
Determines if the filter column and property is a distinct group dates type
|
|
2472
2499
|
|
|
2473
2500
|
|
|
2474
2501
|
|
|
@@ -2477,7 +2504,8 @@ Returns a filter builder config object by a any given config
|
|
|
2477
2504
|
|
|
2478
2505
|
| Name | Type | Description | |
|
|
2479
2506
|
| ---- | ---- | ----------- | -------- |
|
|
2480
|
-
|
|
|
2507
|
+
| column | | The filter column | |
|
|
2508
|
+
| property | | The filter property | |
|
|
2481
2509
|
|
|
2482
2510
|
|
|
2483
2511
|
|
|
@@ -2485,7 +2513,7 @@ Returns a filter builder config object by a any given config
|
|
|
2485
2513
|
##### Returns
|
|
2486
2514
|
|
|
2487
2515
|
|
|
2488
|
-
-
|
|
2516
|
+
- True if the given property is included from distinct group dates type
|
|
2489
2517
|
|
|
2490
2518
|
|
|
2491
2519
|
|
|
@@ -2518,34 +2546,6 @@ Validates if both filters are the same
|
|
|
2518
2546
|
|
|
2519
2547
|
|
|
2520
2548
|
|
|
2521
|
-
### dist/filters/helpers/common/arePropertiesDateP.js
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
#### arePropertiesDateP(column, property)
|
|
2525
|
-
|
|
2526
|
-
Determines if the filter column and property is a distinct group dates type
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
##### Parameters
|
|
2532
|
-
|
|
2533
|
-
| Name | Type | Description | |
|
|
2534
|
-
| ---- | ---- | ----------- | -------- |
|
|
2535
|
-
| column | | The filter column | |
|
|
2536
|
-
| property | | The filter property | |
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
##### Returns
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
- True if the given property is included from distinct group dates type
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
2549
|
### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
|
|
2550
2550
|
|
|
2551
2551
|
|
|
@@ -3369,6 +3369,33 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
|
|
|
3369
3369
|
|
|
3370
3370
|
|
|
3371
3371
|
|
|
3372
|
+
### dist/filters/helpers/ui/getFilterPropertyLabel.js
|
|
3373
|
+
|
|
3374
|
+
|
|
3375
|
+
#### getFilterPropertyLabel(filter)
|
|
3376
|
+
|
|
3377
|
+
Gets the label of the filter property
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
|
+
##### Parameters
|
|
3383
|
+
|
|
3384
|
+
| Name | Type | Description | |
|
|
3385
|
+
| ---- | ---- | ----------- | -------- |
|
|
3386
|
+
| filter | | The UI Filter | |
|
|
3387
|
+
|
|
3388
|
+
|
|
3389
|
+
|
|
3390
|
+
|
|
3391
|
+
##### Returns
|
|
3392
|
+
|
|
3393
|
+
|
|
3394
|
+
- a string of the filter property label
|
|
3395
|
+
|
|
3396
|
+
|
|
3397
|
+
|
|
3398
|
+
|
|
3372
3399
|
### dist/filters/helpers/ui/getOutputFormatByColumn.js
|
|
3373
3400
|
|
|
3374
3401
|
|
|
@@ -21,5 +21,5 @@ const C = {
|
|
|
21
21
|
[COLUMN_1.COLUMN.EXPRESSION]: COLUMN_COMPLEX_VALUE_1.COLUMN_COMPLEX_VALUE.EXPRESSION.map(setTabStructure),
|
|
22
22
|
[COLUMN_1.COLUMN.IMAGEUPLOAD]: COLUMN_COMPLEX_VALUE_1.COLUMN_COMPLEX_VALUE.IMAGEUPLOAD.map(setTabStructure),
|
|
23
23
|
};
|
|
24
|
-
C[COLUMN_1.COLUMN.DATE + '-complete'] = C[COLUMN_1.COLUMN.DATE].concat(date_1.DATE_P_VALUES).concat(date_1.DATE_TIME_P_VALUES);
|
|
24
|
+
C[COLUMN_1.COLUMN.DATE + '-complete'] = C[COLUMN_1.COLUMN.DATE].concat(date_1.DATE_TIME_VALUES).concat(date_1.DATE_P_VALUES).concat(date_1.DATE_TIME_P_VALUES);
|
|
25
25
|
exports.COLUMN_PROPERTY_VALUE = C;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFSFilter, IFUFilter } from "../..";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the label of the filter property
|
|
4
|
+
* @param filter The UI Filter
|
|
5
|
+
* @returns a string of the filter property label
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFilterPropertyLabel(filter: IFUFilter | IFSFilter): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFilterPropertyLabel = void 0;
|
|
4
|
+
const __1 = require("../../..");
|
|
5
|
+
/**
|
|
6
|
+
* Gets the label of the filter property
|
|
7
|
+
* @param filter The UI Filter
|
|
8
|
+
* @returns a string of the filter property label
|
|
9
|
+
*/
|
|
10
|
+
function getFilterPropertyLabel(filter) {
|
|
11
|
+
return __1.getPropertyLabel(filter.column, filter.property);
|
|
12
|
+
}
|
|
13
|
+
exports.getFilterPropertyLabel = getFilterPropertyLabel;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './excludeUIFiltersByAggregate';
|
|
2
2
|
export * from './excludeUIFlatFiltersByScopes';
|
|
3
|
+
export * from './getFilterPropertyLabel';
|
|
3
4
|
export * from './getOutputFormatByColumn';
|
|
4
5
|
export * from './getUIFlatFilterByParams';
|
|
5
6
|
export * from './getUIFlatFiltersByParams';
|
|
@@ -12,6 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./excludeUIFiltersByAggregate"), exports);
|
|
14
14
|
__exportStar(require("./excludeUIFlatFiltersByScopes"), exports);
|
|
15
|
+
__exportStar(require("./getFilterPropertyLabel"), exports);
|
|
15
16
|
__exportStar(require("./getOutputFormatByColumn"), exports);
|
|
16
17
|
__exportStar(require("./getUIFlatFilterByParams"), exports);
|
|
17
18
|
__exportStar(require("./getUIFlatFiltersByParams"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPropertyLabel = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
function getPropertyLabel(column, property) {
|
|
7
|
+
var _a;
|
|
8
|
+
let propertyLabel;
|
|
9
|
+
const propertyValues = __1.COLUMN_PROPERTY_VALUE[_1.isDateColumn(column) ? column.type + '-complete' : column.type];
|
|
10
|
+
if (!__1.isEmpty(propertyValues))
|
|
11
|
+
propertyLabel = (_a = propertyValues.find(pValue => pValue.value === property)) === null || _a === void 0 ? void 0 : _a.label;
|
|
12
|
+
return propertyLabel;
|
|
13
|
+
}
|
|
14
|
+
exports.getPropertyLabel = getPropertyLabel;
|
package/dist/cjs/qrvey/index.js
CHANGED
|
@@ -11,5 +11,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./getColumnsLabel"), exports);
|
|
14
|
+
__exportStar(require("./getPropertyLabel"), exports);
|
|
14
15
|
__exportStar(require("./isDateColumn"), exports);
|
|
15
16
|
__exportStar(require("./isComplexColumn"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DATE_P_VALUES, DATE_TIME_P_VALUES } from "../date";
|
|
1
|
+
import { DATE_P_VALUES, DATE_TIME_VALUES, DATE_TIME_P_VALUES } from "../date";
|
|
2
2
|
import { DATE_VALUES } from "../date/constants/DATE_VALUES";
|
|
3
3
|
import { COLUMN } from "./COLUMN";
|
|
4
4
|
import { COLUMN_COMPLEX_VALUE } from "./COLUMN_COMPLEX_VALUE";
|
|
@@ -18,5 +18,5 @@ const C = {
|
|
|
18
18
|
[COLUMN.EXPRESSION]: COLUMN_COMPLEX_VALUE.EXPRESSION.map(setTabStructure),
|
|
19
19
|
[COLUMN.IMAGEUPLOAD]: COLUMN_COMPLEX_VALUE.IMAGEUPLOAD.map(setTabStructure),
|
|
20
20
|
};
|
|
21
|
-
C[COLUMN.DATE + '-complete'] = C[COLUMN.DATE].concat(DATE_P_VALUES).concat(DATE_TIME_P_VALUES);
|
|
21
|
+
C[COLUMN.DATE + '-complete'] = C[COLUMN.DATE].concat(DATE_TIME_VALUES).concat(DATE_P_VALUES).concat(DATE_TIME_P_VALUES);
|
|
22
22
|
export const COLUMN_PROPERTY_VALUE = C;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFSFilter, IFUFilter } from "../..";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the label of the filter property
|
|
4
|
+
* @param filter The UI Filter
|
|
5
|
+
* @returns a string of the filter property label
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFilterPropertyLabel(filter: IFUFilter | IFSFilter): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getPropertyLabel } from "../../..";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the label of the filter property
|
|
4
|
+
* @param filter The UI Filter
|
|
5
|
+
* @returns a string of the filter property label
|
|
6
|
+
*/
|
|
7
|
+
export function getFilterPropertyLabel(filter) {
|
|
8
|
+
return getPropertyLabel(filter.column, filter.property);
|
|
9
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './excludeUIFiltersByAggregate';
|
|
2
2
|
export * from './excludeUIFlatFiltersByScopes';
|
|
3
|
+
export * from './getFilterPropertyLabel';
|
|
3
4
|
export * from './getOutputFormatByColumn';
|
|
4
5
|
export * from './getUIFlatFilterByParams';
|
|
5
6
|
export * from './getUIFlatFiltersByParams';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './excludeUIFiltersByAggregate';
|
|
2
2
|
export * from './excludeUIFlatFiltersByScopes';
|
|
3
|
+
export * from './getFilterPropertyLabel';
|
|
3
4
|
export * from './getOutputFormatByColumn';
|
|
4
5
|
export * from './getUIFlatFilterByParams';
|
|
5
6
|
export * from './getUIFlatFiltersByParams';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isDateColumn } from ".";
|
|
2
|
+
import { COLUMN_PROPERTY_VALUE, isEmpty } from "..";
|
|
3
|
+
export function getPropertyLabel(column, property) {
|
|
4
|
+
var _a;
|
|
5
|
+
let propertyLabel;
|
|
6
|
+
const propertyValues = COLUMN_PROPERTY_VALUE[isDateColumn(column) ? column.type + '-complete' : column.type];
|
|
7
|
+
if (!isEmpty(propertyValues))
|
|
8
|
+
propertyLabel = (_a = propertyValues.find(pValue => pValue.value === property)) === null || _a === void 0 ? void 0 : _a.label;
|
|
9
|
+
return propertyLabel;
|
|
10
|
+
}
|
package/dist/qrvey/index.d.ts
CHANGED
package/dist/qrvey/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DATE_P_VALUES, DATE_TIME_P_VALUES } from "../date";
|
|
1
|
+
import { DATE_P_VALUES, DATE_TIME_VALUES, DATE_TIME_P_VALUES } from "../date";
|
|
2
2
|
import { DATE_VALUES } from "../date/constants/DATE_VALUES";
|
|
3
3
|
import { COLUMN } from "./COLUMN";
|
|
4
4
|
import { COLUMN_COMPLEX_VALUE } from "./COLUMN_COMPLEX_VALUE";
|
|
@@ -20,6 +20,6 @@ const C = {
|
|
|
20
20
|
[COLUMN.IMAGEUPLOAD]: COLUMN_COMPLEX_VALUE.IMAGEUPLOAD.map(setTabStructure),
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
C[COLUMN.DATE + '-complete'] = C[COLUMN.DATE].concat(DATE_P_VALUES).concat(DATE_TIME_P_VALUES);
|
|
23
|
+
C[COLUMN.DATE + '-complete'] = C[COLUMN.DATE].concat(DATE_TIME_VALUES).concat(DATE_P_VALUES).concat(DATE_TIME_P_VALUES);
|
|
24
24
|
|
|
25
25
|
export const COLUMN_PROPERTY_VALUE = C;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFSFilter, IFUFilter } from "../..";
|
|
2
|
+
import { getPropertyLabel } from "../../..";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Gets the label of the filter property
|
|
6
|
+
* @param filter The UI Filter
|
|
7
|
+
* @returns a string of the filter property label
|
|
8
|
+
*/
|
|
9
|
+
export function getFilterPropertyLabel(filter: IFUFilter | IFSFilter): string {
|
|
10
|
+
return getPropertyLabel(filter.column as any, filter.property);
|
|
11
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './excludeUIFiltersByAggregate';
|
|
2
2
|
export * from './excludeUIFlatFiltersByScopes';
|
|
3
|
+
export * from './getFilterPropertyLabel';
|
|
3
4
|
export * from './getOutputFormatByColumn';
|
|
4
5
|
export * from './getUIFlatFilterByParams';
|
|
5
6
|
export * from './getUIFlatFiltersByParams';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { isDateColumn } from ".";
|
|
2
|
+
import { COLUMN_PROPERTY, COLUMN_PROPERTY_VALUE, IQrveyColumn, isEmpty } from "..";
|
|
3
|
+
|
|
4
|
+
export function getPropertyLabel(column: IQrveyColumn, property: COLUMN_PROPERTY): string {
|
|
5
|
+
let propertyLabel;
|
|
6
|
+
const propertyValues = COLUMN_PROPERTY_VALUE[isDateColumn(column) ? column.type + '-complete' : column.type];
|
|
7
|
+
if (!isEmpty(propertyValues)) propertyLabel = propertyValues.find(pValue => pValue.value === property)?.label;
|
|
8
|
+
return propertyLabel;
|
|
9
|
+
}
|
package/src/qrvey/index.ts
CHANGED