@bpfdev/oly-ui 1.0.2 → 1.0.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/index.d.mts +1816 -2
- package/dist/index.d.ts +1816 -2
- package/dist/index.js +9544 -570
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9556 -569
- package/dist/index.mjs.map +1 -1
- package/package.json +68 -59
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { SxProps, Theme, ButtonProps } from '@mui/material';
|
|
3
|
-
import
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import { ReactNode, ReactElement, CSSProperties } from 'react';
|
|
5
|
+
import { SxProps as SxProps$1, Theme as Theme$1 } from '@mui/material/styles';
|
|
4
6
|
import { GridColDef } from '@mui/x-data-grid';
|
|
5
7
|
|
|
6
8
|
interface AddCommentInputProps {
|
|
@@ -99,6 +101,468 @@ interface ButtonWithIconProps extends ButtonProps {
|
|
|
99
101
|
|
|
100
102
|
declare const ButtonWithIcon: ({ size, variant, children, icon, ...props }: ButtonWithIconProps) => react_jsx_runtime.JSX.Element;
|
|
101
103
|
|
|
104
|
+
/** Style props actually used by the header filter (trigger + list popper only; no search / checkboxes / apply row). */
|
|
105
|
+
type WidgetHeaderFilterStyleProps = Pick<FalconMultiSelectStyleProps, 'triggerBg' | 'triggerColor' | 'triggerMinWidth' | 'triggerBorderRadius' | 'triggerSx' | 'popperWidth' | 'popperBorderColor' | 'popperBorderColorDark' | 'popperBg' | 'popperBgDark' | 'popperColor' | 'popperColorDark'> & {
|
|
106
|
+
/**
|
|
107
|
+
* When `true` (default), the dropdown panel tracks the trigger width.
|
|
108
|
+
* When `false`, the panel uses `popperWidth`, or **300** if `popperWidth` is omitted.
|
|
109
|
+
*/
|
|
110
|
+
popperMatchTrigger?: boolean;
|
|
111
|
+
/** Merged into the dropdown `Paper` after base styles (e.g. `minWidth`, `maxWidth`, padding). */
|
|
112
|
+
popperSx?: SxProps<Theme>;
|
|
113
|
+
};
|
|
114
|
+
/** Props for the widget header filter: two-line trigger + simple option list. */
|
|
115
|
+
type WidgetHeaderFilterProps = {
|
|
116
|
+
/** First line of the trigger (full string), e.g. **Select gender** or **Region**. */
|
|
117
|
+
label: string;
|
|
118
|
+
list: FalconMultiSelectOption[];
|
|
119
|
+
data: FalconMultiSelectOption[];
|
|
120
|
+
setData: (value: FalconMultiSelectOption[]) => void;
|
|
121
|
+
} & Partial<WidgetHeaderFilterStyleProps>;
|
|
122
|
+
/** Alias for toolbar props that include this filter. */
|
|
123
|
+
type WidgetHeaderMultiSelectConfig = WidgetHeaderFilterProps;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Widget header filter styled like the provided mock:
|
|
127
|
+
* two-line trigger + simple dropdown list.
|
|
128
|
+
*/
|
|
129
|
+
declare const WidgetHeaderFilter: ({ label, list, data, setData, triggerBg, triggerColor, triggerMinWidth, triggerBorderRadius, triggerSx, popperMatchTrigger, popperWidth, popperSx, popperBorderColor, popperBorderColorDark, popperBg, popperBgDark, popperColor, popperColorDark, }: WidgetHeaderFilterProps) => react_jsx_runtime.JSX.Element;
|
|
130
|
+
|
|
131
|
+
declare const ChartWidgetHeaderSeparator: () => react_jsx_runtime.JSX.Element;
|
|
132
|
+
|
|
133
|
+
interface ChartWidgetInfoPopoverContent {
|
|
134
|
+
title: string;
|
|
135
|
+
description: string;
|
|
136
|
+
/** @default 'How does it help?' */
|
|
137
|
+
helpTitle?: string;
|
|
138
|
+
helpBullets: string[];
|
|
139
|
+
}
|
|
140
|
+
interface ChartWidgetInfoButtonProps {
|
|
141
|
+
/** Fires on each button click (e.g. analytics). */
|
|
142
|
+
onClick?: () => void;
|
|
143
|
+
/** @default 'More information' */
|
|
144
|
+
ariaLabel?: string;
|
|
145
|
+
sx?: SxProps$1<Theme$1>;
|
|
146
|
+
/** Info icon colour. @default '#6750A4' */
|
|
147
|
+
iconColor?: string;
|
|
148
|
+
/** Circular button background. @default '#EFEFEF' */
|
|
149
|
+
buttonBg?: string;
|
|
150
|
+
/** Circular button background on hover. @default '#E5E5E5' */
|
|
151
|
+
buttonHoverBg?: string;
|
|
152
|
+
/** Info icon width and height in px. @default 22 */
|
|
153
|
+
iconSize?: number;
|
|
154
|
+
/** Circular button diameter (width and height) in px. @default 30 */
|
|
155
|
+
buttonSize?: number;
|
|
156
|
+
/**
|
|
157
|
+
* When set, shows a popover with title, description, and bullet list on **hover** or **click**
|
|
158
|
+
* (hover uses a short close delay so the pointer can move onto the panel).
|
|
159
|
+
* Omit to use the button as a plain control with `onClick` only.
|
|
160
|
+
*/
|
|
161
|
+
popover?: ChartWidgetInfoPopoverContent;
|
|
162
|
+
/** Popover panel width in pixels. @default 320 (or 240 when `density` is `compact`) */
|
|
163
|
+
popoverWidth?: number;
|
|
164
|
+
/**
|
|
165
|
+
* `compact` uses a smaller circular trigger and a denser, narrower popover (e.g. KPI tiles).
|
|
166
|
+
* @default 'default'
|
|
167
|
+
*/
|
|
168
|
+
density?: 'default' | 'compact';
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare const ChartWidgetInfoButton: ({ onClick, ariaLabel, sx, iconColor, buttonBg, buttonHoverBg, iconSize: iconSizeProp, buttonSize: buttonSizeProp, popover, popoverWidth: popoverWidthProp, density, }: ChartWidgetInfoButtonProps) => react_jsx_runtime.JSX.Element;
|
|
172
|
+
|
|
173
|
+
/** One slice inside a row’s bar (e.g. age band). Widths are proportional to `value` within the row. */
|
|
174
|
+
interface RankedBarListSegment {
|
|
175
|
+
id: string;
|
|
176
|
+
/** Shown in the segment tooltip (e.g. **Teens (13-21 years)**). */
|
|
177
|
+
label: string;
|
|
178
|
+
value: number;
|
|
179
|
+
/** Segment fill; stacks left → right inside the row’s filled width. */
|
|
180
|
+
color: string;
|
|
181
|
+
}
|
|
182
|
+
interface RankedBarListItem {
|
|
183
|
+
id: string;
|
|
184
|
+
/** Row label (e.g. camera id). */
|
|
185
|
+
label: string;
|
|
186
|
+
/** Numeric value; bar width is relative to `maxValue` (or the largest value in `items`). */
|
|
187
|
+
value: number;
|
|
188
|
+
/**
|
|
189
|
+
* Optional stacked breakdown inside the filled bar. Proportions use segment `value` / sum(`segments`).
|
|
190
|
+
* When omitted, the bar uses a single **`barColor`** fill.
|
|
191
|
+
*/
|
|
192
|
+
segments?: RankedBarListSegment[];
|
|
193
|
+
}
|
|
194
|
+
interface RankedBarListProps {
|
|
195
|
+
/** Card title (e.g. “No. of Alerts Generated by Cameras”). */
|
|
196
|
+
title: string;
|
|
197
|
+
/** Rows to render; typically pre-sorted high → low. */
|
|
198
|
+
items: RankedBarListItem[];
|
|
199
|
+
/**
|
|
200
|
+
* When true (default), rows are sorted by `value` descending before render.
|
|
201
|
+
* Set false if `items` order is already final.
|
|
202
|
+
*/
|
|
203
|
+
sortByValueDescending?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Bar scale maximum. Defaults to the largest `value` in `items`, or 1 if empty.
|
|
206
|
+
*/
|
|
207
|
+
maxValue?: number;
|
|
208
|
+
/** Left column subheader (e.g. “Cameras (High to Low)”). */
|
|
209
|
+
listHeaderLabel?: string;
|
|
210
|
+
/** Right column header above numeric values. */
|
|
211
|
+
valueColumnHeader?: string;
|
|
212
|
+
/** Show sort icon next to `listHeaderLabel`. */
|
|
213
|
+
showSortControl?: boolean;
|
|
214
|
+
/** Called when the sort icon is clicked. */
|
|
215
|
+
onSortClick?: () => void;
|
|
216
|
+
/** Right side of the title row (e.g. `ChartWidgetInfoButton`). */
|
|
217
|
+
headerActions?: ReactNode;
|
|
218
|
+
/** Filled portion of each bar when a row has no **`segments`**. */
|
|
219
|
+
barColor?: string;
|
|
220
|
+
/** Track behind the bar. */
|
|
221
|
+
barTrackColor?: string;
|
|
222
|
+
/** Bar thickness in px. Default **7**. */
|
|
223
|
+
barHeight?: number;
|
|
224
|
+
/**
|
|
225
|
+
* Tooltip for a stacked segment. Default: **label**, **" : "**, and **value** (e.g. Teens (13-21 years) : 38).
|
|
226
|
+
*/
|
|
227
|
+
formatSegmentTooltip?: (segment: RankedBarListSegment, row: RankedBarListItem) => string;
|
|
228
|
+
/**
|
|
229
|
+
* MUI **`sx`** merged onto the segment tooltip **card** (white panel: border, shadow, rounded corners; stacked bars only).
|
|
230
|
+
* The Popper wrapper stays transparent; style the panel here.
|
|
231
|
+
*/
|
|
232
|
+
segmentTooltipSx?: SxProps$1<Theme$1>;
|
|
233
|
+
/** Scrollable list max height. Ignored when `fillHeight` is true (list grows and scrolls inside). */
|
|
234
|
+
listMaxHeight?: number | string;
|
|
235
|
+
/**
|
|
236
|
+
* When true, the card uses the full width of its parent (`maxWidth: 100%`), not the default 640px cap on sm+.
|
|
237
|
+
*/
|
|
238
|
+
fullWidth?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* When true, the card stretches to the parent’s height (`height: 100%`) and the list area flex-fills
|
|
241
|
+
* remaining space with `overflow: auto` — use inside a sized container (e.g. dashboard grid cell,
|
|
242
|
+
* dialog, or `height: 100vh` wrapper). Parent should give a defined height for this to take effect.
|
|
243
|
+
*/
|
|
244
|
+
fillHeight?: boolean;
|
|
245
|
+
/** Outer card `maxWidth` (number = px). Defaults to responsive full width / 640px sm+ unless `fullWidth`. */
|
|
246
|
+
cardMaxWidth?: number | string | {
|
|
247
|
+
xs?: number | string;
|
|
248
|
+
sm?: number | string;
|
|
249
|
+
md?: number | string;
|
|
250
|
+
};
|
|
251
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
252
|
+
/** Copy when `items` is empty. Default **No data**. */
|
|
253
|
+
emptyStateText?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Animate each row’s bar width with CSS when `value` changes (default **true**).
|
|
256
|
+
* Set **`false`** for very frequent updates.
|
|
257
|
+
*/
|
|
258
|
+
isBarWidthAnimationActive?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* When the scrollable list is taller than its viewport, reset **scroll to the top** after `items`
|
|
261
|
+
* changes (e.g. live refresh) so the highest-ranked rows stay in view. Default **true**.
|
|
262
|
+
* Set **`false`** to preserve manual scroll position.
|
|
263
|
+
*/
|
|
264
|
+
scrollListToTopOnItemsChange?: boolean;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Ranked list widget: title row, optional header actions, scrollable list of labels with
|
|
269
|
+
* horizontal bars sized by numeric value (highest value = full bar width).
|
|
270
|
+
*/
|
|
271
|
+
declare const RankedBarList: ({ title, items, sortByValueDescending, maxValue: maxValueProp, listHeaderLabel, valueColumnHeader, showSortControl, onSortClick, headerActions, barColor, barTrackColor, barHeight, formatSegmentTooltip, segmentTooltipSx, listMaxHeight, fullWidth, fillHeight, cardMaxWidth, cardSx, emptyStateText, isBarWidthAnimationActive, scrollListToTopOnItemsChange, }: RankedBarListProps) => react_jsx_runtime.JSX.Element;
|
|
272
|
+
|
|
273
|
+
/** How tab segments use horizontal space inside the pill track. */
|
|
274
|
+
type ChartWidgetSegmentedTabLayout = 'intrinsic' | 'equalWidth';
|
|
275
|
+
interface ChartWidgetSegmentedTab {
|
|
276
|
+
id: string;
|
|
277
|
+
label: string;
|
|
278
|
+
}
|
|
279
|
+
interface ChartWidgetSegmentedTabsProps {
|
|
280
|
+
tabs: ChartWidgetSegmentedTab[];
|
|
281
|
+
activeTabId: string;
|
|
282
|
+
onTabChange: (tabId: string) => void;
|
|
283
|
+
/** @default 'Scope' */
|
|
284
|
+
ariaLabel?: string;
|
|
285
|
+
/**
|
|
286
|
+
* When true (default), the track stretches to the parent width.
|
|
287
|
+
* When false, the pill track is only as wide as the tabs (`fit-content`).
|
|
288
|
+
*/
|
|
289
|
+
fullWidth?: boolean;
|
|
290
|
+
/** Tab label `fontSize` (number → px). Default **14**. */
|
|
291
|
+
tabFontSize?: number | string;
|
|
292
|
+
rootSx?: SxProps$1<Theme$1>;
|
|
293
|
+
/** Pill track background. @default `#ECECEC` */
|
|
294
|
+
trackBackgroundColor?: string;
|
|
295
|
+
/** Selected segment background. @default `#fff` */
|
|
296
|
+
activeTabBackground?: string;
|
|
297
|
+
/** Selected segment text color. @default `#2a2a2a` */
|
|
298
|
+
activeTabColor?: string;
|
|
299
|
+
/** Unselected segment text color. @default `#2a2a2a` */
|
|
300
|
+
inactiveTabColor?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Selected segment box shadow. @default light elevation. Use **`'none'`** for flat violet pills.
|
|
303
|
+
*/
|
|
304
|
+
activeTabBoxShadow?: string;
|
|
305
|
+
/**
|
|
306
|
+
* **`intrinsic`** (default): tabs size to their labels and sit at the **start** of the track (empty space
|
|
307
|
+
* may appear on the right when **`fullWidth`** is true). **`equalWidth`**: each tab grows so segments **fill**
|
|
308
|
+
* the track — typical for full-width dashboard bars.
|
|
309
|
+
*/
|
|
310
|
+
tabLayout?: ChartWidgetSegmentedTabLayout;
|
|
311
|
+
/** Selected tab `fontWeight`. @default **700** */
|
|
312
|
+
activeTabFontWeight?: number;
|
|
313
|
+
/** Unselected tab `fontWeight`. @default **600** */
|
|
314
|
+
inactiveTabFontWeight?: number;
|
|
315
|
+
/**
|
|
316
|
+
* Duration (ms) for the sliding selection pill when switching tabs.
|
|
317
|
+
* @default 260
|
|
318
|
+
*/
|
|
319
|
+
tabIndicatorTransitionMs?: number;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Pill-style segmented control for chart cards (e.g. Walk-in scope tabs, billing analytics).
|
|
324
|
+
*
|
|
325
|
+
* **Defaults** match the classic walk-in look: grey track, **white** selected pill, dark text, light shadow.
|
|
326
|
+
* Override **`trackBackgroundColor`**, **`activeTabBackground`**, **`activeTabColor`**, **`inactiveTabColor`**, and
|
|
327
|
+
* **`activeTabBoxShadow`** for other themes (e.g. violet selected pill + white text, **`activeTabBoxShadow: 'none'`**).
|
|
328
|
+
*
|
|
329
|
+
* Use **`tabLayout="equalWidth"`** when the track is full width and each tab should grow to **fill** the bar;
|
|
330
|
+
* default **`intrinsic`** keeps label-sized pills aligned to the **start** (walk-in style).
|
|
331
|
+
*
|
|
332
|
+
* The active segment uses a **sliding pill** (animated with **`tabIndicatorTransitionMs`**).
|
|
333
|
+
*/
|
|
334
|
+
declare const ChartWidgetSegmentedTabs: ({ tabs, activeTabId, onTabChange, ariaLabel, fullWidth, tabFontSize, rootSx, trackBackgroundColor, activeTabBackground, activeTabColor, inactiveTabColor, activeTabBoxShadow, tabLayout, activeTabFontWeight, inactiveTabFontWeight, tabIndicatorTransitionMs, }: ChartWidgetSegmentedTabsProps) => react_jsx_runtime.JSX.Element;
|
|
335
|
+
|
|
336
|
+
/** Partial **ChartWidgetInfoButton** props (popover always comes from **`infoPopover`** on **TimePeriodFilter**). */
|
|
337
|
+
type TimePeriodFilterInfoButtonPresentation = Partial<Omit<ChartWidgetInfoButtonProps, 'popover'>>;
|
|
338
|
+
/** @deprecated Use {@link TimePeriodFilterInfoButtonPresentation}. */
|
|
339
|
+
type QueueTimePeriodFilterInfoButtonPresentation = TimePeriodFilterInfoButtonPresentation;
|
|
340
|
+
/** Partial overrides for Recharts `<Tooltip />` style props (donut / stacked bar). */
|
|
341
|
+
type QueueTimeRechartsTooltipTheme = {
|
|
342
|
+
contentStyle?: CSSProperties;
|
|
343
|
+
itemStyle?: CSSProperties;
|
|
344
|
+
labelStyle?: CSSProperties;
|
|
345
|
+
wrapperStyle?: CSSProperties;
|
|
346
|
+
};
|
|
347
|
+
/** Partial overrides for the custom area chart tooltip DOM (inline styles). */
|
|
348
|
+
type QueueTimeAreaTooltipTheme = {
|
|
349
|
+
container?: CSSProperties;
|
|
350
|
+
header?: CSSProperties;
|
|
351
|
+
body?: CSSProperties;
|
|
352
|
+
row?: CSSProperties;
|
|
353
|
+
dot?: CSSProperties;
|
|
354
|
+
label?: CSSProperties;
|
|
355
|
+
value?: CSSProperties;
|
|
356
|
+
};
|
|
357
|
+
/** D / W / M / Y segmented control. */
|
|
358
|
+
type TimePeriodFilterTheme = {
|
|
359
|
+
/** Wrapper around the toggle + info (default inline-flex). */
|
|
360
|
+
rootSx?: SxProps$1<Theme$1>;
|
|
361
|
+
segmentSizePx?: number;
|
|
362
|
+
borderRadiusPx?: number;
|
|
363
|
+
fontSizePx?: number;
|
|
364
|
+
activeBackground?: string;
|
|
365
|
+
activeColor?: string;
|
|
366
|
+
inactiveHoverBackground?: string;
|
|
367
|
+
inactiveColor?: string;
|
|
368
|
+
trackBackground?: string;
|
|
369
|
+
borderColor?: string;
|
|
370
|
+
dividerColor?: string;
|
|
371
|
+
/** Used by **QueueTimeBreakdown** for the card title next to the period filter. */
|
|
372
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
373
|
+
toggleGroupSx?: SxProps$1<Theme$1>;
|
|
374
|
+
/** Merged into each **D / W / M / Y** **ToggleButton** (after built-in segment styles). */
|
|
375
|
+
toggleButtonSx?: SxProps$1<Theme$1>;
|
|
376
|
+
/** Row beside the toggle: separator + **ChartWidgetInfoButton** (when **infoPopover** is not **`null`**). */
|
|
377
|
+
infoStackSx?: SxProps$1<Theme$1>;
|
|
378
|
+
/**
|
|
379
|
+
* Defaults for the info trigger (icon size, colours, density, **ariaLabel**, etc.).
|
|
380
|
+
* Instance **`infoButtonProps`** on **TimePeriodFilter** overrides the same keys.
|
|
381
|
+
*/
|
|
382
|
+
infoButtonProps?: TimePeriodFilterInfoButtonPresentation;
|
|
383
|
+
};
|
|
384
|
+
/** @deprecated Use {@link TimePeriodFilterTheme}. */
|
|
385
|
+
type QueueTimePeriodFilterTheme = TimePeriodFilterTheme;
|
|
386
|
+
/**
|
|
387
|
+
* Optional theme overrides for `QueueTimeBreakdown` and its children.
|
|
388
|
+
* Pass via `customization` on `QueueTimeBreakdown`, or `QueueTimeBreakdownCustomizationProvider`.
|
|
389
|
+
*/
|
|
390
|
+
type QueueTimeBreakdownCustomization = {
|
|
391
|
+
/** Replaces default chart palette for stacked bar, donut, and area series. */
|
|
392
|
+
chartPalette?: readonly string[];
|
|
393
|
+
rootCard?: {
|
|
394
|
+
sx?: SxProps$1<Theme$1>;
|
|
395
|
+
elevation?: number;
|
|
396
|
+
};
|
|
397
|
+
periodFilter?: TimePeriodFilterTheme;
|
|
398
|
+
header?: {
|
|
399
|
+
headlineSx?: SxProps$1<Theme$1>;
|
|
400
|
+
subtitleSx?: SxProps$1<Theme$1>;
|
|
401
|
+
};
|
|
402
|
+
stackedBar?: {
|
|
403
|
+
barThicknessPx?: number;
|
|
404
|
+
ruleColor?: string;
|
|
405
|
+
labelPercentSx?: SxProps$1<Theme$1>;
|
|
406
|
+
labelRangeSx?: SxProps$1<Theme$1>;
|
|
407
|
+
tooltip?: QueueTimeRechartsTooltipTheme;
|
|
408
|
+
};
|
|
409
|
+
dataComparison?: {
|
|
410
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
411
|
+
dividerSx?: SxProps$1<Theme$1>;
|
|
412
|
+
};
|
|
413
|
+
donut?: {
|
|
414
|
+
innerRadius?: number;
|
|
415
|
+
outerRadius?: number;
|
|
416
|
+
paddingAngle?: number;
|
|
417
|
+
centerLabelSx?: SxProps$1<Theme$1>;
|
|
418
|
+
/** SVG fill for % label on lighter slices (typically first palette entries). */
|
|
419
|
+
innerPercentOnLightSliceFill?: string;
|
|
420
|
+
/** SVG fill for % label on darker slices. */
|
|
421
|
+
innerPercentOnDarkSliceFill?: string;
|
|
422
|
+
tooltip?: QueueTimeRechartsTooltipTheme;
|
|
423
|
+
containerSx?: SxProps$1<Theme$1>;
|
|
424
|
+
chartHeightPx?: number;
|
|
425
|
+
};
|
|
426
|
+
areaChart?: {
|
|
427
|
+
stackHeightPx?: number;
|
|
428
|
+
chartHeightPx?: number;
|
|
429
|
+
margin?: {
|
|
430
|
+
top?: number;
|
|
431
|
+
right?: number;
|
|
432
|
+
bottom?: number;
|
|
433
|
+
left?: number;
|
|
434
|
+
};
|
|
435
|
+
gridStroke?: string;
|
|
436
|
+
cursorStroke?: string;
|
|
437
|
+
cursorStrokeWidth?: number;
|
|
438
|
+
yAxisLabel?: string;
|
|
439
|
+
areaTooltip?: QueueTimeAreaTooltipTheme;
|
|
440
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
441
|
+
cardContentSx?: SxProps$1<Theme$1>;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Header illustration for the queue breakdown card.
|
|
447
|
+
* Default GIF path (place under app **`public`** or override with **`headerImageSrc`**).
|
|
448
|
+
*/
|
|
449
|
+
declare const QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC: "/images/icon/DwellBreakdownIcon.gif";
|
|
450
|
+
/** One series slice for Apex stacked horizontal bars. */
|
|
451
|
+
type QueueTimeStackedSeriesItem = {
|
|
452
|
+
name: string;
|
|
453
|
+
data: number[];
|
|
454
|
+
};
|
|
455
|
+
/** One row of stacked-bar data (e.g. per store). */
|
|
456
|
+
type QueueTimeBreakdownBarRow = {
|
|
457
|
+
name: string;
|
|
458
|
+
data: QueueTimeStackedSeriesItem[];
|
|
459
|
+
total: number;
|
|
460
|
+
};
|
|
461
|
+
type QueueTimeChartFilter = 'Day' | 'Week' | 'Month' | 'Year';
|
|
462
|
+
/** Optional legend chip under the stacked bars (percent + label + color). */
|
|
463
|
+
type QueueBucketLegendItem = {
|
|
464
|
+
percent: string;
|
|
465
|
+
label: string;
|
|
466
|
+
color: string;
|
|
467
|
+
};
|
|
468
|
+
type QueueTimeBreakdownProps = {
|
|
469
|
+
/** Stacked horizontal bar rows. */
|
|
470
|
+
data: QueueTimeBreakdownBarRow[];
|
|
471
|
+
/** Donut slice values (e.g. today). */
|
|
472
|
+
Donut_data: number[];
|
|
473
|
+
/** Optional second donut; defaults to Donut_data for both sides. */
|
|
474
|
+
donutYesterdayData?: number[];
|
|
475
|
+
total_visitor_today?: number;
|
|
476
|
+
overall_visitor_per_hour?: number;
|
|
477
|
+
overall_visitor_per_min?: number;
|
|
478
|
+
top_store?: string;
|
|
479
|
+
/**
|
|
480
|
+
* Header illustration URL. Defaults to {@link QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC}
|
|
481
|
+
* (same asset as the queue-time dashboard widget). Pass `''` to hide the icon.
|
|
482
|
+
*/
|
|
483
|
+
headerImageSrc?: string;
|
|
484
|
+
/** Main KPI number shown next to the icon. */
|
|
485
|
+
headlineTotal?: string;
|
|
486
|
+
/** Subtitle under the headline. */
|
|
487
|
+
headlineSubtitle?: string;
|
|
488
|
+
/** Row title above the donut comparison card. */
|
|
489
|
+
dataComparisonTitle?: string;
|
|
490
|
+
/** Legend under the stacked bars; defaults to four queue buckets. */
|
|
491
|
+
queueBucketLegend?: QueueBucketLegendItem[];
|
|
492
|
+
/** Card / widget title. */
|
|
493
|
+
title?: string;
|
|
494
|
+
/**
|
|
495
|
+
* Header info popover (next to D/W/M/Y). When omitted, the widget uses
|
|
496
|
+
* **`TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN`**. Pass **`null`** to hide the separator and
|
|
497
|
+
* **`ChartWidgetInfoButton`**. Standalone **`TimePeriodFilter`** does not inject popover copy implicitly.
|
|
498
|
+
*/
|
|
499
|
+
infoPopover?: ChartWidgetInfoPopoverContent | null;
|
|
500
|
+
/** Visual / layout overrides for all sub-widgets (tooltips, palette, D/W/M/Y control, etc.). */
|
|
501
|
+
customization?: QueueTimeBreakdownCustomization;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
type TimePeriodFilterProps = {
|
|
505
|
+
selectedFilter: QueueTimeChartFilter;
|
|
506
|
+
onFilterChange: React$1.Dispatch<React$1.SetStateAction<QueueTimeChartFilter>>;
|
|
507
|
+
/**
|
|
508
|
+
* Info popover beside D/W/M/Y. Pass **`ChartWidgetInfoPopoverContent`** to show separator +
|
|
509
|
+
* **ChartWidgetInfoButton**. Omit or **`null`** hides them (no implicit copy). For standalone use,
|
|
510
|
+
* prefer **`TIME_PERIOD_FILTER_INFO_POPOVER`** (neutral D/W/M/Y). **`TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN`**
|
|
511
|
+
* is for **QueueTimeBreakdown** only — that card injects it when **`infoPopover`** is omitted; do not
|
|
512
|
+
* use the breakdown preset on **TimePeriodFilter** outside that widget.
|
|
513
|
+
*/
|
|
514
|
+
infoPopover?: ChartWidgetInfoPopoverContent | null;
|
|
515
|
+
/**
|
|
516
|
+
* Presentation for **ChartWidgetInfoButton** (ignored when **infoPopover** is omitted or **`null`**).
|
|
517
|
+
* Overrides the same fields from **customization.periodFilter.infoButtonProps** when both are set.
|
|
518
|
+
*/
|
|
519
|
+
infoButtonProps?: Partial<Omit<ChartWidgetInfoButtonProps, 'popover'>>;
|
|
520
|
+
/** Overrides the same keys from **customization.periodFilter.rootSx** when both are set. */
|
|
521
|
+
sx?: SxProps$1<Theme$1>;
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* Day / Week / Month / Year segmented control — square D/W/M/Y cells, optional info button.
|
|
525
|
+
* Layout-neutral: no title or page-level alignment; wrap in your own **Stack** / **Box** or pass **sx**.
|
|
526
|
+
*
|
|
527
|
+
* Theme **customization.periodFilter** supports colours, **toggleGroupSx**, **toggleButtonSx**,
|
|
528
|
+
* **infoStackSx**, and **infoButtonProps**; component **infoButtonProps** override theme **infoButtonProps** for overlapping keys.
|
|
529
|
+
*
|
|
530
|
+
* Source: **`packages/falcon-ui/src/components/filters/TimePeriodFilter/`** (see **`components/tabs/`** for a similar package layout).
|
|
531
|
+
*/
|
|
532
|
+
declare function TimePeriodFilter({ selectedFilter, onFilterChange, infoPopover, infoButtonProps, sx, }: TimePeriodFilterProps): React$1.ReactElement;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Ready-made **`ChartWidgetInfoPopoverContent`** for **TimePeriodFilter** (D / W / M / Y) when you want
|
|
536
|
+
* generic help — **not** tied to **QueueTimeBreakdown** or any other specific card.
|
|
537
|
+
*
|
|
538
|
+
* **Use this when:** you show the period control next to charts or KPIs on any page and need a short
|
|
539
|
+
* explanation of what the control does and why it matters, without duplicating copy in your app.
|
|
540
|
+
*
|
|
541
|
+
* **What it contains (for authors / Storybook):**
|
|
542
|
+
* - **`title`:** “Time period” — names the control.
|
|
543
|
+
* - **`description`:** Explains that switching day / week / month / year changes grouping or how the time axis is labelled.
|
|
544
|
+
* - **`helpTitle`:** “How does it help?”
|
|
545
|
+
* - **`helpBullets`:** (1) Align the view with your reporting window; (2) Keep period in sync with other controls on the page.
|
|
546
|
+
*
|
|
547
|
+
* Pass as **`infoPopover={TIME_PERIOD_FILTER_INFO_POPOVER}`** on **TimePeriodFilter**, or use your own
|
|
548
|
+
* **`ChartWidgetInfoPopoverContent`** if you need product-specific wording.
|
|
549
|
+
*/
|
|
550
|
+
declare const TIME_PERIOD_FILTER_INFO_POPOVER: ChartWidgetInfoPopoverContent;
|
|
551
|
+
/**
|
|
552
|
+
* Info copy aligned with the **QueueTimeBreakdown** composite card (header next to D/W/M/Y).
|
|
553
|
+
* **QueueTimeBreakdown** uses this when **`infoPopover`** is omitted on the card.
|
|
554
|
+
* Use **`TIME_PERIOD_FILTER_INFO_POPOVER`** instead when the filter is not on that card.
|
|
555
|
+
*/
|
|
556
|
+
declare const TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN: ChartWidgetInfoPopoverContent;
|
|
557
|
+
/** @deprecated Use {@link TIME_PERIOD_FILTER_INFO_POPOVER}. */
|
|
558
|
+
declare const CHART_PERIOD_FILTER_INFO_POPOVER: ChartWidgetInfoPopoverContent;
|
|
559
|
+
/** @deprecated Use {@link TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN}. */
|
|
560
|
+
declare const QUEUE_TIME_BREAKDOWN_INFO_POPOVER: ChartWidgetInfoPopoverContent;
|
|
561
|
+
/**
|
|
562
|
+
* @deprecated Use {@link TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN}.
|
|
563
|
+
*/
|
|
564
|
+
declare const DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER: ChartWidgetInfoPopoverContent;
|
|
565
|
+
|
|
102
566
|
interface FalconButtonProps extends ButtonProps {
|
|
103
567
|
loading?: boolean;
|
|
104
568
|
iconPlacement?: 'start' | 'end';
|
|
@@ -200,6 +664,143 @@ interface FalconTicketFilterProps {
|
|
|
200
664
|
|
|
201
665
|
declare const FalconTicketFilter: ({ children, label, open: controlledOpen, onOpenChange, }: FalconTicketFilterProps) => react_jsx_runtime.JSX.Element;
|
|
202
666
|
|
|
667
|
+
/** Shared max-width rules for chart cards (WalkinAnalysis-style). */
|
|
668
|
+
type ChartCardMaxWidth = number | string | {
|
|
669
|
+
xs?: number | string;
|
|
670
|
+
sm?: number | string;
|
|
671
|
+
md?: number | string;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
/** Optional inline styles merged over tooltip defaults (undefined keys keep defaults). */
|
|
675
|
+
interface FootfallByAgeGroupsTooltipStyles {
|
|
676
|
+
container?: CSSProperties;
|
|
677
|
+
/** Each horizontal row in the tooltip */
|
|
678
|
+
sectionRow?: CSSProperties;
|
|
679
|
+
/** Prefix text like “Time:”, “Overall:” */
|
|
680
|
+
metaLabel?: CSSProperties;
|
|
681
|
+
/** Values next to meta labels (e.g. “11am”, total count) */
|
|
682
|
+
metaValue?: CSSProperties;
|
|
683
|
+
/** Colored dot before each series name */
|
|
684
|
+
seriesDot?: CSSProperties;
|
|
685
|
+
/** Bold series name in tooltip (short \`label\`, e.g. “Kids:”) */
|
|
686
|
+
seriesName?: CSSProperties;
|
|
687
|
+
/** Numeric value after series name */
|
|
688
|
+
seriesValue?: CSSProperties;
|
|
689
|
+
}
|
|
690
|
+
/** Partial Recharts outer margin; omitted sides use built-in defaults. */
|
|
691
|
+
interface FootfallByAgeGroupsChartMargin {
|
|
692
|
+
top?: number;
|
|
693
|
+
right?: number;
|
|
694
|
+
bottom?: number;
|
|
695
|
+
left?: number;
|
|
696
|
+
}
|
|
697
|
+
/** Optional chart chrome colors (stroke / fills). */
|
|
698
|
+
interface FootfallByAgeGroupsChartColors {
|
|
699
|
+
cartesianGridStroke?: string;
|
|
700
|
+
xAxisLineStroke?: string;
|
|
701
|
+
axisTickLineStroke?: string;
|
|
702
|
+
stackTotalLabelFill?: string;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Horizontal scrolling of the plot when it is wider than the card.
|
|
707
|
+
* - \`auto\` (default): only when \`minWidthPerCategory\` is positive **and** there are **2+** data rows.
|
|
708
|
+
* - \`on\`: allow scroll whenever \`minWidthPerCategory\` is positive (including a single bar).
|
|
709
|
+
* - \`off\`: never; chart width follows the viewport (\`minWidthPerCategory\` still affects nothing for width).
|
|
710
|
+
*/
|
|
711
|
+
type FootfallByAgeGroupsHorizontalScroll = 'auto' | 'on' | 'off';
|
|
712
|
+
interface FootfallByAgeGroupsSeries {
|
|
713
|
+
/** Must match a numeric field on each row (e.g. \`Kids\`, \`Teens\`). */
|
|
714
|
+
dataKey: string;
|
|
715
|
+
/** Short name for **tooltip** rows and \`Bar\` \`name\` (e.g. \`Kids\`). */
|
|
716
|
+
label: string;
|
|
717
|
+
color: string;
|
|
718
|
+
/**
|
|
719
|
+
* Optional longer text for the **legend** only (e.g. \`Kids (3-12 years old)\`).
|
|
720
|
+
* Omit to use \`label\` in the legend as well.
|
|
721
|
+
*/
|
|
722
|
+
legendLabel?: string;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Each row is one X-axis tick; \`name\` is the label. Other keys match \`series[].dataKey\` with numeric values.
|
|
726
|
+
*/
|
|
727
|
+
type FootfallByAgeGroupsRow = {
|
|
728
|
+
name: string;
|
|
729
|
+
} & Record<string, string | number>;
|
|
730
|
+
interface FootfallByAgeGroupsProps {
|
|
731
|
+
/** Card heading — **centered**; \`headerActions\` (if any) sit on the right without shifting it. */
|
|
732
|
+
title: string;
|
|
733
|
+
data: FootfallByAgeGroupsRow[];
|
|
734
|
+
/** Stacked series bottom-to-top (first item is bottom of stack). */
|
|
735
|
+
series: FootfallByAgeGroupsSeries[];
|
|
736
|
+
/** Plot height in px. Default: 430 */
|
|
737
|
+
chartHeight?: number;
|
|
738
|
+
/**
|
|
739
|
+
* Minimum pixels reserved per X-axis category so the chart can grow wider than the card and scroll horizontally.
|
|
740
|
+
* Set `0` to disable (chart stays `100%` wide only). Default: **56**.
|
|
741
|
+
* Used only when horizontal scrolling is active — see \`horizontalScroll\`.
|
|
742
|
+
*/
|
|
743
|
+
minWidthPerCategory?: number;
|
|
744
|
+
/**
|
|
745
|
+
* When the plot may scroll horizontally. Default \`auto\`: **off** for a single row, **on** for two or more
|
|
746
|
+
* (if \`minWidthPerCategory\` is positive). Use \`off\` to avoid a scrollbar; \`on\` to always allow it.
|
|
747
|
+
*/
|
|
748
|
+
horizontalScroll?: FootfallByAgeGroupsHorizontalScroll;
|
|
749
|
+
/**
|
|
750
|
+
* Recharts \`maxBarSize\`: caps how thick each vertical bar is when the category band is very wide
|
|
751
|
+
* (e.g. a single region in a wide scroll area). Default: **36** px, and never wider than the category
|
|
752
|
+
* width cap (\`minWidthPerCategory\` when positive, else **56**).
|
|
753
|
+
*/
|
|
754
|
+
maxBarSize?: number;
|
|
755
|
+
cardMaxWidth?: ChartCardMaxWidth;
|
|
756
|
+
/** Outer card; merged after defaults (padding, border, width, etc.). */
|
|
757
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
758
|
+
/** Wrapper around the centered title row (relative positioning). */
|
|
759
|
+
titleRowSx?: SxProps$1<Theme$1>;
|
|
760
|
+
/** Card heading \`Typography\`; merged after default weight/color. */
|
|
761
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
762
|
+
/** Under the title row. */
|
|
763
|
+
dividerSx?: SxProps$1<Theme$1>;
|
|
764
|
+
/** Legend flex row (when \`showLegend\`). */
|
|
765
|
+
legendRowSx?: SxProps$1<Theme$1>;
|
|
766
|
+
/** Each legend item row (swatch + label). */
|
|
767
|
+
legendItemSx?: SxProps$1<Theme$1>;
|
|
768
|
+
/** Color swatch \`Box\` in the legend. */
|
|
769
|
+
legendSwatchSx?: SxProps$1<Theme$1>;
|
|
770
|
+
/** Legend text \`Typography\`. */
|
|
771
|
+
legendLabelSx?: SxProps$1<Theme$1>;
|
|
772
|
+
/** Scrollable chart viewport. */
|
|
773
|
+
chartScrollAreaSx?: SxProps$1<Theme$1>;
|
|
774
|
+
/** Outer vertical \`Stack\` (card body). */
|
|
775
|
+
stackSx?: SxProps$1<Theme$1>;
|
|
776
|
+
/** Empty state wrapper when \`data\` is empty. */
|
|
777
|
+
emptyStateSx?: SxProps$1<Theme$1>;
|
|
778
|
+
/** “No data” \`Typography\`. */
|
|
779
|
+
emptyStateTextSx?: SxProps$1<Theme$1>;
|
|
780
|
+
/** Filters / info control — **absolutely positioned** on the right of the title row. */
|
|
781
|
+
headerActions?: ReactNode;
|
|
782
|
+
/** Tooltip label before the category value. Default: \`Time\` */
|
|
783
|
+
tooltipCategoryLabel?: string;
|
|
784
|
+
/** Tooltip label before the stacked total. Default: \`Overall\` */
|
|
785
|
+
tooltipOverallLabel?: string;
|
|
786
|
+
/** Merge over default tooltip inline styles. */
|
|
787
|
+
tooltipStyles?: FootfallByAgeGroupsTooltipStyles;
|
|
788
|
+
/** Color key legend above the plot (from \`series\`). Default: \`true\`. */
|
|
789
|
+
showLegend?: boolean;
|
|
790
|
+
/** Recharts \`BarChart\` margin; partial merge with defaults. */
|
|
791
|
+
chartMargin?: FootfallByAgeGroupsChartMargin;
|
|
792
|
+
/** Grid / axis / bar-top label colors. */
|
|
793
|
+
chartColors?: FootfallByAgeGroupsChartColors;
|
|
794
|
+
/** Opacity for non-hovered stacks while another bar is hovered. Default: \`0.35\` */
|
|
795
|
+
dimmedStackOpacity?: number;
|
|
796
|
+
/** Recharts \`stackId\` for stacked \`Bar\`s. Default: \`footfall-by-age-groups\` */
|
|
797
|
+
barStackId?: string;
|
|
798
|
+
/** Copy when \`data\` is empty. Default: \`No data\` */
|
|
799
|
+
emptyStateText?: string;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
declare function FootfallByAgeGroups({ title, data, series, chartHeight, minWidthPerCategory, horizontalScroll: horizontalScrollProp, maxBarSize: maxBarSizeProp, cardMaxWidth, cardSx, titleRowSx, titleSx, dividerSx, legendRowSx, legendItemSx, legendSwatchSx, legendLabelSx, chartScrollAreaSx, stackSx, emptyStateSx, emptyStateTextSx, headerActions, tooltipCategoryLabel, tooltipOverallLabel, tooltipStyles, showLegend, chartMargin: chartMarginProp, chartColors: chartColorsProp, dimmedStackOpacity, barStackId, emptyStateText, }: FootfallByAgeGroupsProps): react_jsx_runtime.JSX.Element;
|
|
803
|
+
|
|
203
804
|
interface HeatMapLegendItem {
|
|
204
805
|
label: string;
|
|
205
806
|
color: string;
|
|
@@ -216,6 +817,153 @@ interface HeatMapChartLegendProps {
|
|
|
216
817
|
|
|
217
818
|
declare const HeatMapChartLegend: ({ title, items, gradientId, gradientStops, }: HeatMapChartLegendProps) => react_jsx_runtime.JSX.Element;
|
|
218
819
|
|
|
820
|
+
/** How the trend / baseline row is laid out under the main value. */
|
|
821
|
+
type KpiTrendLayout = 'row' | 'stacked';
|
|
822
|
+
type KpiTrend = {
|
|
823
|
+
/**
|
|
824
|
+
* **row** (default) — one line: optional %, direction arrow, comparison (caption style).
|
|
825
|
+
* **stacked** — comparison on its **own line** below the value (e.g. schedule cards: value `4 - 5pm`,
|
|
826
|
+
* line below `yesterday is 3 - 4pm` in **comparisonColor**). No %/arrow row.
|
|
827
|
+
*/
|
|
828
|
+
layout?: KpiTrendLayout;
|
|
829
|
+
/**
|
|
830
|
+
* Change vs baseline, e.g. `"82%"`. Only used when **`layout`** is **`row`** (or omitted).
|
|
831
|
+
*/
|
|
832
|
+
percentLabel?: string;
|
|
833
|
+
/**
|
|
834
|
+
* Baseline / comparison copy (required for **`row`**).
|
|
835
|
+
* For **`stacked`**, omit when using **`comparisonPrefix`** + **`comparisonHighlight`** (split line).
|
|
836
|
+
*/
|
|
837
|
+
comparisonText?: string | ReactNode;
|
|
838
|
+
/**
|
|
839
|
+
* **Stacked only:** static copy before the API window (muted). Pair with **`comparisonHighlight`**.
|
|
840
|
+
* Example: `"yesterday is "` (include trailing space if needed).
|
|
841
|
+
*/
|
|
842
|
+
comparisonPrefix?: string;
|
|
843
|
+
/**
|
|
844
|
+
* **Stacked only:** dynamic value from the API (accent color — default violet). Pair with **`comparisonPrefix`**.
|
|
845
|
+
* Example: `"3 - 4pm"`.
|
|
846
|
+
*/
|
|
847
|
+
comparisonHighlight?: string;
|
|
848
|
+
/**
|
|
849
|
+
* Arrow + tint for **`layout: 'row'`**. Ignored when **`layout: 'stacked'`** (pass a dummy if required by callers).
|
|
850
|
+
*/
|
|
851
|
+
direction: 'up' | 'down';
|
|
852
|
+
/**
|
|
853
|
+
* **Stacked:** color for **`comparisonHighlight`** only (split mode), or entire line if you pass a single **`comparisonText`** (default line color is **muted** unless **`comparisonColor`** is set).
|
|
854
|
+
* @default `#5E35B1` for the highlight segment in split mode.
|
|
855
|
+
*/
|
|
856
|
+
comparisonColor?: string;
|
|
857
|
+
/**
|
|
858
|
+
* **Stacked split:** color for **`comparisonPrefix`** (muted segment). CSS string or MUI palette path.
|
|
859
|
+
* @default \`text.secondary\` (theme)
|
|
860
|
+
*/
|
|
861
|
+
comparisonPrefixColor?: string;
|
|
862
|
+
};
|
|
863
|
+
/** Where the optional info button sits in the detailed layout. */
|
|
864
|
+
type KpiStatCardInfoPlacement = 'title' | 'value';
|
|
865
|
+
/** Shape of the decorative icon backdrop (top-right). */
|
|
866
|
+
type KpiStatCardIconBackdropShape = 'rounded' | 'round';
|
|
867
|
+
type KpiStatCardShared = {
|
|
868
|
+
/** Iconify icon id, e.g. `mdi:store` */
|
|
869
|
+
icon: string;
|
|
870
|
+
/** Icon color (CSS). */
|
|
871
|
+
iconColor?: string;
|
|
872
|
+
/** Icon size in px. */
|
|
873
|
+
iconSize?: number;
|
|
874
|
+
title: string;
|
|
875
|
+
value: string | number;
|
|
876
|
+
/**
|
|
877
|
+
* When \`value\` is a finite **number**, animate changes with an internal ease-out tween (no extra
|
|
878
|
+
* dependencies). Set \`false\` to show a static formatted number. Ignored for strings and non-finite numbers.
|
|
879
|
+
* @default true
|
|
880
|
+
*/
|
|
881
|
+
animateValue?: boolean;
|
|
882
|
+
/**
|
|
883
|
+
* Duration for **`animateValue`** (ms).
|
|
884
|
+
* @default 1000
|
|
885
|
+
*/
|
|
886
|
+
valueAnimationDurationMs?: number;
|
|
887
|
+
/**
|
|
888
|
+
* Passed to **`Number.prototype.toLocaleString`** as grouping (thousands separators).
|
|
889
|
+
* @default true
|
|
890
|
+
*/
|
|
891
|
+
valueAnimationUseGrouping?: boolean;
|
|
892
|
+
/**
|
|
893
|
+
* BCP 47 locale for **`toLocaleString`** when animating; omit for the runtime default locale.
|
|
894
|
+
*/
|
|
895
|
+
valueAnimationLocale?: string;
|
|
896
|
+
/**
|
|
897
|
+
* Large primary metric color (inline + detailed).
|
|
898
|
+
* @default '#000000'
|
|
899
|
+
*/
|
|
900
|
+
metricColor?: string;
|
|
901
|
+
/**
|
|
902
|
+
* Minimum height of the root `Paper` (px).
|
|
903
|
+
* @default Inline **96**; detailed **118**.
|
|
904
|
+
*/
|
|
905
|
+
cardMinHeightPx?: number;
|
|
906
|
+
/**
|
|
907
|
+
* Maximum height of the root `Paper` (px). When set, the card uses `overflow: auto` so content can scroll.
|
|
908
|
+
*/
|
|
909
|
+
cardMaxHeightPx?: number;
|
|
910
|
+
/** Extra root `Paper` styles — merges last; use to override borders, shadows, width, etc. */
|
|
911
|
+
sx?: SxProps$1<Theme$1>;
|
|
912
|
+
};
|
|
913
|
+
type KpiStatCardInlineProps = KpiStatCardShared & {
|
|
914
|
+
variant: 'inline';
|
|
915
|
+
};
|
|
916
|
+
type KpiStatCardDetailedProps = KpiStatCardShared & {
|
|
917
|
+
variant: 'detailed';
|
|
918
|
+
trend: KpiTrend;
|
|
919
|
+
/**
|
|
920
|
+
* Popover for **ChartWidgetInfoButton** (same shape as other chart widgets).
|
|
921
|
+
* Placement is controlled by **`infoPlacement`**.
|
|
922
|
+
*/
|
|
923
|
+
infoPopover?: ChartWidgetInfoPopoverContent;
|
|
924
|
+
/**
|
|
925
|
+
* Where to show **ChartWidgetInfoButton** when **`infoPopover`** is set.
|
|
926
|
+
* @default 'value'
|
|
927
|
+
*/
|
|
928
|
+
infoPlacement?: KpiStatCardInfoPlacement;
|
|
929
|
+
/** Background of the decorative icon container (top-right) */
|
|
930
|
+
iconBackdropColor?: string;
|
|
931
|
+
/**
|
|
932
|
+
* **rounded** — rounded rectangle (squircle). **round** — circle.
|
|
933
|
+
* @default 'rounded'
|
|
934
|
+
*/
|
|
935
|
+
iconBackdropShape?: KpiStatCardIconBackdropShape;
|
|
936
|
+
/** Color for trend % + arrow (defaults by direction) */
|
|
937
|
+
trendColor?: string;
|
|
938
|
+
/** Optional slot above title (e.g. filter) */
|
|
939
|
+
slotHeader?: ReactNode;
|
|
940
|
+
/**
|
|
941
|
+
* Title line color (CSS or MUI palette path e.g. \`text.secondary\`).
|
|
942
|
+
* @default \`text.secondary\`
|
|
943
|
+
*/
|
|
944
|
+
titleColor?: string;
|
|
945
|
+
/** Card width in px. @default 247 */
|
|
946
|
+
cardWidthPx?: number;
|
|
947
|
+
/** Root padding in px. @default 12 */
|
|
948
|
+
cardPaddingPx?: number;
|
|
949
|
+
/** Vertical gap between title / value / trend blocks (px). @default 8 */
|
|
950
|
+
blockGapPx?: number;
|
|
951
|
+
/** Decorative icon badge width and height (px). @default 48 */
|
|
952
|
+
iconBackdropSizePx?: number;
|
|
953
|
+
/** Row trend: font size for % and comparison text (px). @default 12 */
|
|
954
|
+
rowTrendFontSizePx?: number;
|
|
955
|
+
/** Row trend: direction arrow icon size (px). @default 16 */
|
|
956
|
+
rowTrendIconSizePx?: number;
|
|
957
|
+
/**
|
|
958
|
+
* Row trend: comparison string color (CSS or palette key).
|
|
959
|
+
* @default \`text.secondary\`
|
|
960
|
+
*/
|
|
961
|
+
rowTrendComparisonColor?: string;
|
|
962
|
+
};
|
|
963
|
+
type KpiStatCardProps = KpiStatCardInlineProps | KpiStatCardDetailedProps;
|
|
964
|
+
|
|
965
|
+
declare const KpiStatCard: (props: KpiStatCardProps) => react_jsx_runtime.JSX.Element;
|
|
966
|
+
|
|
219
967
|
interface ProgressBarNumberProps {
|
|
220
968
|
number: number;
|
|
221
969
|
progress: 0 | 50 | 100;
|
|
@@ -224,6 +972,1072 @@ interface ProgressBarNumberProps {
|
|
|
224
972
|
|
|
225
973
|
declare const ProgressBarNumber: ({ number, progress, numColor, }: ProgressBarNumberProps) => react_jsx_runtime.JSX.Element;
|
|
226
974
|
|
|
975
|
+
/** Pie diameter: fixed px, or per-breakpoint (`xs` / `sm` / `md` match MUI breakpoints). */
|
|
976
|
+
type WalkinAnalysisPieSize = number | {
|
|
977
|
+
xs?: number;
|
|
978
|
+
sm?: number;
|
|
979
|
+
md?: number;
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* Card `max-width`: a number is pixels on all breakpoints; a string is any CSS length;
|
|
983
|
+
* an object sets `maxWidth` per breakpoint (numbers become px). Omitted keys use `100%` (xs) and `640` (sm).
|
|
984
|
+
*/
|
|
985
|
+
type WalkinAnalysisCardMaxWidth = number | string | {
|
|
986
|
+
xs?: number | string;
|
|
987
|
+
sm?: number | string;
|
|
988
|
+
md?: number | string;
|
|
989
|
+
};
|
|
990
|
+
/** Same shape as `ChartWidgetSegmentedTab`; rendered with `ChartWidgetSegmentedTabs` inside WalkinAnalysis. */
|
|
991
|
+
interface WalkinAnalysisTab {
|
|
992
|
+
id: string;
|
|
993
|
+
label: string;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Optional `fontSize` overrides (number → px). Omitted keys keep the built-in defaults.
|
|
997
|
+
*/
|
|
998
|
+
interface WalkinAnalysisTypography {
|
|
999
|
+
title?: number | string;
|
|
1000
|
+
tabs?: number | string;
|
|
1001
|
+
piePercent?: number | string;
|
|
1002
|
+
legendLabel?: number | string;
|
|
1003
|
+
legendValue?: number | string;
|
|
1004
|
+
tooltipTitle?: number | string;
|
|
1005
|
+
tooltipValue?: number | string;
|
|
1006
|
+
emptyState?: number | string;
|
|
1007
|
+
}
|
|
1008
|
+
interface WalkinAnalysisSlice {
|
|
1009
|
+
id: string;
|
|
1010
|
+
/** Legend title and accessible pie summary (e.g. “Individual Walk-ins”). */
|
|
1011
|
+
label: string;
|
|
1012
|
+
count: number;
|
|
1013
|
+
/** Segment fill in the pie and legend swatch color. */
|
|
1014
|
+
color: string;
|
|
1015
|
+
/** Legend title text color (default `#424242`). */
|
|
1016
|
+
legendLabelColor?: string;
|
|
1017
|
+
/** Legend count / percentage line color (default `#333`). */
|
|
1018
|
+
legendValueColor?: string;
|
|
1019
|
+
/** Fill for the percentage label inside the pie slice (default `#fff`). */
|
|
1020
|
+
segmentPercentColor?: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* Optional control after the legend count line — e.g. **`<ChartWidgetInfoButton popover={…} />`**
|
|
1023
|
+
* from `@bpfdev/oly-ui` so legend info matches the header info pattern.
|
|
1024
|
+
*/
|
|
1025
|
+
legendInfo?: ReactNode;
|
|
1026
|
+
}
|
|
1027
|
+
interface WalkinAnalysisProps {
|
|
1028
|
+
title: string;
|
|
1029
|
+
tabs: WalkinAnalysisTab[];
|
|
1030
|
+
activeTabId: string;
|
|
1031
|
+
onTabChange: (tabId: string) => void;
|
|
1032
|
+
/**
|
|
1033
|
+
* Omit or `true`: scope tabs span the card width (default — forwarded as **ChartWidgetSegmentedTabs** `fullWidth`).
|
|
1034
|
+
* `false`: pill track only as wide as the labels.
|
|
1035
|
+
*/
|
|
1036
|
+
segmentedTabsFullWidth?: boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* Merged onto **ChartWidgetSegmentedTabs** `rootSx` after `fullWidth` width rules — use for `width`, `maxWidth`, alignment, etc.
|
|
1039
|
+
*/
|
|
1040
|
+
segmentedTabsSx?: SxProps$1<Theme$1>;
|
|
1041
|
+
/** Each item’s `label`, `count`, and `color` drive pie segments and legend; optional colors override legend / in-slice % text. */
|
|
1042
|
+
slices: WalkinAnalysisSlice[];
|
|
1043
|
+
/** Right side of the title row: compose `WidgetHeaderFilter`, `ChartWidgetHeaderSeparator`, `ChartWidgetInfoButton`, or custom nodes. */
|
|
1044
|
+
headerActions?: ReactNode;
|
|
1045
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
1046
|
+
/**
|
|
1047
|
+
* Card maximum width. Defaults to full width on xs and 640px from sm up.
|
|
1048
|
+
* Use `cardSx` for further layout overrides (it merges after this).
|
|
1049
|
+
*/
|
|
1050
|
+
cardMaxWidth?: WalkinAnalysisCardMaxWidth;
|
|
1051
|
+
/**
|
|
1052
|
+
* Pie diameter (px). Use a number for the same size on all screens.
|
|
1053
|
+
* Use an object to set sizes at `xs`, `sm`, and `md` (unset keys use 180, 220, 260).
|
|
1054
|
+
* Omit for built-in responsive sizing across breakpoints.
|
|
1055
|
+
*/
|
|
1056
|
+
pieSize?: WalkinAnalysisPieSize;
|
|
1057
|
+
/** Per-region `fontSize` overrides (numbers are px). */
|
|
1058
|
+
typography?: WalkinAnalysisTypography;
|
|
1059
|
+
/**
|
|
1060
|
+
* Recharts **`Pie`** animation. Defaults **true** / **400** ms.
|
|
1061
|
+
* There is no horizontal plot scroll on this card (pie layout); only animation applies.
|
|
1062
|
+
*/
|
|
1063
|
+
isChartAnimationActive?: boolean;
|
|
1064
|
+
chartAnimationDuration?: number;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Walk-in style analysis card: title row (optional `headerActions`), tabs, Recharts pie, legend.
|
|
1069
|
+
* Pie and legend are driven by `slices` (`label`, `count`, `color`, optional legend / segment % colors).
|
|
1070
|
+
*/
|
|
1071
|
+
declare const WalkinAnalysis: ({ title, tabs, activeTabId, onTabChange, segmentedTabsFullWidth, segmentedTabsSx, slices, headerActions, cardSx, cardMaxWidth, pieSize, typography, isChartAnimationActive, chartAnimationDuration, }: WalkinAnalysisProps) => react_jsx_runtime.JSX.Element;
|
|
1072
|
+
|
|
1073
|
+
/** Optional inline styles merged over tooltip defaults (undefined keys keep defaults). */
|
|
1074
|
+
interface FootfallByGenderTooltipStyles {
|
|
1075
|
+
container?: CSSProperties;
|
|
1076
|
+
/** Each horizontal row in the tooltip */
|
|
1077
|
+
sectionRow?: CSSProperties;
|
|
1078
|
+
/** Prefix text like “Time:”, “Overall:” */
|
|
1079
|
+
metaLabel?: CSSProperties;
|
|
1080
|
+
/** Values next to meta labels */
|
|
1081
|
+
metaValue?: CSSProperties;
|
|
1082
|
+
/** Colored dot before each series name */
|
|
1083
|
+
seriesDot?: CSSProperties;
|
|
1084
|
+
/** Bold series name in tooltip */
|
|
1085
|
+
seriesName?: CSSProperties;
|
|
1086
|
+
/** Numeric value after series name */
|
|
1087
|
+
seriesValue?: CSSProperties;
|
|
1088
|
+
}
|
|
1089
|
+
/** Partial Recharts outer margin; omitted sides use built-in defaults (after label reserve). */
|
|
1090
|
+
interface FootfallByGenderChartMargin {
|
|
1091
|
+
top?: number;
|
|
1092
|
+
right?: number;
|
|
1093
|
+
bottom?: number;
|
|
1094
|
+
left?: number;
|
|
1095
|
+
}
|
|
1096
|
+
/** Optional chart chrome colors (grid, axes, bar-top labels). */
|
|
1097
|
+
interface FootfallByGenderChartColors {
|
|
1098
|
+
cartesianGridStroke?: string;
|
|
1099
|
+
xAxisLineStroke?: string;
|
|
1100
|
+
axisTickLineStroke?: string;
|
|
1101
|
+
/** `LabelList` fill when `showBarValueLabels` is on */
|
|
1102
|
+
barValueLabelFill?: string;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Horizontal scrolling of the plot when it is wider than the card.
|
|
1106
|
+
* - `auto` (default): when there are **2+** categories and `minWidthPerCategory` is positive.
|
|
1107
|
+
* - `on` / `off`: force scrollbar on or off.
|
|
1108
|
+
*/
|
|
1109
|
+
type FootfallByGenderHorizontalScroll = 'auto' | 'on' | 'off';
|
|
1110
|
+
interface FootfallByGenderRow {
|
|
1111
|
+
name: string;
|
|
1112
|
+
male: number;
|
|
1113
|
+
female: number;
|
|
1114
|
+
}
|
|
1115
|
+
interface FootfallByGenderProps {
|
|
1116
|
+
/** Card heading — **centered**; \`headerActions\` (if any) sit on the right without shifting it. */
|
|
1117
|
+
title: string;
|
|
1118
|
+
data: FootfallByGenderRow[];
|
|
1119
|
+
/** Legend / tooltip labels for the two series. Defaults: Male, Female */
|
|
1120
|
+
seriesLabels?: {
|
|
1121
|
+
male: string;
|
|
1122
|
+
female: string;
|
|
1123
|
+
};
|
|
1124
|
+
/** Bar fills. Defaults: #0071C1 (male), #FF7F1E (female) */
|
|
1125
|
+
seriesColors?: {
|
|
1126
|
+
male: string;
|
|
1127
|
+
female: string;
|
|
1128
|
+
};
|
|
1129
|
+
/** Plot area height in px. Default: 430 */
|
|
1130
|
+
chartHeight?: number;
|
|
1131
|
+
/**
|
|
1132
|
+
* Minimum pixels per X-axis category so the chart can grow wider than the card and scroll horizontally.
|
|
1133
|
+
* Set `0` to disable. Default: **72**.
|
|
1134
|
+
*/
|
|
1135
|
+
minWidthPerCategory?: number;
|
|
1136
|
+
/** When horizontal scrolling is allowed. Default: `auto`. */
|
|
1137
|
+
horizontalScroll?: FootfallByGenderHorizontalScroll;
|
|
1138
|
+
/** Recharts `maxBarSize` cap per bar in the group. Default: **32**. */
|
|
1139
|
+
maxBarSize?: number;
|
|
1140
|
+
/** Gap between male/female bars in the same category. Default: **0** (flush). */
|
|
1141
|
+
barGap?: number;
|
|
1142
|
+
/** Color key legend at the **top-right of the visible chart area** (pinned; does not scroll with the plot). Default: `true`. */
|
|
1143
|
+
showLegend?: boolean;
|
|
1144
|
+
/**
|
|
1145
|
+
* Numeric labels above each bar. Default: `true`. Set `false` if labels overlap on dense charts; tooltip still shows values.
|
|
1146
|
+
*/
|
|
1147
|
+
showBarValueLabels?: boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* Opacity for bars in non-hovered categories while another is hovered. Default: **0.3**
|
|
1150
|
+
*/
|
|
1151
|
+
dimmedBarOpacity?: number;
|
|
1152
|
+
/**
|
|
1153
|
+
* Opacity for the hovered category’s bars. Default: **0.9**
|
|
1154
|
+
*/
|
|
1155
|
+
hoveredBarOpacity?: number;
|
|
1156
|
+
/**
|
|
1157
|
+
* Card maximum width. Defaults to full width on xs and 640px from sm up.
|
|
1158
|
+
*/
|
|
1159
|
+
cardMaxWidth?: ChartCardMaxWidth;
|
|
1160
|
+
/** Outer card; merged after defaults (padding, border, width, etc.). */
|
|
1161
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
1162
|
+
/** Wrapper around the centered title row (relative positioning). */
|
|
1163
|
+
titleRowSx?: SxProps$1<Theme$1>;
|
|
1164
|
+
/** Card heading \`Typography\`; merged after default weight/color/centering. */
|
|
1165
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
1166
|
+
/** Under the title row. */
|
|
1167
|
+
dividerSx?: SxProps$1<Theme$1>;
|
|
1168
|
+
/** Pinned legend \`ul\` (top-right overlay). */
|
|
1169
|
+
legendOverlaySx?: SxProps$1<Theme$1>;
|
|
1170
|
+
/** Each legend row (swatch + label). */
|
|
1171
|
+
legendItemSx?: SxProps$1<Theme$1>;
|
|
1172
|
+
/** Legend color swatch \`Box\`. */
|
|
1173
|
+
legendSwatchSx?: SxProps$1<Theme$1>;
|
|
1174
|
+
/** Legend text \`Typography\`. */
|
|
1175
|
+
legendLabelSx?: SxProps$1<Theme$1>;
|
|
1176
|
+
/** Outer box around scroll + legend (matches plot height). */
|
|
1177
|
+
chartViewportSx?: SxProps$1<Theme$1>;
|
|
1178
|
+
/** Horizontally scrollable chart area. */
|
|
1179
|
+
chartScrollAreaSx?: SxProps$1<Theme$1>;
|
|
1180
|
+
/** Outer vertical \`Stack\` (card body). */
|
|
1181
|
+
stackSx?: SxProps$1<Theme$1>;
|
|
1182
|
+
/** Empty state wrapper when \`data\` is empty. */
|
|
1183
|
+
emptyStateSx?: SxProps$1<Theme$1>;
|
|
1184
|
+
/** “No data” \`Typography\`. */
|
|
1185
|
+
emptyStateTextSx?: SxProps$1<Theme$1>;
|
|
1186
|
+
/** Filters / info control — **absolutely positioned** on the right of the title row. */
|
|
1187
|
+
headerActions?: ReactNode;
|
|
1188
|
+
/** Tooltip label before the category name (e.g. Region). Default: Region */
|
|
1189
|
+
tooltipCategoryLabel?: string;
|
|
1190
|
+
/** Tooltip label before the combined male + female total. Default: Overall Walk-ins */
|
|
1191
|
+
tooltipOverallLabel?: string;
|
|
1192
|
+
/** Merge over default tooltip inline styles. */
|
|
1193
|
+
tooltipStyles?: FootfallByGenderTooltipStyles;
|
|
1194
|
+
/** Recharts \`BarChart\` margin; partial merge after defaults (your values override). */
|
|
1195
|
+
chartMargin?: FootfallByGenderChartMargin;
|
|
1196
|
+
/** Grid / axis / bar-top label colors. */
|
|
1197
|
+
chartColors?: FootfallByGenderChartColors;
|
|
1198
|
+
/**
|
|
1199
|
+
* Y-axis tick formatter. Default: compact \`k\` suffix for thousands.
|
|
1200
|
+
*/
|
|
1201
|
+
yAxisTickFormatter?: (value: number) => string;
|
|
1202
|
+
/** Copy when \`data\` is empty. Default: \`No data\` */
|
|
1203
|
+
emptyStateText?: string;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Grouped bar chart: two series (male / female) per category, with hover dimming and a custom tooltip.
|
|
1208
|
+
*/
|
|
1209
|
+
declare function FootfallByGender({ title, data, seriesLabels: seriesLabelsProp, seriesColors: seriesColorsProp, chartHeight, minWidthPerCategory, horizontalScroll: horizontalScrollProp, maxBarSize: maxBarSizeProp, barGap, showLegend, showBarValueLabels, dimmedBarOpacity, hoveredBarOpacity, cardMaxWidth, cardSx, titleRowSx, titleSx, dividerSx, legendOverlaySx, legendItemSx, legendSwatchSx, legendLabelSx, chartViewportSx, chartScrollAreaSx, stackSx, emptyStateSx, emptyStateTextSx, headerActions, tooltipCategoryLabel, tooltipOverallLabel, tooltipStyles, chartMargin: chartMarginProp, chartColors: chartColorsProp, yAxisTickFormatter, emptyStateText, }: FootfallByGenderProps): react_jsx_runtime.JSX.Element;
|
|
1210
|
+
|
|
1211
|
+
interface PasserbyConversionTooltipStyles {
|
|
1212
|
+
container?: CSSProperties;
|
|
1213
|
+
row?: CSSProperties;
|
|
1214
|
+
label?: CSSProperties;
|
|
1215
|
+
value?: CSSProperties;
|
|
1216
|
+
seriesDot?: CSSProperties;
|
|
1217
|
+
seriesName?: CSSProperties;
|
|
1218
|
+
seriesValue?: CSSProperties;
|
|
1219
|
+
}
|
|
1220
|
+
interface PasserbyConversionChartMargin {
|
|
1221
|
+
top?: number;
|
|
1222
|
+
right?: number;
|
|
1223
|
+
bottom?: number;
|
|
1224
|
+
left?: number;
|
|
1225
|
+
}
|
|
1226
|
+
interface PasserbyConversionChartColors {
|
|
1227
|
+
cartesianGridStroke?: string;
|
|
1228
|
+
xAxisLineStroke?: string;
|
|
1229
|
+
axisTickLineStroke?: string;
|
|
1230
|
+
passerbyBarFill?: string;
|
|
1231
|
+
walkInsBarFill?: string;
|
|
1232
|
+
conversionLineStroke?: string;
|
|
1233
|
+
barValueLabelFill?: string;
|
|
1234
|
+
}
|
|
1235
|
+
type PasserbyConversionHorizontalScroll = 'auto' | 'on' | 'off';
|
|
1236
|
+
interface PasserbyConversionRow {
|
|
1237
|
+
/** X-axis category label (e.g. **11am**, **3pm**). */
|
|
1238
|
+
name: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Shown in the tooltip **Time** row. Falls back to **`name`** when omitted.
|
|
1241
|
+
*/
|
|
1242
|
+
timeSlotLabel?: string;
|
|
1243
|
+
passerby: number;
|
|
1244
|
+
walkIns: number;
|
|
1245
|
+
/**
|
|
1246
|
+
* Conversion rate for the line series (same numeric scale as the right Y-axis, e.g. **0–32** as percent points).
|
|
1247
|
+
* Use **`null`** to break the line at this slot.
|
|
1248
|
+
*/
|
|
1249
|
+
conversion: number | null;
|
|
1250
|
+
}
|
|
1251
|
+
interface PasserbyConversionProps {
|
|
1252
|
+
title: string;
|
|
1253
|
+
data: PasserbyConversionRow[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Optional fixed X-axis slots (e.g. full day series), used to render a stable time axis
|
|
1256
|
+
* even when `data` is partial (API hasn’t returned all slots yet).
|
|
1257
|
+
*
|
|
1258
|
+
* When provided, the component will insert missing slots with:
|
|
1259
|
+
* - `passerby: 0`, `walkIns: 0`
|
|
1260
|
+
* - `conversion: null` (so the line breaks instead of dropping to 0)
|
|
1261
|
+
*
|
|
1262
|
+
* Default: `undefined` (use `data` as-is).
|
|
1263
|
+
*/
|
|
1264
|
+
timeSlots?: Array<Pick<PasserbyConversionRow, 'name' | 'timeSlotLabel'>>;
|
|
1265
|
+
/**
|
|
1266
|
+
* When `true` (default) and `timeSlots` is provided, fill missing slots.
|
|
1267
|
+
* Set to `false` to keep `data` as-is while still allowing `timeSlots` to be used elsewhere.
|
|
1268
|
+
*/
|
|
1269
|
+
fillMissingTimeSlots?: boolean;
|
|
1270
|
+
/** Plot height in px. Default: **430**. */
|
|
1271
|
+
chartHeight?: number;
|
|
1272
|
+
/** Legend / tooltip name for passerby bars. Default: **Passerby**. */
|
|
1273
|
+
passerbySeriesName?: string;
|
|
1274
|
+
/** Legend / tooltip name for walk-in bars. Default: **Walk-ins**. */
|
|
1275
|
+
walkInsSeriesName?: string;
|
|
1276
|
+
/** Legend / tooltip name for the conversion line. Default: **Conversion**. */
|
|
1277
|
+
conversionSeriesName?: string;
|
|
1278
|
+
/** Recharts `Line` curve. Default: **`natural`**. */
|
|
1279
|
+
lineType?: 'linear' | 'monotone' | 'natural' | 'basis' | 'step';
|
|
1280
|
+
minWidthPerCategory?: number;
|
|
1281
|
+
horizontalScroll?: PasserbyConversionHorizontalScroll;
|
|
1282
|
+
maxBarSize?: number;
|
|
1283
|
+
/**
|
|
1284
|
+
* Recharts **`barGap`**: horizontal gap between the two grouped bars in each category (passerby vs walk-ins).
|
|
1285
|
+
* Default **0** so the bars touch. Use a number (px) or a percent string (e.g. **`"10%"`**).
|
|
1286
|
+
*/
|
|
1287
|
+
barGap?: number | string;
|
|
1288
|
+
cardMaxWidth?: ChartCardMaxWidth;
|
|
1289
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
1290
|
+
titleRowSx?: SxProps$1<Theme$1>;
|
|
1291
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
1292
|
+
dividerSx?: SxProps$1<Theme$1>;
|
|
1293
|
+
legendRowSx?: SxProps$1<Theme$1>;
|
|
1294
|
+
legendItemSx?: SxProps$1<Theme$1>;
|
|
1295
|
+
legendSwatchSx?: SxProps$1<Theme$1>;
|
|
1296
|
+
legendLabelSx?: SxProps$1<Theme$1>;
|
|
1297
|
+
chartScrollAreaSx?: SxProps$1<Theme$1>;
|
|
1298
|
+
stackSx?: SxProps$1<Theme$1>;
|
|
1299
|
+
emptyStateSx?: SxProps$1<Theme$1>;
|
|
1300
|
+
emptyStateTextSx?: SxProps$1<Theme$1>;
|
|
1301
|
+
headerActions?: ReactNode;
|
|
1302
|
+
/** Tooltip label before the time value. Default: **Time**. */
|
|
1303
|
+
tooltipTimeLabel?: string;
|
|
1304
|
+
/** Tooltip label for walk-ins + passerby total. Default: **Overall**. */
|
|
1305
|
+
tooltipOverallLabel?: string;
|
|
1306
|
+
/** Tooltip label before walk-in count. Defaults to **`walkInsSeriesName`**. */
|
|
1307
|
+
tooltipWalkInsLabel?: string;
|
|
1308
|
+
/** Tooltip label before passerby count. Defaults to **`passerbySeriesName`**. */
|
|
1309
|
+
tooltipPasserbyLabel?: string;
|
|
1310
|
+
/** Tooltip label before conversion value. Default: **Conversion(%)**. */
|
|
1311
|
+
tooltipConversionLabel?: string;
|
|
1312
|
+
/** Format conversion for the tooltip (receives the raw **`conversion`** number). Default: **`n => \`${Math.round(n)}%\``**. */
|
|
1313
|
+
formatTooltipConversion?: (value: number) => string;
|
|
1314
|
+
/** Optional title on the right (conversion) Y-axis. Omitted when unset. */
|
|
1315
|
+
conversionAxisLabel?: string;
|
|
1316
|
+
/** Tick formatter for the left (count) Y-axis. */
|
|
1317
|
+
yAxisTickFormatter?: (value: number) => string;
|
|
1318
|
+
/** Tick formatter for the right (conversion) Y-axis. */
|
|
1319
|
+
conversionAxisTickFormatter?: (value: number) => string;
|
|
1320
|
+
tooltipStyles?: PasserbyConversionTooltipStyles;
|
|
1321
|
+
showLegend?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* When `true` and at least one row has a finite `conversion`, render the line and right axis.
|
|
1324
|
+
* Default: **true**.
|
|
1325
|
+
*/
|
|
1326
|
+
showConversionLine?: boolean;
|
|
1327
|
+
showBarValueLabels?: boolean;
|
|
1328
|
+
chartMargin?: PasserbyConversionChartMargin;
|
|
1329
|
+
chartColors?: PasserbyConversionChartColors;
|
|
1330
|
+
emptyStateText?: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* When `true`, Recharts animates bars and the conversion line on first draw and when values change.
|
|
1333
|
+
* Default **true**. Set **`false`** for very frequent live updates if animation feels heavy.
|
|
1334
|
+
*/
|
|
1335
|
+
isChartAnimationActive?: boolean;
|
|
1336
|
+
/** Bar/line animation duration in ms. Default **400**. */
|
|
1337
|
+
chartAnimationDuration?: number;
|
|
1338
|
+
/**
|
|
1339
|
+
* When horizontal scrolling is active, scroll the plot **to the end** after `data` changes so the
|
|
1340
|
+
* latest categories stay in view (live / streaming). Default **true**. Set **`false`** to keep manual scroll position.
|
|
1341
|
+
*/
|
|
1342
|
+
scrollChartToEndOnDataChange?: boolean;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
declare function PasserbyConversion({ title, data, timeSlots, fillMissingTimeSlots, chartHeight, passerbySeriesName, walkInsSeriesName, conversionSeriesName, lineType, minWidthPerCategory, horizontalScroll: horizontalScrollProp, maxBarSize: maxBarSizeProp, barGap, cardMaxWidth, cardSx, titleRowSx, titleSx, dividerSx, legendRowSx, legendItemSx, legendSwatchSx, legendLabelSx, chartScrollAreaSx, stackSx, emptyStateSx, emptyStateTextSx, headerActions, tooltipTimeLabel, tooltipOverallLabel, tooltipWalkInsLabel, tooltipPasserbyLabel, tooltipConversionLabel, formatTooltipConversion, conversionAxisLabel, yAxisTickFormatter, conversionAxisTickFormatter, tooltipStyles, showLegend, showConversionLine: showConversionLineProp, showBarValueLabels, chartMargin: chartMarginProp, chartColors: chartColorsProp, emptyStateText, isChartAnimationActive, chartAnimationDuration, scrollChartToEndOnDataChange, }: PasserbyConversionProps): react_jsx_runtime.JSX.Element;
|
|
1346
|
+
|
|
1347
|
+
interface WalkinTrafficTooltipStyles {
|
|
1348
|
+
/** Outer flex wrapper (arrow + card). */
|
|
1349
|
+
wrapper?: CSSProperties;
|
|
1350
|
+
/** White panel (shadow, radius, padding). */
|
|
1351
|
+
container?: CSSProperties;
|
|
1352
|
+
/** Title row next to the accent dot. */
|
|
1353
|
+
header?: CSSProperties;
|
|
1354
|
+
/** “Overall Walk-in Traffic” text. */
|
|
1355
|
+
headerTitle?: CSSProperties;
|
|
1356
|
+
/** Accent dot before the title. */
|
|
1357
|
+
headerDot?: CSSProperties;
|
|
1358
|
+
row?: CSSProperties;
|
|
1359
|
+
label?: CSSProperties;
|
|
1360
|
+
value?: CSSProperties;
|
|
1361
|
+
/** Italic footnote under the metrics. */
|
|
1362
|
+
footer?: CSSProperties;
|
|
1363
|
+
}
|
|
1364
|
+
interface WalkinTrafficChartMargin {
|
|
1365
|
+
top?: number;
|
|
1366
|
+
right?: number;
|
|
1367
|
+
bottom?: number;
|
|
1368
|
+
left?: number;
|
|
1369
|
+
}
|
|
1370
|
+
interface WalkinTrafficChartColors {
|
|
1371
|
+
cartesianGridStroke?: string;
|
|
1372
|
+
xAxisLineStroke?: string;
|
|
1373
|
+
axisTickLineStroke?: string;
|
|
1374
|
+
barFill?: string;
|
|
1375
|
+
lineStroke?: string;
|
|
1376
|
+
barValueLabelFill?: string;
|
|
1377
|
+
}
|
|
1378
|
+
type WalkinTrafficHorizontalScroll = 'auto' | 'on' | 'off';
|
|
1379
|
+
interface WalkinTrafficRow {
|
|
1380
|
+
name: string;
|
|
1381
|
+
walkIns: number;
|
|
1382
|
+
/** Optional smooth trend overlay; `null` / omitted breaks the line at this slot. */
|
|
1383
|
+
trend?: number | null;
|
|
1384
|
+
/**
|
|
1385
|
+
* Shown in the tooltip **Time** row (e.g. `2 - 2.59pm`). Falls back to the chart category (`name`) when omitted.
|
|
1386
|
+
*/
|
|
1387
|
+
timeSlotLabel?: string;
|
|
1388
|
+
/** Footfall growth % vs last year for this slot; drives **FF Growth%** row and direction icon. */
|
|
1389
|
+
ffGrowthPercent?: number | null;
|
|
1390
|
+
}
|
|
1391
|
+
interface WalkinTrafficProps {
|
|
1392
|
+
title: string;
|
|
1393
|
+
data: WalkinTrafficRow[];
|
|
1394
|
+
/** Plot height in px. Default: **430**. */
|
|
1395
|
+
chartHeight?: number;
|
|
1396
|
+
/** Legend label and tooltip name for bars. Default: **Walk-ins**. */
|
|
1397
|
+
barSeriesName?: string;
|
|
1398
|
+
/** Legend / tooltip name when the line is listed. Default: **Trend**. */
|
|
1399
|
+
lineSeriesName?: string;
|
|
1400
|
+
/** Recharts `Line` curve. Default: **`natural`**. */
|
|
1401
|
+
lineType?: 'linear' | 'monotone' | 'natural' | 'basis' | 'step';
|
|
1402
|
+
minWidthPerCategory?: number;
|
|
1403
|
+
horizontalScroll?: WalkinTrafficHorizontalScroll;
|
|
1404
|
+
maxBarSize?: number;
|
|
1405
|
+
cardMaxWidth?: ChartCardMaxWidth;
|
|
1406
|
+
cardSx?: SxProps$1<Theme$1>;
|
|
1407
|
+
titleRowSx?: SxProps$1<Theme$1>;
|
|
1408
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
1409
|
+
dividerSx?: SxProps$1<Theme$1>;
|
|
1410
|
+
legendRowSx?: SxProps$1<Theme$1>;
|
|
1411
|
+
legendItemSx?: SxProps$1<Theme$1>;
|
|
1412
|
+
legendSwatchSx?: SxProps$1<Theme$1>;
|
|
1413
|
+
legendLabelSx?: SxProps$1<Theme$1>;
|
|
1414
|
+
chartScrollAreaSx?: SxProps$1<Theme$1>;
|
|
1415
|
+
stackSx?: SxProps$1<Theme$1>;
|
|
1416
|
+
emptyStateSx?: SxProps$1<Theme$1>;
|
|
1417
|
+
emptyStateTextSx?: SxProps$1<Theme$1>;
|
|
1418
|
+
headerActions?: ReactNode;
|
|
1419
|
+
/** Tooltip header (bold, next to accent dot). Default: **Overall Walk-in Traffic**. */
|
|
1420
|
+
tooltipTitle?: string;
|
|
1421
|
+
/** Label before the time range. Default: **Time**. */
|
|
1422
|
+
tooltipTimeLabel?: string;
|
|
1423
|
+
/** Label before current-year bar value. Default: **Current Year Walk-ins**. */
|
|
1424
|
+
tooltipCurrentYearLabel?: string;
|
|
1425
|
+
/** Label before line / last-year value. Default: **Last Year Walk-ins**. */
|
|
1426
|
+
tooltipLastYearLabel?: string;
|
|
1427
|
+
/** Label before growth %. Default: **FF Growth%**. */
|
|
1428
|
+
tooltipGrowthLabel?: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* Italic footnote under the metrics (FF Growth % disclaimer).
|
|
1431
|
+
* When **omitted** (`undefined`), the standard disclaimer is shown. Pass **`null`** or **`''`** for a compact tooltip without the footnote.
|
|
1432
|
+
*/
|
|
1433
|
+
tooltipFooterNote?: string | null;
|
|
1434
|
+
/** @deprecated Use **`tooltipTimeLabel`** instead. */
|
|
1435
|
+
tooltipHourLabel?: string;
|
|
1436
|
+
tooltipStyles?: WalkinTrafficTooltipStyles;
|
|
1437
|
+
showLegend?: boolean;
|
|
1438
|
+
/**
|
|
1439
|
+
* When `true` and at least one row has a finite `trend`, render the line.
|
|
1440
|
+
* Default: **true**.
|
|
1441
|
+
*/
|
|
1442
|
+
showTrendLine?: boolean;
|
|
1443
|
+
/** Add a second legend item for the line. Default: **false**. */
|
|
1444
|
+
showLineInLegend?: boolean;
|
|
1445
|
+
showBarValueLabels?: boolean;
|
|
1446
|
+
chartMargin?: WalkinTrafficChartMargin;
|
|
1447
|
+
chartColors?: WalkinTrafficChartColors;
|
|
1448
|
+
yAxisTickFormatter?: (value: number) => string;
|
|
1449
|
+
emptyStateText?: string;
|
|
1450
|
+
/**
|
|
1451
|
+
* Recharts animation for bars and trend line. Defaults **true** / **400** ms.
|
|
1452
|
+
* Set **`isChartAnimationActive={false}`** for very frequent updates.
|
|
1453
|
+
*/
|
|
1454
|
+
isChartAnimationActive?: boolean;
|
|
1455
|
+
chartAnimationDuration?: number;
|
|
1456
|
+
/**
|
|
1457
|
+
* When horizontal scroll is active, scroll to the **latest** categories after `data` changes.
|
|
1458
|
+
* Default **true**.
|
|
1459
|
+
*/
|
|
1460
|
+
scrollChartToEndOnDataChange?: boolean;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
declare function WalkinTraffic({ title, data, chartHeight, barSeriesName, lineSeriesName, lineType, minWidthPerCategory, horizontalScroll: horizontalScrollProp, maxBarSize: maxBarSizeProp, cardMaxWidth, cardSx, titleRowSx, titleSx, dividerSx, legendRowSx, legendItemSx, legendSwatchSx, legendLabelSx, chartScrollAreaSx, stackSx, emptyStateSx, emptyStateTextSx, headerActions, tooltipTitle, tooltipTimeLabel, tooltipCurrentYearLabel, tooltipLastYearLabel, tooltipGrowthLabel, tooltipFooterNote: tooltipFooterNoteProp, tooltipHourLabel, tooltipStyles, showLegend, showTrendLine: showTrendLineProp, showLineInLegend, showBarValueLabels, chartMargin: chartMarginProp, chartColors: chartColorsProp, yAxisTickFormatter, emptyStateText, isChartAnimationActive, chartAnimationDuration, scrollChartToEndOnDataChange, }: WalkinTrafficProps): react_jsx_runtime.JSX.Element;
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* Treemap data helpers for FootFallHeatMap.
|
|
1467
|
+
* Recharts expects nested `children`; our tree uses `list` internally.
|
|
1468
|
+
*/
|
|
1469
|
+
type ZoneAnalyticsHierarchy = {
|
|
1470
|
+
Country?: Record<string, unknown>;
|
|
1471
|
+
Region?: Record<string, unknown>;
|
|
1472
|
+
State?: Record<string, unknown>;
|
|
1473
|
+
City?: Record<string, unknown>;
|
|
1474
|
+
};
|
|
1475
|
+
type ZoneAnalyticsFlatItem = {
|
|
1476
|
+
category_id: number;
|
|
1477
|
+
category_name: string;
|
|
1478
|
+
percentage: number;
|
|
1479
|
+
visitor_count: number;
|
|
1480
|
+
avg_dwell_time: string;
|
|
1481
|
+
/** Optional; same shape as hierarchy `zone_kpi_strip` when this row should drive the strip alone. */
|
|
1482
|
+
zone_kpi_strip?: Record<string, unknown>;
|
|
1483
|
+
};
|
|
1484
|
+
type ZoneAnalyticsMetrics = {
|
|
1485
|
+
overall_visits?: number;
|
|
1486
|
+
trend?: {
|
|
1487
|
+
direction?: 'up' | 'down';
|
|
1488
|
+
percentage?: number;
|
|
1489
|
+
};
|
|
1490
|
+
unique_customer_walkins?: number;
|
|
1491
|
+
walkins_trend?: {
|
|
1492
|
+
direction?: 'up' | 'down';
|
|
1493
|
+
percentage?: number;
|
|
1494
|
+
};
|
|
1495
|
+
first_visit_count?: number;
|
|
1496
|
+
first_visit_trend?: {
|
|
1497
|
+
direction?: 'up' | 'down';
|
|
1498
|
+
percentage?: number;
|
|
1499
|
+
};
|
|
1500
|
+
avg_wait_time_per_visitor?: string;
|
|
1501
|
+
wait_time_trend?: {
|
|
1502
|
+
direction?: 'up' | 'down';
|
|
1503
|
+
percentage?: number;
|
|
1504
|
+
};
|
|
1505
|
+
attended_customers?: number;
|
|
1506
|
+
attended_trend?: {
|
|
1507
|
+
direction?: 'up' | 'down';
|
|
1508
|
+
percentage?: number;
|
|
1509
|
+
};
|
|
1510
|
+
unattended_customers?: number;
|
|
1511
|
+
unattended_trend?: {
|
|
1512
|
+
direction?: 'up' | 'down';
|
|
1513
|
+
percentage?: number;
|
|
1514
|
+
};
|
|
1515
|
+
avg_dwell_time?: string;
|
|
1516
|
+
dwell_time_trend?: {
|
|
1517
|
+
direction?: 'up' | 'down';
|
|
1518
|
+
percentage?: number;
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
/** Optional per-zone KPI + 3-segment bar from API (`zone_kpi_strip` on hierarchy nodes). Same layout at every level; values vary by zone. */
|
|
1522
|
+
type ZoneKpiStripPayload = {
|
|
1523
|
+
storeCount: number;
|
|
1524
|
+
overallVisitors: number;
|
|
1525
|
+
segments: [
|
|
1526
|
+
{
|
|
1527
|
+
label: string;
|
|
1528
|
+
value: number;
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
label: string;
|
|
1532
|
+
value: number;
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
label: string;
|
|
1536
|
+
value: number;
|
|
1537
|
+
}
|
|
1538
|
+
];
|
|
1539
|
+
};
|
|
1540
|
+
type TreemapNode = {
|
|
1541
|
+
name: string;
|
|
1542
|
+
value: number;
|
|
1543
|
+
originalValue: number;
|
|
1544
|
+
color: string;
|
|
1545
|
+
overallData: {
|
|
1546
|
+
count: number | string;
|
|
1547
|
+
dwell: string;
|
|
1548
|
+
};
|
|
1549
|
+
list: TreemapNode[];
|
|
1550
|
+
/** Set when passing to Recharts Treemap (uses `children` for nesting). */
|
|
1551
|
+
children?: TreemapNode[];
|
|
1552
|
+
leafMetrics?: ZoneAnalyticsMetrics;
|
|
1553
|
+
/** When set, KPI strip + single segmented row use these values for this zone (when it is the active drill context). */
|
|
1554
|
+
zoneKpiStrip?: ZoneKpiStripPayload;
|
|
1555
|
+
_childContainerKey?: string;
|
|
1556
|
+
_raw?: number;
|
|
1557
|
+
};
|
|
1558
|
+
/** Recharts Treemap reads `children`, not `list`. */
|
|
1559
|
+
declare function toRechartsTreemapData(nodes: TreemapNode[]): TreemapNode[];
|
|
1560
|
+
declare function preprocessData(data: TreemapNode[]): TreemapNode[];
|
|
1561
|
+
declare function skipSingleBranchLevels(nodes: TreemapNode[]): TreemapNode[];
|
|
1562
|
+
declare function parseMinutes(avgDwellTime?: string): number;
|
|
1563
|
+
declare function isPlainObject(v: unknown): v is Record<string, unknown>;
|
|
1564
|
+
declare function getChildContainer(node: unknown): {
|
|
1565
|
+
key: string;
|
|
1566
|
+
container: Record<string, unknown>;
|
|
1567
|
+
} | null;
|
|
1568
|
+
declare function metricForNode(node: unknown, sortBy: 'walkins' | 'dwell'): number;
|
|
1569
|
+
/** Read optional `zone_kpi_strip` / `zoneKpiStrip` from a hierarchy or flat API node. */
|
|
1570
|
+
declare function parseZoneKpiStripFromRaw(node: Record<string, unknown>): ZoneKpiStripPayload | undefined;
|
|
1571
|
+
declare function hashColor(seed: string): string;
|
|
1572
|
+
declare function buildTreemapNodes({ container, sortBy, pathKey, }: {
|
|
1573
|
+
container: Record<string, unknown>;
|
|
1574
|
+
sortBy: 'walkins' | 'dwell';
|
|
1575
|
+
pathKey: string;
|
|
1576
|
+
}): TreemapNode[];
|
|
1577
|
+
declare function getNestedList(payload: TreemapNode & {
|
|
1578
|
+
children?: TreemapNode[];
|
|
1579
|
+
}): TreemapNode[] | undefined;
|
|
1580
|
+
|
|
1581
|
+
declare const DEFAULT_FOOTFALL_TILE_ICONS: {
|
|
1582
|
+
readonly visitors: "fluent:people-community-16-filled";
|
|
1583
|
+
readonly dwell: "clarity:clock-solid";
|
|
1584
|
+
readonly headerInfo: "mdi:information-outline";
|
|
1585
|
+
};
|
|
1586
|
+
type FootFallHeatMapTileIconRole = 'visitors' | 'dwell' | 'header';
|
|
1587
|
+
type FootFallHeatMapIconSizeContext = {
|
|
1588
|
+
/** Auto baseline from tile geometry (px). */
|
|
1589
|
+
baseIconSize: number;
|
|
1590
|
+
role: FootFallHeatMapTileIconRole;
|
|
1591
|
+
fontSize: number;
|
|
1592
|
+
minDim: number;
|
|
1593
|
+
effectiveDim: number;
|
|
1594
|
+
};
|
|
1595
|
+
/** Pixel size or scale from `baseIconSize` / geometry. */
|
|
1596
|
+
type FootFallHeatMapIconSize = 'auto' | number | ((ctx: FootFallHeatMapIconSizeContext) => number);
|
|
1597
|
+
/** `tile` = match tile fill color; otherwise CSS color string or resolver. */
|
|
1598
|
+
type FootFallHeatMapIconColor = 'tile' | string | ((ctx: {
|
|
1599
|
+
tileColor: string;
|
|
1600
|
+
role: FootFallHeatMapTileIconRole;
|
|
1601
|
+
}) => string);
|
|
1602
|
+
type FootFallHeatMapIcons = {
|
|
1603
|
+
/** Iconify id for the visitor count chip in each tile. */
|
|
1604
|
+
visitors?: string;
|
|
1605
|
+
/** Iconify id for the dwell time chip. */
|
|
1606
|
+
dwell?: string;
|
|
1607
|
+
/** Iconify id for the title-row info button. */
|
|
1608
|
+
headerInfo?: string;
|
|
1609
|
+
};
|
|
1610
|
+
type FootFallHeatMapTreemapLayout = {
|
|
1611
|
+
/** Pixel height when a breadcrumb strip is visible above the chart. */
|
|
1612
|
+
heightWithBreadcrumb?: number;
|
|
1613
|
+
/** Pixel height when there is no breadcrumb. */
|
|
1614
|
+
heightWithoutBreadcrumb?: number;
|
|
1615
|
+
/** Optional pixel height for terminal single-card view (default falls back to `heightWithBreadcrumb`). */
|
|
1616
|
+
terminalSingleCardHeight?: number;
|
|
1617
|
+
/** Optional pixel height for the blank body below terminal details strip (default: derived from treemap height). */
|
|
1618
|
+
leafDetailsBodyHeight?: number;
|
|
1619
|
+
/** Recharts treemap aspect ratio (width/height per sector logic). */
|
|
1620
|
+
aspectRatio?: number;
|
|
1621
|
+
stroke?: string;
|
|
1622
|
+
fill?: string;
|
|
1623
|
+
/** MUI `sx` merged onto the blank terminal-details body below the KPI strip. */
|
|
1624
|
+
leafDetailsBodySx?: SxProps$1<Theme$1>;
|
|
1625
|
+
};
|
|
1626
|
+
type FootFallHeatMapTreeOptions = {
|
|
1627
|
+
/** Starting hierarchy level shown in treemap for hierarchical payloads. */
|
|
1628
|
+
startFromLevel?: 'Country' | 'Region' | 'State' | 'City';
|
|
1629
|
+
/**
|
|
1630
|
+
* Optional path to a specific hierarchy node to render first.
|
|
1631
|
+
* Example: `'India/North'` or `['India', 'North']`.
|
|
1632
|
+
* When provided, this takes precedence over `startFromLevel`.
|
|
1633
|
+
*/
|
|
1634
|
+
startFromPath?: string | string[];
|
|
1635
|
+
/**
|
|
1636
|
+
* `children` (default): render selected node's immediate children.
|
|
1637
|
+
* `self`: render only the selected node tile.
|
|
1638
|
+
*/
|
|
1639
|
+
startFromPathMode?: 'children' | 'self';
|
|
1640
|
+
/**
|
|
1641
|
+
* Behavior at terminal node (no deeper hierarchy, or final Stores level).
|
|
1642
|
+
* - `details` (default): compact KPI + segmented detail view (treemap cleared; optional details body below).
|
|
1643
|
+
* - `card`: keep drilling into a single treemap tile when there is no zone KPI strip; when a KPI strip is
|
|
1644
|
+
* derived for the terminal zone, the duplicate treemap is omitted so only breadcrumb + KPI strip remain.
|
|
1645
|
+
*/
|
|
1646
|
+
terminalNodeView?: 'card' | 'details';
|
|
1647
|
+
/** Sort metric when building node weights from API payloads. */
|
|
1648
|
+
sortBy?: 'walkins' | 'dwell';
|
|
1649
|
+
/**
|
|
1650
|
+
* When true, if the root (or a drill level) has exactly one child, the treemap jumps into that child automatically.
|
|
1651
|
+
* Default **false** so **Region → State → City** (and other levels) stay visible instead of skipping straight to cities.
|
|
1652
|
+
*/
|
|
1653
|
+
collapseSingleChildLevels?: boolean;
|
|
1654
|
+
/**
|
|
1655
|
+
* Replace default hierarchy/flat parsing. Return root-level `TreemapNode[]`
|
|
1656
|
+
* (each node may nest `list` children).
|
|
1657
|
+
*/
|
|
1658
|
+
buildNodes?: (initialData: ZoneAnalyticsHierarchy | ZoneAnalyticsFlatItem[] | null, options: {
|
|
1659
|
+
sortBy: 'walkins' | 'dwell';
|
|
1660
|
+
}) => TreemapNode[];
|
|
1661
|
+
};
|
|
1662
|
+
/** KPI numbers used for the summary row and passed to `summaryCards`. */
|
|
1663
|
+
type FootFallHeatMapSummaryKpis = {
|
|
1664
|
+
storeCount: number;
|
|
1665
|
+
overallVisitors: number;
|
|
1666
|
+
};
|
|
1667
|
+
/** One summary KPI card above the segmented bar (Iconify icon + title + value). */
|
|
1668
|
+
type FootFallHeatMapKpiSummaryCardItem = {
|
|
1669
|
+
id: string;
|
|
1670
|
+
title: string;
|
|
1671
|
+
value: number;
|
|
1672
|
+
/** Iconify id. Default `mdi:chart-box-outline`. */
|
|
1673
|
+
icon?: string;
|
|
1674
|
+
/** Merged after shared `statCardSx`. */
|
|
1675
|
+
sx?: SxProps$1<Theme$1>;
|
|
1676
|
+
/** Per-card icon color; falls back to `statCardIconColor`. */
|
|
1677
|
+
iconColor?: string;
|
|
1678
|
+
};
|
|
1679
|
+
/**
|
|
1680
|
+
* Optional styling for the zone KPI block: summary stat cards, outer panel, segmented bar, and tooltips.
|
|
1681
|
+
* Segment colors cycle by index when the palette is shorter than the number of segments.
|
|
1682
|
+
*/
|
|
1683
|
+
type FootFallHeatMapKpiStripPresentation = {
|
|
1684
|
+
/** Override segment fills; cycles when fewer entries than segments. */
|
|
1685
|
+
segmentColors?: readonly string[];
|
|
1686
|
+
/** Bar height in px. */
|
|
1687
|
+
barHeight?: number;
|
|
1688
|
+
/** Horizontal padding inside the track in px (inset from rounded caps). */
|
|
1689
|
+
trackInsetPx?: number;
|
|
1690
|
+
/** Track background behind segments. */
|
|
1691
|
+
trackBackgroundColor?: string;
|
|
1692
|
+
/** Merged onto the outer KPI panel (container under the breadcrumb). Applied after built-in layout styles. */
|
|
1693
|
+
kpiContainerSx?: SxProps$1<Theme$1>;
|
|
1694
|
+
/** Merged onto each summary stat card (`Paper`). */
|
|
1695
|
+
statCardSx?: SxProps$1<Theme$1>;
|
|
1696
|
+
/** Icon color for both stat cards. Default `#1565C0`. */
|
|
1697
|
+
statCardIconColor?: string;
|
|
1698
|
+
/** Zone / row title next to the segmented bar. */
|
|
1699
|
+
segmentTitleSx?: SxProps$1<Theme$1>;
|
|
1700
|
+
/** Total value on the right of the segment row. */
|
|
1701
|
+
segmentValueSx?: SxProps$1<Theme$1>;
|
|
1702
|
+
/** Merged onto the segment tooltip card (popover). */
|
|
1703
|
+
segmentTooltipCardSx?: SxProps$1<Theme$1>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Build any number of summary KPI cards from live zone metrics. When the returned array is **non-empty**,
|
|
1706
|
+
* it replaces the default “No. of Stores” / “Overall Visitors” pair. Return `[]` to hide all summary cards.
|
|
1707
|
+
*/
|
|
1708
|
+
summaryCards?: (kpi: FootFallHeatMapSummaryKpis) => readonly FootFallHeatMapKpiSummaryCardItem[];
|
|
1709
|
+
};
|
|
1710
|
+
type FootFallHeatMapViewProps = {
|
|
1711
|
+
initialData: ZoneAnalyticsHierarchy | ZoneAnalyticsFlatItem[] | null;
|
|
1712
|
+
isLoading?: boolean;
|
|
1713
|
+
isFetching?: boolean;
|
|
1714
|
+
error?: unknown;
|
|
1715
|
+
title?: string;
|
|
1716
|
+
/** Tooltip on the header info icon. */
|
|
1717
|
+
infoTooltip?: string;
|
|
1718
|
+
/** Shown in the drill breadcrumb after `/` (e.g. store name). */
|
|
1719
|
+
brandLabel?: string;
|
|
1720
|
+
icons?: FootFallHeatMapIcons;
|
|
1721
|
+
iconSize?: FootFallHeatMapIconSize;
|
|
1722
|
+
iconColor?: FootFallHeatMapIconColor;
|
|
1723
|
+
/** Info button icon width/height in px when `iconSize` is `auto` (header role). */
|
|
1724
|
+
headerInfoIconSize?: number;
|
|
1725
|
+
treemap?: FootFallHeatMapTreemapLayout;
|
|
1726
|
+
tree?: FootFallHeatMapTreeOptions;
|
|
1727
|
+
/**
|
|
1728
|
+
* KPI zone UI: optional **`summaryCards(kpi)`** for any number of summary stat cards; segmented bar; outer
|
|
1729
|
+
* panel; `statCardSx` / `statCardIconColor`; segment row + tooltip styling.
|
|
1730
|
+
*/
|
|
1731
|
+
kpiStrip?: FootFallHeatMapKpiStripPresentation;
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* In-store zone treemap with drill-down and leaf KPIs. Pass `initialData` from your API or mocks.
|
|
1736
|
+
*/
|
|
1737
|
+
declare function FootFallHeatMapView({ initialData, isLoading, isFetching, error, title, infoTooltip, brandLabel, icons: iconsProp, iconSize: iconSizeProp, iconColor: iconColorProp, headerInfoIconSize, treemap: treemapProp, tree: treeProp, kpiStrip: kpiStripPresentation, }: FootFallHeatMapViewProps): react_jsx_runtime.JSX.Element;
|
|
1738
|
+
|
|
1739
|
+
/** Zone KPI grid using MUI layout. */
|
|
1740
|
+
declare const ZoneWiseKpiCards: ({ metrics }: {
|
|
1741
|
+
metrics: ZoneAnalyticsMetrics;
|
|
1742
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Shared queue-time visualization palette (stacked bar, donut, area).
|
|
1746
|
+
* Four violet shades, light → dark (segment index order) — pill bar / donut / area.
|
|
1747
|
+
*/
|
|
1748
|
+
declare const QUEUE_CHART_COLORS: readonly ["#E9E5FF", "#C4B5FD", "#8B5CF6", "#6D28D9"];
|
|
1749
|
+
/** Thin horizontal stacked bar height (px); pill radius uses half of this. */
|
|
1750
|
+
declare const QUEUE_STACKED_BAR_THICKNESS_PX = 8;
|
|
1751
|
+
|
|
1752
|
+
type QueueTimeBreakdownCustomizationProviderProps = {
|
|
1753
|
+
value: QueueTimeBreakdownCustomization;
|
|
1754
|
+
children: React$1.ReactNode;
|
|
1755
|
+
};
|
|
1756
|
+
declare function QueueTimeBreakdownCustomizationProvider({ value, children, }: QueueTimeBreakdownCustomizationProviderProps): React$1.ReactElement;
|
|
1757
|
+
declare function useQueueTimeBreakdownCustomization(): QueueTimeBreakdownCustomization;
|
|
1758
|
+
|
|
1759
|
+
declare function mergeCss(a: CSSProperties, b?: CSSProperties): CSSProperties;
|
|
1760
|
+
declare function mergeSx(...parts: Array<SxProps$1<Theme$1> | undefined>): SxProps$1<Theme$1> | undefined;
|
|
1761
|
+
declare function mergeRechartsTooltipStyles(overrides?: QueueTimeRechartsTooltipTheme): {
|
|
1762
|
+
contentStyle: CSSProperties;
|
|
1763
|
+
itemStyle: CSSProperties;
|
|
1764
|
+
labelStyle: CSSProperties;
|
|
1765
|
+
wrapperStyle: CSSProperties;
|
|
1766
|
+
};
|
|
1767
|
+
declare function mergeAreaTooltipStyles(overrides?: QueueTimeAreaTooltipTheme): Required<QueueTimeAreaTooltipTheme>;
|
|
1768
|
+
|
|
1769
|
+
/** Demo data for Storybook / prototyping. */
|
|
1770
|
+
declare function generateMockPerformanceData(): QueueTimeBreakdownBarRow[];
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Queue time breakdown dashboard widget: stacked bars, queue buckets, donut comparison, area chart (Recharts).
|
|
1774
|
+
*/
|
|
1775
|
+
declare function QueueTimeBreakdown({ data, Donut_data, donutYesterdayData, headerImageSrc, headlineTotal, headlineSubtitle, dataComparisonTitle, queueBucketLegend, title, infoPopover, customization, }: QueueTimeBreakdownProps): React$1.ReactElement;
|
|
1776
|
+
|
|
1777
|
+
type QueueTimeBreakdownDonutProps = {
|
|
1778
|
+
chartFilter: QueueTimeChartFilter;
|
|
1779
|
+
averageData: number[];
|
|
1780
|
+
LabelName: string;
|
|
1781
|
+
labels?: readonly string[];
|
|
1782
|
+
};
|
|
1783
|
+
declare function QueueTimeBreakdownDonut({ chartFilter, averageData, LabelName, labels, }: QueueTimeBreakdownDonutProps): React$1.ReactElement;
|
|
1784
|
+
|
|
1785
|
+
type QueueTimeBreakdownStackedBarProps = {
|
|
1786
|
+
row: QueueTimeBreakdownBarRow;
|
|
1787
|
+
/** One entry per segment: percent line + range line (aligned under each slice). */
|
|
1788
|
+
legendRows: readonly QueueBucketLegendItem[];
|
|
1789
|
+
};
|
|
1790
|
+
/**
|
|
1791
|
+
* Horizontal 100% stacked bar (Recharts) — slim pill, framed by two rules; labels use the same flex widths as data.
|
|
1792
|
+
*/
|
|
1793
|
+
declare function QueueTimeBreakdownStackedBar({ row, legendRows, }: QueueTimeBreakdownStackedBarProps): React$1.ReactElement;
|
|
1794
|
+
|
|
1795
|
+
type QueueTimeAreaSeriesPoint = {
|
|
1796
|
+
name: string;
|
|
1797
|
+
data: number[];
|
|
1798
|
+
};
|
|
1799
|
+
type QueueTimeBreakdownAreaProps = {
|
|
1800
|
+
series: QueueTimeAreaSeriesPoint[];
|
|
1801
|
+
xAxis: string[];
|
|
1802
|
+
};
|
|
1803
|
+
declare const QueueTimeBreakdownArea: ({ series, xAxis, }: QueueTimeBreakdownAreaProps) => React$1.ReactElement;
|
|
1804
|
+
|
|
1805
|
+
declare function getQueueTimeBreakdownAreaXAxisData(type: QueueTimeChartFilter): string[];
|
|
1806
|
+
declare function getQueueTimeBreakdownAreaSeriesData(type: QueueTimeChartFilter): QueueTimeAreaSeriesPoint[];
|
|
1807
|
+
|
|
1808
|
+
/** Primary line + tooltip fill (violet). */
|
|
1809
|
+
declare const BILLING_COUNTER_LINE_PRIMARY: "#7C3AED";
|
|
1810
|
+
/** Default pill track behind segmented tabs. */
|
|
1811
|
+
declare const BILLING_COUNTER_TABS_TRACK_BG: "#E8E8E8";
|
|
1812
|
+
|
|
1813
|
+
type BillingCounterChartMargin = {
|
|
1814
|
+
top?: number;
|
|
1815
|
+
right?: number;
|
|
1816
|
+
bottom?: number;
|
|
1817
|
+
left?: number;
|
|
1818
|
+
};
|
|
1819
|
+
/**
|
|
1820
|
+
* Simple panel tooltip: thin **grey bar** on top, then white body. Each line uses **muted prefix**
|
|
1821
|
+
* (**Date:** / **Total:**) + **bold dark value** (same pattern as the earlier two-row design).
|
|
1822
|
+
*/
|
|
1823
|
+
type BillingCounterAnalyticsTooltipTheme = {
|
|
1824
|
+
borderColor?: string;
|
|
1825
|
+
borderRadiusPx?: number;
|
|
1826
|
+
boxShadow?: string;
|
|
1827
|
+
/** Grey strip at the top (no text). @default **#E5E7EB** */
|
|
1828
|
+
topBarBackground?: string;
|
|
1829
|
+
/** Height of the grey strip in px. @default **8** */
|
|
1830
|
+
topBarHeightPx?: number;
|
|
1831
|
+
bodyBackground?: string;
|
|
1832
|
+
/** **Date:** / **Total:** label colour. @default **#6B7280** */
|
|
1833
|
+
prefixColor?: string;
|
|
1834
|
+
/** Date string and numeric value colour. @default **#111827** */
|
|
1835
|
+
valueColor?: string;
|
|
1836
|
+
/**
|
|
1837
|
+
* When set without **prefixColor** / **valueColor**, both prefix and value use this single colour
|
|
1838
|
+
* (legacy / compact override).
|
|
1839
|
+
*/
|
|
1840
|
+
textColor?: string;
|
|
1841
|
+
fontSizePx?: number;
|
|
1842
|
+
/** Space between the two text lines in px. @default **6** */
|
|
1843
|
+
lineGapPx?: number;
|
|
1844
|
+
dateLabelPrefix?: string;
|
|
1845
|
+
totalLabelPrefix?: string;
|
|
1846
|
+
/** **Date:** / **Total:** — default **400** */
|
|
1847
|
+
prefixFontWeight?: number;
|
|
1848
|
+
/** Time label and numeric value — default **700** */
|
|
1849
|
+
valueFontWeight?: number;
|
|
1850
|
+
bodyStyle?: CSSProperties;
|
|
1851
|
+
};
|
|
1852
|
+
/**
|
|
1853
|
+
* Optional layout / theme overrides for **BillingCounterAnalytics** and its children.
|
|
1854
|
+
* Pass via **`customization`** on the component or **BillingCounterAnalyticsCustomizationProvider**.
|
|
1855
|
+
*/
|
|
1856
|
+
type BillingCounterAnalyticsCustomization = {
|
|
1857
|
+
rootCard?: {
|
|
1858
|
+
sx?: SxProps$1<Theme$1>;
|
|
1859
|
+
elevation?: number;
|
|
1860
|
+
};
|
|
1861
|
+
header?: {
|
|
1862
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
1863
|
+
};
|
|
1864
|
+
/** Merged into **ChartWidgetSegmentedTabs** alongside billing defaults. */
|
|
1865
|
+
segmentedTabs?: {
|
|
1866
|
+
trackBackgroundColor?: string;
|
|
1867
|
+
activeTabBackground?: string;
|
|
1868
|
+
activeTabColor?: string;
|
|
1869
|
+
inactiveTabColor?: string;
|
|
1870
|
+
activeTabBoxShadow?: string;
|
|
1871
|
+
rootSx?: SxProps$1<Theme$1>;
|
|
1872
|
+
tabFontSize?: number | string;
|
|
1873
|
+
fullWidth?: boolean;
|
|
1874
|
+
/** Segmented tab flex layout; billing defaults to **equalWidth** (tabs fill the track). */
|
|
1875
|
+
tabLayout?: ChartWidgetSegmentedTabLayout;
|
|
1876
|
+
activeTabFontWeight?: number;
|
|
1877
|
+
inactiveTabFontWeight?: number;
|
|
1878
|
+
};
|
|
1879
|
+
lineChart?: {
|
|
1880
|
+
heightPx?: number;
|
|
1881
|
+
lineColor?: string;
|
|
1882
|
+
lineStrokeWidth?: number;
|
|
1883
|
+
gridStroke?: string;
|
|
1884
|
+
gridStrokeDasharray?: string;
|
|
1885
|
+
margin?: BillingCounterChartMargin;
|
|
1886
|
+
xAxisTickFill?: string;
|
|
1887
|
+
yAxisTickFill?: string;
|
|
1888
|
+
yAxisWidth?: number;
|
|
1889
|
+
tooltip?: BillingCounterAnalyticsTooltipTheme;
|
|
1890
|
+
cursorStroke?: string;
|
|
1891
|
+
cursorStrokeDasharray?: string;
|
|
1892
|
+
/**
|
|
1893
|
+
* Line path: **`linear`** = straight segments (sharp corners). **`monotone`** = smooth curve.
|
|
1894
|
+
* @default **`linear`**
|
|
1895
|
+
*/
|
|
1896
|
+
lineType?: 'linear' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' | 'natural';
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
declare const DEFAULT_BILLING_COUNTER_ANALYTICS_INFO_POPOVER: ChartWidgetInfoPopoverContent;
|
|
1901
|
+
|
|
1902
|
+
type BillingCounterAnalyticsPoint = {
|
|
1903
|
+
/** X-axis tick (e.g. Jan 12, Today). */
|
|
1904
|
+
label: string;
|
|
1905
|
+
value: number;
|
|
1906
|
+
};
|
|
1907
|
+
type BillingCounterAnalyticsProps = {
|
|
1908
|
+
/** Card title (left side of the header row). */
|
|
1909
|
+
title?: string;
|
|
1910
|
+
tabs: ChartWidgetSegmentedTab[];
|
|
1911
|
+
activeTabId: string;
|
|
1912
|
+
onTabChange: (tabId: string) => void;
|
|
1913
|
+
/**
|
|
1914
|
+
* Series for the active tab only. Ignored when **`seriesByTabId`** is set.
|
|
1915
|
+
*/
|
|
1916
|
+
data?: BillingCounterAnalyticsPoint[];
|
|
1917
|
+
/**
|
|
1918
|
+
* All tab series keyed by **`tabs[].id`**. When set, overrides **`data`**.
|
|
1919
|
+
*/
|
|
1920
|
+
seriesByTabId?: Record<string, BillingCounterAnalyticsPoint[]>;
|
|
1921
|
+
/** Y-axis domain. @default `[0, 100]` */
|
|
1922
|
+
yAxisDomain?: [number, number];
|
|
1923
|
+
/** Y-axis tick values. @default `[20, 40, 60, 80, 100]` */
|
|
1924
|
+
yAxisTicks?: number[];
|
|
1925
|
+
/**
|
|
1926
|
+
* Header info popover. Defaults to built-in copy; **`null`** hides separator + info button.
|
|
1927
|
+
*/
|
|
1928
|
+
infoPopover?: ChartWidgetInfoPopoverContent | null;
|
|
1929
|
+
customization?: BillingCounterAnalyticsCustomization;
|
|
1930
|
+
};
|
|
1931
|
+
|
|
1932
|
+
declare const billingCounterDefaultTabs: ChartWidgetSegmentedTab[];
|
|
1933
|
+
/** Demo datasets aligned with **billingCounterDefaultTabs** ids. */
|
|
1934
|
+
declare const billingCounterMockSeriesByTabId: Record<string, BillingCounterAnalyticsPoint[]>;
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Billing counter analytics card: title row (optional info), pill tabs, Recharts line chart with violet styling.
|
|
1938
|
+
*/
|
|
1939
|
+
declare function BillingCounterAnalytics({ title, tabs, activeTabId, onTabChange, data, seriesByTabId, yAxisDomain, yAxisTicks, infoPopover, customization, }: BillingCounterAnalyticsProps): React$1.ReactElement;
|
|
1940
|
+
|
|
1941
|
+
type BillingCounterAnalyticsCustomizationProviderProps = {
|
|
1942
|
+
value: BillingCounterAnalyticsCustomization;
|
|
1943
|
+
children: React$1.ReactNode;
|
|
1944
|
+
};
|
|
1945
|
+
declare function BillingCounterAnalyticsCustomizationProvider({ value, children, }: BillingCounterAnalyticsCustomizationProviderProps): React$1.ReactElement;
|
|
1946
|
+
declare function useBillingCounterAnalyticsCustomization(): BillingCounterAnalyticsCustomization;
|
|
1947
|
+
|
|
1948
|
+
type PeakBillingHoursChartMargin = {
|
|
1949
|
+
top?: number;
|
|
1950
|
+
right?: number;
|
|
1951
|
+
bottom?: number;
|
|
1952
|
+
left?: number;
|
|
1953
|
+
};
|
|
1954
|
+
type PeakBillingHoursCustomization = {
|
|
1955
|
+
rootCard?: {
|
|
1956
|
+
sx?: SxProps$1<Theme$1>;
|
|
1957
|
+
elevation?: number;
|
|
1958
|
+
};
|
|
1959
|
+
header?: {
|
|
1960
|
+
titleSx?: SxProps$1<Theme$1>;
|
|
1961
|
+
subtitleSx?: SxProps$1<Theme$1>;
|
|
1962
|
+
};
|
|
1963
|
+
segmentedTabs?: {
|
|
1964
|
+
trackBackgroundColor?: string;
|
|
1965
|
+
activeTabBackground?: string;
|
|
1966
|
+
activeTabColor?: string;
|
|
1967
|
+
inactiveTabColor?: string;
|
|
1968
|
+
activeTabBoxShadow?: string;
|
|
1969
|
+
rootSx?: SxProps$1<Theme$1>;
|
|
1970
|
+
tabFontSize?: number | string;
|
|
1971
|
+
fullWidth?: boolean;
|
|
1972
|
+
tabLayout?: ChartWidgetSegmentedTabLayout;
|
|
1973
|
+
activeTabFontWeight?: number;
|
|
1974
|
+
inactiveTabFontWeight?: number;
|
|
1975
|
+
};
|
|
1976
|
+
barChart?: {
|
|
1977
|
+
heightPx?: number;
|
|
1978
|
+
barColor?: string;
|
|
1979
|
+
/** Bar corner radius; **0** = square tops. @default **0** */
|
|
1980
|
+
barRadius?: number;
|
|
1981
|
+
gridStroke?: string;
|
|
1982
|
+
gridStrokeDasharray?: string;
|
|
1983
|
+
margin?: PeakBillingHoursChartMargin;
|
|
1984
|
+
xAxisTickFill?: string;
|
|
1985
|
+
yAxisTickFill?: string;
|
|
1986
|
+
yAxisWidth?: number;
|
|
1987
|
+
barCategoryGap?: number | string;
|
|
1988
|
+
barGap?: number;
|
|
1989
|
+
barValueLabelFill?: string;
|
|
1990
|
+
barValueLabelFontSizePx?: number;
|
|
1991
|
+
tooltip?: BillingCounterAnalyticsTooltipTheme;
|
|
1992
|
+
/**
|
|
1993
|
+
* Full-height hover band behind the active category (**no** dashed vertical lines).
|
|
1994
|
+
* @default light grey fill
|
|
1995
|
+
*/
|
|
1996
|
+
hoverBandFill?: string;
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
|
|
2000
|
+
declare const DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER: ChartWidgetInfoPopoverContent;
|
|
2001
|
+
|
|
2002
|
+
type PeakBillingHoursPoint = {
|
|
2003
|
+
/** X-axis category (e.g. **12pm**). */
|
|
2004
|
+
label: string;
|
|
2005
|
+
/** Bar height; **0** omits the value label and draws a flat bar. */
|
|
2006
|
+
value: number;
|
|
2007
|
+
};
|
|
2008
|
+
type PeakBillingHoursProps = {
|
|
2009
|
+
title?: string;
|
|
2010
|
+
/** Shown after the title (e.g. **(Last 7 days)**). */
|
|
2011
|
+
subtitle?: string;
|
|
2012
|
+
tabs: ChartWidgetSegmentedTab[];
|
|
2013
|
+
activeTabId: string;
|
|
2014
|
+
onTabChange: (tabId: string) => void;
|
|
2015
|
+
data?: PeakBillingHoursPoint[];
|
|
2016
|
+
seriesByTabId?: Record<string, PeakBillingHoursPoint[]>;
|
|
2017
|
+
yAxisDomain?: [number, number];
|
|
2018
|
+
yAxisTicks?: number[];
|
|
2019
|
+
infoPopover?: ChartWidgetInfoPopoverContent | null;
|
|
2020
|
+
customization?: PeakBillingHoursCustomization;
|
|
2021
|
+
};
|
|
2022
|
+
|
|
2023
|
+
declare const peakBillingHoursDefaultTabs: ChartWidgetSegmentedTab[];
|
|
2024
|
+
/** Matches the **Billing Counter Visits** demo (last 7 days style). */
|
|
2025
|
+
declare const peakBillingHoursVisitsMock: PeakBillingHoursPoint[];
|
|
2026
|
+
declare const peakBillingHoursMockSeriesByTabId: Record<string, PeakBillingHoursPoint[]>;
|
|
2027
|
+
|
|
2028
|
+
/**
|
|
2029
|
+
* Peak billing hours card: title + subtitle, info control, violet segmented tabs (intrinsic),
|
|
2030
|
+
* vertical bar chart with square tops, value labels, and panel tooltip.
|
|
2031
|
+
*/
|
|
2032
|
+
declare function PeakBillingHours({ title, subtitle, tabs, activeTabId, onTabChange, data, seriesByTabId, yAxisDomain, yAxisTicks, infoPopover, customization, }: PeakBillingHoursProps): React$1.ReactElement;
|
|
2033
|
+
|
|
2034
|
+
type PeakBillingHoursCustomizationProviderProps = {
|
|
2035
|
+
value: PeakBillingHoursCustomization;
|
|
2036
|
+
children: React$1.ReactNode;
|
|
2037
|
+
};
|
|
2038
|
+
declare function PeakBillingHoursCustomizationProvider({ value, children, }: PeakBillingHoursCustomizationProviderProps): React$1.ReactElement;
|
|
2039
|
+
declare function usePeakBillingHoursCustomization(): PeakBillingHoursCustomization;
|
|
2040
|
+
|
|
227
2041
|
type FalconThemeMode = 'light' | 'dark';
|
|
228
2042
|
type FalconThemeDirection = 'ltr' | 'rtl';
|
|
229
2043
|
interface FalconThemeSettings {
|
|
@@ -244,4 +2058,4 @@ interface FalconThemeProviderProps {
|
|
|
244
2058
|
|
|
245
2059
|
declare const FalconThemeProvider: ({ children, mode: modeProp, settings, }: FalconThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
246
2060
|
|
|
247
|
-
export { AddCommentInput, type AddCommentInputProps, AdvancedFiltersDialog, type AdvancedFiltersDialogProps, ButtonWithIcon, type ButtonWithIconProps, FalconButton, type FalconButtonProps, FalconDIstrictFilter, type FalconDIstrictFilterOption, type FalconDIstrictFilterProps, FalconGrayButton, type FalconGrayButtonProps, FalconMultiSelect, type FalconMultiSelectOption, type FalconMultiSelectProps, type FalconMultiSelectStyleProps, FalconPagination, type FalconPaginationProps, FalconSelect, type FalconSelectOption, type FalconSelectProps, FalconSingleSwitch, type FalconSingleSwitchProps, FalconTable, type FalconTableProps, type FalconThemeDirection, type FalconThemeMode, FalconThemeProvider, type FalconThemeProviderProps, type FalconThemeSettings, FalconTicketColumsFilter, type FalconTicketColumsFilterProps, FalconTicketFilter, type FalconTicketFilterProps, HeatMapChartLegend, type HeatMapChartLegendProps, type HeatMapLegendItem, ProgressBarNumber, type ProgressBarNumberProps };
|
|
2061
|
+
export { AddCommentInput, type AddCommentInputProps, AdvancedFiltersDialog, type AdvancedFiltersDialogProps, BILLING_COUNTER_LINE_PRIMARY, BILLING_COUNTER_TABS_TRACK_BG, BillingCounterAnalytics, type BillingCounterAnalyticsCustomization, BillingCounterAnalyticsCustomizationProvider, type BillingCounterAnalyticsPoint, type BillingCounterAnalyticsProps, type BillingCounterAnalyticsTooltipTheme, type BillingCounterChartMargin, ButtonWithIcon, type ButtonWithIconProps, CHART_PERIOD_FILTER_INFO_POPOVER, ChartWidgetHeaderSeparator, ChartWidgetInfoButton, type ChartWidgetInfoButtonProps, type ChartWidgetInfoPopoverContent, RankedBarList as ChartWidgetRankedBarList, type RankedBarListItem as ChartWidgetRankedBarListItem, type RankedBarListProps as ChartWidgetRankedBarListProps, type RankedBarListSegment as ChartWidgetRankedBarSegment, type ChartWidgetSegmentedTab, type ChartWidgetSegmentedTabLayout, ChartWidgetSegmentedTabs, type ChartWidgetSegmentedTabsProps, DEFAULT_BILLING_COUNTER_ANALYTICS_INFO_POPOVER, DEFAULT_FOOTFALL_TILE_ICONS, DEFAULT_PEAK_BILLING_HOURS_INFO_POPOVER, DEFAULT_QUEUE_TIME_BREAKDOWN_INFO_POPOVER, FalconButton, type FalconButtonProps, FalconDIstrictFilter, type FalconDIstrictFilterOption, type FalconDIstrictFilterProps, FalconGrayButton, type FalconGrayButtonProps, FalconMultiSelect, type FalconMultiSelectOption, type FalconMultiSelectProps, type FalconMultiSelectStyleProps, FalconPagination, type FalconPaginationProps, FalconSelect, type FalconSelectOption, type FalconSelectProps, FalconSingleSwitch, type FalconSingleSwitchProps, FalconTable, type FalconTableProps, type FalconThemeDirection, type FalconThemeMode, FalconThemeProvider, type FalconThemeProviderProps, type FalconThemeSettings, FalconTicketColumsFilter, type FalconTicketColumsFilterProps, FalconTicketFilter, type FalconTicketFilterProps, type FootFallHeatMapIconColor, type FootFallHeatMapIconSize, type FootFallHeatMapIconSizeContext, type FootFallHeatMapIcons, type FootFallHeatMapKpiStripPresentation, type FootFallHeatMapKpiSummaryCardItem, type FootFallHeatMapSummaryKpis, type FootFallHeatMapTileIconRole, type FootFallHeatMapTreeOptions, type FootFallHeatMapTreemapLayout, FootFallHeatMapView, type FootFallHeatMapViewProps, FootfallByAgeGroups, type ChartCardMaxWidth as FootfallByAgeGroupsCardMaxWidth, type FootfallByAgeGroupsChartColors, type FootfallByAgeGroupsChartMargin, type FootfallByAgeGroupsHorizontalScroll, type FootfallByAgeGroupsProps, type FootfallByAgeGroupsRow, type FootfallByAgeGroupsSeries, type FootfallByAgeGroupsTooltipStyles, FootfallByGender, type ChartCardMaxWidth as FootfallByGenderCardMaxWidth, type FootfallByGenderChartColors, type FootfallByGenderChartMargin, type FootfallByGenderHorizontalScroll, type FootfallByGenderProps, type FootfallByGenderRow, type FootfallByGenderTooltipStyles, HeatMapChartLegend, type HeatMapChartLegendProps, type HeatMapLegendItem, KpiStatCard, type KpiStatCardDetailedProps, type KpiStatCardIconBackdropShape, type KpiStatCardInfoPlacement, type KpiStatCardInlineProps, type KpiStatCardProps, type KpiTrend, type KpiTrendLayout, PasserbyConversion, type ChartCardMaxWidth as PasserbyConversionCardMaxWidth, type PasserbyConversionChartColors, type PasserbyConversionChartMargin, type PasserbyConversionHorizontalScroll, type PasserbyConversionProps, type PasserbyConversionRow, type PasserbyConversionTooltipStyles, PeakBillingHours, type PeakBillingHoursChartMargin, type PeakBillingHoursCustomization, PeakBillingHoursCustomizationProvider, type PeakBillingHoursPoint, type PeakBillingHoursProps, ProgressBarNumber, type ProgressBarNumberProps, QUEUE_CHART_COLORS, QUEUE_STACKED_BAR_THICKNESS_PX, QUEUE_TIME_BREAKDOWN_DEFAULT_HEADER_IMAGE_SRC, QUEUE_TIME_BREAKDOWN_INFO_POPOVER, type QueueBucketLegendItem, type QueueTimeAreaSeriesPoint, type QueueTimeAreaTooltipTheme, QueueTimeBreakdown, QueueTimeBreakdownArea, type QueueTimeBreakdownAreaProps, type QueueTimeBreakdownBarRow, type QueueTimeBreakdownCustomization, QueueTimeBreakdownCustomizationProvider, QueueTimeBreakdownDonut, type QueueTimeBreakdownDonutProps, type QueueTimeBreakdownProps, QueueTimeBreakdownStackedBar, type QueueTimeBreakdownStackedBarProps, type QueueTimeChartFilter, TimePeriodFilter as QueueTimePeriodFilter, type QueueTimePeriodFilterInfoButtonPresentation, type TimePeriodFilterProps as QueueTimePeriodFilterProps, type QueueTimePeriodFilterTheme, type QueueTimeRechartsTooltipTheme, type QueueTimeStackedSeriesItem, RankedBarList, type RankedBarListItem, type RankedBarListProps, type RankedBarListSegment, TIME_PERIOD_FILTER_INFO_POPOVER, TIME_PERIOD_FILTER_INFO_POPOVER_BREAKDOWN, TimePeriodFilter, type TimePeriodFilterInfoButtonPresentation, type TimePeriodFilterProps, type TimePeriodFilterTheme, type TreemapNode, WalkinAnalysis, type WalkinAnalysisCardMaxWidth, type WalkinAnalysisPieSize, type WalkinAnalysisProps, type WalkinAnalysisSlice, type WalkinAnalysisTab, type WalkinAnalysisTypography, WalkinTraffic, WalkinTraffic as WalkinTrafficByHour, type ChartCardMaxWidth as WalkinTrafficByHourCardMaxWidth, type WalkinTrafficChartColors as WalkinTrafficByHourChartColors, type WalkinTrafficChartMargin as WalkinTrafficByHourChartMargin, type WalkinTrafficHorizontalScroll as WalkinTrafficByHourHorizontalScroll, type WalkinTrafficProps as WalkinTrafficByHourProps, type WalkinTrafficRow as WalkinTrafficByHourRow, type WalkinTrafficTooltipStyles as WalkinTrafficByHourTooltipStyles, type ChartCardMaxWidth as WalkinTrafficCardMaxWidth, type WalkinTrafficChartColors, type WalkinTrafficChartMargin, type WalkinTrafficHorizontalScroll, type WalkinTrafficProps, type WalkinTrafficRow, type WalkinTrafficTooltipStyles, WidgetHeaderFilter, type WidgetHeaderFilterProps, type WidgetHeaderFilterStyleProps, type WidgetHeaderMultiSelectConfig, type ZoneAnalyticsFlatItem, type ZoneAnalyticsHierarchy, type ZoneAnalyticsMetrics, type ZoneKpiStripPayload, ZoneWiseKpiCards, billingCounterDefaultTabs, billingCounterMockSeriesByTabId, buildTreemapNodes, generateMockPerformanceData, getChildContainer, getNestedList, getQueueTimeBreakdownAreaSeriesData, getQueueTimeBreakdownAreaXAxisData, hashColor, isPlainObject, mergeAreaTooltipStyles, mergeCss, mergeRechartsTooltipStyles, mergeSx, metricForNode, parseMinutes, parseZoneKpiStripFromRaw, peakBillingHoursDefaultTabs, peakBillingHoursMockSeriesByTabId, peakBillingHoursVisitsMock, preprocessData, skipSingleBranchLevels, toRechartsTreemapData, useBillingCounterAnalyticsCustomization, usePeakBillingHoursCustomization, useQueueTimeBreakdownCustomization };
|