@ebay/ui-core-react 9.5.0 → 9.6.0
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/chart-legend-QlYP-Aia.js +1 -0
- package/common/charts/bar-chart.d.ts +6 -12
- package/common/charts/bar-chart.d.ts.map +1 -1
- package/common/charts/donut.d.ts +22 -0
- package/common/charts/donut.d.ts.map +1 -0
- package/common/charts/shared.d.ts +12 -1
- package/common/charts/shared.d.ts.map +1 -1
- package/ebay-area-chart/area-chart-tooltip.d.ts +16 -0
- package/ebay-area-chart/area-chart-tooltip.d.ts.map +1 -0
- package/ebay-area-chart/area-chart.d.ts +5 -0
- package/ebay-area-chart/area-chart.d.ts.map +1 -0
- package/ebay-area-chart/index.d.ts +3 -0
- package/ebay-area-chart/index.d.ts.map +1 -0
- package/ebay-area-chart/index.js +4 -0
- package/ebay-area-chart/types.d.ts +20 -0
- package/ebay-area-chart/types.d.ts.map +1 -0
- package/ebay-bar-chart/bar-chart-tooltip.d.ts.map +1 -1
- package/ebay-bar-chart/index.js +2 -2
- package/ebay-bar-chart/types.d.ts +2 -1
- package/ebay-bar-chart/types.d.ts.map +1 -1
- package/ebay-chart-legend/chart-legend.d.ts +5 -0
- package/ebay-chart-legend/chart-legend.d.ts.map +1 -0
- package/ebay-chart-legend/index.d.ts +3 -0
- package/ebay-chart-legend/index.d.ts.map +1 -0
- package/ebay-chart-legend/index.js +1 -0
- package/ebay-chart-legend/types.d.ts +9 -0
- package/ebay-chart-legend/types.d.ts.map +1 -0
- package/ebay-donut-chart/donut-chart-tooltip.d.ts +8 -0
- package/ebay-donut-chart/donut-chart-tooltip.d.ts.map +1 -0
- package/ebay-donut-chart/donut-chart.d.ts +5 -0
- package/ebay-donut-chart/donut-chart.d.ts.map +1 -0
- package/ebay-donut-chart/index.d.ts +3 -0
- package/ebay-donut-chart/index.d.ts.map +1 -0
- package/ebay-donut-chart/index.js +3 -0
- package/ebay-donut-chart/types.d.ts +14 -0
- package/ebay-donut-chart/types.d.ts.map +1 -0
- package/ebay-file-preview-card/file-preview-card.d.ts +1 -0
- package/ebay-file-preview-card/file-preview-card.d.ts.map +1 -1
- package/ebay-file-preview-card/index.js +1 -1
- package/ebay-file-preview-card-group/index.js +1 -1
- package/ebay-item-tile/index.js +1 -1
- package/ebay-item-tile/item-tile-description.d.ts +2 -2
- package/ebay-item-tile/item-tile-description.d.ts.map +1 -1
- package/ebay-item-tile/item-tile.d.ts +1 -0
- package/ebay-item-tile/item-tile.d.ts.map +1 -1
- package/ebay-item-tile-group/index.js +1 -1
- package/ebay-line-chart/index.d.ts +3 -0
- package/ebay-line-chart/index.d.ts.map +1 -0
- package/ebay-line-chart/index.js +7 -0
- package/ebay-line-chart/line-chart-tooltip.d.ts +13 -0
- package/ebay-line-chart/line-chart-tooltip.d.ts.map +1 -0
- package/ebay-line-chart/line-chart.d.ts +5 -0
- package/ebay-line-chart/line-chart.d.ts.map +1 -0
- package/ebay-line-chart/types.d.ts +21 -0
- package/ebay-line-chart/types.d.ts.map +1 -0
- package/file-preview-card-tovsOOzQ.js +1 -0
- package/item-tile-C8Y95yvJ.js +1 -0
- package/legend-CY_MXova.js +1 -0
- package/package.json +1 -1
- package/shared-DrsztGqS.js +1 -0
- package/file-preview-card-Du_rM7X1.js +0 -1
- package/item-tile-C57SjnXt.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./tslib.es6-BW4cJBUu.js"),e=require("react"),m=require("classnames"),d=a=>{var{items:s,className:c}=a,l=n.__rest(a,["items","className"]);return e.createElement("div",Object.assign({},l,{className:m("chart-legend",c)}),e.createElement("dl",{className:"chart-legend__list"},s.map((t,r)=>e.createElement("div",{key:r,className:"chart-legend__item"},e.createElement("dt",{className:"chart-legend__label"},t.name),e.createElement("dd",{className:"chart-legend__value"},t.value)))))};exports.EbayChartLegend=d;
|
|
@@ -8,22 +8,19 @@ export interface ColumnPointInternal extends Highcharts.Point {
|
|
|
8
8
|
shapeType: string;
|
|
9
9
|
shapeY: number;
|
|
10
10
|
dlBox: Highcharts.BBoxObject;
|
|
11
|
+
shapeArgs: Highcharts.SVGAttributes;
|
|
12
|
+
label?: string;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Extended column series options with custom top/bottom flags
|
|
14
16
|
* used to control which ends of stacked bars get rounded corners.
|
|
15
17
|
*/
|
|
16
|
-
export interface
|
|
18
|
+
export interface ColumnSeriesOptions extends Highcharts.SeriesColumnOptions {
|
|
17
19
|
top?: boolean;
|
|
18
20
|
bottom?: boolean;
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* to prevent double-wrapping.
|
|
23
|
-
*/
|
|
24
|
-
interface EbayColumnPrototype {
|
|
25
|
-
ebayColumn?: boolean;
|
|
26
|
-
options: EbayColumnSeriesOptions;
|
|
22
|
+
interface ColumnSeries {
|
|
23
|
+
options: ColumnSeriesOptions;
|
|
27
24
|
points: ColumnPointInternal[];
|
|
28
25
|
}
|
|
29
26
|
/**
|
|
@@ -38,10 +35,7 @@ interface EbayColumnPrototype {
|
|
|
38
35
|
declare module "highcharts" {
|
|
39
36
|
interface SeriesTypeRegistry {
|
|
40
37
|
column: {
|
|
41
|
-
prototype:
|
|
42
|
-
};
|
|
43
|
-
[key: string]: {
|
|
44
|
-
prototype: EbayColumnPrototype;
|
|
38
|
+
prototype: ColumnSeries;
|
|
45
39
|
};
|
|
46
40
|
}
|
|
47
41
|
const seriesTypes: SeriesTypeRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-chart.d.ts","sourceRoot":"","sources":["../../../src/common/charts/bar-chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,KAAK;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"bar-chart.d.ts","sourceRoot":"","sources":["../../../src/common/charts/bar-chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,KAAK;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAE7B,SAAS,EAAE,UAAU,CAAC,aAAa,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,mBAAmB;IACvE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,YAAY;IAClB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,OAAO,QAAQ,YAAY,CAAC;IACxB,UAAU,kBAAkB;QACxB,MAAM,EAAE;YAAE,SAAS,EAAE,YAAY,CAAA;SAAE,CAAC;KACvC;IACD,MAAM,WAAW,EAAE,kBAAkB,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,OAAO,UAAU,GAAG,IAAI,CA8E/D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type Highcharts from "highcharts";
|
|
2
|
+
interface PiePoint extends Highcharts.Point {
|
|
3
|
+
shapeArgs: Highcharts.SVGAttributes;
|
|
4
|
+
}
|
|
5
|
+
interface PieSeries {
|
|
6
|
+
center: number[];
|
|
7
|
+
points: PiePoint[];
|
|
8
|
+
}
|
|
9
|
+
declare module "highcharts" {
|
|
10
|
+
interface SeriesTypeRegistry {
|
|
11
|
+
pie: {
|
|
12
|
+
prototype: PieSeries;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Extends the Highcharts pie series translate function to add 5px arc spacing
|
|
18
|
+
* between donut slices.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ebayDonut(highcharts: typeof Highcharts): void;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=donut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"donut.d.ts","sourceRoot":"","sources":["../../../src/common/charts/donut.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,UAAU,QAAS,SAAQ,UAAU,CAAC,KAAK;IAEvC,SAAS,EAAE,UAAU,CAAC,aAAa,CAAC;CACvC;AAED,UAAU,SAAS;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,QAAQ,EAAE,CAAC;CACtB;AAED,OAAO,QAAQ,YAAY,CAAC;IACxB,UAAU,kBAAkB;QACxB,GAAG,EAAE;YAAE,SAAS,EAAE,SAAS,CAAA;SAAE,CAAC;KACjC;CACJ;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,OAAO,UAAU,GAAG,IAAI,CAiB7D"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import type Highcharts from "highcharts";
|
|
2
|
-
export declare
|
|
2
|
+
export declare function escapeHtml(str: string): string;
|
|
3
|
+
export declare const chartFontFamily = "\"Market Sans\", Arial, sans-serif", backgroundColor = "var(--color-background-primary)", lineChartPrimaryColor = "var(--color-data-viz-line-chart-primary)", lineChartSecondaryColor = "var(--color-data-viz-line-chart-secondary)", lineChartTertiaryColor = "var(--color-data-viz-line-chart-tertiary)", lineChartQueternaryColor = "var(--color-data-viz-line-chart-queternary)", lineChartQuinaryColor = "var(--color-data-viz-line-chart-quinary)", trendPositiveColor = "var(--color-data-viz-trend-positive)", trendNegativeColor = "var(--color-data-viz-trend-negative)", gridColor = "var(--color-data-viz-grid)", labelsColor = "var(--color-foreground-secondary)", legendColor = "var(--color-foreground-primary)", legendInactiveColor = "var(--color-data-viz-legend-inactive)", legendHoverColor = "var(--color-data-viz-legend-hover)", tooltipBackgroundColor = "var(--color-background-primary)", tooltipShadows = "drop-shadow(0 2px 7px var(--color-data-viz-tooltip-shadow-primary)) drop-shadow(0 5px 7px var(--color-data-viz-tooltip-shadow-secondary))", chartPrimaryColor = "var(--color-data-viz-chart-primary)", chartSecondaryColor = "var(--color-data-viz-chart-secondary)", chartTertiaryBackgroundColor = "var(--color-data-viz-chart-tertiary-background)", chartTertiaryStrokeColor = "var(--color-data-viz-chart-tertiary-stroke)", chartQuaternaryBackgroundColor = "var(--color-data-viz-chart-quaternary-background)", chartQuaternaryStrokeColor = "var(--color-data-viz-chart-quaternary-stroke)", chartQuinaryBackgroundColor = "var(--color-data-viz-chart-quinary-background)", chartQuinaryStrokeColor = "var(--color-data-viz-chart-quinary-stroke)";
|
|
3
4
|
export declare const patternTertiary: Highcharts.PatternObject;
|
|
4
5
|
export declare const patternQuaternary: Highcharts.PatternObject;
|
|
5
6
|
export declare const colorMapping: Highcharts.ColorType[];
|
|
7
|
+
/**
|
|
8
|
+
* Sets up the colors on each donut slice data point and returns an array of
|
|
9
|
+
* lineColors to be used as the chart-level colors option.
|
|
10
|
+
*/
|
|
11
|
+
export declare function setDonutColors(series: Highcharts.SeriesPieOptions): Highcharts.ColorType[];
|
|
12
|
+
/**
|
|
13
|
+
* Sets up the marker styles and z-index on each series.
|
|
14
|
+
* Used by area and line charts to configure circular point markers.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setSeriesMarkerStyles(series: Highcharts.SeriesOptions[]): void;
|
|
6
17
|
/**
|
|
7
18
|
* Sets up the colors including lineColor (SVG stroke) on each of the series objects
|
|
8
19
|
* based on the position in the series array.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/common/charts/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,eAAO,MAAM,eAAe,uCAAqC,EAC7D,eAAe,oCAAoC,EACnD,SAAS,+BAA+B,EACxC,WAAW,sCAAsC,EACjD,WAAW,oCAAoC,EAC/C,mBAAmB,0CAA0C,EAC7D,gBAAgB,uCAAuC,EACvD,sBAAsB,oCAAoC,EAC1D,cAAc,8IACiI,EAC/I,iBAAiB,wCAAwC,EACzD,mBAAmB,0CAA0C,EAC7D,4BAA4B,oDAAoD,EAChF,wBAAwB,gDAAgD,EACxE,8BAA8B,sDAAsD,EACpF,0BAA0B,kDAAkD,EAC5E,2BAA2B,mDAAmD,EAC9E,uBAAuB,+CAA+C,CAAC;AAI3E,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,aAYxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,aAU1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,SAAS,EAM9C,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/common/charts/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED,eAAO,MAAM,eAAe,uCAAqC,EAC7D,eAAe,oCAAoC,EACnD,qBAAqB,6CAA6C,EAClE,uBAAuB,+CAA+C,EACtE,sBAAsB,8CAA8C,EACpE,wBAAwB,gDAAgD,EACxE,qBAAqB,6CAA6C,EAClE,kBAAkB,yCAAyC,EAC3D,kBAAkB,yCAAyC,EAC3D,SAAS,+BAA+B,EACxC,WAAW,sCAAsC,EACjD,WAAW,oCAAoC,EAC/C,mBAAmB,0CAA0C,EAC7D,gBAAgB,uCAAuC,EACvD,sBAAsB,oCAAoC,EAC1D,cAAc,8IACiI,EAC/I,iBAAiB,wCAAwC,EACzD,mBAAmB,0CAA0C,EAC7D,4BAA4B,oDAAoD,EAChF,wBAAwB,gDAAgD,EACxE,8BAA8B,sDAAsD,EACpF,0BAA0B,kDAAkD,EAC5E,2BAA2B,mDAAmD,EAC9E,uBAAuB,+CAA+C,CAAC;AAI3E,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,aAYxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,aAU1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,SAAS,EAM9C,CAAC;AA+BF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC,gBAAgB,GAAG,UAAU,CAAC,SAAS,EAAE,CAQ1F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,CAAC,aAAa,EAAE,GAAG,IAAI,CAoB9E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,aAAa,EAAE,GAAG,IAAI,CAcxE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface AreaChartPoint {
|
|
2
|
+
series: {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
label?: string;
|
|
6
|
+
y: number | null;
|
|
7
|
+
}
|
|
8
|
+
interface AreaChartTooltipOptions {
|
|
9
|
+
date: string;
|
|
10
|
+
points: AreaChartPoint[];
|
|
11
|
+
total: number | false;
|
|
12
|
+
valueFormatter: (value: number | string) => string;
|
|
13
|
+
}
|
|
14
|
+
export declare function areaChartTooltipHtml({ date, points, total, valueFormatter }: AreaChartTooltipOptions): string;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=area-chart-tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area-chart-tooltip.d.ts","sourceRoot":"","sources":["../../src/ebay-area-chart/area-chart-tooltip.ts"],"names":[],"mappings":"AAEA,UAAU,cAAc;IACpB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,UAAU,uBAAuB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;CACtD;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,uBAAuB,GAAG,MAAM,CAc7G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area-chart.d.ts","sourceRoot":"","sources":["../../src/ebay-area-chart/area-chart.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAqB3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAoDlD,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAsJzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-area-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../tslib.es6-BW4cJBUu.js"),i=require("react"),w=require("classnames"),F=require("@highcharts/react"),y=require("highcharts");require("highcharts/modules/accessibility");require("highcharts/modules/pattern-fill");const _=require("../legend-CY_MXova.js"),t=require("../shared-DrsztGqS.js");function M({date:e,points:r,total:a,valueFormatter:o}){const s=r.map(n=>{var c;const l=t.escapeHtml(n.series.name),u=t.escapeHtml(n.label!==void 0?n.label:o((c=n.y)!==null&&c!==void 0?c:0));return`<div style="display:flex;justify-content:space-between;gap:var(--spacing-200, 16px)"><span>${l}</span><span>${u}</span></div>`}).join(""),m=a?`<div style="display:flex;justify-content:space-between;gap:var(--spacing-200, 16px)"><span>Total</span><span>${t.escapeHtml(o(a))}</span></div>`:"";return`<b>${t.escapeHtml(e)}</b>${s}${m}`}_.ebayLegend(y);const N=`
|
|
2
|
+
.ebay-area-chart { width: 100%; }
|
|
3
|
+
.ebay-area-chart .highcharts-tooltip-container svg { overflow: visible; }
|
|
4
|
+
`;function R(e,r){const a=typeof e=="string"?parseFloat(e):e;return r("%b %e, %Y",a)}function $(e){const r=typeof e=="string"?parseFloat(e):e;return Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(r)}function V(e){const r=typeof e=="string"?parseFloat(e):e;return Intl.NumberFormat("en-US",{notation:"compact",style:"currency",currency:"USD",maximumSignificantDigits:4}).format(r)}function S(e,r){return Object.keys(e).forEach(a=>{const o=e[a],s=r[a];o instanceof Object&&Object.assign(o,S(s??{},o))}),Object.assign(r,e)}function W(e){const r=(Array.isArray(e)?e:[e]).map(a=>Object.assign(Object.assign({},a),{data:Array.isArray(a.data)?[...a.data]:a.data}));return t.setSeriesMarkerStyles(r),t.setSeriesColors(r),r}const I=e=>{var{title:r,description:a,series:o,tooltipValueFormatter:s=$,tooltipTitleFormatter:m=R,xLabelFormatter:n,yLabelFormatter:c=V,areaType:l="areaspline",highchartOptions:u,className:C}=e,x=L.__rest(e,["title","description","series","tooltipValueFormatter","tooltipTitleFormatter","xLabelFormatter","yLabelFormatter","areaType","highchartOptions","className"]);const b=i.useMemo(()=>W(o),[o]),T=i.useMemo(()=>{const p=b.length>1,h={type:"datetime",labels:{formatter:n?function(){return n(this.value,y.dateFormat)}:void 0,format:"{value:%b %e}",align:"center",style:{color:t.labelsColor}},tickWidth:0,crosshair:{color:"rgba(0, 0, 0, 0.2)",zIndex:3}},d={gridLineColor:t.gridColor,opposite:!0,reversedStacks:!1,labels:{formatter:function(){return c(this.value)},style:{color:t.labelsColor}},title:{enabled:!1},offset:0},H={enabled:p,symbolRadius:2,symbolWidth:12,symbolHeight:12,align:"left",itemStyle:{color:t.legendColor,fontWeight:"normal"},itemHiddenStyle:{color:t.legendInactiveColor},itemHoverStyle:{color:t.legendHoverColor}},O={formatter:function(){var f;const A=m((f=this.x)!==null&&f!==void 0?f:0,y.dateFormat),k=this.points&&this.points.length>1&&this.points.reduce((E,q)=>{var g;return E+((g=q.y)!==null&&g!==void 0?g:0)*100},0)/100;return M({date:A,points:this.points,total:k||!1,valueFormatter:s})},useHTML:!0,backgroundColor:t.tooltipBackgroundColor,borderWidth:0,borderRadius:10,outside:!0,shadow:!1,shared:!0,style:{filter:t.tooltipShadows,fontSize:"12px"}},j={series:{accessibility:{description:a},stacking:"normal",states:{hover:{halo:{size:0}}},marker:{enabled:!1,animation:{duration:0}}},[l]:{className:"ebay-area-chart",lineWidth:1}},v={chart:{type:l,animation:!1,backgroundColor:t.backgroundColor,style:{fontFamily:t.chartFontFamily}},colors:t.colorMapping,xAxis:h,yAxis:d,legend:H,tooltip:O,plotOptions:j,credits:{enabled:!1}};return u?S(v,u):v},[b,l,a,n,c,s,m,u]);return i.createElement(i.Fragment,null,i.createElement("style",null,N),i.createElement("div",Object.assign({},x,{className:w("ebay-area-chart",C)}),i.createElement(F.Chart,{highcharts:y,title:r,options:T},b.map((p,h)=>{var d;return i.createElement(F.Series,{key:p.name||h,type:l,data:(d=p.data)!==null&&d!==void 0?d:[],options:{type:l,name:p.name}})}))))};exports.EbayAreaChart=I;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import type Highcharts from "highcharts";
|
|
3
|
+
type EbayAreaChartBaseProps = Omit<ComponentProps<"div">, "title"> & {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
tooltipValueFormatter?: (value: number | string) => string;
|
|
7
|
+
tooltipTitleFormatter?: (value: number | string, dateFormat: typeof Highcharts.dateFormat) => string;
|
|
8
|
+
xLabelFormatter?: (value: number | string, dateFormat: typeof Highcharts.dateFormat) => string;
|
|
9
|
+
yLabelFormatter?: (value: number | string) => string;
|
|
10
|
+
highchartOptions?: Highcharts.Options;
|
|
11
|
+
};
|
|
12
|
+
export type EbayAreaChartProps = (EbayAreaChartBaseProps & {
|
|
13
|
+
areaType: "area";
|
|
14
|
+
series: Highcharts.SeriesAreaOptions | Highcharts.SeriesAreaOptions[];
|
|
15
|
+
}) | (EbayAreaChartBaseProps & {
|
|
16
|
+
areaType?: "areaspline";
|
|
17
|
+
series: Highcharts.SeriesAreasplineOptions | Highcharts.SeriesAreasplineOptions[];
|
|
18
|
+
});
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-area-chart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,KAAK,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IAC3D,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,OAAO,UAAU,CAAC,UAAU,KAAK,MAAM,CAAC;IACrG,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,OAAO,UAAU,CAAC,UAAU,KAAK,MAAM,CAAC;IAC/F,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IACrD,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GACxB,CAAC,sBAAsB,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,EAAE,CAAC;CACzE,CAAC,GACF,CAAC,sBAAsB,GAAG;IACtB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC,uBAAuB,GAAG,UAAU,CAAC,uBAAuB,EAAE,CAAC;CACrF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-chart-tooltip.d.ts","sourceRoot":"","sources":["../../src/ebay-bar-chart/bar-chart-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"bar-chart-tooltip.d.ts","sourceRoot":"","sources":["../../src/ebay-bar-chart/bar-chart-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAIzC,UAAU,2BAA2B;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,IAAI,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;CACb;AAED,UAAU,8BAA8B;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC,KAAK,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,OAAO,EAAE,KAAK,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACb;AAED,KAAK,oBAAoB,GAAG,2BAA2B,GAAG,8BAA8B,CAAC;AAEzF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,oBAAoB,GAAG,MAAM,CAsB5F"}
|
package/ebay-bar-chart/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-BW4cJBUu.js"),b=require("react"),L=require("classnames"),x=require("@highcharts/react"),h=require("../shared-DrsztGqS.js"),S=require("../legend-CY_MXova.js"),y=require("highcharts");require("highcharts/modules/accessibility");require("highcharts/modules/pattern-fill");function w(i){i.wrap(i.seriesTypes.column.prototype,"translate",function(l){const a=this.options.top,r=this.options.bottom;l.call(this);for(const c of this.points){const o=c.shapeArgs;if(!o)continue;const e=o.x,s=o.width;let t=o.y,n=o.height-(r?0:4);n<0&&(n=o.height,t=t-4);const g=3;let p=i.relativeLength(a?g:0,s),f=i.relativeLength(a?g:0,s),d=i.relativeLength(r?g:0,s),m=i.relativeLength(r?g:0,s);const u=Math.min(s,n)/2;p>u&&(p=u),f>u&&(f=u),d>u&&(d=u),m>u&&(m=u),c.dlBox=o,c.shapeY=t,c.shapeType="path";const v=[["M",e+p,t],["L",e+s-f,t],["C",e+s-f/2,t,e+s,t+f/2,e+s,t+f],["L",e+s,t+n-d],["C",e+s,t+n-d/2,e+s-d/2,t+n,e+s-d,t+n],["L",e+m,t+n],["C",e+m/2,t+n,e,t+n-m/2,e,t+n-m],["L",e,t+p],["C",e,t+p/2,e+p/2,t,e+p,t],["Z"]];c.shapeArgs=Object.assign(Object.assign({},o),{d:v})}})}function C({date:i,data:l,stacked:a,x:r}){let c=`<b>${h.escapeHtml(i)}</b>`;if(a){const o=l;for(const e of o)for(const s of e.data)if(s.x===r){const t=s;c+='<div style="display: flex; justify-content: space-between; width: 100%; align-items: flex-start;">',c+=`${h.escapeHtml(e.name||"")}`,c+=`<span style="margin-left: 16px">${h.escapeHtml(t.label||"")}</span>`,c+="</div>"}}else{const o=l;c+=`<div><span>${h.escapeHtml(o.label||"")}</span></div>`}return c}S.ebayLegend(y);w(y);const O=`
|
|
2
2
|
.ebay-bar-chart {
|
|
3
3
|
width: 100%;
|
|
4
4
|
}
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
.highcharts-tooltip-container svg {
|
|
12
12
|
overflow: visible;
|
|
13
13
|
}
|
|
14
|
-
`;function
|
|
14
|
+
`;function P(i,l){const a=Array.isArray(i)?i.map(r=>Object.assign({},r)):[Object.assign({},i)];return l?(a[0].bottom=!0,a[a.length-1].top=!0,a.forEach(r=>{r.group=":previous"})):a.forEach(r=>{r.top=!0,r.bottom=!0}),h.setSeriesColors(a),a}function k(i){return Math.max(0,...i.flatMap(l=>l.data.map(a=>a.y)))}function E(i,l){return{type:"datetime",labels:{format:i||"{value:%b %e}",align:"center",style:{color:h.labelsColor}},tickWidth:0,tickPositioner:l}}function H(i,l,a){let r=0;return{gridLineColor:h.gridColor,opposite:!0,reversedStacks:!1,labels:{format:l?void 0:"${text}",formatter:l?function(){return this.isFirst&&(r=-1),r=r+1,l[r]}:void 0,style:{color:h.labelsColor}},max:i,title:{enabled:!1},offset:0,tickPositioner:a}}function B(i){return{symbolRadius:2,enabled:Array.isArray(i)&&i.length>1,itemStyle:{color:h.legendColor},itemHiddenStyle:{color:h.legendInactiveColor},itemHoverStyle:{color:h.legendHoverColor}}}function T(i,l){const a=function(){const c=this.series.chart.series,o=i.dateFormat("%b %e, %Y",this.x,!1),e=this.x;return C(l?{date:o,data:c,stacked:!0,x:e}:{date:o,data:this,stacked:!1,x:e})},r=function(c,o){const e=this.chart,s=e.series,t=e.pointer.getChartPosition(),n=e.hoverPoint,g=n.index,p=n,f=s[s.length-1].data[g],d=n.series.yAxis.top,m=t.top+d+f.shapeY-o-15;let u=t.left+p.dlBox.x+p.dlBox.width*.5-c*.5+3;return u<6&&(u=6),u+p.dlBox.width>t.left+e.chartWidth-6&&(u=t.left+e.chartWidth-p.dlBox.width-6),{x:u,y:m}};return{formatter:a,useHTML:!0,backgroundColor:h.tooltipBackgroundColor,borderWidth:0,borderRadius:10,outside:!0,shadow:!1,style:{filter:h.tooltipShadows,fontSize:"12px"},positioner:l?r:void 0}}function F(i,l){const a=function(){const o=this.chart.series;i&&setTimeout(()=>{let e=!1,s=!1;for(let t=0;t<o.length;t++){const n=o[t].options;!s&&o[t].visible?(n.bottom=!0,s=!0):n.bottom=!1}for(let t=o.length-1;t>=0;t--){const n=o[t].options;!e&&o[t].visible?(n.top=!0,e=!0):n.top=!1}this.chart.redraw()},0)},r=function(){const o=this.series.chart;o.series.forEach(e=>e.points.forEach(s=>{(i&&s.x!==this.x||!i&&s!==this)&&s.update({opacity:.2},!1)})),o.redraw()};function c(){const o=this.series.chart;o.series.forEach(e=>e.points.forEach(s=>s.update({opacity:1},!1))),o.redraw()}return{series:{description:l},column:{events:{legendItemClick:a},stacking:i?"normal":void 0,groupPadding:.1,pointPadding:.15,states:{inactive:{opacity:1}},point:{events:{mouseOver:r,mouseOut:c}}}}}function M(i,l,a){const{description:r,series:c,xAxisLabelFormat:o,xAxisPositioner:e,yAxisLabels:s,yAxisPositioner:t,stacked:n=!1}=l;return{chart:{type:"column",backgroundColor:h.backgroundColor,style:{fontFamily:h.chartFontFamily}},colors:h.colorMapping,xAxis:E(o,e),yAxis:H(k(a),s,t),legend:B(c),tooltip:T(i,n),plotOptions:F(n,r),credits:{enabled:!1}}}const q=i=>{var{title:l,description:a,series:r,xAxisLabelFormat:c,xAxisPositioner:o,yAxisLabels:e,yAxisPositioner:s,stacked:t=!1,className:n}=i,g=A.__rest(i,["title","description","series","xAxisLabelFormat","xAxisPositioner","yAxisLabels","yAxisPositioner","stacked","className"]);const p=b.useMemo(()=>P(r,t),[r,t]),f=b.useMemo(()=>M(y,{description:a,series:r,xAxisLabelFormat:c,xAxisPositioner:o,yAxisLabels:e,yAxisPositioner:s,stacked:t},p),[a,r,c,o,e,s,t,p]);return b.createElement(b.Fragment,null,b.createElement("style",null,O),b.createElement("div",Object.assign({},g,{className:L("ebay-bar-chart",n)}),b.createElement(x.Chart,{highcharts:y,title:l,options:f},p.map((d,m)=>b.createElement(x.Series,{key:d.name||m,type:"column",data:d.data,options:{type:"column",name:d.name,color:d.color,borderColor:d.borderColor,lineColor:d.lineColor,fillOpacity:d.fillOpacity,top:d.top,bottom:d.bottom,group:d.group}})))))};exports.EbayBarChart=q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-bar-chart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-bar-chart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,iBAAkB,SAAQ,UAAU,CAAC,kBAAkB;IACpE,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IACnE,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sJAAsJ;IACtJ,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,CAAC;IAClD,uHAAuH;IACvH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8GAA8G;IAC9G,eAAe,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACjC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,sGAAsG;IACtG,eAAe,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IACjC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-legend.d.ts","sourceRoot":"","sources":["../../src/ebay-chart-legend/chart-legend.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAW7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-chart-legend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chart-legend-QlYP-Aia.js");exports.EbayChartLegend=e.EbayChartLegend;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-chart-legend/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACvD,KAAK,EAAE,UAAU,EAAE,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface DonutChartTooltipOptions {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function donutChartTooltipHtml({ name, value, tooltip }: DonutChartTooltipOptions): string;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=donut-chart-tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"donut-chart-tooltip.d.ts","sourceRoot":"","sources":["../../src/ebay-donut-chart/donut-chart-tooltip.ts"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,wBAAwB,GAAG,MAAM,CAGhG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"donut-chart.d.ts","sourceRoot":"","sources":["../../src/ebay-donut-chart/donut-chart.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAS3C,OAAO,KAAK,EAAmB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsBpE,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAkG3C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-donut-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../tslib.es6-BW4cJBUu.js"),e=require("react"),f=require("classnames"),E=require("@highcharts/react"),m=require("highcharts");require("highcharts/modules/accessibility");require("highcharts/modules/pattern-fill");const c=require("../shared-DrsztGqS.js"),C=require("../chart-legend-QlYP-Aia.js");function N(a){a.wrap(a.seriesTypes.pie.prototype,"translate",function(r){if(r.call(this),this.points.length===1)return;const t=this.center[2],i=2*Math.asin(5/t);this.points.forEach(d=>{d.shapeArgs.start+=i/2,d.shapeArgs.end-=i/2})})}function S({name:a,value:r,tooltip:t}){const s=c.escapeHtml(t??r);return`<div class="donut-tooltip tooltip__overlay" role="tooltip"><div class="tooltip__mask"><div class="tooltip__cell"><div class="tooltip__content"><b>${c.escapeHtml(a)}</b><br>${s}</div></div></div></div>`}N(m);const q=`
|
|
2
|
+
.donut-tooltip.tooltip__overlay { display: block; position: relative; }
|
|
3
|
+
`;function D(a){var r;const t=a[0];if(!t)return{prepared:void 0,colors:[]};const s=Object.assign(Object.assign({},t),{type:(r=t.type)!==null&&r!==void 0?r:"pie"}),i=c.setDonutColors(s);return{prepared:s,colors:i}}const k=a=>{var{title:r,metricValue:t,metricLabel:s,series:i,highchartsDescription:d,className:v}=a,_=y.__rest(a,["title","metricValue","metricLabel","series","highchartsDescription","className"]);i.length===0&&console.warn("EbayDonutChart: at least one series is required."),i.length>1&&console.warn("EbayDonutChart: only one series is supported. Additional series will be ignored.");const{prepared:o,colors:p}=e.useMemo(()=>D(i),[i]),g=e.useMemo(()=>{var n,l;return(l=(n=o?.data)===null||n===void 0?void 0:n.map(h=>{var u;return{name:(u=h.name)!==null&&u!==void 0?u:"",value:h.y}}))!==null&&l!==void 0?l:[]},[o]),b=e.useMemo(()=>({chart:{type:"pie",spacing:[0,0,0,0],margin:[0,0,0,0],backgroundColor:c.backgroundColor,style:{fontFamily:c.chartFontFamily}},colors:p,title:{text:void 0},plotOptions:{pie:{description:d,size:"100%",thickness:10,allowPointSelect:!1,cursor:"pointer",borderRadius:"30%",dataLabels:{enabled:!1},states:{hover:{halo:{size:0}}}}},tooltip:{hideDelay:250,useHTML:!0,backgroundColor:"transparent",padding:0,borderWidth:0,borderRadius:0,outside:!0,shadow:!1,shared:!0,style:{filter:c.tooltipShadows,fontSize:"12px"},formatter:function(){var n,l;return S({name:String((n=this.key)!==null&&n!==void 0?n:""),value:String((l=this.y)!==null&&l!==void 0?l:""),tooltip:this.tooltip})}},series:o?[o]:[],credits:{enabled:!1}}),[o,p,d]);return e.createElement(e.Fragment,null,e.createElement("style",null,q),e.createElement("div",Object.assign({},_,{className:f("donut-chart",v)}),e.createElement("div",{className:"donut-chart__grid"},r&&e.createElement("div",{className:"donut-chart__title"},r),(t||s)&&e.createElement("div",{className:"donut-chart__metric"},t&&e.createElement("div",{className:"donut-chart__metric-value"},t),s&&e.createElement("div",{className:"donut-chart__metric-label"},s)),e.createElement("div",{className:"donut-chart__graph"},e.createElement(E.Chart,{highcharts:m,options:b})),e.createElement("div",{className:"donut-chart__legend"},e.createElement(C.EbayChartLegend,{items:g})))))};exports.EbayDonutChart=k;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type Highcharts from "highcharts";
|
|
3
|
+
export interface DonutSeriesItem extends Omit<Highcharts.SeriesOptions, "type"> {
|
|
4
|
+
data: Highcharts.PointOptionsObject[];
|
|
5
|
+
type?: "pie";
|
|
6
|
+
}
|
|
7
|
+
export type EbayDonutChartProps = Omit<ComponentProps<"div">, "title"> & {
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
metricValue?: ReactNode;
|
|
10
|
+
metricLabel?: ReactNode;
|
|
11
|
+
series: DonutSeriesItem[];
|
|
12
|
+
highchartsDescription?: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-donut-chart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,MAAM,CAAC;IAC3E,IAAI,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC;IACtC,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { EbayEventHandler } from "../common/event-utils/types";
|
|
|
3
3
|
import { FilePreviewCardMenuAction, FilePreviewCardMenuActionHandler, FilePreviewType } from "./types";
|
|
4
4
|
export type EbayFilePreviewCardProps = ComponentProps<"div"> & {
|
|
5
5
|
a11yCancelUploadText?: string;
|
|
6
|
+
a11yExternalLinkText?: string;
|
|
6
7
|
as?: ElementType;
|
|
7
8
|
deleteText?: string;
|
|
8
9
|
file?: File | FilePreviewType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-preview-card.d.ts","sourceRoot":"","sources":["../../src/ebay-file-preview-card/file-preview-card.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAW,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAO/D,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvG,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC3D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,gCAAgC,CAAC;IAChD,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"file-preview-card.d.ts","sourceRoot":"","sources":["../../src/ebay-file-preview-card/file-preview-card.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAW,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAO/D,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEvG,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC3D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAC9B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,gCAAgC,CAAC;IAChD,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAiGrD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../file-preview-card-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../file-preview-card-tovsOOzQ.js");exports.EbayFilePreviewCard=e.EbayFilePreviewCard;exports.EbayFilePreviewCardAction=e.EbayFilePreviewCardAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-BW4cJBUu.js"),o=require("react"),C=require("classnames"),E=require("../utils-C9NL3q0j.js"),b=require("../file-preview-card-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-BW4cJBUu.js"),o=require("react"),C=require("classnames"),E=require("../utils-C9NL3q0j.js"),b=require("../file-preview-card-tovsOOzQ.js"),m=15,f=i=>{var{a11ySeeMoreText:M,onDelete:c,onCancel:l,onAction:a,onMenuAction:u,className:S,children:p}=i,g=A.__rest(i,["a11ySeeMoreText","onDelete","onCancel","onAction","onMenuAction","className","children"]);const[t,h]=o.useState(m),v=()=>{h(r=>r+m)},n=E.filterByType(p,b.EbayFilePreviewCard),d=n.length-t,w=n.slice(0,Math.min(t,n.length));return o.createElement("div",Object.assign({className:C("file-preview-card-group",S)},g),o.createElement("ul",null,w.map((r,s)=>o.cloneElement(r,{as:r.props.as||"li",onDelete:e=>c&&c(e,{index:s}),onCancel:e=>l&&l(e,{index:s}),onAction:e=>a&&a(e,{index:s}),onMenuAction:(e,y)=>u&&u(e,{index:s,menuActionEvent:y})})),d>0&&o.cloneElement(n[t],{seeMore:d,a11ySeeMoreText:M,onSeeMore:v,as:n[t].props.as||"li"})))};exports.EbayFilePreviewCardGroup=f;
|
package/ebay-item-tile/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../item-tile-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../item-tile-C8Y95yvJ.js");exports.EbayItemTile=e.EbayItemTile;exports.EbayItemTileAction=e.EbayItemTileAction;exports.EbayItemTileDescription=e.EbayItemTileDescription;exports.EbayItemTileSubtitle=e.EbayItemTileSubtitle;exports.EbayItemTileSupertitle=e.EbayItemTileSupertitle;exports.EbayItemTileTitle=e.EbayItemTileTitle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC,
|
|
2
|
-
export type EbayItemTileDescriptionProps =
|
|
1
|
+
import { FC, HTMLAttributes, ElementType } from "react";
|
|
2
|
+
export type EbayItemTileDescriptionProps = HTMLAttributes<HTMLElement> & {
|
|
3
3
|
as?: ElementType;
|
|
4
4
|
};
|
|
5
5
|
declare const EbayItemTileDescription: FC<EbayItemTileDescriptionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-tile-description.d.ts","sourceRoot":"","sources":["../../src/ebay-item-tile/item-tile-description.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"item-tile-description.d.ts","sourceRoot":"","sources":["../../src/ebay-item-tile/item-tile-description.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACrE,EAAE,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAE7D,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -6,6 +6,7 @@ export type EbayItemTileProps = ComponentProps<"div"> & {
|
|
|
6
6
|
layout?: ItemTileLayout;
|
|
7
7
|
href?: string;
|
|
8
8
|
file?: File | FilePreviewType;
|
|
9
|
+
a11yExternalLinkText?: string;
|
|
9
10
|
onAction?: EbayEventHandler<HTMLElement>;
|
|
10
11
|
};
|
|
11
12
|
declare const EbayItemTile: FC<EbayItemTileProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-tile.d.ts","sourceRoot":"","sources":["../../src/ebay-item-tile/item-tile.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAuB,MAAM,2BAA2B,CAAC;AAOjF,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAC9B,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"item-tile.d.ts","sourceRoot":"","sources":["../../src/ebay-item-tile/item-tile.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAuB,MAAM,2BAA2B,CAAC;AAOjF,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAyCvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-BW4cJBUu.js"),e=require("react"),y=require("classnames"),p=require("../utils-C9NL3q0j.js"),b=require("../item-tile-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-BW4cJBUu.js"),e=require("react"),y=require("classnames"),p=require("../utils-C9NL3q0j.js"),b=require("../item-tile-C8Y95yvJ.js"),d=t=>{var{layout:i,className:n,onAction:l,children:s}=t,o=m.__rest(t,["layout","className","onAction","children"]);const c=p.filterByType(s,b.EbayItemTile);return e.createElement("div",Object.assign({className:y("layout-grid item-tile-group",n,{"item-tile-group--list-view":i==="list"})},o),e.createElement("ul",null,c.map((a,r)=>e.createElement("li",{key:r},e.cloneElement(a,{layout:i,onAction:u=>l&&l(u,{index:r})})))))};exports.EbayItemTileGroup=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-line-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("../tslib.es6-BW4cJBUu.js"),n=require("react"),X=require("classnames"),P=require("@highcharts/react"),S=require("highcharts");require("highcharts/modules/accessibility");require("highcharts/modules/pattern-fill");const z=require("../legend-CY_MXova.js"),r=require("../shared-DrsztGqS.js"),q=require("../debounce-BQsYxxOL.js");function K({date:s,points:l,seriesLength:o}){const e=l.map(i=>{var t,a;if(i.tooltip)return r.escapeHtml(i.tooltip);if(o){const u=r.escapeHtml(i.series.name),d=r.escapeHtml((t=i.label)!==null&&t!==void 0?t:"");return`<div style="display:flex"><span>${u}</span><span style="margin-left:16px">${d}</span></div>`}return r.escapeHtml((a=i.label)!==null&&a!==void 0?a:"")}).join("");return`<b>${r.escapeHtml(s)}</b><br>${e}`}z.ebayLegend(S);const Z=`
|
|
2
|
+
.ebay-line-chart .highcharts-point { opacity: 0; }
|
|
3
|
+
.ebay-line-chart .ebay-line-chart__marker--visible { opacity: 1; }
|
|
4
|
+
.ebay-line-chart .highcharts-legend-item .highcharts-point { opacity: 1; stroke-width: 0; }
|
|
5
|
+
.ebay-line-chart .highcharts-legend-item .highcharts-graph { display: none; }
|
|
6
|
+
.dark .ebay-line-chart .highcharts-halo { fill-opacity: 0.8; }
|
|
7
|
+
`,T=6,w=["circle","square","triangle","triangle-down","diamond"];function G(s){return(Array.isArray(s)?s:[s]).map((o,e)=>Object.assign(Object.assign({},o),{marker:Object.assign(Object.assign({},o.marker),{symbol:w[e%w.length]})}))}function J(s,l){var o,e,i,t,a,u;const d=[r.lineChartPrimaryColor,r.lineChartSecondaryColor,r.lineChartTertiaryColor,r.lineChartQueternaryColor,r.lineChartQuinaryColor];if(l){const f=l.toLowerCase(),g=(i=(e=(o=s[0])===null||o===void 0?void 0:o.data[0])===null||e===void 0?void 0:e.y)!==null&&i!==void 0?i:0,v=(t=s[0])===null||t===void 0?void 0:t.data,_=(u=(a=v?.[v.length-1])===null||a===void 0?void 0:a.y)!==null&&u!==void 0?u:0,p=g<_;f==="positive"||f!=="negative"&&f!=="neutral"&&p?d[0]=r.trendPositiveColor:(f==="negative"||f!=="neutral"&&!p)&&(d[0]=r.trendNegativeColor)}return d}function U(s){const l=s();l&&(l.series.forEach(o=>{o.data.forEach(e=>{!e.onTick&&e.className!==null?e.update({className:void 0,marker:{enabled:!1}},!1,!1):e.onTick&&e.className===null&&e.update({className:"ebay-line-chart__marker--visible",onTick:e.onTick,marker:{enabled:!0,radius:T,lineColor:r.backgroundColor,lineWidth:2}},!1,!1)})}),l.redraw())}function V(s,l){const o=s();if(!o)return;const e=l.target.x;o.series.forEach(i=>{i.data.forEach(t=>{t.x===e?t.update({className:"ebay-line-chart__marker--visible",onTick:t.onTick,marker:{enabled:!0,radius:T,lineColor:r.backgroundColor,lineWidth:2}},!1,!1):!t.onTick&&t.className!==null&&t.update({className:void 0,onTick:t.onTick,marker:{enabled:!1}},!1,!1)})}),o.redraw()}function R(s,l,o,e){if(!s)return;const i=l();i&&(e.current=Object.keys(i.axes[0].ticks).map(t=>parseInt(t,10)),o.current!==e.current.length&&(o.current=e.current.length,i.series.forEach(t=>{t.data.forEach(a=>{a.className!==null&&a.update({className:void 0,onTick:!1,marker:{enabled:!1}},!1,!1)})}),i.series.forEach(t=>{t.data.forEach(a=>{e.current.forEach(u=>{u===a.x&&a.className===null&&a.update({className:"ebay-line-chart__marker--visible",onTick:!0,marker:{enabled:!0,radius:T,lineColor:r.backgroundColor,lineWidth:2}},!1,!1)})})}),i.redraw()))}const ee=s=>{var{title:l,description:o,series:e,xAxisLabelFormat:i,xAxisPositioner:t,yAxisLabels:a,yAxisPositioner:u,plotPoints:d,renderTooltipOutside:f=!0,trend:g,className:v}=s,_=Q.__rest(s,["title","description","series","xAxisLabelFormat","xAxisPositioner","yAxisLabels","yAxisPositioner","plotPoints","renderTooltipOutside","trend","className"]);const p=n.useRef(null),k=()=>{var c,h;return(h=(c=p.current)===null||c===void 0?void 0:c.chart)!==null&&h!==void 0?h:null},N=n.useRef(-1),L=n.useRef([]),b=n.useMemo(()=>G(e),[e]),H=n.useMemo(()=>J(b,g),[b,g]),A=n.useRef(q.debounce(()=>U(k),80)),j=n.useRef(q.debounce(c=>V(k,c),85));n.useEffect(()=>{R(d,k,N,L)},[]);const F=n.useMemo(()=>{var c,h,x;const M=b.length>1;let C=0,E=0;for(const m of b)for(const y of m.data)E=Math.max((c=y.y)!==null&&c!==void 0?c:0,E);const W={type:"datetime",labels:{format:i||"{value:%b %e}",align:"center",style:{color:r.labelsColor}},tickWidth:0,tickPositioner:t,crosshair:{dashStyle:"Solid"}},I={gridLineColor:r.gridColor,opposite:!0,labels:{format:a?void 0:"${text}",formatter:a?function(){var m;return this.isFirst&&(C=-1),C=C+1,(m=a[C])!==null&&m!==void 0?m:""}:void 0,style:{color:r.labelsColor}},max:E,title:{enabled:!1},offset:0,tickPositioner:u},Y={enabled:M,symbolRadius:6,symbolWidth:12,symbolHeight:12,itemStyle:{color:r.legendColor},itemHiddenStyle:{color:r.legendInactiveColor},itemHoverStyle:{color:r.legendHoverColor}},$={formatter:function(){var m,y,O;return K({date:S.dateFormat("%b %e, %Y",(O=(y=(m=this.points)===null||m===void 0?void 0:m[0])===null||y===void 0?void 0:y.x)!==null&&O!==void 0?O:0,!1),points:this.points,seriesLength:M})},useHTML:!0,backgroundColor:r.tooltipBackgroundColor,borderWidth:0,borderRadius:10,outside:f,shadow:!1,shared:!0,style:{filter:r.tooltipShadows,fontSize:"12px"}},B=(x=(h=b[0])===null||h===void 0?void 0:h.data[0])===null||x===void 0?void 0:x.x,D={line:{events:{mouseOut:A.current}},series:{description:o,lineWidth:3,pointStart:B,point:{events:{mouseOver:j.current,mouseOut:A.current}}}};return{chart:{type:"line",backgroundColor:r.backgroundColor,style:{fontFamily:r.chartFontFamily},events:{redraw:()=>R(d,k,N,L)}},colors:H,xAxis:W,yAxis:I,legend:Y,tooltip:$,plotOptions:D,credits:{enabled:!1}}},[b,H,i,t,a,u,o,f,d]);return n.createElement(n.Fragment,null,n.createElement("style",null,Z),n.createElement("div",Object.assign({},_,{className:X("ebay-line-chart",v)}),n.createElement(P.Chart,{ref:p,highcharts:S,title:l,options:F},b.map((c,h)=>n.createElement(P.Series,{key:c.name||h,type:"line",data:c.data,options:{type:"line",name:c.name}})))))};exports.EbayLineChart=ee;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type Highcharts from "highcharts";
|
|
2
|
+
export type LineChartPoint = Highcharts.Point & {
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
interface LineChartTooltipOptions {
|
|
7
|
+
date: string;
|
|
8
|
+
points: LineChartPoint[];
|
|
9
|
+
seriesLength: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function lineChartTooltipHtml({ date, points, seriesLength }: LineChartTooltipOptions): string;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=line-chart-tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-chart-tooltip.d.ts","sourceRoot":"","sources":["../../src/ebay-line-chart/line-chart-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAGzC,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAErF,UAAU,uBAAuB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,uBAAuB,GAAG,MAAM,CAgBpG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-chart.d.ts","sourceRoot":"","sources":["../../src/ebay-line-chart/line-chart.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAgD,MAAM,OAAO,CAAC;AA0BhF,OAAO,KAAK,EAAE,kBAAkB,EAAuB,MAAM,SAAS,CAAC;AAkKvE,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4KzC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import type Highcharts from "highcharts";
|
|
3
|
+
export interface LineChartSeriesItem {
|
|
4
|
+
data: Highcharts.PointOptionsObject[];
|
|
5
|
+
type?: "line";
|
|
6
|
+
marker?: Highcharts.PointMarkerOptionsObject;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
export type EbayLineChartProps = Omit<ComponentProps<"div">, "title"> & {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
series: LineChartSeriesItem | LineChartSeriesItem[];
|
|
13
|
+
xAxisLabelFormat?: string;
|
|
14
|
+
xAxisPositioner?: Highcharts.XAxisOptions["tickPositioner"];
|
|
15
|
+
yAxisLabels?: string[];
|
|
16
|
+
yAxisPositioner?: Highcharts.YAxisOptions["tickPositioner"];
|
|
17
|
+
plotPoints?: boolean;
|
|
18
|
+
renderTooltipOutside?: boolean;
|
|
19
|
+
trend?: "positive" | "negative" | "neutral";
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-line-chart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,CAAC,wBAAwB,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,EAAE,CAAC;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;CAC/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const O=require("./tslib.es6-BW4cJBUu.js"),e=require("react"),C=require("classnames"),j=require("./utils-C9NL3q0j.js"),g=require("./icon-button-E_6JKTh3.js"),L=require("./menu-button-BPwZtkuk.js"),x=require("./menu-A2rDgu5k.js"),U=require("./icons/ebay-icon-close-16/index.js"),R=require("./icons/ebay-icon-delete-16/index.js"),A=require("./progress-spinner-CYHN2qj2.js"),D=require("./icons/ebay-icon-file-24/index.js"),W=require("./icons/ebay-icon-play-16/index.js"),z=({status:t,menuActions:n,onMenuAction:r,deleteText:o,onCancel:E,onDelete:a,onAction:c,a11yCancelUploadText:y,a11yMenuButtonText:m,action:l})=>{const b=(i,u)=>{var d;if(u){const s=(d=u.checked)===null||d===void 0?void 0:d[0],p=n&&s!==void 0&&s in n?n[s].event:null;p&&r?r(i,Object.assign(Object.assign({},u),{eventName:p})):a&&a(i)}};return t==="uploading"?e.createElement(g.EbayIconButton,{"aria-label":y,onClick:E,className:"file-preview-card__action",icon:e.createElement(U.EbayIconClose16,null)}):n?.length?e.createElement(e.Fragment,null,e.createElement(L.EbayMenuButton,{variant:"overflow",className:"file-preview-card__action",a11yText:m,onSelect:b},n.map(i=>e.createElement(x.EbayMenuItem,{value:i.event,key:i.label},i.label)),e.createElement(x.EbayMenuItem,{key:"delete",value:"delete"},o))):l?.props&&l.props.icon&&l.props["aria-label"]?e.createElement(g.EbayIconButton,Object.assign({onClick:c,className:C("file-preview-card__action",l.props.className)},l.props)):o?e.createElement(g.EbayIconButton,{"aria-label":o,className:"file-preview-card__action",icon:e.createElement(R.EbayIconDelete16,null),onClick:a}):e.createElement(e.Fragment,null)},F=({file:t,status:n,seeMore:r})=>{if(n==="uploading")return e.createElement(A.EbayProgressSpinner,{className:"file-preview-card__asset"});switch(t?.type){case"video":return e.createElement("video",{className:"file-preview-card__asset",src:t.src});case"image":return e.createElement("img",{className:C("file-preview-card__asset",{"file-preview-card__asset--fade":r&&r>0}),src:t?.src,alt:t?.name});default:return e.createElement(D.EbayIconFile24,{className:"file-preview-card__asset"})}},G=({file:t,infoText:n})=>t&&t.type!=="image"?e.createElement("div",{className:"file-preview-card__info"},t.type==="video"&&e.createElement(W.EbayIconPlay16,{className:"file-preview-card__video-icon"}),n||t.name.substring(t.name.lastIndexOf(".")+1).toUpperCase()):e.createElement(e.Fragment,null),I=()=>null,H=t=>{var{a11yCancelUploadText:n,a11yExternalLinkText:r,status:o,as:E="div",file:a,seeMore:c,deleteText:y,footerTitle:m,footerSubtitle:l,a11ySeeMoreText:b,menuActions:i,a11yMenuButtonText:u,infoText:d,href:s,onCancel:p,onDelete:M,onMenuAction:T,onSeeMore:q,onAction:h,className:k,children:S}=t,B=O.__rest(t,["a11yCancelUploadText","a11yExternalLinkText","status","as","file","seeMore","deleteText","footerTitle","footerSubtitle","a11ySeeMoreText","menuActions","a11yMenuButtonText","infoText","href","onCancel","onDelete","onMenuAction","onSeeMore","onAction","className","children"]);const P=j.findComponent(S,I),f=e.useMemo(()=>{var _,w;if(!a)return;let N=a,v;return!((_=a?.type)===null||_===void 0)&&_.startsWith("image")?v="image":!((w=a?.type)===null||w===void 0)&&w.startsWith("video")&&(v="video"),a instanceof File&&(N={name:a.name,type:v,src:v?URL.createObjectURL(a):void 0}),N.type=v,N},[a]);return e.createElement(E,Object.assign({className:C("file-preview-card",k)},B),e.createElement("div",{className:"file-preview-card__body"},s?e.createElement("a",{href:s,target:r?"_blank":void 0,rel:r?"noopener noreferrer":void 0},e.createElement(F,{file:f,status:o,seeMore:c}),r&&e.createElement("span",{className:"clipped"}," - ",r)):e.createElement(F,{file:f,status:o,seeMore:c}),c&&c>0?e.createElement("button",{type:"button",className:"file-preview-card__see-more",onClick:q,"aria-label":b},e.createElement("span",null,"+",c)):e.createElement(z,{a11yCancelUploadText:n,a11yMenuButtonText:u,status:o,menuActions:i,onMenuAction:T,deleteText:y,onCancel:p,onDelete:M,onAction:h,action:P}),e.createElement(G,{file:f,infoText:d})),m&&e.createElement("div",{className:"file-preview-card__footer"},e.createElement("span",null,m),l&&e.createElement("span",null,l)))};exports.EbayFilePreviewCard=H;exports.EbayFilePreviewCardAction=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./tslib.es6-BW4cJBUu.js"),i=require("react"),N=require("classnames"),s=require("./utils-C9NL3q0j.js"),m=require("./file-preview-card-tovsOOzQ.js"),o=()=>null,E=e=>{var{children:l}=e,t=a.__rest(e,["children"]);return i.createElement("div",Object.assign({className:"item-tile__section-primary"},t),l)},d=e=>{var{href:l,children:t}=e,n=a.__rest(e,["href","children"]);return i.createElement("a",Object.assign({href:l,className:"item-tile__title"},n),t)},b=e=>{var{children:l}=e,t=a.__rest(e,["children"]);return i.createElement("div",Object.assign({className:"item-tile__subtitle"},t),l)},u=e=>{var{as:l="p",children:t}=e,n=a.__rest(e,["as","children"]);return i.createElement(l,Object.assign({},n),t)},g=({title:e,subtitle:l,descriptions:t})=>i.createElement(i.Fragment,null,e||l?i.createElement("div",{className:"item-tile__section-secondary"},e,l):null,t?.length?i.createElement("div",{className:"item-tile__section-tertiary"},t):null),C=e=>{var{file:l,href:t,layout:n,className:y,a11yExternalLinkText:_,onAction:v,children:r}=e,T=a.__rest(e,["file","href","layout","className","a11yExternalLinkText","onAction","children"]);const h=s.findComponent(r,E),p=s.findComponent(r,d),f=s.findComponent(r,b),c=s.findComponent(r,o),I=s.filterByType(r,u);return i.createElement("div",Object.assign({className:N(y,"item-tile",{"item-tile--list-view":n==="list"})},T),l&&i.createElement("div",{className:"item-tile__header"},i.createElement(m.EbayFilePreviewCard,{file:l,href:t,a11yExternalLinkText:_,onAction:v},c&&i.createElement(m.EbayFilePreviewCardAction,Object.assign({},c.props)))),i.createElement("div",{className:"item-tile__body"},h,i.createElement(g,{title:p,subtitle:f,descriptions:I})))};exports.EbayItemTile=C;exports.EbayItemTileAction=o;exports.EbayItemTileDescription=u;exports.EbayItemTileSubtitle=b;exports.EbayItemTileSupertitle=E;exports.EbayItemTileTitle=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(e){e.wrap(e.Legend.prototype,"colorizeItem",function(l,o,d){var r;const t=e.pick(o.borderWidth,1),n=-(t%2)/2,a=(r=o.options)===null||r===void 0?void 0:r.borderColor;l.apply(this,[].slice.call(arguments,1)),o.legendSymbol&&d&&o.legendSymbol.attr({"stroke-width":t,translateX:n,translateY:n,stroke:a})})}exports.ebayLegend=i;
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function y(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const g='"Market Sans", Arial, sans-serif',p="var(--color-background-primary)",u="var(--color-data-viz-line-chart-primary)",k="var(--color-data-viz-line-chart-secondary)",b="var(--color-data-viz-line-chart-tertiary)",m="var(--color-data-viz-line-chart-queternary)",z="var(--color-data-viz-line-chart-quinary)",S="var(--color-data-viz-trend-positive)",f="var(--color-data-viz-trend-negative)",w="var(--color-data-viz-grid)",M="var(--color-foreground-secondary)",Q="var(--color-foreground-primary)",q="var(--color-data-viz-legend-inactive)",T="var(--color-data-viz-legend-hover)",x="var(--color-background-primary)",B="drop-shadow(0 2px 7px var(--color-data-viz-tooltip-shadow-primary)) drop-shadow(0 5px 7px var(--color-data-viz-tooltip-shadow-secondary))",l="var(--color-data-viz-chart-primary)",e="var(--color-data-viz-chart-secondary)",P="var(--color-data-viz-chart-tertiary-background)",c="var(--color-data-viz-chart-tertiary-stroke)",F="var(--color-data-viz-chart-quaternary-background)",n="var(--color-data-viz-chart-quaternary-stroke)",h="var(--color-data-viz-chart-quinary-background)",H="var(--color-data-viz-chart-quinary-stroke)",v={pattern:{path:{d:"M0 0 L0 3"},width:4.5,height:3,backgroundColor:P,color:c,patternTransform:"rotate(-60)"}},s={pattern:{path:{d:"M0 0 L3 0"},width:3,height:5,backgroundColor:F,color:n}},E=[l,e,v,s,h],C=[l,e,c,n,n],i=[{lineColor:l,borderColor:l},{lineColor:e,borderColor:e},{lineColor:v,borderColor:c},{lineColor:s,borderColor:n},{lineColor:h,borderColor:H}];function I(r){return r.data.forEach((a,t)=>{const d=i[t%i.length];a.lineColor=d.lineColor,a.borderColor=d.borderColor}),i.map(a=>a.lineColor)}function D(r){r.forEach((o,a)=>{o.zIndex=r.length-a,o.marker={symbol:"circle",lineWidth:1,fillColor:"black",lineColor:"white",states:{hover:{animation:{duration:0},radius:4,lineWidth:2},normal:{animation:!1}}}})}function L(r){for(let o=0;o<r.length;o++){const a=C[o%C.length];if(r[o].type==="bar"||r[o].type==="column"){const t=r[o];t.borderColor=a,t.color=a}else{const t=r[o];t.lineColor=a,t.fillOpacity=1}}}exports.backgroundColor=p;exports.chartFontFamily=g;exports.colorMapping=E;exports.escapeHtml=y;exports.gridColor=w;exports.labelsColor=M;exports.legendColor=Q;exports.legendHoverColor=T;exports.legendInactiveColor=q;exports.lineChartPrimaryColor=u;exports.lineChartQueternaryColor=m;exports.lineChartQuinaryColor=z;exports.lineChartSecondaryColor=k;exports.lineChartTertiaryColor=b;exports.setDonutColors=I;exports.setSeriesColors=L;exports.setSeriesMarkerStyles=D;exports.tooltipBackgroundColor=x;exports.tooltipShadows=B;exports.trendNegativeColor=f;exports.trendPositiveColor=S;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const k=require("./tslib.es6-BW4cJBUu.js"),e=require("react"),C=require("classnames"),O=require("./utils-C9NL3q0j.js"),g=require("./icon-button-E_6JKTh3.js"),j=require("./menu-button-BPwZtkuk.js"),F=require("./menu-A2rDgu5k.js"),U=require("./icons/ebay-icon-close-16/index.js"),L=require("./icons/ebay-icon-delete-16/index.js"),R=require("./progress-spinner-CYHN2qj2.js"),A=require("./icons/ebay-icon-file-24/index.js"),D=require("./icons/ebay-icon-play-16/index.js"),W=({status:t,menuActions:n,onMenuAction:r,deleteText:s,onCancel:a,onDelete:l,onAction:b,a11yCancelUploadText:m,a11yMenuButtonText:E,action:i})=>{const y=(c,u)=>{var o;if(u){const d=(o=u.checked)===null||o===void 0?void 0:o[0],p=n&&d!==void 0&&d in n?n[d].event:null;p&&r?r(c,Object.assign(Object.assign({},u),{eventName:p})):l&&l(c)}};return t==="uploading"?e.createElement(g.EbayIconButton,{"aria-label":m,onClick:a,className:"file-preview-card__action",icon:e.createElement(U.EbayIconClose16,null)}):n?.length?e.createElement(e.Fragment,null,e.createElement(j.EbayMenuButton,{variant:"overflow",className:"file-preview-card__action",a11yText:E,onSelect:y},n.map(c=>e.createElement(F.EbayMenuItem,{value:c.event,key:c.label},c.label)),e.createElement(F.EbayMenuItem,{key:"delete",value:"delete"},s))):i?.props&&i.props.icon&&i.props["aria-label"]?e.createElement(g.EbayIconButton,Object.assign({onClick:b,className:C("file-preview-card__action",i.props.className)},i.props)):s?e.createElement(g.EbayIconButton,{"aria-label":s,className:"file-preview-card__action",icon:e.createElement(L.EbayIconDelete16,null),onClick:l}):e.createElement(e.Fragment,null)},I=({file:t,status:n,seeMore:r})=>{if(n==="uploading")return e.createElement(R.EbayProgressSpinner,{className:"file-preview-card__asset"});switch(t?.type){case"video":return e.createElement("video",{className:"file-preview-card__asset",src:t.src});case"image":return e.createElement("img",{className:C("file-preview-card__asset",{"file-preview-card__asset--fade":r&&r>0}),src:t?.src,alt:t?.name});default:return e.createElement(A.EbayIconFile24,{className:"file-preview-card__asset"})}},z=({file:t,infoText:n})=>t&&t.type!=="image"?e.createElement("div",{className:"file-preview-card__info"},t.type==="video"&&e.createElement(D.EbayIconPlay16,{className:"file-preview-card__video-icon"}),n||t.name.substring(t.name.lastIndexOf(".")+1).toUpperCase()):e.createElement(e.Fragment,null),M=()=>null,G=t=>{var{a11yCancelUploadText:n,status:r,as:s="div",file:a,seeMore:l,deleteText:b,footerTitle:m,footerSubtitle:E,a11ySeeMoreText:i,menuActions:y,a11yMenuButtonText:c,infoText:u,href:o,onCancel:d,onDelete:p,onMenuAction:q,onSeeMore:x,onAction:T,className:h,children:S}=t,B=k.__rest(t,["a11yCancelUploadText","status","as","file","seeMore","deleteText","footerTitle","footerSubtitle","a11ySeeMoreText","menuActions","a11yMenuButtonText","infoText","href","onCancel","onDelete","onMenuAction","onSeeMore","onAction","className","children"]);const P=O.findComponent(S,M),f=e.useMemo(()=>{var _,w;if(!a)return;let N=a,v;return!((_=a?.type)===null||_===void 0)&&_.startsWith("image")?v="image":!((w=a?.type)===null||w===void 0)&&w.startsWith("video")&&(v="video"),a instanceof File&&(N={name:a.name,type:v,src:v?URL.createObjectURL(a):void 0}),N.type=v,N},[a]);return e.createElement(s,Object.assign({className:C("file-preview-card",h)},B),e.createElement("div",{className:"file-preview-card__body"},o?e.createElement("a",{href:o},e.createElement(I,{file:f,status:r,seeMore:l})):e.createElement(I,{file:f,status:r,seeMore:l}),l&&l>0?e.createElement("button",{type:"button",className:"file-preview-card__see-more",onClick:x,"aria-label":i},e.createElement("span",null,"+",l)):e.createElement(W,{a11yCancelUploadText:n,a11yMenuButtonText:c,status:r,menuActions:y,onMenuAction:q,deleteText:b,onCancel:d,onDelete:p,onAction:T,action:P}),e.createElement(z,{file:f,infoText:u})),m&&e.createElement("div",{className:"file-preview-card__footer"},e.createElement("span",null,m),E&&e.createElement("span",null,E)))};exports.EbayFilePreviewCard=G;exports.EbayFilePreviewCardAction=M;
|
package/item-tile-C57SjnXt.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./tslib.es6-BW4cJBUu.js"),i=require("react"),I=require("classnames"),s=require("./utils-C9NL3q0j.js"),m=require("./file-preview-card-Du_rM7X1.js"),o=()=>null,E=e=>{var{children:l}=e,t=a.__rest(e,["children"]);return i.createElement("div",Object.assign({className:"item-tile__section-primary"},t),l)},d=e=>{var{href:l,children:t}=e,n=a.__rest(e,["href","children"]);return i.createElement("a",Object.assign({href:l,className:"item-tile__title"},n),t)},b=e=>{var{children:l}=e,t=a.__rest(e,["children"]);return i.createElement("div",Object.assign({className:"item-tile__subtitle"},t),l)},u=e=>{var{as:l="p",children:t}=e,n=a.__rest(e,["as","children"]);return i.createElement(l,Object.assign({},n),t)},N=({title:e,subtitle:l,descriptions:t})=>i.createElement(i.Fragment,null,e||l?i.createElement("div",{className:"item-tile__section-secondary"},e,l):null,t?.length?i.createElement("div",{className:"item-tile__section-tertiary"},t):null),g=e=>{var{file:l,href:t,layout:n,className:y,onAction:_,children:r}=e,v=a.__rest(e,["file","href","layout","className","onAction","children"]);const h=s.findComponent(r,E),T=s.findComponent(r,d),p=s.findComponent(r,b),c=s.findComponent(r,o),f=s.filterByType(r,u);return i.createElement("div",Object.assign({className:I(y,"item-tile",{"item-tile--list-view":n==="list"})},v),l&&i.createElement("div",{className:"item-tile__header"},i.createElement(m.EbayFilePreviewCard,{file:l,href:t,onAction:_},c&&i.createElement(m.EbayFilePreviewCardAction,Object.assign({},c.props)))),i.createElement("div",{className:"item-tile__body"},h,i.createElement(N,{title:T,subtitle:p,descriptions:f})))};exports.EbayItemTile=g;exports.EbayItemTileAction=o;exports.EbayItemTileDescription=u;exports.EbayItemTileSubtitle=b;exports.EbayItemTileSupertitle=E;exports.EbayItemTileTitle=d;
|