awing-library 2.1.2-dev.54 → 2.1.2-dev.55
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/esm/index.js +52 -43
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -167254,6 +167254,7 @@ const ObjectFields = props => {
|
|
|
167254
167254
|
};
|
|
167255
167255
|
|
|
167256
167256
|
const SchemaInformation = () => {
|
|
167257
|
+
var _a;
|
|
167257
167258
|
const {
|
|
167258
167259
|
t
|
|
167259
167260
|
} = useTranslation();
|
|
@@ -167320,52 +167321,60 @@ const SchemaInformation = () => {
|
|
|
167320
167321
|
}
|
|
167321
167322
|
setDisplayFields(tmpDisplayData);
|
|
167322
167323
|
}, [selectedRootSchema, fullFields, objectTypeCode]);
|
|
167324
|
+
console.log('rootSchemaObjects', rootSchemaObjects);
|
|
167323
167325
|
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
167324
|
-
children: [jsxRuntimeExports.jsx(
|
|
167325
|
-
|
|
167326
|
-
|
|
167327
|
-
|
|
167328
|
-
|
|
167329
|
-
|
|
167330
|
-
|
|
167331
|
-
|
|
167332
|
-
|
|
167333
|
-
|
|
167334
|
-
|
|
167335
|
-
|
|
167336
|
-
|
|
167337
|
-
|
|
167338
|
-
|
|
167339
|
-
|
|
167340
|
-
|
|
167341
|
-
|
|
167342
|
-
|
|
167343
|
-
|
|
167344
|
-
|
|
167345
|
-
|
|
167346
|
-
|
|
167347
|
-
|
|
167326
|
+
children: [jsxRuntimeExports.jsx(DataForm, {
|
|
167327
|
+
fields: [{
|
|
167328
|
+
fieldName: 'objectTypeCode',
|
|
167329
|
+
type: FIELD_TYPE.SELECT,
|
|
167330
|
+
label: t('Schema.ObjectLabel'),
|
|
167331
|
+
required: true,
|
|
167332
|
+
options: (objectTypeCodes !== null && objectTypeCodes !== void 0 ? objectTypeCodes : []).map(item => ({
|
|
167333
|
+
value: item.key.toString(),
|
|
167334
|
+
text: item.key
|
|
167335
|
+
})),
|
|
167336
|
+
inputProps: {
|
|
167337
|
+
disable: !isCreate,
|
|
167338
|
+
onChange: handleChangeObjectTypeCode,
|
|
167339
|
+
'data-testid': 'objectTypeCode'
|
|
167340
|
+
}
|
|
167341
|
+
}, {
|
|
167342
|
+
fieldName: 'name',
|
|
167343
|
+
type: FIELD_TYPE.TEXT,
|
|
167344
|
+
label: t('Schema.Name'),
|
|
167345
|
+
required: true,
|
|
167346
|
+
value: name,
|
|
167347
|
+
inputProps: {
|
|
167348
|
+
onChange: handleChangeSchemaName,
|
|
167349
|
+
'data-testid': 'SchemaName',
|
|
167350
|
+
helperText: isChangeName && !valid ? message : ''
|
|
167351
|
+
}
|
|
167352
|
+
}, ...((rootSchemaObjects === null || rootSchemaObjects === void 0 ? void 0 : rootSchemaObjects.length) ? [{
|
|
167353
|
+
fieldName: 'rootSchemaObjects',
|
|
167354
|
+
type: FIELD_TYPE.SELECT,
|
|
167355
|
+
label: t('Schema.RootSchema'),
|
|
167356
|
+
options: (rootSchemaObjects !== null && rootSchemaObjects !== void 0 ? rootSchemaObjects : []).map(item => {
|
|
167348
167357
|
var _a;
|
|
167349
|
-
return
|
|
167350
|
-
|
|
167351
|
-
|
|
167358
|
+
return {
|
|
167359
|
+
value: ((_a = item.id) === null || _a === void 0 ? void 0 : _a.toString()) || '',
|
|
167360
|
+
text: item.name + ' (' + item.objectTypeCode + ')'
|
|
167361
|
+
};
|
|
167362
|
+
}),
|
|
167363
|
+
inputProps: {
|
|
167364
|
+
disable: !isCreate,
|
|
167365
|
+
onChange: e => {
|
|
167366
|
+
const value = e.target.value;
|
|
167367
|
+
const newSelect = rootSchemaObjects.find(r => r.id === Number(value));
|
|
167368
|
+
newSelect && setSelectedRootSchema(newSelect);
|
|
167369
|
+
}
|
|
167370
|
+
}
|
|
167371
|
+
}] : [])],
|
|
167372
|
+
oldValue: {
|
|
167373
|
+
objectTypeCode: objectTypeCode,
|
|
167374
|
+
name: name,
|
|
167375
|
+
rootSchemaObjects: ((_a = selectedRootSchema === null || selectedRootSchema === void 0 ? void 0 : selectedRootSchema.id) === null || _a === void 0 ? void 0 : _a.toString()) || ''
|
|
167352
167376
|
},
|
|
167353
|
-
|
|
167354
|
-
return jsxRuntimeExports.jsx(MenuItem$1, {
|
|
167355
|
-
value: item.id,
|
|
167356
|
-
children: item.name + ' (' + item.objectTypeCode + ')'
|
|
167357
|
-
}, item.id);
|
|
167358
|
-
})
|
|
167359
|
-
}) : null, jsxRuntimeExports.jsx(TextField$1, {
|
|
167360
|
-
fullWidth: true,
|
|
167361
|
-
variant: "standard",
|
|
167362
|
-
label: t('Schema.Name'),
|
|
167363
|
-
required: true,
|
|
167364
|
-
onChange: handleChangeSchemaName,
|
|
167365
|
-
value: name,
|
|
167366
|
-
error: isChangeName && !valid,
|
|
167367
|
-
helperText: isChangeName && message,
|
|
167368
|
-
"data-testid": "SchemaName"
|
|
167377
|
+
padding: 'none'
|
|
167369
167378
|
}), jsxRuntimeExports.jsx(Typography$1, {
|
|
167370
167379
|
sx: {
|
|
167371
167380
|
fontWeight: 'bold',
|