aldehyde 0.2.304 → 0.2.305
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/detail/button/index.css +2 -2
- package/lib/detail/dtmpl.css +4 -0
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +3 -1
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/layout2/page.d.ts +1 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +9 -9
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout3/components/tabs-layout.d.ts +5 -0
- package/lib/layout3/components/tabs-layout.d.ts.map +1 -0
- package/lib/layout3/components/tabs-layout.js +68 -0
- package/lib/layout3/components/tabs-layout.js.map +1 -0
- package/lib/layout3/components/time.d.ts +7 -0
- package/lib/layout3/components/time.d.ts.map +1 -0
- package/lib/layout3/components/time.js +18 -0
- package/lib/layout3/components/time.js.map +1 -0
- package/lib/layout3/components/user-button.d.ts +5 -0
- package/lib/layout3/components/user-button.d.ts.map +1 -0
- package/lib/layout3/components/user-button.js +146 -0
- package/lib/layout3/components/user-button.js.map +1 -0
- package/lib/layout3/css/header.css +156 -0
- package/lib/layout3/css/main.css +18 -0
- package/lib/layout3/css/sider.css +13 -0
- package/lib/layout3/css/tabs-layout.css +41 -0
- package/lib/layout3/header.d.ts +11 -0
- package/lib/layout3/header.d.ts.map +1 -0
- package/lib/layout3/header.js +117 -0
- package/lib/layout3/header.js.map +1 -0
- package/lib/layout3/imgs/header-bg.png +0 -0
- package/lib/layout3/imgs/home-bg.png +0 -0
- package/lib/layout3/main.d.ts +8 -0
- package/lib/layout3/main.d.ts.map +1 -0
- package/lib/layout3/main.js +15 -0
- package/lib/layout3/main.js.map +1 -0
- package/lib/layout3/page.d.ts +8 -0
- package/lib/layout3/page.d.ts.map +1 -0
- package/lib/layout3/page.js +57 -0
- package/lib/layout3/page.js.map +1 -0
- package/lib/layout3/sider.d.ts +10 -0
- package/lib/layout3/sider.d.ts.map +1 -0
- package/lib/layout3/sider.js +124 -0
- package/lib/layout3/sider.js.map +1 -0
- package/lib/lowcode-components/bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/bar-chart/index.js +4 -1
- package/lib/lowcode-components/bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/capsule-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/capsule-bar-chart/index.js +4 -1
- package/lib/lowcode-components/capsule-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/column-3d-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/column-3d-chart/index.js +4 -1
- package/lib/lowcode-components/column-3d-chart/index.js.map +1 -1
- package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/column-chart/index.js +4 -1
- package/lib/lowcode-components/column-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.js +4 -1
- package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-chart/index.js +5 -2
- package/lib/lowcode-components/line-chart/index.js.map +1 -1
- package/lib/lowcode-components/pie-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/pie-chart/index.js +60 -6
- package/lib/lowcode-components/pie-chart/index.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +1 -2
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +2 -2
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +29 -7
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/resizable-table.js +1 -1
- package/lib/table/resizable-table.js.map +1 -1
- package/lib/tmpl/interface.d.ts +2 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/detail/button/index.css +2 -2
- package/src/aldehyde/detail/dtmpl.css +4 -0
- package/src/aldehyde/form/dtmpl-form.tsx +8 -1
- package/src/aldehyde/index.tsx +5 -1
- package/src/aldehyde/layout2/page.tsx +9 -8
- package/src/aldehyde/layout3/components/tabs-layout.tsx +106 -0
- package/src/aldehyde/layout3/components/time.tsx +25 -0
- package/src/aldehyde/layout3/components/user-button.tsx +189 -0
- package/src/aldehyde/layout3/css/header.css +156 -0
- package/src/aldehyde/layout3/css/main.css +18 -0
- package/src/aldehyde/layout3/css/sider.css +13 -0
- package/src/aldehyde/layout3/css/tabs-layout.css +41 -0
- package/src/aldehyde/layout3/header.tsx +160 -0
- package/src/aldehyde/layout3/imgs/header-bg.png +0 -0
- package/src/aldehyde/layout3/imgs/home-bg.png +0 -0
- package/src/aldehyde/layout3/main.tsx +28 -0
- package/src/aldehyde/layout3/page.tsx +82 -0
- package/src/aldehyde/layout3/sider.tsx +176 -0
- package/src/aldehyde/lowcode-components/bar-chart/index.tsx +4 -1
- package/src/aldehyde/lowcode-components/capsule-bar-chart/index.tsx +4 -1
- package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +4 -1
- package/src/aldehyde/lowcode-components/column-chart/index.tsx +4 -1
- package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +4 -1
- package/src/aldehyde/lowcode-components/line-chart/index.tsx +5 -2
- package/src/aldehyde/lowcode-components/pie-chart/index.tsx +61 -6
- package/src/aldehyde/table/act-table.tsx +1 -2
- package/src/aldehyde/table/relation-table.tsx +28 -8
- package/src/aldehyde/table/resizable-table.tsx +1 -1
- package/src/aldehyde/tmpl/interface.tsx +2 -0
|
@@ -1228,8 +1228,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1228
1228
|
></div>
|
|
1229
1229
|
) : null}
|
|
1230
1230
|
<h3 >
|
|
1231
|
-
|
|
1232
|
-
<p style={{position:"relative",float: "left",marginBottom:"4px"}}> {!title
|
|
1231
|
+
<p className="act-table-title" style={{position:"relative",float: "left",marginBottom:"4px"}}> {!title
|
|
1233
1232
|
? translate("${" + ltmplConfig.title + "}")
|
|
1234
1233
|
: typeof title == "string"
|
|
1235
1234
|
? translate("${" + title + "}")
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import "./index.css";
|
|
22
22
|
import {
|
|
23
23
|
ClassAddConfig,
|
|
24
|
-
DtmplData,
|
|
24
|
+
DtmplData, FieldConfig,
|
|
25
25
|
FieldGroupConfig,
|
|
26
26
|
SelectedRow,
|
|
27
27
|
ViewOrEdit,
|
|
@@ -141,6 +141,7 @@ class RelationTable extends React.PureComponent<
|
|
|
141
141
|
if (flag) {
|
|
142
142
|
let row = {
|
|
143
143
|
key: item.code,
|
|
144
|
+
editStatus:item.editStatus,
|
|
144
145
|
relationLabel: item.relationLabel,
|
|
145
146
|
code: item.code, //增加code,为了删除操作
|
|
146
147
|
...item.fieldMap,
|
|
@@ -153,6 +154,24 @@ class RelationTable extends React.PureComponent<
|
|
|
153
154
|
return dataSource;
|
|
154
155
|
};
|
|
155
156
|
|
|
157
|
+
isDisabled=(record:DtmplData,item:FieldConfig)=>{
|
|
158
|
+
if(!item.rowEditType){
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
let isNew: boolean = record.editStatus && record.editStatus=="new";
|
|
162
|
+
let type = item.rowEditType;
|
|
163
|
+
if(type=="editable"){
|
|
164
|
+
return false;
|
|
165
|
+
}else if(type=="readonly"){
|
|
166
|
+
return true;
|
|
167
|
+
}else if(type=="editonly" && !isNew){
|
|
168
|
+
return false;
|
|
169
|
+
}else if(type=="addonly" && isNew){
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
|
|
156
175
|
buildColumns = () => {
|
|
157
176
|
const {viewOrEdit, fieldGroupConfig, serverKey, parentFormInstance} = this.props;
|
|
158
177
|
const {
|
|
@@ -192,9 +211,7 @@ class RelationTable extends React.PureComponent<
|
|
|
192
211
|
item.configChanged = true;
|
|
193
212
|
}
|
|
194
213
|
column["render"] = (text, record) => {
|
|
195
|
-
|
|
196
214
|
return (editings.indexOf(record.code) >= 0 ?
|
|
197
|
-
|
|
198
215
|
<FormItem style={{margin: 0}}
|
|
199
216
|
name={record.code + "_" + item.id}
|
|
200
217
|
key={record.code + "_" + item.id}
|
|
@@ -202,8 +219,7 @@ class RelationTable extends React.PureComponent<
|
|
|
202
219
|
initialValue={record[item.id]}>
|
|
203
220
|
<EntryControl
|
|
204
221
|
serverKey={serverKey}
|
|
205
|
-
|
|
206
|
-
fieldConfig={item}
|
|
222
|
+
fieldConfig={{...item,disabled:this.isDisabled(record,item)}}
|
|
207
223
|
value={record[item.id]}
|
|
208
224
|
/></FormItem> :
|
|
209
225
|
<ViewControl
|
|
@@ -425,8 +441,6 @@ class RelationTable extends React.PureComponent<
|
|
|
425
441
|
});
|
|
426
442
|
};
|
|
427
443
|
|
|
428
|
-
editRow = (record) => {
|
|
429
|
-
};
|
|
430
444
|
delete = async (record) => {
|
|
431
445
|
const {value, fieldGroupConfig, onChange, serverKey} = this.props;
|
|
432
446
|
const {editings} = this.state;
|
|
@@ -649,11 +663,17 @@ class RelationTable extends React.PureComponent<
|
|
|
649
663
|
let editingCodes = [...editings];
|
|
650
664
|
let i = 0;
|
|
651
665
|
for (let f of fieldMaps) {
|
|
666
|
+
|
|
652
667
|
let newData: DtmplData = {};
|
|
668
|
+
newData.editStatus="new";
|
|
653
669
|
newData.code = Date.now() + "" + i++;
|
|
654
670
|
newData.relationLabel = fieldGroupConfig.relationNames[0]
|
|
655
671
|
newData.fieldMap = f;
|
|
656
|
-
|
|
672
|
+
if(fieldGroupConfig.addRowPosition && fieldGroupConfig.addRowPosition==='end'){
|
|
673
|
+
datas.push(newData);
|
|
674
|
+
}else{
|
|
675
|
+
datas.unshift(newData);
|
|
676
|
+
}
|
|
657
677
|
editingCodes.push(newData.code);
|
|
658
678
|
}
|
|
659
679
|
|
|
@@ -329,6 +329,7 @@ export interface FieldGroupConfig extends OrderableTmplBase {
|
|
|
329
329
|
viewModel?: "table" | "verticalList";
|
|
330
330
|
addOrEditType?: "singleCol" | "doubleCol" | "tableRow";
|
|
331
331
|
batchAddFileField?: FieldConfig;
|
|
332
|
+
addRowPosition?:"begin"|"end";
|
|
332
333
|
}
|
|
333
334
|
|
|
334
335
|
export type SaveJumpType = "list" | "add" | "edit";
|
|
@@ -410,6 +411,7 @@ export interface FieldConfig extends FieldBase {
|
|
|
410
411
|
sortable?: boolean;
|
|
411
412
|
itemBreakLine?: boolean;
|
|
412
413
|
configChanged?: boolean;
|
|
414
|
+
rowEditType?:"editable"|"readonly"|"editonly"|"addonly";
|
|
413
415
|
}
|
|
414
416
|
|
|
415
417
|
export interface ActionRenderProps {
|