bge-ui 1.4.1 → 1.4.3

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.js CHANGED
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, renderSlot, normalizeStyle, createStaticVNode, provide, reactive, toRefs, ref, watch, unref, getCurrentScope, onScopeDispose, readonly, computed, getCurrentInstance, onMounted as onMounted$1, useSlots, inject, createTextVNode, toDisplayString, createCommentVNode, TransitionGroup, withCtx, withDirectives, vModelDynamic, vModelText, createBlock, withModifiers, cloneVNode, Fragment, Text, Comment, Teleport, onUnmounted, h, Transition, vShow, onBeforeMount, nextTick, resolveDynamicComponent, shallowReactive, render as render$7, isVNode, vModelCheckbox, renderList, toRef, useAttrs, normalizeProps, mergeProps, onBeforeUpdate, withKeys, createSlots, guardReactiveProps, isRef } from "vue";
7
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, renderSlot, normalizeStyle, createStaticVNode, provide, reactive, toRefs, ref, watch, unref, getCurrentScope, onScopeDispose, readonly, computed, getCurrentInstance, onMounted, useSlots, inject, createTextVNode, toDisplayString, createCommentVNode, TransitionGroup, withCtx, withDirectives, vModelDynamic, vModelText, createBlock, withModifiers, cloneVNode, Fragment, Text, Comment, Teleport, onUnmounted, h, Transition, vShow, onBeforeMount, nextTick, resolveDynamicComponent, shallowReactive, render as render$7, isVNode, vModelCheckbox, renderList, toRef, useAttrs, normalizeProps, mergeProps, onBeforeUpdate, withKeys, createSlots, guardReactiveProps, isRef } from "vue";
8
8
  const _hoisted_1$26 = ["disabled"];
9
9
  const _hoisted_2$1M = { class: "loading-icon" };
