@resistdesign/voltra 3.0.0-alpha.5 → 3.0.0-alpha.50
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/README.md +392 -14
- package/api/DBX/DBXAsserts.d.ts +95 -0
- package/api/DBX/DBXRequest.d.ts +5 -0
- package/api/DBX/DBXRuntime.d.ts +5 -0
- package/api/DBX/DBXScenarioConfig.d.ts +9 -0
- package/api/DBX/DBXSeed.d.ts +124 -0
- package/api/DBX/DBXTypes.d.ts +176 -0
- package/api/DBX/index.d.ts +8 -0
- package/api/DataAccessControl.d.ts +220 -0
- package/api/Indexing/API.d.ts +224 -0
- package/api/Indexing/Cursor.d.ts +101 -0
- package/api/Indexing/Handler/Config.d.ts +39 -0
- package/api/Indexing/Handler.d.ts +166 -0
- package/api/Indexing/Trace.d.ts +54 -0
- package/api/Indexing/Types.d.ts +204 -0
- package/api/Indexing/ddb/AwsSdkV3Adapter.d.ts +8 -0
- package/api/Indexing/ddb/Types.d.ts +209 -0
- package/api/Indexing/docId.d.ts +27 -0
- package/api/Indexing/exact/ExactDdb.d.ts +58 -0
- package/api/Indexing/exact/ExactIndex.d.ts +90 -0
- package/api/Indexing/exact/ExactS3.d.ts +41 -0
- package/api/Indexing/fieldQualification.d.ts +12 -0
- package/api/Indexing/fulltext/FullTextDdbBackend.d.ts +212 -0
- package/api/Indexing/fulltext/FullTextMemoryBackend.d.ts +93 -0
- package/api/Indexing/fulltext/Schema.d.ts +164 -0
- package/api/Indexing/hashUniversal.d.ts +13 -0
- package/api/Indexing/index.d.ts +45 -0
- package/api/Indexing/lossy/LossyDdb.d.ts +43 -0
- package/api/Indexing/lossy/LossyIndex.d.ts +72 -0
- package/api/Indexing/lossy/LossyS3.d.ts +40 -0
- package/api/Indexing/rel/Cursor.d.ts +25 -0
- package/api/Indexing/rel/Handlers.d.ts +144 -0
- package/api/Indexing/rel/RelationalDdb.d.ts +169 -0
- package/api/Indexing/rel/RelationalInMemoryBackend.d.ts +38 -0
- package/api/Indexing/rel/Types.d.ts +69 -0
- package/api/Indexing/structured/Cursor.d.ts +26 -0
- package/api/Indexing/structured/Handlers.d.ts +128 -0
- package/api/Indexing/structured/SearchStructured.d.ts +44 -0
- package/api/Indexing/structured/StructuredDdb.d.ts +184 -0
- package/api/Indexing/structured/StructuredDdbBackend.d.ts +112 -0
- package/api/Indexing/structured/StructuredInMemoryBackend.d.ts +40 -0
- package/api/Indexing/structured/StructuredInMemoryIndex.d.ts +61 -0
- package/api/Indexing/structured/StructuredStringLike.d.ts +54 -0
- package/api/Indexing/structured/StructuredWriter.d.ts +74 -0
- package/api/Indexing/structured/Types.d.ts +126 -0
- package/api/Indexing/structured/index.d.ts +9 -0
- package/api/Indexing/tokenize.d.ts +31 -0
- package/api/ORM/DACUtils.d.ts +270 -0
- package/api/ORM/ListItemUtils.d.ts +40 -0
- package/api/ORM/ORMRouteMap.d.ts +70 -0
- package/api/ORM/TypeInfoORMService.d.ts +879 -0
- package/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +229 -0
- package/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +90 -0
- package/api/ORM/drivers/InMemoryDataItemDBDriver/ConfigTypes.d.ts +4 -0
- package/api/ORM/drivers/InMemoryDataItemDBDriver.d.ts +56 -0
- package/api/ORM/drivers/InMemoryFileItemDBDriver/ConfigTypes.d.ts +13 -0
- package/api/ORM/drivers/InMemoryFileItemDBDriver.d.ts +98 -0
- package/api/ORM/drivers/InMemoryItemRelationshipDBDriver.d.ts +16 -0
- package/api/ORM/drivers/IndexingRelationshipDriver.d.ts +123 -0
- package/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +322 -0
- package/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +118 -0
- package/api/ORM/drivers/S3FileItemDBDriver.d.ts +71 -0
- package/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +36 -0
- package/api/ORM/drivers/common/Types.d.ts +202 -0
- package/api/ORM/drivers/common/index.d.ts +2 -0
- package/api/ORM/drivers/index.d.ts +8 -0
- package/api/ORM/getTypeInfoORMIndexingConfigFromTypeInfoMap.d.ts +31 -0
- package/api/ORM/index.d.ts +10 -0
- package/api/ORM/indexing/criteriaToStructuredWhere.d.ts +22 -0
- package/api/Router/AWS.d.ts +80 -0
- package/api/Router/Auth.d.ts +14 -0
- package/api/Router/CORS.d.ts +66 -0
- package/api/Router/Types.d.ts +138 -0
- package/api/Router/index.d.ts +89 -0
- package/api/index.d.ts +72 -6
- package/api/index.js +3551 -1946
- package/app/forms/Engine.d.ts +23 -0
- package/app/forms/UI.d.ts +83 -0
- package/app/forms/core/createAutoField.d.ts +43 -0
- package/app/forms/core/createFormRenderer.d.ts +25 -0
- package/app/forms/core/getFieldKind.d.ts +14 -0
- package/app/forms/core/index.d.ts +11 -0
- package/app/forms/core/mergeSuites.d.ts +23 -0
- package/app/forms/core/resolveSuite.d.ts +15 -0
- package/app/forms/core/types.d.ts +180 -0
- package/app/forms/index.d.ts +9 -0
- package/app/forms/types.d.ts +137 -0
- package/app/helpers/styled.d.ts +3 -0
- package/app/index.d.ts +116 -5
- package/app/index.js +120 -382
- package/app/utils/ApplicationState.d.ts +161 -0
- package/app/utils/ApplicationStateLoader.d.ts +91 -0
- package/app/utils/Controller.d.ts +10 -0
- package/app/utils/Debug.d.ts +14 -0
- package/app/utils/EasyLayout.d.ts +89 -0
- package/app/utils/History.d.ts +165 -0
- package/app/utils/Route.d.ts +207 -0
- package/app/utils/RouteHistory.d.ts +27 -0
- package/app/utils/Service.d.ts +45 -0
- package/app/utils/TypeInfoORMAPIUtils.d.ts +94 -0
- package/app/utils/TypeInfoORMClient.d.ts +104 -0
- package/app/utils/UniversalRouteAdapter.d.ts +73 -0
- package/app/utils/easy-layout/computeAreaBounds.d.ts +5 -0
- package/app/utils/easy-layout/computeTracks.d.ts +16 -0
- package/app/utils/easy-layout/index.d.ts +5 -0
- package/app/utils/easy-layout/parseTemplate.d.ts +12 -0
- package/app/utils/easy-layout/types.d.ts +52 -0
- package/app/utils/easy-layout/validateAreas.d.ts +5 -0
- package/app/utils/index.d.ts +24 -0
- package/build/TypeMapping.d.ts +17 -0
- package/build/TypeParsing.d.ts +10 -0
- package/build/index.d.ts +15 -0
- package/build/index.js +569 -0
- package/chunk-2JDOM6PB.js +138 -0
- package/chunk-3HVYVX3S.js +546 -0
- package/chunk-ATO2455Q.js +258 -0
- package/chunk-BSHQIRBV.js +71 -0
- package/chunk-I2KLQ2HA.js +19 -0
- package/chunk-K4R2PFNG.js +1258 -0
- package/chunk-TJFTWPXQ.js +39 -0
- package/chunk-XHOMAXLR.js +84 -0
- package/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +9 -0
- package/common/CommandLine/index.d.ts +6 -0
- package/common/HelperTypes.d.ts +9 -0
- package/common/IdGeneration/getSimpleId.d.ts +8 -0
- package/common/IdGeneration/index.d.ts +1 -0
- package/common/ItemRelationshipInfoTypes.d.ts +64 -0
- package/common/ItemRelationships/ItemRelationshipValidation.d.ts +21 -0
- package/common/ItemRelationships/index.d.ts +2 -0
- package/common/Logging/Utils.d.ts +10 -0
- package/common/Logging/index.d.ts +1 -0
- package/common/Routing.d.ts +81 -0
- package/common/SearchTypes.d.ts +227 -0
- package/common/SearchUtils.d.ts +55 -0
- package/common/SearchValidation.d.ts +27 -0
- package/common/StringTransformers.d.ts +28 -0
- package/common/Testing/CLI.d.ts +6 -0
- package/common/Testing/Types.d.ts +216 -0
- package/common/Testing/Utils.d.ts +112 -0
- package/common/Testing/index.d.ts +8 -0
- package/common/TypeInfoDataItemUtils.d.ts +39 -0
- package/{Types-C7XjUjoF.d.ts → common/TypeInfoORM/Types.d.ts} +150 -20
- package/common/TypeInfoORM/index.d.ts +3 -0
- package/common/TypeParsing/Constants.d.ts +4 -0
- package/common/TypeParsing/ParsingUtils/Constants.d.ts +8 -0
- package/common/TypeParsing/ParsingUtils/checkType.d.ts +14 -0
- package/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +12 -0
- package/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +8 -0
- package/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +12 -0
- package/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +14 -0
- package/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +18 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +9 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +9 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +11 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +12 -0
- package/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +11 -0
- package/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +9 -0
- package/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +11 -0
- package/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +8 -0
- package/common/TypeParsing/TypeInfo.d.ts +235 -0
- package/common/TypeParsing/Utils.d.ts +47 -0
- package/common/TypeParsing/Validation.d.ts +327 -0
- package/common/TypeParsing/index.d.ts +8 -0
- package/common/index.d.ts +47 -4
- package/common/index.js +25 -1737
- package/{index-BkFZlfit.d.ts → iac/SimpleCFT.d.ts} +5 -25
- package/iac/index.d.ts +40 -2
- package/iac/index.js +2 -1661
- package/iac/packs/auth.d.ts +131 -0
- package/iac/packs/build/utils.d.ts +289 -0
- package/iac/packs/build.d.ts +92 -0
- package/iac/packs/cdn.d.ts +33 -0
- package/iac/packs/cloud-function.d.ts +67 -0
- package/iac/packs/database.d.ts +32 -0
- package/iac/packs/dns.d.ts +34 -0
- package/iac/packs/file-storage.d.ts +46 -0
- package/iac/packs/gateway.d.ts +82 -0
- package/iac/packs/index.d.ts +60 -1
- package/iac/packs/index.js +391 -594
- package/iac/packs/repo.d.ts +28 -0
- package/iac/packs/ssl-certificate.d.ts +28 -0
- package/iac/types/Constants.d.ts +24 -0
- package/{index-DcvJOZ_c.d.ts → iac/types/IaCTypes.d.ts} +23 -1018
- package/iac/types/Renderers.d.ts +96 -0
- package/iac/types/Types.d.ts +131 -0
- package/iac/types/Utils.d.ts +9 -0
- package/iac/types/generate.d.ts +1 -0
- package/iac/utils/index.d.ts +87 -0
- package/iac/utils/patch-utils.d.ts +66 -0
- package/iac-packs/index.d.ts +6 -0
- package/native/forms/UI.d.ts +73 -0
- package/native/forms/createNativeFormRenderer.d.ts +21 -0
- package/native/forms/index.d.ts +25 -0
- package/native/forms/primitives/index.d.ts +38 -0
- package/native/forms/suite.d.ts +15 -0
- package/native/index.d.ts +19 -0
- package/native/index.js +792 -0
- package/native/testing/react-native.d.ts +46 -0
- package/native/utils/EasyLayout.d.ts +88 -0
- package/native/utils/History.d.ts +124 -0
- package/native/utils/NavButton.d.ts +25 -0
- package/native/utils/Route.d.ts +41 -0
- package/native/utils/index.d.ts +25 -0
- package/package.json +54 -21
- package/web/forms/UI.d.ts +74 -0
- package/web/forms/createWebFormRenderer.d.ts +21 -0
- package/web/forms/index.d.ts +9 -0
- package/web/forms/primitives/index.d.ts +21 -0
- package/web/forms/suite.d.ts +15 -0
- package/web/index.d.ts +15 -0
- package/web/index.js +701 -0
- package/web/utils/EasyLayout.d.ts +47 -0
- package/web/utils/NavLink.d.ts +24 -0
- package/web/utils/Route.d.ts +16 -0
- package/web/utils/index.d.ts +8 -0
- package/SearchTypes-DjN6YQzE.d.ts +0 -577
- package/Validation-CFP59oIP.d.ts +0 -226
- package/index-C3-iD9Mh.d.ts +0 -690
- package/index-CK5Qwvfb.d.ts +0 -5378
- package/index-IokxSNxm.d.ts +0 -745
- package/index.d.ts +0 -13
- package/index.js +0 -11005
package/app/index.js
CHANGED
|
@@ -1,57 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
export { createEasyLayout, getEasyLayoutTemplateDetails, getPascalCaseAreaName } from '../chunk-BSHQIRBV.js';
|
|
2
|
+
export { computeTrackPixels } from '../chunk-TJFTWPXQ.js';
|
|
3
|
+
export { AutoForm, AutoFormView, Route, RouteContext, RouteContextConsumer, RouteContextProvider, RouteProvider, buildHistoryPath, buildQueryString, buildRoutePath, canUseBrowserHistory, computeAreaBounds, createAutoField, createBrowserRouteAdapter, createFormRenderer, createHistoryBackHandler, createManualRouteAdapter, createMemoryHistory, createNativeRouteAdapter, createRouteAdapterFromHistory, createUniversalAdapter, defaultTranslateValidationErrorCode, getFieldKind, parseHistoryPath, parseTemplate, resolveSuite, useFormEngine, useRouteContext, validateAreas, wrapRouteAdapterWithPathResolver } from '../chunk-K4R2PFNG.js';
|
|
4
|
+
import '../chunk-XHOMAXLR.js';
|
|
5
|
+
import '../chunk-3HVYVX3S.js';
|
|
6
|
+
import { mergeStringPaths, PATH_DELIMITER } from '../chunk-2JDOM6PB.js';
|
|
7
|
+
import '../chunk-I2KLQ2HA.js';
|
|
8
|
+
import { createContext, useContext, useMemo, useCallback, useState, useRef, useEffect } from 'react';
|
|
2
9
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// src/app/utils/index.ts
|
|
12
|
-
var utils_exports = {};
|
|
13
|
-
__export(utils_exports, {
|
|
14
|
-
ApplicationStateContext: () => ApplicationStateContext,
|
|
15
|
-
ApplicationStateProvider: () => ApplicationStateProvider,
|
|
16
|
-
Route: () => Route,
|
|
17
|
-
RouteContext: () => RouteContext,
|
|
18
|
-
RouteContextConsumer: () => RouteContextConsumer,
|
|
19
|
-
RouteContextProvider: () => RouteContextProvider,
|
|
20
|
-
TypeInfoORMClient: () => TypeInfoORMClient,
|
|
21
|
-
getApplicationStateIdentifier: () => getApplicationStateIdentifier,
|
|
22
|
-
getApplicationStateModified: () => getApplicationStateModified,
|
|
23
|
-
getApplicationStateValue: () => getApplicationStateValue,
|
|
24
|
-
getApplicationStateValueStructure: () => getApplicationStateValueStructure,
|
|
25
|
-
getChangedDependencyIndexes: () => getChangedDependencyIndexes,
|
|
26
|
-
getEasyLayout: () => getEasyLayout,
|
|
27
|
-
getEasyLayoutTemplateDetails: () => getEasyLayoutTemplateDetails,
|
|
28
|
-
getFullUrl: () => getFullUrl,
|
|
29
|
-
getPascalCaseAreaName: () => getPascalCaseAreaName,
|
|
30
|
-
handleRequest: () => handleRequest,
|
|
31
|
-
requestHandlerFactory: () => requestHandlerFactory,
|
|
32
|
-
sendServiceRequest: () => sendServiceRequest,
|
|
33
|
-
setApplicationStateModified: () => setApplicationStateModified,
|
|
34
|
-
setApplicationStateValue: () => setApplicationStateValue,
|
|
35
|
-
useApplicationStateLoader: () => useApplicationStateLoader,
|
|
36
|
-
useApplicationStateValue: () => useApplicationStateValue,
|
|
37
|
-
useApplicationStateValueStructure: () => useApplicationStateValueStructure,
|
|
38
|
-
useController: () => useController,
|
|
39
|
-
useDebugDependencies: () => useDebugDependencies,
|
|
40
|
-
useRouteContext: () => useRouteContext,
|
|
41
|
-
useTypeInfoORMAPI: () => useTypeInfoORMAPI
|
|
42
|
-
});
|
|
43
|
-
var getApplicationStateIdentifier = (subStateIdMap) => subStateIdMap ? subStateIdMap : {};
|
|
11
|
+
function getApplicationStateIdentifier(subStateIdMap) {
|
|
12
|
+
return subStateIdMap ? subStateIdMap : {};
|
|
13
|
+
}
|
|
44
14
|
var getApplicationStateModified = (identifier, modificationState) => !!modificationState.get(identifier);
|
|
45
15
|
var getApplicationStateValue = (identifier, applicationState) => applicationState.get(identifier);
|
|
46
16
|
var setApplicationStateModified = (identifier, value, modificationState) => new Map(modificationState).set(identifier, value);
|
|
47
17
|
var setApplicationStateValue = (identifier, value, applicationState) => new Map(applicationState).set(identifier, value);
|
|
48
|
-
var getApplicationStateValueStructure = (idStructure, applicationState) => Object.keys(idStructure).reduce(
|
|
49
|
-
(acc, k) => ({
|
|
50
|
-
...acc,
|
|
51
|
-
[k]: getApplicationStateValue(idStructure[k], applicationState)
|
|
52
|
-
}),
|
|
53
|
-
{}
|
|
54
|
-
);
|
|
55
18
|
var ApplicationStateContext = createContext({
|
|
56
19
|
modified: /* @__PURE__ */ new Map(),
|
|
57
20
|
value: /* @__PURE__ */ new Map(),
|
|
@@ -68,8 +31,6 @@ var useApplicationStateValue = (identifier) => {
|
|
|
68
31
|
onChange: setApplicationState,
|
|
69
32
|
setModified: setModificationState
|
|
70
33
|
} = useContext(ApplicationStateContext);
|
|
71
|
-
const appStateRef = useRef(applicationState);
|
|
72
|
-
appStateRef.current = applicationState;
|
|
73
34
|
const modified = useMemo(
|
|
74
35
|
() => getApplicationStateModified(identifier, modificationState),
|
|
75
36
|
[identifier, modificationState]
|
|
@@ -81,19 +42,30 @@ var useApplicationStateValue = (identifier) => {
|
|
|
81
42
|
const setModified = useCallback(
|
|
82
43
|
(isModified) => {
|
|
83
44
|
setModificationState(
|
|
84
|
-
setApplicationStateModified(identifier, isModified,
|
|
45
|
+
(previousModified) => setApplicationStateModified(identifier, isModified, previousModified)
|
|
85
46
|
);
|
|
86
47
|
},
|
|
87
48
|
[identifier, setModificationState]
|
|
88
49
|
);
|
|
89
50
|
const onChange = useCallback(
|
|
90
51
|
(newValue) => {
|
|
91
|
-
setApplicationState(
|
|
92
|
-
|
|
52
|
+
setApplicationState((previousState) => {
|
|
53
|
+
const previousValue = getApplicationStateValue(
|
|
54
|
+
identifier,
|
|
55
|
+
previousState
|
|
56
|
+
);
|
|
57
|
+
const resolvedValue = typeof newValue === "function" ? newValue(previousValue) : newValue;
|
|
58
|
+
return setApplicationStateValue(
|
|
59
|
+
identifier,
|
|
60
|
+
resolvedValue,
|
|
61
|
+
previousState
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
|
+
setModificationState(
|
|
65
|
+
(previousModified) => setApplicationStateModified(identifier, true, previousModified)
|
|
93
66
|
);
|
|
94
|
-
setModified(true);
|
|
95
67
|
},
|
|
96
|
-
[identifier, setApplicationState]
|
|
68
|
+
[identifier, setApplicationState, setModificationState]
|
|
97
69
|
);
|
|
98
70
|
const controller = useMemo(
|
|
99
71
|
() => ({
|
|
@@ -106,41 +78,6 @@ var useApplicationStateValue = (identifier) => {
|
|
|
106
78
|
);
|
|
107
79
|
return controller;
|
|
108
80
|
};
|
|
109
|
-
var useApplicationStateValueStructure = (idStructure) => {
|
|
110
|
-
const { value: applicationState, onChange: setApplicationState } = useContext(
|
|
111
|
-
ApplicationStateContext
|
|
112
|
-
);
|
|
113
|
-
const valueStructure = useMemo(
|
|
114
|
-
() => getApplicationStateValueStructure(idStructure, applicationState),
|
|
115
|
-
[applicationState, idStructure]
|
|
116
|
-
);
|
|
117
|
-
const onChangeStructure = useMemo(
|
|
118
|
-
() => Object.keys(idStructure).reduce(
|
|
119
|
-
(acc, k) => ({
|
|
120
|
-
...acc,
|
|
121
|
-
[k]: (newValue) => {
|
|
122
|
-
setApplicationState(
|
|
123
|
-
setApplicationStateValue(
|
|
124
|
-
idStructure[k],
|
|
125
|
-
newValue,
|
|
126
|
-
applicationState
|
|
127
|
-
)
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
}),
|
|
131
|
-
{}
|
|
132
|
-
),
|
|
133
|
-
[applicationState, idStructure, setApplicationState]
|
|
134
|
-
);
|
|
135
|
-
const controller = useMemo(
|
|
136
|
-
() => ({
|
|
137
|
-
valueStructure,
|
|
138
|
-
onChangeStructure
|
|
139
|
-
}),
|
|
140
|
-
[onChangeStructure, valueStructure]
|
|
141
|
-
);
|
|
142
|
-
return controller;
|
|
143
|
-
};
|
|
144
81
|
var ApplicationStateProvider = ({
|
|
145
82
|
children
|
|
146
83
|
}) => {
|
|
@@ -160,102 +97,31 @@ var ApplicationStateProvider = ({
|
|
|
160
97
|
return /* @__PURE__ */ jsx(Provider, { value: controller, children });
|
|
161
98
|
};
|
|
162
99
|
|
|
163
|
-
// src/common/Routing.ts
|
|
164
|
-
var PATH_DELIMITER = "/";
|
|
165
|
-
var getPotentialJSONValue = (value) => {
|
|
166
|
-
try {
|
|
167
|
-
return JSON.parse(value);
|
|
168
|
-
} catch (error) {
|
|
169
|
-
return value;
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
var getPathArray = (path, delimiter = PATH_DELIMITER, filterEmptyOutput = false, filterEmptyInput = true, useJson = true, uriDecodeParts = true) => path.split(delimiter).filter(filterEmptyInput ? (p) => p !== "" : () => true).map(uriDecodeParts ? decodeURIComponent : (x) => x).map(useJson ? getPotentialJSONValue : (p) => p).filter(filterEmptyOutput ? (p) => p ?? false : () => true);
|
|
173
|
-
var getPathString = (parts = [], delimiter = PATH_DELIMITER, filterEmptyInput = false, useJson = true, uriEncodeParts = false) => parts.filter(filterEmptyInput ? (p) => p ?? false : () => true).map(useJson ? (p) => JSON.stringify(p) : (x) => x).map(uriEncodeParts ? encodeURIComponent : (x) => x).join(delimiter);
|
|
174
|
-
var mergeStringPaths = (path1, path2, delimiter = PATH_DELIMITER, filterEmptyOutput = false, filterEmptyInput = true, useJson = true, uriEncodeParts = false) => getPathString(
|
|
175
|
-
[
|
|
176
|
-
...getPathArray(
|
|
177
|
-
path1,
|
|
178
|
-
delimiter,
|
|
179
|
-
filterEmptyOutput,
|
|
180
|
-
filterEmptyInput,
|
|
181
|
-
useJson,
|
|
182
|
-
uriEncodeParts
|
|
183
|
-
),
|
|
184
|
-
...getPathArray(
|
|
185
|
-
path2,
|
|
186
|
-
delimiter,
|
|
187
|
-
filterEmptyOutput,
|
|
188
|
-
filterEmptyInput,
|
|
189
|
-
useJson,
|
|
190
|
-
uriEncodeParts
|
|
191
|
-
)
|
|
192
|
-
],
|
|
193
|
-
delimiter,
|
|
194
|
-
filterEmptyInput,
|
|
195
|
-
useJson,
|
|
196
|
-
uriEncodeParts
|
|
197
|
-
);
|
|
198
|
-
var resolvePath = (currentPath, newPath) => {
|
|
199
|
-
const newSegments = getPathArray(newPath, PATH_DELIMITER, true);
|
|
200
|
-
let currentSegments = getPathArray(currentPath, PATH_DELIMITER, true);
|
|
201
|
-
if (newPath.startsWith("/")) {
|
|
202
|
-
currentSegments = [];
|
|
203
|
-
}
|
|
204
|
-
newSegments.forEach((segment) => {
|
|
205
|
-
if (segment === "..") {
|
|
206
|
-
if (currentSegments.length > 0) {
|
|
207
|
-
currentSegments.pop();
|
|
208
|
-
}
|
|
209
|
-
} else if (segment !== ".") {
|
|
210
|
-
currentSegments.push(segment);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
return "/" + currentSegments.join("/");
|
|
214
|
-
};
|
|
215
|
-
var getParamsAndTestPath = (path, testPath, exact = false) => {
|
|
216
|
-
const pathList = getPathArray(path);
|
|
217
|
-
const testPathList = getPathArray(testPath);
|
|
218
|
-
if (exact && pathList.length !== testPathList.length) {
|
|
219
|
-
return false;
|
|
220
|
-
} else {
|
|
221
|
-
let params = {};
|
|
222
|
-
if (pathList.length >= testPathList.length) {
|
|
223
|
-
for (let i = 0; i < testPathList.length; i++) {
|
|
224
|
-
const testPathPart = testPathList[i];
|
|
225
|
-
const pathPart = pathList[i];
|
|
226
|
-
if (testPathPart.startsWith(":")) {
|
|
227
|
-
const paramName = testPathPart.slice(1);
|
|
228
|
-
params[paramName] = pathPart;
|
|
229
|
-
} else if (pathPart !== testPathPart) {
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
} else {
|
|
234
|
-
return false;
|
|
235
|
-
}
|
|
236
|
-
return params;
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
100
|
// src/app/utils/Service.ts
|
|
241
101
|
var getFullUrl = (protocol, domain, basePath = "", path = "", port) => {
|
|
102
|
+
const normalizedProtocol = protocol.endsWith(":") ? protocol.slice(0, -1) : protocol;
|
|
103
|
+
const normalizedDomain = domain.replace(/\/+$/, "");
|
|
242
104
|
const portString = !!port ? `:${port}` : "";
|
|
243
105
|
const fullPath = mergeStringPaths(
|
|
244
106
|
basePath,
|
|
245
107
|
path,
|
|
246
108
|
PATH_DELIMITER,
|
|
247
109
|
false,
|
|
248
|
-
|
|
110
|
+
true,
|
|
249
111
|
false
|
|
250
112
|
);
|
|
251
|
-
|
|
113
|
+
const normalizedPath = fullPath ? fullPath.startsWith(PATH_DELIMITER) ? fullPath : `${PATH_DELIMITER}${fullPath}` : PATH_DELIMITER;
|
|
114
|
+
return `${normalizedProtocol}://${normalizedDomain}${portString}${normalizedPath}`;
|
|
252
115
|
};
|
|
253
116
|
var sendServiceRequest = async (config, path = "", args = []) => {
|
|
254
117
|
const { protocol, domain, port, basePath = "", authorization = "" } = config;
|
|
255
118
|
const fullUrl = getFullUrl(protocol, domain, basePath, path, port);
|
|
256
|
-
const requestHeaders =
|
|
257
|
-
|
|
258
|
-
|
|
119
|
+
const requestHeaders = {
|
|
120
|
+
"Content-Type": "application/json",
|
|
121
|
+
...!!authorization ? {
|
|
122
|
+
Authorization: `Bearer ${authorization}`
|
|
123
|
+
} : {}
|
|
124
|
+
};
|
|
259
125
|
const response = await fetch(fullUrl, {
|
|
260
126
|
headers: requestHeaders,
|
|
261
127
|
credentials: "same-origin",
|
|
@@ -263,11 +129,24 @@ var sendServiceRequest = async (config, path = "", args = []) => {
|
|
|
263
129
|
body: JSON.stringify(args)
|
|
264
130
|
});
|
|
265
131
|
const { ok: responseIsOk } = response;
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
132
|
+
const textData = await response.text();
|
|
133
|
+
let data = textData;
|
|
134
|
+
try {
|
|
135
|
+
data = JSON.parse(textData);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
}
|
|
138
|
+
if (typeof data === "object") {
|
|
139
|
+
if (responseIsOk) {
|
|
140
|
+
return data;
|
|
141
|
+
} else {
|
|
142
|
+
throw data;
|
|
143
|
+
}
|
|
269
144
|
} else {
|
|
270
|
-
|
|
145
|
+
if (responseIsOk) {
|
|
146
|
+
return { data };
|
|
147
|
+
} else {
|
|
148
|
+
throw { message: data };
|
|
149
|
+
}
|
|
271
150
|
}
|
|
272
151
|
};
|
|
273
152
|
var useApplicationStateLoader = (config) => {
|
|
@@ -284,13 +163,14 @@ var useApplicationStateLoader = (config) => {
|
|
|
284
163
|
const [cacheValidity, setCacheValidity] = useState({});
|
|
285
164
|
const [loading, setLoading] = useState(false);
|
|
286
165
|
const [latestError, setLatestError] = useState();
|
|
287
|
-
const
|
|
166
|
+
const valueController = useApplicationStateValue(identifier);
|
|
167
|
+
const { onChange, setModified } = valueController;
|
|
288
168
|
const invalidate = useCallback(() => {
|
|
289
169
|
setCacheValidity({});
|
|
290
170
|
}, []);
|
|
291
171
|
const makeRemoteProcedureCall = useCallback(
|
|
292
172
|
async (...directArgs) => {
|
|
293
|
-
let success;
|
|
173
|
+
let success = false;
|
|
294
174
|
setLoading(true);
|
|
295
175
|
setLatestError(void 0);
|
|
296
176
|
try {
|
|
@@ -318,12 +198,13 @@ var useApplicationStateLoader = (config) => {
|
|
|
318
198
|
);
|
|
319
199
|
const appStateLoader = useMemo(
|
|
320
200
|
() => ({
|
|
201
|
+
...valueController,
|
|
321
202
|
loading,
|
|
322
203
|
latestError,
|
|
323
204
|
invalidate,
|
|
324
205
|
makeRemoteProcedureCall
|
|
325
206
|
}),
|
|
326
|
-
[loading, latestError, invalidate, makeRemoteProcedureCall]
|
|
207
|
+
[valueController, loading, latestError, invalidate, makeRemoteProcedureCall]
|
|
327
208
|
);
|
|
328
209
|
useEffect(() => {
|
|
329
210
|
if (!manual && argsRef.current) {
|
|
@@ -335,7 +216,7 @@ var useApplicationStateLoader = (config) => {
|
|
|
335
216
|
var getKeyValueWithoutError = (obj, key) => {
|
|
336
217
|
try {
|
|
337
218
|
return obj[key];
|
|
338
|
-
} catch (
|
|
219
|
+
} catch (_error) {
|
|
339
220
|
return void 0;
|
|
340
221
|
}
|
|
341
222
|
};
|
|
@@ -346,7 +227,8 @@ var useController = (parentValue, key, onParentValueChange, isArrayIndex = false
|
|
|
346
227
|
try {
|
|
347
228
|
setValue(value2);
|
|
348
229
|
if (isArrayIndex) {
|
|
349
|
-
const
|
|
230
|
+
const baseArray = Array.isArray(parentValue) ? parentValue : [];
|
|
231
|
+
const newArray = [...baseArray];
|
|
350
232
|
newArray[key] = value2;
|
|
351
233
|
onParentValueChange(newArray);
|
|
352
234
|
} else {
|
|
@@ -355,7 +237,7 @@ var useController = (parentValue, key, onParentValueChange, isArrayIndex = false
|
|
|
355
237
|
[key]: value2
|
|
356
238
|
});
|
|
357
239
|
}
|
|
358
|
-
} catch (
|
|
240
|
+
} catch (_error) {
|
|
359
241
|
}
|
|
360
242
|
},
|
|
361
243
|
[parentValue, key, onParentValueChange, isArrayIndex]
|
|
@@ -363,7 +245,7 @@ var useController = (parentValue, key, onParentValueChange, isArrayIndex = false
|
|
|
363
245
|
useEffect(() => {
|
|
364
246
|
try {
|
|
365
247
|
setValue(getKeyValueWithoutError(parentValue, key));
|
|
366
|
-
} catch (
|
|
248
|
+
} catch (_error) {
|
|
367
249
|
setValue(void 0);
|
|
368
250
|
}
|
|
369
251
|
}, [parentValue, key]);
|
|
@@ -388,202 +270,33 @@ var useDebugDependencies = (dependencies) => {
|
|
|
388
270
|
prevDeps.current = dependencies;
|
|
389
271
|
}, dependencies);
|
|
390
272
|
};
|
|
391
|
-
|
|
392
|
-
|
|
273
|
+
|
|
274
|
+
// src/common/IdGeneration/getSimpleId.ts
|
|
275
|
+
var LAST_HAST_ID = 0;
|
|
276
|
+
var textEncoder = new TextEncoder();
|
|
277
|
+
var bytesToBinaryString = (bytes) => {
|
|
278
|
+
let out = "";
|
|
279
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
280
|
+
out += String.fromCharCode(bytes[i]);
|
|
281
|
+
}
|
|
282
|
+
return out;
|
|
393
283
|
};
|
|
394
|
-
var
|
|
395
|
-
const
|
|
396
|
-
let
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
284
|
+
var getBase64EncodedString = (input) => {
|
|
285
|
+
const bytes = textEncoder.encode(input);
|
|
286
|
+
let base64 = "";
|
|
287
|
+
if (typeof globalThis.btoa === "function") {
|
|
288
|
+
const binary = bytesToBinaryString(bytes);
|
|
289
|
+
base64 = globalThis.btoa(binary);
|
|
290
|
+
} else {
|
|
291
|
+
const anyGlobal = globalThis;
|
|
292
|
+
if (typeof anyGlobal.Buffer === "function") {
|
|
293
|
+
base64 = anyGlobal.Buffer.from(bytes).toString("base64");
|
|
404
294
|
} else {
|
|
405
|
-
|
|
406
|
-
if (parts[0]) {
|
|
407
|
-
areaRows = [...areaRows, parts[0]];
|
|
408
|
-
if (parts[1]) {
|
|
409
|
-
rows = [...rows, parts[1]];
|
|
410
|
-
}
|
|
411
|
-
}
|
|
295
|
+
throw new Error("No base64 encoder available (need btoa or Buffer).");
|
|
412
296
|
}
|
|
413
297
|
}
|
|
414
|
-
|
|
415
|
-
grid-template-areas:
|
|
416
|
-
${areaRows.filter((a) => !!(a && a.trim())).map((a) => ` "${a}"`).join("\n")};`;
|
|
417
|
-
if (rows.length) {
|
|
418
|
-
css += `
|
|
419
|
-
grid-template-rows: ${rows.filter((r) => !!(r && r.trim())).join(" ")};`;
|
|
420
|
-
}
|
|
421
|
-
const areasList = Object.keys(
|
|
422
|
-
areaRows.reduce(
|
|
423
|
-
(acc, a) => [
|
|
424
|
-
...acc,
|
|
425
|
-
...a.split(" ").map((a2) => a2 && a2.trim()).filter((a2) => !!a2)
|
|
426
|
-
],
|
|
427
|
-
[]
|
|
428
|
-
).reduce((acc, a) => ({ ...acc, [a]: true }), {})
|
|
429
|
-
);
|
|
430
|
-
return {
|
|
431
|
-
areasList,
|
|
432
|
-
css
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
|
-
var getEasyLayoutTemplateDetails = (layout = "") => convertLayoutToCSS(layout);
|
|
436
|
-
var getEasyLayout = (extendFrom, areasExtendFrom) => {
|
|
437
|
-
return (layoutTemplate, ...expressions) => {
|
|
438
|
-
const mergedTemplate = layoutTemplate.reduce((acc, l, ind) => {
|
|
439
|
-
const expr = expressions[ind - 1];
|
|
440
|
-
const exprStr = typeof expr === "undefined" ? "" : expr;
|
|
441
|
-
return `${acc}${l}${exprStr}`;
|
|
442
|
-
}, "");
|
|
443
|
-
const { areasList, css } = convertLayoutToCSS(mergedTemplate);
|
|
444
|
-
const baseLayoutComp = extendFrom ? styled(extendFrom) : styled.div;
|
|
445
|
-
const layout = baseLayoutComp`
|
|
446
|
-
display: grid;
|
|
447
|
-
${css}
|
|
448
|
-
`;
|
|
449
|
-
const areas = areasList.reduce((acc, area) => {
|
|
450
|
-
const pascalCaseAreaName = getPascalCaseAreaName(area);
|
|
451
|
-
const baseCompFunc = areasExtendFrom ? styled(areasExtendFrom) : styled.div;
|
|
452
|
-
const component = baseCompFunc`
|
|
453
|
-
grid-area: ${area};
|
|
454
|
-
`;
|
|
455
|
-
return {
|
|
456
|
-
...acc,
|
|
457
|
-
[pascalCaseAreaName]: component
|
|
458
|
-
};
|
|
459
|
-
}, {});
|
|
460
|
-
return {
|
|
461
|
-
layout,
|
|
462
|
-
areas
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
};
|
|
466
|
-
(function(history2) {
|
|
467
|
-
const pushState = history2.pushState;
|
|
468
|
-
history2.pushState = function(state, ...remainingArguments) {
|
|
469
|
-
if (typeof history2.onpushstate == "function") {
|
|
470
|
-
history2.onpushstate({ state });
|
|
471
|
-
}
|
|
472
|
-
const result = pushState.apply(history2, [state, ...remainingArguments]);
|
|
473
|
-
window.dispatchEvent(new CustomEvent("statechanged", { detail: state }));
|
|
474
|
-
return result;
|
|
475
|
-
};
|
|
476
|
-
})(window.history);
|
|
477
|
-
var CURRENT_PATH = window.location.pathname;
|
|
478
|
-
var RouteContext = createContext({
|
|
479
|
-
currentWindowPath: CURRENT_PATH,
|
|
480
|
-
parentPath: "",
|
|
481
|
-
params: {},
|
|
482
|
-
isTopLevel: true
|
|
483
|
-
});
|
|
484
|
-
var {
|
|
485
|
-
/**
|
|
486
|
-
* @ignore
|
|
487
|
-
* */
|
|
488
|
-
Provider: RouteContextProvider,
|
|
489
|
-
/**
|
|
490
|
-
* @ignore
|
|
491
|
-
* */
|
|
492
|
-
Consumer: RouteContextConsumer
|
|
493
|
-
} = RouteContext;
|
|
494
|
-
var useRouteContext = () => useContext(RouteContext);
|
|
495
|
-
var Route = ({
|
|
496
|
-
/**
|
|
497
|
-
* Use `:` as the first character to denote a parameter in the path.
|
|
498
|
-
* */
|
|
499
|
-
path = "",
|
|
500
|
-
onParamsChange,
|
|
501
|
-
exact = false,
|
|
502
|
-
children
|
|
503
|
-
}) => {
|
|
504
|
-
const [currentPath = "", setCurrentPath] = useState(CURRENT_PATH);
|
|
505
|
-
const {
|
|
506
|
-
currentWindowPath = "",
|
|
507
|
-
parentPath = "",
|
|
508
|
-
params: parentParams = {},
|
|
509
|
-
isTopLevel
|
|
510
|
-
} = useRouteContext();
|
|
511
|
-
const targetCurrentPath = useMemo(
|
|
512
|
-
() => isTopLevel ? currentPath : currentWindowPath,
|
|
513
|
-
[isTopLevel, currentPath, currentWindowPath]
|
|
514
|
-
);
|
|
515
|
-
const fullPath = useMemo(
|
|
516
|
-
() => mergeStringPaths(parentPath, path),
|
|
517
|
-
[parentPath, path]
|
|
518
|
-
);
|
|
519
|
-
const newParams = useMemo(
|
|
520
|
-
() => getParamsAndTestPath(targetCurrentPath, fullPath, exact),
|
|
521
|
-
[targetCurrentPath, fullPath, exact]
|
|
522
|
-
);
|
|
523
|
-
const params = useMemo(
|
|
524
|
-
() => ({
|
|
525
|
-
...parentParams,
|
|
526
|
-
...newParams ? newParams : {}
|
|
527
|
-
}),
|
|
528
|
-
[parentParams, newParams]
|
|
529
|
-
);
|
|
530
|
-
const newRouteContext = useMemo(
|
|
531
|
-
() => ({
|
|
532
|
-
currentWindowPath: targetCurrentPath,
|
|
533
|
-
parentPath: fullPath,
|
|
534
|
-
params,
|
|
535
|
-
isTopLevel: false
|
|
536
|
-
}),
|
|
537
|
-
[targetCurrentPath, fullPath, params]
|
|
538
|
-
);
|
|
539
|
-
useEffect(() => {
|
|
540
|
-
if (onParamsChange) {
|
|
541
|
-
onParamsChange(params);
|
|
542
|
-
}
|
|
543
|
-
}, [params, onParamsChange]);
|
|
544
|
-
useEffect(() => {
|
|
545
|
-
if (isTopLevel) {
|
|
546
|
-
const handleAnchorClick = (event) => {
|
|
547
|
-
let target = event.target;
|
|
548
|
-
while (target && target.nodeName !== "A") {
|
|
549
|
-
target = target.parentNode;
|
|
550
|
-
}
|
|
551
|
-
if (target && target.nodeName === "A") {
|
|
552
|
-
const aTarget = target;
|
|
553
|
-
const href = aTarget.getAttribute("href");
|
|
554
|
-
const title = aTarget.getAttribute("title") ?? "";
|
|
555
|
-
try {
|
|
556
|
-
new URL(href ? href : "");
|
|
557
|
-
} catch (error) {
|
|
558
|
-
const newPath = resolvePath(
|
|
559
|
-
window.location.pathname,
|
|
560
|
-
href ? href : ""
|
|
561
|
-
);
|
|
562
|
-
event.preventDefault();
|
|
563
|
-
history.pushState({}, title, newPath);
|
|
564
|
-
setCurrentPath(newPath);
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
const handlePopOrReplaceState = () => {
|
|
569
|
-
setCurrentPath(window.location.pathname);
|
|
570
|
-
};
|
|
571
|
-
window.document.addEventListener("click", handleAnchorClick);
|
|
572
|
-
window.addEventListener("popstate", handlePopOrReplaceState);
|
|
573
|
-
window.addEventListener("statechanged", handlePopOrReplaceState);
|
|
574
|
-
return () => {
|
|
575
|
-
window.document.removeEventListener("click", handleAnchorClick);
|
|
576
|
-
window.removeEventListener("popstate", handlePopOrReplaceState);
|
|
577
|
-
window.removeEventListener("statechanged", handlePopOrReplaceState);
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
}, [isTopLevel]);
|
|
581
|
-
return newParams ? /* @__PURE__ */ jsx(RouteContextProvider, { value: newRouteContext, children }) : null;
|
|
298
|
+
return base64;
|
|
582
299
|
};
|
|
583
|
-
|
|
584
|
-
// src/common/IdGeneration/getSimpleId.ts
|
|
585
|
-
var LAST_HAST_ID = 0;
|
|
586
|
-
var getBase64EncodedString = (input) => Buffer.from(input).toString("base64");
|
|
587
300
|
var getSimpleId = () => {
|
|
588
301
|
const hashId = LAST_HAST_ID++;
|
|
589
302
|
const base64Datetime = getBase64EncodedString(
|
|
@@ -653,8 +366,7 @@ var useTypeInfoORMAPI = (typeInfoORMAPI) => {
|
|
|
653
366
|
);
|
|
654
367
|
const api = useMemo(() => {
|
|
655
368
|
const apiBase = {};
|
|
656
|
-
for (const
|
|
657
|
-
const methodName = aM;
|
|
369
|
+
for (const methodName of Object.keys(typeInfoORMAPI)) {
|
|
658
370
|
apiBase[methodName] = requestHandlerFactory(
|
|
659
371
|
typeInfoORMAPI,
|
|
660
372
|
methodName,
|
|
@@ -687,7 +399,11 @@ var TypeInfoORMClient = class {
|
|
|
687
399
|
* @returns Parsed response payload.
|
|
688
400
|
*/
|
|
689
401
|
makeRequest = async (path, args) => {
|
|
690
|
-
const
|
|
402
|
+
const cleanedArgs = [...args];
|
|
403
|
+
while (cleanedArgs.length > 0 && typeof cleanedArgs[cleanedArgs.length - 1] === "undefined") {
|
|
404
|
+
cleanedArgs.pop();
|
|
405
|
+
}
|
|
406
|
+
const result = await sendServiceRequest(this.config, path, cleanedArgs);
|
|
691
407
|
return result;
|
|
692
408
|
};
|
|
693
409
|
/**
|
|
@@ -710,10 +426,11 @@ var TypeInfoORMClient = class {
|
|
|
710
426
|
* @param primaryFieldValue - Primary field value to lookup.
|
|
711
427
|
* @returns The retrieved item, if found.
|
|
712
428
|
*/
|
|
713
|
-
read = async (typeName, primaryFieldValue) => {
|
|
429
|
+
read = async (typeName, primaryFieldValue, selectedFields) => {
|
|
714
430
|
return await this.makeRequest("read" /* READ */, [
|
|
715
431
|
typeName,
|
|
716
|
-
primaryFieldValue
|
|
432
|
+
primaryFieldValue,
|
|
433
|
+
selectedFields
|
|
717
434
|
]);
|
|
718
435
|
};
|
|
719
436
|
/**
|
|
@@ -721,12 +438,14 @@ var TypeInfoORMClient = class {
|
|
|
721
438
|
*
|
|
722
439
|
* @param typeName - TypeInfo type name.
|
|
723
440
|
* @param item - Updated item payload.
|
|
441
|
+
* @param updateConfig - Optional per-field operator config.
|
|
724
442
|
* @returns Whether the update succeeded.
|
|
725
443
|
*/
|
|
726
|
-
update = async (typeName, item) => {
|
|
444
|
+
update = async (typeName, item, updateConfig) => {
|
|
727
445
|
return await this.makeRequest("update" /* UPDATE */, [
|
|
728
446
|
typeName,
|
|
729
|
-
item
|
|
447
|
+
item,
|
|
448
|
+
updateConfig
|
|
730
449
|
]);
|
|
731
450
|
};
|
|
732
451
|
/**
|
|
@@ -807,4 +526,23 @@ var TypeInfoORMClient = class {
|
|
|
807
526
|
};
|
|
808
527
|
};
|
|
809
528
|
|
|
810
|
-
|
|
529
|
+
// src/app/forms/core/mergeSuites.ts
|
|
530
|
+
var mergeSuites = (base, overrides) => {
|
|
531
|
+
return {
|
|
532
|
+
renderers: {
|
|
533
|
+
...base.renderers ?? {},
|
|
534
|
+
...overrides.renderers ?? {}
|
|
535
|
+
},
|
|
536
|
+
primitives: {
|
|
537
|
+
...base.primitives ?? {},
|
|
538
|
+
...overrides.primitives ?? {}
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
var withRendererOverride = (kind, renderer) => ({
|
|
543
|
+
renderers: {
|
|
544
|
+
[kind]: renderer
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
export { ApplicationStateContext, ApplicationStateProvider, TypeInfoORMClient, getApplicationStateIdentifier, getApplicationStateModified, getApplicationStateValue, getChangedDependencyIndexes, getFullUrl, handleRequest, mergeSuites, requestHandlerFactory, sendServiceRequest, setApplicationStateModified, setApplicationStateValue, useApplicationStateLoader, useApplicationStateValue, useController, useDebugDependencies, useTypeInfoORMAPI, withRendererOverride };
|