@steedos/webapp 3.0.0-beta.36 → 3.0.0-beta.40
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/{index-oYwaeA2i.js → index-DfcPV0Id.js} +2239 -2192
- package/dist/index.html +1 -1
- package/package.json +2 -2
|
@@ -53841,2299 +53841,2346 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
53841
53841
|
app_id: ""
|
|
53842
53842
|
} }) });
|
|
53843
53843
|
};
|
|
53844
|
-
|
|
53845
|
-
|
|
53846
|
-
|
|
53847
|
-
|
|
53848
|
-
|
|
53849
|
-
|
|
53850
|
-
|
|
53851
|
-
|
|
53852
|
-
|
|
53853
|
-
|
|
53854
|
-
|
|
53855
|
-
const schema = {
|
|
53856
|
-
"type": "service",
|
|
53857
|
-
name: "globalHeader",
|
|
53858
|
-
body: [
|
|
53859
|
-
{
|
|
53860
|
-
"type": "steedos-global-header",
|
|
53861
|
-
"logoSrc": logoSrc,
|
|
53862
|
-
"customButtons": [
|
|
53863
|
-
{
|
|
53864
|
-
"type": "steedos-app-launcher",
|
|
53865
|
-
"showAppName": false,
|
|
53866
|
-
"appId": "${app.id}",
|
|
53867
|
-
"visibleOn": "${isMobile}"
|
|
53868
|
-
}
|
|
53869
|
-
]
|
|
53844
|
+
var axios$2 = { exports: {} };
|
|
53845
|
+
var bind;
|
|
53846
|
+
var hasRequiredBind;
|
|
53847
|
+
function requireBind() {
|
|
53848
|
+
if (hasRequiredBind) return bind;
|
|
53849
|
+
hasRequiredBind = 1;
|
|
53850
|
+
bind = function bind2(fn, thisArg) {
|
|
53851
|
+
return function wrap() {
|
|
53852
|
+
var args = new Array(arguments.length);
|
|
53853
|
+
for (var i = 0; i < args.length; i++) {
|
|
53854
|
+
args[i] = arguments[i];
|
|
53870
53855
|
}
|
|
53871
|
-
|
|
53872
|
-
|
|
53873
|
-
"method": "get",
|
|
53874
|
-
"cache": "10000",
|
|
53875
|
-
"url": "/service/api/apps/${appId}/menus?mobile=" + isMobile,
|
|
53876
|
-
"sendOn": "!!appId",
|
|
53877
|
-
"headers": {
|
|
53878
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
53879
|
-
},
|
|
53880
|
-
"adaptor": `
|
|
53881
|
-
const app = payload;
|
|
53882
|
-
if (app.showSidebar){
|
|
53883
|
-
document.body.classList.add('sidebar')
|
|
53884
|
-
} else {
|
|
53885
|
-
document.body.classList.remove("sidebar")
|
|
53886
|
-
}
|
|
53887
|
-
|
|
53888
|
-
if (window.innerWidth >= 768) {
|
|
53889
|
-
document.body.classList.add('sidebar-open')
|
|
53890
|
-
}
|
|
53891
|
-
|
|
53892
|
-
return {
|
|
53893
|
-
app: app
|
|
53894
|
-
}
|
|
53895
|
-
`,
|
|
53896
|
-
"messages": {}
|
|
53897
|
-
}
|
|
53856
|
+
return fn.apply(thisArg, args);
|
|
53857
|
+
};
|
|
53898
53858
|
};
|
|
53899
|
-
return
|
|
53900
|
-
|
|
53901
|
-
|
|
53902
|
-
|
|
53903
|
-
|
|
53904
|
-
|
|
53905
|
-
|
|
53906
|
-
|
|
53907
|
-
|
|
53908
|
-
|
|
53909
|
-
|
|
53910
|
-
|
|
53911
|
-
|
|
53912
|
-
|
|
53913
|
-
|
|
53914
|
-
|
|
53915
|
-
|
|
53916
|
-
|
|
53917
|
-
|
|
53918
|
-
|
|
53919
|
-
|
|
53920
|
-
|
|
53921
|
-
|
|
53922
|
-
|
|
53923
|
-
|
|
53924
|
-
|
|
53925
|
-
|
|
53926
|
-
|
|
53859
|
+
return bind;
|
|
53860
|
+
}
|
|
53861
|
+
var utils;
|
|
53862
|
+
var hasRequiredUtils;
|
|
53863
|
+
function requireUtils() {
|
|
53864
|
+
if (hasRequiredUtils) return utils;
|
|
53865
|
+
hasRequiredUtils = 1;
|
|
53866
|
+
var bind2 = requireBind();
|
|
53867
|
+
var toString2 = Object.prototype.toString;
|
|
53868
|
+
function isArray2(val) {
|
|
53869
|
+
return toString2.call(val) === "[object Array]";
|
|
53870
|
+
}
|
|
53871
|
+
function isUndefined(val) {
|
|
53872
|
+
return typeof val === "undefined";
|
|
53873
|
+
}
|
|
53874
|
+
function isBuffer(val) {
|
|
53875
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
|
|
53876
|
+
}
|
|
53877
|
+
function isArrayBuffer(val) {
|
|
53878
|
+
return toString2.call(val) === "[object ArrayBuffer]";
|
|
53879
|
+
}
|
|
53880
|
+
function isFormData(val) {
|
|
53881
|
+
return typeof FormData !== "undefined" && val instanceof FormData;
|
|
53882
|
+
}
|
|
53883
|
+
function isArrayBufferView2(val) {
|
|
53884
|
+
var result;
|
|
53885
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
53886
|
+
result = ArrayBuffer.isView(val);
|
|
53887
|
+
} else {
|
|
53888
|
+
result = val && val.buffer && val.buffer instanceof ArrayBuffer;
|
|
53889
|
+
}
|
|
53890
|
+
return result;
|
|
53891
|
+
}
|
|
53892
|
+
function isString2(val) {
|
|
53893
|
+
return typeof val === "string";
|
|
53894
|
+
}
|
|
53895
|
+
function isNumber2(val) {
|
|
53896
|
+
return typeof val === "number";
|
|
53897
|
+
}
|
|
53898
|
+
function isObject2(val) {
|
|
53899
|
+
return val !== null && typeof val === "object";
|
|
53900
|
+
}
|
|
53901
|
+
function isPlainObject2(val) {
|
|
53902
|
+
if (toString2.call(val) !== "[object Object]") {
|
|
53903
|
+
return false;
|
|
53904
|
+
}
|
|
53905
|
+
var prototype = Object.getPrototypeOf(val);
|
|
53906
|
+
return prototype === null || prototype === Object.prototype;
|
|
53907
|
+
}
|
|
53908
|
+
function isDate(val) {
|
|
53909
|
+
return toString2.call(val) === "[object Date]";
|
|
53910
|
+
}
|
|
53911
|
+
function isFile(val) {
|
|
53912
|
+
return toString2.call(val) === "[object File]";
|
|
53913
|
+
}
|
|
53914
|
+
function isBlob(val) {
|
|
53915
|
+
return toString2.call(val) === "[object Blob]";
|
|
53916
|
+
}
|
|
53917
|
+
function isFunction2(val) {
|
|
53918
|
+
return toString2.call(val) === "[object Function]";
|
|
53919
|
+
}
|
|
53920
|
+
function isStream(val) {
|
|
53921
|
+
return isObject2(val) && isFunction2(val.pipe);
|
|
53922
|
+
}
|
|
53923
|
+
function isURLSearchParams(val) {
|
|
53924
|
+
return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
|
|
53925
|
+
}
|
|
53926
|
+
function trim(str) {
|
|
53927
|
+
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
|
|
53928
|
+
}
|
|
53929
|
+
function isStandardBrowserEnv() {
|
|
53930
|
+
if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
|
|
53931
|
+
return false;
|
|
53932
|
+
}
|
|
53933
|
+
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
53934
|
+
}
|
|
53935
|
+
function forEach2(obj, fn) {
|
|
53936
|
+
if (obj === null || typeof obj === "undefined") {
|
|
53937
|
+
return;
|
|
53938
|
+
}
|
|
53939
|
+
if (typeof obj !== "object") {
|
|
53940
|
+
obj = [obj];
|
|
53941
|
+
}
|
|
53942
|
+
if (isArray2(obj)) {
|
|
53943
|
+
for (var i = 0, l = obj.length; i < l; i++) {
|
|
53944
|
+
fn.call(null, obj[i], i, obj);
|
|
53945
|
+
}
|
|
53946
|
+
} else {
|
|
53947
|
+
for (var key2 in obj) {
|
|
53948
|
+
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
53949
|
+
fn.call(null, obj[key2], key2, obj);
|
|
53927
53950
|
}
|
|
53928
53951
|
}
|
|
53929
|
-
}
|
|
53930
|
-
document.addEventListener("click", handleClick);
|
|
53931
|
-
return () => {
|
|
53932
|
-
document.removeEventListener("click", handleClick);
|
|
53933
|
-
};
|
|
53934
|
-
}, [navigate]);
|
|
53935
|
-
return null;
|
|
53936
|
-
};
|
|
53937
|
-
const AppLayout = (props) => {
|
|
53938
|
-
const { children } = props;
|
|
53939
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53940
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(GlobalLinkInterceptor, {}),
|
|
53941
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AppHeader, {}),
|
|
53942
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "creator-content-wrapper", id: "main", children })
|
|
53943
|
-
] });
|
|
53944
|
-
};
|
|
53945
|
-
const ObjectListView = () => {
|
|
53946
|
-
var _a2;
|
|
53947
|
-
let { appId, objectName, listviewId: listName } = useParams();
|
|
53948
|
-
const uiSchema = window.getUISchemaSync(objectName);
|
|
53949
|
-
if (!listName) {
|
|
53950
|
-
listName = (_a2 = lodashExports.first(lodashExports.values(uiSchema.list_views))) == null ? void 0 : _a2.name;
|
|
53952
|
+
}
|
|
53951
53953
|
}
|
|
53952
|
-
|
|
53953
|
-
|
|
53954
|
-
|
|
53955
|
-
|
|
53956
|
-
|
|
53957
|
-
|
|
53958
|
-
|
|
53959
|
-
|
|
53960
|
-
|
|
53961
|
-
|
|
53962
|
-
|
|
53963
|
-
display: Steedos.Page.getDisplay(objectName)
|
|
53954
|
+
function merge2() {
|
|
53955
|
+
var result = {};
|
|
53956
|
+
function assignValue(val, key2) {
|
|
53957
|
+
if (isPlainObject2(result[key2]) && isPlainObject2(val)) {
|
|
53958
|
+
result[key2] = merge2(result[key2], val);
|
|
53959
|
+
} else if (isPlainObject2(val)) {
|
|
53960
|
+
result[key2] = merge2({}, val);
|
|
53961
|
+
} else if (isArray2(val)) {
|
|
53962
|
+
result[key2] = val.slice();
|
|
53963
|
+
} else {
|
|
53964
|
+
result[key2] = val;
|
|
53964
53965
|
}
|
|
53965
|
-
},
|
|
53966
|
-
data: {
|
|
53967
|
-
objectName,
|
|
53968
|
-
object_name: objectName,
|
|
53969
|
-
pageType: "list",
|
|
53970
|
-
listName: listName || ""
|
|
53971
53966
|
}
|
|
53972
|
-
|
|
53973
|
-
|
|
53974
|
-
|
|
53975
|
-
|
|
53976
|
-
|
|
53977
|
-
|
|
53978
|
-
|
|
53979
|
-
|
|
53980
|
-
|
|
53981
|
-
|
|
53982
|
-
|
|
53983
|
-
listName: listName || "",
|
|
53984
|
-
objectName,
|
|
53985
|
-
object_name: objectName
|
|
53986
|
-
}, env: {} });
|
|
53987
|
-
};
|
|
53988
|
-
const ObjectDetail = () => {
|
|
53989
|
-
const { appId, objectName, recordId } = useParams();
|
|
53990
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
53991
|
-
type: "page",
|
|
53992
|
-
bodyClassName: "p-0",
|
|
53993
|
-
body: {
|
|
53994
|
-
"type": "steedos-page-object-control",
|
|
53995
|
-
"name": "steedosPageObjectControl",
|
|
53996
|
-
"data": {
|
|
53997
|
-
objectName,
|
|
53998
|
-
object_name: objectName,
|
|
53999
|
-
pageType: "record",
|
|
54000
|
-
recordId,
|
|
54001
|
-
display: Steedos.Page.getDisplay(objectName)
|
|
53967
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
53968
|
+
forEach2(arguments[i], assignValue);
|
|
53969
|
+
}
|
|
53970
|
+
return result;
|
|
53971
|
+
}
|
|
53972
|
+
function extend(a, b, thisArg) {
|
|
53973
|
+
forEach2(b, function assignValue(val, key2) {
|
|
53974
|
+
if (thisArg && typeof val === "function") {
|
|
53975
|
+
a[key2] = bind2(val, thisArg);
|
|
53976
|
+
} else {
|
|
53977
|
+
a[key2] = val;
|
|
54002
53978
|
}
|
|
54003
|
-
}
|
|
54004
|
-
|
|
54005
|
-
|
|
54006
|
-
|
|
54007
|
-
|
|
54008
|
-
|
|
53979
|
+
});
|
|
53980
|
+
return a;
|
|
53981
|
+
}
|
|
53982
|
+
function stripBOM(content) {
|
|
53983
|
+
if (content.charCodeAt(0) === 65279) {
|
|
53984
|
+
content = content.slice(1);
|
|
54009
53985
|
}
|
|
54010
|
-
|
|
54011
|
-
|
|
54012
|
-
|
|
54013
|
-
|
|
54014
|
-
|
|
54015
|
-
|
|
54016
|
-
|
|
54017
|
-
|
|
54018
|
-
|
|
54019
|
-
|
|
54020
|
-
|
|
54021
|
-
|
|
54022
|
-
|
|
54023
|
-
|
|
54024
|
-
|
|
54025
|
-
|
|
54026
|
-
|
|
54027
|
-
|
|
54028
|
-
|
|
54029
|
-
|
|
54030
|
-
|
|
54031
|
-
|
|
54032
|
-
|
|
54033
|
-
|
|
53986
|
+
return content;
|
|
53987
|
+
}
|
|
53988
|
+
utils = {
|
|
53989
|
+
isArray: isArray2,
|
|
53990
|
+
isArrayBuffer,
|
|
53991
|
+
isBuffer,
|
|
53992
|
+
isFormData,
|
|
53993
|
+
isArrayBufferView: isArrayBufferView2,
|
|
53994
|
+
isString: isString2,
|
|
53995
|
+
isNumber: isNumber2,
|
|
53996
|
+
isObject: isObject2,
|
|
53997
|
+
isPlainObject: isPlainObject2,
|
|
53998
|
+
isUndefined,
|
|
53999
|
+
isDate,
|
|
54000
|
+
isFile,
|
|
54001
|
+
isBlob,
|
|
54002
|
+
isFunction: isFunction2,
|
|
54003
|
+
isStream,
|
|
54004
|
+
isURLSearchParams,
|
|
54005
|
+
isStandardBrowserEnv,
|
|
54006
|
+
forEach: forEach2,
|
|
54007
|
+
merge: merge2,
|
|
54008
|
+
extend,
|
|
54009
|
+
trim,
|
|
54010
|
+
stripBOM
|
|
54011
|
+
};
|
|
54012
|
+
return utils;
|
|
54013
|
+
}
|
|
54014
|
+
var buildURL;
|
|
54015
|
+
var hasRequiredBuildURL;
|
|
54016
|
+
function requireBuildURL() {
|
|
54017
|
+
if (hasRequiredBuildURL) return buildURL;
|
|
54018
|
+
hasRequiredBuildURL = 1;
|
|
54019
|
+
var utils2 = requireUtils();
|
|
54020
|
+
function encode(val) {
|
|
54021
|
+
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
54022
|
+
}
|
|
54023
|
+
buildURL = function buildURL2(url2, params, paramsSerializer) {
|
|
54024
|
+
if (!params) {
|
|
54025
|
+
return url2;
|
|
54034
54026
|
}
|
|
54035
|
-
|
|
54036
|
-
|
|
54037
|
-
|
|
54038
|
-
|
|
54039
|
-
|
|
54040
|
-
|
|
54041
|
-
|
|
54042
|
-
|
|
54043
|
-
|
|
54044
|
-
|
|
54045
|
-
|
|
54046
|
-
|
|
54047
|
-
|
|
54048
|
-
|
|
54049
|
-
|
|
54050
|
-
|
|
54051
|
-
|
|
54052
|
-
|
|
54053
|
-
|
|
54054
|
-
|
|
54055
|
-
|
|
54056
|
-
|
|
54057
|
-
|
|
54058
|
-
|
|
54027
|
+
var serializedParams;
|
|
54028
|
+
if (paramsSerializer) {
|
|
54029
|
+
serializedParams = paramsSerializer(params);
|
|
54030
|
+
} else if (utils2.isURLSearchParams(params)) {
|
|
54031
|
+
serializedParams = params.toString();
|
|
54032
|
+
} else {
|
|
54033
|
+
var parts = [];
|
|
54034
|
+
utils2.forEach(params, function serialize(val, key2) {
|
|
54035
|
+
if (val === null || typeof val === "undefined") {
|
|
54036
|
+
return;
|
|
54037
|
+
}
|
|
54038
|
+
if (utils2.isArray(val)) {
|
|
54039
|
+
key2 = key2 + "[]";
|
|
54040
|
+
} else {
|
|
54041
|
+
val = [val];
|
|
54042
|
+
}
|
|
54043
|
+
utils2.forEach(val, function parseValue(v) {
|
|
54044
|
+
if (utils2.isDate(v)) {
|
|
54045
|
+
v = v.toISOString();
|
|
54046
|
+
} else if (utils2.isObject(v)) {
|
|
54047
|
+
v = JSON.stringify(v);
|
|
54048
|
+
}
|
|
54049
|
+
parts.push(encode(key2) + "=" + encode(v));
|
|
54050
|
+
});
|
|
54051
|
+
});
|
|
54052
|
+
serializedParams = parts.join("&");
|
|
54059
54053
|
}
|
|
54060
|
-
|
|
54061
|
-
|
|
54062
|
-
|
|
54063
|
-
|
|
54064
|
-
app_id: appId,
|
|
54065
|
-
...Builder$1.settings.context
|
|
54066
|
-
},
|
|
54067
|
-
app: appId,
|
|
54068
|
-
appId,
|
|
54069
|
-
app_id: appId,
|
|
54070
|
-
tabId
|
|
54071
|
-
}, env: {} });
|
|
54072
|
-
};
|
|
54073
|
-
const ObjectRelatedListView = () => {
|
|
54074
|
-
const location2 = useLocation();
|
|
54075
|
-
const queryParams = new URLSearchParams(location2.search);
|
|
54076
|
-
const relatedKey = queryParams.get("related_field_name");
|
|
54077
|
-
const { appId, objectName, listviewId: listName, recordId, relatedObjectName } = useParams();
|
|
54078
|
-
const mainUiSchema = window.getUISchemaSync(objectName);
|
|
54079
|
-
const idFieldName = mainUiSchema.idFieldName;
|
|
54080
|
-
const uiSchema = window.getUISchemaSync(relatedObjectName);
|
|
54081
|
-
const relatedKeyRefToField = uiSchema.fields[relatedKey].reference_to_field || idFieldName || "_id";
|
|
54082
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
54083
|
-
type: "service",
|
|
54084
|
-
name: `amis-${appId}-${objectName}-related-${relatedObjectName}`,
|
|
54085
|
-
api: {
|
|
54086
|
-
method: "post",
|
|
54087
|
-
url: `/graphql`,
|
|
54088
|
-
requestAdaptor: `
|
|
54089
|
-
api.data = {
|
|
54090
|
-
query: \`{
|
|
54091
|
-
data: ${objectName}(filters:["${idFieldName}", "=", "${recordId}"]){
|
|
54092
|
-
${idFieldName === relatedKeyRefToField ? idFieldName : idFieldName + "," + relatedKeyRefToField},
|
|
54093
|
-
${mainUiSchema.NAME_FIELD_KEY},
|
|
54094
|
-
locked,
|
|
54095
|
-
recordPermissions: _permissions{
|
|
54096
|
-
allowCreate,
|
|
54097
|
-
allowCreateFiles,
|
|
54098
|
-
allowDelete,
|
|
54099
|
-
allowDeleteFiles,
|
|
54100
|
-
allowEdit,
|
|
54101
|
-
allowEditFiles,
|
|
54102
|
-
allowRead,
|
|
54103
|
-
allowReadFiles,
|
|
54104
|
-
disabled_actions,
|
|
54105
|
-
disabled_list_views,
|
|
54106
|
-
field_permissions,
|
|
54107
|
-
modifyAllFiles,
|
|
54108
|
-
modifyAllRecords,
|
|
54109
|
-
modifyAssignCompanysRecords,
|
|
54110
|
-
modifyCompanyRecords,
|
|
54111
|
-
uneditable_fields,
|
|
54112
|
-
unreadable_fields,
|
|
54113
|
-
unrelated_objects,
|
|
54114
|
-
viewAllFiles,
|
|
54115
|
-
viewAllRecords,
|
|
54116
|
-
viewAssignCompanysRecords,
|
|
54117
|
-
viewCompanyRecords,
|
|
54118
|
-
}
|
|
54119
|
-
}
|
|
54120
|
-
}\`
|
|
54121
|
-
}
|
|
54122
|
-
return api;
|
|
54123
|
-
`,
|
|
54124
|
-
adaptor: `
|
|
54125
|
-
if(payload.data.data){
|
|
54126
|
-
var data = payload.data.data[0];
|
|
54127
|
-
payload.data = data;
|
|
54128
|
-
payload.data._master = {
|
|
54129
|
-
objectName: "${objectName}",
|
|
54130
|
-
recordId: data["${idFieldName}"],
|
|
54131
|
-
record: {
|
|
54132
|
-
"${idFieldName}": data["${idFieldName}"],
|
|
54133
|
-
"${mainUiSchema.NAME_FIELD_KEY}": data["${mainUiSchema.NAME_FIELD_KEY}"],
|
|
54134
|
-
"${relatedKeyRefToField}": data["${relatedKeyRefToField}"],
|
|
54135
|
-
"locked": data.locked
|
|
54136
|
-
}
|
|
54137
|
-
};
|
|
54138
|
-
}
|
|
54139
|
-
payload.data.$breadcrumb = [
|
|
54140
|
-
{
|
|
54141
|
-
"label": "${mainUiSchema.label}",
|
|
54142
|
-
"href": "/app/${appId}/${objectName}"
|
|
54143
|
-
},
|
|
54144
|
-
{
|
|
54145
|
-
"label": payload.data.${mainUiSchema.NAME_FIELD_KEY},
|
|
54146
|
-
"href": "/app/${appId}/${objectName}/view/${recordId}",
|
|
54147
|
-
},
|
|
54148
|
-
{
|
|
54149
|
-
"label": "相关 ${uiSchema.label}"
|
|
54150
|
-
},
|
|
54151
|
-
]
|
|
54152
|
-
payload.data.$loaded = true;
|
|
54153
|
-
return payload;
|
|
54154
|
-
`,
|
|
54155
|
-
headers: {
|
|
54156
|
-
Authorization: "Bearer ${context.tenantId},${context.authToken}"
|
|
54054
|
+
if (serializedParams) {
|
|
54055
|
+
var hashmarkIndex = url2.indexOf("#");
|
|
54056
|
+
if (hashmarkIndex !== -1) {
|
|
54057
|
+
url2 = url2.slice(0, hashmarkIndex);
|
|
54157
54058
|
}
|
|
54158
|
-
|
|
54159
|
-
|
|
54160
|
-
|
|
54161
|
-
|
|
54162
|
-
|
|
54163
|
-
|
|
54164
|
-
|
|
54165
|
-
|
|
54166
|
-
|
|
54167
|
-
|
|
54168
|
-
|
|
54169
|
-
|
|
54170
|
-
|
|
54171
|
-
|
|
54172
|
-
objectApiName: mainUiSchema.name,
|
|
54173
|
-
recordId,
|
|
54174
|
-
relatedObjectApiName: relatedObjectName,
|
|
54175
|
-
foreign_key: relatedKey,
|
|
54176
|
-
relatedKey,
|
|
54177
|
-
hiddenOn: "!!!this.$loaded",
|
|
54178
|
-
"className": "mx-4"
|
|
54179
|
-
// top: 5
|
|
54180
|
-
}
|
|
54181
|
-
// {
|
|
54182
|
-
// type: 'steedos-object-related-listview',
|
|
54183
|
-
// objectApiName: masterObject.name,
|
|
54184
|
-
// recordId: recordId,
|
|
54185
|
-
// relatedObjectApiName: objectApiName,
|
|
54186
|
-
// foreign_key: relatedKey,
|
|
54187
|
-
// relatedKey: relatedKey,
|
|
54188
|
-
// hiddenOn: "!!!this.$loaded"
|
|
54189
|
-
// // top: 5
|
|
54190
|
-
// }
|
|
54191
|
-
]
|
|
54192
|
-
}, data: {
|
|
54193
|
-
context: {
|
|
54194
|
-
app: appId,
|
|
54195
|
-
appId,
|
|
54196
|
-
app_id: appId,
|
|
54197
|
-
listName: listName || "",
|
|
54198
|
-
...Builder$1.settings.context
|
|
54199
|
-
},
|
|
54200
|
-
app: appId,
|
|
54201
|
-
appId,
|
|
54202
|
-
app_id: appId,
|
|
54203
|
-
listName: listName || "",
|
|
54204
|
-
objectName,
|
|
54205
|
-
object_name: objectName
|
|
54206
|
-
}, env: {} });
|
|
54207
|
-
};
|
|
54208
|
-
const routes = [
|
|
54209
|
-
{
|
|
54210
|
-
path: "/logout",
|
|
54211
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Logout$1, {})
|
|
54212
|
-
},
|
|
54213
|
-
{
|
|
54214
|
-
path: "/signup",
|
|
54215
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Signup$1, {})
|
|
54216
|
-
},
|
|
54217
|
-
{
|
|
54218
|
-
path: "/login",
|
|
54219
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Login$1, {})
|
|
54220
|
-
},
|
|
54221
|
-
{
|
|
54222
|
-
path: "/",
|
|
54223
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {})
|
|
54224
|
-
},
|
|
54225
|
-
{
|
|
54226
|
-
path: "/create-space",
|
|
54227
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CreateTenant$1, {}) })
|
|
54228
|
-
},
|
|
54229
|
-
{
|
|
54230
|
-
path: "/select-space",
|
|
54231
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectSpace$1, {}) })
|
|
54232
|
-
},
|
|
54233
|
-
{
|
|
54234
|
-
path: "/update-password",
|
|
54235
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(UpdatePassword$1, {}) })
|
|
54236
|
-
},
|
|
54237
|
-
{
|
|
54238
|
-
path: "/verify/email",
|
|
54239
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(VerifyEmail$1, {}) })
|
|
54240
|
-
},
|
|
54241
|
-
{
|
|
54242
|
-
path: "/verify/mobile",
|
|
54243
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(VerifyMobile$1, {}) })
|
|
54244
|
-
},
|
|
54245
|
-
{
|
|
54246
|
-
path: "/home",
|
|
54247
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {}) })
|
|
54248
|
-
},
|
|
54249
|
-
{
|
|
54250
|
-
path: "/home/:spaceId",
|
|
54251
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {}) })
|
|
54252
|
-
},
|
|
54253
|
-
{
|
|
54254
|
-
path: "/app",
|
|
54255
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppDashboard, {}) }) })
|
|
54256
|
-
},
|
|
54257
|
-
{
|
|
54258
|
-
path: "/app/:appId",
|
|
54259
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppView, {}) }) })
|
|
54260
|
-
},
|
|
54261
|
-
{
|
|
54262
|
-
path: "/app/:appId/page/:pageId",
|
|
54263
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PageView, {}) }) })
|
|
54264
|
-
},
|
|
54265
|
-
{
|
|
54266
|
-
path: "/app/:appId/:objectName",
|
|
54267
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectListView, {}) }) })
|
|
54268
|
-
},
|
|
54269
|
-
{
|
|
54270
|
-
path: "/app/:appId/:objectName/grid/:listviewId",
|
|
54271
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectListView, {}) }) })
|
|
54272
|
-
},
|
|
54273
|
-
{
|
|
54274
|
-
path: "/app/:appId/:objectName/:recordId/:relatedObjectName/grid",
|
|
54275
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectRelatedListView, {}) }) })
|
|
54276
|
-
},
|
|
54277
|
-
{
|
|
54278
|
-
path: "/app/:appId/:objectName/view/:recordId",
|
|
54279
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectDetail, {}) }) })
|
|
54280
|
-
},
|
|
54281
|
-
{
|
|
54282
|
-
path: "/app/:appId/tab_iframe/:tabId",
|
|
54283
|
-
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IframeView, {}) }) })
|
|
54059
|
+
url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
54060
|
+
}
|
|
54061
|
+
return url2;
|
|
54062
|
+
};
|
|
54063
|
+
return buildURL;
|
|
54064
|
+
}
|
|
54065
|
+
var InterceptorManager_1;
|
|
54066
|
+
var hasRequiredInterceptorManager;
|
|
54067
|
+
function requireInterceptorManager() {
|
|
54068
|
+
if (hasRequiredInterceptorManager) return InterceptorManager_1;
|
|
54069
|
+
hasRequiredInterceptorManager = 1;
|
|
54070
|
+
var utils2 = requireUtils();
|
|
54071
|
+
function InterceptorManager() {
|
|
54072
|
+
this.handlers = [];
|
|
54284
54073
|
}
|
|
54285
|
-
|
|
54286
|
-
|
|
54287
|
-
|
|
54288
|
-
|
|
54289
|
-
|
|
54290
|
-
|
|
54291
|
-
|
|
54292
|
-
|
|
54293
|
-
|
|
54294
|
-
|
|
54295
|
-
|
|
54296
|
-
|
|
54297
|
-
return { error };
|
|
54074
|
+
InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
|
|
54075
|
+
this.handlers.push({
|
|
54076
|
+
fulfilled,
|
|
54077
|
+
rejected,
|
|
54078
|
+
synchronous: options ? options.synchronous : false,
|
|
54079
|
+
runWhen: options ? options.runWhen : null
|
|
54080
|
+
});
|
|
54081
|
+
return this.handlers.length - 1;
|
|
54082
|
+
};
|
|
54083
|
+
InterceptorManager.prototype.eject = function eject(id2) {
|
|
54084
|
+
if (this.handlers[id2]) {
|
|
54085
|
+
this.handlers[id2] = null;
|
|
54298
54086
|
}
|
|
54299
|
-
|
|
54300
|
-
|
|
54301
|
-
|
|
54302
|
-
|
|
54303
|
-
|
|
54304
|
-
|
|
54305
|
-
type: GeneralTypes.RECEIVED_SETTINGS,
|
|
54306
|
-
data: data2
|
|
54087
|
+
};
|
|
54088
|
+
InterceptorManager.prototype.forEach = function forEach2(fn) {
|
|
54089
|
+
utils2.forEach(this.handlers, function forEachHandler(h) {
|
|
54090
|
+
if (h !== null) {
|
|
54091
|
+
fn(h);
|
|
54092
|
+
}
|
|
54307
54093
|
});
|
|
54308
|
-
return { data: data2 };
|
|
54309
54094
|
};
|
|
54095
|
+
InterceptorManager_1 = InterceptorManager;
|
|
54096
|
+
return InterceptorManager_1;
|
|
54310
54097
|
}
|
|
54311
|
-
|
|
54312
|
-
|
|
54313
|
-
|
|
54314
|
-
|
|
54315
|
-
|
|
54316
|
-
|
|
54317
|
-
|
|
54318
|
-
|
|
54319
|
-
|
|
54320
|
-
|
|
54321
|
-
|
|
54322
|
-
|
|
54323
|
-
|
|
54324
|
-
}
|
|
54325
|
-
|
|
54326
|
-
|
|
54327
|
-
|
|
54328
|
-
|
|
54329
|
-
|
|
54330
|
-
|
|
54331
|
-
|
|
54332
|
-
|
|
54333
|
-
|
|
54334
|
-
|
|
54335
|
-
|
|
54336
|
-
|
|
54337
|
-
|
|
54338
|
-
|
|
54339
|
-
|
|
54340
|
-
|
|
54341
|
-
|
|
54342
|
-
|
|
54343
|
-
|
|
54344
|
-
|
|
54345
|
-
|
|
54346
|
-
|
|
54347
|
-
|
|
54348
|
-
|
|
54349
|
-
|
|
54350
|
-
|
|
54351
|
-
|
|
54352
|
-
|
|
54353
|
-
|
|
54354
|
-
|
|
54355
|
-
|
|
54356
|
-
|
|
54357
|
-
|
|
54358
|
-
|
|
54359
|
-
|
|
54360
|
-
|
|
54361
|
-
|
|
54362
|
-
|
|
54363
|
-
|
|
54364
|
-
|
|
54365
|
-
|
|
54366
|
-
|
|
54367
|
-
|
|
54368
|
-
|
|
54369
|
-
|
|
54370
|
-
|
|
54371
|
-
|
|
54372
|
-
|
|
54373
|
-
|
|
54374
|
-
|
|
54375
|
-
|
|
54376
|
-
|
|
54377
|
-
|
|
54378
|
-
|
|
54379
|
-
|
|
54380
|
-
|
|
54381
|
-
|
|
54382
|
-
|
|
54383
|
-
|
|
54384
|
-
|
|
54385
|
-
|
|
54386
|
-
|
|
54387
|
-
|
|
54388
|
-
|
|
54389
|
-
|
|
54390
|
-
|
|
54391
|
-
|
|
54392
|
-
|
|
54393
|
-
|
|
54394
|
-
|
|
54395
|
-
|
|
54396
|
-
|
|
54098
|
+
var normalizeHeaderName;
|
|
54099
|
+
var hasRequiredNormalizeHeaderName;
|
|
54100
|
+
function requireNormalizeHeaderName() {
|
|
54101
|
+
if (hasRequiredNormalizeHeaderName) return normalizeHeaderName;
|
|
54102
|
+
hasRequiredNormalizeHeaderName = 1;
|
|
54103
|
+
var utils2 = requireUtils();
|
|
54104
|
+
normalizeHeaderName = function normalizeHeaderName2(headers, normalizedName) {
|
|
54105
|
+
utils2.forEach(headers, function processHeader(value, name) {
|
|
54106
|
+
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
54107
|
+
headers[normalizedName] = value;
|
|
54108
|
+
delete headers[name];
|
|
54109
|
+
}
|
|
54110
|
+
});
|
|
54111
|
+
};
|
|
54112
|
+
return normalizeHeaderName;
|
|
54113
|
+
}
|
|
54114
|
+
var enhanceError;
|
|
54115
|
+
var hasRequiredEnhanceError;
|
|
54116
|
+
function requireEnhanceError() {
|
|
54117
|
+
if (hasRequiredEnhanceError) return enhanceError;
|
|
54118
|
+
hasRequiredEnhanceError = 1;
|
|
54119
|
+
enhanceError = function enhanceError2(error, config2, code, request2, response) {
|
|
54120
|
+
error.config = config2;
|
|
54121
|
+
if (code) {
|
|
54122
|
+
error.code = code;
|
|
54123
|
+
}
|
|
54124
|
+
error.request = request2;
|
|
54125
|
+
error.response = response;
|
|
54126
|
+
error.isAxiosError = true;
|
|
54127
|
+
error.toJSON = function toJSON() {
|
|
54128
|
+
return {
|
|
54129
|
+
// Standard
|
|
54130
|
+
message: this.message,
|
|
54131
|
+
name: this.name,
|
|
54132
|
+
// Microsoft
|
|
54133
|
+
description: this.description,
|
|
54134
|
+
number: this.number,
|
|
54135
|
+
// Mozilla
|
|
54136
|
+
fileName: this.fileName,
|
|
54137
|
+
lineNumber: this.lineNumber,
|
|
54138
|
+
columnNumber: this.columnNumber,
|
|
54139
|
+
stack: this.stack,
|
|
54140
|
+
// Axios
|
|
54141
|
+
config: this.config,
|
|
54142
|
+
code: this.code
|
|
54143
|
+
};
|
|
54144
|
+
};
|
|
54145
|
+
return error;
|
|
54146
|
+
};
|
|
54147
|
+
return enhanceError;
|
|
54148
|
+
}
|
|
54149
|
+
var createError;
|
|
54150
|
+
var hasRequiredCreateError;
|
|
54151
|
+
function requireCreateError() {
|
|
54152
|
+
if (hasRequiredCreateError) return createError;
|
|
54153
|
+
hasRequiredCreateError = 1;
|
|
54154
|
+
var enhanceError2 = requireEnhanceError();
|
|
54155
|
+
createError = function createError2(message2, config2, code, request2, response) {
|
|
54156
|
+
var error = new Error(message2);
|
|
54157
|
+
return enhanceError2(error, config2, code, request2, response);
|
|
54158
|
+
};
|
|
54159
|
+
return createError;
|
|
54160
|
+
}
|
|
54161
|
+
var settle;
|
|
54162
|
+
var hasRequiredSettle;
|
|
54163
|
+
function requireSettle() {
|
|
54164
|
+
if (hasRequiredSettle) return settle;
|
|
54165
|
+
hasRequiredSettle = 1;
|
|
54166
|
+
var createError2 = requireCreateError();
|
|
54167
|
+
settle = function settle2(resolve, reject, response) {
|
|
54168
|
+
var validateStatus = response.config.validateStatus;
|
|
54169
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
54170
|
+
resolve(response);
|
|
54171
|
+
} else {
|
|
54172
|
+
reject(createError2(
|
|
54173
|
+
"Request failed with status code " + response.status,
|
|
54174
|
+
response.config,
|
|
54175
|
+
null,
|
|
54176
|
+
response.request,
|
|
54177
|
+
response
|
|
54178
|
+
));
|
|
54179
|
+
}
|
|
54180
|
+
};
|
|
54181
|
+
return settle;
|
|
54182
|
+
}
|
|
54183
|
+
var cookies;
|
|
54184
|
+
var hasRequiredCookies;
|
|
54185
|
+
function requireCookies() {
|
|
54186
|
+
if (hasRequiredCookies) return cookies;
|
|
54187
|
+
hasRequiredCookies = 1;
|
|
54188
|
+
var utils2 = requireUtils();
|
|
54189
|
+
cookies = utils2.isStandardBrowserEnv() ? (
|
|
54190
|
+
// Standard browser envs support document.cookie
|
|
54191
|
+
/* @__PURE__ */ function standardBrowserEnv() {
|
|
54192
|
+
return {
|
|
54193
|
+
write: function write(name, value, expires, path2, domain, secure) {
|
|
54194
|
+
var cookie2 = [];
|
|
54195
|
+
cookie2.push(name + "=" + encodeURIComponent(value));
|
|
54196
|
+
if (utils2.isNumber(expires)) {
|
|
54197
|
+
cookie2.push("expires=" + new Date(expires).toGMTString());
|
|
54198
|
+
}
|
|
54199
|
+
if (utils2.isString(path2)) {
|
|
54200
|
+
cookie2.push("path=" + path2);
|
|
54201
|
+
}
|
|
54202
|
+
if (utils2.isString(domain)) {
|
|
54203
|
+
cookie2.push("domain=" + domain);
|
|
54204
|
+
}
|
|
54205
|
+
if (secure === true) {
|
|
54206
|
+
cookie2.push("secure");
|
|
54207
|
+
}
|
|
54208
|
+
document.cookie = cookie2.join("; ");
|
|
54209
|
+
},
|
|
54210
|
+
read: function read(name) {
|
|
54211
|
+
var match2 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
54212
|
+
return match2 ? decodeURIComponent(match2[3]) : null;
|
|
54213
|
+
},
|
|
54214
|
+
remove: function remove(name) {
|
|
54215
|
+
this.write(name, "", Date.now() - 864e5);
|
|
54397
54216
|
}
|
|
54398
|
-
}
|
|
54399
|
-
|
|
54400
|
-
|
|
54401
|
-
|
|
54402
|
-
|
|
54403
|
-
|
|
54404
|
-
|
|
54405
|
-
// );
|
|
54406
|
-
// },
|
|
54407
|
-
// on: "record_only",
|
|
54408
|
-
// type: "amis_button",
|
|
54409
|
-
// amis_schema: {
|
|
54410
|
-
// type: "service",
|
|
54411
|
-
// body: [
|
|
54412
|
-
// {
|
|
54413
|
-
// type: "button",
|
|
54414
|
-
// label: "发起审批",
|
|
54415
|
-
// id: "u:6887f3ab860a",
|
|
54416
|
-
// editorState: "default",
|
|
54417
|
-
// onEvent: {
|
|
54418
|
-
// click: {
|
|
54419
|
-
// weight: 0,
|
|
54420
|
-
// actions: [
|
|
54421
|
-
// {
|
|
54422
|
-
// actionType: "steedos_actions_standard_approve",
|
|
54423
|
-
// },
|
|
54424
|
-
// ],
|
|
54425
|
-
// },
|
|
54426
|
-
// },
|
|
54427
|
-
// },
|
|
54428
|
-
// ],
|
|
54429
|
-
// regions: ["body"],
|
|
54430
|
-
// data: {
|
|
54431
|
-
// context: {},
|
|
54432
|
-
// dataComponentId: "",
|
|
54433
|
-
// record_id: "",
|
|
54434
|
-
// record: {},
|
|
54435
|
-
// permissions: {},
|
|
54436
|
-
// },
|
|
54437
|
-
// bodyClassName: "p-0",
|
|
54438
|
-
// id: "u:5dd49d3a508c",
|
|
54439
|
-
// },
|
|
54440
|
-
// },
|
|
54441
|
-
// standard_create_instance: {
|
|
54442
|
-
// label: "Create Approval",
|
|
54443
|
-
// sort: -1,
|
|
54444
|
-
// on: "list",
|
|
54445
|
-
// type: "amis_button",
|
|
54446
|
-
// visible: function (object_name, record_id, record_permissions, data) {
|
|
54447
|
-
// if (data._isRelated) return false;
|
|
54448
|
-
// return (
|
|
54449
|
-
// lodash.filter(Steedos.Workflow?.getObjectWorkflows(), (item) => {
|
|
54450
|
-
// return (
|
|
54451
|
-
// item.object_name == object_name &&
|
|
54452
|
-
// (!item.sync_direction ||
|
|
54453
|
-
// item.sync_direction == "both" ||
|
|
54454
|
-
// item.sync_direction == "ins_to_obj") &&
|
|
54455
|
-
// true !== item.forbid_initiate_instance
|
|
54456
|
-
// );
|
|
54457
|
-
// }).length > 0
|
|
54458
|
-
// );
|
|
54459
|
-
// },
|
|
54460
|
-
// amis_schema: {
|
|
54461
|
-
// type: "service",
|
|
54462
|
-
// body: [
|
|
54463
|
-
// {
|
|
54464
|
-
// type: "button",
|
|
54465
|
-
// label: "申请",
|
|
54466
|
-
// id: "u:standard_create_instance",
|
|
54467
|
-
// editorState: "default",
|
|
54468
|
-
// onEvent: {
|
|
54469
|
-
// click: {
|
|
54470
|
-
// weight: 0,
|
|
54471
|
-
// actions: [
|
|
54472
|
-
// {
|
|
54473
|
-
// actionType: "custom",
|
|
54474
|
-
// script:
|
|
54475
|
-
// "// 编写判断,当前可发起的流程是单个还是多个. 并返回数据用于控制下个事件是直接新建申请单草稿还是弹出流程让选择\n\nconst flows = lodash.filter(Creator.object_workflows, (item) => { return item.object_name == event.data.object_name && (!item.sync_direction || item.sync_direction == 'both' || item.sync_direction == 'ins_to_obj') && true !== item.forbid_initiate_instance })\n\nevent.setData({ ...event.data, ...{ flows: flows, flowCount: flows.length } })\n\n",
|
|
54476
|
-
// },
|
|
54477
|
-
// {
|
|
54478
|
-
// actionType: "ajax",
|
|
54479
|
-
// outputVar: "responseResult",
|
|
54480
|
-
// args: {
|
|
54481
|
-
// options: {},
|
|
54482
|
-
// api: {
|
|
54483
|
-
// url: "${context.rootUrl}/api/workflow/v2/draft",
|
|
54484
|
-
// method: "post",
|
|
54485
|
-
// requestAdaptor:
|
|
54486
|
-
// "api.data = {\n 'instance': {\n 'flow': api.body.flows[0].flow_id,\n 'applicant': api.body.context.userId,\n 'space': api.body.context.tenantId\n \n}}\n\nreturn api;",
|
|
54487
|
-
// adaptor:
|
|
54488
|
-
// "\nif (payload.error) { \n return {\n status: 2,\n msg: payload.error\n }\n}\nconst instance = payload.instance;\nSteedos.openWindow(Steedos.absoluteUrl('/app/' + FlowRouter.current().params.app_id + '/instances/view/' + instance._id + '?display=' + (Steedos.Page.getDisplay('instances') || '') + '&side_object=instances&side_listview_id=draft'))\nreturn payload;",
|
|
54489
|
-
// messages: {},
|
|
54490
|
-
// headers: {
|
|
54491
|
-
// Authorization:
|
|
54492
|
-
// "Bearer ${context.tenantId},${context.authToken}",
|
|
54493
|
-
// },
|
|
54494
|
-
// data: {
|
|
54495
|
-
// "&": "$$",
|
|
54496
|
-
// context: "${context}",
|
|
54497
|
-
// objectName: "${objectName}",
|
|
54498
|
-
// recordId: "${recordId}",
|
|
54499
|
-
// },
|
|
54500
|
-
// },
|
|
54501
|
-
// },
|
|
54502
|
-
// expression: "${event.data.flowCount == 1}",
|
|
54503
|
-
// },
|
|
54504
|
-
// {
|
|
54505
|
-
// actionType: "dialog",
|
|
54506
|
-
// expression: "${event.data.flowCount > 1}",
|
|
54507
|
-
// dialog: {
|
|
54508
|
-
// type: "dialog",
|
|
54509
|
-
// title: "选择流程发起审批",
|
|
54510
|
-
// body: [
|
|
54511
|
-
// {
|
|
54512
|
-
// type: "form",
|
|
54513
|
-
// id: "u:f78efaa51a4f",
|
|
54514
|
-
// body: [
|
|
54515
|
-
// {
|
|
54516
|
-
// type: "input-tree",
|
|
54517
|
-
// name: "flowId",
|
|
54518
|
-
// label: false,
|
|
54519
|
-
// clearable: true,
|
|
54520
|
-
// id: "u:025b991fd40b",
|
|
54521
|
-
// multiple: false,
|
|
54522
|
-
// treeContainerClassName:
|
|
54523
|
-
// "no-border m-none p-none",
|
|
54524
|
-
// source: {
|
|
54525
|
-
// method: "get",
|
|
54526
|
-
// url: "${context.rootUrl}/api/workflow/v2/get_object_workflows",
|
|
54527
|
-
// requestAdaptor: "api.data = {};return api;",
|
|
54528
|
-
// adaptor:
|
|
54529
|
-
// "return { data: _.filter(payload, (item) => { return item.object_name == api.body.objectName && item.can_add && (!item.sync_direction || item.sync_direction == 'both' || item.sync_direction == 'ins_to_obj') && true !== item.forbid_initiate_instance })};",
|
|
54530
|
-
// messages: {},
|
|
54531
|
-
// dataType: "json",
|
|
54532
|
-
// headers: {
|
|
54533
|
-
// Authorization:
|
|
54534
|
-
// "Bearer ${context.tenantId},${context.authToken}",
|
|
54535
|
-
// },
|
|
54536
|
-
// data: {
|
|
54537
|
-
// objectName: "${objectName}",
|
|
54538
|
-
// spaceId: "${context.tenantId}",
|
|
54539
|
-
// },
|
|
54540
|
-
// },
|
|
54541
|
-
// value: "",
|
|
54542
|
-
// labelField: "flow_name",
|
|
54543
|
-
// valueField: "flow_id",
|
|
54544
|
-
// onEvent: {
|
|
54545
|
-
// change: {
|
|
54546
|
-
// weight: 0,
|
|
54547
|
-
// actions: [
|
|
54548
|
-
// {
|
|
54549
|
-
// actionType: "ajax",
|
|
54550
|
-
// outputVar: "responseResult",
|
|
54551
|
-
// args: {
|
|
54552
|
-
// options: {},
|
|
54553
|
-
// api: {
|
|
54554
|
-
// url: "${context.rootUrl}/api/workflow/v2/draft",
|
|
54555
|
-
// method: "post",
|
|
54556
|
-
// requestAdaptor:
|
|
54557
|
-
// "api.data = {\n 'instance': {\n 'flow': api.body.flowId,\n 'applicant': api.body.context.userId,\n 'space': api.body.context.tenantId\n \n}}\n\nreturn api;",
|
|
54558
|
-
// adaptor:
|
|
54559
|
-
// "\nif (payload.error) { \n return {\n status: 2,\n msg: payload.error\n }\n}\nconst instance = payload.instance;\nSteedos.openWindow(Steedos.absoluteUrl('/app/' + FlowRouter.current().params.app_id + '/instances/view/' + instance._id + '?display=' + (Steedos.Page.getDisplay('instances') || '') + '&side_object=instances&side_listview_id=draft'))\nreturn payload;",
|
|
54560
|
-
// messages: {},
|
|
54561
|
-
// headers: {
|
|
54562
|
-
// Authorization:
|
|
54563
|
-
// "Bearer ${context.tenantId},${context.authToken}",
|
|
54564
|
-
// },
|
|
54565
|
-
// data: {
|
|
54566
|
-
// "&": "$$",
|
|
54567
|
-
// context: "${context}",
|
|
54568
|
-
// objectName: "${objectName}",
|
|
54569
|
-
// recordId: "${recordId}",
|
|
54570
|
-
// },
|
|
54571
|
-
// },
|
|
54572
|
-
// },
|
|
54573
|
-
// expression: "${event.data.value}",
|
|
54574
|
-
// },
|
|
54575
|
-
// {
|
|
54576
|
-
// actionType: "closeDialog",
|
|
54577
|
-
// },
|
|
54578
|
-
// ],
|
|
54579
|
-
// },
|
|
54580
|
-
// },
|
|
54581
|
-
// },
|
|
54582
|
-
// ],
|
|
54583
|
-
// wrapWithPanel: false,
|
|
54584
|
-
// },
|
|
54585
|
-
// ],
|
|
54586
|
-
// showCloseButton: true,
|
|
54587
|
-
// showErrorMsg: true,
|
|
54588
|
-
// showLoading: true,
|
|
54589
|
-
// className: "",
|
|
54590
|
-
// id: "u:ba79188bbf7e",
|
|
54591
|
-
// closeOnEsc: true,
|
|
54592
|
-
// actions: [],
|
|
54593
|
-
// size: "md",
|
|
54594
|
-
// data: {
|
|
54595
|
-
// "&": "$$",
|
|
54596
|
-
// },
|
|
54597
|
-
// dataMap: {},
|
|
54598
|
-
// withDefaultData: true,
|
|
54599
|
-
// dataMapSwitch: true,
|
|
54600
|
-
// bodyClassName: "overflow-hidden",
|
|
54601
|
-
// },
|
|
54602
|
-
// },
|
|
54603
|
-
// ],
|
|
54604
|
-
// },
|
|
54605
|
-
// },
|
|
54606
|
-
// },
|
|
54607
|
-
// ],
|
|
54608
|
-
// regions: ["body"],
|
|
54609
|
-
// data: {
|
|
54610
|
-
// context: {},
|
|
54611
|
-
// dataComponentId: "",
|
|
54612
|
-
// record_id: "",
|
|
54613
|
-
// record: {},
|
|
54614
|
-
// permissions: {},
|
|
54615
|
-
// },
|
|
54616
|
-
// bodyClassName: "p-0",
|
|
54617
|
-
// id: "u:6ac1032391f4",
|
|
54618
|
-
// },
|
|
54619
|
-
// },
|
|
54620
|
-
// standard_view_instance: {
|
|
54621
|
-
// label: "View Instance",
|
|
54622
|
-
// visible: function (object_name, record_id, record_permissions) {
|
|
54623
|
-
// return Steedos.StandardObjects.Base.Actions.standard_view_instance.visible.apply(
|
|
54624
|
-
// this,
|
|
54625
|
-
// arguments,
|
|
54626
|
-
// );
|
|
54627
|
-
// },
|
|
54628
|
-
// on: "record_only",
|
|
54629
|
-
// todo: function () {
|
|
54630
|
-
// return Steedos.StandardObjects.Base.Actions.standard_view_instance.todo.apply(
|
|
54631
|
-
// this,
|
|
54632
|
-
// arguments,
|
|
54633
|
-
// );
|
|
54634
|
-
// },
|
|
54635
|
-
// },
|
|
54636
|
-
// standard_submit_for_approval: {
|
|
54637
|
-
// visible: function (object_name, record_id) {
|
|
54638
|
-
// return Steedos.StandardObjects.Base.Actions.standard_submit_for_approval.visible.apply(
|
|
54639
|
-
// this,
|
|
54640
|
-
// arguments,
|
|
54641
|
-
// );
|
|
54642
|
-
// },
|
|
54643
|
-
// on: "record_only",
|
|
54644
|
-
// type: "amis_button",
|
|
54645
|
-
// amis_schema: {
|
|
54646
|
-
// type: "service",
|
|
54647
|
-
// body: [
|
|
54648
|
-
// {
|
|
54649
|
-
// type: "button",
|
|
54650
|
-
// label: "提请审批",
|
|
54651
|
-
// id: "u:standard_submit_for_approval",
|
|
54652
|
-
// onEvent: {
|
|
54653
|
-
// click: {
|
|
54654
|
-
// actions: [
|
|
54655
|
-
// {
|
|
54656
|
-
// actionType: "dialog",
|
|
54657
|
-
// dialog: {
|
|
54658
|
-
// type: "dialog",
|
|
54659
|
-
// title: "提交待审核",
|
|
54660
|
-
// body: [
|
|
54661
|
-
// {
|
|
54662
|
-
// type: "form",
|
|
54663
|
-
// id: "u:1eb06e6962d8",
|
|
54664
|
-
// title: "表单",
|
|
54665
|
-
// body: [
|
|
54666
|
-
// {
|
|
54667
|
-
// type: "steedos-field",
|
|
54668
|
-
// id: "u:9f4486c22f52",
|
|
54669
|
-
// field:
|
|
54670
|
-
// '{\n "label": "意见",\n "name": "comment",\n "type": "textarea",\n "rows": 3,\n "is_wide": true\n}',
|
|
54671
|
-
// name: "comment",
|
|
54672
|
-
// },
|
|
54673
|
-
// {
|
|
54674
|
-
// type: "steedos-field",
|
|
54675
|
-
// id: "u:9f4486c22f52",
|
|
54676
|
-
// field:
|
|
54677
|
-
// '{\n "label": "选择下一位批准人",\n "name": "approver",\n "type": "lookup",\n "reference_to": "space_users",\n "reference_to_field": "user",\n "required": true,\n "is_wide": true\n}',
|
|
54678
|
-
// name: "approver",
|
|
54679
|
-
// placeholder: "",
|
|
54680
|
-
// visibleOn: "${showApprover === true}",
|
|
54681
|
-
// },
|
|
54682
|
-
// ],
|
|
54683
|
-
// wrapWithPanel: false,
|
|
54684
|
-
// mode: "normal",
|
|
54685
|
-
// api: {
|
|
54686
|
-
// method: "post",
|
|
54687
|
-
// url: "${context.rootUrl}/api/v4/process/submit/${objectName}/${recordId}",
|
|
54688
|
-
// data: {
|
|
54689
|
-
// "&": "$$",
|
|
54690
|
-
// },
|
|
54691
|
-
// requestAdaptor:
|
|
54692
|
-
// "\napi.data = {\n comment: api.body.comment\n};\n\nif (api.body.approver) {\n api.data.approver = api.body.approver;\n}\n\nreturn api;",
|
|
54693
|
-
// adaptor:
|
|
54694
|
-
// "\npayload.data = {};\npayload.data.showApprover = payload.error === 'process_approval_error_needToChooseApprover'\n\nif (payload.state === 'FAILURE') {\n if (payload.data.showApprover) {\n payload.msg = \"请选择下一位批准人\";\n } else { \n payload.msg = window.t(payload.error)\n }\n}\n\n\nreturn payload;",
|
|
54695
|
-
// responseData: {
|
|
54696
|
-
// "&": "$$",
|
|
54697
|
-
// },
|
|
54698
|
-
// headers: {
|
|
54699
|
-
// Authorization:
|
|
54700
|
-
// "Bearer ${context.tenantId},${context.authToken}",
|
|
54701
|
-
// },
|
|
54702
|
-
// },
|
|
54703
|
-
// debug: false,
|
|
54704
|
-
// onEvent: {
|
|
54705
|
-
// submitSucc: {
|
|
54706
|
-
// weight: 0,
|
|
54707
|
-
// actions: [
|
|
54708
|
-
// {
|
|
54709
|
-
// actionType: "custom",
|
|
54710
|
-
// script: `
|
|
54711
|
-
// doAction({
|
|
54712
|
-
// "actionType": "broadcast",
|
|
54713
|
-
// "args": {
|
|
54714
|
-
// "eventName": \`@data.changed.\${event.data.objectName}\`
|
|
54715
|
-
// },
|
|
54716
|
-
// "data": {
|
|
54717
|
-
// "objectName": \`\${event.data.objectName}\`
|
|
54718
|
-
// }
|
|
54719
|
-
// });
|
|
54720
|
-
// `,
|
|
54721
|
-
// },
|
|
54722
|
-
// ],
|
|
54723
|
-
// },
|
|
54724
|
-
// },
|
|
54725
|
-
// },
|
|
54726
|
-
// ],
|
|
54727
|
-
// id: "u:7a3f92e56805",
|
|
54728
|
-
// closeOnEsc: false,
|
|
54729
|
-
// closeOnOutside: false,
|
|
54730
|
-
// showCloseButton: true,
|
|
54731
|
-
// size: "md",
|
|
54732
|
-
// },
|
|
54733
|
-
// },
|
|
54734
|
-
// ],
|
|
54735
|
-
// weight: 0,
|
|
54736
|
-
// },
|
|
54737
|
-
// },
|
|
54738
|
-
// },
|
|
54739
|
-
// ],
|
|
54740
|
-
// regions: ["body"],
|
|
54741
|
-
// data: {},
|
|
54742
|
-
// bodyClassName: "p-0",
|
|
54743
|
-
// id: "u:50444554a302",
|
|
54744
|
-
// },
|
|
54745
|
-
// },
|
|
54746
|
-
standard_export_excel: {
|
|
54747
|
-
label: "Export Excel",
|
|
54748
|
-
visible: function(object_name, record_id, record_permissions) {
|
|
54749
|
-
return Steedos.StandardObjects.Base.Actions.standard_export_excel.visible.apply(
|
|
54750
|
-
this,
|
|
54751
|
-
arguments
|
|
54752
|
-
);
|
|
54217
|
+
};
|
|
54218
|
+
}()
|
|
54219
|
+
) : (
|
|
54220
|
+
// Non standard browser env (web workers, react-native) lack needed support.
|
|
54221
|
+
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
54222
|
+
return {
|
|
54223
|
+
write: function write() {
|
|
54753
54224
|
},
|
|
54754
|
-
|
|
54755
|
-
|
|
54756
|
-
|
|
54757
|
-
|
|
54758
|
-
arguments
|
|
54759
|
-
);
|
|
54225
|
+
read: function read() {
|
|
54226
|
+
return null;
|
|
54227
|
+
},
|
|
54228
|
+
remove: function remove() {
|
|
54760
54229
|
}
|
|
54761
|
-
}
|
|
54762
|
-
|
|
54763
|
-
|
|
54764
|
-
|
|
54765
|
-
|
|
54766
|
-
|
|
54767
|
-
|
|
54768
|
-
|
|
54769
|
-
|
|
54770
|
-
|
|
54771
|
-
|
|
54772
|
-
|
|
54773
|
-
|
|
54774
|
-
|
|
54775
|
-
|
|
54776
|
-
|
|
54777
|
-
|
|
54778
|
-
|
|
54779
|
-
|
|
54780
|
-
|
|
54781
|
-
|
|
54782
|
-
|
|
54783
|
-
|
|
54784
|
-
|
|
54785
|
-
|
|
54786
|
-
|
|
54787
|
-
|
|
54788
|
-
|
|
54789
|
-
|
|
54790
|
-
|
|
54791
|
-
|
|
54792
|
-
|
|
54793
|
-
|
|
54794
|
-
|
|
54795
|
-
|
|
54796
|
-
"&": "$$",
|
|
54797
|
-
query: '{ rows: object_print(filters: [["object_name", "=", "${objectName}"]]) { _id name label object_name } }'
|
|
54798
|
-
}
|
|
54799
|
-
},
|
|
54800
|
-
initFetch: true,
|
|
54801
|
-
onEvent: {
|
|
54802
|
-
init: {
|
|
54803
|
-
weight: 0,
|
|
54804
|
-
actions: []
|
|
54805
|
-
}
|
|
54806
|
-
},
|
|
54807
|
-
name: "print"
|
|
54808
|
-
}
|
|
54809
|
-
],
|
|
54810
|
-
regions: ["body"],
|
|
54811
|
-
data: {
|
|
54812
|
-
context: {},
|
|
54813
|
-
dataComponentId: "",
|
|
54814
|
-
record_id: "",
|
|
54815
|
-
record: {},
|
|
54816
|
-
permissions: {}
|
|
54817
|
-
},
|
|
54818
|
-
id: "u:038c6047be31",
|
|
54819
|
-
bodyClassName: "p-0"
|
|
54820
|
-
}
|
|
54821
|
-
}
|
|
54822
|
-
}
|
|
54823
|
-
}
|
|
54824
|
-
};
|
|
54825
|
-
const User = {
|
|
54826
|
-
get: () => {
|
|
54827
|
-
var _a2;
|
|
54828
|
-
return (_a2 = window.Builder.settings.context) == null ? void 0 : _a2.user;
|
|
54829
|
-
}
|
|
54830
|
-
};
|
|
54831
|
-
const Workflow = {
|
|
54832
|
-
// TODO: 初始化对象流程?
|
|
54833
|
-
getObjectWorkflows: () => {
|
|
54834
|
-
return [];
|
|
54835
|
-
}
|
|
54836
|
-
};
|
|
54837
|
-
const ProcessManager = {};
|
|
54838
|
-
class SObject {
|
|
54839
|
-
constructor(objectName, client2) {
|
|
54840
|
-
__publicField(this, "objectName");
|
|
54841
|
-
__publicField(this, "client");
|
|
54842
|
-
this.objectName = objectName;
|
|
54843
|
-
this.client = client2;
|
|
54844
|
-
}
|
|
54845
|
-
// fetches a record or records specified by id(s) in first argument.
|
|
54846
|
-
async retrieve(id2) {
|
|
54847
|
-
if (_.isEmpty(id2)) {
|
|
54848
|
-
return [];
|
|
54230
|
+
};
|
|
54231
|
+
}()
|
|
54232
|
+
);
|
|
54233
|
+
return cookies;
|
|
54234
|
+
}
|
|
54235
|
+
var isAbsoluteURL;
|
|
54236
|
+
var hasRequiredIsAbsoluteURL;
|
|
54237
|
+
function requireIsAbsoluteURL() {
|
|
54238
|
+
if (hasRequiredIsAbsoluteURL) return isAbsoluteURL;
|
|
54239
|
+
hasRequiredIsAbsoluteURL = 1;
|
|
54240
|
+
isAbsoluteURL = function isAbsoluteURL2(url2) {
|
|
54241
|
+
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url2);
|
|
54242
|
+
};
|
|
54243
|
+
return isAbsoluteURL;
|
|
54244
|
+
}
|
|
54245
|
+
var combineURLs;
|
|
54246
|
+
var hasRequiredCombineURLs;
|
|
54247
|
+
function requireCombineURLs() {
|
|
54248
|
+
if (hasRequiredCombineURLs) return combineURLs;
|
|
54249
|
+
hasRequiredCombineURLs = 1;
|
|
54250
|
+
combineURLs = function combineURLs2(baseURL, relativeURL) {
|
|
54251
|
+
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
54252
|
+
};
|
|
54253
|
+
return combineURLs;
|
|
54254
|
+
}
|
|
54255
|
+
var buildFullPath;
|
|
54256
|
+
var hasRequiredBuildFullPath;
|
|
54257
|
+
function requireBuildFullPath() {
|
|
54258
|
+
if (hasRequiredBuildFullPath) return buildFullPath;
|
|
54259
|
+
hasRequiredBuildFullPath = 1;
|
|
54260
|
+
var isAbsoluteURL2 = requireIsAbsoluteURL();
|
|
54261
|
+
var combineURLs2 = requireCombineURLs();
|
|
54262
|
+
buildFullPath = function buildFullPath2(baseURL, requestedURL) {
|
|
54263
|
+
if (baseURL && !isAbsoluteURL2(requestedURL)) {
|
|
54264
|
+
return combineURLs2(baseURL, requestedURL);
|
|
54849
54265
|
}
|
|
54850
|
-
|
|
54851
|
-
|
|
54852
|
-
|
|
54853
|
-
|
|
54854
|
-
|
|
54855
|
-
|
|
54856
|
-
|
|
54857
|
-
|
|
54858
|
-
|
|
54266
|
+
return requestedURL;
|
|
54267
|
+
};
|
|
54268
|
+
return buildFullPath;
|
|
54269
|
+
}
|
|
54270
|
+
var parseHeaders;
|
|
54271
|
+
var hasRequiredParseHeaders;
|
|
54272
|
+
function requireParseHeaders() {
|
|
54273
|
+
if (hasRequiredParseHeaders) return parseHeaders;
|
|
54274
|
+
hasRequiredParseHeaders = 1;
|
|
54275
|
+
var utils2 = requireUtils();
|
|
54276
|
+
var ignoreDuplicateOf = [
|
|
54277
|
+
"age",
|
|
54278
|
+
"authorization",
|
|
54279
|
+
"content-length",
|
|
54280
|
+
"content-type",
|
|
54281
|
+
"etag",
|
|
54282
|
+
"expires",
|
|
54283
|
+
"from",
|
|
54284
|
+
"host",
|
|
54285
|
+
"if-modified-since",
|
|
54286
|
+
"if-unmodified-since",
|
|
54287
|
+
"last-modified",
|
|
54288
|
+
"location",
|
|
54289
|
+
"max-forwards",
|
|
54290
|
+
"proxy-authorization",
|
|
54291
|
+
"referer",
|
|
54292
|
+
"retry-after",
|
|
54293
|
+
"user-agent"
|
|
54294
|
+
];
|
|
54295
|
+
parseHeaders = function parseHeaders2(headers) {
|
|
54296
|
+
var parsed = {};
|
|
54297
|
+
var key2;
|
|
54298
|
+
var val;
|
|
54299
|
+
var i;
|
|
54300
|
+
if (!headers) {
|
|
54301
|
+
return parsed;
|
|
54859
54302
|
}
|
|
54860
|
-
|
|
54861
|
-
|
|
54862
|
-
|
|
54863
|
-
|
|
54864
|
-
|
|
54865
|
-
|
|
54866
|
-
|
|
54867
|
-
|
|
54868
|
-
|
|
54869
|
-
|
|
54870
|
-
|
|
54871
|
-
|
|
54872
|
-
|
|
54873
|
-
|
|
54874
|
-
async delete(id2) {
|
|
54875
|
-
return await this.client.deleteRecord({
|
|
54876
|
-
objectName: this.objectName,
|
|
54877
|
-
id: id2
|
|
54878
|
-
});
|
|
54879
|
-
}
|
|
54880
|
-
async find(filters, fields, sort, top, skip) {
|
|
54881
|
-
return await this.client.searchRecords(this.objectName, {
|
|
54882
|
-
filters,
|
|
54883
|
-
fields,
|
|
54884
|
-
sort,
|
|
54885
|
-
top,
|
|
54886
|
-
skip
|
|
54303
|
+
utils2.forEach(headers.split("\n"), function parser(line) {
|
|
54304
|
+
i = line.indexOf(":");
|
|
54305
|
+
key2 = utils2.trim(line.substr(0, i)).toLowerCase();
|
|
54306
|
+
val = utils2.trim(line.substr(i + 1));
|
|
54307
|
+
if (key2) {
|
|
54308
|
+
if (parsed[key2] && ignoreDuplicateOf.indexOf(key2) >= 0) {
|
|
54309
|
+
return;
|
|
54310
|
+
}
|
|
54311
|
+
if (key2 === "set-cookie") {
|
|
54312
|
+
parsed[key2] = (parsed[key2] ? parsed[key2] : []).concat([val]);
|
|
54313
|
+
} else {
|
|
54314
|
+
parsed[key2] = parsed[key2] ? parsed[key2] + ", " + val : val;
|
|
54315
|
+
}
|
|
54316
|
+
}
|
|
54887
54317
|
});
|
|
54888
|
-
|
|
54318
|
+
return parsed;
|
|
54319
|
+
};
|
|
54320
|
+
return parseHeaders;
|
|
54889
54321
|
}
|
|
54890
|
-
var
|
|
54891
|
-
var
|
|
54892
|
-
|
|
54893
|
-
|
|
54894
|
-
|
|
54895
|
-
|
|
54896
|
-
|
|
54897
|
-
|
|
54898
|
-
|
|
54899
|
-
|
|
54900
|
-
|
|
54322
|
+
var isURLSameOrigin;
|
|
54323
|
+
var hasRequiredIsURLSameOrigin;
|
|
54324
|
+
function requireIsURLSameOrigin() {
|
|
54325
|
+
if (hasRequiredIsURLSameOrigin) return isURLSameOrigin;
|
|
54326
|
+
hasRequiredIsURLSameOrigin = 1;
|
|
54327
|
+
var utils2 = requireUtils();
|
|
54328
|
+
isURLSameOrigin = utils2.isStandardBrowserEnv() ? (
|
|
54329
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
54330
|
+
// whether the request URL is of the same origin as current location.
|
|
54331
|
+
function standardBrowserEnv() {
|
|
54332
|
+
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
54333
|
+
var urlParsingNode = document.createElement("a");
|
|
54334
|
+
var originURL;
|
|
54335
|
+
function resolveURL(url2) {
|
|
54336
|
+
var href = url2;
|
|
54337
|
+
if (msie) {
|
|
54338
|
+
urlParsingNode.setAttribute("href", href);
|
|
54339
|
+
href = urlParsingNode.href;
|
|
54340
|
+
}
|
|
54341
|
+
urlParsingNode.setAttribute("href", href);
|
|
54342
|
+
return {
|
|
54343
|
+
href: urlParsingNode.href,
|
|
54344
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
54345
|
+
host: urlParsingNode.host,
|
|
54346
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
54347
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
54348
|
+
hostname: urlParsingNode.hostname,
|
|
54349
|
+
port: urlParsingNode.port,
|
|
54350
|
+
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
54351
|
+
};
|
|
54901
54352
|
}
|
|
54902
|
-
|
|
54903
|
-
|
|
54904
|
-
|
|
54905
|
-
|
|
54353
|
+
originURL = resolveURL(window.location.href);
|
|
54354
|
+
return function isURLSameOrigin2(requestURL) {
|
|
54355
|
+
var parsed = utils2.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
54356
|
+
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
54357
|
+
};
|
|
54358
|
+
}()
|
|
54359
|
+
) : (
|
|
54360
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
54361
|
+
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
54362
|
+
return function isURLSameOrigin2() {
|
|
54363
|
+
return true;
|
|
54364
|
+
};
|
|
54365
|
+
}()
|
|
54366
|
+
);
|
|
54367
|
+
return isURLSameOrigin;
|
|
54906
54368
|
}
|
|
54907
|
-
var
|
|
54908
|
-
var
|
|
54909
|
-
function
|
|
54910
|
-
if (
|
|
54911
|
-
|
|
54912
|
-
var
|
|
54913
|
-
var
|
|
54914
|
-
|
|
54915
|
-
|
|
54916
|
-
|
|
54917
|
-
|
|
54918
|
-
|
|
54919
|
-
|
|
54920
|
-
function
|
|
54921
|
-
return
|
|
54922
|
-
|
|
54923
|
-
|
|
54924
|
-
|
|
54925
|
-
|
|
54926
|
-
|
|
54927
|
-
return typeof FormData !== "undefined" && val instanceof FormData;
|
|
54928
|
-
}
|
|
54929
|
-
function isArrayBufferView2(val) {
|
|
54930
|
-
var result;
|
|
54931
|
-
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
54932
|
-
result = ArrayBuffer.isView(val);
|
|
54933
|
-
} else {
|
|
54934
|
-
result = val && val.buffer && val.buffer instanceof ArrayBuffer;
|
|
54935
|
-
}
|
|
54936
|
-
return result;
|
|
54937
|
-
}
|
|
54938
|
-
function isString2(val) {
|
|
54939
|
-
return typeof val === "string";
|
|
54940
|
-
}
|
|
54941
|
-
function isNumber2(val) {
|
|
54942
|
-
return typeof val === "number";
|
|
54943
|
-
}
|
|
54944
|
-
function isObject2(val) {
|
|
54945
|
-
return val !== null && typeof val === "object";
|
|
54946
|
-
}
|
|
54947
|
-
function isPlainObject2(val) {
|
|
54948
|
-
if (toString2.call(val) !== "[object Object]") {
|
|
54949
|
-
return false;
|
|
54950
|
-
}
|
|
54951
|
-
var prototype = Object.getPrototypeOf(val);
|
|
54952
|
-
return prototype === null || prototype === Object.prototype;
|
|
54953
|
-
}
|
|
54954
|
-
function isDate(val) {
|
|
54955
|
-
return toString2.call(val) === "[object Date]";
|
|
54956
|
-
}
|
|
54957
|
-
function isFile(val) {
|
|
54958
|
-
return toString2.call(val) === "[object File]";
|
|
54959
|
-
}
|
|
54960
|
-
function isBlob(val) {
|
|
54961
|
-
return toString2.call(val) === "[object Blob]";
|
|
54962
|
-
}
|
|
54963
|
-
function isFunction2(val) {
|
|
54964
|
-
return toString2.call(val) === "[object Function]";
|
|
54965
|
-
}
|
|
54966
|
-
function isStream(val) {
|
|
54967
|
-
return isObject2(val) && isFunction2(val.pipe);
|
|
54968
|
-
}
|
|
54969
|
-
function isURLSearchParams(val) {
|
|
54970
|
-
return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
|
|
54971
|
-
}
|
|
54972
|
-
function trim(str) {
|
|
54973
|
-
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
|
|
54974
|
-
}
|
|
54975
|
-
function isStandardBrowserEnv() {
|
|
54976
|
-
if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
|
|
54977
|
-
return false;
|
|
54978
|
-
}
|
|
54979
|
-
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
54980
|
-
}
|
|
54981
|
-
function forEach2(obj, fn) {
|
|
54982
|
-
if (obj === null || typeof obj === "undefined") {
|
|
54983
|
-
return;
|
|
54984
|
-
}
|
|
54985
|
-
if (typeof obj !== "object") {
|
|
54986
|
-
obj = [obj];
|
|
54987
|
-
}
|
|
54988
|
-
if (isArray2(obj)) {
|
|
54989
|
-
for (var i = 0, l = obj.length; i < l; i++) {
|
|
54990
|
-
fn.call(null, obj[i], i, obj);
|
|
54369
|
+
var xhr;
|
|
54370
|
+
var hasRequiredXhr;
|
|
54371
|
+
function requireXhr() {
|
|
54372
|
+
if (hasRequiredXhr) return xhr;
|
|
54373
|
+
hasRequiredXhr = 1;
|
|
54374
|
+
var utils2 = requireUtils();
|
|
54375
|
+
var settle2 = requireSettle();
|
|
54376
|
+
var cookies2 = requireCookies();
|
|
54377
|
+
var buildURL2 = requireBuildURL();
|
|
54378
|
+
var buildFullPath2 = requireBuildFullPath();
|
|
54379
|
+
var parseHeaders2 = requireParseHeaders();
|
|
54380
|
+
var isURLSameOrigin2 = requireIsURLSameOrigin();
|
|
54381
|
+
var createError2 = requireCreateError();
|
|
54382
|
+
xhr = function xhrAdapter(config2) {
|
|
54383
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
54384
|
+
var requestData2 = config2.data;
|
|
54385
|
+
var requestHeaders = config2.headers;
|
|
54386
|
+
var responseType = config2.responseType;
|
|
54387
|
+
if (utils2.isFormData(requestData2)) {
|
|
54388
|
+
delete requestHeaders["Content-Type"];
|
|
54991
54389
|
}
|
|
54992
|
-
|
|
54993
|
-
|
|
54994
|
-
|
|
54995
|
-
|
|
54390
|
+
var request2 = new XMLHttpRequest();
|
|
54391
|
+
if (config2.auth) {
|
|
54392
|
+
var username = config2.auth.username || "";
|
|
54393
|
+
var password = config2.auth.password ? unescape(encodeURIComponent(config2.auth.password)) : "";
|
|
54394
|
+
requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
|
|
54395
|
+
}
|
|
54396
|
+
var fullPath = buildFullPath2(config2.baseURL, config2.url);
|
|
54397
|
+
request2.open(config2.method.toUpperCase(), buildURL2(fullPath, config2.params, config2.paramsSerializer), true);
|
|
54398
|
+
request2.timeout = config2.timeout;
|
|
54399
|
+
function onloadend() {
|
|
54400
|
+
if (!request2) {
|
|
54401
|
+
return;
|
|
54996
54402
|
}
|
|
54403
|
+
var responseHeaders = "getAllResponseHeaders" in request2 ? parseHeaders2(request2.getAllResponseHeaders()) : null;
|
|
54404
|
+
var responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response;
|
|
54405
|
+
var response = {
|
|
54406
|
+
data: responseData,
|
|
54407
|
+
status: request2.status,
|
|
54408
|
+
statusText: request2.statusText,
|
|
54409
|
+
headers: responseHeaders,
|
|
54410
|
+
config: config2,
|
|
54411
|
+
request: request2
|
|
54412
|
+
};
|
|
54413
|
+
settle2(resolve, reject, response);
|
|
54414
|
+
request2 = null;
|
|
54997
54415
|
}
|
|
54998
|
-
|
|
54999
|
-
|
|
55000
|
-
function merge2() {
|
|
55001
|
-
var result = {};
|
|
55002
|
-
function assignValue(val, key2) {
|
|
55003
|
-
if (isPlainObject2(result[key2]) && isPlainObject2(val)) {
|
|
55004
|
-
result[key2] = merge2(result[key2], val);
|
|
55005
|
-
} else if (isPlainObject2(val)) {
|
|
55006
|
-
result[key2] = merge2({}, val);
|
|
55007
|
-
} else if (isArray2(val)) {
|
|
55008
|
-
result[key2] = val.slice();
|
|
54416
|
+
if ("onloadend" in request2) {
|
|
54417
|
+
request2.onloadend = onloadend;
|
|
55009
54418
|
} else {
|
|
55010
|
-
|
|
54419
|
+
request2.onreadystatechange = function handleLoad() {
|
|
54420
|
+
if (!request2 || request2.readyState !== 4) {
|
|
54421
|
+
return;
|
|
54422
|
+
}
|
|
54423
|
+
if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) {
|
|
54424
|
+
return;
|
|
54425
|
+
}
|
|
54426
|
+
setTimeout(onloadend);
|
|
54427
|
+
};
|
|
55011
54428
|
}
|
|
55012
|
-
|
|
55013
|
-
|
|
55014
|
-
|
|
55015
|
-
|
|
55016
|
-
|
|
55017
|
-
|
|
55018
|
-
|
|
55019
|
-
|
|
55020
|
-
|
|
55021
|
-
|
|
55022
|
-
}
|
|
55023
|
-
|
|
54429
|
+
request2.onabort = function handleAbort() {
|
|
54430
|
+
if (!request2) {
|
|
54431
|
+
return;
|
|
54432
|
+
}
|
|
54433
|
+
reject(createError2("Request aborted", config2, "ECONNABORTED", request2));
|
|
54434
|
+
request2 = null;
|
|
54435
|
+
};
|
|
54436
|
+
request2.onerror = function handleError() {
|
|
54437
|
+
reject(createError2("Network Error", config2, null, request2));
|
|
54438
|
+
request2 = null;
|
|
54439
|
+
};
|
|
54440
|
+
request2.ontimeout = function handleTimeout() {
|
|
54441
|
+
var timeoutErrorMessage = "timeout of " + config2.timeout + "ms exceeded";
|
|
54442
|
+
if (config2.timeoutErrorMessage) {
|
|
54443
|
+
timeoutErrorMessage = config2.timeoutErrorMessage;
|
|
54444
|
+
}
|
|
54445
|
+
reject(createError2(
|
|
54446
|
+
timeoutErrorMessage,
|
|
54447
|
+
config2,
|
|
54448
|
+
config2.transitional && config2.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
|
|
54449
|
+
request2
|
|
54450
|
+
));
|
|
54451
|
+
request2 = null;
|
|
54452
|
+
};
|
|
54453
|
+
if (utils2.isStandardBrowserEnv()) {
|
|
54454
|
+
var xsrfValue = (config2.withCredentials || isURLSameOrigin2(fullPath)) && config2.xsrfCookieName ? cookies2.read(config2.xsrfCookieName) : void 0;
|
|
54455
|
+
if (xsrfValue) {
|
|
54456
|
+
requestHeaders[config2.xsrfHeaderName] = xsrfValue;
|
|
54457
|
+
}
|
|
54458
|
+
}
|
|
54459
|
+
if ("setRequestHeader" in request2) {
|
|
54460
|
+
utils2.forEach(requestHeaders, function setRequestHeader(val, key2) {
|
|
54461
|
+
if (typeof requestData2 === "undefined" && key2.toLowerCase() === "content-type") {
|
|
54462
|
+
delete requestHeaders[key2];
|
|
54463
|
+
} else {
|
|
54464
|
+
request2.setRequestHeader(key2, val);
|
|
54465
|
+
}
|
|
54466
|
+
});
|
|
54467
|
+
}
|
|
54468
|
+
if (!utils2.isUndefined(config2.withCredentials)) {
|
|
54469
|
+
request2.withCredentials = !!config2.withCredentials;
|
|
54470
|
+
}
|
|
54471
|
+
if (responseType && responseType !== "json") {
|
|
54472
|
+
request2.responseType = config2.responseType;
|
|
54473
|
+
}
|
|
54474
|
+
if (typeof config2.onDownloadProgress === "function") {
|
|
54475
|
+
request2.addEventListener("progress", config2.onDownloadProgress);
|
|
54476
|
+
}
|
|
54477
|
+
if (typeof config2.onUploadProgress === "function" && request2.upload) {
|
|
54478
|
+
request2.upload.addEventListener("progress", config2.onUploadProgress);
|
|
54479
|
+
}
|
|
54480
|
+
if (config2.cancelToken) {
|
|
54481
|
+
config2.cancelToken.promise.then(function onCanceled(cancel) {
|
|
54482
|
+
if (!request2) {
|
|
54483
|
+
return;
|
|
54484
|
+
}
|
|
54485
|
+
request2.abort();
|
|
54486
|
+
reject(cancel);
|
|
54487
|
+
request2 = null;
|
|
54488
|
+
});
|
|
54489
|
+
}
|
|
54490
|
+
if (!requestData2) {
|
|
54491
|
+
requestData2 = null;
|
|
55024
54492
|
}
|
|
54493
|
+
request2.send(requestData2);
|
|
55025
54494
|
});
|
|
55026
|
-
|
|
55027
|
-
|
|
55028
|
-
|
|
55029
|
-
|
|
55030
|
-
|
|
54495
|
+
};
|
|
54496
|
+
return xhr;
|
|
54497
|
+
}
|
|
54498
|
+
var defaults_1;
|
|
54499
|
+
var hasRequiredDefaults;
|
|
54500
|
+
function requireDefaults() {
|
|
54501
|
+
if (hasRequiredDefaults) return defaults_1;
|
|
54502
|
+
hasRequiredDefaults = 1;
|
|
54503
|
+
var utils2 = requireUtils();
|
|
54504
|
+
var normalizeHeaderName2 = requireNormalizeHeaderName();
|
|
54505
|
+
var enhanceError2 = requireEnhanceError();
|
|
54506
|
+
var DEFAULT_CONTENT_TYPE = {
|
|
54507
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
54508
|
+
};
|
|
54509
|
+
function setContentTypeIfUnset(headers, value) {
|
|
54510
|
+
if (!utils2.isUndefined(headers) && utils2.isUndefined(headers["Content-Type"])) {
|
|
54511
|
+
headers["Content-Type"] = value;
|
|
55031
54512
|
}
|
|
55032
|
-
return content;
|
|
55033
54513
|
}
|
|
55034
|
-
|
|
55035
|
-
|
|
55036
|
-
|
|
55037
|
-
|
|
55038
|
-
|
|
55039
|
-
|
|
55040
|
-
isString: isString2,
|
|
55041
|
-
isNumber: isNumber2,
|
|
55042
|
-
isObject: isObject2,
|
|
55043
|
-
isPlainObject: isPlainObject2,
|
|
55044
|
-
isUndefined,
|
|
55045
|
-
isDate,
|
|
55046
|
-
isFile,
|
|
55047
|
-
isBlob,
|
|
55048
|
-
isFunction: isFunction2,
|
|
55049
|
-
isStream,
|
|
55050
|
-
isURLSearchParams,
|
|
55051
|
-
isStandardBrowserEnv,
|
|
55052
|
-
forEach: forEach2,
|
|
55053
|
-
merge: merge2,
|
|
55054
|
-
extend,
|
|
55055
|
-
trim,
|
|
55056
|
-
stripBOM
|
|
55057
|
-
};
|
|
55058
|
-
return utils;
|
|
55059
|
-
}
|
|
55060
|
-
var buildURL;
|
|
55061
|
-
var hasRequiredBuildURL;
|
|
55062
|
-
function requireBuildURL() {
|
|
55063
|
-
if (hasRequiredBuildURL) return buildURL;
|
|
55064
|
-
hasRequiredBuildURL = 1;
|
|
55065
|
-
var utils2 = requireUtils();
|
|
55066
|
-
function encode(val) {
|
|
55067
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
55068
|
-
}
|
|
55069
|
-
buildURL = function buildURL2(url2, params, paramsSerializer) {
|
|
55070
|
-
if (!params) {
|
|
55071
|
-
return url2;
|
|
54514
|
+
function getDefaultAdapter() {
|
|
54515
|
+
var adapter;
|
|
54516
|
+
if (typeof XMLHttpRequest !== "undefined") {
|
|
54517
|
+
adapter = requireXhr();
|
|
54518
|
+
} else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
|
|
54519
|
+
adapter = requireXhr();
|
|
55072
54520
|
}
|
|
55073
|
-
|
|
55074
|
-
|
|
55075
|
-
|
|
55076
|
-
|
|
55077
|
-
|
|
55078
|
-
|
|
55079
|
-
|
|
55080
|
-
|
|
55081
|
-
if (
|
|
55082
|
-
|
|
55083
|
-
}
|
|
55084
|
-
if (utils2.isArray(val)) {
|
|
55085
|
-
key2 = key2 + "[]";
|
|
55086
|
-
} else {
|
|
55087
|
-
val = [val];
|
|
54521
|
+
return adapter;
|
|
54522
|
+
}
|
|
54523
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
54524
|
+
if (utils2.isString(rawValue)) {
|
|
54525
|
+
try {
|
|
54526
|
+
(parser || JSON.parse)(rawValue);
|
|
54527
|
+
return utils2.trim(rawValue);
|
|
54528
|
+
} catch (e) {
|
|
54529
|
+
if (e.name !== "SyntaxError") {
|
|
54530
|
+
throw e;
|
|
55088
54531
|
}
|
|
55089
|
-
utils2.forEach(val, function parseValue(v) {
|
|
55090
|
-
if (utils2.isDate(v)) {
|
|
55091
|
-
v = v.toISOString();
|
|
55092
|
-
} else if (utils2.isObject(v)) {
|
|
55093
|
-
v = JSON.stringify(v);
|
|
55094
|
-
}
|
|
55095
|
-
parts.push(encode(key2) + "=" + encode(v));
|
|
55096
|
-
});
|
|
55097
|
-
});
|
|
55098
|
-
serializedParams = parts.join("&");
|
|
55099
|
-
}
|
|
55100
|
-
if (serializedParams) {
|
|
55101
|
-
var hashmarkIndex = url2.indexOf("#");
|
|
55102
|
-
if (hashmarkIndex !== -1) {
|
|
55103
|
-
url2 = url2.slice(0, hashmarkIndex);
|
|
55104
54532
|
}
|
|
55105
|
-
url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
55106
54533
|
}
|
|
55107
|
-
return
|
|
55108
|
-
};
|
|
55109
|
-
return buildURL;
|
|
55110
|
-
}
|
|
55111
|
-
var InterceptorManager_1;
|
|
55112
|
-
var hasRequiredInterceptorManager;
|
|
55113
|
-
function requireInterceptorManager() {
|
|
55114
|
-
if (hasRequiredInterceptorManager) return InterceptorManager_1;
|
|
55115
|
-
hasRequiredInterceptorManager = 1;
|
|
55116
|
-
var utils2 = requireUtils();
|
|
55117
|
-
function InterceptorManager() {
|
|
55118
|
-
this.handlers = [];
|
|
54534
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
55119
54535
|
}
|
|
55120
|
-
|
|
55121
|
-
|
|
55122
|
-
|
|
55123
|
-
|
|
55124
|
-
|
|
55125
|
-
|
|
55126
|
-
|
|
55127
|
-
|
|
55128
|
-
|
|
55129
|
-
|
|
55130
|
-
|
|
55131
|
-
|
|
54536
|
+
var defaults2 = {
|
|
54537
|
+
transitional: {
|
|
54538
|
+
silentJSONParsing: true,
|
|
54539
|
+
forcedJSONParsing: true,
|
|
54540
|
+
clarifyTimeoutError: false
|
|
54541
|
+
},
|
|
54542
|
+
adapter: getDefaultAdapter(),
|
|
54543
|
+
transformRequest: [function transformRequest(data2, headers) {
|
|
54544
|
+
normalizeHeaderName2(headers, "Accept");
|
|
54545
|
+
normalizeHeaderName2(headers, "Content-Type");
|
|
54546
|
+
if (utils2.isFormData(data2) || utils2.isArrayBuffer(data2) || utils2.isBuffer(data2) || utils2.isStream(data2) || utils2.isFile(data2) || utils2.isBlob(data2)) {
|
|
54547
|
+
return data2;
|
|
54548
|
+
}
|
|
54549
|
+
if (utils2.isArrayBufferView(data2)) {
|
|
54550
|
+
return data2.buffer;
|
|
54551
|
+
}
|
|
54552
|
+
if (utils2.isURLSearchParams(data2)) {
|
|
54553
|
+
setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
|
|
54554
|
+
return data2.toString();
|
|
54555
|
+
}
|
|
54556
|
+
if (utils2.isObject(data2) || headers && headers["Content-Type"] === "application/json") {
|
|
54557
|
+
setContentTypeIfUnset(headers, "application/json");
|
|
54558
|
+
return stringifySafely(data2);
|
|
54559
|
+
}
|
|
54560
|
+
return data2;
|
|
54561
|
+
}],
|
|
54562
|
+
transformResponse: [function transformResponse(data2) {
|
|
54563
|
+
var transitional = this.transitional;
|
|
54564
|
+
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
54565
|
+
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
54566
|
+
var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
|
|
54567
|
+
if (strictJSONParsing || forcedJSONParsing && utils2.isString(data2) && data2.length) {
|
|
54568
|
+
try {
|
|
54569
|
+
return JSON.parse(data2);
|
|
54570
|
+
} catch (e) {
|
|
54571
|
+
if (strictJSONParsing) {
|
|
54572
|
+
if (e.name === "SyntaxError") {
|
|
54573
|
+
throw enhanceError2(e, this, "E_JSON_PARSE");
|
|
54574
|
+
}
|
|
54575
|
+
throw e;
|
|
54576
|
+
}
|
|
54577
|
+
}
|
|
54578
|
+
}
|
|
54579
|
+
return data2;
|
|
54580
|
+
}],
|
|
54581
|
+
/**
|
|
54582
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
54583
|
+
* timeout is not created.
|
|
54584
|
+
*/
|
|
54585
|
+
timeout: 0,
|
|
54586
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
54587
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
54588
|
+
maxContentLength: -1,
|
|
54589
|
+
maxBodyLength: -1,
|
|
54590
|
+
validateStatus: function validateStatus(status) {
|
|
54591
|
+
return status >= 200 && status < 300;
|
|
55132
54592
|
}
|
|
55133
54593
|
};
|
|
55134
|
-
|
|
55135
|
-
|
|
55136
|
-
|
|
55137
|
-
|
|
55138
|
-
}
|
|
55139
|
-
});
|
|
54594
|
+
defaults2.headers = {
|
|
54595
|
+
common: {
|
|
54596
|
+
"Accept": "application/json, text/plain, */*"
|
|
54597
|
+
}
|
|
55140
54598
|
};
|
|
55141
|
-
|
|
55142
|
-
|
|
54599
|
+
utils2.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
|
|
54600
|
+
defaults2.headers[method] = {};
|
|
54601
|
+
});
|
|
54602
|
+
utils2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
54603
|
+
defaults2.headers[method] = utils2.merge(DEFAULT_CONTENT_TYPE);
|
|
54604
|
+
});
|
|
54605
|
+
defaults_1 = defaults2;
|
|
54606
|
+
return defaults_1;
|
|
55143
54607
|
}
|
|
55144
|
-
var
|
|
55145
|
-
var
|
|
55146
|
-
function
|
|
55147
|
-
if (
|
|
55148
|
-
|
|
54608
|
+
var transformData;
|
|
54609
|
+
var hasRequiredTransformData;
|
|
54610
|
+
function requireTransformData() {
|
|
54611
|
+
if (hasRequiredTransformData) return transformData;
|
|
54612
|
+
hasRequiredTransformData = 1;
|
|
55149
54613
|
var utils2 = requireUtils();
|
|
55150
|
-
|
|
55151
|
-
|
|
55152
|
-
|
|
55153
|
-
|
|
55154
|
-
|
|
55155
|
-
}
|
|
54614
|
+
var defaults2 = requireDefaults();
|
|
54615
|
+
transformData = function transformData2(data2, headers, fns) {
|
|
54616
|
+
var context = this || defaults2;
|
|
54617
|
+
utils2.forEach(fns, function transform2(fn) {
|
|
54618
|
+
data2 = fn.call(context, data2, headers);
|
|
55156
54619
|
});
|
|
54620
|
+
return data2;
|
|
55157
54621
|
};
|
|
55158
|
-
return
|
|
54622
|
+
return transformData;
|
|
55159
54623
|
}
|
|
55160
|
-
var
|
|
55161
|
-
var
|
|
55162
|
-
function
|
|
55163
|
-
if (
|
|
55164
|
-
|
|
55165
|
-
|
|
55166
|
-
|
|
55167
|
-
if (code) {
|
|
55168
|
-
error.code = code;
|
|
55169
|
-
}
|
|
55170
|
-
error.request = request2;
|
|
55171
|
-
error.response = response;
|
|
55172
|
-
error.isAxiosError = true;
|
|
55173
|
-
error.toJSON = function toJSON() {
|
|
55174
|
-
return {
|
|
55175
|
-
// Standard
|
|
55176
|
-
message: this.message,
|
|
55177
|
-
name: this.name,
|
|
55178
|
-
// Microsoft
|
|
55179
|
-
description: this.description,
|
|
55180
|
-
number: this.number,
|
|
55181
|
-
// Mozilla
|
|
55182
|
-
fileName: this.fileName,
|
|
55183
|
-
lineNumber: this.lineNumber,
|
|
55184
|
-
columnNumber: this.columnNumber,
|
|
55185
|
-
stack: this.stack,
|
|
55186
|
-
// Axios
|
|
55187
|
-
config: this.config,
|
|
55188
|
-
code: this.code
|
|
55189
|
-
};
|
|
55190
|
-
};
|
|
55191
|
-
return error;
|
|
54624
|
+
var isCancel;
|
|
54625
|
+
var hasRequiredIsCancel;
|
|
54626
|
+
function requireIsCancel() {
|
|
54627
|
+
if (hasRequiredIsCancel) return isCancel;
|
|
54628
|
+
hasRequiredIsCancel = 1;
|
|
54629
|
+
isCancel = function isCancel2(value) {
|
|
54630
|
+
return !!(value && value.__CANCEL__);
|
|
55192
54631
|
};
|
|
55193
|
-
return
|
|
54632
|
+
return isCancel;
|
|
55194
54633
|
}
|
|
55195
|
-
var
|
|
55196
|
-
var
|
|
55197
|
-
function
|
|
55198
|
-
if (
|
|
55199
|
-
|
|
55200
|
-
var enhanceError2 = requireEnhanceError();
|
|
55201
|
-
createError = function createError2(message2, config2, code, request2, response) {
|
|
55202
|
-
var error = new Error(message2);
|
|
55203
|
-
return enhanceError2(error, config2, code, request2, response);
|
|
55204
|
-
};
|
|
55205
|
-
return createError;
|
|
55206
|
-
}
|
|
55207
|
-
var settle;
|
|
55208
|
-
var hasRequiredSettle;
|
|
55209
|
-
function requireSettle() {
|
|
55210
|
-
if (hasRequiredSettle) return settle;
|
|
55211
|
-
hasRequiredSettle = 1;
|
|
55212
|
-
var createError2 = requireCreateError();
|
|
55213
|
-
settle = function settle2(resolve, reject, response) {
|
|
55214
|
-
var validateStatus = response.config.validateStatus;
|
|
55215
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
55216
|
-
resolve(response);
|
|
55217
|
-
} else {
|
|
55218
|
-
reject(createError2(
|
|
55219
|
-
"Request failed with status code " + response.status,
|
|
55220
|
-
response.config,
|
|
55221
|
-
null,
|
|
55222
|
-
response.request,
|
|
55223
|
-
response
|
|
55224
|
-
));
|
|
55225
|
-
}
|
|
55226
|
-
};
|
|
55227
|
-
return settle;
|
|
55228
|
-
}
|
|
55229
|
-
var cookies;
|
|
55230
|
-
var hasRequiredCookies;
|
|
55231
|
-
function requireCookies() {
|
|
55232
|
-
if (hasRequiredCookies) return cookies;
|
|
55233
|
-
hasRequiredCookies = 1;
|
|
55234
|
-
var utils2 = requireUtils();
|
|
55235
|
-
cookies = utils2.isStandardBrowserEnv() ? (
|
|
55236
|
-
// Standard browser envs support document.cookie
|
|
55237
|
-
/* @__PURE__ */ function standardBrowserEnv() {
|
|
55238
|
-
return {
|
|
55239
|
-
write: function write(name, value, expires, path2, domain, secure) {
|
|
55240
|
-
var cookie2 = [];
|
|
55241
|
-
cookie2.push(name + "=" + encodeURIComponent(value));
|
|
55242
|
-
if (utils2.isNumber(expires)) {
|
|
55243
|
-
cookie2.push("expires=" + new Date(expires).toGMTString());
|
|
55244
|
-
}
|
|
55245
|
-
if (utils2.isString(path2)) {
|
|
55246
|
-
cookie2.push("path=" + path2);
|
|
55247
|
-
}
|
|
55248
|
-
if (utils2.isString(domain)) {
|
|
55249
|
-
cookie2.push("domain=" + domain);
|
|
55250
|
-
}
|
|
55251
|
-
if (secure === true) {
|
|
55252
|
-
cookie2.push("secure");
|
|
55253
|
-
}
|
|
55254
|
-
document.cookie = cookie2.join("; ");
|
|
55255
|
-
},
|
|
55256
|
-
read: function read(name) {
|
|
55257
|
-
var match2 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
55258
|
-
return match2 ? decodeURIComponent(match2[3]) : null;
|
|
55259
|
-
},
|
|
55260
|
-
remove: function remove(name) {
|
|
55261
|
-
this.write(name, "", Date.now() - 864e5);
|
|
55262
|
-
}
|
|
55263
|
-
};
|
|
55264
|
-
}()
|
|
55265
|
-
) : (
|
|
55266
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
55267
|
-
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
55268
|
-
return {
|
|
55269
|
-
write: function write() {
|
|
55270
|
-
},
|
|
55271
|
-
read: function read() {
|
|
55272
|
-
return null;
|
|
55273
|
-
},
|
|
55274
|
-
remove: function remove() {
|
|
55275
|
-
}
|
|
55276
|
-
};
|
|
55277
|
-
}()
|
|
55278
|
-
);
|
|
55279
|
-
return cookies;
|
|
55280
|
-
}
|
|
55281
|
-
var isAbsoluteURL;
|
|
55282
|
-
var hasRequiredIsAbsoluteURL;
|
|
55283
|
-
function requireIsAbsoluteURL() {
|
|
55284
|
-
if (hasRequiredIsAbsoluteURL) return isAbsoluteURL;
|
|
55285
|
-
hasRequiredIsAbsoluteURL = 1;
|
|
55286
|
-
isAbsoluteURL = function isAbsoluteURL2(url2) {
|
|
55287
|
-
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url2);
|
|
55288
|
-
};
|
|
55289
|
-
return isAbsoluteURL;
|
|
55290
|
-
}
|
|
55291
|
-
var combineURLs;
|
|
55292
|
-
var hasRequiredCombineURLs;
|
|
55293
|
-
function requireCombineURLs() {
|
|
55294
|
-
if (hasRequiredCombineURLs) return combineURLs;
|
|
55295
|
-
hasRequiredCombineURLs = 1;
|
|
55296
|
-
combineURLs = function combineURLs2(baseURL, relativeURL) {
|
|
55297
|
-
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
55298
|
-
};
|
|
55299
|
-
return combineURLs;
|
|
55300
|
-
}
|
|
55301
|
-
var buildFullPath;
|
|
55302
|
-
var hasRequiredBuildFullPath;
|
|
55303
|
-
function requireBuildFullPath() {
|
|
55304
|
-
if (hasRequiredBuildFullPath) return buildFullPath;
|
|
55305
|
-
hasRequiredBuildFullPath = 1;
|
|
55306
|
-
var isAbsoluteURL2 = requireIsAbsoluteURL();
|
|
55307
|
-
var combineURLs2 = requireCombineURLs();
|
|
55308
|
-
buildFullPath = function buildFullPath2(baseURL, requestedURL) {
|
|
55309
|
-
if (baseURL && !isAbsoluteURL2(requestedURL)) {
|
|
55310
|
-
return combineURLs2(baseURL, requestedURL);
|
|
55311
|
-
}
|
|
55312
|
-
return requestedURL;
|
|
55313
|
-
};
|
|
55314
|
-
return buildFullPath;
|
|
55315
|
-
}
|
|
55316
|
-
var parseHeaders;
|
|
55317
|
-
var hasRequiredParseHeaders;
|
|
55318
|
-
function requireParseHeaders() {
|
|
55319
|
-
if (hasRequiredParseHeaders) return parseHeaders;
|
|
55320
|
-
hasRequiredParseHeaders = 1;
|
|
54634
|
+
var dispatchRequest;
|
|
54635
|
+
var hasRequiredDispatchRequest;
|
|
54636
|
+
function requireDispatchRequest() {
|
|
54637
|
+
if (hasRequiredDispatchRequest) return dispatchRequest;
|
|
54638
|
+
hasRequiredDispatchRequest = 1;
|
|
55321
54639
|
var utils2 = requireUtils();
|
|
55322
|
-
var
|
|
55323
|
-
|
|
55324
|
-
|
|
55325
|
-
|
|
55326
|
-
|
|
55327
|
-
|
|
55328
|
-
"expires",
|
|
55329
|
-
"from",
|
|
55330
|
-
"host",
|
|
55331
|
-
"if-modified-since",
|
|
55332
|
-
"if-unmodified-since",
|
|
55333
|
-
"last-modified",
|
|
55334
|
-
"location",
|
|
55335
|
-
"max-forwards",
|
|
55336
|
-
"proxy-authorization",
|
|
55337
|
-
"referer",
|
|
55338
|
-
"retry-after",
|
|
55339
|
-
"user-agent"
|
|
55340
|
-
];
|
|
55341
|
-
parseHeaders = function parseHeaders2(headers) {
|
|
55342
|
-
var parsed = {};
|
|
55343
|
-
var key2;
|
|
55344
|
-
var val;
|
|
55345
|
-
var i;
|
|
55346
|
-
if (!headers) {
|
|
55347
|
-
return parsed;
|
|
54640
|
+
var transformData2 = requireTransformData();
|
|
54641
|
+
var isCancel2 = requireIsCancel();
|
|
54642
|
+
var defaults2 = requireDefaults();
|
|
54643
|
+
function throwIfCancellationRequested(config2) {
|
|
54644
|
+
if (config2.cancelToken) {
|
|
54645
|
+
config2.cancelToken.throwIfRequested();
|
|
55348
54646
|
}
|
|
55349
|
-
|
|
55350
|
-
|
|
55351
|
-
|
|
55352
|
-
|
|
55353
|
-
|
|
55354
|
-
|
|
55355
|
-
|
|
55356
|
-
|
|
55357
|
-
|
|
55358
|
-
|
|
55359
|
-
|
|
55360
|
-
|
|
54647
|
+
}
|
|
54648
|
+
dispatchRequest = function dispatchRequest2(config2) {
|
|
54649
|
+
throwIfCancellationRequested(config2);
|
|
54650
|
+
config2.headers = config2.headers || {};
|
|
54651
|
+
config2.data = transformData2.call(
|
|
54652
|
+
config2,
|
|
54653
|
+
config2.data,
|
|
54654
|
+
config2.headers,
|
|
54655
|
+
config2.transformRequest
|
|
54656
|
+
);
|
|
54657
|
+
config2.headers = utils2.merge(
|
|
54658
|
+
config2.headers.common || {},
|
|
54659
|
+
config2.headers[config2.method] || {},
|
|
54660
|
+
config2.headers
|
|
54661
|
+
);
|
|
54662
|
+
utils2.forEach(
|
|
54663
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
54664
|
+
function cleanHeaderConfig(method) {
|
|
54665
|
+
delete config2.headers[method];
|
|
54666
|
+
}
|
|
54667
|
+
);
|
|
54668
|
+
var adapter = config2.adapter || defaults2.adapter;
|
|
54669
|
+
return adapter(config2).then(function onAdapterResolution(response) {
|
|
54670
|
+
throwIfCancellationRequested(config2);
|
|
54671
|
+
response.data = transformData2.call(
|
|
54672
|
+
config2,
|
|
54673
|
+
response.data,
|
|
54674
|
+
response.headers,
|
|
54675
|
+
config2.transformResponse
|
|
54676
|
+
);
|
|
54677
|
+
return response;
|
|
54678
|
+
}, function onAdapterRejection(reason) {
|
|
54679
|
+
if (!isCancel2(reason)) {
|
|
54680
|
+
throwIfCancellationRequested(config2);
|
|
54681
|
+
if (reason && reason.response) {
|
|
54682
|
+
reason.response.data = transformData2.call(
|
|
54683
|
+
config2,
|
|
54684
|
+
reason.response.data,
|
|
54685
|
+
reason.response.headers,
|
|
54686
|
+
config2.transformResponse
|
|
54687
|
+
);
|
|
55361
54688
|
}
|
|
55362
54689
|
}
|
|
54690
|
+
return Promise.reject(reason);
|
|
55363
54691
|
});
|
|
55364
|
-
return parsed;
|
|
55365
54692
|
};
|
|
55366
|
-
return
|
|
54693
|
+
return dispatchRequest;
|
|
55367
54694
|
}
|
|
55368
|
-
var
|
|
55369
|
-
var
|
|
55370
|
-
function
|
|
55371
|
-
if (
|
|
55372
|
-
|
|
54695
|
+
var mergeConfig;
|
|
54696
|
+
var hasRequiredMergeConfig;
|
|
54697
|
+
function requireMergeConfig() {
|
|
54698
|
+
if (hasRequiredMergeConfig) return mergeConfig;
|
|
54699
|
+
hasRequiredMergeConfig = 1;
|
|
55373
54700
|
var utils2 = requireUtils();
|
|
55374
|
-
|
|
55375
|
-
|
|
55376
|
-
|
|
55377
|
-
|
|
55378
|
-
|
|
55379
|
-
|
|
55380
|
-
|
|
55381
|
-
|
|
55382
|
-
|
|
55383
|
-
|
|
55384
|
-
|
|
55385
|
-
|
|
55386
|
-
|
|
55387
|
-
|
|
55388
|
-
|
|
55389
|
-
|
|
55390
|
-
|
|
55391
|
-
|
|
55392
|
-
|
|
55393
|
-
|
|
55394
|
-
|
|
55395
|
-
|
|
55396
|
-
|
|
55397
|
-
|
|
55398
|
-
|
|
55399
|
-
|
|
55400
|
-
|
|
55401
|
-
|
|
55402
|
-
|
|
55403
|
-
|
|
55404
|
-
|
|
55405
|
-
|
|
55406
|
-
|
|
55407
|
-
|
|
55408
|
-
|
|
55409
|
-
return
|
|
55410
|
-
}
|
|
55411
|
-
|
|
55412
|
-
);
|
|
55413
|
-
return isURLSameOrigin;
|
|
55414
|
-
}
|
|
55415
|
-
var xhr;
|
|
55416
|
-
var hasRequiredXhr;
|
|
55417
|
-
function requireXhr() {
|
|
55418
|
-
if (hasRequiredXhr) return xhr;
|
|
55419
|
-
hasRequiredXhr = 1;
|
|
55420
|
-
var utils2 = requireUtils();
|
|
55421
|
-
var settle2 = requireSettle();
|
|
55422
|
-
var cookies2 = requireCookies();
|
|
55423
|
-
var buildURL2 = requireBuildURL();
|
|
55424
|
-
var buildFullPath2 = requireBuildFullPath();
|
|
55425
|
-
var parseHeaders2 = requireParseHeaders();
|
|
55426
|
-
var isURLSameOrigin2 = requireIsURLSameOrigin();
|
|
55427
|
-
var createError2 = requireCreateError();
|
|
55428
|
-
xhr = function xhrAdapter(config2) {
|
|
55429
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
55430
|
-
var requestData2 = config2.data;
|
|
55431
|
-
var requestHeaders = config2.headers;
|
|
55432
|
-
var responseType = config2.responseType;
|
|
55433
|
-
if (utils2.isFormData(requestData2)) {
|
|
55434
|
-
delete requestHeaders["Content-Type"];
|
|
55435
|
-
}
|
|
55436
|
-
var request2 = new XMLHttpRequest();
|
|
55437
|
-
if (config2.auth) {
|
|
55438
|
-
var username = config2.auth.username || "";
|
|
55439
|
-
var password = config2.auth.password ? unescape(encodeURIComponent(config2.auth.password)) : "";
|
|
55440
|
-
requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
|
|
55441
|
-
}
|
|
55442
|
-
var fullPath = buildFullPath2(config2.baseURL, config2.url);
|
|
55443
|
-
request2.open(config2.method.toUpperCase(), buildURL2(fullPath, config2.params, config2.paramsSerializer), true);
|
|
55444
|
-
request2.timeout = config2.timeout;
|
|
55445
|
-
function onloadend() {
|
|
55446
|
-
if (!request2) {
|
|
55447
|
-
return;
|
|
55448
|
-
}
|
|
55449
|
-
var responseHeaders = "getAllResponseHeaders" in request2 ? parseHeaders2(request2.getAllResponseHeaders()) : null;
|
|
55450
|
-
var responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response;
|
|
55451
|
-
var response = {
|
|
55452
|
-
data: responseData,
|
|
55453
|
-
status: request2.status,
|
|
55454
|
-
statusText: request2.statusText,
|
|
55455
|
-
headers: responseHeaders,
|
|
55456
|
-
config: config2,
|
|
55457
|
-
request: request2
|
|
55458
|
-
};
|
|
55459
|
-
settle2(resolve, reject, response);
|
|
55460
|
-
request2 = null;
|
|
55461
|
-
}
|
|
55462
|
-
if ("onloadend" in request2) {
|
|
55463
|
-
request2.onloadend = onloadend;
|
|
55464
|
-
} else {
|
|
55465
|
-
request2.onreadystatechange = function handleLoad() {
|
|
55466
|
-
if (!request2 || request2.readyState !== 4) {
|
|
55467
|
-
return;
|
|
55468
|
-
}
|
|
55469
|
-
if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) {
|
|
55470
|
-
return;
|
|
55471
|
-
}
|
|
55472
|
-
setTimeout(onloadend);
|
|
55473
|
-
};
|
|
55474
|
-
}
|
|
55475
|
-
request2.onabort = function handleAbort() {
|
|
55476
|
-
if (!request2) {
|
|
55477
|
-
return;
|
|
55478
|
-
}
|
|
55479
|
-
reject(createError2("Request aborted", config2, "ECONNABORTED", request2));
|
|
55480
|
-
request2 = null;
|
|
55481
|
-
};
|
|
55482
|
-
request2.onerror = function handleError() {
|
|
55483
|
-
reject(createError2("Network Error", config2, null, request2));
|
|
55484
|
-
request2 = null;
|
|
55485
|
-
};
|
|
55486
|
-
request2.ontimeout = function handleTimeout() {
|
|
55487
|
-
var timeoutErrorMessage = "timeout of " + config2.timeout + "ms exceeded";
|
|
55488
|
-
if (config2.timeoutErrorMessage) {
|
|
55489
|
-
timeoutErrorMessage = config2.timeoutErrorMessage;
|
|
55490
|
-
}
|
|
55491
|
-
reject(createError2(
|
|
55492
|
-
timeoutErrorMessage,
|
|
55493
|
-
config2,
|
|
55494
|
-
config2.transitional && config2.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
|
|
55495
|
-
request2
|
|
55496
|
-
));
|
|
55497
|
-
request2 = null;
|
|
55498
|
-
};
|
|
55499
|
-
if (utils2.isStandardBrowserEnv()) {
|
|
55500
|
-
var xsrfValue = (config2.withCredentials || isURLSameOrigin2(fullPath)) && config2.xsrfCookieName ? cookies2.read(config2.xsrfCookieName) : void 0;
|
|
55501
|
-
if (xsrfValue) {
|
|
55502
|
-
requestHeaders[config2.xsrfHeaderName] = xsrfValue;
|
|
55503
|
-
}
|
|
55504
|
-
}
|
|
55505
|
-
if ("setRequestHeader" in request2) {
|
|
55506
|
-
utils2.forEach(requestHeaders, function setRequestHeader(val, key2) {
|
|
55507
|
-
if (typeof requestData2 === "undefined" && key2.toLowerCase() === "content-type") {
|
|
55508
|
-
delete requestHeaders[key2];
|
|
55509
|
-
} else {
|
|
55510
|
-
request2.setRequestHeader(key2, val);
|
|
55511
|
-
}
|
|
55512
|
-
});
|
|
55513
|
-
}
|
|
55514
|
-
if (!utils2.isUndefined(config2.withCredentials)) {
|
|
55515
|
-
request2.withCredentials = !!config2.withCredentials;
|
|
55516
|
-
}
|
|
55517
|
-
if (responseType && responseType !== "json") {
|
|
55518
|
-
request2.responseType = config2.responseType;
|
|
54701
|
+
mergeConfig = function mergeConfig2(config1, config2) {
|
|
54702
|
+
config2 = config2 || {};
|
|
54703
|
+
var config3 = {};
|
|
54704
|
+
var valueFromConfig2Keys = ["url", "method", "data"];
|
|
54705
|
+
var mergeDeepPropertiesKeys = ["headers", "auth", "proxy", "params"];
|
|
54706
|
+
var defaultToConfig2Keys = [
|
|
54707
|
+
"baseURL",
|
|
54708
|
+
"transformRequest",
|
|
54709
|
+
"transformResponse",
|
|
54710
|
+
"paramsSerializer",
|
|
54711
|
+
"timeout",
|
|
54712
|
+
"timeoutMessage",
|
|
54713
|
+
"withCredentials",
|
|
54714
|
+
"adapter",
|
|
54715
|
+
"responseType",
|
|
54716
|
+
"xsrfCookieName",
|
|
54717
|
+
"xsrfHeaderName",
|
|
54718
|
+
"onUploadProgress",
|
|
54719
|
+
"onDownloadProgress",
|
|
54720
|
+
"decompress",
|
|
54721
|
+
"maxContentLength",
|
|
54722
|
+
"maxBodyLength",
|
|
54723
|
+
"maxRedirects",
|
|
54724
|
+
"transport",
|
|
54725
|
+
"httpAgent",
|
|
54726
|
+
"httpsAgent",
|
|
54727
|
+
"cancelToken",
|
|
54728
|
+
"socketPath",
|
|
54729
|
+
"responseEncoding"
|
|
54730
|
+
];
|
|
54731
|
+
var directMergeKeys = ["validateStatus"];
|
|
54732
|
+
function getMergedValue(target, source) {
|
|
54733
|
+
if (utils2.isPlainObject(target) && utils2.isPlainObject(source)) {
|
|
54734
|
+
return utils2.merge(target, source);
|
|
54735
|
+
} else if (utils2.isPlainObject(source)) {
|
|
54736
|
+
return utils2.merge({}, source);
|
|
54737
|
+
} else if (utils2.isArray(source)) {
|
|
54738
|
+
return source.slice();
|
|
55519
54739
|
}
|
|
55520
|
-
|
|
55521
|
-
|
|
54740
|
+
return source;
|
|
54741
|
+
}
|
|
54742
|
+
function mergeDeepProperties(prop) {
|
|
54743
|
+
if (!utils2.isUndefined(config2[prop])) {
|
|
54744
|
+
config3[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
54745
|
+
} else if (!utils2.isUndefined(config1[prop])) {
|
|
54746
|
+
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
55522
54747
|
}
|
|
55523
|
-
|
|
55524
|
-
|
|
54748
|
+
}
|
|
54749
|
+
utils2.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
|
54750
|
+
if (!utils2.isUndefined(config2[prop])) {
|
|
54751
|
+
config3[prop] = getMergedValue(void 0, config2[prop]);
|
|
55525
54752
|
}
|
|
55526
|
-
|
|
55527
|
-
|
|
55528
|
-
|
|
55529
|
-
|
|
55530
|
-
|
|
55531
|
-
|
|
55532
|
-
|
|
55533
|
-
request2 = null;
|
|
55534
|
-
});
|
|
54753
|
+
});
|
|
54754
|
+
utils2.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
54755
|
+
utils2.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
|
54756
|
+
if (!utils2.isUndefined(config2[prop])) {
|
|
54757
|
+
config3[prop] = getMergedValue(void 0, config2[prop]);
|
|
54758
|
+
} else if (!utils2.isUndefined(config1[prop])) {
|
|
54759
|
+
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
55535
54760
|
}
|
|
55536
|
-
|
|
55537
|
-
|
|
54761
|
+
});
|
|
54762
|
+
utils2.forEach(directMergeKeys, function merge2(prop) {
|
|
54763
|
+
if (prop in config2) {
|
|
54764
|
+
config3[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
54765
|
+
} else if (prop in config1) {
|
|
54766
|
+
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
55538
54767
|
}
|
|
55539
|
-
request2.send(requestData2);
|
|
55540
54768
|
});
|
|
54769
|
+
var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
|
|
54770
|
+
var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key2) {
|
|
54771
|
+
return axiosKeys.indexOf(key2) === -1;
|
|
54772
|
+
});
|
|
54773
|
+
utils2.forEach(otherKeys, mergeDeepProperties);
|
|
54774
|
+
return config3;
|
|
55541
54775
|
};
|
|
55542
|
-
return
|
|
54776
|
+
return mergeConfig;
|
|
55543
54777
|
}
|
|
55544
|
-
|
|
55545
|
-
|
|
55546
|
-
|
|
55547
|
-
|
|
55548
|
-
|
|
55549
|
-
|
|
55550
|
-
|
|
55551
|
-
|
|
55552
|
-
|
|
55553
|
-
|
|
55554
|
-
};
|
|
55555
|
-
function
|
|
55556
|
-
|
|
55557
|
-
|
|
54778
|
+
const version = "0.21.4";
|
|
54779
|
+
const require$$0 = {
|
|
54780
|
+
version
|
|
54781
|
+
};
|
|
54782
|
+
var validator;
|
|
54783
|
+
var hasRequiredValidator;
|
|
54784
|
+
function requireValidator() {
|
|
54785
|
+
if (hasRequiredValidator) return validator;
|
|
54786
|
+
hasRequiredValidator = 1;
|
|
54787
|
+
var pkg = require$$0;
|
|
54788
|
+
var validators = {};
|
|
54789
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
|
|
54790
|
+
validators[type] = function validator2(thing) {
|
|
54791
|
+
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
|
|
54792
|
+
};
|
|
54793
|
+
});
|
|
54794
|
+
var deprecatedWarnings = {};
|
|
54795
|
+
var currentVerArr = pkg.version.split(".");
|
|
54796
|
+
function isOlderVersion(version2, thanVersion) {
|
|
54797
|
+
var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
|
|
54798
|
+
var destVer = version2.split(".");
|
|
54799
|
+
for (var i = 0; i < 3; i++) {
|
|
54800
|
+
if (pkgVersionArr[i] > destVer[i]) {
|
|
54801
|
+
return true;
|
|
54802
|
+
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
54803
|
+
return false;
|
|
54804
|
+
}
|
|
55558
54805
|
}
|
|
54806
|
+
return false;
|
|
55559
54807
|
}
|
|
55560
|
-
function
|
|
55561
|
-
var
|
|
55562
|
-
|
|
55563
|
-
|
|
55564
|
-
} else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
|
|
55565
|
-
adapter = requireXhr();
|
|
54808
|
+
validators.transitional = function transitional(validator2, version2, message2) {
|
|
54809
|
+
var isDeprecated = version2 && isOlderVersion(version2);
|
|
54810
|
+
function formatMessage2(opt, desc) {
|
|
54811
|
+
return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message2 ? ". " + message2 : "");
|
|
55566
54812
|
}
|
|
55567
|
-
return
|
|
55568
|
-
|
|
55569
|
-
|
|
55570
|
-
|
|
55571
|
-
|
|
55572
|
-
|
|
55573
|
-
|
|
55574
|
-
|
|
55575
|
-
|
|
55576
|
-
|
|
55577
|
-
|
|
54813
|
+
return function(value, opt, opts) {
|
|
54814
|
+
if (validator2 === false) {
|
|
54815
|
+
throw new Error(formatMessage2(opt, " has been removed in " + version2));
|
|
54816
|
+
}
|
|
54817
|
+
if (isDeprecated && !deprecatedWarnings[opt]) {
|
|
54818
|
+
deprecatedWarnings[opt] = true;
|
|
54819
|
+
console.warn(
|
|
54820
|
+
formatMessage2(
|
|
54821
|
+
opt,
|
|
54822
|
+
" has been deprecated since v" + version2 + " and will be removed in the near future"
|
|
54823
|
+
)
|
|
54824
|
+
);
|
|
55578
54825
|
}
|
|
54826
|
+
return validator2 ? validator2(value, opt, opts) : true;
|
|
54827
|
+
};
|
|
54828
|
+
};
|
|
54829
|
+
function assertOptions(options, schema, allowUnknown) {
|
|
54830
|
+
if (typeof options !== "object") {
|
|
54831
|
+
throw new TypeError("options must be an object");
|
|
55579
54832
|
}
|
|
55580
|
-
|
|
55581
|
-
|
|
55582
|
-
|
|
55583
|
-
|
|
55584
|
-
|
|
55585
|
-
|
|
55586
|
-
|
|
55587
|
-
|
|
55588
|
-
|
|
55589
|
-
|
|
55590
|
-
|
|
55591
|
-
|
|
55592
|
-
if (utils2.isFormData(data2) || utils2.isArrayBuffer(data2) || utils2.isBuffer(data2) || utils2.isStream(data2) || utils2.isFile(data2) || utils2.isBlob(data2)) {
|
|
55593
|
-
return data2;
|
|
54833
|
+
var keys2 = Object.keys(options);
|
|
54834
|
+
var i = keys2.length;
|
|
54835
|
+
while (i-- > 0) {
|
|
54836
|
+
var opt = keys2[i];
|
|
54837
|
+
var validator2 = schema[opt];
|
|
54838
|
+
if (validator2) {
|
|
54839
|
+
var value = options[opt];
|
|
54840
|
+
var result = value === void 0 || validator2(value, opt, options);
|
|
54841
|
+
if (result !== true) {
|
|
54842
|
+
throw new TypeError("option " + opt + " must be " + result);
|
|
54843
|
+
}
|
|
54844
|
+
continue;
|
|
55594
54845
|
}
|
|
55595
|
-
if (
|
|
55596
|
-
|
|
54846
|
+
if (allowUnknown !== true) {
|
|
54847
|
+
throw Error("Unknown option " + opt);
|
|
55597
54848
|
}
|
|
55598
|
-
|
|
55599
|
-
|
|
55600
|
-
|
|
54849
|
+
}
|
|
54850
|
+
}
|
|
54851
|
+
validator = {
|
|
54852
|
+
isOlderVersion,
|
|
54853
|
+
assertOptions,
|
|
54854
|
+
validators
|
|
54855
|
+
};
|
|
54856
|
+
return validator;
|
|
54857
|
+
}
|
|
54858
|
+
var Axios_1;
|
|
54859
|
+
var hasRequiredAxios$2;
|
|
54860
|
+
function requireAxios$2() {
|
|
54861
|
+
if (hasRequiredAxios$2) return Axios_1;
|
|
54862
|
+
hasRequiredAxios$2 = 1;
|
|
54863
|
+
var utils2 = requireUtils();
|
|
54864
|
+
var buildURL2 = requireBuildURL();
|
|
54865
|
+
var InterceptorManager = requireInterceptorManager();
|
|
54866
|
+
var dispatchRequest2 = requireDispatchRequest();
|
|
54867
|
+
var mergeConfig2 = requireMergeConfig();
|
|
54868
|
+
var validator2 = requireValidator();
|
|
54869
|
+
var validators = validator2.validators;
|
|
54870
|
+
function Axios(instanceConfig) {
|
|
54871
|
+
this.defaults = instanceConfig;
|
|
54872
|
+
this.interceptors = {
|
|
54873
|
+
request: new InterceptorManager(),
|
|
54874
|
+
response: new InterceptorManager()
|
|
54875
|
+
};
|
|
54876
|
+
}
|
|
54877
|
+
Axios.prototype.request = function request2(config2) {
|
|
54878
|
+
if (typeof config2 === "string") {
|
|
54879
|
+
config2 = arguments[1] || {};
|
|
54880
|
+
config2.url = arguments[0];
|
|
54881
|
+
} else {
|
|
54882
|
+
config2 = config2 || {};
|
|
54883
|
+
}
|
|
54884
|
+
config2 = mergeConfig2(this.defaults, config2);
|
|
54885
|
+
if (config2.method) {
|
|
54886
|
+
config2.method = config2.method.toLowerCase();
|
|
54887
|
+
} else if (this.defaults.method) {
|
|
54888
|
+
config2.method = this.defaults.method.toLowerCase();
|
|
54889
|
+
} else {
|
|
54890
|
+
config2.method = "get";
|
|
54891
|
+
}
|
|
54892
|
+
var transitional = config2.transitional;
|
|
54893
|
+
if (transitional !== void 0) {
|
|
54894
|
+
validator2.assertOptions(transitional, {
|
|
54895
|
+
silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
|
|
54896
|
+
forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
|
|
54897
|
+
clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
|
|
54898
|
+
}, false);
|
|
54899
|
+
}
|
|
54900
|
+
var requestInterceptorChain = [];
|
|
54901
|
+
var synchronousRequestInterceptors = true;
|
|
54902
|
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
54903
|
+
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
|
|
54904
|
+
return;
|
|
55601
54905
|
}
|
|
55602
|
-
|
|
55603
|
-
|
|
55604
|
-
|
|
54906
|
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
54907
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
54908
|
+
});
|
|
54909
|
+
var responseInterceptorChain = [];
|
|
54910
|
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
54911
|
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
54912
|
+
});
|
|
54913
|
+
var promise;
|
|
54914
|
+
if (!synchronousRequestInterceptors) {
|
|
54915
|
+
var chain = [dispatchRequest2, void 0];
|
|
54916
|
+
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
|
54917
|
+
chain = chain.concat(responseInterceptorChain);
|
|
54918
|
+
promise = Promise.resolve(config2);
|
|
54919
|
+
while (chain.length) {
|
|
54920
|
+
promise = promise.then(chain.shift(), chain.shift());
|
|
55605
54921
|
}
|
|
55606
|
-
return
|
|
55607
|
-
}
|
|
55608
|
-
|
|
55609
|
-
|
|
55610
|
-
var
|
|
55611
|
-
var
|
|
55612
|
-
|
|
55613
|
-
|
|
55614
|
-
|
|
55615
|
-
|
|
55616
|
-
|
|
55617
|
-
if (strictJSONParsing) {
|
|
55618
|
-
if (e.name === "SyntaxError") {
|
|
55619
|
-
throw enhanceError2(e, this, "E_JSON_PARSE");
|
|
55620
|
-
}
|
|
55621
|
-
throw e;
|
|
55622
|
-
}
|
|
55623
|
-
}
|
|
54922
|
+
return promise;
|
|
54923
|
+
}
|
|
54924
|
+
var newConfig = config2;
|
|
54925
|
+
while (requestInterceptorChain.length) {
|
|
54926
|
+
var onFulfilled = requestInterceptorChain.shift();
|
|
54927
|
+
var onRejected = requestInterceptorChain.shift();
|
|
54928
|
+
try {
|
|
54929
|
+
newConfig = onFulfilled(newConfig);
|
|
54930
|
+
} catch (error) {
|
|
54931
|
+
onRejected(error);
|
|
54932
|
+
break;
|
|
55624
54933
|
}
|
|
55625
|
-
return data2;
|
|
55626
|
-
}],
|
|
55627
|
-
/**
|
|
55628
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
55629
|
-
* timeout is not created.
|
|
55630
|
-
*/
|
|
55631
|
-
timeout: 0,
|
|
55632
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
55633
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
55634
|
-
maxContentLength: -1,
|
|
55635
|
-
maxBodyLength: -1,
|
|
55636
|
-
validateStatus: function validateStatus(status) {
|
|
55637
|
-
return status >= 200 && status < 300;
|
|
55638
54934
|
}
|
|
55639
|
-
|
|
55640
|
-
|
|
55641
|
-
|
|
55642
|
-
|
|
54935
|
+
try {
|
|
54936
|
+
promise = dispatchRequest2(newConfig);
|
|
54937
|
+
} catch (error) {
|
|
54938
|
+
return Promise.reject(error);
|
|
54939
|
+
}
|
|
54940
|
+
while (responseInterceptorChain.length) {
|
|
54941
|
+
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
|
|
55643
54942
|
}
|
|
54943
|
+
return promise;
|
|
55644
54944
|
};
|
|
55645
|
-
|
|
55646
|
-
|
|
54945
|
+
Axios.prototype.getUri = function getUri(config2) {
|
|
54946
|
+
config2 = mergeConfig2(this.defaults, config2);
|
|
54947
|
+
return buildURL2(config2.url, config2.params, config2.paramsSerializer).replace(/^\?/, "");
|
|
54948
|
+
};
|
|
54949
|
+
utils2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
54950
|
+
Axios.prototype[method] = function(url2, config2) {
|
|
54951
|
+
return this.request(mergeConfig2(config2 || {}, {
|
|
54952
|
+
method,
|
|
54953
|
+
url: url2,
|
|
54954
|
+
data: (config2 || {}).data
|
|
54955
|
+
}));
|
|
54956
|
+
};
|
|
55647
54957
|
});
|
|
55648
54958
|
utils2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
55649
|
-
|
|
54959
|
+
Axios.prototype[method] = function(url2, data2, config2) {
|
|
54960
|
+
return this.request(mergeConfig2(config2 || {}, {
|
|
54961
|
+
method,
|
|
54962
|
+
url: url2,
|
|
54963
|
+
data: data2
|
|
54964
|
+
}));
|
|
54965
|
+
};
|
|
55650
54966
|
});
|
|
55651
|
-
|
|
55652
|
-
return
|
|
55653
|
-
}
|
|
55654
|
-
var transformData;
|
|
55655
|
-
var hasRequiredTransformData;
|
|
55656
|
-
function requireTransformData() {
|
|
55657
|
-
if (hasRequiredTransformData) return transformData;
|
|
55658
|
-
hasRequiredTransformData = 1;
|
|
55659
|
-
var utils2 = requireUtils();
|
|
55660
|
-
var defaults2 = requireDefaults();
|
|
55661
|
-
transformData = function transformData2(data2, headers, fns) {
|
|
55662
|
-
var context = this || defaults2;
|
|
55663
|
-
utils2.forEach(fns, function transform2(fn) {
|
|
55664
|
-
data2 = fn.call(context, data2, headers);
|
|
55665
|
-
});
|
|
55666
|
-
return data2;
|
|
55667
|
-
};
|
|
55668
|
-
return transformData;
|
|
54967
|
+
Axios_1 = Axios;
|
|
54968
|
+
return Axios_1;
|
|
55669
54969
|
}
|
|
55670
|
-
var
|
|
55671
|
-
var
|
|
55672
|
-
function
|
|
55673
|
-
if (
|
|
55674
|
-
|
|
55675
|
-
|
|
55676
|
-
|
|
54970
|
+
var Cancel_1;
|
|
54971
|
+
var hasRequiredCancel;
|
|
54972
|
+
function requireCancel() {
|
|
54973
|
+
if (hasRequiredCancel) return Cancel_1;
|
|
54974
|
+
hasRequiredCancel = 1;
|
|
54975
|
+
function Cancel(message2) {
|
|
54976
|
+
this.message = message2;
|
|
54977
|
+
}
|
|
54978
|
+
Cancel.prototype.toString = function toString2() {
|
|
54979
|
+
return "Cancel" + (this.message ? ": " + this.message : "");
|
|
55677
54980
|
};
|
|
55678
|
-
|
|
54981
|
+
Cancel.prototype.__CANCEL__ = true;
|
|
54982
|
+
Cancel_1 = Cancel;
|
|
54983
|
+
return Cancel_1;
|
|
55679
54984
|
}
|
|
55680
|
-
var
|
|
55681
|
-
var
|
|
55682
|
-
function
|
|
55683
|
-
if (
|
|
55684
|
-
|
|
55685
|
-
var
|
|
55686
|
-
|
|
55687
|
-
|
|
55688
|
-
|
|
55689
|
-
function throwIfCancellationRequested(config2) {
|
|
55690
|
-
if (config2.cancelToken) {
|
|
55691
|
-
config2.cancelToken.throwIfRequested();
|
|
54985
|
+
var CancelToken_1;
|
|
54986
|
+
var hasRequiredCancelToken;
|
|
54987
|
+
function requireCancelToken() {
|
|
54988
|
+
if (hasRequiredCancelToken) return CancelToken_1;
|
|
54989
|
+
hasRequiredCancelToken = 1;
|
|
54990
|
+
var Cancel = requireCancel();
|
|
54991
|
+
function CancelToken(executor) {
|
|
54992
|
+
if (typeof executor !== "function") {
|
|
54993
|
+
throw new TypeError("executor must be a function.");
|
|
55692
54994
|
}
|
|
54995
|
+
var resolvePromise;
|
|
54996
|
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
54997
|
+
resolvePromise = resolve;
|
|
54998
|
+
});
|
|
54999
|
+
var token = this;
|
|
55000
|
+
executor(function cancel(message2) {
|
|
55001
|
+
if (token.reason) {
|
|
55002
|
+
return;
|
|
55003
|
+
}
|
|
55004
|
+
token.reason = new Cancel(message2);
|
|
55005
|
+
resolvePromise(token.reason);
|
|
55006
|
+
});
|
|
55693
55007
|
}
|
|
55694
|
-
|
|
55695
|
-
|
|
55696
|
-
|
|
55697
|
-
|
|
55698
|
-
|
|
55699
|
-
|
|
55700
|
-
|
|
55701
|
-
|
|
55702
|
-
|
|
55703
|
-
|
|
55704
|
-
|
|
55705
|
-
|
|
55706
|
-
|
|
55707
|
-
|
|
55708
|
-
|
|
55709
|
-
|
|
55710
|
-
|
|
55711
|
-
|
|
55008
|
+
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
55009
|
+
if (this.reason) {
|
|
55010
|
+
throw this.reason;
|
|
55011
|
+
}
|
|
55012
|
+
};
|
|
55013
|
+
CancelToken.source = function source() {
|
|
55014
|
+
var cancel;
|
|
55015
|
+
var token = new CancelToken(function executor(c) {
|
|
55016
|
+
cancel = c;
|
|
55017
|
+
});
|
|
55018
|
+
return {
|
|
55019
|
+
token,
|
|
55020
|
+
cancel
|
|
55021
|
+
};
|
|
55022
|
+
};
|
|
55023
|
+
CancelToken_1 = CancelToken;
|
|
55024
|
+
return CancelToken_1;
|
|
55025
|
+
}
|
|
55026
|
+
var spread;
|
|
55027
|
+
var hasRequiredSpread;
|
|
55028
|
+
function requireSpread() {
|
|
55029
|
+
if (hasRequiredSpread) return spread;
|
|
55030
|
+
hasRequiredSpread = 1;
|
|
55031
|
+
spread = function spread2(callback) {
|
|
55032
|
+
return function wrap(arr2) {
|
|
55033
|
+
return callback.apply(null, arr2);
|
|
55034
|
+
};
|
|
55035
|
+
};
|
|
55036
|
+
return spread;
|
|
55037
|
+
}
|
|
55038
|
+
var isAxiosError;
|
|
55039
|
+
var hasRequiredIsAxiosError;
|
|
55040
|
+
function requireIsAxiosError() {
|
|
55041
|
+
if (hasRequiredIsAxiosError) return isAxiosError;
|
|
55042
|
+
hasRequiredIsAxiosError = 1;
|
|
55043
|
+
isAxiosError = function isAxiosError2(payload) {
|
|
55044
|
+
return typeof payload === "object" && payload.isAxiosError === true;
|
|
55045
|
+
};
|
|
55046
|
+
return isAxiosError;
|
|
55047
|
+
}
|
|
55048
|
+
var hasRequiredAxios$1;
|
|
55049
|
+
function requireAxios$1() {
|
|
55050
|
+
if (hasRequiredAxios$1) return axios$2.exports;
|
|
55051
|
+
hasRequiredAxios$1 = 1;
|
|
55052
|
+
var utils2 = requireUtils();
|
|
55053
|
+
var bind2 = requireBind();
|
|
55054
|
+
var Axios = requireAxios$2();
|
|
55055
|
+
var mergeConfig2 = requireMergeConfig();
|
|
55056
|
+
var defaults2 = requireDefaults();
|
|
55057
|
+
function createInstance(defaultConfig) {
|
|
55058
|
+
var context = new Axios(defaultConfig);
|
|
55059
|
+
var instance2 = bind2(Axios.prototype.request, context);
|
|
55060
|
+
utils2.extend(instance2, Axios.prototype, context);
|
|
55061
|
+
utils2.extend(instance2, context);
|
|
55062
|
+
return instance2;
|
|
55063
|
+
}
|
|
55064
|
+
var axios2 = createInstance(defaults2);
|
|
55065
|
+
axios2.Axios = Axios;
|
|
55066
|
+
axios2.create = function create(instanceConfig) {
|
|
55067
|
+
return createInstance(mergeConfig2(axios2.defaults, instanceConfig));
|
|
55068
|
+
};
|
|
55069
|
+
axios2.Cancel = requireCancel();
|
|
55070
|
+
axios2.CancelToken = requireCancelToken();
|
|
55071
|
+
axios2.isCancel = requireIsCancel();
|
|
55072
|
+
axios2.all = function all(promises) {
|
|
55073
|
+
return Promise.all(promises);
|
|
55074
|
+
};
|
|
55075
|
+
axios2.spread = requireSpread();
|
|
55076
|
+
axios2.isAxiosError = requireIsAxiosError();
|
|
55077
|
+
axios$2.exports = axios2;
|
|
55078
|
+
axios$2.exports.default = axios2;
|
|
55079
|
+
return axios$2.exports;
|
|
55080
|
+
}
|
|
55081
|
+
var axios$1;
|
|
55082
|
+
var hasRequiredAxios;
|
|
55083
|
+
function requireAxios() {
|
|
55084
|
+
if (hasRequiredAxios) return axios$1;
|
|
55085
|
+
hasRequiredAxios = 1;
|
|
55086
|
+
axios$1 = requireAxios$1();
|
|
55087
|
+
return axios$1;
|
|
55088
|
+
}
|
|
55089
|
+
var axiosExports = requireAxios();
|
|
55090
|
+
const axios = /* @__PURE__ */ getDefaultExportFromCjs(axiosExports);
|
|
55091
|
+
const AppView = () => {
|
|
55092
|
+
const { appId } = useParams();
|
|
55093
|
+
const navigate = useNavigate();
|
|
55094
|
+
reactExports.useEffect(() => {
|
|
55095
|
+
const fetchData = async () => {
|
|
55096
|
+
var _a2, _b2;
|
|
55097
|
+
try {
|
|
55098
|
+
const response = await axios.get(
|
|
55099
|
+
`/service/api/apps/${appId}/menus`
|
|
55100
|
+
);
|
|
55101
|
+
const data2 = response.data;
|
|
55102
|
+
if ((data2 == null ? void 0 : data2.children.length) > 0 && data2.children[0].path) {
|
|
55103
|
+
const children = _.sortBy(data2.children, ["index"]);
|
|
55104
|
+
navigate(children[0].path);
|
|
55105
|
+
}
|
|
55106
|
+
} catch (error) {
|
|
55107
|
+
console.error("Error fetching data:", error);
|
|
55108
|
+
if (axios.isAxiosError(error)) {
|
|
55109
|
+
console.error("Axios error details:", {
|
|
55110
|
+
message: error.message,
|
|
55111
|
+
code: error.code,
|
|
55112
|
+
status: (_a2 = error.response) == null ? void 0 : _a2.status,
|
|
55113
|
+
data: (_b2 = error.response) == null ? void 0 : _b2.data
|
|
55114
|
+
});
|
|
55115
|
+
}
|
|
55712
55116
|
}
|
|
55713
|
-
|
|
55714
|
-
|
|
55715
|
-
|
|
55716
|
-
|
|
55717
|
-
|
|
55718
|
-
|
|
55719
|
-
|
|
55720
|
-
|
|
55721
|
-
|
|
55722
|
-
|
|
55723
|
-
|
|
55724
|
-
|
|
55725
|
-
|
|
55726
|
-
|
|
55727
|
-
|
|
55728
|
-
|
|
55729
|
-
|
|
55730
|
-
|
|
55731
|
-
|
|
55732
|
-
|
|
55117
|
+
};
|
|
55118
|
+
if (appId) {
|
|
55119
|
+
fetchData();
|
|
55120
|
+
}
|
|
55121
|
+
}, [appId, navigate]);
|
|
55122
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {});
|
|
55123
|
+
};
|
|
55124
|
+
const AppHeader = () => {
|
|
55125
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
55126
|
+
const params = useParams();
|
|
55127
|
+
let { appId = null, objectName } = params;
|
|
55128
|
+
if (!appId) {
|
|
55129
|
+
document.body.classList.remove("sidebar-open");
|
|
55130
|
+
}
|
|
55131
|
+
const isMobile = window.innerWidth < 1024;
|
|
55132
|
+
let logoSrc = `/images/logo_platform.png`;
|
|
55133
|
+
if ((_d = (_c = (_b2 = (_a2 = Builder$1.settings) == null ? void 0 : _a2.context) == null ? void 0 : _b2.user) == null ? void 0 : _c.space) == null ? void 0 : _d.avatar) {
|
|
55134
|
+
logoSrc = "/api/v6/files/cfs.avatars.filerecord/" + Builder$1.settings.context.user.space.avatar;
|
|
55135
|
+
}
|
|
55136
|
+
const faviconLink = document.querySelector('link[rel*="icon"], link[rel*="shortcut"]');
|
|
55137
|
+
let favicon = "/favicons/favicon.ico";
|
|
55138
|
+
if ((_h = (_g = (_f = (_e = Builder$1.settings) == null ? void 0 : _e.context) == null ? void 0 : _f.user) == null ? void 0 : _g.space) == null ? void 0 : _h.favicon) {
|
|
55139
|
+
favicon = "/api/v6/files/cfs.avatars.filerecord/" + Builder$1.settings.context.user.space.favicon;
|
|
55140
|
+
}
|
|
55141
|
+
if (faviconLink) {
|
|
55142
|
+
faviconLink.href = favicon;
|
|
55143
|
+
} else {
|
|
55144
|
+
const newFaviconLink = document.createElement("link");
|
|
55145
|
+
newFaviconLink.rel = "icon";
|
|
55146
|
+
newFaviconLink.href = favicon;
|
|
55147
|
+
document.head.appendChild(newFaviconLink);
|
|
55148
|
+
}
|
|
55149
|
+
const schema = {
|
|
55150
|
+
"type": "service",
|
|
55151
|
+
name: "globalHeader",
|
|
55152
|
+
body: [
|
|
55153
|
+
{
|
|
55154
|
+
"type": "steedos-global-header",
|
|
55155
|
+
"logoSrc": logoSrc,
|
|
55156
|
+
"customButtons": [
|
|
55157
|
+
{
|
|
55158
|
+
"type": "steedos-app-launcher",
|
|
55159
|
+
"showAppName": false,
|
|
55160
|
+
"appId": "${app.id}",
|
|
55161
|
+
"visibleOn": "${isMobile}"
|
|
55162
|
+
}
|
|
55163
|
+
]
|
|
55164
|
+
}
|
|
55165
|
+
],
|
|
55166
|
+
"api": {
|
|
55167
|
+
"method": "get",
|
|
55168
|
+
"cache": "10000",
|
|
55169
|
+
"url": "/service/api/apps/${appId}/menus?mobile=" + isMobile,
|
|
55170
|
+
"sendOn": "!!appId",
|
|
55171
|
+
"headers": {
|
|
55172
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
55173
|
+
},
|
|
55174
|
+
"adaptor": `
|
|
55175
|
+
const app = payload;
|
|
55176
|
+
if (app.showSidebar){
|
|
55177
|
+
document.body.classList.add('sidebar')
|
|
55178
|
+
} else {
|
|
55179
|
+
document.body.classList.remove("sidebar")
|
|
55180
|
+
}
|
|
55181
|
+
|
|
55182
|
+
if (window.innerWidth >= 768) {
|
|
55183
|
+
document.body.classList.add('sidebar-open')
|
|
55184
|
+
}
|
|
55185
|
+
|
|
55186
|
+
return {
|
|
55187
|
+
app: app
|
|
55188
|
+
}
|
|
55189
|
+
`,
|
|
55190
|
+
"messages": {}
|
|
55191
|
+
}
|
|
55192
|
+
};
|
|
55193
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "header", className: "steedos-global-header-root flex-none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema, data: {
|
|
55194
|
+
context: {
|
|
55195
|
+
...Builder$1.settings.context,
|
|
55196
|
+
appId,
|
|
55197
|
+
showSidebar: true,
|
|
55198
|
+
stacked: true
|
|
55199
|
+
},
|
|
55200
|
+
appId,
|
|
55201
|
+
showSidebar: true,
|
|
55202
|
+
stacked: true
|
|
55203
|
+
}, env: {} }) });
|
|
55204
|
+
};
|
|
55205
|
+
const GlobalLinkInterceptor = () => {
|
|
55206
|
+
const navigate = useNavigate();
|
|
55207
|
+
reactExports.useEffect(() => {
|
|
55208
|
+
const handleClick = (event2) => {
|
|
55209
|
+
const target = event2.target.closest("a");
|
|
55210
|
+
if (target) {
|
|
55211
|
+
const href = target.getAttribute("href");
|
|
55212
|
+
const targetAttr = target.getAttribute("target");
|
|
55213
|
+
const onclick = target.getAttribute("onclick");
|
|
55214
|
+
if (onclick == "return false;") {
|
|
55215
|
+
return;
|
|
55216
|
+
}
|
|
55217
|
+
const isInternal = href && href.startsWith("/");
|
|
55218
|
+
if (isInternal && targetAttr !== "_blank") {
|
|
55219
|
+
event2.preventDefault();
|
|
55220
|
+
navigate(href);
|
|
55221
|
+
}
|
|
55222
|
+
}
|
|
55223
|
+
};
|
|
55224
|
+
document.addEventListener("click", handleClick);
|
|
55225
|
+
return () => {
|
|
55226
|
+
document.removeEventListener("click", handleClick);
|
|
55227
|
+
};
|
|
55228
|
+
}, [navigate]);
|
|
55229
|
+
return null;
|
|
55230
|
+
};
|
|
55231
|
+
const AppLayout = (props) => {
|
|
55232
|
+
const { children } = props;
|
|
55233
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
55234
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(GlobalLinkInterceptor, {}),
|
|
55235
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AppHeader, {}),
|
|
55236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "creator-content-wrapper", id: "main", children })
|
|
55237
|
+
] });
|
|
55238
|
+
};
|
|
55239
|
+
const ObjectListView = () => {
|
|
55240
|
+
var _a2;
|
|
55241
|
+
let { appId, objectName, listviewId: listName } = useParams();
|
|
55242
|
+
const uiSchema = window.getUISchemaSync(objectName);
|
|
55243
|
+
if (!listName) {
|
|
55244
|
+
listName = (_a2 = lodashExports.first(lodashExports.values(uiSchema.list_views))) == null ? void 0 : _a2.name;
|
|
55245
|
+
}
|
|
55246
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
55247
|
+
type: "page",
|
|
55248
|
+
bodyClassName: "p-0",
|
|
55249
|
+
body: {
|
|
55250
|
+
"type": "steedos-page-object-control",
|
|
55251
|
+
"name": "steedosPageObjectControl",
|
|
55252
|
+
"data": {
|
|
55253
|
+
objectName,
|
|
55254
|
+
object_name: objectName,
|
|
55255
|
+
pageType: "list",
|
|
55256
|
+
listName: listName || "",
|
|
55257
|
+
display: Steedos.Page.getDisplay(objectName)
|
|
55258
|
+
}
|
|
55259
|
+
},
|
|
55260
|
+
data: {
|
|
55261
|
+
objectName,
|
|
55262
|
+
object_name: objectName,
|
|
55263
|
+
pageType: "list",
|
|
55264
|
+
listName: listName || ""
|
|
55265
|
+
}
|
|
55266
|
+
}, data: {
|
|
55267
|
+
context: {
|
|
55268
|
+
app: appId,
|
|
55269
|
+
appId,
|
|
55270
|
+
app_id: appId,
|
|
55271
|
+
listName: listName || "",
|
|
55272
|
+
...Builder$1.settings.context
|
|
55273
|
+
},
|
|
55274
|
+
app: appId,
|
|
55275
|
+
appId,
|
|
55276
|
+
app_id: appId,
|
|
55277
|
+
listName: listName || "",
|
|
55278
|
+
objectName,
|
|
55279
|
+
object_name: objectName
|
|
55280
|
+
}, env: {} });
|
|
55281
|
+
};
|
|
55282
|
+
const ObjectDetail = () => {
|
|
55283
|
+
const { appId, objectName, recordId } = useParams();
|
|
55284
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
55285
|
+
type: "page",
|
|
55286
|
+
bodyClassName: "p-0",
|
|
55287
|
+
body: {
|
|
55288
|
+
"type": "steedos-page-object-control",
|
|
55289
|
+
"name": "steedosPageObjectControl",
|
|
55290
|
+
"data": {
|
|
55291
|
+
objectName,
|
|
55292
|
+
object_name: objectName,
|
|
55293
|
+
pageType: "record",
|
|
55294
|
+
recordId,
|
|
55295
|
+
display: Steedos.Page.getDisplay(objectName)
|
|
55296
|
+
}
|
|
55297
|
+
},
|
|
55298
|
+
data: {
|
|
55299
|
+
objectName,
|
|
55300
|
+
object_name: objectName,
|
|
55301
|
+
pageType: "record",
|
|
55302
|
+
recordId
|
|
55303
|
+
}
|
|
55304
|
+
}, data: {
|
|
55305
|
+
context: {
|
|
55306
|
+
app: appId,
|
|
55307
|
+
appId,
|
|
55308
|
+
app_id: appId,
|
|
55309
|
+
...Builder$1.settings.context
|
|
55310
|
+
},
|
|
55311
|
+
app: appId,
|
|
55312
|
+
appId,
|
|
55313
|
+
app_id: appId
|
|
55314
|
+
}, env: {} });
|
|
55315
|
+
};
|
|
55316
|
+
const PageView = () => {
|
|
55317
|
+
const { appId, pageId } = useParams();
|
|
55318
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
55319
|
+
type: "service",
|
|
55320
|
+
schemaApi: {
|
|
55321
|
+
"method": "get",
|
|
55322
|
+
"url": "/api/pageSchema/app?app=${appId}&pageId=${pageId}&formFactor=${formFactor}",
|
|
55323
|
+
"adaptor": `
|
|
55324
|
+
return {
|
|
55325
|
+
"data": _.isString(payload.schema) ? JSON.parse(payload.schema):payload.schema
|
|
55326
|
+
}
|
|
55327
|
+
`
|
|
55328
|
+
}
|
|
55329
|
+
}, data: {
|
|
55330
|
+
context: {
|
|
55331
|
+
app: appId,
|
|
55332
|
+
appId,
|
|
55333
|
+
app_id: appId,
|
|
55334
|
+
...Builder$1.settings.context
|
|
55335
|
+
},
|
|
55336
|
+
app: appId,
|
|
55337
|
+
appId,
|
|
55338
|
+
app_id: appId,
|
|
55339
|
+
pageId
|
|
55340
|
+
}, env: {} });
|
|
55341
|
+
};
|
|
55342
|
+
const IframeView = () => {
|
|
55343
|
+
const { appId, tabId } = useParams();
|
|
55344
|
+
const [searchParams] = useSearchParams();
|
|
55345
|
+
const iframeSrc = searchParams.get("url");
|
|
55346
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
55347
|
+
"type": "page",
|
|
55348
|
+
"body": {
|
|
55349
|
+
"type": "iframe",
|
|
55350
|
+
"src": iframeSrc,
|
|
55351
|
+
"height": "100%",
|
|
55352
|
+
"width": "100%"
|
|
55353
|
+
}
|
|
55354
|
+
}, data: {
|
|
55355
|
+
context: {
|
|
55356
|
+
app: appId,
|
|
55357
|
+
appId,
|
|
55358
|
+
app_id: appId,
|
|
55359
|
+
...Builder$1.settings.context
|
|
55360
|
+
},
|
|
55361
|
+
app: appId,
|
|
55362
|
+
appId,
|
|
55363
|
+
app_id: appId,
|
|
55364
|
+
tabId
|
|
55365
|
+
}, env: {} });
|
|
55366
|
+
};
|
|
55367
|
+
const ObjectRelatedListView = () => {
|
|
55368
|
+
const location2 = useLocation();
|
|
55369
|
+
const queryParams = new URLSearchParams(location2.search);
|
|
55370
|
+
const relatedKey = queryParams.get("related_field_name");
|
|
55371
|
+
const { appId, objectName, listviewId: listName, recordId, relatedObjectName } = useParams();
|
|
55372
|
+
const mainUiSchema = window.getUISchemaSync(objectName);
|
|
55373
|
+
const idFieldName = mainUiSchema.idFieldName;
|
|
55374
|
+
const uiSchema = window.getUISchemaSync(relatedObjectName);
|
|
55375
|
+
const relatedKeyRefToField = uiSchema.fields[relatedKey].reference_to_field || idFieldName || "_id";
|
|
55376
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
|
|
55377
|
+
type: "service",
|
|
55378
|
+
name: `amis-${appId}-${objectName}-related-${relatedObjectName}`,
|
|
55379
|
+
api: {
|
|
55380
|
+
method: "post",
|
|
55381
|
+
url: `/graphql`,
|
|
55382
|
+
requestAdaptor: `
|
|
55383
|
+
api.data = {
|
|
55384
|
+
query: \`{
|
|
55385
|
+
data: ${objectName}(filters:["${idFieldName}", "=", "${recordId}"]){
|
|
55386
|
+
${idFieldName === relatedKeyRefToField ? idFieldName : idFieldName + "," + relatedKeyRefToField},
|
|
55387
|
+
${mainUiSchema.NAME_FIELD_KEY},
|
|
55388
|
+
locked,
|
|
55389
|
+
recordPermissions: _permissions{
|
|
55390
|
+
allowCreate,
|
|
55391
|
+
allowCreateFiles,
|
|
55392
|
+
allowDelete,
|
|
55393
|
+
allowDeleteFiles,
|
|
55394
|
+
allowEdit,
|
|
55395
|
+
allowEditFiles,
|
|
55396
|
+
allowRead,
|
|
55397
|
+
allowReadFiles,
|
|
55398
|
+
disabled_actions,
|
|
55399
|
+
disabled_list_views,
|
|
55400
|
+
field_permissions,
|
|
55401
|
+
modifyAllFiles,
|
|
55402
|
+
modifyAllRecords,
|
|
55403
|
+
modifyAssignCompanysRecords,
|
|
55404
|
+
modifyCompanyRecords,
|
|
55405
|
+
uneditable_fields,
|
|
55406
|
+
unreadable_fields,
|
|
55407
|
+
unrelated_objects,
|
|
55408
|
+
viewAllFiles,
|
|
55409
|
+
viewAllRecords,
|
|
55410
|
+
viewAssignCompanysRecords,
|
|
55411
|
+
viewCompanyRecords,
|
|
55412
|
+
}
|
|
55413
|
+
}
|
|
55414
|
+
}\`
|
|
55415
|
+
}
|
|
55416
|
+
return api;
|
|
55417
|
+
`,
|
|
55418
|
+
adaptor: `
|
|
55419
|
+
if(payload.data.data){
|
|
55420
|
+
var data = payload.data.data[0];
|
|
55421
|
+
payload.data = data;
|
|
55422
|
+
payload.data._master = {
|
|
55423
|
+
objectName: "${objectName}",
|
|
55424
|
+
recordId: data["${idFieldName}"],
|
|
55425
|
+
record: {
|
|
55426
|
+
"${idFieldName}": data["${idFieldName}"],
|
|
55427
|
+
"${mainUiSchema.NAME_FIELD_KEY}": data["${mainUiSchema.NAME_FIELD_KEY}"],
|
|
55428
|
+
"${relatedKeyRefToField}": data["${relatedKeyRefToField}"],
|
|
55429
|
+
"locked": data.locked
|
|
55430
|
+
}
|
|
55431
|
+
};
|
|
55432
|
+
}
|
|
55433
|
+
payload.data.$breadcrumb = [
|
|
55434
|
+
{
|
|
55435
|
+
"label": "${mainUiSchema.label}",
|
|
55436
|
+
"href": "/app/${appId}/${objectName}"
|
|
55437
|
+
},
|
|
55438
|
+
{
|
|
55439
|
+
"label": payload.data.${mainUiSchema.NAME_FIELD_KEY},
|
|
55440
|
+
"href": "/app/${appId}/${objectName}/view/${recordId}",
|
|
55441
|
+
},
|
|
55442
|
+
{
|
|
55443
|
+
"label": "相关 ${uiSchema.label}"
|
|
55444
|
+
},
|
|
55445
|
+
]
|
|
55446
|
+
payload.data.$loaded = true;
|
|
55447
|
+
return payload;
|
|
55448
|
+
`,
|
|
55449
|
+
headers: {
|
|
55450
|
+
Authorization: "Bearer ${context.tenantId},${context.authToken}"
|
|
55451
|
+
}
|
|
55452
|
+
},
|
|
55453
|
+
"data": {
|
|
55454
|
+
"&": "$$",
|
|
55455
|
+
"$breadcrumb": []
|
|
55456
|
+
//先给一个空数组, 防止breadcrumb组件报错
|
|
55457
|
+
},
|
|
55458
|
+
body: [
|
|
55459
|
+
{
|
|
55460
|
+
"type": "breadcrumb",
|
|
55461
|
+
"source": "${$breadcrumb}",
|
|
55462
|
+
"className": "mx-4 my-2"
|
|
55463
|
+
},
|
|
55464
|
+
{
|
|
55465
|
+
type: "steedos-object-related-listview",
|
|
55466
|
+
objectApiName: mainUiSchema.name,
|
|
55467
|
+
recordId,
|
|
55468
|
+
relatedObjectApiName: relatedObjectName,
|
|
55469
|
+
foreign_key: relatedKey,
|
|
55470
|
+
relatedKey,
|
|
55471
|
+
hiddenOn: "!!!this.$loaded",
|
|
55472
|
+
"className": "mx-4"
|
|
55473
|
+
// top: 5
|
|
55474
|
+
}
|
|
55475
|
+
// {
|
|
55476
|
+
// type: 'steedos-object-related-listview',
|
|
55477
|
+
// objectApiName: masterObject.name,
|
|
55478
|
+
// recordId: recordId,
|
|
55479
|
+
// relatedObjectApiName: objectApiName,
|
|
55480
|
+
// foreign_key: relatedKey,
|
|
55481
|
+
// relatedKey: relatedKey,
|
|
55482
|
+
// hiddenOn: "!!!this.$loaded"
|
|
55483
|
+
// // top: 5
|
|
55484
|
+
// }
|
|
55485
|
+
]
|
|
55486
|
+
}, data: {
|
|
55487
|
+
context: {
|
|
55488
|
+
app: appId,
|
|
55489
|
+
appId,
|
|
55490
|
+
app_id: appId,
|
|
55491
|
+
listName: listName || "",
|
|
55492
|
+
...Builder$1.settings.context
|
|
55493
|
+
},
|
|
55494
|
+
app: appId,
|
|
55495
|
+
appId,
|
|
55496
|
+
app_id: appId,
|
|
55497
|
+
listName: listName || "",
|
|
55498
|
+
objectName,
|
|
55499
|
+
object_name: objectName
|
|
55500
|
+
}, env: {} });
|
|
55501
|
+
};
|
|
55502
|
+
const routes = [
|
|
55503
|
+
{
|
|
55504
|
+
path: "/logout",
|
|
55505
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Logout$1, {})
|
|
55506
|
+
},
|
|
55507
|
+
{
|
|
55508
|
+
path: "/signup",
|
|
55509
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Signup$1, {})
|
|
55510
|
+
},
|
|
55511
|
+
{
|
|
55512
|
+
path: "/login",
|
|
55513
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Login$1, {})
|
|
55514
|
+
},
|
|
55515
|
+
{
|
|
55516
|
+
path: "/",
|
|
55517
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {})
|
|
55518
|
+
},
|
|
55519
|
+
{
|
|
55520
|
+
path: "/create-space",
|
|
55521
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CreateTenant$1, {}) })
|
|
55522
|
+
},
|
|
55523
|
+
{
|
|
55524
|
+
path: "/select-space",
|
|
55525
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectSpace$1, {}) })
|
|
55526
|
+
},
|
|
55527
|
+
{
|
|
55528
|
+
path: "/update-password",
|
|
55529
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(UpdatePassword$1, {}) })
|
|
55530
|
+
},
|
|
55531
|
+
{
|
|
55532
|
+
path: "/verify/email",
|
|
55533
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(VerifyEmail$1, {}) })
|
|
55534
|
+
},
|
|
55535
|
+
{
|
|
55536
|
+
path: "/verify/mobile",
|
|
55537
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(VerifyMobile$1, {}) })
|
|
55538
|
+
},
|
|
55539
|
+
{
|
|
55540
|
+
path: "/home",
|
|
55541
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {}) })
|
|
55542
|
+
},
|
|
55543
|
+
{
|
|
55544
|
+
path: "/home/:spaceId",
|
|
55545
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Home, {}) })
|
|
55546
|
+
},
|
|
55547
|
+
{
|
|
55548
|
+
path: "/app",
|
|
55549
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppDashboard, {}) }) })
|
|
55550
|
+
},
|
|
55551
|
+
{
|
|
55552
|
+
path: "/app/:appId",
|
|
55553
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppView, {}) }) })
|
|
55554
|
+
},
|
|
55555
|
+
{
|
|
55556
|
+
path: "/app/:appId/page/:pageId",
|
|
55557
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PageView, {}) }) })
|
|
55558
|
+
},
|
|
55559
|
+
{
|
|
55560
|
+
path: "/app/:appId/:objectName",
|
|
55561
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectListView, {}) }) })
|
|
55562
|
+
},
|
|
55563
|
+
{
|
|
55564
|
+
path: "/app/:appId/:objectName/grid/:listviewId",
|
|
55565
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectListView, {}) }) })
|
|
55566
|
+
},
|
|
55567
|
+
{
|
|
55568
|
+
path: "/app/:appId/:objectName/:recordId/:relatedObjectName/grid",
|
|
55569
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectRelatedListView, {}) }) })
|
|
55570
|
+
},
|
|
55571
|
+
{
|
|
55572
|
+
path: "/app/:appId/:objectName/view/:recordId",
|
|
55573
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ObjectDetail, {}) }) })
|
|
55574
|
+
},
|
|
55575
|
+
{
|
|
55576
|
+
path: "/app/:appId/tab_iframe/:tabId",
|
|
55577
|
+
element: /* @__PURE__ */ jsxRuntimeExports.jsx(LoggedIn, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IframeView, {}) }) })
|
|
55578
|
+
}
|
|
55579
|
+
];
|
|
55580
|
+
const SteedosRouter = () => {
|
|
55581
|
+
const router = createBrowserRouter(routes);
|
|
55582
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(RouterProvider2, { router }) });
|
|
55583
|
+
};
|
|
55584
|
+
function loadSettings() {
|
|
55585
|
+
return async (dispatch, getState) => {
|
|
55586
|
+
let data2;
|
|
55587
|
+
try {
|
|
55588
|
+
data2 = await Client4.getSettings();
|
|
55589
|
+
} catch (error) {
|
|
55590
|
+
forceLogoutIfNecessary(error, dispatch, getState);
|
|
55591
|
+
return { error };
|
|
55592
|
+
}
|
|
55593
|
+
Client4.setEnableLogging(data2.EnableDeveloper === "true");
|
|
55594
|
+
Client4.setDiagnosticId(data2.DiagnosticId);
|
|
55595
|
+
Steedos.settings = {
|
|
55596
|
+
public: data2.public
|
|
55597
|
+
};
|
|
55598
|
+
dispatch({
|
|
55599
|
+
type: GeneralTypes.RECEIVED_SETTINGS,
|
|
55600
|
+
data: data2
|
|
55601
|
+
});
|
|
55602
|
+
return { data: data2 };
|
|
55603
|
+
};
|
|
55604
|
+
}
|
|
55605
|
+
const Account = {
|
|
55606
|
+
disabledAccountRegister: () => {
|
|
55607
|
+
var _a2, _b2, _c, _d;
|
|
55608
|
+
return (_d = (_c = (_b2 = (_a2 = window.Tenant) == null ? void 0 : _a2.settings) == null ? void 0 : _b2.public) == null ? void 0 : _c.accounts) == null ? void 0 : _d.disabled_account_register;
|
|
55609
|
+
}
|
|
55610
|
+
};
|
|
55611
|
+
const Space = {
|
|
55612
|
+
get: () => {
|
|
55613
|
+
var _a2;
|
|
55614
|
+
return _.find(Steedos.__hotRecords.spaces, { _id: (_a2 = window.Builder.settings.context) == null ? void 0 : _a2.tenantId });
|
|
55615
|
+
},
|
|
55616
|
+
getMySpaces: () => {
|
|
55617
|
+
return Steedos.__hotRecords.spaces;
|
|
55618
|
+
}
|
|
55619
|
+
};
|
|
55620
|
+
const BaseObject = {
|
|
55621
|
+
base: {
|
|
55622
|
+
actions: {
|
|
55623
|
+
standard_query: {
|
|
55624
|
+
label: "Search",
|
|
55625
|
+
visible: function() {
|
|
55626
|
+
return Steedos.StandardObjects.Base.Actions.standard_query.visible.apply(
|
|
55627
|
+
this,
|
|
55628
|
+
arguments
|
|
55629
|
+
);
|
|
55630
|
+
},
|
|
55631
|
+
on: "list",
|
|
55632
|
+
todo: "standard_query"
|
|
55633
|
+
},
|
|
55634
|
+
standard_new: {
|
|
55635
|
+
label: "New",
|
|
55636
|
+
visible: function(object_name) {
|
|
55637
|
+
return Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(
|
|
55638
|
+
this,
|
|
55639
|
+
arguments
|
|
55640
|
+
);
|
|
55641
|
+
},
|
|
55642
|
+
on: "list",
|
|
55643
|
+
todo: "standard_new"
|
|
55644
|
+
},
|
|
55645
|
+
standard_open_view: {
|
|
55646
|
+
label: "Open",
|
|
55647
|
+
sort: -1,
|
|
55648
|
+
visible: function(object_name, record_id, record_permissions) {
|
|
55649
|
+
return true;
|
|
55650
|
+
},
|
|
55651
|
+
on: "list_item",
|
|
55652
|
+
todo: "standard_open_view"
|
|
55653
|
+
},
|
|
55654
|
+
standard_edit: {
|
|
55655
|
+
label: "Edit",
|
|
55656
|
+
sort: 0,
|
|
55657
|
+
visible: function(object_name, record_id, record_permissions) {
|
|
55658
|
+
return Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(
|
|
55659
|
+
this,
|
|
55660
|
+
arguments
|
|
55661
|
+
);
|
|
55662
|
+
},
|
|
55663
|
+
on: "record",
|
|
55664
|
+
todo: "standard_edit"
|
|
55665
|
+
},
|
|
55666
|
+
standard_delete: {
|
|
55667
|
+
label: "Delete",
|
|
55668
|
+
visible: function(object_name, record_id, record_permissions) {
|
|
55669
|
+
return Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(
|
|
55670
|
+
this,
|
|
55671
|
+
arguments
|
|
55672
|
+
);
|
|
55673
|
+
},
|
|
55674
|
+
on: "record_more",
|
|
55675
|
+
todo: "standard_delete"
|
|
55676
|
+
},
|
|
55677
|
+
standard_delete_many: {
|
|
55678
|
+
label: "Delete",
|
|
55679
|
+
visible: function(object_name, record_id, record_permissions) {
|
|
55680
|
+
return Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(
|
|
55681
|
+
this,
|
|
55682
|
+
arguments
|
|
55683
|
+
);
|
|
55684
|
+
},
|
|
55685
|
+
on: "list",
|
|
55686
|
+
todo: function() {
|
|
55687
|
+
return Steedos.StandardObjects.Base.Actions.standard_delete_many.todo.apply(
|
|
55688
|
+
this,
|
|
55689
|
+
arguments
|
|
55690
|
+
);
|
|
55691
|
+
}
|
|
55692
|
+
},
|
|
55693
|
+
// standard_approve: {
|
|
55694
|
+
// label: "Initiate Approval",
|
|
55695
|
+
// visible: function (object_name, record_id, record_permissions) {
|
|
55696
|
+
// return Steedos.StandardObjects.Base.Actions.standard_approve.visible.apply(
|
|
55697
|
+
// this,
|
|
55698
|
+
// arguments,
|
|
55699
|
+
// );
|
|
55700
|
+
// },
|
|
55701
|
+
// on: "record_only",
|
|
55702
|
+
// type: "amis_button",
|
|
55703
|
+
// amis_schema: {
|
|
55704
|
+
// type: "service",
|
|
55705
|
+
// body: [
|
|
55706
|
+
// {
|
|
55707
|
+
// type: "button",
|
|
55708
|
+
// label: "发起审批",
|
|
55709
|
+
// id: "u:6887f3ab860a",
|
|
55710
|
+
// editorState: "default",
|
|
55711
|
+
// onEvent: {
|
|
55712
|
+
// click: {
|
|
55713
|
+
// weight: 0,
|
|
55714
|
+
// actions: [
|
|
55715
|
+
// {
|
|
55716
|
+
// actionType: "steedos_actions_standard_approve",
|
|
55717
|
+
// },
|
|
55718
|
+
// ],
|
|
55719
|
+
// },
|
|
55720
|
+
// },
|
|
55721
|
+
// },
|
|
55722
|
+
// ],
|
|
55723
|
+
// regions: ["body"],
|
|
55724
|
+
// data: {
|
|
55725
|
+
// context: {},
|
|
55726
|
+
// dataComponentId: "",
|
|
55727
|
+
// record_id: "",
|
|
55728
|
+
// record: {},
|
|
55729
|
+
// permissions: {},
|
|
55730
|
+
// },
|
|
55731
|
+
// bodyClassName: "p-0",
|
|
55732
|
+
// id: "u:5dd49d3a508c",
|
|
55733
|
+
// },
|
|
55734
|
+
// },
|
|
55735
|
+
// standard_create_instance: {
|
|
55736
|
+
// label: "Create Approval",
|
|
55737
|
+
// sort: -1,
|
|
55738
|
+
// on: "list",
|
|
55739
|
+
// type: "amis_button",
|
|
55740
|
+
// visible: function (object_name, record_id, record_permissions, data) {
|
|
55741
|
+
// if (data._isRelated) return false;
|
|
55742
|
+
// return (
|
|
55743
|
+
// lodash.filter(Steedos.Workflow?.getObjectWorkflows(), (item) => {
|
|
55744
|
+
// return (
|
|
55745
|
+
// item.object_name == object_name &&
|
|
55746
|
+
// (!item.sync_direction ||
|
|
55747
|
+
// item.sync_direction == "both" ||
|
|
55748
|
+
// item.sync_direction == "ins_to_obj") &&
|
|
55749
|
+
// true !== item.forbid_initiate_instance
|
|
55750
|
+
// );
|
|
55751
|
+
// }).length > 0
|
|
55752
|
+
// );
|
|
55753
|
+
// },
|
|
55754
|
+
// amis_schema: {
|
|
55755
|
+
// type: "service",
|
|
55756
|
+
// body: [
|
|
55757
|
+
// {
|
|
55758
|
+
// type: "button",
|
|
55759
|
+
// label: "申请",
|
|
55760
|
+
// id: "u:standard_create_instance",
|
|
55761
|
+
// editorState: "default",
|
|
55762
|
+
// onEvent: {
|
|
55763
|
+
// click: {
|
|
55764
|
+
// weight: 0,
|
|
55765
|
+
// actions: [
|
|
55766
|
+
// {
|
|
55767
|
+
// actionType: "custom",
|
|
55768
|
+
// script:
|
|
55769
|
+
// "// 编写判断,当前可发起的流程是单个还是多个. 并返回数据用于控制下个事件是直接新建申请单草稿还是弹出流程让选择\n\nconst flows = lodash.filter(Creator.object_workflows, (item) => { return item.object_name == event.data.object_name && (!item.sync_direction || item.sync_direction == 'both' || item.sync_direction == 'ins_to_obj') && true !== item.forbid_initiate_instance })\n\nevent.setData({ ...event.data, ...{ flows: flows, flowCount: flows.length } })\n\n",
|
|
55770
|
+
// },
|
|
55771
|
+
// {
|
|
55772
|
+
// actionType: "ajax",
|
|
55773
|
+
// outputVar: "responseResult",
|
|
55774
|
+
// args: {
|
|
55775
|
+
// options: {},
|
|
55776
|
+
// api: {
|
|
55777
|
+
// url: "${context.rootUrl}/api/workflow/v2/draft",
|
|
55778
|
+
// method: "post",
|
|
55779
|
+
// requestAdaptor:
|
|
55780
|
+
// "api.data = {\n 'instance': {\n 'flow': api.body.flows[0].flow_id,\n 'applicant': api.body.context.userId,\n 'space': api.body.context.tenantId\n \n}}\n\nreturn api;",
|
|
55781
|
+
// adaptor:
|
|
55782
|
+
// "\nif (payload.error) { \n return {\n status: 2,\n msg: payload.error\n }\n}\nconst instance = payload.instance;\nSteedos.openWindow(Steedos.absoluteUrl('/app/' + FlowRouter.current().params.app_id + '/instances/view/' + instance._id + '?display=' + (Steedos.Page.getDisplay('instances') || '') + '&side_object=instances&side_listview_id=draft'))\nreturn payload;",
|
|
55783
|
+
// messages: {},
|
|
55784
|
+
// headers: {
|
|
55785
|
+
// Authorization:
|
|
55786
|
+
// "Bearer ${context.tenantId},${context.authToken}",
|
|
55787
|
+
// },
|
|
55788
|
+
// data: {
|
|
55789
|
+
// "&": "$$",
|
|
55790
|
+
// context: "${context}",
|
|
55791
|
+
// objectName: "${objectName}",
|
|
55792
|
+
// recordId: "${recordId}",
|
|
55793
|
+
// },
|
|
55794
|
+
// },
|
|
55795
|
+
// },
|
|
55796
|
+
// expression: "${event.data.flowCount == 1}",
|
|
55797
|
+
// },
|
|
55798
|
+
// {
|
|
55799
|
+
// actionType: "dialog",
|
|
55800
|
+
// expression: "${event.data.flowCount > 1}",
|
|
55801
|
+
// dialog: {
|
|
55802
|
+
// type: "dialog",
|
|
55803
|
+
// title: "选择流程发起审批",
|
|
55804
|
+
// body: [
|
|
55805
|
+
// {
|
|
55806
|
+
// type: "form",
|
|
55807
|
+
// id: "u:f78efaa51a4f",
|
|
55808
|
+
// body: [
|
|
55809
|
+
// {
|
|
55810
|
+
// type: "input-tree",
|
|
55811
|
+
// name: "flowId",
|
|
55812
|
+
// label: false,
|
|
55813
|
+
// clearable: true,
|
|
55814
|
+
// id: "u:025b991fd40b",
|
|
55815
|
+
// multiple: false,
|
|
55816
|
+
// treeContainerClassName:
|
|
55817
|
+
// "no-border m-none p-none",
|
|
55818
|
+
// source: {
|
|
55819
|
+
// method: "get",
|
|
55820
|
+
// url: "${context.rootUrl}/api/workflow/v2/get_object_workflows",
|
|
55821
|
+
// requestAdaptor: "api.data = {};return api;",
|
|
55822
|
+
// adaptor:
|
|
55823
|
+
// "return { data: _.filter(payload, (item) => { return item.object_name == api.body.objectName && item.can_add && (!item.sync_direction || item.sync_direction == 'both' || item.sync_direction == 'ins_to_obj') && true !== item.forbid_initiate_instance })};",
|
|
55824
|
+
// messages: {},
|
|
55825
|
+
// dataType: "json",
|
|
55826
|
+
// headers: {
|
|
55827
|
+
// Authorization:
|
|
55828
|
+
// "Bearer ${context.tenantId},${context.authToken}",
|
|
55829
|
+
// },
|
|
55830
|
+
// data: {
|
|
55831
|
+
// objectName: "${objectName}",
|
|
55832
|
+
// spaceId: "${context.tenantId}",
|
|
55833
|
+
// },
|
|
55834
|
+
// },
|
|
55835
|
+
// value: "",
|
|
55836
|
+
// labelField: "flow_name",
|
|
55837
|
+
// valueField: "flow_id",
|
|
55838
|
+
// onEvent: {
|
|
55839
|
+
// change: {
|
|
55840
|
+
// weight: 0,
|
|
55841
|
+
// actions: [
|
|
55842
|
+
// {
|
|
55843
|
+
// actionType: "ajax",
|
|
55844
|
+
// outputVar: "responseResult",
|
|
55845
|
+
// args: {
|
|
55846
|
+
// options: {},
|
|
55847
|
+
// api: {
|
|
55848
|
+
// url: "${context.rootUrl}/api/workflow/v2/draft",
|
|
55849
|
+
// method: "post",
|
|
55850
|
+
// requestAdaptor:
|
|
55851
|
+
// "api.data = {\n 'instance': {\n 'flow': api.body.flowId,\n 'applicant': api.body.context.userId,\n 'space': api.body.context.tenantId\n \n}}\n\nreturn api;",
|
|
55852
|
+
// adaptor:
|
|
55853
|
+
// "\nif (payload.error) { \n return {\n status: 2,\n msg: payload.error\n }\n}\nconst instance = payload.instance;\nSteedos.openWindow(Steedos.absoluteUrl('/app/' + FlowRouter.current().params.app_id + '/instances/view/' + instance._id + '?display=' + (Steedos.Page.getDisplay('instances') || '') + '&side_object=instances&side_listview_id=draft'))\nreturn payload;",
|
|
55854
|
+
// messages: {},
|
|
55855
|
+
// headers: {
|
|
55856
|
+
// Authorization:
|
|
55857
|
+
// "Bearer ${context.tenantId},${context.authToken}",
|
|
55858
|
+
// },
|
|
55859
|
+
// data: {
|
|
55860
|
+
// "&": "$$",
|
|
55861
|
+
// context: "${context}",
|
|
55862
|
+
// objectName: "${objectName}",
|
|
55863
|
+
// recordId: "${recordId}",
|
|
55864
|
+
// },
|
|
55865
|
+
// },
|
|
55866
|
+
// },
|
|
55867
|
+
// expression: "${event.data.value}",
|
|
55868
|
+
// },
|
|
55869
|
+
// {
|
|
55870
|
+
// actionType: "closeDialog",
|
|
55871
|
+
// },
|
|
55872
|
+
// ],
|
|
55873
|
+
// },
|
|
55874
|
+
// },
|
|
55875
|
+
// },
|
|
55876
|
+
// ],
|
|
55877
|
+
// wrapWithPanel: false,
|
|
55878
|
+
// },
|
|
55879
|
+
// ],
|
|
55880
|
+
// showCloseButton: true,
|
|
55881
|
+
// showErrorMsg: true,
|
|
55882
|
+
// showLoading: true,
|
|
55883
|
+
// className: "",
|
|
55884
|
+
// id: "u:ba79188bbf7e",
|
|
55885
|
+
// closeOnEsc: true,
|
|
55886
|
+
// actions: [],
|
|
55887
|
+
// size: "md",
|
|
55888
|
+
// data: {
|
|
55889
|
+
// "&": "$$",
|
|
55890
|
+
// },
|
|
55891
|
+
// dataMap: {},
|
|
55892
|
+
// withDefaultData: true,
|
|
55893
|
+
// dataMapSwitch: true,
|
|
55894
|
+
// bodyClassName: "overflow-hidden",
|
|
55895
|
+
// },
|
|
55896
|
+
// },
|
|
55897
|
+
// ],
|
|
55898
|
+
// },
|
|
55899
|
+
// },
|
|
55900
|
+
// },
|
|
55901
|
+
// ],
|
|
55902
|
+
// regions: ["body"],
|
|
55903
|
+
// data: {
|
|
55904
|
+
// context: {},
|
|
55905
|
+
// dataComponentId: "",
|
|
55906
|
+
// record_id: "",
|
|
55907
|
+
// record: {},
|
|
55908
|
+
// permissions: {},
|
|
55909
|
+
// },
|
|
55910
|
+
// bodyClassName: "p-0",
|
|
55911
|
+
// id: "u:6ac1032391f4",
|
|
55912
|
+
// },
|
|
55913
|
+
// },
|
|
55914
|
+
// standard_view_instance: {
|
|
55915
|
+
// label: "View Instance",
|
|
55916
|
+
// visible: function (object_name, record_id, record_permissions) {
|
|
55917
|
+
// return Steedos.StandardObjects.Base.Actions.standard_view_instance.visible.apply(
|
|
55918
|
+
// this,
|
|
55919
|
+
// arguments,
|
|
55920
|
+
// );
|
|
55921
|
+
// },
|
|
55922
|
+
// on: "record_only",
|
|
55923
|
+
// todo: function () {
|
|
55924
|
+
// return Steedos.StandardObjects.Base.Actions.standard_view_instance.todo.apply(
|
|
55925
|
+
// this,
|
|
55926
|
+
// arguments,
|
|
55927
|
+
// );
|
|
55928
|
+
// },
|
|
55929
|
+
// },
|
|
55930
|
+
// standard_submit_for_approval: {
|
|
55931
|
+
// visible: function (object_name, record_id) {
|
|
55932
|
+
// return Steedos.StandardObjects.Base.Actions.standard_submit_for_approval.visible.apply(
|
|
55933
|
+
// this,
|
|
55934
|
+
// arguments,
|
|
55935
|
+
// );
|
|
55936
|
+
// },
|
|
55937
|
+
// on: "record_only",
|
|
55938
|
+
// type: "amis_button",
|
|
55939
|
+
// amis_schema: {
|
|
55940
|
+
// type: "service",
|
|
55941
|
+
// body: [
|
|
55942
|
+
// {
|
|
55943
|
+
// type: "button",
|
|
55944
|
+
// label: "提请审批",
|
|
55945
|
+
// id: "u:standard_submit_for_approval",
|
|
55946
|
+
// onEvent: {
|
|
55947
|
+
// click: {
|
|
55948
|
+
// actions: [
|
|
55949
|
+
// {
|
|
55950
|
+
// actionType: "dialog",
|
|
55951
|
+
// dialog: {
|
|
55952
|
+
// type: "dialog",
|
|
55953
|
+
// title: "提交待审核",
|
|
55954
|
+
// body: [
|
|
55955
|
+
// {
|
|
55956
|
+
// type: "form",
|
|
55957
|
+
// id: "u:1eb06e6962d8",
|
|
55958
|
+
// title: "表单",
|
|
55959
|
+
// body: [
|
|
55960
|
+
// {
|
|
55961
|
+
// type: "steedos-field",
|
|
55962
|
+
// id: "u:9f4486c22f52",
|
|
55963
|
+
// field:
|
|
55964
|
+
// '{\n "label": "意见",\n "name": "comment",\n "type": "textarea",\n "rows": 3,\n "is_wide": true\n}',
|
|
55965
|
+
// name: "comment",
|
|
55966
|
+
// },
|
|
55967
|
+
// {
|
|
55968
|
+
// type: "steedos-field",
|
|
55969
|
+
// id: "u:9f4486c22f52",
|
|
55970
|
+
// field:
|
|
55971
|
+
// '{\n "label": "选择下一位批准人",\n "name": "approver",\n "type": "lookup",\n "reference_to": "space_users",\n "reference_to_field": "user",\n "required": true,\n "is_wide": true\n}',
|
|
55972
|
+
// name: "approver",
|
|
55973
|
+
// placeholder: "",
|
|
55974
|
+
// visibleOn: "${showApprover === true}",
|
|
55975
|
+
// },
|
|
55976
|
+
// ],
|
|
55977
|
+
// wrapWithPanel: false,
|
|
55978
|
+
// mode: "normal",
|
|
55979
|
+
// api: {
|
|
55980
|
+
// method: "post",
|
|
55981
|
+
// url: "${context.rootUrl}/api/v4/process/submit/${objectName}/${recordId}",
|
|
55982
|
+
// data: {
|
|
55983
|
+
// "&": "$$",
|
|
55984
|
+
// },
|
|
55985
|
+
// requestAdaptor:
|
|
55986
|
+
// "\napi.data = {\n comment: api.body.comment\n};\n\nif (api.body.approver) {\n api.data.approver = api.body.approver;\n}\n\nreturn api;",
|
|
55987
|
+
// adaptor:
|
|
55988
|
+
// "\npayload.data = {};\npayload.data.showApprover = payload.error === 'process_approval_error_needToChooseApprover'\n\nif (payload.state === 'FAILURE') {\n if (payload.data.showApprover) {\n payload.msg = \"请选择下一位批准人\";\n } else { \n payload.msg = window.t(payload.error)\n }\n}\n\n\nreturn payload;",
|
|
55989
|
+
// responseData: {
|
|
55990
|
+
// "&": "$$",
|
|
55991
|
+
// },
|
|
55992
|
+
// headers: {
|
|
55993
|
+
// Authorization:
|
|
55994
|
+
// "Bearer ${context.tenantId},${context.authToken}",
|
|
55995
|
+
// },
|
|
55996
|
+
// },
|
|
55997
|
+
// debug: false,
|
|
55998
|
+
// onEvent: {
|
|
55999
|
+
// submitSucc: {
|
|
56000
|
+
// weight: 0,
|
|
56001
|
+
// actions: [
|
|
56002
|
+
// {
|
|
56003
|
+
// actionType: "custom",
|
|
56004
|
+
// script: `
|
|
56005
|
+
// doAction({
|
|
56006
|
+
// "actionType": "broadcast",
|
|
56007
|
+
// "args": {
|
|
56008
|
+
// "eventName": \`@data.changed.\${event.data.objectName}\`
|
|
56009
|
+
// },
|
|
56010
|
+
// "data": {
|
|
56011
|
+
// "objectName": \`\${event.data.objectName}\`
|
|
56012
|
+
// }
|
|
56013
|
+
// });
|
|
56014
|
+
// `,
|
|
56015
|
+
// },
|
|
56016
|
+
// ],
|
|
56017
|
+
// },
|
|
56018
|
+
// },
|
|
56019
|
+
// },
|
|
56020
|
+
// ],
|
|
56021
|
+
// id: "u:7a3f92e56805",
|
|
56022
|
+
// closeOnEsc: false,
|
|
56023
|
+
// closeOnOutside: false,
|
|
56024
|
+
// showCloseButton: true,
|
|
56025
|
+
// size: "md",
|
|
56026
|
+
// },
|
|
56027
|
+
// },
|
|
56028
|
+
// ],
|
|
56029
|
+
// weight: 0,
|
|
56030
|
+
// },
|
|
56031
|
+
// },
|
|
56032
|
+
// },
|
|
56033
|
+
// ],
|
|
56034
|
+
// regions: ["body"],
|
|
56035
|
+
// data: {},
|
|
56036
|
+
// bodyClassName: "p-0",
|
|
56037
|
+
// id: "u:50444554a302",
|
|
56038
|
+
// },
|
|
56039
|
+
// },
|
|
56040
|
+
standard_export_excel: {
|
|
56041
|
+
label: "Export Excel",
|
|
56042
|
+
visible: function(object_name, record_id, record_permissions) {
|
|
56043
|
+
return Steedos.StandardObjects.Base.Actions.standard_export_excel.visible.apply(
|
|
56044
|
+
this,
|
|
56045
|
+
arguments
|
|
56046
|
+
);
|
|
56047
|
+
},
|
|
56048
|
+
on: "list",
|
|
56049
|
+
todo: function() {
|
|
56050
|
+
return Steedos.StandardObjects.Base.Actions.standard_export_excel.todo.apply(
|
|
56051
|
+
this,
|
|
56052
|
+
arguments
|
|
55733
56053
|
);
|
|
55734
56054
|
}
|
|
55735
|
-
}
|
|
55736
|
-
|
|
55737
|
-
|
|
55738
|
-
|
|
55739
|
-
|
|
55740
|
-
|
|
55741
|
-
|
|
55742
|
-
|
|
55743
|
-
|
|
55744
|
-
|
|
55745
|
-
|
|
55746
|
-
|
|
55747
|
-
|
|
55748
|
-
|
|
55749
|
-
|
|
55750
|
-
|
|
55751
|
-
|
|
55752
|
-
|
|
55753
|
-
|
|
55754
|
-
|
|
55755
|
-
|
|
55756
|
-
|
|
55757
|
-
|
|
55758
|
-
|
|
55759
|
-
|
|
55760
|
-
|
|
55761
|
-
|
|
55762
|
-
|
|
55763
|
-
|
|
55764
|
-
|
|
55765
|
-
"
|
|
55766
|
-
|
|
55767
|
-
|
|
55768
|
-
|
|
55769
|
-
|
|
55770
|
-
|
|
55771
|
-
|
|
55772
|
-
|
|
55773
|
-
|
|
55774
|
-
|
|
55775
|
-
|
|
55776
|
-
|
|
55777
|
-
|
|
55778
|
-
|
|
55779
|
-
|
|
55780
|
-
|
|
55781
|
-
|
|
55782
|
-
|
|
55783
|
-
|
|
55784
|
-
|
|
55785
|
-
|
|
55786
|
-
|
|
55787
|
-
|
|
55788
|
-
|
|
55789
|
-
|
|
55790
|
-
|
|
55791
|
-
|
|
55792
|
-
|
|
55793
|
-
|
|
55794
|
-
|
|
55795
|
-
utils2.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
|
55796
|
-
if (!utils2.isUndefined(config2[prop])) {
|
|
55797
|
-
config3[prop] = getMergedValue(void 0, config2[prop]);
|
|
55798
|
-
}
|
|
55799
|
-
});
|
|
55800
|
-
utils2.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
55801
|
-
utils2.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
|
55802
|
-
if (!utils2.isUndefined(config2[prop])) {
|
|
55803
|
-
config3[prop] = getMergedValue(void 0, config2[prop]);
|
|
55804
|
-
} else if (!utils2.isUndefined(config1[prop])) {
|
|
55805
|
-
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
55806
|
-
}
|
|
55807
|
-
});
|
|
55808
|
-
utils2.forEach(directMergeKeys, function merge2(prop) {
|
|
55809
|
-
if (prop in config2) {
|
|
55810
|
-
config3[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
55811
|
-
} else if (prop in config1) {
|
|
55812
|
-
config3[prop] = getMergedValue(void 0, config1[prop]);
|
|
55813
|
-
}
|
|
55814
|
-
});
|
|
55815
|
-
var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
|
|
55816
|
-
var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key2) {
|
|
55817
|
-
return axiosKeys.indexOf(key2) === -1;
|
|
55818
|
-
});
|
|
55819
|
-
utils2.forEach(otherKeys, mergeDeepProperties);
|
|
55820
|
-
return config3;
|
|
55821
|
-
};
|
|
55822
|
-
return mergeConfig;
|
|
55823
|
-
}
|
|
55824
|
-
const version = "0.21.4";
|
|
55825
|
-
const require$$0 = {
|
|
55826
|
-
version
|
|
55827
|
-
};
|
|
55828
|
-
var validator;
|
|
55829
|
-
var hasRequiredValidator;
|
|
55830
|
-
function requireValidator() {
|
|
55831
|
-
if (hasRequiredValidator) return validator;
|
|
55832
|
-
hasRequiredValidator = 1;
|
|
55833
|
-
var pkg = require$$0;
|
|
55834
|
-
var validators = {};
|
|
55835
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
|
|
55836
|
-
validators[type] = function validator2(thing) {
|
|
55837
|
-
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
|
|
55838
|
-
};
|
|
55839
|
-
});
|
|
55840
|
-
var deprecatedWarnings = {};
|
|
55841
|
-
var currentVerArr = pkg.version.split(".");
|
|
55842
|
-
function isOlderVersion(version2, thanVersion) {
|
|
55843
|
-
var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
|
|
55844
|
-
var destVer = version2.split(".");
|
|
55845
|
-
for (var i = 0; i < 3; i++) {
|
|
55846
|
-
if (pkgVersionArr[i] > destVer[i]) {
|
|
55847
|
-
return true;
|
|
55848
|
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
55849
|
-
return false;
|
|
55850
|
-
}
|
|
55851
|
-
}
|
|
55852
|
-
return false;
|
|
55853
|
-
}
|
|
55854
|
-
validators.transitional = function transitional(validator2, version2, message2) {
|
|
55855
|
-
var isDeprecated = version2 && isOlderVersion(version2);
|
|
55856
|
-
function formatMessage2(opt, desc) {
|
|
55857
|
-
return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message2 ? ". " + message2 : "");
|
|
55858
|
-
}
|
|
55859
|
-
return function(value, opt, opts) {
|
|
55860
|
-
if (validator2 === false) {
|
|
55861
|
-
throw new Error(formatMessage2(opt, " has been removed in " + version2));
|
|
55862
|
-
}
|
|
55863
|
-
if (isDeprecated && !deprecatedWarnings[opt]) {
|
|
55864
|
-
deprecatedWarnings[opt] = true;
|
|
55865
|
-
console.warn(
|
|
55866
|
-
formatMessage2(
|
|
55867
|
-
opt,
|
|
55868
|
-
" has been deprecated since v" + version2 + " and will be removed in the near future"
|
|
55869
|
-
)
|
|
55870
|
-
);
|
|
55871
|
-
}
|
|
55872
|
-
return validator2 ? validator2(value, opt, opts) : true;
|
|
55873
|
-
};
|
|
55874
|
-
};
|
|
55875
|
-
function assertOptions(options, schema, allowUnknown) {
|
|
55876
|
-
if (typeof options !== "object") {
|
|
55877
|
-
throw new TypeError("options must be an object");
|
|
55878
|
-
}
|
|
55879
|
-
var keys2 = Object.keys(options);
|
|
55880
|
-
var i = keys2.length;
|
|
55881
|
-
while (i-- > 0) {
|
|
55882
|
-
var opt = keys2[i];
|
|
55883
|
-
var validator2 = schema[opt];
|
|
55884
|
-
if (validator2) {
|
|
55885
|
-
var value = options[opt];
|
|
55886
|
-
var result = value === void 0 || validator2(value, opt, options);
|
|
55887
|
-
if (result !== true) {
|
|
55888
|
-
throw new TypeError("option " + opt + " must be " + result);
|
|
55889
|
-
}
|
|
55890
|
-
continue;
|
|
55891
|
-
}
|
|
55892
|
-
if (allowUnknown !== true) {
|
|
55893
|
-
throw Error("Unknown option " + opt);
|
|
55894
|
-
}
|
|
55895
|
-
}
|
|
55896
|
-
}
|
|
55897
|
-
validator = {
|
|
55898
|
-
isOlderVersion,
|
|
55899
|
-
assertOptions,
|
|
55900
|
-
validators
|
|
55901
|
-
};
|
|
55902
|
-
return validator;
|
|
55903
|
-
}
|
|
55904
|
-
var Axios_1;
|
|
55905
|
-
var hasRequiredAxios$2;
|
|
55906
|
-
function requireAxios$2() {
|
|
55907
|
-
if (hasRequiredAxios$2) return Axios_1;
|
|
55908
|
-
hasRequiredAxios$2 = 1;
|
|
55909
|
-
var utils2 = requireUtils();
|
|
55910
|
-
var buildURL2 = requireBuildURL();
|
|
55911
|
-
var InterceptorManager = requireInterceptorManager();
|
|
55912
|
-
var dispatchRequest2 = requireDispatchRequest();
|
|
55913
|
-
var mergeConfig2 = requireMergeConfig();
|
|
55914
|
-
var validator2 = requireValidator();
|
|
55915
|
-
var validators = validator2.validators;
|
|
55916
|
-
function Axios(instanceConfig) {
|
|
55917
|
-
this.defaults = instanceConfig;
|
|
55918
|
-
this.interceptors = {
|
|
55919
|
-
request: new InterceptorManager(),
|
|
55920
|
-
response: new InterceptorManager()
|
|
55921
|
-
};
|
|
55922
|
-
}
|
|
55923
|
-
Axios.prototype.request = function request2(config2) {
|
|
55924
|
-
if (typeof config2 === "string") {
|
|
55925
|
-
config2 = arguments[1] || {};
|
|
55926
|
-
config2.url = arguments[0];
|
|
55927
|
-
} else {
|
|
55928
|
-
config2 = config2 || {};
|
|
55929
|
-
}
|
|
55930
|
-
config2 = mergeConfig2(this.defaults, config2);
|
|
55931
|
-
if (config2.method) {
|
|
55932
|
-
config2.method = config2.method.toLowerCase();
|
|
55933
|
-
} else if (this.defaults.method) {
|
|
55934
|
-
config2.method = this.defaults.method.toLowerCase();
|
|
55935
|
-
} else {
|
|
55936
|
-
config2.method = "get";
|
|
55937
|
-
}
|
|
55938
|
-
var transitional = config2.transitional;
|
|
55939
|
-
if (transitional !== void 0) {
|
|
55940
|
-
validator2.assertOptions(transitional, {
|
|
55941
|
-
silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
|
|
55942
|
-
forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
|
|
55943
|
-
clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
|
|
55944
|
-
}, false);
|
|
55945
|
-
}
|
|
55946
|
-
var requestInterceptorChain = [];
|
|
55947
|
-
var synchronousRequestInterceptors = true;
|
|
55948
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
55949
|
-
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
|
|
55950
|
-
return;
|
|
55951
|
-
}
|
|
55952
|
-
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
55953
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
55954
|
-
});
|
|
55955
|
-
var responseInterceptorChain = [];
|
|
55956
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
55957
|
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
55958
|
-
});
|
|
55959
|
-
var promise;
|
|
55960
|
-
if (!synchronousRequestInterceptors) {
|
|
55961
|
-
var chain = [dispatchRequest2, void 0];
|
|
55962
|
-
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
|
55963
|
-
chain = chain.concat(responseInterceptorChain);
|
|
55964
|
-
promise = Promise.resolve(config2);
|
|
55965
|
-
while (chain.length) {
|
|
55966
|
-
promise = promise.then(chain.shift(), chain.shift());
|
|
55967
|
-
}
|
|
55968
|
-
return promise;
|
|
55969
|
-
}
|
|
55970
|
-
var newConfig = config2;
|
|
55971
|
-
while (requestInterceptorChain.length) {
|
|
55972
|
-
var onFulfilled = requestInterceptorChain.shift();
|
|
55973
|
-
var onRejected = requestInterceptorChain.shift();
|
|
55974
|
-
try {
|
|
55975
|
-
newConfig = onFulfilled(newConfig);
|
|
55976
|
-
} catch (error) {
|
|
55977
|
-
onRejected(error);
|
|
55978
|
-
break;
|
|
56055
|
+
},
|
|
56056
|
+
standard_print: {
|
|
56057
|
+
label: "Print",
|
|
56058
|
+
visible: false,
|
|
56059
|
+
on: "record_only",
|
|
56060
|
+
type: "amis_button",
|
|
56061
|
+
amis_schema: {
|
|
56062
|
+
type: "service",
|
|
56063
|
+
body: [
|
|
56064
|
+
{
|
|
56065
|
+
type: "service",
|
|
56066
|
+
body: [
|
|
56067
|
+
{
|
|
56068
|
+
type: "dropdown-button",
|
|
56069
|
+
label: "打印",
|
|
56070
|
+
buttons: "${buttonOptions}",
|
|
56071
|
+
id: "u:8cd2cefcaf9b",
|
|
56072
|
+
disabled: false,
|
|
56073
|
+
hidden: false
|
|
56074
|
+
}
|
|
56075
|
+
],
|
|
56076
|
+
id: "u:2b1dc4682c90",
|
|
56077
|
+
messages: {},
|
|
56078
|
+
api: {
|
|
56079
|
+
url: "${context.rootUrl}/graphql",
|
|
56080
|
+
method: "post",
|
|
56081
|
+
messages: {
|
|
56082
|
+
failed: "打印功能需要企业许可证"
|
|
56083
|
+
},
|
|
56084
|
+
requestAdaptor: "",
|
|
56085
|
+
adaptor: 'const buttonOptions = [];\nfor (const row of payload.data.rows) {\n buttonOptions.push({\n "type": "button",\n "label": row.label,\n "onEvent": {\n "click": {\n "actions": [\n {\n "actionType": "url",\n "args": {\n "url": "${context.rootUrl}/api/page/render",\n "blank": true,\n "params": {\n "schemaApi": "${context.rootUrl}/service/api/@steedos/print-template/getPrintSchema/" + row._id,\n "data": {\n "filters": ["_id", "=", "${recordId}"]\n } \n }\n }\n }\n ]\n }\n }\n })\n}\n\npayload.data = {\n buttonOptions: buttonOptions \n}\nreturn payload',
|
|
56086
|
+
headers: {
|
|
56087
|
+
Authorization: "Bearer ${context.tenantId},${context.authToken}"
|
|
56088
|
+
},
|
|
56089
|
+
data: {
|
|
56090
|
+
"&": "$$",
|
|
56091
|
+
query: '{ rows: object_print(filters: [["object_name", "=", "${objectName}"]]) { _id name label object_name } }'
|
|
56092
|
+
}
|
|
56093
|
+
},
|
|
56094
|
+
initFetch: true,
|
|
56095
|
+
onEvent: {
|
|
56096
|
+
init: {
|
|
56097
|
+
weight: 0,
|
|
56098
|
+
actions: []
|
|
56099
|
+
}
|
|
56100
|
+
},
|
|
56101
|
+
name: "print"
|
|
56102
|
+
}
|
|
56103
|
+
],
|
|
56104
|
+
regions: ["body"],
|
|
56105
|
+
data: {
|
|
56106
|
+
context: {},
|
|
56107
|
+
dataComponentId: "",
|
|
56108
|
+
record_id: "",
|
|
56109
|
+
record: {},
|
|
56110
|
+
permissions: {}
|
|
56111
|
+
},
|
|
56112
|
+
id: "u:038c6047be31",
|
|
56113
|
+
bodyClassName: "p-0"
|
|
56114
|
+
}
|
|
55979
56115
|
}
|
|
55980
56116
|
}
|
|
55981
|
-
|
|
55982
|
-
|
|
55983
|
-
|
|
55984
|
-
|
|
56117
|
+
}
|
|
56118
|
+
};
|
|
56119
|
+
const User = {
|
|
56120
|
+
get: () => {
|
|
56121
|
+
var _a2;
|
|
56122
|
+
return (_a2 = window.Builder.settings.context) == null ? void 0 : _a2.user;
|
|
56123
|
+
}
|
|
56124
|
+
};
|
|
56125
|
+
const Workflow = {
|
|
56126
|
+
// TODO: 初始化对象流程?
|
|
56127
|
+
getObjectWorkflows: () => {
|
|
56128
|
+
return [];
|
|
56129
|
+
}
|
|
56130
|
+
};
|
|
56131
|
+
const ProcessManager = {};
|
|
56132
|
+
class SObject {
|
|
56133
|
+
constructor(objectName, client2) {
|
|
56134
|
+
__publicField(this, "objectName");
|
|
56135
|
+
__publicField(this, "client");
|
|
56136
|
+
this.objectName = objectName;
|
|
56137
|
+
this.client = client2;
|
|
56138
|
+
}
|
|
56139
|
+
// fetches a record or records specified by id(s) in first argument.
|
|
56140
|
+
async retrieve(id2) {
|
|
56141
|
+
if (_.isEmpty(id2)) {
|
|
56142
|
+
return [];
|
|
55985
56143
|
}
|
|
55986
|
-
|
|
55987
|
-
|
|
56144
|
+
if (_.isString(id2)) {
|
|
56145
|
+
return await this.client.getRecord({
|
|
56146
|
+
objectName: this.objectName,
|
|
56147
|
+
id: id2
|
|
56148
|
+
});
|
|
56149
|
+
} else if (_.isArray(id2)) {
|
|
56150
|
+
return await this.client.searchRecords(this.objectName, {
|
|
56151
|
+
filters: [["_id", "in", id2]]
|
|
56152
|
+
});
|
|
55988
56153
|
}
|
|
55989
|
-
return promise;
|
|
55990
|
-
};
|
|
55991
|
-
Axios.prototype.getUri = function getUri(config2) {
|
|
55992
|
-
config2 = mergeConfig2(this.defaults, config2);
|
|
55993
|
-
return buildURL2(config2.url, config2.params, config2.paramsSerializer).replace(/^\?/, "");
|
|
55994
|
-
};
|
|
55995
|
-
utils2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
55996
|
-
Axios.prototype[method] = function(url2, config2) {
|
|
55997
|
-
return this.request(mergeConfig2(config2 || {}, {
|
|
55998
|
-
method,
|
|
55999
|
-
url: url2,
|
|
56000
|
-
data: (config2 || {}).data
|
|
56001
|
-
}));
|
|
56002
|
-
};
|
|
56003
|
-
});
|
|
56004
|
-
utils2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
56005
|
-
Axios.prototype[method] = function(url2, data2, config2) {
|
|
56006
|
-
return this.request(mergeConfig2(config2 || {}, {
|
|
56007
|
-
method,
|
|
56008
|
-
url: url2,
|
|
56009
|
-
data: data2
|
|
56010
|
-
}));
|
|
56011
|
-
};
|
|
56012
|
-
});
|
|
56013
|
-
Axios_1 = Axios;
|
|
56014
|
-
return Axios_1;
|
|
56015
|
-
}
|
|
56016
|
-
var Cancel_1;
|
|
56017
|
-
var hasRequiredCancel;
|
|
56018
|
-
function requireCancel() {
|
|
56019
|
-
if (hasRequiredCancel) return Cancel_1;
|
|
56020
|
-
hasRequiredCancel = 1;
|
|
56021
|
-
function Cancel(message2) {
|
|
56022
|
-
this.message = message2;
|
|
56023
56154
|
}
|
|
56024
|
-
|
|
56025
|
-
return
|
|
56026
|
-
|
|
56027
|
-
|
|
56028
|
-
Cancel_1 = Cancel;
|
|
56029
|
-
return Cancel_1;
|
|
56030
|
-
}
|
|
56031
|
-
var CancelToken_1;
|
|
56032
|
-
var hasRequiredCancelToken;
|
|
56033
|
-
function requireCancelToken() {
|
|
56034
|
-
if (hasRequiredCancelToken) return CancelToken_1;
|
|
56035
|
-
hasRequiredCancelToken = 1;
|
|
56036
|
-
var Cancel = requireCancel();
|
|
56037
|
-
function CancelToken(executor) {
|
|
56038
|
-
if (typeof executor !== "function") {
|
|
56039
|
-
throw new TypeError("executor must be a function.");
|
|
56040
|
-
}
|
|
56041
|
-
var resolvePromise;
|
|
56042
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
56043
|
-
resolvePromise = resolve;
|
|
56155
|
+
async create(doc) {
|
|
56156
|
+
return await this.client.createRecord({
|
|
56157
|
+
objectName: this.objectName,
|
|
56158
|
+
doc
|
|
56044
56159
|
});
|
|
56045
|
-
|
|
56046
|
-
|
|
56047
|
-
|
|
56048
|
-
|
|
56049
|
-
|
|
56050
|
-
|
|
56051
|
-
resolvePromise(token.reason);
|
|
56160
|
+
}
|
|
56161
|
+
async update(id2, doc) {
|
|
56162
|
+
return await this.client.updateRecord({
|
|
56163
|
+
objectName: this.objectName,
|
|
56164
|
+
id: id2,
|
|
56165
|
+
doc
|
|
56052
56166
|
});
|
|
56053
56167
|
}
|
|
56054
|
-
|
|
56055
|
-
|
|
56056
|
-
|
|
56057
|
-
|
|
56058
|
-
|
|
56059
|
-
|
|
56060
|
-
|
|
56061
|
-
|
|
56062
|
-
|
|
56168
|
+
async delete(id2) {
|
|
56169
|
+
return await this.client.deleteRecord({
|
|
56170
|
+
objectName: this.objectName,
|
|
56171
|
+
id: id2
|
|
56172
|
+
});
|
|
56173
|
+
}
|
|
56174
|
+
async find(filters, fields, sort, top, skip) {
|
|
56175
|
+
return await this.client.searchRecords(this.objectName, {
|
|
56176
|
+
filters,
|
|
56177
|
+
fields,
|
|
56178
|
+
sort,
|
|
56179
|
+
top,
|
|
56180
|
+
skip
|
|
56063
56181
|
});
|
|
56064
|
-
return {
|
|
56065
|
-
token,
|
|
56066
|
-
cancel
|
|
56067
|
-
};
|
|
56068
|
-
};
|
|
56069
|
-
CancelToken_1 = CancelToken;
|
|
56070
|
-
return CancelToken_1;
|
|
56071
|
-
}
|
|
56072
|
-
var spread;
|
|
56073
|
-
var hasRequiredSpread;
|
|
56074
|
-
function requireSpread() {
|
|
56075
|
-
if (hasRequiredSpread) return spread;
|
|
56076
|
-
hasRequiredSpread = 1;
|
|
56077
|
-
spread = function spread2(callback) {
|
|
56078
|
-
return function wrap(arr2) {
|
|
56079
|
-
return callback.apply(null, arr2);
|
|
56080
|
-
};
|
|
56081
|
-
};
|
|
56082
|
-
return spread;
|
|
56083
|
-
}
|
|
56084
|
-
var isAxiosError;
|
|
56085
|
-
var hasRequiredIsAxiosError;
|
|
56086
|
-
function requireIsAxiosError() {
|
|
56087
|
-
if (hasRequiredIsAxiosError) return isAxiosError;
|
|
56088
|
-
hasRequiredIsAxiosError = 1;
|
|
56089
|
-
isAxiosError = function isAxiosError2(payload) {
|
|
56090
|
-
return typeof payload === "object" && payload.isAxiosError === true;
|
|
56091
|
-
};
|
|
56092
|
-
return isAxiosError;
|
|
56093
|
-
}
|
|
56094
|
-
var hasRequiredAxios$1;
|
|
56095
|
-
function requireAxios$1() {
|
|
56096
|
-
if (hasRequiredAxios$1) return axios$2.exports;
|
|
56097
|
-
hasRequiredAxios$1 = 1;
|
|
56098
|
-
var utils2 = requireUtils();
|
|
56099
|
-
var bind2 = requireBind();
|
|
56100
|
-
var Axios = requireAxios$2();
|
|
56101
|
-
var mergeConfig2 = requireMergeConfig();
|
|
56102
|
-
var defaults2 = requireDefaults();
|
|
56103
|
-
function createInstance(defaultConfig) {
|
|
56104
|
-
var context = new Axios(defaultConfig);
|
|
56105
|
-
var instance2 = bind2(Axios.prototype.request, context);
|
|
56106
|
-
utils2.extend(instance2, Axios.prototype, context);
|
|
56107
|
-
utils2.extend(instance2, context);
|
|
56108
|
-
return instance2;
|
|
56109
56182
|
}
|
|
56110
|
-
var axios2 = createInstance(defaults2);
|
|
56111
|
-
axios2.Axios = Axios;
|
|
56112
|
-
axios2.create = function create(instanceConfig) {
|
|
56113
|
-
return createInstance(mergeConfig2(axios2.defaults, instanceConfig));
|
|
56114
|
-
};
|
|
56115
|
-
axios2.Cancel = requireCancel();
|
|
56116
|
-
axios2.CancelToken = requireCancelToken();
|
|
56117
|
-
axios2.isCancel = requireIsCancel();
|
|
56118
|
-
axios2.all = function all(promises) {
|
|
56119
|
-
return Promise.all(promises);
|
|
56120
|
-
};
|
|
56121
|
-
axios2.spread = requireSpread();
|
|
56122
|
-
axios2.isAxiosError = requireIsAxiosError();
|
|
56123
|
-
axios$2.exports = axios2;
|
|
56124
|
-
axios$2.exports.default = axios2;
|
|
56125
|
-
return axios$2.exports;
|
|
56126
|
-
}
|
|
56127
|
-
var axios$1;
|
|
56128
|
-
var hasRequiredAxios;
|
|
56129
|
-
function requireAxios() {
|
|
56130
|
-
if (hasRequiredAxios) return axios$1;
|
|
56131
|
-
hasRequiredAxios = 1;
|
|
56132
|
-
axios$1 = requireAxios$1();
|
|
56133
|
-
return axios$1;
|
|
56134
56183
|
}
|
|
56135
|
-
var axiosExports = requireAxios();
|
|
56136
|
-
const axios = /* @__PURE__ */ getDefaultExportFromCjs(axiosExports);
|
|
56137
56184
|
class ServiceRecordsApi {
|
|
56138
56185
|
/**
|
|
56139
56186
|
* Initializes the ServiceRecordsApi instance.
|