@bagelink/vue 0.0.929 → 0.0.933

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 +1 @@
1
- {"version":3,"file":"TableSchema.vue.d.ts","sourceRoot":"","sources":["../../src/components/TableSchema.vue"],"names":[],"mappings":"AAmjBA,OAAO,EAEN,KAAK,cAAc,EAKnB,MAAM,eAAe,CAAA;AAItB,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,CAAA;AAC5C,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,IAAI,eAAe,EAAE,CAAA;yBAGtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA+axD,mBAAmB,CAAC;;;;;;;;;;wBAvNZ,MAAM,EAAE;;cApNnB,CAAC,EAAE;iBACA,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC;qBACzC,MAAM,EAAE;wBACL,OAAO;qBACV,OAAO;4BACA,MAAM,IAAI;MAsawD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;;UArDuE,GAAG;UAuD9E;0BAxNS,CAAC,OAAO,SAAiC,CAAC;6BACvC,CAAC,UAAU,QAAoC,CAAC;gCAC7C,CAAC,aAAa,EAAC,MAAM,EAAE,CAAC;KAsNL;OAG/B,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,E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AC;KAsNL;OAG/B,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvbzE,wBAub4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/TextInput.vue"],"names":[],"mappings":"AA6NA,OAAO,EAEN,KAAK,aAAa,EAElB,MAAM,eAAe,CAAA;;SAMf,MAAM;YACH,MAAM;eACH,MAAM;kBACH,MAAM;iBACP,MAAM,GAAG,MAAM;YACpB,MAAM;YACN,OAAO;YACP,OAAO;eACJ,OAAO;cACR,MAAM;aACP,OAAO;eACL,OAAO;WACX,MAAM;uBACM;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;WAClC,aAAa;gBACR,aAAa;gBACb,OAAO;iBACN,OAAO;WACb,OAAO;YACN,MAAM,GAAG,MAAM;mBACR,aAAa;gBAChB,OAAO;oBACH,MAAM;iBACT,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;;;;;;;SAvB/B,MAAM;YACH,MAAM;eACH,MAAM;kBACH,MAAM;iBACP,MAAM,GAAG,MAAM;YACpB,MAAM;YACN,OAAO;YACP,OAAO;eACJ,OAAO;cACR,MAAM;aACP,OAAO;eACL,OAAO;WACX,MAAM;uBACM;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;WAClC,aAAa;gBACR,aAAa;gBACb,OAAO;iBACN,OAAO;WACb,OAAO;YACN,MAAM,GAAG,MAAM;mBACR,aAAa;gBAChB,OAAO;oBACH,MAAM;iBACT,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;;;;;UAX7B,MAAM;gBARA,MAAM,GAAG,MAAM;mBAkBZ,MAAM;;AAmLxB,wBASG"}
1
+ {"version":3,"file":"TextInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/TextInput.vue"],"names":[],"mappings":"AA8NA,OAAO,EAEN,KAAK,aAAa,EAElB,MAAM,eAAe,CAAA;;SAMf,MAAM;YACH,MAAM;eACH,MAAM;kBACH,MAAM;iBACP,MAAM,GAAG,MAAM;YACpB,MAAM;YACN,OAAO;YACP,OAAO;eACJ,OAAO;cACR,MAAM;aACP,OAAO;eACL,OAAO;WACX,MAAM;uBACM;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;WAClC,aAAa;gBACR,aAAa;gBACb,OAAO;iBACN,OAAO;WACb,OAAO;YACN,MAAM,GAAG,MAAM;mBACR,aAAa;gBAChB,OAAO;oBACH,MAAM;iBACT,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;;;;;;;SAvB/B,MAAM;YACH,MAAM;eACH,MAAM;kBACH,MAAM;iBACP,MAAM,GAAG,MAAM;YACpB,MAAM;YACN,OAAO;YACP,OAAO;eACJ,OAAO;cACR,MAAM;aACP,OAAO;eACL,OAAO;WACX,MAAM;uBACM;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;WAClC,aAAa;gBACR,aAAa;gBACb,OAAO;iBACN,OAAO;WACb,OAAO;YACN,MAAM,GAAG,MAAM;mBACR,aAAa;gBAChB,OAAO;oBACH,MAAM;iBACT,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;;;;;UAX7B,MAAM;gBARA,MAAM,GAAG,MAAM;mBAkBZ,MAAM;;AAoLxB,wBASG"}
package/dist/index.cjs CHANGED
@@ -48129,7 +48129,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
48129
48129
  isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
48130
48130
  return obj;
48131
48131
  };
48132
- const noop = () => {
48132
+ const noop$1 = () => {
48133
48133
  };
48134
48134
  const toFiniteNumber = (value, defaultValue) => {
48135
48135
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
@@ -48242,7 +48242,7 @@ const utils$1 = {
48242
48242
  freezeMethods,
48243
48243
  toObjectSet,
48244
48244
  toCamelCase,
48245
- noop,
48245
+ noop: noop$1,
48246
48246
  toFiniteNumber,
48247
48247
  findKey,
48248
48248
  global: _global,
@@ -52718,13 +52718,13 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
52718
52718
  if (props2.multiline || props2.code) return 4;
52719
52719
  return 1;
52720
52720
  });
52721
- const debounceUpdate = debounce(() => {
52721
+ const debounceUpdate = useDebounceFn(() => {
52722
52722
  emit2("debounce", inputVal.value);
52723
52723
  }, props2.debounceDelay);
52724
52724
  function updateInputVal() {
52725
52725
  if (props2.disabled) return;
52726
52726
  emit2("update:modelValue", inputVal.value);
52727
- debounceUpdate();
52727
+ void debounceUpdate();
52728
52728
  }
52729
52729
  vue.watch(
52730
52730
  () => props2.modelValue,
@@ -52818,7 +52818,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
52818
52818
  };
52819
52819
  }
52820
52820
  });
52821
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-06d5ed00"]]);
52821
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-2c465924"]]);
52822
52822
  const _hoisted_1$h = ["title"];
52823
52823
  const _hoisted_2$9 = ["id", "required"];
52824
52824
  const _hoisted_3$7 = ["for"];
@@ -54045,9 +54045,75 @@ function toValue(r2) {
54045
54045
  }
