@bagelink/vue 0.0.918 → 0.0.923

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.cjs CHANGED
@@ -7555,10 +7555,9 @@ async function convertValueToCoords(state2, options) {
7555
7555
  crossAxis: 0,
7556
7556
  alignmentAxis: null
7557
7557
  } : {
7558
- mainAxis: 0,
7559
- crossAxis: 0,
7560
- alignmentAxis: null,
7561
- ...rawValue
7558
+ mainAxis: rawValue.mainAxis || 0,
7559
+ crossAxis: rawValue.crossAxis || 0,
7560
+ alignmentAxis: rawValue.alignmentAxis
7562
7561
  };
7563
7562
  if (alignment && typeof alignmentAxis === "number") {
7564
7563
  crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
@@ -7663,7 +7662,11 @@ const shift$1 = function(options) {
7663
7662
  ...limitedCoords,
7664
7663
  data: {
7665
7664
  x: limitedCoords.x - x2,
7666
- y: limitedCoords.y - y2
7665
+ y: limitedCoords.y - y2,
7666
+ enabled: {
7667
+ [mainAxis]: checkMainAxis,
7668
+ [crossAxis]: checkCrossAxis
7669
+ }
7667
7670
  }
7668
7671
  };
7669
7672
  }
@@ -7677,6 +7680,7 @@ const size = function(options) {
7677
7680
  name: "size",
7678
7681
  options,
7679
7682
  async fn(state2) {
7683
+ var _state$middlewareData, _state$middlewareData2;
7680
7684
  const {
7681
7685
  placement,
7682
7686
  rects,
@@ -7712,10 +7716,11 @@ const size = function(options) {
7712
7716
  const noShift = !state2.middlewareData.shift;
7713
7717
  let availableHeight = overflowAvailableHeight;
7714
7718
  let availableWidth = overflowAvailableWidth;
7715
- if (isYAxis) {
7716
- availableWidth = alignment || noShift ? min$1(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
7717
- } else {
7718
- availableHeight = alignment || noShift ? min$1(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
7719
+ if ((_state$middlewareData = state2.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
7720
+ availableWidth = maximumClippingWidth;
7721
+ }
7722
+ if ((_state$middlewareData2 = state2.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
7723
+ availableHeight = maximumClippingHeight;
7719
7724
  }
7720
7725
  if (noShift && !alignment) {
7721
7726
  const xMin = max$1(overflow.left, 0);
@@ -55224,7 +55229,7 @@ class DataRequest {
55224
55229
  var _a2, _b;
55225
55230
  if (!this.data_table)
55226
55231
  throw new Error("Data table not set");
55227
- const filterStr = Object.keys(this._filter).length ? `?filter={${Object.entries(this._filter).map(([k2, v2]) => `${k2}:${v2}`).join(",")}}` : "";
55232
+ const filterStr = Object.keys(this._filter).length > 0 ? `?filter={${Object.entries(this._filter).map(([k2, v2]) => `${k2}:${v2}`).join(",")}}` : "";
55228
55233
  const url = `/data/${this.data_table}${this.itemID ? `/${this.itemID}` : ""}${filterStr}`;
55229
55234
  try {
55230
55235
  const { data: data2 } = await axios.get(url);
@@ -55270,7 +55275,7 @@ function responses(key) {
55270
55275
  class BagelAuth {
55271
55276
  constructor(bagel) {
55272
55277
  this.bagel = bagel;
55273
- __publicField(this, "user", null);
55278
+ __publicField(this, "user");
55274
55279
  this.bagel = bagel;
55275
55280
  }
55276
55281
  async validateUser() {
@@ -55280,8 +55285,7 @@ class BagelAuth {
55280
55285
  });
55281
55286
  this.user = usr;
55282
55287
  return usr;
55283
- } catch (err) {
55284
- return null;
55288
+ } catch {
55285
55289
  }
55286
55290
  }
55287
55291
  async resetPassword(ctx) {
@@ -55325,7 +55329,7 @@ class BagelAuth {
55325
55329
  (_b = (_a2 = this.bagel).onError) == null ? void 0 : _b.call(_a2, err);
55326
55330
  console.log(err);
55327
55331
  }
55328
- this.user = null;
55332
+ this.user = void 0;
55329
55333
  }
55330
55334
  async acceptInvite(token, user) {
55331
55335
  await axios.post(`/auth/accept-invite/${token}`, user);
@@ -55346,7 +55350,7 @@ class Bagel {
55346
55350
  constructor({ host, onError }) {
55347
55351
  __publicField(this, "host");
55348
55352
  __publicField(this, "onError");
55349
- __publicField(this, "read_table", null);
55353
+ __publicField(this, "read_table");
55350
55354
  __publicField(this, "auth", new BagelAuth(this));
55351
55355
  this.host = host == null ? void 0 : host.replace(/\/$/, "");
55352
55356
  if (!this.host) {
@@ -55361,7 +55365,7 @@ class Bagel {
55361
55365
  return new DataRequest(table, this);
55362
55366
  }
55363
55367
  _endpointCleaner(endpoint) {
55364
- const url = `${endpoint.replace(/^\//, "").replace(/\/$/g, "")}`;
55368
+ const url = `${endpoint.replace(/^\//, "").replaceAll(/\/$/g, "")}`;
55365
55369
  return url;
55366
55370
  }
55367
55371
  async api(endpoint, query) {
@@ -55374,7 +55378,7 @@ class Bagel {
55374
55378
  async get(endpoint, query) {
55375
55379
  this._setAuthorization();
55376
55380
  endpoint = this._endpointCleaner(endpoint);
55377
- if (endpoint.match(/undefined|null/))
55381
+ if (/undefined|null/.test(endpoint))
55378
55382
  throw new Error(`Invalid endpoint: ${endpoint}`);
55379
55383
  if (query) {
55380
55384
  const queryParams = Object.entries(query).filter(([_2, value]) => !!value).map(([key, value]) => `${key}=${value}`).join("&");
package/dist/index.mjs CHANGED
@@ -7553,10 +7553,9 @@ async function convertValueToCoords(state2, options) {
7553
7553
  crossAxis: 0,
7554
7554
  alignmentAxis: null
7555
7555
  } : {
7556
- mainAxis: 0,
7557
- crossAxis: 0,
7558
- alignmentAxis: null,
7559
- ...rawValue
7556
+ mainAxis: rawValue.mainAxis || 0,
7557
+ crossAxis: rawValue.crossAxis || 0,
7558
+ alignmentAxis: rawValue.alignmentAxis
7560
7559
  };
7561
7560
  if (alignment && typeof alignmentAxis === "number") {
7562
7561
  crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
@@ -7661,7 +7660,11 @@ const shift$1 = function(options) {
7661
7660
  ...limitedCoords,
7662
7661
  data: {
7663
7662
  x: limitedCoords.x - x2,
7664
- y: limitedCoords.y - y2
7663
+ y: limitedCoords.y - y2,
7664
+ enabled: {
7665
+ [mainAxis]: checkMainAxis,
7666
+ [crossAxis]: checkCrossAxis
7667
+ }
7665
7668
  }
7666
7669
  };
7667
7670
  }
@@ -7675,6 +7678,7 @@ const size = function(options) {
7675
7678
  name: "size",
7676
7679
  options,
7677
7680
  async fn(state2) {
7681
+ var _state$middlewareData, _state$middlewareData2;
7678
7682
  const {
7679
7683
  placement,
7680
7684
  rects,
@@ -7710,10 +7714,11 @@ const size = function(options) {
7710
7714
  const noShift = !state2.middlewareData.shift;
7711
7715
  let availableHeight = overflowAvailableHeight;
7712
7716
  let availableWidth = overflowAvailableWidth;
7713
- if (isYAxis) {
7714
- availableWidth = alignment || noShift ? min$1(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
7715
- } else {
7716
- availableHeight = alignment || noShift ? min$1(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
7717
+ if ((_state$middlewareData = state2.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
7718
+ availableWidth = maximumClippingWidth;
7719
+ }
7720
+ if ((_state$middlewareData2 = state2.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
7721
+ availableHeight = maximumClippingHeight;
7717
7722
  }
7718
7723
  if (noShift && !alignment) {
7719
7724
  const xMin = max$1(overflow.left, 0);
@@ -55222,7 +55227,7 @@ class DataRequest {
55222
55227
  var _a2, _b;
55223
55228
  if (!this.data_table)
55224
55229
  throw new Error("Data table not set");
55225
- const filterStr = Object.keys(this._filter).length ? `?filter={${Object.entries(this._filter).map(([k2, v2]) => `${k2}:${v2}`).join(",")}}` : "";
55230
+ const filterStr = Object.keys(this._filter).length > 0 ? `?filter={${Object.entries(this._filter).map(([k2, v2]) => `${k2}:${v2}`).join(",")}}` : "";
55226
55231
  const url = `/data/${this.data_table}${this.itemID ? `/${this.itemID}` : ""}${filterStr}`;
55227
55232
  try {
55228
55233
  const { data: data2 } = await axios.get(url);
@@ -55268,7 +55273,7 @@ function responses(key) {
55268
55273
  class BagelAuth {
55269
55274
  constructor(bagel) {
55270
55275
  this.bagel = bagel;
55271
- __publicField(this, "user", null);
55276
+ __publicField(this, "user");
55272
55277
  this.bagel = bagel;
55273
55278
  }
55274
55279
  async validateUser() {
@@ -55278,8 +55283,7 @@ class BagelAuth {
55278
55283
  });
55279
55284
  this.user = usr;
55280
55285
  return usr;
55281
- } catch (err) {
55282
- return null;
55286
+ } catch {
55283
55287
  }
55284
55288
  }
55285
55289
  async resetPassword(ctx) {
@@ -55323,7 +55327,7 @@ class BagelAuth {
55323
55327
  (_b = (_a2 = this.bagel).onError) == null ? void 0 : _b.call(_a2, err);
55324
55328
  console.log(err);
55325
55329
  }
55326
- this.user = null;
55330
+ this.user = void 0;
55327
55331
  }
55328
55332
  async acceptInvite(token, user) {
55329
55333
  await axios.post(`/auth/accept-invite/${token}`, user);
@@ -55344,7 +55348,7 @@ class Bagel {
55344
55348
  constructor({ host, onError }) {
55345
55349
  __publicField(this, "host");
55346
55350
  __publicField(this, "onError");
55347
- __publicField(this, "read_table", null);
55351
+ __publicField(this, "read_table");
55348
55352
  __publicField(this, "auth", new BagelAuth(this));
55349
55353
  this.host = host == null ? void 0 : host.replace(/\/$/, "");
55350
55354
  if (!this.host) {
@@ -55359,7 +55363,7 @@ class Bagel {
55359
55363
  return new DataRequest(table, this);
55360
55364
  }
55361
55365
  _endpointCleaner(endpoint) {
55362
- const url = `${endpoint.replace(/^\//, "").replace(/\/$/g, "")}`;
55366
+ const url = `${endpoint.replace(/^\//, "").replaceAll(/\/$/g, "")}`;
55363
55367
  return url;
55364
55368
  }
55365
55369
  async api(endpoint, query) {
@@ -55372,7 +55376,7 @@ class Bagel {
55372
55376
  async get(endpoint, query) {
55373
55377
  this._setAuthorization();
55374
55378
  endpoint = this._endpointCleaner(endpoint);
55375
- if (endpoint.match(/undefined|null/))
55379
+ if (/undefined|null/.test(endpoint))
55376
55380
  throw new Error(`Invalid endpoint: ${endpoint}`);
55377
55381
  if (query) {
55378
55382
  const queryParams = Object.entries(query).filter(([_2, value]) => !!value).map(([key, value]) => `${key}=${value}`).join("&");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.918",
4
+ "version": "0.0.923",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",