@ibiz-template/runtime 0.7.41-alpha.123 → 0.7.41-alpha.125

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.
Files changed (72) hide show
  1. package/dist/index.esm.js +277 -121
  2. package/dist/index.system.min.js +1 -1
  3. package/out/application.d.ts +7 -0
  4. package/out/application.d.ts.map +1 -1
  5. package/out/application.js +21 -0
  6. package/out/config/global-config.d.ts.map +1 -1
  7. package/out/config/global-config.js +1 -0
  8. package/out/controller/control/form/form/form.controller.js +2 -2
  9. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
  10. package/out/controller/control/form/form-detail/form-item/form-item.controller.js +1 -1
  11. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts +16 -2
  12. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.js +45 -4
  14. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
  15. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +1 -1
  16. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
  17. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +1 -1
  18. package/out/controller/utils/data-file-util/data-file-util.js +2 -2
  19. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +9 -0
  20. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
  21. package/out/interface/register/i-register-params.d.ts +20 -35
  22. package/out/interface/register/i-register-params.d.ts.map +1 -1
  23. package/out/locale/en/index.d.ts +11 -0
  24. package/out/locale/en/index.d.ts.map +1 -1
  25. package/out/locale/en/index.js +11 -0
  26. package/out/locale/zh-CN/index.d.ts +11 -0
  27. package/out/locale/zh-CN/index.d.ts.map +1 -1
  28. package/out/locale/zh-CN/index.js +11 -0
  29. package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +8 -0
  30. package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
  31. package/out/logic-scheduler/scheduler/logic-scheduler.js +17 -0
  32. package/out/register/custom-register.d.ts +38 -22
  33. package/out/register/custom-register.d.ts.map +1 -1
  34. package/out/register/custom-register.js +123 -78
  35. package/out/register/helper/control-register.js +2 -2
  36. package/out/register/helper/de-method-register.d.ts +1 -1
  37. package/out/register/helper/de-method-register.d.ts.map +1 -1
  38. package/out/register/helper/de-method-register.js +4 -4
  39. package/out/register/helper/editor-register.d.ts +2 -3
  40. package/out/register/helper/editor-register.d.ts.map +1 -1
  41. package/out/register/helper/editor-register.js +4 -6
  42. package/out/register/helper/form-detail-register.js +3 -3
  43. package/out/register/helper/grid-column-register.d.ts +3 -3
  44. package/out/register/helper/grid-column-register.d.ts.map +1 -1
  45. package/out/register/helper/grid-column-register.js +9 -9
  46. package/out/register/helper/panel-item-register.js +4 -4
  47. package/out/register/helper/ui-action-register.js +2 -2
  48. package/out/register/helper/view-register.d.ts.map +1 -1
  49. package/out/register/helper/view-register.js +14 -0
  50. package/package.json +2 -2
  51. package/src/application.ts +23 -0
  52. package/src/config/global-config.ts +1 -0
  53. package/src/controller/control/form/form/form.controller.ts +2 -2
  54. package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +0 -1
  55. package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts +59 -8
  56. package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +0 -1
  57. package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +0 -1
  58. package/src/controller/utils/data-file-util/data-file-util.ts +2 -2
  59. package/src/interface/api/common/global-config/i-api-global-common-config.ts +10 -0
  60. package/src/interface/register/i-register-params.ts +28 -38
  61. package/src/locale/en/index.ts +20 -0
  62. package/src/locale/zh-CN/index.ts +19 -0
  63. package/src/logic-scheduler/scheduler/logic-scheduler.ts +21 -0
  64. package/src/register/custom-register.ts +126 -81
  65. package/src/register/helper/control-register.ts +2 -2
  66. package/src/register/helper/de-method-register.ts +4 -4
  67. package/src/register/helper/editor-register.ts +4 -7
  68. package/src/register/helper/form-detail-register.ts +3 -3
  69. package/src/register/helper/grid-column-register.ts +9 -9
  70. package/src/register/helper/panel-item-register.ts +4 -4
  71. package/src/register/helper/ui-action-register.ts +2 -2
  72. package/src/register/helper/view-register.ts +15 -0
package/dist/index.esm.js CHANGED
@@ -20010,7 +20010,8 @@ var GlobalConfig = class {
20010
20010
  uiActionPermissionMode: "default",
20011
20011
  importTemplNameMode: "default",
20012
20012
  aiUploadMaxSize: 5242880,
20013
- aiAutoQuestion: true
20013
+ aiAutoQuestion: true,
20014
+ asyncImport: false
20014
20015
  };
20015
20016
  // 全局分页流布局配置
