@jskit-ai/http-web 0.1.94 → 0.1.96
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/http-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.96",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"./client/support/contractGuards": "./src/client/support/contractGuards.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
47
|
+
"@jskit-ai/resource-crud-core": "0.1.190",
|
|
48
48
|
"@mdi/js": "^7.4.47"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
52
|
-
"@jskit-ai/kernel": "0.1.
|
|
53
|
-
"@jskit-ai/realtime": "0.1.
|
|
54
|
-
"@jskit-ai/shell-web": "0.1.
|
|
51
|
+
"@jskit-ai/http-runtime": "0.1.246",
|
|
52
|
+
"@jskit-ai/kernel": "0.1.248",
|
|
53
|
+
"@jskit-ai/realtime": "0.1.248",
|
|
54
|
+
"@jskit-ai/shell-web": "0.1.255",
|
|
55
55
|
"@tanstack/vue-query": "^5.90.5",
|
|
56
56
|
"vue": "^3.5.13",
|
|
57
57
|
"vue-router": "^5.0.4",
|
|
@@ -2,6 +2,10 @@ import { computed, unref } from "vue";
|
|
|
2
2
|
import { useRoute } from "vue-router";
|
|
3
3
|
import { resolveCrudJsonApiTransport } from "../crud/crudJsonApiTransportSupport.js";
|
|
4
4
|
import { resolveCrudHttpClient } from "../crud/crudHttpClientSupport.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveLookupFieldDisplayValue,
|
|
7
|
+
resolveRecordTitle
|
|
8
|
+
} from "../crud/crudLookupFieldLabelSupport.js";
|
|
5
9
|
import { resolveCrudBoundValues } from "../crud/crudBindingSupport.js";
|
|
6
10
|
import { resolveCrudListParentDescriptor } from "../internal/crudListParentTitleSupport.js";
|
|
7
11
|
import {
|
|
@@ -89,6 +93,8 @@ function useCrudList({
|
|
|
89
93
|
}
|
|
90
94
|
});
|
|
91
95
|
|
|
96
|
+
records.resolveFieldDisplay = resolveLookupFieldDisplayValue;
|
|
97
|
+
records.resolveRecordTitle = resolveRecordTitle;
|
|
92
98
|
return records;
|
|
93
99
|
}
|
|
94
100
|
|
|
@@ -4,6 +4,10 @@ import {
|
|
|
4
4
|
resolveCrudJsonApiTransport
|
|
5
5
|
} from "../crud/crudJsonApiTransportSupport.js";
|
|
6
6
|
import { resolveCrudHttpClient } from "../crud/crudHttpClientSupport.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveLookupFieldDisplayValue,
|
|
9
|
+
resolveRecordTitle
|
|
10
|
+
} from "../crud/crudLookupFieldLabelSupport.js";
|
|
7
11
|
import { resolveCrudBoundValues } from "../crud/crudBindingSupport.js";
|
|
8
12
|
import { asPlainObject } from "../support/scopeHelpers.js";
|
|
9
13
|
import { useView } from "./useView.js";
|
|
@@ -35,6 +39,8 @@ function useCrudView({
|
|
|
35
39
|
}),
|
|
36
40
|
routeParams: boundRouteParams
|
|
37
41
|
});
|
|
42
|
+
view.resolveFieldDisplay = resolveLookupFieldDisplayValue;
|
|
43
|
+
view.resolveRecordTitle = resolveRecordTitle;
|
|
38
44
|
return view;
|
|
39
45
|
}
|
|
40
46
|
|
|
@@ -40,6 +40,8 @@ test("list screen link availability is the list runtime's single answer", async
|
|
|
40
40
|
assert.equal(linked.hasViewUrl, true);
|
|
41
41
|
assert.equal(linked.hasEditUrl, true);
|
|
42
42
|
assert.equal(Object.hasOwn(linked.records, "actionColumnCount"), false);
|
|
43
|
-
|
|
43
|
+
// Application templates read field and title display from the list runtime.
|
|
44
|
+
assert.equal(linked.records.resolveFieldDisplay({ title: "Dune" }, "title"), "Dune");
|
|
45
|
+
assert.equal(linked.records.resolveRecordTitle({}, { fallbackKey: "title", defaultValue: "Book" }), "Book");
|
|
44
46
|
assert.equal(linked.resolveRecordTitle({ name: "Dune" }), "Dune");
|
|
45
47
|
});
|