mark.js 2.4 KB

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