@jskit-ai/users-web 0.1.166 → 0.1.170
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 +489 -10
- package/src/client/components/CrudDeleteAction.vue +93 -0
- package/src/client/components/CrudListScreen.vue +1 -1
- package/src/client/composables/crud/crudJsonApiTransportSupport.js +1 -1
- package/src/client/composables/support/resourceLoadStateHelpers.js +8 -29
- package/src/client/composables/useScopeRuntime.js +2 -2
- package/src/client/index.js +1 -0
- package/test/crudJsonApiTransportSupport.test.js +1 -1
- package/test/crudListDateFilterSurface.browser.test.js +12 -103
- package/test/crudScreenComponents.test.js +10 -1
- package/test/exportsContract.test.js +1 -1
- package/test/{packageDescriptorOwnership.test.js → packageMetadataOwnership.test.js} +4 -2
- package/test/settingsPlacementContract.test.js +10 -8
- package/package.descriptor.mjs +0 -468
- package/src/client/composables/usePaths.js +0 -120
- package/src/client/composables/useSurfaceRouteContext.js +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/users-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.170",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"./client": "./src/client/index.js",
|
|
10
10
|
"./client/components/AccountSettingsClientElement": "./src/client/components/AccountSettingsClientElement.vue",
|
|
11
11
|
"./client/components/CrudAddEditScreen": "./src/client/components/CrudAddEditScreen.vue",
|
|
12
|
+
"./client/components/CrudDeleteAction": "./src/client/components/CrudDeleteAction.vue",
|
|
12
13
|
"./client/components/CrudListBulkActionSurface": "./src/client/components/CrudListBulkActionSurface.vue",
|
|
13
14
|
"./client/components/CrudListFilterSurface": "./src/client/components/CrudListFilterSurface.vue",
|
|
14
15
|
"./client/components/CrudListScreen": "./src/client/components/CrudListScreen.vue",
|
|
@@ -35,30 +36,508 @@
|
|
|
35
36
|
"./client/crudHttpClient": "./src/client/composables/crud/crudHttpClientSupport.js",
|
|
36
37
|
"./client/composables/useCrudListParentTitle": "./src/client/composables/useCrudListParentTitle.js",
|
|
37
38
|
"./client/composables/useRealtimeQueryInvalidation": "./src/client/composables/useRealtimeQueryInvalidation.js",
|
|
38
|
-
"./client/composables/useSurfaceRouteContext": "./src/client/composables/useSurfaceRouteContext.js",
|
|
39
39
|
"./client/composables/useView": "./src/client/composables/records/useView.js",
|
|
40
40
|
"./client/composables/useCrudView": "./src/client/composables/records/useCrudView.js",
|
|
41
41
|
"./client/composables/useCrudViewScreen": "./src/client/composables/useCrudViewScreen.js",
|
|
42
42
|
"./client/composables/usePagedCollection": "./src/client/composables/usePagedCollection.js",
|
|
43
|
-
"./client/composables/usePaths": "./src/client/composables/usePaths.js",
|
|
44
43
|
"./client/composables/runtime/useUiFeedback": "./src/client/composables/runtime/useUiFeedback.js",
|
|
45
44
|
"./client/lib/httpClient": "./src/client/lib/httpClient.js",
|
|
46
45
|
"./client/lib/permissions": "./src/client/lib/permissions.js",
|
|
47
46
|
"./client/support/contractGuards": "./src/client/support/contractGuards.js"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@
|
|
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.
|
|
55
|
-
"@jskit-ai/uploads-image-web": "0.1.
|
|
56
|
-
"@jskit-ai/users-core": "0.1.
|
|
49
|
+
"@jskit-ai/auth-web": "0.1.152",
|
|
50
|
+
"@jskit-ai/http-runtime": "0.1.150",
|
|
51
|
+
"@jskit-ai/kernel": "0.1.152",
|
|
52
|
+
"@jskit-ai/realtime": "0.1.149",
|
|
53
|
+
"@jskit-ai/shell-web": "0.1.156",
|
|
54
|
+
"@jskit-ai/uploads-image-web": "0.1.127",
|
|
55
|
+
"@jskit-ai/users-core": "0.1.165",
|
|
56
|
+
"@mdi/js": "^7.4.47"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@tanstack/vue-query": "^5.90.5",
|
|
60
60
|
"vue": "^3.5.13",
|
|
61
61
|
"vue-router": "^5.0.4",
|
|
62
62
|
"vuetify": "^4.0.0"
|
|
63
|
+
},
|
|
64
|
+
"description": "Users web module: account/profile UI plus shared users web widgets.",
|
|
65
|
+
"jskit": {
|
|
66
|
+
"kind": "runtime",
|
|
67
|
+
"capabilities": {
|
|
68
|
+
"provides": [
|
|
69
|
+
"users.web"
|
|
70
|
+
],
|
|
71
|
+
"requires": [
|
|
72
|
+
"runtime.web-placement",
|
|
73
|
+
"users.server-routes"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"runtime": {
|
|
77
|
+
"server": {
|
|
78
|
+
"providers": []
|
|
79
|
+
},
|
|
80
|
+
"client": {
|
|
81
|
+
"providers": [
|
|
82
|
+
{
|
|
83
|
+
"entrypoint": "src/client/providers/UsersWebClientProvider.js",
|
|
84
|
+
"export": "UsersWebClientProvider"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"metadata": {
|
|
90
|
+
"apiSummary": {
|
|
91
|
+
"surfaces": [
|
|
92
|
+
{
|
|
93
|
+
"subpath": "./client",
|
|
94
|
+
"summary": "Exports users-web client provider registration surface."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"subpath": "./client/providers/UsersWebClientProvider",
|
|
98
|
+
"summary": "Exports users-web client provider class."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"subpath": "./client/components/AccountSettingsClientElement",
|
|
102
|
+
"summary": "Exports the package-owned account settings host that renders placement-backed account sections."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"subpath": "./client/components/CrudAddEditScreen",
|
|
106
|
+
"summary": "Exports the package-owned CRUD add/edit screen shell used by generated form pages."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"subpath": "./client/components/CrudDeleteAction",
|
|
110
|
+
"summary": "Exports the standard generated CRUD delete action and confirmation dialog."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"subpath": "./client/components/CrudListBulkActionSurface",
|
|
114
|
+
"summary": "Exports the adaptive CRUD list bulk-action surface for generated list pages."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"subpath": "./client/components/CrudListFilterSurface",
|
|
118
|
+
"summary": "Exports the adaptive CRUD list filter surface for generated list pages."
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"subpath": "./client/components/CrudListScreen",
|
|
122
|
+
"summary": "Exports the package-owned CRUD list screen shell used by generated list pages."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"subpath": "./client/components/CrudViewScreen",
|
|
126
|
+
"summary": "Exports the package-owned CRUD view screen shell used by generated detail pages."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"subpath": "./client/bulkActions",
|
|
130
|
+
"summary": "Exports client-side CRUD list bulk-action definition helpers."
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"subpath": "./client/filters",
|
|
134
|
+
"summary": "Exports client-side CRUD list filter definition helpers."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"subpath": "./client/rowActions",
|
|
138
|
+
"summary": "Exports client-side CRUD list row-action definition helpers."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"subpath": "./client/components/ProfileClientElement",
|
|
142
|
+
"summary": "Exports profile settings client element scaffold component."
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"subpath": "./client/composables/useAddEdit",
|
|
146
|
+
"summary": "Exports add/edit operation composable."
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"subpath": "./client/composables/useList",
|
|
150
|
+
"summary": "Exports list operation composable."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"subpath": "./client/composables/crudLookupFieldRuntime",
|
|
154
|
+
"summary": "Exports CRUD lookup field runtime helpers for generated add/edit forms."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"subpath": "./client/composables/useCommand",
|
|
158
|
+
"summary": "Exports command operation composable."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"subpath": "./client/composables/useEndpointResource",
|
|
162
|
+
"summary": "Exports low-level endpoint resource composable for custom client requests."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"subpath": "./client/composables/useCrudListFilterLookups",
|
|
166
|
+
"summary": "Exports lookup-backed CRUD list filter helper for remote autocomplete filters."
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"subpath": "./client/composables/useCrudAddEditScreen",
|
|
170
|
+
"summary": "Exports the package-owned add/edit screen runtime for generated form pages."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"subpath": "./client/composables/useCrudListBulkActions",
|
|
174
|
+
"summary": "Exports selected-record state and execution runtime for generated CRUD list bulk actions."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"subpath": "./client/composables/useCrudListRowActions",
|
|
178
|
+
"summary": "Exports per-record action state and execution runtime for generated CRUD list row actions."
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"subpath": "./client/composables/useCrudListScreen",
|
|
182
|
+
"summary": "Exports the package-owned list screen runtime for generated list pages."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"subpath": "./client/composables/useView",
|
|
186
|
+
"summary": "Exports read/view operation composable."
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"subpath": "./client/composables/useCrudViewScreen",
|
|
190
|
+
"summary": "Exports the package-owned view screen runtime for generated detail pages."
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"subpath": "./client/composables/usePagedCollection",
|
|
194
|
+
"summary": "Exports paged collection query composable."
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"subpath": "./client/lib/httpClient",
|
|
198
|
+
"summary": "Exports the shared users-web HTTP client with credentials and CSRF behavior."
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"subpath": "./client/account-settings/sections",
|
|
202
|
+
"summary": "Exports placement-backed account settings section helpers."
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"containerTokens": {
|
|
206
|
+
"server": [],
|
|
207
|
+
"client": [
|
|
208
|
+
"users.web.home.tools.widget",
|
|
209
|
+
"users.web.profile.element"
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"ui": {
|
|
214
|
+
"placements": {
|
|
215
|
+
"outlets": [
|
|
216
|
+
{
|
|
217
|
+
"target": "home-cog:primary-menu",
|
|
218
|
+
"surfaces": [
|
|
219
|
+
"home"
|
|
220
|
+
],
|
|
221
|
+
"source": "src/client/components/UsersHomeToolsWidget.vue"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"target": "account-settings:sections",
|
|
225
|
+
"surfaces": [
|
|
226
|
+
"account"
|
|
227
|
+
],
|
|
228
|
+
"source": "src/client/components/AccountSettingsClientElement.vue"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"topology": {
|
|
232
|
+
"placements": [
|
|
233
|
+
{
|
|
234
|
+
"id": "home.tools-menu",
|
|
235
|
+
"description": "Home surface tools menu actions.",
|
|
236
|
+
"surfaces": [
|
|
237
|
+
"home"
|
|
238
|
+
],
|
|
239
|
+
"variants": {
|
|
240
|
+
"compact": {
|
|
241
|
+
"outlet": "home-cog:primary-menu",
|
|
242
|
+
"renderers": {
|
|
243
|
+
"link": "local.main.ui.surface-aware-menu-link-item"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"medium": {
|
|
247
|
+
"outlet": "home-cog:primary-menu",
|
|
248
|
+
"renderers": {
|
|
249
|
+
"link": "local.main.ui.surface-aware-menu-link-item"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"expanded": {
|
|
253
|
+
"outlet": "home-cog:primary-menu",
|
|
254
|
+
"renderers": {
|
|
255
|
+
"link": "local.main.ui.surface-aware-menu-link-item"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "settings.sections",
|
|
262
|
+
"owner": "account-settings",
|
|
263
|
+
"description": "Account settings content sections.",
|
|
264
|
+
"surfaces": [
|
|
265
|
+
"account"
|
|
266
|
+
],
|
|
267
|
+
"variants": {
|
|
268
|
+
"compact": {
|
|
269
|
+
"outlet": "account-settings:sections"
|
|
270
|
+
},
|
|
271
|
+
"medium": {
|
|
272
|
+
"outlet": "account-settings:sections"
|
|
273
|
+
},
|
|
274
|
+
"expanded": {
|
|
275
|
+
"outlet": "account-settings:sections"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"contributions": [
|
|
282
|
+
{
|
|
283
|
+
"id": "users.profile.menu.settings",
|
|
284
|
+
"target": "auth.profile-menu",
|
|
285
|
+
"kind": "link",
|
|
286
|
+
"surfaces": [
|
|
287
|
+
"*"
|
|
288
|
+
],
|
|
289
|
+
"order": 500,
|
|
290
|
+
"when": "auth.authenticated === true",
|
|
291
|
+
"source": "mutations.text#users-web-profile-settings-placement"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"id": "users.home.tools.widget",
|
|
295
|
+
"target": "shell.status",
|
|
296
|
+
"kind": "component",
|
|
297
|
+
"surfaces": [
|
|
298
|
+
"home"
|
|
299
|
+
],
|
|
300
|
+
"order": 900,
|
|
301
|
+
"componentToken": "users.web.home.tools.widget",
|
|
302
|
+
"when": "auth.authenticated === true",
|
|
303
|
+
"source": "mutations.text#users-web-home-tools-placement"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"id": "users.home.menu.settings",
|
|
307
|
+
"target": "home.tools-menu",
|
|
308
|
+
"kind": "link",
|
|
309
|
+
"surfaces": [
|
|
310
|
+
"home"
|
|
311
|
+
],
|
|
312
|
+
"order": 100,
|
|
313
|
+
"when": "auth.authenticated === true",
|
|
314
|
+
"source": "mutations.text#users-web-home-tools-placement"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"id": "users.account.settings.profile",
|
|
318
|
+
"target": "settings.sections",
|
|
319
|
+
"owner": "account-settings",
|
|
320
|
+
"kind": "component",
|
|
321
|
+
"surfaces": [
|
|
322
|
+
"account"
|
|
323
|
+
],
|
|
324
|
+
"order": 100,
|
|
325
|
+
"componentToken": "local.main.account-settings.section.profile",
|
|
326
|
+
"source": "mutations.text#users-web-account-settings-sections-placement"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"id": "users.account.settings.preferences",
|
|
330
|
+
"target": "settings.sections",
|
|
331
|
+
"owner": "account-settings",
|
|
332
|
+
"kind": "component",
|
|
333
|
+
"surfaces": [
|
|
334
|
+
"account"
|
|
335
|
+
],
|
|
336
|
+
"order": 200,
|
|
337
|
+
"componentToken": "local.main.account-settings.section.preferences",
|
|
338
|
+
"source": "mutations.text#users-web-account-settings-sections-placement"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "users.account.settings.notifications",
|
|
342
|
+
"target": "settings.sections",
|
|
343
|
+
"owner": "account-settings",
|
|
344
|
+
"kind": "component",
|
|
345
|
+
"surfaces": [
|
|
346
|
+
"account"
|
|
347
|
+
],
|
|
348
|
+
"order": 300,
|
|
349
|
+
"componentToken": "local.main.account-settings.section.notifications",
|
|
350
|
+
"source": "mutations.text#users-web-account-settings-sections-placement"
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"mutations": {
|
|
357
|
+
"dependencies": {
|
|
358
|
+
"runtime": {
|
|
359
|
+
"@mdi/js": "^7.4.47",
|
|
360
|
+
"@jskit-ai/http-runtime": "0.1.150",
|
|
361
|
+
"@jskit-ai/realtime": "0.1.149",
|
|
362
|
+
"@jskit-ai/kernel": "0.1.152",
|
|
363
|
+
"@jskit-ai/shell-web": "0.1.156",
|
|
364
|
+
"@jskit-ai/uploads-image-web": "0.1.127",
|
|
365
|
+
"@jskit-ai/users-core": "0.1.165"
|
|
366
|
+
},
|
|
367
|
+
"dev": {}
|
|
368
|
+
},
|
|
369
|
+
"packageJson": {
|
|
370
|
+
"scripts": {
|
|
371
|
+
"server:account": "SERVER_SURFACE=account node ./bin/server.js",
|
|
372
|
+
"dev:account": "VITE_SURFACE=account vite",
|
|
373
|
+
"build:account": "VITE_SURFACE=account vite build"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"procfile": {},
|
|
377
|
+
"files": [
|
|
378
|
+
{
|
|
379
|
+
"from": "templates/src/pages/account/index.vue",
|
|
380
|
+
"to": "src/pages/account/index.vue",
|
|
381
|
+
"ownership": "app",
|
|
382
|
+
"reason": "Install app-owned account surface root page scaffold.",
|
|
383
|
+
"category": "users-web",
|
|
384
|
+
"id": "users-web-page-account-root"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"from": "templates/src/components/account/settings/AccountSettingsProfileSection.vue",
|
|
388
|
+
"to": "src/components/account/settings/AccountSettingsProfileSection.vue",
|
|
389
|
+
"ownership": "app",
|
|
390
|
+
"reason": "Install app-owned account settings profile section scaffold.",
|
|
391
|
+
"category": "users-web",
|
|
392
|
+
"id": "users-web-component-account-settings-profile"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"from": "templates/src/components/account/settings/AccountSettingsPreferencesSection.vue",
|
|
396
|
+
"to": "src/components/account/settings/AccountSettingsPreferencesSection.vue",
|
|
397
|
+
"ownership": "app",
|
|
398
|
+
"reason": "Install app-owned account settings preferences section scaffold.",
|
|
399
|
+
"category": "users-web",
|
|
400
|
+
"id": "users-web-component-account-settings-preferences"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"from": "templates/src/components/account/settings/AccountSettingsNotificationsSection.vue",
|
|
404
|
+
"to": "src/components/account/settings/AccountSettingsNotificationsSection.vue",
|
|
405
|
+
"ownership": "app",
|
|
406
|
+
"reason": "Install app-owned account settings notifications section scaffold.",
|
|
407
|
+
"category": "users-web",
|
|
408
|
+
"id": "users-web-component-account-settings-notifications"
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"text": [
|
|
412
|
+
{
|
|
413
|
+
"op": "append-text",
|
|
414
|
+
"file": "config/public.js",
|
|
415
|
+
"position": "bottom",
|
|
416
|
+
"skipIfContains": "config.surfaceDefinitions.account = {",
|
|
417
|
+
"value": "\nconfig.surfaceDefinitions.account = {\n id: \"account\",\n label: \"Account\",\n pagesRoot: \"account\",\n enabled: true,\n requiresAuth: true,\n requiresWorkspace: false,\n origin: \"\"\n};\n",
|
|
418
|
+
"reason": "Register account surface definition in public surface config.",
|
|
419
|
+
"category": "users-web",
|
|
420
|
+
"id": "users-web-surface-config-account"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"op": "append-text",
|
|
424
|
+
"file": "src/placement.js",
|
|
425
|
+
"position": "bottom",
|
|
426
|
+
"skipIfContains": "id: \"users.profile.menu.settings\"",
|
|
427
|
+
"value": "\naddPlacement({\n id: \"users.profile.menu.settings\",\n target: \"auth.profile-menu\",\n kind: \"link\",\n surfaces: [\"*\"],\n order: 500,\n props: {\n label: \"Settings\",\n to: \"/account\"\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n",
|
|
428
|
+
"reason": "Append users-web profile settings menu placement into app-owned placement registry.",
|
|
429
|
+
"category": "users-web",
|
|
430
|
+
"id": "users-web-profile-settings-placement"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"op": "append-text",
|
|
434
|
+
"file": "src/placement.js",
|
|
435
|
+
"position": "bottom",
|
|
436
|
+
"skipIfContains": "id: \"users.home.tools.widget\"",
|
|
437
|
+
"value": "\naddPlacement({\n id: \"users.home.tools.widget\",\n target: \"shell.status\",\n kind: \"component\",\n surfaces: [\"home\"],\n order: 900,\n componentToken: \"users.web.home.tools.widget\",\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"users.home.menu.settings\",\n target: \"home.tools-menu\",\n kind: \"link\",\n surfaces: [\"home\"],\n order: 100,\n props: {\n label: \"Settings\",\n surface: \"home\",\n scopedSuffix: \"/settings\",\n unscopedSuffix: \"/settings\"\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n",
|
|
438
|
+
"reason": "Append users-web home tools widget and settings menu placements into app-owned placement registry.",
|
|
439
|
+
"category": "users-web",
|
|
440
|
+
"id": "users-web-home-tools-placement"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"op": "append-text",
|
|
444
|
+
"file": "src/placementTopology.js",
|
|
445
|
+
"position": "bottom",
|
|
446
|
+
"skipIfContains": "id: \"home.tools-menu\"",
|
|
447
|
+
"value": "\naddPlacementTopology({\n id: \"home.tools-menu\",\n description: \"Home surface tools menu actions.\",\n surfaces: [\"home\"],\n variants: {\n compact: {\n outlet: \"home-cog:primary-menu\",\n renderers: {\n link: \"local.main.ui.surface-aware-menu-link-item\"\n }\n },\n medium: {\n outlet: \"home-cog:primary-menu\",\n renderers: {\n link: \"local.main.ui.surface-aware-menu-link-item\"\n }\n },\n expanded: {\n outlet: \"home-cog:primary-menu\",\n renderers: {\n link: \"local.main.ui.surface-aware-menu-link-item\"\n }\n }\n }\n});\n",
|
|
448
|
+
"reason": "Append users-web home tools semantic topology into app-owned placement topology.",
|
|
449
|
+
"category": "users-web",
|
|
450
|
+
"id": "users-web-home-tools-topology"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"op": "append-text",
|
|
454
|
+
"file": "src/placement.js",
|
|
455
|
+
"position": "bottom",
|
|
456
|
+
"skipIfContains": "id: \"users.account.settings.profile\"",
|
|
457
|
+
"value": "\naddPlacement({\n id: \"users.account.settings.profile\",\n target: \"settings.sections\",\n owner: \"account-settings\",\n kind: \"component\",\n surfaces: [\"account\"],\n order: 100,\n componentToken: \"local.main.account-settings.section.profile\",\n props: {\n title: \"Profile\",\n value: \"profile\",\n usesSharedRuntime: true\n }\n});\n\naddPlacement({\n id: \"users.account.settings.preferences\",\n target: \"settings.sections\",\n owner: \"account-settings\",\n kind: \"component\",\n surfaces: [\"account\"],\n order: 200,\n componentToken: \"local.main.account-settings.section.preferences\",\n props: {\n title: \"Preferences\",\n value: \"preferences\",\n usesSharedRuntime: true\n }\n});\n\naddPlacement({\n id: \"users.account.settings.notifications\",\n target: \"settings.sections\",\n owner: \"account-settings\",\n kind: \"component\",\n surfaces: [\"account\"],\n order: 300,\n componentToken: \"local.main.account-settings.section.notifications\",\n props: {\n title: \"Notifications\",\n value: \"notifications\",\n usesSharedRuntime: true\n }\n});\n",
|
|
458
|
+
"reason": "Append users-web account settings section placements into the app-owned placement registry.",
|
|
459
|
+
"category": "users-web",
|
|
460
|
+
"id": "users-web-account-settings-sections-placement"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"op": "append-text",
|
|
464
|
+
"file": "src/placementTopology.js",
|
|
465
|
+
"position": "bottom",
|
|
466
|
+
"skipIfContains": "id: \"settings.sections\"",
|
|
467
|
+
"value": "\naddPlacementTopology({\n id: \"settings.sections\",\n owner: \"account-settings\",\n description: \"Account settings content sections.\",\n surfaces: [\"account\"],\n variants: {\n compact: {\n outlet: \"account-settings:sections\"\n },\n medium: {\n outlet: \"account-settings:sections\"\n },\n expanded: {\n outlet: \"account-settings:sections\"\n }\n }\n});\n",
|
|
468
|
+
"reason": "Append users-web account settings semantic topology into app-owned placement topology.",
|
|
469
|
+
"category": "users-web",
|
|
470
|
+
"id": "users-web-account-settings-topology"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"source": [
|
|
474
|
+
{
|
|
475
|
+
"op": "ensure-import",
|
|
476
|
+
"file": "packages/main/src/client/providers/MainClientProvider.js",
|
|
477
|
+
"defaultImport": "AccountSettingsProfileSection",
|
|
478
|
+
"from": "/src/components/account/settings/AccountSettingsProfileSection.vue",
|
|
479
|
+
"reason": "Bind the app-owned account profile settings section into local main client provider imports.",
|
|
480
|
+
"category": "users-web",
|
|
481
|
+
"id": "users-web-main-client-provider-account-settings-profile-import"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"op": "ensure-import",
|
|
485
|
+
"file": "packages/main/src/client/providers/MainClientProvider.js",
|
|
486
|
+
"defaultImport": "AccountSettingsPreferencesSection",
|
|
487
|
+
"from": "/src/components/account/settings/AccountSettingsPreferencesSection.vue",
|
|
488
|
+
"reason": "Bind the app-owned account preferences settings section into local main client provider imports.",
|
|
489
|
+
"category": "users-web",
|
|
490
|
+
"id": "users-web-main-client-provider-account-settings-preferences-import"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"op": "ensure-import",
|
|
494
|
+
"file": "packages/main/src/client/providers/MainClientProvider.js",
|
|
495
|
+
"defaultImport": "AccountSettingsNotificationsSection",
|
|
496
|
+
"from": "/src/components/account/settings/AccountSettingsNotificationsSection.vue",
|
|
497
|
+
"reason": "Bind the app-owned account notifications settings section into local main client provider imports.",
|
|
498
|
+
"category": "users-web",
|
|
499
|
+
"id": "users-web-main-client-provider-account-settings-notifications-import"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"op": "ensure-call",
|
|
503
|
+
"file": "packages/main/src/client/providers/MainClientProvider.js",
|
|
504
|
+
"callee": "registerMainClientComponent",
|
|
505
|
+
"args": [
|
|
506
|
+
"\"local.main.account-settings.section.profile\"",
|
|
507
|
+
"() => AccountSettingsProfileSection"
|
|
508
|
+
],
|
|
509
|
+
"beforeClass": "MainClientProvider",
|
|
510
|
+
"reason": "Bind the app-owned account profile settings section token into local main client provider registry.",
|
|
511
|
+
"category": "users-web",
|
|
512
|
+
"id": "users-web-main-client-provider-account-settings-profile-register"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"op": "ensure-call",
|
|
516
|
+
"file": "packages/main/src/client/providers/MainClientProvider.js",
|
|
517
|
+
"callee": "registerMainClientComponent",
|
|
518
|
+
"args": [
|
|
519
|
+
"\"local.main.account-settings.section.preferences\"",
|
|
520
|
+
"() => AccountSettingsPreferencesSection"
|
|
521
|
+
],
|
|
522
|
+
"beforeClass": "MainClientProvider",
|
|
523
|
+
"reason": "Bind the app-owned account preferences settings section token into local main client provider registry.",
|
|
524
|
+
"category": "users-web",
|
|
525
|
+
"id": "users-web-main-client-provider-account-settings-preferences-register"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"op": "ensure-call",
|
|
529
|
+
"file": "packages/main/src/client/providers/MainClientProvider.js",
|
|
530
|
+
"callee": "registerMainClientComponent",
|
|
531
|
+
"args": [
|
|
532
|
+
"\"local.main.account-settings.section.notifications\"",
|
|
533
|
+
"() => AccountSettingsNotificationsSection"
|
|
534
|
+
],
|
|
535
|
+
"beforeClass": "MainClientProvider",
|
|
536
|
+
"reason": "Bind the app-owned account notifications settings section token into local main client provider registry.",
|
|
537
|
+
"category": "users-web",
|
|
538
|
+
"id": "users-web-main-client-provider-account-settings-notifications-register"
|
|
539
|
+
}
|
|
540
|
+
]
|
|
541
|
+
}
|
|
63
542
|
}
|
|
64
543
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useId } from "vue";
|
|
3
|
+
import { mdiDeleteOutline } from "@mdi/js";
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
action: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
resourceSingularTitle: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "Record"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const resourceLabel = computed(() =>
|
|
17
|
+
String(props.resourceSingularTitle || "Record").trim() || "Record"
|
|
18
|
+
);
|
|
19
|
+
const componentId = useId();
|
|
20
|
+
const titleId = `${componentId}-delete-title`;
|
|
21
|
+
const descriptionId = `${componentId}-delete-description`;
|
|
22
|
+
|
|
23
|
+
function closeDialog() {
|
|
24
|
+
props.action.cancel();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function handleDialogModelUpdate(isOpen) {
|
|
28
|
+
if (!isOpen) {
|
|
29
|
+
closeDialog();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<v-btn
|
|
36
|
+
color="error"
|
|
37
|
+
variant="tonal"
|
|
38
|
+
:prepend-icon="mdiDeleteOutline"
|
|
39
|
+
min-height="48"
|
|
40
|
+
:disabled="!action.canDelete"
|
|
41
|
+
@click="action.request"
|
|
42
|
+
>
|
|
43
|
+
Delete {{ resourceLabel }}
|
|
44
|
+
</v-btn>
|
|
45
|
+
|
|
46
|
+
<v-dialog
|
|
47
|
+
:model-value="action.isOpen"
|
|
48
|
+
max-width="32rem"
|
|
49
|
+
role="alertdialog"
|
|
50
|
+
aria-modal="true"
|
|
51
|
+
:aria-labelledby="titleId"
|
|
52
|
+
:aria-describedby="descriptionId"
|
|
53
|
+
:persistent="action.isDeleting"
|
|
54
|
+
@update:model-value="handleDialogModelUpdate"
|
|
55
|
+
>
|
|
56
|
+
<v-card>
|
|
57
|
+
<v-card-title :id="titleId">Delete {{ resourceLabel }}?</v-card-title>
|
|
58
|
+
<v-card-text>
|
|
59
|
+
<p :id="descriptionId" class="mb-0">
|
|
60
|
+
This permanently deletes this {{ resourceLabel.toLowerCase() }}. This action cannot be undone.
|
|
61
|
+
</p>
|
|
62
|
+
<v-alert
|
|
63
|
+
v-if="action.error"
|
|
64
|
+
class="mt-4"
|
|
65
|
+
type="error"
|
|
66
|
+
variant="tonal"
|
|
67
|
+
>
|
|
68
|
+
{{ action.error }}
|
|
69
|
+
</v-alert>
|
|
70
|
+
</v-card-text>
|
|
71
|
+
<v-card-actions>
|
|
72
|
+
<v-spacer />
|
|
73
|
+
<v-btn
|
|
74
|
+
autofocus
|
|
75
|
+
variant="text"
|
|
76
|
+
:disabled="action.isDeleting"
|
|
77
|
+
@click="closeDialog"
|
|
78
|
+
>
|
|
79
|
+
Cancel
|
|
80
|
+
</v-btn>
|
|
81
|
+
<v-btn
|
|
82
|
+
color="error"
|
|
83
|
+
variant="flat"
|
|
84
|
+
:loading="action.isDeleting"
|
|
85
|
+
:disabled="!action.canDelete"
|
|
86
|
+
@click="action.confirm"
|
|
87
|
+
>
|
|
88
|
+
Delete
|
|
89
|
+
</v-btn>
|
|
90
|
+
</v-card-actions>
|
|
91
|
+
</v-card>
|
|
92
|
+
</v-dialog>
|
|
93
|
+
</template>
|
|
@@ -113,7 +113,7 @@ function inferCrudJsonApiTransport(resource = null, { mode = "", operationName =
|
|
|
113
113
|
function resolveCrudJsonApiTransport(transport = null, resource = null, options = {}) {
|
|
114
114
|
if (transport != null) {
|
|
115
115
|
throw new TypeError(
|
|
116
|
-
"CRUD hooks
|
|
116
|
+
"CRUD hooks do not accept explicit transport. Derive JSON:API transport from the shared resource."
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
119
|
|