@protobase/ui 0.19.7 → 0.19.8
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/dist/live/model-helpers.js +7 -3
- package/dist/package.js +1 -1
- package/dist/shell/assets/{app-BRVJlz_E.js → app-D8i5r_6U.js} +43 -43
- package/dist/shell/assets/{index-CafsxSWx.js → index-cMmFPuUQ.js} +1 -1
- package/dist/shell/assets/{maplibre-Cb7ks8SG.js → maplibre-9XYrB9k6.js} +1 -1
- package/dist/shell/assets/{record-map-dXyPrmGg.js → record-map-OBtKCiUB.js} +1 -1
- package/dist/shell/assets/{records-map-bGH18FRn.js → records-map-C4oMPL5C.js} +1 -1
- package/dist/shell/assets/{shared-protobase-ui-e-G14mxb.js → shared-protobase-ui-CN1HmyDa.js} +1 -1
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +1 -1
- package/package.json +4 -4
|
@@ -20,10 +20,14 @@ const recordTitle = (model, view, record, fallback) => {
|
|
|
20
20
|
if (value === null || value === void 0) return fallback;
|
|
21
21
|
return model.fields[name]?.type === "enum" ? enumLabel(String(value), view?.fields[name]?.valueLabels) : String(value);
|
|
22
22
|
};
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const keyPart = (model, record, name) => {
|
|
24
|
+
const value = record[name];
|
|
25
|
+
return model.fields[name]?.type === "relation" && typeof value === "object" && value !== null && "id" in value ? value.id : value;
|
|
26
|
+
};
|
|
27
|
+
const recordId = (model, record) => model.primaryKey.map((name) => String(keyPart(model, record, name))).join(",");
|
|
28
|
+
/** The key as the URL carries it, for `get` and `update`, from a stored record or a list row. */
|
|
25
29
|
const recordKey = (model, record) => {
|
|
26
|
-
const parts = model.primaryKey.map((name) => record
|
|
30
|
+
const parts = model.primaryKey.map((name) => keyPart(model, record, name));
|
|
27
31
|
return parts.length === 1 ? parts[0] : parts;
|
|
28
32
|
};
|
|
29
33
|
//#endregion
|
package/dist/package.js
CHANGED