@steedos-widgets/sortable 3.6.2-beta.14 → 3.6.2-beta.16

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 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.14/dist/sortable.umd.js",
7
- "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.14/dist/sortable.umd.css"
6
+ "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.16/dist/sortable.umd.js",
7
+ "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.16/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.14/dist/meta.js",
18
+ "url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.16/dist/meta.js",
19
19
  "urls": {
20
- "default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.14/dist/meta.js",
21
- "design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.14/dist/meta.js"
20
+ "default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.16/dist/meta.js",
21
+ "design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.16/dist/meta.js"
22
22
  }
23
23
  }
24
24
  ]
@@ -56416,7 +56416,7 @@ async function getObjectFieldsFilterFormSchema(ctx) {
56416
56416
  const formSchema = {
56417
56417
  "type": "service",
56418
56418
  "visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
56419
- "className": ctx.formFactor === 'SMALL' ? "slds-filters__body p-0 mb-2 overflow-y-auto overflow-x-hidden" : "slds-filters__body p-0 sm:grid sm:gap-2 sm:grid-cols-4 mb-2",
56419
+ "className": ctx.formFactor === 'SMALL' ? "slds-filters__body p-0 mb-2 overflow-y-auto overflow-x-hidden" : "slds-filters__body p-0 sm:grid sm:gap-4 sm:grid-cols-4 p-2",
56420
56420
  "style":{
56421
56421
  "max-height":ctx.formFactor === 'SMALL'?"30vh":"unset"
56422
56422
  },
@@ -57003,7 +57003,7 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
57003
57003
  "className": "slds-filters"
57004
57004
  },
57005
57005
  "size": "xs",
57006
- "className": `border-gray-300 border-y slds-grid slds-grid_vertical slds-nowrap ${!ctx.isLookup && "mt-2"}`,
57006
+ "className": `border-y slds-grid slds-grid_vertical slds-nowrap ${!ctx.isLookup && "mt-2"}`,
57007
57007
  "visibleOn": "this.showFieldsFilter",
57008
57008
  },
57009
57009
  "className": "bg-white"
@@ -57964,7 +57964,7 @@ const getSettingListviewToolbarButtonSchema = ()=>{
57964
57964
  "icon": "fa fa-cog",
57965
57965
  //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
57966
57966
  // "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
57967
- "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded border-gray-300 text-gray-500",
57967
+ "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
57968
57968
  "align": "right",
57969
57969
  "visibleOn": "${!isLookup}",
57970
57970
  "buttons": [
@@ -58009,7 +58009,7 @@ const getDisplayAsButton = function(objectName, showDisplayAs){
58009
58009
  "icon": "fa fa-table-columns",
58010
58010
  //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
58011
58011
  // "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
58012
- "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded border-gray-300 text-gray-500",
58012
+ "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
58013
58013
  "align": "right",
58014
58014
  "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
58015
58015
  "buttons": [
@@ -58202,7 +58202,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
58202
58202
  // //TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
58203
58203
  // // "tooltip": i18next.t('frontend_button_reload_tooltip'),
58204
58204
  // "tooltipPlacement": "top",
58205
- // "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
58205
+ // "className": "bg-white p-2 rounded text-gray-500",
58206
58206
  // "label": "",
58207
58207
  // "icon": "fa fa-sync",
58208
58208
  // "visibleOn": "${!showFieldsFilter}",
@@ -58226,7 +58226,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
58226
58226
  // "tooltip": i18next.t('frontend_button_reload_tooltip'),
58227
58227
  "tooltip":"",
58228
58228
  "tooltipPlacement": "top",
58229
- "className": "bg-white p-2 rounded border-gray-300 text-gray-500"
58229
+ "className": "bg-white p-2 rounded text-gray-500"
58230
58230
  };
58231
58231
  }
58232
58232
  else {
@@ -58237,7 +58237,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
58237
58237
  // "tooltip": i18next.t('frontend_button_reload_tooltip'),
58238
58238
  "tooltip":"",
58239
58239
  "tooltipPlacement": "top",
58240
- "className": "bg-white p-2 rounded border-gray-300 text-gray-500"
58240
+ "className": "bg-white p-2 rounded text-gray-500"
58241
58241
  };
58242
58242
  }
58243
58243
  let toolbarFilter;
@@ -58259,7 +58259,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
58259
58259
  "visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
58260
58260
  },
58261
58261
  "align": "right",
