@jskit-ai/users-web 0.1.172 → 0.1.174

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.
Files changed (112) hide show
  1. package/package.json +18 -149
  2. package/src/client/composables/account-settings/accountSettingsAvatarUploadRuntime.js +2 -2
  3. package/src/client/composables/useAccountSettingsRuntime.js +3 -3
  4. package/src/client/index.js +0 -11
  5. package/test/exportsContract.test.js +3 -29
  6. package/test/settingsPlacementContract.test.js +10 -0
  7. package/fixtures/crud-list-date-filters/App.vue +0 -107
  8. package/fixtures/crud-list-date-filters/index.html +0 -12
  9. package/fixtures/crud-list-date-filters/main.js +0 -24
  10. package/fixtures/crud-list-date-filters/vite.config.mjs +0 -18
  11. package/src/client/bulkActions.js +0 -47
  12. package/src/client/components/CrudAddEditScreen.vue +0 -186
  13. package/src/client/components/CrudDeleteAction.vue +0 -93
  14. package/src/client/components/CrudListBulkActionSurface.vue +0 -126
  15. package/src/client/components/CrudListDateFilterControl.vue +0 -188
  16. package/src/client/components/CrudListFilterSurface.vue +0 -388
  17. package/src/client/components/CrudListRecordActionMenu.vue +0 -120
  18. package/src/client/components/CrudListScreen.vue +0 -501
  19. package/src/client/components/CrudViewScreen.vue +0 -197
  20. package/src/client/composables/crud/crudBindingSupport.js +0 -75
  21. package/src/client/composables/crud/crudHttpClientSupport.js +0 -57
  22. package/src/client/composables/crud/crudJsonApiTransportSupport.js +0 -145
  23. package/src/client/composables/crud/crudLookupFieldLabelSupport.js +0 -151
  24. package/src/client/composables/crud/crudLookupFieldRuntime.js +0 -251
  25. package/src/client/composables/crud/crudSchemaFormHelpers.js +0 -464
  26. package/src/client/composables/internal/crudListFilterLookupSupport.js +0 -161
  27. package/src/client/composables/internal/crudListParentTitleSupport.js +0 -171
  28. package/src/client/composables/internal/useOperationScope.js +0 -144
  29. package/src/client/composables/records/useAddEdit.js +0 -224
  30. package/src/client/composables/records/useCrudAddEdit.js +0 -227
  31. package/src/client/composables/records/useCrudList.js +0 -101
  32. package/src/client/composables/records/useCrudView.js +0 -47
  33. package/src/client/composables/records/useList.js +0 -500
  34. package/src/client/composables/records/useView.js +0 -164
  35. package/src/client/composables/runtime/addEditUiRuntime.js +0 -130
  36. package/src/client/composables/runtime/listUiRuntime.js +0 -123
  37. package/src/client/composables/runtime/modelStateHelpers.js +0 -90
  38. package/src/client/composables/runtime/operationAdapters.js +0 -34
  39. package/src/client/composables/runtime/operationUiHelpers.js +0 -125
  40. package/src/client/composables/runtime/operationValidationHelpers.js +0 -51
  41. package/src/client/composables/runtime/useAddEditCore.js +0 -112
  42. package/src/client/composables/runtime/useCommandCore.js +0 -123
  43. package/src/client/composables/runtime/useEndpointResource.js +0 -199
  44. package/src/client/composables/runtime/useFieldErrorBag.js +0 -61
  45. package/src/client/composables/runtime/useListCore.js +0 -112
  46. package/src/client/composables/runtime/useUiFeedback.js +0 -98
  47. package/src/client/composables/runtime/useViewCore.js +0 -93
  48. package/src/client/composables/runtime/viewUiRuntime.js +0 -96
  49. package/src/client/composables/support/errorMessageHelpers.js +0 -66
  50. package/src/client/composables/support/listQueryParamSupport.js +0 -473
  51. package/src/client/composables/support/listSearchSupport.js +0 -70
  52. package/src/client/composables/support/refValueHelpers.js +0 -19
  53. package/src/client/composables/support/requestQueryRuntimeSupport.js +0 -141
  54. package/src/client/composables/support/resourceLoadStateHelpers.js +0 -208
  55. package/src/client/composables/support/routeTemplateHelpers.js +0 -285
  56. package/src/client/composables/support/scopeHelpers.js +0 -145
  57. package/src/client/composables/useAccess.js +0 -109
  58. package/src/client/composables/useCommand.js +0 -118
  59. package/src/client/composables/useCrudAddEditScreen.js +0 -88
  60. package/src/client/composables/useCrudDeleteAction.js +0 -160
  61. package/src/client/composables/useCrudListBulkActions.js +0 -147
  62. package/src/client/composables/useCrudListFilterLookups.js +0 -146
  63. package/src/client/composables/useCrudListFilters.js +0 -339
  64. package/src/client/composables/useCrudListParentTitle.js +0 -151
  65. package/src/client/composables/useCrudListRowActions.js +0 -144
  66. package/src/client/composables/useCrudListScreen.js +0 -237
  67. package/src/client/composables/useCrudViewScreen.js +0 -77
  68. package/src/client/composables/usePagedCollection.js +0 -181
  69. package/src/client/composables/useRealtimeQueryInvalidation.js +0 -156
  70. package/src/client/composables/useScopeRuntime.js +0 -135
  71. package/src/client/filters.js +0 -15
  72. package/src/client/lib/httpClient.js +0 -47
  73. package/src/client/lib/permissions.js +0 -34
  74. package/src/client/rowActions.js +0 -47
  75. package/src/client/support/contractGuards.js +0 -34
  76. package/src/client/support/crudListDateFilterSupport.js +0 -91
  77. package/test/addEditUiRuntime.test.js +0 -110
  78. package/test/crudBindingSupport.test.js +0 -110
  79. package/test/crudHttpClientSupport.test.js +0 -77
  80. package/test/crudJsonApiTransportSupport.test.js +0 -179
  81. package/test/crudListBulkActionSurface.test.js +0 -27
  82. package/test/crudListDateFilterSupport.test.js +0 -92
  83. package/test/crudListDateFilterSurface.browser.test.js +0 -182
  84. package/test/crudListFilterSurface.test.js +0 -90
  85. package/test/crudLookupFieldRuntime.test.js +0 -264
  86. package/test/crudScreenComponents.test.js +0 -117
  87. package/test/errorIntentContract.test.js +0 -31
  88. package/test/errorMessageHelpers.test.js +0 -28
  89. package/test/listQueryParamSupport.test.js +0 -223
  90. package/test/listUiRuntime.test.js +0 -102
  91. package/test/operationValidationHelpers.test.js +0 -64
  92. package/test/permissions.test.js +0 -35
  93. package/test/refValueHelpers.test.js +0 -14
  94. package/test/requestTransportOptions.test.js +0 -457
  95. package/test/resourceLoadStateHelpers.test.js +0 -189
  96. package/test/routeTemplateHelpers.test.js +0 -85
  97. package/test/scopeHelpers.test.js +0 -57
  98. package/test/useAddEditCore.test.js +0 -124
  99. package/test/useAddEditRequestQueryParams.test.js +0 -190
  100. package/test/useCrudAddEdit.test.js +0 -415
  101. package/test/useCrudDeleteAction.test.js +0 -139
  102. package/test/useCrudListBulkActions.test.js +0 -65
  103. package/test/useCrudListFilterLookups.test.js +0 -114
  104. package/test/useCrudListFilters.test.js +0 -293
  105. package/test/useCrudListParentTitle.test.js +0 -262
  106. package/test/useCrudListRowActions.test.js +0 -77
  107. package/test/useListRouteInitialization.test.js +0 -337
  108. package/test/useListSearchSupport.test.js +0 -61
  109. package/test/usePagedCollection.test.js +0 -53
  110. package/test/useViewRequestQueryParams.test.js +0 -20
  111. package/test/viewCoreLoading.test.js +0 -44
  112. package/test/viewUiRuntime.test.js +0 -95
