@byteluck-fe/runtime-engine 2.0.1 → 2.0.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.
@@ -1,10 +1,11 @@
1
+ import { Engine } from '@byteluck-fe/model-driven-engine';
1
2
  import { ActionUtilsPlugin, ApprovalPlugin, CustomVueControlPlugin, StatisticsPlugin, DataFilterPlugin, DatasourceSearchPlugin, DataViewPlugin, DisplayPlugin, FormRelationFieldPlugin, JurisdictionPlugin, MultistageFillingPlugin, ReferenceAndCalcFieldPlugin, TitlePlugin, SubtableChangePlugin, DataSourceManagePlugin, ExpressionPlugin, TitleSettingPlugin, EventListenerPlugin, FormStateChangePlugin, WorkerDataStorePlugin, CalcPlugin, ListCheckStatePlugin, GlobalLockPlugin, PageRulePlugin } from '../../../src/plugins/engine';
2
3
  import { Store } from 'vuex';
3
4
  import { RouteLocationNormalizedLoaded, Router } from 'vue-router';
4
5
  import { PropsInstanceType } from '../../../src/constant';
5
6
  import { ComputedRef, Ref } from 'vue';
6
7
 
7
- export declare const useRenderEngine: ({ props, emit, route, router, store, }: {
8
+ declare const useRenderEngine: ({ props, emit, route, router, store, }: {
8
9
  props: PropsInstanceType<'render-engine'>;
9
10
  emit: EmitType;
10
11
  route: RouteLocationNormalizedLoaded;
@@ -18,6 +19,7 @@ export declare const useRenderEngine: ({ props, emit, route, router, store, }: {
18
19
  getState: (id: string) => any;
19
20
  isCreatedEngine: Ref<boolean>;
20
21
  isPc: boolean;
22
+ createEngine: () => Promise<void>;
21
23
  ActionUtilsPlugin: typeof ActionUtilsPlugin;
22
24
  ApprovalPlugin: typeof ApprovalPlugin;
23
25
  CustomVueControlPlugin: typeof CustomVueControlPlugin;
@@ -43,3 +45,7 @@ export declare const useRenderEngine: ({ props, emit, route, router, store, }: {
43
45
  GlobalLockPlugin: typeof GlobalLockPlugin;
44
46
  PageRulePlugin: typeof PageRulePlugin;
45
47
  };
48
+ declare function initContext(props: any, printUrlList?: any, inject?: any, customViteVue?: any): Engine;
49
+ declare function checkToGetFormPageTitleInListPage(engine: Engine): void;
50
+ declare function checkToAddFormKey(formKey: string, needGetTitleFormKeyObj: any): void;
51
+ export { initContext, checkToGetFormPageTitleInListPage, checkToAddFormKey, useRenderEngine, };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as kr, h as $a, getCurrentInstance as Ot, effectScope as ls, inject as us, onMounted as yc, onUnmounted as cs, shallowRef as Yo, ref as ye, computed as fe, onBeforeMount as mc, watch as la, Fragment as zo, isRef as Wt, createVNode as Tt, Text as gc, unref as U, nextTick as ua, defineAsyncComponent as Ws, reactive as Lr, provide as On, markRaw as Ft, toRaw as Vr, hasInjectionContext as vc, isReactive as ds, toRef as Qr, getCurrentScope as _c, onScopeDispose as Pc, toRefs as Ks, shallowReactive as bc } from "vue";
2
2
  import * as Xs from "@byteluck-fe/model-driven-core-all";
3
- import { CONTROL_TYPE as S, CONTROL_BASE_TYPE as Pt, isArray as Sc, isDataBind as wt, JSONCopy as ee, decamelizeKeys as he, OperationButton as Tc, FieldTypes as Pe, isPlainObject as Jo, TitleConfigEnum as kt, camelizeKeys as Gt, DepartmentType as Ec, PAGE_STATUS as Zr, logerror as Oc, log as Qo, error as wc, FORM_TYPE as ca, EventLogic as Zo, DataSourceParamItem as Ic, DataSourceOrderItem as Ac, genNonDuplicateId as Cc, CALC_TOKEN_TYPE as it, CALC_AGGREGATE_TYPE as rr, MultistageFillingItem as Nc, DisplayBoListItem as qc, baseControls as Dc, formControls as kc, layoutControls as Lc, listControls as Vc, columnControls as Rc, searchControls as Mc, wrapControls as xc, loadRemoteControl as Fc, registerCustomControls as Ys, registerByteluckControls as Uc, nativeFetch as Bc, VersionBuilder as $c, upgradeCustomControlSchema as jc } from "@byteluck-fe/model-driven-core-all";
3
+ import { CONTROL_TYPE as S, CONTROL_BASE_TYPE as Pt, isArray as Sc, isDataBind as wt, JSONCopy as ee, decamelizeKeys as he, OperationButton as Tc, FieldTypes as Pe, isPlainObject as Jo, TitleConfigEnum as kt, camelizeKeys as Gt, DepartmentType as Ec, PAGE_STATUS as Zr, logerror as Oc, log as Qo, error as wc, FORM_TYPE as ca, EventLogic as Zo, DataSourceParamItem as Ic, DataSourceOrderItem as Ac, genNonDuplicateId as Cc, CALC_TOKEN_TYPE as it, CALC_AGGREGATE_TYPE as rr, MultistageFillingItem as Nc, DisplayBoListItem as qc, baseControls as Dc, formControls as kc, layoutControls as Lc, listControls as Vc, columnControls as Rc, searchControls as Mc, wrapControls as xc, VersionBuilder as Fc, loadRemoteControl as Uc, registerCustomControls as Ys, registerByteluckControls as Bc, nativeFetch as $c, upgradeCustomControlSchema as jc } from "@byteluck-fe/model-driven-core-all";
4
4
  import * as zs from "@byteluck-fe/model-driven-engine";
5
5
  import { loopDataViewControl as Gc, parseModule as Js, Engine as ja, ES6ModulePlugin as Hc, LifecycleEventPlugin as Wc, ControlsEventPlugin as Kc, StylePlugin as Xc } from "@byteluck-fe/model-driven-engine";
6
6
  import * as Qs from "@byteluck-fe/global-shared";
@@ -25704,7 +25704,7 @@ const jT = ({
25704
25704
  if (r.state.data.form_type === 4 && r.state.data?.rel_custom_pages?.length) {
25705
25705
  const T = r?.state?.data?.rel_custom_pages[0];
25706
25706
  if (T.id) {
25707
- const I = await Fc(
25707
+ const I = await Uc(
25708
25708
  T.url,
25709
25709
  Ut(r.device === "desktop")
25710
25710
  ), { views: C, components: N } = I;
@@ -25723,7 +25723,7 @@ const jT = ({
25723
25723
  type: "runtime"
25724
25724
  }
25725
25725
  ), r.state.data.form_type === 5) {
25726
- const T = await Uc(
25726
+ const T = await Bc(
25727
25727
  { VUE_APP_ANT_PREFIX: "blr" }.VUE_APP_BYTELUCK_CONTROLS,
25728
25728
  {
25729
25729
  type: "runtime",
@@ -25736,7 +25736,7 @@ const jT = ({
25736
25736
  }), T.forEach(E);
25737
25737
  }
25738
25738
  if (t.query.debug_port) {
25739
- const T = await Bc(
25739
+ const T = await $c(
25740
25740
  "http://localhost:" + t.query.debug_port + "?" + de.isPc() ? "desktop" : "mobile"
25741
25741
  ), I = JSON.parse(T), C = await Ys(
25742
25742
  [I.component_bo_list[0].component_props.id],
@@ -25792,6 +25792,7 @@ const jT = ({
25792
25792
  getState: h,
25793
25793
  isCreatedEngine: f,
25794
25794
  isPc: d,
25795
+ createEngine: m,
25795
25796
  ActionUtilsPlugin: Ms,
25796
25797
  ApprovalPlugin: xu,
25797
25798
  CustomVueControlPlugin: ru,
@@ -25837,7 +25838,7 @@ function AT(r, e, t = {}, a) {
25837
25838
  query: { enginedebug: E = !1, chn: A }
25838
25839
  } = p, m = U(w);
25839
25840
  s.isPreview = m;
25840
- const h = JSON.parse(s?.data.content?.model || "[]"), _ = new $c(
25841
+ const h = JSON.parse(s?.data.content?.model || "[]"), _ = new Fc(
25841
25842
  s?.data?.content?.schema_version
25842
25843
  ), v = s?.data.content?.events;
25843
25844
  let y = s?.data.content?.control_events;
@@ -26069,6 +26070,9 @@ function GT(r) {
26069
26070
  });
26070
26071
  }
26071
26072
  export {
26073
+ Xo as checkToAddFormKey,
26074
+ CT as checkToGetFormPageTitleInListPage,
26075
+ AT as initContext,
26072
26076
  GT as miniEngine,
26073
26077
  jT as useRenderEngine
26074
26078
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/runtime-engine",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime-engine.js",