@multivendorx/zyra 1.0.64 → 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 +6770 -6158
- package/build/index.js.map +1 -1
- package/build/index.mjs +6770 -6158
- 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 +2 -3
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type { TableLabels } from './tableLabels';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonAction } from './TableActionButtons';
|
|
4
|
+
import { ActionItem } from './TableRowActions';
|
|
5
|
+
export type FilterValue = string | string[] | {
|
|
6
|
+
startDate: Date;
|
|
7
|
+
endDate: Date;
|
|
8
|
+
};
|
|
9
|
+
export type QueryProps = {
|
|
10
|
+
orderby?: string;
|
|
11
|
+
order?: string;
|
|
12
|
+
page?: string;
|
|
13
|
+
per_page?: number;
|
|
14
|
+
paged?: number | string;
|
|
15
|
+
filter?: Record<string, FilterValue>;
|
|
16
|
+
categoryFilter?: string;
|
|
17
|
+
languageFilter?: string;
|
|
18
|
+
};
|
|
19
|
+
export type CategoryCount = {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
count: number;
|
|
23
|
+
};
|
|
24
|
+
export type TableHeaderConfig = {
|
|
25
|
+
label?: React.ReactNode;
|
|
26
|
+
isSortable?: boolean;
|
|
27
|
+
defaultSort?: boolean;
|
|
28
|
+
defaultOrder?: 'asc' | 'desc';
|
|
29
|
+
isNumeric?: boolean;
|
|
30
|
+
isLeftAligned?: boolean;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
visible?: boolean;
|
|
33
|
+
screenReaderLabel?: string;
|
|
34
|
+
cellClassName?: string;
|
|
35
|
+
/** CSS `flex` shorthand for this column in both header and body, e.g. `'3 0 0'` or `'0 0 7rem'`. */
|
|
36
|
+
flex?: string;
|
|
37
|
+
/** Align this column's content to the end of the cell. */
|
|
38
|
+
align?: 'start' | 'end';
|
|
39
|
+
emptyText?: React.ReactNode;
|
|
40
|
+
type?: 'text' | 'currency' | 'date' | 'badge' | 'status' | 'action' | 'id' | 'content' | 'info' | 'labeled';
|
|
41
|
+
descriptionKey?: string;
|
|
42
|
+
iconKey?: string;
|
|
43
|
+
imageKey?: string;
|
|
44
|
+
avatarTextKey?: string;
|
|
45
|
+
iconColorKey?: string;
|
|
46
|
+
badgesKey?: string;
|
|
47
|
+
titleLinkKey?: string;
|
|
48
|
+
render?: (row?: TableRow) => React.ReactNode;
|
|
49
|
+
isEditable?: boolean;
|
|
50
|
+
editType?: 'text' | 'number' | 'select';
|
|
51
|
+
options?: {
|
|
52
|
+
label: string;
|
|
53
|
+
value: string | number;
|
|
54
|
+
}[];
|
|
55
|
+
actions?: ActionItem[];
|
|
56
|
+
labelKey?: string;
|
|
57
|
+
valueType?: 'text' | 'currency' | 'date' | 'badge' | 'status';
|
|
58
|
+
csvDisplay?: boolean;
|
|
59
|
+
tableDisplay?: boolean;
|
|
60
|
+
width?: string | number;
|
|
61
|
+
className?: string;
|
|
62
|
+
statusClass?: string | ((row: any) => string);
|
|
63
|
+
};
|
|
64
|
+
export type TableRow = {
|
|
65
|
+
id?: string | number;
|
|
66
|
+
variation?: TableRow[];
|
|
67
|
+
expandedContent?: React.ReactNode;
|
|
68
|
+
[key: string]: string | number | boolean | React.ReactNode | TableRow[];
|
|
69
|
+
};
|
|
70
|
+
export type CurrencyConfig = {
|
|
71
|
+
currencySymbol?: string;
|
|
72
|
+
priceDecimals?: number;
|
|
73
|
+
decimalSeparator?: string;
|
|
74
|
+
thousandSeparator?: string;
|
|
75
|
+
currencyPosition?: 'left' | 'left_space' | 'right' | 'right_space';
|
|
76
|
+
};
|
|
77
|
+
type CommonTableProps = {
|
|
78
|
+
query?: QueryProps;
|
|
79
|
+
headers?: Record<string, TableHeaderConfig>;
|
|
80
|
+
rows?: Array<TableRow>;
|
|
81
|
+
className?: string;
|
|
82
|
+
onSort?: (key: string, direction: string) => void;
|
|
83
|
+
onRowClick?: (row: TableRow) => void;
|
|
84
|
+
};
|
|
85
|
+
export type TableProps = CommonTableProps & {
|
|
86
|
+
caption?: string;
|
|
87
|
+
classNames?: string | Record<string, string>;
|
|
88
|
+
ids?: Array<number | string>;
|
|
89
|
+
selectedIds?: Array<number>;
|
|
90
|
+
onSelectRow?: (id: number, selected: boolean) => void;
|
|
91
|
+
onSelectAll?: (selected: boolean) => void;
|
|
92
|
+
rowActions?: ActionItem[];
|
|
93
|
+
onCellEdit?: (key: string, row: TableRow, value: string | number | boolean) => void;
|
|
94
|
+
isLoading?: boolean;
|
|
95
|
+
enableBulkSelect?: boolean;
|
|
96
|
+
emptyMessage?: string;
|
|
97
|
+
hideHeader?: boolean;
|
|
98
|
+
format?: string;
|
|
99
|
+
currency?: CurrencyConfig;
|
|
100
|
+
onRowReorder?: (fromIndex: number, toIndex: number) => void;
|
|
101
|
+
expandable?: boolean;
|
|
102
|
+
expandText?: string;
|
|
103
|
+
expandedText?: string;
|
|
104
|
+
expandOnRowClick?: boolean;
|
|
105
|
+
activeRowId?: string | number;
|
|
106
|
+
};
|
|
107
|
+
export type TableCardProps = CommonTableProps & {
|
|
108
|
+
labels?: TableLabels;
|
|
109
|
+
variant?: 'transparent';
|
|
110
|
+
filtersBeforeSearch?: boolean;
|
|
111
|
+
ids?: Array<number | string>;
|
|
112
|
+
isLoading?: boolean;
|
|
113
|
+
onQueryChange?: (param: string) => (value?: string, direction?: string) => void;
|
|
114
|
+
onColumnsChange?: (showCols: Array<string>, key?: string) => void;
|
|
115
|
+
onPageChange?: (newPage: number, direction?: 'previous' | 'next' | 'goto') => void;
|
|
116
|
+
showMenu?: boolean;
|
|
117
|
+
emptyMessage?: string;
|
|
118
|
+
title?: string;
|
|
119
|
+
totalRows?: number;
|
|
120
|
+
bulkActions?: Array<{
|
|
121
|
+
label: string;
|
|
122
|
+
value: string;
|
|
123
|
+
}>;
|
|
124
|
+
onBulkActionApply?: (action: string, selectedIds: Array<number | string>) => void;
|
|
125
|
+
search?: {
|
|
126
|
+
placeholder?: string;
|
|
127
|
+
size?: number;
|
|
128
|
+
options?: {
|
|
129
|
+
label: string;
|
|
130
|
+
value: string;
|
|
131
|
+
}[];
|
|
132
|
+
};
|
|
133
|
+
onQueryUpdate?: (query: QueryProps) => void;
|
|
134
|
+
filters?: RealtimeFilterConfig[];
|
|
135
|
+
categoryCounts?: CategoryCount[];
|
|
136
|
+
activeCategory?: string;
|
|
137
|
+
languageFilterCounts?: CategoryCount[];
|
|
138
|
+
activeLanguageFilter?: string;
|
|
139
|
+
onCategoryClick?: (value: string) => void;
|
|
140
|
+
showColumnToggleIcon?: boolean;
|
|
141
|
+
rowActions?: ActionItem[];
|
|
142
|
+
onSelectCsvDownloadApply?: (selectedIds: number[]) => void;
|
|
143
|
+
onCellEdit?: (key: string, row: TableRow, value: string | number | boolean) => void;
|
|
144
|
+
buttonActions?: ButtonAction[];
|
|
145
|
+
format?: string;
|
|
146
|
+
currency?: {};
|
|
147
|
+
onRowReorder?: (fromIndex: number, toIndex: number) => void;
|
|
148
|
+
expandable?: boolean;
|
|
149
|
+
expandText?: string;
|
|
150
|
+
expandedText?: string;
|
|
151
|
+
expandOnRowClick?: boolean;
|
|
152
|
+
activeRowId?: string | number;
|
|
153
|
+
};
|
|
154
|
+
export type FilterOption = {
|
|
155
|
+
label: string;
|
|
156
|
+
value: string;
|
|
157
|
+
};
|
|
158
|
+
export type RealtimeFilterConfig = {
|
|
159
|
+
key: string;
|
|
160
|
+
label: string;
|
|
161
|
+
type: 'select' | 'date';
|
|
162
|
+
size: number;
|
|
163
|
+
multiple?: boolean;
|
|
164
|
+
options?: FilterOption[];
|
|
165
|
+
};
|
|
166
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multivendorx/zyra",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Component library for WordPress plugins. Aggregates every @zyra/* package into a single installable/importable bundle for external consumers. Styles are injected at runtime on import (no separate CSS import required).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"esbuild-sass-plugin": "^3.7.0",
|
|
53
53
|
"sass": "^1.100.0",
|
|
54
54
|
"tsup": "^8.5.1",
|
|
55
|
-
"@zyra/builders": "1.0.0",
|
|
56
55
|
"@zyra/builderform": "1.0.0",
|
|
57
56
|
"@zyra/core": "1.0.0",
|
|
58
57
|
"@zyra/inputs": "1.0.0",
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"@zyra/theme": "1.0.0"
|
|
62
61
|
},
|
|
63
62
|
"scripts": {
|
|
64
|
-
"build": "tsup --config ../../tsup.config.ts",
|
|
63
|
+
"build": "tsup --config ../../tsup.config.ts && node ../../scripts/emit-types.mjs",
|
|
65
64
|
"dev": "tsup --watch --config ../../tsup.config.ts",
|
|
66
65
|
"lint": "pnpm run lint:js && pnpm run lint:css",
|
|
67
66
|
"fix": "pnpm run fix:js && pnpm run fix:css",
|