20016
20017
  this.drtab = {
@@ -24119,69 +24120,69 @@ async function getAppCounterProvider(model) {
24119
24120
  // src/register/custom-register.ts
24120
24121
  var CustomRegister = class {
24121
24122
  /**
24122
- * 获取适配器注册key
24123
- *
24124
- * @author ljx
24125
- * @date 2024-04-16 23:08:08
24123
+ * @description 获取适配器注册key
24124
+ * @static
24126
24125
  * @param {string} registerType
24127
24126
  * @param {IRegisterParams} opts
24128
- * @return {string}
24127
+ * @returns {*} {string}
24128
+ * @memberof CustomRegister
24129
24129
  */
24130
24130
  static getRegisterKey(registerType, opts) {
24131
24131
  switch (registerType) {
24132
+ case VIEW_PROVIDER_PREFIX:
24133
+ return this.calcExtensionViewKey(opts);
24134
+ case CONTROL_PROVIDER_PREFIX:
24135
+ return this.calcExtensionControlKey(opts);
24132
24136
  case PANELITEM_PROVIDER_PREFIX:
24133
- return this.calcKeyByView(opts);
24137
+ return this.calcExtensionPanelItemKey(opts);
24134
24138
  case FORMDETAIL_PROVIDER_PREFIX:
24135
24139
  case GRIDCOLUMN_PROVIDER_PREFIX:
24136
- case CONTROL_PROVIDER_PREFIX:
24137
- return this.calcKeyByCtrl(opts);
24140
+ return this.calcExtensionControlItemKey(opts);
24141
+ case EDITOR_PROVIDER_PREFIX:
24142
+ return this.calcExtensionEditorKey(opts);
24138
24143
  case UIACTION_PROVIDER_PREFIX:
24139
- return this.calcKeyByAction(opts);
24144
+ return this.calcExtensionUIActionKey(opts);
24140
24145
  case DEMETHOD_PROVIDER_PREFIX:
24141
- return this.calcKeyByMethod(opts);
24142
- case EDITOR_PROVIDER_PREFIX:
24143
- return this.calcKeyByEditor(opts);
24146
+ return this.calcExtensionMethodKey(opts);
24144
24147
  default:
24145
24148
  return "";
24146
24149
  }
24147
24150
  }
24148
24151
  /**
24149
- * 通过视图计算key
24150
- * 目前适用于计算面板项的key
24151
- * @author ljx
24152
- * @date 2024-04-16 23:08:08
24152
+ * @description 计算扩展视图key,(appId@codeName)全大写
24153
+ * @static
24153
24154
  * @param {IRegisterParams} opts
24154
- * @return {string}
24155
+ * @returns {*} {string}
24156
+ * @memberof CustomRegister
24155
24157
  */
24156
- static calcKeyByView(opts) {
24157
- const { controlItemModel, controlModel, viewModel } = opts;
24158
+ static calcExtensionViewKey(opts) {
24159
+ const { mainModel } = opts;
24158
24160
  let key = "";
24159
- if (viewModel == null ? void 0 : viewModel.codeName) {
24160
- key += "".concat(viewModel.codeName.toUpperCase());
24161
- }
24162
- if (controlModel == null ? void 0 : controlModel.codeName) {
24163
- key += "@".concat(controlModel.codeName.toUpperCase());
24161
+ if (mainModel.appId) {
24162
+ key += "".concat(mainModel.appId.toUpperCase());
24164
24163
  }
24165
- if (controlItemModel == null ? void 0 : controlItemModel.id) {
24166
- key += "@".concat(controlItemModel.id.toUpperCase());
24164
+ if (mainModel.codeName) {
24165
+ key += "@".concat(mainModel.codeName.toUpperCase());
24167
24166
  }
24168
24167
  return key;
24169
24168
  }
24170
24169
  /**
24171
- * 通过部件计算key
24172
- * 没有实体的部件默认为APP
24173
- * @date 2024-04-16 23:08:08
24170
+ * @description 计算扩展部件key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName)全大写
24171
+ * @static
24174
24172
  * @param {IRegisterParams} opts
24175
- * @return {string}
24173
+ * @returns {*} {string}
24174
+ * @memberof CustomRegister
24176
24175
  */
24177
- static calcKeyByCtrl(opts) {
24178
- const { controlModel, controlItemModel } = opts;
24176
+ static calcExtensionControlKey(opts) {
24179
24177
  let key = "";
24180
- let prefix = "APP";
24181
- if (controlModel) {
24182
- const { appDataEntityId, controlType, codeName } = controlModel;
24178
+ const { mainModel } = opts;
24179
+ if (mainModel) {
24180
+ key = (mainModel.appId || "DEFAULT").toUpperCase();
24181
+ const { appDataEntityId, controlType, codeName } = mainModel;
24183
24182
  if (appDataEntityId) {
24184
- prefix = calcDeCodeNameById(appDataEntityId).toUpperCase();
24183
+ key += "@".concat(calcDeCodeNameById(appDataEntityId).toUpperCase());
24184
+ } else {
24185
+ key += "@APP";
24185
24186
  }
24186
24187
  if (controlType) {
24187
24188
  key += "@".concat(controlType.toUpperCase());
@@ -24190,86 +24191,128 @@ var CustomRegister = class {
24190
24191
  key += "@".concat(codeName.toUpperCase());
24191
24192
  }
24192
24193
  }
24193
- if (controlItemModel == null ? void 0 : controlItemModel.codeName) {
24194
- key += "@".concat(controlItemModel.codeName.toUpperCase());
24194
+ return key;
24195
+ }
24196
+ /**
24197
+ * @description 计算扩展面板key,(appId/DEFAULT@视图codeName@部件codeName@面板项标识)全大写
24198
+ * @static
24199
+ * @param {IRegisterParams} opts
24200
+ * @returns {*} {string}
24201
+ * @memberof CustomRegister
24202
+ */
24203
+ static calcExtensionPanelItemKey(opts) {
24204
+ const { mainModel, view, control } = opts;
24205
+ let key = "".concat((mainModel.appId || "DEFAULT").toUpperCase());
24206
+ if (view == null ? void 0 : view.codeName) {
24207
+ key += "@".concat(view.codeName.toUpperCase());
24208
+ }
24209
+ if (control == null ? void 0 : control.codeName) {
24210
+ key += "@".concat(control.codeName.toUpperCase());
24211
+ }
24212
+ if (mainModel == null ? void 0 : mainModel.id) {
24213
+ key += "@".concat(mainModel.id.toUpperCase());
24195
24214
  }
24196
- key = prefix + key;
24197
24215
  return key;
24198
24216
  }
24199
24217
  /**
24200
- * @description 通过界面行为模型计算key,其中实体部分无实体的话默认为APP
24218
+ * @description 计算扩展部件项key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName@部件项codeName)全大写
24201
24219
  * @static
24202
24220
  * @param {IRegisterParams} opts
24203
24221
  * @returns {*} {string}
24204
24222
  * @memberof CustomRegister
24205
24223
  */
24206
- static calcKeyByAction(opts) {
24207
- const { uiActionModel } = opts;
24208
- let prefix = "APP";
24224
+ static calcExtensionControlItemKey(opts) {
24225
+ const { mainModel, control } = opts;
24209
24226
  let key = "";
24210
- if (uiActionModel) {
24211
- const { appDataEntityId, uiactionTag } = uiActionModel;
24227
+ if (mainModel) {
24228
+ key = (mainModel.appId || "DEFAULT").toUpperCase();
24229
+ const { appDataEntityId, controlType, codeName } = control;
24212
24230
  if (appDataEntityId) {
24213
- prefix = calcDeCodeNameById(appDataEntityId).toUpperCase();
24231
+ key += "@".concat(calcDeCodeNameById(appDataEntityId).toUpperCase());
24232
+ } else {
24233
+ key += "@APP";
24214
24234
  }
24215
- key += "".concat(prefix);
24216
- if (uiactionTag) {
24217
- key += "@".concat(uiactionTag.toUpperCase());
24235
+ if (controlType) {
24236
+ key += "@".concat(controlType.toUpperCase());
24237
+ }
24238
+ if (codeName) {
24239
+ key += "@".concat(codeName.toUpperCase());
24240
+ }
24241
+ if (mainModel.codeName) {
24242
+ key += "@".concat(mainModel.codeName.toUpperCase());
24218
24243
  }
24219
24244
  }
24220
24245
  return key;
24221
24246
  }
24222
24247
  /**
24223
- * @description 通过实体方法模型计算key
24248
+ * @description 计算扩展编辑器key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName@项标识_EDITOR)全大写
24224
24249
  * @static
24225
24250
  * @param {IRegisterParams} opts
24226
24251
  * @returns {*} {string}
24227
24252
  * @memberof CustomRegister
24228
24253
  */
24229
- static calcKeyByMethod(opts) {
24230
- const { deMethodModel, entityModel } = opts;
24231
- let key = "";
24232
- if (deMethodModel) {
24233
- const { methodType, codeName } = deMethodModel;
24234
- if (entityModel == null ? void 0 : entityModel.id) {
24235
- key += calcDeCodeNameById(entityModel.id).toUpperCase();
24236
- }
24237
- if (methodType && codeName) {
24238
- key += "@".concat(methodType.toUpperCase(), "@").concat(codeName.toUpperCase());
24254
+ static calcExtensionEditorKey(opts) {
24255
+ const { mainModel, control } = opts;
24256
+ let key = (mainModel.appId || "DEFAULT").toUpperCase();
24257
+ if (control) {
24258
+ const { appDataEntityId, controlType, codeName } = control;
24259
+ if (appDataEntityId) {
24260
+ key += "@".concat(calcDeCodeNameById(appDataEntityId).toUpperCase());
24261
+ } else {
24262
+ key += "@APP";
24239
24263
  }
24264
+ key += "@".concat((controlType || "DEFAULT").toUpperCase());
24265
+ key += "@".concat((codeName || "DEFAULT").toUpperCase());
24266
+ }
24267
+ if (mainModel.id) {
24268
+ key += "@".concat(mainModel.id.toUpperCase(), "_EDITOR");
24240
24269
  }
24241
24270
  return key;
24242
24271
  }
24243
24272
  /**
24244
- * @description 通过编辑器模型计算key
24273
+ * @description 计算扩展界面行为key,(appId/DEFAULT@实体codeName/APP@界面行为标记)全大写
24274
+ * @author tony001
24275
+ * @date 2026-08-11 17:08:45
24245
24276
  * @static
24246
24277
  * @param {IRegisterParams} opts
24247
24278
  * @returns {*} {string}
24248
24279
  * @memberof CustomRegister
24249
24280
  */
24250
- static calcKeyByEditor(opts) {
24251
- const { editorModel, controlItemModel, controlModel } = opts;
24252
- let key = "";
24253
- let prefix = "APP";
24254
- if (controlModel) {
24255
- const { appDataEntityId, controlType, codeName } = controlModel;
24281
+ static calcExtensionUIActionKey(opts) {
24282
+ const { mainModel } = opts;
24283
+ let key = (mainModel.appId || "DEFAULT").toUpperCase();
24284
+ if (mainModel) {
24285
+ const { appDataEntityId, uiactionTag } = mainModel;
24256
24286
  if (appDataEntityId) {
24257
- prefix = calcDeCodeNameById(appDataEntityId).toUpperCase();
24258
- }
24259
- if (controlType) {
24260
- key += "@".concat(controlType.toUpperCase());
24287
+ key += "@".concat(calcDeCodeNameById(appDataEntityId).toUpperCase());
24288
+ } else {
24289
+ key += "@APP";
24261
24290
  }
24262
- if (codeName) {
24263
- key += "@".concat(codeName.toUpperCase());
24291
+ if (uiactionTag) {
24292
+ key += "@".concat(uiactionTag.toUpperCase());
24264
24293
  }
24265
24294
  }
24266
- if (controlItemModel == null ? void 0 : controlItemModel.codeName) {
24267
- key += "@".concat(controlItemModel.codeName.toUpperCase());
24295
+ return key;
24296
+ }
24297
+ /**
24298
+ * @description 计算扩展实体方法key,(appId/DEFAULT@实体codeName/方法类型/方法codeName)全大写
24299
+ * @static
24300
+ * @param {IRegisterParams} opts
24301
+ * @returns {*} {string}
24302
+ * @memberof CustomRegister
24303
+ */
24304
+ static calcExtensionMethodKey(opts) {
24305
+ const { mainModel, entity } = opts;
24306
+ let key = (mainModel.appId || "DEFAULT").toUpperCase();
24307
+ if (entity == null ? void 0 : entity.id) {
24308
+ key += "@".concat(calcDeCodeNameById(entity.id).toUpperCase());
24268
24309
  }
24269
- if (editorModel) {
24270
- key += "_EDITOR";
24310
+ if (mainModel) {
24311
+ const { methodType, codeName } = mainModel;
24312
+ if (methodType && codeName) {
24313
+ key += "@".concat(methodType.toUpperCase(), "@").concat(codeName.toUpperCase());
24314
+ }
24271
24315
  }
24272
- key = prefix + key;
24273
24316
  return key;
24274
24317
  }
24275
24318
  };
@@ -24288,12 +24331,12 @@ async function getControlProvider(model) {
24288
24331
  let provider;
24289
24332
  const { controlType, controlStyle, sysPFPluginId, appId: appId2 } = model;
24290
24333
  const registerKey = CustomRegister.getRegisterKey(CONTROL_PROVIDER_PREFIX, {
24291
- controlModel: model
24334
+ mainModel: model
24292
24335
  });
24293
24336
  provider = getProvider2(registerKey);
24294
24337
  if (!provider) {
24295
24338
  ibiz.log.debug(
24296
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24339
+ ibiz.i18n.t("runtime.register.helper.ctrlCustomRegistration", {
24297
24340
  registerKey
24298
24341
  })
24299
24342
  );
@@ -24357,18 +24400,17 @@ function getProvider3(key) {
24357
24400
  "".concat(EDITOR_PROVIDER_PREFIX, "_").concat(key)
24358
24401
  );
24359
24402
  }
24360
- async function getEditorProvider(model, ctrlItem, ctrl) {
24403
+ async function getEditorProvider(model, ctrl) {
24361
24404
  let provider;
24362
24405
  const { editorType, editorStyle, predefinedType, sysPFPluginId, appId: appId2 } = model;
24363
24406
  const registerKey = CustomRegister.getRegisterKey(EDITOR_PROVIDER_PREFIX, {
24364
- controlItemModel: ctrlItem,
24365
- controlModel: ctrl,
24366
- editorModel: model
24407
+ mainModel: model,
24408
+ control: ctrl
24367
24409
  });
24368
24410
  provider = getProvider3(registerKey);
24369
24411
  if (!provider) {
24370
24412
  ibiz.log.debug(
24371
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24413
+ ibiz.i18n.t("runtime.register.helper.editorCustomRegistration", {
24372
24414
  registerKey
24373
24415
  })
24374
24416
  );
@@ -24451,14 +24493,14 @@ async function getFormDetailProvider(model, formModel) {
24451
24493
  const registerKey = CustomRegister.getRegisterKey(
24452
24494
  FORMDETAIL_PROVIDER_PREFIX,
24453
24495
  {
24454
- controlItemModel: model,
24455
- controlModel: formModel
24496
+ mainModel: model,
24497
+ control: formModel
24456
24498
  }
24457
24499
  );
24458
24500
  provider = getProvider4(registerKey);
24459
24501
  if (!provider) {
24460
24502
  ibiz.log.debug(
24461
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24503
+ ibiz.i18n.t("runtime.register.helper.formDetailCustomRegistration", {
24462
24504
  registerKey
24463
24505
  })
24464
24506
  );
@@ -24502,20 +24544,20 @@ function getProvider5(key) {
24502
24544
  "".concat(GRIDCOLUMN_PROVIDER_PREFIX, "_").concat(key)
24503
24545
  );
24504
24546
  }
24505
- async function getGridColumnProvider(model, gridModel) {
24547
+ async function getGridColumnProvider(model, grid) {
24506
24548
  let provider;
24507
24549
  const { columnType, enableRowEdit, sysPFPluginId, appId: appId2 } = model;
24508
24550
  const registerKey = CustomRegister.getRegisterKey(
24509
24551
  GRIDCOLUMN_PROVIDER_PREFIX,
24510
24552
  {
24511
- controlItemModel: model,
24512
- controlModel: gridModel
24553
+ mainModel: model,
24554
+ control: grid
24513
24555
  }
24514
24556
  );
24515
24557
  provider = getProvider5(registerKey);
24516
24558
  if (!provider) {
24517
24559
  ibiz.log.debug(
24518
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24560
+ ibiz.i18n.t("runtime.register.helper.gridColumnCustomRegistration", {
24519
24561
  registerKey
24520
24562
  })
24521
24563
  );
@@ -24549,20 +24591,20 @@ async function getGridColumnProvider(model, gridModel) {
24549
24591
  return provider;
24550
24592
  }
24551
24593
  }
24552
- async function getAutoGridColumnProvider(model, gridModel) {
24594
+ async function getAutoGridColumnProvider(model, grid) {
24553
24595
  let provider;
24554
24596
  const { columnType, enableRowEdit, sysPFPluginId, appId: appId2 } = model;
24555
24597
  const registerKey = CustomRegister.getRegisterKey(
24556
24598
  GRIDCOLUMN_PROVIDER_PREFIX,
24557
24599
  {
24558
- controlItemModel: model,
24559
- controlModel: gridModel
24600
+ mainModel: model,
24601
+ control: grid
24560
24602
  }
24561
24603
  );
24562
24604
  provider = getProvider5(registerKey);
24563
24605
  if (!provider) {
24564
24606
  ibiz.log.debug(
24565
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24607
+ ibiz.i18n.t("runtime.register.helper.gridColumnCustomRegistration", {
24566
24608
  registerKey
24567
24609
  })
24568
24610
  );
@@ -24615,14 +24657,14 @@ async function getPanelItemProvider(model, panelModel, viewModel) {
24615
24657
  let provider;
24616
24658
  const { itemType, sysPFPluginId, appId: appId2, controlRenders, id } = model;
24617
24659
  const registerKey = CustomRegister.getRegisterKey(PANELITEM_PROVIDER_PREFIX, {
24618
- controlItemModel: model,
24619
- controlModel: panelModel,
24620
- viewModel
24660
+ mainModel: model,
24661
+ view: viewModel,
24662
+ control: panelModel
24621
24663
  });
24622
24664
  provider = getProvider6(registerKey);
24623
24665
  if (!provider) {
24624
24666
  ibiz.log.debug(
24625
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24667
+ ibiz.i18n.t("runtime.register.helper.panelItemCustomRegistration", {
24626
24668
  registerKey
24627
24669
  })
24628
24670
  );
@@ -24765,12 +24807,12 @@ async function getUIActionProvider(model) {
24765
24807
  let provider;
24766
24808
  const { uiactionMode, sysPFPluginId, appId: appId2, uiactionTag } = model;
24767
24809
  const registerKey = CustomRegister.getRegisterKey(UIACTION_PROVIDER_PREFIX, {
24768
- uiActionModel: model
24810
+ mainModel: model
24769
24811
  });
24770
24812
  provider = getProvider8(registerKey);
24771
24813
  if (!provider) {
24772
24814
  ibiz.log.debug(
24773
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
24815
+ ibiz.i18n.t("runtime.register.helper.uiactionCustomRegistration", {
24774
24816
  registerKey
24775
24817
  })
24776
24818
  );
@@ -24844,6 +24886,19 @@ function getProvider9(key) {
24844
24886
  async function getViewProvider(model) {
24845
24887
  let provider;
24846
24888
  const { viewType, viewStyle, sysPFPluginId, appId: appId2 } = model;
24889
+ const registerKey = CustomRegister.getRegisterKey(VIEW_PROVIDER_PREFIX, {
24890
+ mainModel: model
24891
+ });
24892
+ provider = getProvider9(registerKey);
24893
+ if (!provider) {
24894
+ ibiz.log.debug(
24895
+ ibiz.i18n.t("runtime.register.helper.viewCustomRegistration", {
24896
+ registerKey
24897
+ })
24898
+ );
24899
+ } else {
24900
+ return provider;
24901
+ }
24847
24902
  if (sysPFPluginId) {
24848
24903
  const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId2);
24849
24904
  if (pluginKey) {
@@ -26155,9 +26210,9 @@ async function importData(file, appDataEntity, dataImport, context, params) {
26155
26210
  }
26156
26211
  async function importData2(opts) {
26157
26212
  const result = {
26158
- isAsync: ibiz.env.enableMqtt
26213
+ isAsync: ibiz.config.common.asyncImport
26159
26214
  };
26160
- if (ibiz.env.enableMqtt) {
26215
+ if (ibiz.config.common.asyncImport) {
26161
26216
  asyncImportData(
26162
26217
  opts.selectedFile,
26163
26218
  opts.appDataEntity,
@@ -45841,15 +45896,15 @@ var FormController = class extends ControlController {
45841
45896
  },
45842
45897
  200
45843
45898
  );
45844
- this._evt.on("onFormDetailEvent", (event) => {
45899
+ this._evt.on("onFormDetailEvent", async (event) => {
45845
45900
  var _a3;
45846
45901
  if (this.state.formIsDestroyed)
45847
45902
  return;
45848
- (_a3 = this.scheduler) == null ? void 0 : _a3.triggerControlEvent(
45903
+ await ((_a3 = this.scheduler) == null ? void 0 : _a3.triggerControlItemEvent(
45849
45904
  event.formDetailName,
45850
45905
  event.formDetailEventName,
45851
45906
  event
45852
- );
45907
+ ));
45853
45908
  });
45854
45909
  }
45855
45910
  /**
@@ -48317,7 +48372,6 @@ var FormItemController = class extends FormDetailController {
48317
48372
  if (this.model.editor && this.model.editor.editorType !== "HIDDEN") {
48318
48373
  this.editorProvider = await getEditorProvider(
48319
48374
  this.model.editor,
48320
- this.model,
48321
48375
  this.form.model
48322
48376
  );
48323
48377
  if (this.editorProvider) {
@@ -49476,7 +49530,9 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
49476
49530
  */
49477
49531
  async validate() {
49478
49532
  const values = await Promise.all(
49479
- Array.from(this.repeaterMap.values()).map((form) => form.validate())
49533
+ Array.from(this.repeaterMap.values()).map(
49534
+ (form) => form.state.isLoaded && form.validate()
49535
+ )
49480
49536
  );
49481
49537
  return values.findIndex((value) => !value) === -1;
49482
49538
  }
@@ -49487,7 +49543,9 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
49487
49543
  */
49488
49544
  async silentValidate() {
49489
49545
  const values = await Promise.all(
49490
- Array.from(this.repeaterMap.values()).map((form) => form.silentValidate())
49546
+ Array.from(this.repeaterMap.values()).map(
49547
+ (form) => form.state.isLoaded && form.silentValidate()
49548
+ )
49491
49549
  );
49492
49550
  return values.findIndex((value) => !value) === -1;
49493
49551
  }
@@ -49506,14 +49564,37 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
49506
49564
  args: { oldValue }
49507
49565
  });
49508
49566
  }
49567
+ /**
49568
+ * @description 自定义事件
49569
+ * @private
49570
+ * @param {{
49571
+ * eventName: string;
49572
+ * index?: number;
49573
+ * eventArg: IData;
49574
+ * }} args
49575
+ * @returns {*} {Promise<void>}
49576
+ * @memberof FormMDCtrlRepeaterController
49577
+ */
49578
+ async onCustomAction(args) {
49579
+ await this.form.evt.emit("onFormDetailEvent", {
49580
+ formDetailName: this.name || this.model.id,
49581
+ formDetailEventName: "onCustomAction" /* CUSTOMACTION */,
49582
+ args: { ...args, data: this.value }
49583
+ });
49584
+ }
49509
49585
  /**
49510
49586
  * @description 添加或创建一条数据
49511
49587
  * @param {number} [index]
49512
49588
  * @memberof FormMDCtrlRepeaterController
49513
49589
  */
49514
- create(index) {
49590
+ async create(index) {
49515
49591
  const item = {};
49516
49592
  this.setDefaultValue(item, "create");
49593
+ await this.onCustomAction({
49594
+ index,
49595
+ eventArg: item,
49596
+ eventName: "onBeforeNew"
49597
+ });
49517
49598
  if (this.isSingleData) {
49518
49599
  this.setValue(item);
49519
49600
  } else {
@@ -49526,6 +49607,11 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
49526
49607
  }
49527
49608
  this.setValue(tempValue);
49528
49609
  }
49610
+ await this.onCustomAction({
49611
+ index,
49612
+ eventArg: item,
49613
+ eventName: "onNewSuccess"
49614
+ });
49529
49615
  this.form.evt.emit("onMDCtrlNew", {
49530
49616
  args: item
49531
49617
  });
@@ -49536,7 +49622,13 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
49536
49622
  * @returns {*} {void}
49537
49623
  * @memberof FormMDCtrlRepeaterController
49538
49624
  */
49539
- remove(index) {
49625
+ async remove(index) {
49626
+ const item = this.isSingleData ? this.value : this.value[index];
49627
+ await this.onCustomAction({
49628
+ index,
49629
+ eventArg: item,
49630
+ eventName: "onBeforeRemove"
49631
+ });
49540
49632
  if (this.isSingleData) {
49541
49633
  this.setValue(null);
49542
49634
  return;
@@ -49545,6 +49637,11 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
49545
49637
  return index !== i;
49546
49638
  });
49547
49639
  this.setValue(newArr);
49640
+ await this.onCustomAction({
49641
+ index,
49642
+ eventArg: item,
49643
+ eventName: "onRemoveSuccess"
49644
+ });
49548
49645
  this.form.evt.emit("onMDCtrlRemove", {
49549
49646
  args: newArr
49550
49647
  });
@@ -53964,7 +54061,6 @@ var GridFieldColumnController = class extends GridColumnController {
53964
54061
  if (filterEditor && columnEnableFilter && filterEditor.editorType !== "HIDDEN") {
53965
54062
  this.filterEditorProvider = await getEditorProvider(
53966
54063
  filterEditor,
53967
- this.model,
53968
54064
  this.grid.model
53969
54065
  );
53970
54066
  if (this.filterEditorProvider) {
@@ -54447,7 +54543,6 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
54447
54543
  if (this.editItem.editor && this.editItem.editor.editorType !== "HIDDEN") {
54448
54544
  this.editorProvider = await getEditorProvider(
54449
54545
  this.editItem.editor,
54450
- this.model,
54451
54546
  this.grid.model
54452
54547
  );
54453
54548
  if (this.editorProvider) {
@@ -68662,17 +68757,17 @@ function getProvider12(key) {
68662
68757
  "".concat(DEMETHOD_PROVIDER_PREFIX, "_").concat(key)
68663
68758
  );
68664
68759
  }
68665
- async function getDEMethodProvider(model, entityModel) {
68760
+ async function getDEMethodProvider(model, entity) {
68666
68761
  let provider;
68667
68762
  const { methodType, sysPFPluginId, appId: appId2 } = model;
68668
68763
  const registerKey = CustomRegister.getRegisterKey(DEMETHOD_PROVIDER_PREFIX, {
68669
- deMethodModel: model,
68670
- entityModel
68764
+ mainModel: model,
68765
+ entity
68671
68766
  });
68672
68767
  provider = getProvider12(registerKey);
68673
68768
  if (!provider) {
68674
68769
  ibiz.log.debug(
68675
- ibiz.i18n.t("runtime.register.helper.customRegistration", {
68770
+ ibiz.i18n.t("runtime.register.helper.deMethodCustomRegistration", {
68676
68771
  registerKey
68677
68772
  })
68678
68773
  );
@@ -86617,6 +86712,7 @@ var Application = class {
86617
86712
  await this.loadAppModelStyle();
86618
86713
  await this.loadAppLang();
86619
86714
  await this.loadGlobalAppUtil();
86715
+ await this.loadExtensionPlugin();
86620
86716
  await this.loadReplaceDefaultPlugin();
86621
86717
  }
86622
86718
  /**
@@ -86678,6 +86774,27 @@ var Application = class {
86678
86774
  return;
86679
86775
  await ibiz.plugin.loadPlugin(globalAppUtilPlugin);
86680
86776
  }
86777
+ /**
86778
+ * @description 加载扩展插件
86779
+ * @protected
86780
+ * @returns {*} {Promise<void>}
86781
+ * @memberof Application
86782
+ */
86783
+ async loadExtensionPlugin() {
86784
+ try {
86785
+ await ibiz.plugin.loadPlugin({
86786
+ runtimeObject: true,
86787
+ rtobjectName: "ExtensionPlugin",
86788
+ rtobjectRepo: "".concat(ibiz.env.baseUrl, "/").concat(this.appId).concat(ibiz.env.remoteModelUrl, "/ext")
86789
+ });
86790
+ } catch (error) {
86791
+ ibiz.log.warn(
86792
+ ibiz.i18n.t("runtime.application.noExtensionPlugin", {
86793
+ appId: this.appId
86794
+ })
86795
+ );
86796
+ }
86797
+ }
86681
86798
  /**
86682
86799
  * @description 加载替换默认插件(仅主应用执行)
86683
86800
  * @protected
@@ -90534,6 +90651,23 @@ var LogicScheduler = class {
90534
90651
  };
90535
90652
  this.triggerAndExecute(matchParams, executeParams);
90536
90653
  }
90654
+ /**
90655
+ * @description 触发部件项事件
90656
+ * @param {string} ctrlItemName 部件项名称
90657
+ * @param {string} eventName 事件名称
90658
+ * @param {Partial<IUILogicParams>} [executeParams] 执行参数
90659
+ * @memberof LogicScheduler
90660
+ */
90661
+ async triggerControlItemEvent(ctrlItemName, eventName, executeParams) {
90662
+ const matchParams = {
90663
+ eventName,
90664
+ ctrlName: ctrlItemName,
90665
+ triggerType: "CTRLEVENT"
90666
+ };
90667
+ const result = this.triggerAndExecute(matchParams, executeParams);
90668
+ if (result)
90669
+ await Promise.all(result);
90670
+ }
90537
90671
  };
90538
90672
 
90539
90673
  // src/logic-scheduler/scheduler/control-logic-scheduler.ts
@@ -91790,6 +91924,9 @@ var en = {
91790
91924
  noImplemented: "Getting application global variables is not implemented",
91791
91925
  noImplementedRouting: "Getting view routing parameter variables is not implemented"
91792
91926
  },
91927
+ application: {
91928
+ noExtensionPlugin: "Attempted to load application [{appId}] extension plugin, but no extension plugin was found"
91929
+ },
91793
91930
  hub: {
91794
91931
  failedParse: "View parameter {paramsName} failed to parse: {error}",
91795
91932
  noExist: "View [{id}] does not exist"
@@ -91877,7 +92014,15 @@ var en = {
91877
92014
  viewPlugin: "Cannot find the adapter corresponding to the view plugin {pluginKey}.",
91878
92015
  correspondViewTypeStyle: "Cannot find an adapter for view type: [{viewType}] corresponding to view style: [{viewStyle}].",
91879
92016
  toolbarItem: "Cannot find the adapter corresponding to the toolbar item plugin {pluginKey}.",
91880
- acItem: "Cannot find the adapter corresponding to the ac item plugin {pluginKey}."
92017
+ acItem: "Cannot find the adapter corresponding to the ac item plugin {pluginKey}.",
92018
+ viewCustomRegistration: "[Custom Extended View] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92019
+ ctrlCustomRegistration: "[Custom Extended Control] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92020
+ panelItemCustomRegistration: "[Custom Extended Panel Item] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92021
+ formDetailCustomRegistration: "[Custom Extended Form Detail] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92022
+ gridColumnCustomRegistration: "[Custom Extended Grid Column] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92023
+ editorCustomRegistration: "[Custom Extended Editor] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92024
+ uiactionCustomRegistration: "[Custom Extended UIAction] Cannot find an adapter with a custom registration ID of [{registerKey}].",
92025
+ deMethodCustomRegistration: "[Custom Extended DEMethod] Cannot find an adapter with a custom registration ID of [{registerKey}]."
91881
92026
  }
91882
92027
  },
91883
92028
  service: {
@@ -92479,6 +92624,9 @@ var zhCn = {
92479
92624
  global: {
92480
92625
  noImplemented: "\u83B7\u53D6\u5E94\u7528\u5168\u5C40\u53D8\u91CF\u6CA1\u6709\u5B9E\u73B0"
92481
92626
  },
92627
+ application: {
92628
+ noExtensionPlugin: "\u5C1D\u8BD5\u52A0\u8F7D\u5E94\u7528[{appId}]\u6269\u5C55\u63D2\u4EF6\uFF0C\u6682\u672A\u627E\u5230\u6269\u5C55\u63D2\u4EF6"
92629
+ },
92482
92630
  hub: {
92483
92631
  failedParse: "\u89C6\u56FE\u53C2\u6570 {paramsName} \u89E3\u6790\u5931\u8D25\uFF1A{error}",
92484
92632
  noExist: "\u89C6\u56FE[{id}]\u4E0D\u5B58\u5728"
@@ -92566,7 +92714,15 @@ var zhCn = {
92566
92714
  viewPlugin: "\u627E\u4E0D\u5230\u89C6\u56FE\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92567
92715
  correspondViewTypeStyle: "\u627E\u4E0D\u5230\u89C6\u56FE\u7C7B\u578B\uFF1A[{viewType}]\u7684\u89C6\u56FE\u6837\u5F0F\uFF1A[{viewStyle}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92568
92716
  toolbarItem: "\u627E\u4E0D\u5230\u5DE5\u5177\u680F\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92569
- acItem: "\u627E\u4E0D\u5230\u81EA\u586B\u5217\u8868\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668"
92717
+ acItem: "\u627E\u4E0D\u5230\u81EA\u586B\u5217\u8868\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92718
+ viewCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u89C6\u56FE] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92719
+ ctrlCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u90E8\u4EF6] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92720
+ panelItemCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u9762\u677F\u9879] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92721
+ formDetailCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u8868\u5355\u6210\u5458] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92722
+ gridColumnCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u8868\u683C\u5217] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92723
+ editorCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u7F16\u8F91\u5668] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92724
+ uiactionCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u754C\u9762\u884C\u4E3A] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
92725
+ deMethodCustomRegistration: "[\u81EA\u5B9A\u4E49\u6269\u5C55\u5B9E\u4F53\u65B9\u6CD5] \u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u6CE8\u518C\u6807\u8BC6\u4E3A[{registerKey}]\u5BF9\u5E94\u7684\u9002\u914D\u5668"
92570
92726
  }
92571
92727
  },
92572
92728
  service: {