aldehyde 0.2.137 → 0.2.139
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 +1 -0
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts +1 -0
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/collapse-card/index.d.ts +1 -0
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.d.ts +1 -0
- package/lib/controls/color-picker/index.d.ts.map +1 -1
- package/lib/controls/counting-tag/index.d.ts.map +1 -1
- package/lib/controls/counting-tag/index.js +1 -3
- package/lib/controls/counting-tag/index.js.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +1 -0
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts +1 -0
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.d.ts +1 -0
- package/lib/controls/entity-select/lab-tree-select.d.ts.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +1 -0
- package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
- package/lib/controls/password-setter/index.d.ts +1 -0
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.d.ts +1 -0
- package/lib/controls/relation-existion/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.d.ts +1 -0
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/signature/index.d.ts +1 -0
- package/lib/controls/signature/index.d.ts.map +1 -1
- package/lib/controls/text/ellipsis-text.d.ts +1 -0
- package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
- package/lib/controls/upload/index.d.ts +1 -0
- package/lib/controls/upload/index.d.ts.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +1 -0
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts.map +1 -1
- package/lib/detail/button/bottom-submit-button-bar.d.ts +1 -0
- package/lib/detail/button/bottom-submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +1 -0
- package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
- package/lib/detail/button/fix-right-submit-button-bar.d.ts +1 -0
- package/lib/detail/button/fix-right-submit-button-bar.d.ts.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +1 -0
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +1 -0
- package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.d.ts +1 -0
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/rightbar/index.d.ts +1 -0
- package/lib/detail/rightbar/index.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +1 -0
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +1 -0
- package/lib/detail/view/field-view-group.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +1 -0
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +1 -0
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/exportor/export-frame.d.ts +1 -0
- package/lib/exportor/export-frame.d.ts.map +1 -1
- package/lib/exportor/export-frame.js +3 -1
- package/lib/exportor/export-frame.js.map +1 -1
- package/lib/form/dtmpl-form.d.ts +1 -0
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/field-group-form.d.ts +1 -0
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/form-Item-group.d.ts +1 -0
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/import/excel-import.d.ts +1 -0
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/layout/menu/block.d.ts +1 -0
- package/lib/layout/menu/block.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +1 -0
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/menu-2layers.d.ts +1 -0
- package/lib/layout/menu/menu-2layers.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.d.ts +1 -0
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/user-bar.d.ts +1 -0
- package/lib/layout/menu/user-bar.d.ts.map +1 -1
- package/lib/layout/menu/userinfo-bar.d.ts +1 -0
- package/lib/layout/menu/userinfo-bar.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.d.ts +1 -0
- package/lib/locale/LocaleProvider.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.js +6 -2
- package/lib/locale/LocaleProvider.js.map +1 -1
- package/lib/login/login.d.ts +1 -0
- package/lib/login/login.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts +1 -0
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +1 -0
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/ltmpl-modal.d.ts +1 -0
- package/lib/module/ltmpl-modal.d.ts.map +1 -1
- package/lib/module/ltmpl-table.d.ts +1 -0
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/table/act-table.d.ts +1 -0
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +1 -1
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/modal-select-table.d.ts +8 -1
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/modal-select-table.js +16 -7
- package/lib/table/modal-select-table.js.map +1 -1
- package/lib/table/pagination.d.ts +1 -0
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/query-table.d.ts +1 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/relation-table.d.ts +1 -0
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +1 -1
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/selected-rows-card.d.ts +1 -0
- package/lib/table/selected-rows-card.d.ts.map +1 -1
- package/lib/table/stat/restat.d.ts +1 -0
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.d.ts.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.js +16 -4
- package/lib/tmpl/tmpl-config-analysis.js.map +1 -1
- package/lib/tree/act-tree.d.ts +1 -0
- package/lib/tree/act-tree.d.ts.map +1 -1
- package/lib/tree/tmpl-tree.d.ts +1 -0
- package/lib/tree/tmpl-tree.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.d.ts +1 -0
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/workbench.d.ts +1 -0
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/counting-tag/index.tsx +2 -3
- package/src/aldehyde/exportor/export-frame.tsx +3 -2
- package/src/aldehyde/locale/LocaleProvider.tsx +8 -2
- package/src/aldehyde/table/act-table.tsx +2 -2
- package/src/aldehyde/table/modal-select-table.tsx +19 -8
- package/src/aldehyde/table/relation-table.tsx +1 -0
- package/src/aldehyde/tmpl/interface.tsx +1 -0
- package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +15 -5
|
@@ -12,6 +12,7 @@ export const LocaleContext = createContext<{
|
|
|
12
12
|
changeLocale: (locale: LocaleType) => void;
|
|
13
13
|
t: (...strs: string[]) => string;
|
|
14
14
|
translate: (...strs: string[]) => string;
|
|
15
|
+
getServiceLangStr?: ()=>string;
|
|
15
16
|
}>({
|
|
16
17
|
locale: undefined,
|
|
17
18
|
availableLang: [],
|
|
@@ -42,7 +43,7 @@ export const LocaleContext = createContext<{
|
|
|
42
43
|
|
|
43
44
|
res.push(tres);
|
|
44
45
|
return res.join("");
|
|
45
|
-
}
|
|
46
|
+
}
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
const getLocaleWithServer = async (lang: string, serverKey?: string) => {
|
|
@@ -84,6 +85,11 @@ export const LocaleProvider = ({
|
|
|
84
85
|
setLocale(locale);
|
|
85
86
|
};
|
|
86
87
|
|
|
88
|
+
const getServiceLangStr = () => {
|
|
89
|
+
const langStr = getLangWithLangApiMp(locale);
|
|
90
|
+
return langStr;
|
|
91
|
+
};
|
|
92
|
+
|
|
87
93
|
const getAllLocale = async (serverKey: string[]) => {
|
|
88
94
|
const newLangPkg = {
|
|
89
95
|
...langPkg,
|
|
@@ -190,7 +196,7 @@ export const LocaleProvider = ({
|
|
|
190
196
|
|
|
191
197
|
return (
|
|
192
198
|
<LocaleContext.Provider
|
|
193
|
-
value={{ locale, availableLang, langPkg, changeLocale, t, translate }}
|
|
199
|
+
value={{ locale, availableLang, langPkg, changeLocale, t, translate ,getServiceLangStr}}
|
|
194
200
|
>
|
|
195
201
|
{children}
|
|
196
202
|
</LocaleContext.Provider>
|
|
@@ -1277,7 +1277,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1277
1277
|
) : null}
|
|
1278
1278
|
{displayCriteriaCard ? this.renderCriteriaForm() : null}
|
|
1279
1279
|
{loading ? (
|
|
1280
|
-
|
|
1280
|
+
<Table loading={loading}></Table>
|
|
1281
1281
|
) : (
|
|
1282
1282
|
<QueryTable
|
|
1283
1283
|
serverKey={serverKey}
|
|
@@ -1334,7 +1334,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1334
1334
|
} = this.props;
|
|
1335
1335
|
const { translate } = this.context;
|
|
1336
1336
|
|
|
1337
|
-
if (!ltmplConfig || !sourceId) {
|
|
1337
|
+
if (!ltmplConfig || !sourceId ) {
|
|
1338
1338
|
return (
|
|
1339
1339
|
<>
|
|
1340
1340
|
<Card loading={loading}></Card>
|
|
@@ -19,6 +19,7 @@ interface ModelSelectTableProps {
|
|
|
19
19
|
mainCode:string,
|
|
20
20
|
exceptCodes?: string[],
|
|
21
21
|
onCancel: () => void,
|
|
22
|
+
defaultCriteriaValue?:object,
|
|
22
23
|
onOK: (selectedRows: SelectedRow[]) => void,
|
|
23
24
|
};
|
|
24
25
|
|
|
@@ -34,6 +35,9 @@ interface ModelSelectTableStat {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelSelectTableStat> {
|
|
38
|
+
static defaultProps={
|
|
39
|
+
defaultCriteriaValue:{}
|
|
40
|
+
}
|
|
37
41
|
state = {
|
|
38
42
|
selectConfig: undefined,
|
|
39
43
|
columns: undefined,
|
|
@@ -71,14 +75,15 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
async componentDidMount() {
|
|
74
|
-
const { sourceId, open} = this.props;
|
|
78
|
+
const { sourceId, open,defaultCriteriaValue} = this.props;
|
|
75
79
|
if (sourceId && open) {
|
|
76
|
-
|
|
80
|
+
let result=await this.loadConfig();
|
|
81
|
+
await this.loadData(result.selectConfig, result.criteriaData);
|
|
77
82
|
}
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
loadConfig = async () => {
|
|
81
|
-
const { sourceId, exceptCodes,serverKey} = this.props;
|
|
86
|
+
const { sourceId, exceptCodes,serverKey,defaultCriteriaValue} = this.props;
|
|
82
87
|
this.setState({
|
|
83
88
|
loading: true,
|
|
84
89
|
})
|
|
@@ -115,26 +120,32 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
});
|
|
123
|
+
let criteriaData = {...selectConfig.defaultCriteriaValue,...defaultCriteriaValue};
|
|
118
124
|
this.setState({
|
|
119
125
|
columns,
|
|
120
126
|
selectConfig,
|
|
121
127
|
loading: false,
|
|
128
|
+
criteriaData,
|
|
122
129
|
})
|
|
123
|
-
return selectConfig;
|
|
130
|
+
return {selectConfig,criteriaData};
|
|
124
131
|
}
|
|
125
132
|
|
|
126
133
|
async componentDidUpdate(prevProps) {
|
|
127
|
-
const {exceptCodes, open} = this.props;
|
|
134
|
+
const {exceptCodes, open,defaultCriteriaValue} = this.props;
|
|
128
135
|
const {selectConfig, criteriaData, queryKey, loading} = this.state;
|
|
129
136
|
const {exceptCodes: preExceptCodes, open: preOpen} = prevProps;
|
|
130
|
-
let config = selectConfig;
|
|
137
|
+
let config:SelectConfig = selectConfig;
|
|
138
|
+
let criteria=criteriaData
|
|
131
139
|
if (open) {
|
|
132
140
|
if (!config) {
|
|
133
|
-
|
|
141
|
+
let result = await this.loadConfig();
|
|
142
|
+
config=result.selectConfig;
|
|
143
|
+
criteria=result.criteriaData;
|
|
134
144
|
}
|
|
135
145
|
if (!queryKey && !loading) {
|
|
136
|
-
await this.loadData(config,
|
|
146
|
+
await this.loadData(config, {...criteria,...defaultCriteriaValue});
|
|
137
147
|
}
|
|
148
|
+
|
|
138
149
|
}
|
|
139
150
|
}
|
|
140
151
|
|
|
@@ -811,6 +811,7 @@ class RelationTable extends React.PureComponent<
|
|
|
811
811
|
{buttons.includes("selectAdd") ? (
|
|
812
812
|
<ModelSelectTable
|
|
813
813
|
serverKey={serverKey}
|
|
814
|
+
defaultCriteriaValue={fieldGroupConfig.defaultCriteriaValue}
|
|
814
815
|
maxSelectedRows={fieldGroupConfig.max}
|
|
815
816
|
open={showSelectTable}
|
|
816
817
|
onOK={this.select}
|
|
@@ -200,6 +200,7 @@ export interface FieldGroupConfig extends OrderableTmplBase {
|
|
|
200
200
|
codeSourceFieldMstrucId?: string;
|
|
201
201
|
pointSourceId?: string;
|
|
202
202
|
classifiedAddConfigs?: ClassifiedAddConfig[];
|
|
203
|
+
defaultCriteriaValue?:object,
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
export type SaveJumpType = "list" | "add" | "edit";
|
|
@@ -108,14 +108,24 @@ TmplConfigAnalysis.getFieldValueTitleOfMstrucId = (config: DtmplConfig | LtmplCo
|
|
|
108
108
|
let fieldId = TmplConfigAnalysis.getFieldId(config, mstrucId);
|
|
109
109
|
|
|
110
110
|
let val: string = fieldMap && fieldMap[fieldId];
|
|
111
|
-
if (val) {
|
|
112
|
-
val =
|
|
111
|
+
if (val == 'null' || !val) {
|
|
112
|
+
val = null;
|
|
113
|
+
}else if(Array.isArray(val)){
|
|
114
|
+
let val1="";
|
|
115
|
+
val.forEach((v)=>{
|
|
116
|
+
if(v.indexOf('@R@') > 0 ){
|
|
117
|
+
val1= v.split("@R@")[1]+",";
|
|
118
|
+
}else{
|
|
119
|
+
val1= v+",";
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
val=val1.substring(0,val1.lastIndexOf(","));
|
|
123
|
+
}if (val) {
|
|
124
|
+
val = val.indexOf('@R@') > 0 ? val.split("@R@")[1] : val;
|
|
113
125
|
} else {
|
|
114
126
|
return defaultValue;
|
|
115
127
|
}
|
|
116
|
-
|
|
117
|
-
val = null;
|
|
118
|
-
}
|
|
128
|
+
|
|
119
129
|
return val;
|
|
120
130
|
}
|
|
121
131
|
|