next-flow-interface 0.24.25 → 0.24.27
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/index.d.ts +140 -48
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ declare function approximatelyEqual(n1: number, n2: number, bias?: number): bool
|
|
|
294
294
|
/**
|
|
295
295
|
* @public
|
|
296
296
|
*/
|
|
297
|
-
export declare type Attribute<T extends object =
|
|
297
|
+
export declare type Attribute<T extends object = any> = NodeAttribute<T> | StepAttribute<T> | GlobalAttribute<T>
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
300
|
* @public
|
|
@@ -312,15 +312,15 @@ export declare class AttributeService {
|
|
|
312
312
|
stepAttributes: StepAttribute<any>[]
|
|
313
313
|
globalAttributes: GlobalAttribute<any>[]
|
|
314
314
|
/** 注册属性 */
|
|
315
|
-
register<T extends object =
|
|
315
|
+
register<T extends object = any>(attribute: Attribute<T>): void
|
|
316
316
|
/** 通过路径精确匹配获取属性 */
|
|
317
|
-
get<T extends object =
|
|
317
|
+
get<T extends object = any>(type: AttributeType, path: RvPath | string): Attribute<T> | undefined
|
|
318
318
|
/** 通过路径获取 NodeAttribute */
|
|
319
|
-
getNodeAttribute<T extends object =
|
|
319
|
+
getNodeAttribute<T extends object = any>(path: RvPath | string): NodeAttribute<T> | undefined
|
|
320
320
|
/** 通过路径获取 StepAttribute */
|
|
321
|
-
getStepAttribute<T extends object =
|
|
321
|
+
getStepAttribute<T extends object = any>(path: RvPath | string): StepAttribute<T> | undefined
|
|
322
322
|
/** 通过路径获取 GlobalAttribute */
|
|
323
|
-
getGlobalAttribute<T extends object =
|
|
323
|
+
getGlobalAttribute<T extends object = any>(path: RvPath | string): GlobalAttribute<T> | undefined
|
|
324
324
|
/** 根据类型获取属性列表,不传入类型的时候返回所有 */
|
|
325
325
|
getList(type?: AttributeType): Attribute<any>[]
|
|
326
326
|
isPathConflict(type: AttributeType, path: RvPath): boolean
|
|
@@ -484,7 +484,7 @@ export declare class AwarenessService {
|
|
|
484
484
|
/**
|
|
485
485
|
* @public
|
|
486
486
|
*/
|
|
487
|
-
export declare abstract class BaseAttribute<T extends object =
|
|
487
|
+
export declare abstract class BaseAttribute<T extends object = any> {
|
|
488
488
|
abstract type: AttributeType
|
|
489
489
|
abstract path: RvPath
|
|
490
490
|
defaultValue: T
|
|
@@ -1064,7 +1064,7 @@ export declare function createAttributeContextMenu(
|
|
|
1064
1064
|
multiMark: () => void,
|
|
1065
1065
|
multiInitialize: () => void,
|
|
1066
1066
|
intl: Intl_2,
|
|
1067
|
-
defaultAttribute?:
|
|
1067
|
+
defaultAttribute?: Attribute<any>,
|
|
1068
1068
|
): {
|
|
1069
1069
|
onContextMenu: (event: MouseEvent_2, label: string, paths: PathListWithOptionableAttribute | string) => void
|
|
1070
1070
|
}
|
|
@@ -2052,17 +2052,36 @@ declare function getSearchParams(key: string): string | undefined
|
|
|
2052
2052
|
/**
|
|
2053
2053
|
* @public
|
|
2054
2054
|
*/
|
|
2055
|
-
export declare abstract class GlobalAttribute<T extends object =
|
|
2055
|
+
export declare abstract class GlobalAttribute<T extends object = any> extends BaseAttribute<T> {
|
|
2056
2056
|
type: AttributeType
|
|
2057
2057
|
generate(): T
|
|
2058
2058
|
initialize(): void
|
|
2059
2059
|
isInitialized(): boolean
|
|
2060
2060
|
mark(path: string | RvPath): void
|
|
2061
2061
|
get(): RecursiveCrossRhineVar<T> | undefined
|
|
2062
|
+
/**
|
|
2063
|
+
* 获取局部数据
|
|
2064
|
+
* @param paths
|
|
2065
|
+
*/
|
|
2066
|
+
getPartial(paths: (string | RvPath)[]): PartialData
|
|
2062
2067
|
set(path: string | RvPath, value: unknown): void
|
|
2068
|
+
/**
|
|
2069
|
+
* 设置局部数据
|
|
2070
|
+
* @param pd
|
|
2071
|
+
*/
|
|
2072
|
+
setPartial(pd: PartialData): void
|
|
2063
2073
|
read(): T | RecursiveCrossRhineVar<T>
|
|
2074
|
+
/**
|
|
2075
|
+
* 读取局部数据
|
|
2076
|
+
* @param paths
|
|
2077
|
+
*/
|
|
2078
|
+
readPartial(paths: (string | RvPath)[]): PartialData
|
|
2064
2079
|
edit(path: string | RvPath, value: unknown): void
|
|
2065
|
-
|
|
2080
|
+
/**
|
|
2081
|
+
* 编辑局部数据
|
|
2082
|
+
* @param pd
|
|
2083
|
+
*/
|
|
2084
|
+
editPartial(pd: PartialData): void
|
|
2066
2085
|
subscribe(subscriber: GlobalAttributeSubscriber<T>): () => void
|
|
2067
2086
|
unsubscribe(subscriber: GlobalAttributeSubscriber<T>): void
|
|
2068
2087
|
}
|
|
@@ -2746,7 +2765,7 @@ export declare function MaterialSymbol(props: MaterialSymbolProps): React_2.JSX.
|
|
|
2746
2765
|
export declare function materialSymbol(
|
|
2747
2766
|
icon: string,
|
|
2748
2767
|
options?: MaterialSymbolOptions,
|
|
2749
|
-
): FunctionComponent<Record<string,
|
|
2768
|
+
): FunctionComponent<Record<string, unknown>>
|
|
2750
2769
|
|
|
2751
2770
|
/**
|
|
2752
2771
|
* @public
|
|
@@ -2984,10 +3003,10 @@ export declare type MessageType = 'info' | 'warning' | 'error' | 'success'
|
|
|
2984
3003
|
*/
|
|
2985
3004
|
export declare class MixPartialData {
|
|
2986
3005
|
data: Set<MixPartialDataItem>
|
|
2987
|
-
constructor(data?: [
|
|
2988
|
-
push(attribute:
|
|
2989
|
-
forEach(callback: (attribute:
|
|
2990
|
-
forEachWithStringPath(callback: (attribute:
|
|
3006
|
+
constructor(data?: [Attribute<any>, string | RvPath, unknown][])
|
|
3007
|
+
push(attribute: Attribute<any>, path: string | RvPath, value: unknown): void
|
|
3008
|
+
forEach(callback: (attribute: Attribute<any>, path: RvPath, value: unknown) => void): void
|
|
3009
|
+
forEachWithStringPath(callback: (attribute: Attribute<any>, path: string, value: unknown) => void): void
|
|
2991
3010
|
toPartialData(): PartialData
|
|
2992
3011
|
get size(): number
|
|
2993
3012
|
}
|
|
@@ -2996,7 +3015,7 @@ export declare class MixPartialData {
|
|
|
2996
3015
|
* @public
|
|
2997
3016
|
*/
|
|
2998
3017
|
export declare interface MixPartialDataItem {
|
|
2999
|
-
attribute:
|
|
3018
|
+
attribute: Attribute<any>
|
|
3000
3019
|
path: RvPath
|
|
3001
3020
|
value: unknown
|
|
3002
3021
|
}
|
|
@@ -3137,7 +3156,7 @@ export declare const NetworkUtils: {
|
|
|
3137
3156
|
/**
|
|
3138
3157
|
* @public
|
|
3139
3158
|
*/
|
|
3140
|
-
export declare abstract class NodeAttribute<T extends object =
|
|
3159
|
+
export declare abstract class NodeAttribute<T extends object = any> extends BaseAttribute<T> {
|
|
3141
3160
|
type: AttributeType
|
|
3142
3161
|
get targetSid(): string
|
|
3143
3162
|
get targetSidList(): string[]
|
|
@@ -3173,24 +3192,6 @@ export declare abstract class NodeAttribute<T extends object = never> extends Ba
|
|
|
3173
3192
|
sidList?: string[],
|
|
3174
3193
|
nidList?: string[],
|
|
3175
3194
|
): Map<string, Map<string, PartialData>>
|
|
3176
|
-
/**
|
|
3177
|
-
* 获取指定元素的局部数据
|
|
3178
|
-
* @param paths
|
|
3179
|
-
* @param sid
|
|
3180
|
-
* @param nid
|
|
3181
|
-
*/
|
|
3182
|
-
readPartial(paths: (string | RvPath)[], sid?: string, nid?: string): PartialData
|
|
3183
|
-
/**
|
|
3184
|
-
* 获取多个元素的局部数据
|
|
3185
|
-
* @param paths
|
|
3186
|
-
* @param sidList
|
|
3187
|
-
* @param nidList
|
|
3188
|
-
*/
|
|
3189
|
-
multiReadPartial(
|
|
3190
|
-
paths: (string | RvPath)[],
|
|
3191
|
-
sidList?: string[],
|
|
3192
|
-
nidList?: string[],
|
|
3193
|
-
): Map<string, Map<string, PartialData>>
|
|
3194
3195
|
set(path: string | RvPath, value: unknown, sid?: string, nid?: string): void
|
|
3195
3196
|
multiSet(path: string | RvPath, value: unknown, sidList?: string[], nidList?: string[]): void
|
|
3196
3197
|
/**
|
|
@@ -3211,10 +3212,28 @@ export declare abstract class NodeAttribute<T extends object = never> extends Ba
|
|
|
3211
3212
|
multiSetPartial(pd: PartialData, sidList?: string[], nidList?: string[]): void
|
|
3212
3213
|
read(sid?: string, nid?: string): StoredRhineVar<T> | T
|
|
3213
3214
|
multiRead(sidList?: string[], nidList?: string[]): Map<string, Map<string, StoredRhineVar<T> | T>>
|
|
3215
|
+
/**
|
|
3216
|
+
* 获取指定元素的局部数据
|
|
3217
|
+
* @param paths
|
|
3218
|
+
* @param sid
|
|
3219
|
+
* @param nid
|
|
3220
|
+
*/
|
|
3221
|
+
readPartial(paths: (string | RvPath)[], sid?: string, nid?: string): PartialData
|
|
3222
|
+
/**
|
|
3223
|
+
* 获取多个元素的局部数据
|
|
3224
|
+
* @param paths
|
|
3225
|
+
* @param sidList
|
|
3226
|
+
* @param nidList
|
|
3227
|
+
*/
|
|
3228
|
+
multiReadPartial(
|
|
3229
|
+
paths: (string | RvPath)[],
|
|
3230
|
+
sidList?: string[],
|
|
3231
|
+
nidList?: string[],
|
|
3232
|
+
): Map<string, Map<string, PartialData>>
|
|
3214
3233
|
edit(path: string | RvPath, value: unknown, sid?: string, nid?: string): void
|
|
3215
3234
|
multiEdit(path: string | RvPath, value: unknown, sidList?: string[], nidList?: string[]): void
|
|
3216
|
-
|
|
3217
|
-
|
|
3235
|
+
editPartial(pd: PartialData, sid?: string, nid?: string): void
|
|
3236
|
+
multiEditPartial(pd: PartialData, sidList?: string[], nidList?: string[]): void
|
|
3218
3237
|
subscribeTarget(subscriber: NodeAttributeTargetSubscriber<T>): () => void
|
|
3219
3238
|
unsubscribeTarget(subscriber: NodeAttributeTargetSubscriber<T>): void
|
|
3220
3239
|
}
|
|
@@ -3222,7 +3241,7 @@ export declare abstract class NodeAttribute<T extends object = never> extends Ba
|
|
|
3222
3241
|
/**
|
|
3223
3242
|
* @public
|
|
3224
3243
|
*/
|
|
3225
|
-
export declare type NodeAttributeTargetSubscriber<T extends object =
|
|
3244
|
+
export declare type NodeAttributeTargetSubscriber<T extends object = any> = (
|
|
3226
3245
|
type: TChangeType,
|
|
3227
3246
|
path: RvPath,
|
|
3228
3247
|
value: unknown,
|
|
@@ -3621,7 +3640,7 @@ export declare class PartialData {
|
|
|
3621
3640
|
push(path: string | RvPath, value: unknown): void
|
|
3622
3641
|
forEach(callback: (path: RvPath, value: unknown) => void): void
|
|
3623
3642
|
forEachWithStringPath(callback: (path: string, value: unknown) => void): void
|
|
3624
|
-
toMixPartialData(attribute:
|
|
3643
|
+
toMixPartialData(attribute: Attribute<any>): MixPartialData
|
|
3625
3644
|
get size(): number
|
|
3626
3645
|
}
|
|
3627
3646
|
|
|
@@ -3638,7 +3657,7 @@ export declare interface PartialDataItem {
|
|
|
3638
3657
|
*/
|
|
3639
3658
|
export declare type PathListWithOptionableAttribute = (
|
|
3640
3659
|
| [path: string | RvPath]
|
|
3641
|
-
| [path: string | RvPath, attribute:
|
|
3660
|
+
| [path: string | RvPath, attribute: Attribute<any>]
|
|
3642
3661
|
)[]
|
|
3643
3662
|
|
|
3644
3663
|
declare type PathValueArray<T = unknown> = {
|
|
@@ -6213,7 +6232,7 @@ export declare class StatusService {
|
|
|
6213
6232
|
/**
|
|
6214
6233
|
* @public
|
|
6215
6234
|
*/
|
|
6216
|
-
export declare abstract class StepAttribute<T extends object =
|
|
6235
|
+
export declare abstract class StepAttribute<T extends object = any> extends BaseAttribute<T> {
|
|
6217
6236
|
type: AttributeType
|
|
6218
6237
|
get targetSid(): string
|
|
6219
6238
|
get targetSidList(): string[]
|
|
@@ -6226,14 +6245,60 @@ export declare abstract class StepAttribute<T extends object = never> extends Ba
|
|
|
6226
6245
|
multiMark(path: string | RvPath, sidList?: string[]): void
|
|
6227
6246
|
get(sid?: string): StoredRhineVar<T> | undefined
|
|
6228
6247
|
multiGet(sidList?: string[]): Map<string, StoredRhineVar<T>>
|
|
6248
|
+
/**
|
|
6249
|
+
* 获取指定 Step 的局部数据
|
|
6250
|
+
* @param paths
|
|
6251
|
+
* @param sid
|
|
6252
|
+
*/
|
|
6253
|
+
getPartial(paths: (string | RvPath)[], sid?: string): PartialData
|
|
6254
|
+
/**
|
|
6255
|
+
* 获取多个 Step 的局部数据
|
|
6256
|
+
* @param paths
|
|
6257
|
+
* @param sidList
|
|
6258
|
+
*/
|
|
6259
|
+
multiGetPartial(paths: (string | RvPath)[], sidList?: string[]): Map<string, PartialData>
|
|
6229
6260
|
set(path: string | RvPath, value: unknown, sid?: string): void
|
|
6230
6261
|
multiSet(path: string | RvPath, value: unknown, sidList?: string[]): void
|
|
6262
|
+
/**
|
|
6263
|
+
* 设置局部数据到指定 Step
|
|
6264
|
+
* @param pd
|
|
6265
|
+
* @param sid
|
|
6266
|
+
*/
|
|
6267
|
+
setPartial(pd: PartialData, sid?: string): void
|
|
6268
|
+
/**
|
|
6269
|
+
* 设置局部数据到多个指定 Step
|
|
6270
|
+
* @param pd
|
|
6271
|
+
* @param sidList
|
|
6272
|
+
*/
|
|
6273
|
+
multiSetPartial(pd: PartialData, sidList?: string[]): void
|
|
6231
6274
|
read(sid?: string): T | StoredRhineVar<T>
|
|
6232
6275
|
multiRead(sidList?: string[]): Map<string, T | StoredRhineVar<T>>
|
|
6276
|
+
/**
|
|
6277
|
+
* 读取指定 Step 的局部数据
|
|
6278
|
+
* @param paths
|
|
6279
|
+
* @param sid
|
|
6280
|
+
*/
|
|
6281
|
+
readPartial(paths: (string | RvPath)[], sid?: string): PartialData
|
|
6282
|
+
/**
|
|
6283
|
+
* 读取多个 Step 的局部数据
|
|
6284
|
+
* @param paths
|
|
6285
|
+
* @param sidList
|
|
6286
|
+
*/
|
|
6287
|
+
multiReadPartial(paths: (string | RvPath)[], sidList?: string[]): Map<string, PartialData>
|
|
6233
6288
|
edit(path: string | RvPath, value: unknown, sid?: string): void
|
|
6234
6289
|
multiEdit(path: string | RvPath, value: unknown, sidList?: string[]): void
|
|
6235
|
-
|
|
6236
|
-
|
|
6290
|
+
/**
|
|
6291
|
+
* 编辑指定 Step 的局部数据
|
|
6292
|
+
* @param pd
|
|
6293
|
+
* @param sid
|
|
6294
|
+
*/
|
|
6295
|
+
editPartial(pd: PartialData, sid?: string): void
|
|
6296
|
+
/**
|
|
6297
|
+
* 编辑多个 Step 的局部数据
|
|
6298
|
+
* @param pd
|
|
6299
|
+
* @param sidList
|
|
6300
|
+
*/
|
|
6301
|
+
multiEditPartial(pd: PartialData, sidList?: string[]): void
|
|
6237
6302
|
subscribeTarget(subscriber: StepAttributeTargetSubscriber<T>): () => void
|
|
6238
6303
|
unsubscribeTarget(subscriber: StepAttributeTargetSubscriber<T>): void
|
|
6239
6304
|
}
|
|
@@ -6241,7 +6306,7 @@ export declare abstract class StepAttribute<T extends object = never> extends Ba
|
|
|
6241
6306
|
/**
|
|
6242
6307
|
* @public
|
|
6243
6308
|
*/
|
|
6244
|
-
export declare type StepAttributeTargetSubscriber<T extends object =
|
|
6309
|
+
export declare type StepAttributeTargetSubscriber<T extends object = any> = (
|
|
6245
6310
|
type: TChangeType,
|
|
6246
6311
|
path: RvPath,
|
|
6247
6312
|
value: unknown,
|
|
@@ -6748,7 +6813,7 @@ export declare function useGlobal<T = unknown>(
|
|
|
6748
6813
|
/**
|
|
6749
6814
|
* @public
|
|
6750
6815
|
*/
|
|
6751
|
-
export declare function useGlobalAttribute<T extends object =
|
|
6816
|
+
export declare function useGlobalAttribute<T extends object = any>(
|
|
6752
6817
|
path?: string | RvPath,
|
|
6753
6818
|
): {
|
|
6754
6819
|
state: T | StoredRhineVar<T>
|
|
@@ -6761,7 +6826,10 @@ export declare function useGlobalAttribute<T extends object = never>(
|
|
|
6761
6826
|
set: (path: string | RvPath, value: unknown) => void
|
|
6762
6827
|
read: () => T | RecursiveCrossRhineVar<T>
|
|
6763
6828
|
edit: (path: string | RvPath, value: unknown) => void
|
|
6764
|
-
|
|
6829
|
+
getPartial: (paths: (string | RvPath)[]) => PartialData
|
|
6830
|
+
setPartial: (pd: PartialData) => void
|
|
6831
|
+
readPartial: (paths: (string | RvPath)[]) => PartialData
|
|
6832
|
+
editPartial: (pd: PartialData) => void
|
|
6765
6833
|
}
|
|
6766
6834
|
|
|
6767
6835
|
/**
|
|
@@ -6840,7 +6908,7 @@ export declare function useTargetNode<T = unknown>(
|
|
|
6840
6908
|
/**
|
|
6841
6909
|
* @public
|
|
6842
6910
|
*/
|
|
6843
|
-
export declare function useTargetNodeAttribute<T extends object =
|
|
6911
|
+
export declare function useTargetNodeAttribute<T extends object = any>(
|
|
6844
6912
|
path?: string | RvPath,
|
|
6845
6913
|
): {
|
|
6846
6914
|
state: T | StoredRhineVar<T>
|
|
@@ -6863,6 +6931,22 @@ export declare function useTargetNodeAttribute<T extends object = never>(
|
|
|
6863
6931
|
multiRead: (sidList?: string[], nidList?: string[]) => Map<string, Map<string, T | RecursiveCrossRhineVar<T>>>
|
|
6864
6932
|
edit: (path: string | RvPath, value: unknown, sid?: string, nid?: string) => void
|
|
6865
6933
|
multiEdit: (path: string | RvPath, value: unknown, sidList?: string[], nidList?: string[]) => void
|
|
6934
|
+
getPartial: (paths: (string | RvPath)[], sid?: string, nid?: string) => PartialData
|
|
6935
|
+
multiGetPartial: (
|
|
6936
|
+
paths: (string | RvPath)[],
|
|
6937
|
+
sidList?: string[],
|
|
6938
|
+
nidList?: string[],
|
|
6939
|
+
) => Map<string, Map<string, PartialData>>
|
|
6940
|
+
setPartial: (pd: PartialData, sid?: string, nid?: string) => void
|
|
6941
|
+
multiSetPartial: (pd: PartialData, sidList?: string[], nidList?: string[]) => void
|
|
6942
|
+
readPartial: (paths: (string | RvPath)[], sid?: string, nid?: string) => PartialData
|
|
6943
|
+
multiReadPartial: (
|
|
6944
|
+
paths: (string | RvPath)[],
|
|
6945
|
+
sidList?: string[],
|
|
6946
|
+
nidList?: string[],
|
|
6947
|
+
) => Map<string, Map<string, PartialData>>
|
|
6948
|
+
editPartial: (pd: PartialData, sid?: string, nid?: string) => void
|
|
6949
|
+
multiEditPartial: (pd: PartialData, sidList?: string[], nidList?: string[]) => void
|
|
6866
6950
|
subscribe: (subscriber: NodeAttributeTargetSubscriber<T>) => () => void
|
|
6867
6951
|
unsubscribe: (subscriber: NodeAttributeTargetSubscriber<T>) => void
|
|
6868
6952
|
}
|
|
@@ -6882,7 +6966,7 @@ export declare function useTargetStep<T = unknown>(
|
|
|
6882
6966
|
/**
|
|
6883
6967
|
* @public
|
|
6884
6968
|
*/
|
|
6885
|
-
export declare function useTargetStepAttribute<T extends object =
|
|
6969
|
+
export declare function useTargetStepAttribute<T extends object = any>(
|
|
6886
6970
|
path?: string | RvPath,
|
|
6887
6971
|
): {
|
|
6888
6972
|
state: T | StoredRhineVar<T>
|
|
@@ -6901,6 +6985,14 @@ export declare function useTargetStepAttribute<T extends object = never>(
|
|
|
6901
6985
|
multiRead: (sidList?: string[]) => Map<string, T | RecursiveCrossRhineVar<T>>
|
|
6902
6986
|
edit: (path: string | RvPath, value: unknown, sid?: string) => void
|
|
6903
6987
|
multiEdit: (path: string | RvPath, value: unknown, sidList?: string[]) => void
|
|
6988
|
+
getPartial: (paths: (string | RvPath)[], sid?: string) => PartialData
|
|
6989
|
+
multiGetPartial: (paths: (string | RvPath)[], sidList?: string[]) => Map<string, PartialData>
|
|
6990
|
+
setPartial: (pd: PartialData, sid?: string) => void
|
|
6991
|
+
multiSetPartial: (pd: PartialData, sidList?: string[]) => void
|
|
6992
|
+
readPartial: (paths: (string | RvPath)[], sid?: string) => PartialData
|
|
6993
|
+
multiReadPartial: (paths: (string | RvPath)[], sidList?: string[]) => Map<string, PartialData>
|
|
6994
|
+
editPartial: (pd: PartialData, sid?: string) => void
|
|
6995
|
+
multiEditPartial: (pd: PartialData, sidList?: string[]) => void
|
|
6904
6996
|
subscribe: (subscriber: StepAttributeTargetSubscriber<T>) => () => void
|
|
6905
6997
|
unsubscribe: (subscriber: StepAttributeTargetSubscriber<T>) => void
|
|
6906
6998
|
}
|