@bchr/bchr-front-lib 0.5.1-alpha-20241221 → 0.5.4

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.
@@ -342,17 +342,7 @@ const buildActionButton = function(props, subActionButton, innerLine) {
342
342
  }
343
343
 
344
344
  if (buttonProps.confirmmsg) {
345
- if (Values.isEmpty(buttonProps.checkField) || Values.isEmpty(buttonProps.checkData)) {
346
- throw new Error("Please enter the check field and table data before transmitting the check field and table data");
347
- }
348
-
349
- checkField = buttonProps.checkField;
350
- checkData = buttonProps.checkData;
351
345
  confirmMsg = buttonProps.confirmmsg;
352
-
353
- delete buttonProps.checkField;
354
- delete buttonProps.checkData;
355
- delete buttonProps.confirmmsg;
356
346
  }
357
347
 
358
348
  if (buttonProps.confirmtype) {
@@ -373,6 +363,13 @@ const buildActionButton = function(props, subActionButton, innerLine) {
373
363
  }
374
364
 
375
365
  if (confirmMsg && confirmMsg.trim().length > 0 && typeof buttonProps.onClick === "function") {
366
+ if (Values.isEmpty(buttonProps.checkField) || Values.isEmpty(buttonProps.checkData)) {
367
+ throw new Error("Please enter the check field and table data before transmitting the check field and table data");
368
+ }
369
+
370
+ checkField = buttonProps.checkField;
371
+ checkData = buttonProps.checkData;
372
+
376
373
  let onClickHandler = buttonProps.onClick;
377
374
  let onCancelHandler = buttonProps.onCancel;
378
375
 
@@ -1,6 +1,5 @@
1
1
  import lodash from "lodash";
2
2
  import LangTypes from "./LangTypes"
3
- import IllegalArgumentError from "../error/IllegalArgumentError"
4
3
 
5
4
  const isWhitespace = function(c) {
6
5
  if (c === null || c === void 0) {
@@ -48,7 +47,7 @@ const Strings = {
48
47
  }
49
48
 
50
49
  if (!lodash.isString(value)) {
51
- throw new IllegalArgumentError("Invalid value [" + value + "] for Strings#removeBlankStrings");
50
+ throw new Error("Invalid value [" + value + "] for Strings#removeBlankStrings");
52
51
  }
53
52
 
54
53
  let lastString = "";
@@ -1,10 +1,7 @@
1
1
  import lodash from "lodash";
2
2
  import queryString from "query-string";
3
- import {Strings, Values} from '../base/utils';
4
- import {saveAs} from "file-saver";
5
- import {forceRedirectToForError, isNeedForceRedirect} from "../base/utils/AppKits";
3
+ import { Values } from '../base/utils';
6
4
  import { message } from 'antd';
7
- import React from "react";
8
5
 
9
6
  const http = {
10
7
 
@@ -109,7 +106,6 @@ const http = {
109
106
  }
110
107
  },
111
108
 
112
-
113
109
  getFunctionLetUIPathFromLocationString: function(locationString) {
114
110
  if (locationString == null || locationString === "") {
115
111
  return null;
@@ -459,617 +455,6 @@ const http = {
459
455
  this.redirectTo("main_view", parameterObject)
460
456
  }
461
457
  },
462
-
463
- post: function (options, jsonObject, mockData) {
464
- let ajaxOptions = {};
465
- let failedDealFunction = this.dealAjaxException;
466
- if (lodash.isPlainObject(options)) {
467
- if (lodash.isFunction(options.fail)) {
468
- failedDealFunction = options.fail
469
- delete options.fail;
470
- }
471
- ajaxOptions = {...options};
472
- }
473
-
474
- try {
475
- this.__checkJSONObjectSecurity(jsonObject)
476
- }
477
- catch (e) {
478
- let promise = new Promise(function (resolve, reject) {
479
- return reject(e);
480
- });
481
-
482
- if (this.isUseDefaultExceptionHandler()) {
483
- return promise.catch(failedDealFunction);
484
- }
485
-
486
- return promise;
487
- }
488
-
489
- if (jsonObject) {
490
- ajaxOptions.data = jsonObject;
491
- }
492
-
493
- if (ajaxOptions.rpcMethodName) {
494
- delete ajaxOptions.rpcMethodName;
495
- }
496
-
497
- ajaxOptions.type = "post";
498
- ajaxOptions.dataType = "json";
499
-
500
- if (!ajaxOptions.url) {
501
- ajaxOptions.url = this.getRequestPath(options);
502
- }
503
-
504
- if (this.isValidMockData(mockData)) {
505
- let promise = this.__postForMock(mockData);
506
- if (this.isUseDefaultExceptionHandler()) {
507
- return promise.catch(failedDealFunction);
508
- }
509
- return promise;
510
- }
511
- else {
512
- let deferred = window.$.ajax(ajaxOptions);
513
-
514
- if (this.isUseDefaultExceptionHandler()) {
515
- return this.__toStdPromise(deferred, failedDealFunction);
516
- }
517
- else {
518
- return this.__toStdPromise(deferred);
519
- }
520
- }
521
- },
522
-
523
- __postForMock: function (mockData) {
524
-
525
- let waitTime = mockData.waitTime ? mockData.waitTime : 600;
526
- return new Promise(function (resolve, reject) {
527
-
528
- setTimeout(function () {
529
- if (mockData.success === false) {
530
- return reject(new Error(mockData.message ? mockData.message : "请求数据发生异常"));
531
- }
532
- else {
533
- let resultData = mockData.data ? mockData.data : mockData;
534
- return resolve(resultData);
535
- }
536
- }, waitTime)
537
- });
538
- },
539
-
540
- postJSONWithNotCareSecurity: function(options, jsonObject, mockData) {
541
- let ajaxOptions = {};
542
- let failedDealFunction = this.dealAjaxException;
543
- if (lodash.isPlainObject(options)) {
544
- if (lodash.isFunction(options.fail)) {
545
- failedDealFunction = options.fail
546
- delete options.fail;
547
- }
548
- ajaxOptions = {...options};
549
- }
550
-
551
- if (ajaxOptions.rpcMethodName) {
552
- delete ajaxOptions.rpcMethodName;
553
- }
554
-
555
- if (lodash.isPlainObject(ajaxOptions.data)) {
556
- jsonObject = ajaxOptions.data;
557
- }
558
-
559
- if (jsonObject) {
560
- ajaxOptions.data = jsonObject;
561
- }
562
-
563
- if (ajaxOptions.data) {
564
- ajaxOptions.data = JSON.stringify(ajaxOptions.data);
565
- }
566
-
567
- ajaxOptions.type = "post";
568
- ajaxOptions.dataType = "json";
569
- ajaxOptions.contentType = "application/json; charset=utf-8";
570
- if (!ajaxOptions.url) {
571
- ajaxOptions.url = this.getRequestPath(options);
572
- }
573
-
574
- if (this.isValidMockData(mockData)) {
575
- let promise = this.__postJSONForMock(mockData);
576
- if (this.isUseDefaultExceptionHandler()) {
577
- return promise.catch(failedDealFunction);
578
- }
579
- return promise;
580
- }
581
- else {
582
- let deferred = window.$.ajax(ajaxOptions);
583
- if (this.isUseDefaultExceptionHandler()) {
584
- return this.__toStdPromise(deferred, failedDealFunction);
585
- }
586
- else {
587
- return this.__toStdPromise(deferred);
588
- }
589
- }
590
- },
591
-
592
- postJSON: function(options, jsonObject, mockData) {
593
- let ajaxOptions = {};
594
- let failedDealFunction = this.dealAjaxException;
595
- if (lodash.isPlainObject(options)) {
596
- if (lodash.isFunction(options.fail)) {
597
- failedDealFunction = options.fail
598
- delete options.fail;
599
- }
600
- ajaxOptions = {...options};
601
- }
602
-
603
- if (lodash.isPlainObject(ajaxOptions.data)) {
604
- jsonObject = ajaxOptions.data;
605
- }
606
-
607
- try {
608
- this.__checkJSONObjectSecurity(jsonObject)
609
- }
610
- catch (e) {
611
- let promise = new Promise(function (resolve, reject) {
612
- return reject(e);
613
- });
614
-
615
- if (this.isUseDefaultExceptionHandler()) {
616
- return promise.catch(failedDealFunction);
617
- }
618
-
619
- return promise;
620
- }
621
-
622
- return this.postJSONWithNotCareSecurity(options, jsonObject, mockData);
623
- },
624
-
625
- postJSONAllowHTML: function(options, jsonObject, mockData) {
626
- let ajaxOptions = {};
627
- let failedDealFunction = this.dealAjaxException;
628
- if (lodash.isPlainObject(options)) {
629
- if (lodash.isFunction(options.fail)) {
630
- failedDealFunction = options.fail
631
- delete options.fail;
632
- }
633
- ajaxOptions = {...options};
634
- }
635
-
636
- if (lodash.isPlainObject(ajaxOptions.data)) {
637
- jsonObject = ajaxOptions.data;
638
- }
639
-
640
- try {
641
- this.__checkJSONObjectContainsScriptTag(jsonObject)
642
- }
643
- catch (e) {
644
- let promise = new Promise(function (resolve, reject) {
645
- return reject(e);
646
- });
647
-
648
- if (this.isUseDefaultExceptionHandler()) {
649
- return promise.catch(failedDealFunction);
650
- }
651
-
652
- return promise;
653
- }
654
-
655
- return this.postJSONWithNotCareSecurity(options, jsonObject, mockData);
656
- },
657
-
658
- __checkJSONObjectContainsScriptTag: function(jsonObject) {
659
- if (!jsonObject) {
660
- return;
661
- }
662
-
663
- if (lodash.isString(jsonObject)) {
664
- this.__checkStringContainsScriptTag(jsonObject);
665
- }
666
- else if (Array.isArray(jsonObject)) {
667
- let len = jsonObject.length;
668
- if (len === 0) {
669
- return;
670
- }
671
-
672
- for (let i = 0; i < len; i++) {
673
- this.__checkJSONObjectContainsScriptTag(jsonObject[i]);
674
- }
675
- }
676
- else if (lodash.isPlainObject(jsonObject)) {
677
- for (let p in jsonObject) {
678
- this.__checkJSONObjectContainsScriptTag(jsonObject[p]);
679
- }
680
- }
681
-
682
- return;
683
- },
684
-
685
- __checkStringContainsScriptTag: function(str) {
686
- if (!str || str.length < 3) {
687
- return;
688
- }
689
-
690
- let containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
691
- if (containsHTML) {
692
- throw new Error("不安全的输入,请检查!");
693
- }
694
- },
695
-
696
- __checkJSONObjectSecurity: function(jsonObject) {
697
- if (!jsonObject) {
698
- return;
699
- }
700
-
701
- if (lodash.isString(jsonObject)) {
702
- this.__checkStringIfSecurity(jsonObject);
703
- }
704
- else if (Array.isArray(jsonObject)) {
705
- let len = jsonObject.length;
706
- if (len === 0) {
707
- return;
708
- }
709
-
710
- for (let i = 0; i < len; i++) {
711
- this.__checkJSONObjectSecurity(jsonObject[i]);
712
- }
713
- }
714
- else if (lodash.isPlainObject(jsonObject)) {
715
- for (let p in jsonObject) {
716
- this.__checkJSONObjectSecurity(jsonObject[p]);
717
- }
718
- }
719
-
720
- return;
721
- },
722
-
723
- __checkStringIfSecurity: function(str) {
724
- if (!str || str.length < 3) {
725
- return;
726
- }
727
-
728
- let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
729
- if (containsHTML) {
730
- throw new Error("不安全的输入,请检查!");
731
- }
732
- },
733
-
734
- __postJSONForMock: function(mockData) {
735
- let waitTime = mockData.waitTime ? mockData.waitTime : 300;
736
- return new Promise(function (resolve, reject) {
737
- setTimeout(function () {
738
- if (mockData.success === false) {
739
- return reject(new Error(mockData.message ? mockData.message : "请求数据发生异常"));
740
- }
741
- else {
742
- let resultData = mockData.data ? mockData.data : mockData;
743
- return resolve(resultData);
744
- }
745
- }, waitTime)
746
- });
747
- },
748
-
749
- getJSON: function(options, paramObject, mockData) {
750
- let ajaxOptions = {};
751
- let failedDealFunction = this.dealAjaxException;
752
- if (lodash.isPlainObject(options)) {
753
- if (lodash.isFunction(options.fail)) {
754
- failedDealFunction = options.fail
755
- delete options.fail;
756
- }
757
- ajaxOptions = {...options};
758
- }
759
-
760
- ajaxOptions.type = "get";
761
- ajaxOptions.dataType = "json";
762
- if (lodash.isPlainObject(paramObject)) {
763
- ajaxOptions.data = paramObject;
764
- }
765
-
766
- if (!ajaxOptions.data){
767
- ajaxOptions.data = {};
768
- }
769
-
770
- if (!ajaxOptions.data.euts) {
771
- ajaxOptions.data.euts = (new Date()).getTime();
772
- }
773
-
774
- if (!ajaxOptions.url) {
775
- ajaxOptions.url = this.getRequestPath(options);
776
- }
777
-
778
- if (this.isValidMockData(mockData)) {
779
- let promise = this.__getJSONForMock(mockData);
780
- if (this.isUseDefaultExceptionHandler()) {
781
- return promise.catch(failedDealFunction);
782
- }
783
- return promise;
784
- }
785
- else {
786
- let deferred = window.$.ajax(ajaxOptions);
787
- if (this.isUseDefaultExceptionHandler()) {
788
- return this.__toStdPromise(deferred, failedDealFunction);
789
- }
790
- else {
791
- return this.__toStdPromise(deferred);
792
- }
793
- }
794
- },
795
-
796
- isValidMockData : function (mockData) {
797
- if (mockData === null || mockData === void 0) {
798
- return false;
799
- }
800
-
801
- return lodash.isPlainObject(mockData);
802
- },
803
-
804
- __getJSONForMock: function(mockData) {
805
-
806
- let waitTime = mockData.waitTime ? mockData.waitTime : 600;
807
- return new Promise(function (resolve, reject) {
808
-
809
- setTimeout(function () {
810
- if (mockData.success === false) {
811
- return reject(new Error(mockData.message ? mockData.message : "请求数据发生异常"));
812
- }
813
- else {
814
- let resultData = mockData.data ? mockData.data : mockData;
815
- return resolve(resultData);
816
- }
817
- }, waitTime)
818
- });
819
- },
820
-
821
- requestStaticHTMLTemplate: function(staticTemplateFilePath) {
822
- let deferred = window.$.ajax({
823
- url : staticTemplateFilePath,
824
- dataType: "html"
825
- });
826
-
827
- let failedDealFunction = this.dealAjaxException;
828
- return this.__toStdPromise(deferred, failedDealFunction);
829
- },
830
-
831
- downloadFileByPostJSON: function (options, jsonObject, saveFileName) {
832
- let ajaxOptions = {};
833
- let failedDealFunction = this.dealAjaxException;
834
- if (lodash.isPlainObject(options)) {
835
- if (lodash.isFunction(options.fail)) {
836
- failedDealFunction = options.fail
837
- delete options.fail;
838
- }
839
- ajaxOptions = {...options};
840
- }
841
-
842
- if (lodash.isPlainObject(ajaxOptions.data)) {
843
- jsonObject = ajaxOptions.data;
844
- }
845
-
846
- try {
847
- this.__checkJSONObjectSecurity(jsonObject)
848
- }
849
- catch (e) {
850
- let promise = new Promise(function (resolve, reject) {
851
- return reject(e);
852
- });
853
-
854
- if (this.isUseDefaultExceptionHandler()) {
855
- return promise.catch(failedDealFunction);
856
- }
857
-
858
- return promise;
859
- }
860
-
861
- if (jsonObject) {
862
- ajaxOptions.data = jsonObject;
863
- }
864
-
865
- if (ajaxOptions.rpcMethodName) {
866
- delete ajaxOptions.rpcMethodName;
867
- }
868
-
869
- ajaxOptions.type = "post";
870
- ajaxOptions.dataType = "*";
871
-
872
- if (!ajaxOptions.data){
873
- ajaxOptions.data = {};
874
- }
875
-
876
- if (!ajaxOptions.data.euts) {
877
- ajaxOptions.data.euts = (new Date()).getTime();
878
- }
879
-
880
- if (!ajaxOptions.url) {
881
- ajaxOptions.url = this.getRequestPath(options);
882
- }
883
-
884
- ajaxOptions.xhrFields = {
885
- responseType: "blob"
886
- }
887
-
888
- ajaxOptions.success = function (result, request, xhr) {
889
- let fileName = "下载文件-" + new Date().getTime();
890
- if (lodash.isString(saveFileName) && saveFileName.length > 0) {
891
- fileName = saveFileName
892
- }
893
- else {
894
- let contentDisposition = xhr.getResponseHeader('Content-Disposition');
895
- if (contentDisposition && contentDisposition.split) {
896
- let parts = contentDisposition.split(';');
897
- if (parts.length >= 1) {
898
- let fileInfo = parts[1]
899
- let fileInfoArray = fileInfo.split('=');
900
- if (fileInfoArray.length >= 1) {
901
- fileName = fileInfoArray[1];
902
- fileName = decodeURIComponent(fileName)
903
- fileName = fileName.replaceAll("\"", "")
904
- }
905
- }
906
- }
907
- }
908
-
909
- let type = xhr.getResponseHeader("content-type")
910
- if (!type) {
911
- type = "application/octet-stream";
912
- }
913
- let blob = new Blob([result], { type: type })
914
- saveAs(blob, fileName)
915
- }
916
-
917
- ajaxOptions.error = function (error) {
918
- console.log('ajaxOptions :', error)
919
- }
920
-
921
- let deferred = window.$.ajax(ajaxOptions);
922
-
923
- if (this.isUseDefaultExceptionHandler()) {
924
- return this.__toStdPromise(deferred, failedDealFunction);
925
- }
926
- else {
927
- return this.__toStdPromise(deferred);
928
- }
929
- },
930
-
931
- createRequestURL: function (requestURL, params) {
932
- let lastRequestURL = this.getRequestPath(requestURL);
933
- if (!params) {
934
- return lastRequestURL;
935
- }
936
- else if (lodash.isString(params)) {
937
- if (requestURL.includes('?')) {
938
- let requestURLData = queryString.parseUrl(requestURL);
939
- if (JSON.stringify(requestURLData.query) === '{}') {
940
- return `${requestURL}${params}`;
941
- }
942
- return `${requestURL}&${params}`;
943
- }
944
- return `${requestURL}?${params}`;
945
- }
946
- else if (lodash.isPlainObject(params)) {
947
- if (requestURL.includes('?')) {
948
- let requestURLData = queryString.parseUrl(requestURL);
949
- if (JSON.stringify(requestURLData.query) === '{}') {
950
- return `${requestURL}${this.encodeObject2ParameterString(params)}`;
951
- }
952
- return `${requestURL}&${this.encodeObject2ParameterString(params)}`;
953
- }
954
- return `${requestURL}?${this.encodeObject2ParameterString(params)}`;
955
- }
956
- },
957
-
958
- /**
959
- * !important! <br/>
960
- * DoNot use this pointer in this function body.
961
- */
962
- dealAjaxException: function (httpExceptionResponse) {
963
- let errorID = "[ClientTraceID=" + new Date().getTime() + "] ";
964
- let errorMsg = null;
965
- if (lodash.isString(httpExceptionResponse)) {
966
- errorMsg = httpExceptionResponse;
967
- message.error(errorMsg)
968
- }
969
- else if (httpExceptionResponse && (httpExceptionResponse.responseJSON || httpExceptionResponse.response)) {
970
- let responseJSON = httpExceptionResponse.responseJSON || (Strings.isNotBlankString(httpExceptionResponse.response) ? JSON.parse(httpExceptionResponse.response) : httpExceptionResponse.response);
971
- let responseJSONData = responseJSON.resultData || responseJSON.data;
972
- let statusCode = responseJSON.statusCode;
973
- if (statusCode && statusCode > 40000 && statusCode < 50000) {
974
- errorMsg = responseJSON.msg || responseJSON.message;
975
- message.error(errorMsg)
976
- console.error(errorID + "Http request error:" + errorMsg, httpExceptionResponse)
977
- if (isNeedForceRedirect()) {
978
- setTimeout(() => {
979
- forceRedirectToForError();
980
- }, 300)
981
- }
982
-
983
- return httpExceptionResponse;
984
- }
985
-
986
- if (Values.isNotEmptyArray(responseJSONData)) {
987
- let msgItemList = responseJSONData.map(msgItem => <li>{msgItem}</li>)
988
- let durationSeconds = responseJSONData.length * 1;
989
- durationSeconds = durationSeconds < 3 ? 3 : durationSeconds;
990
- let multiLineOpts = {
991
- content: (
992
- <>
993
- <div>{responseJSON.msg}</div>
994
- <ol style={{ marginTop: 8, paddingLeft: 0 }}>
995
- {msgItemList}
996
- </ol>
997
- </>
998
- ),
999
- duration: durationSeconds,
1000
- };
1001
- message.error(multiLineOpts);
1002
- } else {
1003
- if (responseJSON.error) {
1004
- if (Values.isNotBlankString(responseJSON.error.msg)) {
1005
- errorMsg = responseJSON.error.msg;
1006
- }
1007
- else if (Values.isNotBlankString(responseJSON.error.message)) {
1008
- errorMsg = responseJSON.error.message;
1009
- }
1010
- else if (Values.isNotBlankString(responseJSON.error)) {
1011
- errorMsg = responseJSON.error;
1012
- }
1013
-
1014
- if (Values.isNotBlankString(errorMsg)) {
1015
- message.error(errorMsg)
1016
- }
1017
- } else {
1018
- errorMsg = responseJSON.msg || responseJSON.message || responseJSON.err;
1019
-
1020
- if (Values.isNotBlankString(errorMsg)) {
1021
- message.error(errorMsg)
1022
- }
1023
- }
1024
- }
1025
- console.error(errorID + "Http request error:" + errorMsg, httpExceptionResponse)
1026
- return httpExceptionResponse;
1027
- }
1028
- else if (Values.isNotBlankString(httpExceptionResponse.message)) {
1029
- message.error(httpExceptionResponse.message)
1030
- }
1031
- else if (httpExceptionResponse.status === 502) {
1032
- message.error("[502]服务正在重启,请稍后重试")
1033
- }
1034
- else if (httpExceptionResponse.status === 200) {
1035
- message.error("[200]Http状态码为200,但是出错,可能的原因是数据格式转换异常,请排查。")
1036
- }
1037
- else if (httpExceptionResponse.status === 404) {
1038
- let contentType = httpExceptionResponse.getResponseHeader("Content-Type");
1039
- if (Values.isNotBlankString(contentType) && !contentType.toLowerCase().startsWith("application/json")) {
1040
- // because the request is always to for backend service
1041
- // but when failed, we always return json;
1042
- // when not json, that is always the backend service not available (not start);
1043
- message.error("[404] Not Found, 可能是后端服务尚未启动.")
1044
- if (isNeedForceRedirect()) {
1045
- setTimeout(() => {
1046
- forceRedirectToForError();
1047
- }, 300)
1048
- }
1049
- }
1050
- else {
1051
- message.error("[404] Not Found(所请求的资源不存在)")
1052
- }
1053
- }
1054
- else if (httpExceptionResponse.status === 0 || httpExceptionResponse.readyState === 0) {
1055
- message.error("应用服务链路不通:请联系管理员检查应用服务是否已启动.")
1056
- }
1057
- else if (httpExceptionResponse.status && httpExceptionResponse.statusText) {
1058
- let errorTip = "[" + httpExceptionResponse.status + "] " + httpExceptionResponse.statusText;
1059
- message.error(errorTip)
1060
- }
1061
-
1062
- console.error(errorID + "Maybe Http request error or Unresolved promise message:", httpExceptionResponse)
1063
- return httpExceptionResponse;
1064
- },
1065
-
1066
- __toStdPromise: function (deferred, failedDealFunction) {
1067
- if (failedDealFunction === null || failedDealFunction === void 0) {
1068
- return Promise.resolve(deferred);
1069
- }
1070
-
1071
- return Promise.resolve(deferred).catch(failedDealFunction)
1072
- }
1073
458
  }
1074
459
 
1075
460
  export default http;