@kosdev-code/kos-ui-sdk 2.1.34 → 2.1.36
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/core/core/declarative/declarative-actions-wiring.d.ts +13 -0
- package/core/core/declarative/declarative-actions-wiring.d.ts.map +1 -0
- package/core/core/declarative/declarative-model-bindings.d.ts +191 -0
- package/core/core/declarative/declarative-model-bindings.d.ts.map +1 -0
- package/core/core/declarative/declarative-model-discovery.d.ts +74 -0
- package/core/core/declarative/declarative-model-discovery.d.ts.map +1 -0
- package/core/core/declarative/declarative-model-factory.d.ts +58 -0
- package/core/core/declarative/declarative-model-factory.d.ts.map +1 -0
- package/core/core/declarative/declarative-model-types.d.ts +96 -0
- package/core/core/declarative/declarative-model-types.d.ts.map +1 -0
- package/core/core/declarative/index.d.ts +7 -0
- package/core/core/declarative/index.d.ts.map +1 -0
- package/core/core/declarative/types.d.ts +304 -0
- package/core/core/declarative/types.d.ts.map +1 -0
- package/core/core/decorators/fsm-injection-utils.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +44 -0
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +20 -0
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/model/apply-kos-dev-tool-support.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +2 -0
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/index.cjs +75 -75
- package/index.cjs.map +1 -1
- package/index.js +6679 -6110
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts +20 -2
- package/models/decorators/future-service.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +1 -1
- package/models/services/config-bean/index.d.ts +2 -2
- package/models/services/config-bean/index.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for declarative model JSON configuration.
|
|
3
|
+
*
|
|
4
|
+
* These types define the schema for `.model.json` files that
|
|
5
|
+
* declare KOS models without TypeScript class definitions.
|
|
6
|
+
*/
|
|
7
|
+
/** Supported property types in declarative model definitions. */
|
|
8
|
+
export type DeclarativePropertyType = "string" | "number" | "boolean" | "object" | "array";
|
|
9
|
+
/** Declaration of a single model property. */
|
|
10
|
+
export interface DeclarativePropertyDefinition {
|
|
11
|
+
/** The property's data type. */
|
|
12
|
+
type: DeclarativePropertyType;
|
|
13
|
+
/** Default value when not provided via options. */
|
|
14
|
+
default?: unknown;
|
|
15
|
+
/**
|
|
16
|
+
* When true, the property value is extracted from the constructor
|
|
17
|
+
* options parameter rather than using the default.
|
|
18
|
+
*/
|
|
19
|
+
fromOptions?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Lifecycle phases for dependency resolution and topic registration. */
|
|
22
|
+
export type DeclarativeLifecycle = "INIT" | "LOAD" | "READY" | "ACTIVATE" | "ONLINE";
|
|
23
|
+
/**
|
|
24
|
+
* All model lifecycle phases.
|
|
25
|
+
*
|
|
26
|
+
* Forward phases: init → load → ready → activate → online
|
|
27
|
+
* Reverse phases: offline → unload → deactivate
|
|
28
|
+
*
|
|
29
|
+
* Used in the `lifecycle` section of the JSON config to declare
|
|
30
|
+
* which lifecycle phases the model participates in.
|
|
31
|
+
*/
|
|
32
|
+
export type DeclarativeLifecyclePhase = "init" | "load" | "ready" | "activate" | "online" | "offline" | "unload" | "deactivate";
|
|
33
|
+
/** Configuration for a single lifecycle hook. */
|
|
34
|
+
export interface DeclarativeLifecycleHookConfig {
|
|
35
|
+
/**
|
|
36
|
+
* Name of the handler in `bindings.lifecycle`.
|
|
37
|
+
* When omitted, defaults to the phase name (e.g., "load" → bindings.lifecycle.load).
|
|
38
|
+
*/
|
|
39
|
+
handler?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Dependency resolution strategies. */
|
|
42
|
+
export type DeclarativeResolutionPolicy = "CREATE" | "CONTINUE" | "FAIL";
|
|
43
|
+
/** Declaration of a topic handler in JSON. */
|
|
44
|
+
export interface DeclarativeTopicHandlerConfig {
|
|
45
|
+
/** Whether this is a WebSocket topic. */
|
|
46
|
+
websocket?: boolean;
|
|
47
|
+
/** Whether this is a FOS topic. */
|
|
48
|
+
fos?: boolean;
|
|
49
|
+
/** Whether this is a bridge topic. */
|
|
50
|
+
bridge?: boolean;
|
|
51
|
+
/** Lifecycle phase when the subscription is registered. */
|
|
52
|
+
lifecycle?: DeclarativeLifecycle;
|
|
53
|
+
/**
|
|
54
|
+
* Name of the handler function in the model bindings.
|
|
55
|
+
* If not provided, defaults to a property-merge handler.
|
|
56
|
+
*/
|
|
57
|
+
handler?: string;
|
|
58
|
+
/** Debounce interval in milliseconds. */
|
|
59
|
+
debounce?: number;
|
|
60
|
+
/** Throttle interval in milliseconds. */
|
|
61
|
+
throttle?: number;
|
|
62
|
+
/** Only handle the event once, then automatically unsubscribe. */
|
|
63
|
+
once?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Destination address for the topic subscription.
|
|
66
|
+
* Overrides the topic key as the subscription address.
|
|
67
|
+
*/
|
|
68
|
+
destinationAddress?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Wildcard name for parameterized topic matching.
|
|
71
|
+
* Used when the topic path contains wildcard segments.
|
|
72
|
+
*/
|
|
73
|
+
wildcardName?: string;
|
|
74
|
+
}
|
|
75
|
+
/** Declaration of a model dependency. */
|
|
76
|
+
export interface DeclarativeDependencyConfig {
|
|
77
|
+
/** The modelTypeId of the dependency. */
|
|
78
|
+
modelType: string;
|
|
79
|
+
/**
|
|
80
|
+
* Instance ID of the dependency. Supports `{PROP_xxx}` references
|
|
81
|
+
* for dynamic resolution from model properties.
|
|
82
|
+
*/
|
|
83
|
+
id?: string;
|
|
84
|
+
/** Options to pass to the dependency constructor. */
|
|
85
|
+
options?: Record<string, unknown>;
|
|
86
|
+
/** Lifecycle phase for resolution. Defaults to INIT. */
|
|
87
|
+
lifecycle?: DeclarativeLifecycle;
|
|
88
|
+
/** Resolution policy. Defaults to CREATE. */
|
|
89
|
+
resolutionPolicy?: DeclarativeResolutionPolicy;
|
|
90
|
+
}
|
|
91
|
+
/** Error handling strategy for service requests. */
|
|
92
|
+
export type DeclarativeErrorStrategy = "throw" | "log" | "ignore" | "default";
|
|
93
|
+
/** Response cache retention policy. */
|
|
94
|
+
export type DeclarativeRetention = "IMMEDIATE" | "SINGLE" | "TTL" | "PERMANENT";
|
|
95
|
+
/** HTTP service request semantics for an action. */
|
|
96
|
+
export interface DeclarativeActionServiceConfig {
|
|
97
|
+
/** HTTP endpoint path. Supports `{PROP_xxx}` references. */
|
|
98
|
+
path: string;
|
|
99
|
+
/** HTTP method. */
|
|
100
|
+
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
101
|
+
/** Simple dot-path transform for the response (e.g., "data.items"). */
|
|
102
|
+
transform?: string;
|
|
103
|
+
/**
|
|
104
|
+
* JSON path to iterate over in the response, creating an array of items.
|
|
105
|
+
* Used with `modelFactory` to create child model instances.
|
|
106
|
+
*/
|
|
107
|
+
iterateOver?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Static query parameters to include with the request.
|
|
110
|
+
* Supports `{PROP_xxx}` references for dynamic values.
|
|
111
|
+
*/
|
|
112
|
+
queryParams?: Record<string, unknown>;
|
|
113
|
+
/**
|
|
114
|
+
* Static path parameters for URL expansion.
|
|
115
|
+
* Supports `{PROP_xxx}` references for dynamic values.
|
|
116
|
+
*/
|
|
117
|
+
pathParams?: Record<string, string>;
|
|
118
|
+
/** Static request body (for POST/PUT/PATCH). */
|
|
119
|
+
body?: unknown;
|
|
120
|
+
/** Error handling configuration. */
|
|
121
|
+
errorHandler?: {
|
|
122
|
+
strategy: DeclarativeErrorStrategy;
|
|
123
|
+
defaultValue?: unknown;
|
|
124
|
+
};
|
|
125
|
+
/** Response caching configuration. */
|
|
126
|
+
cache?: {
|
|
127
|
+
retention: DeclarativeRetention;
|
|
128
|
+
/** TTL in milliseconds (only used with "TTL" retention). */
|
|
129
|
+
ttl?: number;
|
|
130
|
+
};
|
|
131
|
+
/** Static request options (e.g., destinationAddress, timeout). */
|
|
132
|
+
requestOptions?: Record<string, unknown>;
|
|
133
|
+
}
|
|
134
|
+
/** Future lifecycle semantics for an action. */
|
|
135
|
+
export interface DeclarativeActionFutureConfig {
|
|
136
|
+
/** Alias for named future tracking (used with multiple future mode). */
|
|
137
|
+
alias?: string;
|
|
138
|
+
/** Namespace for future organization. */
|
|
139
|
+
namespace?: string;
|
|
140
|
+
/** Enable AbortController integration. Default: false. */
|
|
141
|
+
abortController?: boolean;
|
|
142
|
+
/** Tracker injection policy. Default: "id". */
|
|
143
|
+
trackerPolicy?: "id" | "context";
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Declaration of a model action.
|
|
147
|
+
*
|
|
148
|
+
* Actions are the primary way to define model behavior. An action can
|
|
149
|
+
* optionally have HTTP service request semantics (`service`), future
|
|
150
|
+
* lifecycle semantics (`future`), or both. Actions with neither are
|
|
151
|
+
* plain custom actions whose implementation comes from bindings.
|
|
152
|
+
*/
|
|
153
|
+
export interface DeclarativeActionConfig {
|
|
154
|
+
/** HTTP service request semantics. When present, the action calls an HTTP endpoint. */
|
|
155
|
+
service?: DeclarativeActionServiceConfig;
|
|
156
|
+
/** Future lifecycle semantics. When present, the action manages a Future. */
|
|
157
|
+
future?: DeclarativeActionFutureConfig;
|
|
158
|
+
/**
|
|
159
|
+
* Lifecycle phase when the action auto-executes.
|
|
160
|
+
* If omitted, the action is invoked programmatically.
|
|
161
|
+
*/
|
|
162
|
+
lifecycle?: DeclarativeLifecycle;
|
|
163
|
+
/**
|
|
164
|
+
* Name of the handler function in the model bindings.
|
|
165
|
+
* Required for future actions. Optional for service actions (defaults to property-merge).
|
|
166
|
+
*/
|
|
167
|
+
handler?: string;
|
|
168
|
+
}
|
|
169
|
+
/** Declaration of container-aware configuration. */
|
|
170
|
+
export interface DeclarativeContainerConfig {
|
|
171
|
+
/**
|
|
172
|
+
* The modelTypeId of the child models this container manages.
|
|
173
|
+
* Used for discoverability and enables automatic resolution of the
|
|
174
|
+
* child model's Registration via `declarativeModelRegistry`.
|
|
175
|
+
*/
|
|
176
|
+
childModelType?: string;
|
|
177
|
+
/** Property name where the container is stored on the model. Defaults to "container". */
|
|
178
|
+
containerProperty?: string;
|
|
179
|
+
/** Whether to add convenience methods (addModel, removeModel, etc.). Defaults to true. */
|
|
180
|
+
includeMethods?: boolean;
|
|
181
|
+
/** Whether to add reactive getters (models, data). Defaults to true. */
|
|
182
|
+
includeGetters?: boolean;
|
|
183
|
+
/** Custom name for the reactive models array getter. Defaults to "models". */
|
|
184
|
+
modelsProperty?: string;
|
|
185
|
+
/** Container options passed to KosModelContainer. */
|
|
186
|
+
containerOptions?: {
|
|
187
|
+
sortKey?: string;
|
|
188
|
+
/** Index mapping keyed by index name. Values are property names on the child model. */
|
|
189
|
+
indexMap?: Record<string, string>;
|
|
190
|
+
maxCapacity?: number;
|
|
191
|
+
evictionStrategy?: "fifo" | "lru";
|
|
192
|
+
evictionBatchSize?: number;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/** Declaration of a config property (shorthand for a config-bean-prop dependency). */
|
|
196
|
+
export interface DeclarativeConfigPropertyConfig {
|
|
197
|
+
/** Config service path. Supports `{PROP_xxx}` references. */
|
|
198
|
+
path: string;
|
|
199
|
+
/** Attribute name within the config path. */
|
|
200
|
+
attribute: string;
|
|
201
|
+
/** Base path for the config service. */
|
|
202
|
+
serviceBasePath?: string;
|
|
203
|
+
/** Whether to resolve lazily. */
|
|
204
|
+
lazy?: boolean;
|
|
205
|
+
/** Unit conversion configuration. */
|
|
206
|
+
converter?: {
|
|
207
|
+
measure?: string;
|
|
208
|
+
from?: string | {
|
|
209
|
+
unit?: string;
|
|
210
|
+
system?: string;
|
|
211
|
+
measure?: string;
|
|
212
|
+
};
|
|
213
|
+
to?: string | {
|
|
214
|
+
unit?: string;
|
|
215
|
+
system?: string;
|
|
216
|
+
measure?: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
/** Number formatting options (Intl.NumberFormatOptions). */
|
|
220
|
+
formatter?: Record<string, unknown>;
|
|
221
|
+
/** Name of an options expander function in bindings. */
|
|
222
|
+
optionsExpander?: string;
|
|
223
|
+
}
|
|
224
|
+
/** Declaration of a state property (shorthand for a state-prop dependency). */
|
|
225
|
+
export interface DeclarativeStatePropertyConfig {
|
|
226
|
+
/** State path identifier (e.g., "device:status"). */
|
|
227
|
+
path: string;
|
|
228
|
+
/** Attribute name within the state path. */
|
|
229
|
+
attribute: string;
|
|
230
|
+
}
|
|
231
|
+
/** Declaration of a reactive effect. */
|
|
232
|
+
export interface DeclarativeEffectConfig {
|
|
233
|
+
/**
|
|
234
|
+
* Array of property paths that the effect depends on.
|
|
235
|
+
* Supports dot notation for nested properties (e.g., "deviceModel.isOnline").
|
|
236
|
+
* When omitted, the effect uses MobX autorun (tracks all accessed observables).
|
|
237
|
+
*/
|
|
238
|
+
dependencies?: string[];
|
|
239
|
+
/** Name of the handler function in the model bindings. */
|
|
240
|
+
handler: string;
|
|
241
|
+
/** Whether to fire the effect immediately on setup. Default: false. */
|
|
242
|
+
fireImmediately?: boolean;
|
|
243
|
+
}
|
|
244
|
+
/** Core model identity and property definitions. */
|
|
245
|
+
export interface DeclarativeModelSection {
|
|
246
|
+
/** Unique model type identifier. */
|
|
247
|
+
modelTypeId: string;
|
|
248
|
+
/** Whether this model is a singleton. */
|
|
249
|
+
singleton?: boolean;
|
|
250
|
+
/** Whether constructor options are required. */
|
|
251
|
+
optionsRequired?: boolean;
|
|
252
|
+
/** Property declarations with types and defaults. */
|
|
253
|
+
properties?: Record<string, DeclarativePropertyDefinition>;
|
|
254
|
+
}
|
|
255
|
+
/** Logging configuration. */
|
|
256
|
+
export interface DeclarativeLoggingConfig {
|
|
257
|
+
/** Log group name. */
|
|
258
|
+
group?: string;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Root type for a `.model.json` file.
|
|
262
|
+
*
|
|
263
|
+
* Example:
|
|
264
|
+
* ```json
|
|
265
|
+
* {
|
|
266
|
+
* "model": {
|
|
267
|
+
* "modelTypeId": "beverage-model",
|
|
268
|
+
* "singleton": false,
|
|
269
|
+
* "properties": {
|
|
270
|
+
* "name": { "type": "string", "default": "" }
|
|
271
|
+
* }
|
|
272
|
+
* },
|
|
273
|
+
* "topics": { ... },
|
|
274
|
+
* "dependencies": { ... }
|
|
275
|
+
* }
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
export interface DeclarativeModelConfig {
|
|
279
|
+
/** Model identity and properties (required). */
|
|
280
|
+
model: DeclarativeModelSection;
|
|
281
|
+
/** Topic handler declarations keyed by topic string. */
|
|
282
|
+
topics?: Record<string, DeclarativeTopicHandlerConfig>;
|
|
283
|
+
/** Dependency declarations keyed by property name. */
|
|
284
|
+
dependencies?: Record<string, DeclarativeDependencyConfig>;
|
|
285
|
+
/** Action declarations keyed by action name. */
|
|
286
|
+
actions?: Record<string, DeclarativeActionConfig>;
|
|
287
|
+
/** Container-aware configuration. */
|
|
288
|
+
container?: DeclarativeContainerConfig;
|
|
289
|
+
/** Config property declarations keyed by property name. */
|
|
290
|
+
configProperties?: Record<string, DeclarativeConfigPropertyConfig>;
|
|
291
|
+
/** State property declarations keyed by property name. */
|
|
292
|
+
stateProperties?: Record<string, DeclarativeStatePropertyConfig>;
|
|
293
|
+
/** Reactive effect declarations keyed by effect name. */
|
|
294
|
+
effects?: Record<string, DeclarativeEffectConfig>;
|
|
295
|
+
/**
|
|
296
|
+
* Lifecycle hook declarations keyed by phase name.
|
|
297
|
+
* Declares which lifecycle phases the model participates in.
|
|
298
|
+
* Implementation comes from `bindings.lifecycle`.
|
|
299
|
+
*/
|
|
300
|
+
lifecycle?: Partial<Record<DeclarativeLifecyclePhase, DeclarativeLifecycleHookConfig>>;
|
|
301
|
+
/** Logging configuration. */
|
|
302
|
+
logging?: DeclarativeLoggingConfig;
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,iEAAiE;AACjE,MAAM,MAAM,uBAAuB,GAC/B,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,CAAC;AAEZ,8CAA8C;AAC9C,MAAM,WAAW,6BAA6B;IAC5C,gCAAgC;IAChC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAMD,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,GACjC,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,YAAY,CAAC;AAEjB,iDAAiD;AACjD,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wCAAwC;AACxC,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAMzE,8CAA8C;AAC9C,MAAM,WAAW,6BAA6B;IAC5C,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,sCAAsC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2DAA2D;I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,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IAClD;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CACjB,MAAM,CAAC,yBAAyB,EAAE,8BAA8B,CAAC,CAClE,CAAC;IACF,6BAA6B;IAC7B,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsm-injection-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/fsm-injection-utils.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,GAAG,QAoB3D;
|
|
1
|
+
{"version":3,"file":"fsm-injection-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/fsm-injection-utils.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,GAAG,QAoB3D;AAmdD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,QA0B3E"}
|
|
@@ -63,6 +63,25 @@ export interface KosStateMachineConfig<TState extends string, TEvent extends str
|
|
|
63
63
|
* When an event occurs in this state, transition to the target state.
|
|
64
64
|
*/
|
|
65
65
|
on?: Partial<Record<TEvent, TState>>;
|
|
66
|
+
/**
|
|
67
|
+
* Event to auto-send when an async @kosStateEntry handler resolves.
|
|
68
|
+
* Only triggers if the FSM is still in this state when the handler completes.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* cancelling: {
|
|
73
|
+
* on: { CANCELLED: 'cancelled', FAIL: 'error' },
|
|
74
|
+
* onDone: 'CANCELLED', // auto-transition on success
|
|
75
|
+
* onError: 'FAIL', // auto-transition on failure
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
onDone?: TEvent;
|
|
80
|
+
/**
|
|
81
|
+
* Event to auto-send when an async @kosStateEntry handler rejects.
|
|
82
|
+
* Only triggers if the FSM is still in this state when the handler fails.
|
|
83
|
+
*/
|
|
84
|
+
onError?: TEvent;
|
|
66
85
|
}>;
|
|
67
86
|
}
|
|
68
87
|
/**
|
|
@@ -89,6 +108,31 @@ export interface KosStateMachineOptions {
|
|
|
89
108
|
* @default true
|
|
90
109
|
*/
|
|
91
110
|
throwOnInvalid?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Optional function to compute the initial FSM state dynamically at instance creation time.
|
|
113
|
+
* When provided, this function is called with the model instance and its return value
|
|
114
|
+
* is used as the initial state instead of the static `initial` from the config.
|
|
115
|
+
*
|
|
116
|
+
* This is useful for ViewModels that wrap an existing model which may already be in
|
|
117
|
+
* a non-default state (e.g., a connection that is already CONNECTED on app load).
|
|
118
|
+
*
|
|
119
|
+
* Note: Entry handlers are NOT called for the computed initial state since it
|
|
120
|
+
* represents current state, not a transition.
|
|
121
|
+
*
|
|
122
|
+
* @param instance The model/ViewModel instance (after constructor, before makeAutoObservable)
|
|
123
|
+
* @returns The initial FSM state to use
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```typescript
|
|
127
|
+
* @kosStateMachine(fsmConfig, {
|
|
128
|
+
* computeInitialState: (instance) => {
|
|
129
|
+
* const state = instance.connection?.state;
|
|
130
|
+
* return state === 'CONNECTED' ? 'connected' : 'inactive';
|
|
131
|
+
* }
|
|
132
|
+
* })
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
computeInitialState?: (instance: any) => string;
|
|
92
136
|
}
|
|
93
137
|
/**
|
|
94
138
|
* Interface for models using the @kosStateMachine decorator.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-state-machine.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-state-machine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AASlD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,qBAAqB,CACpC,MAAM,SAAS,MAAM,EACrB,MAAM,SAAS,MAAM;IAErB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;QACE;;;WAGG;QACH,EAAE,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"kos-state-machine.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-state-machine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AASlD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,qBAAqB,CACpC,MAAM,SAAS,MAAM,EACrB,MAAM,SAAS,MAAM;IAErB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;QACE;;;WAGG;QACH,EAAE,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAErC;;;;;;;;;;;;WAYG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CACF,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,YAAY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SAAS,MAAM,EAC1E,MAAM,EAAE,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7C,OAAO,CAAC,EAAE,sBAAsB,GAC/B,cAAc,CAoBhB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,MAAM,EACjD,KAAK,EAAE,MAAM,GACZ,eAAe,CAUjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,SAAS,MAAM,EAChD,KAAK,EAAE,MAAM,GACZ,eAAe,CAUjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,MAAM,SAAS,MAAM;IACzD;;;OAGG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,MAAM,EACjD,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,GACpC,eAAe,CAkDjB"}
|
|
@@ -245,4 +245,24 @@ export interface IKosTopicHandlerParams<Response = any, Model extends IKosDataMo
|
|
|
245
245
|
* @category KOS Model Decorator
|
|
246
246
|
*/
|
|
247
247
|
export declare function kosTopicHandler<Response = any, Model extends IKosDataModel = any, TransformedResponse = Response>(params: IKosTopicHandlerParams<Response, Model, TransformedResponse>): (target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
248
|
+
type TopicHandler<T = any> = (this: any, payload: T) => void | Promise<void>;
|
|
249
|
+
/**
|
|
250
|
+
* Zone 2: Applies functional enhancements to handler
|
|
251
|
+
*/
|
|
252
|
+
export declare function applyFunctionalEnhancements<T>(handler: TopicHandler<T>, enhancements: {
|
|
253
|
+
debounce?: number | {
|
|
254
|
+
delay: number;
|
|
255
|
+
discardIntermediate?: boolean;
|
|
256
|
+
};
|
|
257
|
+
throttle?: number | {
|
|
258
|
+
interval: number;
|
|
259
|
+
discardIntermediate?: boolean;
|
|
260
|
+
};
|
|
261
|
+
buffer?: {
|
|
262
|
+
time: number;
|
|
263
|
+
maxSize?: number;
|
|
264
|
+
};
|
|
265
|
+
once?: boolean;
|
|
266
|
+
}): TopicHandler<T>;
|
|
267
|
+
export {};
|
|
248
268
|
//# sourceMappingURL=kosTopicHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kosTopicHandler.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosTopicHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkBxB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB,CACrC,QAAQ,GAAG,GAAG,EACd,KAAK,SAAS,aAAa,GAAG,GAAG,EACjC,mBAAmB,GAAG,QAAQ;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,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AAM,CAAC;IAEtB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;IAEzD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,GAAG,GAAG,EACd,KAAK,SAAS,aAAa,GAAG,GAAG,EACjC,mBAAmB,GAAG,QAAQ,EAC9B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,EAAE,KAAK,EAAE,mBAAmB,CAAC,YAE1D,GAAG,gBACG,MAAM,cACR,kBAAkB,UASjC"}
|
|
1
|
+
{"version":3,"file":"kosTopicHandler.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosTopicHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM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QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACxE,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GACA,YAAY,CAAC,CAAC,CAAC,CA0CjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-kos-dev-tool-support.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/apply-kos-dev-tool-support.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply-kos-dev-tool-support.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/apply-kos-dev-tool-support.ts"],"names":[],"mappings":"AAKA,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,GAAG,QAqEtD"}
|
|
@@ -11,6 +11,8 @@ export declare class KosSubscriptionManager {
|
|
|
11
11
|
private activatableDisposers;
|
|
12
12
|
private flowControllers;
|
|
13
13
|
private baselineDependencies;
|
|
14
|
+
private registeredTopics;
|
|
15
|
+
private onceTopics;
|
|
14
16
|
constructor(model: IKosModel, modelData: IKosDataModel, modelId: string, offlineQueue: KosOfflineQueue, log: KosOfflineQueueLogger);
|
|
15
17
|
registerAll(lifecycle?: string): void;
|
|
16
18
|
deactivate(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-subscription-manager.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/kos-subscription-manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,sBAAsB;
|
|
1
|
+
{"version":3,"file":"kos-subscription-manager.d.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package/core/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { autorun, makeAutoObservable, makeObservable, reaction, runInAction, whe
|
|
|
2
2
|
|
|
3
3
|
export * from './core/api';
|
|
4
4
|
export * from './core/context';
|
|
5
|
+
export * from './core/declarative';
|
|
5
6
|
export * from './core/decorators';
|
|
6
7
|
export * from './core/extension';
|
|
7
8
|
export * from './core/kos-container-index';
|
package/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/kos-ui-sdk/src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,kBAAkB,EAClB,cAAc,EAEd,QAAQ,EACR,WAAW,EACX,IAAI,EACL,MAAM,MAAM,CAAC;AACd,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjE,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oCAAoC,EACpC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AACh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