54046
54046
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
54047
54047
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
54048
+ const notNullish = (val) => val != null;
54049
+ const noop = () => {
54050
+ };
54051
+ function createFilterWrapper(filter3, fn3) {
54052
+ function wrapper(...args) {
54053
+ return new Promise((resolve, reject3) => {
54054
+ Promise.resolve(filter3(() => fn3.apply(this, args), { fn: fn3, thisArg: this, args })).then(resolve).catch(reject3);
54055
+ });
54056
+ }
54057
+ return wrapper;
54058
+ }
54059
+ function debounceFilter(ms, options = {}) {
54060
+ let timer;
54061
+ let maxTimer;
54062
+ let lastRejector = noop;
54063
+ const _clearTimeout = (timer2) => {
54064
+ clearTimeout(timer2);
54065
+ lastRejector();
54066
+ lastRejector = noop;
54067
+ };
54068
+ const filter3 = (invoke) => {
54069
+ const duration = toValue(ms);
54070
+ const maxDuration = toValue(options.maxWait);
54071
+ if (timer)
54072
+ _clearTimeout(timer);
54073
+ if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
54074
+ if (maxTimer) {
54075
+ _clearTimeout(maxTimer);
54076
+ maxTimer = null;
54077
+ }
54078
+ return Promise.resolve(invoke());
54079
+ }
54080
+ return new Promise((resolve, reject3) => {
54081
+ lastRejector = options.rejectOnCancel ? reject3 : resolve;
54082
+ if (maxDuration && !maxTimer) {
54083
+ maxTimer = setTimeout(() => {
54084
+ if (timer)
54085
+ _clearTimeout(timer);
54086
+ maxTimer = null;
54087
+ resolve(invoke());
54088
+ }, maxDuration);
54089
+ }
54090
+ timer = setTimeout(() => {
54091
+ if (maxTimer)
54092
+ _clearTimeout(maxTimer);
54093
+ maxTimer = null;
54094
+ resolve(invoke());
54095
+ }, duration);
54096
+ });
54097
+ };
54098
+ return filter3;
54099
+ }
54100
+ function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
54101
+ return new Promise((resolve, reject3) => {
54102
+ if (throwOnTimeout)
54103
+ setTimeout(() => reject3(reason), ms);
54104
+ else
54105
+ setTimeout(resolve, ms);
54106
+ });
54107
+ }
54048
54108
  function getLifeCycleTarget(target) {
54049
54109
  return vue.getCurrentInstance();
54050
54110
  }
54111
+ function useDebounceFn(fn3, ms = 200, options = {}) {
54112
+ return createFilterWrapper(
54113
+ debounceFilter(ms, options),
54114
+ fn3
54115
+ );
54116
+ }
54051
54117
  function tryOnMounted(fn3, sync = true, target) {
54052
54118
  const instance = getLifeCycleTarget();
54053
54119
  if (instance)
@@ -54057,6 +54123,130 @@ function tryOnMounted(fn3, sync = true, target) {
54057
54123
  else
54058
54124
  vue.nextTick(fn3);
54059
54125
  }
54126
+ function createUntil(r2, isNot = false) {
54127
+ function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
54128
+ let stop = null;
54129
+ const watcher = new Promise((resolve) => {
54130
+ stop = vue.watch(
54131
+ r2,
54132
+ (v2) => {
54133
+ if (condition(v2) !== isNot) {
54134
+ if (stop)
54135
+ stop();
54136
+ else
54137
+ vue.nextTick(() => stop == null ? void 0 : stop());
54138
+ resolve(v2);
54139
+ }
54140
+ },
54141
+ {
54142
+ flush,
54143
+ deep,
54144
+ immediate: true
54145
+ }
54146
+ );
54147
+ });
54148
+ const promises = [watcher];
54149
+ if (timeout != null) {
54150
+ promises.push(
54151
+ promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r2)).finally(() => stop == null ? void 0 : stop())
54152
+ );
54153
+ }
54154
+ return Promise.race(promises);
54155
+ }
54156
+ function toBe(value, options) {
54157
+ if (!vue.isRef(value))
54158
+ return toMatch((v2) => v2 === value, options);
54159
+ const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
54160
+ let stop = null;
54161
+ const watcher = new Promise((resolve) => {
54162
+ stop = vue.watch(
54163
+ [r2, value],
54164
+ ([v1, v2]) => {
54165
+ if (isNot !== (v1 === v2)) {
54166
+ if (stop)
54167
+ stop();
54168
+ else
54169
+ vue.nextTick(() => stop == null ? void 0 : stop());
54170
+ resolve(v1);
54171
+ }
54172
+ },
54173
+ {
54174
+ flush,
54175
+ deep,
54176
+ immediate: true
54177
+ }
54178
+ );
54179
+ });
54180
+ const promises = [watcher];
54181
+ if (timeout != null) {
54182
+ promises.push(
54183
+ promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r2)).finally(() => {
54184
+ stop == null ? void 0 : stop();
54185
+ return toValue(r2);
54186
+ })
54187
+ );
54188
+ }
54189
+ return Promise.race(promises);
54190
+ }
54191
+ function toBeTruthy(options) {
54192
+ return toMatch((v2) => Boolean(v2), options);
54193
+ }
54194
+ function toBeNull(options) {
54195
+ return toBe(null, options);
54196
+ }
54197
+ function toBeUndefined(options) {
54198
+ return toBe(void 0, options);
54199
+ }
54200
+ function toBeNaN(options) {
54201
+ return toMatch(Number.isNaN, options);
54202
+ }
54203
+ function toContains(value, options) {
54204
+ return toMatch((v2) => {
54205
+ const array2 = Array.from(v2);
54206
+ return array2.includes(value) || array2.includes(toValue(value));
54207
+ }, options);
54208
+ }
54209
+ function changed(options) {
54210
+ return changedTimes(1, options);
54211
+ }
54212
+ function changedTimes(n2 = 1, options) {
54213
+ let count2 = -1;
54214
+ return toMatch(() => {
54215
+ count2 += 1;
54216
+ return count2 >= n2;
54217
+ }, options);
54218
+ }
54219
+ if (Array.isArray(toValue(r2))) {
54220
+ const instance = {
54221
+ toMatch,
54222
+ toContains,
54223
+ changed,
54224
+ changedTimes,
54225
+ get not() {
54226
+ return createUntil(r2, !isNot);
54227
+ }
54228
+ };
54229
+ return instance;
54230
+ } else {
54231
+ const instance = {
54232
+ toMatch,
54233
+ toBe,
54234
+ toBeTruthy,
54235
+ toBeNull,
54236
+ toBeNaN,
54237
+ toBeUndefined,
54238
+ changed,
54239
+ changedTimes,
54240
+ get not() {
54241
+ return createUntil(r2, !isNot);
54242
+ }
54243
+ };
54244
+ return instance;
54245
+ }
54246
+ }
54247
+ function until(r2) {
54248
+ return createUntil(r2);
54249
+ }
54060
54250
  const defaultWindow = isClient ? window : void 0;
54061
54251
  function unrefElement(elRef) {
54062
54252
  var _a2;
@@ -54174,6 +54364,64 @@ function useElementSize(target, initialSize = { width: 0, height: 0 }, options =
54174
54364
  stop
54175
54365
  };
54176
54366
  }
