@byteluck-fe/runtime-desktop-controls 7.0.0-beta.37 → 7.0.0-beta.39

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.
@@ -54439,6 +54439,7 @@ class tj {
54439
54439
  openPageRelationControlIds = [];
54440
54440
  route;
54441
54441
  router;
54442
+ actionBarClickWaitInterval = 150;
54442
54443
  constructor(t, n, i, o, r, s) {
54443
54444
  this.api = vt(), this.configCamelizeKeys(t);
54444
54445
  const a = this.formatConfig(this.config);
@@ -54494,15 +54495,27 @@ class tj {
54494
54495
  this.waitRunClickPayloadOfActionBar = {
54495
54496
  payload: i,
54496
54497
  resolve: o
54497
- }, setTimeout(async () => {
54498
- this.checkToRunClickPayloadOfActionBar();
54499
- }, 150);
54498
+ }, this.scheduleCheckToRunClickPayloadOfActionBar();
54500
54499
  }) : await this.callControlEvent(n, i);
54501
54500
  });
54502
54501
  }
54502
+ scheduleCheckToRunClickPayloadOfActionBar() {
54503
+ const t = this.waitRunClickPayloadOfActionBar;
54504
+ !t || t.timer || (t.timer = setTimeout(() => {
54505
+ t.timer = void 0, this.checkToRunClickPayloadOfActionBar();
54506
+ }, this.actionBarClickWaitInterval));
54507
+ }
54503
54508
  checkToRunClickPayloadOfActionBar() {
54504
54509
  const t = this.waitRunClickPayloadOfActionBar;
54505
- t && (this.store.state.eventListenerAction.isActive || (this.waitRunClickPayloadOfActionBar = void 0, this.callControlEvent("on_click", t.payload).then(t.resolve)));
54510
+ if (t) {
54511
+ if (this.store.state.eventListenerAction.isActive) {
54512
+ this.scheduleCheckToRunClickPayloadOfActionBar();
54513
+ return;
54514
+ }
54515
+ t.timer && (clearTimeout(t.timer), t.timer = void 0), this.waitRunClickPayloadOfActionBar = void 0, this.callControlEvent("on_click", t.payload).then(t.resolve).catch((n) => {
54516
+ console.error(n), t.resolve(!1);
54517
+ });
54518
+ }
54506
54519
  }
54507
54520
  checkIsNeedSaveActionBarClickPayload(t, n) {
54508
54521
  let i = !1;
@@ -54567,28 +54580,33 @@ class tj {
54567
54580
  if (n?.options?.type === "event_listener_reset_empty" && n?.options?.instance == n.instance)
54568
54581
  return {};
54569
54582
  this.changeEventRunningActive(i, !0);
54570
- const r = {}, s = o.cases[0].handlers;
54571
- let a = await this.doCallActions(
54572
- s,
54573
- n,
54574
- t,
54575
- r
54576
- );
54577
- if (!a && t !== "did_mount") {
54578
- this.changeEventRunningActive(i, !1), this.checkToRunRefreshList(r), this.resetValueEmptyOnChange(n, t);
54579
- return;
54583
+ const r = {};
54584
+ try {
54585
+ const s = o.cases[0].handlers;
54586
+ let a = await this.doCallActions(
54587
+ s,
54588
+ n,
54589
+ t,
54590
+ r
54591
+ );
54592
+ if (!a && t !== "did_mount") {
54593
+ this.checkToRunRefreshList(r), this.resetValueEmptyOnChange(n, t);
54594
+ return;
54595
+ }
54596
+ const l = await this.getHandlerAfterAnalysisCondition(
54597
+ o,
54598
+ n,
54599
+ t
54600
+ );
54601
+ a = await this.doCallActions(
54602
+ l,
54603
+ n,
54604
+ t,
54605
+ r
54606
+ ), a || this.resetValueEmptyOnChange(n, t), this.checkToRunRefreshList(r);
54607
+ } finally {
54608
+ this.changeEventRunningActive(i, !1);
54580
54609
  }
54581
- const l = await this.getHandlerAfterAnalysisCondition(
54582
- o,
54583
- n,
54584
- t
54585
- );
54586
- a = await this.doCallActions(
54587
- l,
54588
- n,
54589
- t,
54590
- r
54591
- ), a || this.resetValueEmptyOnChange(n, t), this.checkToRunRefreshList(r), this.changeEventRunningActive(i, !1);
54592
54610
  }
54593
54611
  checkToRunRefreshList(t) {
54594
54612
  (t.isRunFormOptExecutor || t.isRunOptPageHandler) && window.postMessage({
@@ -122918,7 +122936,11 @@ const Lst = /* @__PURE__ */ ve({
122918
122936
  text: d
122919
122937
  }) => j(lA, {
122920
122938
  color: eT()[d].color,
122921
- icon: eT()[d].icon
122939
+ icon: eT()[d].icon,
122940
+ style: {
122941
+ display: "inline-flex",
122942
+ alignItems: "center"
122943
+ }
122922
122944
  }, {
122923
122945
  default: () => [eT()[d].text]
122924
122946
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/runtime-desktop-controls",
3
- "version": "7.0.0-beta.37",
3
+ "version": "7.0.0-beta.39",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime-desktop-controls.js",