arco-support-request 0.0.58 → 0.0.59

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.
@@ -7741,16 +7741,31 @@ class EntityDynamicFieldComponent {
7741
7741
  }
7742
7742
  this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue, searchCriteria, SearchText, restData.Havecriteria)
7743
7743
  .subscribe((ress) => {
7744
- var _a;
7745
7744
  let res = ress;
7746
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
7747
- res = ress.entities;
7748
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
7749
- res = ress.Data;
7750
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
7751
- res = ress.templates;
7752
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data) && ((_a = ress === null || ress === void 0 ? void 0 : ress.Data) === null || _a === void 0 ? void 0 : _a.Data))
7753
- res = ress.Data.Data;
7745
+ if (restData.ResponseView) {
7746
+ let _rview = restData.ResponseView.split(".");
7747
+ _rview.forEach(x => {
7748
+ if (ress) {
7749
+ ress = ress[x];
7750
+ res = ress;
7751
+ }
7752
+ else
7753
+ res = "";
7754
+ });
7755
+ }
7756
+ else {
7757
+ if (ress.Data) {
7758
+ res = ress.Data;
7759
+ if (res.Data)
7760
+ res = res.Data;
7761
+ }
7762
+ if (ress.content)
7763
+ res = ress.content;
7764
+ if (ress.entities)
7765
+ res = ress.entities;
7766
+ if (ress.templates)
7767
+ res = ress.templates;
7768
+ }
7754
7769
  if (RequestorField) {
7755
7770
  let _Sitem = res.filter((x) => x[restData.valueField] == this.RequestorFieldValue);
7756
7771
  this.fieldsList.map((x) => {
@@ -7775,16 +7790,31 @@ class EntityDynamicFieldComponent {
7775
7790
  else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
7776
7791
  const url = jsonItem.api.url;
7777
7792
  this.entityTypeSetup.getDyamicUrl(url).subscribe((ress) => {
7778
- var _a;
7779
7793
  let res = ress;
7780
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
7781
- res = ress.entities;
7782
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
7783
- res = ress.Data;
7784
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
7785
- res = ress.templates;
7786
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data) && ((_a = ress === null || ress === void 0 ? void 0 : ress.Data) === null || _a === void 0 ? void 0 : _a.Data))
7787
- res = ress.Data.Data;
7794
+ if (jsonItem.api && jsonItem.api.ResponseView) {
7795
+ let _rview = jsonItem.api.ResponseView.split(".");
7796
+ _rview.forEach(x => {
7797
+ if (ress) {
7798
+ ress = ress[x];
7799
+ res = ress;
7800
+ }
7801
+ else
7802
+ res = "";
7803
+ });
7804
+ }
7805
+ else {
7806
+ if (ress.Data) {
7807
+ res = ress.Data;
7808
+ if (res.Data)
7809
+ res = res.Data;
7810
+ }
7811
+ if (ress.content)
7812
+ res = ress.content;
7813
+ if (ress.entities)
7814
+ res = ress.entities;
7815
+ if (ress.templates)
7816
+ res = ress.templates;
7817
+ }
7788
7818
  if (res && Array.isArray(res) && res.length > 0) {
7789
7819
  obx.next(res.map((x) => Object.assign({
7790
7820
  Id: x[jsonItem.api.valueField],
@@ -8042,19 +8072,33 @@ class EntityDynamicFieldComponent {
8042
8072
  if (!isDepandancyvalue) {
8043
8073
  return;
8044
8074
  }
8045
- this.entityTypeSetup
8046
- .dynamicAPi(jsonItem.rest, _formvalue)
8075
+ this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue)
8047
8076
  .subscribe((ress) => {
8048
- var _a;
8049
8077
  let res = ress;
8050
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8051
- res = ress.entities;
8052
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8053
- res = ress.Data;
8054
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
8055
- res = ress.templates;
8056
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data) && ((_a = ress === null || ress === void 0 ? void 0 : ress.Data) === null || _a === void 0 ? void 0 : _a.Data))
8057
- res = ress.Data.Data;
8078
+ if (restData.ResponseView) {
8079
+ let _rview = restData.ResponseView.split(".");
8080
+ _rview.forEach(x => {
8081
+ if (ress) {
8082
+ ress = ress[x];
8083
+ res = ress;
8084
+ }
8085
+ else
8086
+ res = "";
8087
+ });
8088
+ }
8089
+ else {
8090
+ if (ress.Data) {
8091
+ res = ress.Data;
8092
+ if (res.Data)
8093
+ res = res.Data;
8094
+ }
8095
+ if (ress.content)
8096
+ res = ress.content;
8097
+ if (ress.entities)
8098
+ res = ress.entities;
8099
+ if (ress.templates)
8100
+ res = ress.templates;
8101
+ }
8058
8102
  if (res && Array.isArray(res) && res.length > 0) {
8059
8103
  obx.next(res.map((x) => Object.assign({
8060
8104
  Id: x[jsonItem.rest.valueField],
@@ -8075,16 +8119,31 @@ class EntityDynamicFieldComponent {
8075
8119
  else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
8076
8120
  const url = jsonItem.api.url;
8077
8121
  this.entityTypeSetup.getDyamicUrl(url).subscribe((ress) => {
8078
- var _a;
8079
8122
  let res = ress;
8080
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.entities))
8081
- res = ress.entities;
8082
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data))
8083
- res = ress.Data;
8084
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.templates))
8085
- res = ress.templates;
8086
- if (ress && (ress === null || ress === void 0 ? void 0 : ress.Data) && ((_a = ress === null || ress === void 0 ? void 0 : ress.Data) === null || _a === void 0 ? void 0 : _a.Data))
8087
- res = ress.Data.Data;
8123
+ if (jsonItem.api && jsonItem.api.ResponseView) {
8124
+ let _rview = jsonItem.api.ResponseView.split(".");
8125
+ _rview.forEach(x => {
8126
+ if (ress) {
8127
+ ress = ress[x];
8128
+ res = ress;
8129
+ }
8130
+ else
8131
+ res = "";
8132
+ });
8133
+ }
8134
+ else {
8135
+ if (ress.Data) {
8136
+ res = ress.Data;
8137
+ if (res.Data)
8138
+ res = res.Data;
8139
+ }
8140
+ if (ress.content)
8141
+ res = ress.content;
8142
+ if (ress.entities)
8143
+ res = ress.entities;
8144
+ if (ress.templates)
8145
+ res = ress.templates;
8146
+ }
8088
8147
  if (res && Array.isArray(res) && res.length > 0) {
8089
8148
  obx.next(res.map((x) => Object.assign({
8090
8149
  Id: x[jsonItem.api.valueField],