@steedos-widgets/amis-lib 1.2.31 → 1.2.33

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/index.esm.js CHANGED
@@ -951,6 +951,7 @@ var frontend_form_cancel$1 = "Cancel";
951
951
  var frontend_form_new$1 = "New";
952
952
  var frontend_form_edit$1 = "Edit";
953
953
  var frontend_form_select$1 = "Select";
954
+ var frontend_form_please_select$1 = "Please select";
954
955
  var frontend_form_confirm$1 = "Confirm";
955
956
  var frontend_form_delete$1 = "Delete";
956
957
  var frontend_form_view$1 = "view";
@@ -1032,6 +1033,7 @@ var en_us = {
1032
1033
  frontend_form_new: frontend_form_new$1,
1033
1034
  frontend_form_edit: frontend_form_edit$1,
1034
1035
  frontend_form_select: frontend_form_select$1,
1036
+ frontend_form_please_select: frontend_form_please_select$1,
1035
1037
  frontend_form_confirm: frontend_form_confirm$1,
1036
1038
  frontend_form_delete: frontend_form_delete$1,
1037
1039
  frontend_form_view: frontend_form_view$1,
@@ -1114,6 +1116,7 @@ var frontend_form_cancel = "取消";
1114
1116
  var frontend_form_new = "新建";
1115
1117
  var frontend_form_edit = "编辑";
1116
1118
  var frontend_form_select = "选择";
1119
+ var frontend_form_please_select = "请选择";
1117
1120
  var frontend_form_confirm = "确认";
1118
1121
  var frontend_form_delete = "删除";
1119
1122
  var frontend_form_view = "查看";
@@ -1196,6 +1199,7 @@ var zh_cn = {
1196
1199
  frontend_form_new: frontend_form_new,
1197
1200
  frontend_form_edit: frontend_form_edit,
1198
1201
  frontend_form_select: frontend_form_select,
1202
+ frontend_form_please_select: frontend_form_please_select,
1199
1203
  frontend_form_confirm: frontend_form_confirm,
1200
1204
  frontend_form_delete: frontend_form_delete,
1201
1205
  frontend_form_view: frontend_form_view,
@@ -2562,7 +2566,8 @@ const StandardButtons = {
2562
2566
  } = this;
2563
2567
  const scopeId = this.scopeId || `amis-${appId}-${objectName}-listview`;
2564
2568
  const scope = this.scope || SteedosUI?.getRef(scopeId);
2565
- const listViewRef = scope.getComponentById(`listview_${uiSchema.name}`);
2569
+ //https://github.com/baidu/amis/pull/6807 .parent的改动是为适应3.2getComponentById的规则改动,不影响2.9
2570
+ const listViewRef = scope.parent?.getComponentById(`listview_${uiSchema.name}`);
2566
2571
  if(_.isEmpty(listViewRef.props.store.toJSON().selectedItems)){
2567
2572
  listViewRef.handleAction({}, {
2568
2573
  "actionType": "toast",
@@ -5107,7 +5112,8 @@ const getSettingListviewToolbarButtonSchema = ()=>{
5107
5112
  "type": "dropdown-button",
5108
5113
  "trigger": "click",
5109
5114
  "icon": "fa fa-cog",
5110
- "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
5115
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
5116
+ // "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
5111
5117
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded border-gray-300 text-gray-500",
5112
5118
  "align": "right",
5113
5119
  "visibleOn": "${!isLookup}",
@@ -5147,11 +5153,12 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
5147
5153
  "rightIconClassName": "m-l-sm"
5148
5154
  }
5149
5155
  ];
5150
- const displayAsLabel = displayAs === 'split'? i18next.t('frontend_display_type_is_split') : i18next.t('frontend_display_type_is_table');
5156
+ displayAs === 'split'? i18next.t('frontend_display_type_is_split') : i18next.t('frontend_display_type_is_table');
5151
5157
  return {
5152
5158
  "type": "dropdown-button",
5153
5159
  "icon": "fa fa-table-columns",
5154
- "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
5160
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
5161
+ // "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
5155
5162
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded border-gray-300 text-gray-500",
5156
5163
  "align": "right",
5157
5164
  "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
@@ -5233,7 +5240,8 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
5233
5240
  // "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页
5234
5241
  "type": "button",
5235
5242
  "align": "right",
5236
- "tooltip": i18next.t('frontend_button_reload_tooltip'),
5243
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
5244
+ // "tooltip": i18next.t('frontend_button_reload_tooltip'),
5237
5245
  "tooltipPlacement": "top",
5238
5246
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
5239
5247
  "label": "",
@@ -5255,7 +5263,8 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
5255
5263
  "icon": "fa fa-search",
5256
5264
  "type": "button",
5257
5265
  "tooltipPlacement": "top",
5258
- "tooltip": i18next.t('frontend_button_search_tooltip'),
5266
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
5267
+ // "tooltip": i18next.t('frontend_button_search_tooltip'),
5259
5268
  "badge": {
5260
5269
  "offset": [
5261
5270
  -5,
@@ -5300,7 +5309,9 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
5300
5309
  {
5301
5310
  "type": "reload",
5302
5311
  "align": "right",
5303
- "tooltip": i18next.t('frontend_button_reload_tooltip'),
5312
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
5313
+ // "tooltip": i18next.t('frontend_button_reload_tooltip'),
5314
+ "tooltip":"",
5304
5315
  "tooltipPlacement": "top",
5305
5316
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500"
5306
5317
  },
@@ -5310,8 +5321,9 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
5310
5321
  filterVisible ? {
5311
5322
  "label": i18next.t('frontend_button_search_tooltip'),
5312
5323
  "icon": "fa fa-search",
5313
- "tooltip": i18next.t('frontend_button_search_tooltip'),
5314
- "tooltipPlacement": "top",
5324
+ //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
5325
+ // "tooltip": i18next.t('frontend_button_search_tooltip'),
5326
+ // "tooltipPlacement": "top",
5315
5327
  "type": "button",
5316
5328
  "badge": {
5317
5329
  "offset": [
@@ -5417,9 +5429,16 @@ async function getSource(field, ctx) {
5417
5429
  valueField = `${ctx.fieldNamePrefix}${valueField}`;
5418
5430
  }
5419
5431
  data.$value = `$${valueField}`;
5420
- // data["&"] = "$$";
5432
+ data['$'] = `$$`;
5421
5433
  const requestAdaptor = `
5422
5434
  var filters = [['parent', '=', null]];
5435
+ const filtersFunction = ${field.filtersFunction || field._filtersFunction};
5436
+ if(filtersFunction){
5437
+ const _filters = filtersFunction(filters, api.data.$);
5438
+ if(_filters && _filters.length > 0){
5439
+ filters.push(_filters);
5440
+ }
5441
+ }
5423
5442
  api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters));
5424
5443
  var defaultValue = api.data.$value;
5425
5444
  var optionsFiltersOp = "${field.multiple ? "in" : "="}";
@@ -6038,8 +6057,11 @@ async function lookupToAmisPicker(field, readonly, ctx){
6038
6057
 
6039
6058
  const data = {
6040
6059
  type: getAmisStaticFieldType('picker', readonly),
6060
+ modalTitle: i18next.t('frontend_form_please_select') + " " + refObjectConfig.label,
6041
6061
  labelField: referenceTo.labelField.name,
6042
6062
  valueField: referenceTo.valueField.name,
6063
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
6064
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
6043
6065
  modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
6044
6066
  source: source,
6045
6067
  size: "lg",
@@ -6220,6 +6242,8 @@ async function lookupToAmisSelect(field, readonly, ctx){
6220
6242
  joinValues: false,
6221
6243
  extractValue: true,
6222
6244
  clearable: true,
6245
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
6246
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
6223
6247
  // labelField: labelField,
6224
6248
  // valueField: valueField,
6225
6249
  source: apiInfo,
@@ -6404,6 +6428,8 @@ async function getIdsPickerSchema(field, readonly, ctx){
6404
6428
  valueField: referenceTo.valueField.name,
6405
6429
  modalMode: 'dialog',
6406
6430
  source: source,
6431
+ // disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段。
6432
+ disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
6407
6433
  size: "lg",
6408
6434
  pickerSchema: pickerSchema,
6409
6435
  joinValues: false,
@@ -6432,7 +6458,7 @@ async function getIdsPickerSchema(field, readonly, ctx){
6432
6458
  * @Author: baozhoutao@steedos.com
6433
6459
  * @Date: 2023-01-13 17:27:54
6434
6460
  * @LastEditors: liaodaxue
6435
- * @LastEditTime: 2023-06-30 10:29:52
6461
+ * @LastEditTime: 2023-07-24 15:23:12
6436
6462
  * @Description:
6437
6463
  */
6438
6464
 
@@ -6454,21 +6480,39 @@ const getMarkdownFieldSchema = (field, readonly, ctx)=>{
6454
6480
  }
6455
6481
  }else {
6456
6482
  return {
6457
- "type": "group",
6483
+ "type": "control",
6484
+ "label": field.label,
6458
6485
  "body": [
6459
6486
  {
6460
- "type": "editor",
6461
- "name": field.name,
6462
- "language": "markdown",
6463
- },
6464
- {
6465
- "type": "markdown",
6466
- "name": field.name,
6467
- "options": {
6468
- "linkify": true,
6469
- "html": true,
6470
- "breaks": true
6471
- }
6487
+ "type": "tabs",
6488
+ "tabsMode": "strong",
6489
+ "className": "steedos-markdown",
6490
+ "tabs": [
6491
+ {
6492
+ "title": "Write",
6493
+ "tab": [
6494
+ {
6495
+ "type": "editor",
6496
+ "name": field.name,
6497
+ "language": "markdown",
6498
+ }
6499
+ ]
6500
+ },
6501
+ {
6502
+ "title": "Preview",
6503
+ "tab": [
6504
+ {
6505
+ "type": "markdown",
6506
+ "name": field.name,
6507
+ "options": {
6508
+ "linkify": true,
6509
+ "html": true,
6510
+ "breaks": true
6511
+ }
6512
+ }
6513
+ ]
6514
+ }
6515
+ ]
6472
6516
  }
6473
6517
  ]
6474
6518
  }
@@ -6511,8 +6555,8 @@ const getHtmlFieldSchema = (field, readonly, ctx)=>{
6511
6555
  /*
6512
6556
  * @Author: baozhoutao@steedos.com
6513
6557
  * @Date: 2022-10-28 14:52:55
6514
- * @LastEditors: Please set LastEditors
6515
- * @LastEditTime: 2023-05-31 13:25:53
6558
+ * @LastEditors: liaodaxue
6559
+ * @LastEditTime: 2023-07-14 17:18:42
6516
6560
  * @Description:
6517
6561
  */
6518
6562
 
@@ -6544,6 +6588,8 @@ function getAmisStaticFieldType(type, readonly, options){
6544
6588
  return `static-images`;
6545
6589
  }
6546
6590
  return `static-${type}`;
6591
+ }else if(type === 'url'){
6592
+ return "input-url"
6547
6593
  }else {
6548
6594
  return 'static';
6549
6595
  }
@@ -7071,7 +7117,8 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
7071
7117
  break;
7072
7118
  case 'url':
7073
7119
  convertData = {
7074
- type: getAmisStaticFieldType('url', readonly, field)
7120
+ type: getAmisStaticFieldType('url', readonly, field),
7121
+ static: readonly ? true : false
7075
7122
  };
7076
7123
  if(readonly && field.show_as_qr){
7077
7124
  convertData = {
@@ -7405,17 +7452,19 @@ async function getQuickEditSchema(field, options){
7405
7452
  return EventType;
7406
7453
  };
7407
7454
  switch (field.type) {
7408
- //TODO:amis的picker组件直接点击选项x时不会触发change事件,待处理
7455
+ //TODO: amis的picker组件直接点击选项x时不会触发change事件,待处理
7409
7456
  case "lookup":
7410
7457
  case "master_detail":
7458
+ let labelField = quickEditSchema.body[0].labelField || "label";
7459
+ let valueField = quickEditSchema.body[0].valueField || "value";
7411
7460
  if (field.multiple) {
7412
7461
  TempDisplayField = `
7413
7462
  _display["${field.name}"] = [];
7414
- event.data.value.forEach(function(item,index){
7463
+ event.data.selectedItems.forEach(function(item,index){
7415
7464
  _display["${field.name}"].push(
7416
7465
  {
7417
- "label": event.data.option[index].${quickEditSchema.body[0].labelField},
7418
- "value": event.data.option[index]._id,
7466
+ "label": item.${labelField},
7467
+ "value": item.${valueField},
7419
7468
  "objectName": "${field.reference_to}"
7420
7469
  }
7421
7470
  )
@@ -7424,8 +7473,8 @@ async function getQuickEditSchema(field, options){
7424
7473
  } else {
7425
7474
  TempDisplayField = `
7426
7475
  _display["${field.name}"] = {
7427
- "label": event.data.option.${quickEditSchema.body[0].labelField},
7428
- "value": event.data._id,
7476
+ "label": event.data.selectedItems.${labelField},
7477
+ "value": event.data.selectedItems.${valueField},
7429
7478
  "objectName": "${field.reference_to}"
7430
7479
  }
7431
7480
  `;
@@ -7538,10 +7587,25 @@ async function getQuickEditSchema(field, options){
7538
7587
  return quickEditSchema;
7539
7588
  }
7540
7589
 
7590
+ function getFieldWidth(width){
7591
+ const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
7592
+ if(typeof width == 'string'){
7593
+ if(isNaN(width)){
7594
+ return width;
7595
+ }else {
7596
+ return Number(width);
7597
+ }
7598
+ }else if(typeof width == 'number'){
7599
+ return width;
7600
+ }else {
7601
+ return defaultWidth;
7602
+ }
7603
+ }
7604
+
7541
7605
  async function getTableColumns(fields, options){
7542
7606
  const columns = [{name: '_index',type: 'text', width: 32, placeholder: ""}];
7543
7607
  const allowEdit = options.permissions?.allowEdit && options.permissions?.modifyAllRecords && !options.isLookup && options.enable_inline_edit != false;
7544
- const defaultWidth = "unset";//用于使table内的td标签下生成div,实现将快速编辑按钮固定在右侧的效果,并不是为了unset效果
7608
+
7545
7609
  for (const field of fields) {
7546
7610
  //增加quickEdit属性,实现快速编辑
7547
7611
  const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
@@ -7589,7 +7653,7 @@ async function getTableColumns(fields, options){
7589
7653
  type: "switch",
7590
7654
  name: field.name,
7591
7655
  label: field.label,
7592
- width: field.width || defaultWidth,
7656
+ width: getFieldWidth(field.width),
7593
7657
  toggled: field.toggled,
7594
7658
  static: true,
7595
7659
  className:"whitespace-nowrap",
@@ -7600,7 +7664,7 @@ async function getTableColumns(fields, options){
7600
7664
  type: "switch",
7601
7665
  name: field.name,
7602
7666
  label: field.label,
7603
- width: field.width || defaultWidth,
7667
+ width: getFieldWidth(field.width),
7604
7668
  toggled: field.toggled,
7605
7669
  quickEdit: quickEditSchema,
7606
7670
  static: true,
@@ -7620,7 +7684,7 @@ async function getTableColumns(fields, options){
7620
7684
  label: field.label,
7621
7685
  map: map,
7622
7686
  sortable: field.sortable,
7623
- width: field.width || defaultWidth,
7687
+ width: getFieldWidth(field.width),
7624
7688
  toggled: field.toggled,
7625
7689
  className,
7626
7690
  static: true,
@@ -7634,8 +7698,12 @@ async function getTableColumns(fields, options){
7634
7698
  type = 'tpl';
7635
7699
  }else if(field.type === 'html'){
7636
7700
  type = 'markdown';
7637
- }else if(field.type === 'url' && field.show_as_qr){
7638
- type = 'qr-code';
7701
+ }else if(field.type === 'url'){
7702
+ if(field.show_as_qr){
7703
+ type = 'qr-code';
7704
+ }else {
7705
+ type = 'input-url';
7706
+ }
7639
7707
  }
7640
7708
  let className = "";
7641
7709
  if(field.type === 'textarea'){
@@ -7650,7 +7718,7 @@ async function getTableColumns(fields, options){
7650
7718
  label: field.label,
7651
7719
  sortable: field.sortable,
7652
7720
  // searchable: field.searchable,
7653
- width: field.width || defaultWidth,
7721
+ width: getFieldWidth(field.width),
7654
7722
  type: type,
7655
7723
  tpl: tpl,
7656
7724
  toggled: field.toggled,
@@ -7948,14 +8016,7 @@ async function getTableOperation(ctx){
7948
8016
  onOpenApi: {
7949
8017
  url: `\${context.rootUrl}/service/api/@\${objectName}/recordPermissions/\${_id}`,
7950
8018
  method: "get",
7951
- data: {
7952
- $: "$$",
7953
- objectName: "${objectName}",
7954
- listViewId: "${listViewId}",
7955
- appId: "${appId}",
7956
- formFactor: "${formFactor}",
7957
- context: `\${context}`
7958
- },
8019
+ requestAdaptor: "api.data={}; return api;",
7959
8020
  headers: {
7960
8021
  Authorization: "Bearer ${context.tenantId},${context.authToken}"
7961
8022
  },
@@ -8319,7 +8380,8 @@ async function getTableApi(mainObject, fields, options){
8319
8380
 
8320
8381
  const setDataToComponentId = "${setDataToComponentId}";
8321
8382
  if(setDataToComponentId){
8322
- SteedosUI.getRef(api.body.$self.$scopeId)?.getComponentById(setDataToComponentId)?.setData({$count: payload.data.count})
8383
+ //https://github.com/baidu/amis/pull/6807 .parent的改动是为适应3.2getComponentById的规则改动,不影响2.9
8384
+ SteedosUI.getRef(api.body.$self.$scopeId)?.parent?.getComponentById(setDataToComponentId)?.setData({$count: payload.data.count})
8323
8385
  };
8324
8386
  ${options.adaptor || ''}
8325
8387
  return payload;
@@ -9011,17 +9073,18 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
9011
9073
  "objectApiName": "\${objectName}",
9012
9074
  "mode": "edit",
9013
9075
  "defaultData": doc,
9014
- "onEvent": {
9015
- "submitSucc": {
9016
- "weight": 0,
9017
- "actions": [
9018
- {
9019
- "actionType": "custom",
9020
- "script": "event.data.view?.calendar.refetchEvents();"
9021
- }
9022
- ]
9023
- }
9024
- }
9076
+ //改回为通用的提交事件
9077
+ // "onEvent": {
9078
+ // "submitSucc": {
9079
+ // "weight": 0,
9080
+ // "actions": [
9081
+ // {
9082
+ // "actionType": "custom",
9083
+ // "script": "event.data.view?.calendar.refetchEvents();"
9084
+ // }
9085
+ // ]
9086
+ // }
9087
+ // }
9025
9088
  }
9026
9089
  ],
9027
9090
  "closeOnEsc": false,
@@ -9150,6 +9213,20 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
9150
9213
  "script": "console.log('eventsSet'); console.log(event);"
9151
9214
  }
9152
9215
  ]
9216
+ },
9217
+ "getRef": {
9218
+ "weight": 0,
9219
+ "actions": [
9220
+ {
9221
+ "componentId": `service_${options.id}`,
9222
+ "args": {
9223
+ "value":{
9224
+ "calendarRef": "${event.data.calendarRef}"
9225
+ }
9226
+ },
9227
+ "actionType": "setValue",
9228
+ }
9229
+ ]
9153
9230
  }
9154
9231
  };
9155
9232
 
@@ -9185,6 +9262,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
9185
9262
  const amisSchema = {
9186
9263
  "type": "steedos-fullcalendar",
9187
9264
  "label": "",
9265
+ "id": options.id,
9188
9266
  "name": "fullcalendar",
9189
9267
  "placeholder":"${additionalFilters}",//用于触发reload
9190
9268
  "editable": permissions.allowEdit,
@@ -9207,7 +9285,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
9207
9285
  * @Author: baozhoutao@steedos.com
9208
9286
  * @Date: 2022-05-26 16:02:08
9209
9287
  * @LastEditors: liaodaxue
9210
- * @LastEditTime: 2023-06-29 17:27:19
9288
+ * @LastEditTime: 2023-07-12 15:45:55
9211
9289
  * @Description:
9212
9290
  */
9213
9291
 
@@ -9266,7 +9344,11 @@ const getSection = async (formFields, permissionFields, fieldSchemaArray, sectio
9266
9344
 
9267
9345
  // fieldSet 已支持显隐控制
9268
9346
  const sectionFieldsVisibleOn = _$1.map(_$1.compact(_$1.map(fieldSetBody, 'visibleOn')), (visibleOn) => {
9269
- return visibleOn;
9347
+ let visible = visibleOn;
9348
+ if(visible.indexOf('${')>-1){
9349
+ visible = visible.substring(visible.indexOf('{')+1, visible.indexOf('}'));
9350
+ }
9351
+ return visible ? "("+visible+")" : visible;
9270
9352
  });
9271
9353
 
9272
9354
  let section = {