10
10
  const _sfc_main$2g = /* @__PURE__ */ defineComponent({
@@ -4666,7 +4666,7 @@ function toValue(r) {
4666
4666
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
4667
4667
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
4668
4668
  const toString = Object.prototype.toString;
4669
- const isObject = (val2) => toString.call(val2) === "[object Object]";
4669
+ const isObject = (val) => toString.call(val) === "[object Object]";
4670
4670
  const noop$1 = () => {
4671
4671
  };
4672
4672
  const isIOS$1 = /* @__PURE__ */ getIsIOS();
@@ -4882,7 +4882,7 @@ function onClickOutside$1(target, handler, options = {}) {
4882
4882
  function useMounted() {
4883
4883
  const isMounted = ref(false);
4884
4884
  if (getCurrentInstance()) {
4885
- onMounted$1(() => {
4885
+ onMounted(() => {
4886
4886
  isMounted.value = true;
4887
4887
  });
4888
4888
  }
@@ -5366,7 +5366,7 @@ var range = function range2(rule, value, source, errors2, options) {
5366
5366
  var min2 = typeof rule.min === "number";
5367
5367
  var max2 = typeof rule.max === "number";
5368
5368
  var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
5369
- var val2 = value;
5369
+ var val = value;
5370
5370
  var key = null;
5371
5371
  var num = typeof value === "number";
5372
5372
  var str = typeof value === "string";
@@ -5382,20 +5382,20 @@ var range = function range2(rule, value, source, errors2, options) {
5382
5382
  return false;
5383
5383
  }
5384
5384
  if (arr) {
5385
- val2 = value.length;
5385
+ val = value.length;
5386
5386
  }
5387
5387
  if (str) {
5388
- val2 = value.replace(spRegexp, "_").length;
5388
+ val = value.replace(spRegexp, "_").length;
5389
5389
  }
5390
5390
  if (len) {
5391
- if (val2 !== rule.len) {
5391
+ if (val !== rule.len) {
5392
5392
  errors2.push(format$1(options.messages[key].len, rule.fullField, rule.len));
5393
5393
  }
5394
- } else if (min2 && !max2 && val2 < rule.min) {
5394
+ } else if (min2 && !max2 && val < rule.min) {
5395
5395
  errors2.push(format$1(options.messages[key].min, rule.fullField, rule.min));
5396
- } else if (max2 && !min2 && val2 > rule.max) {
5396
+ } else if (max2 && !min2 && val > rule.max) {
5397
5397
  errors2.push(format$1(options.messages[key].max, rule.fullField, rule.max));
5398
- } else if (min2 && max2 && (val2 < rule.min || val2 > rule.max)) {
5398
+ } else if (min2 && max2 && (val < rule.min || val > rule.max)) {
5399
5399
  errors2.push(format$1(options.messages[key].range, rule.fullField, rule.min, rule.max));
5400
5400
  }
5401
5401
  };
@@ -6122,7 +6122,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
6122
6122
  const shouldShowError = computed(
6123
6123
  () => validateStateDebounced.value === "error"
6124
6124
  );
6125
- onMounted$1(() => {
6125
+ onMounted(() => {
6126
6126
  formContext == null ? void 0 : formContext.addField(context);
6127
6127
  });
6128
6128
  return (_ctx, _cache) => {
@@ -6219,8 +6219,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6219
6219
  emit("blur");
6220
6220
  emit("update:modelValue", input.value);
6221
6221
  }
6222
- watch(() => props.modelValue, (val2) => {
6223
- input.value = val2;
6222
+ watch(() => props.modelValue, (val) => {
6223
+ input.value = val;
6224
6224
  formItemContext && formItemContext.validate && formItemContext.validate().catch((err) => err);
6225
6225
  });
6226
6226
  function handleChange() {
@@ -6242,7 +6242,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6242
6242
  emit("change", input.value);
6243
6243
  emit("update:modelValue", input.value);
6244
6244
  }
6245
- onMounted$1(() => {
6245
+ onMounted(() => {
6246
6246
  if (props.modelValue) {
6247
6247
  input.value = props.modelValue;
6248
6248
  }
@@ -6377,7 +6377,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6377
6377
  };
6378
6378
  const barStyle = ref();
6379
6379
  const update = () => barStyle.value = getBarStyle();
6380
- onMounted$1(() => {
6380
+ onMounted(() => {
6381
6381
  update();
6382
6382
  });
6383
6383
  return (_ctx, _cache) => {
@@ -6418,7 +6418,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
6418
6418
  function setActive(active) {
6419
6419
  isActive.value = active;
6420
6420
  }
6421
- onMounted$1(() => {
6421
+ onMounted(() => {
6422
6422
  tabContext.addPane(reactive({
6423
6423
  ref: tabPaneRef.value,
6424
6424
  value: props.value,
@@ -8492,7 +8492,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
8492
8492
  toggleTooltip.value = result.toggleTooltip;
8493
8493
  tooltipElement.value = result.tooltipElement;
8494
8494
  }
8495
- onMounted$1(() => {
8495
+ onMounted(() => {
8496
8496
  initTooltip();
8497
8497
  });
8498
8498
  __expose({
@@ -8651,7 +8651,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
8651
8651
  zIndex: 3e3
8652
8652
  };
8653
8653
  });
8654
- onMounted$1(() => {
8654
+ onMounted(() => {
8655
8655
  visible.value = true;
8656
8656
  startTimer();
8657
8657
  });
@@ -8895,16 +8895,16 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
8895
8895
  const props = __props;
8896
8896
  const formItemContext = inject(formItemContextKey$3, void 0);
8897
8897
  const input = ref(false);
8898
- watch(() => props.modelValue, (val2) => {
8899
- if (typeof val2 === "number" || typeof val2 === "string" || typeof val2 === "boolean") {
8898
+ watch(() => props.modelValue, (val) => {
8899
+ if (typeof val === "number" || typeof val === "string" || typeof val === "boolean") {
8900
8900
  input.value = true;
8901
- if (val2 === props.trueValue) {
8901
+ if (val === props.trueValue) {
8902
8902
  input.value = true;
8903
8903
  } else {
8904
8904
  input.value = false;
8905
8905
  }
8906
8906
  } else {
8907
- if (val2.includes(props.trueValue)) {
8907
+ if (val.includes(props.trueValue)) {
8908
8908
  input.value = true;
8909
8909
  } else {
8910
8910
  input.value = false;
@@ -8913,15 +8913,15 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
8913
8913
  formItemContext && formItemContext.validate && formItemContext.validate().catch((err) => err);
8914
8914
  });
8915
8915
  onMounted(() => {
8916
- if (typeof val === "number" || typeof val === "string" || typeof val === "boolean") {
8916
+ if (typeof props.modelValue === "number" || typeof props.modelValue === "string" || typeof props.modelValue === "boolean") {
8917
8917
  input.value = true;
8918
- if (val === props.trueValue) {
8918
+ if (props.modelValue === props.trueValue) {
8919
8919
  input.value = true;
8920
8920
  } else {
8921
8921
  input.value = false;
8922
8922
  }
8923
8923
  } else {
8924
- if (val.includes(props.trueValue)) {
8924
+ if (props.modelValue.includes(props.trueValue)) {
8925
8925
  input.value = true;
8926
8926
  } else {
8927
8927
  input.value = false;
@@ -9065,8 +9065,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
9065
9065
  const props = __props;
9066
9066
  const formItemContext = inject(formItemContextKey$2, void 0);
9067
9067
  const input = ref(false);
9068
- watch(() => props.modelValue, (val2) => {
9069
- if (val2 === props.trueValue) {
9068
+ watch(() => props.modelValue, (val) => {
9069
+ if (val === props.trueValue) {
9070
9070
  input.value = true;
9071
9071
  } else {
9072
9072
  input.value = false;
@@ -9080,7 +9080,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
9080
9080
  return props.falseValue;
9081
9081
  }
9082
9082
  }
9083
- onMounted$1(() => {
9083
+ onMounted(() => {
9084
9084
  if (props.modelValue === props.trueValue) {
9085
9085
  input.value = true;
9086
9086
  } else {
@@ -10715,8 +10715,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
10715
10715
  tooltip.value && tooltip.value.popper.value && tooltip.value.popper.value.update();
10716
10716
  }, 50);
10717
10717
  }
10718
- watch(() => props.modelValue, (val2) => {
10719
- let percent = val2;
10718
+ watch(() => props.modelValue, (val) => {
10719
+ let percent = val;
10720
10720
  percent = percent > 100 ? 100 : percent;
10721
10721
  percent = percent < 0 ? 0 : percent;
10722
10722
  setPosition(percent);
@@ -10897,7 +10897,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
10897
10897
  const defaultSlot = useSlots().default;
10898
10898
  const props = __props;
10899
10899
  const context = inject("bge-select-context", void 0);
10900
- onMounted$1(() => {
10900
+ onMounted(() => {
10901
10901
  context.addOption({
10902
10902
  ...props
10903
10903
  });
@@ -10916,8 +10916,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
10916
10916
  });
10917
10917
  const _export_sfc = (sfc, props) => {
10918
10918
  const target = sfc.__vccOpts || sfc;
10919
- for (const [key, val2] of props) {
10920
- target[key] = val2;
10919
+ for (const [key, val] of props) {
10920
+ target[key] = val;
10921
10921
  }
10922
10922
  return target;
10923
10923
  };
@@ -14729,8 +14729,8 @@ const errors = {
14729
14729
  prop: (name) => `"${name}" prop must be enabled!`,
14730
14730
  dateArr: (name) => `You need to use array as "model-value" binding in order to support "${name}"`
14731
14731
  };
14732
- const convertType = (val2) => {
14733
- return val2;
14732
+ const convertType = (val) => {
14733
+ return val;
14734
14734
  };
14735
14735
  const getNumVal = (num) => {
14736
14736
  if (num === 0)
@@ -15562,8 +15562,8 @@ const getDefaultUI = (ui) => {
15562
15562
  Object.keys(ui).map((item) => {
15563
15563
  const key = item;
15564
15564
  const value = ui[key];
15565
- const val2 = typeof ui[key] === "string" ? { [value]: true } : Object.fromEntries(value.map((k) => [k, true]));
15566
- return [item, val2];
15565
+ const val = typeof ui[key] === "string" ? { [value]: true } : Object.fromEntries(value.map((k) => [k, true]));
15566
+ return [item, val];
15567
15567
  })
15568
15568
  )
15569
15569
  };
@@ -15719,7 +15719,7 @@ const useExternalInternalMapper = (emit, props, isInputFocused) => {
15719
15719
  const mapYearExternalToInternal = (value) => {
15720
15720
  if (Array.isArray(value)) {
15721
15721
  if (defaultedMultiDates.value.enabled) {
15722
- return value.map((val2) => convertCustomModeType(val2, setYear(getDate(), val2)));
15722
+ return value.map((val) => convertCustomModeType(val, setYear(getDate(), val)));
15723
15723
  }
15724
15724
  return checkRangeEnabled(
15725
15725
  () => [
@@ -15756,7 +15756,7 @@ const useExternalInternalMapper = (emit, props, isInputFocused) => {
15756
15756
  const today = set(getDate(), { date: 1 });
15757
15757
  if (Array.isArray(value)) {
15758
15758
  if (defaultedMultiDates.value.enabled) {
15759
- return value.map((val2) => convertCustomModeType(val2, setDateMonthOrYear(today, +val2.month, +val2.year)));
15759
+ return value.map((val) => convertCustomModeType(val, setDateMonthOrYear(today, +val.month, +val.year)));
15760
15760
  }
15761
15761
  return checkRangeEnabled(
15762
15762
  () => [
@@ -15903,22 +15903,22 @@ const useExternalInternalMapper = (emit, props, isInputFocused) => {
15903
15903
  }
15904
15904
  return convertModelToTz(new Date(value));
15905
15905
  };
15906
- const toModelType = (val2) => {
15907
- if (!val2)
15906
+ const toModelType = (val) => {
15907
+ if (!val)
15908
15908
  return "";
15909
15909
  if (props.utc) {
15910
- return dateToUtc(val2, props.utc === "preserve", props.enableSeconds);
15910
+ return dateToUtc(val, props.utc === "preserve", props.enableSeconds);
15911
15911
  }
15912
15912
  if (props.modelType) {
15913
15913
  if (props.modelType === "timestamp")
15914
- return +convertZonedModelToLocal(val2);
15914
+ return +convertZonedModelToLocal(val);
15915
15915
  if (props.modelType === "iso")
15916
- return convertZonedModelToLocal(val2).toISOString();
15916
+ return convertZonedModelToLocal(val).toISOString();
15917
15917
  if (props.modelType === "format" && (typeof props.format === "string" || !props.format))
15918
- return formatDateFn(convertZonedModelToLocal(val2));
15919
- return formatDateFn(convertZonedModelToLocal(val2), props.modelType, true);
15918
+ return formatDateFn(convertZonedModelToLocal(val));
15919
+ return formatDateFn(convertZonedModelToLocal(val), props.modelType, true);
15920
15920
  }
15921
- return convertZonedModelToLocal(val2);
15921
+ return convertZonedModelToLocal(val);
15922
15922
  };
15923
15923
  const emitValue = (value, useTz = false, returnOnly = false) => {
15924
15924
  if (returnOnly)
@@ -16770,9 +16770,9 @@ const useValidation = (props) => {
16770
16770
  }
16771
16771
  return true;
16772
16772
  };
16773
- const isValidYear = (val2) => {
16774
- if (val2) {
16775
- const activeYear = getYear(val2);
16773
+ const isValidYear = (val) => {
16774
+ if (val) {
16775
+ const activeYear = getYear(val);
16776
16776
  return activeYear >= +props.yearRange[0] && activeYear <= props.yearRange[1];
16777
16777
  }
16778
16778
  return true;
@@ -17236,7 +17236,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
17236
17236
  handleRangeTextInput(value);
17237
17237
  } else if (defaultedMultiDates.value.enabled) {
17238
17238
  const dates = value.split(`;`);
17239
- parsedDate.value = dates.map((val2) => parser(val2.trim())).filter((val2) => val2);
17239
+ parsedDate.value = dates.map((val) => parser(val.trim())).filter((val) => val);
17240
17240
  } else {
17241
17241
  parsedDate.value = parser(value);
17242
17242
  }
@@ -17478,7 +17478,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
17478
17478
  const previewStyle = ref({});
17479
17479
  const actionBtnContainer = ref(null);
17480
17480
  const actionRowRef = ref(null);
17481
- onMounted$1(() => {
17481
+ onMounted(() => {
17482
17482
  if (props.arrowNavigation) {
17483
17483
  buildMatrix([unrefElement(cancelButtonRef), unrefElement(selectButtonRef)], "actionRow");
17484
17484
  }
@@ -17678,7 +17678,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
17678
17678
  onBeforeUpdate(() => {
17679
17679
  selectionActiveRef.value = null;
17680
17680
  });
17681
- onMounted$1(() => {
17681
+ onMounted(() => {
17682
17682
  nextTick().then(() => setContainerHeightAndScroll());
17683
17683
  if (!props.noOverlayFocus) {
17684
17684
  focusGrid();
@@ -17764,9 +17764,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
17764
17764
  }
17765
17765
  });
17766
17766
  };
17767
- const onClick = (val2) => {
17768
- if (!val2.disabled) {
17769
- emit("selected", val2.value);
17767
+ const onClick = (val) => {
17768
+ if (!val.disabled) {
17769
+ emit("selected", val.value);
17770
17770
  }
17771
17771
  };
17772
17772
  const toggle = () => {
@@ -17803,9 +17803,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
17803
17803
  return;
17804
17804
  checkStopPropagation(ev, defaultedConfig.value, true);
17805
17805
  };
17806
- const setHoverValue = (val2) => {
17807
- hoverValue.value = val2;
17808
- emit("hover-value", val2);
17806
+ const setHoverValue = (val) => {
17807
+ hoverValue.value = val;
17808
+ emit("hover-value", val);
17809
17809
  };
17810
17810
  const onTab = () => {
17811
17811
  toggle();
@@ -17976,7 +17976,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
17976
17976
  setup(__props, { emit: __emit }) {
17977
17977
  const emit = __emit;
17978
17978
  const elRef = ref(null);
17979
- onMounted$1(() => emit("set-ref", elRef));
17979
+ onMounted(() => emit("set-ref", elRef));
17980
17980
  return (_ctx, _cache) => {
17981
17981
  return openBlock(), createElementBlock("button", {
17982
17982
  ref_key: "elRef",
@@ -18271,7 +18271,7 @@ const useMonthOrQuarterPicker = ({
18271
18271
  }
18272
18272
  }
18273
18273
  });
18274
- onMounted$1(() => {
18274
+ onMounted(() => {
18275
18275
  assign();
18276
18276
  });
18277
18277
  const selectYear = (year2, instance) => {
@@ -18372,7 +18372,7 @@ const useMonthPicker = (props, emit) => {
18372
18372
  props,
18373
18373
  emit
18374
18374
  });
18375
- onMounted$1(() => {
18375
+ onMounted(() => {
18376
18376
  if (props.startDate) {
18377
18377
  if (modelValue.value && props.focusStartDate || !modelValue.value) {
18378
18378
  onYearSelect(getYear(getDate(props.startDate)), 0);
@@ -18388,7 +18388,7 @@ const useMonthPicker = (props, emit) => {
18388
18388
  const getModelMonthYear = () => {
18389
18389
  if (modelValue.value) {
18390
18390
  if (Array.isArray(modelValue.value)) {
18391
- return modelValue.value.map((val2) => getMonthYear(val2));
18391
+ return modelValue.value.map((val) => getMonthYear(val));
18392
18392
  }
18393
18393
  return getMonthYear(modelValue.value);
18394
18394
  }
@@ -18545,7 +18545,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
18545
18545
  const slots2 = useSlots();
18546
18546
  const yearModeSlots = mapSlots(slots2, "yearMode");
18547
18547
  const props = __props;
18548
- onMounted$1(() => {
18548
+ onMounted(() => {
18549
18549
  if (!props.shadow) {
18550
18550
  emit("mount", null);
18551
18551
  }
@@ -18660,7 +18660,7 @@ const useYearPicker = (props, emit) => {
18660
18660
  const hoverDate = ref(null);
18661
18661
  const { defaultedHighlight, defaultedMultiDates, defaultedFilters, defaultedRange, propDates } = useDefaults(props);
18662
18662
  const focusYear = ref();
18663
- onMounted$1(() => {
18663
+ onMounted(() => {
18664
18664
  if (props.startDate) {
18665
18665
  if (modelValue.value && props.focusStartDate || !modelValue.value) {
18666
18666
  focusYear.value = getYear(getDate(props.startDate));
@@ -18860,7 +18860,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
18860
18860
  const elementRefs = ref([]);
18861
18861
  const holdTimeout = ref();
18862
18862
  const timeOverlayOpen = ref(false);
18863
- onMounted$1(() => {
18863
+ onMounted(() => {
18864
18864
  emit("mounted");
18865
18865
  });
18866
18866
  const setTime = (time) => {
@@ -18875,17 +18875,17 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
18875
18875
  () => (type4) => isValueDisabled(type4, props[type4]) || isOverlayValueDisabled(type4, props[type4])
18876
18876
  );
18877
18877
  const timeValues = computed(() => ({ hours: props.hours, minutes: props.minutes, seconds: props.seconds }));
18878
- const isOverlayValueDisabled = (type4, val2) => {
18878
+ const isOverlayValueDisabled = (type4, val) => {
18879
18879
  if (defaultedRange.value.enabled && !defaultedRange.value.disableTimeRangeValidation) {
18880
- return !props.validateTime(type4, val2);
18880
+ return !props.validateTime(type4, val);
18881
18881
  }
18882
18882
  return false;
18883
18883
  };
18884
18884
  const disabledRangedArrows = (type4, inc) => {
18885
18885
  if (defaultedRange.value.enabled && !defaultedRange.value.disableTimeRangeValidation) {
18886
18886
  const inVal = inc ? +props[`${type4}Increment`] : -+props[`${type4}Increment`];
18887
- const val2 = props[type4] + inVal;
18888
- return !props.validateTime(type4, val2);
18887
+ const val = props[type4] + inVal;
18888
+ return !props.validateTime(type4, val);
18889
18889
  }
18890
18890
  return false;
18891
18891
  };
@@ -18939,10 +18939,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
18939
18939
  return true;
18940
18940
  return Boolean((_a = disabledTimes[type4]) == null ? void 0 : _a.includes(value));
18941
18941
  };
18942
- const getAmPmDiff = (val2, type4) => {
18942
+ const getAmPmDiff = (val, type4) => {
18943
18943
  if (type4 !== "hours")
18944
- return val2;
18945
- return amPm.value === "AM" ? val2 : val2 + 12;
18944
+ return val;
18945
+ return amPm.value === "AM" ? val : val + 12;
18946
18946
  };
18947
18947
  const getGridItems = (type4) => {
18948
18948
  const timeRange = props.is24 ? 24 : 12;
@@ -18962,16 +18962,16 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
18962
18962
  return { active, disabled };
18963
18963
  });
18964
18964
  };
18965
- const sanitizeMinutesAndSeconds = (val2) => val2 >= 0 ? val2 : 59;
18966
- const sanitizeHours = (val2) => val2 >= 0 ? val2 : 23;
18967
- const isDateInRange = (val2, type4) => {
18965
+ const sanitizeMinutesAndSeconds = (val) => val >= 0 ? val : 59;
18966
+ const sanitizeHours = (val) => val >= 0 ? val : 23;
18967
+ const isDateInRange = (val, type4) => {
18968
18968
  const minTime = props.minTime ? setTime(sanitizeTime(props.minTime)) : null;
18969
18969
  const maxTime = props.maxTime ? setTime(sanitizeTime(props.maxTime)) : null;
18970
18970
  const selectedDate = setTime(
18971
18971
  sanitizeTime(
18972
18972
  timeValues.value,
18973
18973
  type4,
18974
- type4 === "minutes" || type4 === "seconds" ? sanitizeMinutesAndSeconds(val2) : sanitizeHours(val2)
18974
+ type4 === "minutes" || type4 === "seconds" ? sanitizeMinutesAndSeconds(val) : sanitizeHours(val)
18975
18975
  )
18976
18976
  );
18977
18977
  if (minTime && maxTime)
@@ -19300,7 +19300,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
19300
19300
  const timeInputRefs = ref([]);
19301
19301
  const overlayRef = ref(null);
19302
19302
  const timePickerOverlayOpen = ref(false);
19303
- onMounted$1(() => {
19303
+ onMounted(() => {
19304
19304
  emit("mount");
19305
19305
  if (!props.timePicker && props.arrowNavigation) {
19306
19306
  buildMatrix([unrefElement(openTimePickerBtn.value)], "time");
@@ -19704,7 +19704,7 @@ const useTimePicker = (props, emit) => {
19704
19704
  }
19705
19705
  return assignTime(first.hours, first.minutes, first.seconds);
19706
19706
  };
19707
- onMounted$1(() => {
19707
+ onMounted(() => {
19708
19708
  if (!props.shadow) {
19709
19709
  assignStartTime(defaultedStartTime.value);
19710
19710
  if (!modelValue.value)
@@ -19761,7 +19761,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
19761
19761
  const timePickerSlots = mapSlots(slots2, "timePicker");
19762
19762
  const tpRef = ref(null);
19763
19763
  const { time, modelValue, disabledTimesConfig, updateTime, validateTime: validateTime2 } = useTimePicker(props, emit);
19764
- onMounted$1(() => {
19764
+ onMounted(() => {
19765
19765
  if (!props.shadow) {
19766
19766
  emit("mount", null);
19767
19767
  }
@@ -19862,7 +19862,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
19862
19862
  const showYearPicker = ref(false);
19863
19863
  const overlayOpen = ref(false);
19864
19864
  const elementRefs = ref([null, null, null, null]);
19865
- onMounted$1(() => {
19865
+ onMounted(() => {
19866
19866
  emit("mount");
19867
19867
  });
19868
19868
  const bindOptions = (type4) => ({
@@ -19917,13 +19917,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
19917
19917
  return { active, disabled, highlighted };
19918
19918
  });
19919
19919
  });
19920
- const toggleWrap = (val2, type4, show) => {
19920
+ const toggleWrap = (val, type4, show) => {
19921
19921
  if (show !== void 0) {
19922
- val2.value = show;
19922
+ val.value = show;
19923
19923
  } else {
19924
- val2.value = !val2.value;
19924
+ val.value = !val.value;
19925
19925
  }
19926
- if (!val2.value) {
19926
+ if (!val.value) {
19927
19927
  overlayOpen.value = false;
19928
19928
  emit("overlay-closed", type4);
19929
19929
  } else {
@@ -19958,7 +19958,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
19958
19958
  index: 1,
19959
19959
  toggle: toggleMonthPicker,
19960
19960
  modelValue: monthModelBind.value,
19961
- updateModelValue: (val2) => monthModelBind.value = val2,
19961
+ updateModelValue: (val) => monthModelBind.value = val,
19962
19962
  text: getMonthDisplayVal.value.text,
19963
19963
  showSelectionGrid: showMonthPicker.value,
19964
19964
  items: groupedMonths.value,
@@ -19970,7 +19970,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
19970
19970
  index: 2,
19971
19971
  toggle: toggleYearPicker,
19972
19972
  modelValue: yearModelBind.value,
19973
- updateModelValue: (val2) => yearModelBind.value = val2,
19973
+ updateModelValue: (val) => yearModelBind.value = val,
19974
19974
  text: formatNumber(props.year, props.locale),
19975
19975
  showSelectionGrid: showYearPicker.value,
19976
19976
  items: groupedYears.value,
@@ -20223,7 +20223,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
20223
20223
  }
20224
20224
  return getDayNames(props.formatLocale, props.locale, +props.weekStart);
20225
20225
  });
20226
- onMounted$1(() => {
20226
+ onMounted(() => {
20227
20227
  emit("mount", { cmp: "calendar", refs: dayRefs });
20228
20228
  if (!defaultedConfig.value.noSwipe) {
20229
20229
  if (calendarWrapRef.value) {
@@ -20594,7 +20594,7 @@ const useDatePicker = (props, emit, triggerCalendarTransition, updateFlow) => {
20594
20594
  emit("select-date");
20595
20595
  }
20596
20596
  };
20597
- onMounted$1(() => {
20597
+ onMounted(() => {
20598
20598
  if (!props.shadow) {
20599
20599
  if (!modelValue.value) {
20600
20600
  setStartDate();
@@ -20978,16 +20978,16 @@ const useDatePicker = (props, emit, triggerCalendarTransition, updateFlow) => {
20978
20978
  postRangeSelect();
20979
20979
  }
20980
20980
  };
20981
- const updateMonthYear = (instance, val2) => {
20981
+ const updateMonthYear = (instance, val) => {
20982
20982
  var _a;
20983
- setCalendarMonthYear(instance, val2.month, val2.year, true);
20983
+ setCalendarMonthYear(instance, val.month, val.year, true);
20984
20984
  if (defaultedMultiCalendars.value.count && !defaultedMultiCalendars.value.solo) {
20985
20985
  autoChangeMultiCalendars(instance);
20986
20986
  }
20987
- emit("update-month-year", { instance, month: val2.month, year: val2.year });
20987
+ emit("update-month-year", { instance, month: val.month, year: val.year });
20988
20988
  triggerCalendarTransition(defaultedMultiCalendars.value.solo ? instance : void 0);
20989
20989
  const flowActive = ((_a = props.flow) == null ? void 0 : _a.length) ? props.flow[props.flowStep] : void 0;
20990
- if (!val2.fromNav && (flowActive === FlowStep.month || flowActive === FlowStep.year)) {
20990
+ if (!val.fromNav && (flowActive === FlowStep.month || flowActive === FlowStep.year)) {
20991
20991
  updateFlow();
20992
20992
  }
20993
20993
  };
@@ -21382,7 +21382,7 @@ const useQuarterPicker = (props, emit) => {
21382
21382
  const isQuarterActive = computed(() => (date4) => {
21383
21383
  if (modelValue.value) {
21384
21384
  if (Array.isArray(modelValue.value)) {
21385
- return modelValue.value.some((val2) => isSameQuarter(date4, val2));
21385
+ return modelValue.value.some((val) => isSameQuarter(date4, val));
21386
21386
  }
21387
21387
  return isSameQuarter(modelValue.value, date4);
21388
21388
  }
@@ -21677,7 +21677,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
21677
21677
  const innerMenuRef = ref(null);
21678
21678
  const menuMount = ref(false);
21679
21679
  const dynCmpRef = ref(null);
21680
- onMounted$1(() => {
21680
+ onMounted(() => {
21681
21681
  if (!props.shadow) {
21682
21682
  menuMount.value = true;
21683
21683
  getCalendarWidth();
@@ -22142,7 +22142,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
22142
22142
  defaultedMultiDates
22143
22143
  } = useDefaults(props);
22144
22144
  const { menuTransition, showTransition } = useTransitions(defaultedTransitions);
22145
- onMounted$1(() => {
22145
+ onMounted(() => {
22146
22146
  parseExternalModelValue(props.modelValue);
22147
22147
  nextTick().then(() => {
22148
22148
  if (!defaultedInline.value.enabled) {
@@ -22585,19 +22585,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
22585
22585
  const emit = __emit;
22586
22586
  const inputValue = ref();
22587
22587
  const formItemContext = inject(formItemContextKey, void 0);
22588
- function inputValueCallback(val2) {
22589
- inputValue.value = val2.split(" - ");
22588
+ function inputValueCallback(val) {
22589
+ inputValue.value = val.split(" - ");
22590
22590
  }
22591
- watch(() => props.modelValue, (val2) => {
22592
- date4.value = val2;
22591
+ watch(() => props.modelValue, (val) => {
22592
+ date4.value = val;
22593
22593
  formItemContext && formItemContext.validate && formItemContext.validate().catch((err) => err);
22594
22594
  });
22595
- watch(date4, (val2) => {
22596
- emit("input", val2);
22597
- emit("change", val2);
22598
- emit("update:modelValue", val2);
22595
+ watch(date4, (val) => {
22596
+ emit("input", val);
22597
+ emit("change", val);
22598
+ emit("update:modelValue", val);
22599
22599
  });
22600
- onMounted$1(() => {
22600
+ onMounted(() => {
22601
22601
  if (props.modelValue) {
22602
22602
  date4.value = props.modelValue;
22603
22603
  }
@@ -22694,13 +22694,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22694
22694
  const isChecked = ref(false);
22695
22695
  const emit = __emit;
22696
22696
  const props = __props;
22697
- watch(() => props.modelValue, (val2) => {
22698
- isChecked.value = val2 === props.trueValue;
22697
+ watch(() => props.modelValue, (val) => {
22698
+ isChecked.value = val === props.trueValue;
22699
22699
  }, {
22700
22700
  immediate: true
22701
22701
  });
22702
- watch(isChecked, (val2) => {
22703
- if (val2) {
22702
+ watch(isChecked, (val) => {
22703
+ if (val) {
22704
22704
  emit("update:modelValue", props.trueValue);
22705
22705
  emit("change", props.trueValue);
22706
22706
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -25,7 +25,7 @@
25
25
  </label>
26
26
  </template>
27
27
  <script lang="ts" setup>
28
- import { ref, watch, inject } from 'vue'
28
+ import { ref, watch, inject, onMounted } from 'vue'
29
29
  defineOptions({
30
30
  name: 'CheckBox',
31
31
  })
@@ -95,15 +95,15 @@ watch(() => props.modelValue, (val) => {
95
95
  })
96
96
 
97
97
  onMounted(() => {
98
- if (typeof val === 'number' || typeof val === 'string' || typeof val === 'boolean') {
98
+ if (typeof props.modelValue === 'number' || typeof props.modelValue === 'string' || typeof props.modelValue === 'boolean') {
99
99
  input.value = true
100
- if (val === props.trueValue) {
100
+ if (props.modelValue === props.trueValue) {
101
101
  input.value = true
102
102
  } else {
103
103
  input.value = false
104
104
  }
105
105
  } else {
106
- if (val.includes(props.trueValue)) {
106
+ if (props.modelValue.includes(props.trueValue)) {
107
107
  input.value = true
108
108
  } else {
109
109
  input.value = false