@bbn/bbn 1.0.79 → 1.0.81
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/bundle.d.ts +28 -28
- package/dist/bundle.js +127 -128
- package/dist/fn/ajax/_addLoader.js +0 -2
- package/dist/fn/ajax/ajax.js +6 -10
- package/dist/fn/ajax/callback.js +5 -8
- package/dist/fn/ajax/download.js +1 -2
- package/dist/fn/ajax/link.js +2 -3
- package/package.json +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -1530,22 +1530,6 @@ declare module "fn/object/extend" {
|
|
|
1530
1530
|
const extend: (...originalArgs: (boolean | object)[]) => any;
|
|
1531
1531
|
export { extend };
|
|
1532
1532
|
}
|
|
1533
|
-
declare module "fn/default/defaultEndLoadingFunction" {
|
|
1534
|
-
const defaultEndLoadingFunction: (url: string, timestamp: number, data?: object, res?: object) => boolean;
|
|
1535
|
-
export { defaultEndLoadingFunction };
|
|
1536
|
-
}
|
|
1537
|
-
declare module "fn/default/defaultAjaxErrorFunction" {
|
|
1538
|
-
const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => void;
|
|
1539
|
-
export { defaultAjaxErrorFunction };
|
|
1540
|
-
}
|
|
1541
|
-
declare module "fn/default/defaultAjaxAbortFunction" {
|
|
1542
|
-
const defaultAjaxAbortFunction: (message: string, url?: string) => void;
|
|
1543
|
-
export { defaultAjaxAbortFunction };
|
|
1544
|
-
}
|
|
1545
|
-
declare module "fn/default/defaultStartLoadingFunction" {
|
|
1546
|
-
const defaultStartLoadingFunction: (url: string, tst: number, data?: object, requestId?: string) => boolean;
|
|
1547
|
-
export { defaultStartLoadingFunction };
|
|
1548
|
-
}
|
|
1549
1533
|
declare module "fn/ajax/ajax" {
|
|
1550
1534
|
/**
|
|
1551
1535
|
* Creates an XHR object and returns the Promise.
|
|
@@ -1803,18 +1787,6 @@ declare module "fn/datetime/calendar" {
|
|
|
1803
1787
|
const calendar: (d?: Date | number | string, wrong_result?: string) => any;
|
|
1804
1788
|
export { calendar };
|
|
1805
1789
|
}
|
|
1806
|
-
declare module "fn/default/defaultLinkFunction" {
|
|
1807
|
-
const defaultLinkFunction: (responseObj: any, ele: any) => boolean;
|
|
1808
|
-
export { defaultLinkFunction };
|
|
1809
|
-
}
|
|
1810
|
-
declare module "fn/default/defaultPostLinkFunction" {
|
|
1811
|
-
const defaultPostLinkFunction: (r: object, ele?: HTMLElement) => boolean;
|
|
1812
|
-
export { defaultPostLinkFunction };
|
|
1813
|
-
}
|
|
1814
|
-
declare module "fn/default/defaultAlertFunction" {
|
|
1815
|
-
const defaultAlertFunction: (msg: string, title?: string) => void;
|
|
1816
|
-
export { defaultAlertFunction };
|
|
1817
|
-
}
|
|
1818
1790
|
declare module "fn/ajax/callback" {
|
|
1819
1791
|
/**
|
|
1820
1792
|
* Executes a serie of predefined actions once an Ajax request has been done.
|
|
@@ -2184,10 +2156,26 @@ declare module "fn/object/deepPath" {
|
|
|
2184
2156
|
const deepPath: (arr: any[], filter: object, deepProperty: string, res?: any[]) => false | any[];
|
|
2185
2157
|
export { deepPath };
|
|
2186
2158
|
}
|
|
2159
|
+
declare module "fn/default/defaultAjaxAbortFunction" {
|
|
2160
|
+
const defaultAjaxAbortFunction: (message: string, url?: string) => void;
|
|
2161
|
+
export { defaultAjaxAbortFunction };
|
|
2162
|
+
}
|
|
2163
|
+
declare module "fn/default/defaultAjaxErrorFunction" {
|
|
2164
|
+
const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => void;
|
|
2165
|
+
export { defaultAjaxErrorFunction };
|
|
2166
|
+
}
|
|
2167
|
+
declare module "fn/default/defaultAlertFunction" {
|
|
2168
|
+
const defaultAlertFunction: (msg: string, title?: string) => void;
|
|
2169
|
+
export { defaultAlertFunction };
|
|
2170
|
+
}
|
|
2187
2171
|
declare module "fn/default/defaultConfirmFunction" {
|
|
2188
2172
|
const defaultConfirmFunction: (text: string, yesFn: () => any, noFn: () => any) => void;
|
|
2189
2173
|
export { defaultConfirmFunction };
|
|
2190
2174
|
}
|
|
2175
|
+
declare module "fn/default/defaultEndLoadingFunction" {
|
|
2176
|
+
const defaultEndLoadingFunction: (url: string, timestamp: number, data?: object, res?: object) => boolean;
|
|
2177
|
+
export { defaultEndLoadingFunction };
|
|
2178
|
+
}
|
|
2191
2179
|
declare module "fn/default/defaultErrorFunction" {
|
|
2192
2180
|
const defaultErrorFunction: (message: any) => void;
|
|
2193
2181
|
export { defaultErrorFunction };
|
|
@@ -2196,6 +2184,14 @@ declare module "fn/default/defaultHistoryFunction" {
|
|
|
2196
2184
|
const defaultHistoryFunction: (obj: any) => boolean;
|
|
2197
2185
|
export { defaultHistoryFunction };
|
|
2198
2186
|
}
|
|
2187
|
+
declare module "fn/default/defaultLinkFunction" {
|
|
2188
|
+
const defaultLinkFunction: (responseObj: any, ele: any) => boolean;
|
|
2189
|
+
export { defaultLinkFunction };
|
|
2190
|
+
}
|
|
2191
|
+
declare module "fn/default/defaultPostLinkFunction" {
|
|
2192
|
+
const defaultPostLinkFunction: (r: object, ele?: HTMLElement) => boolean;
|
|
2193
|
+
export { defaultPostLinkFunction };
|
|
2194
|
+
}
|
|
2199
2195
|
declare module "fn/default/defaultPreLinkFunction" {
|
|
2200
2196
|
const defaultPreLinkFunction: (url: string, force?: boolean, ele?: HTMLElement) => any;
|
|
2201
2197
|
export { defaultPreLinkFunction };
|
|
@@ -2204,6 +2200,10 @@ declare module "fn/default/defaultResizeFunction" {
|
|
|
2204
2200
|
const defaultResizeFunction: () => boolean;
|
|
2205
2201
|
export { defaultResizeFunction };
|
|
2206
2202
|
}
|
|
2203
|
+
declare module "fn/default/defaultStartLoadingFunction" {
|
|
2204
|
+
const defaultStartLoadingFunction: (url: string, tst: number, data?: object, requestId?: string) => boolean;
|
|
2205
|
+
export { defaultStartLoadingFunction };
|
|
2206
|
+
}
|
|
2207
2207
|
declare module "fn/object/deleteProp" {
|
|
2208
2208
|
/**
|
|
2209
2209
|
* Gets the given property from the given object
|
package/dist/bundle.js
CHANGED
|
@@ -926,7 +926,7 @@
|
|
|
926
926
|
};
|
|
927
927
|
exports.db = db;
|
|
928
928
|
});
|
|
929
|
-
define("fn/ajax/_addLoader", ["require", "exports", "fn/string/substr"
|
|
929
|
+
define("fn/ajax/_addLoader", ["require", "exports", "fn/string/substr"], function (require, exports, substr_2) {
|
|
930
930
|
"use strict";
|
|
931
931
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
932
932
|
exports._addLoader = void 0;
|
|
@@ -945,7 +945,6 @@
|
|
|
945
945
|
* @returns {Number} The timestamp (in ms)
|
|
946
946
|
*/
|
|
947
947
|
const _addLoader = function (requestId, prom, source) {
|
|
948
|
-
(0, log_5.log)('_addLoader', requestId);
|
|
949
948
|
/** @var {Number} tst Current timestamp */
|
|
950
949
|
let tst = new Date().getTime();
|
|
951
950
|
/** @var {String} url The original URL (part of requestId before : and md5) */
|
|
@@ -1026,7 +1025,7 @@
|
|
|
1026
1025
|
};
|
|
1027
1026
|
exports.getProperty = getProperty;
|
|
1028
1027
|
});
|
|
1029
|
-
define("fn/string/removeAccents", ["require", "exports", "fn/type/isString", "fn/browser/log"], function (require, exports, isString_3,
|
|
1028
|
+
define("fn/string/removeAccents", ["require", "exports", "fn/type/isString", "fn/browser/log"], function (require, exports, isString_3, log_5) {
|
|
1030
1029
|
"use strict";
|
|
1031
1030
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1032
1031
|
exports.removeAccents = void 0;
|
|
@@ -1051,7 +1050,7 @@
|
|
|
1051
1050
|
st = st.toString();
|
|
1052
1051
|
}
|
|
1053
1052
|
else {
|
|
1054
|
-
(0,
|
|
1053
|
+
(0, log_5.log)(st);
|
|
1055
1054
|
throw new Error(bbn._("removeAccent expects a string"));
|
|
1056
1055
|
}
|
|
1057
1056
|
}
|
|
@@ -1384,7 +1383,7 @@
|
|
|
1384
1383
|
};
|
|
1385
1384
|
exports.isCp = isCp;
|
|
1386
1385
|
});
|
|
1387
|
-
define("fn/object/circularReplacer", ["require", "exports", "fn/type/isDom", "fn/type/isCp", "fn/browser/log"], function (require, exports, isDom_2, isCp_1,
|
|
1386
|
+
define("fn/object/circularReplacer", ["require", "exports", "fn/type/isDom", "fn/type/isCp", "fn/browser/log"], function (require, exports, isDom_2, isCp_1, log_6) {
|
|
1388
1387
|
"use strict";
|
|
1389
1388
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1390
1389
|
exports.circularReplacer = void 0;
|
|
@@ -1412,7 +1411,7 @@
|
|
|
1412
1411
|
}
|
|
1413
1412
|
}
|
|
1414
1413
|
else if ((0, isCp_1.isCp)(value)) {
|
|
1415
|
-
(0,
|
|
1414
|
+
(0, log_6.log)("IS CP");
|
|
1416
1415
|
value = "__BBN_CP__" + value.$options.name + "/" + value.$cid;
|
|
1417
1416
|
}
|
|
1418
1417
|
else {
|
|
@@ -1466,7 +1465,7 @@
|
|
|
1466
1465
|
};
|
|
1467
1466
|
exports.simpleHash = simpleHash;
|
|
1468
1467
|
});
|
|
1469
|
-
define("fn/string/hash", ["require", "exports", "fn/browser/log", "fn/type/isDom", "fn/type/isCp", "fn/object/circularReplacer", "fn/string/simpleHash"], function (require, exports,
|
|
1468
|
+
define("fn/string/hash", ["require", "exports", "fn/browser/log", "fn/type/isDom", "fn/type/isCp", "fn/object/circularReplacer", "fn/string/simpleHash"], function (require, exports, log_7, isDom_3, isCp_2, circularReplacer_1, simpleHash_1) {
|
|
1470
1469
|
"use strict";
|
|
1471
1470
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1472
1471
|
exports.hash = void 0;
|
|
@@ -1491,7 +1490,7 @@
|
|
|
1491
1490
|
}
|
|
1492
1491
|
}
|
|
1493
1492
|
else if ((0, isCp_2.isCp)(value)) {
|
|
1494
|
-
(0,
|
|
1493
|
+
(0, log_7.log)("IS CP");
|
|
1495
1494
|
st += "__BBN_CP__" + value.$options.name + "/" + value.$cid;
|
|
1496
1495
|
}
|
|
1497
1496
|
else {
|
|
@@ -3046,43 +3045,7 @@
|
|
|
3046
3045
|
};
|
|
3047
3046
|
exports.extend = extend;
|
|
3048
3047
|
});
|
|
3049
|
-
define("fn/
|
|
3050
|
-
"use strict";
|
|
3051
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3052
|
-
exports.defaultEndLoadingFunction = void 0;
|
|
3053
|
-
const defaultEndLoadingFunction = function (url, timestamp, data, res) {
|
|
3054
|
-
return true;
|
|
3055
|
-
};
|
|
3056
|
-
exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
|
|
3057
|
-
});
|
|
3058
|
-
define("fn/default/defaultAjaxErrorFunction", ["require", "exports", "fn/browser/log"], function (require, exports, log_9) {
|
|
3059
|
-
"use strict";
|
|
3060
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3061
|
-
exports.defaultAjaxErrorFunction = void 0;
|
|
3062
|
-
const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
|
|
3063
|
-
(0, log_9.log)(textStatus, errorThrown);
|
|
3064
|
-
};
|
|
3065
|
-
exports.defaultAjaxErrorFunction = defaultAjaxErrorFunction;
|
|
3066
|
-
});
|
|
3067
|
-
define("fn/default/defaultAjaxAbortFunction", ["require", "exports", "fn/browser/log"], function (require, exports, log_10) {
|
|
3068
|
-
"use strict";
|
|
3069
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3070
|
-
exports.defaultAjaxAbortFunction = void 0;
|
|
3071
|
-
const defaultAjaxAbortFunction = function (message, url = "") {
|
|
3072
|
-
(0, log_10.log)(message);
|
|
3073
|
-
};
|
|
3074
|
-
exports.defaultAjaxAbortFunction = defaultAjaxAbortFunction;
|
|
3075
|
-
});
|
|
3076
|
-
define("fn/default/defaultStartLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
3077
|
-
"use strict";
|
|
3078
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3079
|
-
exports.defaultStartLoadingFunction = void 0;
|
|
3080
|
-
const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
|
|
3081
|
-
return true;
|
|
3082
|
-
};
|
|
3083
|
-
exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
|
|
3084
|
-
});
|
|
3085
|
-
define("fn/ajax/ajax", ["require", "exports", "fn/type/isObject", "fn/string/replaceAll", "fn/ajax/getRequestId", "fn/ajax/getLoader", "fn/object/extend", "fn/object/numProperties", "fn/ajax/_deleteLoader", "fn/default/defaultEndLoadingFunction", "fn/type/isFunction", "fn/default/defaultAjaxErrorFunction", "fn/default/defaultAjaxAbortFunction", "fn/ajax/_addLoader", "fn/default/defaultStartLoadingFunction"], function (require, exports, isObject_8, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_4, _deleteLoader_1, defaultEndLoadingFunction_1, isFunction_3, defaultAjaxErrorFunction_1, defaultAjaxAbortFunction_1, _addLoader_1, defaultStartLoadingFunction_1) {
|
|
3048
|
+
define("fn/ajax/ajax", ["require", "exports", "fn/type/isObject", "fn/string/replaceAll", "fn/ajax/getRequestId", "fn/ajax/getLoader", "fn/object/extend", "fn/object/numProperties", "fn/ajax/_deleteLoader", "fn/type/isFunction", "fn/ajax/_addLoader"], function (require, exports, isObject_8, replaceAll_1, getRequestId_1, getLoader_2, extend_1, numProperties_4, _deleteLoader_1, isFunction_3, _addLoader_1) {
|
|
3086
3049
|
"use strict";
|
|
3087
3050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3088
3051
|
exports.ajax = void 0;
|
|
@@ -3203,7 +3166,7 @@
|
|
|
3203
3166
|
.apply(null, args)
|
|
3204
3167
|
.then((res) => {
|
|
3205
3168
|
(0, _deleteLoader_1._deleteLoader)(requestId, res);
|
|
3206
|
-
|
|
3169
|
+
bbn.fn.defaultEndLoadingFunction(url, tst, data, res);
|
|
3207
3170
|
switch (res.status) {
|
|
3208
3171
|
case 200:
|
|
3209
3172
|
if ((0, isFunction_3.isFunction)(success)) {
|
|
@@ -3211,21 +3174,21 @@
|
|
|
3211
3174
|
}
|
|
3212
3175
|
break;
|
|
3213
3176
|
default:
|
|
3214
|
-
|
|
3177
|
+
bbn.fn.defaultAjaxErrorFunction(loader, res);
|
|
3215
3178
|
}
|
|
3216
3179
|
return res;
|
|
3217
3180
|
})
|
|
3218
3181
|
.catch((err) => {
|
|
3219
3182
|
let isAbort = axios.isCancel(err);
|
|
3220
3183
|
(0, _deleteLoader_1._deleteLoader)(requestId, err.message || err.response.data, isAbort);
|
|
3221
|
-
|
|
3184
|
+
bbn.fn.defaultEndLoadingFunction(url, tst, data, err);
|
|
3222
3185
|
if (isAbort) {
|
|
3223
3186
|
let ok = 1;
|
|
3224
3187
|
if ((0, isFunction_3.isFunction)(abort)) {
|
|
3225
3188
|
ok = abort(err.message, url);
|
|
3226
3189
|
}
|
|
3227
3190
|
if (ok) {
|
|
3228
|
-
|
|
3191
|
+
bbn.fn.defaultAjaxAbortFunction(err.message, url);
|
|
3229
3192
|
}
|
|
3230
3193
|
}
|
|
3231
3194
|
else {
|
|
@@ -3234,12 +3197,12 @@
|
|
|
3234
3197
|
ok = failure(err.request, err);
|
|
3235
3198
|
}
|
|
3236
3199
|
if (ok) {
|
|
3237
|
-
|
|
3200
|
+
bbn.fn.defaultAjaxErrorFunction(err.request, err.response ? err.response.data : "", err.response ? err.response.status : err);
|
|
3238
3201
|
}
|
|
3239
3202
|
}
|
|
3240
3203
|
});
|
|
3241
3204
|
let tst = (0, _addLoader_1._addLoader)(requestId, loader, source);
|
|
3242
|
-
|
|
3205
|
+
bbn.fn.defaultStartLoadingFunction(url, tst, data, requestId);
|
|
3243
3206
|
return loader;
|
|
3244
3207
|
}
|
|
3245
3208
|
};
|
|
@@ -3726,35 +3689,7 @@
|
|
|
3726
3689
|
};
|
|
3727
3690
|
exports.calendar = calendar;
|
|
3728
3691
|
});
|
|
3729
|
-
define("fn/
|
|
3730
|
-
"use strict";
|
|
3731
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3732
|
-
exports.defaultLinkFunction = void 0;
|
|
3733
|
-
const defaultLinkFunction = function (responseObj, ele) {
|
|
3734
|
-
return true;
|
|
3735
|
-
};
|
|
3736
|
-
exports.defaultLinkFunction = defaultLinkFunction;
|
|
3737
|
-
});
|
|
3738
|
-
define("fn/default/defaultPostLinkFunction", ["require", "exports"], function (require, exports) {
|
|
3739
|
-
"use strict";
|
|
3740
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3741
|
-
exports.defaultPostLinkFunction = void 0;
|
|
3742
|
-
const defaultPostLinkFunction = function (r, ele) {
|
|
3743
|
-
return true;
|
|
3744
|
-
};
|
|
3745
|
-
exports.defaultPostLinkFunction = defaultPostLinkFunction;
|
|
3746
|
-
});
|
|
3747
|
-
define("fn/default/defaultAlertFunction", ["require", "exports"], function (require, exports) {
|
|
3748
|
-
"use strict";
|
|
3749
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3750
|
-
exports.defaultAlertFunction = void 0;
|
|
3751
|
-
const defaultAlertFunction = function (msg, title) {
|
|
3752
|
-
/** @todo */
|
|
3753
|
-
alert(msg);
|
|
3754
|
-
};
|
|
3755
|
-
exports.defaultAlertFunction = defaultAlertFunction;
|
|
3756
|
-
});
|
|
3757
|
-
define("fn/ajax/callback", ["require", "exports", "fn/browser/error", "fn/default/defaultLinkFunction", "fn/type/isFunction", "fn/browser/log", "fn/default/defaultPostLinkFunction", "fn/default/defaultAlertFunction"], function (require, exports, error_2, defaultLinkFunction_1, isFunction_4, log_11, defaultPostLinkFunction_1, defaultAlertFunction_1) {
|
|
3692
|
+
define("fn/ajax/callback", ["require", "exports", "fn/browser/error", "fn/type/isFunction", "fn/browser/log"], function (require, exports, error_2, isFunction_4, log_8) {
|
|
3758
3693
|
"use strict";
|
|
3759
3694
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3760
3695
|
exports.callback = void 0;
|
|
@@ -3817,7 +3752,7 @@
|
|
|
3817
3752
|
tmp = fn(res, ele);
|
|
3818
3753
|
}
|
|
3819
3754
|
else {
|
|
3820
|
-
tmp =
|
|
3755
|
+
tmp = bbn.fn.defaultLinkFunction(res, ele);
|
|
3821
3756
|
}
|
|
3822
3757
|
if (ele && isObj && (res.content !== undefined)) {
|
|
3823
3758
|
if ('value' in ele) {
|
|
@@ -3841,7 +3776,7 @@
|
|
|
3841
3776
|
}
|
|
3842
3777
|
}
|
|
3843
3778
|
catch (e) {
|
|
3844
|
-
(0,
|
|
3779
|
+
(0, log_8.log)(e, res);
|
|
3845
3780
|
(0, error_2.error)((0, isFunction_4.isFunction)(e.getMessage) ? e.getMessage() : null);
|
|
3846
3781
|
}
|
|
3847
3782
|
return r;
|
|
@@ -3852,19 +3787,19 @@
|
|
|
3852
3787
|
if (tmp && fn2 && (0, isFunction_4.isFunction)(fn2)) {
|
|
3853
3788
|
fn2(res);
|
|
3854
3789
|
}
|
|
3855
|
-
else if (isObj &&
|
|
3856
|
-
|
|
3790
|
+
else if (isObj && bbn.fn.defaultPostLinkFunction) {
|
|
3791
|
+
bbn.fn.defaultPostLinkFunction(res, ele);
|
|
3857
3792
|
}
|
|
3858
3793
|
if (tmp && isObj && res.postscript) {
|
|
3859
3794
|
eval(res.postscript);
|
|
3860
3795
|
}
|
|
3861
3796
|
if (isObj && res.error) {
|
|
3862
3797
|
errTitle = res.errorTitle || bbn.lng.server_response;
|
|
3863
|
-
|
|
3798
|
+
bbn.fn.defaultAlertFunction(res.error, errTitle);
|
|
3864
3799
|
}
|
|
3865
3800
|
}
|
|
3866
3801
|
else {
|
|
3867
|
-
|
|
3802
|
+
bbn.fn.defaultAlertFunction(bbn.lng.errorText, bbn.lng.error);
|
|
3868
3803
|
}
|
|
3869
3804
|
return tmp;
|
|
3870
3805
|
};
|
|
@@ -4478,6 +4413,34 @@
|
|
|
4478
4413
|
};
|
|
4479
4414
|
exports.deepPath = deepPath;
|
|
4480
4415
|
});
|
|
4416
|
+
define("fn/default/defaultAjaxAbortFunction", ["require", "exports", "fn/browser/log"], function (require, exports, log_9) {
|
|
4417
|
+
"use strict";
|
|
4418
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4419
|
+
exports.defaultAjaxAbortFunction = void 0;
|
|
4420
|
+
const defaultAjaxAbortFunction = function (message, url = "") {
|
|
4421
|
+
(0, log_9.log)(message);
|
|
4422
|
+
};
|
|
4423
|
+
exports.defaultAjaxAbortFunction = defaultAjaxAbortFunction;
|
|
4424
|
+
});
|
|
4425
|
+
define("fn/default/defaultAjaxErrorFunction", ["require", "exports", "fn/browser/log"], function (require, exports, log_10) {
|
|
4426
|
+
"use strict";
|
|
4427
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4428
|
+
exports.defaultAjaxErrorFunction = void 0;
|
|
4429
|
+
const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
|
|
4430
|
+
(0, log_10.log)(textStatus, errorThrown);
|
|
4431
|
+
};
|
|
4432
|
+
exports.defaultAjaxErrorFunction = defaultAjaxErrorFunction;
|
|
4433
|
+
});
|
|
4434
|
+
define("fn/default/defaultAlertFunction", ["require", "exports"], function (require, exports) {
|
|
4435
|
+
"use strict";
|
|
4436
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4437
|
+
exports.defaultAlertFunction = void 0;
|
|
4438
|
+
const defaultAlertFunction = function (msg, title) {
|
|
4439
|
+
/** @todo */
|
|
4440
|
+
alert(msg);
|
|
4441
|
+
};
|
|
4442
|
+
exports.defaultAlertFunction = defaultAlertFunction;
|
|
4443
|
+
});
|
|
4481
4444
|
define("fn/default/defaultConfirmFunction", ["require", "exports", "fn/type/isFunction"], function (require, exports, isFunction_6) {
|
|
4482
4445
|
"use strict";
|
|
4483
4446
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -4496,12 +4459,21 @@
|
|
|
4496
4459
|
};
|
|
4497
4460
|
exports.defaultConfirmFunction = defaultConfirmFunction;
|
|
4498
4461
|
});
|
|
4499
|
-
define("fn/default/
|
|
4462
|
+
define("fn/default/defaultEndLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
4463
|
+
"use strict";
|
|
4464
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4465
|
+
exports.defaultEndLoadingFunction = void 0;
|
|
4466
|
+
const defaultEndLoadingFunction = function (url, timestamp, data, res) {
|
|
4467
|
+
return true;
|
|
4468
|
+
};
|
|
4469
|
+
exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
|
|
4470
|
+
});
|
|
4471
|
+
define("fn/default/defaultErrorFunction", ["require", "exports", "fn/browser/log"], function (require, exports, log_11) {
|
|
4500
4472
|
"use strict";
|
|
4501
4473
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4502
4474
|
exports.defaultErrorFunction = void 0;
|
|
4503
4475
|
const defaultErrorFunction = function (message) {
|
|
4504
|
-
(0,
|
|
4476
|
+
(0, log_11.log)(message);
|
|
4505
4477
|
};
|
|
4506
4478
|
exports.defaultErrorFunction = defaultErrorFunction;
|
|
4507
4479
|
});
|
|
@@ -4514,12 +4486,30 @@
|
|
|
4514
4486
|
};
|
|
4515
4487
|
exports.defaultHistoryFunction = defaultHistoryFunction;
|
|
4516
4488
|
});
|
|
4517
|
-
define("fn/default/
|
|
4489
|
+
define("fn/default/defaultLinkFunction", ["require", "exports"], function (require, exports) {
|
|
4490
|
+
"use strict";
|
|
4491
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4492
|
+
exports.defaultLinkFunction = void 0;
|
|
4493
|
+
const defaultLinkFunction = function (responseObj, ele) {
|
|
4494
|
+
return true;
|
|
4495
|
+
};
|
|
4496
|
+
exports.defaultLinkFunction = defaultLinkFunction;
|
|
4497
|
+
});
|
|
4498
|
+
define("fn/default/defaultPostLinkFunction", ["require", "exports"], function (require, exports) {
|
|
4499
|
+
"use strict";
|
|
4500
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4501
|
+
exports.defaultPostLinkFunction = void 0;
|
|
4502
|
+
const defaultPostLinkFunction = function (r, ele) {
|
|
4503
|
+
return true;
|
|
4504
|
+
};
|
|
4505
|
+
exports.defaultPostLinkFunction = defaultPostLinkFunction;
|
|
4506
|
+
});
|
|
4507
|
+
define("fn/default/defaultPreLinkFunction", ["require", "exports", "fn/browser/log"], function (require, exports, log_12) {
|
|
4518
4508
|
"use strict";
|
|
4519
4509
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4520
4510
|
exports.defaultPreLinkFunction = void 0;
|
|
4521
4511
|
const defaultPreLinkFunction = function (url, force, ele) {
|
|
4522
|
-
(0,
|
|
4512
|
+
(0, log_12.log)("defaultPreLinkFunction", url, force, ele);
|
|
4523
4513
|
return true;
|
|
4524
4514
|
};
|
|
4525
4515
|
exports.defaultPreLinkFunction = defaultPreLinkFunction;
|
|
@@ -4533,6 +4523,15 @@
|
|
|
4533
4523
|
};
|
|
4534
4524
|
exports.defaultResizeFunction = defaultResizeFunction;
|
|
4535
4525
|
});
|
|
4526
|
+
define("fn/default/defaultStartLoadingFunction", ["require", "exports"], function (require, exports) {
|
|
4527
|
+
"use strict";
|
|
4528
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4529
|
+
exports.defaultStartLoadingFunction = void 0;
|
|
4530
|
+
const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
|
|
4531
|
+
return true;
|
|
4532
|
+
};
|
|
4533
|
+
exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
|
|
4534
|
+
});
|
|
4536
4535
|
define("fn/object/deleteProp", ["require", "exports", "fn/type/checkType"], function (require, exports, checkType_2) {
|
|
4537
4536
|
"use strict";
|
|
4538
4537
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -4897,7 +4896,7 @@
|
|
|
4897
4896
|
};
|
|
4898
4897
|
exports.isCanvas = isCanvas;
|
|
4899
4898
|
});
|
|
4900
|
-
define("fn/ajax/downloadContent", ["require", "exports", "fn/type/isCanvas", "fn/type/isObject", "fn/type/isString", "fn/browser/log"], function (require, exports, isCanvas_1, isObject_12, isString_11,
|
|
4899
|
+
define("fn/ajax/downloadContent", ["require", "exports", "fn/type/isCanvas", "fn/type/isObject", "fn/type/isString", "fn/browser/log"], function (require, exports, isCanvas_1, isObject_12, isString_11, log_13) {
|
|
4901
4900
|
"use strict";
|
|
4902
4901
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4903
4902
|
exports.downloadContent = void 0;
|
|
@@ -4958,7 +4957,7 @@
|
|
|
4958
4957
|
src = content;
|
|
4959
4958
|
}
|
|
4960
4959
|
catch (e) {
|
|
4961
|
-
(0,
|
|
4960
|
+
(0, log_13.log)(e);
|
|
4962
4961
|
}
|
|
4963
4962
|
}
|
|
4964
4963
|
a.href = window.URL.createObjectURL(src);
|
|
@@ -4972,7 +4971,7 @@
|
|
|
4972
4971
|
};
|
|
4973
4972
|
exports.downloadContent = downloadContent;
|
|
4974
4973
|
});
|
|
4975
|
-
define("fn/ajax/download", ["require", "exports", "fn/ajax/ajax", "fn/string/substr", "fn/string/baseName", "fn/type/isBlob", "fn/string/fileExt", "fn/ajax/downloadContent"
|
|
4974
|
+
define("fn/ajax/download", ["require", "exports", "fn/ajax/ajax", "fn/string/substr", "fn/string/baseName", "fn/type/isBlob", "fn/string/fileExt", "fn/ajax/downloadContent"], function (require, exports, ajax_1, substr_7, baseName_1, isBlob_1, fileExt_1, downloadContent_1) {
|
|
4976
4975
|
"use strict";
|
|
4977
4976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4978
4977
|
exports.download = void 0;
|
|
@@ -5029,7 +5028,7 @@
|
|
|
5029
5028
|
}
|
|
5030
5029
|
}
|
|
5031
5030
|
}, e => {
|
|
5032
|
-
|
|
5031
|
+
bbn.fn.defaultAjaxErrorFunction(e);
|
|
5033
5032
|
});
|
|
5034
5033
|
};
|
|
5035
5034
|
exports.download = download;
|
|
@@ -5924,7 +5923,7 @@
|
|
|
5924
5923
|
};
|
|
5925
5924
|
exports.getDeviceType = getDeviceType;
|
|
5926
5925
|
});
|
|
5927
|
-
define("fn/html/getHTMLOfSelection", ["require", "exports", "fn/browser/log"], function (require, exports,
|
|
5926
|
+
define("fn/html/getHTMLOfSelection", ["require", "exports", "fn/browser/log"], function (require, exports, log_14) {
|
|
5928
5927
|
"use strict";
|
|
5929
5928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5930
5929
|
exports.getHTMLOfSelection = void 0;
|
|
@@ -5933,9 +5932,9 @@
|
|
|
5933
5932
|
let selection = window.getSelection();
|
|
5934
5933
|
if (selection.rangeCount > 0) {
|
|
5935
5934
|
range = selection.getRangeAt(0);
|
|
5936
|
-
(0,
|
|
5935
|
+
(0, log_14.log)('RANGE', range);
|
|
5937
5936
|
let clonedSelection = range.cloneContents();
|
|
5938
|
-
(0,
|
|
5937
|
+
(0, log_14.log)('clonedSelection', clonedSelection);
|
|
5939
5938
|
let div = document.createElement('div');
|
|
5940
5939
|
div.appendChild(clonedSelection);
|
|
5941
5940
|
return div.innerHTML;
|
|
@@ -6307,7 +6306,7 @@
|
|
|
6307
6306
|
};
|
|
6308
6307
|
exports.getTimeoff = getTimeoff;
|
|
6309
6308
|
});
|
|
6310
|
-
define("fn/browser/happy", ["require", "exports", "fn/browser/log"], function (require, exports,
|
|
6309
|
+
define("fn/browser/happy", ["require", "exports", "fn/browser/log"], function (require, exports, log_15) {
|
|
6311
6310
|
"use strict";
|
|
6312
6311
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6313
6312
|
exports.happy = void 0;
|
|
@@ -6328,7 +6327,7 @@
|
|
|
6328
6327
|
_bbn_console_level: 3,
|
|
6329
6328
|
_bbn_console_style: 'color: white; background: green; font-size: 18px;',
|
|
6330
6329
|
});
|
|
6331
|
-
|
|
6330
|
+
log_15.log.apply(this, args);
|
|
6332
6331
|
return this;
|
|
6333
6332
|
};
|
|
6334
6333
|
exports.happy = happy;
|
|
@@ -6440,7 +6439,7 @@
|
|
|
6440
6439
|
};
|
|
6441
6440
|
exports.imgToBase64 = imgToBase64;
|
|
6442
6441
|
});
|
|
6443
|
-
define("fn/browser/info", ["require", "exports", "fn/browser/log"], function (require, exports,
|
|
6442
|
+
define("fn/browser/info", ["require", "exports", "fn/browser/log"], function (require, exports, log_16) {
|
|
6444
6443
|
"use strict";
|
|
6445
6444
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6446
6445
|
exports.info = void 0;
|
|
@@ -6458,7 +6457,7 @@
|
|
|
6458
6457
|
_bbn_console_level: 4,
|
|
6459
6458
|
_bbn_console_style: 'color: #EEE; background: blue; font-size: 12px;',
|
|
6460
6459
|
});
|
|
6461
|
-
|
|
6460
|
+
log_16.log.apply(this, args);
|
|
6462
6461
|
return this;
|
|
6463
6462
|
};
|
|
6464
6463
|
exports.info = info;
|
|
@@ -6672,7 +6671,7 @@
|
|
|
6672
6671
|
};
|
|
6673
6672
|
exports.setNavigationVars = setNavigationVars;
|
|
6674
6673
|
});
|
|
6675
|
-
define("fn/ajax/link", ["require", "exports", "fn/ajax/treatAjaxArguments", "fn/ajax/getLoader", "fn/
|
|
6674
|
+
define("fn/ajax/link", ["require", "exports", "fn/ajax/treatAjaxArguments", "fn/ajax/getLoader", "fn/ajax/ajax", "fn/browser/log", "fn/object/extend", "fn/type/isObject", "fn/ajax/callback", "fn/ajax/setNavigationVars"], function (require, exports, treatAjaxArguments_1, getLoader_3, ajax_2, log_17, extend_6, isObject_15, callback_1, setNavigationVars_1) {
|
|
6676
6675
|
"use strict";
|
|
6677
6676
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6678
6677
|
exports.link = void 0;
|
|
@@ -6753,8 +6752,8 @@
|
|
|
6753
6752
|
if (cfg.successFn) {
|
|
6754
6753
|
ok = cfg.successFn(cfg.url);
|
|
6755
6754
|
}
|
|
6756
|
-
else if (
|
|
6757
|
-
ok =
|
|
6755
|
+
else if (bbn.fn.defaultPreLinkFunction) {
|
|
6756
|
+
ok = bbn.fn.defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
|
|
6758
6757
|
if (ok.data !== undefined) {
|
|
6759
6758
|
(0, extend_6.extend)(cfg.obj, ok.data);
|
|
6760
6759
|
ok = 1;
|
|
@@ -6768,12 +6767,12 @@
|
|
|
6768
6767
|
let errSt = bbn._('The Ajax call to') + ' ' + cfg.url + ' ';
|
|
6769
6768
|
return (0, ajax_2.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
|
|
6770
6769
|
if (!res) {
|
|
6771
|
-
(0,
|
|
6770
|
+
(0, log_17.log)(errSt + bbn._('returned no answer'));
|
|
6772
6771
|
}
|
|
6773
6772
|
if ((0, isObject_15.isObject)(res)) {
|
|
6774
6773
|
// If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
|
|
6775
6774
|
if (Object.keys(res).length === 0) {
|
|
6776
|
-
(0,
|
|
6775
|
+
(0, log_17.log)(errSt + bbn._('returned an empty object'));
|
|
6777
6776
|
}
|
|
6778
6777
|
if (res.new_url) {
|
|
6779
6778
|
res.old_path = cfg.url;
|
|
@@ -6989,7 +6988,7 @@
|
|
|
6989
6988
|
};
|
|
6990
6989
|
exports.isMobile = isMobile;
|
|
6991
6990
|
});
|
|
6992
|
-
define("fn/init", ["require", "exports", "fn/string/substr", "fn/loop/each", "fn/object/extend", "fn/style/addColors", "fn/ajax/link", "fn/form/submit", "fn/style/resize", "fn/browser/isMobile", "fn/browser/isTabletDevice", "fn/default/defaultHistoryFunction", "fn/type/isFunction", "fn/browser/log"], function (require, exports, substr_11, each_18, extend_7, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_9,
|
|
6991
|
+
define("fn/init", ["require", "exports", "fn/string/substr", "fn/loop/each", "fn/object/extend", "fn/style/addColors", "fn/ajax/link", "fn/form/submit", "fn/style/resize", "fn/browser/isMobile", "fn/browser/isTabletDevice", "fn/default/defaultHistoryFunction", "fn/type/isFunction", "fn/browser/log"], function (require, exports, substr_11, each_18, extend_7, addColors_1, link_1, submit_1, resize_1, isMobile_1, isTabletDevice_2, defaultHistoryFunction_1, isFunction_9, log_18) {
|
|
6993
6992
|
"use strict";
|
|
6994
6993
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6995
6994
|
exports.init = void 0;
|
|
@@ -7156,7 +7155,7 @@
|
|
|
7156
7155
|
bbn.env.isInit = true;
|
|
7157
7156
|
document.dispatchEvent(new Event('bbninit'));
|
|
7158
7157
|
if (bbn.env.logging) {
|
|
7159
|
-
(0,
|
|
7158
|
+
(0, log_18.log)('Logging in bbn is enabled');
|
|
7160
7159
|
}
|
|
7161
7160
|
}
|
|
7162
7161
|
};
|
|
@@ -7839,7 +7838,7 @@
|
|
|
7839
7838
|
};
|
|
7840
7839
|
exports.lightenDarkenHex = lightenDarkenHex;
|
|
7841
7840
|
});
|
|
7842
|
-
define("fn/browser/warning", ["require", "exports", "fn/browser/log"], function (require, exports,
|
|
7841
|
+
define("fn/browser/warning", ["require", "exports", "fn/browser/log"], function (require, exports, log_19) {
|
|
7843
7842
|
"use strict";
|
|
7844
7843
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7845
7844
|
exports.warning = void 0;
|
|
@@ -7863,11 +7862,11 @@
|
|
|
7863
7862
|
_bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
|
|
7864
7863
|
};
|
|
7865
7864
|
args.unshift(obj);
|
|
7866
|
-
|
|
7865
|
+
log_19.log.apply(this, args);
|
|
7867
7866
|
};
|
|
7868
7867
|
exports.warning = warning;
|
|
7869
7868
|
});
|
|
7870
|
-
define("fn/html/makeReactive", ["require", "exports", "fn/browser/log", "fn/object/createObject", "fn/type/isSymbol", "fn/type/isNumber", "fn/type/isArray", "fn/browser/warning", "fn/type/isFunction", "fn/type/isSame"], function (require, exports,
|
|
7869
|
+
define("fn/html/makeReactive", ["require", "exports", "fn/browser/log", "fn/object/createObject", "fn/type/isSymbol", "fn/type/isNumber", "fn/type/isArray", "fn/browser/warning", "fn/type/isFunction", "fn/type/isSame"], function (require, exports, log_20, createObject_2, isSymbol_1, isNumber_8, isArray_13, warning_1, isFunction_10, isSame_2) {
|
|
7871
7870
|
"use strict";
|
|
7872
7871
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7873
7872
|
exports.makeReactive = void 0;
|
|
@@ -7879,7 +7878,7 @@
|
|
|
7879
7878
|
return obj;
|
|
7880
7879
|
}
|
|
7881
7880
|
if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
|
|
7882
|
-
(0,
|
|
7881
|
+
(0, log_20.log)(['MAKING bbn-loadbar', obj]);
|
|
7883
7882
|
}
|
|
7884
7883
|
if (!obj.__bbnWatchers) {
|
|
7885
7884
|
Reflect.defineProperty(obj, '__bbnWatchers', {
|
|
@@ -7903,7 +7902,7 @@
|
|
|
7903
7902
|
return function (...args) {
|
|
7904
7903
|
let res = realTarget[key](...args);
|
|
7905
7904
|
(0, warning_1.warning)('DOING ARRAY STUFF');
|
|
7906
|
-
(0,
|
|
7905
|
+
(0, log_20.log)(target.__bbnParent);
|
|
7907
7906
|
onSet(target, 'length', parent);
|
|
7908
7907
|
return res;
|
|
7909
7908
|
};
|
|
@@ -7970,7 +7969,7 @@
|
|
|
7970
7969
|
return Reflect.get(target, key);
|
|
7971
7970
|
}
|
|
7972
7971
|
if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
|
|
7973
|
-
(0,
|
|
7972
|
+
(0, log_20.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
|
|
7974
7973
|
}
|
|
7975
7974
|
if (!(0, isSame_2.isSame)(realTarget[key], value)) {
|
|
7976
7975
|
if (key.indexOf('__bbn_') === 0) {
|
|
@@ -7998,7 +7997,7 @@
|
|
|
7998
7997
|
}
|
|
7999
7998
|
}
|
|
8000
7999
|
if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
|
|
8001
|
-
(0,
|
|
8000
|
+
(0, log_20.log)([
|
|
8002
8001
|
'Setting proxy prop in ' +
|
|
8003
8002
|
parent.$options.name +
|
|
8004
8003
|
' ' +
|
|
@@ -9710,7 +9709,7 @@
|
|
|
9710
9709
|
};
|
|
9711
9710
|
exports.uniqString = uniqString;
|
|
9712
9711
|
});
|
|
9713
|
-
define("fn/ajax/upload", ["require", "exports", "fn/form/objectToFormData", "fn/browser/log"], function (require, exports, objectToFormData_1,
|
|
9712
|
+
define("fn/ajax/upload", ["require", "exports", "fn/form/objectToFormData", "fn/browser/log"], function (require, exports, objectToFormData_1, log_21) {
|
|
9714
9713
|
"use strict";
|
|
9715
9714
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9716
9715
|
exports.upload = void 0;
|
|
@@ -9751,13 +9750,13 @@
|
|
|
9751
9750
|
return fn()
|
|
9752
9751
|
.then((res) => {
|
|
9753
9752
|
if (success) {
|
|
9754
|
-
(0,
|
|
9753
|
+
(0, log_21.log)('SUCCESS', res);
|
|
9755
9754
|
success(res);
|
|
9756
9755
|
}
|
|
9757
9756
|
})
|
|
9758
9757
|
.catch((err) => {
|
|
9759
9758
|
if (failure) {
|
|
9760
|
-
(0,
|
|
9759
|
+
(0, log_21.log)('ERROR', err);
|
|
9761
9760
|
failure(err);
|
|
9762
9761
|
}
|
|
9763
9762
|
});
|
|
@@ -9765,7 +9764,7 @@
|
|
|
9765
9764
|
};
|
|
9766
9765
|
exports.upload = upload;
|
|
9767
9766
|
});
|
|
9768
|
-
define("fn", ["require", "exports", "fn/ajax/_addLoader", "fn/object/_compareValues", "fn/ajax/_deleteLoader", "fn/ajax/abort", "fn/ajax/abortURL", "fn/style/addColors", "fn/form/addInputs", "fn/style/addStyle", "fn/html/adjustHeight", "fn/html/adjustSize", "fn/html/adjustWidth", "fn/ajax/ajax", "fn/misc/analyzeFunction", "fn/style/animateCss", "fn/convert/arrayBuffer2String", "fn/object/arrayFromProp", "fn/object/autoExtend", "fn/string/baseName", "fn/string/br2nl", "fn/datetime/calendar", "fn/ajax/callback", "fn/string/camelize", "fn/string/camelToCss", "fn/convert/canvasToImage", "fn/style/center", "fn/object/checkProps", "fn/object/checkPropsDetails", "fn/object/checkPropsOrDie", "fn/type/checkType", "fn/object/circularReplacer", "fn/object/clone", "fn/convert/colorToHex", "fn/object/compare", "fn/object/compareConditions", "fn/browser/copy", "fn/string/correctCase", "fn/object/count", "fn/string/crc32", "fn/object/createObject", "fn/style/cssExists", "fn/datetime/date", "fn/datetime/dateSQL", "fn/datetime/daysInMonth", "fn/object/deepPath", "fn/default/defaultAjaxAbortFunction", "fn/default/defaultAjaxErrorFunction", "fn/default/defaultAlertFunction", "fn/default/defaultConfirmFunction", "fn/default/defaultEndLoadingFunction", "fn/default/defaultErrorFunction", "fn/default/defaultHistoryFunction", "fn/default/defaultLinkFunction", "fn/default/defaultPostLinkFunction", "fn/default/defaultPreLinkFunction", "fn/default/defaultResizeFunction", "fn/default/defaultStartLoadingFunction", "fn/object/deleteProp", "fn/object/diffObj", "fn/string/dirName", "fn/ajax/download", "fn/ajax/downloadContent", "fn/loop/each", "fn/browser/eraseCookie", "fn/browser/error", "fn/string/escapeDquotes", "fn/string/escapeRegExp", "fn/string/escapeSquotes", "fn/string/escapeTicks", "fn/string/escapeUrl", "fn/object/extend", "fn/object/extendOut", "fn/datetime/fdate", "fn/datetime/fdatetime", "fn/form/fieldValue", "fn/string/fileExt", "fn/object/filter", "fn/object/filterToConditions", "fn/object/findAll", "fn/loop/fori", "fn/loop/forir", "fn/string/format", "fn/string/formatBytes", "fn/datetime/formatDate", "fn/string/formatSize", "fn/form/formdata", "fn/convert/fromXml", "fn/datetime/ftime", "fn/html/getAllTags", "fn/html/getAncestors", "fn/html/getAttributes", "fn/browser/getBrowserName", "fn/browser/getBrowserVersion", "fn/browser/getCookie", "fn/style/getCssVar", "fn/datetime/getDay", "fn/browser/getDeviceType", "fn/browser/getEventData", "fn/object/getField", "fn/object/getFieldValues", "fn/html/getHtml", "fn/html/getHTMLOfSelection", "fn/ajax/getLoader", "fn/html/getPath", "fn/object/getProp", "fn/object/getProperty", "fn/ajax/getRequestId", "fn/object/getRow", "fn/style/getScrollBarSize", "fn/html/getText", "fn/misc/getTimeoff", "fn/browser/happy", "fn/string/hash", "fn/convert/hex2rgb", "fn/browser/history", "fn/html/html2text", "fn/convert/imageToCanvas", "fn/convert/imgToBase64", "fn/browser/info", "fn/init", "fn/browser/isActiveInterface", "fn/type/isArray", "fn/type/isBlob", "fn/type/isBoolean", "fn/type/isCanvas", "fn/type/isColor", "fn/type/isComment", "fn/type/isCp", "fn/type/isDate", "fn/browser/isDesktopDevice", "fn/type/isDimension", "fn/type/isDom", "fn/type/isEmail", "fn/type/isEmpty", "fn/type/isEvent", "fn/browser/isFocused", "fn/type/isFunction", "fn/type/isHostname", "fn/html/isInside", "fn/type/isInt", "fn/type/isIP", "fn/type/isIterable", "fn/browser/isMobile", "fn/browser/isMobileDevice", "fn/type/isNull", "fn/type/isNumber", "fn/type/isObject", "fn/type/isPercent", "fn/type/isPrimitive", "fn/type/isPromise", "fn/type/isPropSize", "fn/type/isSame", "fn/type/isSQLDate", "fn/type/isString", "fn/type/isSymbol", "fn/browser/isTabletDevice", "fn/type/isURL", "fn/type/isValidDimension", "fn/type/isValidName", "fn/type/isValue", "fn/type/isVue", "fn/loop/iterate", "fn/style/lightenDarkenHex", "fn/ajax/link", "fn/browser/log", "fn/html/makeReactive", "fn/object/map", "fn/string/md5", "fn/misc/money", "fn/object/move", "fn/object/multiorder", "fn/string/nl2br", "fn/object/numProperties", "fn/form/objectToFormData", "fn/object/order", "fn/style/outerHeight", "fn/style/outerWidth", "fn/misc/percent", "fn/object/pickValue", "fn/ajax/post", "fn/ajax/postOut", "fn/string/printf", "fn/string/quotes2html", "fn/misc/randomInt", "fn/string/randomString", "fn/string/removeAccents", "fn/object/removeEmpty", "fn/string/removeExtraSpaces", "fn/string/removeHtmlComments", "fn/object/removePrivateProp", "fn/string/removeTrailingChars", "fn/string/repeat", "fn/string/replaceAll", "fn/browser/replaceSelection", "fn/style/resize", "fn/convert/rgb2hex", "fn/loop/riterate", "fn/misc/roundDecimal", "fn/string/sanitize", "fn/object/search", "fn/browser/selectElementText", "fn/html/selector", "fn/browser/setCookie", "fn/style/setCssVar", "fn/ajax/setNavigationVars", "fn/object/setProp", "fn/object/setProperty", "fn/string/shorten", "fn/object/shortenObj", "fn/object/shuffle", "fn/string/simpleHash", "fn/string/simpleHash1", "fn/string/simpleHash2", "fn/datetime/chrono", "fn/convert/string2ArrayBuffer", "fn/form/submit", "fn/string/substr", "fn/object/sum", "fn/datetime/timestamp", "fn/convert/toCSV", "fn/browser/toggleFullScreen", "fn/misc/translate", "fn/ajax/treatAjaxArguments", "fn/string/trim", "fn/string/uniqString", "fn/object/unique", "fn/ajax/upload", "fn/browser/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_1, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_6, circularReplacer_2, clone_2, colorToHex_1, compare_2, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_8, dateSQL_1, daysInMonth_1, deepPath_1,
|
|
9767
|
+
define("fn", ["require", "exports", "fn/ajax/_addLoader", "fn/object/_compareValues", "fn/ajax/_deleteLoader", "fn/ajax/abort", "fn/ajax/abortURL", "fn/style/addColors", "fn/form/addInputs", "fn/style/addStyle", "fn/html/adjustHeight", "fn/html/adjustSize", "fn/html/adjustWidth", "fn/ajax/ajax", "fn/misc/analyzeFunction", "fn/style/animateCss", "fn/convert/arrayBuffer2String", "fn/object/arrayFromProp", "fn/object/autoExtend", "fn/string/baseName", "fn/string/br2nl", "fn/datetime/calendar", "fn/ajax/callback", "fn/string/camelize", "fn/string/camelToCss", "fn/convert/canvasToImage", "fn/style/center", "fn/object/checkProps", "fn/object/checkPropsDetails", "fn/object/checkPropsOrDie", "fn/type/checkType", "fn/object/circularReplacer", "fn/object/clone", "fn/convert/colorToHex", "fn/object/compare", "fn/object/compareConditions", "fn/browser/copy", "fn/string/correctCase", "fn/object/count", "fn/string/crc32", "fn/object/createObject", "fn/style/cssExists", "fn/datetime/date", "fn/datetime/dateSQL", "fn/datetime/daysInMonth", "fn/object/deepPath", "fn/default/defaultAjaxAbortFunction", "fn/default/defaultAjaxErrorFunction", "fn/default/defaultAlertFunction", "fn/default/defaultConfirmFunction", "fn/default/defaultEndLoadingFunction", "fn/default/defaultErrorFunction", "fn/default/defaultHistoryFunction", "fn/default/defaultLinkFunction", "fn/default/defaultPostLinkFunction", "fn/default/defaultPreLinkFunction", "fn/default/defaultResizeFunction", "fn/default/defaultStartLoadingFunction", "fn/object/deleteProp", "fn/object/diffObj", "fn/string/dirName", "fn/ajax/download", "fn/ajax/downloadContent", "fn/loop/each", "fn/browser/eraseCookie", "fn/browser/error", "fn/string/escapeDquotes", "fn/string/escapeRegExp", "fn/string/escapeSquotes", "fn/string/escapeTicks", "fn/string/escapeUrl", "fn/object/extend", "fn/object/extendOut", "fn/datetime/fdate", "fn/datetime/fdatetime", "fn/form/fieldValue", "fn/string/fileExt", "fn/object/filter", "fn/object/filterToConditions", "fn/object/findAll", "fn/loop/fori", "fn/loop/forir", "fn/string/format", "fn/string/formatBytes", "fn/datetime/formatDate", "fn/string/formatSize", "fn/form/formdata", "fn/convert/fromXml", "fn/datetime/ftime", "fn/html/getAllTags", "fn/html/getAncestors", "fn/html/getAttributes", "fn/browser/getBrowserName", "fn/browser/getBrowserVersion", "fn/browser/getCookie", "fn/style/getCssVar", "fn/datetime/getDay", "fn/browser/getDeviceType", "fn/browser/getEventData", "fn/object/getField", "fn/object/getFieldValues", "fn/html/getHtml", "fn/html/getHTMLOfSelection", "fn/ajax/getLoader", "fn/html/getPath", "fn/object/getProp", "fn/object/getProperty", "fn/ajax/getRequestId", "fn/object/getRow", "fn/style/getScrollBarSize", "fn/html/getText", "fn/misc/getTimeoff", "fn/browser/happy", "fn/string/hash", "fn/convert/hex2rgb", "fn/browser/history", "fn/html/html2text", "fn/convert/imageToCanvas", "fn/convert/imgToBase64", "fn/browser/info", "fn/init", "fn/browser/isActiveInterface", "fn/type/isArray", "fn/type/isBlob", "fn/type/isBoolean", "fn/type/isCanvas", "fn/type/isColor", "fn/type/isComment", "fn/type/isCp", "fn/type/isDate", "fn/browser/isDesktopDevice", "fn/type/isDimension", "fn/type/isDom", "fn/type/isEmail", "fn/type/isEmpty", "fn/type/isEvent", "fn/browser/isFocused", "fn/type/isFunction", "fn/type/isHostname", "fn/html/isInside", "fn/type/isInt", "fn/type/isIP", "fn/type/isIterable", "fn/browser/isMobile", "fn/browser/isMobileDevice", "fn/type/isNull", "fn/type/isNumber", "fn/type/isObject", "fn/type/isPercent", "fn/type/isPrimitive", "fn/type/isPromise", "fn/type/isPropSize", "fn/type/isSame", "fn/type/isSQLDate", "fn/type/isString", "fn/type/isSymbol", "fn/browser/isTabletDevice", "fn/type/isURL", "fn/type/isValidDimension", "fn/type/isValidName", "fn/type/isValue", "fn/type/isVue", "fn/loop/iterate", "fn/style/lightenDarkenHex", "fn/ajax/link", "fn/browser/log", "fn/html/makeReactive", "fn/object/map", "fn/string/md5", "fn/misc/money", "fn/object/move", "fn/object/multiorder", "fn/string/nl2br", "fn/object/numProperties", "fn/form/objectToFormData", "fn/object/order", "fn/style/outerHeight", "fn/style/outerWidth", "fn/misc/percent", "fn/object/pickValue", "fn/ajax/post", "fn/ajax/postOut", "fn/string/printf", "fn/string/quotes2html", "fn/misc/randomInt", "fn/string/randomString", "fn/string/removeAccents", "fn/object/removeEmpty", "fn/string/removeExtraSpaces", "fn/string/removeHtmlComments", "fn/object/removePrivateProp", "fn/string/removeTrailingChars", "fn/string/repeat", "fn/string/replaceAll", "fn/browser/replaceSelection", "fn/style/resize", "fn/convert/rgb2hex", "fn/loop/riterate", "fn/misc/roundDecimal", "fn/string/sanitize", "fn/object/search", "fn/browser/selectElementText", "fn/html/selector", "fn/browser/setCookie", "fn/style/setCssVar", "fn/ajax/setNavigationVars", "fn/object/setProp", "fn/object/setProperty", "fn/string/shorten", "fn/object/shortenObj", "fn/object/shuffle", "fn/string/simpleHash", "fn/string/simpleHash1", "fn/string/simpleHash2", "fn/datetime/chrono", "fn/convert/string2ArrayBuffer", "fn/form/submit", "fn/string/substr", "fn/object/sum", "fn/datetime/timestamp", "fn/convert/toCSV", "fn/browser/toggleFullScreen", "fn/misc/translate", "fn/ajax/treatAjaxArguments", "fn/string/trim", "fn/string/uniqString", "fn/object/unique", "fn/ajax/upload", "fn/browser/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_1, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_6, circularReplacer_2, clone_2, colorToHex_1, compare_2, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_8, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_1, defaultAjaxErrorFunction_1, defaultAlertFunction_1, defaultConfirmFunction_1, defaultEndLoadingFunction_1, defaultErrorFunction_2, defaultHistoryFunction_2, defaultLinkFunction_1, defaultPostLinkFunction_1, defaultPreLinkFunction_1, defaultResizeFunction_2, defaultStartLoadingFunction_1, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_4, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_1, getProp_1, getProperty_4, getRequestId_2, getRow_3, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_3, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_11, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_10, isObject_18, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_27, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_12, lightenDarkenHex_1, link_2, log_22, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_8, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, chrono_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
|
|
9769
9768
|
"use strict";
|
|
9770
9769
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9771
9770
|
exports.fn = void 0;
|
|
@@ -9814,18 +9813,18 @@
|
|
|
9814
9813
|
dateSQL: dateSQL_1.dateSQL,
|
|
9815
9814
|
daysInMonth: daysInMonth_1.daysInMonth,
|
|
9816
9815
|
deepPath: deepPath_1.deepPath,
|
|
9817
|
-
defaultAjaxAbortFunction:
|
|
9818
|
-
defaultAjaxErrorFunction:
|
|
9819
|
-
defaultAlertFunction:
|
|
9816
|
+
defaultAjaxAbortFunction: defaultAjaxAbortFunction_1.defaultAjaxAbortFunction,
|
|
9817
|
+
defaultAjaxErrorFunction: defaultAjaxErrorFunction_1.defaultAjaxErrorFunction,
|
|
9818
|
+
defaultAlertFunction: defaultAlertFunction_1.defaultAlertFunction,
|
|
9820
9819
|
defaultConfirmFunction: defaultConfirmFunction_1.defaultConfirmFunction,
|
|
9821
|
-
defaultEndLoadingFunction:
|
|
9820
|
+
defaultEndLoadingFunction: defaultEndLoadingFunction_1.defaultEndLoadingFunction,
|
|
9822
9821
|
defaultErrorFunction: defaultErrorFunction_2.defaultErrorFunction,
|
|
9823
9822
|
defaultHistoryFunction: defaultHistoryFunction_2.defaultHistoryFunction,
|
|
9824
|
-
defaultLinkFunction:
|
|
9825
|
-
defaultPostLinkFunction:
|
|
9826
|
-
defaultPreLinkFunction:
|
|
9823
|
+
defaultLinkFunction: defaultLinkFunction_1.defaultLinkFunction,
|
|
9824
|
+
defaultPostLinkFunction: defaultPostLinkFunction_1.defaultPostLinkFunction,
|
|
9825
|
+
defaultPreLinkFunction: defaultPreLinkFunction_1.defaultPreLinkFunction,
|
|
9827
9826
|
defaultResizeFunction: defaultResizeFunction_2.defaultResizeFunction,
|
|
9828
|
-
defaultStartLoadingFunction:
|
|
9827
|
+
defaultStartLoadingFunction: defaultStartLoadingFunction_1.defaultStartLoadingFunction,
|
|
9829
9828
|
deleteProp: deleteProp_1.deleteProp,
|
|
9830
9829
|
diffObj: diffObj_1.diffObj,
|
|
9831
9830
|
dirName: dirName_2.dirName,
|
|
@@ -9933,7 +9932,7 @@
|
|
|
9933
9932
|
iterate: iterate_12.iterate,
|
|
9934
9933
|
lightenDarkenHex: lightenDarkenHex_1.lightenDarkenHex,
|
|
9935
9934
|
link: link_2.link,
|
|
9936
|
-
log:
|
|
9935
|
+
log: log_22.log,
|
|
9937
9936
|
makeReactive: makeReactive_1.makeReactive,
|
|
9938
9937
|
map: map_1.map,
|
|
9939
9938
|
md5: md5_4.md5,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { substr } from "../string/substr";
|
|
2
|
-
import { log } from "../browser/log";
|
|
3
2
|
/**
|
|
4
3
|
* Creates and adds a "loader" object to the property bbn.env.loaders.
|
|
5
4
|
*
|
|
@@ -15,7 +14,6 @@ import { log } from "../browser/log";
|
|
|
15
14
|
* @returns {Number} The timestamp (in ms)
|
|
16
15
|
*/
|
|
17
16
|
const _addLoader = function (requestId, prom, source) {
|
|
18
|
-
log('_addLoader', requestId);
|
|
19
17
|
/** @var {Number} tst Current timestamp */
|
|
20
18
|
let tst = new Date().getTime();
|
|
21
19
|
/** @var {String} url The original URL (part of requestId before : and md5) */
|
package/dist/fn/ajax/ajax.js
CHANGED
|
@@ -5,12 +5,8 @@ import { getLoader } from "./getLoader";
|
|
|
5
5
|
import { extend } from "../object/extend";
|
|
6
6
|
import { numProperties } from "../object/numProperties";
|
|
7
7
|
import { _deleteLoader } from "./_deleteLoader";
|
|
8
|
-
import { defaultEndLoadingFunction } from "../default/defaultEndLoadingFunction";
|
|
9
8
|
import { isFunction } from "../type/isFunction";
|
|
10
|
-
import { defaultAjaxErrorFunction } from "../default/defaultAjaxErrorFunction";
|
|
11
|
-
import { defaultAjaxAbortFunction } from "../default/defaultAjaxAbortFunction";
|
|
12
9
|
import { _addLoader } from "./_addLoader";
|
|
13
|
-
import { defaultStartLoadingFunction } from "../default/defaultStartLoadingFunction";
|
|
14
10
|
/**
|
|
15
11
|
* Creates an XHR object and returns the Promise.
|
|
16
12
|
*
|
|
@@ -128,7 +124,7 @@ const ajax = function (url, datatype, data, success, failure, abort) {
|
|
|
128
124
|
.apply(null, args)
|
|
129
125
|
.then((res) => {
|
|
130
126
|
_deleteLoader(requestId, res);
|
|
131
|
-
defaultEndLoadingFunction(url, tst, data, res);
|
|
127
|
+
bbn.fn.defaultEndLoadingFunction(url, tst, data, res);
|
|
132
128
|
switch (res.status) {
|
|
133
129
|
case 200:
|
|
134
130
|
if (isFunction(success)) {
|
|
@@ -136,21 +132,21 @@ const ajax = function (url, datatype, data, success, failure, abort) {
|
|
|
136
132
|
}
|
|
137
133
|
break;
|
|
138
134
|
default:
|
|
139
|
-
defaultAjaxErrorFunction(loader, res);
|
|
135
|
+
bbn.fn.defaultAjaxErrorFunction(loader, res);
|
|
140
136
|
}
|
|
141
137
|
return res;
|
|
142
138
|
})
|
|
143
139
|
.catch((err) => {
|
|
144
140
|
let isAbort = axios.isCancel(err);
|
|
145
141
|
_deleteLoader(requestId, err.message || err.response.data, isAbort);
|
|
146
|
-
defaultEndLoadingFunction(url, tst, data, err);
|
|
142
|
+
bbn.fn.defaultEndLoadingFunction(url, tst, data, err);
|
|
147
143
|
if (isAbort) {
|
|
148
144
|
let ok = 1;
|
|
149
145
|
if (isFunction(abort)) {
|
|
150
146
|
ok = abort(err.message, url);
|
|
151
147
|
}
|
|
152
148
|
if (ok) {
|
|
153
|
-
defaultAjaxAbortFunction(err.message, url);
|
|
149
|
+
bbn.fn.defaultAjaxAbortFunction(err.message, url);
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
152
|
else {
|
|
@@ -159,12 +155,12 @@ const ajax = function (url, datatype, data, success, failure, abort) {
|
|
|
159
155
|
ok = failure(err.request, err);
|
|
160
156
|
}
|
|
161
157
|
if (ok) {
|
|
162
|
-
defaultAjaxErrorFunction(err.request, err.response ? err.response.data : "", err.response ? err.response.status : err);
|
|
158
|
+
bbn.fn.defaultAjaxErrorFunction(err.request, err.response ? err.response.data : "", err.response ? err.response.status : err);
|
|
163
159
|
}
|
|
164
160
|
}
|
|
165
161
|
});
|
|
166
162
|
let tst = _addLoader(requestId, loader, source);
|
|
167
|
-
defaultStartLoadingFunction(url, tst, data, requestId);
|
|
163
|
+
bbn.fn.defaultStartLoadingFunction(url, tst, data, requestId);
|
|
168
164
|
return loader;
|
|
169
165
|
}
|
|
170
166
|
};
|
package/dist/fn/ajax/callback.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { error } from '../browser/error';
|
|
2
|
-
import { defaultLinkFunction } from '../default/defaultLinkFunction';
|
|
3
2
|
import { isFunction } from '../type/isFunction';
|
|
4
3
|
import { log } from '../browser/log';
|
|
5
|
-
import { defaultPostLinkFunction } from '../default/defaultPostLinkFunction';
|
|
6
|
-
import { defaultAlertFunction } from '../default/defaultAlertFunction';
|
|
7
4
|
/**
|
|
8
5
|
* Executes a serie of predefined actions once an Ajax request has been done.
|
|
9
6
|
*
|
|
@@ -63,7 +60,7 @@ const callback = function (url, res, fn = null, fn2 = null, ele = null) {
|
|
|
63
60
|
tmp = fn(res, ele);
|
|
64
61
|
}
|
|
65
62
|
else {
|
|
66
|
-
tmp = defaultLinkFunction(res, ele);
|
|
63
|
+
tmp = bbn.fn.defaultLinkFunction(res, ele);
|
|
67
64
|
}
|
|
68
65
|
if (ele && isObj && (res.content !== undefined)) {
|
|
69
66
|
if ('value' in ele) {
|
|
@@ -98,19 +95,19 @@ const callback = function (url, res, fn = null, fn2 = null, ele = null) {
|
|
|
98
95
|
if (tmp && fn2 && isFunction(fn2)) {
|
|
99
96
|
fn2(res);
|
|
100
97
|
}
|
|
101
|
-
else if (isObj && defaultPostLinkFunction) {
|
|
102
|
-
defaultPostLinkFunction(res, ele);
|
|
98
|
+
else if (isObj && bbn.fn.defaultPostLinkFunction) {
|
|
99
|
+
bbn.fn.defaultPostLinkFunction(res, ele);
|
|
103
100
|
}
|
|
104
101
|
if (tmp && isObj && res.postscript) {
|
|
105
102
|
eval(res.postscript);
|
|
106
103
|
}
|
|
107
104
|
if (isObj && res.error) {
|
|
108
105
|
errTitle = res.errorTitle || bbn.lng.server_response;
|
|
109
|
-
defaultAlertFunction(res.error, errTitle);
|
|
106
|
+
bbn.fn.defaultAlertFunction(res.error, errTitle);
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
109
|
else {
|
|
113
|
-
defaultAlertFunction(bbn.lng.errorText, bbn.lng.error);
|
|
110
|
+
bbn.fn.defaultAlertFunction(bbn.lng.errorText, bbn.lng.error);
|
|
114
111
|
}
|
|
115
112
|
return tmp;
|
|
116
113
|
};
|
package/dist/fn/ajax/download.js
CHANGED
|
@@ -4,7 +4,6 @@ import { baseName } from '../string/baseName';
|
|
|
4
4
|
import { isBlob } from '../type/isBlob';
|
|
5
5
|
import { fileExt } from '../string/fileExt';
|
|
6
6
|
import { downloadContent } from './downloadContent';
|
|
7
|
-
import { defaultAjaxErrorFunction } from '../default/defaultAjaxErrorFunction';
|
|
8
7
|
/**
|
|
9
8
|
* Downloads a file with given filename from a URL.
|
|
10
9
|
*
|
|
@@ -58,7 +57,7 @@ const download = function (url, filename, params) {
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
}, e => {
|
|
61
|
-
defaultAjaxErrorFunction(e);
|
|
60
|
+
bbn.fn.defaultAjaxErrorFunction(e);
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
63
|
export { download };
|
package/dist/fn/ajax/link.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { treatAjaxArguments } from './treatAjaxArguments';
|
|
2
2
|
import { getLoader } from './getLoader';
|
|
3
|
-
import { defaultPreLinkFunction } from '../default/defaultPreLinkFunction';
|
|
4
3
|
import { ajax } from './ajax';
|
|
5
4
|
import { log } from '../browser/log';
|
|
6
5
|
import { extend } from '../object/extend';
|
|
@@ -84,8 +83,8 @@ const link = function (...args) {
|
|
|
84
83
|
if (cfg.successFn) {
|
|
85
84
|
ok = cfg.successFn(cfg.url);
|
|
86
85
|
}
|
|
87
|
-
else if (defaultPreLinkFunction) {
|
|
88
|
-
ok = defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
|
|
86
|
+
else if (bbn.fn.defaultPreLinkFunction) {
|
|
87
|
+
ok = bbn.fn.defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
|
|
89
88
|
if (ok.data !== undefined) {
|
|
90
89
|
extend(cfg.obj, ok.data);
|
|
91
90
|
ok = 1;
|