@steedos-widgets/sortable 3.6.2-beta.1 → 3.6.2-beta.11
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/assets.json +5 -5
- package/dist/sortable.cjs.js +104 -45
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +104 -45
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +104 -45
- package/package.json +3 -3
package/dist/assets.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
{
|
|
4
4
|
"package": "@steedos-widgets/sortable",
|
|
5
5
|
"urls": [
|
|
6
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.11/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.11/dist/sortable.umd.css"
|
|
8
8
|
],
|
|
9
9
|
"library": "BuilderSortable"
|
|
10
10
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"npm": {
|
|
16
16
|
"package": "@steedos-widgets/sortable"
|
|
17
17
|
},
|
|
18
|
-
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.11/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.11/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.11/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -53937,22 +53937,26 @@ function getRootUrl(defaultRootUrl){
|
|
|
53937
53937
|
* @Description:
|
|
53938
53938
|
*/
|
|
53939
53939
|
|
|
53940
|
-
|
|
53941
53940
|
const Router = {
|
|
53942
53941
|
getTabDisplayAs(tab_id){
|
|
53942
|
+
const uiSchema = getUISchemaSync$1(tab_id, false);
|
|
53943
53943
|
var urlSearch = new URLSearchParams(document.location.search);
|
|
53944
53944
|
if(urlSearch.has('display')){
|
|
53945
53945
|
return urlSearch.get('display')
|
|
53946
53946
|
}
|
|
53947
53947
|
const key = `tab_${tab_id}_display`;
|
|
53948
53948
|
// const key = `page_display`;
|
|
53949
|
-
const value =
|
|
53950
|
-
|
|
53949
|
+
const value = sessionStorage.getItem(key);
|
|
53950
|
+
let defaultDisplay = "grid";
|
|
53951
|
+
if(uiSchema.enable_split){
|
|
53952
|
+
defaultDisplay = "split";
|
|
53953
|
+
}
|
|
53954
|
+
return value ? value : defaultDisplay;
|
|
53951
53955
|
},
|
|
53952
53956
|
|
|
53953
53957
|
setTabDisplayAs(tab_id, displayAs){
|
|
53954
53958
|
const key = `tab_${tab_id}_display`;
|
|
53955
|
-
|
|
53959
|
+
sessionStorage.setItem(key, displayAs);
|
|
53956
53960
|
},
|
|
53957
53961
|
getAppPath({formFactor, appId}){
|
|
53958
53962
|
return `/app/${appId}`;
|
|
@@ -54106,7 +54110,7 @@ function getSelectMap(selectOptions){
|
|
|
54106
54110
|
|
|
54107
54111
|
function getNameTplUrl(field, ctx){
|
|
54108
54112
|
if(ctx.objectName === 'cms_files'){
|
|
54109
|
-
return
|
|
54113
|
+
return "${(versions[0] && versions[0].url) ? versions[0].url+'?download=true' : context.rootUrl+'/api/files/files/'+versions[0]+'?download=true'}"
|
|
54110
54114
|
}
|
|
54111
54115
|
const href = Router.getObjectDetailPath({
|
|
54112
54116
|
...ctx, formFactor: ctx.formFactor, appId: "${appId}", objectName: ctx.objectName || "${objectName}", recordId: `\${${ctx.idFieldName}}`
|
|
@@ -54620,6 +54624,7 @@ var frontend_notifications$1 = "Notifications";
|
|
|
54620
54624
|
var frontend_notifications_allread$1 = "Mark all as read";
|
|
54621
54625
|
var frontend_notifications_allread_message$1 = "All marked as read";
|
|
54622
54626
|
var frontend_profile$1 = "Profile";
|
|
54627
|
+
var switch_space$1 = "Switch Space";
|
|
54623
54628
|
var frontend_about$1 = "About";
|
|
54624
54629
|
var frontend_log_out$1 = "Log out";
|
|
54625
54630
|
var frontend_listview_warning_start$1 = "The current ";
|
|
@@ -54707,6 +54712,7 @@ var en_us = {
|
|
|
54707
54712
|
frontend_notifications_allread: frontend_notifications_allread$1,
|
|
54708
54713
|
frontend_notifications_allread_message: frontend_notifications_allread_message$1,
|
|
54709
54714
|
frontend_profile: frontend_profile$1,
|
|
54715
|
+
switch_space: switch_space$1,
|
|
54710
54716
|
frontend_about: frontend_about$1,
|
|
54711
54717
|
frontend_log_out: frontend_log_out$1,
|
|
54712
54718
|
frontend_listview_warning_start: frontend_listview_warning_start$1,
|
|
@@ -54746,9 +54752,9 @@ var frontend_display_type_is_split = "分栏视图";
|
|
|
54746
54752
|
var frontend_display_as = "显示为";
|
|
54747
54753
|
var frontend_record_sum = "个项目";
|
|
54748
54754
|
var frontend_button_reload_tooltip = "刷新";
|
|
54749
|
-
var frontend_button_search_tooltip = "
|
|
54755
|
+
var frontend_button_search_tooltip = "搜索";
|
|
54750
54756
|
var frontend_fields_filter_button_search = "搜索";
|
|
54751
|
-
var frontend_fields_filter_button_settings = "
|
|
54757
|
+
var frontend_fields_filter_button_settings = "选择搜索项";
|
|
54752
54758
|
var frontend_button_listview_control_tooltip = "列表视图控制";
|
|
54753
54759
|
var frontend_button_listview_control_label = "列表视图控制";
|
|
54754
54760
|
var frontend_listview_control_columns = "显示的列";
|
|
@@ -54796,6 +54802,7 @@ var frontend_notifications = "通知";
|
|
|
54796
54802
|
var frontend_notifications_allread = "全部标记为已读";
|
|
54797
54803
|
var frontend_notifications_allread_message = "已全部标记为已读";
|
|
54798
54804
|
var frontend_profile = "个人资料";
|
|
54805
|
+
var switch_space = "切换工作区";
|
|
54799
54806
|
var frontend_about = "关于";
|
|
54800
54807
|
var frontend_log_out = "注销";
|
|
54801
54808
|
var frontend_listview_warning_start = "当前";
|
|
@@ -54884,6 +54891,7 @@ var zh_cn = {
|
|
|
54884
54891
|
frontend_notifications_allread: frontend_notifications_allread,
|
|
54885
54892
|
frontend_notifications_allread_message: frontend_notifications_allread_message,
|
|
54886
54893
|
frontend_profile: frontend_profile,
|
|
54894
|
+
switch_space: switch_space,
|
|
54887
54895
|
frontend_about: frontend_about,
|
|
54888
54896
|
frontend_log_out: frontend_log_out,
|
|
54889
54897
|
frontend_listview_warning_start: frontend_listview_warning_start,
|
|
@@ -55403,9 +55411,13 @@ async function getTableColumns(fields, options){
|
|
|
55403
55411
|
const quickEditSchema = allowEdit ? await getQuickEditSchema(field, options) : allowEdit;
|
|
55404
55412
|
let className = "";
|
|
55405
55413
|
if(field.wrap != true){
|
|
55406
|
-
|
|
55414
|
+
if(field.wrap != false && field.is_wide){
|
|
55415
|
+
className += " break-words ";
|
|
55416
|
+
}else {
|
|
55417
|
+
className += " whitespace-nowrap ";
|
|
55418
|
+
}
|
|
55407
55419
|
}else {
|
|
55408
|
-
className += " break-
|
|
55420
|
+
className += " break-words ";
|
|
55409
55421
|
}
|
|
55410
55422
|
let columnItem;
|
|
55411
55423
|
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
|
|
@@ -55502,12 +55514,24 @@ async function getTableColumns(fields, options){
|
|
|
55502
55514
|
if(field.type === 'textarea'){
|
|
55503
55515
|
className += 'min-w-56';
|
|
55504
55516
|
}
|
|
55505
|
-
if(field.type === 'date'){
|
|
55506
|
-
|
|
55507
|
-
}
|
|
55508
|
-
if(field.type === 'datetime'){
|
|
55509
|
-
|
|
55517
|
+
// if(field.type === 'date'){
|
|
55518
|
+
// className += 'date-min-w';
|
|
55519
|
+
// }
|
|
55520
|
+
// if(field.type === 'datetime'){
|
|
55521
|
+
// className += 'datetime-min-w';
|
|
55522
|
+
// }
|
|
55523
|
+
|
|
55524
|
+
//field上的amis属性里的clssname需要单独判断类型合并
|
|
55525
|
+
if (typeof field.amis?.className == "object") {
|
|
55526
|
+
className = {
|
|
55527
|
+
[className]: "true",
|
|
55528
|
+
...field.amis.className
|
|
55529
|
+
};
|
|
55530
|
+
} else if (typeof field.amis?.className == "string") {
|
|
55531
|
+
className = `${className} ${field.amis.className} `;
|
|
55510
55532
|
}
|
|
55533
|
+
delete field.amis?.className;
|
|
55534
|
+
|
|
55511
55535
|
if(!field.hidden && !field.extra){
|
|
55512
55536
|
columnItem = Object.assign({}, {
|
|
55513
55537
|
name: field.name,
|
|
@@ -55590,7 +55614,7 @@ function getMobileLines(tpls){
|
|
|
55590
55614
|
}
|
|
55591
55615
|
if(isLeft){
|
|
55592
55616
|
// 左侧半行
|
|
55593
|
-
lineChildrenClassName = "steedos-listview-item-left truncate";
|
|
55617
|
+
lineChildrenClassName = "steedos-listview-item-left truncate h-5";
|
|
55594
55618
|
if(item.field.is_wide){
|
|
55595
55619
|
// 左侧全行样式可以单独写,如果需要配置两行省略号效果,可以加样式类 two-lines-truncate
|
|
55596
55620
|
lineChildrenClassName = "steedos-listview-item-wide";
|
|
@@ -55602,14 +55626,26 @@ function getMobileLines(tpls){
|
|
|
55602
55626
|
}
|
|
55603
55627
|
else {
|
|
55604
55628
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
55605
|
-
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
|
|
55629
|
+
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0 h-5";
|
|
55630
|
+
}
|
|
55631
|
+
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
55632
|
+
var className;
|
|
55633
|
+
if (typeof item.field.amis?.className == "object") {
|
|
55634
|
+
className = {
|
|
55635
|
+
[lineChildrenClassName]: "true",
|
|
55636
|
+
...item.field.amis.className
|
|
55637
|
+
};
|
|
55638
|
+
} else if (typeof item.field.amis?.className == "string") {
|
|
55639
|
+
className = `${lineChildrenClassName} ${item.field.amis.className} `;
|
|
55640
|
+
} else {
|
|
55641
|
+
className = lineChildrenClassName;
|
|
55606
55642
|
}
|
|
55607
55643
|
lineChildren.push({
|
|
55608
55644
|
"type": "tpl",
|
|
55609
55645
|
"tpl": item.tpl,
|
|
55610
|
-
|
|
55646
|
+
className
|
|
55611
55647
|
});
|
|
55612
|
-
|
|
55648
|
+
|
|
55613
55649
|
if(item.field.is_wide){
|
|
55614
55650
|
// 宽字段占整行
|
|
55615
55651
|
isLeft = true;
|
|
@@ -55659,8 +55695,7 @@ async function getMobileTableColumns(fields, options){
|
|
|
55659
55695
|
tpl = await getFieldTpl(field, options);
|
|
55660
55696
|
}
|
|
55661
55697
|
if(!tpl){
|
|
55662
|
-
|
|
55663
|
-
tpl = `\${${field.name} | raw}`;
|
|
55698
|
+
tpl = `\${${field.name}}`;
|
|
55664
55699
|
}
|
|
55665
55700
|
if(!field.hidden && !field.extra){
|
|
55666
55701
|
tpls.push({ field, tpl });
|
|
@@ -55673,7 +55708,7 @@ async function getMobileTableColumns(fields, options){
|
|
|
55673
55708
|
|
|
55674
55709
|
let column = {
|
|
55675
55710
|
name: nameField.name,
|
|
55676
|
-
label: nameField.label,
|
|
55711
|
+
label: options.displayAs == 'split' ? '' : nameField.label,
|
|
55677
55712
|
sortable: nameField.sortable,
|
|
55678
55713
|
type: "button",
|
|
55679
55714
|
level: "link",
|
|
@@ -55702,7 +55737,15 @@ async function getMobileTableColumns(fields, options){
|
|
|
55702
55737
|
"actions": [
|
|
55703
55738
|
{
|
|
55704
55739
|
"script": `
|
|
55705
|
-
let cms_url =
|
|
55740
|
+
let cms_url = '';
|
|
55741
|
+
let value = event.data.versions[0];
|
|
55742
|
+
if(value){
|
|
55743
|
+
if(value.url){
|
|
55744
|
+
cms_url = value.url;
|
|
55745
|
+
}else{
|
|
55746
|
+
cms_url = "/api/files/files/"+value+"?download=true"
|
|
55747
|
+
}
|
|
55748
|
+
}
|
|
55706
55749
|
Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(cms_url)), event.data.name);
|
|
55707
55750
|
`,
|
|
55708
55751
|
"actionType": "custom"
|
|
@@ -55818,7 +55861,8 @@ async function getTableOperation(ctx){
|
|
|
55818
55861
|
label: " ",
|
|
55819
55862
|
fixed: 'right',
|
|
55820
55863
|
labelClassName: 'text-center',
|
|
55821
|
-
|
|
55864
|
+
//TODO:目前3.6.3-patch.3版本中对于动态classname处理存在问题,简单处理固定列问题,等待amis解决crud的columns不支持动态classname的问题
|
|
55865
|
+
className: 'text-center steedos-listview-operation w-10 is-sticky is-sticky-right is-sticky-first-right',
|
|
55822
55866
|
buttons: [
|
|
55823
55867
|
{
|
|
55824
55868
|
"type": "steedos-dropdown-button",
|
|
@@ -55914,7 +55958,7 @@ async function getTableSchema$1(fields, options){
|
|
|
55914
55958
|
}
|
|
55915
55959
|
return {
|
|
55916
55960
|
mode: "cards",
|
|
55917
|
-
perPageAvailable: [
|
|
55961
|
+
perPageAvailable: [20, 50, 100, 500],
|
|
55918
55962
|
name: "thelist",
|
|
55919
55963
|
headerToolbarClassName: "py-2 px-2 border-gray-300 border-solid border-b",
|
|
55920
55964
|
className: "",
|
|
@@ -55947,7 +55991,7 @@ async function getTableSchema$1(fields, options){
|
|
|
55947
55991
|
|
|
55948
55992
|
return {
|
|
55949
55993
|
mode: "table",
|
|
55950
|
-
perPageAvailable: [
|
|
55994
|
+
perPageAvailable: [20, 50, 100, 500],
|
|
55951
55995
|
name: "thelist",
|
|
55952
55996
|
headerToolbarClassName: "py-2 px-2 border-gray-300 border-solid border-b",
|
|
55953
55997
|
className: "",
|
|
@@ -56073,7 +56117,7 @@ async function getListBody(fields, options){
|
|
|
56073
56117
|
|
|
56074
56118
|
function getDefaultParams(options){
|
|
56075
56119
|
return {
|
|
56076
|
-
perPage: options.top || options.perPage ||
|
|
56120
|
+
perPage: options.top || options.perPage || 20
|
|
56077
56121
|
}
|
|
56078
56122
|
}
|
|
56079
56123
|
|
|
@@ -56127,7 +56171,6 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
56127
56171
|
"objectApiName": "\${objectName}",
|
|
56128
56172
|
"recordId": "",
|
|
56129
56173
|
"mode": "edit",
|
|
56130
|
-
"layout": "normal"
|
|
56131
56174
|
};
|
|
56132
56175
|
|
|
56133
56176
|
if (payload && payload.schema) {
|
|
@@ -57911,14 +57954,14 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
|
|
|
57911
57954
|
{
|
|
57912
57955
|
"type": "button",
|
|
57913
57956
|
"label": instance.t('frontend_display_type_is_table'),
|
|
57914
|
-
"onClick": "const key = 'tab_"+objectName+"_display';
|
|
57957
|
+
"onClick": "const key = 'tab_"+objectName+"_display';sessionStorage.setItem(key, 'grid');let url = document.location.pathname; var urlSearch = new URLSearchParams(document.location.search); if(urlSearch.get(\"side_object\") && urlSearch.get(\"side_listview_id\")){url=`/app/${props.data.appId}/${urlSearch.get(\"side_object\")}/grid/${urlSearch.get(\"side_listview_id\")}`;}; props.env.jumpTo(url + '?display=grid');",
|
|
57915
57958
|
"rightIcon": displayAs != 'split' ? "fa fa-check" : null,
|
|
57916
57959
|
"rightIconClassName": "m-l-sm"
|
|
57917
57960
|
},
|
|
57918
57961
|
{
|
|
57919
57962
|
"type": "button",
|
|
57920
57963
|
"label": instance.t('frontend_display_type_is_split'),
|
|
57921
|
-
"onClick": "const key = 'tab_"+objectName+"_display';
|
|
57964
|
+
"onClick": "const key = 'tab_"+objectName+"_display';sessionStorage.setItem(key, 'split');const url = document.location.pathname + '?display=split'; props.env.jumpTo(url);",
|
|
57922
57965
|
"rightIcon": displayAs === 'split' ? "fa fa-check" : null,
|
|
57923
57966
|
"rightIconClassName": "m-l-sm"
|
|
57924
57967
|
}
|
|
@@ -58061,7 +58104,7 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
58061
58104
|
{
|
|
58062
58105
|
"type": "search-box",
|
|
58063
58106
|
"name": keywordsSearchBoxName,
|
|
58064
|
-
"placeholder": "
|
|
58107
|
+
"placeholder": "快捷搜索",
|
|
58065
58108
|
"value": crudKeywords,
|
|
58066
58109
|
// "clearable": true,//因为清除并不会触发失去焦点事件,只有禁用,但是它会触发change事件,所以等升级到amis 3.4+后可以重新放开
|
|
58067
58110
|
"clearAndSubmit": true,
|
|
@@ -58265,7 +58308,10 @@ function getObjectFooterToolbar(mainObject, formFactor, options) {
|
|
|
58265
58308
|
// ]
|
|
58266
58309
|
if(options.displayAs === 'split'){
|
|
58267
58310
|
return [
|
|
58268
|
-
|
|
58311
|
+
{
|
|
58312
|
+
"type": "switch-per-page",
|
|
58313
|
+
"visibleOn": "${count >= 20}"
|
|
58314
|
+
},
|
|
58269
58315
|
{
|
|
58270
58316
|
"type": "pagination",
|
|
58271
58317
|
"maxButtons": 5,
|
|
@@ -58287,7 +58333,6 @@ function getObjectFooterToolbar(mainObject, formFactor, options) {
|
|
|
58287
58333
|
else {
|
|
58288
58334
|
if(options && options.isRelated){
|
|
58289
58335
|
return [
|
|
58290
|
-
"statistics",
|
|
58291
58336
|
{
|
|
58292
58337
|
"type": "pagination",
|
|
58293
58338
|
"maxButtons": 10,
|
|
@@ -58300,7 +58345,6 @@ function getObjectFooterToolbar(mainObject, formFactor, options) {
|
|
|
58300
58345
|
const no_pagination = mainObject.paging && (mainObject.paging.enabled === false);
|
|
58301
58346
|
const is_lookup = options.isLookup;
|
|
58302
58347
|
const commonConfig = [
|
|
58303
|
-
"statistics",
|
|
58304
58348
|
{
|
|
58305
58349
|
"type": "pagination",
|
|
58306
58350
|
"maxButtons": 10,
|
|
@@ -58311,7 +58355,10 @@ function getObjectFooterToolbar(mainObject, formFactor, options) {
|
|
|
58311
58355
|
if (no_pagination && is_lookup) {
|
|
58312
58356
|
return commonConfig;
|
|
58313
58357
|
} else {
|
|
58314
|
-
return [
|
|
58358
|
+
return [{
|
|
58359
|
+
"type": "switch-per-page",
|
|
58360
|
+
"visibleOn": "${count >= 20}"
|
|
58361
|
+
}, ...commonConfig];
|
|
58315
58362
|
}
|
|
58316
58363
|
}
|
|
58317
58364
|
}
|
|
@@ -58411,8 +58458,8 @@ async function getObjectFilter(objectSchema, fields, options) {
|
|
|
58411
58458
|
/*
|
|
58412
58459
|
* @Author: baozhoutao@steedos.com
|
|
58413
58460
|
* @Date: 2022-07-05 15:55:39
|
|
58414
|
-
* @LastEditors:
|
|
58415
|
-
* @LastEditTime:
|
|
58461
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
58462
|
+
* @LastEditTime: 2024-01-16 11:14:34
|
|
58416
58463
|
* @Description:
|
|
58417
58464
|
*/
|
|
58418
58465
|
|
|
@@ -59357,9 +59404,11 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59357
59404
|
*/
|
|
59358
59405
|
if(enable_tree){
|
|
59359
59406
|
const rows = _.map(payload.data.rows, (item)=>{
|
|
59360
|
-
|
|
59361
|
-
|
|
59362
|
-
|
|
59407
|
+
if (!item.children) {
|
|
59408
|
+
return { ...item, children: [] };
|
|
59409
|
+
} else {
|
|
59410
|
+
return item;
|
|
59411
|
+
}
|
|
59363
59412
|
})
|
|
59364
59413
|
payload.data.rows = rows;
|
|
59365
59414
|
}
|
|
@@ -59808,9 +59857,17 @@ async function lookupToAmis(field, readonly, ctx){
|
|
|
59808
59857
|
}
|
|
59809
59858
|
// console.log(`lookupToAmis====`, field, readonly, ctx)
|
|
59810
59859
|
if(readonly){
|
|
59811
|
-
|
|
59812
|
-
|
|
59813
|
-
|
|
59860
|
+
if(field.reference_to){
|
|
59861
|
+
return {
|
|
59862
|
+
type: 'steedos-field',
|
|
59863
|
+
config: field,
|
|
59864
|
+
static: true
|
|
59865
|
+
}
|
|
59866
|
+
}else {
|
|
59867
|
+
return {
|
|
59868
|
+
type: getAmisStaticFieldType('picker', readonly),
|
|
59869
|
+
tpl: getRelatedFieldTpl(field, ctx)
|
|
59870
|
+
}
|
|
59814
59871
|
}
|
|
59815
59872
|
}
|
|
59816
59873
|
if(field.reference_to && !lodash.exports.isString(field.reference_to) && !readonly){
|
|
@@ -60693,11 +60750,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60693
60750
|
if(field.subFields){
|
|
60694
60751
|
convertData = {
|
|
60695
60752
|
type: 'steedos-input-table',
|
|
60696
|
-
showIndex: true,
|
|
60697
60753
|
editable: !readonly,
|
|
60698
60754
|
addable: !readonly,
|
|
60699
60755
|
removable: !readonly,
|
|
60700
|
-
draggable: !readonly,
|
|
60701
60756
|
fields: [],
|
|
60702
60757
|
amis:{
|
|
60703
60758
|
columnsTogglable: false
|
|
@@ -60749,7 +60804,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60749
60804
|
if(field.is_wide || convertData.type === 'group'){
|
|
60750
60805
|
convertData.className = 'col-span-2 m-0';
|
|
60751
60806
|
}else {
|
|
60752
|
-
convertData.className = 'm-
|
|
60807
|
+
convertData.className = 'm-0';
|
|
60753
60808
|
}
|
|
60754
60809
|
if(readonly){
|
|
60755
60810
|
convertData.className = `${convertData.className} border-b`;
|
|
@@ -60774,6 +60829,10 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60774
60829
|
}
|
|
60775
60830
|
}
|
|
60776
60831
|
|
|
60832
|
+
if(ctx.amisData && ctx.amisData._master && ctx.amisData._master.relatedKey === field.name){
|
|
60833
|
+
convertData.className = `${convertData.className || ''} hidden`;
|
|
60834
|
+
}
|
|
60835
|
+
|
|
60777
60836
|
if(lodash.exports.isString(baseData.required)){
|
|
60778
60837
|
if(baseData.required.startsWith("{{")){
|
|
60779
60838
|
baseData.requiredOn = `${baseData.required.substring(2, baseData.required.length -2).replace(/formData./g, 'data.')}`;
|