@steedos-widgets/amis-object 1.3.4-beta.13 → 1.3.4-beta.14
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/amis-object.cjs.js +29 -7
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +30 -8
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +6 -6
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +21 -21
- package/package.json +3 -3
package/dist/amis-object.cjs.js
CHANGED
|
@@ -9513,7 +9513,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
9513
9513
|
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
9514
9514
|
// labelField: labelField,
|
|
9515
9515
|
// valueField: valueField,
|
|
9516
|
-
source: apiInfo,
|
|
9516
|
+
// source: apiInfo,
|
|
9517
9517
|
autoComplete: apiInfo,
|
|
9518
9518
|
searchable: true,
|
|
9519
9519
|
};
|
|
@@ -17843,12 +17843,12 @@ var SteedosDropdownButton = function (props) {
|
|
|
17843
17843
|
* @Author: baozhoutao@steedos.com
|
|
17844
17844
|
* @Date: 2022-09-01 14:44:57
|
|
17845
17845
|
* @LastEditors: baozhoutao@steedos.com
|
|
17846
|
-
* @LastEditTime: 2023-
|
|
17846
|
+
* @LastEditTime: 2023-10-13 15:57:39
|
|
17847
17847
|
* @Description:
|
|
17848
17848
|
*/
|
|
17849
17849
|
var SteedosIcon = function (props) {
|
|
17850
17850
|
var _a, _b;
|
|
17851
|
-
props.basePath; var _c = props.category, category = _c === void 0 ? 'standard' : _c, _d = props.className, className = _d === void 0 ? '' : _d, _e = props.containerClassName, containerClassName = _e === void 0 ? '' : _e, _f = props.colorVariant, colorVariant = _f === void 0 ? 'default' : _f; props.inverse; var _g = props.name, name = _g === void 0 ? 'account' : _g, _h = props.size, size = _h === void 0 ? 'medium' : _h; props.title; var _j = props.rootUrl; _j === void 0 ? ((_b = (_a = props.data) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.rootUrl) || '' : _j;
|
|
17851
|
+
var alt = props.alt, height = props.height, width = props.width; props.basePath; var _c = props.category, category = _c === void 0 ? 'standard' : _c, _d = props.className, className = _d === void 0 ? '' : _d, _e = props.containerClassName, containerClassName = _e === void 0 ? '' : _e, _f = props.colorVariant, colorVariant = _f === void 0 ? 'default' : _f; props.inverse; var _g = props.name, name = _g === void 0 ? 'account' : _g, _h = props.size, size = _h === void 0 ? 'medium' : _h; props.title; var _j = props.rootUrl; _j === void 0 ? ((_b = (_a = props.data) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.rootUrl) || '' : _j;
|
|
17852
17852
|
// const [svg, setSvg] = useState();
|
|
17853
17853
|
// const xlinkHref = `${rootUrl}/unpkg.com/@salesforce-ux/design-system/assets/icons/${category}/${name}.svg#`; // `${rootUrl}/unpkg.com/@salesforce-ux/design-system/assets/icons/${category}/${name}.svg`
|
|
17854
17854
|
// useEffect(()=>{
|
|
@@ -17862,6 +17862,14 @@ var SteedosIcon = function (props) {
|
|
|
17862
17862
|
// }
|
|
17863
17863
|
// })
|
|
17864
17864
|
// }, [xlinkHref])
|
|
17865
|
+
if (name.startsWith('http://') || name.startsWith('https://') || name.endsWith('.jpg') || name.endsWith('.png')) {
|
|
17866
|
+
return React__default["default"].createElement(antd.Image, { alt: alt, height: height, width: width, className: className, preview: false, src: name });
|
|
17867
|
+
}
|
|
17868
|
+
if (name.indexOf('.') > -1) {
|
|
17869
|
+
var foo = name.split('.');
|
|
17870
|
+
category = foo[0];
|
|
17871
|
+
name = foo[1];
|
|
17872
|
+
}
|
|
17865
17873
|
return React__default["default"].createElement("span", { className: "slds-icon_container slds-icon-".concat(category, "-").concat(name, " ").concat(containerClassName) },
|
|
17866
17874
|
React__default["default"].createElement("svg", { className: "slds-icon slds-icon_".concat(size, " slds-icon-text-").concat(colorVariant, " ").concat(className) },
|
|
17867
17875
|
React__default["default"].createElement("use", { xlinkHref: "/assets/icons/".concat(category, "-sprite/svg/symbols.svg#").concat(name) })));
|
|
@@ -18338,11 +18346,11 @@ var AmisObjectCalendar = function (props) { return __awaiter(void 0, void 0, voi
|
|
|
18338
18346
|
}); };
|
|
18339
18347
|
|
|
18340
18348
|
var AmisRecordDetailHeader = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18341
|
-
var _a, className, objectUiSchema, defaultOnEvent, recordId, _b, onEvent, _c, showRecordTitle, objectApiName, schema;
|
|
18349
|
+
var _a, className, schemaFilter, objectUiSchema, defaultOnEvent, recordId, _b, onEvent, _c, showRecordTitle, objectApiName, schema, config, schemaFilterFun, _config, e_1;
|
|
18342
18350
|
return __generator(this, function (_d) {
|
|
18343
18351
|
switch (_d.label) {
|
|
18344
18352
|
case 0:
|
|
18345
|
-
_a = props.className, className = _a === void 0 ? 'sm:sticky top-0 z-10 bg-gray-100 border-b sm:rounded sm:border border-gray-300 p-4' : _a;
|
|
18353
|
+
_a = props.className, className = _a === void 0 ? 'sm:sticky top-0 z-10 bg-gray-100 border-b sm:rounded sm:border border-gray-300 p-4' : _a, schemaFilter = props.schemaFilter;
|
|
18346
18354
|
return [4 /*yield*/, getUISchema(props.objectApiName || "space_users", false)];
|
|
18347
18355
|
case 1:
|
|
18348
18356
|
objectUiSchema = _d.sent();
|
|
@@ -18369,8 +18377,22 @@ var AmisRecordDetailHeader = function (props) { return __awaiter(void 0, void 0,
|
|
|
18369
18377
|
case 2:
|
|
18370
18378
|
schema = (_d.sent()).amisSchema;
|
|
18371
18379
|
schema.className = className;
|
|
18372
|
-
|
|
18373
|
-
|
|
18380
|
+
config = Object.assign({}, schema, { onEvent: onEvent });
|
|
18381
|
+
if (!(schemaFilter && typeof schemaFilter === 'string')) return [3 /*break*/, 6];
|
|
18382
|
+
schemaFilterFun = new Function('config', 'props', schemaFilter);
|
|
18383
|
+
_d.label = 3;
|
|
18384
|
+
case 3:
|
|
18385
|
+
_d.trys.push([3, 5, , 6]);
|
|
18386
|
+
return [4 /*yield*/, schemaFilterFun(config, props)];
|
|
18387
|
+
case 4:
|
|
18388
|
+
_config = _d.sent();
|
|
18389
|
+
config = _config || config;
|
|
18390
|
+
return [3 /*break*/, 6];
|
|
18391
|
+
case 5:
|
|
18392
|
+
e_1 = _d.sent();
|
|
18393
|
+
console.warn(e_1);
|
|
18394
|
+
return [3 /*break*/, 6];
|
|
18395
|
+
case 6: return [2 /*return*/, config];
|
|
18374
18396
|
}
|
|
18375
18397
|
});
|
|
18376
18398
|
}); };
|