blixify-ui-web 1.2.250 → 1.2.252
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/blobModule.d.ts +1 -0
- package/lib/components/data/blobModule.d.ts.map +1 -1
- package/lib/components/data/blobModule.js +24 -2
- package/lib/components/data/blobModule.js.map +1 -1
- package/lib/components/data/columnTypes/dateRangeCalendar.d.ts +36 -0
- package/lib/components/data/columnTypes/dateRangeCalendar.d.ts.map +1 -0
- package/lib/components/data/columnTypes/dateRangeCalendar.js +226 -0
- package/lib/components/data/columnTypes/dateRangeCalendar.js.map +1 -0
- package/lib/components/data/columnTypes/dateRangeCell.d.ts +2 -0
- package/lib/components/data/columnTypes/dateRangeCell.d.ts.map +1 -1
- package/lib/components/data/columnTypes/dateRangeCell.js +63 -11
- package/lib/components/data/columnTypes/dateRangeCell.js.map +1 -1
- package/lib/components/data/columnTypes/index.d.ts +1 -0
- package/lib/components/data/columnTypes/index.d.ts.map +1 -1
- package/lib/components/data/columnTypes/index.js +1 -0
- package/lib/components/data/columnTypes/index.js.map +1 -1
- package/lib/components/data/columnTypes/lookup.d.ts +29 -0
- package/lib/components/data/columnTypes/lookup.d.ts.map +1 -0
- package/lib/components/data/columnTypes/lookup.js +89 -0
- package/lib/components/data/columnTypes/lookup.js.map +1 -0
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +142 -63
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +9 -2
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/listModule.d.ts +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +11 -5
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/updateModule.d.ts +5 -0
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +24 -2
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/display/newList/compactRow.d.ts +30 -0
- package/lib/components/display/newList/compactRow.d.ts.map +1 -0
- package/lib/components/display/newList/compactRow.js +81 -0
- package/lib/components/display/newList/compactRow.js.map +1 -0
- package/lib/components/display/newList/index.d.ts +6 -0
- package/lib/components/display/newList/index.d.ts.map +1 -1
- package/lib/components/display/newList/index.js +32 -3
- package/lib/components/display/newList/index.js.map +1 -1
- package/lib/components/display/newList/listRowFields.d.ts +24 -0
- package/lib/components/display/newList/listRowFields.d.ts.map +1 -0
- package/lib/components/display/newList/listRowFields.js +86 -0
- package/lib/components/display/newList/listRowFields.js.map +1 -0
- package/lib/components/display/newTable/index.d.ts +7 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +874 -274
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/newTable/labelPicker.d.ts +24 -0
- package/lib/components/display/newTable/labelPicker.d.ts.map +1 -0
- package/lib/components/display/newTable/labelPicker.js +228 -0
- package/lib/components/display/newTable/labelPicker.js.map +1 -0
- package/lib/components/input/datePicker/index.d.ts.map +1 -1
- package/lib/components/input/datePicker/index.js +18 -8
- package/lib/components/input/datePicker/index.js.map +1 -1
- package/lib/components/input/select/index.d.ts +13 -0
- package/lib/components/input/select/index.d.ts.map +1 -1
- package/lib/components/input/select/index.js +248 -31
- package/lib/components/input/select/index.js.map +1 -1
- package/lib/components/input/textInput/index.d.ts.map +1 -1
- package/lib/components/input/textInput/index.js +41 -6
- package/lib/components/input/textInput/index.js.map +1 -1
- package/lib/components/input/utils.d.ts +12 -0
- package/lib/components/input/utils.d.ts.map +1 -1
- package/lib/components/input/utils.js.map +1 -1
- package/lib/tail.css +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DataStructure } from "../dataTemplate/model";
|
|
2
|
+
/**
|
|
3
|
+
* Lookup column (`type: "lookup"`) — shows the `lookupFieldId` column of the
|
|
4
|
+
* record that `referenceFieldId` (a reference or listReference column of the
|
|
5
|
+
* same datasheet) links to. The value is stored on each row and written only
|
|
6
|
+
* by the host's server, which also copies the source column's type and
|
|
7
|
+
* display settings onto the lookup as `lookupFieldType` and
|
|
8
|
+
* `lookupFieldSettings`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const LOOKUP_TYPE = "lookup";
|
|
11
|
+
export declare const LOOKUP_REFERENCE_TYPES: string[];
|
|
12
|
+
export declare const LOOKUP_UNSUPPORTED_SOURCE_TYPES: string[];
|
|
13
|
+
export declare const handleIsLookupColumn: (column?: {
|
|
14
|
+
type?: string;
|
|
15
|
+
} | null) => boolean;
|
|
16
|
+
export declare const handleIsLookupDerived: (column?: Partial<DataStructure> | null) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The columns as the views draw them: each lookup as its source column's
|
|
19
|
+
* type, with its settings, read-only. A listReference lookup holds one value
|
|
20
|
+
* per linked row, so it is drawn as a multiple list.
|
|
21
|
+
*/
|
|
22
|
+
export declare const handleResolveLookupColumns: <T extends Partial<DataStructure>>(model: T[]) => T[];
|
|
23
|
+
/**
|
|
24
|
+
* Columns handed back to the host with each lookup put back as stored. A
|
|
25
|
+
* lookup drawn as its source type takes only its name, width and visibility
|
|
26
|
+
* from the table; one the column dialog sent as a lookup is kept as sent.
|
|
27
|
+
*/
|
|
28
|
+
export declare const handleRestoreLookupColumns: <T extends Partial<DataStructure>>(columns: T[], stored: Partial<DataStructure>[] | undefined) => T[];
|
|
29
|
+
//# sourceMappingURL=lookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../../src/components/data/columnTypes/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,sBAAsB,UAAiC,CAAC;AAMrE,eAAO,MAAM,+BAA+B,UAO3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,YACxC,CAAC;AAI/B,eAAO,MAAM,qBAAqB,YAAa,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,YACnB,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,OAAO,CAAC,aAAa,CAAC,SAClE,CAAC,EAAE,KACT,CAAC,EAoBH,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,OAAO,CAAC,aAAa,CAAC,WAChE,CAAC,EAAE,UACJ,OAAO,CAAC,aAAa,CAAC,EAAE,GAAG,SAAS,KAC3C,CAAC,EAmBH,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.handleRestoreLookupColumns = exports.handleResolveLookupColumns = exports.handleIsLookupDerived = exports.handleIsLookupColumn = exports.LOOKUP_UNSUPPORTED_SOURCE_TYPES = exports.LOOKUP_REFERENCE_TYPES = exports.LOOKUP_TYPE = void 0;
|
|
15
|
+
/**
|
|
16
|
+
* Lookup column (`type: "lookup"`) — shows the `lookupFieldId` column of the
|
|
17
|
+
* record that `referenceFieldId` (a reference or listReference column of the
|
|
18
|
+
* same datasheet) links to. The value is stored on each row and written only
|
|
19
|
+
* by the host's server, which also copies the source column's type and
|
|
20
|
+
* display settings onto the lookup as `lookupFieldType` and
|
|
21
|
+
* `lookupFieldSettings`.
|
|
22
|
+
*/
|
|
23
|
+
exports.LOOKUP_TYPE = "lookup";
|
|
24
|
+
exports.LOOKUP_REFERENCE_TYPES = ["reference", "listReference"];
|
|
25
|
+
// INFO: a password is never copied onto another row, a button holds no value
|
|
26
|
+
// and a lookup never reads another lookup. A reference is not shown through a
|
|
27
|
+
// lookup either: drawing it would read the linked datasheet to label it, past
|
|
28
|
+
// the host server's checks on what the reader may see
|
|
29
|
+
exports.LOOKUP_UNSUPPORTED_SOURCE_TYPES = [
|
|
30
|
+
"password",
|
|
31
|
+
"button",
|
|
32
|
+
"lookup",
|
|
33
|
+
"reference",
|
|
34
|
+
"listReference",
|
|
35
|
+
"referenceSelection",
|
|
36
|
+
];
|
|
37
|
+
var handleIsLookupColumn = function (column) {
|
|
38
|
+
return (column === null || column === void 0 ? void 0 : column.type) === exports.LOOKUP_TYPE;
|
|
39
|
+
};
|
|
40
|
+
exports.handleIsLookupColumn = handleIsLookupColumn;
|
|
41
|
+
// INFO: a column drawn from a lookup still carries the lookup's ids, so a
|
|
42
|
+
// lookup shown as its source type is told apart from a real column
|
|
43
|
+
var handleIsLookupDerived = function (column) {
|
|
44
|
+
return (0, exports.handleIsLookupColumn)(column) || !!(column === null || column === void 0 ? void 0 : column.lookupFieldId);
|
|
45
|
+
};
|
|
46
|
+
exports.handleIsLookupDerived = handleIsLookupDerived;
|
|
47
|
+
/**
|
|
48
|
+
* The columns as the views draw them: each lookup as its source column's
|
|
49
|
+
* type, with its settings, read-only. A listReference lookup holds one value
|
|
50
|
+
* per linked row, so it is drawn as a multiple list.
|
|
51
|
+
*/
|
|
52
|
+
var handleResolveLookupColumns = function (model) {
|
|
53
|
+
// INFO: the same list when there is no lookup, so a caller comparing models
|
|
54
|
+
// by identity sees no change
|
|
55
|
+
if (!(model === null || model === void 0 ? void 0 : model.some(exports.handleIsLookupColumn)))
|
|
56
|
+
return model;
|
|
57
|
+
return model.map(function (eachColumn) {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
if (!(0, exports.handleIsLookupColumn)(eachColumn))
|
|
60
|
+
return eachColumn;
|
|
61
|
+
var reference = model.find(function (eachField) { return (eachField === null || eachField === void 0 ? void 0 : eachField.id) === eachColumn.referenceFieldId; });
|
|
62
|
+
var isList = (reference === null || reference === void 0 ? void 0 : reference.type) === "listReference";
|
|
63
|
+
return __assign(__assign(__assign({}, eachColumn), ((_a = eachColumn.lookupFieldSettings) !== null && _a !== void 0 ? _a : {})), { type: isList ? "multipleList" : ((_b = eachColumn.lookupFieldType) !== null && _b !== void 0 ? _b : "string"), disabled: true, optional: true, unique: false, defaultValue: undefined });
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
exports.handleResolveLookupColumns = handleResolveLookupColumns;
|
|
67
|
+
/**
|
|
68
|
+
* Columns handed back to the host with each lookup put back as stored. A
|
|
69
|
+
* lookup drawn as its source type takes only its name, width and visibility
|
|
70
|
+
* from the table; one the column dialog sent as a lookup is kept as sent.
|
|
71
|
+
*/
|
|
72
|
+
var handleRestoreLookupColumns = function (columns, stored) {
|
|
73
|
+
var storedLookups = new Map((stored !== null && stored !== void 0 ? stored : [])
|
|
74
|
+
.filter(exports.handleIsLookupColumn)
|
|
75
|
+
.map(function (each) { return [each.id, each]; }));
|
|
76
|
+
if (storedLookups.size === 0)
|
|
77
|
+
return columns;
|
|
78
|
+
return columns.map(function (eachColumn) {
|
|
79
|
+
var _a;
|
|
80
|
+
var original = storedLookups.get(eachColumn.id);
|
|
81
|
+
if (!original || (0, exports.handleIsLookupColumn)(eachColumn))
|
|
82
|
+
return eachColumn;
|
|
83
|
+
return __assign(__assign(__assign(__assign({}, original), { name: (_a = eachColumn.name) !== null && _a !== void 0 ? _a : original.name }), (eachColumn.hide !== undefined ? { hide: eachColumn.hide } : {})), (eachColumn.tableColWidth !== undefined
|
|
84
|
+
? { tableColWidth: eachColumn.tableColWidth }
|
|
85
|
+
: {}));
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
exports.handleRestoreLookupColumns = handleRestoreLookupColumns;
|
|
89
|
+
//# sourceMappingURL=lookup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../../../src/components/data/columnTypes/lookup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;;;;;;;GAOG;AACU,QAAA,WAAW,GAAG,QAAQ,CAAC;AAEvB,QAAA,sBAAsB,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAErE,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,sDAAsD;AACzC,QAAA,+BAA+B,GAAG;IAC7C,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,eAAe;IACf,oBAAoB;CACrB,CAAC;AAEK,IAAM,oBAAoB,GAAG,UAAC,MAAiC;IACpE,OAAA,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,MAAK,mBAAW;AAA5B,CAA4B,CAAC;AADlB,QAAA,oBAAoB,wBACF;AAE/B,0EAA0E;AAC1E,mEAAmE;AAC5D,IAAM,qBAAqB,GAAG,UAAC,MAAsC;IAC1E,OAAA,IAAA,4BAAoB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAA;AAAvD,CAAuD,CAAC;AAD7C,QAAA,qBAAqB,yBACwB;AAE1D;;;;GAIG;AACI,IAAM,0BAA0B,GAAG,UACxC,KAAU;IAEV,4EAA4E;IAC5E,6BAA6B;IAC7B,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,4BAAoB,CAAC,CAAA;QAAE,OAAO,KAAK,CAAC;IACrD,OAAO,KAAK,CAAC,GAAG,CAAC,UAAC,UAAU;;QAC1B,IAAI,CAAC,IAAA,4BAAoB,EAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;QACzD,IAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAC1B,UAAC,SAAS,IAAK,OAAA,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,EAAE,MAAK,UAAU,CAAC,gBAAgB,EAA7C,CAA6C,CAC7D,CAAC;QACF,IAAM,MAAM,GAAG,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,eAAe,CAAC;QACnD,OAAO,+BACF,UAAU,GACV,CAAC,MAAA,UAAU,CAAC,mBAAmB,mCAAI,EAAE,CAAC,KACzC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAA,UAAU,CAAC,eAAe,mCAAI,QAAQ,CAAC,EACxE,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,IAAI,EACd,MAAM,EAAE,KAAK,EACb,YAAY,EAAE,SAAS,GACnB,CAAC;IACT,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAtBW,QAAA,0BAA0B,8BAsBrC;AAEF;;;;GAIG;AACI,IAAM,0BAA0B,GAAG,UACxC,OAAY,EACZ,MAA4C;IAE5C,IAAM,aAAa,GAAG,IAAI,GAAG,CAC3B,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;SACX,MAAM,CAAC,4BAAoB,CAAC;SAC5B,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,CAAC,IAAI,CAAC,EAAY,EAAE,IAAI,CAAC,EAAzB,CAAyB,CAAC,CAC5C,CAAC;IACF,IAAI,aAAa,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAC7C,OAAO,OAAO,CAAC,GAAG,CAAC,UAAC,UAAU;;QAC5B,IAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,EAAY,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,IAAI,IAAA,4BAAoB,EAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;QACrE,OAAO,wCACF,QAAQ,KACX,IAAI,EAAE,MAAA,UAAU,CAAC,IAAI,mCAAI,QAAQ,CAAC,IAAI,KACnC,CAAC,UAAU,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAChE,CAAC,UAAU,CAAC,aAAa,KAAK,SAAS;YACxC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,CAAC,aAAa,EAAE;YAC7C,CAAC,CAAC,EAAE,CAAC,CACH,CAAC;IACT,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAtBW,QAAA,0BAA0B,8BAsBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,KASN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,KASN,MAAM,OAAO,CAAC;AAiHf,OAAO,EACL,iBAAiB,EAIlB,MAAM,kBAAkB,CAAC;AAgI1B,eAAO,MAAM,qBAAqB,OAAO,CAAC;AA6C1C,eAAO,MAAM,yBAAyB,UAAW,GAAG,YAYnD,CAAC;AAEF,eAAO,MAAM,YAAY,mFAwlgBvB,CAAC"}
|
|
@@ -130,6 +130,7 @@ var stepper_1 = require("../../display/stepper");
|
|
|
130
130
|
var table_1 = require("../../display/table");
|
|
131
131
|
var newTable_1 = require("../../display/newTable");
|
|
132
132
|
var newList_1 = require("../../display/newList");
|
|
133
|
+
var listRowFields_1 = require("../../display/newList/listRowFields");
|
|
133
134
|
var newGrid_1 = require("../../display/newGrid");
|
|
134
135
|
var newKanban_1 = require("../../display/newKanban");
|
|
135
136
|
var newCalendar_1 = require("../../display/newCalendar");
|
|
@@ -165,6 +166,7 @@ var chartResults_1 = require("../dataGraph/chartResults");
|
|
|
165
166
|
var defaultColours_1 = require("../columnTypes/defaultColours");
|
|
166
167
|
var systemColumns_1 = require("../columnTypes/systemColumns");
|
|
167
168
|
var dateRange_1 = require("../columnTypes/dateRange");
|
|
169
|
+
var lookup_1 = require("../columnTypes/lookup");
|
|
168
170
|
var socket_1 = require("./socket");
|
|
169
171
|
var newPagination_1 = require("../../display/newPagination");
|
|
170
172
|
var pagination_1 = require("./pagination");
|
|
@@ -243,7 +245,15 @@ var handleCheckEmptyCardValue = function (value) {
|
|
|
243
245
|
return false;
|
|
244
246
|
};
|
|
245
247
|
exports.handleCheckEmptyCardValue = handleCheckEmptyCardValue;
|
|
246
|
-
exports.DataTemplate = (0, react_1.forwardRef)(function (
|
|
248
|
+
exports.DataTemplate = (0, react_1.forwardRef)(function (rawProps, ref) {
|
|
249
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123;
|
|
250
|
+
// INFO: every view draws a lookup as its source column's type, read-only, so
|
|
251
|
+
// no type branch below meets "lookup"; rawProps.model keeps the lookups as
|
|
252
|
+
// stored for the columns handed back to the host
|
|
253
|
+
var resolvedModel = (0, react_1.useMemo)(function () { return (0, lookup_1.handleResolveLookupColumns)(rawProps.model); }, [rawProps.model]);
|
|
254
|
+
var props = resolvedModel === rawProps.model
|
|
255
|
+
? rawProps
|
|
256
|
+
: __assign(__assign({}, rawProps), { model: resolvedModel });
|
|
247
257
|
// INFO: props.type is what the caller asked for; resolvedType is what THIS
|
|
248
258
|
// instance renders. They differ when the caller asked for a read with readDrawer
|
|
249
259
|
// on, or a create or edit with bareFormDrawer on: this instance keeps rendering
|
|
@@ -253,7 +263,6 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
253
263
|
// Every read of the view type below uses resolvedType. The distinction matters
|
|
254
264
|
// most in effect dependency arrays — following props.type there would leave
|
|
255
265
|
// the list never refetching while the panel is open, which fails silently.
|
|
256
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123;
|
|
257
266
|
// INFO: the panel cannot navigate its way out — handleNavigate("read") is
|
|
258
267
|
// routed straight back into it — so expand-to-full-page is local state.
|
|
259
268
|
var _124 = (0, react_1.useState)(false), drawerPageView = _124[0], setDrawerPageView = _124[1];
|
|
@@ -687,26 +696,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
687
696
|
var _227 = (0, react_1.useState)({}), referencesOptions = _227[0], setReferencesOptions = _227[1];
|
|
688
697
|
var _228 = (0, react_1.useState)({}), referencesDetails = _228[0], setReferencesDetails = _228[1];
|
|
689
698
|
var _229 = (0, react_1.useState)({}), listReferencesOptions = _229[0], setListReferencesOptions = _229[1];
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
var
|
|
693
|
-
var
|
|
699
|
+
// INFO: the referenced records themselves, for a table cell that picks from
|
|
700
|
+
// a list on one (referenceSelection)
|
|
701
|
+
var _230 = (0, react_1.useState)({}), listReferencesDetails = _230[0], setListReferencesDetails = _230[1];
|
|
702
|
+
var _231 = (0, react_1.useState)({}), referenceDeleteTableData = _231[0], setReferenceDeleteTableData = _231[1];
|
|
703
|
+
var _232 = (0, react_1.useState)([]), relatedSections = _232[0], setRelatedSections = _232[1];
|
|
704
|
+
var _233 = (0, react_1.useState)(0), referenceDeleteIndex = _233[0], setReferenceDeleteIndex = _233[1];
|
|
705
|
+
var _234 = (0, react_1.useState)({
|
|
694
706
|
id: "",
|
|
695
707
|
name: "",
|
|
696
708
|
type: "string",
|
|
697
|
-
}), referenceCreationModal =
|
|
698
|
-
var
|
|
699
|
-
var
|
|
709
|
+
}), referenceCreationModal = _234[0], setReferenceCreationModal = _234[1];
|
|
710
|
+
var _235 = (0, react_1.useState)({}), referenceModelSchema = _235[0], setReferenceSchema = _235[1];
|
|
711
|
+
var _236 = (0, react_1.useState)([]), kanbanChecked = _236[0], setKanbanChecked = _236[1];
|
|
700
712
|
//INFO : Offline
|
|
701
|
-
var
|
|
702
|
-
var
|
|
713
|
+
var _237 = (0, react_1.useState)(0), offlineDataLength = _237[0], setOfflineDataLength = _237[1];
|
|
714
|
+
var _238 = (0, react_1.useState)(false), offlineModal = _238[0], setOfflineModal = _238[1];
|
|
703
715
|
// INFO: live-stream state — driven by socket connection and navigator.onLine
|
|
704
|
-
var
|
|
705
|
-
var
|
|
716
|
+
var _239 = (0, react_1.useState)(false), isLive = _239[0], setIsLive = _239[1];
|
|
717
|
+
var _240 = (0, react_1.useState)(false), isLiveOffline = _240[0], setIsLiveOffline = _240[1];
|
|
706
718
|
// INFO: true when navigator is offline — used to switch ReadQueryHoc between
|
|
707
719
|
// server reads (online, full pagination) and IndexedDB reads (offline, cached data).
|
|
708
720
|
// Independent of SSE status so it works even when bareSocketName is not set.
|
|
709
|
-
var
|
|
721
|
+
var _241 = (0, react_1.useState)(typeof navigator !== "undefined" ? !navigator.onLine : false), isNetworkOffline = _241[0], setIsNetworkOffline = _241[1];
|
|
710
722
|
var previousType = (0, react_1.useRef)(null);
|
|
711
723
|
var previousSelectedData = (0, react_1.useRef)(null);
|
|
712
724
|
var scrollSentinelRef = (0, react_1.useRef)(null);
|
|
@@ -1023,7 +1035,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1023
1035
|
var isSchemaHideMode = ((_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.onChangeHide) ? true : false;
|
|
1024
1036
|
// INFO: rows per page is a view setting the user can change, so it starts from
|
|
1025
1037
|
// the persisted value and falls back to the consumer's limit
|
|
1026
|
-
var
|
|
1038
|
+
var _242 = (0, react_1.useState)((_24 = (_23 = (isPersistEnabled ? persistedState === null || persistedState === void 0 ? void 0 : persistedState.pageLimit : undefined)) !== null && _23 !== void 0 ? _23 : props.limit) !== null && _24 !== void 0 ? _24 : 10), pageLimit = _242[0], setPageLimit = _242[1];
|
|
1027
1039
|
var limit = pageLimit;
|
|
1028
1040
|
var isSavedViewsEnabled = !!((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.savedViews) && resolvedType === "list";
|
|
1029
1041
|
// INFO: an app that stores views takes over from this browser's storage, so
|
|
@@ -1164,7 +1176,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1164
1176
|
displayRows: filtered.map(function (eachEntry) { return eachEntry.displayRow; }),
|
|
1165
1177
|
};
|
|
1166
1178
|
};
|
|
1167
|
-
var
|
|
1179
|
+
var _243 = (0, permissions_1.handleResolveDataTemplateWritePermissions)(props.edit), canUpdateRecord = _243.canUpdateRecord, canInlineUpdate = _243.canInlineUpdate, canBatchUpdate = _243.canBatchUpdate, canDeleteRecord = _243.canDeleteRecord;
|
|
1168
1180
|
var isEditor = ((_36 = props.edit) === null || _36 === void 0 ? void 0 : _36.allEditable) ? true : false;
|
|
1169
1181
|
var isOffline = (_37 = props.bareSettings) === null || _37 === void 0 ? void 0 : _37.bareOffline;
|
|
1170
1182
|
// INFO: when bareOfflineNetworkAware is true, the save path is also gated on
|
|
@@ -3665,6 +3677,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3665
3677
|
return;
|
|
3666
3678
|
formulaCondKeyRef.current = JSON.stringify(handleReadQueryHocCond());
|
|
3667
3679
|
});
|
|
3680
|
+
// INFO: the referenced records kept for the table's cells add up as pages
|
|
3681
|
+
// and groups load. Another collection starts afresh, as its list always
|
|
3682
|
+
// loads again; a new filter or search keeps them, as not every one reloads
|
|
3683
|
+
// the rows that read them
|
|
3684
|
+
var listReferencesCollectionRef = (0, react_1.useRef)(props.collectionId);
|
|
3685
|
+
(0, react_1.useEffect)(function () {
|
|
3686
|
+
if (listReferencesCollectionRef.current === props.collectionId)
|
|
3687
|
+
return;
|
|
3688
|
+
listReferencesCollectionRef.current = props.collectionId;
|
|
3689
|
+
setListReferencesDetails({});
|
|
3690
|
+
}, [props.collectionId]);
|
|
3668
3691
|
var handleSelectIds = function (selectedIds) {
|
|
3669
3692
|
var _a;
|
|
3670
3693
|
setSelectedIds(selectedIds);
|
|
@@ -3766,6 +3789,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3766
3789
|
});
|
|
3767
3790
|
});
|
|
3768
3791
|
setListReferencesOptions(function (prev) { return (__assign(__assign({}, prev), seeded)); });
|
|
3792
|
+
// INFO: each group of a grouped list loads its own page of records, so a
|
|
3793
|
+
// column's records are added to what earlier groups loaded, not replaced
|
|
3794
|
+
setListReferencesDetails(function (prev) {
|
|
3795
|
+
var merged = __assign({}, prev);
|
|
3796
|
+
Object.entries(details !== null && details !== void 0 ? details : {}).forEach(function (_a) {
|
|
3797
|
+
var _b;
|
|
3798
|
+
var eachKey = _a[0], eachDocs = _a[1];
|
|
3799
|
+
if (!Array.isArray(eachDocs))
|
|
3800
|
+
return;
|
|
3801
|
+
var byId = new Map(((_b = merged[eachKey]) !== null && _b !== void 0 ? _b : []).map(function (eachDoc) { return [
|
|
3802
|
+
eachDoc[serverId],
|
|
3803
|
+
eachDoc,
|
|
3804
|
+
]; }));
|
|
3805
|
+
eachDocs.forEach(function (eachDoc) { return byId.set(eachDoc[serverId], eachDoc); });
|
|
3806
|
+
merged[eachKey] = Array.from(byId.values());
|
|
3807
|
+
});
|
|
3808
|
+
return merged;
|
|
3809
|
+
});
|
|
3769
3810
|
};
|
|
3770
3811
|
var handleSetListData = function (newTableData, newSpaceTableData) {
|
|
3771
3812
|
var _a, _b, _c, _d, _e;
|
|
@@ -9616,7 +9657,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9616
9657
|
}
|
|
9617
9658
|
: undefined, (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareUpdateMobileView, (_p = props.bareSettings) === null || _p === void 0 ? void 0 : _p.bareBarcodeScanRequest);
|
|
9618
9659
|
};
|
|
9619
|
-
var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName
|
|
9660
|
+
var renderGridAndListData = function (imageTag, type, kanbanGroupId, useColumnName,
|
|
9661
|
+
// INFO: a two-line inbox row — the full field list moves behind the row's
|
|
9662
|
+
// arrow
|
|
9663
|
+
isCompactRow) {
|
|
9620
9664
|
var gridData = [];
|
|
9621
9665
|
var isKanban = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) === "kanban";
|
|
9622
9666
|
var isListEditable = canInlineUpdate;
|
|
@@ -9660,7 +9704,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9660
9704
|
return true;
|
|
9661
9705
|
});
|
|
9662
9706
|
spaceTableData.forEach(function (eachData, index) {
|
|
9663
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
9707
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9664
9708
|
var clonedEachData = JSON.parse(JSON.stringify(eachData));
|
|
9665
9709
|
var allValues = Object.values(clonedEachData);
|
|
9666
9710
|
var title = "";
|
|
@@ -9735,13 +9779,46 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9735
9779
|
description: react_1.default.createElement("div", null, listDescArray.map(function (eachDesc) { return eachDesc; })),
|
|
9736
9780
|
tags: [],
|
|
9737
9781
|
};
|
|
9782
|
+
if (isCompactRow) {
|
|
9783
|
+
var rowFields = (0, listRowFields_1.handlePickListRowFields)(visibleColumns.map(function (eachModel) { return ({
|
|
9784
|
+
key: eachModel.id,
|
|
9785
|
+
type: eachModel.ratingMax ? "rating" : eachModel.type,
|
|
9786
|
+
}); }), titleKey,
|
|
9787
|
+
// INFO: under group sections the grouped column only repeats the
|
|
9788
|
+
// section's header
|
|
9789
|
+
function (key) {
|
|
9790
|
+
return key === imageTag ||
|
|
9791
|
+
(!!groupId && key === groupId && handleCheckGroupSectionTab()) ||
|
|
9792
|
+
(0, exports.handleCheckEmptyCardValue)(eachData[key]);
|
|
9793
|
+
});
|
|
9794
|
+
var handleRenderField_1 = function (key) {
|
|
9795
|
+
var _a;
|
|
9796
|
+
return (0, readModule_1.renderEachRowDataBasedOnDataType)(key, eachData[key], props.bareSettings, true, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.disableEllipsisOnLongWord);
|
|
9797
|
+
};
|
|
9798
|
+
delete data.description;
|
|
9799
|
+
data.compact = {
|
|
9800
|
+
// INFO: a host that formats this date itself keeps its format
|
|
9801
|
+
trailing: !rowFields.dateKey
|
|
9802
|
+
? undefined
|
|
9803
|
+
: ((_c = (_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareListDescription) === null || _c === void 0 ? void 0 : _c.call(_b, rowFields.dateKey, eachData[rowFields.dateKey]))
|
|
9804
|
+
? handleRenderField_1(rowFields.dateKey)
|
|
9805
|
+
: (0, listRowFields_1.handleFormatListRowDate)((_d = selectedTData[rowFields.dateKey]) !== null && _d !== void 0 ? _d : eachData[rowFields.dateKey]),
|
|
9806
|
+
badge: rowFields.badgeKey
|
|
9807
|
+
? handleRenderField_1(rowFields.badgeKey)
|
|
9808
|
+
: undefined,
|
|
9809
|
+
subtitle: rowFields.subtitleKeys.length ? (react_1.default.createElement("span", null, rowFields.subtitleKeys.map(function (key, keyIndex) { return (react_1.default.createElement(react_1.default.Fragment, { key: key },
|
|
9810
|
+
keyIndex > 0 && " · ",
|
|
9811
|
+
handleRenderField_1(key))); }))) : undefined,
|
|
9812
|
+
details: listDescArray.length ? (react_1.default.createElement("div", { className: "text-sm" }, listDescArray)) : undefined,
|
|
9813
|
+
};
|
|
9814
|
+
}
|
|
9738
9815
|
if (type === "grid" || type === "kanban") {
|
|
9739
9816
|
if (kanbanGroupId)
|
|
9740
9817
|
data[kanbanGroupId] = selectedTData[kanbanGroupId];
|
|
9741
|
-
var gridComponent = (
|
|
9818
|
+
var gridComponent = (_f = (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListGridComponent) === null || _f === void 0 ? void 0 : _f.call(_e, eachData, selectedTData);
|
|
9742
9819
|
if (gridComponent)
|
|
9743
9820
|
data[type === "grid" ? "extra" : "action"] = gridComponent;
|
|
9744
|
-
var eachDataTags = (
|
|
9821
|
+
var eachDataTags = (_h = (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListGridTags) === null || _h === void 0 ? void 0 : _h.call(_g, eachData, selectedTData);
|
|
9745
9822
|
if (eachDataTags) {
|
|
9746
9823
|
if (Array.isArray(eachDataTags)) {
|
|
9747
9824
|
var gridTagList_1 = [];
|
|
@@ -9754,11 +9831,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9754
9831
|
data["tags"] = gridTagList_1;
|
|
9755
9832
|
}
|
|
9756
9833
|
}
|
|
9757
|
-
var ribbonText = (
|
|
9834
|
+
var ribbonText = (_k = (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareListGridRibbonText) === null || _k === void 0 ? void 0 : _k.call(_j, eachData, selectedTData);
|
|
9758
9835
|
if (ribbonText)
|
|
9759
9836
|
data["ribbonText"] = ribbonText;
|
|
9760
9837
|
var eachDataGridImage = "";
|
|
9761
|
-
var gridFallbackImg = (
|
|
9838
|
+
var gridFallbackImg = (_m = (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListGridFallbackImg) === null || _m === void 0 ? void 0 : _m.call(_l, eachData, selectedTData);
|
|
9762
9839
|
var cellImageSrc = (0, utils_1.handleGetRenderedImageSrc)(clonedEachData[imageTag]);
|
|
9763
9840
|
if (cellImageSrc) {
|
|
9764
9841
|
eachDataGridImage = cellImageSrc;
|
|
@@ -9794,7 +9871,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9794
9871
|
// group absent from the first page would never appear; those keep the
|
|
9795
9872
|
// global scroll instead. Firebase pages by document cursor, not by count.
|
|
9796
9873
|
var renderCheckGroupPaging = function () {
|
|
9797
|
-
var _a, _b, _c, _d
|
|
9874
|
+
var _a, _b, _c, _d;
|
|
9798
9875
|
var paginationType = renderResolvedPaginationType();
|
|
9799
9876
|
if (paginationType !== "scroll" && paginationType !== "page")
|
|
9800
9877
|
return false;
|
|
@@ -9820,16 +9897,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9820
9897
|
return false;
|
|
9821
9898
|
if (!((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareNewDTW))
|
|
9822
9899
|
return false;
|
|
9823
|
-
// INFO: the table's mobile list draws no bands, so it keeps the normal
|
|
9824
|
-
// pagination; the list and grid tabs draw theirs on a phone too
|
|
9825
|
-
if (((_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListMobileView) && !isSectionedTab)
|
|
9826
|
-
return false;
|
|
9827
9900
|
// INFO: a person column's sections come from the loaded rows — reading
|
|
9828
9901
|
// one band per member would cost a request per member on every load
|
|
9829
9902
|
var groupAttributeDS = structure.find(function (eachDS) { return eachDS.id === groupId; });
|
|
9830
9903
|
return (((groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.type) === "list" ||
|
|
9831
9904
|
(groupAttributeDS === null || groupAttributeDS === void 0 ? void 0 : groupAttributeDS.type) === "boolean") &&
|
|
9832
|
-
!!((
|
|
9905
|
+
!!((_d = (0, groupSections_1.handleGetGroupOptions)(groupAttributeDS)) === null || _d === void 0 ? void 0 : _d.length));
|
|
9833
9906
|
};
|
|
9834
9907
|
// INFO: a list or grid tab draws the table's group sections, unless the
|
|
9835
9908
|
// host replaces it with its own list component
|
|
@@ -9992,7 +10065,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9992
10065
|
// appended itself; the host only ever gets back the columns it declared
|
|
9993
10066
|
var handleReportColumns = function (columns) {
|
|
9994
10067
|
var _a, _b, _c;
|
|
9995
|
-
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onAddColumns) === null || _b === void 0 ? void 0 : _b.call(_a, (0, systemColumns_1.handleStripSystemColumns)(columns, ((_c = props.model) !== null && _c !== void 0 ? _c : []).map(function (each) { return each.id; })));
|
|
10068
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onAddColumns) === null || _b === void 0 ? void 0 : _b.call(_a, (0, lookup_1.handleRestoreLookupColumns)((0, systemColumns_1.handleStripSystemColumns)(columns, ((_c = props.model) !== null && _c !== void 0 ? _c : []).map(function (each) { return each.id; })), rawProps.model));
|
|
9996
10069
|
};
|
|
9997
10070
|
var handleAddPlainColumn = function (column) {
|
|
9998
10071
|
var newColumn = __assign({}, column);
|
|
@@ -10556,7 +10629,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10556
10629
|
};
|
|
10557
10630
|
};
|
|
10558
10631
|
var renderGroupTable = function (multipleSelect) {
|
|
10559
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25;
|
|
10632
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26;
|
|
10560
10633
|
if (groupId && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW)) {
|
|
10561
10634
|
// INFO: sections are keyed off the raw rows, in option order, with
|
|
10562
10635
|
// Unknown and No Value last — the same sections the new table draws
|
|
@@ -10683,7 +10756,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10683
10756
|
else {
|
|
10684
10757
|
// INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
|
|
10685
10758
|
if ((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareNewDTW) {
|
|
10686
|
-
return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, groups: handleBuildNewTableGroups(), onRowActivity: recordActivityAction, onRowEdit: recordEditAction, onRowOpen: recordOpenAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
|
|
10759
|
+
return (react_1.default.createElement(newTable_1.NewTable, { darkModeBg: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.darkModeBg, showId: showId, paginationType: renderResolvedPaginationType(), data: newTableRows, spaceData: newTableSpaceRows !== null && newTableSpaceRows !== void 0 ? newTableSpaceRows : [], referencesOptions: listReferencesOptions, referencesDetails: listReferencesDetails, groups: handleBuildNewTableGroups(), groupColumnKey: groupId || undefined, onRowActivity: recordActivityAction, onRowEdit: recordEditAction, onRowOpen: recordOpenAction, commentCounts: ((_d = props.organise) === null || _d === void 0 ? void 0 : _d.onFetchCommentCounts) ? commentCounts : undefined, onMoveRowToGroup: isDatasheetDefaults && canUpdateRecord && groupId
|
|
10687
10760
|
? handleMoveRowToGroup
|
|
10688
10761
|
: undefined,
|
|
10689
10762
|
// INFO: per-group paging — scroll appends inside a band, page
|
|
@@ -10694,8 +10767,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10694
10767
|
? function (groupKey, page) {
|
|
10695
10768
|
return handleFetchGroupPage(groupKey, page);
|
|
10696
10769
|
}
|
|
10697
|
-
: undefined, groupLoadingStatus: renderCheckGroupPaging() ? groupPageState : undefined, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: ((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.disableSelectFullData) === null || _f === void 0 ? void 0 : _f.table) || isFormulaView, maxSelectedCount: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMaxSelectedCount, mobileView: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListMobileView, mobileTooltip: (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
10698
|
-
!((
|
|
10770
|
+
: undefined, groupLoadingStatus: renderCheckGroupPaging() ? groupPageState : undefined, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: ((_f = (_e = props.organise) === null || _e === void 0 ? void 0 : _e.disableSelectFullData) === null || _f === void 0 ? void 0 : _f.table) || isFormulaView, maxSelectedCount: (_g = props.bareSettings) === null || _g === void 0 ? void 0 : _g.bareListMaxSelectedCount, mobileView: (_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareListMobileView, mobileTooltip: (_j = props.bareSettings) === null || _j === void 0 ? void 0 : _j.bareMobileTooltip, gridLines: (_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareListGridLines, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (canBatchUpdate &&
|
|
10771
|
+
!((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareHideTableExtraMultipleAction)
|
|
10699
10772
|
? [
|
|
10700
10773
|
{
|
|
10701
10774
|
id: "clone",
|
|
@@ -10723,7 +10796,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10723
10796
|
onClick: function () { return setBatchUpdateModal(true); },
|
|
10724
10797
|
},
|
|
10725
10798
|
]
|
|
10726
|
-
: []), true), (((
|
|
10799
|
+
: []), true), (((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListMultipleSelectAddtionalActions)
|
|
10727
10800
|
? props.bareSettings.bareListMultipleSelectAddtionalActions.map(function (eachButton) { return ({
|
|
10728
10801
|
id: "dt-list-multi-action-btn-" + eachButton.text,
|
|
10729
10802
|
btnText: eachButton.text,
|
|
@@ -10732,43 +10805,49 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10732
10805
|
return (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
10733
10806
|
},
|
|
10734
10807
|
}); })
|
|
10735
|
-
: []), true), multiActionFloatingOffset: (
|
|
10808
|
+
: []), true), multiActionFloatingOffset: (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(true), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
|
|
10736
10809
|
var _a, _b;
|
|
10737
10810
|
handleCaptureListScroll(id);
|
|
10738
10811
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
10739
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
10812
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_q = (_p = props.newTabUrl) === null || _p === void 0 ? void 0 : _p.default) !== null && _q !== void 0 ? _q : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_s = (_r = props.newTabUrl) === null || _r === void 0 ? void 0 : _r.addons) !== null && _s !== void 0 ? _s : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
10740
10813
|
handlePagination(value);
|
|
10741
|
-
}, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (
|
|
10814
|
+
}, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.fixedPagination, advSettings: {
|
|
10742
10815
|
// INFO: bareAddColumns routes the + to the name/type popup; without
|
|
10743
10816
|
// it the flag behaves as it always did and opens the formula builder
|
|
10744
|
-
flat: (
|
|
10745
|
-
addColumnEnabled: ((
|
|
10746
|
-
((
|
|
10747
|
-
onAddColumn: ((
|
|
10817
|
+
flat: (_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareFlatTable,
|
|
10818
|
+
addColumnEnabled: ((_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareAddColumns) ||
|
|
10819
|
+
((_w = props.organise) === null || _w === void 0 ? void 0 : _w.addColumnEnabled),
|
|
10820
|
+
onAddColumn: ((_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareAddColumns)
|
|
10748
10821
|
? handleAddPlainColumn
|
|
10749
10822
|
: undefined,
|
|
10750
|
-
onDeleteColumn: ((
|
|
10823
|
+
onDeleteColumn: ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareAddColumns)
|
|
10751
10824
|
? handleDeletePlainColumn
|
|
10752
10825
|
: undefined,
|
|
10753
|
-
onEditColumn: ((
|
|
10826
|
+
onEditColumn: ((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareAddColumns)
|
|
10754
10827
|
? handleEditPlainColumn
|
|
10755
10828
|
: undefined,
|
|
10756
|
-
getColumnSchema: ((
|
|
10829
|
+
getColumnSchema: ((_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareAddColumns)
|
|
10757
10830
|
? function (columnId) {
|
|
10758
|
-
|
|
10831
|
+
var _a, _b;
|
|
10832
|
+
// INFO: the dialog edits a lookup as the lookup it is,
|
|
10833
|
+
// not as the source type it is drawn as
|
|
10834
|
+
return (_b = ((_a = rawProps.model) !== null && _a !== void 0 ? _a : []).find(function (eachColumn) {
|
|
10835
|
+
return eachColumn.id === columnId &&
|
|
10836
|
+
(0, lookup_1.handleIsLookupColumn)(eachColumn);
|
|
10837
|
+
})) !== null && _b !== void 0 ? _b : displayStructure.find(function (eachColumn) { return eachColumn.id === columnId; });
|
|
10759
10838
|
}
|
|
10760
10839
|
: undefined,
|
|
10761
|
-
getSchema: ((
|
|
10840
|
+
getSchema: ((_1 = props.bareSettings) === null || _1 === void 0 ? void 0 : _1.bareAddColumns)
|
|
10762
10841
|
? function () { return structure; }
|
|
10763
10842
|
: undefined,
|
|
10764
|
-
renderAddColumnElements: ((
|
|
10843
|
+
renderAddColumnElements: ((_2 = props.bareSettings) === null || _2 === void 0 ? void 0 : _2.bareAddColumns)
|
|
10765
10844
|
? undefined
|
|
10766
10845
|
: renderAddMathColumn,
|
|
10767
10846
|
// INFO: the popup's reference pickers read from the same providers
|
|
10768
10847
|
// the schema editor uses — without them a reference column would be
|
|
10769
10848
|
// created with no target and resolve nothing
|
|
10770
|
-
renderReferenceSpaceOptions: (
|
|
10771
|
-
renderReferenceLabelOptions: (
|
|
10849
|
+
renderReferenceSpaceOptions: (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.renderReferenceSpaceOptions,
|
|
10850
|
+
renderReferenceLabelOptions: (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.renderReferenceLabelOptions,
|
|
10772
10851
|
dragEnabled: isViewSettingsEnabled,
|
|
10773
10852
|
sortEnabled: isViewSettingsEnabled,
|
|
10774
10853
|
// INFO: per-column header filter is replaced by the flex filters
|
|
@@ -10814,7 +10893,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10814
10893
|
});
|
|
10815
10894
|
}); },
|
|
10816
10895
|
}, onObjectEdit: handleObjectCellEdit, addable: {
|
|
10817
|
-
active: ((
|
|
10896
|
+
active: ((_5 = props.edit) === null || _5 === void 0 ? void 0 : _5.listAddable) ? true : false,
|
|
10818
10897
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10819
10898
|
var createdId;
|
|
10820
10899
|
return __generator(this, function (_a) {
|
|
@@ -10828,16 +10907,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10828
10907
|
}
|
|
10829
10908
|
});
|
|
10830
10909
|
}); },
|
|
10831
|
-
}, darkMode: (
|
|
10910
|
+
}, darkMode: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.darkMode,
|
|
10832
10911
|
// INFO: each band pages itself, so the list-wide pager would only
|
|
10833
10912
|
// page the read that seeded them
|
|
10834
|
-
hidePagination: ((
|
|
10835
|
-
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (
|
|
10913
|
+
hidePagination: ((_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.hidePagination) ||
|
|
10914
|
+
(renderCheckGroupPaging() && !renderCheckScrollMode()), customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.disableEllipsisOnLongWord, pinColumns: (_9 = props.bareSettings) === null || _9 === void 0 ? void 0 : _9.bareListTablePinColumns }));
|
|
10836
10915
|
}
|
|
10837
|
-
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: ((
|
|
10916
|
+
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: ((_11 = (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.disableSelectFullData) === null || _11 === void 0 ? void 0 : _11.table) || isFormulaView, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
10838
10917
|
selectedIds.length > 0 &&
|
|
10839
10918
|
canBatchUpdate &&
|
|
10840
|
-
!((
|
|
10919
|
+
!((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
10841
10920
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
10842
10921
|
handleCloneSelectedData();
|
|
10843
10922
|
} }))),
|
|
@@ -10848,8 +10927,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10848
10927
|
!isFirebase && canBatchUpdate && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
10849
10928
|
setBatchUpdateModal(true);
|
|
10850
10929
|
} })),
|
|
10851
|
-
((
|
|
10852
|
-
((
|
|
10930
|
+
((_13 = props.bareSettings) === null || _13 === void 0 ? void 0 : _13.bareListMultipleSelectAddtionalActions) &&
|
|
10931
|
+
((_15 = (_14 = props.bareSettings) === null || _14 === void 0 ? void 0 : _14.bareListMultipleSelectAddtionalActions) === null || _15 === void 0 ? void 0 : _15.map(function (eachButton) {
|
|
10853
10932
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
10854
10933
|
var _a, _b;
|
|
10855
10934
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
@@ -10858,10 +10937,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10858
10937
|
var _a, _b;
|
|
10859
10938
|
handleCaptureListScroll(id);
|
|
10860
10939
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
10861
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
10940
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_17 = (_16 = props.newTabUrl) === null || _16 === void 0 ? void 0 : _16.default) !== null && _17 !== void 0 ? _17 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_19 = (_18 = props.newTabUrl) === null || _18 === void 0 ? void 0 : _18.addons) !== null && _19 !== void 0 ? _19 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
10862
10941
|
handlePagination(value);
|
|
10863
|
-
}, className: "mt-5", lib: { axios: (
|
|
10864
|
-
addColumnEnabled: (
|
|
10942
|
+
}, className: "mt-5", lib: { axios: (_20 = props.lib) === null || _20 === void 0 ? void 0 : _20.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.fixedPagination, advSettings: {
|
|
10943
|
+
addColumnEnabled: (_22 = props.organise) === null || _22 === void 0 ? void 0 : _22.addColumnEnabled,
|
|
10865
10944
|
renderAddColumnElements: renderAddMathColumn,
|
|
10866
10945
|
dragEnabled: isViewSettingsEnabled,
|
|
10867
10946
|
sortEnabled: isViewSettingsEnabled,
|
|
@@ -10904,7 +10983,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10904
10983
|
});
|
|
10905
10984
|
}); },
|
|
10906
10985
|
}, onObjectEdit: handleObjectCellEdit, addable: {
|
|
10907
|
-
active: ((
|
|
10986
|
+
active: ((_23 = props.edit) === null || _23 === void 0 ? void 0 : _23.listAddable) ? true : false,
|
|
10908
10987
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10909
10988
|
var createdId;
|
|
10910
10989
|
return __generator(this, function (_a) {
|
|
@@ -10918,7 +10997,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
10918
10997
|
}
|
|
10919
10998
|
});
|
|
10920
10999
|
}); },
|
|
10921
|
-
}, darkMode: (
|
|
11000
|
+
}, darkMode: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.darkMode, hidePagination: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.disableEllipsisOnLongWord }));
|
|
10922
11001
|
}
|
|
10923
11002
|
};
|
|
10924
11003
|
// INFO: `hidden` keeps the markers out of space-y spacing
|
|
@@ -11262,7 +11341,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
11262
11341
|
else if (selectedTabData.viewType === "list") {
|
|
11263
11342
|
// INFO: when bareNewDTW is enabled, render NewList instead of legacy List
|
|
11264
11343
|
if ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareNewDTW) {
|
|
11265
|
-
return (react_1.default.createElement(newList_1.NewList, __assign({ darkModeBg: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: ((_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.disableSelectFullData) === null || _w === void 0 ? void 0 : _w.list) || isFormulaView, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
11344
|
+
return (react_1.default.createElement(newList_1.NewList, __assign({ darkModeBg: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.darkModeBg, paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list", undefined, true, true), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: ((_w = (_v = props.organise) === null || _v === void 0 ? void 0 : _v.disableSelectFullData) === null || _w === void 0 ? void 0 : _w.list) || isFormulaView, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_x = props.bareSettings) === null || _x === void 0 ? void 0 : _x.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
11266
11345
|
selectedIds.length > 0 && canBatchUpdate && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
11267
11346
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
11268
11347
|
handleCloneSelectedData();
|