58262
- "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
58262
+ "className": "bg-white p-2 rounded text-gray-500",
58263
58263
  "onEvent": {
58264
58264
  "click": {
58265
58265
  "actions": [
@@ -59297,6 +59297,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
59297
59297
  }
59298
59298
  });
59299
59299
 
59300
+ let listviewFilter = getListViewFilter(listView);
59301
+ let listviewFiltersFunction = listView && listView._filters;
59302
+
59300
59303
  let sort = "";
59301
59304
  if(listView){
59302
59305
  sort = getListViewSort(listView);
@@ -59343,7 +59346,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
59343
59346
  Object.assign(api.data.$self, __changedSearchBoxValues, __changedFilterFormValues);
59344
59347
  }
59345
59348
  const selfData = JSON.parse(JSON.stringify(api.data.$self));
59346
- var filters = [];
59349
+ ${listviewFilter && !ctx.inFilterForm ? `var filters = ${JSON.stringify(listviewFilter)};` : 'var filters = [];'}
59347
59350
  var pageSize = api.data.pageSize || 10;
59348
59351
  var pageNo = api.data.pageNo || 1;
59349
59352
  var skip = (pageNo - 1) * pageSize;
@@ -59405,6 +59408,16 @@ async function lookupToAmisPicker(field, readonly, ctx){
59405
59408
  }
59406
59409
 
59407
59410
  const inFilterForm = ${ctx.inFilterForm};
59411
+
59412
+ const listviewFiltersFunction = ${listviewFiltersFunction};
59413
+
59414
+ if(listviewFiltersFunction && !inFilterForm){
59415
+ const _filters0 = listviewFiltersFunction(filters, api.data.$self.__super);
59416
+ if(_filters0 && _filters0.length){
59417
+ filters.push(_filters0);
59418
+ }
59419
+ }
59420
+
59408
59421
  const filtersFunction = ${field.filtersFunction || field._filtersFunction};
59409
59422
 
59410
59423
  if(filtersFunction && !inFilterForm){
@@ -59717,6 +59730,9 @@ async function lookupToAmisSelect(field, readonly, ctx){
59717
59730
  const refObjectConfig = referenceTo && await getUISchema(referenceTo.objectName);
59718
59731
  let listView = getLookupListView(refObjectConfig);
59719
59732
 
59733
+ let listviewFilter = getListViewFilter(listView);
59734
+ let listviewFiltersFunction = listView && listView._filters;
59735
+
59720
59736
  let sort = "";
59721
59737
  if(listView){
59722
59738
  sort = getListViewSort(listView);
@@ -59746,7 +59762,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
59746
59762
  apiInfo.data['rfield'] = `\${object_name}`;
59747
59763
  // [["_id", "=", "$${field.name}._id"],"or",["name", "contains", "$term"]]
59748
59764
  apiInfo.requestAdaptor = `
59749
- var filters = [];
59765
+ ${listviewFilter && !ctx.inFilterForm ? `var filters = ${JSON.stringify(listviewFilter)};` : 'var filters = [];'}
59750
59766
  var top = 200;
59751
59767
  if(api.data.$term){
59752
59768
  filters = [["${referenceTo?.NAME_FIELD_KEY || 'name'}", "contains", api.data.$term]];
@@ -59769,6 +59785,16 @@ async function lookupToAmisSelect(field, readonly, ctx){
59769
59785
  }
59770
59786
 
59771
59787
  const inFilterForm = ${ctx.inFilterForm};
59788
+
59789
+ const listviewFiltersFunction = ${listviewFiltersFunction};
59790
+
59791
+ if(listviewFiltersFunction && !inFilterForm){
59792
+ const _filters0 = listviewFiltersFunction(filters, api.data.$);
59793
+ if(_filters0 && _filters0.length){
59794
+ filters.push(_filters0);
59795
+ }
59796
+ }
59797
+
59772
59798
  const filtersFunction = ${field.filtersFunction || field._filtersFunction};
59773
59799
 
59774
59800
  if(filtersFunction && !inFilterForm){
@@ -60499,7 +60525,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60499
60525
  convertData = {
60500
60526
  type: getAmisStaticFieldType('datetime', readonly),
60501
60527
  inputFormat: 'YYYY-MM-DD HH:mm',
60502
- format: 'YYYY-MM-DDTHH:mm:ss.SSSZ',
60528
+ format: 'YYYY-MM-DDTHH:mm:00.000Z',
60503
60529
  tpl: readonly ? getDateTimeTpl(field) : null,
60504
60530
  utc: true,
60505
60531
  };