@fastnd/components 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/QuickAccessCard/QuickAccessCard.d.ts +12 -0
- package/dist/components/ScoreBar/ScoreBar.d.ts +8 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/examples/dashboard/StatusDonutChart/StatusDonutChart.tsx +41 -56
- package/dist/examples/data-visualization/CardCarouselPanel/CardCarouselPanel.tsx +171 -0
- package/dist/examples/data-visualization/CellRenderers/CellRenderers.tsx +175 -0
- package/dist/examples/data-visualization/ColumnConfigPopover/ColumnConfigPopover.tsx +124 -0
- package/dist/examples/data-visualization/DataCardView/DataCardView.tsx +223 -0
- package/dist/examples/data-visualization/DataExplorerPagination/DataExplorerPagination.tsx +143 -0
- package/dist/examples/data-visualization/DataExplorerToolbar/DataExplorerToolbar.tsx +88 -0
- package/dist/examples/data-visualization/DataListView/DataListView.tsx +246 -0
- package/dist/examples/data-visualization/DataTableView/DataTableView.tsx +449 -0
- package/dist/examples/data-visualization/DataVisualizationPage/DataVisualizationPage.tsx +140 -0
- package/dist/examples/data-visualization/FilterChipGroup/FilterChipGroup.tsx +125 -0
- package/dist/examples/data-visualization/MoreFiltersPopover/MoreFiltersPopover.tsx +132 -0
- package/dist/examples/data-visualization/constants.ts +587 -0
- package/dist/examples/data-visualization/hooks/use-column-config.ts +76 -0
- package/dist/examples/data-visualization/hooks/use-data-explorer-state.ts +313 -0
- package/dist/examples/data-visualization/index.ts +1 -0
- package/dist/examples/data-visualization/types.ts +99 -0
- package/dist/examples/quickaccess/QuickAccess/QuickAccess.tsx +97 -0
- package/dist/examples/quickaccess/index.ts +2 -0
- package/dist/examples/quickaccess/types.ts +11 -0
- package/dist/fastnd-components.js +5708 -5590
- package/package.json +1 -1
- package/dist/examples/data-explorer/CardCarouselPanel/CardCarouselPanel.tsx +0 -197
- package/dist/examples/data-explorer/CardView/CardView.tsx +0 -168
- package/dist/examples/data-explorer/ColumnConfigPopover/ColumnConfigPopover.tsx +0 -157
- package/dist/examples/data-explorer/DataExplorerEmpty/DataExplorerEmpty.tsx +0 -56
- package/dist/examples/data-explorer/DataExplorerPage/DataExplorerPage.tsx +0 -101
- package/dist/examples/data-explorer/DataExplorerPagination/DataExplorerPagination.tsx +0 -129
- package/dist/examples/data-explorer/DataExplorerToolbar/DataExplorerToolbar.tsx +0 -143
- package/dist/examples/data-explorer/DomainSwitcher/DomainSwitcher.tsx +0 -36
- package/dist/examples/data-explorer/ExpansionRows/ExpansionRows.tsx +0 -180
- package/dist/examples/data-explorer/FilterChip/FilterChip.tsx +0 -85
- package/dist/examples/data-explorer/FilterPopoverContent/FilterPopoverContent.tsx +0 -73
- package/dist/examples/data-explorer/ListView/ListView.tsx +0 -305
- package/dist/examples/data-explorer/MoreFiltersPopover/MoreFiltersPopover.tsx +0 -113
- package/dist/examples/data-explorer/TableView/TableView.tsx +0 -193
- package/dist/examples/data-explorer/cells/CellRenderer.tsx +0 -147
- package/dist/examples/data-explorer/cells/CurrencyCell.tsx +0 -31
- package/dist/examples/data-explorer/cells/DoubleTextCell.tsx +0 -27
- package/dist/examples/data-explorer/cells/ExpandButton.tsx +0 -67
- package/dist/examples/data-explorer/cells/InventoryBadgeCell.tsx +0 -52
- package/dist/examples/data-explorer/cells/LinkCell.tsx +0 -42
- package/dist/examples/data-explorer/cells/ScoreBar.tsx +0 -50
- package/dist/examples/data-explorer/cells/StatusBadgeCell.tsx +0 -39
- package/dist/examples/data-explorer/cells/TextCell.tsx +0 -35
- package/dist/examples/data-explorer/cells/index.ts +0 -26
- package/dist/examples/data-explorer/domains/applications.ts +0 -225
- package/dist/examples/data-explorer/domains/customers.ts +0 -267
- package/dist/examples/data-explorer/domains/index.ts +0 -26
- package/dist/examples/data-explorer/domains/products.ts +0 -1116
- package/dist/examples/data-explorer/domains/projects.ts +0 -205
- package/dist/examples/data-explorer/hooks/use-data-explorer-state.ts +0 -371
- package/dist/examples/data-explorer/index.ts +0 -3
- package/dist/examples/data-explorer/types.ts +0 -239
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
// --- Domain keys & view modes ---
|
|
2
|
-
|
|
3
|
-
export type DomainKey = 'products' | 'projects' | 'customers' | 'applications'
|
|
4
|
-
|
|
5
|
-
export type ViewMode = 'table' | 'list' | 'card'
|
|
6
|
-
|
|
7
|
-
export type SortDirection = 'asc' | 'desc'
|
|
8
|
-
|
|
9
|
-
export type ColumnType =
|
|
10
|
-
| 'text'
|
|
11
|
-
| 'double-text'
|
|
12
|
-
| 'link'
|
|
13
|
-
| 'status-badge'
|
|
14
|
-
| 'currency'
|
|
15
|
-
| 'inventory'
|
|
16
|
-
| 'favorite'
|
|
17
|
-
| 'expand'
|
|
18
|
-
| 'progress'
|
|
19
|
-
|
|
20
|
-
// --- Column definitions ---
|
|
21
|
-
|
|
22
|
-
export interface ExpandColumnDef {
|
|
23
|
-
key: string
|
|
24
|
-
label: string
|
|
25
|
-
bold?: boolean
|
|
26
|
-
muted?: boolean
|
|
27
|
-
type?: 'score-bar'
|
|
28
|
-
mapTo?: string
|
|
29
|
-
secondaryKey?: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ColumnDef<TRow = Record<string, unknown>> {
|
|
33
|
-
label: string
|
|
34
|
-
type: ColumnType
|
|
35
|
-
sortable?: boolean
|
|
36
|
-
filterable?: boolean
|
|
37
|
-
primaryFilter?: boolean
|
|
38
|
-
visible?: boolean
|
|
39
|
-
searchable?: boolean
|
|
40
|
-
hideMobile?: boolean
|
|
41
|
-
hideTablet?: boolean
|
|
42
|
-
secondary?: string
|
|
43
|
-
rowLines?: number
|
|
44
|
-
currencyField?: string
|
|
45
|
-
headerIcon?: string
|
|
46
|
-
headerTooltip?: string
|
|
47
|
-
expandIcon?: string
|
|
48
|
-
expandLabel?: string
|
|
49
|
-
expandColumns?: ExpandColumnDef[]
|
|
50
|
-
expandTitleFn?: (row: TRow) => string
|
|
51
|
-
statusMap?: Record<string, string>
|
|
52
|
-
levelFn?: (value: number) => string
|
|
53
|
-
formatFn?: (value: number) => string
|
|
54
|
-
labelMap?: Record<string, string>
|
|
55
|
-
filterOptions?: string[]
|
|
56
|
-
filterFn?: (row: TRow, value: string) => boolean
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type ColumnsConfig<TRow = Record<string, unknown>> = Record<string, ColumnDef<TRow>>
|
|
60
|
-
|
|
61
|
-
// --- Layout definitions ---
|
|
62
|
-
|
|
63
|
-
export interface ListLayout {
|
|
64
|
-
titleField: string
|
|
65
|
-
metaFields?: string[]
|
|
66
|
-
badgeFields?: string[]
|
|
67
|
-
valueField?: string | null
|
|
68
|
-
expandField?: string
|
|
69
|
-
expandFields?: string[]
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface CardRowDef {
|
|
73
|
-
label: string
|
|
74
|
-
field: string
|
|
75
|
-
rendererOverride?: string
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface CardLayout {
|
|
79
|
-
titleField: string
|
|
80
|
-
subtitleField?: string
|
|
81
|
-
badgeFields?: string[]
|
|
82
|
-
rows?: CardRowDef[]
|
|
83
|
-
footerField?: string
|
|
84
|
-
expandField?: string
|
|
85
|
-
expandFields?: string[]
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface DomainLayout {
|
|
89
|
-
list: ListLayout
|
|
90
|
-
card: CardLayout
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface DomainConfig<TRow = Record<string, unknown>> {
|
|
94
|
-
key: DomainKey
|
|
95
|
-
label: string
|
|
96
|
-
resultLabel: string
|
|
97
|
-
columns: ColumnsConfig<TRow>
|
|
98
|
-
layout: DomainLayout
|
|
99
|
-
data: TRow[]
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// --- State ---
|
|
103
|
-
|
|
104
|
-
export interface DataExplorerState {
|
|
105
|
-
activeDomain: DomainKey
|
|
106
|
-
viewMode: ViewMode
|
|
107
|
-
sortColumn: string | null
|
|
108
|
-
sortDirection: SortDirection
|
|
109
|
-
filters: Record<string, string[]>
|
|
110
|
-
searchTerm: string
|
|
111
|
-
columnOrder: string[]
|
|
112
|
-
columnVisibility: Record<string, boolean>
|
|
113
|
-
expandedRows: Set<string>
|
|
114
|
-
favorites: Set<string>
|
|
115
|
-
currentPage: number
|
|
116
|
-
pageSize: number
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface DataExplorerActions {
|
|
120
|
-
switchDomain: (domain: DomainKey) => void
|
|
121
|
-
switchView: (mode: ViewMode) => void
|
|
122
|
-
toggleSort: (column: string) => void
|
|
123
|
-
setFilter: (column: string, values: string[]) => void
|
|
124
|
-
toggleFilterOption: (column: string, value: string) => void
|
|
125
|
-
clearFilter: (column: string) => void
|
|
126
|
-
resetAllFilters: () => void
|
|
127
|
-
resetSecondaryFilters: () => void
|
|
128
|
-
setSearchTerm: (term: string) => void
|
|
129
|
-
toggleExpand: (rowId: string) => void
|
|
130
|
-
toggleFavorite: (rowId: string) => void
|
|
131
|
-
toggleColumnVisibility: (column: string) => void
|
|
132
|
-
reorderColumns: (newOrder: string[]) => void
|
|
133
|
-
setCurrentPage: (page: number) => void
|
|
134
|
-
setPageSize: (size: number) => void
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface DataExplorerDerived {
|
|
138
|
-
domainConfig: DomainConfig
|
|
139
|
-
visibleColumns: string[]
|
|
140
|
-
filteredData: Record<string, unknown>[]
|
|
141
|
-
sortedData: Record<string, unknown>[]
|
|
142
|
-
paginatedData: Record<string, unknown>[]
|
|
143
|
-
totalFiltered: number
|
|
144
|
-
totalPages: number
|
|
145
|
-
hasActiveFilters: boolean
|
|
146
|
-
totalActiveFilterCount: number
|
|
147
|
-
primaryFilterColumns: [string, ColumnDef][]
|
|
148
|
-
secondaryFilterColumns: [string, ColumnDef][]
|
|
149
|
-
getFilterOptions: (columnKey: string) => string[]
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// --- Domain-specific row types ---
|
|
153
|
-
|
|
154
|
-
export interface ProductAlternative {
|
|
155
|
-
alt_part_number: string
|
|
156
|
-
alt_product_category: string
|
|
157
|
-
alt_product_family_name: string
|
|
158
|
-
alt_family_name: string
|
|
159
|
-
alt_manufacturer: string
|
|
160
|
-
alt_description: string
|
|
161
|
-
alt_lifecycle: string
|
|
162
|
-
match_score: number
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface ProductCrossSell {
|
|
166
|
-
cross_sell_part_number: string
|
|
167
|
-
cross_sell_product_category: string
|
|
168
|
-
cross_sell_product_family_name: string
|
|
169
|
-
cross_sell_family_name: string
|
|
170
|
-
cross_sell_manufacturer: string
|
|
171
|
-
cross_sell_description: string
|
|
172
|
-
recommendation_score: number
|
|
173
|
-
recommendation_source: string
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export interface Product {
|
|
177
|
-
id: string
|
|
178
|
-
part_number: string
|
|
179
|
-
tenant_part_number: string
|
|
180
|
-
product_category: string
|
|
181
|
-
product_group: string
|
|
182
|
-
product_family_name: string
|
|
183
|
-
manufacturer_name: string
|
|
184
|
-
description: string
|
|
185
|
-
price: number
|
|
186
|
-
currency: string
|
|
187
|
-
inventory: number
|
|
188
|
-
lead_time: string
|
|
189
|
-
lifecycle: string
|
|
190
|
-
favorite: boolean
|
|
191
|
-
alternatives: ProductAlternative[]
|
|
192
|
-
cross_sells: ProductCrossSell[]
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface Project {
|
|
196
|
-
id: string
|
|
197
|
-
name: string
|
|
198
|
-
customer_name: string
|
|
199
|
-
status: string
|
|
200
|
-
expected_closing: string
|
|
201
|
-
project_lifetime_quantity: number
|
|
202
|
-
favorite: boolean
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface CustomerProject {
|
|
206
|
-
project_name: string
|
|
207
|
-
status: string
|
|
208
|
-
volume: string
|
|
209
|
-
expected_closing: string
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export interface Customer {
|
|
213
|
-
id: string
|
|
214
|
-
name: string
|
|
215
|
-
main_customer: string
|
|
216
|
-
category: string
|
|
217
|
-
region: string
|
|
218
|
-
country_code: string
|
|
219
|
-
city: string
|
|
220
|
-
url: string
|
|
221
|
-
favorite: boolean
|
|
222
|
-
active_projects: CustomerProject[]
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export interface ApplicationProductFamily {
|
|
226
|
-
family_name: string
|
|
227
|
-
category: string
|
|
228
|
-
typical_products: string
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface Application {
|
|
232
|
-
id: string
|
|
233
|
-
name: string
|
|
234
|
-
description: string
|
|
235
|
-
url: string
|
|
236
|
-
trends: string
|
|
237
|
-
favorite: boolean
|
|
238
|
-
product_families: ApplicationProductFamily[]
|
|
239
|
-
}
|