54367
+ function useIntersectionObserver(target, callback, options = {}) {
54368
+ const {
54369
+ root: root2,
54370
+ rootMargin = "0px",
54371
+ threshold = 0,
54372
+ window: window2 = defaultWindow,
54373
+ immediate = true
54374
+ } = options;
54375
+ const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2);
54376
+ const targets = vue.computed(() => {
54377
+ const _target = toValue(target);
54378
+ return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);
54379
+ });
54380
+ let cleanup = noop;
54381
+ const isActive2 = vue.ref(immediate);
54382
+ const stopWatch = isSupported.value ? vue.watch(
54383
+ () => [targets.value, unrefElement(root2), isActive2.value],
54384
+ ([targets2, root22]) => {
54385
+ cleanup();
54386
+ if (!isActive2.value)
54387
+ return;
54388
+ if (!targets2.length)
54389
+ return;
54390
+ const observer = new IntersectionObserver(
54391
+ callback,
54392
+ {
54393
+ root: unrefElement(root22),
54394
+ rootMargin,
54395
+ threshold
54396
+ }
54397
+ );
54398
+ targets2.forEach((el) => el && observer.observe(el));
54399
+ cleanup = () => {
54400
+ observer.disconnect();
54401
+ cleanup = noop;
54402
+ };
54403
+ },
54404
+ { immediate, flush: "post" }
54405
+ ) : noop;
54406
+ const stop = () => {
54407
+ cleanup();
54408
+ stopWatch();
54409
+ isActive2.value = false;
54410
+ };
54411
+ tryOnScopeDispose(stop);
54412
+ return {
54413
+ isSupported,
54414
+ isActive: isActive2,
54415
+ pause() {
54416
+ cleanup();
54417
+ isActive2.value = false;
54418
+ },
54419
+ resume() {
54420
+ isActive2.value = true;
54421
+ },
54422
+ stop
54423
+ };
54424
+ }
54177
54425
  function useVirtualList(list, options) {
54178
54426
  const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);
54179
54427
  return {
@@ -54382,7 +54630,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
54382
54630
  emits: /* @__PURE__ */ vue.mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
54383
54631
  setup(__props, { emit: __emit }) {
54384
54632
  vue.useCssVars((_ctx) => ({
54385
- "527f36f7": vue.unref(computedItemHeight)
54633
+ "2c584721": vue.unref(computedItemHeight)
54386
54634
  }));
54387
54635
  const emit2 = __emit;
54388
54636
  const slots = vue.useSlots();
@@ -54501,21 +54749,17 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
54501
54749
  selectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
54502
54750
  }
54503
54751
  const lastItem = vue.ref();
54504
- let observer;
54505
- function registerLastItemObserver() {
54506
- if (__props.onLastItemVisible === void 0) return;
54507
- observer = new IntersectionObserver(([entry]) => {
54752
+ async function registerLastItemObserver() {
54753
+ await until(() => lastItem.value).toBeTruthy();
54754
+ useIntersectionObserver(lastItem.value, ([entry]) => {
54755
+ var _a2;
54508
54756
  if (entry.isIntersecting && computedData.value.length) {
54509
- void __props.onLastItemVisible();
54757
+ void ((_a2 = __props.onLastItemVisible) == null ? void 0 : _a2.call(__props));
54510
54758
  }
54511
54759
  });
54512
- if (lastItem.value) observer.observe(lastItem.value);
54513
54760
  }
54514
54761
  vue.onMounted(() => {
54515
- registerLastItemObserver();
54516
- });
54517
- vue.onUnmounted(() => {
54518
- observer == null ? void 0 : observer.disconnect();
54762
+ void registerLastItemObserver();
54519
54763
  });
54520
54764
  return (_ctx, _cache) => {
54521
54765
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "table-list-wrap h-100" }, vue.unref(containerProps), {
@@ -54610,7 +54854,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
54610
54854
  };
54611
54855
  }
54612
54856
  });
54613
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e3fe1a41"]]);
54857
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bcd5ff3e"]]);
54614
54858
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
54615
54859
  __name: "Title",
54616
54860
  props: {
@@ -56602,6 +56846,7 @@ exports.sleep = sleep;
56602
56846
  exports.timeAgo = timeAgo;
56603
56847
  exports.useBagel = useBagel;
56604
56848
  exports.useBglSchema = useBglSchema;
56849
+ exports.useDebounceFn = useDebounceFn;
56605
56850
  exports.useEscape = useEscape;
56606
56851
  exports.useI18nT = useI18nT;
56607
56852
  exports.useLang = useLang;
package/dist/index.mjs CHANGED
@@ -48127,7 +48127,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
48127
48127
  isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
48128
48128
  return obj;
48129
48129
  };
48130
- const noop = () => {
48130
+ const noop$1 = () => {
48131
48131
  };
48132
48132
  const toFiniteNumber = (value, defaultValue) => {
48133
48133
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
@@ -48240,7 +48240,7 @@ const utils$1 = {
48240
48240
  freezeMethods,
48241
48241
  toObjectSet,
48242
48242
  toCamelCase,
48243
- noop,
48243
+ noop: noop$1,
48244
48244
  toFiniteNumber,
48245
48245
  findKey,
48246
48246
  global: _global,
@@ -52716,13 +52716,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
52716
52716
  if (props2.multiline || props2.code) return 4;
52717
52717
  return 1;
52718
52718
  });
52719
- const debounceUpdate = debounce(() => {
52719
+ const debounceUpdate = useDebounceFn(() => {
52720
52720
  emit2("debounce", inputVal.value);
52721
52721
  }, props2.debounceDelay);
52722
52722
  function updateInputVal() {
52723
52723
  if (props2.disabled) return;
52724
52724
  emit2("update:modelValue", inputVal.value);
52725
- debounceUpdate();
52725
+ void debounceUpdate();
52726
52726
  }
52727
52727
  watch(
52728
52728
  () => props2.modelValue,
@@ -52816,7 +52816,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
52816
52816
  };
52817
52817
  }
52818
52818
  });
52819
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-06d5ed00"]]);
52819
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-2c465924"]]);
52820
52820
  const _hoisted_1$h = ["title"];
52821
52821
  const _hoisted_2$9 = ["id", "required"];
52822
52822
  const _hoisted_3$7 = ["for"];
@@ -54043,9 +54043,75 @@ function toValue(r2) {
54043
54043
  }
54044
54044
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
54045
54045
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
54046
+ const notNullish = (val) => val != null;
54047
+ const noop = () => {
54048
+ };
54049
+ function createFilterWrapper(filter3, fn3) {
54050
+ function wrapper(...args) {
54051
+ return new Promise((resolve, reject3) => {
54052
+ Promise.resolve(filter3(() => fn3.apply(this, args), { fn: fn3, thisArg: this, args })).then(resolve).catch(reject3);
54053
+ });
54054
+ }
54055
+ return wrapper;
54056
+ }
54057
+ function debounceFilter(ms, options = {}) {
54058
+ let timer;
54059
+ let maxTimer;
54060
+ let lastRejector = noop;
54061
+ const _clearTimeout = (timer2) => {
54062
+ clearTimeout(timer2);
54063
+ lastRejector();
54064
+ lastRejector = noop;
54065
+ };
54066
+ const filter3 = (invoke) => {
54067
+ const duration = toValue(ms);
54068
+ const maxDuration = toValue(options.maxWait);
54069
+ if (timer)
54070
+ _clearTimeout(timer);
54071
+ if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
54072
+ if (maxTimer) {
54073
+ _clearTimeout(maxTimer);
54074
+ maxTimer = null;
54075
+ }
54076
+ return Promise.resolve(invoke());
54077
+ }
54078
+ return new Promise((resolve, reject3) => {
54079
+ lastRejector = options.rejectOnCancel ? reject3 : resolve;
54080
+ if (maxDuration && !maxTimer) {
54081
+ maxTimer = setTimeout(() => {
54082
+ if (timer)
54083
+ _clearTimeout(timer);
54084
+ maxTimer = null;
54085
+ resolve(invoke());
54086
+ }, maxDuration);
54087
+ }
54088
+ timer = setTimeout(() => {
54089
+ if (maxTimer)
54090
+ _clearTimeout(maxTimer);
54091
+ maxTimer = null;
54092
+ resolve(invoke());
54093
+ }, duration);
54094
+ });
54095
+ };
54096
+ return filter3;
54097
+ }
54098
+ function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
54099
+ return new Promise((resolve, reject3) => {
54100
+ if (throwOnTimeout)
54101
+ setTimeout(() => reject3(reason), ms);
54102
+ else
54103
+ setTimeout(resolve, ms);
54104
+ });
54105
+ }
54046
54106
  function getLifeCycleTarget(target) {
54047
54107
  return getCurrentInstance();
54048
54108
  }
