@papernote/ui 1.11.3 → 1.11.4
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/components/FunnelChart.d.ts.map +1 -1
- package/dist/index.esm.js +39 -47
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +39 -47
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -0
- package/package.json +1 -1
- package/src/components/FunnelChart.tsx +14 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunnelChart.d.ts","sourceRoot":"","sources":["../../src/components/FunnelChart.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gCAAgC;IAChC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoBD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAM,EACN,MAAY,EACZ,cAAqB,EACrB,YAAY,EACZ,SAAc,GACf,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"FunnelChart.d.ts","sourceRoot":"","sources":["../../src/components/FunnelChart.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gCAAgC;IAChC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoBD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAM,EACN,MAAY,EACZ,cAAqB,EACrB,YAAY,EACZ,SAAc,GACf,EAAE,gBAAgB,kDAwGlB"}
|
package/dist/index.esm.js
CHANGED
|
@@ -12310,9 +12310,9 @@ function FunnelChart({ stages, height = 300, showConversion = true, onStageClick
|
|
|
12310
12310
|
return null;
|
|
12311
12311
|
const maxCount = Math.max(...stages.map(s => s.count), 1);
|
|
12312
12312
|
const stageHeight = height / stages.length;
|
|
12313
|
-
const svgWidth =
|
|
12313
|
+
const svgWidth = 450;
|
|
12314
12314
|
const padding = 20;
|
|
12315
|
-
const leftLabelSpace =
|
|
12315
|
+
const leftLabelSpace = 50; // Space for conversion rate labels on left
|
|
12316
12316
|
const rightLabelSpace = 160; // Space for stage name + value labels on right
|
|
12317
12317
|
const funnelWidth = svgWidth - padding * 2 - leftLabelSpace - rightLabelSpace;
|
|
12318
12318
|
return (jsx("div", { className: className, children: jsx("svg", { width: "100%", viewBox: `0 0 ${svgWidth} ${height}`, preserveAspectRatio: "xMidYMid meet", children: stages.map((stage, idx) => {
|
|
@@ -12335,7 +12335,7 @@ function FunnelChart({ stages, height = 300, showConversion = true, onStageClick
|
|
|
12335
12335
|
L ${centerX - bottomWidth / 2} ${y + stageHeight - 2}
|
|
12336
12336
|
Z
|
|
12337
12337
|
`;
|
|
12338
|
-
return (jsxs("g", { onClick: () => onStageClick?.(stage.name), style: onStageClick ? { cursor: 'pointer' } : undefined, role: onStageClick ? 'button' : undefined, children: [jsx("path", { d: path, fill: color, opacity: 0.85, className: "transition-opacity hover:opacity-100" }), jsx("text", { x: centerX, y: y + stageHeight / 2 + 1, textAnchor: "middle", dominantBaseline: "middle", className: "fill-white text-xs font-bold", style: { fontSize: '12px' }, children: stage.count.toLocaleString() }), jsx("text", { x: centerX + funnelWidth / 2 + 12, y: y + stageHeight / 2 - 6, className: "fill-ink-700 dark:fill-ink-300", style: { fontSize: '11px', fontWeight: 500 }, children: stage.name }), stage.value && (jsx("text", { x: centerX + funnelWidth / 2 + 12, y: y + stageHeight / 2 + 8, className: "fill-ink-400", style: { fontSize: '10px' }, children: stage.value })), showConversion && conversionRate !== null && (jsxs("text", { x: centerX - funnelWidth / 2 -
|
|
12338
|
+
return (jsxs("g", { onClick: () => onStageClick?.(stage.name), style: onStageClick ? { cursor: 'pointer' } : undefined, role: onStageClick ? 'button' : undefined, children: [jsx("path", { d: path, fill: color, opacity: 0.85, className: "transition-opacity hover:opacity-100" }), jsx("text", { x: centerX, y: y + stageHeight / 2 + 1, textAnchor: "middle", dominantBaseline: "middle", className: "fill-white text-xs font-bold", style: { fontSize: '12px' }, children: stage.count.toLocaleString() }), jsx("text", { x: centerX + funnelWidth / 2 + 12, y: y + stageHeight / 2 - 6, className: "fill-ink-700 dark:fill-ink-300", style: { fontSize: '11px', fontWeight: 500 }, children: stage.name }), stage.value && (jsx("text", { x: centerX + funnelWidth / 2 + 12, y: y + stageHeight / 2 + 8, className: "fill-ink-400", style: { fontSize: '10px' }, children: stage.value })), showConversion && conversionRate !== null && (jsx("g", { children: jsxs("text", { x: centerX - funnelWidth / 2 - 16, y: y + 4, textAnchor: "end", className: "fill-ink-500", style: { fontSize: '10px', fontWeight: 500 }, children: ["\u2193 ", conversionRate, "%"] }) }))] }, stage.name));
|
|
12339
12339
|
}) }) }));
|
|
12340
12340
|
}
|
|
12341
12341
|
|
|
@@ -15672,52 +15672,44 @@ function getAugmentedNamespace(n) {
|
|
|
15672
15672
|
* (A1, A1:C5, ...)
|
|
15673
15673
|
*/
|
|
15674
15674
|
|
|
15675
|
-
|
|
15676
|
-
var hasRequiredCollection;
|
|
15677
|
-
|
|
15678
|
-
function requireCollection () {
|
|
15679
|
-
if (hasRequiredCollection) return collection;
|
|
15680
|
-
hasRequiredCollection = 1;
|
|
15681
|
-
class Collection {
|
|
15675
|
+
let Collection$3 = class Collection {
|
|
15682
15676
|
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15677
|
+
constructor(data, refs) {
|
|
15678
|
+
if (data == null && refs == null) {
|
|
15679
|
+
this._data = [];
|
|
15680
|
+
this._refs = [];
|
|
15681
|
+
} else {
|
|
15682
|
+
if (data.length !== refs.length)
|
|
15683
|
+
throw Error('Collection: data length should match references length.');
|
|
15684
|
+
this._data = data;
|
|
15685
|
+
this._refs = refs;
|
|
15686
|
+
}
|
|
15687
|
+
}
|
|
15694
15688
|
|
|
15695
|
-
|
|
15696
|
-
|
|
15697
|
-
|
|
15689
|
+
get data() {
|
|
15690
|
+
return this._data;
|
|
15691
|
+
}
|
|
15698
15692
|
|
|
15699
|
-
|
|
15700
|
-
|
|
15701
|
-
|
|
15693
|
+
get refs() {
|
|
15694
|
+
return this._refs;
|
|
15695
|
+
}
|
|
15702
15696
|
|
|
15703
|
-
|
|
15704
|
-
|
|
15705
|
-
|
|
15697
|
+
get length() {
|
|
15698
|
+
return this._data.length;
|
|
15699
|
+
}
|
|
15706
15700
|
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
|
|
15712
|
-
|
|
15713
|
-
|
|
15714
|
-
|
|
15715
|
-
|
|
15716
|
-
|
|
15701
|
+
/**
|
|
15702
|
+
* Add data and references to this collection.
|
|
15703
|
+
* @param {{}} obj - data
|
|
15704
|
+
* @param {{}} ref - reference
|
|
15705
|
+
*/
|
|
15706
|
+
add(obj, ref) {
|
|
15707
|
+
this._data.push(obj);
|
|
15708
|
+
this._refs.push(ref);
|
|
15709
|
+
}
|
|
15710
|
+
};
|
|
15717
15711
|
|
|
15718
|
-
|
|
15719
|
-
return collection;
|
|
15720
|
-
}
|
|
15712
|
+
var collection = Collection$3;
|
|
15721
15713
|
|
|
15722
15714
|
var helpers;
|
|
15723
15715
|
var hasRequiredHelpers;
|
|
@@ -15726,7 +15718,7 @@ function requireHelpers () {
|
|
|
15726
15718
|
if (hasRequiredHelpers) return helpers;
|
|
15727
15719
|
hasRequiredHelpers = 1;
|
|
15728
15720
|
const FormulaError = requireError();
|
|
15729
|
-
const Collection =
|
|
15721
|
+
const Collection = collection;
|
|
15730
15722
|
|
|
15731
15723
|
const Types = {
|
|
15732
15724
|
NUMBER: 0,
|
|
@@ -25380,7 +25372,7 @@ var engineering = EngineeringFunctions;
|
|
|
25380
25372
|
|
|
25381
25373
|
const FormulaError$b = requireError();
|
|
25382
25374
|
const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
|
|
25383
|
-
const Collection$2 =
|
|
25375
|
+
const Collection$2 = collection;
|
|
25384
25376
|
const H$5 = FormulaHelpers$8;
|
|
25385
25377
|
|
|
25386
25378
|
const ReferenceFunctions$1 = {
|
|
@@ -37008,7 +37000,7 @@ var parsing = {
|
|
|
37008
37000
|
const FormulaError$4 = requireError();
|
|
37009
37001
|
const {Address: Address$1} = requireHelpers();
|
|
37010
37002
|
const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
|
|
37011
|
-
const Collection$1 =
|
|
37003
|
+
const Collection$1 = collection;
|
|
37012
37004
|
const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
|
|
37013
37005
|
const {NotAllInputParsedException} = require$$4;
|
|
37014
37006
|
|
|
@@ -37770,7 +37762,7 @@ var hooks$1 = {
|
|
|
37770
37762
|
const FormulaError$2 = requireError();
|
|
37771
37763
|
const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
|
|
37772
37764
|
const {Prefix, Postfix, Infix, Operators} = operators;
|
|
37773
|
-
const Collection =
|
|
37765
|
+
const Collection = collection;
|
|
37774
37766
|
const MAX_ROW = 1048576, MAX_COLUMN = 16384;
|
|
37775
37767
|
|
|
37776
37768
|
let Utils$1 = class Utils {
|