@ibiz-template/runtime 0.6.0-alpha.0 → 0.6.0-alpha.2

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
@@ -27802,9 +27802,11 @@ var ExcludeOPs = [
27802
27802
  ];
27803
27803
  var ScriptValueRegex = /\$\{[^}]*\}/;
27804
27804
  var SearchBarFilterController = class {
27805
- constructor(model, searchbar) {
27805
+ constructor(model, appDataEntity, context, params) {
27806
27806
  this.model = model;
27807
- this.searchbar = searchbar;
27807
+ this.appDataEntity = appDataEntity;
27808
+ this.context = context;
27809
+ this.params = params;
27808
27810
  /**
27809
27811
  * 不需要编辑器
27810
27812
  * @author lxm
@@ -27822,12 +27824,6 @@ var SearchBarFilterController = class {
27822
27824
  this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
27823
27825
  this.noEditor = this.valueOP ? ExcludeOPs.includes(this.valueOP) : !this.model.editor;
27824
27826
  }
27825
- get context() {
27826
- return this.searchbar.context;
27827
- }
27828
- get params() {
27829
- return this.searchbar.params;
27830
- }
27831
27827
  /**
27832
27828
  * 值项
27833
27829
  * @author lxm
@@ -27838,9 +27834,6 @@ var SearchBarFilterController = class {
27838
27834
  get valueItem() {
27839
27835
  return this.editor ? this.editor.valueItem : void 0;
27840
27836
  }
27841
- get appDataEntity() {
27842
- return this.searchbar.appDataEntity;
27843
- }
27844
27837
  /**
27845
27838
  * 初始化
27846
27839
  * @author lxm
@@ -27861,26 +27854,6 @@ var SearchBarFilterController = class {
27861
27854
  }
27862
27855
  }
27863
27856
  }
27864
- /**
27865
- * 格式化给多数据查询接口的值
27866
- * @author lxm
27867
- * @date 2024-02-04 11:31:32
27868
- * @param {*} value
27869
- * @return {*} {*}
27870
- */
27871
- formatValue(node) {
27872
- const { value, valueItem } = node;
27873
- if (this.valueItem && valueItem) {
27874
- delete node.valueItem;
27875
- return valueItem;
27876
- }
27877
- if (ScriptValueRegex.test(value)) {
27878
- return ScriptFactory.execSingleLine("`".concat(value, "`"), {
27879
- ...this.searchbar.getEventArgs()
27880
- });
27881
- }
27882
- return value;
27883
- }
27884
27857
  /**
27885
27858
  * 计算要递给编辑器的参数
27886
27859
  * @author lxm
@@ -28588,7 +28561,12 @@ var SearchBarController = class extends ControlController {
28588
28561
  var _a;
28589
28562
  if ((_a = this.searchBarFilters) == null ? void 0 : _a.length) {
28590
28563
  this.searchBarFilters.forEach((item) => {
28591
- const filterController = new SearchBarFilterController(item, this);
28564
+ const filterController = new SearchBarFilterController(
28565
+ item,
28566
+ this.appDataEntity,
28567
+ this.context,
28568
+ this.params
28569
+ );
28592
28570
  this.filterControllers.push(filterController);
28593
28571
  });
28594
28572
  await Promise.all(
@@ -28617,7 +28595,14 @@ var SearchBarController = class extends ControlController {
28617
28595
  node.condop
28618
28596
  );
28619
28597
  if (controller) {
28620
- node.value = controller.formatValue(node);
28598
+ if (controller.valueItem && node.valueItem) {
28599
+ node.value = node.valueItem;
28600
+ delete node.valueItem;
28601
+ } else if (ScriptValueRegex2.test(node.value)) {
28602
+ node.value = ScriptFactory.execSingleLine("`".concat(node.value, "`"), {
28603
+ ...this.getEventArgs()
28604
+ });
28605
+ }
28621
28606
  }
28622
28607
  }
28623
28608
  },
@@ -33802,12 +33787,12 @@ var NoticeController = class {
33802
33787
  this.internalMessage = new InternalMessageController();
33803
33788
  }
33804
33789
  async init() {
33805
- await this.internalMessage.init();
33806
- await this.asyncAction.init();
33807
33790
  this.internalMessage.evt.on("unreadCountChange", () => {
33808
33791
  this.total = this.internalMessage.unreadCount;
33809
33792
  this.evt.emit("totalChange", this.total);
33810
33793
  });
33794
+ await this.internalMessage.init();
33795
+ await this.asyncAction.init();
33811
33796
  }
33812
33797
  };
33813
33798
 
@@ -34859,6 +34844,7 @@ var MDViewEngine = class extends ViewEngineBase {
34859
34844
  };
34860
34845
 
34861
34846
  // src/global/global-util/global-util.ts
34847
+ var sourceTitle = document.title;
34862
34848
  var GlobalUtil = class {
34863
34849
  constructor() {
34864
34850
  /**
@@ -34960,6 +34946,21 @@ var GlobalUtil = class {
34960
34946
  }
34961
34947
  }, 300);
34962
34948
  }
34949
+ /**
34950
+ * 设置浏览器标签页标题
34951
+ *
34952
+ * @author chitanda
34953
+ * @date 2024-02-05 09:02:08
34954
+ * @param {string} title
34955
+ */
34956
+ setBrowserTitle(title) {
34957
+ const app = ibiz.hub.getApp();
34958
+ if (title) {
34959
+ document.title = "".concat(app.model.title || ibiz.env.AppTitle || sourceTitle, " - ").concat(title);
34960
+ } else {
34961
+ document.title = app.model.title || ibiz.env.AppTitle || sourceTitle;
34962
+ }
34963
+ }
34963
34964
  };
34964
34965
 
34965
34966
  // src/logic-scheduler/executor/logic-executor.ts