54109
+ function useDebounceFn(fn3, ms = 200, options = {}) {
54110
+ return createFilterWrapper(
54111
+ debounceFilter(ms, options),
54112
+ fn3
54113
+ );
54114
+ }
54049
54115
  function tryOnMounted(fn3, sync = true, target) {
54050
54116
  const instance = getLifeCycleTarget();
54051
54117
  if (instance)
@@ -54055,6 +54121,130 @@ function tryOnMounted(fn3, sync = true, target) {
54055
54121
  else
54056
54122
  nextTick(fn3);
54057
54123
  }
54124
+ function createUntil(r2, isNot = false) {
54125
+ function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
54126
+ let stop = null;
54127
+ const watcher = new Promise((resolve) => {
54128
+ stop = watch(
54129
+ r2,
54130
+ (v2) => {
54131
+ if (condition(v2) !== isNot) {
54132
+ if (stop)
54133
+ stop();
54134
+ else
54135
+ nextTick(() => stop == null ? void 0 : stop());
54136
+ resolve(v2);
54137
+ }
54138
+ },
54139
+ {
54140
+ flush,
54141
+ deep,
54142
+ immediate: true
54143
+ }
54144
+ );
54145
+ });
54146
+ const promises = [watcher];
54147
+ if (timeout != null) {
54148
+ promises.push(
54149
+ promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r2)).finally(() => stop == null ? void 0 : stop())
54150
+ );
54151
+ }
54152
+ return Promise.race(promises);
54153
+ }
54154
+ function toBe(value, options) {
54155
+ if (!isRef(value))
54156
+ return toMatch((v2) => v2 === value, options);
54157
+ const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
54158
+ let stop = null;
54159
+ const watcher = new Promise((resolve) => {
54160
+ stop = watch(
54161
+ [r2, value],
54162
+ ([v1, v2]) => {
54163
+ if (isNot !== (v1 === v2)) {
54164
+ if (stop)
54165
+ stop();
54166
+ else
54167
+ nextTick(() => stop == null ? void 0 : stop());
54168
+ resolve(v1);
54169
+ }
54170
+ },
54171
+ {
54172
+ flush,
54173
+ deep,
54174
+ immediate: true
54175
+ }
54176
+ );
54177
+ });
54178
+ const promises = [watcher];
54179
+ if (timeout != null) {
54180
+ promises.push(
54181
+ promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r2)).finally(() => {
54182
+ stop == null ? void 0 : stop();
54183
+ return toValue(r2);
54184
+ })
54185
+ );
54186
+ }
54187
+ return Promise.race(promises);
54188
+ }
54189
+ function toBeTruthy(options) {
54190
+ return toMatch((v2) => Boolean(v2), options);
54191
+ }
54192
+ function toBeNull(options) {
54193
+ return toBe(null, options);
54194
+ }
54195
+ function toBeUndefined(options) {
54196
+ return toBe(void 0, options);
54197
+ }
54198
+ function toBeNaN(options) {
54199
+ return toMatch(Number.isNaN, options);
54200
+ }
54201
+ function toContains(value, options) {
54202
+ return toMatch((v2) => {
54203
+ const array2 = Array.from(v2);
54204
+ return array2.includes(value) || array2.includes(toValue(value));
54205
+ }, options);
54206
+ }
54207
+ function changed(options) {
54208
+ return changedTimes(1, options);
54209
+ }
54210
+ function changedTimes(n2 = 1, options) {
54211
+ let count2 = -1;
54212
+ return toMatch(() => {
54213
+ count2 += 1;
54214
+ return count2 >= n2;
54215
+ }, options);
54216
+ }
54217
+ if (Array.isArray(toValue(r2))) {
54218
+ const instance = {
54219
+ toMatch,
54220
+ toContains,
54221
+ changed,
54222
+ changedTimes,
54223
+ get not() {
54224
+ return createUntil(r2, !isNot);
54225
+ }
54226
+ };
54227
+ return instance;
54228
+ } else {
54229
+ const instance = {
54230
+ toMatch,
54231
+ toBe,
54232
+ toBeTruthy,
54233
+ toBeNull,
54234
+ toBeNaN,
54235
+ toBeUndefined,
54236
+ changed,
54237
+ changedTimes,
54238
+ get not() {
54239
+ return createUntil(r2, !isNot);
54240
+ }
54241
+ };
54242
+ return instance;
54243
+ }
54244
+ }
54245
+ function until(r2) {
54246
+ return createUntil(r2);
54247
+ }
54058
54248
  const defaultWindow = isClient ? window : void 0;
54059
54249
  function unrefElement(elRef) {
54060
54250
  var _a2;
@@ -54172,6 +54362,64 @@ function useElementSize(target, initialSize = { width: 0, height: 0 }, options =
54172
54362
  stop
54173
54363
  };
54174
54364
  }
