1 | "use strict";
|
2 | var __assign = (this && this.__assign) || function () {
|
3 | __assign = Object.assign || function(t) {
|
4 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5 | s = arguments[i];
|
6 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7 | t[p] = s[p];
|
8 | }
|
9 | return t;
|
10 | };
|
11 | return __assign.apply(this, arguments);
|
12 | };
|
13 | Object.defineProperty(exports, "__esModule", { value: true });
|
14 | exports.filterFunctionsV4 = exports.filterFunctions = exports.hasSubsequence = exports.hasSubset = exports.now = exports.minDateTime = exports.maxDateTime = exports.totalOffsetMinutes = exports.fractionalSeconds = exports.matchesPattern = exports.contains = void 0;
|
15 | var filter_functions_1 = require("../odata-common/filter/filter-functions");
|
16 | var filter_function_1 = require("./filter-function");
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | function contains(substr, str) {
|
26 | return filter_function_1.filterFunction('contains', 'boolean', substr, str);
|
27 | }
|
28 | exports.contains = contains;
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | function matchesPattern(str, regex) {
|
36 | return filter_function_1.filterFunction('matchesPattern', 'boolean', str, regex);
|
37 | }
|
38 | exports.matchesPattern = matchesPattern;
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | function fractionalSeconds(date) {
|
46 | return filter_function_1.filterFunction('fractionalseconds', 'decimal', date);
|
47 | }
|
48 | exports.fractionalSeconds = fractionalSeconds;
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | function totalOffsetMinutes(date) {
|
55 | return filter_function_1.filterFunction('totaloffsetminutes', 'decimal', date);
|
56 | }
|
57 | exports.totalOffsetMinutes = totalOffsetMinutes;
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | function maxDateTime() {
|
63 | return filter_function_1.filterFunction('maxdatetime', 'decimal');
|
64 | }
|
65 | exports.maxDateTime = maxDateTime;
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | function minDateTime() {
|
71 | return filter_function_1.filterFunction('mindatetime', 'decimal');
|
72 | }
|
73 | exports.minDateTime = minDateTime;
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | function now() {
|
79 | return filter_function_1.filterFunction('now', 'decimal');
|
80 | }
|
81 | exports.now = now;
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | function hasSubset(subset, set) {
|
91 | return filter_function_1.filterFunction('hassubset', 'boolean', subset, set);
|
92 | }
|
93 | exports.hasSubset = hasSubset;
|
94 | /**
|
95 | * Build a filter function to test whether a set is a subsequence of the other, i. e. whether the second parameter can be transformed into the first by removing items. Evaluates to boolean.
|
96 | * @param subsequence - The subsequence to test for. This can either be an array, a reference to a field or another filter function.
|
97 | * @param sequence - The sequence to test. This can either be an array, a reference to a field or another filter function.
|
98 | *
|
99 | * @returns The newly created filter function
|
100 | */
|
101 | function hasSubsequence(subsequence, sequence) {
|
102 | return filter_function_1.filterFunction('hassubsequence', 'boolean', subsequence, sequence);
|
103 | }
|
104 | exports.hasSubsequence = hasSubsequence;
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 | exports.filterFunctions = __assign(__assign({}, filter_functions_1.filterFunctions), { contains: contains, matchesPattern: matchesPattern, fractionalSeconds: fractionalSeconds, totalOffsetMinutes: totalOffsetMinutes, maxDateTime: maxDateTime, minDateTime: minDateTime, now: now, hasSubset: hasSubset, hasSubsequence: hasSubsequence });
|
112 | exports.filterFunctionsV4 = exports.filterFunctions;
|
113 |
|
\ | No newline at end of file |