@jskit-ai/crud-ui-generator 0.1.73 → 0.1.74
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.descriptor.mjs +2 -2
- package/package.json +4 -4
- package/templates/src/pages/admin/ui-generator/EditElement.vue +1 -0
- package/templates/src/pages/admin/ui-generator/EditWrapperElement.vue +1 -0
- package/templates/src/pages/admin/ui-generator/ListElement.vue +1 -0
- package/templates/src/pages/admin/ui-generator/ViewElement.vue +1 -0
- package/test/buildTemplateContext.test.js +4 -0
package/package.descriptor.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { GENERATED_UI_NAVIGATION_ROLE_OPTION } from "@jskit-ai/kernel/shared/sup
|
|
|
3
3
|
export default Object.freeze({
|
|
4
4
|
packageVersion: 1,
|
|
5
5
|
packageId: "@jskit-ai/crud-ui-generator",
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.74",
|
|
7
7
|
kind: "generator",
|
|
8
8
|
description: "Generate CRUD route trees from resource validators at an explicit route root relative to src/pages/.",
|
|
9
9
|
options: {
|
|
@@ -175,7 +175,7 @@ export default Object.freeze({
|
|
|
175
175
|
mutations: {
|
|
176
176
|
dependencies: {
|
|
177
177
|
runtime: {
|
|
178
|
-
"@jskit-ai/users-web": "0.1.
|
|
178
|
+
"@jskit-ai/users-web": "0.1.106"
|
|
179
179
|
},
|
|
180
180
|
dev: {}
|
|
181
181
|
},
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/crud-ui-generator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.74",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@jskit-ai/crud-core": "0.1.
|
|
10
|
-
"@jskit-ai/kernel": "0.1.
|
|
11
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
9
|
+
"@jskit-ai/crud-core": "0.1.99",
|
|
10
|
+
"@jskit-ai/kernel": "0.1.91",
|
|
11
|
+
"@jskit-ai/resource-crud-core": "0.1.36"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
"./server/buildTemplateContext": "./src/server/buildTemplateContext.js"
|
|
@@ -71,6 +71,7 @@ const screen = useCrudAddEditScreen({
|
|
|
71
71
|
],
|
|
72
72
|
placementSource: "ui-generator.__JSKIT_UI_RESOURCE_NAMESPACE__.edit",
|
|
73
73
|
writeMethod: "PATCH",
|
|
74
|
+
requestRecoveryLabel: "__JSKIT_UI_RESOURCE_SINGULAR_TITLE__",
|
|
74
75
|
fallbackLoadError: "Unable to load record.",
|
|
75
76
|
fallbackSaveError: "Unable to save record.",
|
|
76
77
|
recordIdParam: UI_RECORD_ID_PARAM,
|
|
@@ -60,6 +60,7 @@ const screen = useCrudAddEditScreen({
|
|
|
60
60
|
],
|
|
61
61
|
placementSource: "ui-generator.__JSKIT_UI_RESOURCE_NAMESPACE__.edit",
|
|
62
62
|
writeMethod: "PATCH",
|
|
63
|
+
requestRecoveryLabel: "__JSKIT_UI_RESOURCE_SINGULAR_TITLE__",
|
|
63
64
|
fallbackLoadError: "Unable to load record.",
|
|
64
65
|
fallbackSaveError: "Unable to save record.",
|
|
65
66
|
recordIdParam: UI_RECORD_ID_PARAM,
|
|
@@ -61,6 +61,7 @@ const screen = useCrudListScreen({
|
|
|
61
61
|
listFilters,
|
|
62
62
|
listBulkActions,
|
|
63
63
|
routeQueryBlacklist: UI_ROUTE_QUERY_BLACKLIST,
|
|
64
|
+
requestRecoveryLabel: "__JSKIT_UI_RESOURCE_PLURAL_TITLE__",
|
|
64
65
|
fallbackLoadError: "Unable to load records."
|
|
65
66
|
});
|
|
66
67
|
const listRuntime = screen.records;
|
|
@@ -36,6 +36,7 @@ const screen = useCrudViewScreen({
|
|
|
36
36
|
listUrlTemplate: UI_LIST_URL,
|
|
37
37
|
editUrlTemplate: UI_EDIT_URL,
|
|
38
38
|
recordChangedEvent: UI_RECORD_CHANGED_EVENT,
|
|
39
|
+
requestRecoveryLabel: "__JSKIT_UI_RESOURCE_SINGULAR_TITLE__",
|
|
39
40
|
fallbackLoadError: "Unable to load record.",
|
|
40
41
|
notFoundMessage: "Record not found."
|
|
41
42
|
});
|
|
@@ -969,6 +969,7 @@ test("crud ui templates derive JSON:API transport from the shared CRUD resource"
|
|
|
969
969
|
assert.match(listTemplateSource, /const screen = useCrudListScreen\(\{/);
|
|
970
970
|
assert.match(listTemplateSource, /listFilters,/);
|
|
971
971
|
assert.match(listTemplateSource, /listBulkActions,/);
|
|
972
|
+
assert.match(listTemplateSource, /requestRecoveryLabel: "__JSKIT_UI_RESOURCE_PLURAL_TITLE__"/);
|
|
972
973
|
assert.match(listTemplateSource, /#card-fields="__JSKIT_UI_LIST_CARD_SLOT_PROPS__"/);
|
|
973
974
|
assert.match(listTemplateSource, /#table-header/);
|
|
974
975
|
assert.match(listTemplateSource, /#table-row="__JSKIT_UI_LIST_ROW_SLOT_PROPS__"/);
|
|
@@ -992,6 +993,7 @@ test("crud ui templates derive JSON:API transport from the shared CRUD resource"
|
|
|
992
993
|
assert.match(viewTemplateSource, /import CrudViewScreen from "@jskit-ai\/users-web\/client\/components\/CrudViewScreen"/);
|
|
993
994
|
assert.match(viewTemplateSource, /import \{ useCrudViewScreen \} from "@jskit-ai\/users-web\/client\/composables\/useCrudViewScreen"/);
|
|
994
995
|
assert.match(viewTemplateSource, /const screen = useCrudViewScreen\(\{/);
|
|
996
|
+
assert.match(viewTemplateSource, /requestRecoveryLabel: "__JSKIT_UI_RESOURCE_SINGULAR_TITLE__"/);
|
|
995
997
|
assert.match(viewTemplateSource, /#fields="\{ view \}"/);
|
|
996
998
|
assert.doesNotMatch(viewTemplateSource, /<v-card\b|View and manage this/);
|
|
997
999
|
assert.doesNotMatch(viewTemplateSource, /const UI_VIEW_TRANSPORT = Object\.freeze\(\{/);
|
|
@@ -1011,6 +1013,7 @@ test("crud ui templates derive JSON:API transport from the shared CRUD resource"
|
|
|
1011
1013
|
assert.match(editTemplateSource, /import \{ useCrudAddEditScreen \} from "@jskit-ai\/users-web\/client\/composables\/useCrudAddEditScreen"/);
|
|
1012
1014
|
assert.match(editTemplateSource, /const screen = useCrudAddEditScreen\(\{/);
|
|
1013
1015
|
assert.match(editTemplateSource, /preserveCancelQuery: true/);
|
|
1016
|
+
assert.match(editTemplateSource, /requestRecoveryLabel: "__JSKIT_UI_RESOURCE_SINGULAR_TITLE__"/);
|
|
1014
1017
|
assert.match(editTemplateSource, /#fields=/);
|
|
1015
1018
|
assert.doesNotMatch(editTemplateSource, /<v-card\b|<v-card-title/);
|
|
1016
1019
|
assert.doesNotMatch(editTemplateSource, /const UI_EDIT_TRANSPORT = Object\.freeze\(\{/);
|
|
@@ -1032,6 +1035,7 @@ test("crud ui templates derive JSON:API transport from the shared CRUD resource"
|
|
|
1032
1035
|
assert.match(editWrapperTemplateSource, /import \{ useCrudAddEditScreen \} from "@jskit-ai\/users-web\/client\/composables\/useCrudAddEditScreen"/);
|
|
1033
1036
|
assert.match(editWrapperTemplateSource, /:screen="screen"/);
|
|
1034
1037
|
assert.match(editWrapperTemplateSource, /preserveCancelQuery: true/);
|
|
1038
|
+
assert.match(editWrapperTemplateSource, /requestRecoveryLabel: "__JSKIT_UI_RESOURCE_SINGULAR_TITLE__"/);
|
|
1035
1039
|
assert.doesNotMatch(editWrapperTemplateSource, /<v-card\b/);
|
|
1036
1040
|
assert.doesNotMatch(editWrapperTemplateSource, /const UI_EDIT_TRANSPORT = Object\.freeze\(\{/);
|
|
1037
1041
|
assert.doesNotMatch(editWrapperTemplateSource, /transport:\s*UI_EDIT_TRANSPORT,/);
|