blixify-ui-web 1.2.102 → 1.2.103
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 +28 -0
- package/lib/components/data/blobModule.d.ts.map +1 -1
- package/lib/components/data/blobModule.js +148 -2
- package/lib/components/data/blobModule.js.map +1 -1
- package/lib/components/data/dataTemplate/index.js +2 -2
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +2 -2
- package/lib/components/data/dataTemplate/socket.js +1 -1
- package/lib/components/data/dataTemplate/socket.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +17 -0
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/readModule.d.ts.map +1 -1
- package/lib/components/data/readModule.js +23 -21
- package/lib/components/data/readModule.js.map +1 -1
- package/package.json +1 -1
- package/lib/__tests__/components/data/fixtures.d.ts +0 -55
- package/lib/__tests__/components/data/fixtures.d.ts.map +0 -1
- package/lib/__tests__/components/data/fixtures.js +0 -109
- package/lib/__tests__/components/data/fixtures.js.map +0 -1
- package/lib/components/data/dataWrapper/dataWrapper.fixtures.d.ts +0 -9
- package/lib/components/data/dataWrapper/dataWrapper.fixtures.d.ts.map +0 -1
- package/lib/components/data/dataWrapper/dataWrapper.fixtures.js +0 -33
- package/lib/components/data/dataWrapper/dataWrapper.fixtures.js.map +0 -1
- package/lib/components/data/testData.d.ts +0 -29
- package/lib/components/data/testData.d.ts.map +0 -1
- package/lib/components/data/testData.js +0 -32
- package/lib/components/data/testData.js.map +0 -1
- package/lib/components/data/testSchema.d.ts +0 -47
- package/lib/components/data/testSchema.d.ts.map +0 -1
- package/lib/components/data/testSchema.js +0 -5008
- package/lib/components/data/testSchema.js.map +0 -1
|
@@ -1,4 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export declare const handleDownloadFile: (fileUrl: string, fileName: string) => Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* INFO: encodes ONLY the characters that break a storage url — "#" starts a
|
|
5
|
+
* fragment and cuts the name off, "?" starts the query early, and a "%" that is
|
|
6
|
+
* not already an escape makes the path undecodable. Everything else is left
|
|
7
|
+
* byte-for-byte as it was. Browsers already encode spaces and unicode on the
|
|
8
|
+
* wire, so a full encodeURIComponent would fix nothing extra — but it WOULD
|
|
9
|
+
* change the returned string for names that work today, and readModule splits
|
|
10
|
+
* that string back into the saved download name: "Site Plan.pdf" would start
|
|
11
|
+
* downloading as "Site%20Plan.pdf". An existing escape such as %20 or %2F is
|
|
12
|
+
* left alone, so an already-encoded stored name is never double-encoded.
|
|
13
|
+
*/
|
|
14
|
+
export declare const handleEncodeStoredName: (name: string) => string;
|
|
2
15
|
export declare const renderImageUrlFromPath: (pImageEndpoint: any, pImageCollection: any, pImageParentId: any, pImageFileName: any, pToken: any, bucketName?: string) => string;
|
|
3
16
|
export declare const handleDataURLtoBlob: (dataUrl: string) => "" | Blob;
|
|
17
|
+
/**
|
|
18
|
+
* INFO: a multiple-asset entry is stored as <uuid><name> or <uuid>-<name> so
|
|
19
|
+
* entries in one field never collide. The uuid is storage bookkeeping — the
|
|
20
|
+
* name after it is the document the user chose, and that is what belongs on
|
|
21
|
+
* screen.
|
|
22
|
+
*/
|
|
23
|
+
export declare const handleStripStoredPrefix: (fileName: string) => string;
|
|
24
|
+
export declare const handleCanPreviewFile: (fileName: string) => boolean;
|
|
25
|
+
export declare const renderFileChip: (params: {
|
|
26
|
+
label: string;
|
|
27
|
+
fileName: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
index?: number;
|
|
30
|
+
onClick: () => void;
|
|
31
|
+
}) => React.JSX.Element;
|
|
4
32
|
//# sourceMappingURL=blobModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobModule.d.ts","sourceRoot":"","sources":["../../../src/components/data/blobModule.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blobModule.d.ts","sourceRoot":"","sources":["../../../src/components/data/blobModule.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,eAAO,MAAM,kBAAkB,YAAmB,MAAM,YAAY,MAAM,kBAgBzE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,SAAU,MAAM,WAIzB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,mBACjB,GAAG,oBACD,GAAG,kBACL,GAAG,kBACH,GAAG,UACX,GAAG,eACE,MAAM,WA8BpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,YAAa,MAAM,cAalD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,aAAc,MAAM,WAoBvD,CAAC;AA0BF,eAAO,MAAM,oBAAoB,aAAc,MAAM,YAKpD,CAAC;AAyFF,eAAO,MAAM,cAAc,WAAY;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,sBASA,CAAC"}
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -39,7 +62,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
62
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
63
|
};
|
|
41
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.handleDataURLtoBlob = exports.renderImageUrlFromPath = exports.handleDownloadFile = void 0;
|
|
65
|
+
exports.renderFileChip = exports.handleCanPreviewFile = exports.handleStripStoredPrefix = exports.handleDataURLtoBlob = exports.renderImageUrlFromPath = exports.handleEncodeStoredName = exports.handleDownloadFile = void 0;
|
|
66
|
+
var solid_1 = require("@heroicons/react/20/solid");
|
|
67
|
+
var button_1 = require("../action/button");
|
|
68
|
+
var modal_1 = require("../display/modal");
|
|
69
|
+
var react_1 = __importStar(require("react"));
|
|
43
70
|
var axios_1 = __importDefault(require("axios"));
|
|
44
71
|
//=====================================================================================
|
|
45
72
|
//SECTION: Blob/Storage Functions
|
|
@@ -74,11 +101,29 @@ var handleDownloadFile = function (fileUrl, fileName) { return __awaiter(void 0,
|
|
|
74
101
|
});
|
|
75
102
|
}); };
|
|
76
103
|
exports.handleDownloadFile = handleDownloadFile;
|
|
104
|
+
/**
|
|
105
|
+
* INFO: encodes ONLY the characters that break a storage url — "#" starts a
|
|
106
|
+
* fragment and cuts the name off, "?" starts the query early, and a "%" that is
|
|
107
|
+
* not already an escape makes the path undecodable. Everything else is left
|
|
108
|
+
* byte-for-byte as it was. Browsers already encode spaces and unicode on the
|
|
109
|
+
* wire, so a full encodeURIComponent would fix nothing extra — but it WOULD
|
|
110
|
+
* change the returned string for names that work today, and readModule splits
|
|
111
|
+
* that string back into the saved download name: "Site Plan.pdf" would start
|
|
112
|
+
* downloading as "Site%20Plan.pdf". An existing escape such as %20 or %2F is
|
|
113
|
+
* left alone, so an already-encoded stored name is never double-encoded.
|
|
114
|
+
*/
|
|
115
|
+
var handleEncodeStoredName = function (name) {
|
|
116
|
+
return String(name)
|
|
117
|
+
.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")
|
|
118
|
+
.replace(/#/g, "%23")
|
|
119
|
+
.replace(/\?/g, "%3F");
|
|
120
|
+
};
|
|
121
|
+
exports.handleEncodeStoredName = handleEncodeStoredName;
|
|
77
122
|
var renderImageUrlFromPath = function (pImageEndpoint, pImageCollection, pImageParentId, pImageFileName, pToken, bucketName) {
|
|
78
123
|
var imageEndpoint = pImageEndpoint !== null && pImageEndpoint !== void 0 ? pImageEndpoint : "";
|
|
79
124
|
var imageCollection = pImageCollection !== null && pImageCollection !== void 0 ? pImageCollection : "";
|
|
80
125
|
var imageParentId = pImageParentId !== null && pImageParentId !== void 0 ? pImageParentId : "";
|
|
81
|
-
var imageFileName = pImageFileName !== null && pImageFileName !== void 0 ? pImageFileName : "";
|
|
126
|
+
var imageFileName = (0, exports.handleEncodeStoredName)(pImageFileName !== null && pImageFileName !== void 0 ? pImageFileName : "");
|
|
82
127
|
var url = imageEndpoint +
|
|
83
128
|
imageCollection +
|
|
84
129
|
"%2F" +
|
|
@@ -120,4 +165,105 @@ var handleDataURLtoBlob = function (dataUrl) {
|
|
|
120
165
|
return "";
|
|
121
166
|
};
|
|
122
167
|
exports.handleDataURLtoBlob = handleDataURLtoBlob;
|
|
168
|
+
/**
|
|
169
|
+
* INFO: a multiple-asset entry is stored as <uuid><name> or <uuid>-<name> so
|
|
170
|
+
* entries in one field never collide. The uuid is storage bookkeeping — the
|
|
171
|
+
* name after it is the document the user chose, and that is what belongs on
|
|
172
|
+
* screen.
|
|
173
|
+
*/
|
|
174
|
+
var handleStripStoredPrefix = function (fileName) {
|
|
175
|
+
var _a, _b;
|
|
176
|
+
// INFO: a stored entry may be a full url rather than a bare name — the same
|
|
177
|
+
// basename-then-query trim the upload path uses when it reads a name back
|
|
178
|
+
// off one. Do this FIRST, or the uuid check never matches a url.
|
|
179
|
+
var basename = (_b = (_a = fileName.split("/").pop()) === null || _a === void 0 ? void 0 : _a.split("?")[0]) !== null && _b !== void 0 ? _b : fileName;
|
|
180
|
+
var unprefixed = basename.replace(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-?/i, "");
|
|
181
|
+
var name = unprefixed || basename || fileName;
|
|
182
|
+
// INFO: a stored name can hold a literal % that is not an escape —
|
|
183
|
+
// "Q3 50% target.pdf". decodeURIComponent throws URIError on it, and this
|
|
184
|
+
// runs while React renders the chip, outside readModule's per-field
|
|
185
|
+
// try/catch and with no error boundary in the library, so one such file
|
|
186
|
+
// would blank the whole read view. Show the raw name rather than crash.
|
|
187
|
+
try {
|
|
188
|
+
return decodeURIComponent(name);
|
|
189
|
+
}
|
|
190
|
+
catch (err) {
|
|
191
|
+
return name;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
exports.handleStripStoredPrefix = handleStripStoredPrefix;
|
|
195
|
+
/**
|
|
196
|
+
* INFO: the browser renders these inline in an iframe. Anything else — docx,
|
|
197
|
+
* xlsx, zip — either downloads itself or shows a blank pane, so those skip the
|
|
198
|
+
* modal and download directly, which is what the chip did before previewing
|
|
199
|
+
* existed. Erring toward download is the safe side: a download the user did
|
|
200
|
+
* not need costs a click, a blank modal costs their trust in the button.
|
|
201
|
+
*/
|
|
202
|
+
var PREVIEWABLE_EXTENSIONS = [
|
|
203
|
+
"pdf",
|
|
204
|
+
"png",
|
|
205
|
+
"jpg",
|
|
206
|
+
"jpeg",
|
|
207
|
+
"gif",
|
|
208
|
+
"webp",
|
|
209
|
+
"svg",
|
|
210
|
+
"avif",
|
|
211
|
+
"bmp",
|
|
212
|
+
"txt",
|
|
213
|
+
"mp4",
|
|
214
|
+
"webm",
|
|
215
|
+
"ogg",
|
|
216
|
+
"mov",
|
|
217
|
+
];
|
|
218
|
+
var handleCanPreviewFile = function (fileName) {
|
|
219
|
+
var name = (0, exports.handleStripStoredPrefix)(fileName).toLowerCase();
|
|
220
|
+
var dot = name.lastIndexOf(".");
|
|
221
|
+
if (dot <= 0 || dot === name.length - 1)
|
|
222
|
+
return false;
|
|
223
|
+
return PREVIEWABLE_EXTENSIONS.includes(name.slice(dot + 1));
|
|
224
|
+
};
|
|
225
|
+
exports.handleCanPreviewFile = handleCanPreviewFile;
|
|
226
|
+
/**
|
|
227
|
+
* INFO: the chip owns its own preview state because readModule is a set of
|
|
228
|
+
* functions, not a component — there is no parent to hold one modal for all
|
|
229
|
+
* chips. Per-chip state costs nothing here: only one can be open at a time
|
|
230
|
+
* because opening it takes a click.
|
|
231
|
+
*/
|
|
232
|
+
var FileChip = function (props) {
|
|
233
|
+
// 1. State
|
|
234
|
+
var _a = (0, react_1.useState)(false), preview = _a[0], setPreview = _a[1];
|
|
235
|
+
// 3. Computed
|
|
236
|
+
var stripped = (0, exports.handleStripStoredPrefix)(props.fileName);
|
|
237
|
+
// INFO: a single field holds ONE document, so the field's label names it
|
|
238
|
+
// best — the stored name there is fixed schema config, not the user's choice.
|
|
239
|
+
// A multiple field holds several DIFFERENT documents, so each entry's own
|
|
240
|
+
// name is what tells them apart; "Scans 1" and "Scans 2" would not.
|
|
241
|
+
var text = props.index === undefined
|
|
242
|
+
? props.label || stripped
|
|
243
|
+
: stripped || "".concat(props.label, " ").concat(props.index + 1);
|
|
244
|
+
var canPreview = !!props.url && (0, exports.handleCanPreviewFile)(props.fileName);
|
|
245
|
+
// 5. handle functions
|
|
246
|
+
var handleClick = function () {
|
|
247
|
+
if (canPreview)
|
|
248
|
+
setPreview(true);
|
|
249
|
+
else
|
|
250
|
+
props.onDownload();
|
|
251
|
+
};
|
|
252
|
+
// 6. render functions
|
|
253
|
+
var renderPreview = function () { return (react_1.default.createElement("div", { className: "flex flex-col" },
|
|
254
|
+
react_1.default.createElement("iframe", { src: props.url, className: "h-[70vh] w-full rounded-md border-0", title: stripped }),
|
|
255
|
+
react_1.default.createElement("div", { className: "mt-4 flex flex-row justify-end" },
|
|
256
|
+
react_1.default.createElement(button_1.Button, { text: "Download", size: "small", type: "normal", onClick: props.onDownload })))); };
|
|
257
|
+
// 7. return
|
|
258
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
259
|
+
react_1.default.createElement("div", { onClick: handleClick, title: props.fileName, className: "inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-gray-200 bg-gray-50 px-3 py-1.5 text-xs transition-colors hover:bg-gray-100" },
|
|
260
|
+
react_1.default.createElement(solid_1.DocumentIcon, { className: "h-4 w-4 shrink-0 text-gray-500" }),
|
|
261
|
+
react_1.default.createElement("span", { className: "max-w-60 truncate" }, text)),
|
|
262
|
+
react_1.default.createElement(modal_1.Modal, { open: preview, maxWidth: "5xl", title: stripped, renderContent: renderPreview, onClose: function () { return setPreview(false); } })));
|
|
263
|
+
};
|
|
264
|
+
var renderFileChip = function (params) {
|
|
265
|
+
var _a;
|
|
266
|
+
return (react_1.default.createElement(FileChip, { key: "".concat(params.fileName, "-").concat((_a = params.index) !== null && _a !== void 0 ? _a : 0), label: params.label, fileName: params.fileName, url: params.url, index: params.index, onDownload: params.onClick }));
|
|
267
|
+
};
|
|
268
|
+
exports.renderFileChip = renderFileChip;
|
|
123
269
|
//# sourceMappingURL=blobModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobModule.js","sourceRoot":"","sources":["../../../src/components/data/blobModule.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blobModule.js","sourceRoot":"","sources":["../../../src/components/data/blobModule.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAyD;AACzD,2CAA0C;AAC1C,0CAAyC;AACzC,6CAAwC;AACxC,gDAA0B;AAE1B,uFAAuF;AACvF,iCAAiC;AACjC,uFAAuF;AAChF,IAAM,kBAAkB,GAAG,UAAO,OAAe,EAAE,QAAgB;;;;;;gBAE1D,qBAAM,eAAK,CAAC,GAAG,CAAC,OAAO,EAAE;wBACnC,YAAY,EAAE,MAAM;qBACrB,CAAC,EAAA;;gBAFI,GAAG,GAAG,SAEV;gBACI,SAAS,GAAG,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC1C,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;gBACjD,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;gBAC9B,YAAY,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBACjC,YAAY,CAAC,MAAM,GAAG,QAAQ,CAAC;gBAC/B,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;gBACpC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;gBACxC,YAAY,CAAC,KAAK,EAAE,CAAC;gBACrB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;gBACxC,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;;;;;;;;KAElC,CAAC;AAhBW,QAAA,kBAAkB,sBAgB7B;AAEF;;;;;;;;;;GAUG;AACI,IAAM,sBAAsB,GAAG,UAAC,IAAY;IACjD,OAAA,MAAM,CAAC,IAAI,CA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IACP,GAAG,EAAE,UAAG,MAAM,CAAC,QAAQ,cAAI,MAAA,MAAM,CAAC,KAAK,mCAAI,CAAC,CAAE,EAC9C,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,GAAG,EAAE,MAAM,CAAC,GAAG,EACf,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,UAAU,EAAE,MAAM,CAAC,OAAO,GAC1B,CACH,CAAA;CAAA,CAAC;AAfW,QAAA,cAAc,kBAezB"}
|
|
@@ -1101,7 +1101,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1101
1101
|
/* eslint-enable */
|
|
1102
1102
|
// INFO: Pub/Sub → SSE live-stream — driven by bareSettings.bareSocketName
|
|
1103
1103
|
// EventSource URL: {sseEndpoint}/{room}?bm_apiToken={token}
|
|
1104
|
-
// Mirrors
|
|
1104
|
+
// Mirrors the server-side event emitter (pages/api/events.ts) pattern on the client.
|
|
1105
1105
|
(0, react_1.useEffect)(function () {
|
|
1106
1106
|
var _a;
|
|
1107
1107
|
var room = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareSocketName;
|
|
@@ -1698,7 +1698,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
1698
1698
|
if (!((refResp === null || refResp === void 0 ? void 0 : refResp.data) && Array.isArray(refResp.data))) return [3 /*break*/, 3];
|
|
1699
1699
|
return [4 /*yield*/, indexedDb_1.indexedDb.putValue("local", {
|
|
1700
1700
|
// INFO: key format matches what handleRetrieveSelectedData reads:
|
|
1701
|
-
// eachModel.referenceSpaceId + "-ref" (e.g. "
|
|
1701
|
+
// eachModel.referenceSpaceId + "-ref" (e.g. "work-cycles-ref")
|
|
1702
1702
|
type: "".concat(ref.collectionId, "-ref"),
|
|
1703
1703
|
data: refResp.data,
|
|
1704
1704
|
})];
|