@papernote/ui 1.10.8 → 1.10.10
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/Progress.d.ts +5 -1
- package/dist/components/Progress.d.ts.map +1 -1
- package/dist/components/SwipeableListItem.d.ts +1 -1
- package/dist/components/SwipeableListItem.d.ts.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.esm.js +109 -61
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +109 -61
- package/dist/index.js.map +1 -1
- package/dist/styles.css +13 -5
- package/package.json +1 -1
- package/src/components/Progress.stories.tsx +116 -0
- package/src/components/Progress.tsx +153 -26
- package/src/components/SwipeableListItem.tsx +2 -2
|
@@ -15,8 +15,12 @@ export interface ProgressProps {
|
|
|
15
15
|
striped?: boolean;
|
|
16
16
|
/** Animated stripes (requires striped=true) */
|
|
17
17
|
animated?: boolean;
|
|
18
|
+
/** Milestone markers (array of values 0-100) */
|
|
19
|
+
milestones?: number[];
|
|
20
|
+
/** Show labels at milestone markers */
|
|
21
|
+
showMilestoneLabels?: boolean;
|
|
18
22
|
/** Class name for container */
|
|
19
23
|
className?: string;
|
|
20
24
|
}
|
|
21
|
-
export default function Progress({ value, variant, size, color, showLabel, label, striped, animated, className, }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default function Progress({ value, variant, size, color, showLabel, label, striped, animated, milestones, showMilestoneLabels, className, }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
22
26
|
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../src/components/Progress.tsx"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACzC,mBAAmB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ACtB,uCAAuC;IACvC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAK,EACL,OAAkB,EAClB,IAAW,EACX,KAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,OAAe,EACf,QAAgB,EAChB,UAAU,EACV,mBAA2B,EAC3B,SAAc,GACf,EAAE,aAAa,2CAuPf"}
|
|
@@ -27,7 +27,7 @@ export interface SwipeableListItemProps {
|
|
|
27
27
|
rightActions?: SwipeListAction[];
|
|
28
28
|
/** Width per action button in pixels (default: 72) */
|
|
29
29
|
actionWidth?: number;
|
|
30
|
-
/** Enable full swipe to trigger first action (default:
|
|
30
|
+
/** Enable full swipe to trigger first action (default: true) */
|
|
31
31
|
fullSwipe?: boolean;
|
|
32
32
|
/** Full swipe threshold as percentage of container width (default: 0.5) */
|
|
33
33
|
fullSwipeThreshold?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeableListItem.d.ts","sourceRoot":"","sources":["../../src/components/SwipeableListItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC9E,6BAA6B;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,sBAA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,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9D;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,WAAgB,EAChB,YAAiB,EACjB,WAAgB,EAChB,SAAgB,EAChB,kBAAwB,EACxB,QAAgB,EAChB,SAAc,EACd,aAAa,GACd,EAAE,sBAAsB,2CAgexB;AAED,eAAe,iBAAiB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3032,7 +3032,7 @@ interface SwipeableListItemProps {
|
|
|
3032
3032
|
rightActions?: SwipeListAction[];
|
|
3033
3033
|
/** Width per action button in pixels (default: 72) */
|
|
3034
3034
|
actionWidth?: number;
|
|
3035
|
-
/** Enable full swipe to trigger first action (default:
|
|
3035
|
+
/** Enable full swipe to trigger first action (default: true) */
|
|
3036
3036
|
fullSwipe?: boolean;
|
|
3037
3037
|
/** Full swipe threshold as percentage of container width (default: 0.5) */
|
|
3038
3038
|
fullSwipeThreshold?: number;
|
|
@@ -3550,10 +3550,14 @@ interface ProgressProps {
|
|
|
3550
3550
|
striped?: boolean;
|
|
3551
3551
|
/** Animated stripes (requires striped=true) */
|
|
3552
3552
|
animated?: boolean;
|
|
3553
|
+
/** Milestone markers (array of values 0-100) */
|
|
3554
|
+
milestones?: number[];
|
|
3555
|
+
/** Show labels at milestone markers */
|
|
3556
|
+
showMilestoneLabels?: boolean;
|
|
3553
3557
|
/** Class name for container */
|
|
3554
3558
|
className?: string;
|
|
3555
3559
|
}
|
|
3556
|
-
declare function Progress({ value, variant, size, color, showLabel, label, striped, animated, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
3560
|
+
declare function Progress({ value, variant, size, color, showLabel, label, striped, animated, milestones, showMilestoneLabels, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
3557
3561
|
|
|
3558
3562
|
interface AccordionItem {
|
|
3559
3563
|
id: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -8155,7 +8155,7 @@ const getColorClasses = (color) => {
|
|
|
8155
8155
|
* </SwipeableListItem>
|
|
8156
8156
|
* ```
|
|
8157
8157
|
*/
|
|
8158
|
-
function SwipeableListItem({ children, leftActions = [], rightActions = [], actionWidth = 72, fullSwipe =
|
|
8158
|
+
function SwipeableListItem({ children, leftActions = [], rightActions = [], actionWidth = 72, fullSwipe = true, fullSwipeThreshold = 0.5, disabled = false, className = '', onSwipeChange, }) {
|
|
8159
8159
|
const containerRef = useRef(null);
|
|
8160
8160
|
const [isDragging, setIsDragging] = useState(false);
|
|
8161
8161
|
const [offsetX, setOffsetX] = useState(0);
|
|
@@ -9486,7 +9486,7 @@ function ComingSoon({ title, description, icon, features = [], estimatedDate })
|
|
|
9486
9486
|
return (jsx("div", { className: "p-6 max-w-4xl mx-auto", children: jsxs("div", { className: "bg-paper-50 dark:bg-paper-800 rounded-lg shadow-sm border border-paper-200 dark:border-paper-700 p-8", children: [jsxs("div", { className: "flex items-start gap-4 mb-6", children: [jsx("div", { className: "p-3 bg-primary-100 dark:bg-primary-900 rounded-lg", children: icon || jsx(FileText, { className: "h-8 w-8 text-primary-600 dark:text-primary-400" }) }), jsxs("div", { className: "flex-1", children: [jsx("h1", { className: "text-2xl font-bold text-ink-900 dark:text-ink-100 mb-2", children: title }), jsx("p", { className: "text-base text-ink-600 dark:text-ink-400", children: description })] })] }), jsx("div", { className: "mb-6", children: jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-2 bg-warning-100 dark:bg-warning-900 rounded-full", children: [jsx(AlertCircle, { className: "h-4 w-4 text-warning-700 dark:text-warning-300" }), jsx("span", { className: "text-sm font-medium text-warning-700 dark:text-warning-300", children: "Coming Soon - Under Development" })] }) }), features.length > 0 && (jsxs("div", { className: "mb-6", children: [jsxs("h2", { className: "text-lg font-semibold text-ink-900 dark:text-ink-100 mb-3 flex items-center gap-2", children: [jsx(TrendingUp, { className: "h-5 w-5" }), "Planned Features"] }), jsx("ul", { className: "space-y-2", children: features.map((feature, index) => (jsxs("li", { className: "flex items-start gap-2 text-ink-600 dark:text-ink-400", children: [jsx("span", { className: "text-primary-500 mt-1", children: "\u2022" }), jsx("span", { children: feature })] }, index))) })] })), estimatedDate && (jsx("div", { className: "pt-6 border-t border-paper-300 dark:border-paper-600", children: jsxs("div", { className: "flex items-center gap-2 text-sm text-ink-600 dark:text-ink-400", children: [jsx(Calendar$1, { className: "h-4 w-4" }), jsxs("span", { children: [jsx("span", { className: "font-medium", children: "Estimated Release:" }), " ", estimatedDate] })] }) })), jsx("div", { className: "mt-6 p-4 bg-paper-100 dark:bg-paper-700 rounded", children: jsxs("p", { className: "text-sm text-ink-600 dark:text-ink-400", children: [jsx("span", { className: "font-medium", children: "Need this feature sooner?" }), " Contact your administrator to discuss prioritization."] }) })] }) }));
|
|
9487
9487
|
}
|
|
9488
9488
|
|
|
9489
|
-
function Progress({ value, variant = 'linear', size = 'md', color = 'primary', showLabel = false, label, striped = false, animated = false, className = '', }) {
|
|
9489
|
+
function Progress({ value, variant = 'linear', size = 'md', color = 'primary', showLabel = false, label, striped = false, animated = false, milestones, showMilestoneLabels = false, className = '', }) {
|
|
9490
9490
|
// Clamp value between 0 and 100
|
|
9491
9491
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
9492
9492
|
const colorClasses = {
|
|
@@ -9510,24 +9510,43 @@ function Progress({ value, variant = 'linear', size = 'md', color = 'primary', s
|
|
|
9510
9510
|
md: 'h-2',
|
|
9511
9511
|
lg: 'h-3',
|
|
9512
9512
|
};
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9513
|
+
const tickSizes = {
|
|
9514
|
+
sm: { height: 8, width: 2 },
|
|
9515
|
+
md: { height: 12, width: 2 },
|
|
9516
|
+
lg: { height: 16, width: 3 },
|
|
9517
|
+
};
|
|
9518
|
+
// Sort and clamp milestones
|
|
9519
|
+
const sortedMilestones = milestones
|
|
9520
|
+
? [...milestones].map(m => Math.min(100, Math.max(0, m))).sort((a, b) => a - b)
|
|
9521
|
+
: [];
|
|
9522
|
+
return (jsxs("div", { className: `w-full ${className}`, children: [jsxs("div", { className: "relative", children: [jsx("div", { className: `relative w-full rounded-full overflow-hidden ${bgColorClasses[color]} ${heightClasses[size]}`, children: jsx("div", { className: `
|
|
9523
|
+
h-full transition-all duration-300 ease-out
|
|
9524
|
+
${colorClasses[color]}
|
|
9525
|
+
${striped ? 'bg-striped' : ''}
|
|
9526
|
+
${animated && striped ? 'animate-striped' : ''}
|
|
9527
|
+
`, style: {
|
|
9528
|
+
width: `${clampedValue}%`,
|
|
9529
|
+
backgroundImage: striped ? 'linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)' : undefined,
|
|
9530
|
+
backgroundSize: striped ? '1rem 1rem' : undefined,
|
|
9531
|
+
}, role: "progressbar", "aria-valuenow": clampedValue, "aria-valuemin": 0, "aria-valuemax": 100 }) }), sortedMilestones.length > 0 && (jsx("div", { className: "absolute inset-0 pointer-events-none", children: sortedMilestones.map((milestone) => (jsx("div", { className: "absolute flex flex-col items-center", style: {
|
|
9532
|
+
left: `${milestone}%`,
|
|
9533
|
+
top: '50%',
|
|
9534
|
+
transform: 'translate(-50%, -50%)',
|
|
9535
|
+
}, children: jsx("div", { className: `rounded-full ${milestone <= clampedValue ? 'bg-ink-700' : 'bg-ink-400'}`, style: {
|
|
9536
|
+
width: tickSizes[size].width,
|
|
9537
|
+
height: tickSizes[size].height,
|
|
9538
|
+
} }) }, milestone))) }))] }), showMilestoneLabels && sortedMilestones.length > 0 && (jsx("div", { className: "relative w-full mt-1", style: { height: '1rem' }, children: sortedMilestones.map((milestone) => (jsxs("span", { className: "absolute text-xs text-ink-500", style: {
|
|
9539
|
+
left: `${milestone}%`,
|
|
9540
|
+
transform: 'translateX(-50%)',
|
|
9541
|
+
}, children: [milestone, "%"] }, milestone))) })), (showLabel || label) && !showMilestoneLabels && (jsx("p", { className: "text-xs text-ink-600 mt-1", children: label || `${Math.round(clampedValue)}%` }))] }));
|
|
9523
9542
|
}
|
|
9524
9543
|
// Circular progress
|
|
9525
9544
|
const sizeValues = {
|
|
9526
|
-
sm: { size: 40, stroke: 3, fontSize: 'text-xs' },
|
|
9527
|
-
md: { size: 60, stroke: 4, fontSize: 'text-sm' },
|
|
9528
|
-
lg: { size: 80, stroke: 5, fontSize: 'text-base' },
|
|
9545
|
+
sm: { size: 40, stroke: 3, fontSize: 'text-xs', dotSize: 4, labelOffset: 14 },
|
|
9546
|
+
md: { size: 60, stroke: 4, fontSize: 'text-sm', dotSize: 5, labelOffset: 18 },
|
|
9547
|
+
lg: { size: 80, stroke: 5, fontSize: 'text-base', dotSize: 6, labelOffset: 22 },
|
|
9529
9548
|
};
|
|
9530
|
-
const { size: svgSize, stroke: strokeWidth, fontSize } = sizeValues[size];
|
|
9549
|
+
const { size: svgSize, stroke: strokeWidth, fontSize, dotSize, labelOffset } = sizeValues[size];
|
|
9531
9550
|
const radius = (svgSize - strokeWidth) / 2;
|
|
9532
9551
|
const circumference = 2 * Math.PI * radius;
|
|
9533
9552
|
const offset = circumference - (clampedValue / 100) * circumference;
|
|
@@ -9543,7 +9562,44 @@ function Progress({ value, variant = 'linear', size = 'md', color = 'primary', s
|
|
|
9543
9562
|
warning: 'stroke-warning-100',
|
|
9544
9563
|
error: 'stroke-error-100',
|
|
9545
9564
|
};
|
|
9546
|
-
|
|
9565
|
+
// Sort and clamp milestones for circular
|
|
9566
|
+
const sortedMilestones = milestones
|
|
9567
|
+
? [...milestones].map(m => Math.min(100, Math.max(0, m))).sort((a, b) => a - b)
|
|
9568
|
+
: [];
|
|
9569
|
+
// Calculate position on circle for a given percentage
|
|
9570
|
+
// SVG is rotated -90deg so 0% is at top
|
|
9571
|
+
const getMilestonePosition = (percentage, r) => {
|
|
9572
|
+
const angle = (percentage / 100) * 2 * Math.PI - Math.PI / 2;
|
|
9573
|
+
return {
|
|
9574
|
+
x: svgSize / 2 + r * Math.cos(angle),
|
|
9575
|
+
y: svgSize / 2 + r * Math.sin(angle),
|
|
9576
|
+
};
|
|
9577
|
+
};
|
|
9578
|
+
// Size for the container when labels are shown
|
|
9579
|
+
const containerSize = showMilestoneLabels && sortedMilestones.length > 0
|
|
9580
|
+
? svgSize + labelOffset * 2
|
|
9581
|
+
: svgSize;
|
|
9582
|
+
return (jsx("div", { className: `inline-flex flex-col items-center ${className}`, children: jsxs("div", { className: "relative", style: { width: containerSize, height: containerSize }, children: [jsxs("svg", { width: svgSize, height: svgSize, style: {
|
|
9583
|
+
position: 'absolute',
|
|
9584
|
+
left: showMilestoneLabels && sortedMilestones.length > 0 ? labelOffset : 0,
|
|
9585
|
+
top: showMilestoneLabels && sortedMilestones.length > 0 ? labelOffset : 0,
|
|
9586
|
+
}, children: [jsx("circle", { cx: svgSize / 2, cy: svgSize / 2, r: radius, fill: "none", strokeWidth: strokeWidth, className: strokeBgColorClasses[color] }), jsx("circle", { cx: svgSize / 2, cy: svgSize / 2, r: radius, fill: "none", strokeWidth: strokeWidth, strokeDasharray: circumference, strokeDashoffset: offset, strokeLinecap: "round", className: `${strokeColorClasses[color]} transition-all duration-300 ease-out`, style: { transform: 'rotate(-90deg)', transformOrigin: 'center' } }), sortedMilestones.map((milestone) => {
|
|
9587
|
+
const pos = getMilestonePosition(milestone, radius);
|
|
9588
|
+
return (jsx("circle", { cx: pos.x, cy: pos.y, r: dotSize / 2, className: milestone <= clampedValue ? 'fill-ink-700' : 'fill-ink-400' }, milestone));
|
|
9589
|
+
})] }), (showLabel || label) && (jsx("div", { className: "absolute flex items-center justify-center", style: {
|
|
9590
|
+
left: showMilestoneLabels && sortedMilestones.length > 0 ? labelOffset : 0,
|
|
9591
|
+
top: showMilestoneLabels && sortedMilestones.length > 0 ? labelOffset : 0,
|
|
9592
|
+
width: svgSize,
|
|
9593
|
+
height: svgSize,
|
|
9594
|
+
}, children: jsx("span", { className: `font-medium text-ink-900 ${fontSize}`, children: label || `${Math.round(clampedValue)}%` }) })), showMilestoneLabels && sortedMilestones.map((milestone) => {
|
|
9595
|
+
const pos = getMilestonePosition(milestone, radius + labelOffset);
|
|
9596
|
+
return (jsxs("span", { className: "absolute text-xs text-ink-500", style: {
|
|
9597
|
+
left: pos.x + labelOffset - 12,
|
|
9598
|
+
top: pos.y + labelOffset - 6,
|
|
9599
|
+
width: 24,
|
|
9600
|
+
textAlign: 'center',
|
|
9601
|
+
}, children: [milestone, "%"] }, milestone));
|
|
9602
|
+
})] }) }));
|
|
9547
9603
|
}
|
|
9548
9604
|
|
|
9549
9605
|
function Accordion({ items, allowMultiple = false, defaultOpen = [], onChange, expandIcon, collapseIcon, showStepNumbers = false, }) {
|
|
@@ -12301,52 +12357,44 @@ function getAugmentedNamespace(n) {
|
|
|
12301
12357
|
* (A1, A1:C5, ...)
|
|
12302
12358
|
*/
|
|
12303
12359
|
|
|
12304
|
-
|
|
12305
|
-
var hasRequiredCollection;
|
|
12306
|
-
|
|
12307
|
-
function requireCollection () {
|
|
12308
|
-
if (hasRequiredCollection) return collection;
|
|
12309
|
-
hasRequiredCollection = 1;
|
|
12310
|
-
class Collection {
|
|
12360
|
+
let Collection$3 = class Collection {
|
|
12311
12361
|
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12362
|
+
constructor(data, refs) {
|
|
12363
|
+
if (data == null && refs == null) {
|
|
12364
|
+
this._data = [];
|
|
12365
|
+
this._refs = [];
|
|
12366
|
+
} else {
|
|
12367
|
+
if (data.length !== refs.length)
|
|
12368
|
+
throw Error('Collection: data length should match references length.');
|
|
12369
|
+
this._data = data;
|
|
12370
|
+
this._refs = refs;
|
|
12371
|
+
}
|
|
12372
|
+
}
|
|
12323
12373
|
|
|
12324
|
-
|
|
12325
|
-
|
|
12326
|
-
|
|
12374
|
+
get data() {
|
|
12375
|
+
return this._data;
|
|
12376
|
+
}
|
|
12327
12377
|
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
|
|
12378
|
+
get refs() {
|
|
12379
|
+
return this._refs;
|
|
12380
|
+
}
|
|
12331
12381
|
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12382
|
+
get length() {
|
|
12383
|
+
return this._data.length;
|
|
12384
|
+
}
|
|
12335
12385
|
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12386
|
+
/**
|
|
12387
|
+
* Add data and references to this collection.
|
|
12388
|
+
* @param {{}} obj - data
|
|
12389
|
+
* @param {{}} ref - reference
|
|
12390
|
+
*/
|
|
12391
|
+
add(obj, ref) {
|
|
12392
|
+
this._data.push(obj);
|
|
12393
|
+
this._refs.push(ref);
|
|
12394
|
+
}
|
|
12395
|
+
};
|
|
12346
12396
|
|
|
12347
|
-
|
|
12348
|
-
return collection;
|
|
12349
|
-
}
|
|
12397
|
+
var collection = Collection$3;
|
|
12350
12398
|
|
|
12351
12399
|
var helpers;
|
|
12352
12400
|
var hasRequiredHelpers;
|
|
@@ -12355,7 +12403,7 @@ function requireHelpers () {
|
|
|
12355
12403
|
if (hasRequiredHelpers) return helpers;
|
|
12356
12404
|
hasRequiredHelpers = 1;
|
|
12357
12405
|
const FormulaError = requireError();
|
|
12358
|
-
const Collection =
|
|
12406
|
+
const Collection = collection;
|
|
12359
12407
|
|
|
12360
12408
|
const Types = {
|
|
12361
12409
|
NUMBER: 0,
|
|
@@ -22009,7 +22057,7 @@ var engineering = EngineeringFunctions;
|
|
|
22009
22057
|
|
|
22010
22058
|
const FormulaError$b = requireError();
|
|
22011
22059
|
const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
|
|
22012
|
-
const Collection$2 =
|
|
22060
|
+
const Collection$2 = collection;
|
|
22013
22061
|
const H$5 = FormulaHelpers$8;
|
|
22014
22062
|
|
|
22015
22063
|
const ReferenceFunctions$1 = {
|
|
@@ -33637,7 +33685,7 @@ var parsing = {
|
|
|
33637
33685
|
const FormulaError$4 = requireError();
|
|
33638
33686
|
const {Address: Address$1} = requireHelpers();
|
|
33639
33687
|
const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
|
|
33640
|
-
const Collection$1 =
|
|
33688
|
+
const Collection$1 = collection;
|
|
33641
33689
|
const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
|
|
33642
33690
|
const {NotAllInputParsedException} = require$$4;
|
|
33643
33691
|
|
|
@@ -34399,7 +34447,7 @@ var hooks$1 = {
|
|
|
34399
34447
|
const FormulaError$2 = requireError();
|
|
34400
34448
|
const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
|
|
34401
34449
|
const {Prefix, Postfix, Infix, Operators} = operators;
|
|
34402
|
-
const Collection =
|
|
34450
|
+
const Collection = collection;
|
|
34403
34451
|
const MAX_ROW = 1048576, MAX_COLUMN = 16384;
|
|
34404
34452
|
|
|
34405
34453
|
let Utils$1 = class Utils {
|