star-horse-lowcode 2.8.20 → 2.8.21

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.es.js CHANGED
@@ -23269,9 +23269,7 @@ const _sfc_main$3p = /* @__PURE__ */ defineComponent({
23269
23269
  if (selectionMode.value === "date" && dayjs.isDayjs(value)) {
23270
23270
  const parsedDateValue = extractFirst(props.parsedValue);
23271
23271
  let newDate = parsedDateValue ? parsedDateValue.year(value.year()).month(value.month()).date(value.date()) : value;
23272
- if (!checkDateWithinRange(newDate)) {
23273
- newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());
23274
- }
23272
+ if (!checkDateWithinRange(newDate)) ;
23275
23273
  innerDate.value = newDate;
23276
23274
  emit(newDate, showTime.value || keepOpen);
23277
23275
  } else if (selectionMode.value === "week") {
@@ -56094,7 +56092,7 @@ const flip$1 = function (options) {
56094
56092
  if (!ignoreCrossAxisOverflow ||
56095
56093
  // We leave the current main axis only if every placement on that axis
56096
56094
  // overflows the main axis.
56097
- overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
56095
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
56098
56096
  // Try next placement and re-run the lifecycle.
56099
56097
  return {
56100
56098
  data: {
@@ -56612,14 +56610,9 @@ function getWindowScrollBarX(element, rect) {
56612
56610
  return rect.left + leftScroll;
56613
56611
  }
56614
56612
 
56615
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
56616
- if (ignoreScrollbarX === void 0) {
56617
- ignoreScrollbarX = false;
56618
- }
56613
+ function getHTMLOffset(documentElement, scroll) {
56619
56614
  const htmlRect = documentElement.getBoundingClientRect();
56620
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
56621
- // RTL <body> scrollbar.
56622
- getWindowScrollBarX(documentElement, htmlRect));
56615
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
56623
56616
  const y = htmlRect.top + scroll.scrollTop;
56624
56617
  return {
56625
56618
  x,
@@ -56658,7 +56651,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
56658
56651
  offsets.y = offsetRect.y + offsetParent.clientTop;
56659
56652
  }
56660
56653
  }
56661
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
56654
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
56662
56655
  return {
56663
56656
  width: rect.width * scale.x,
56664
56657
  height: rect.height * scale.y,
@@ -56692,6 +56685,10 @@ function getDocumentRect(element) {
56692
56685
  };
56693
56686
  }
56694
56687
 
56688
+ // Safety check: ensure the scrollbar space is reasonable in case this
56689
+ // calculation is affected by unusual styles.
56690
+ // Most scrollbars leave 15-18px of space.
56691
+ const SCROLLBAR_MAX = 25;
56695
56692
  function getViewportRect(element, strategy) {
56696
56693
  const win = getWindow(element);
56697
56694
  const html = getDocumentElement(element);
@@ -56709,6 +56706,24 @@ function getViewportRect(element, strategy) {
56709
56706
  y = visualViewport.offsetTop;
56710
56707
  }
56711
56708
  }
56709
+ const windowScrollbarX = getWindowScrollBarX(html);
56710
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
56711
+ // visual width of the <html> but this is not considered in the size
56712
+ // of `html.clientWidth`.
56713
+ if (windowScrollbarX <= 0) {
56714
+ const doc = html.ownerDocument;
56715
+ const body = doc.body;
56716
+ const bodyStyles = getComputedStyle(body);
56717
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
56718
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
56719
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
56720
+ width -= clippingStableScrollbarWidth;
56721
+ }
56722
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
56723
+ // If the <body> scrollbar is on the left, the width needs to be extended
56724
+ // by the scrollbar amount so there isn't extra space on the right.
56725
+ width += windowScrollbarX;
56726
+ }
56712
56727
  return {
56713
56728
  width,
56714
56729
  height,
@@ -70492,7 +70507,7 @@ const initRelationEvent = (props, formData, needWatch) => {
70492
70507
  };
70493
70508
  const initCompCallEvent = (props, emits, formData) => {
70494
70509
  const events = Object.keys(props.field.actions || {});
70495
- if (!props.isSearch && !props.field.preps?.["stopInitCallAction"] && events?.length > 0) {
70510
+ if (!props.isSearch && !props.field?.preps?.["stopInitCallAction"] && events?.length > 0) {
70496
70511
  if (Object.keys(formData.value || {}).length == 0 || !formData.value[props.field.fieldName]) {
70497
70512
  const stop = watch(
70498
70513
  () => formData.value[props.field.fieldName],
@@ -70513,7 +70528,7 @@ const initCompCallEvent = (props, emits, formData) => {
70513
70528
  };
70514
70529
  const doInitCallEvent = (props, emits, formData) => {
70515
70530
  const events = Object.keys(props.field.actions || {});
70516
- if (props.field.preps?.["starHorseFieldSource"] == 5) {
70531
+ if (props.field?.preps?.["starHorseFieldSource"] == 5) {
70517
70532
  return;
70518
70533
  }
70519
70534
  events?.forEach((event) => {
@@ -78297,7 +78312,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
78297
78312
 
78298
78313
  /* unplugin-vue-components disabled */
78299
78314
 
78300
- const __unplugin_components_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["__scopeId", "data-v-b4dba07b"]]);
78315
+ const __unplugin_components_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["__scopeId", "data-v-8d8a92e0"]]);
78301
78316
 
78302
78317
  const StarHorseJsonEditor = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
78303
78318
  __proto__: null,
@@ -84972,7 +84987,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
84972
84987
  key: 1,
84973
84988
  class: normalizeClass(["w-fill", {
84974
84989
  "bare-item": true,
84975
- "item-info": __props.field.preps?.itemType != "usercomp"
84990
+ "item-info": __props.field?.preps?.itemType != "usercomp"
84976
84991
  }]),
84977
84992
  style: normalizeStyle({
84978
84993
  margin: __props.field?.itemType == "button" ? "5px auto" : "unset"
@@ -85081,12 +85096,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
85081
85096
  key: 1,
85082
85097
  class: "item-info",
85083
85098
  style: normalizeStyle({
85084
- margin: __props.field.preps?.itemType == "button" ? "5px auto" : "unset"
85099
+ margin: __props.field?.preps?.itemType == "button" ? "5px auto" : "unset"
85085
85100
  })
85086
85101
  }, [
85087
- __props.field.preps?.helpMsg ? (openBlock(), createBlock(_component_help, {
85102
+ __props.field?.preps?.helpMsg ? (openBlock(), createBlock(_component_help, {
85088
85103
  key: 0,
85089
- message: __props.field.preps?.helpMsg
85104
+ message: __props.field?.preps?.helpMsg
85090
85105
  }, null, 8, ["message"])) : createCommentVNode("", true),
85091
85106
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
85092
85107
  ], 4)),
@@ -85105,7 +85120,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
85105
85120
 
85106
85121
  /* unplugin-vue-components disabled */
85107
85122
 
85108
- const __unplugin_components_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-b0dcaebc"]]);
85123
+ const __unplugin_components_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-b6a394fb"]]);
85109
85124
 
85110
85125
  const starhorseFormItem = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
85111
85126
  __proto__: null,
@@ -10,12 +10,12 @@ import { DefineComponent } from 'vue';
10
10
  import { ExtractPropTypes } from 'vue';
11
11
  import { GlobalComponents } from 'vue';
12
12
  import { GlobalDirectives } from 'vue';
13
- import { JSONEditorSelection } from 'vanilla-jsoneditor';
14
- import { JSONParser } from 'vanilla-jsoneditor';
15
- import { JSONPathParser } from 'vanilla-jsoneditor';
16
- import { OnClassName } from 'vanilla-jsoneditor';
17
- import { OnRenderMenu } from 'vanilla-jsoneditor';
18
- import { OnRenderValue } from 'vanilla-jsoneditor';
13
+ import { JSONEditorSelection } from 'vue3-ts-jsoneditor';
14
+ import { JSONParser } from 'vue3-ts-jsoneditor';
15
+ import { JSONPathParser } from 'vue3-ts-jsoneditor';
16
+ import { OnClassName } from 'vue3-ts-jsoneditor';
17
+ import { OnRenderMenu } from 'vue3-ts-jsoneditor';
18
+ import { OnRenderValue } from 'vue3-ts-jsoneditor';
19
19
  import { Pinia } from 'pinia';
20
20
  import { PropType } from 'vue';
21
21
  import { PublicProps } from 'vue';
@@ -26,7 +26,7 @@ import { RouteLocationNormalized } from 'vue-router';
26
26
  import { Router } from 'vue-router';
27
27
  import { ShallowRef } from 'vue';
28
28
  import { StoreDefinition } from 'pinia';
29
- import { Validator } from 'vanilla-jsoneditor';
29
+ import { Validator } from 'vue3-ts-jsoneditor';
30
30
  import { WritableComputedRef } from 'vue';
31
31
 
32
32
  declare const __VLS_component: DefineComponent<ExtractPropTypes< {
@@ -5056,7 +5056,7 @@ darkTheme: {
5056
5056
  type: PropType<boolean>;
5057
5057
  default: any;
5058
5058
  };
5059
- }>> & Readonly<{
5059
+ }>> & {
5060
5060
  "onUpdate:modelValue"?: (...args: any[]) => any;
5061
5061
  "onUpdate:json"?: (...args: any[]) => any;
5062
5062
  "onUpdate:text"?: (...args: any[]) => any;
@@ -5069,17 +5069,17 @@ onError?: (...args: any[]) => any;
5069
5069
  "onChange-query-language"?: (...args: any[]) => any;
5070
5070
  onFocus?: (...args: any[]) => any;
5071
5071
  onBlur?: (...args: any[]) => any;
5072
- }>, {
5073
- max: Ref<boolean, boolean>;
5072
+ }, {
5073
+ max: Ref<boolean>;
5074
5074
  getHeight: ComputedRef< {
5075
5075
  height: string;
5076
5076
  } | {
5077
5077
  height?: undefined;
5078
5078
  }>;
5079
- container: Ref<HTMLDivElement, HTMLDivElement>;
5079
+ container: Ref<HTMLDivElement>;
5080
5080
  darkThemeStyle: ComputedRef<boolean>;
5081
- fallbackSlot: Ref<boolean, boolean>;
5082
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("error" | "blur" | "change" | "focus" | "update:modelValue" | "update:json" | "update:text" | "update:jsonString" | "update:selection" | "change-mode" | "update:mode" | "change-query-language")[], PublicProps, {
5081
+ fallbackSlot: Ref<boolean>;
5082
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("error" | "blur" | "change" | "focus" | "update:modelValue" | "update:json" | "update:text" | "update:jsonString" | "update:selection" | "change-mode" | "update:mode" | "change-query-language")[], PublicProps, {
5083
5083
  selection: JSONEditorSelection;
5084
5084
  mainMenuBar: boolean;
5085
5085
  navigationBar: boolean;
@@ -5173,7 +5173,7 @@ darkTheme: {
5173
5173
  type: PropType<boolean>;
5174
5174
  default: any;
5175
5175
  };
5176
- }>> & Readonly<{
5176
+ }>> & {
5177
5177
  "onUpdate:modelValue"?: (...args: any[]) => any;
5178
5178
  "onUpdate:json"?: (...args: any[]) => any;
5179
5179
  "onUpdate:text"?: (...args: any[]) => any;
@@ -5186,16 +5186,16 @@ onError?: (...args: any[]) => any;
5186
5186
  "onChange-query-language"?: (...args: any[]) => any;
5187
5187
  onFocus?: (...args: any[]) => any;
5188
5188
  onBlur?: (...args: any[]) => any;
5189
- }>, {
5190
- max: Ref<boolean, boolean>;
5189
+ }, {
5190
+ max: Ref<boolean>;
5191
5191
  getHeight: ComputedRef< {
5192
5192
  height: string;
5193
5193
  } | {
5194
5194
  height?: undefined;
5195
5195
  }>;
5196
- container: Ref<HTMLDivElement, HTMLDivElement>;
5196
+ container: Ref<HTMLDivElement>;
5197
5197
  darkThemeStyle: ComputedRef<boolean>;
5198
- fallbackSlot: Ref<boolean, boolean>;
5198
+ fallbackSlot: Ref<boolean>;
5199
5199
  }, {}, {}, {}, {
5200
5200
  selection: JSONEditorSelection;
5201
5201
  mainMenuBar: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "star-horse-lowcode",
3
3
  "private": false,
4
4
  "author": "l_1019@163.com",
5
- "version": "2.8.20",
5
+ "version": "2.8.21",
6
6
  "type": "module",
7
7
  "description": "星马低代码核心库,提供了低代码平台的基础功能和组件库。此库可引用到您的项目中,快速构建表单和列表。",
8
8
  "keywords": [
@@ -88,6 +88,7 @@
88
88
  "unplugin-element-plus": "^0.10.0",
89
89
  "unplugin-vue-components": "^29.1.0",
90
90
  "uuid": "^13.0.0",
91
+ "vanilla-jsoneditor": "^3.10.0",
91
92
  "vite-plugin-dts": "^4.5.4",
92
93
  "vue": "^3.5.22",
93
94
  "vue-eslint-parser": "^10.2.0",
@@ -95,12 +96,13 @@
95
96
  "vue-m-message": "^4.0.2",
96
97
  "vue-router": "^4.5.1",
97
98
  "vue3-barcode": "^1.0.1",
98
- "vue3-ts-jsoneditor": "^3.0.4",
99
+ "vue3-ts-jsoneditor": "3.1.0",
99
100
  "vuedraggable": "^4.1.0"
100
101
  },
101
102
  "devDependencies": {
103
+ "@rollup/plugin-commonjs": "^28.0.6",
102
104
  "@types/jquery": "^3.5.33",
103
- "@types/node": "^24.7.1",
105
+ "@types/node": "^24.7.2",
104
106
  "@types/prismjs": "^1.26.5",
105
107
  "@types/sortablejs": "^1.15.8",
106
108
  "@types/uuid": "^11.0.0",
@@ -118,6 +120,5 @@
118
120
  },
119
121
  "engines": {
120
122
  "node": ">=20.13.0"
121
- },
122
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
123
+ }
123
124
  }