54365
+ function useIntersectionObserver(target, callback, options = {}) {
54366
+ const {
54367
+ root: root2,
54368
+ rootMargin = "0px",
54369
+ threshold = 0,
54370
+ window: window2 = defaultWindow,
54371
+ immediate = true
54372
+ } = options;
54373
+ const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2);
54374
+ const targets = computed(() => {
54375
+ const _target = toValue(target);
54376
+ return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);
54377
+ });
54378
+ let cleanup = noop;
54379
+ const isActive2 = ref(immediate);
54380
+ const stopWatch = isSupported.value ? watch(
54381
+ () => [targets.value, unrefElement(root2), isActive2.value],
54382
+ ([targets2, root22]) => {
54383
+ cleanup();
54384
+ if (!isActive2.value)
54385
+ return;
54386
+ if (!targets2.length)
54387
+ return;
54388
+ const observer = new IntersectionObserver(
54389
+ callback,
54390
+ {
54391
+ root: unrefElement(root22),
54392
+ rootMargin,
54393
+ threshold
54394
+ }
54395
+ );
54396
+ targets2.forEach((el) => el && observer.observe(el));
54397
+ cleanup = () => {
54398
+ observer.disconnect();
54399
+ cleanup = noop;
54400
+ };
54401
+ },
54402
+ { immediate, flush: "post" }
54403
+ ) : noop;
54404
+ const stop = () => {
54405
+ cleanup();
54406
+ stopWatch();
54407
+ isActive2.value = false;
54408
+ };
54409
+ tryOnScopeDispose(stop);
54410
+ return {
54411
+ isSupported,
54412
+ isActive: isActive2,
54413
+ pause() {
54414
+ cleanup();
54415
+ isActive2.value = false;
54416
+ },
54417
+ resume() {
54418
+ isActive2.value = true;
54419
+ },
54420
+ stop
54421
+ };
54422
+ }
54175
54423
  function useVirtualList(list, options) {
54176
54424
  const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);
