@multivendorx/zyra 1.0.63 → 1.0.65
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/build/index.d.ts +1 -0
- package/build/index.js +7317 -6627
- package/build/index.js.map +1 -1
- package/build/index.mjs +7317 -6627
- package/build/index.mjs.map +1 -1
- package/build/types/builderform/src/EmailBuilder.d.ts +29 -0
- package/build/types/builderform/src/EmailTemplateEditorPopup.d.ts +16 -0
- package/build/types/builderform/src/FormBuilder/Builder.d.ts +11 -0
- package/build/types/builderform/src/FormBuilder/Canvas.d.ts +23 -0
- package/build/types/builderform/src/FormBuilder/FormBuilder.d.ts +13 -0
- package/build/types/builderform/src/FormBuilder/FormSettings.d.ts +19 -0
- package/build/types/builderform/src/FormBuilder/Inspector.d.ts +14 -0
- package/build/types/builderform/src/FormBuilder/Share.d.ts +10 -0
- package/build/types/builderform/src/FormBuilder/When.d.ts +20 -0
- package/build/types/builderform/src/FormBuilder/extensions.d.ts +97 -0
- package/build/types/builderform/src/FormBuilder/fields.d.ts +36 -0
- package/build/types/builderform/src/FormBuilder/index.d.ts +5 -0
- package/build/types/builderform/src/FormBuilder/route.d.ts +10 -0
- package/build/types/builderform/src/FormBuilder/runtime.d.ts +87 -0
- package/build/types/builderform/src/FormBuilder/types.d.ts +151 -0
- package/build/types/builderform/src/Switch.d.ts +9 -0
- package/build/types/builderform/src/emailBlockTypes.d.ts +89 -0
- package/build/types/builderform/src/index.d.ts +9 -0
- package/build/types/builderform/src/legacyEmailAdapter.d.ts +40 -0
- package/build/types/bundle/src/fieldRegistry.d.ts +1 -0
- package/build/types/bundle/src/index.d.ts +6 -0
- package/build/types/components/src/ActivityListComponent.d.ts +39 -0
- package/build/types/components/src/AnalyticsComponent.d.ts +56 -0
- package/build/types/components/src/AppShellComponent.d.ts +64 -0
- package/build/types/components/src/AuthLayoutComponent.d.ts +26 -0
- package/build/types/components/src/AvatarComponent.d.ts +13 -0
- package/build/types/components/src/BadgeComponent.d.ts +30 -0
- package/build/types/components/src/BrandComponent.d.ts +18 -0
- package/build/types/components/src/CardComponent.d.ts +25 -0
- package/build/types/components/src/ChartComponent.d.ts +58 -0
- package/build/types/components/src/ChoiceCardComponent.d.ts +41 -0
- package/build/types/components/src/ClipboardComponent.d.ts +13 -0
- package/build/types/components/src/ColumnComponent.d.ts +11 -0
- package/build/types/components/src/ContainerComponent.d.ts +11 -0
- package/build/types/components/src/CustomRecaptchaComponent.d.ts +2 -0
- package/build/types/components/src/EntityCellComponent.d.ts +30 -0
- package/build/types/components/src/FilterComponent.d.ts +20 -0
- package/build/types/components/src/FormGroupComponent.d.ts +19 -0
- package/build/types/components/src/FormGroupWrapperComponent.d.ts +10 -0
- package/build/types/components/src/FullPageLoadingComponent.d.ts +14 -0
- package/build/types/components/src/HeaderComponent.d.ts +93 -0
- package/build/types/components/src/HeaderSearchComponent.d.ts +32 -0
- package/build/types/components/src/IconComponent.d.ts +12 -0
- package/build/types/components/src/InformationItemComponent.d.ts +38 -0
- package/build/types/components/src/LegendComponent.d.ts +52 -0
- package/build/types/components/src/ListComponent.d.ts +47 -0
- package/build/types/components/src/ListToolbarComponent.d.ts +53 -0
- package/build/types/components/src/MapComponent.d.ts +33 -0
- package/build/types/components/src/MetricTileComponent.d.ts +174 -0
- package/build/types/components/src/ModuleGridComponent.d.ts +74 -0
- package/build/types/components/src/ModuleGuardComponent.d.ts +17 -0
- package/build/types/components/src/NavigatorComponent.d.ts +111 -0
- package/build/types/components/src/NoticeComponent.d.ts +48 -0
- package/build/types/components/src/PopupComponent.d.ts +28 -0
- package/build/types/components/src/RecaptchaComponent.d.ts +11 -0
- package/build/types/components/src/SaveStatusComponent.d.ts +18 -0
- package/build/types/components/src/ScoreRingComponent.d.ts +16 -0
- package/build/types/components/src/SectionComponent.d.ts +18 -0
- package/build/types/components/src/SettingRowComponent.d.ts +134 -0
- package/build/types/components/src/SettingsSectionComponent.d.ts +24 -0
- package/build/types/components/src/SetupWizardComponent.d.ts +75 -0
- package/build/types/components/src/SkeletonComponent.d.ts +11 -0
- package/build/types/components/src/SystemInfoComponent.d.ts +11 -0
- package/build/types/components/src/TabsComponent.d.ts +34 -0
- package/build/types/components/src/ThemeChoiceComponent.d.ts +19 -0
- package/build/types/components/src/TooltipComponent.d.ts +12 -0
- package/build/types/components/src/TourComponent.d.ts +26 -0
- package/build/types/components/src/TrendIndicatorComponent.d.ts +21 -0
- package/build/types/components/src/TrendStatComponent.d.ts +34 -0
- package/build/types/components/src/TypographyComponent.d.ts +58 -0
- package/build/types/components/src/index.d.ts +84 -0
- package/build/types/components/src/paletteClass.d.ts +3 -0
- package/build/types/core/src/ModuleContext.d.ts +8 -0
- package/build/types/core/src/SettingContext.d.ts +17 -0
- package/build/types/core/src/ThemeContext.d.ts +20 -0
- package/build/types/core/src/apiService.d.ts +38 -0
- package/build/types/core/src/blockStyle.d.ts +63 -0
- package/build/types/core/src/colorPalette.d.ts +41 -0
- package/build/types/core/src/index.d.ts +14 -0
- package/build/types/core/src/utils.d.ts +1165 -0
- package/build/types/inputs/src/AddressInput.d.ts +24 -0
- package/build/types/inputs/src/ButtonInput.d.ts +53 -0
- package/build/types/inputs/src/CalendarInput.d.ts +46 -0
- package/build/types/inputs/src/DecoratedInput.d.ts +11 -0
- package/build/types/inputs/src/DynamicRowInput.d.ts +42 -0
- package/build/types/inputs/src/EmailInput.d.ts +15 -0
- package/build/types/inputs/src/EndpointInput.d.ts +4 -0
- package/build/types/inputs/src/EventCalendarInput.d.ts +25 -0
- package/build/types/inputs/src/ExpandablePanelInput.d.ts +116 -0
- package/build/types/inputs/src/FileInput.d.ts +39 -0
- package/build/types/inputs/src/InputRenderer.d.ts +94 -0
- package/build/types/inputs/src/LogViewerInput.d.ts +13 -0
- package/build/types/inputs/src/MultiCheckboxInput.d.ts +48 -0
- package/build/types/inputs/src/NestedInput.d.ts +54 -0
- package/build/types/inputs/src/PhoneInput.d.ts +29 -0
- package/build/types/inputs/src/PickerInput.d.ts +77 -0
- package/build/types/inputs/src/RandomkeyInput.d.ts +14 -0
- package/build/types/inputs/src/RichTextInput.d.ts +30 -0
- package/build/types/inputs/src/SelectInput.d.ts +40 -0
- package/build/types/inputs/src/SetupWizardInput.d.ts +50 -0
- package/build/types/inputs/src/ShortcodeTableInput.d.ts +23 -0
- package/build/types/inputs/src/TableInput.d.ts +72 -0
- package/build/types/inputs/src/TaskExecutorInput.d.ts +30 -0
- package/build/types/inputs/src/TextAreaInput.d.ts +27 -0
- package/build/types/inputs/src/TextInput.d.ts +33 -0
- package/build/types/inputs/src/ToggleInput.d.ts +37 -0
- package/build/types/inputs/src/index.d.ts +53 -0
- package/build/types/table/src/Table.d.ts +4 -0
- package/build/types/table/src/TableActionButtons.d.ts +16 -0
- package/build/types/table/src/TableBulkActions.d.ts +19 -0
- package/build/types/table/src/TableCard.d.ts +10 -0
- package/build/types/table/src/TableEditable.d.ts +18 -0
- package/build/types/table/src/TableFilter.d.ts +19 -0
- package/build/types/table/src/TablePagination.d.ts +17 -0
- package/build/types/table/src/TableRowActions.d.ts +17 -0
- package/build/types/table/src/TableUtils.d.ts +3 -0
- package/build/types/table/src/index.d.ts +5 -0
- package/build/types/table/src/tableLabels.d.ts +14 -0
- package/build/types/table/src/types.d.ts +166 -0
- package/package.json +4 -5
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TooltipPosition } from './TooltipComponent';
|
|
3
|
+
type SearchItem = {
|
|
4
|
+
icon?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
desc?: string;
|
|
7
|
+
link: string;
|
|
8
|
+
};
|
|
9
|
+
interface PopoverTab {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
content: React.ReactNode;
|
|
14
|
+
footer?: {
|
|
15
|
+
url: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
text: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface ProfileItem {
|
|
21
|
+
title: string;
|
|
22
|
+
icon?: string;
|
|
23
|
+
link?: string;
|
|
24
|
+
targetBlank?: boolean;
|
|
25
|
+
action?: () => void;
|
|
26
|
+
}
|
|
27
|
+
interface PopoverItem {
|
|
28
|
+
title: string;
|
|
29
|
+
icon?: string;
|
|
30
|
+
link?: string;
|
|
31
|
+
targetBlank?: boolean;
|
|
32
|
+
action?: () => void;
|
|
33
|
+
desc?: string;
|
|
34
|
+
time?: string;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
interface HeaderPopover {
|
|
38
|
+
toggleIcon: string;
|
|
39
|
+
tooltipName?: string;
|
|
40
|
+
tooltipPosition?: TooltipPosition;
|
|
41
|
+
items?: PopoverItem[];
|
|
42
|
+
}
|
|
43
|
+
interface HeaderPopoverWithTab {
|
|
44
|
+
toggleIcon: string;
|
|
45
|
+
tooltipName?: string;
|
|
46
|
+
tooltipPosition?: TooltipPosition;
|
|
47
|
+
tabs?: PopoverTab[];
|
|
48
|
+
}
|
|
49
|
+
type HeaderProps = {
|
|
50
|
+
brandImg: string;
|
|
51
|
+
results?: SearchItem[];
|
|
52
|
+
free?: string;
|
|
53
|
+
pro?: string;
|
|
54
|
+
/** Alt text of the logo image. */
|
|
55
|
+
logoAlt?: string;
|
|
56
|
+
/** "Free:" and "Pro:" prefixes of the version badges. */
|
|
57
|
+
freePrefix?: string;
|
|
58
|
+
proPrefix?: string;
|
|
59
|
+
/** Shown after the Pro prefix when `pro` is not set (the Pro plugin is not installed). */
|
|
60
|
+
notInstalledText?: string;
|
|
61
|
+
showProfile?: boolean;
|
|
62
|
+
profileItems?: ProfileItem[];
|
|
63
|
+
search?: {
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
options?: {
|
|
66
|
+
label: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
onQueryUpdate: (payload: {
|
|
71
|
+
searchValue: string;
|
|
72
|
+
searchAction?: string;
|
|
73
|
+
}) => void;
|
|
74
|
+
onResultClick: (res: SearchItem) => void;
|
|
75
|
+
utilityList?: HeaderPopover[];
|
|
76
|
+
utilityListWithTab?: HeaderPopoverWithTab[];
|
|
77
|
+
/** Arbitrary content rendered in the right section's own flex row,
|
|
78
|
+
* immediately before the search box — for a consumer whose own
|
|
79
|
+
* custom widget (e.g. a live credit-count indicator) needs a real
|
|
80
|
+
* inline position rather than an absolutely-positioned overlay
|
|
81
|
+
* guessing at this component's own layout width. */
|
|
82
|
+
beforeSearch?: React.ReactNode;
|
|
83
|
+
/** Width (rem) of the search box's own category `SelectInput`
|
|
84
|
+
* (`HeaderSearchComponent`'s `width` prop, which becomes that
|
|
85
|
+
* `SelectInput`'s `size` → `formattedSize` → inline `width` style) —
|
|
86
|
+
* was hardcoded to `11` here; now a real prop so a consumer with
|
|
87
|
+
* longer/shorter `search.options` labels can size it to fit instead
|
|
88
|
+
* of every caller getting the same fixed width regardless of content.
|
|
89
|
+
* Defaults to `11` to match the previous hardcoded behavior. */
|
|
90
|
+
searchSize?: number;
|
|
91
|
+
};
|
|
92
|
+
declare const HeaderComponent: React.FC<HeaderProps>;
|
|
93
|
+
export default HeaderComponent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './HeaderSearchComponent.scss';
|
|
3
|
+
type SearchItem = {
|
|
4
|
+
icon?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
desc?: string;
|
|
7
|
+
link: string;
|
|
8
|
+
};
|
|
9
|
+
type SearchOption = {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
type SearchConfig = {
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
options?: SearchOption[];
|
|
16
|
+
};
|
|
17
|
+
type SearchPayload = {
|
|
18
|
+
searchValue: string;
|
|
19
|
+
} | {
|
|
20
|
+
searchValue: string;
|
|
21
|
+
searchAction: string;
|
|
22
|
+
};
|
|
23
|
+
type HeaderSearchProps = {
|
|
24
|
+
search?: SearchConfig;
|
|
25
|
+
results?: SearchItem[];
|
|
26
|
+
onQueryUpdate: (payload: SearchPayload) => void;
|
|
27
|
+
onResultClick?: (res: SearchItem) => void;
|
|
28
|
+
variant?: 'default' | 'mini-search';
|
|
29
|
+
width?: number;
|
|
30
|
+
};
|
|
31
|
+
declare const HeaderSearchComponent: React.FC<HeaderSearchProps>;
|
|
32
|
+
export default HeaderSearchComponent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IconComponentProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className' | 'style'> {
|
|
3
|
+
/** adminfont icon name, without the `adminfont-` prefix (e.g. `"settings"` renders `adminfont-settings`). */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Icon size. A number is treated as `rem` (e.g. `2` → `2rem`); a string is used as-is (e.g. `"24px"`, `"1.5em"`). Omit to inherit the surrounding font-size. */
|
|
6
|
+
size?: number | string;
|
|
7
|
+
color?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare const IconComponent: React.FC<IconComponentProps>;
|
|
12
|
+
export default IconComponent;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './InformationItemComponent.scss';
|
|
3
|
+
type AvatarProps = {
|
|
4
|
+
image?: string;
|
|
5
|
+
imageHtml?: string;
|
|
6
|
+
iconClass?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
/** Background tint for the icon box — any valid CSS color, defaults to the theme color pair. */
|
|
9
|
+
color?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
link?: string;
|
|
12
|
+
};
|
|
13
|
+
type DescriptionProps = {
|
|
14
|
+
label?: string;
|
|
15
|
+
value?: React.ReactNode;
|
|
16
|
+
icon?: string;
|
|
17
|
+
};
|
|
18
|
+
type BadgeProps = {
|
|
19
|
+
text: string;
|
|
20
|
+
className: string;
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
};
|
|
23
|
+
type InfoItemProps = {
|
|
24
|
+
title: string;
|
|
25
|
+
titleLink?: string;
|
|
26
|
+
avatar?: AvatarProps;
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
descriptions?: DescriptionProps[];
|
|
29
|
+
badges?: BadgeProps[];
|
|
30
|
+
amount?: React.ReactNode;
|
|
31
|
+
amountClassName?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
isLoading?: boolean;
|
|
34
|
+
rightContent?: React.ReactNode;
|
|
35
|
+
meta?: React.ReactNode;
|
|
36
|
+
};
|
|
37
|
+
declare const InformationItemComponent: React.FC<InfoItemProps>;
|
|
38
|
+
export default InformationItemComponent;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './LegendComponent.scss';
|
|
3
|
+
/**
|
|
4
|
+
* Built-in dot presets — the same real `$color-palette` green/orange/gray
|
|
5
|
+
* triad this package's own `COLOR_PALETTE` (`@zyra/core`) exports, for a
|
|
6
|
+
* "good/attention/neutral" status split (`#16a34a`/`#e67a2e`/`#d1d5db`),
|
|
7
|
+
* so a legend
|
|
8
|
+
* plotted next to that chart never drifts out of sync with it. Anything
|
|
9
|
+
* else (a hex/rgb/`var(--token)`) is applied as-is via inline style —
|
|
10
|
+
* same "named palette | any real CSS color" convention
|
|
11
|
+
* `TypographyComponent`'s own `color` prop already documents.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LEGEND_TONES: readonly ["good", "attention", "neutral"];
|
|
14
|
+
export type LegendTone = (typeof LEGEND_TONES)[number];
|
|
15
|
+
export type LegendDotColor = LegendTone | (string & {});
|
|
16
|
+
export interface LegendItem {
|
|
17
|
+
/** React list key — falls back to the item's own array index when omitted. */
|
|
18
|
+
key?: string;
|
|
19
|
+
label: React.ReactNode;
|
|
20
|
+
value: React.ReactNode;
|
|
21
|
+
/** `'good'`/`'attention'`/`'neutral'` for a built-in dot color, or any real CSS color for a one-off. Omit for a neutral default dot. */
|
|
22
|
+
color?: LegendDotColor;
|
|
23
|
+
}
|
|
24
|
+
export interface LegendComponentProps {
|
|
25
|
+
items: LegendItem[];
|
|
26
|
+
/**
|
|
27
|
+
* `'vertical'` (default) stacks one row per item with its `value`
|
|
28
|
+
* pinned to the far right — e.g. a donut chart's own dot+label+count
|
|
29
|
+
* breakdown placed beside it. `'horizontal'` wraps them into a single
|
|
30
|
+
* inline row instead, dot+label+value together — e.g. a compact key
|
|
31
|
+
* underneath a chart.
|
|
32
|
+
*/
|
|
33
|
+
orientation?: 'vertical' | 'horizontal';
|
|
34
|
+
className?: string;
|
|
35
|
+
/** Renders skeleton rows instead of the real dot+label+value items — for a legend whose chart data is still loading. */
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
/** `isLoading` only — how many skeleton rows to render. Defaults to `items?.length || 3`. */
|
|
38
|
+
skeletonCount?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A dot + label + value legend, decoupled from any one chart — built to
|
|
42
|
+
* replace the several near-identical hand-rolled versions of this exact
|
|
43
|
+
* pattern across the app (each pairing its own bespoke `<ul>` with a CSS
|
|
44
|
+
* `!important` rule to hide `ChartComponent`'s own always-on pie legend,
|
|
45
|
+
* see that component's own `legendPosition="none"` option for the other
|
|
46
|
+
* half of that fix). `items` is the only real data this component reads —
|
|
47
|
+
* everything else (a chart's own slice colors, a section's own counts) is
|
|
48
|
+
* the caller's, kept in sync with this legend by construction rather than
|
|
49
|
+
* duplicated into two hardcoded color lists.
|
|
50
|
+
*/
|
|
51
|
+
export declare const LegendComponent: React.FC<LegendComponentProps>;
|
|
52
|
+
export default LegendComponent;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldComponent } from '../../core/src/index';
|
|
3
|
+
import './ListComponent.scss';
|
|
4
|
+
interface Item {
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
img?: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
tags?: React.ReactNode;
|
|
11
|
+
/** Rendered right after the title on the same line (e.g. a count badge) — unlike `tags`, which sits at the row's far right. */
|
|
12
|
+
titleTag?: React.ReactNode;
|
|
13
|
+
targetBlank?: boolean;
|
|
14
|
+
action?: (item: Item, e?: React.MouseEvent) => void;
|
|
15
|
+
onApprove?: (item: Item) => void;
|
|
16
|
+
onReject?: (item: Item) => void;
|
|
17
|
+
desc?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional leading rank/count badge (e.g. a "1"-"5" position number, an
|
|
21
|
+
* unread count, …) rendered before the icon/image — any node, so a
|
|
22
|
+
* plain number, a formatted string, or a small custom badge all work.
|
|
23
|
+
* Omit for the default look (no badge rendered at all), same as every
|
|
24
|
+
* other optional Item field here.
|
|
25
|
+
*/
|
|
26
|
+
number?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Tint for the `number` badge — any valid CSS color, same "raw color
|
|
29
|
+
* string" contract InformationItemComponent's own `avatar.color` prop
|
|
30
|
+
* already uses, rather than a fixed named palette. Defaults to the
|
|
31
|
+
* theme color when omitted.
|
|
32
|
+
*/
|
|
33
|
+
numberColor?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
interface ItemListUIProps {
|
|
37
|
+
items: Item[];
|
|
38
|
+
className?: string;
|
|
39
|
+
background?: boolean;
|
|
40
|
+
border?: boolean;
|
|
41
|
+
onItemClick?: (item: Item) => void;
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
skeletonCount?: number;
|
|
44
|
+
}
|
|
45
|
+
export declare const ListComponent: React.FC<ItemListUIProps>;
|
|
46
|
+
declare const ListFieldComponent: FieldComponent;
|
|
47
|
+
export default ListFieldComponent;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FilterOption } from './FilterComponent';
|
|
3
|
+
import './ListToolbarComponent.scss';
|
|
4
|
+
export type ListToolbarFilterOption = FilterOption;
|
|
5
|
+
export interface ListToolbarActiveFilter {
|
|
6
|
+
key: string;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface ListToolbarComponentProps {
|
|
10
|
+
/** The list's main filter, as chips on the left. */
|
|
11
|
+
filters?: {
|
|
12
|
+
/** Names the chip group for screen readers. */
|
|
13
|
+
label: string;
|
|
14
|
+
options: ListToolbarFilterOption[];
|
|
15
|
+
value: string;
|
|
16
|
+
onChange: (value: string) => void;
|
|
17
|
+
/** Leaves out chips with a count of 0 (see FilterComponent). */
|
|
18
|
+
hideEmpty?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** Search box on the right of the chips. */
|
|
21
|
+
search?: {
|
|
22
|
+
value: string;
|
|
23
|
+
onChange: (value: string) => void;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/** Accessible name; defaults to the placeholder. */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** `main` (default): top row, right of the filter chips. `secondary`: second row, just before `secondary`. */
|
|
28
|
+
placement?: 'main' | 'secondary';
|
|
29
|
+
};
|
|
30
|
+
/** Extra control beside the search, e.g. a select or a view switch. */
|
|
31
|
+
end?: React.ReactNode;
|
|
32
|
+
/** Second row, left: a result count such as "6 courses". */
|
|
33
|
+
summary?: React.ReactNode;
|
|
34
|
+
/** Second row, after `summary`: the filters currently applied, as removable chips. */
|
|
35
|
+
activeFilters?: ListToolbarActiveFilter[];
|
|
36
|
+
/** Called with a chip's `key` when its × is clicked. */
|
|
37
|
+
onRemoveFilter?: (key: string) => void;
|
|
38
|
+
/** Shows a "Clear all" link after the active chips; called when it is clicked. */
|
|
39
|
+
onClearAll?: () => void;
|
|
40
|
+
/** Text of the "Clear all" link; defaults to "Clear all". */
|
|
41
|
+
clearAllText?: string;
|
|
42
|
+
/** Second row, right: secondary filters or a sort link. */
|
|
43
|
+
secondary?: React.ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The toolbar between a list page's header and its table or cards: the main
|
|
48
|
+
* filter as chips with counts, a search box and an optional `end` control on
|
|
49
|
+
* one row, then an optional row with a result count and secondary controls.
|
|
50
|
+
* Owns no state — the page owns the filter and search values.
|
|
51
|
+
*/
|
|
52
|
+
export declare const ListToolbarComponent: React.FC<ListToolbarComponentProps>;
|
|
53
|
+
export default ListToolbarComponent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FieldComponent } from '../../core/src/index';
|
|
2
|
+
interface Store {
|
|
3
|
+
id: number;
|
|
4
|
+
store_name: string;
|
|
5
|
+
location_lat?: string;
|
|
6
|
+
location_lng?: string;
|
|
7
|
+
}
|
|
8
|
+
interface MapProviderProps {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
mapId: string;
|
|
11
|
+
locationAddress: string;
|
|
12
|
+
locationLat: string;
|
|
13
|
+
locationLng: string;
|
|
14
|
+
isUserLocation?: boolean;
|
|
15
|
+
onLocationUpdate: (data: {
|
|
16
|
+
location_address: string;
|
|
17
|
+
location_lat: string;
|
|
18
|
+
location_lng: string;
|
|
19
|
+
address?: string;
|
|
20
|
+
city?: string;
|
|
21
|
+
state?: string;
|
|
22
|
+
country?: string;
|
|
23
|
+
zip?: string;
|
|
24
|
+
}) => void;
|
|
25
|
+
placeholderSearch: string;
|
|
26
|
+
stores: {
|
|
27
|
+
data: Store[];
|
|
28
|
+
} | null;
|
|
29
|
+
mapProvider: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const MapComponent: React.FC<MapProviderProps>;
|
|
32
|
+
declare const MapProviderFieldComponent: FieldComponent;
|
|
33
|
+
export default MapProviderFieldComponent;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './MetricTileComponent.scss';
|
|
3
|
+
export interface MetricTileBadge {
|
|
4
|
+
/**
|
|
5
|
+
* Badge color supported by BadgeComponent.
|
|
6
|
+
*
|
|
7
|
+
* Recommended usage:
|
|
8
|
+
* Pro, New, Beta, Recommended, etc.
|
|
9
|
+
*/
|
|
10
|
+
color: string;
|
|
11
|
+
text: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional click behavior.
|
|
14
|
+
*
|
|
15
|
+
* Prefer using this only for metadata/filter badges.
|
|
16
|
+
*/
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface MetricTileChart {
|
|
20
|
+
/**
|
|
21
|
+
* `sparkline`
|
|
22
|
+
* Small trend chart.
|
|
23
|
+
*
|
|
24
|
+
* `ring`
|
|
25
|
+
* Small score/progress ring.
|
|
26
|
+
*/
|
|
27
|
+
type: 'sparkline' | 'ring';
|
|
28
|
+
/**
|
|
29
|
+
* Sparkline:
|
|
30
|
+
* Array of values, oldest first.
|
|
31
|
+
*
|
|
32
|
+
* Ring:
|
|
33
|
+
* Single number between 0 and 100.
|
|
34
|
+
*/
|
|
35
|
+
data: number[] | number;
|
|
36
|
+
/**
|
|
37
|
+
* Chart color.
|
|
38
|
+
*
|
|
39
|
+
* Falls back to status.color,
|
|
40
|
+
* then theme/currentColor.
|
|
41
|
+
*/
|
|
42
|
+
color?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional custom chart height.
|
|
45
|
+
*/
|
|
46
|
+
height?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface MetricTileTrend {
|
|
49
|
+
/**
|
|
50
|
+
* Example:
|
|
51
|
+
* "4 pts vs last week"
|
|
52
|
+
*/
|
|
53
|
+
value: React.ReactNode;
|
|
54
|
+
direction?: 'up' | 'down' | 'neutral';
|
|
55
|
+
/**
|
|
56
|
+
* Controls whether the trend is visually
|
|
57
|
+
* good, bad, or neutral.
|
|
58
|
+
*
|
|
59
|
+
* This is intentionally separate from direction.
|
|
60
|
+
*/
|
|
61
|
+
sentiment?: 'positive' | 'negative' | 'neutral';
|
|
62
|
+
}
|
|
63
|
+
export interface MetricTileItem {
|
|
64
|
+
id?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Adminfont icon without `adminfont-`.
|
|
67
|
+
*/
|
|
68
|
+
icon: string;
|
|
69
|
+
title: React.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* Metadata badge.
|
|
72
|
+
*
|
|
73
|
+
* Recommended:
|
|
74
|
+
* Pro, Beta, New, Recommended.
|
|
75
|
+
*/
|
|
76
|
+
badge?: MetricTileBadge;
|
|
77
|
+
/**
|
|
78
|
+
* Main value.
|
|
79
|
+
*
|
|
80
|
+
* Examples:
|
|
81
|
+
* 92/100
|
|
82
|
+
* 14
|
|
83
|
+
* 2h ago
|
|
84
|
+
*/
|
|
85
|
+
number?: React.ReactNode;
|
|
86
|
+
/**
|
|
87
|
+
* Verdict/status.
|
|
88
|
+
*
|
|
89
|
+
* Examples:
|
|
90
|
+
* Good
|
|
91
|
+
* Poor
|
|
92
|
+
* Needs Work
|
|
93
|
+
*/
|
|
94
|
+
status?: {
|
|
95
|
+
text: React.ReactNode;
|
|
96
|
+
/**
|
|
97
|
+
* Existing utility class.
|
|
98
|
+
*
|
|
99
|
+
* Examples:
|
|
100
|
+
* green
|
|
101
|
+
* orange
|
|
102
|
+
* red
|
|
103
|
+
* blue
|
|
104
|
+
*/
|
|
105
|
+
color: string;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Supporting metric/count.
|
|
109
|
+
*
|
|
110
|
+
* Examples:
|
|
111
|
+
* "14 issues"
|
|
112
|
+
* "2 Open · 2 Low"
|
|
113
|
+
* "68 pages affected"
|
|
114
|
+
*/
|
|
115
|
+
stat?: React.ReactNode;
|
|
116
|
+
/**
|
|
117
|
+
* Supporting description.
|
|
118
|
+
*/
|
|
119
|
+
desc?: React.ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Optional chart alongside primary number.
|
|
122
|
+
*/
|
|
123
|
+
chart?: MetricTileChart;
|
|
124
|
+
/**
|
|
125
|
+
* Optional change/trend indicator.
|
|
126
|
+
*/
|
|
127
|
+
trend?: MetricTileTrend;
|
|
128
|
+
/**
|
|
129
|
+
* Optional footer action.
|
|
130
|
+
*/
|
|
131
|
+
footer?: React.ReactNode;
|
|
132
|
+
/**
|
|
133
|
+
* Full width footer button or compact inline action.
|
|
134
|
+
*/
|
|
135
|
+
footerAlign?: 'stretch' | 'start';
|
|
136
|
+
/**
|
|
137
|
+
* Optional click handler for the entire tile.
|
|
138
|
+
*
|
|
139
|
+
* Use for navigation cards.
|
|
140
|
+
*/
|
|
141
|
+
onClick?: () => void;
|
|
142
|
+
}
|
|
143
|
+
export interface MetricTileComponentProps {
|
|
144
|
+
data: MetricTileItem[];
|
|
145
|
+
/**
|
|
146
|
+
* default
|
|
147
|
+
* Standard card.
|
|
148
|
+
*
|
|
149
|
+
* compact
|
|
150
|
+
* Reduced spacing without changing hierarchy.
|
|
151
|
+
*/
|
|
152
|
+
variant?: 'default' | 'compact';
|
|
153
|
+
/**
|
|
154
|
+
* Number of columns.
|
|
155
|
+
*
|
|
156
|
+
* Ignored when autoFit is enabled.
|
|
157
|
+
*/
|
|
158
|
+
cols?: number;
|
|
159
|
+
/**
|
|
160
|
+
* Automatically fit cards into available width.
|
|
161
|
+
*/
|
|
162
|
+
autoFit?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Minimum card width in rem for autoFit.
|
|
165
|
+
*/
|
|
166
|
+
minTileWidth?: number;
|
|
167
|
+
/**
|
|
168
|
+
* Display skeleton cards.
|
|
169
|
+
*/
|
|
170
|
+
isLoading?: boolean;
|
|
171
|
+
className?: string;
|
|
172
|
+
}
|
|
173
|
+
export declare const MetricTileComponent: React.FC<MetricTileComponentProps>;
|
|
174
|
+
export default MetricTileComponent;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ModuleGridComponent.scss';
|
|
3
|
+
interface Module {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
desc?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
docLink?: string;
|
|
9
|
+
videoLink?: string;
|
|
10
|
+
reqPluging?: {
|
|
11
|
+
name: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
link: string;
|
|
14
|
+
}[];
|
|
15
|
+
settingsLink?: string;
|
|
16
|
+
proModule?: boolean;
|
|
17
|
+
category?: string | string[];
|
|
18
|
+
type?: string;
|
|
19
|
+
reloadOnChange?: boolean;
|
|
20
|
+
miniModule?: boolean;
|
|
21
|
+
enableModules?: string[];
|
|
22
|
+
forceActivate?: boolean;
|
|
23
|
+
freeFeatures?: string[];
|
|
24
|
+
proFeatures?: string[];
|
|
25
|
+
}
|
|
26
|
+
interface Separator {
|
|
27
|
+
type: 'separator';
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}
|
|
31
|
+
type ModuleItem = Module | Separator;
|
|
32
|
+
interface ModuleProps {
|
|
33
|
+
modulesArray?: {
|
|
34
|
+
category: boolean;
|
|
35
|
+
modules: ModuleItem[];
|
|
36
|
+
};
|
|
37
|
+
apiLink: string;
|
|
38
|
+
pluginName: string;
|
|
39
|
+
proPopupContent?: React.FC;
|
|
40
|
+
/**
|
|
41
|
+
* - `default`: a card per module with a gradient cover (the module's `icon`, or the name's initials when it has none), a category eyebrow, title, description and the free/pro feature lists.
|
|
42
|
+
* - `feature-card`: a plain card with an icon, category badges, description and the free/pro feature lists.
|
|
43
|
+
* - `mini-module`: a compact icon + name tile with the toggle.
|
|
44
|
+
*/
|
|
45
|
+
variant?: 'default' | 'feature-card' | 'mini-module';
|
|
46
|
+
filter?: boolean;
|
|
47
|
+
showFeatureSections?: boolean;
|
|
48
|
+
freeBadgeText?: string;
|
|
49
|
+
proBadgeText?: string;
|
|
50
|
+
labels?: ModuleGridLabels;
|
|
51
|
+
}
|
|
52
|
+
/** Visible strings of `ModuleGridComponent`; pass translated text from the host. */
|
|
53
|
+
export interface ModuleGridLabels {
|
|
54
|
+
all?: string;
|
|
55
|
+
allStatus?: string;
|
|
56
|
+
active?: string;
|
|
57
|
+
inactive?: string;
|
|
58
|
+
searchPlaceholder?: string;
|
|
59
|
+
moduleCount?: (count: number) => string;
|
|
60
|
+
clearAll?: string;
|
|
61
|
+
requires?: string;
|
|
62
|
+
install?: string;
|
|
63
|
+
requiredPluginsTitle?: string;
|
|
64
|
+
requiredPluginsDesc?: string;
|
|
65
|
+
pluginsRequired?: string;
|
|
66
|
+
successTitle?: string;
|
|
67
|
+
errorTitle?: string;
|
|
68
|
+
activated?: string;
|
|
69
|
+
deactivated?: string;
|
|
70
|
+
activateFailed?: string;
|
|
71
|
+
deactivateFailed?: string;
|
|
72
|
+
}
|
|
73
|
+
declare const ModuleGridComponent: React.FC<ModuleProps>;
|
|
74
|
+
export default ModuleGridComponent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ModuleGuardComponent.scss';
|
|
3
|
+
interface ComponentStatusViewProps {
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconColor?: string;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
desc?: React.ReactNode;
|
|
8
|
+
buttonText?: string;
|
|
9
|
+
buttonLink?: string;
|
|
10
|
+
buttonTarget?: '_blank' | '_self';
|
|
11
|
+
onButtonClick?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Extra content under the description, before the button — e.g. a custom action node instead of (or beside) `buttonText`. */
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const ModuleGuardComponent: React.FC<ComponentStatusViewProps>;
|
|
17
|
+
export default ModuleGuardComponent;
|