aldehyde 0.2.135 → 0.2.137
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/lib/controls/action/index.d.ts +8 -3
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +35 -10
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +7 -5
- package/lib/controls/view-control.js.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +3 -3
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/fields-edit-card.js +5 -6
- package/lib/detail/edit/fields-edit-card.js.map +1 -1
- package/lib/form/fields-form.d.ts +1 -1
- package/lib/form/fields-form.d.ts.map +1 -1
- package/lib/form/fields-form.js.map +1 -1
- package/lib/module/block-menu-tree-drawer.js +1 -1
- package/lib/module/block-menu-tree-drawer.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +1 -0
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/tmpl/interface.d.ts +25 -25
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/superagent.d.ts.map +1 -1
- package/lib/tmpl/superagent.js +1 -3
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +5 -5
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +52 -12
- package/src/aldehyde/controls/view-control.tsx +38 -31
- package/src/aldehyde/detail/edit/fields-edit-card.tsx +11 -8
- package/src/aldehyde/form/fields-form.tsx +2 -2
- package/src/aldehyde/module/block-menu-tree-drawer.tsx +1 -1
- package/src/aldehyde/module/dtmpl-edit-card.tsx +1 -0
- package/src/aldehyde/tmpl/interface.tsx +25 -25
- package/src/aldehyde/tmpl/superagent.js +1 -5
- package/src/aldehyde/units/index.tsx +7 -5
|
@@ -17,8 +17,8 @@ export type ActTableViewModel = "table" | "verticalList" | "horizontalList";
|
|
|
17
17
|
export type ControlHolderType = "table" | "descriptions";
|
|
18
18
|
export type PageType = "modal" | "drawer" | "card";
|
|
19
19
|
export interface TmplBase {
|
|
20
|
-
id
|
|
21
|
-
title
|
|
20
|
+
id?: string;
|
|
21
|
+
title?: string;
|
|
22
22
|
tip?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -182,23 +182,23 @@ export type GroupDisplayConfig =
|
|
|
182
182
|
| "tableview";
|
|
183
183
|
export interface FieldGroupConfig extends OrderableTmplBase {
|
|
184
184
|
serverKey?: string;
|
|
185
|
-
type
|
|
186
|
-
buttons
|
|
187
|
-
min
|
|
188
|
-
max
|
|
185
|
+
type?: FieldGroupType;
|
|
186
|
+
buttons?: ButtonName[];
|
|
187
|
+
min?: number;
|
|
188
|
+
max?: number;
|
|
189
189
|
showRowNum?: boolean;
|
|
190
190
|
relationNames?: string[];
|
|
191
191
|
showRelationName?: boolean;
|
|
192
192
|
fields: FieldConfig[];
|
|
193
|
-
rowActions
|
|
194
|
-
displayConfig
|
|
193
|
+
rowActions?: ActionConfig[];
|
|
194
|
+
displayConfig?: GroupDisplayConfig;
|
|
195
195
|
mainCode?: string;
|
|
196
196
|
disabled?: boolean;
|
|
197
197
|
readOnly?: boolean;
|
|
198
198
|
embedType?: "列表" | "详情" | "编辑" | "编辑或添加";
|
|
199
|
-
pageSourceFieldMstrucId
|
|
200
|
-
codeSourceFieldMstrucId
|
|
201
|
-
pointSourceId
|
|
199
|
+
pageSourceFieldMstrucId?: string;
|
|
200
|
+
codeSourceFieldMstrucId?: string;
|
|
201
|
+
pointSourceId?: string;
|
|
202
202
|
classifiedAddConfigs?: ClassifiedAddConfig[];
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -207,23 +207,23 @@ export type SaveJumpType = "list" | "add" | "edit";
|
|
|
207
207
|
export interface DtmplConfig extends TmplBase {
|
|
208
208
|
autoSaveInterval?: number;
|
|
209
209
|
//exportExcel fusionMode history dtmplSave refresh
|
|
210
|
-
buttons
|
|
210
|
+
buttons?: ButtonName[];
|
|
211
211
|
// list add edit
|
|
212
|
-
saveJumpTo
|
|
213
|
-
cQuerys
|
|
214
|
-
editAction
|
|
215
|
-
actions
|
|
216
|
-
premises
|
|
217
|
-
groups
|
|
218
|
-
buttonPosition
|
|
219
|
-
buildInFuncFields
|
|
220
|
-
onValuesChange
|
|
212
|
+
saveJumpTo?: SaveJumpType[];
|
|
213
|
+
cQuerys?: CQueryConfig[];
|
|
214
|
+
editAction?: ActionConfig;
|
|
215
|
+
actions?: ActionConfig[];
|
|
216
|
+
premises?: FieldConfig[];
|
|
217
|
+
groups?: FieldGroupConfig[];
|
|
218
|
+
buttonPosition?: ButtonPosition;
|
|
219
|
+
buildInFuncFields?: FieldConfig[];
|
|
220
|
+
onValuesChange?: (
|
|
221
221
|
changedValues,
|
|
222
222
|
allValues: DtmplData,
|
|
223
223
|
formInstance: FormInstance
|
|
224
224
|
) => void;
|
|
225
|
-
entity
|
|
226
|
-
dynamic
|
|
225
|
+
entity?: DtmplData;
|
|
226
|
+
dynamic?: boolean;
|
|
227
227
|
hiddenFields?: FieldConfig[];
|
|
228
228
|
}
|
|
229
229
|
|
|
@@ -351,11 +351,11 @@ export interface EnumItem {
|
|
|
351
351
|
export type EditStatus = "new" | "changed" | "persisted";
|
|
352
352
|
|
|
353
353
|
export interface DtmplData {
|
|
354
|
-
code
|
|
354
|
+
code?: string;
|
|
355
355
|
editStatus?: EditStatus;
|
|
356
356
|
title?: string;
|
|
357
357
|
relationLabel?: string;
|
|
358
|
-
fieldMap
|
|
358
|
+
fieldMap?: object;
|
|
359
359
|
arrayMap?: object; //Map<number,DtmplData[]>
|
|
360
360
|
}
|
|
361
361
|
|
|
@@ -17,11 +17,7 @@ export default class Superagent {
|
|
|
17
17
|
? options.header.hydrocarbonToken
|
|
18
18
|
: Units.hydrocarbonToken(programCode)
|
|
19
19
|
? Units.hydrocarbonToken(programCode)
|
|
20
|
-
: Units.getAnoHydrocarbonToken();
|
|
21
|
-
|
|
22
|
-
// let programCode = null;
|
|
23
|
-
|
|
24
|
-
//
|
|
20
|
+
: serverKey?Units.hydrocarbonToken():Units.getAnoHydrocarbonToken();
|
|
25
21
|
|
|
26
22
|
let loading;
|
|
27
23
|
if (options.data && options.data.isShowLoading !== false) {
|
|
@@ -33,6 +33,7 @@ export default {
|
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
getAppDtmplConfig(dtmplConfig: DtmplConfig, dtmplData: DtmplData,props:DtmplFormProps) {
|
|
36
|
+
|
|
36
37
|
if (dtmplConfig){
|
|
37
38
|
if( AppDtmplConfigFuncMap[dtmplConfig.id]) {
|
|
38
39
|
return AppDtmplConfigFuncMap[dtmplConfig.id](dtmplConfig, dtmplData, props);
|
|
@@ -178,11 +179,12 @@ export default {
|
|
|
178
179
|
if(!hydrocarbonToken){
|
|
179
180
|
hydrocarbonToken=window.sessionStorage.getItem('hydrocarbonToken');
|
|
180
181
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
|
|
183
|
+
if(hydrocarbonToken){
|
|
184
|
+
// hydrocarbonToken=window.localStorage.getItem(programCode+'hydrocarbonToken');
|
|
185
|
+
// if(!hydrocarbonToken){
|
|
186
|
+
// hydrocarbonToken=window.sessionStorage.getItem('hydrocarbonToken');
|
|
187
|
+
// }
|
|
186
188
|
this.setSessionHydrocarbonToken(hydrocarbonToken,programCode);
|
|
187
189
|
}
|
|
188
190
|
return hydrocarbonToken;
|