@platox/pivot-table 0.0.39 → 0.0.41
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/es/dashboard-workbench/components/add-module-modal/add-chart-modal/custome-data.js +5 -4
- package/es/dashboard-workbench/components/add-module-modal/add-chart-modal/custome-data.js.map +1 -1
- package/es/dashboard-workbench/components/add-module-modal/add-statistics-modal/custome-styles.js +1 -1
- package/es/dashboard-workbench/components/add-module-modal/add-statistics-modal/custome-styles.js.map +1 -1
- package/es/dashboard-workbench/components/global-filter-condition/ConditionSymbolAndValuePicker.d.ts +5 -0
- package/es/dashboard-workbench/components/global-filter-condition/ConditionSymbolAndValuePicker.js +24 -5
- package/es/dashboard-workbench/components/global-filter-condition/ConditionSymbolAndValuePicker.js.map +1 -1
- package/es/dashboard-workbench/components/global-filter-condition/index.js +3 -6
- package/es/dashboard-workbench/components/global-filter-condition/index.js.map +1 -1
- package/es/dashboard-workbench/components/global-filter-condition/index.module.less.js +3 -2
- package/es/dashboard-workbench/components/global-filter-condition/index.module.less.js.map +1 -1
- package/es/dashboard-workbench/components/module-content/calendar-module/index.js +9 -5
- package/es/dashboard-workbench/components/module-content/calendar-module/index.js.map +1 -1
- package/es/dashboard-workbench/components/module-content/chart-module/index.js +14 -14
- package/es/dashboard-workbench/components/module-content/chart-module/index.js.map +1 -1
- package/es/dashboard-workbench/components/module-content/statistics-module/index.js +10 -5
- package/es/dashboard-workbench/components/module-content/statistics-module/index.js.map +1 -1
- package/es/dashboard-workbench/components/module-content/utils.d.ts +1 -1
- package/es/dashboard-workbench/components/module-content/utils.js +291 -95
- package/es/dashboard-workbench/components/module-content/utils.js.map +1 -1
- package/es/dashboard-workbench/icon/icon-empty.js +98 -132
- package/es/dashboard-workbench/icon/icon-empty.js.map +1 -1
- package/es/dashboard-workbench/index.d.ts +7 -1
- package/es/dashboard-workbench/index.js +5 -3
- package/es/dashboard-workbench/index.js.map +1 -1
- package/es/dashboard-workbench/utils/index.js +7 -2
- package/es/dashboard-workbench/utils/index.js.map +1 -1
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/umd/pivot-table.umd.cjs +45 -45
- package/umd/style.css +1 -1
|
@@ -1,111 +1,307 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
case "thismonth":
|
|
21
|
-
return `${field}${u}gte.${dayjs().startOf("month").format("YYYY-MM-DD")}&${field}${u}lte.${dayjs().endOf("month").format("YYYY-MM-DD")}`;
|
|
22
|
-
case "lastmonth": {
|
|
23
|
-
const startOfLastMonth = dayjs().subtract(1, "month").startOf("month");
|
|
24
|
-
const endOfLastMonth = dayjs().subtract(1, "month").endOf("month");
|
|
25
|
-
return `${field}${u}gte.${startOfLastMonth.format(
|
|
26
|
-
"YYYY-MM-DD"
|
|
27
|
-
)}&${field}${u}lte.${endOfLastMonth.format("YYYY-MM-DD")}`;
|
|
28
|
-
}
|
|
29
|
-
case "last7days":
|
|
30
|
-
return `${field}${u}gte.${dayjs().subtract(7, "days").format("YYYY-MM-DD")}&${field}${u}lte.${dayjs().format("YYYY-MM-DD")}`;
|
|
31
|
-
case "last30days":
|
|
32
|
-
return `${field}${u}gte.${dayjs().subtract(30, "days").format("YYYY-MM-DD")}&${field}${u}lte.${dayjs().format("YYYY-MM-DD")}`;
|
|
33
|
-
default:
|
|
34
|
-
return "";
|
|
2
|
+
import { isNil } from "lodash-es";
|
|
3
|
+
const mapConditionsToPostgrest = (filterData) => {
|
|
4
|
+
let DSLTree = {
|
|
5
|
+
join: "and",
|
|
6
|
+
children: []
|
|
7
|
+
};
|
|
8
|
+
for (const conditionBlock of filterData) {
|
|
9
|
+
let children = (conditionBlock.conditionList ?? []).map((condition) => {
|
|
10
|
+
let ret = null;
|
|
11
|
+
ret = conditionListItem2DSL(condition);
|
|
12
|
+
return ret;
|
|
13
|
+
}).filter((v) => !!v);
|
|
14
|
+
if (children.length > 0) {
|
|
15
|
+
DSLTree.children.push({
|
|
16
|
+
join: conditionBlock.conditionType === "all" ? "and" : "or",
|
|
17
|
+
children
|
|
18
|
+
});
|
|
35
19
|
}
|
|
36
20
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
21
|
+
function loop(node, deep = 1, parentJoin) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
let shoudIgnore = (node.children ?? []).length === 1 && ((_b = (_a = node.children) == null ? void 0 : _a[0]) == null ? void 0 : _b.join);
|
|
24
|
+
if (shoudIgnore) {
|
|
25
|
+
return loop(node.children[0], deep, parentJoin);
|
|
26
|
+
}
|
|
27
|
+
let group = node;
|
|
28
|
+
let shouldMerge = group.join === parentJoin;
|
|
29
|
+
let isTop = deep === 1;
|
|
30
|
+
let filedUnit = isTop && shouldMerge ? "=" : ".";
|
|
31
|
+
let joinUnit = isTop && shouldMerge ? "&" : ",";
|
|
32
|
+
let strList = group.children.map((child) => {
|
|
33
|
+
if (child.join) {
|
|
34
|
+
return loop(child, !shouldMerge ? deep + 1 : deep, group.join);
|
|
35
|
+
} else {
|
|
36
|
+
return `${child.field}${filedUnit}${child.operator}.${child.value}`;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
let ret = !shouldMerge ? `${group == null ? void 0 : group.join}${deep > 1 ? "" : "="}(${strList.join(joinUnit)})` : strList.join(joinUnit);
|
|
40
|
+
return ret;
|
|
41
|
+
}
|
|
42
|
+
let str = loop(DSLTree, 1, "and");
|
|
43
|
+
console.log("mapConditionsToPostgrest1", str, DSLTree);
|
|
44
|
+
return str;
|
|
45
|
+
};
|
|
46
|
+
let mapping = {
|
|
47
|
+
"=": "eq",
|
|
48
|
+
"!=": "neq",
|
|
49
|
+
">": "gt",
|
|
50
|
+
">=": "gte",
|
|
51
|
+
"<": "lt",
|
|
52
|
+
"=<": "lte",
|
|
53
|
+
["include"]: "cs",
|
|
54
|
+
["notinclude"]: "not.cs",
|
|
55
|
+
// ['contain']: 'gte,lte', //这个是group的
|
|
56
|
+
["before"]: "lt",
|
|
57
|
+
["after"]: "gt",
|
|
58
|
+
// ['null']: 'is.null',
|
|
59
|
+
// ['notnull']: 'not.is.null',
|
|
60
|
+
["null"]: "is",
|
|
61
|
+
//这个特殊处理
|
|
62
|
+
["notnull"]: "not.is"
|
|
63
|
+
//这个特殊处理
|
|
64
|
+
};
|
|
65
|
+
const conditionListItem2DSL = (condition) => {
|
|
66
|
+
const { field, condition: cond, val, val2, rdate, type } = condition;
|
|
67
|
+
let value = (val == null ? void 0 : val.value) ? val == null ? void 0 : val.value : val;
|
|
68
|
+
let ret = null;
|
|
69
|
+
switch (cond) {
|
|
70
|
+
case "=":
|
|
71
|
+
{
|
|
46
72
|
if (type !== "timestamp") {
|
|
47
|
-
|
|
73
|
+
if (isInVaildValue(value)) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
ret = {
|
|
77
|
+
field,
|
|
78
|
+
value: `${value}`,
|
|
79
|
+
operator: mapping[cond]
|
|
80
|
+
};
|
|
48
81
|
} else {
|
|
49
|
-
if (rdate
|
|
50
|
-
return
|
|
51
|
-
} else {
|
|
52
|
-
return getRDate({ rdate, u, field, value });
|
|
82
|
+
if (isInVaildValue(rdate)) {
|
|
83
|
+
return null;
|
|
53
84
|
}
|
|
85
|
+
ret = getEqualTimeDSL({ rdate, field, value });
|
|
54
86
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (rdate === "
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (rdate === "yesterday") {
|
|
66
|
-
const yesterday = /* @__PURE__ */ new Date();
|
|
67
|
-
yesterday.setDate(yesterday.getDate() - 1);
|
|
68
|
-
return `${field}${u}gt.${yesterday.toISOString().split("T")[0]}`;
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case ">":
|
|
90
|
+
case "<":
|
|
91
|
+
{
|
|
92
|
+
if (type === "timestamp" && rdate === "today") {
|
|
93
|
+
value = dayjs().format("YYYY-MM-DD");
|
|
94
|
+
} else if (type === "timestamp" && rdate === "yesterday") {
|
|
95
|
+
value = dayjs().subtract(1, "day").format("YYYY-MM-DD");
|
|
69
96
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return `${field}${u}gte.${value}`;
|
|
73
|
-
case "<":
|
|
74
|
-
if (rdate === "today") {
|
|
75
|
-
return `${field}${u}lt.${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}`;
|
|
97
|
+
if (isInVaildValue(value)) {
|
|
98
|
+
return null;
|
|
76
99
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
100
|
+
ret = {
|
|
101
|
+
field,
|
|
102
|
+
value: `${value}`,
|
|
103
|
+
operator: mapping[cond]
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
case "contain":
|
|
108
|
+
{
|
|
109
|
+
if (isInVaildValue(value) || isInVaildValue(val2)) {
|
|
110
|
+
return null;
|
|
81
111
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
112
|
+
ret = {
|
|
113
|
+
join: "and",
|
|
114
|
+
children: [
|
|
115
|
+
{
|
|
116
|
+
field,
|
|
117
|
+
value: `${value}`,
|
|
118
|
+
operator: "gte"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
field,
|
|
122
|
+
value: `${val2}`,
|
|
123
|
+
operator: "lte"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
break;
|
|
129
|
+
case "null":
|
|
130
|
+
case "notnull":
|
|
131
|
+
{
|
|
132
|
+
ret = {
|
|
133
|
+
field,
|
|
134
|
+
value: "null",
|
|
135
|
+
operator: mapping[cond]
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
break;
|
|
139
|
+
case "include":
|
|
140
|
+
case "notinclude":
|
|
141
|
+
{
|
|
142
|
+
if (isInVaildValue(value)) {
|
|
143
|
+
return null;
|
|
88
144
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
145
|
+
ret = {
|
|
146
|
+
field,
|
|
147
|
+
value: `{${value}}`,
|
|
148
|
+
operator: mapping[cond]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
default: {
|
|
153
|
+
if (isInVaildValue(value)) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
ret = {
|
|
157
|
+
field,
|
|
158
|
+
value: `${value}`,
|
|
159
|
+
operator: mapping[cond]
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return ret;
|
|
164
|
+
};
|
|
165
|
+
const getEqualTimeDSL = (props) => {
|
|
166
|
+
const { rdate, field, value } = props;
|
|
167
|
+
switch (rdate) {
|
|
168
|
+
case "exactdate":
|
|
169
|
+
if (isInVaildValue(value)) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
field,
|
|
174
|
+
value,
|
|
175
|
+
operator: mapping["="]
|
|
176
|
+
};
|
|
177
|
+
case "today":
|
|
178
|
+
return {
|
|
179
|
+
field,
|
|
180
|
+
value: dayjs().format("YYYY-MM-DD"),
|
|
181
|
+
operator: mapping["="]
|
|
182
|
+
};
|
|
183
|
+
case "yesterday":
|
|
184
|
+
return {
|
|
185
|
+
field,
|
|
186
|
+
value: dayjs().subtract(1, "day").format("YYYY-MM-DD"),
|
|
187
|
+
operator: mapping["="]
|
|
188
|
+
};
|
|
189
|
+
case "thisweek":
|
|
190
|
+
const startOfLastWeek = dayjs().startOf("week").add(1, "day").format("YYYY-MM-DD");
|
|
191
|
+
const endOfLastWeek = dayjs().endOf("week").add(1, "day").format("YYYY-MM-DD");
|
|
192
|
+
return {
|
|
193
|
+
join: "and",
|
|
194
|
+
children: [
|
|
195
|
+
{
|
|
196
|
+
field,
|
|
197
|
+
value: startOfLastWeek,
|
|
198
|
+
operator: mapping[">="]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
field,
|
|
202
|
+
value: endOfLastWeek,
|
|
203
|
+
operator: mapping["=<"]
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
};
|
|
207
|
+
case "lastweek": {
|
|
208
|
+
const startOfLastWeek2 = dayjs().subtract(1, "week").startOf("week").add(1, "day").format("YYYY-MM-DD");
|
|
209
|
+
const endOfLastWeek2 = dayjs().subtract(1, "week").endOf("week").add(1, "day").format("YYYY-MM-DD");
|
|
210
|
+
return {
|
|
211
|
+
join: "and",
|
|
212
|
+
children: [
|
|
213
|
+
{
|
|
214
|
+
field,
|
|
215
|
+
value: startOfLastWeek2,
|
|
216
|
+
operator: mapping[">="]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
field,
|
|
220
|
+
value: endOfLastWeek2,
|
|
221
|
+
operator: mapping["=<"]
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
case "thismonth":
|
|
227
|
+
let startOfThisMonth = dayjs().startOf("month").format("YYYY-MM-DD");
|
|
228
|
+
let endOfThisMonth = dayjs().endOf("month").format("YYYY-MM-DD");
|
|
229
|
+
return {
|
|
230
|
+
join: "and",
|
|
231
|
+
children: [
|
|
232
|
+
{
|
|
233
|
+
field,
|
|
234
|
+
value: startOfThisMonth,
|
|
235
|
+
operator: mapping[">="]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
field,
|
|
239
|
+
value: endOfThisMonth,
|
|
240
|
+
operator: mapping["=<"]
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
};
|
|
244
|
+
case "lastmonth": {
|
|
245
|
+
const startOfLastMonth = dayjs().subtract(1, "month").startOf("month").format("YYYY-MM-DD");
|
|
246
|
+
const endOfLastMonth = dayjs().subtract(1, "month").endOf("month").format("YYYY-MM-DD");
|
|
247
|
+
return {
|
|
248
|
+
join: "and",
|
|
249
|
+
children: [
|
|
250
|
+
{
|
|
251
|
+
field,
|
|
252
|
+
value: startOfLastMonth,
|
|
253
|
+
operator: mapping[">="]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
field,
|
|
257
|
+
value: endOfLastMonth,
|
|
258
|
+
operator: mapping["=<"]
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
};
|
|
100
262
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
263
|
+
case "last7days":
|
|
264
|
+
const startOfLast7Days = dayjs().subtract(7, "days").format("YYYY-MM-DD");
|
|
265
|
+
const endOfLast7Days = dayjs().format("YYYY-MM-DD");
|
|
266
|
+
return {
|
|
267
|
+
join: "and",
|
|
268
|
+
children: [
|
|
269
|
+
{
|
|
270
|
+
field,
|
|
271
|
+
value: startOfLast7Days,
|
|
272
|
+
operator: mapping[">="]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
field,
|
|
276
|
+
value: endOfLast7Days,
|
|
277
|
+
operator: mapping["=<"]
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
};
|
|
281
|
+
case "last30days":
|
|
282
|
+
const startOfLast30Days = dayjs().subtract(30, "days").format("YYYY-MM-DD");
|
|
283
|
+
const endOfLast30Days = dayjs().format("YYYY-MM-DD");
|
|
284
|
+
return {
|
|
285
|
+
join: "and",
|
|
286
|
+
children: [
|
|
287
|
+
{
|
|
288
|
+
field,
|
|
289
|
+
value: startOfLast30Days,
|
|
290
|
+
operator: mapping[">="]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
field,
|
|
294
|
+
value: endOfLast30Days,
|
|
295
|
+
operator: mapping["=<"]
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
};
|
|
299
|
+
default:
|
|
300
|
+
return null;
|
|
107
301
|
}
|
|
108
|
-
|
|
302
|
+
};
|
|
303
|
+
const isInVaildValue = (date) => {
|
|
304
|
+
return isNil(date) || date === "";
|
|
109
305
|
};
|
|
110
306
|
export {
|
|
111
307
|
mapConditionsToPostgrest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../packages/dashboard-workbench/components/module-content/utils.ts"],"sourcesContent":["import dayjs from 'dayjs'\nimport { ConditionBlock } from '../add-module-modal/components/condition-modal/interface'\n\nfunction getRDate({ rdate, u, field, value }: any) {\n if (rdate) {\n switch (rdate) {\n case 'exactdate':\n return `${field}${u}eq.${value}`\n case 'today':\n return `${field}${u}eq.${dayjs().format('YYYY-MM-DD')}`\n case 'yesterday':\n return `${field}${u}eq.${dayjs().subtract(1, 'day').format('YYYY-MM-DD')}`\n case 'thisweek':\n return `${field}${u}gte.${dayjs()\n .startOf('week')\n .add(1, 'day')\n .format('YYYY-MM-DD')}&${field}${u}lte.${dayjs()\n .endOf('week')\n .add(1, 'day')\n .format('YYYY-MM-DD')}`\n case 'lastweek': {\n const startOfLastWeek = dayjs().subtract(1, 'week').startOf('week').add(1, 'day')\n const endOfLastWeek = dayjs().subtract(1, 'week').endOf('week').add(1, 'day')\n return `${field}${u}gte.${startOfLastWeek.format(\n 'YYYY-MM-DD'\n )}&${field}${u}lte.${endOfLastWeek.format('YYYY-MM-DD')}`\n }\n case 'thismonth':\n return `${field}${u}gte.${dayjs()\n .startOf('month')\n .format('YYYY-MM-DD')}&${field}${u}lte.${dayjs().endOf('month').format('YYYY-MM-DD')}`\n case 'lastmonth': {\n const startOfLastMonth = dayjs().subtract(1, 'month').startOf('month')\n const endOfLastMonth = dayjs().subtract(1, 'month').endOf('month')\n return `${field}${u}gte.${startOfLastMonth.format(\n 'YYYY-MM-DD'\n )}&${field}${u}lte.${endOfLastMonth.format('YYYY-MM-DD')}`\n }\n case 'last7days':\n return `${field}${u}gte.${dayjs()\n .subtract(7, 'days')\n .format('YYYY-MM-DD')}&${field}${u}lte.${dayjs().format('YYYY-MM-DD')}`\n case 'last30days':\n return `${field}${u}gte.${dayjs()\n .subtract(30, 'days')\n .format('YYYY-MM-DD')}&${field}${u}lte.${dayjs().format('YYYY-MM-DD')}`\n default:\n return '' // 对于未支持的 rdate 值返回空字符串\n }\n }\n}\n\nexport const mapConditionsToPostgrest = (filterData: ConditionBlock): string => {\n const { conditionList, conditionType = 'all' } = filterData\n const u = conditionType === 'all' ? '=' : '.' // 拼接逻辑\n const conditionStrings = conditionList\n .map(condition => {\n const { field, condition: cond, val, val2, rdate, type } = condition\n const value = (val as any)?.value ? (val as any)?.value : val\n switch (cond) {\n case '=':\n if (type !== 'timestamp') {\n return `${field}${u}eq.${value}`\n } else {\n if (rdate === 'exactdate') {\n return `${field}${u}eq.${value}`\n } else {\n return getRDate({ rdate, u, field, value })\n }\n }\n case '!=':\n return `${field}${u}neq.${value}`\n case 'include':\n return `${field}${u}cs.{${value}}` // 包含值\n case 'notinclude':\n return `${field}${u}not.cs.{${value}}` // 不包含值\n case '>':\n if (rdate === 'today') {\n return `${field}${u}gt.${new Date().toISOString().split('T')[0]}`\n }\n if (rdate === 'yesterday') {\n const yesterday = new Date()\n yesterday.setDate(yesterday.getDate() - 1)\n return `${field}${u}gt.${yesterday.toISOString().split('T')[0]}`\n }\n return `${field}${u}gt.${value}`\n case '>=':\n return `${field}${u}gte.${value}`\n case '<':\n if (rdate === 'today') {\n return `${field}${u}lt.${new Date().toISOString().split('T')[0]}`\n }\n if (rdate === 'yesterday') {\n const yesterday = new Date()\n yesterday.setDate(yesterday.getDate() - 1)\n return `${field}${u}lt.${yesterday.toISOString().split('T')[0]}`\n }\n return `${field}${u}lt.${value}`\n case '<=':\n return `${field}${u}lte.${value}`\n case 'contain':\n if (value && val2) {\n return `${field}${u}gte.${value},${field}.lte.${val2}`\n }\n return ''\n case 'before':\n return `${field}${u}lt.${value}`\n case 'after':\n return `${field}${u}gt.${value}`\n case 'null':\n return `${field}${u}is.null`\n case 'notnull':\n return `${field}${u}not.is.null`\n default:\n return ''\n }\n })\n .filter(Boolean) // 过滤掉空字符串\n\n let joinedCondition\n if (conditionType === 'all' || conditionStrings.length === 1) {\n joinedCondition = conditionStrings.join('&')\n } else {\n joinedCondition = `or=(${conditionStrings.join(',')})`\n }\n return joinedCondition\n}\n"],"names":[],"mappings":";AAGA,SAAS,SAAS,EAAE,OAAO,GAAG,OAAO,SAAc;AACjD,MAAI,OAAO;AACT,YAAQ,OAAO;AAAA,MACb,KAAK;AACH,eAAO,GAAG,KAAK,GAAG,CAAC,MAAM,KAAK;AAAA,MAChC,KAAK;AACI,eAAA,GAAG,KAAK,GAAG,CAAC,MAAM,QAAQ,OAAO,YAAY,CAAC;AAAA,MACvD,KAAK;AACH,eAAO,GAAG,KAAK,GAAG,CAAC,MAAM,MAAA,EAAQ,SAAS,GAAG,KAAK,EAAE,OAAO,YAAY,CAAC;AAAA,MAC1E,KAAK;AACH,eAAO,GAAG,KAAK,GAAG,CAAC,OAAO,MAAM,EAC7B,QAAQ,MAAM,EACd,IAAI,GAAG,KAAK,EACZ,OAAO,YAAY,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,QACxC,MAAM,MAAM,EACZ,IAAI,GAAG,KAAK,EACZ,OAAO,YAAY,CAAC;AAAA,MACzB,KAAK,YAAY;AACf,cAAM,kBAAkB,QAAQ,SAAS,GAAG,MAAM,EAAE,QAAQ,MAAM,EAAE,IAAI,GAAG,KAAK;AAChF,cAAM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,CAAC;AAAA,QAAA;AAEjE,YAAI,UAAU,aAAa;AACnB,gBAAA,gCAAgB,KAAK;AAC3B,oBAAU,QAAQ,UAAU,QAAQ,IAAI,CAAC;AACzC,iBAAO,GAAG,KAAK,GAAG,CAAC,MAAM,UAAU,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;AAAA,QAAA;AAEhE,eAAO,GAAG,KAAK,GAAG,CAAC,MAAM,KAAK;AAAA,MAChC,KAAK;AACH,eAAO,GAAG,KAAK,GAAG,CAAC,OAAO,KAAK;AAAA,MACjC,KAAK;AACH,YAAI,SAAS,MAAM;AACV,iBAAA,GAAG,KAAK,GAAG,CAAC,OAAO,KAAK,IAAI,KAAK,QAAQ,IAAI;AAAA,QAAA;AAE/C,eAAA;AAAA,MACT,KAAK;AACH,eAAO,GAAG,KAAK,GAAG,CAAC,MAAM,KAAK;AAAA,MAChC,KAAK;AACH,eAAO,GAAG,KAAK,GAAG,CAAC,MAAM,KAAK;AAAA,MAChC,KAAK;AACI,eAAA,GAAG,KAAK,GAAG,CAAC;AAAA,MACrB,KAAK;AACI,eAAA,GAAG,KAAK,GAAG,CAAC;AAAA,MACrB;AACS,eAAA;AAAA,IAAA;AAAA,EACX,CACD,EACA,OAAO,OAAO;AAEb,MAAA;AACJ,MAAI,kBAAkB,SAAS,iBAAiB,WAAW,GAAG;AAC1C,sBAAA,iBAAiB,KAAK,GAAG;AAAA,EAAA,OACtC;AACL,sBAAkB,OAAO,iBAAiB,KAAK,GAAG,CAAC;AAAA,EAAA;AAE9C,SAAA;AACT;"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../packages/dashboard-workbench/components/module-content/utils.ts"],"sourcesContent":["import dayjs, { Dayjs } from 'dayjs'\nimport { isNil } from 'lodash-es'\nimport {\n ConditionBlock,\n ConditionListItem,\n} from '../add-module-modal/components/condition-modal/interface'\n\ntype DSLItem = {\n field: string\n value: string\n operator: string\n}\ntype DSLGroup = {\n join: 'and' | 'or'\n children: (DSLGroup | DSLItem)[]\n}\n\nexport const mapConditionsToPostgrest = (filterData: ConditionBlock[]): string => {\n let DSLTree: DSLGroup = {\n join: 'and',\n children: [],\n }\n\n for (const conditionBlock of filterData) {\n let children = (conditionBlock.conditionList ?? [])\n .map(condition => {\n let ret: DSLItem | DSLGroup | null = null\n ret = conditionListItem2DSL(condition)\n return ret\n })\n .filter(v => !!v) as unknown as (DSLItem | DSLGroup)[]\n if (children.length > 0) {\n DSLTree.children.push({\n join: conditionBlock.conditionType === 'all' ? 'and' : 'or',\n children: children,\n })\n }\n }\n\n // 转成字符串\n function loop(node: DSLGroup, deep = 1, parentJoin: 'and' | 'or') {\n //跳过group里面只嵌套单个group的case 减少层级\n let shoudIgnore = (node.children ?? []).length === 1 && (node.children?.[0] as DSLGroup)?.join\n if (shoudIgnore) {\n return loop(node.children[0] as DSLGroup, deep, parentJoin)\n }\n\n let group = node as DSLGroup\n let shouldMerge = group.join === parentJoin\n let isTop = deep === 1\n let filedUnit = isTop && shouldMerge ? '=' : '.'\n let joinUnit = isTop && shouldMerge ? '&' : ','\n\n let strList = group.children.map(child => {\n if ((child as DSLGroup).join) {\n return loop(child as DSLGroup, !shouldMerge ? deep + 1 : deep, group.join)\n } else {\n return `${(child as DSLItem).field}${filedUnit}${(child as DSLItem).operator}.${(child as DSLItem).value}`\n }\n })\n let ret = (\n !shouldMerge\n ? `${group?.join}${deep > 1 ? '' : '='}(${strList.join(joinUnit)})`\n : strList.join(joinUnit)\n ) as string\n return ret\n }\n\n let str = loop(DSLTree, 1, 'and')\n console.log('mapConditionsToPostgrest1', str, DSLTree)\n return str\n}\n\nlet mapping = {\n '=': 'eq',\n '!=': 'neq',\n '>': 'gt',\n '>=': 'gte',\n '<': 'lt',\n '=<': 'lte',\n ['include']: 'cs',\n ['notinclude']: 'not.cs',\n // ['contain']: 'gte,lte', //这个是group的\n ['before']: 'lt',\n ['after']: 'gt',\n // ['null']: 'is.null',\n // ['notnull']: 'not.is.null',\n ['null']: 'is', //这个特殊处理\n ['notnull']: 'not.is', //这个特殊处理\n}\n\nconst conditionListItem2DSL = (condition: ConditionListItem) => {\n const { field, condition: cond, val, val2, rdate, type } = condition\n let value = (val as any)?.value ? (val as any)?.value : val // 为啥需要?.valuef\n\n let ret: DSLItem | DSLGroup | null = null\n switch (cond) {\n case '=':\n {\n if (type !== 'timestamp') {\n if (isInVaildValue(value)) {\n return null\n }\n ret = {\n field,\n value: `${value}`,\n operator: mapping[cond as keyof typeof mapping],\n } as DSLItem\n } else {\n if (isInVaildValue(rdate)) {\n return null\n }\n ret = getEqualTimeDSL({ rdate: rdate!, field, value })\n }\n }\n break\n case '>':\n case '<':\n {\n if (type === 'timestamp' && rdate === 'today') {\n value = dayjs().format('YYYY-MM-DD')\n } else if (type === 'timestamp' && rdate === 'yesterday') {\n value = dayjs().subtract(1, 'day').format('YYYY-MM-DD')\n }\n if (isInVaildValue(value)) {\n return null\n }\n\n ret = {\n field,\n value: `${value}`,\n operator: mapping[cond as keyof typeof mapping],\n } as DSLItem\n }\n break\n case 'contain':\n {\n if (isInVaildValue(value) || isInVaildValue(val2)) {\n return null\n }\n ret = {\n join: 'and',\n children: [\n {\n field,\n value: `${value}`,\n operator: 'gte',\n },\n {\n field,\n value: `${val2}`,\n operator: 'lte',\n },\n ],\n } as DSLGroup\n }\n break\n case 'null':\n case 'notnull':\n {\n ret = {\n field,\n value: 'null',\n operator: mapping[cond as keyof typeof mapping],\n } as DSLItem\n }\n break\n case 'include':\n case 'notinclude':\n {\n if (isInVaildValue(value)) {\n return null\n }\n ret = {\n field,\n value: `{${value}}`,\n operator: mapping[cond as keyof typeof mapping],\n } as DSLItem\n }\n break\n default: {\n if (isInVaildValue(value)) {\n return null\n }\n ret = {\n field,\n value: `${value}`,\n operator: mapping[cond as keyof typeof mapping],\n } as DSLItem\n }\n }\n\n return ret\n}\n\nconst getEqualTimeDSL = (props: { rdate: string; field: string; value: string }) => {\n const { rdate, field, value } = props\n switch (rdate) {\n case 'exactdate':\n if (isInVaildValue(value)) {\n return null\n }\n return {\n field,\n value,\n operator: mapping['='],\n } as DSLItem\n case 'today':\n return {\n field,\n value: dayjs().format('YYYY-MM-DD'),\n operator: mapping['='],\n } as DSLItem\n case 'yesterday':\n return {\n field,\n value: dayjs().subtract(1, 'day').format('YYYY-MM-DD'),\n operator: mapping['='],\n } as DSLItem\n case 'thisweek':\n const startOfLastWeek = dayjs().startOf('week').add(1, 'day').format('YYYY-MM-DD')\n const endOfLastWeek = dayjs().endOf('week').add(1, 'day').format('YYYY-MM-DD')\n return {\n join: 'and',\n children: [\n {\n field,\n value: startOfLastWeek,\n operator: mapping['>='],\n },\n {\n field,\n value: endOfLastWeek,\n operator: mapping['=<'],\n },\n ],\n } as DSLGroup\n case 'lastweek': {\n const startOfLastWeek = dayjs()\n .subtract(1, 'week')\n .startOf('week')\n .add(1, 'day')\n .format('YYYY-MM-DD')\n const endOfLastWeek = dayjs()\n .subtract(1, 'week')\n .endOf('week')\n .add(1, 'day')\n .format('YYYY-MM-DD')\n return {\n join: 'and',\n children: [\n {\n field,\n value: startOfLastWeek,\n operator: mapping['>='],\n },\n {\n field,\n value: endOfLastWeek,\n operator: mapping['=<'],\n },\n ],\n } as DSLGroup\n }\n case 'thismonth':\n let startOfThisMonth = dayjs().startOf('month').format('YYYY-MM-DD')\n let endOfThisMonth = dayjs().endOf('month').format('YYYY-MM-DD')\n return {\n join: 'and',\n children: [\n {\n field,\n value: startOfThisMonth,\n operator: mapping['>='],\n },\n {\n field,\n value: endOfThisMonth,\n operator: mapping['=<'],\n },\n ],\n } as DSLGroup\n\n case 'lastmonth': {\n const startOfLastMonth = dayjs().subtract(1, 'month').startOf('month').format('YYYY-MM-DD')\n const endOfLastMonth = dayjs().subtract(1, 'month').endOf('month').format('YYYY-MM-DD')\n return {\n join: 'and',\n children: [\n {\n field,\n value: startOfLastMonth,\n operator: mapping['>='],\n },\n {\n field,\n value: endOfLastMonth,\n operator: mapping['=<'],\n },\n ],\n } as DSLGroup\n }\n case 'last7days':\n const startOfLast7Days = dayjs().subtract(7, 'days').format('YYYY-MM-DD')\n const endOfLast7Days = dayjs().format('YYYY-MM-DD')\n return {\n join: 'and',\n children: [\n {\n field,\n value: startOfLast7Days,\n operator: mapping['>='],\n },\n {\n field,\n value: endOfLast7Days,\n operator: mapping['=<'],\n },\n ],\n } as DSLGroup\n case 'last30days':\n const startOfLast30Days = dayjs().subtract(30, 'days').format('YYYY-MM-DD')\n const endOfLast30Days = dayjs().format('YYYY-MM-DD')\n return {\n join: 'and',\n children: [\n {\n field,\n value: startOfLast30Days,\n operator: mapping['>='],\n },\n {\n field,\n value: endOfLast30Days,\n operator: mapping['=<'],\n },\n ],\n } as DSLGroup\n default:\n return null // 对于未支持的 rdate 值返回空字符串\n }\n}\n\nconst isInVaildValue = (date: string | number | Dayjs | undefined) => {\n return isNil(date) || date === ''\n}\n"],"names":["startOfLastWeek","endOfLastWeek"],"mappings":";;AAiBa,MAAA,2BAA2B,CAAC,eAAyC;AAChF,MAAI,UAAoB;AAAA,IACtB,MAAM;AAAA,IACN,UAAU,CAAA;AAAA,EACZ;AAEA,aAAW,kBAAkB,YAAY;AACvC,QAAI,YAAY,eAAe,iBAAiB,CAAA,GAC7C,IAAI,CAAa,cAAA;AAChB,UAAI,MAAiC;AACrC,YAAM,sBAAsB,SAAS;AAC9B,aAAA;AAAA,IACR,CAAA,EACA,OAAO,CAAK,MAAA,CAAC,CAAC,CAAC;AACd,QAAA,SAAS,SAAS,GAAG;AACvB,cAAQ,SAAS,KAAK;AAAA,QACpB,MAAM,eAAe,kBAAkB,QAAQ,QAAQ;AAAA,QACvD;AAAA,MAAA,CACD;AAAA,IAAA;AAAA,EACH;AAIF,WAAS,KAAK,MAAgB,OAAO,GAAG,YAA0B;;AAE5D,QAAA,eAAe,KAAK,YAAY,CAAC,GAAG,WAAW,OAAM,gBAAK,aAAL,mBAAgB,OAAhB,mBAAiC;AAC1F,QAAI,aAAa;AACf,aAAO,KAAK,KAAK,SAAS,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