package/package.json CHANGED
@@ -1,59 +1,24 @@
1
1
  {
2
2
  "name": "@jskit-ai/users-web",
3
- "version": "0.1.172",
3
+ "version": "0.1.174",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
7
7
  },
8
8
  "exports": {
9
9
  "./client": "./src/client/index.js",
10
+ "./client/providers/UsersWebClientProvider": "./src/client/providers/UsersWebClientProvider.js",
10
11
  "./client/components/AccountSettingsClientElement": "./src/client/components/AccountSettingsClientElement.vue",
11
- "./client/components/CrudAddEditScreen": "./src/client/components/CrudAddEditScreen.vue",
12
- "./client/components/CrudDeleteAction": "./src/client/components/CrudDeleteAction.vue",
13
- "./client/components/CrudListBulkActionSurface": "./src/client/components/CrudListBulkActionSurface.vue",
14
- "./client/components/CrudListFilterSurface": "./src/client/components/CrudListFilterSurface.vue",
15
- "./client/components/CrudListScreen": "./src/client/components/CrudListScreen.vue",
16
- "./client/components/CrudViewScreen": "./src/client/components/CrudViewScreen.vue",
17
- "./client/account-settings/sections": "./src/client/account-settings/sections.js",
18
- "./client/bulkActions": "./src/client/bulkActions.js",
19
- "./client/filters": "./src/client/filters.js",
20
- "./client/rowActions": "./src/client/rowActions.js",
21
- "./client/composables/useAddEdit": "./src/client/composables/records/useAddEdit.js",
22
- "./client/composables/useAccess": "./src/client/composables/useAccess.js",
23
- "./client/composables/useCommand": "./src/client/composables/useCommand.js",
24
- "./client/composables/useCrudAddEdit": "./src/client/composables/records/useCrudAddEdit.js",
25
- "./client/composables/useCrudAddEditScreen": "./src/client/composables/useCrudAddEditScreen.js",
26
- "./client/composables/useCrudDeleteAction": "./src/client/composables/useCrudDeleteAction.js",
27
- "./client/composables/useCrudListBulkActions": "./src/client/composables/useCrudListBulkActions.js",
28
- "./client/composables/useCrudListRowActions": "./src/client/composables/useCrudListRowActions.js",
29
- "./client/composables/crudLookupFieldRuntime": "./src/client/composables/crud/crudLookupFieldRuntime.js",
30
- "./client/composables/useCrudListFilterLookups": "./src/client/composables/useCrudListFilterLookups.js",
31
- "./client/composables/useCrudListFilters": "./src/client/composables/useCrudListFilters.js",
32
- "./client/composables/useEndpointResource": "./src/client/composables/runtime/useEndpointResource.js",
33
- "./client/composables/useList": "./src/client/composables/records/useList.js",
34
- "./client/composables/useCrudList": "./src/client/composables/records/useCrudList.js",
35
- "./client/composables/useCrudListScreen": "./src/client/composables/useCrudListScreen.js",
36
- "./client/crudHttpClient": "./src/client/composables/crud/crudHttpClientSupport.js",
37
- "./client/composables/useCrudListParentTitle": "./src/client/composables/useCrudListParentTitle.js",
38
- "./client/composables/useRealtimeQueryInvalidation": "./src/client/composables/useRealtimeQueryInvalidation.js",
39
- "./client/composables/useView": "./src/client/composables/records/useView.js",
40
- "./client/composables/useCrudView": "./src/client/composables/records/useCrudView.js",
41
- "./client/composables/useCrudViewScreen": "./src/client/composables/useCrudViewScreen.js",
42
- "./client/composables/usePagedCollection": "./src/client/composables/usePagedCollection.js",
43
- "./client/composables/runtime/useUiFeedback": "./src/client/composables/runtime/useUiFeedback.js",
44
- "./client/lib/httpClient": "./src/client/lib/httpClient.js",
45
- "./client/lib/permissions": "./src/client/lib/permissions.js",
46
- "./client/support/contractGuards": "./src/client/support/contractGuards.js"
12
+ "./client/account-settings/sections": "./src/client/account-settings/sections.js"
47
13
  },
