@steedos-widgets/amis-object 3.6.4-beta.1 → 3.6.4-beta.2

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.
@@ -3665,7 +3665,7 @@ function getComparableAmisVersion() {
3665
3665
  * @Author: baozhoutao@steedos.com
3666
3666
  * @Date: 2022-05-23 09:53:08
3667
3667
  * @LastEditors: baozhoutao@steedos.com
3668
- * @LastEditTime: 2024-02-19 11:57:49
3668
+ * @LastEditTime: 2024-02-21 17:19:30
3669
3669
  * @Description:
3670
3670
  */
3671
3671
 
@@ -3751,7 +3751,7 @@ function getNameTpl(field, ctx){
3751
3751
  if(ctx && ctx.isLookup){
3752
3752
  linkTarget = "target='_blank'";
3753
3753
  }
3754
- if(ctx.isRelated){
3754
+ if(ctx.isRelated && window.innerWidth >= 768){
3755
3755
  return `<a href="${href}" ${linkTarget} onclick="return false;">\${${field.name} | raw}</a>`
3756
3756
  }else {
3757
3757
  return `<a href="${href}" ${linkTarget}>\${${field.name} | raw}</a>`
@@ -3809,7 +3809,7 @@ function getRelatedFieldTpl(field, ctx){
3809
3809
  const href = Router$1.getObjectDetailPath({
3810
3810
  formFactor: ctx.formFactor, appId: "${appId}", objectName: `${objectNameTpl}`, recordId: `${recordIdTpl}`
3811
3811
  });
3812
- if(ctx.isRelated){
3812
+ if(ctx.isRelated && window.innerWidth >= 768){
3813
3813
  labelTpl = `<a href="${href}" ${linkTarget} onclick="return false;">${labelTpl}</a>`;
3814
3814
  }else {
3815
3815
  labelTpl = `<a href="${href}" ${linkTarget}>${labelTpl}</a>`;
@@ -5466,7 +5466,7 @@ async function getTableColumns$1(fields, options){
5466
5466
  columnItem.defaultColor = null;
5467
5467
  }
5468
5468
 
5469
- if(((field.is_name || field.name === options.labelFieldName) || ((field.type == 'lookup' || field.type == 'master_detail') && _$1__namespace.isString(field.reference_to) && field.multiple != true)) && options.isRelated){
5469
+ if(window.innerWidth >= 768 && ((field.is_name || field.name === options.labelFieldName) || ((field.type == 'lookup' || field.type == 'master_detail') && _$1__namespace.isString(field.reference_to) && field.multiple != true)) && options.isRelated){
5470
5470
 
5471
5471
  const drawerRecordDetailSchema = {
5472
5472
  "type": "steedos-record-detail",
@@ -5494,16 +5494,17 @@ async function getTableColumns$1(fields, options){
5494
5494
  "drawer": {
5495
5495
  "type": "drawer",
5496
5496
  "title": "&nbsp;",
5497
- "headerClassName": "",
5497
+ "headerClassName": "hidden",
5498
5498
  "size": "lg",
5499
- "bodyClassName": "p-0 m-0 border-t",
5499
+ "bodyClassName": "p-0 m-0",
5500
5500
  "closeOnEsc": true,
5501
+ "closeOnOutside": true,
5501
5502
  "resizable": true,
5502
5503
  "actions": [],
5503
5504
  "body": [
5504
5505
  drawerRecordDetailSchema
5505
5506
  ],
5506
- "className": "app-popover",
5507
+ "className": "steedos-record-detail-drawer app-popover",
5507
5508
  "id": "u:fc5f055afa8c"
5508
5509
  },
5509
5510
  "preventDefault": true
@@ -5561,7 +5562,7 @@ function getMobileLines(tpls){
5561
5562
  let isNewLine = false;
5562
5563
  let isLeft = true;
5563
5564
  let lineChildrenClassName = "";
5564
- let lineClassName = "flex items-center justify-between";
5565
+ let lineClassName = "flex items-center justify-between mb-1";
5565
5566
  tpls.forEach(function(item){
5566
5567
  if(isNewLine && lines.length < maxLineCount){
5567
5568
  lines.push({
@@ -8861,44 +8862,46 @@ const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
8861
8862
  }
8862
8863
  });
8863
8864
 
8864
- return {
8865
- "type": "button",
8866
- "icon": "fa fa-angle-down",
8867
- "visibleOn": phoneMoreButtonsVisibleOn,
8868
- "onEvent": {
8869
- "click": {
8870
- "actions": [
8871
- {
8872
- "actionType": "drawer",
8873
- "drawer": {
8874
- "type": "drawer",
8875
- "title": instance.t('frontend_operation'),
8876
- "id": "object_actions_drawer_" + objectSchema.name,
8877
- "body": [
8878
- {
8879
- "type": "button-group",
8880
- "id": "u:fd837823be5b",
8881
- "vertical": true,
8882
- "tiled": true,
8883
- "buttons": dropdownButtons,
8884
- "btnLevel": "enhance",
8885
- "className": "w-full",
8886
- "btnClassName": "w-full",
8887
- "size": "lg"
8865
+ return [
8866
+ {
8867
+ "type": "button",
8868
+ "icon": "fa fa-angle-down",
8869
+ "visibleOn": phoneMoreButtonsVisibleOn,
8870
+ "onEvent": {
8871
+ "click": {
8872
+ "actions": [
8873
+ {
8874
+ "actionType": "drawer",
8875
+ "drawer": {
8876
+ "type": "drawer",
8877
+ "title": instance.t('frontend_operation'),
8878
+ "id": "object_actions_drawer_" + objectSchema.name,
8879
+ "body": [
8880
+ {
8881
+ "type": "button-group",
8882
+ "id": "u:fd837823be5b",
8883
+ "vertical": true,
8884
+ "tiled": true,
8885
+ "buttons": dropdownButtons,
8886
+ "btnLevel": "enhance",
8887
+ "className": "w-full",
8888
+ "btnClassName": "w-full",
8889
+ "size": "lg"
8890
+ }
8891
+ ],
8892
+ "position": "bottom",
8893
+ "closeOnOutside": true,
8894
+ "resizable": false,
8895
+ "className": "buttons-drawer",
8896
+ "bodyClassName": "m-none p-none",
8897
+ "actions": []
8888
8898
  }
8889
- ],
8890
- "position": "bottom",
8891
- "closeOnOutside": true,
8892
- "resizable": false,
8893
- "className": "buttons-drawer",
8894
- "bodyClassName": "m-none p-none",
8895
- "actions": []
8896
- }
8899
+ }
8900
+ ]
8897
8901
  }
8898
- ]
8902
+ }
8899
8903
  }
8900
- }
8901
- }
8904
+ ]
8902
8905
  }else {
8903
8906
  if(moreButtons.length > 0){
8904
8907
  const dropdownButtonsSchema = {
@@ -9967,6 +9970,33 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
9967
9970
  amisButtonsSchema = getObjectDetailButtonsSchemas(objectSchema, recordId, options);
9968
9971
  }
9969
9972
 
9973
+ amisButtonsSchema.push(
9974
+ {
9975
+ "type": "button",
9976
+ "visibleOn": "${_inDrawer === true || _inRecordMini === true}",
9977
+ "className":"ant-dropdown-trigger slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small slds-icon ml-1 flex",
9978
+ "onEvent": {
9979
+ "click": {
9980
+ "actions": [
9981
+ {
9982
+ "actionType": "custom",
9983
+ "script": "const data = event.data; window.open(`/app/${data.app_id}/${data.objectName}/view/${data.recordId}?side_object=${data.side_object}&side_listview_id=${data.side_listview_id}`)"
9984
+ }
9985
+ ]
9986
+ }
9987
+ },
9988
+ "body": [
9989
+ {
9990
+ "type": "steedos-icon",
9991
+ "category": "utility",
9992
+ "name": "new_window",
9993
+ "colorVariant": "default",
9994
+ "className": "slds-button_icon slds-global-header__icon w-4"
9995
+ }
9996
+ ]
9997
+ }
9998
+ );
9999
+
9970
10000
  let backButtonsSchema = null;
9971
10001
 
9972
10002
  if(options.showBackButton != false){
@@ -9987,7 +10017,32 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
9987
10017
  "columns": [
9988
10018
  {
9989
10019
  "body": [
9990
- backButtonsSchema
10020
+ backButtonsSchema,
10021
+ {
10022
+ "type": "button",
10023
+ "visibleOn": "${_inDrawer === true}",
10024
+ "className":"flex mr-4",
10025
+ "onEvent": {
10026
+ "click": {
10027
+ "actions": [
10028
+ {
10029
+ "componentId": "",
10030
+ "args": {},
10031
+ "actionType": "closeDrawer"
10032
+ }
10033
+ ]
10034
+ }
10035
+ },
10036
+ "body": [
10037
+ {
10038
+ "type": "steedos-icon",
10039
+ "category": "utility",
10040
+ "name": "close",
10041
+ "colorVariant": "default",
10042
+ "className": "slds-button_icon slds-global-header__icon w-4"
10043
+ }
10044
+ ]
10045
+ }
9991
10046
  ,{
9992
10047
  "type": "tpl",
9993
10048
  "className": "block",
@@ -10202,10 +10257,10 @@ async function getObjectRecordDetailRelatedListHeader(relatedObjectSchema, relat
10202
10257
  "md": "auto"
10203
10258
  }
10204
10259
  ],
10205
- "className": "flex justify-between"
10260
+ "className": "flex justify-between min-h-8 items-center"
10206
10261
  }
10207
10262
  ],
10208
- "className": "steedos-record-related-header py-2 px-3 bg-gray-50 border"
10263
+ "className": "steedos-record-related-header py-2 px-3 bg-gray-50 border rounded"
10209
10264
  };
10210
10265
  return recordRelatedListHeader;
10211
10266
  }
@@ -14915,6 +14970,33 @@ async function getApi(object, recordId, fields, options){
14915
14970
  }
14916
14971
  }
14917
14972
 
14973
+ async function getAutoFill(field, refObject) {
14974
+ let autoFillMapping = field.auto_fill_mapping;
14975
+ if (autoFillMapping && autoFillMapping.length) {
14976
+ let fillMapping = {};
14977
+ let fieldsForApi = [];
14978
+ autoFillMapping.forEach(function (item) {
14979
+ fillMapping[item.to] = `\${${item.from}}`;
14980
+ fieldsForApi.push(item.from);
14981
+ });
14982
+ // let api = {
14983
+ // // "url": "/amis/api/mock2/form/autoUpdate?browser=${browser}&version=${version}",
14984
+ // "url": `/api/v1/${refObject.name}/\${${field.name}}?fields=${JSON.stringify(fieldsForApi)}`,
14985
+ // // "responseData": {
14986
+ // // "name": "${name}"
14987
+ // // },
14988
+ // "silent": false
14989
+ // }
14990
+ // return {
14991
+ // fillMapping,
14992
+ // // api
14993
+ // }
14994
+ // 因为autoFill中配置了api的话,在表单初始化(比如新建记录)时并不会触发执行autoFill,所以只能暂时不用api
14995
+ // 给amis报过问题了,见:https://github.com/baidu/amis/issues/9631
14996
+ return fillMapping;
14997
+ }
14998
+ }
14999
+
14918
15000
  async function lookupToAmis(field, readonly, ctx){
14919
15001
  if(!ctx){
14920
15002
  ctx = {};
@@ -14998,6 +15080,10 @@ async function lookupToAmis(field, readonly, ctx){
14998
15080
  amisSchema = _$1__namespace.defaultsDeep({}, pageAmisSchema, amisSchema);
14999
15081
  }
15000
15082
  }
15083
+ const autoFill = await getAutoFill(field);
15084
+ if(autoFill){
15085
+ amisSchema.autoFill = autoFill;
15086
+ }
15001
15087
  return amisSchema;
15002
15088
  }
15003
15089
 
@@ -15173,6 +15259,7 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
15173
15259
  {
15174
15260
  "type": "editor",
15175
15261
  "name": field.name,
15262
+ "labelClassName": "none",
15176
15263
  "language": "markdown",
15177
15264
  }
15178
15265
  ]
@@ -17670,7 +17757,9 @@ async function getButtonNew(props) {
17670
17757
  "actions": await getButtonActions(props, "new")
17671
17758
  }
17672
17759
  },
17673
- "level": "primary"
17760
+ "level": "link",
17761
+ "className": "text-gray-500",
17762
+ "size": "xs"
17674
17763
  };
17675
17764
  }
17676
17765
 
@@ -17680,6 +17769,7 @@ async function getButtonEdit(props, showAsInlineEditMode) {
17680
17769
  "label": "",
17681
17770
  "icon": `fa fa-${showAsInlineEditMode ? "expand-alt" : "pencil"}`,//inline edit模式时显示为放开按钮,只读时显示为笔按钮
17682
17771
  "level": "link",
17772
+ "className": "text-gray-400",
17683
17773
  "onEvent": {
17684
17774
  "click": {
17685
17775
  "actions": await getButtonActions(props, "edit")
@@ -17694,6 +17784,7 @@ async function getButtonView(props) {
17694
17784
  "label": "",
17695
17785
  "icon": "fa fa-expand-alt",//fa-external-link
17696
17786
  "level": "link",
17787
+ "className": "text-gray-400",
17697
17788
  "onEvent": {
17698
17789
  "click": {
17699
17790
  "actions": await getButtonActions(props, "readonly")
@@ -17706,6 +17797,7 @@ async function getButtonDelete(props) {
17706
17797
  return {
17707
17798
  "type": "dropdown-button",
17708
17799
  "level": "link",
17800
+ "btnClassName": "text-gray-400",
17709
17801
  "icon": "fa fa-trash-alt",
17710
17802
  "size": "xs",
17711
17803
  "hideCaret": true,
@@ -17940,6 +18032,10 @@ const getAmisInputTableSchema = async (props) => {
17940
18032
  "labelAlign": props.labelAlign,
17941
18033
  //控制control的mode属性,https://aisuda.bce.baidu.com/amis/zh-CN/components/form/formitem#表单项展示
17942
18034
  "mode": props.mode || null,
18035
+ "visibleOn": props.$schema.visibleOn,
18036
+ "visible": props.$schema.visible,
18037
+ "hiddenOn": props.$schema.hiddenOn,
18038
+ "hidden": props.$schema.hidden,
17943
18039
  className
17944
18040
  };
17945
18041
  // console.log("===schema===", schema);
@@ -20612,11 +20708,15 @@ var index_esm$1 = /*#__PURE__*/Object.freeze({
20612
20708
  getButtonVisibleOn: getButtonVisibleOn,
20613
20709
  getButtons: getButtons,
20614
20710
  getCalendarSchema: getCalendarSchema,
20711
+ getCreatedInfoTpl: getCreatedInfoTpl,
20712
+ getDateTimeTpl: getDateTimeTpl,
20713
+ getDateTpl: getDateTpl,
20615
20714
  getDefaultRenderData: getDefaultRenderData,
20616
20715
  getEnv: getEnv,
20617
20716
  getEnvs: getEnvs,
20618
20717
  getEvn: getEvn,
20619
20718
  getField: getField,
20719
+ getFieldTpl: getFieldTpl,
20620
20720
  getFileSrc: getFileSrc,
20621
20721
  getFlowFormSchema: getFlowFormSchema,
20622
20722
  getFormPageInitSchema: getFormPageInitSchema,
@@ -20633,8 +20733,14 @@ var index_esm$1 = /*#__PURE__*/Object.freeze({
20633
20733
  getListViewItemButtons: getListViewItemButtons,
20634
20734
  getListViewSort: getListViewSort,
20635
20735
  getListviewInitSchema: getListviewInitSchema,
20736
+ getLocationTpl: getLocationTpl,
20636
20737
  getLookupSapceUserTreeSchema: getLookupSapceUserTreeSchema,
20738
+ getLookupTpl: getLookupTpl,
20739
+ getModifiedInfoTpl: getModifiedInfoTpl,
20740
+ getNameTpl: getNameTpl,
20741
+ getNameTplUrl: getNameTplUrl,
20637
20742
  getNotifications: getNotifications,
20743
+ getNumberTpl: getNumberTpl,
20638
20744
  getObjectDetailButtons: getObjectDetailButtons,
20639
20745
  getObjectDetailButtonsSchemas: getObjectDetailButtonsSchemas,
20640
20746
  getObjectDetailMoreButtons: getObjectDetailMoreButtons,
@@ -20655,6 +20761,7 @@ var index_esm$1 = /*#__PURE__*/Object.freeze({
20655
20761
  getObjectRelatedListHeader: getObjectRelatedListHeader,
20656
20762
  getObjectRelatedListsMiniSchema: getObjectRelatedListsMiniSchema,
20657
20763
  getPage: getPage,
20764
+ getPasswordTpl: getPasswordTpl,
20658
20765
  getRecord: getRecord,
20659
20766
  getRecordDetailHeaderSchema: getRecordDetailHeaderSchema,
20660
20767
  getRecordDetailMiniSchema: getRecordDetailMiniSchema,
@@ -20663,21 +20770,29 @@ var index_esm$1 = /*#__PURE__*/Object.freeze({
20663
20770
  getRecordPageInitSchema: getRecordPageInitSchema,
20664
20771
  getRecordPermissions: getRecordPermissions,
20665
20772
  getRecordServiceSchema: getRecordServiceSchema,
20773
+ getRefObjectNameFieldName: getRefObjectNameFieldName,
20666
20774
  getReferenceTo: getReferenceTo,
20667
20775
  getReferenceToFieldSchema: getReferenceToFieldSchema,
20668
20776
  getReferenceToSync: getReferenceToSync,
20777
+ getRelatedFieldTpl: getRelatedFieldTpl,
20669
20778
  getRelatedFieldValue: getRelatedFieldValue,
20670
20779
  getRelatedListSchema: getRelatedListSchema,
20671
20780
  getRelatedsCount: getRelatedsCount,
20672
20781
  getRootUrl: getRootUrl,
20782
+ getSelectMap: getSelectMap,
20783
+ getSelectTpl: getSelectTpl,
20673
20784
  getSelectUserSchema: getSelectUserSchema,
20674
20785
  getSpaceUsersPickerAmisSchema: getSpaceUsersPickerAmisSchema,
20675
20786
  getSpaceUsersPickerSchema: getSpaceUsersPickerSchema,
20676
20787
  getSteedosAuth: getSteedosAuth,
20788
+ getSwitchTpl: getSwitchTpl,
20677
20789
  getTableSchema: getTableSchema,
20678
20790
  getTenantId: getTenantId,
20791
+ getTimeTpl: getTimeTpl,
20679
20792
  getUISchema: getUISchema,
20680
20793
  getUISchemaSync: getUISchemaSync$1,
20794
+ getUiFieldTpl: getUiFieldTpl,
20795
+ getUiFileSizeTpl: getUiFileSizeTpl,
20681
20796
  getUserId: getUserId,
20682
20797
  getViewSchema: getViewSchema,
20683
20798
  isExpression: isExpression$1,
@@ -23029,10 +23144,58 @@ function getAmisStaticFieldType(type, data_type, options) {
23029
23144
  else if (type === 'textarea') {
23030
23145
  return 'static';
23031
23146
  }
23147
+ else if (type === 'html') {
23148
+ return 'input-rich-text';
23149
+ }
23150
+ else if (type === 'markdown') {
23151
+ return 'static-markdown';
23152
+ }
23153
+ else if (type === 'select') {
23154
+ return 'static-mapping';
23155
+ }
23156
+ else if (type === 'color') {
23157
+ return 'static-color';
23158
+ }
23032
23159
  return type;
23033
23160
  }
23161
+ var REFERENCE_VALUE_ITEM_ONCLICK = {
23162
+ "click": {
23163
+ "actions": [
23164
+ {
23165
+ "actionType": "drawer",
23166
+ "drawer": {
23167
+ "type": "drawer",
23168
+ "title": "&nbsp;",
23169
+ "headerClassName": "hidden",
23170
+ "size": "lg",
23171
+ "bodyClassName": "p-0 m-0",
23172
+ "closeOnEsc": true,
23173
+ "closeOnOutside": true,
23174
+ "resizable": true,
23175
+ "actions": [],
23176
+ "body": [
23177
+ {
23178
+ "type": "steedos-record-detail",
23179
+ "objectApiName": "${objectName}",
23180
+ "recordId": "${value}",
23181
+ "showBackButton": false,
23182
+ "showButtons": true,
23183
+ "data": {
23184
+ "_inDrawer": true,
23185
+ "recordLoaded": false, // 重置数据加载状态
23186
+ }
23187
+ }
23188
+ ],
23189
+ "className": "steedos-record-detail-drawer app-popover",
23190
+ "id": "u:fc5f055afa8c"
23191
+ },
23192
+ "preventDefault": true
23193
+ }
23194
+ ]
23195
+ }
23196
+ };
23034
23197
  var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void 0, function () {
23035
- var steedosField, field, _a, readonly, _b, ctx, config, fStatic, env, inInputTable, className, defaultSource, source, fieldBaseProps, referenceTo_1, fieldValue, fieldRefObject, disPlayValue, res, valueOptions_1, fieldValue, values, disPlayValue_1, schema, fieldSchema, fieldValue, hasImageOrFile_1, fieldHtml_1, schema, tableFields, _c, _d, subField, subFieldName, fieldAmis, schema, error_1;
23198
+ var steedosField, field, _a, readonly, _b, ctx, config, fStatic, env, inInputTable, className, lookupATagClick, defaultSource, source, fieldBaseProps, referenceTo_1, fieldValue, fieldRefObject, disPlayValue, res, valueOptions_1, fieldValue, values, disPlayValue_1, schema, fieldSchema, fieldValue, hasImageOrFile_1, fieldHtml_1, schema, map, tableFields, _c, _d, subField, subFieldName, fieldAmis, schema, error_1;
23036
23199
  var _e, e_1, _f;
23037
23200
  var _g, _h, _j, _k, _l, _m;
23038
23201
  return __generator(this, function (_o) {
@@ -23071,6 +23234,10 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23071
23234
  case 1:
23072
23235
  _o.trys.push([1, 24, , 25]);
23073
23236
  if (!(fStatic && (steedosField.type === 'lookup' || steedosField.type === 'master_detail'))) return [3 /*break*/, 7];
23237
+ lookupATagClick = 'onclick="return false;"';
23238
+ if (window.innerWidth < 768) {
23239
+ lookupATagClick = "";
23240
+ }
23074
23241
  defaultSource = {
23075
23242
  "method": "post",
23076
23243
  "url": "${context.rootUrl}/graphql",
@@ -23147,8 +23314,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23147
23314
  labelClassName: "hidden",
23148
23315
  label: false,
23149
23316
  className: 'm-0',
23150
- tpl: "<a href=\"/app/-/${objectName}/view/${value}\" target=\"_blank\">${label}</a>",
23151
- popOver: fieldRefObject.compactLayouts ? {
23317
+ tpl: "<a href=\"/app/-/${objectName}/view/${value}\" target=\"_blank\" ".concat(lookupATagClick, ">${label}</a>"),
23318
+ popOver: fieldRefObject.compactLayouts && window.innerWidth >= 768 ? {
23152
23319
  "trigger": "hover",
23153
23320
  "className": "steedos-record-detail-popover",
23154
23321
  "position": "left-bottom",
@@ -23167,11 +23334,12 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23167
23334
  "showBackButton": false,
23168
23335
  "data": {
23169
23336
  "objectName": "${objectName}",
23170
- "recordId": "${value}"
23337
+ "recordId": "${value}",
23171
23338
  }
23172
23339
  }
23173
23340
  ]
23174
- } : null
23341
+ } : null,
23342
+ onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
23175
23343
  }
23176
23344
  }
23177
23345
  ]
@@ -23220,8 +23388,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23220
23388
  items: {
23221
23389
  type: 'static',
23222
23390
  className: 'm-0',
23223
- tpl: "<a href=\"/app/-/${objectName}/view/${value}\" target=\"_blank\">${label}</a>",
23224
- popOver: fieldRefObject.compactLayouts ? {
23391
+ tpl: "<a href=\"/app/-/${objectName}/view/${value}\" target=\"_blank\" ".concat(lookupATagClick, ">${label}</a>"),
23392
+ popOver: fieldRefObject.compactLayouts && window.innerWidth >= 768 ? {
23225
23393
  "trigger": "hover",
23226
23394
  "className": "steedos-record-detail-popover",
23227
23395
  "position": "left-bottom",
@@ -23240,11 +23408,12 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23240
23408
  "showBackButton": false,
23241
23409
  "data": {
23242
23410
  "objectName": "${objectName}",
23243
- "recordId": "${value}"
23411
+ "recordId": "${value}",
23244
23412
  }
23245
23413
  }
23246
23414
  ]
23247
- } : null
23415
+ } : null,
23416
+ onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
23248
23417
  }
23249
23418
  }
23250
23419
  ]
@@ -23327,8 +23496,10 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23327
23496
  return [3 /*break*/, 20];
23328
23497
  case 12:
23329
23498
  if (!(steedosField.type === "select")) return [3 /*break*/, 13];
23499
+ map = getSelectMap(steedosField.options);
23330
23500
  Object.assign(schema, {
23331
- "placeholder": ""
23501
+ "placeholder": "",
23502
+ "map": map
23332
23503
  });
23333
23504
  return [3 /*break*/, 20];
23334
23505
  case 13:
@@ -23431,6 +23602,36 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23431
23602
  tpl: "<%=(data.".concat(steedosField.name, " || \"\").split(\"\\n\").join('<br>')%>")
23432
23603
  });
23433
23604
  }
23605
+ else if (steedosField.type === 'html') {
23606
+ Object.assign(schema, {
23607
+ "receiver": "${context.rootUrl}/s3/images",
23608
+ "options": {
23609
+ "menu": {
23610
+ "insert": {
23611
+ "title": "Insert",
23612
+ "items": "image link media addcomment pageembed codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents | insertdatetime"
23613
+ }
23614
+ },
23615
+ "plugins": [
23616
+ "autoresize"
23617
+ ],
23618
+ // "max_height": 2000,
23619
+ "statusbar": false,
23620
+ "readonly": true,
23621
+ "toolbar": false,
23622
+ "menubar": false
23623
+ }
23624
+ });
23625
+ }
23626
+ else if (steedosField.type === 'markdown') {
23627
+ Object.assign(schema, {
23628
+ "options": {
23629
+ "linkify": true,
23630
+ "html": true,
23631
+ "breaks": true
23632
+ }
23633
+ });
23634
+ }
23434
23635
  _o.label = 20;
23435
23636
  case 20:
23436
23637
  Object.assign(schema, steedosField.amis || {});
@@ -23744,12 +23945,18 @@ var AmisInstanceDetail = function (props) { return __awaiter(void 0, void 0, voi
23744
23945
  }); };
23745
23946
 
23746
23947
  var AmisInputTable = function (props) { return __awaiter(void 0, void 0, void 0, function () {
23747
- var amisSchema;
23948
+ var extendProps, amisSchema;
23748
23949
  return __generator(this, function (_a) {
23749
23950
  switch (_a.label) {
23750
23951
  case 0:
23751
- props.$schema, props.fields, props.name, props.id, props.data, props.columns, props.amis, props.className, props.tableClassName, props.headerToolbar, props.footerToolbar, props.inlineEditMode, props.strictMode, props.dialog, props.primaryKey, props.showOperation, props.fieldPrefix, props.autoGeneratePrimaryKeyValue, props.mode;
23752
- return [4 /*yield*/, getAmisInputTableSchema(props)];
23952
+ props.$schema, props.fields, props.name, props.id, props.data, props.columns, props.amis, props.className, props.tableClassName, props.headerToolbar, props.footerToolbar, props.inlineEditMode, props.strictMode, props.dialog, props.primaryKey, props.showOperation, props.fieldPrefix, props.autoGeneratePrimaryKeyValue, props.mode, props.disabledOn, props.disabled, props.visibleOn, props.visible, props.hiddenOn, props.hidden;
23953
+ extendProps = {};
23954
+ if (props.disabledOn || props.disabled) {
23955
+ extendProps["addable"] = false;
23956
+ extendProps["editable"] = false;
23957
+ extendProps["removable"] = false;
23958
+ }
23959
+ return [4 /*yield*/, getAmisInputTableSchema(Object.assign({}, props, extendProps))];
23753
23960
  case 1:
23754
23961
  amisSchema = _a.sent();
23755
23962
  // console.log("=AmisInputTable==amisSchema====", amisSchema);
@@ -23785,14 +23992,17 @@ var AmisRecordDetailMini = function (props) { return __awaiter(void 0, void 0, v
23785
23992
  if (props.$$editor) {
23786
23993
  options.isEditor = true;
23787
23994
  }
23788
- console.log("AmisRecordDetailMini==2=>", objectApiName, options);
23789
23995
  return [4 /*yield*/, getRecordDetailMiniSchema(objectApiName, appId, options)];
23790
23996
  case 1:
23791
23997
  schema = _b.sent();
23792
23998
  if (!_$1.isEmpty(schemaData)) {
23793
- schema.data = schemaData;
23999
+ schema.data = Object.assign({
24000
+ "_inDrawer": false,
24001
+ "_inRecordMini": true,
24002
+ "recordLoaded": false, // 重置数据加载状态
24003
+ }, schemaData);
23794
24004
  }
23795
- // console.log(`AmisRecordDetailMini===>`, schema)
24005
+ // console.log(`AmisRecordDetailMini===>`, schema)
23796
24006
  return [2 /*return*/, schema];
23797
24007
  }
23798
24008
  });