blixify-ui-web 1.0.3 → 1.0.4
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/__tests__/components/data/fixtures.d.ts +2 -2
- package/lib/__tests__/components/data/fixtures.d.ts.map +1 -1
- package/lib/__tests__/components/data/fixtures.js +42 -34
- package/lib/__tests__/components/data/fixtures.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +48 -23
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +7 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/readModule.d.ts.map +1 -1
- package/lib/components/data/readModule.js +25 -4
- package/lib/components/data/readModule.js.map +1 -1
- package/lib/components/data/testSchema.d.ts +1 -0
- package/lib/components/data/testSchema.d.ts.map +1 -1
- package/lib/components/data/testSchema.js +385 -37
- package/lib/components/data/testSchema.js.map +1 -1
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +18 -19
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/data/utils.d.ts.map +1 -1
- package/lib/components/data/utils.js +8 -1
- package/lib/components/data/utils.js.map +1 -1
- package/lib/components/input/uploadInput/index.d.ts +17 -0
- package/lib/components/input/uploadInput/index.d.ts.map +1 -1
- package/lib/components/input/uploadInput/index.js +100 -12
- package/lib/components/input/uploadInput/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataStructure, DevSettings } from
|
|
2
|
-
import { WorkspaceDevSettings } from
|
|
1
|
+
import { DataStructure, DevSettings } from "../../../components/data/dataTemplate/model";
|
|
2
|
+
import { WorkspaceDevSettings } from "../../../components/data/dataTemplate/workspaceModel";
|
|
3
3
|
export declare const COLLECTION_ID = "test-collection";
|
|
4
4
|
export declare const API_BASE = "http://localhost:3000/api/data";
|
|
5
5
|
export declare const mockWorkspace: WorkspaceDevSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/components/data/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/components/data/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACZ,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAE5F,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAGzD,eAAO,MAAM,aAAa,EAAE,oBAM3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAQ7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,aAAa,EAUrC,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAK5B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;CAKjC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;CAE9B,CAAC;AAGF,eAAO,MAAM,OAAO,QAAwC,CAAC;AAC7D,eAAO,MAAM,MAAM,QAAuC,CAAC;AAC3D,eAAO,MAAM,SAAS,QAA0C,CAAC;AACjE,eAAO,MAAM,SAAS,QAA0C,CAAC;AACjE,eAAO,MAAM,SAAS,QAA0C,CAAC;AAEjE,eAAO,MAAM,mBAAmB,WAAY,aAAa,EAAE,0BA0B1D,CAAC"}
|
|
@@ -1,43 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateMockRecords = exports.deleteUrl = exports.updateUrl = exports.createUrl = exports.getUrl = exports.listUrl = exports.mockSingleResponse = exports.mockEmptyListResponse = exports.mockListResponse = exports.mockRecord2 = exports.mockRecord = exports.mockSchema = exports.mockDevSettings = exports.mockWorkspace = exports.API_BASE = exports.COLLECTION_ID = void 0;
|
|
4
|
-
exports.COLLECTION_ID =
|
|
5
|
-
exports.API_BASE =
|
|
4
|
+
exports.COLLECTION_ID = "test-collection";
|
|
5
|
+
exports.API_BASE = "http://localhost:3000/api/data";
|
|
6
6
|
// INFO: no apiEndpointToken = no AES encryption, keeps test payloads readable
|
|
7
7
|
exports.mockWorkspace = {
|
|
8
8
|
apiEndpoint: exports.API_BASE,
|
|
9
|
-
apiEndpointToken:
|
|
10
|
-
apiEndpointType:
|
|
11
|
-
assetEndpoint:
|
|
12
|
-
assetUploadEndpoint:
|
|
9
|
+
apiEndpointToken: "",
|
|
10
|
+
apiEndpointType: "mongoDB",
|
|
11
|
+
assetEndpoint: "http://localhost:3000/api/image",
|
|
12
|
+
assetUploadEndpoint: "http://localhost:3000/api/upload",
|
|
13
13
|
};
|
|
14
14
|
exports.mockDevSettings = {
|
|
15
|
-
server:
|
|
15
|
+
server: "mongoServer",
|
|
16
16
|
dbEndpoint: exports.API_BASE,
|
|
17
|
-
dbAPIToken:
|
|
18
|
-
dbUserToken:
|
|
19
|
-
schemaEndpoint:
|
|
20
|
-
imageEndpoint:
|
|
21
|
-
uploadEndpoint:
|
|
17
|
+
dbAPIToken: "",
|
|
18
|
+
dbUserToken: "",
|
|
19
|
+
schemaEndpoint: "",
|
|
20
|
+
imageEndpoint: "http://localhost:3000/api/image",
|
|
21
|
+
uploadEndpoint: "http://localhost:3000/api/upload",
|
|
22
22
|
};
|
|
23
23
|
exports.mockSchema = [
|
|
24
|
-
{ id:
|
|
25
|
-
{ id:
|
|
26
|
-
{
|
|
27
|
-
|
|
24
|
+
{ id: "name", name: "Name", type: "string" },
|
|
25
|
+
{ id: "email", name: "Email", type: "string" },
|
|
26
|
+
{
|
|
27
|
+
id: "status",
|
|
28
|
+
name: "Status",
|
|
29
|
+
type: "list",
|
|
30
|
+
listSelection: ["Active", "Inactive"],
|
|
31
|
+
},
|
|
32
|
+
{ id: "age", name: "Age", type: "number" },
|
|
28
33
|
];
|
|
29
34
|
exports.mockRecord = {
|
|
30
|
-
_id:
|
|
31
|
-
name:
|
|
32
|
-
email:
|
|
33
|
-
status:
|
|
35
|
+
_id: "1",
|
|
36
|
+
name: "John Doe",
|
|
37
|
+
email: "john@example.com",
|
|
38
|
+
status: "Active",
|
|
34
39
|
age: 30,
|
|
35
40
|
};
|
|
36
41
|
exports.mockRecord2 = {
|
|
37
|
-
_id:
|
|
38
|
-
name:
|
|
39
|
-
email:
|
|
40
|
-
status:
|
|
42
|
+
_id: "2",
|
|
43
|
+
name: "Jane Smith",
|
|
44
|
+
email: "jane@example.com",
|
|
45
|
+
status: "Inactive",
|
|
41
46
|
age: 25,
|
|
42
47
|
};
|
|
43
48
|
exports.mockListResponse = {
|
|
@@ -68,22 +73,23 @@ var generateMockRecords = function (schema, count) {
|
|
|
68
73
|
schema.forEach(function (field) {
|
|
69
74
|
var _a, _b;
|
|
70
75
|
switch (field.type) {
|
|
71
|
-
case
|
|
76
|
+
case "string":
|
|
72
77
|
record[field.id] = "Test ".concat(field.id, " ").concat(i + 1);
|
|
73
78
|
break;
|
|
74
|
-
case
|
|
79
|
+
case "number":
|
|
75
80
|
record[field.id] = i + 1;
|
|
76
81
|
break;
|
|
77
|
-
case
|
|
78
|
-
record[field.id] = (_b = (_a = field.listSelection) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b :
|
|
82
|
+
case "list":
|
|
83
|
+
record[field.id] = (_b = (_a = field.listSelection) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : "Default";
|
|
79
84
|
break;
|
|
80
|
-
case
|
|
85
|
+
case "date":
|
|
81
86
|
record[field.id] = new Date();
|
|
82
87
|
break;
|
|
83
|
-
case
|
|
88
|
+
case "boolean":
|
|
84
89
|
record[field.id] = i % 2 === 0;
|
|
85
90
|
break;
|
|
86
|
-
default:
|
|
91
|
+
default:
|
|
92
|
+
record[field.id] = "Test ".concat(field.id);
|
|
87
93
|
}
|
|
88
94
|
});
|
|
89
95
|
return record;
|
|
@@ -91,9 +97,11 @@ var generateMockRecords = function (schema, count) {
|
|
|
91
97
|
};
|
|
92
98
|
exports.generateMockRecords = generateMockRecords;
|
|
93
99
|
// INFO: fixtures.ts lives in __tests__/ and must contain at least one test to satisfy Jest
|
|
94
|
-
describe(
|
|
95
|
-
test(
|
|
96
|
-
var schema = [
|
|
100
|
+
describe("fixtures", function () {
|
|
101
|
+
test("generateMockRecords produces correct count", function () {
|
|
102
|
+
var schema = [
|
|
103
|
+
{ id: "name", name: "Name", type: "string" },
|
|
104
|
+
];
|
|
97
105
|
var records = (0, exports.generateMockRecords)(schema, 3);
|
|
98
106
|
expect(records).toHaveLength(3);
|
|
99
107
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../../src/__tests__/components/data/fixtures.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../../src/__tests__/components/data/fixtures.ts"],"names":[],"mappings":";;;AAMa,QAAA,aAAa,GAAG,iBAAiB,CAAC;AAClC,QAAA,QAAQ,GAAG,gCAAgC,CAAC;AAEzD,8EAA8E;AACjE,QAAA,aAAa,GAAyB;IACjD,WAAW,EAAE,gBAAQ;IACrB,gBAAgB,EAAE,EAAE;IACpB,eAAe,EAAE,SAAS;IAC1B,aAAa,EAAE,iCAAiC;IAChD,mBAAmB,EAAE,kCAAkC;CACxD,CAAC;AAEW,QAAA,eAAe,GAAgB;IAC1C,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,gBAAQ;IACpB,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,iCAAiC;IA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AAC;oBAC/B,MAAM;gBACR;oBACE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,eAAQ,KAAK,CAAC,EAAE,CAAE,CAAC;YAC1C,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA1BW,QAAA,mBAAmB,uBA0B9B;AAEF,2FAA2F;AAC3F,QAAQ,CAAC,UAAU,EAAE;IACnB,IAAI,CAAC,4CAA4C,EAAE;QACjD,IAAM,MAAM,GAAoB;YAC9B,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC7C,CAAC;QACF,IAAM,OAAO,GAAG,IAAA,2BAAmB,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KASN,MAAM,OAAO,CAAC;AA0Ef,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAu+RvB,CAAC"}
|
|
@@ -95,7 +95,6 @@ var HeroIcons = __importStar(require("@heroicons/react/24/solid"));
|
|
|
95
95
|
var solid_1 = require("@heroicons/react/24/solid");
|
|
96
96
|
var html2canvas_1 = __importDefault(require("html2canvas"));
|
|
97
97
|
var jspdf_1 = __importDefault(require("jspdf"));
|
|
98
|
-
var dayjs_1 = __importDefault(require("../../dayjs"));
|
|
99
98
|
var react_1 = __importStar(require("react"));
|
|
100
99
|
var uuid_1 = require("uuid");
|
|
101
100
|
var button_1 = require("../../action/button");
|
|
@@ -104,6 +103,7 @@ var textButton_1 = require("../../action/textButton");
|
|
|
104
103
|
var toggle_1 = require("../../action/toggle");
|
|
105
104
|
var popUp_1 = require("../../advanced/popUp");
|
|
106
105
|
var ganttChart_1 = require("../../chart/ganttChart");
|
|
106
|
+
var dayjs_1 = __importDefault(require("../../dayjs"));
|
|
107
107
|
var calendar_1 = require("../../display/calendar");
|
|
108
108
|
var detailList_1 = require("../../display/detailList");
|
|
109
109
|
var emptyState_1 = require("../../display/emptyState");
|
|
@@ -926,10 +926,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
926
926
|
query.push({
|
|
927
927
|
type: "><",
|
|
928
928
|
queryId: (_p = selectedTab.calendarSettings) === null || _p === void 0 ? void 0 : _p.startDate,
|
|
929
|
-
value: [
|
|
930
|
-
(0, dayjs_1.default)(startDate).toISOString(),
|
|
931
|
-
(0, dayjs_1.default)(endDate).toISOString(),
|
|
932
|
-
],
|
|
929
|
+
value: [(0, dayjs_1.default)(startDate).toISOString(), (0, dayjs_1.default)(endDate).toISOString()],
|
|
933
930
|
});
|
|
934
931
|
}
|
|
935
932
|
calendarSettings = true;
|
|
@@ -1828,7 +1825,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1828
1825
|
Array.isArray(selectedField["upload"]))) return [3 /*break*/, 3];
|
|
1829
1826
|
uploadedData_1 = [];
|
|
1830
1827
|
return [4 /*yield*/, Promise.all(selectedField["upload"].map(function (eachField) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1831
|
-
var imageCollectionName, imageParentId, originalFileName, fileName, responseData;
|
|
1828
|
+
var imageCollectionName, imageParentId, originalFileName, fileName, responseData, uploaded;
|
|
1832
1829
|
var _a, _b, _c;
|
|
1833
1830
|
return __generator(this, function (_d) {
|
|
1834
1831
|
switch (_d.label) {
|
|
@@ -1859,11 +1856,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1859
1856
|
return [4 /*yield*/, handleUploadAxios(handleUploadEndpoint(eachImage), imageParentId, imageCollectionName, fileName, eachField.fileName, (_c = devSettings.bucketName) !== null && _c !== void 0 ? _c : "")];
|
|
1860
1857
|
case 1:
|
|
1861
1858
|
responseData = _d.sent();
|
|
1862
|
-
if (responseData.data)
|
|
1863
|
-
|
|
1859
|
+
if (responseData.data) {
|
|
1860
|
+
uploaded = {
|
|
1864
1861
|
token: responseData.data.data,
|
|
1865
1862
|
fileName: fileName,
|
|
1866
|
-
}
|
|
1863
|
+
};
|
|
1864
|
+
if (eachField.tags)
|
|
1865
|
+
uploaded.tags = eachField.tags;
|
|
1866
|
+
if (eachField.description)
|
|
1867
|
+
uploaded.description = eachField.description;
|
|
1868
|
+
if (eachField.hidden)
|
|
1869
|
+
uploaded.hidden = eachField.hidden;
|
|
1870
|
+
uploadedData_1.push(uploaded);
|
|
1871
|
+
}
|
|
1867
1872
|
return [2 /*return*/, null];
|
|
1868
1873
|
}
|
|
1869
1874
|
});
|
|
@@ -2492,7 +2497,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2492
2497
|
referenceRQ = new readQuery_1.ReadQuery({
|
|
2493
2498
|
dbModule: dbModule,
|
|
2494
2499
|
dbType: props.devSettings.server,
|
|
2495
|
-
dbCollection: space ? space._id : spaceId !== null && spaceId !== void 0 ? spaceId : "",
|
|
2500
|
+
dbCollection: space ? space._id : (spaceId !== null && spaceId !== void 0 ? spaceId : ""),
|
|
2496
2501
|
dbEndpoint: props.devSettings.dbEndpoint,
|
|
2497
2502
|
dbAPIToken: props.devSettings.dbAPIToken,
|
|
2498
2503
|
dbUserToken: props.devSettings.dbUserToken,
|
|
@@ -2516,11 +2521,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2516
2521
|
if (!existDataIds.includes(data[serverId]))
|
|
2517
2522
|
existDataIds.push(data[serverId]);
|
|
2518
2523
|
if (existsData[(_b = data[(_a = referenceStructure === null || referenceStructure === void 0 ? void 0 : referenceStructure.referenceLabel) !== null && _a !== void 0 ? _a : ""]) !== null && _b !== void 0 ? _b : data[serverId]]) {
|
|
2519
|
-
existsData[(_d = data[(_c = referenceStructure === null || referenceStructure === void 0 ? void 0 : referenceStructure.referenceLabel) !== null && _c !== void 0 ? _c : ""]) !== null && _d !== void 0 ? _d : data[serverId]].push("".concat(space ? space.name : spaceName !== null && spaceName !== void 0 ? spaceName : "", " - ").concat(currentReferenceSelectedList.count));
|
|
2524
|
+
existsData[(_d = data[(_c = referenceStructure === null || referenceStructure === void 0 ? void 0 : referenceStructure.referenceLabel) !== null && _c !== void 0 ? _c : ""]) !== null && _d !== void 0 ? _d : data[serverId]].push("".concat(space ? space.name : (spaceName !== null && spaceName !== void 0 ? spaceName : ""), " - ").concat(currentReferenceSelectedList.count));
|
|
2520
2525
|
}
|
|
2521
2526
|
else {
|
|
2522
2527
|
existsData[(_f = data[(_e = referenceStructure.referenceLabel) !== null && _e !== void 0 ? _e : ""]) !== null && _f !== void 0 ? _f : data[serverId]] = [
|
|
2523
|
-
"".concat(space ? space.name : spaceName !== null && spaceName !== void 0 ? spaceName : "", " - ").concat(currentReferenceSelectedList.count, " row(s)"),
|
|
2528
|
+
"".concat(space ? space.name : (spaceName !== null && spaceName !== void 0 ? spaceName : ""), " - ").concat(currentReferenceSelectedList.count, " row(s)"),
|
|
2524
2529
|
];
|
|
2525
2530
|
}
|
|
2526
2531
|
}
|
|
@@ -3227,7 +3232,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3227
3232
|
if (!((_b = props.bareSettings) === null || _b === void 0 ? void 0 : _b.bareUpdateHandlePreComplete)) return [3 /*break*/, 2];
|
|
3228
3233
|
return [4 /*yield*/, props.bareSettings.bareUpdateHandlePreComplete(selectedData)];
|
|
3229
3234
|
case 1:
|
|
3230
|
-
preComplete =
|
|
3235
|
+
preComplete =
|
|
3236
|
+
_m.sent();
|
|
3231
3237
|
_m.label = 2;
|
|
3232
3238
|
case 2:
|
|
3233
3239
|
if (!preComplete)
|
|
@@ -3481,7 +3487,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3481
3487
|
handleUpdateChangeData(clonedData);
|
|
3482
3488
|
};
|
|
3483
3489
|
var handleOnChangeFiles = function (id, value, action) {
|
|
3484
|
-
var _a
|
|
3490
|
+
var _a, _b;
|
|
3491
|
+
var _c = handleOnChangeData(), data = _c.data, model = _c.model;
|
|
3485
3492
|
var clonedData = (0, updateModule_1.handleClonedDataAttribute)(data, model, props.devSettings.server, false, remainId);
|
|
3486
3493
|
var previousData = clonedData[id] && clonedData[id]["data"] ? clonedData[id]["data"] : [];
|
|
3487
3494
|
var previousUploadData = clonedData[id] && clonedData[id]["upload"]
|
|
@@ -3490,7 +3497,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3490
3497
|
var previousRemoveData = clonedData[id] && clonedData[id]["remove"]
|
|
3491
3498
|
? clonedData[id]["remove"]
|
|
3492
3499
|
: [];
|
|
3493
|
-
if (action === "
|
|
3500
|
+
if (action === "tagEdit") {
|
|
3501
|
+
// INFO: value is the full updated FilesObj from UploadInput with URL-mapped fileNames
|
|
3502
|
+
// Only update tags/description on matching tokens — do not replace data/upload arrays
|
|
3503
|
+
var applyTagUpdates = function (target, source) {
|
|
3504
|
+
return target.map(function (item) {
|
|
3505
|
+
var match = source.find(function (s) { return s.token === item.token; });
|
|
3506
|
+
if (match) {
|
|
3507
|
+
return __assign(__assign({}, item), { tags: match.tags, description: match.description,
|
|
3508
|
+
// INFO: preserve hidden flag set by imageTagToggleMode eye icon
|
|
3509
|
+
hidden: match.hidden });
|
|
3510
|
+
}
|
|
3511
|
+
return item;
|
|
3512
|
+
});
|
|
3513
|
+
};
|
|
3514
|
+
clonedData[id] = __assign(__assign({}, clonedData[id]), { data: applyTagUpdates(previousData, (_a = value.data) !== null && _a !== void 0 ? _a : []), upload: applyTagUpdates(previousUploadData, (_b = value.upload) !== null && _b !== void 0 ? _b : []) });
|
|
3515
|
+
}
|
|
3516
|
+
else if (action === "upload") {
|
|
3494
3517
|
clonedData[id] = __assign(__assign({}, clonedData[id]), { upload: __spreadArray(__spreadArray([], value, true), previousUploadData, true) });
|
|
3495
3518
|
}
|
|
3496
3519
|
else {
|
|
@@ -4912,15 +4935,15 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4912
4935
|
react_1.default.createElement(canvas_1.Canvas, { id: eachCanvas.id, label: eachCanvas.name, texts: eachCanvas.enableDraw || eachCanvas.enableImageUpload
|
|
4913
4936
|
? Array.isArray(clonedSelectedData[eachCanvas.id]) ||
|
|
4914
4937
|
!clonedSelectedData[eachCanvas.id]
|
|
4915
|
-
? (_a = clonedSelectedData[eachCanvas.id]) !== null && _a !== void 0 ? _a : []
|
|
4916
|
-
: (_b = clonedSelectedData[eachCanvas.id].texts) !== null && _b !== void 0 ? _b : []
|
|
4938
|
+
? ((_a = clonedSelectedData[eachCanvas.id]) !== null && _a !== void 0 ? _a : [])
|
|
4939
|
+
: ((_b = clonedSelectedData[eachCanvas.id].texts) !== null && _b !== void 0 ? _b : [])
|
|
4917
4940
|
: Array.isArray(clonedSelectedData[eachCanvas.id])
|
|
4918
4941
|
? clonedSelectedData[eachCanvas.id]
|
|
4919
|
-
: (_d = (_c = clonedSelectedData[eachCanvas.id]) === null || _c === void 0 ? void 0 : _c.texts) !== null && _d !== void 0 ? _d : [], drawings: eachCanvas.enableDraw
|
|
4942
|
+
: ((_d = (_c = clonedSelectedData[eachCanvas.id]) === null || _c === void 0 ? void 0 : _c.texts) !== null && _d !== void 0 ? _d : []), drawings: eachCanvas.enableDraw
|
|
4920
4943
|
? Array.isArray(clonedSelectedData[eachCanvas.id]) ||
|
|
4921
4944
|
!clonedSelectedData[eachCanvas.id]
|
|
4922
4945
|
? []
|
|
4923
|
-
: (_e = clonedSelectedData[eachCanvas.id].drawings) !== null && _e !== void 0 ? _e : []
|
|
4946
|
+
: ((_e = clonedSelectedData[eachCanvas.id].drawings) !== null && _e !== void 0 ? _e : [])
|
|
4924
4947
|
: [], backgroundImageUrl: eachCanvas.enableImageUpload &&
|
|
4925
4948
|
((_g = (_f = clonedSelectedData[eachCanvas.id]) === null || _f === void 0 ? void 0 : _f.backgroundImage) === null || _g === void 0 ? void 0 : _g.token)
|
|
4926
4949
|
? // If backgroundImage has token, construct URL from token and fileName
|
|
@@ -6197,7 +6220,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6197
6220
|
if (tabElement.length > 0 ||
|
|
6198
6221
|
allGanttCharts.length > 0 ||
|
|
6199
6222
|
allCanvas.length > 0) {
|
|
6200
|
-
readElement_1.push(react_1.default.createElement("div", { key: "tab-section-".concat(eachTab), ref: function (el) {
|
|
6223
|
+
readElement_1.push(react_1.default.createElement("div", { key: "tab-section-".concat(eachTab), ref: function (el) {
|
|
6224
|
+
readTabSectionRefs.current[eachTab] = el;
|
|
6225
|
+
} },
|
|
6201
6226
|
hasTabs_1 && (react_1.default.createElement("div", { className: "bg-primary-500 p-4 rounded-lg mt-5" },
|
|
6202
6227
|
react_1.default.createElement("h2", { className: "text-white text-lg font-semibold" }, eachTab))),
|
|
6203
6228
|
tabElement,
|
|
@@ -6520,11 +6545,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
6520
6545
|
color: eachMarkerColor,
|
|
6521
6546
|
data: {
|
|
6522
6547
|
title: mapSettings_1.title
|
|
6523
|
-
? (_e = eachData[mapSettings_1.title]) !== null && _e !== void 0 ? _e : ""
|
|
6548
|
+
? ((_e = eachData[mapSettings_1.title]) !== null && _e !== void 0 ? _e : "")
|
|
6524
6549
|
: "",
|
|
6525
6550
|
address: (_g = (_f = eachData[mapSettings_1.address]) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : "",
|
|
6526
6551
|
group: mapSettings_1.group
|
|
6527
|
-
? (_h = eachData[mapSettings_1.group]) !== null && _h !== void 0 ? _h : ""
|
|
6552
|
+
? ((_h = eachData[mapSettings_1.group]) !== null && _h !== void 0 ? _h : "")
|
|
6528
6553
|
: "",
|
|
6529
6554
|
},
|
|
6530
6555
|
};
|
|
@@ -7137,7 +7162,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7137
7162
|
var _a, _b;
|
|
7138
7163
|
return (react_1.default.createElement(activityModal_1.ActivityModal, { title: props.title && typeof props.title === "string"
|
|
7139
7164
|
? props.title
|
|
7140
|
-
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: props.type === "read" ? (_a = props.id) !== null && _a !== void 0 ? _a : "" : activityId, activityLog: (_b = props.edit) === null || _b === void 0 ? void 0 : _b.activityLog }));
|
|
7165
|
+
: "this collection", devSettings: props.devSettings, collectionId: props.collectionId, dataId: props.type === "read" ? ((_a = props.id) !== null && _a !== void 0 ? _a : "") : activityId, activityLog: (_b = props.edit) === null || _b === void 0 ? void 0 : _b.activityLog }));
|
|
7141
7166
|
}, maxWidth: "4xl", onClose: function () {
|
|
7142
7167
|
setActivityModal(false);
|
|
7143
7168
|
setActivityId("");
|