48
14
  "dependencies": {
49
- "@jskit-ai/auth-web": "0.1.154",
50
- "@jskit-ai/http-runtime": "0.1.152",
51
- "@jskit-ai/kernel": "0.1.154",
52
- "@jskit-ai/realtime": "0.1.151",
53
- "@jskit-ai/shell-web": "0.1.158",
54
- "@jskit-ai/uploads-image-web": "0.1.129",
55
- "@jskit-ai/users-core": "0.1.167",
56
- "@mdi/js": "^7.4.47"
15
+ "@jskit-ai/auth-web": "0.1.156",
16
+ "@jskit-ai/http-web": "0.1.1",
17
+ "@jskit-ai/http-runtime": "0.1.154",
18
+ "@jskit-ai/kernel": "0.1.156",
19
+ "@jskit-ai/shell-web": "0.1.160",
20
+ "@jskit-ai/uploads-image-web": "0.1.131",
21
+ "@jskit-ai/users-core": "0.1.169"
57
22
  },
58
23
  "peerDependencies": {
59
24
  "@tanstack/vue-query": "^5.90.5",
@@ -61,7 +26,7 @@
61
26
  "vue-router": "^5.0.4",
62
27
  "vuetify": "^4.0.0"
63
28
  },
64
- "description": "Users web module: account/profile UI plus shared users web widgets.",
29
+ "description": "Users web module with account, profile, and user-specific shell UI.",
65
30
  "jskit": {
66
31
  "kind": "runtime",
67
32
  "capabilities": {
@@ -69,6 +34,7 @@
69
34
  "users.web"
70
35
  ],
71
36
  "requires": [
37
+ "runtime.http-web",
72
38
  "runtime.web-placement",
73
39
  "users.server-routes"
74
40
  ]
@@ -101,102 +67,6 @@
101
67
  "subpath": "./client/components/AccountSettingsClientElement",
102
68
  "summary": "Exports the package-owned account settings host that renders placement-backed account sections."
103
69
  },
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
70
  {
201
71
  "subpath": "./client/account-settings/sections",
202
72
  "summary": "Exports placement-backed account settings section helpers."
@@ -356,13 +226,12 @@
356
226
  "mutations": {
357
227
  "dependencies": {
358
228
  "runtime": {
359
- "@mdi/js": "^7.4.47",
360
- "@jskit-ai/http-runtime": "0.1.152",
361
- "@jskit-ai/realtime": "0.1.151",
362
- "@jskit-ai/kernel": "0.1.154",
363
- "@jskit-ai/shell-web": "0.1.158",
364
- "@jskit-ai/uploads-image-web": "0.1.129",
365
- "@jskit-ai/users-core": "0.1.167"
229
+ "@jskit-ai/http-web": "0.1.1",
230
+ "@jskit-ai/http-runtime": "0.1.154",
231
+ "@jskit-ai/kernel": "0.1.156",
232
+ "@jskit-ai/shell-web": "0.1.160",
233
+ "@jskit-ai/uploads-image-web": "0.1.131",
234
+ "@jskit-ai/users-core": "0.1.169"
366
235
  },
367
236
  "dev": {}
368
237
  },
@@ -1,7 +1,7 @@
1
1
  import "@jskit-ai/uploads-image-web/client/styles";
2
2
  import { createManagedImageAssetRuntime } from "@jskit-ai/uploads-image-web/client/composables/createManagedImageAssetRuntime";
3
3
  import { resolveFieldErrors } from "@jskit-ai/http-runtime/client";
4
- import { usersWebHttpClient } from "../../lib/httpClient.js";
4
+ import { httpWebClient } from "@jskit-ai/http-web/client/lib/httpClient";
5
5
 
6
6
  function createAccountSettingsAvatarUploadRuntime({
7
7
  queryClient,
@@ -15,7 +15,7 @@ function createAccountSettingsAvatarUploadRuntime({
15
15
  const sessionPayload = await queryClient.fetchQuery({
16
16
  queryKey: sessionQueryKey,
17
17
  queryFn: () =>
18
- usersWebHttpClient.request("/api/session", {
18
+ httpWebClient.request("/api/session", {
19
19
  method: "GET"
20
20
  }),
21
21
  staleTime: 60_000
@@ -10,14 +10,14 @@ import { useShellWebErrorRuntime } from "@jskit-ai/shell-web/client/error";
10
10
  import { ROUTE_VISIBILITY_PUBLIC } from "@jskit-ai/kernel/shared/support/visibility";
11
11
  import { userProfileResource } from "@jskit-ai/users-core/shared/resources/userProfileResource";
12
12
  import { userSettingsResource } from "@jskit-ai/users-core/shared/resources/userSettingsResource";
13
+ import { useAddEdit } from "@jskit-ai/http-web/client/composables/useAddEdit";
14
+ import { useCommand } from "@jskit-ai/http-web/client/composables/useCommand";
15
+ import { useView } from "@jskit-ai/http-web/client/composables/useView";
13
16
  import {
14
17
  persistThemePreference,
15
18
  resolveThemeNameForPreference,
16
19
  setVuetifyThemeName
17
20
  } from "../lib/theme.js";
18
- import { useAddEdit } from "./records/useAddEdit.js";
19
- import { useCommand } from "./useCommand.js";
20
- import { useView } from "./records/useView.js";
21
21
  import { resolveSurfacePathFromPlacementContext } from "@jskit-ai/shell-web/client/placement";
22
22
  import {
23
23
  ACCOUNT_SETTINGS_DEFAULTS,
@@ -2,17 +2,6 @@ import { UsersWebClientProvider } from "./providers/UsersWebClientProvider.js";
2
2
 
3
3
  export { UsersWebClientProvider } from "./providers/UsersWebClientProvider.js";
4
4
  export { default as AccountSettingsClientElement } from "./components/AccountSettingsClientElement.vue";
5
- export { default as CrudAddEditScreen } from "./components/CrudAddEditScreen.vue";
6
- export { default as CrudDeleteAction } from "./components/CrudDeleteAction.vue";
7
- export { default as CrudListBulkActionSurface } from "./components/CrudListBulkActionSurface.vue";
8
- export { default as CrudListFilterSurface } from "./components/CrudListFilterSurface.vue";
9
- export { default as CrudListScreen } from "./components/CrudListScreen.vue";
10
- export { default as CrudViewScreen } from "./components/CrudViewScreen.vue";
11
- export {
12
- normalizeCrudApiAccess,
13
- resolveCrudHttpClient
14
- } from "./composables/crud/crudHttpClientSupport.js";
15
- export { useCrudDeleteAction } from "./composables/useCrudDeleteAction.js";
16
5
 
17
6
  const clientProviders = Object.freeze([UsersWebClientProvider]);
18
7
 
@@ -8,42 +8,16 @@ const TEST_DIRECTORY = path.dirname(fileURLToPath(import.meta.url));
8
8
  const REPO_ROOT = path.resolve(TEST_DIRECTORY, "..", "..", "..");
9
9
  const PACKAGE_DIR = path.join(REPO_ROOT, "packages", "users-web");
10
10
 
11
- test("users-web exports are explicit and aligned with production/template usage", () => {
11
+ test("users-web exports only user-owned client surfaces", () => {
12
12
  const result = evaluatePackageExportsContract({
13
13
  repoRoot: REPO_ROOT,
14
14
  packageDir: PACKAGE_DIR,
15
15
  packageId: "@jskit-ai/users-web",
16
16
  requiredExports: [
17
17
  "./client",
18
+ "./client/providers/UsersWebClientProvider",
18
19
  "./client/components/AccountSettingsClientElement",
19
- "./client/components/CrudAddEditScreen",
20
- "./client/components/CrudDeleteAction",
21
- "./client/components/CrudListBulkActionSurface",
22
- "./client/components/CrudListFilterSurface",
23
- "./client/components/CrudListScreen",
24
- "./client/components/CrudViewScreen",
25
- "./client/account-settings/sections",
26
- "./client/bulkActions",
27
- "./client/filters",
28
- "./client/rowActions",
29
- "./client/composables/useAddEdit",
30
- "./client/composables/useCommand",
31
- "./client/composables/useEndpointResource",
32
- "./client/composables/useList",
33
- "./client/composables/useView",
34
- "./client/composables/useCrudAddEdit",
35
- "./client/composables/useCrudAddEditScreen",
36
- "./client/composables/useCrudDeleteAction",
37
- "./client/composables/useCrudListBulkActions",
38
- "./client/composables/useCrudListRowActions",
39
- "./client/composables/useCrudListFilterLookups",
40
- "./client/composables/useCrudListFilters",
41
- "./client/composables/useCrudList",
42
- "./client/composables/useCrudListScreen",
43
- "./client/crudHttpClient",
44
- "./client/composables/useCrudView",
45
- "./client/composables/useCrudViewScreen",
46
- "./client/lib/httpClient"
20
+ "./client/account-settings/sections"
47
21
  ]
48
22
  });
49
23
 
@@ -11,6 +11,16 @@ const packageMetadata = packageJson.jskit;
11
11
  const TEST_DIRECTORY = path.dirname(fileURLToPath(import.meta.url));
12
12
  const PACKAGE_DIR = path.resolve(TEST_DIRECTORY, "..");
13
13
 
14
+ test("account settings load state exposes a local retry action", async () => {
15
+ const source = await readFile(
16
+ path.join(PACKAGE_DIR, "src", "client", "components", "AccountSettingsClientElement.vue"),
17
+ "utf8"
18
+ );
19
+
20
+ assert.match(source, /settingsLoadError/);
21
+ assert.match(source, /@click="runtime\.refreshSettings"/);
22
+ });
23
+
14
24
  function readOutlets(host = "") {
15
25
  const outlets = packageMetadata?.metadata?.ui?.placements?.outlets;
16
26
  const normalizedTarget = String(host || "").trim();
@@ -1,107 +0,0 @@
1
- <script setup>
2
- import { computed } from "vue";
3
- import CrudListFilterSurface from "../../src/client/components/CrudListFilterSurface.vue";
4
- import { useCrudListFilters } from "../../src/client/composables/useCrudListFilters.js";
5
-
6
- const filters = {
7
- status: {
8
- key: "status",
9
- queryKey: "status",
10
- type: "enum",
11
- label: "Status",
12
- options: [
13
- { value: "active", label: "Active" },
14
- { value: "archived", label: "Archived" }
15
- ]
16
- },
17
- submittedOn: {
18
- key: "submittedOn",
19
- queryKey: "submittedOn",
20
- type: "date",
21
- label: "Submitted date"
22
- },
23
- arrivalDate: {
24
- key: "arrivalDate",
25
- queryKey: "arrivalDate",
26
- type: "dateRange",
27
- label: "Arrival"
28
- },
29
- assignment: {
30
- key: "assignment",
31
- queryKey: "assignment",
32
- type: "presence",
33
- label: "Assignment",
34
- options: [
35
- { value: "present", label: "Assigned" },
36
- { value: "missing", label: "Unassigned" }
37
- ]
38
- }
39
- };
40
- const runtime = useCrudListFilters(filters);
41
- const query = new URLSearchParams(window.location.search);
42
-
43
- for (const [key, param] of Object.entries(runtime.queryParams)) {
44
- if (query.has(key)) {
45
- param.value = query.get(key);
46
- }
47
- }
48
-
49
- const contractSnapshot = computed(() => JSON.stringify({
50
- values: {
51
- submittedOn: runtime.values.submittedOn,
52
- arrivalDate: {
53
- from: runtime.values.arrivalDate.from,
54
- to: runtime.values.arrivalDate.to
55
- }
56
- },
57
- query: {
58
- submittedOn: runtime.queryParams.submittedOn.value,
59
- arrivalDate: runtime.queryParams.arrivalDate.value
60
- }
61
- }));
62
- </script>
63
-
64
- <template>
65
- <v-app>
66
- <v-main>
67
- <v-container class="date-filter-fixture py-8">
68
- <div class="mb-6">
69
- <div class="text-overline text-primary">JSKIT users-web</div>
70
- <h1 class="text-h4 mb-2">Date filter controls</h1>
71
- <p class="text-body-1 text-medium-emphasis mb-0">
72
- Date and date-range filters beside ordinary Vuetify selects.
73
- </p>
74
- </div>
75
-
76
- <CrudListFilterSurface :filters="filters" :runtime="runtime" />
77
-
78
- <output data-testid="date-filter-contract" class="date-filter-fixture__contract">
79
- {{ contractSnapshot }}
80
- </output>
81
- </v-container>
82
- </v-main>
83
- </v-app>
84
- </template>
85
-
86
- <style>
87
- html {
88
- overflow-x: hidden;
89
- }
90
-
91
- body {
92
- background: rgb(var(--v-theme-background));
93
- }
94
-
95
- .date-filter-fixture {
96
- max-width: 90rem;
97
- }
98
-
99
- .date-filter-fixture__contract {
100
- display: block;
101
- font-family: monospace;
102
- height: 1px;
103
- overflow: hidden;
104
- position: absolute;
105
- width: 1px;
106
- }
107
- </style>
@@ -1,12 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>CRUD date filter visual regression</title>
7
- </head>
8
- <body>
9
- <div id="app"></div>
10
- <script type="module" src="/main.js"></script>
11
- </body>
12
- </html>
@@ -1,24 +0,0 @@
1
- import { createApp } from "vue";
2
- import "vuetify/styles";
3
- import { createVuetify } from "vuetify";
4
- import * as components from "vuetify/components";
5
- import * as directives from "vuetify/directives";
6
- import { aliases as mdiAliases, mdi } from "vuetify/iconsets/mdi-svg";
7
- import App from "./App.vue";
8
-
9
- const vuetify = createVuetify({
10
- components,
11
- directives,
12
- theme: {
13
- defaultTheme: "light"
14
- },
15
- icons: {
16
- defaultSet: "mdi",
17
- aliases: mdiAliases,
18
- sets: { mdi }
19
- }
20
- });
21
-
22
- createApp(App)
23
- .use(vuetify)
24
- .mount("#app");
@@ -1,18 +0,0 @@
1
- import path from "node:path";
2
- import { fileURLToPath } from "node:url";
3
- import { defineConfig } from "vite";
4
- import vue from "@vitejs/plugin-vue";
5
-
6
- const fixtureRoot = path.dirname(fileURLToPath(import.meta.url));
7
-
8
- export default defineConfig({
9
- root: fixtureRoot,
10
- plugins: [vue()],
11
- resolve: {
12
- preserveSymlinks: true
13
- },
14
- server: {
15
- host: "127.0.0.1",
16
- strictPort: true
17
- }
18
- });
@@ -1,47 +0,0 @@
1
- import { normalizeText } from "@jskit-ai/kernel/shared/support/normalize";
2
-
3
- function normalizeCrudListBulkAction(rawAction = {}, index = 0) {
4
- if (!rawAction || typeof rawAction !== "object" || Array.isArray(rawAction)) {
5
- return null;
6
- }
7
-
8
- const key = normalizeText(rawAction.key || rawAction.id || `action-${index + 1}`);
9
- const label = normalizeText(rawAction.label || rawAction.title);
10
- if (!key || !label) {
11
- return null;
12
- }
13
-
14
- return Object.freeze({
15
- key,
16
- label,
17
- icon: normalizeText(rawAction.icon),
18
- color: normalizeText(rawAction.color, { fallback: "primary" }),
19
- variant: normalizeText(rawAction.variant, { fallback: "tonal" }),
20
- confirmLabel: normalizeText(rawAction.confirmLabel),
21
- run: typeof rawAction.run === "function" ? rawAction.run : null,
22
- disabled: rawAction.disabled
23
- });
24
- }
25
-
26
- function defineCrudListBulkActions(actions = []) {
27
- if (!Array.isArray(actions)) {
28
- throw new TypeError("defineCrudListBulkActions requires an array.");
29
- }
30
-
31
- const normalizedActions = [];
32
- const seenKeys = new Set();
33
-
34
- actions.forEach((rawAction, index) => {
35
- const action = normalizeCrudListBulkAction(rawAction, index);
36
- if (!action || seenKeys.has(action.key)) {
37
- return;
38
- }
39
-
40
- seenKeys.add(action.key);
41
- normalizedActions.push(action);
42
- });
43
-
44
- return Object.freeze(normalizedActions);
45
- }
46
-
47
- export { defineCrudListBulkActions };