54177
54425
  return {
@@ -54380,7 +54628,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54380
54628
  emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
54381
54629
  setup(__props, { emit: __emit }) {
54382
54630
  useCssVars((_ctx) => ({
54383
- "527f36f7": unref(computedItemHeight)
54631
+ "2c584721": unref(computedItemHeight)
54384
54632
  }));
54385
54633
  const emit2 = __emit;
54386
54634
  const slots = useSlots();
@@ -54499,21 +54747,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54499
54747
  selectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
54500
54748
  }
54501
54749
  const lastItem = ref();
54502
- let observer;
54503
- function registerLastItemObserver() {
54504
- if (__props.onLastItemVisible === void 0) return;
54505
- observer = new IntersectionObserver(([entry]) => {
54750
+ async function registerLastItemObserver() {
54751
+ await until(() => lastItem.value).toBeTruthy();
54752
+ useIntersectionObserver(lastItem.value, ([entry]) => {
54753
+ var _a2;
54506
54754
  if (entry.isIntersecting && computedData.value.length) {
54507
- void __props.onLastItemVisible();
54755
+ void ((_a2 = __props.onLastItemVisible) == null ? void 0 : _a2.call(__props));
54508
54756
  }
54509
54757
  });
54510
- if (lastItem.value) observer.observe(lastItem.value);
54511
54758
  }
54512
54759
  onMounted(() => {
54513
- registerLastItemObserver();
54514
- });
54515
- onUnmounted(() => {
54516
- observer == null ? void 0 : observer.disconnect();
54760
+ void registerLastItemObserver();
54517
54761
  });
54518
54762
  return (_ctx, _cache) => {
54519
54763
  return openBlock(), createElementBlock("div", mergeProps({ class: "table-list-wrap h-100" }, unref(containerProps), {
@@ -54608,7 +54852,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54608
54852
  };
54609
54853
  }
54610
54854
  });
54611
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e3fe1a41"]]);
54855
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bcd5ff3e"]]);
54612
54856
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
54613
54857
  __name: "Title",
54614
54858
  props: {
@@ -56601,6 +56845,7 @@ export {
56601
56845
  timeAgo,
56602
56846
  useBagel,
56603
56847
  useBglSchema,
56848
+ useDebounceFn,
56604
56849
  useEscape,
56605
56850
  useI18nT,
56606
56851
  useLang,
package/dist/style.css CHANGED
@@ -1604,58 +1604,58 @@ p {
1604
1604
  font-size: var(--label-font-size);
1605
1605
  }
1606
1606
 
1607
- .bagel-input textarea[data-v-06d5ed00] {
1607
+ .bagel-input textarea[data-v-2c465924] {
1608
1608
  min-height: unset;
1609
1609
  font-size: var(--input-font-size);
1610
1610
  }
1611
- .bagel-input.text-input textarea[data-v-06d5ed00] {
1611
+ .bagel-input.text-input textarea[data-v-2c465924] {
1612
1612
  resize: none;
1613
1613
  }
1614
- .code textarea[data-v-06d5ed00] {
1614
+ .code textarea[data-v-2c465924] {
1615
1615
  font-family: 'Inconsolata', monospace;
1616
1616
  background: var(--bgl-code-bg) !important;
1617
1617
  color: var(--bgl-light-text) !important;
1618
1618
  }
1619
- .code textarea[data-v-06d5ed00]::placeholder {
1619
+ .code textarea[data-v-2c465924]::placeholder {
1620
1620
  color: var(--bgl-light-text) !important;
1621
1621
  opacity: 0.3;
1622
1622
  }
1623
- .bagel-input.small[data-v-06d5ed00] {
1623
+ .bagel-input.small[data-v-2c465924] {
1624
1624
  margin-bottom: 0;
1625
1625
  height: 30px;
1626
1626
  }
1627
- .bagel-input.dense label[data-v-06d5ed00] {
1627
+ .bagel-input.dense label[data-v-2c465924] {
1628
1628
  display: flex;
1629
1629
  align-items: center;
1630
1630
  gap: 0.5rem;
1631
1631
  }
1632
- .bagel-input input[data-v-06d5ed00]:disabled {
1632
+ .bagel-input input[data-v-2c465924]:disabled {
1633
1633
  background: #f5f5f5;
1634
1634
  }
1635
- .bagel-input label[data-v-06d5ed00] {
1635
+ .bagel-input label[data-v-2c465924] {
1636
1636
  font-size: var(--label-font-size);
1637
1637
  }
1638
- .textInputIconWrap .bgl_icon-font[data-v-06d5ed00] {
1638
+ .textInputIconWrap .bgl_icon-font[data-v-2c465924] {
1639
1639
  color: var(--input-color);
1640
1640
  position: absolute;
1641
1641
  inset-inline-end:calc(var(--input-height) / 3 - 0.25rem);
1642
1642
  margin-top: calc(var(--input-height) / 2 + 0.1rem);
1643
1643
  line-height: 0;
1644
1644
  }
1645
- .textInputIconWrap input[data-v-06d5ed00]{
1645
+ .textInputIconWrap input[data-v-2c465924]{
1646
1646
  padding-inline-end: calc(var(--input-height) / 3 + 1.5rem);
1647
1647
  }
1648
- .txtInputIconStart .iconStart[data-v-06d5ed00] {
1648
+ .txtInputIconStart .iconStart[data-v-2c465924] {
1649
1649
  color: var(--input-color);
1650
1650
  position: absolute;
1651
1651
  inset-inline-start:calc(var(--input-height) / 3 - 0.25rem);
1652
1652
  margin-top: calc(var(--input-height) / 2 );
1653
1653
  line-height: 0;
1654
1654
  }
1655
- .txtInputIconStart input[data-v-06d5ed00], .txtInputIconStart textarea[data-v-06d5ed00]{
1655
+ .txtInputIconStart input[data-v-2c465924], .txtInputIconStart textarea[data-v-2c465924]{
1656
1656
  padding-inline-start: calc(var(--input-height) / 3 + 1.5rem);
1657
1657
  }
1658
- .bagel-input.small textarea[data-v-06d5ed00] {
1658
+ .bagel-input.small textarea[data-v-2c465924] {
1659
1659
  height: 30px;
1660
1660
  }
1661
1661
 
@@ -3248,22 +3248,22 @@ body:has(.bg-dark.is-active) {
3248
3248
  background: transparent;
3249
3249
  }
3250
3250
 
3251
- .table-list-wrap[data-v-e3fe1a41] {
3251
+ .table-list-wrap[data-v-bcd5ff3e] {
3252
3252
  min-height: 150px;
3253
3253
  }
3254
- .selected[data-v-e3fe1a41] {
3254
+ .selected[data-v-bcd5ff3e] {
3255
3255
  background: var(--bgl-primary-tint);
3256
3256
  }
3257
- tbody tr.selected[data-v-e3fe1a41]:hover {
3257
+ tbody tr.selected[data-v-bcd5ff3e]:hover {
3258
3258
  background: var(--bgl-primary-light);
3259
3259
  }
3260
- .loading-table[data-v-e3fe1a41] {
3260
+ .loading-table[data-v-bcd5ff3e] {
3261
3261
  position: relative;
3262
3262
  }
3263
- .inset[data-v-e3fe1a41] {
3263
+ .inset[data-v-bcd5ff3e] {
3264
3264
  inset: 0;
3265
3265
  }
3266
- .loading-table-animation[data-v-e3fe1a41] {
3266
+ .loading-table-animation[data-v-bcd5ff3e] {
3267
3267
  --size: 60px;
3268
3268
  top: 30vh;
3269
3269
  inset-inline-start: calc(50% - var(--size));
@@ -3271,9 +3271,9 @@ tbody tr.selected[data-v-e3fe1a41]:hover {
3271
3271
  border-top: 4px solid var(--bgl-primary);
3272
3272
  width: var(--size);
3273
3273
  height: var(--size);
3274
- animation: loading-table-e3fe1a41 1s linear infinite;
3274
+ animation: loading-table-bcd5ff3e 1s linear infinite;
3275
3275
  }
3276
- @keyframes loading-table-e3fe1a41 {
3276
+ @keyframes loading-table-bcd5ff3e {
3277
3277
  0% {
3278
3278
  transform: translate(-50%, -50%) rotate(0deg);
3279
3279
  }
@@ -3281,51 +3281,51 @@ tbody tr.selected[data-v-e3fe1a41]:hover {
3281
3281
  transform: translate(-50%, -50%) rotate(360deg);
3282
3282
  }
3283
3283
  }
3284
- .list-arrows[data-v-e3fe1a41] {
3284
+ .list-arrows[data-v-bcd5ff3e] {
3285
3285
  opacity: 0;
3286
3286
  }
3287
- .list-arrows .bgl_icon-font[data-v-e3fe1a41] {
3287
+ .list-arrows .bgl_icon-font[data-v-bcd5ff3e] {
3288
3288
  transition: all ease-in-out 0.2s;
3289
3289
  }
3290
- .list-arrows.sorted[data-v-e3fe1a41] {
3290
+ .list-arrows.sorted[data-v-bcd5ff3e] {
3291
3291
  opacity: 1;
3292
3292
  }
3293
- .col img[data-v-e3fe1a41] {
3293
+ .col img[data-v-bcd5ff3e] {
3294
3294
  height: 35px;
3295
3295
  margin-top: -14px;
3296
3296
  margin-bottom: -14px;
3297
3297
  border-radius: 5px;
3298
3298
  }
3299
- .list-arrows.sorted .desc[data-v-e3fe1a41] {
3299
+ .list-arrows.sorted .desc[data-v-bcd5ff3e] {
3300
3300
  transform: rotate(180deg);
3301
3301
  display: inline-block;
3302
3302
  }
3303
- table[data-v-e3fe1a41] {
3303
+ table[data-v-bcd5ff3e] {
3304
3304
  border-spacing: 0 15px;
3305
3305
  border-collapse: collapse;
3306
3306
  width: 100%;
3307
3307
  }
3308
- th[data-v-e3fe1a41] {
3308
+ th[data-v-bcd5ff3e] {
3309
3309
  font-size: 0.8rem;
3310
3310
  color: var(--bgl-black-tint);
3311
3311
  position: sticky;
3312
3312
  top: 0;
3313
3313
  z-index: 2;
3314
3314
  background: var(--bgl-box-bg);
3315
- height: var(--527f36f7);
3315
+ height: var(--2c584721);
3316
3316
  vertical-align: bottom;
3317
3317
  font-weight: 400;
3318
3318
  text-align: start;
3319
3319
  }
3320
- .embedded-field[data-v-e3fe1a41] {
3320
+ .embedded-field[data-v-bcd5ff3e] {
3321
3321
  margin-bottom: -0.2rem;
3322
3322
  margin-top: -0.2rem;
3323
3323
  }
3324
- .row[data-v-e3fe1a41] {
3324
+ .row[data-v-bcd5ff3e] {
3325
3325
  border-bottom: 1px solid var(--border-color);
3326
3326
  cursor: pointer;
3327
3327
  }
3328
- .row.first-row[data-v-e3fe1a41] {
3328
+ .row.first-row[data-v-bcd5ff3e] {
3329
3329
  font-size: 0.8rem;
3330
3330
  color: var(--bgl-black-tint);
3331
3331
  position: sticky;
@@ -3334,7 +3334,7 @@ th[data-v-e3fe1a41] {
3334
3334
  background: var(--bgl-box-bg);
3335
3335
  vertical-align: bottom;
3336
3336
  }
3337
- .row.first-row[data-v-e3fe1a41]::after {
3337
+ .row.first-row[data-v-bcd5ff3e]::after {
3338
3338
  content: '';
3339
3339
  border-bottom: 1px solid var(--border-color);
3340
3340
  position: absolute;
@@ -3342,30 +3342,30 @@ th[data-v-e3fe1a41] {
3342
3342
  right: 0;
3343
3343
  bottom: -1px;
3344
3344
  }
3345
- .first-row .col[data-v-e3fe1a41] {
3345
+ .first-row .col[data-v-bcd5ff3e] {
3346
3346
  cursor: pointer;
3347
3347
  background: var(--bgl-box-bg);
3348
3348
  }
3349
- .col[data-v-e3fe1a41] {
3349
+ .col[data-v-bcd5ff3e] {
3350
3350
  white-space: nowrap;
3351
3351
  padding: 0.75rem 1rem;
3352
3352
  transition: var(--bgl-transition);
3353
3353
  line-height: 1;
3354
3354
  align-items: center;
3355
3355
  }
3356
- .col[data-v-e3fe1a41]:has(.bagel-input) {
3356
+ .col[data-v-bcd5ff3e]:has(.bagel-input) {
3357
3357
  padding: 0rem 0.25rem;
3358
3358
  }
3359
- .col > div[data-v-e3fe1a41] {
3359
+ .col > div[data-v-bcd5ff3e] {
3360
3360
  display: flex;
3361
3361
  gap: 0.5rem;
3362
3362
  }
3363
- .max-col-width[data-v-e3fe1a41] {
3363
+ .max-col-width[data-v-bcd5ff3e] {
3364
3364
  max-width: 30vw;
3365
3365
  overflow: hidden;
3366
3366
  text-overflow: ellipsis;
3367
3367
  }
3368
- .col.check .bgl_icon-font[data-v-e3fe1a41] {
3368
+ .col.check .bgl_icon-font[data-v-bcd5ff3e] {
3369
3369
  border-radius: 100%;
3370
3370
  background: var(--bgl-blue-20);
3371
3371
  color: var(--bgl-primary);
@@ -3376,35 +3376,35 @@ th[data-v-e3fe1a41] {
3376
3376
  justify-content: center;
3377
3377
  margin-top: -2px;
3378
3378
  }
3379
- .rows[data-v-e3fe1a41] {
3379
+ .rows[data-v-bcd5ff3e] {
3380
3380
  font-size: 0.88em;
3381
3381
  }
3382
- .table-list[data-v-e3fe1a41] {
3382
+ .table-list[data-v-bcd5ff3e] {
3383
3383
  height: 100%;
3384
3384
  position: relative;
3385
3385
  padding-left: 0 !important;
3386
3386
  padding-right: 0 !important;
3387
3387
  overflow: auto;
3388
3388
  }
3389
- .BagelTable .table-list[data-v-e3fe1a41] {
3389
+ .BagelTable .table-list[data-v-bcd5ff3e] {
3390
3390
  overflow: unset;
3391
3391
  }
3392
- .row-item[data-v-e3fe1a41] {
3393
- height: var(--527f36f7);
3392
+ .row-item[data-v-bcd5ff3e] {
3393
+ height: var(--2c584721);
3394
3394
  transition: all 200ms ease;
3395
3395
  }
3396
- .row-item[data-v-e3fe1a41]:hover {
3396
+ .row-item[data-v-bcd5ff3e]:hover {
3397
3397
  background: var(--bgl-gray-light);
3398
3398
  }
3399
- .row-item input[type='checkbox'][data-v-e3fe1a41] {
3399
+ .row-item input[type='checkbox'][data-v-bcd5ff3e] {
3400
3400
  margin-top: 0.45rem !important;
3401
3401
  accent-color: var(--bgl-accent-color);
3402
3402
  }
3403
- .infinite-wrapper[data-v-e3fe1a41] {
3403
+ .infinite-wrapper[data-v-bcd5ff3e] {
3404
3404
  overflow-y: auto;
3405
3405
  width: 100%;
3406
3406
  }
3407
- input[type='checkbox'][data-v-e3fe1a41] {
3407
+ input[type='checkbox'][data-v-bcd5ff3e] {
3408
3408
  margin-top: 0.3rem !important;
3409
3409
  accent-color: var(--bgl-accent-color);
3410
3410
  transform: scale(1.2);
@@ -3416,7 +3416,7 @@ input[type='checkbox'][data-v-e3fe1a41] {
3416
3416
  height: 0.85rem;
3417
3417
  width: 0.85rem;
3418
3418
  }
3419
- input[type='checkbox'][data-v-e3fe1a41]::before {
3419
+ input[type='checkbox'][data-v-bcd5ff3e]::before {
3420
3420
  content: '';
3421
3421
  height: 0.85rem;
3422
3422
  width: 0.85rem;
@@ -3429,18 +3429,18 @@ input[type='checkbox'][data-v-e3fe1a41]::before {
3429
3429
  transform: scale(1);
3430
3430
  position: absolute;
3431
3431
  }
3432
- input[type='checkbox'][data-v-e3fe1a41]:hover::before {
3432
+ input[type='checkbox'][data-v-bcd5ff3e]:hover::before {
3433
3433
  opacity: 0.2;
3434
3434
  transform: scale(2);
3435
3435
  }
3436
- [lang='he'] [dir='ltr'][data-v-e3fe1a41] {
3436
+ [lang='he'] [dir='ltr'][data-v-bcd5ff3e] {
3437
3437
  text-align: right;
3438
3438
  }
3439
- th input[type='checkbox'][data-v-e3fe1a41] {
3439
+ th input[type='checkbox'][data-v-bcd5ff3e] {
3440
3440
  transform: translateY(0.2rem) scale(1.2);
3441
3441
  accent-color: var(--bgl-accent-color);
3442
3442
  }
3443
- th[data-v-e3fe1a41]::after {
3443
+ th[data-v-bcd5ff3e]::after {
3444
3444
  content: '';
3445
3445
  border-bottom: 1px solid var(--border-color);
3446
3446
  position: absolute;
@@ -3448,24 +3448,24 @@ th[data-v-e3fe1a41]::after {
3448
3448
  right: 0;
3449
3449
  bottom: -1px;
3450
3450
  }
3451
- tr[data-v-e3fe1a41] {
3451
+ tr[data-v-bcd5ff3e] {
3452
3452
  border-bottom: 1px solid var(--border-color);
3453
3453
  cursor: pointer;
3454
3454
  align-items: center;
3455
3455
  }
3456
- td[data-v-e3fe1a41],
3457
- th[data-v-e3fe1a41] {
3456
+ td[data-v-bcd5ff3e],
3457
+ th[data-v-bcd5ff3e] {
3458
3458
  white-space: nowrap;
3459
3459
  padding: 0.75rem 0.65rem;
3460
3460
  transition: var(--bgl-transition);
3461
3461
  line-height: 1;
3462
3462
  }
3463
- tbody tr[data-v-e3fe1a41] {
3463
+ tbody tr[data-v-bcd5ff3e] {
3464
3464
  font-size: 0.88em;
3465
- height: var(--527f36f7);
3465
+ height: var(--2c584721);
3466
3466
  transition: all 200ms ease;
3467
3467
  }
3468
- tbody tr[data-v-e3fe1a41]:hover {
3468
+ tbody tr[data-v-bcd5ff3e]:hover {
3469
3469
  background: var(--bgl-gray-light);
3470
3470
  }
3471
3471
 
@@ -13,10 +13,11 @@ export declare function denullify(itemData?: {
13
13
  [key: string]: any;
14
14
  }, fieldID?: string): any;
15
15
  export declare const isDate: (dateToTest: any) => boolean;
16
- export * as bagelFormUtils from './BagelFormUtils';
17
- export { useLang } from './lang';
18
- export { formatString } from './strings';
19
16
  export declare function getFallbackSchema<T>(data?: any[], showFields?: string[]): BglFormSchemaT<T>;
20
17
  export declare function sleep(ms?: number): Promise<unknown>;
21
18
  export declare function appendScript(src: string): Promise<void>;
19
+ export * as bagelFormUtils from './BagelFormUtils';
20
+ export { useLang } from './lang';
21
+ export { formatString } from './strings';
22
+ export { useDebounceFn } from '@vueuse/core';
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE/D,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAC3E,QAAQ,EAAE,CAAC,EACX,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,GACjB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAelC;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ3D;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,iBAGtE;AAED,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,UAG3C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,QAIrE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,UAOp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AcvD;AAED,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.929",
4
+ "version": "0.0.933",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -7,8 +7,8 @@ import {
7
7
  keyToLabel,
8
8
  useBglSchema,
9
9
  } from '@bagelink/vue'
10
- import { useVirtualList } from '@vueuse/core'
11
- import { computed, useSlots, watch, onMounted, onUnmounted } from 'vue'
10
+ import { useVirtualList, useIntersectionObserver, until } from '@vueuse/core'
11
+ import { computed, useSlots, watch, onMounted } from 'vue'
12
12
 
13
13
  export type SortDirectionsT = 'ASC' | 'DESC'
14
14
  export type EmitOrderT = `${string} ${SortDirectionsT}`
@@ -188,24 +188,22 @@ function toggleSelectAll(event: Event) {
188
188
  selectedItems.value = value ? computedData.value.map((d: any) => d.id) : []
189
189
  }
190
190
  // #endregion ? SELECT COLUMN
191
+
191
192
  const lastItem = $ref<HTMLTableRowElement | null>()
192
- let observer: IntersectionObserver | undefined
193
193
 
194
- function registerLastItemObserver() {
195
- if (onLastItemVisible === undefined) return
196
- observer = new IntersectionObserver(([entry]) => {
194
+ async function registerLastItemObserver() {
195
+ await until(() => lastItem).toBeTruthy()
196
+
197
+ useIntersectionObserver(lastItem, ([entry]) => {
197
198
  if (entry.isIntersecting && computedData.value.length) {
198
- void onLastItemVisible()
199
+ void onLastItemVisible?.()
199
200
  }
200
201
  })
201
- if (lastItem) observer.observe(lastItem)
202
202
  }
203
203
 
204
204
  onMounted(() => {
205
- registerLastItemObserver()
205
+ void registerLastItemObserver()
206
206
  })
207
-
208
- onUnmounted(() => { observer?.disconnect() })
209
207
  </script>
210
208
 
211
209
  <template>
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MaterialIcon,
4
4
  type MaterialIcons,
5
- debounce,
5
+ useDebounceFn,
6
6
  } from '@bagelink/vue'
7
7
  import { onMounted, watch } from 'vue'
8
8
 
@@ -51,13 +51,14 @@ const rows = $computed(() => {
51
51
  return 1
52
52
  })
53
53
 
54
- const debounceUpdate = debounce(() => { emit('debounce', inputVal) }, props.debounceDelay)
54
+ const debounceUpdate = useDebounceFn(() => { emit('debounce', inputVal) }, props.debounceDelay)
55
+
55
56
  function updateInputVal() {
56
57
  if (props.disabled) return
57
58
 
58
59
  emit('update:modelValue', inputVal as string)
59
60
 
60
- debounceUpdate()
61
+ void debounceUpdate()
61
62
  }
62
63
 
63
64
  watch(
@@ -94,33 +95,33 @@ onMounted(() => {
94
95
 
95
96
  <input
96
97
  v-if="!multiline && !autoheight && !code"
97
- :id="id"
98
+ :id
98
99
  ref="input"
99
100
  v-model.trim="inputVal"
100
- :title="title"
101
- :autocomplete="autocomplete"
101
+ :title
102
+ :autocomplete
102
103
  :type="type"
103
104
  :rows="1"
104
105
  :placeholder="placeholder || label"
105
106
  :disabled
106
- :required="required"
107
- :pattern="pattern"
107
+ :required
108
+ :pattern
108
109
  v-bind="nativeInputAttrs"
109
110
  @focusout="onFocusout"
110
111
  @input="updateInputVal"
111
112
  >
112
113
  <textarea
113
114
  v-else
114
- :id="id"
115
+ :id
115
116
  ref="input"
116
117
  v-model="inputVal"
117
- :title="title"
118
- :type="type"
119
- :rows="rows"
118
+ :title
119
+ :type
120
+ :rows
120
121
  :placeholder="placeholder || label"
121
122
  :disabled
122
- :required="required"
123
- :pattern="pattern"
123
+ :required
124
+ :pattern
124
125
  v-bind="nativeInputAttrs"
125
126
  @input="updateInputVal"
126
127
  @focusout="onFocusout"
@@ -133,7 +134,7 @@ onMounted(() => {
133
134
  />
134
135
  <MaterialIcon
135
136
  v-if="icon"
136
- :icon="icon"
137
+ :icon
137
138
  />
138
139
  </label>
139
140
  </div>
@@ -91,12 +91,6 @@ export function denullify(itemData?: { [key: string]: any }, fieldID?: string) {
91
91
 
92
92
  export const isDate = (dateToTest: any) => !Number.isNaN(Date.parse(dateToTest))
93
93
 
94
- export * as bagelFormUtils from './BagelFormUtils'
95
-
96
- export { useLang } from './lang'
97
-
98
- export { formatString } from './strings'
99
-
100
94
  export function getFallbackSchema<T>(
101
95
  data?: any[],
102
96
  showFields?: string[]
@@ -132,3 +126,10 @@ export function appendScript(src: string): Promise<void> {
132
126
  document.head.append(script)
133
127
  })
134
128
  }
129
+
130
+ export * as bagelFormUtils from './BagelFormUtils'
131
+
132
+ export { useLang } from './lang'
133
+
134
+ export { formatString } from './strings'
135
+ export { useDebounceFn } from '@vueuse/core'