@loj-lang/rdsl-runtime 0.5.0 → 0.6.1
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/components/Badge.d.ts +2 -1
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Badge.js +2 -2
- package/dist/components/ConfirmDialog.d.ts +6 -1
- package/dist/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog.js +35 -6
- package/dist/components/DataTable.d.ts +35 -2
- package/dist/components/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable.js +64 -38
- package/dist/components/DropdownButton.d.ts +11 -0
- package/dist/components/DropdownButton.d.ts.map +1 -0
- package/dist/components/DropdownButton.js +9 -0
- package/dist/components/ErrorBoundary.d.ts +18 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.js +19 -0
- package/dist/components/ErrorState.d.ts +6 -0
- package/dist/components/ErrorState.d.ts.map +1 -0
- package/dist/components/ErrorState.js +25 -0
- package/dist/components/FilterBar.d.ts +2 -0
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +3 -2
- package/dist/components/FormField.d.ts +7 -2
- package/dist/components/FormField.d.ts.map +1 -1
- package/dist/components/FormField.js +16 -5
- package/dist/components/GroupedDataTable.d.ts.map +1 -1
- package/dist/components/GroupedDataTable.js +40 -59
- package/dist/components/Pagination.js +1 -1
- package/dist/components/PivotDataTable.d.ts.map +1 -1
- package/dist/components/PivotDataTable.js +42 -65
- package/dist/components/Tag.d.ts +2 -1
- package/dist/components/Tag.d.ts.map +1 -1
- package/dist/components/Tag.js +2 -2
- package/dist/components/WorkflowSummary.js +6 -6
- package/dist/components/readFormatting.d.ts +2 -0
- package/dist/components/readFormatting.d.ts.map +1 -0
- package/dist/components/readFormatting.js +1 -0
- package/dist/derivations.d.ts +3 -0
- package/dist/derivations.d.ts.map +1 -0
- package/dist/derivations.js +1 -0
- package/dist/hooks/browserStorage.d.ts +3 -0
- package/dist/hooks/browserStorage.d.ts.map +1 -0
- package/dist/hooks/browserStorage.js +1 -0
- package/dist/hooks/deleteConfirmation.d.ts +20 -0
- package/dist/hooks/deleteConfirmation.d.ts.map +1 -0
- package/dist/hooks/deleteConfirmation.js +21 -0
- package/dist/hooks/exportDownload.d.ts +16 -0
- package/dist/hooks/exportDownload.d.ts.map +1 -0
- package/dist/hooks/exportDownload.js +55 -0
- package/dist/hooks/formDerivations.d.ts +7 -0
- package/dist/hooks/formDerivations.d.ts.map +1 -0
- package/dist/hooks/formDerivations.js +23 -0
- package/dist/hooks/formSeeds.d.ts +12 -0
- package/dist/hooks/formSeeds.d.ts.map +1 -0
- package/dist/hooks/formSeeds.js +26 -0
- package/dist/hooks/navigation.d.ts +37 -0
- package/dist/hooks/navigation.d.ts.map +1 -1
- package/dist/hooks/navigation.js +107 -70
- package/dist/hooks/readModelStore.d.ts +29 -0
- package/dist/hooks/readModelStore.d.ts.map +1 -0
- package/dist/hooks/readModelStore.js +135 -0
- package/dist/hooks/recordScopedWorkflow.d.ts +13 -0
- package/dist/hooks/recordScopedWorkflow.d.ts.map +1 -0
- package/dist/hooks/recordScopedWorkflow.js +40 -0
- package/dist/hooks/resourceClient.d.ts +39 -0
- package/dist/hooks/resourceClient.d.ts.map +1 -1
- package/dist/hooks/resourceClient.js +205 -71
- package/dist/hooks/resourceErrors.d.ts +13 -0
- package/dist/hooks/resourceErrors.d.ts.map +1 -0
- package/dist/hooks/resourceErrors.js +140 -0
- package/dist/hooks/resourceRowActions.d.ts +17 -0
- package/dist/hooks/resourceRowActions.d.ts.map +1 -0
- package/dist/hooks/resourceRowActions.js +48 -0
- package/dist/hooks/resourceStore.d.ts +2 -24
- package/dist/hooks/resourceStore.d.ts.map +1 -1
- package/dist/hooks/resourceStore.js +1 -164
- package/dist/hooks/resourceTarget.d.ts +1 -1
- package/dist/hooks/resourceTarget.d.ts.map +1 -1
- package/dist/hooks/resourceTarget.js +1 -22
- package/dist/hooks/serverListStore.d.ts +3 -0
- package/dist/hooks/serverListStore.d.ts.map +1 -0
- package/dist/hooks/serverListStore.js +1 -0
- package/dist/hooks/sessionCaches.d.ts +6 -0
- package/dist/hooks/sessionCaches.d.ts.map +1 -0
- package/dist/hooks/sessionCaches.js +14 -0
- package/dist/hooks/transitionedSetter.d.ts +2 -0
- package/dist/hooks/transitionedSetter.d.ts.map +1 -0
- package/dist/hooks/transitionedSetter.js +9 -0
- package/dist/hooks/useAuth.d.ts +18 -0
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +30 -0
- package/dist/hooks/useCollectionView.d.ts +2 -8
- package/dist/hooks/useCollectionView.d.ts.map +1 -1
- package/dist/hooks/useCollectionView.js +8 -36
- package/dist/hooks/useDocumentMetadata.d.ts.map +1 -1
- package/dist/hooks/useDocumentMetadata.js +57 -0
- package/dist/hooks/useGroupedCollectionView.d.ts +2 -7
- package/dist/hooks/useGroupedCollectionView.d.ts.map +1 -1
- package/dist/hooks/useGroupedCollectionView.js +8 -52
- package/dist/hooks/useI18n.d.ts +21 -0
- package/dist/hooks/useI18n.d.ts.map +1 -0
- package/dist/hooks/useI18n.js +86 -0
- package/dist/hooks/useReadModel.d.ts +15 -0
- package/dist/hooks/useReadModel.d.ts.map +1 -1
- package/dist/hooks/useReadModel.js +127 -40
- package/dist/hooks/useResource.d.ts +7 -0
- package/dist/hooks/useResource.d.ts.map +1 -1
- package/dist/hooks/useResource.js +159 -3
- package/dist/hooks/useStoredState.d.ts +15 -0
- package/dist/hooks/useStoredState.d.ts.map +1 -0
- package/dist/hooks/useStoredState.js +28 -0
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/hooks/useToast.js +1 -1
- package/dist/hooks/workflowTransition.d.ts +21 -0
- package/dist/hooks/workflowTransition.d.ts.map +1 -0
- package/dist/hooks/workflowTransition.js +54 -0
- package/dist/index.d.ts +35 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -5
- package/dist/policies/can.d.ts +2 -14
- package/dist/policies/can.d.ts.map +1 -1
- package/dist/policies/can.js +1 -160
- package/dist/workflow.d.ts +3 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +1 -0
- package/package.json +142 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/hooks/navigation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/hooks/navigation.ts"],"names":[],"mappings":"AAcA,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE7E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAE3E;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,MAAM,MAAM,kBAAkB,GAAG,SAAS,OAAO,EAAE,CAAC;AAEpD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAE1G;AAED,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,GACL,MAAM,CAUR;AAED,wBAAgB,0BAA0B,CACxC,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,GACL,MAAM,CAKR;AAED,wBAAgB,sBAAsB,CACpC,YAAY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CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtE,aAAa,EAAE,CAAC,EAChB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAClC,GACL,CAAC,CAKH;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrB,GACL,IAAI,CAuBN;AAYD,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACrE,aAAa,EAAE,CAAC,EAChB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrB,GACL,SAAS;IACV,CAAC;IACD,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI;IACxC,CAAC;CACF,CAyBA;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAExF;AAED,wBAAgB,oBAAoB,CAAC,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAEzF"}
|
package/dist/hooks/navigation.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { buildAppHrefWithSearchEntries as buildAppHrefWithSearchEntriesCore, getLocationSearchValues as getLocationSearchValuesCore, getSanitizedReturnTo as getSanitizedReturnToCore, normalizeAppBasePath as normalizeAppBasePathCore, prefixAppBasePath as prefixAppBasePathCore, sanitizeAppLocalHref as sanitizeAppLocalHrefCore, shiftDateInputValue as shiftDateInputValueCore, stripAppBasePath as stripAppBasePathCore, } from '../../../runtime-core/dist/navigation.js';
|
|
1
3
|
let configuredAppBasePath = '/';
|
|
2
4
|
export function normalizeAppBasePath(value) {
|
|
3
|
-
|
|
4
|
-
return '/';
|
|
5
|
-
}
|
|
6
|
-
const trimmed = value.trim();
|
|
7
|
-
if (!trimmed || trimmed === '/') {
|
|
8
|
-
return '/';
|
|
9
|
-
}
|
|
10
|
-
const prefixed = trimmed.startsWith('/') ? trimmed : `/${trimmed}`;
|
|
11
|
-
return prefixed.endsWith('/') ? prefixed.slice(0, -1) || '/' : prefixed;
|
|
5
|
+
return normalizeAppBasePathCore(value);
|
|
12
6
|
}
|
|
13
7
|
export function configureAppBasePath(value) {
|
|
14
8
|
configuredAppBasePath = normalizeAppBasePath(value);
|
|
@@ -17,34 +11,54 @@ export function getConfiguredAppBasePath() {
|
|
|
17
11
|
return configuredAppBasePath;
|
|
18
12
|
}
|
|
19
13
|
export function prefixAppBasePath(path) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
return prefixAppBasePathCore(getConfiguredAppBasePath(), path);
|
|
15
|
+
}
|
|
16
|
+
export function buildAppHrefWithSearchEntries(path, entries) {
|
|
17
|
+
return buildAppHrefWithSearchEntriesCore(getConfiguredAppBasePath(), path, entries);
|
|
18
|
+
}
|
|
19
|
+
export function buildResourceRecordHref(resourceName, recordId, options = {}) {
|
|
20
|
+
const suffix = options.surface === 'edit'
|
|
21
|
+
? '/edit'
|
|
22
|
+
: options.surface === 'workflow'
|
|
23
|
+
? '/workflow'
|
|
24
|
+
: '';
|
|
25
|
+
const path = `/${resourceName}/${recordId}${suffix}`;
|
|
26
|
+
return options.returnTo
|
|
27
|
+
? buildAppHrefWithSearchEntries(path, [['returnTo', options.returnTo]])
|
|
28
|
+
: prefixAppBasePath(path);
|
|
29
|
+
}
|
|
30
|
+
export function buildRelatedCollectionHref(parentResourceName, recordId, relatedPath, options = {}) {
|
|
31
|
+
const path = `/${parentResourceName}/${recordId}/related/${relatedPath}`;
|
|
32
|
+
return options.returnTo
|
|
33
|
+
? buildAppHrefWithSearchEntries(path, [['returnTo', options.returnTo]])
|
|
34
|
+
: prefixAppBasePath(path);
|
|
35
|
+
}
|
|
36
|
+
export function buildRelatedCreateHref(resourceName, options = {}) {
|
|
37
|
+
const entries = [];
|
|
38
|
+
if (options.inverseFieldName && options.parentId) {
|
|
39
|
+
entries.push([options.inverseFieldName, options.parentId]);
|
|
26
40
|
}
|
|
27
|
-
if (
|
|
28
|
-
|
|
41
|
+
if (options.returnTo) {
|
|
42
|
+
entries.push(['returnTo', options.returnTo]);
|
|
29
43
|
}
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
return buildAppHrefWithSearchEntries(`/${resourceName}/create`, entries);
|
|
45
|
+
}
|
|
46
|
+
export function buildWorkflowStepHref(step, options) {
|
|
47
|
+
if (!step?.name) {
|
|
48
|
+
return null;
|
|
32
49
|
}
|
|
33
|
-
|
|
50
|
+
const path = step.surface === 'form'
|
|
51
|
+
? (options.editPath ?? options.readPath ?? options.workflowPath)
|
|
52
|
+
: step.surface === 'read'
|
|
53
|
+
? (options.readPath ?? options.workflowPath)
|
|
54
|
+
: options.workflowPath;
|
|
55
|
+
return buildAppHrefWithSearchEntries(path, [
|
|
56
|
+
['workflowStep', step.name],
|
|
57
|
+
...(options.returnTo ? [['returnTo', options.returnTo]] : []),
|
|
58
|
+
]);
|
|
34
59
|
}
|
|
35
60
|
export function stripAppBasePath(pathname) {
|
|
36
|
-
|
|
37
|
-
const basePath = getConfiguredAppBasePath();
|
|
38
|
-
if (basePath === '/') {
|
|
39
|
-
return normalizedPathname === '' ? '/' : normalizedPathname;
|
|
40
|
-
}
|
|
41
|
-
if (normalizedPathname === basePath) {
|
|
42
|
-
return '/';
|
|
43
|
-
}
|
|
44
|
-
if (normalizedPathname.startsWith(`${basePath}/`)) {
|
|
45
|
-
return normalizedPathname.slice(basePath.length) || '/';
|
|
46
|
-
}
|
|
47
|
-
return normalizedPathname === '' ? '/' : normalizedPathname;
|
|
61
|
+
return stripAppBasePathCore(getConfiguredAppBasePath(), pathname);
|
|
48
62
|
}
|
|
49
63
|
export function getCurrentAppPathname() {
|
|
50
64
|
if (typeof window === 'undefined')
|
|
@@ -56,50 +70,41 @@ export function getCurrentAppHref() {
|
|
|
56
70
|
return '/';
|
|
57
71
|
return `${window.location.pathname}${window.location.search}`;
|
|
58
72
|
}
|
|
73
|
+
export function navigateToAppHref(href) {
|
|
74
|
+
if (typeof window === 'undefined' || !href) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
if (href === getCurrentAppHref()) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
window.location.assign(href);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
59
83
|
export function getLocationSearchParams() {
|
|
60
84
|
if (typeof window === 'undefined')
|
|
61
85
|
return null;
|
|
62
86
|
return new URLSearchParams(window.location.search);
|
|
63
87
|
}
|
|
88
|
+
export function getCurrentReturnToNavigation(fallbackHref) {
|
|
89
|
+
const searchParams = getLocationSearchParams();
|
|
90
|
+
const returnTo = getSanitizedReturnTo(searchParams);
|
|
91
|
+
return {
|
|
92
|
+
searchParams,
|
|
93
|
+
returnTo,
|
|
94
|
+
href: returnTo || fallbackHref,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
64
97
|
export function shiftDateInputValue(value, days) {
|
|
65
|
-
|
|
66
|
-
const match = trimmed.match(/^(\d{4})([-/])(\d{2})\2(\d{2})$/);
|
|
67
|
-
if (!match) {
|
|
68
|
-
return trimmed;
|
|
69
|
-
}
|
|
70
|
-
const [, yearText, separator, monthText, dayText] = match;
|
|
71
|
-
const year = Number(yearText);
|
|
72
|
-
const month = Number(monthText);
|
|
73
|
-
const day = Number(dayText);
|
|
74
|
-
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day)) {
|
|
75
|
-
return trimmed;
|
|
76
|
-
}
|
|
77
|
-
const date = new Date(Date.UTC(year, month - 1, day));
|
|
78
|
-
if (Number.isNaN(date.getTime())
|
|
79
|
-
|| date.getUTCFullYear() !== year
|
|
80
|
-
|| date.getUTCMonth() !== month - 1
|
|
81
|
-
|| date.getUTCDate() !== day) {
|
|
82
|
-
return trimmed;
|
|
83
|
-
}
|
|
84
|
-
date.setUTCDate(date.getUTCDate() + days);
|
|
85
|
-
const nextYear = String(date.getUTCFullYear()).padStart(4, '0');
|
|
86
|
-
const nextMonth = String(date.getUTCMonth() + 1).padStart(2, '0');
|
|
87
|
-
const nextDay = String(date.getUTCDate()).padStart(2, '0');
|
|
88
|
-
return `${nextYear}${separator}${nextMonth}${separator}${nextDay}`;
|
|
98
|
+
return shiftDateInputValueCore(value, days);
|
|
89
99
|
}
|
|
90
100
|
function scopedSearchParamKey(prefix, key) {
|
|
91
101
|
return prefix ? `${prefix}.${key}` : key;
|
|
92
102
|
}
|
|
93
103
|
export function getLocationSearchValues(defaultValues, options = {}) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (value !== null && value !== undefined) {
|
|
99
|
-
nextValues[key] = value;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return nextValues;
|
|
104
|
+
return getLocationSearchValuesCore(defaultValues, {
|
|
105
|
+
prefix: options.prefix,
|
|
106
|
+
searchParams: options.searchParams ?? getLocationSearchParams(),
|
|
107
|
+
});
|
|
103
108
|
}
|
|
104
109
|
export function replaceLocationSearchValues(values, options = {}) {
|
|
105
110
|
if (typeof window === 'undefined') {
|
|
@@ -124,12 +129,44 @@ export function replaceLocationSearchValues(values, options = {}) {
|
|
|
124
129
|
window.history.replaceState(window.history.state, '', nextHref);
|
|
125
130
|
}
|
|
126
131
|
}
|
|
132
|
+
function hasSameLocationSearchValues(left, right) {
|
|
133
|
+
const keys = new Set([...Object.keys(left), ...Object.keys(right)]);
|
|
134
|
+
for (const key of keys) {
|
|
135
|
+
if ((left[key] ?? '') !== (right[key] ?? '')) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
export function useLocationSearchState(defaultValues, options = {}) {
|
|
142
|
+
const [values, setValues] = React.useState(() => getLocationSearchValues(defaultValues, { prefix: options.prefix }));
|
|
143
|
+
const setQuery = React.useCallback((next) => {
|
|
144
|
+
React.startTransition(() => {
|
|
145
|
+
setValues((previous) => typeof next === 'function'
|
|
146
|
+
? next(previous)
|
|
147
|
+
: next);
|
|
148
|
+
});
|
|
149
|
+
}, []);
|
|
150
|
+
const deferredValues = React.useDeferredValue(values);
|
|
151
|
+
React.useEffect(() => {
|
|
152
|
+
if (typeof window === 'undefined') {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
const syncFromLocation = () => {
|
|
156
|
+
const nextValues = getLocationSearchValues(defaultValues, { prefix: options.prefix });
|
|
157
|
+
setValues((previous) => hasSameLocationSearchValues(previous, nextValues) ? previous : nextValues);
|
|
158
|
+
};
|
|
159
|
+
window.addEventListener('popstate', syncFromLocation);
|
|
160
|
+
return () => window.removeEventListener('popstate', syncFromLocation);
|
|
161
|
+
}, [defaultValues, options.prefix]);
|
|
162
|
+
React.useEffect(() => {
|
|
163
|
+
replaceLocationSearchValues(values, { prefix: options.prefix, keys: options.keys });
|
|
164
|
+
}, [options.keys, options.prefix, values]);
|
|
165
|
+
return [values, setQuery, deferredValues];
|
|
166
|
+
}
|
|
127
167
|
export function sanitizeAppLocalHref(candidate) {
|
|
128
|
-
|
|
129
|
-
return null;
|
|
130
|
-
return candidate;
|
|
168
|
+
return sanitizeAppLocalHrefCore(candidate);
|
|
131
169
|
}
|
|
132
170
|
export function getSanitizedReturnTo(searchParams) {
|
|
133
|
-
|
|
134
|
-
return sanitizeAppLocalHref(params?.get('returnTo'));
|
|
171
|
+
return getSanitizedReturnToCore(searchParams ?? getLocationSearchParams());
|
|
135
172
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ReadModelStoreResult<T extends {
|
|
2
|
+
id: string;
|
|
3
|
+
}> {
|
|
4
|
+
items: T[];
|
|
5
|
+
page: number;
|
|
6
|
+
totalItems: number;
|
|
7
|
+
totalPages: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ReadModelStoreSnapshot<T extends {
|
|
10
|
+
id: string;
|
|
11
|
+
}> {
|
|
12
|
+
result: ReadModelStoreResult<T> | null;
|
|
13
|
+
error: unknown;
|
|
14
|
+
pendingCount: number;
|
|
15
|
+
resolvedOnce: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ReadModelStore<T extends {
|
|
18
|
+
id: string;
|
|
19
|
+
}> {
|
|
20
|
+
subscribe(listener: () => void): () => void;
|
|
21
|
+
getSnapshot(): ReadModelStoreSnapshot<T>;
|
|
22
|
+
load(force?: boolean): Promise<ReadModelStoreResult<T>>;
|
|
23
|
+
}
|
|
24
|
+
export declare function getReadModelStore<T extends {
|
|
25
|
+
id: string;
|
|
26
|
+
}>(client: object, requestUrl: string, loader: () => Promise<ReadModelStoreResult<T>>): ReadModelStore<T>;
|
|
27
|
+
export declare function clearReadModelStores(): void;
|
|
28
|
+
export declare function resetReadModelStoreTestState(): void;
|
|
29
|
+
//# sourceMappingURL=readModelStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readModelStore.d.ts","sourceRoot":"","sources":["../../src/hooks/readModelStore.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IAC5D,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IAC9D,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IACtD,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5C,WAAW,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;CACzD;AAqJD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EACxD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAOnB;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,4BAA4B,IAAI,IAAI,CAGnD"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
const readModelStores = new Map();
|
|
2
|
+
const resourceClientIds = new WeakMap();
|
|
3
|
+
let nextClientId = 1;
|
|
4
|
+
function storeKey(client, requestUrl) {
|
|
5
|
+
let id = resourceClientIds.get(client);
|
|
6
|
+
if (!id) {
|
|
7
|
+
id = nextClientId;
|
|
8
|
+
nextClientId += 1;
|
|
9
|
+
resourceClientIds.set(client, id);
|
|
10
|
+
}
|
|
11
|
+
return `${id}:${requestUrl}`;
|
|
12
|
+
}
|
|
13
|
+
function notifyState(state) {
|
|
14
|
+
for (const listener of state.listeners) {
|
|
15
|
+
listener();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function createReadModelStore(requestUrl, loader) {
|
|
19
|
+
const state = {
|
|
20
|
+
result: null,
|
|
21
|
+
listeners: new Set(),
|
|
22
|
+
error: null,
|
|
23
|
+
pendingCount: 0,
|
|
24
|
+
resolvedOnce: false,
|
|
25
|
+
inFlightLoad: null,
|
|
26
|
+
pendingForceLoad: null,
|
|
27
|
+
queuedForceReload: false,
|
|
28
|
+
loadSequence: 0,
|
|
29
|
+
};
|
|
30
|
+
function emptyResult() {
|
|
31
|
+
return {
|
|
32
|
+
items: [],
|
|
33
|
+
page: 1,
|
|
34
|
+
totalItems: 0,
|
|
35
|
+
totalPages: 1,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function isStaleLoad(requestSequence) {
|
|
39
|
+
return requestSequence !== state.loadSequence;
|
|
40
|
+
}
|
|
41
|
+
function load(force = false) {
|
|
42
|
+
if (!force && state.resolvedOnce && !state.error && state.result) {
|
|
43
|
+
return Promise.resolve(state.result);
|
|
44
|
+
}
|
|
45
|
+
if (state.inFlightLoad) {
|
|
46
|
+
if (!force) {
|
|
47
|
+
return state.inFlightLoad;
|
|
48
|
+
}
|
|
49
|
+
state.queuedForceReload = true;
|
|
50
|
+
if (state.pendingForceLoad) {
|
|
51
|
+
return state.pendingForceLoad;
|
|
52
|
+
}
|
|
53
|
+
state.pendingForceLoad = state.inFlightLoad
|
|
54
|
+
.catch(() => state.result ?? emptyResult())
|
|
55
|
+
.then(() => {
|
|
56
|
+
if (!state.queuedForceReload) {
|
|
57
|
+
return state.result ?? emptyResult();
|
|
58
|
+
}
|
|
59
|
+
state.queuedForceReload = false;
|
|
60
|
+
return load(true);
|
|
61
|
+
})
|
|
62
|
+
.finally(() => {
|
|
63
|
+
state.pendingForceLoad = null;
|
|
64
|
+
});
|
|
65
|
+
return state.pendingForceLoad;
|
|
66
|
+
}
|
|
67
|
+
state.pendingCount += 1;
|
|
68
|
+
state.error = null;
|
|
69
|
+
notifyState(state);
|
|
70
|
+
const requestSequence = state.loadSequence + 1;
|
|
71
|
+
state.loadSequence = requestSequence;
|
|
72
|
+
state.inFlightLoad = loader()
|
|
73
|
+
.then((result) => {
|
|
74
|
+
if (isStaleLoad(requestSequence)) {
|
|
75
|
+
return state.result ?? emptyResult();
|
|
76
|
+
}
|
|
77
|
+
state.result = {
|
|
78
|
+
items: [...result.items],
|
|
79
|
+
page: Number(result.page ?? 1),
|
|
80
|
+
totalItems: Number(result.totalItems ?? result.items.length),
|
|
81
|
+
totalPages: Math.max(1, Number(result.totalPages ?? 1)),
|
|
82
|
+
};
|
|
83
|
+
state.error = null;
|
|
84
|
+
state.resolvedOnce = true;
|
|
85
|
+
return state.result;
|
|
86
|
+
})
|
|
87
|
+
.catch((error) => {
|
|
88
|
+
if (isStaleLoad(requestSequence)) {
|
|
89
|
+
return state.result ?? emptyResult();
|
|
90
|
+
}
|
|
91
|
+
state.error = error;
|
|
92
|
+
state.resolvedOnce = true;
|
|
93
|
+
throw error;
|
|
94
|
+
})
|
|
95
|
+
.finally(() => {
|
|
96
|
+
state.pendingCount = Math.max(0, state.pendingCount - 1);
|
|
97
|
+
state.inFlightLoad = null;
|
|
98
|
+
notifyState(state);
|
|
99
|
+
});
|
|
100
|
+
return state.inFlightLoad;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
subscribe(listener) {
|
|
104
|
+
state.listeners.add(listener);
|
|
105
|
+
return () => {
|
|
106
|
+
state.listeners.delete(listener);
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
getSnapshot() {
|
|
110
|
+
return {
|
|
111
|
+
result: state.result,
|
|
112
|
+
error: state.error,
|
|
113
|
+
pendingCount: state.pendingCount,
|
|
114
|
+
resolvedOnce: state.resolvedOnce,
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
load,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export function getReadModelStore(client, requestUrl, loader) {
|
|
121
|
+
const key = storeKey(client, requestUrl);
|
|
122
|
+
const existing = readModelStores.get(key);
|
|
123
|
+
if (existing)
|
|
124
|
+
return existing;
|
|
125
|
+
const created = createReadModelStore(requestUrl, loader);
|
|
126
|
+
readModelStores.set(key, created);
|
|
127
|
+
return created;
|
|
128
|
+
}
|
|
129
|
+
export function clearReadModelStores() {
|
|
130
|
+
readModelStores.clear();
|
|
131
|
+
}
|
|
132
|
+
export function resetReadModelStoreTestState() {
|
|
133
|
+
readModelStores.clear();
|
|
134
|
+
nextClientId = 1;
|
|
135
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WorkflowStateMetaDescriptor, WorkflowStateSummaryDescriptor, WorkflowStepMetaDescriptor, WorkflowTransitionMetaDescriptor } from '@loj-lang/shared-contracts';
|
|
2
|
+
export interface RecordScopedWorkflowSummaryOptions<TRecord extends object> {
|
|
3
|
+
currentUser: unknown;
|
|
4
|
+
record: TRecord | null;
|
|
5
|
+
workflowField: string;
|
|
6
|
+
defaultState: string;
|
|
7
|
+
workflowHref: string;
|
|
8
|
+
workflowSteps: WorkflowStepMetaDescriptor[];
|
|
9
|
+
workflowTransitions: WorkflowTransitionMetaDescriptor[];
|
|
10
|
+
workflowStates: WorkflowStateMetaDescriptor[];
|
|
11
|
+
}
|
|
12
|
+
export declare function useRecordScopedWorkflowSummary<TRecord extends object>({ currentUser, record, workflowField, defaultState, workflowHref, workflowSteps, workflowTransitions, workflowStates, }: RecordScopedWorkflowSummaryOptions<TRecord>): WorkflowStateSummaryDescriptor | null;
|
|
13
|
+
//# sourceMappingURL=recordScopedWorkflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordScopedWorkflow.d.ts","sourceRoot":"","sources":["../../src/hooks/recordScopedWorkflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,kCAAkC,CAAC,OAAO,SAAS,MAAM;IACxE,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,0BAA0B,EAAE,CAAC;IAC5C,mBAAmB,EAAE,gCAAgC,EAAE,CAAC;IACxD,cAAc,EAAE,2BAA2B,EAAE,CAAC;CAC/C;AAQD,wBAAgB,8BAA8B,CAAC,OAAO,SAAS,MAAM,EAAE,EACrE,WAAW,EACX,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,cAAc,GACf,EAAE,kCAAkC,CAAC,OAAO,CAAC,GAAG,8BAA8B,GAAG,IAAI,CAgCrF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { can } from '../policies/can.js';
|
|
3
|
+
function matchesWorkflowCurrentState(step, currentState) {
|
|
4
|
+
return step.currentStateMatch === 'activation'
|
|
5
|
+
? step.activationState === currentState
|
|
6
|
+
: step.targetState === currentState;
|
|
7
|
+
}
|
|
8
|
+
export function useRecordScopedWorkflowSummary({ currentUser, record, workflowField, defaultState, workflowHref, workflowSteps, workflowTransitions, workflowStates, }) {
|
|
9
|
+
return React.useMemo(() => {
|
|
10
|
+
if (!record) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const recordValues = record;
|
|
14
|
+
const currentState = String(recordValues[workflowField] ?? defaultState);
|
|
15
|
+
const currentStateLabel = workflowStates.find((state) => state.name === currentState)?.label ?? currentState;
|
|
16
|
+
const visibleWorkflowSteps = workflowSteps.filter((step) => !step.allow || can(step.allow, { currentUser, record, formData: record }));
|
|
17
|
+
const activeWorkflowIndex = visibleWorkflowSteps.findIndex((step) => matchesWorkflowCurrentState(step, currentState));
|
|
18
|
+
const availableWorkflowTransitions = workflowTransitions.filter((transition) => transition.from.includes(currentState) && (!transition.allow || can(transition.allow, { currentUser, record })));
|
|
19
|
+
return {
|
|
20
|
+
field: workflowField,
|
|
21
|
+
currentState,
|
|
22
|
+
currentStateLabel,
|
|
23
|
+
workflowHref,
|
|
24
|
+
steps: visibleWorkflowSteps.map((step, index) => ({
|
|
25
|
+
name: step.name,
|
|
26
|
+
targetState: step.targetState,
|
|
27
|
+
completionTransition: step.completionTransition ?? null,
|
|
28
|
+
status: index < activeWorkflowIndex ? 'done' : index === activeWorkflowIndex ? 'current' : 'upcoming',
|
|
29
|
+
})),
|
|
30
|
+
transitions: availableWorkflowTransitions.map((transition) => ({
|
|
31
|
+
name: transition.name,
|
|
32
|
+
label: transition.label ?? transition.templateName ?? transition.name,
|
|
33
|
+
templateName: transition.templateName ?? transition.name,
|
|
34
|
+
expandedFrom: transition.expandedFrom ?? undefined,
|
|
35
|
+
to: transition.to,
|
|
36
|
+
toLabel: workflowStates.find((state) => state.name === transition.to)?.label ?? transition.to,
|
|
37
|
+
})),
|
|
38
|
+
};
|
|
39
|
+
}, [currentUser, defaultState, record, workflowField, workflowHref, workflowStates, workflowSteps, workflowTransitions]);
|
|
40
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import type { AuthState } from './useAuth.js';
|
|
2
|
+
export { ResourceClientError } from '../../../runtime-core/dist/resourceHttp.js';
|
|
3
|
+
export type { ResourceClientErrorInit } from '../../../runtime-core/dist/resourceHttp.js';
|
|
4
|
+
export type { ResourceFieldError } from '../../../runtime-core/dist/resourceErrors.js';
|
|
1
5
|
export interface ResourceClient {
|
|
2
6
|
get<T>(path: string): Promise<T>;
|
|
3
7
|
list<T extends {
|
|
4
8
|
id: string;
|
|
5
9
|
}>(api: string): Promise<T[]>;
|
|
10
|
+
listPage<T extends {
|
|
11
|
+
id: string;
|
|
12
|
+
}>(api: string, query?: ResourceListQuery): Promise<ResourceListPage<T>>;
|
|
6
13
|
create<T extends {
|
|
7
14
|
id: string;
|
|
8
15
|
}>(api: string, input: Partial<T>): Promise<T>;
|
|
@@ -10,8 +17,35 @@ export interface ResourceClient {
|
|
|
10
17
|
id: string;
|
|
11
18
|
}>(api: string, id: string, input: Partial<T>): Promise<T>;
|
|
12
19
|
delete(api: string, id: string): Promise<void>;
|
|
20
|
+
batch(api: string, action: string, ids: string[]): Promise<void>;
|
|
21
|
+
export(api: string, format: string, query?: ResourceListQuery): Promise<ResourceExportPayload>;
|
|
13
22
|
post<T>(path: string, input?: unknown): Promise<T>;
|
|
14
23
|
}
|
|
24
|
+
export interface ResourceListQuery {
|
|
25
|
+
page?: number;
|
|
26
|
+
size?: number;
|
|
27
|
+
sort?: {
|
|
28
|
+
field: string;
|
|
29
|
+
direction: 'asc' | 'desc';
|
|
30
|
+
} | null;
|
|
31
|
+
filters?: Record<string, string>;
|
|
32
|
+
projections?: string[];
|
|
33
|
+
fields?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface ResourceListPage<T extends {
|
|
36
|
+
id: string;
|
|
37
|
+
}> {
|
|
38
|
+
items: T[];
|
|
39
|
+
page: number;
|
|
40
|
+
size: number;
|
|
41
|
+
totalItems: number;
|
|
42
|
+
totalPages: number;
|
|
43
|
+
}
|
|
44
|
+
export interface ResourceExportPayload {
|
|
45
|
+
bytes: ArrayBuffer;
|
|
46
|
+
contentType?: string;
|
|
47
|
+
filename?: string;
|
|
48
|
+
}
|
|
15
49
|
export interface ResourceProviderProps {
|
|
16
50
|
client: ResourceClient;
|
|
17
51
|
children?: React.ReactNode;
|
|
@@ -19,12 +53,16 @@ export interface ResourceProviderProps {
|
|
|
19
53
|
export interface FetchResourceClientOptions {
|
|
20
54
|
baseUrl?: string;
|
|
21
55
|
headers?: HeadersInit | (() => HeadersInit | Promise<HeadersInit>);
|
|
56
|
+
auth?: AuthState | (() => AuthState | Promise<AuthState | null | undefined> | null | undefined) | null;
|
|
22
57
|
credentials?: RequestCredentials;
|
|
23
58
|
fetch?: typeof fetch;
|
|
24
59
|
}
|
|
25
60
|
export declare function normalizeListPayload<T extends {
|
|
26
61
|
id: string;
|
|
27
62
|
}>(payload: unknown, api: string): T[];
|
|
63
|
+
export declare function normalizeListPagePayload<T extends {
|
|
64
|
+
id: string;
|
|
65
|
+
}>(payload: unknown, api: string, query?: ResourceListQuery): ResourceListPage<T>;
|
|
28
66
|
export declare function normalizeRecordPayload<T extends {
|
|
29
67
|
id: string;
|
|
30
68
|
}>(payload: unknown, api: string, operation: string): T;
|
|
@@ -32,5 +70,6 @@ export declare function createFetchResourceClient(options?: FetchResourceClientO
|
|
|
32
70
|
export declare function createMemoryResourceClient(): ResourceClient;
|
|
33
71
|
export declare function ResourceProvider({ client, children }: ResourceProviderProps): any;
|
|
34
72
|
export declare function useResourceClient(): ResourceClient;
|
|
73
|
+
export declare function clearResourceClientCaches(): void;
|
|
35
74
|
export declare function resetResourceClientTestState(): void;
|
|
36
75
|
//# sourceMappingURL=resourceClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceClient.d.ts","sourceRoot":"","sources":["../../src/hooks/resourceClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resourceClient.d.ts","sourceRoot":"","sources":["../../src/hooks/resourceClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAiC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,YAAY,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAC1F,YAAY,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAMvF,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,CAAC,SAAS;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1D,QAAQ,CAAC,CAAC,SAAS;QA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