mark.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. var __rest = (this && this.__rest) || function (s, e) {
  2. var t = {};
  3. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  4. t[p] = s[p];
  5. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  6. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  7. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  8. t[p[i]] = s[p[i]];
  9. }
  10. return t;
  11. };
  12. // @todo Move this to runtime.
  13. export const Mark = () => {
  14. return (options) => {
  15. const { width, height, paddingLeft, paddingRight, paddingTop, paddingBottom, padding, inset, insetLeft, insetTop, insetRight, insetBottom, margin, marginLeft, marginBottom, marginTop, marginRight, data, coordinate, theme, component, interaction, x, y, key, frame, title, labelTransform, parentKey, clip, viewStyle } = options, mark = __rest(options, ["width", "height", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "padding", "inset", "insetLeft", "insetTop", "insetRight", "insetBottom", "margin", "marginLeft", "marginBottom", "marginTop", "marginRight", "data", "coordinate", "theme", "component", "interaction", "x", "y", "key", "frame", "title", "labelTransform", "parentKey", "clip", "viewStyle"]);
  16. return [
  17. {
  18. type: 'standardView',
  19. x,
  20. y,
  21. key,
  22. width,
  23. height,
  24. padding,
  25. paddingLeft,
  26. paddingRight,
  27. paddingTop,
  28. inset,
  29. insetLeft,
  30. insetTop,
  31. insetRight,
  32. insetBottom,
  33. paddingBottom,
  34. theme,
  35. coordinate,
  36. component,
  37. interaction,
  38. frame,
  39. title,
  40. labelTransform,
  41. margin,
  42. marginLeft,
  43. marginBottom,
  44. marginTop,
  45. marginRight,
  46. parentKey,
  47. clip,
  48. style: viewStyle,
  49. marks: [Object.assign(Object.assign({}, mark), { key: `${key}-0`, data })],
  50. },
  51. ];
  52. };
  53. };
  54. Mark.props = {};
  55. //# sourceMappingURL=mark.js.map