blixify-ui-web 1.2.67 → 1.2.69
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/lib/components/data/dataTemplate/dataStateModel.d.ts +0 -5
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +460 -332
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +6 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts +0 -39
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +24 -385
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +1 -0
- package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/viewStatePersistence.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +2 -2
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +3 -5
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/display/flexTable/index.js +1 -1
- package/lib/components/display/flexTable/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +1 -0
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +17 -4
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/scrollShadow/index.d.ts +2 -1
- package/lib/components/display/scrollShadow/index.d.ts.map +1 -1
- package/lib/components/display/scrollShadow/index.js +28 -14
- package/lib/components/display/scrollShadow/index.js.map +1 -1
- package/lib/components/display/table/index.js +1 -1
- package/lib/components/display/table/index.js.map +1 -1
- package/lib/tail.css +2 -2
- package/package.json +1 -1
|
@@ -94,27 +94,15 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
94
94
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
95
95
|
};
|
|
96
96
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
97
|
-
exports.TabModal =
|
|
97
|
+
exports.TabModal = void 0;
|
|
98
98
|
exports.ExpressionModal = ExpressionModal;
|
|
99
99
|
var outline_1 = require("@heroicons/react/24/outline");
|
|
100
100
|
var react_1 = __importStar(require("react"));
|
|
101
101
|
var button_1 = require("../../action/button");
|
|
102
|
-
var iconButton_1 = require("../../action/iconButton");
|
|
103
|
-
var table_1 = require("../../display/table");
|
|
104
102
|
var form_1 = require("../../input/form");
|
|
105
103
|
var select_1 = require("../../input/select");
|
|
106
104
|
var textInput_1 = require("../../input/textInput");
|
|
107
105
|
var allIcons = __importStar(require("@heroicons/react/24/solid"));
|
|
108
|
-
var sortType = [
|
|
109
|
-
{
|
|
110
|
-
key: "asc",
|
|
111
|
-
label: "Ascending",
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
key: "desc",
|
|
115
|
-
label: "Descending",
|
|
116
|
-
},
|
|
117
|
-
];
|
|
118
106
|
var tabTableType = [
|
|
119
107
|
{ key: "grid", label: "Grid" },
|
|
120
108
|
{ key: "list", label: "List" },
|
|
@@ -124,359 +112,6 @@ var tabTableType = [
|
|
|
124
112
|
{ key: "feeds", label: "Feeds" },
|
|
125
113
|
{ key: "iframe", label: "IFrame" },
|
|
126
114
|
];
|
|
127
|
-
var SortModal = /** @class */ (function (_super) {
|
|
128
|
-
__extends(SortModal, _super);
|
|
129
|
-
function SortModal() {
|
|
130
|
-
var _a, _b, _c, _d;
|
|
131
|
-
var _this = _super.apply(this, arguments) || this;
|
|
132
|
-
_this.state = {
|
|
133
|
-
sortId: (_b = (_a = _this.props.sort) === null || _a === void 0 ? void 0 : _a.sortId) !== null && _b !== void 0 ? _b : "",
|
|
134
|
-
sortType: (_d = (_c = _this.props.sort) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : "",
|
|
135
|
-
};
|
|
136
|
-
_this.componentDidUpdate = function (prevProps) {
|
|
137
|
-
var _a, _b;
|
|
138
|
-
if (JSON.stringify(prevProps === null || prevProps === void 0 ? void 0 : prevProps.sort) !== JSON.stringify(_this.props.sort)) {
|
|
139
|
-
_this.setState({
|
|
140
|
-
sortId: (_a = _this.props.sort) === null || _a === void 0 ? void 0 : _a.sortId,
|
|
141
|
-
sortType: (_b = _this.props.sort) === null || _b === void 0 ? void 0 : _b.type,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
return _this;
|
|
146
|
-
}
|
|
147
|
-
SortModal.prototype.render = function () {
|
|
148
|
-
var _this = this;
|
|
149
|
-
var _a, _b, _c, _d, _e;
|
|
150
|
-
return (react_1.default.createElement("div", null,
|
|
151
|
-
react_1.default.createElement("div", { className: "pb-28" },
|
|
152
|
-
react_1.default.createElement(select_1.Select, { containerClassName: "mt-5", value: (_a = this.state.sortId) !== null && _a !== void 0 ? _a : "", label: "Sort By", options: (_d = (_c = (_b = this.props).renderReferenceLabelOptions) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : [], onChange: function (value) {
|
|
153
|
-
_this.setState({ sortId: value });
|
|
154
|
-
} }),
|
|
155
|
-
react_1.default.createElement(select_1.Select, { containerClassName: "mt-10", value: (_e = this.state.sortType) !== null && _e !== void 0 ? _e : "", label: "Sort Order", options: sortType, onChange: function (value) {
|
|
156
|
-
_this.setState({ sortType: value });
|
|
157
|
-
} })),
|
|
158
|
-
react_1.default.createElement("div", { className: "mt-24 flex justify-end" },
|
|
159
|
-
react_1.default.createElement(button_1.Button, { text: "Sort", type: "normal", onClick: function () {
|
|
160
|
-
if (_this.props.onChangeSort) {
|
|
161
|
-
_this.props.onChangeSort({
|
|
162
|
-
sortId: _this.state.sortId,
|
|
163
|
-
type: _this.state.sortType,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
_this.props.onClose();
|
|
167
|
-
} }))));
|
|
168
|
-
};
|
|
169
|
-
return SortModal;
|
|
170
|
-
}(react_1.Component));
|
|
171
|
-
exports.SortModal = SortModal;
|
|
172
|
-
var OverviewModal = /** @class */ (function (_super) {
|
|
173
|
-
__extends(OverviewModal, _super);
|
|
174
|
-
function OverviewModal() {
|
|
175
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
176
|
-
_this.state = {
|
|
177
|
-
model: [],
|
|
178
|
-
};
|
|
179
|
-
_this.componentDidMount = function () {
|
|
180
|
-
_this.setState({
|
|
181
|
-
model: _this.props.model,
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
_this.componentDidUpdate = function (prevProps) {
|
|
185
|
-
if (JSON.stringify(prevProps.model) !== JSON.stringify(_this.props.model))
|
|
186
|
-
_this.setState({
|
|
187
|
-
model: _this.props.model,
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
_this.handleDragStart = function (e, id) {
|
|
191
|
-
e.dataTransfer.setData("itemId", id);
|
|
192
|
-
};
|
|
193
|
-
_this.handleDragOver = function (e) {
|
|
194
|
-
e.preventDefault();
|
|
195
|
-
};
|
|
196
|
-
_this.handleDrop = function (e, id) {
|
|
197
|
-
e.preventDefault();
|
|
198
|
-
var data = e.dataTransfer.getData("itemId");
|
|
199
|
-
var clonedModel = JSON.parse(JSON.stringify(_this.state.model));
|
|
200
|
-
var selectedIndex = clonedModel.findIndex(function (item) { return item.id === data; });
|
|
201
|
-
var selectedItem = clonedModel.splice(selectedIndex, 1)[0];
|
|
202
|
-
var placingIndex = clonedModel.findIndex(function (item) { return item.id === id; });
|
|
203
|
-
clonedModel.splice(placingIndex, 0, selectedItem);
|
|
204
|
-
_this.setState({
|
|
205
|
-
model: clonedModel,
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
_this.handleHideDS = function (eachKey, hide) {
|
|
209
|
-
var clonedModel = JSON.parse(JSON.stringify(_this.state.model));
|
|
210
|
-
clonedModel.map(function (eachModel) {
|
|
211
|
-
if (eachModel.id === eachKey)
|
|
212
|
-
eachModel.hide = hide;
|
|
213
|
-
return eachModel;
|
|
214
|
-
});
|
|
215
|
-
_this.setState({
|
|
216
|
-
model: clonedModel,
|
|
217
|
-
});
|
|
218
|
-
};
|
|
219
|
-
_this.renderOverviewContent = function () {
|
|
220
|
-
var _a;
|
|
221
|
-
var overviewList = [];
|
|
222
|
-
var index = 1;
|
|
223
|
-
(_a = _this.state.model) === null || _a === void 0 ? void 0 : _a.map(function (eachModel) {
|
|
224
|
-
if (eachModel.id === "id" ||
|
|
225
|
-
eachModel.id === "_id" ||
|
|
226
|
-
eachModel.hideOverview)
|
|
227
|
-
return null;
|
|
228
|
-
overviewList.push(react_1.default.createElement("div", { className: "flex flex-row w-full" },
|
|
229
|
-
index,
|
|
230
|
-
" . ",
|
|
231
|
-
eachModel.name,
|
|
232
|
-
react_1.default.createElement("div", { className: "flex-grow" }),
|
|
233
|
-
react_1.default.createElement("div", { draggable: true, onDragStart: function (e) {
|
|
234
|
-
_this.handleDragStart(e, eachModel.id);
|
|
235
|
-
}, onDrop: function (e) {
|
|
236
|
-
_this.handleDrop(e, eachModel.id);
|
|
237
|
-
}, onDragOver: _this.handleDragOver },
|
|
238
|
-
react_1.default.createElement(outline_1.ArrowsPointingOutIcon, { className: "text-primary-600 h-4 w-4 cursor-pointer mr-1" })),
|
|
239
|
-
eachModel.hide ? (react_1.default.createElement(outline_1.EyeSlashIcon, { className: "text-primary-600 h-4 w-4 cursor-pointer", onClick: function () {
|
|
240
|
-
_this.handleHideDS(eachModel.id, false);
|
|
241
|
-
} })) : (react_1.default.createElement(outline_1.EyeIcon, { className: "text-primary-600 h-4 w-4 cursor-pointer", onClick: function () {
|
|
242
|
-
_this.handleHideDS(eachModel.id, true);
|
|
243
|
-
} }))));
|
|
244
|
-
index += 1;
|
|
245
|
-
return null;
|
|
246
|
-
});
|
|
247
|
-
return overviewList;
|
|
248
|
-
};
|
|
249
|
-
return _this;
|
|
250
|
-
}
|
|
251
|
-
OverviewModal.prototype.render = function () {
|
|
252
|
-
var _this = this;
|
|
253
|
-
return (react_1.default.createElement("div", null,
|
|
254
|
-
react_1.default.createElement("div", { className: "gap-y-2" }, this.renderOverviewContent()),
|
|
255
|
-
react_1.default.createElement("div", { className: "mt-24 flex justify-end" },
|
|
256
|
-
react_1.default.createElement(button_1.Button, { text: "Confirm", type: "normal", onClick: function () {
|
|
257
|
-
var _a, _b, _c;
|
|
258
|
-
(_b = (_a = _this.props).onChangeHide) === null || _b === void 0 ? void 0 : _b.call(_a, (_c = _this.state.model) !== null && _c !== void 0 ? _c : []);
|
|
259
|
-
_this.props.onClose();
|
|
260
|
-
} }))));
|
|
261
|
-
};
|
|
262
|
-
return OverviewModal;
|
|
263
|
-
}(react_1.Component));
|
|
264
|
-
exports.OverviewModal = OverviewModal;
|
|
265
|
-
var defaultQueryInput = {
|
|
266
|
-
type: "",
|
|
267
|
-
value: "",
|
|
268
|
-
options: [],
|
|
269
|
-
};
|
|
270
|
-
var FilterModal = /** @class */ (function (_super) {
|
|
271
|
-
__extends(FilterModal, _super);
|
|
272
|
-
function FilterModal() {
|
|
273
|
-
var _a;
|
|
274
|
-
var _this = _super.apply(this, arguments) || this;
|
|
275
|
-
_this.state = {
|
|
276
|
-
filterQueryModal: false,
|
|
277
|
-
query: defaultQueryInput,
|
|
278
|
-
queries: (_a = _this.props.filter) !== null && _a !== void 0 ? _a : [],
|
|
279
|
-
optionList: [],
|
|
280
|
-
};
|
|
281
|
-
_this.queryFormRef = (0, react_1.createRef)();
|
|
282
|
-
_this.queryTypeRef = (0, react_1.createRef)();
|
|
283
|
-
_this.queryValueRef = (0, react_1.createRef)();
|
|
284
|
-
_this.filterTableHeader = [
|
|
285
|
-
{ key: "type", title: "Type" },
|
|
286
|
-
{ key: "value", title: "Column" },
|
|
287
|
-
{ key: "sort", title: "Sort" },
|
|
288
|
-
{ key: "del", title: "Delete" },
|
|
289
|
-
];
|
|
290
|
-
_this.filterOptionHeader = [
|
|
291
|
-
{ key: "name", title: "Name", type: "string" },
|
|
292
|
-
{ key: "sort", title: "Sort" },
|
|
293
|
-
{ key: "del", title: "Delete" },
|
|
294
|
-
];
|
|
295
|
-
_this.mongofilterType = [
|
|
296
|
-
{
|
|
297
|
-
key: "reference",
|
|
298
|
-
label: "Reference",
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
key: "list",
|
|
302
|
-
label: "List",
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
key: "range",
|
|
306
|
-
label: "Range",
|
|
307
|
-
},
|
|
308
|
-
];
|
|
309
|
-
_this.fbFilterType = [
|
|
310
|
-
{ key: "search", label: "Search" },
|
|
311
|
-
{
|
|
312
|
-
key: "reference",
|
|
313
|
-
label: "Reference",
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
key: "list",
|
|
317
|
-
label: "List",
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
key: "range",
|
|
321
|
-
label: "Range",
|
|
322
|
-
},
|
|
323
|
-
];
|
|
324
|
-
_this.componentDidUpdate = function (prevProps) {
|
|
325
|
-
if (JSON.stringify(prevProps.filter) !== JSON.stringify(_this.props.filter)) {
|
|
326
|
-
_this.setState({
|
|
327
|
-
queries: _this.props.filter,
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
_this.handleOnChangeQueryInput = function (id, value) {
|
|
332
|
-
var _a;
|
|
333
|
-
var clonedQueryInput = JSON.parse(JSON.stringify(_this.state.query));
|
|
334
|
-
clonedQueryInput[id] = value;
|
|
335
|
-
if (clonedQueryInput.type === "reference") {
|
|
336
|
-
if (clonedQueryInput.value) {
|
|
337
|
-
var selectedRefModel = (_a = _this.props.model) === null || _a === void 0 ? void 0 : _a.find(function (eachItem) { return eachItem.id === clonedQueryInput.value; });
|
|
338
|
-
if (selectedRefModel) {
|
|
339
|
-
clonedQueryInput["label"] = selectedRefModel.referenceLabel;
|
|
340
|
-
clonedQueryInput["spaceId"] = selectedRefModel.referenceSpaceId;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
delete clonedQueryInput["label"];
|
|
346
|
-
delete clonedQueryInput["spaceId"];
|
|
347
|
-
}
|
|
348
|
-
_this.setState({ query: clonedQueryInput });
|
|
349
|
-
};
|
|
350
|
-
_this.handleFilterQuery = function (index, sortType, isOption) {
|
|
351
|
-
var _a, _b;
|
|
352
|
-
var sortList = JSON.parse(JSON.stringify(isOption ? _this.state.optionList : _this.state.queries));
|
|
353
|
-
var ascIndex = sortType === "up" ? index - 1 : index + 1;
|
|
354
|
-
_a = [
|
|
355
|
-
sortList[ascIndex],
|
|
356
|
-
sortList[index],
|
|
357
|
-
], sortList[index] = _a[0], sortList[ascIndex] = _a[1];
|
|
358
|
-
_this.setState((_b = {}, _b[isOption ? "optionList" : "queries"] = sortList, _b));
|
|
359
|
-
};
|
|
360
|
-
_this.handleAddFilterData = function (isOption, data) {
|
|
361
|
-
var _a, _b, _c, _d, _e, _f;
|
|
362
|
-
if (isOption) {
|
|
363
|
-
var clonedOptionList = (_a = _this.state.optionList) !== null && _a !== void 0 ? _a : [];
|
|
364
|
-
var optionText = data["name"];
|
|
365
|
-
if (_this.state.optionList && optionText)
|
|
366
|
-
clonedOptionList.push(optionText);
|
|
367
|
-
_this.setState({ optionList: clonedOptionList });
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
if (((_b = _this.state.query) === null || _b === void 0 ? void 0 : _b.type) === "list" &&
|
|
371
|
-
((_c = _this.state.optionList) === null || _c === void 0 ? void 0 : _c.length) === 0) {
|
|
372
|
-
(_e = (_d = _this.props).setNotification) === null || _e === void 0 ? void 0 : _e.call(_d, {
|
|
373
|
-
type: false,
|
|
374
|
-
title: "Slice Error",
|
|
375
|
-
msg: "Please at least add one option into the list",
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
var clonedQueries = (_f = _this.state.queries) !== null && _f !== void 0 ? _f : [];
|
|
380
|
-
var currentQuery = JSON.parse(JSON.stringify(_this.state.query));
|
|
381
|
-
currentQuery["options"] = JSON.parse(JSON.stringify(_this.state.optionList));
|
|
382
|
-
clonedQueries.push(currentQuery);
|
|
383
|
-
_this.setState({
|
|
384
|
-
queries: clonedQueries,
|
|
385
|
-
filterQueryModal: false,
|
|
386
|
-
optionList: [],
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
_this.handleUpdateNewQueryModal = function (filterQueryModal) {
|
|
392
|
-
_this.setState({ filterQueryModal: filterQueryModal });
|
|
393
|
-
};
|
|
394
|
-
_this.handleSpliceFilter = function (index, isOption) {
|
|
395
|
-
var _a;
|
|
396
|
-
var temp = JSON.parse(JSON.stringify(isOption ? _this.state.optionList : _this.state.queries));
|
|
397
|
-
temp.splice(index, 1);
|
|
398
|
-
_this.setState((_a = {}, _a[isOption ? "optionList" : "queries"] = temp, _a));
|
|
399
|
-
};
|
|
400
|
-
_this.renderFilterData = function (isOption) {
|
|
401
|
-
var filterQueryStructureView = [];
|
|
402
|
-
var sortComponent = undefined;
|
|
403
|
-
var list = isOption ? _this.state.optionList : _this.state.queries;
|
|
404
|
-
list === null || list === void 0 ? void 0 : list.map(function (data, index) {
|
|
405
|
-
if (list && list.length > 1) {
|
|
406
|
-
var upData_1 = index === list.length - 1;
|
|
407
|
-
sortComponent = (react_1.default.createElement("div", { className: "ml-2 cursor-pointer", onClick: function () {
|
|
408
|
-
_this.handleFilterQuery(index, upData_1 ? "up" : "down", isOption);
|
|
409
|
-
} }, upData_1 ? (react_1.default.createElement(outline_1.ArrowUpIcon, { className: "block w-5 h-5 text-primary-600" })) : (react_1.default.createElement(outline_1.ArrowDownIcon, { className: "block w-5 h-5 text-primary-600" }))));
|
|
410
|
-
}
|
|
411
|
-
var eachData = isOption
|
|
412
|
-
? { key: index, name: data }
|
|
413
|
-
: { key: index, type: data.type, value: data.value };
|
|
414
|
-
filterQueryStructureView.push(__assign(__assign({}, eachData), { sort: sortComponent, del: (react_1.default.createElement("div", { className: "ml-2 cursor-pointer", onClick: function () {
|
|
415
|
-
_this.handleSpliceFilter(index, isOption);
|
|
416
|
-
} },
|
|
417
|
-
react_1.default.createElement(outline_1.TrashIcon, { className: "block w-5 h-5 text-primary-600" }))) }));
|
|
418
|
-
return "";
|
|
419
|
-
});
|
|
420
|
-
return filterQueryStructureView;
|
|
421
|
-
};
|
|
422
|
-
return _this;
|
|
423
|
-
}
|
|
424
|
-
FilterModal.prototype.render = function () {
|
|
425
|
-
var _this = this;
|
|
426
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
427
|
-
var isFirebase = this.props.server === "fbServer" || this.props.server === "firebase";
|
|
428
|
-
if (this.state.filterQueryModal) {
|
|
429
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
430
|
-
react_1.default.createElement(form_1.Form, { className: "mt-5 pb-5", refList: [this.queryTypeRef, this.queryValueRef], handleComplete: function () {
|
|
431
|
-
_this.handleAddFilterData();
|
|
432
|
-
}, ref: this.queryFormRef },
|
|
433
|
-
react_1.default.createElement(select_1.Select, { ref: this.queryTypeRef, value: (_b = (_a = this.state.query) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : "", label: "Slice Type", options: isFirebase ? this.fbFilterType : this.mongofilterType, onChange: function (value) {
|
|
434
|
-
_this.handleOnChangeQueryInput("type", value);
|
|
435
|
-
} }),
|
|
436
|
-
react_1.default.createElement(select_1.Select, { containerClassName: "mt-5", ref: this.queryValueRef, value: (_d = (_c = this.state.query) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : "", label: "Column", options: (_l = (((_e = this.state.query) === null || _e === void 0 ? void 0 : _e.type) === "reference"
|
|
437
|
-
? (_g = (_f = this.props).renderReferenceLabelOptions) === null || _g === void 0 ? void 0 : _g.call(_f, "", true, "reference")
|
|
438
|
-
: (_j = (_h = this.props).renderReferenceLabelOptions) === null || _j === void 0 ? void 0 : _j.call(_h, "", false, ((_k = this.state.query) === null || _k === void 0 ? void 0 : _k.type) === "range" ? "date" : undefined))) !== null && _l !== void 0 ? _l : [], onChange: function (value) {
|
|
439
|
-
_this.handleOnChangeQueryInput("value", value);
|
|
440
|
-
}, staticDropdown: true }),
|
|
441
|
-
((_m = this.state.query) === null || _m === void 0 ? void 0 : _m.type) === "list" && (react_1.default.createElement(table_1.Table, { className: "py-7", header: this.filterOptionHeader, data: this.renderFilterData(true), loading: false, addable: {
|
|
442
|
-
active: true,
|
|
443
|
-
onAddData: function (data) {
|
|
444
|
-
_this.handleAddFilterData(true, data);
|
|
445
|
-
},
|
|
446
|
-
} }))),
|
|
447
|
-
react_1.default.createElement("div", { className: "flex justify-end items-end" },
|
|
448
|
-
react_1.default.createElement(button_1.Button, { className: "mr-5", text: "Back", type: "light", onClick: function () {
|
|
449
|
-
_this.handleUpdateNewQueryModal(false);
|
|
450
|
-
} }),
|
|
451
|
-
react_1.default.createElement(button_1.Button, { text: "Add", type: "normal", onClick: function () {
|
|
452
|
-
var _a;
|
|
453
|
-
(_a = _this.queryFormRef.current) === null || _a === void 0 ? void 0 : _a.handleSubmit();
|
|
454
|
-
} }))));
|
|
455
|
-
}
|
|
456
|
-
else {
|
|
457
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
458
|
-
react_1.default.createElement("div", { className: "flex flex-row mb-2 items-center mt-3" },
|
|
459
|
-
react_1.default.createElement("h2", { className: "text-2xl font-bold text-gray-700" }, "New Query"),
|
|
460
|
-
react_1.default.createElement("div", { className: "grow" }),
|
|
461
|
-
react_1.default.createElement(iconButton_1.IconButton, { className: "sm mt-2", icon: react_1.default.createElement(outline_1.PlusCircleIcon, { className: "w-6 h-6 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
462
|
-
_this.setState({
|
|
463
|
-
query: defaultQueryInput,
|
|
464
|
-
}, function () {
|
|
465
|
-
_this.handleUpdateNewQueryModal(true);
|
|
466
|
-
});
|
|
467
|
-
} })),
|
|
468
|
-
react_1.default.createElement(table_1.Table, { className: "py-7", header: this.filterTableHeader, data: this.renderFilterData(), loading: false }),
|
|
469
|
-
react_1.default.createElement("div", { className: "mt-24 flex justify-end" },
|
|
470
|
-
react_1.default.createElement(button_1.Button, { text: "Slice", type: "normal", onClick: function () {
|
|
471
|
-
var _a, _b, _c;
|
|
472
|
-
(_b = (_a = _this.props).onChangeFilter) === null || _b === void 0 ? void 0 : _b.call(_a, (_c = _this.state.queries) !== null && _c !== void 0 ? _c : []);
|
|
473
|
-
_this.props.onClose();
|
|
474
|
-
} }))));
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
return FilterModal;
|
|
478
|
-
}(react_1.Component));
|
|
479
|
-
exports.FilterModal = FilterModal;
|
|
480
115
|
var TabModal = /** @class */ (function (_super) {
|
|
481
116
|
__extends(TabModal, _super);
|
|
482
117
|
function TabModal() {
|
|
@@ -575,7 +210,8 @@ var TabModal = /** @class */ (function (_super) {
|
|
|
575
210
|
var suportedModelTypes_1 = ["string", "reference"];
|
|
576
211
|
var titleOptionList = _this.props.model
|
|
577
212
|
.filter(function (eachModel) {
|
|
578
|
-
return suportedModelTypes_1.includes(eachModel.type) &&
|
|
213
|
+
return suportedModelTypes_1.includes(eachModel.type) &&
|
|
214
|
+
eachModel.id !== "id";
|
|
579
215
|
})
|
|
580
216
|
.map(function (eachModel) { return ({
|
|
581
217
|
key: eachModel.id,
|
|
@@ -700,7 +336,8 @@ var TabModal = /** @class */ (function (_super) {
|
|
|
700
336
|
var suportedModelTypes_2 = ["list", "reference"];
|
|
701
337
|
var titleOptionList = _this.props.model
|
|
702
338
|
.filter(function (eachModel) {
|
|
703
|
-
return suportedModelTypes_2.includes(eachModel.type) &&
|
|
339
|
+
return suportedModelTypes_2.includes(eachModel.type) &&
|
|
340
|
+
eachModel.id !== "id";
|
|
704
341
|
})
|
|
705
342
|
.map(function (eachModel) { return ({
|
|
706
343
|
key: eachModel.id,
|
|
@@ -733,51 +370,51 @@ var TabModal = /** @class */ (function (_super) {
|
|
|
733
370
|
react_1.default.createElement(textInput_1.TextInput, { id: "tabName", ref: this.tabNameRef, value: this.state.tabName, type: "text", label: "Name", placeholder: "eg. Grid", onChange: function (e) {
|
|
734
371
|
_this.setState({ tabName: e.target.value });
|
|
735
372
|
} }),
|
|
736
|
-
react_1.default.createElement(select_1.Select, { label: "View Type", ref: this.tabTypeSelectionRef, options: this.renderViewTabOptions(), value: (_a = this.state.tabTypeSelection) !== null && _a !== void 0 ? _a : "", onChange: function (value) {
|
|
373
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, label: "View Type", ref: this.tabTypeSelectionRef, options: this.renderViewTabOptions(), value: (_a = this.state.tabTypeSelection) !== null && _a !== void 0 ? _a : "", onChange: function (value) {
|
|
737
374
|
_this.setState({ tabTypeSelection: value });
|
|
738
375
|
}, staticDropdown: true }),
|
|
739
376
|
(this.state.tabTypeSelection === "grid" ||
|
|
740
|
-
this.state.tabTypeSelection === "list") && (react_1.default.createElement(select_1.Select, { id: "tabPreviewImage", label: "Preview Image", ref: this.tabPreviewImageRef, options: (_d = (_c = (_b = this.props).renderReferenceLabelOptions) === null || _c === void 0 ? void 0 : _c.call(_b, "", false, "image")) !== null && _d !== void 0 ? _d : [], value: (_e = this.state.previewImageSelection) !== null && _e !== void 0 ? _e : "", onChange: function (value) {
|
|
377
|
+
this.state.tabTypeSelection === "list") && (react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabPreviewImage", label: "Preview Image", ref: this.tabPreviewImageRef, options: (_d = (_c = (_b = this.props).renderReferenceLabelOptions) === null || _c === void 0 ? void 0 : _c.call(_b, "", false, "image")) !== null && _d !== void 0 ? _d : [], value: (_e = this.state.previewImageSelection) !== null && _e !== void 0 ? _e : "", onChange: function (value) {
|
|
741
378
|
_this.setState({ previewImageSelection: value });
|
|
742
379
|
}, staticDropdown: true })),
|
|
743
380
|
this.state.tabTypeSelection === "calendar" && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
744
|
-
react_1.default.createElement(select_1.Select, { id: "tabCalendarTitle", label: "Title Column", ref: this.tabCalendarTitleRef, options: (_g = (_f = this.renderCalendarTitleOptions) === null || _f === void 0 ? void 0 : _f.call(this)) !== null && _g !== void 0 ? _g : [], value: (_h = this.state.calendarTitleColumn) !== null && _h !== void 0 ? _h : "", onChange: function (value) {
|
|
381
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabCalendarTitle", label: "Title Column", ref: this.tabCalendarTitleRef, options: (_g = (_f = this.renderCalendarTitleOptions) === null || _f === void 0 ? void 0 : _f.call(this)) !== null && _g !== void 0 ? _g : [], value: (_h = this.state.calendarTitleColumn) !== null && _h !== void 0 ? _h : "", onChange: function (value) {
|
|
745
382
|
_this.setState({ calendarTitleColumn: value });
|
|
746
383
|
} }),
|
|
747
|
-
react_1.default.createElement(select_1.Select, { id: "tabStartDate", label: "Start Date Column", ref: this.tabCalendarStartDateRef, options: (_k = (_j = this.renderCalendarDateOptions) === null || _j === void 0 ? void 0 : _j.call(this, "startDate")) !== null && _k !== void 0 ? _k : [], value: (_l = this.state.calendarStartDateColumn) !== null && _l !== void 0 ? _l : "", onChange: function (value) {
|
|
384
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabStartDate", label: "Start Date Column", ref: this.tabCalendarStartDateRef, options: (_k = (_j = this.renderCalendarDateOptions) === null || _j === void 0 ? void 0 : _j.call(this, "startDate")) !== null && _k !== void 0 ? _k : [], value: (_l = this.state.calendarStartDateColumn) !== null && _l !== void 0 ? _l : "", onChange: function (value) {
|
|
748
385
|
_this.setState({ calendarStartDateColumn: value });
|
|
749
386
|
} }),
|
|
750
|
-
react_1.default.createElement(select_1.Select, { id: "tabEndDate", label: "End Date Column (Optional)", ref: this.tabCalendarEndDateRef, options: (_o = (_m = this.renderCalendarDateOptions) === null || _m === void 0 ? void 0 : _m.call(this, "endDate")) !== null && _o !== void 0 ? _o : [], value: (_p = this.state.calendarEndDateColumn) !== null && _p !== void 0 ? _p : "", onChange: function (value) {
|
|
387
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabEndDate", label: "End Date Column (Optional)", ref: this.tabCalendarEndDateRef, options: (_o = (_m = this.renderCalendarDateOptions) === null || _m === void 0 ? void 0 : _m.call(this, "endDate")) !== null && _o !== void 0 ? _o : [], value: (_p = this.state.calendarEndDateColumn) !== null && _p !== void 0 ? _p : "", onChange: function (value) {
|
|
751
388
|
_this.setState({ calendarEndDateColumn: value });
|
|
752
389
|
} }))),
|
|
753
390
|
this.state.tabTypeSelection === "iframe" && (react_1.default.createElement(textInput_1.TextInput, { id: "tabIframe", ref: this.tabIframeRef, value: (_q = this.state.iframeLink) !== null && _q !== void 0 ? _q : "", type: "text", label: "Iframe Src", placeholder: "eg. https://link.com", onChange: function (e) {
|
|
754
391
|
_this.setState({ iframeLink: e.target.value });
|
|
755
392
|
} })),
|
|
756
393
|
this.state.tabTypeSelection === "feeds" && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
757
|
-
react_1.default.createElement(select_1.Select, { id: "tabFeedsTitle", label: "Title Column", ref: this.tabFeedsTitleRef, options: (_r = this.renderFeedsColumnOptions("title")) !== null && _r !== void 0 ? _r : [], value: (_s = this.state.feedTitleColumn) !== null && _s !== void 0 ? _s : "", staticDropdown: true, onChange: function (value) {
|
|
394
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabFeedsTitle", label: "Title Column", ref: this.tabFeedsTitleRef, options: (_r = this.renderFeedsColumnOptions("title")) !== null && _r !== void 0 ? _r : [], value: (_s = this.state.feedTitleColumn) !== null && _s !== void 0 ? _s : "", staticDropdown: true, onChange: function (value) {
|
|
758
395
|
_this.setState({ feedTitleColumn: value });
|
|
759
396
|
} }),
|
|
760
|
-
react_1.default.createElement(select_1.Select, { id: "tabFeedsContent", label: "Content Column", ref: this.tabFeedsContentRef, options: (_t = this.renderFeedsColumnOptions("content")) !== null && _t !== void 0 ? _t : [], value: (_u = this.state.feedContentColumn) !== null && _u !== void 0 ? _u : "", staticDropdown: true, onChange: function (value) {
|
|
397
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabFeedsContent", label: "Content Column", ref: this.tabFeedsContentRef, options: (_t = this.renderFeedsColumnOptions("content")) !== null && _t !== void 0 ? _t : [], value: (_u = this.state.feedContentColumn) !== null && _u !== void 0 ? _u : "", staticDropdown: true, onChange: function (value) {
|
|
761
398
|
_this.setState({ feedContentColumn: value });
|
|
762
399
|
} }),
|
|
763
|
-
react_1.default.createElement(select_1.Select, { id: "tabFeedsDesc", label: "Description Column (Optional)", options: (_v = this.renderFeedsColumnOptions("desc")) !== null && _v !== void 0 ? _v : [], value: (_w = this.state.feedDescColumn) !== null && _w !== void 0 ? _w : "", optional: true, staticDropdown: true, onChange: function (value) {
|
|
400
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabFeedsDesc", label: "Description Column (Optional)", options: (_v = this.renderFeedsColumnOptions("desc")) !== null && _v !== void 0 ? _v : [], value: (_w = this.state.feedDescColumn) !== null && _w !== void 0 ? _w : "", optional: true, staticDropdown: true, onChange: function (value) {
|
|
764
401
|
_this.setState({ feedDescColumn: value });
|
|
765
402
|
} }),
|
|
766
|
-
react_1.default.createElement(select_1.Select, { id: "tabFeedsIcon", label: "Icon Column (Optional)", options: (_x = this.renderFeedsColumnOptions("icon")) !== null && _x !== void 0 ? _x : [], value: (_y = this.state.feedIconColumn) !== null && _y !== void 0 ? _y : "", staticDropdown: true, type: "icon", onChange: function (value) {
|
|
403
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabFeedsIcon", label: "Icon Column (Optional)", options: (_x = this.renderFeedsColumnOptions("icon")) !== null && _x !== void 0 ? _x : [], value: (_y = this.state.feedIconColumn) !== null && _y !== void 0 ? _y : "", staticDropdown: true, type: "icon", onChange: function (value) {
|
|
767
404
|
_this.setState({ feedIconColumn: value });
|
|
768
405
|
} }))),
|
|
769
406
|
this.state.tabTypeSelection === "map" && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
770
|
-
react_1.default.createElement(select_1.Select, { id: "tabMapAddress", ref: this.tabMapAddressRef, label: "Address Column", options: (_z = this.renderMapColumnOptions("address")) !== null && _z !== void 0 ? _z : [], value: (_0 = this.state.mapAddressColumn) !== null && _0 !== void 0 ? _0 : "", staticDropdown: true, onChange: function (value) {
|
|
407
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabMapAddress", ref: this.tabMapAddressRef, label: "Address Column", options: (_z = this.renderMapColumnOptions("address")) !== null && _z !== void 0 ? _z : [], value: (_0 = this.state.mapAddressColumn) !== null && _0 !== void 0 ? _0 : "", staticDropdown: true, onChange: function (value) {
|
|
771
408
|
_this.setState({ mapAddressColumn: value });
|
|
772
409
|
} }),
|
|
773
|
-
react_1.default.createElement(select_1.Select, { id: "tabMapTitle", label: "Title Column (Optional)", options: (_1 = this.renderMapColumnOptions("title")) !== null && _1 !== void 0 ? _1 : [], value: (_2 = this.state.mapTitleColumn) !== null && _2 !== void 0 ? _2 : "", staticDropdown: true, onChange: function (value) {
|
|
410
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabMapTitle", label: "Title Column (Optional)", options: (_1 = this.renderMapColumnOptions("title")) !== null && _1 !== void 0 ? _1 : [], value: (_2 = this.state.mapTitleColumn) !== null && _2 !== void 0 ? _2 : "", staticDropdown: true, onChange: function (value) {
|
|
774
411
|
_this.setState({ mapTitleColumn: value });
|
|
775
412
|
} }),
|
|
776
|
-
react_1.default.createElement(select_1.Select, { id: "tabMapGroup", label: "Group Column (Optional)", options: (_3 = this.renderMapColumnOptions("group")) !== null && _3 !== void 0 ? _3 : [], value: (_4 = this.state.mapGroupColumn) !== null && _4 !== void 0 ? _4 : "", staticDropdown: true, onChange: function (value) {
|
|
413
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "tabMapGroup", label: "Group Column (Optional)", options: (_3 = this.renderMapColumnOptions("group")) !== null && _3 !== void 0 ? _3 : [], value: (_4 = this.state.mapGroupColumn) !== null && _4 !== void 0 ? _4 : "", staticDropdown: true, onChange: function (value) {
|
|
777
414
|
_this.setState({ mapGroupColumn: value });
|
|
778
415
|
} }))),
|
|
779
416
|
this.state.tabTypeSelection === "kanban" && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
780
|
-
react_1.default.createElement(select_1.Select, { id: "kanbanTitleColumn", label: "Title Column", ref: this.tabKanbanTitleRef, options: (_6 = (_5 = this.renderKanbanTitleOptions) === null || _5 === void 0 ? void 0 : _5.call(this)) !== null && _6 !== void 0 ? _6 : [], value: (_7 = this.state.kanbanTitleColumn) !== null && _7 !== void 0 ? _7 : "", onChange: function (value) {
|
|
417
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "kanbanTitleColumn", label: "Title Column", ref: this.tabKanbanTitleRef, options: (_6 = (_5 = this.renderKanbanTitleOptions) === null || _5 === void 0 ? void 0 : _5.call(this)) !== null && _6 !== void 0 ? _6 : [], value: (_7 = this.state.kanbanTitleColumn) !== null && _7 !== void 0 ? _7 : "", onChange: function (value) {
|
|
781
418
|
_this.setState({ kanbanTitleColumn: value });
|
|
782
419
|
} })))),
|
|
783
420
|
react_1.default.createElement("div", { className: "flex justify-end item-end" },
|
|
@@ -935,7 +572,9 @@ function ExpressionModal(props) {
|
|
|
935
572
|
};
|
|
936
573
|
// Update field selection
|
|
937
574
|
var handleUpdateField = function (id, field) {
|
|
938
|
-
setExpressions(expressions.map(function (item) {
|
|
575
|
+
setExpressions(expressions.map(function (item) {
|
|
576
|
+
return item.id === id ? __assign(__assign({}, item), field) : item;
|
|
577
|
+
}));
|
|
939
578
|
};
|
|
940
579
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
941
580
|
react_1.default.createElement("div", { className: "p-4 overflow-y-auto pb-20 h-full" },
|
|
@@ -946,10 +585,10 @@ function ExpressionModal(props) {
|
|
|
946
585
|
expressions.map(function (item, index) {
|
|
947
586
|
var _a, _b, _c, _d;
|
|
948
587
|
return (react_1.default.createElement("div", { key: item.id, className: "flex items-center gap-2" },
|
|
949
|
-
index === 0 ? (react_1.default.createElement(select_1.Select, { id: "attribute", label: "Column ".concat(index + 1), options: (_b = (_a = props.renderReferenceLabelOptions) === null || _a === void 0 ? void 0 : _a.call(props, "", false, "number")) !== null && _b !== void 0 ? _b : [], newValue: true, value: item.field, onChange: function (value) {
|
|
588
|
+
index === 0 ? (react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "attribute", label: "Column ".concat(index + 1), options: (_b = (_a = props.renderReferenceLabelOptions) === null || _a === void 0 ? void 0 : _a.call(props, "", false, "number")) !== null && _b !== void 0 ? _b : [], newValue: true, value: item.field, onChange: function (value) {
|
|
950
589
|
handleUpdateField(item.id, { field: value });
|
|
951
590
|
} })) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
952
|
-
react_1.default.createElement(select_1.Select, { id: "operator", label: "Operator", options: [
|
|
591
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "operator", label: "Operator", options: [
|
|
953
592
|
{
|
|
954
593
|
key: "+",
|
|
955
594
|
label: "+",
|
|
@@ -969,7 +608,7 @@ function ExpressionModal(props) {
|
|
|
969
608
|
], value: item.operator, onChange: function (value) {
|
|
970
609
|
handleUpdateField(item.id, { operator: value });
|
|
971
610
|
} }),
|
|
972
|
-
react_1.default.createElement(select_1.Select, { id: "attribute", label: "Column ".concat(index + 1), options: (_d = (_c = props.renderReferenceLabelOptions) === null || _c === void 0 ? void 0 : _c.call(props, "", false, "number")) !== null && _d !== void 0 ? _d : [], newValue: true, value: item.field, onChange: function (value) {
|
|
611
|
+
react_1.default.createElement(select_1.Select, { portalDropdown: true, id: "attribute", label: "Column ".concat(index + 1), options: (_d = (_c = props.renderReferenceLabelOptions) === null || _c === void 0 ? void 0 : _c.call(props, "", false, "number")) !== null && _d !== void 0 ? _d : [], newValue: true, value: item.field, onChange: function (value) {
|
|
973
612
|
handleUpdateField(item.id, { field: value });
|
|
974
613
|
} }))),
|
|
975
614
|
index > 0 && (react_1.default.createElement(outline_1.TrashIcon, { className: "block w-10 h-10 text-primary-600 cursor-pointer", onClick: function () {
|