@ibiz-template/model-helper 0.7.38-alpha.45 → 0.7.38-alpha.57

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/index.esm.js CHANGED
@@ -17064,6 +17064,42 @@ function mergeDEDrControl(dstDRCtrl, srcDRCtrl) {
17064
17064
  }
17065
17065
  });
17066
17066
  }
17067
+ if (srcDRCtrl.dedrtabPages) {
17068
+ srcDRCtrl.dedrtabPages.forEach((item1) => {
17069
+ let index = 0;
17070
+ const result = dstDRCtrl.dedrtabPages.find(
17071
+ (item2, index2) => {
17072
+ index = index2;
17073
+ return item1.id === item2.id;
17074
+ }
17075
+ );
17076
+ if (result) {
17077
+ dstDRCtrl.dedrtabPages[index] = item1;
17078
+ } else if (item1.itemTag) {
17079
+ const [targetPosition, targetTag] = item1.itemTag.split(":");
17080
+ if (!targetTag || !targetPosition) {
17081
+ dstDRCtrl.dedrtabPages.push(item1);
17082
+ } else {
17083
+ const targetIndex = dstDRCtrl.dedrtabPages.findIndex(
17084
+ (item3) => item3.id === targetTag
17085
+ );
17086
+ if (targetIndex !== -1) {
17087
+ if (targetPosition === "BEFORE") {
17088
+ dstDRCtrl.dedrtabPages.splice(targetIndex, 0, item1);
17089
+ } else if (targetPosition === "AFTER") {
17090
+ dstDRCtrl.dedrtabPages.splice(targetIndex + 1, 0, item1);
17091
+ } else {
17092
+ dstDRCtrl.dedrtabPages.push(item1);
17093
+ }
17094
+ } else {
17095
+ dstDRCtrl.dedrtabPages.push(item1);
17096
+ }
17097
+ }
17098
+ } else {
17099
+ dstDRCtrl.dedrtabPages.push(item1);
17100
+ }
17101
+ });
17102
+ }
17067
17103
  }
17068
17104
 
17069
17105
  // src/utils/merge-model/merge-app-uiaction-group.ts
@@ -17920,12 +17956,16 @@ var ModelHelper = class {
17920
17956
  const name = view.path.split("/").pop().replace(".json", "");
17921
17957
  ibiz.hub.defaultAppIndexViewName = name;
17922
17958
  if (!ibiz.env.AppTitle) {
17923
- const views = appSourceModel.cache.getPSAppViews;
17924
- const indexView = views.find(
17925
- (viewItem) => viewItem.dynaModelFilePath === view.path
17926
- );
17927
- if (indexView) {
17928
- ibiz.env.AppTitle = indexView.title;
17959
+ if (appSourceModel.caption) {
17960
+ ibiz.env.AppTitle = appSourceModel.caption;
17961
+ } else {
17962
+ const views = appSourceModel.cache.getPSAppViews;
17963
+ const indexView = views.find(
17964
+ (viewItem) => viewItem.dynaModelFilePath === view.path
17965
+ );
17966
+ if (indexView) {
17967
+ ibiz.env.AppTitle = indexView.caption;
17968
+ }
17929
17969
  }
17930
17970
  }
17931
17971
  }
@@ -18081,12 +18121,16 @@ var ModelHelper = class {
18081
18121
  const name = view.path.split("/").pop().replace(".json", "");
18082
18122
  ibiz.hub.defaultAppIndexViewName = name;
18083
18123
  if (!ibiz.env.AppTitle) {
18084
- const views = model.cache.getPSAppViews;
18085
- const indexView = views.find(
18086
- (viewItem) => viewItem.dynaModelFilePath === view.path
18087
- );
18088
- if (indexView) {
18089
- ibiz.env.AppTitle = indexView.title;
18124
+ if (model.caption) {
18125
+ ibiz.env.AppTitle = model.caption;
18126
+ } else {
18127
+ const views = model.cache.getPSAppViews;
18128
+ const indexView = views.find(
18129
+ (viewItem) => viewItem.dynaModelFilePath === view.path
18130
+ );
18131
+ if (indexView) {
18132
+ ibiz.env.AppTitle = indexView.caption;
18133
+ }
18090
18134
  }
18091
18135
  }
18092
18136
  }