@steedos-widgets/amis-lib 1.3.4-beta.19 → 1.3.4-beta.20
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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +31 -24
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +31 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/expression.d.ts +5 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1768,7 +1768,7 @@ async function getSelectUserSchema(field, readonly, ctx) {
|
|
|
1768
1768
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
1769
1769
|
* @Date: 2023-03-22 09:31:21
|
|
1770
1770
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
1771
|
-
* @LastEditTime: 2023-11-
|
|
1771
|
+
* @LastEditTime: 2023-11-05 16:31:38
|
|
1772
1772
|
*/
|
|
1773
1773
|
|
|
1774
1774
|
const globalTag = '__G_L_O_B_A_L__';
|
|
@@ -1818,29 +1818,33 @@ const getMoment$1 = () => {
|
|
|
1818
1818
|
}
|
|
1819
1819
|
};
|
|
1820
1820
|
|
|
1821
|
+
const getGlobalNowData = () => {
|
|
1822
|
+
let now = new Date();
|
|
1823
|
+
let moment = getMoment$1();
|
|
1824
|
+
let today = moment().utc();
|
|
1825
|
+
today.set("hours", 0);
|
|
1826
|
+
today.set("minutes", 0);
|
|
1827
|
+
today.set("seconds", 0);
|
|
1828
|
+
today.set("milliseconds", 0);
|
|
1829
|
+
today = today.toDate();
|
|
1830
|
+
let timeNow = moment();
|
|
1831
|
+
timeNow.set("year", 1970);
|
|
1832
|
+
timeNow.set("month", 0);
|
|
1833
|
+
timeNow.set("date", 1);
|
|
1834
|
+
timeNow.set("hours", timeNow.hours() + timeNow.utcOffset() / 60);
|
|
1835
|
+
timeNow.set("seconds", 0);
|
|
1836
|
+
timeNow.set("milliseconds", 0);
|
|
1837
|
+
timeNow = timeNow.toDate();
|
|
1838
|
+
return {
|
|
1839
|
+
now,
|
|
1840
|
+
today,
|
|
1841
|
+
timeNow
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1844
|
+
|
|
1821
1845
|
const parseSingleExpression = function (func, formData, dataPath, global, userSession = {}) {
|
|
1822
1846
|
if (global) {
|
|
1823
|
-
|
|
1824
|
-
let moment = getMoment$1();
|
|
1825
|
-
let today = moment().utc();
|
|
1826
|
-
today.set("hours", 0);
|
|
1827
|
-
today.set("minutes", 0);
|
|
1828
|
-
today.set("seconds", 0);
|
|
1829
|
-
today.set("milliseconds", 0);
|
|
1830
|
-
today = today.toDate();
|
|
1831
|
-
let timeNow = moment();
|
|
1832
|
-
timeNow.set("year", 1970);
|
|
1833
|
-
timeNow.set("month", 0);
|
|
1834
|
-
timeNow.set("date", 1);
|
|
1835
|
-
timeNow.set("hours", timeNow.hours() + timeNow.utcOffset() / 60);
|
|
1836
|
-
timeNow.set("seconds", 0);
|
|
1837
|
-
timeNow.set("milliseconds", 0);
|
|
1838
|
-
timeNow = timeNow.toDate();
|
|
1839
|
-
Object.assign(global, {
|
|
1840
|
-
now,
|
|
1841
|
-
today,
|
|
1842
|
-
timeNow
|
|
1843
|
-
});
|
|
1847
|
+
Object.assign(global, getGlobalNowData());
|
|
1844
1848
|
}
|
|
1845
1849
|
|
|
1846
1850
|
var error, funcBody, parent, parentPath, str;
|
|
@@ -3367,7 +3371,8 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3367
3371
|
if(isLookup){
|
|
3368
3372
|
searchableFieldsStoreKey += "/lookup/" + objectName;
|
|
3369
3373
|
}
|
|
3370
|
-
|
|
3374
|
+
searchableFieldsStoreKey = searchableFieldsStoreKey + "/" + (data.context && data.context.userId);
|
|
3375
|
+
let defaultSearchableFields = localStorage.getItem(searchableFieldsStoreKey);
|
|
3371
3376
|
if(defaultSearchableFields){
|
|
3372
3377
|
defaultSearchableFields = defaultSearchableFields.split(",");
|
|
3373
3378
|
}
|
|
@@ -3436,7 +3441,8 @@ async function getObjectFieldsFilterBarSchema(objectSchema, ctx) {
|
|
|
3436
3441
|
if(isLookup){
|
|
3437
3442
|
searchableFieldsStoreKey += "/lookup/" + objectName;
|
|
3438
3443
|
}
|
|
3439
|
-
|
|
3444
|
+
searchableFieldsStoreKey = searchableFieldsStoreKey + "/" + (data.context && data.context.userId);
|
|
3445
|
+
localStorage.setItem(searchableFieldsStoreKey, value);
|
|
3440
3446
|
|
|
3441
3447
|
// ===START===:当变更可搜索字段时,如果被移除的可搜索字段在本地存储中已经存入过滤条件中则应该清除本地存储中相关字段的过滤条件。
|
|
3442
3448
|
const searchableFields = data.fields;
|
|
@@ -14539,5 +14545,5 @@ const getInstanceInfo = async ({ instanceId, box }) => {
|
|
|
14539
14545
|
};
|
|
14540
14546
|
};
|
|
14541
14547
|
|
|
14542
|
-
export { index as Field, Router, absoluteUrl, amisRender, amisRootClick, cloneObject, conditionsToFilters, createObject, defaultsDeep, deleteVariable, execute, executeButton, extendObject, fetchAPI, filtersToConditions, getApp, getApps, getAuthToken, getAuthorization, getButton, getButtonVisible, getButtonVisibleOn$1 as getButtonVisibleOn, getButtons, getCalendarSchema, getDefaultRenderData, getEnv, getEnvs, getEvn, getField, getFileSrc, getFlowFormSchema, getFormPageInitSchema, getFormSchema, getIdsPickerSchema, getImageSrc, getInstanceInfo, getListPageInitSchema, getListSchema, getListViewButtons, getListViewColumns, getListViewFilter, getListViewItemButtons, getListViewSort, getListviewInitSchema, getLookupSapceUserTreeSchema, getNotifications, getObjectDetailButtons, getObjectDetailButtonsSchemas, getObjectDetailMoreButtons, getObjectFieldsFilterBarSchema, getObjectFieldsFilterButtonSchema, getObjectFieldsFilterFormSchema, getObjectListHeader$1 as getObjectListHeader, getObjectListHeaderFieldsFilterBar, getObjectListHeaderFirstLine, getObjectListHeaderSecordLine, getObjectListViewButtonsSchemas, getObjectRecordDetailHeader, getObjectRecordDetailRelatedListButtonsSchemas, getObjectRecordDetailRelatedListHeader, getObjectRelated, getObjectRelatedList, getObjectRelatedListButtons, getObjectRelatedListHeader, getPage, getRecord, getRecordDetailHeaderSchema, getRecordDetailRelatedListSchema, getRecordDetailSchema, getRecordPageInitSchema, getRecordPermissions, getRecordServiceSchema, getReferenceTo, getRelatedFieldValue, getRelatedListSchema, getRelatedsCount, getRootUrl, getSelectUserSchema, getSpaceUsersPickerAmisSchema, getSpaceUsersPickerSchema, getSteedosAuth, getTableSchema, getTenantId, getUISchema, getUISchemaSync, getUserId, getViewSchema, isExpression, isObject, lookupToAmis, lookupToAmisIdsPicker, lookupToAmisPicker, lookupToAmisSelect, lookupToAmisSelectUser, markReadAll, parseSingleExpression, registerRemoteAssets, registerRenders, setEnv, setEnvs, setRootUrl, setSteedosAuth, setUISchemaFunction, setVariable, standardButtonsTodo };
|
|
14548
|
+
export { index as Field, Router, absoluteUrl, amisRender, amisRootClick, cloneObject, conditionsToFilters, createObject, defaultsDeep, deleteVariable, execute, executeButton, extendObject, fetchAPI, filtersToConditions, getApp, getApps, getAuthToken, getAuthorization, getButton, getButtonVisible, getButtonVisibleOn$1 as getButtonVisibleOn, getButtons, getCalendarSchema, getDefaultRenderData, getEnv, getEnvs, getEvn, getField, getFileSrc, getFlowFormSchema, getFormPageInitSchema, getFormSchema, getGlobalNowData, getIdsPickerSchema, getImageSrc, getInstanceInfo, getListPageInitSchema, getListSchema, getListViewButtons, getListViewColumns, getListViewFilter, getListViewItemButtons, getListViewSort, getListviewInitSchema, getLookupSapceUserTreeSchema, getNotifications, getObjectDetailButtons, getObjectDetailButtonsSchemas, getObjectDetailMoreButtons, getObjectFieldsFilterBarSchema, getObjectFieldsFilterButtonSchema, getObjectFieldsFilterFormSchema, getObjectListHeader$1 as getObjectListHeader, getObjectListHeaderFieldsFilterBar, getObjectListHeaderFirstLine, getObjectListHeaderSecordLine, getObjectListViewButtonsSchemas, getObjectRecordDetailHeader, getObjectRecordDetailRelatedListButtonsSchemas, getObjectRecordDetailRelatedListHeader, getObjectRelated, getObjectRelatedList, getObjectRelatedListButtons, getObjectRelatedListHeader, getPage, getRecord, getRecordDetailHeaderSchema, getRecordDetailRelatedListSchema, getRecordDetailSchema, getRecordPageInitSchema, getRecordPermissions, getRecordServiceSchema, getReferenceTo, getRelatedFieldValue, getRelatedListSchema, getRelatedsCount, getRootUrl, getSelectUserSchema, getSpaceUsersPickerAmisSchema, getSpaceUsersPickerSchema, getSteedosAuth, getTableSchema, getTenantId, getUISchema, getUISchemaSync, getUserId, getViewSchema, isExpression, isObject, lookupToAmis, lookupToAmisIdsPicker, lookupToAmisPicker, lookupToAmisSelect, lookupToAmisSelectUser, markReadAll, parseSingleExpression, registerRemoteAssets, registerRenders, setEnv, setEnvs, setRootUrl, setSteedosAuth, setUISchemaFunction, setVariable, standardButtonsTodo };
|
|
14543
14549
|
//# sourceMappingURL=index.esm.js.map
|