@adyen/lume 1.6.4 → 1.6.5

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,15 +1,16 @@
1
1
  import { Ref } from 'vue';
2
+ import { AxisOptions } from '@/composables/options';
2
3
  import { Scale } from '@/composables/scales';
3
4
  /**
4
5
  * Composable for axis label skipping logic.
5
6
  *
6
7
  * @param scale A d3 scale.
7
8
  * @param tickRefs Template reference to the tick text elements
8
- * @param skipNumber Optional amount of ticks to skip
9
+ * @param options The axis options.
9
10
  */
10
11
  export declare function useSkip(scale: Ref<Scale>, tickRefs: Ref<Array<{
11
12
  ref: SVGTextElement;
12
- }>>, skipNumber?: true | number): {
13
+ }>>, options: Ref<AxisOptions>): {
13
14
  showTick: (index: number) => boolean;
14
15
  };
15
16
  //# sourceMappingURL=lume-skip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lume-skip.d.ts","sourceRoot":"","sources":["../../../../../../../lib/src/components/core/lume-axis/composables/lume-skip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,GAAG,EAAS,MAAM,KAAK,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI7C;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,EACjB,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,cAAc,CAAA;CAAE,CAAC,CAAC,EAC7C,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM;sBAmBD,MAAM;EAkBhC"}
1
+ {"version":3,"file":"lume-skip.d.ts","sourceRoot":"","sources":["../../../../../../../lib/src/components/core/lume-axis/composables/lume-skip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,GAAG,EAAS,MAAM,KAAK,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI7C;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,EACjB,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,cAAc,CAAA;CAAE,CAAC,CAAC,EAC7C,OAAO,EAAE,GAAG,CAAC,WAAW,CAAC;sBAmBA,MAAM;EAmBhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lume-line-group.vue.d.ts","sourceRoot":"","sources":["../../../../../../lib/src/components/groups/lume-line-group/lume-line-group.vue.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAwBzC,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;eAA/C,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAA/C,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;eAA/C,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;;;;;;;;;;;;AAhB/D,wBAgTI"}
1
+ {"version":3,"file":"lume-line-group.vue.d.ts","sourceRoot":"","sources":["../../../../../../lib/src/components/groups/lume-line-group/lume-line-group.vue.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAwBzC,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;eAA/C,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAA/C,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;eAA/C,MAAM;sBAAgB,MAAM;eAAS,UAAU;;;;;;;;;;;;;;AAhB/D,wBAmTI"}
@@ -1 +1 @@
1
- {"version":3,"file":"line-null-values.d.ts","sourceRoot":"","sources":["../../../../lib/src/composables/line-null-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC;;0BA2DrB,MAAM,KAAG,OAAO;;;;;;;;;EA8CnD"}
1
+ {"version":3,"file":"line-null-values.d.ts","sourceRoot":"","sources":["../../../../lib/src/composables/line-null-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC;;0BA6DrB,MAAM,KAAG,OAAO;;;;;;;;;EA8CnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"line-values.d.ts","sourceRoot":"","sources":["../../../../lib/src/composables/line-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAE,MAAM,IAAI,CAAC;AAGlD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA0BjC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EACrB,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAWpC"}
1
+ {"version":3,"file":"line-values.d.ts","sourceRoot":"","sources":["../../../../lib/src/composables/line-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAE,MAAM,IAAI,CAAC;AAGlD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA0BjC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EACrB,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAcpC"}
package/dist/index.js CHANGED
@@ -252,11 +252,11 @@ function mn(t, e, r) {
252
252
  function i(u) {
253
253
  if (!e.value)
254
254
  return !0;
255
- const c = e.value.length;
255
+ const c = r.value.skip, d = e.value.length;
256
256
  if (u === 0)
257
257
  return !0;
258
- const d = o.value / c, s = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / d);
259
- return u % s === 0;
258
+ const s = o.value / d, _ = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / s);
259
+ return u % _ === 0;
260
260
  }
261
261
  return C(e, l), { showTick: i };
262
262
  }
@@ -513,7 +513,7 @@ const $n = /* @__PURE__ */ H({
513
513
  ), { allOptions: f } = J(
514
514
  i,
515
515
  h.value === "x" ? bn : kn
516
- ), { showTick: k } = mn(o, s, f.value.skip), T = v(() => {
516
+ ), { showTick: k } = mn(o, s, f), T = v(() => {
517
517
  var I, E, g, N;
518
518
  return h.value === "y" && c.value ? `translate(0, ${((I = a.value) == null ? void 0 : I.height) / 2})` : h.value === "x" && c.value ? `translate(-${((E = a.value) == null ? void 0 : E.width) / 2}, ${(g = a.value) == null ? void 0 : g.height})` : `translate(0, ${h.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
519
519
  }), x = v(() => {
@@ -2798,7 +2798,7 @@ function Rt(t) {
2798
2798
  }
2799
2799
  function r(a, l, i, u) {
2800
2800
  const s = Math.abs(a - l) / (i + 1) * (u + 1);
2801
- return a > l ? a - s : a + s;
2801
+ return a == null && l == null ? null : a > l ? a - s : a + s;
2802
2802
  }
2803
2803
  function n(a) {
2804
2804
  return function(i) {
@@ -2843,9 +2843,10 @@ function Aa(t, e) {
2843
2843
  return (r, n) => t(e + (n - 1));
2844
2844
  }
2845
2845
  function La(t, e, r, n) {
2846
- return Wt().x(
2846
+ const o = Wt().x(
2847
2847
  Y(r) ? Ta(r, t) : Aa(r, t)
2848
- ).y((a) => n(a))(e);
2848
+ ).y((a) => n(a));
2849
+ return e.every((a) => a == null) ? null : o(e);
2849
2850
  }
2850
2851
  const ht = 1, Oa = /* @__PURE__ */ H({
2851
2852
  __name: "lume-line-group",
@@ -2929,7 +2930,7 @@ const ht = 1, Oa = /* @__PURE__ */ H({
2929
2930
  const F = (P = f(D)[A]) == null ? void 0 : P.value;
2930
2931
  return {
2931
2932
  x: Y(a.value) ? r.xScale(h.value[A]) + p.value : r.xScale(A),
2932
- y: l.value(F)
2933
+ y: F === null ? l.value(l.value.domain()[1]) : l.value(F)
2933
2934
  };
2934
2935
  }
2935
2936
  function $(A) {
@@ -2957,7 +2958,7 @@ var $a = function() {
2957
2958
  Ia,
2958
2959
  !1,
2959
2960
  null,
2960
- "649a5210",
2961
+ "44ba7be1",
2961
2962
  null,
2962
2963
  null
2963
2964
  );