@opra/common 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/index.cjs +4 -4
- package/browser/index.mjs +3 -3
- package/cjs/document/decorators/http-operation-entity.decorator.js +5 -0
- package/cjs/filter/filter-rules.js +2 -0
- package/esm/document/decorators/http-operation-entity.decorator.js +5 -0
- package/esm/filter/filter-rules.js +2 -0
- package/package.json +1 -1
- package/types/document/decorators/http-operation-entity.decorator.d.ts +1 -0
- package/types/filter/filter-rules.d.ts +1 -0
|
@@ -125,6 +125,11 @@ function createFilterDecorator(decorator, decoratorChain, dataType) {
|
|
|
125
125
|
}
|
|
126
126
|
: arg0) || {};
|
|
127
127
|
filterOptions.operators = filterOptions.operators || ['=', '!='];
|
|
128
|
+
if (field.includes(':')) {
|
|
129
|
+
const a = field.split(':');
|
|
130
|
+
field = a[0];
|
|
131
|
+
filterOptions.mappedField = a[1];
|
|
132
|
+
}
|
|
128
133
|
decoratorChain.push(() => {
|
|
129
134
|
filterRules.set(field, filterOptions);
|
|
130
135
|
filterType.rules = filterRules.toJSON();
|
|
@@ -119,6 +119,11 @@ export function createFilterDecorator(decorator, decoratorChain, dataType) {
|
|
|
119
119
|
}
|
|
120
120
|
: arg0) || {};
|
|
121
121
|
filterOptions.operators = filterOptions.operators || ['=', '!='];
|
|
122
|
+
if (field.includes(':')) {
|
|
123
|
+
const a = field.split(':');
|
|
124
|
+
field = a[0];
|
|
125
|
+
filterOptions.mappedField = a[1];
|
|
126
|
+
}
|
|
122
127
|
decoratorChain.push(() => {
|
|
123
128
|
filterRules.set(field, filterOptions);
|
|
124
129
|
filterType.rules = filterRules.toJSON();
|
package/package.json
CHANGED
|
@@ -52,6 +52,7 @@ declare module '../http/http-operation.js' {
|
|
|
52
52
|
}
|
|
53
53
|
/** DeleteMany */
|
|
54
54
|
interface FilterOptions {
|
|
55
|
+
mappedField?: string;
|
|
55
56
|
operators?: OpraFilter.ComparisonOperator[];
|
|
56
57
|
notes?: string;
|
|
57
58
|
prepare?: (args: OpraFilter.ComparisonExpression.PrepareArgs) => any;
|