@oinone/kunlun-vue-widget 6.4.9 → 7.2.0
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/oinone-kunlun-vue-widget.esm.js +1 -16
- package/dist/types/index.d.ts +1 -1
- package/dist/types/src/basic/AsyncVueWidget.d.ts +7 -7
- package/dist/types/src/basic/VueFragment.vue.d.ts +2 -2
- package/dist/types/src/basic/VueWidget.d.ts +339 -331
- package/dist/types/src/basic/Widget.d.ts +260 -257
- package/dist/types/src/basic/index.d.ts +3 -3
- package/dist/types/src/data/ActiveRecordsWidget.d.ts +271 -261
- package/dist/types/src/data/PathWidget.d.ts +34 -34
- package/dist/types/src/data/index.d.ts +2 -2
- package/dist/types/src/dsl/DslDefinitionWidget.d.ts +66 -68
- package/dist/types/src/dsl/DslNodeWidget.d.ts +42 -42
- package/dist/types/src/dsl/DslRenderWidget.d.ts +47 -44
- package/dist/types/src/dsl/index.d.ts +3 -3
- package/dist/types/src/feature/index.d.ts +1 -1
- package/dist/types/src/feature/invisible-supported.d.ts +11 -11
- package/dist/types/src/hooks/all-mounted.d.ts +20 -20
- package/dist/types/src/hooks/index.d.ts +1 -1
- package/dist/types/src/index.d.ts +10 -10
- package/dist/types/src/state/context.d.ts +41 -41
- package/dist/types/src/state/global.d.ts +3 -4
- package/dist/types/src/state/index.d.ts +3 -3
- package/dist/types/src/state/method/action.d.ts +18 -18
- package/dist/types/src/state/method/field.d.ts +3 -3
- package/dist/types/src/state/method/index.d.ts +2 -2
- package/dist/types/src/state/typing.d.ts +112 -105
- package/dist/types/src/state/use-state.d.ts +15 -16
- package/dist/types/src/state/view.d.ts +5 -5
- package/dist/types/src/token/index.d.ts +2 -2
- package/dist/types/src/typing/WidgetTagContext.d.ts +39 -39
- package/dist/types/src/typing/WidgetTagProps.d.ts +23 -23
- package/dist/types/src/typing/index.d.ts +3 -3
- package/dist/types/src/typing/typing.d.ts +7 -7
- package/dist/types/src/util/dsl-render.d.ts +106 -106
- package/dist/types/src/util/index.d.ts +4 -4
- package/dist/types/src/util/install.d.ts +4 -4
- package/dist/types/src/util/render.d.ts +7 -7
- package/dist/types/src/util/widget-manager.d.ts +4 -4
- package/dist/types/src/view/index.d.ts +161 -161
- package/package.json +29 -18
- package/src/basic/AsyncVueWidget.ts +2 -2
- package/src/basic/VueWidget.ts +67 -31
- package/src/basic/Widget.ts +11 -9
- package/src/basic/__tests__/Widget.spec.ts +82 -0
- package/src/data/ActiveRecordsWidget.ts +51 -21
- package/src/data/PathWidget.ts +1 -1
- package/src/dsl/DslDefinitionWidget.ts +10 -33
- package/src/dsl/DslNodeWidget.ts +3 -3
- package/src/dsl/DslRenderWidget.ts +32 -3
- package/src/feature/__tests__/invisible-supported.spec.ts +31 -0
- package/src/hooks/__tests__/all-mounted.spec.ts +41 -0
- package/src/hooks/all-mounted.ts +1 -1
- package/src/shim-translate.d.ts +5 -2
- package/src/state/__tests__/state.spec.ts +114 -0
- package/src/state/context.ts +6 -2
- package/src/state/global.ts +16 -5
- package/src/state/method/action.ts +7 -2
- package/src/state/method/field.ts +1 -1
- package/src/state/typing.ts +10 -0
- package/src/state/use-state.ts +2 -2
- package/src/state/view.ts +3 -3
- package/src/token/index.ts +1 -1
- package/src/typing/WidgetTagContext.ts +3 -3
- package/src/typing/WidgetTagProps.ts +2 -2
- package/src/util/__tests__/dsl-render.spec.ts +112 -0
- package/src/util/__tests__/render.spec.ts +69 -0
- package/src/util/__tests__/widget-manager.spec.ts +27 -0
- package/src/util/dsl-render.ts +6 -7
- package/src/util/install.ts +1 -1
- package/src/util/render.ts +3 -7
- package/src/view/index.ts +15 -8
- package/rollup.config.js +0 -22
|
@@ -1,261 +1,271 @@
|
|
|
1
|
-
import { ActiveRecord, ActiveRecords, DeleteActiveRecordsByEntityFunction, DeleteActiveRecordsByEntityPredict, DeleteActiveRecordsFunction, FlushActiveRecordsFunction, PushActiveRecordsFunction, PushActiveRecordsPredict, ReloadActiveRecordsFunction, SubmitCacheManager, UpdateActiveRecordsByEntityFunction, UpdateActiveRecordsByEntityPredict, UpdateActiveRecordsFunction, UpdateEntity } from '@oinone/kunlun-engine';
|
|
2
|
-
import { OioAnyViewState } from '../state';
|
|
3
|
-
import { PathWidget, PathWidgetProps } from './PathWidget';
|
|
4
|
-
export interface ActiveRecordsWidgetProps extends PathWidgetProps {
|
|
5
|
-
dataSource?: ActiveRecords | null;
|
|
6
|
-
activeRecords?: ActiveRecords;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @protected
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @protected
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @protected
|
|
48
|
-
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @protected
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
*
|
|
67
|
-
* @
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* @
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*/
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
*
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
*
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
protected
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
1
|
+
import { type ActiveRecord, type ActiveRecords, type DeleteActiveRecordsByEntityFunction, type DeleteActiveRecordsByEntityPredict, type DeleteActiveRecordsFunction, type FlushActiveRecordsFunction, type PushActiveRecordsFunction, type PushActiveRecordsPredict, type ReloadActiveRecordsFunction, SubmitCacheManager, type UpdateActiveRecordsByEntityFunction, type UpdateActiveRecordsByEntityPredict, type UpdateActiveRecordsFunction, type UpdateEntity } from '@oinone/kunlun-engine';
|
|
2
|
+
import { type OioAnyViewState, OioGlobalState } from '../state';
|
|
3
|
+
import { PathWidget, type PathWidgetProps } from './PathWidget';
|
|
4
|
+
export interface ActiveRecordsWidgetProps extends PathWidgetProps {
|
|
5
|
+
dataSource?: ActiveRecords | null;
|
|
6
|
+
activeRecords?: ActiveRecords;
|
|
7
|
+
isInitViewState?: boolean;
|
|
8
|
+
viewState?: OioAnyViewState;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 数据记录组件
|
|
12
|
+
*/
|
|
13
|
+
export declare class ActiveRecordsWidget<Props extends ActiveRecordsWidgetProps = ActiveRecordsWidgetProps> extends PathWidget<Props> {
|
|
14
|
+
/**
|
|
15
|
+
* 全局状态,在 beforeMounted 后可获取到有效值
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
protected globalState: OioGlobalState | undefined;
|
|
19
|
+
getGlobalState(): OioGlobalState | undefined;
|
|
20
|
+
setGlobalState(state: OioGlobalState): void;
|
|
21
|
+
protected isInitViewState?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 视图级别状态, 在 beforeMounted 后可获取到有效值
|
|
24
|
+
* @protected
|
|
25
|
+
*/
|
|
26
|
+
protected viewState: OioAnyViewState | undefined;
|
|
27
|
+
getViewState(): OioAnyViewState | undefined;
|
|
28
|
+
setViewState(state: OioAnyViewState): void;
|
|
29
|
+
initialize(props: Props): this;
|
|
30
|
+
/**
|
|
31
|
+
* 提交缓存管理器
|
|
32
|
+
* @protected
|
|
33
|
+
*/
|
|
34
|
+
protected get submitCache(): SubmitCacheManager | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 上级根数据
|
|
37
|
+
* @protected
|
|
38
|
+
*/
|
|
39
|
+
protected parentRootData: ActiveRecord[] | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* 当前根数据
|
|
42
|
+
* @protected
|
|
43
|
+
*/
|
|
44
|
+
private currentRootData;
|
|
45
|
+
/**
|
|
46
|
+
* 提供给下级的根数据
|
|
47
|
+
* @protected
|
|
48
|
+
*/
|
|
49
|
+
get rootData(): ActiveRecord[] | undefined;
|
|
50
|
+
set rootData(rootData: ActiveRecord[] | undefined);
|
|
51
|
+
getCurrentRootData(): ActiveRecord[] | undefined;
|
|
52
|
+
setCurrentRootData(rootData: ActiveRecords | undefined): void;
|
|
53
|
+
protected parentReloadRootData: ReloadActiveRecordsFunction | undefined;
|
|
54
|
+
reloadRootData(records: ActiveRecords | undefined): void;
|
|
55
|
+
/**
|
|
56
|
+
* 上级数据源
|
|
57
|
+
* @protected
|
|
58
|
+
*/
|
|
59
|
+
protected parentDataSource: ActiveRecord[] | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* 当前数据源
|
|
62
|
+
* @protected
|
|
63
|
+
*/
|
|
64
|
+
private currentDataSource;
|
|
65
|
+
/**
|
|
66
|
+
* 提供给下级的数据源
|
|
67
|
+
* @protected
|
|
68
|
+
*/
|
|
69
|
+
get dataSource(): ActiveRecord[] | undefined;
|
|
70
|
+
set dataSource(dataSource: ActiveRecord[] | undefined);
|
|
71
|
+
getCurrentDataSource(): ActiveRecord[] | null | undefined;
|
|
72
|
+
setCurrentDataSource(dataSource: ActiveRecords | null | undefined): void;
|
|
73
|
+
protected parentReloadDataSource: ReloadActiveRecordsFunction | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* 重新加载数据源到当前数据源中
|
|
76
|
+
* <pre>
|
|
77
|
+
* @Widget.Method()
|
|
78
|
+
* @Widget.Inject()
|
|
79
|
+
* private reloadDataSource: ReloadActiveRecordsFunction | undefined;
|
|
80
|
+
* </pre>
|
|
81
|
+
*
|
|
82
|
+
* @param records 数据
|
|
83
|
+
*/
|
|
84
|
+
reloadDataSource(records: ActiveRecords | undefined): void;
|
|
85
|
+
protected parentPushDataSource: PushActiveRecordsFunction | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* 添加数据源到当前数据源中
|
|
88
|
+
* <pre>
|
|
89
|
+
* @Widget.Method()
|
|
90
|
+
* @Widget.Inject()
|
|
91
|
+
* private pushDataSource: PushActiveRecordsFunction | undefined;
|
|
92
|
+
* </pre>
|
|
93
|
+
*
|
|
94
|
+
* @param records 数据
|
|
95
|
+
* @param predict 推送判定
|
|
96
|
+
* @param index 推送到指定位置; 0 表示插入到数组头; 未传入或-1 表示插入到数组尾;
|
|
97
|
+
*/
|
|
98
|
+
pushDataSource(records: ActiveRecords, predict?: PushActiveRecordsPredict, index?: number): void;
|
|
99
|
+
protected parentUpdateDataSource: UpdateActiveRecordsFunction | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* 根据索引更新数据源
|
|
102
|
+
* <pre>
|
|
103
|
+
* @Widget.Method()
|
|
104
|
+
* @Widget.Inject()
|
|
105
|
+
* private updateDataSource: UpdateActiveRecordsFunction | undefined;
|
|
106
|
+
* </pre>
|
|
107
|
+
*
|
|
108
|
+
* @param records 数据
|
|
109
|
+
*/
|
|
110
|
+
updateDataSource(records: UpdateEntity[]): void;
|
|
111
|
+
protected parentUpdateDataSourceByEntity: UpdateActiveRecordsByEntityFunction | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* 根据数据更新数据源
|
|
114
|
+
* <pre>
|
|
115
|
+
* @Widget.Method()
|
|
116
|
+
* @Widget.Inject()
|
|
117
|
+
* private updateDataSourceByEntity: UpdateDataSourceByEntityFunction | undefined;
|
|
118
|
+
* </pre>
|
|
119
|
+
*
|
|
120
|
+
* @param records 数据
|
|
121
|
+
* @param predict 更新判定
|
|
122
|
+
*/
|
|
123
|
+
updateDataSourceByEntity(records: ActiveRecords, predict?: UpdateActiveRecordsByEntityPredict): void;
|
|
124
|
+
protected parentDeleteDataSource: DeleteActiveRecordsFunction | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* 根据索引删除数据源
|
|
127
|
+
* <pre>
|
|
128
|
+
* @Widget.Method()
|
|
129
|
+
* @Widget.Inject()
|
|
130
|
+
* private deleteDataSource: DeleteActiveRecordsFunction | undefined;
|
|
131
|
+
* </pre>
|
|
132
|
+
*
|
|
133
|
+
* @param recordIndexes 数据
|
|
134
|
+
*/
|
|
135
|
+
deleteDataSource(recordIndexes: number[]): void;
|
|
136
|
+
protected parentDeleteDataSourceByEntity: DeleteActiveRecordsByEntityFunction | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* 根据数据删除数据源
|
|
139
|
+
* <pre>
|
|
140
|
+
* @Widget.Method()
|
|
141
|
+
* @Widget.Inject()
|
|
142
|
+
* private deleteDataSourceByEntity: DeleteDataSourceByEntityFunction | undefined;
|
|
143
|
+
* </pre>
|
|
144
|
+
*
|
|
145
|
+
* @param records 数据
|
|
146
|
+
* @param predict 删除判定
|
|
147
|
+
*/
|
|
148
|
+
deleteDataSourceByEntity(records: ActiveRecords, predict?: DeleteActiveRecordsByEntityPredict): void;
|
|
149
|
+
protected parentFlushDataSource: FlushActiveRecordsFunction | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* 刷新数据源(数据向上提交)
|
|
152
|
+
* <pre>
|
|
153
|
+
* @Widget.Method()
|
|
154
|
+
* @Widget.Inject()
|
|
155
|
+
* private flushActiveRecords: FlushActiveRecordsFunction | undefined;
|
|
156
|
+
* </pre>
|
|
157
|
+
*/
|
|
158
|
+
flushDataSource(): void;
|
|
159
|
+
/**
|
|
160
|
+
* 上级数据记录,不可直接修改,仅在挂载时加载到当前数据记录
|
|
161
|
+
*/
|
|
162
|
+
protected parentActiveRecords: ActiveRecord[] | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* 上级视图数据
|
|
165
|
+
*/
|
|
166
|
+
protected parentViewActiveRecords: ActiveRecord[] | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* 当前数据记录,不存在时将进行数据透传
|
|
169
|
+
*/
|
|
170
|
+
private currentActiveRecords;
|
|
171
|
+
/**
|
|
172
|
+
* 提供给下级的数据记录
|
|
173
|
+
*/
|
|
174
|
+
get activeRecords(): ActiveRecord[] | undefined;
|
|
175
|
+
set activeRecords(activeRecords: ActiveRecord[] | undefined);
|
|
176
|
+
getCurrentActiveRecords(): ActiveRecord[] | undefined;
|
|
177
|
+
setCurrentActiveRecords(activeRecords: ActiveRecords | undefined): void;
|
|
178
|
+
protected parentReloadActiveRecords: ReloadActiveRecordsFunction | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* 重新加载数据记录到当前数据记录中
|
|
181
|
+
* <pre>
|
|
182
|
+
* @Widget.Method()
|
|
183
|
+
* @Widget.Inject()
|
|
184
|
+
* private reloadActiveRecords: ReloadActiveRecordsFunction | undefined;
|
|
185
|
+
* </pre>
|
|
186
|
+
*
|
|
187
|
+
* @param records 数据
|
|
188
|
+
*/
|
|
189
|
+
reloadActiveRecords(records: ActiveRecords | undefined): void;
|
|
190
|
+
protected parentPushActiveRecords: PushActiveRecordsFunction | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* 添加数据记录到当前数据记录中
|
|
193
|
+
* <pre>
|
|
194
|
+
* @Widget.Method()
|
|
195
|
+
* @Widget.Inject()
|
|
196
|
+
* private pushActiveRecords: PushActiveRecordsFunction | undefined;
|
|
197
|
+
* </pre>
|
|
198
|
+
*
|
|
199
|
+
* @param records 数据
|
|
200
|
+
* @param predict 推送判定
|
|
201
|
+
*/
|
|
202
|
+
pushActiveRecords(records: ActiveRecords, predict?: PushActiveRecordsPredict): void;
|
|
203
|
+
protected parentUpdateActiveRecords: UpdateActiveRecordsFunction | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* 根据索引更新数据记录
|
|
206
|
+
* <pre>
|
|
207
|
+
* @Widget.Method()
|
|
208
|
+
* @Widget.Inject()
|
|
209
|
+
* private updateActiveRecords: UpdateActiveRecordsFunction | undefined;
|
|
210
|
+
* </pre>
|
|
211
|
+
*
|
|
212
|
+
* @param records 数据
|
|
213
|
+
*/
|
|
214
|
+
updateActiveRecords(records: UpdateEntity[]): void;
|
|
215
|
+
protected parentUpdateActiveRecordsByEntity: UpdateActiveRecordsByEntityFunction | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* 根据数据更新数据记录
|
|
218
|
+
* <pre>
|
|
219
|
+
* @Widget.Method()
|
|
220
|
+
* @Widget.Inject()
|
|
221
|
+
* private updateActiveRecordsByEntity: UpdateActiveRecordsByEntityFunction | undefined;
|
|
222
|
+
* </pre>
|
|
223
|
+
*
|
|
224
|
+
* @param records 数据
|
|
225
|
+
* @param updatePredict 更新判定
|
|
226
|
+
*/
|
|
227
|
+
updateActiveRecordsByEntity(records: ActiveRecords, updatePredict?: UpdateActiveRecordsByEntityPredict): void;
|
|
228
|
+
protected parentDeleteActiveRecords: DeleteActiveRecordsFunction | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* 根据索引删除数据记录
|
|
231
|
+
* <pre>
|
|
232
|
+
* @Widget.Method()
|
|
233
|
+
* @Widget.Inject()
|
|
234
|
+
* private deleteActiveRecords: DeleteActiveRecordsFunction | undefined;
|
|
235
|
+
* </pre>
|
|
236
|
+
*
|
|
237
|
+
* @param recordIndexes 数据
|
|
238
|
+
*/
|
|
239
|
+
deleteActiveRecords(recordIndexes: number[]): void;
|
|
240
|
+
protected parentDeleteActiveRecordsByEntity: DeleteActiveRecordsByEntityFunction | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* 根据数据删除数据记录
|
|
243
|
+
* <pre>
|
|
244
|
+
* @Widget.Method()
|
|
245
|
+
* @Widget.Inject()
|
|
246
|
+
* private deleteActiveRecordsByEntity: DeleteActiveRecordsByEntityFunction | undefined;
|
|
247
|
+
* </pre>
|
|
248
|
+
*
|
|
249
|
+
* @param records 数据
|
|
250
|
+
* @param predict 删除判定
|
|
251
|
+
*/
|
|
252
|
+
deleteActiveRecordsByEntity(records: ActiveRecords, predict?: DeleteActiveRecordsByEntityPredict): void;
|
|
253
|
+
protected parentFlushActiveRecords: FlushActiveRecordsFunction | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* 刷新数据记录(数据向上提交)
|
|
256
|
+
* <pre>
|
|
257
|
+
* @Widget.Method()
|
|
258
|
+
* @Widget.Inject()
|
|
259
|
+
* private flushActiveRecords: FlushActiveRecordsFunction | undefined;
|
|
260
|
+
* </pre>
|
|
261
|
+
*/
|
|
262
|
+
flushActiveRecords(): void;
|
|
263
|
+
protected $$initViewStatePosition(state: OioAnyViewState): void;
|
|
264
|
+
protected $$clearViewStatePosition(state: OioAnyViewState): void;
|
|
265
|
+
protected $$initViewState(state: OioAnyViewState): void;
|
|
266
|
+
protected $$clearViewState(state: OioAnyViewState): void;
|
|
267
|
+
protected $$beforeMount(): void;
|
|
268
|
+
protected $$mountedAfterProperties(): void;
|
|
269
|
+
protected $$beforeUnmount(): void;
|
|
270
|
+
protected $$unmounted(): void;
|
|
271
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { DslDefinitionWidgetProps, DslDefinitionWidget } from '../dsl';
|
|
2
|
-
export interface PathWidgetProps extends DslDefinitionWidgetProps {
|
|
3
|
-
path?: string;
|
|
4
|
-
subPath?: string;
|
|
5
|
-
subIndex?: string | number;
|
|
6
|
-
__index?: number;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* 路径组件
|
|
10
|
-
*/
|
|
11
|
-
export declare class PathWidget<Props extends PathWidgetProps = PathWidgetProps> extends DslDefinitionWidget<Props> {
|
|
12
|
-
/**
|
|
13
|
-
* 上级路径
|
|
14
|
-
*/
|
|
15
|
-
protected parentPath: string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* 当前子路径
|
|
18
|
-
*/
|
|
19
|
-
protected subPath: string | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* 当前子路径索引
|
|
22
|
-
*/
|
|
23
|
-
protected subIndex: string | number | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* 当前指定路径
|
|
26
|
-
* @protected
|
|
27
|
-
*/
|
|
28
|
-
protected currentPath: string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* 完整路径
|
|
31
|
-
*/
|
|
32
|
-
get path(): string;
|
|
33
|
-
initialize(props: Props): this;
|
|
34
|
-
}
|
|
1
|
+
import { type DslDefinitionWidgetProps, DslDefinitionWidget } from '../dsl';
|
|
2
|
+
export interface PathWidgetProps extends DslDefinitionWidgetProps {
|
|
3
|
+
path?: string;
|
|
4
|
+
subPath?: string;
|
|
5
|
+
subIndex?: string | number;
|
|
6
|
+
__index?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 路径组件
|
|
10
|
+
*/
|
|
11
|
+
export declare class PathWidget<Props extends PathWidgetProps = PathWidgetProps> extends DslDefinitionWidget<Props> {
|
|
12
|
+
/**
|
|
13
|
+
* 上级路径
|
|
14
|
+
*/
|
|
15
|
+
protected parentPath: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* 当前子路径
|
|
18
|
+
*/
|
|
19
|
+
protected subPath: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* 当前子路径索引
|
|
22
|
+
*/
|
|
23
|
+
protected subIndex: string | number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* 当前指定路径
|
|
26
|
+
* @protected
|
|
27
|
+
*/
|
|
28
|
+
protected currentPath: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* 完整路径
|
|
31
|
+
*/
|
|
32
|
+
get path(): string;
|
|
33
|
+
initialize(props: Props): this;
|
|
34
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './PathWidget';
|
|
2
|
-
export * from './ActiveRecordsWidget';
|
|
1
|
+
export * from './PathWidget';
|
|
2
|
+
export * from './ActiveRecordsWidget';
|