@emuanalytics/flow-rdf-ui 4.0.14 → 4.0.16
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/dist/components/map/map.component.mjs +14 -7
- package/dist/components/split-view/split-view.component.mjs +2 -2
- package/dist/components/split-view-pane/split-view-pane.component.mjs +3 -3
- package/dist/components/split-view-toggle-button/split-view-toggle-button.component.mjs +1 -1
- package/dist/components/tree/tree.component.mjs +2 -0
- package/dist/custom-elements.json +6227 -6219
- package/dist/index.d.mts +270 -4
- package/dist/index.d.ts +270 -4
- package/dist/package.json.mjs +1 -1
- package/dist/vscode.html-custom-data.json +571 -571
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,13 @@ declare global {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
type FlowCollapseSplitViewEvent = CustomEvent<Record<PropertyKey, never>>;
|
|
81
|
+
declare global {
|
|
82
|
+
interface GlobalEventHandlersEventMap {
|
|
83
|
+
'flow-ui-collapse-split-view': FlowCollapseSplitViewEvent;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
type FlowDragEvent = CustomEvent<{
|
|
81
88
|
x: number;
|
|
82
89
|
y: number;
|
|
@@ -117,6 +124,13 @@ declare global {
|
|
|
117
124
|
}
|
|
118
125
|
}
|
|
119
126
|
|
|
127
|
+
type FlowExpandSplitViewEvent = CustomEvent<Record<PropertyKey, never>>;
|
|
128
|
+
declare global {
|
|
129
|
+
interface GlobalEventHandlersEventMap {
|
|
130
|
+
'flow-ui-expand-split-view': FlowExpandSplitViewEvent;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
120
134
|
type FlowFinishEvent = CustomEvent<Record<PropertyKey, never>>;
|
|
121
135
|
declare global {
|
|
122
136
|
interface GlobalEventHandlersEventMap {
|
|
@@ -1251,62 +1265,177 @@ declare class FlowUiQueryBuilder extends FlowRdfElement {
|
|
|
1251
1265
|
render(): lit_html.TemplateResult<1>;
|
|
1252
1266
|
}
|
|
1253
1267
|
|
|
1268
|
+
/**
|
|
1269
|
+
* An abstract logical expression used to represent a user-defined query or filter.
|
|
1270
|
+
*
|
|
1271
|
+
* A rule set consists of one or more rules, where each rule is a single logical expression
|
|
1272
|
+
* of the form `<field> <operator> <value>` (for example, `name == 'John'`). A rule set combines
|
|
1273
|
+
* its rules using a condition, which can be either `and` or `or`. Rule sets can be nested to
|
|
1274
|
+
* create complex queries.
|
|
1275
|
+
*
|
|
1276
|
+
* Rule sets are typically created by the end-user using the [Query Builder](/flow-rdf-ui/web-components/flow-ui-query-builder) UI component.
|
|
1277
|
+
*/
|
|
1254
1278
|
interface FlowQueryBuilderRuleSet {
|
|
1279
|
+
/** The combining condition for rules in this rule set (`and` or `or`). */
|
|
1255
1280
|
condition: string;
|
|
1281
|
+
/** One or more rules or rule sets to combine into a logical expression.*/
|
|
1256
1282
|
rules: Array<FlowQueryBuilderRuleSet | FlowQueryBuilderRule>;
|
|
1257
1283
|
}
|
|
1284
|
+
/**
|
|
1285
|
+
* A single abstract logical expression. Combined into a {@link FlowQueryBuilderRuleSet} to represent a user-defined query or filter.
|
|
1286
|
+
*
|
|
1287
|
+
* A rule is a single logical expression of the form `<field> <operator> <value>` (for example, `name == 'John'`).
|
|
1288
|
+
*
|
|
1289
|
+
* Supported operators are:
|
|
1290
|
+
*
|
|
1291
|
+
* - `=`: `<field>` exactly equals `<value>`.
|
|
1292
|
+
* - `!=`: `<field>` does not equal `<value>`.
|
|
1293
|
+
* - `<`: `<field>` less than `<value>`.
|
|
1294
|
+
* - `<=`: `<field>` less than or equal to `<value>`.
|
|
1295
|
+
* - `>`: `<field>` greater than `<value>`.
|
|
1296
|
+
* - `>=`: `<field>` greater than or equal to `<value>`.
|
|
1297
|
+
* - `in`: `<field>` in list of values. `<value>` is an array. (select-type fields only)
|
|
1298
|
+
* - `!in`: `<field>` not in list of values. `<value>` is an array. (select-type fields only)
|
|
1299
|
+
* - `contains`: `<field>` contains substring `<value>`. (string fields only)
|
|
1300
|
+
* - `!contains`: `<field>` does not contain substring `<value>`. (string fields only)
|
|
1301
|
+
* - `like`: `<field>` matches a wildcard pattern `<value>`. (string fields only)
|
|
1302
|
+
* - `!like`: `<field>` does not matched a wildcard pattern `<value>`. (string fields only)
|
|
1303
|
+
* - `regex`: `<field>` matches a regular expression pattern `<value>`. (string fields only)
|
|
1304
|
+
* - `!regex`: `<field>` does not match a regular expression pattern `<value>`. (string fields only)
|
|
1305
|
+
*
|
|
1306
|
+
* Wildcard patterns use `*` to match any sequence of characters and `?` to match any single character.
|
|
1307
|
+
*
|
|
1308
|
+
* Regular expressions use the JavaScript regular expression syntax.
|
|
1309
|
+
*
|
|
1310
|
+
* The string-matching operators are case-sensitive by default. Specify `caseInsensitive: true` in the {@link FlowQueryBuilderStringField} field definition to use case-insensitive matching.
|
|
1311
|
+
*
|
|
1312
|
+
*/
|
|
1258
1313
|
interface FlowQueryBuilderRule<ValueType = any> {
|
|
1314
|
+
/** Field identifier. */
|
|
1259
1315
|
field?: string;
|
|
1316
|
+
/** Rule value. */
|
|
1260
1317
|
value?: ValueType;
|
|
1318
|
+
/** Rule operator. */
|
|
1261
1319
|
operator?: string;
|
|
1320
|
+
/** Set to `false` to disable a rule without removing it from its parent ruleset. */
|
|
1262
1321
|
enabled?: boolean;
|
|
1263
1322
|
}
|
|
1323
|
+
/**
|
|
1324
|
+
* An individual option for a select-type Query Builder field.
|
|
1325
|
+
*/
|
|
1264
1326
|
interface FlowQueryBuilderOption {
|
|
1327
|
+
/** Display name of the value. */
|
|
1265
1328
|
name: string;
|
|
1329
|
+
/** Option identifier. */
|
|
1266
1330
|
value: string;
|
|
1267
1331
|
}
|
|
1332
|
+
/** The set of field definitions comprising a {@link FlowQueryBuilderConfig} definition. */
|
|
1268
1333
|
interface FlowQueryBuilderFieldMap {
|
|
1269
1334
|
[key: string]: FlowQueryBuilderField;
|
|
1270
1335
|
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Base interface for a Query Builder field definition. The field definition specifies how to display
|
|
1338
|
+
* a field in the Query Builder UI and how to convert the user-entered value to a concrete filter expression.
|
|
1339
|
+
*
|
|
1340
|
+
* The following field types are supported:
|
|
1341
|
+
*
|
|
1342
|
+
* - `string`: A text field, displayed as an input box. Supports string-matching operators.
|
|
1343
|
+
* - `number`: A numeric field, displayed as an numeric input box with stepper controls. Supports numeric comparison operators.
|
|
1344
|
+
* - `date`: A date field, displayed as a date picker. Supports numeric comparison operators.
|
|
1345
|
+
* - `time`: A time field, displayed as a time picker. Supports numeric comparison operators.
|
|
1346
|
+
* - `datetime`: A date-time field, displayed as a date-time picker. Supports numeric comparison operators.
|
|
1347
|
+
* - `select`: A select field, displayed as a dropdown list. Supports `in` and `!in` operators.
|
|
1348
|
+
*
|
|
1349
|
+
* In addition, all field types support equality operators (`=`, `!=`).
|
|
1350
|
+
*
|
|
1351
|
+
* @typeParam ValueType - The underlying type of the field value.
|
|
1352
|
+
*/
|
|
1271
1353
|
interface FlowQueryBuilderFieldBase<ValueType = any> {
|
|
1354
|
+
/** Display name for the field. */
|
|
1272
1355
|
name: string;
|
|
1356
|
+
/** Field type: `string`, `number`, `datetime`, `date`, `time`, `select`. */
|
|
1273
1357
|
type: string;
|
|
1358
|
+
/** @internal */
|
|
1274
1359
|
value?: ValueType;
|
|
1360
|
+
/** Set to `true` to allow the field to be `null`. */
|
|
1275
1361
|
nullable?: boolean;
|
|
1362
|
+
/** Optionally override supported operators for the field. */
|
|
1276
1363
|
operators?: string[];
|
|
1364
|
+
/** Default value for the field: static value or value-producing function. */
|
|
1277
1365
|
defaultValue?: ValueType | (() => ValueType);
|
|
1366
|
+
/** Default operator for the field. */
|
|
1278
1367
|
defaultOperator?: string;
|
|
1368
|
+
/** Optional function to convert the user-entered value before applying a rule set converter. */
|
|
1279
1369
|
convertValue?: (value: ValueType) => any;
|
|
1370
|
+
/** Optional validator function to validate the user-entered value. */
|
|
1280
1371
|
validator?: (rule: FlowQueryBuilderRule<ValueType>) => string;
|
|
1281
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* Field definition for a string-type Query Builder field.
|
|
1375
|
+
*/
|
|
1282
1376
|
interface FlowQueryBuilderStringField extends FlowQueryBuilderFieldBase<string> {
|
|
1283
1377
|
type: 'string';
|
|
1378
|
+
/** Set to `true` to perform case-insensitive matching for `like` and `regex` operators. */
|
|
1284
1379
|
caseInsensitive?: boolean;
|
|
1285
1380
|
}
|
|
1381
|
+
/**
|
|
1382
|
+
* Field definition for a number-type Query Builder field.
|
|
1383
|
+
*/
|
|
1286
1384
|
interface FlowQueryBuilderNumberField extends FlowQueryBuilderFieldBase<number> {
|
|
1287
1385
|
type: 'number';
|
|
1386
|
+
/** Minimum allowed value for the field. */
|
|
1288
1387
|
min?: number;
|
|
1388
|
+
/** Maximum allowed value for the field. */
|
|
1289
1389
|
max?: number;
|
|
1390
|
+
/** Step size used by the field stepper controls. */
|
|
1290
1391
|
step?: number;
|
|
1291
1392
|
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Base interface for date/time-type Query Builder fields.
|
|
1395
|
+
*
|
|
1396
|
+
* Note that the underlying value type for date/time fields is an ISO 8601 string.
|
|
1397
|
+
*/
|
|
1292
1398
|
interface FlowQueryBuilderDateTimeFieldBase extends FlowQueryBuilderFieldBase<string> {
|
|
1399
|
+
/** Luxon date format for display of the field value. */
|
|
1293
1400
|
dateFormat?: string | (() => string);
|
|
1401
|
+
/** Time zone specifier for display of the field value. */
|
|
1294
1402
|
timezone?: string | (() => string);
|
|
1403
|
+
/** Locale code for display of the field value. */
|
|
1295
1404
|
locale?: string | (() => string);
|
|
1296
1405
|
}
|
|
1297
|
-
|
|
1406
|
+
/**
|
|
1407
|
+
* Field definition for a datetime-type Query Builder field.
|
|
1408
|
+
*/ interface FlowQueryBuilderDateTimeField extends FlowQueryBuilderDateTimeFieldBase {
|
|
1298
1409
|
type: 'datetime';
|
|
1299
1410
|
}
|
|
1411
|
+
/**
|
|
1412
|
+
* Field definition for a date-type Query Builder field.
|
|
1413
|
+
*/
|
|
1300
1414
|
interface FlowQueryBuilderDateField extends FlowQueryBuilderDateTimeFieldBase {
|
|
1301
1415
|
type: 'date';
|
|
1302
1416
|
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Field definition for a time-type Query Builder field.
|
|
1419
|
+
*/
|
|
1303
1420
|
interface FlowQueryBuilderTimeField extends FlowQueryBuilderDateTimeFieldBase {
|
|
1304
1421
|
type: 'time';
|
|
1305
1422
|
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Field definition for a select-type Query Builder field.
|
|
1425
|
+
*
|
|
1426
|
+
* The underlying value type for select fields is a string (single-select) or an array of strings (multi-select).
|
|
1427
|
+
* When the `in` or `!in` operator is selected, the field acts as a multi-select field. For other operators,
|
|
1428
|
+
* the field acts as a single-select field.
|
|
1429
|
+
*
|
|
1430
|
+
*/
|
|
1306
1431
|
interface FlowQueryBuilderSelectField extends FlowQueryBuilderFieldBase<string | string[]> {
|
|
1307
1432
|
type: 'select';
|
|
1433
|
+
/** The selectable options for the field. */
|
|
1308
1434
|
options?: FlowQueryBuilderOption[];
|
|
1309
1435
|
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Map of field type names to field definitions for expansion of type parameters.
|
|
1438
|
+
*/
|
|
1310
1439
|
interface FlowQueryBuilderFieldTypeMap {
|
|
1311
1440
|
string: FlowQueryBuilderStringField;
|
|
1312
1441
|
number: FlowQueryBuilderNumberField;
|
|
@@ -1316,8 +1445,17 @@ interface FlowQueryBuilderFieldTypeMap {
|
|
|
1316
1445
|
select: FlowQueryBuilderSelectField;
|
|
1317
1446
|
}
|
|
1318
1447
|
type FlowQueryBuilderFieldType = keyof FlowQueryBuilderFieldTypeMap;
|
|
1448
|
+
/**
|
|
1449
|
+
* The set of field types supported by the Query Builder. See {@link FlowQueryBuilderFieldBase}.
|
|
1450
|
+
*/
|
|
1319
1451
|
type FlowQueryBuilderField = FlowQueryBuilderFieldTypeMap[keyof FlowQueryBuilderFieldTypeMap];
|
|
1320
1452
|
type FlowQueryBuilderTemplateFn<FieldType extends FlowQueryBuilderFieldType> = (rule: FlowQueryBuilderRule<FlowQueryBuilderFieldTypeMap[FieldType]['value']>, field: FlowQueryBuilderFieldTypeMap[FieldType], qb: FlowUiQueryBuilder, update: () => void) => TemplateResult;
|
|
1453
|
+
/**
|
|
1454
|
+
* Configuration for a [Query Builder](/flow-rdf-ui/web-components/flow-ui-query-builder) instance.
|
|
1455
|
+
*
|
|
1456
|
+
* The configuration specifies the set of fields available,
|
|
1457
|
+
* how to display those fields in the Query Builder UI, and how to convert the user-defined query to a concrete filter expression.
|
|
1458
|
+
*/
|
|
1321
1459
|
interface FlowQueryBuilderConfig {
|
|
1322
1460
|
fields: FlowQueryBuilderFieldMap;
|
|
1323
1461
|
}
|
|
@@ -1325,10 +1463,22 @@ interface FlowQueryBuilderFieldDefinition<Field extends FlowQueryBuilderFieldTyp
|
|
|
1325
1463
|
operators: string[];
|
|
1326
1464
|
template: FlowQueryBuilderTemplateFn<Field>;
|
|
1327
1465
|
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Options common to all Query Builder converters. These options are used to modify how a Query Builder
|
|
1468
|
+
* ruleset is converted to one of the supported concrete filter implementations:
|
|
1469
|
+
*
|
|
1470
|
+
* - Flo.w query definition - {@link flowQueryConverter}
|
|
1471
|
+
* - JavaScript filter function - {@link javascriptFilterConverter}
|
|
1472
|
+
* - Map layer filter - {@link mapLayerFilterConverter}
|
|
1473
|
+
*/
|
|
1328
1474
|
interface FlowQueryBuilderConverterOptions {
|
|
1475
|
+
/** Subset of fields defined in the query ruleset to include in the converted result. */
|
|
1329
1476
|
includeFields?: string[];
|
|
1477
|
+
/** Subset of fields defined in the query ruleset to exclude from the converted result. */
|
|
1330
1478
|
excludeFields?: string[];
|
|
1479
|
+
/** Map of fields to rename in the converted result. */
|
|
1331
1480
|
renameFields?: Record<string, string>;
|
|
1481
|
+
/** Set to `true` to throw an exception on error. By default, the problematic Query Builder field is ignored. */
|
|
1332
1482
|
throwOnError?: boolean;
|
|
1333
1483
|
}
|
|
1334
1484
|
type FlowQueryBuilderConverter<R = any> = (ruleSet: FlowQueryBuilderRuleSet, config: FlowQueryBuilderConfig, options?: FlowQueryBuilderConverterOptions) => R;
|
|
@@ -1419,18 +1569,133 @@ declare const converter$2: FlowQueryBuilderConverter;
|
|
|
1419
1569
|
declare class JavaScriptFilterError extends Error {
|
|
1420
1570
|
constructor(msg: string);
|
|
1421
1571
|
}
|
|
1572
|
+
/**
|
|
1573
|
+
* A JavaScript function that implements the logical expression defined by a user-specified {@link FlowQueryBuilderRuleSet}. The function
|
|
1574
|
+
* accepts a data object as an argument and returns a boolean result indicating whether the data object matches the rule set.
|
|
1575
|
+
*
|
|
1576
|
+
* The filter function is typically created by using the {@link javascriptFilterConverter} converter function, prior to applying
|
|
1577
|
+
* the filter to a collection of data objects returned from a dataset query.
|
|
1578
|
+
*
|
|
1579
|
+
* The filter function has an additional `expression` property that contains the generated JavaScript expression for debugging purposes.
|
|
1580
|
+
*
|
|
1581
|
+
* @typeParam TData The type of the data object to be filtered.
|
|
1582
|
+
*/
|
|
1422
1583
|
type JavaScriptFilterFn<TData = object> = ((data: TData) => boolean) & {
|
|
1584
|
+
/** The generated filter expression (for debugging purposes). */
|
|
1423
1585
|
expression: string;
|
|
1424
1586
|
};
|
|
1425
1587
|
/**
|
|
1426
|
-
*
|
|
1588
|
+
* A Query Builder converter that generates a JavaScript filter function from a user-specified {@link FlowQueryBuilderRuleSet}.
|
|
1589
|
+
*
|
|
1590
|
+
* The generated filter function accepts a data object as an argument and returns a boolean result indicating whether the data object
|
|
1591
|
+
* matches the rule set.
|
|
1592
|
+
*
|
|
1593
|
+
* This converter is typically used to apply a user-defined filter produced by the [Query Builder](/flow-rdf-ui/web-components/flow-ui-query-builder) component to a collection of data objects returned
|
|
1594
|
+
* from a Flo.w reactive query. The filter is applied client-side as an alternative to server-side filtering using the {@link flowQueryConverter} converter.
|
|
1595
|
+
*
|
|
1596
|
+
* See [Examples](#filtering-reactive-query-results) for example usage.
|
|
1597
|
+
*
|
|
1598
|
+
*
|
|
1599
|
+
* ### The generated filter function
|
|
1600
|
+
*
|
|
1601
|
+
* The abstract logical expression defined by the Query Builder ruleset is compiled into a safe and efficient JavaScript function that is designed
|
|
1602
|
+
* to be passed to the Array.filter method. To view the generated JavaScript expression for debugging purposes, inspect the `expression` property
|
|
1603
|
+
* of the returned filter function. Note that the generated expression makes use of two internal helper functions: `get(prop, data)` to retrieve a
|
|
1604
|
+
* sanitized property from the data object, and `regex(regex, value, caseInsensitive)` to compile, cache and evaluate regular expressions.
|
|
1605
|
+
*
|
|
1606
|
+
* Optionally, specify a type parameter when calling {@link javascriptFilterConverter} to strongly type the `data` parameter of the resulting filter function.
|
|
1427
1607
|
*
|
|
1428
1608
|
* @param ruleset Flo.w Query Builder ruleset to convert
|
|
1429
1609
|
* @param config Flo.w Query Builder field configuration
|
|
1430
1610
|
* @param options Converter options
|
|
1431
1611
|
*
|
|
1612
|
+
* @typeParam TData The type of the data object to be filtered. Optionally specify to strongly type the returned filter function.
|
|
1613
|
+
*
|
|
1432
1614
|
* @returns A function that accepts a data object and returns a boolean result indicating whether the data object matches the ruleset
|
|
1433
|
-
|
|
1615
|
+
*
|
|
1616
|
+
* @example
|
|
1617
|
+
### Basic usage
|
|
1618
|
+
```typescript
|
|
1619
|
+
// Query Builder field configuration
|
|
1620
|
+
const config = {
|
|
1621
|
+
fields: {
|
|
1622
|
+
name: {name: 'Area Name', type: 'string', caseInsensitive: true },
|
|
1623
|
+
no2: {name: 'NO₂ (ppm)', type: 'number' };
|
|
1624
|
+
}
|
|
1625
|
+
};
|
|
1626
|
+
|
|
1627
|
+
// Query Builder ruleset
|
|
1628
|
+
const ruleset = {
|
|
1629
|
+
"condition": "and",
|
|
1630
|
+
"rules": [
|
|
1631
|
+
{
|
|
1632
|
+
"enabled": true,
|
|
1633
|
+
"operator": "like",
|
|
1634
|
+
"value": "bar*",
|
|
1635
|
+
"field": "name"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"enabled": true,
|
|
1639
|
+
"operator": ">",
|
|
1640
|
+
"value": 20,
|
|
1641
|
+
"field": "no2"
|
|
1642
|
+
}
|
|
1643
|
+
]
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
const filterFn = javascriptFilterConverter(ruleset, config);
|
|
1647
|
+
filterFn.expression; // -> 'return (regex("^bar.*$", get("name", data), true)) && (get("no2", data) > 20);'
|
|
1648
|
+
|
|
1649
|
+
const data = [...]; // Array of data objects
|
|
1650
|
+
const filteredData = data.filter(filterFn);
|
|
1651
|
+
```
|
|
1652
|
+
|
|
1653
|
+
@example
|
|
1654
|
+
### Filtering reactive query results
|
|
1655
|
+
|
|
1656
|
+
The filter is applied to the results of a Flo.w reactive query in a computed property. The computed property will be re-evaluated whenever
|
|
1657
|
+
the query results or the filter ruleset changes.
|
|
1658
|
+
|
|
1659
|
+
The computed property can be bound to a map data source to display the filtered results on a map.
|
|
1660
|
+
|
|
1661
|
+
```typescript
|
|
1662
|
+
// Reactive state store
|
|
1663
|
+
class AppState extends StateStore {
|
|
1664
|
+
...
|
|
1665
|
+
|
|
1666
|
+
// User-defined Query Builder ruleset bound to Query Builder component
|
|
1667
|
+
@observable.ref
|
|
1668
|
+
queryBuilderRuleSet: FlowQueryBuilderRuleSet = { condition: 'and', rules: [] };
|
|
1669
|
+
|
|
1670
|
+
// Reactive query
|
|
1671
|
+
airQualityQuery = query<FeatureCollection<Geometry>>(() => {
|
|
1672
|
+
|
|
1673
|
+
const queryDefinition: QueryDefinition = {
|
|
1674
|
+
datasetId: 'airquality',
|
|
1675
|
+
format: 'geojson'
|
|
1676
|
+
};
|
|
1677
|
+
|
|
1678
|
+
return queryDefinition;
|
|
1679
|
+
});
|
|
1680
|
+
|
|
1681
|
+
// Application of client-side filter to query results
|
|
1682
|
+
@computed
|
|
1683
|
+
get filteredAirQuality() {
|
|
1684
|
+
// Bail out if results not yet retrieved
|
|
1685
|
+
if (!this.airQualityQuery.results) {
|
|
1686
|
+
return null;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
// Apply javascript filter to features
|
|
1690
|
+
const filterFn = javascriptFilterConverter(this.queryBuilderRuleSet, queryBuilderConfig);
|
|
1691
|
+
const filteredFeatures = this.airQualityQuery.results.features.filter((f) => filterFn(f.properties));
|
|
1692
|
+
|
|
1693
|
+
// Note: return a new FeatureCollection rather than mutating query results in-place
|
|
1694
|
+
return featureCollection(filteredFeatures);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
```
|
|
1698
|
+
*/
|
|
1434
1699
|
declare const converter$1: <TData = object>(ruleset: FlowQueryBuilderRuleSet, config: FlowQueryBuilderConfig, options?: FlowQueryBuilderConverterOptions) => JavaScriptFilterFn<TData>;
|
|
1435
1700
|
|
|
1436
1701
|
declare const converter: FlowQueryBuilderConverter<string | undefined>;
|
|
@@ -3591,6 +3856,7 @@ declare class FlowUiMap extends FlowRdfElement {
|
|
|
3591
3856
|
private _map?;
|
|
3592
3857
|
private _initialized;
|
|
3593
3858
|
private _resolveInitialized;
|
|
3859
|
+
private _pendingCenter?;
|
|
3594
3860
|
private _mapLoading;
|
|
3595
3861
|
/**
|
|
3596
3862
|
* The map ID. If not provided, a unique ID will be generated.
|
|
@@ -5706,4 +5972,4 @@ declare global {
|
|
|
5706
5972
|
}
|
|
5707
5973
|
}
|
|
5708
5974
|
|
|
5709
|
-
export { type BaseColorMapperField, type BaseColorStopOptions, type ColorMapperField, type ColorMapperOptions, type ColorMapperValue, type ColorStopOptions, type ColorStopValue, type FlowQueryBuilderConfig, type FlowQueryBuilderConverter, type FlowQueryBuilderConverterOptions, type FlowQueryBuilderDateField, type FlowQueryBuilderDateTimeField, type FlowQueryBuilderDateTimeFieldBase, type FlowQueryBuilderField, type FlowQueryBuilderFieldBase, type FlowQueryBuilderFieldDefinition, type FlowQueryBuilderFieldMap, type FlowQueryBuilderFieldType, type FlowQueryBuilderFieldTypeMap, type FlowQueryBuilderNumberField, type FlowQueryBuilderOption, type FlowQueryBuilderRule, type FlowQueryBuilderRuleSet, type FlowQueryBuilderSelectField, type FlowQueryBuilderStringField, type FlowQueryBuilderTemplateFn, type FlowQueryBuilderTimeField, type FlowAfterCollapseEvent as FlowUiAfterCollapseEvent, type FlowAfterExpandEvent as FlowUiAfterExpandEvent, type FlowAfterHideEvent as FlowUiAfterHideEvent, type FlowAfterShowEvent as FlowUiAfterShowEvent, FlowUiAlert, FlowUiAnimation, FlowUiAvatar, FlowUiBadge, type FlowBlurEvent as FlowUiBlurEvent, FlowUiBreadcrumb, FlowUiBreadcrumbItem, FlowUiButton, FlowUiButtonGroup, FlowUiCalendar, type FlowCancelEvent as FlowUiCancelEvent, FlowUiCard, FlowUiCarousel, FlowUiCarouselItem, type FlowChangeEvent as FlowUiChangeEvent, FlowUiChart, FlowUiCheckbox, type FlowClearEvent as FlowUiClearEvent, type FlowCloseEvent as FlowUiCloseEvent, type FlowCollapseEvent as FlowUiCollapseEvent, FlowUiColorMapper, FlowUiColorPicker, FlowUiColorStop, FlowUiDateTimePicker, FlowUiDetails, FlowUiDialog, FlowUiDivider, type FlowDragEvent as FlowUiDragEvent, type FlowDragStartEvent as FlowUiDragStartEvent, FlowUiDrawer, FlowUiDropdown, type FlowErrorEvent as FlowUiErrorEvent, type FlowExpandEvent as FlowUiExpandEvent, type FlowFinishEvent as FlowUiFinishEvent, type FlowFocusEvent as FlowUiFocusEvent, FlowUiGauge, type FlowHideEvent as FlowUiHideEvent, type FlowHoverEvent as FlowUiHoverEvent, FlowUiIcon, FlowUiIconButton, type FlowInitialFocusEvent as FlowUiInitialFocusEvent, FlowUiInput, type FlowInputEvent as FlowUiInputEvent, type FlowInvalidEvent as FlowUiInvalidEvent, type FlowLazyChangeEvent as FlowUiLazyChangeEvent, type FlowLazyLoadEvent as FlowUiLazyLoadEvent, type FlowLoadEvent as FlowUiLoadEvent, FlowUiMap, type FlowMapLoadEvent as FlowUiMapLoadEvent, FlowUiMenu, FlowUiMenuItem, FlowUiMenuLabel, type FlowMutationEvent as FlowUiMutationEvent, FlowUiMutationObserver, FlowUiOption, FlowUiPanel, FlowUiPanelHeader, type FlowPanelToggleEvent as FlowUiPanelToggleEvent, FlowUiPopup, FlowUiProgressBar, FlowUiProgressRing, FlowUiQueryBuilder, FlowUiRadio, FlowUiRadioGroup, FlowUiRange, type FlowRemoveEvent as FlowUiRemoveEvent, type FlowRepositionEvent as FlowUiRepositionEvent, type FlowRequestCloseEvent as FlowUiRequestCloseEvent, type FlowResizeEvent as FlowUiResizeEvent, FlowUiResizeObserver, FlowUiScrollView, FlowUiSelect, type FlowSelectEvent as FlowUiSelectEvent, type FlowShowEvent as FlowUiShowEvent, type FlowSlideChange as FlowUiSlideChange, FlowUiSpinner, FlowUiSplitView, FlowUiSplitViewDivider, FlowUiSplitViewPane, FlowUiSplitViewToggleButton, type FlowStartEvent as FlowUiStartEvent, FlowUiStepper, FlowUiStepperPanel, FlowUiSwitch, FlowUiTab, FlowUiTabGroup, type FlowTabHideEvent as FlowUiTabHideEvent, FlowUiTabPanel, type FlowTabShowEvent as FlowUiTabShowEvent, FlowUiTag, FlowUiTextarea, FlowUiTimer, FlowUiToolButton, FlowUiToolButtonGroup, FlowUiTooltip, FlowUiTree, FlowUiTreeItem, type FlowDragEndEvent as FlowUiUiDragEndEvent, FlowUiVisuallyHidden, type JavaScriptFilterFn
|
|
5975
|
+
export { type BaseColorMapperField, type BaseColorStopOptions, type ColorMapperField, type ColorMapperOptions, type ColorMapperValue, type ColorStopOptions, type ColorStopValue, type FlowQueryBuilderConfig, type FlowQueryBuilderConverter, type FlowQueryBuilderConverterOptions, type FlowQueryBuilderDateField, type FlowQueryBuilderDateTimeField, type FlowQueryBuilderDateTimeFieldBase, type FlowQueryBuilderField, type FlowQueryBuilderFieldBase, type FlowQueryBuilderFieldDefinition, type FlowQueryBuilderFieldMap, type FlowQueryBuilderFieldType, type FlowQueryBuilderFieldTypeMap, type FlowQueryBuilderNumberField, type FlowQueryBuilderOption, type FlowQueryBuilderRule, type FlowQueryBuilderRuleSet, type FlowQueryBuilderSelectField, type FlowQueryBuilderStringField, type FlowQueryBuilderTemplateFn, type FlowQueryBuilderTimeField, type FlowAfterCollapseEvent as FlowUiAfterCollapseEvent, type FlowAfterExpandEvent as FlowUiAfterExpandEvent, type FlowAfterHideEvent as FlowUiAfterHideEvent, type FlowAfterShowEvent as FlowUiAfterShowEvent, FlowUiAlert, FlowUiAnimation, FlowUiAvatar, FlowUiBadge, type FlowBlurEvent as FlowUiBlurEvent, FlowUiBreadcrumb, FlowUiBreadcrumbItem, FlowUiButton, FlowUiButtonGroup, FlowUiCalendar, type FlowCancelEvent as FlowUiCancelEvent, FlowUiCard, FlowUiCarousel, FlowUiCarouselItem, type FlowChangeEvent as FlowUiChangeEvent, FlowUiChart, FlowUiCheckbox, type FlowClearEvent as FlowUiClearEvent, type FlowCloseEvent as FlowUiCloseEvent, type FlowCollapseEvent as FlowUiCollapseEvent, type FlowCollapseSplitViewEvent as FlowUiCollapseSplitViewEvent, FlowUiColorMapper, FlowUiColorPicker, FlowUiColorStop, FlowUiDateTimePicker, FlowUiDetails, FlowUiDialog, FlowUiDivider, type FlowDragEvent as FlowUiDragEvent, type FlowDragStartEvent as FlowUiDragStartEvent, FlowUiDrawer, FlowUiDropdown, type FlowErrorEvent as FlowUiErrorEvent, type FlowExpandEvent as FlowUiExpandEvent, type FlowExpandSplitViewEvent as FlowUiExpandSplitViewEvent, type FlowFinishEvent as FlowUiFinishEvent, type FlowFocusEvent as FlowUiFocusEvent, FlowUiGauge, type FlowHideEvent as FlowUiHideEvent, type FlowHoverEvent as FlowUiHoverEvent, FlowUiIcon, FlowUiIconButton, type FlowInitialFocusEvent as FlowUiInitialFocusEvent, FlowUiInput, type FlowInputEvent as FlowUiInputEvent, type FlowInvalidEvent as FlowUiInvalidEvent, type FlowLazyChangeEvent as FlowUiLazyChangeEvent, type FlowLazyLoadEvent as FlowUiLazyLoadEvent, type FlowLoadEvent as FlowUiLoadEvent, FlowUiMap, type FlowMapLoadEvent as FlowUiMapLoadEvent, FlowUiMenu, FlowUiMenuItem, FlowUiMenuLabel, type FlowMutationEvent as FlowUiMutationEvent, FlowUiMutationObserver, FlowUiOption, FlowUiPanel, FlowUiPanelHeader, type FlowPanelToggleEvent as FlowUiPanelToggleEvent, FlowUiPopup, FlowUiProgressBar, FlowUiProgressRing, FlowUiQueryBuilder, FlowUiRadio, FlowUiRadioGroup, FlowUiRange, type FlowRemoveEvent as FlowUiRemoveEvent, type FlowRepositionEvent as FlowUiRepositionEvent, type FlowRequestCloseEvent as FlowUiRequestCloseEvent, type FlowResizeEvent as FlowUiResizeEvent, FlowUiResizeObserver, FlowUiScrollView, FlowUiSelect, type FlowSelectEvent as FlowUiSelectEvent, type FlowShowEvent as FlowUiShowEvent, type FlowSlideChange as FlowUiSlideChange, FlowUiSpinner, FlowUiSplitView, FlowUiSplitViewDivider, FlowUiSplitViewPane, FlowUiSplitViewToggleButton, type FlowStartEvent as FlowUiStartEvent, FlowUiStepper, FlowUiStepperPanel, FlowUiSwitch, FlowUiTab, FlowUiTabGroup, type FlowTabHideEvent as FlowUiTabHideEvent, FlowUiTabPanel, type FlowTabShowEvent as FlowUiTabShowEvent, FlowUiTag, FlowUiTextarea, FlowUiTimer, FlowUiToolButton, FlowUiToolButtonGroup, FlowUiTooltip, FlowUiTree, FlowUiTreeItem, type FlowDragEndEvent as FlowUiUiDragEndEvent, FlowUiVisuallyHidden, JavaScriptFilterError, type JavaScriptFilterFn, LocalizeController, type NumberColorMapperField, type NumberColorStopOptions, type SelectColorMapperField, type SelectColorStopOptions, type StringColorMapperField, type StringColorStopOptions, type Translation, addIcons, colorMapperValueToMaplibreExpression, escapeMaplibreString, filterRuleSet, converter$2 as flowQueryConverter, getAnimationNames, getEasingNames, initialize, initializeChartJs, isRule, isRuleOrRuleset, isRuleSet, converter$1 as javascriptFilterConverter, converter as mapLayerFilterConverter, registerChartComponent, registerComponents, registerIconLibrary, registerTranslation, renameRuleSetFields, setDefaultLocale, setDefaultTimeZone, transformRuleSet, unregisterIconLibrary };
|
package/dist/package.json.mjs
CHANGED