blixify-ui-web-mcp 0.1.2 → 0.1.18
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/lib/components/action/button/README.md +12 -11
- package/lib/components/action/button/button.stories.tsx +4 -10
- package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +4 -10
- package/lib/components/action/iconButton/iconButton.stories.tsx +4 -10
- package/lib/components/action/radioList/radioList.stories.tsx +4 -10
- package/lib/components/action/slider/slider.stories.tsx +4 -10
- package/lib/components/action/textButton/textButton.stories.tsx +4 -10
- package/lib/components/action/toggle/toggle.stories.tsx +4 -10
- package/lib/components/advanced/collapse/collapse.stories.tsx +4 -10
- package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +4 -10
- package/lib/components/advanced/popUp/README.md +21 -7
- package/lib/components/advanced/popUp/popUp.stories.tsx +4 -10
- package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +30 -10
- package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +4 -10
- package/lib/components/auth/signIn/signIn.stories.tsx +4 -10
- package/lib/components/auth/signUp/signUp.stories.tsx +4 -10
- package/lib/components/chart/areaChart/areaChart.stories.tsx +7 -13
- package/lib/components/chart/barChart/barChart.stories.tsx +7 -13
- package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +8 -14
- package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +8 -14
- package/lib/components/chart/card/card.stories.tsx +4 -10
- package/lib/components/chart/ganttChart/README.md +96 -110
- package/lib/components/chart/ganttChart/ganttChart.stories.tsx +135 -125
- package/lib/components/chart/heatmapChart/README.md +93 -82
- package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +122 -84
- package/lib/components/chart/lineChart/lineChart.stories.tsx +4 -10
- package/lib/components/chart/pieChart/pieChart.stories.tsx +4 -10
- package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +8 -14
- package/lib/components/chart/radarChart/radarChart.stories.tsx +4 -10
- package/lib/components/chart/radialBar/radialChart.stories.tsx +4 -10
- package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +4 -10
- package/lib/components/chart/statsCard/statsCard.stories.tsx +4 -10
- package/lib/components/chart/treemapChart/treemapChart.stories.tsx +8 -14
- package/lib/components/chat/chatAnchor/README.md +61 -79
- package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +13 -19
- package/lib/components/chat/chatBase/README.md +244 -196
- package/lib/components/chat/chatBase/chatBase.stories.tsx +828 -250
- package/lib/components/chat/chatDashboard/README.md +89 -129
- package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +406 -117
- package/lib/components/data/dataGraph/README.md +135 -1
- package/lib/components/data/dataGraph/dataGraph.stories.tsx +90 -77
- package/lib/components/data/dataReference/README.md +141 -43
- package/lib/components/data/dataReference/dataReference.stories.tsx +111 -45
- package/lib/components/data/dataTemplate/README.md +88 -61
- package/lib/components/data/dataTemplate/dataModule.stories.tsx +4 -10
- package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +4 -10
- package/lib/components/data/dataWrapper/README.md +48 -46
- package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +258 -489
- package/lib/components/data/queryForm/queryForm.stories.tsx +4 -10
- package/lib/components/data/readQuery/readQuery.stories.tsx +4 -9
- package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +4 -10
- package/lib/components/data/writeQuery/writeQuery.stories.tsx +4 -8
- package/lib/components/design/actionSection/actionSection.stories.tsx +6 -10
- package/lib/components/design/banner/banner.stories.tsx +4 -10
- package/lib/components/design/bannerAction/bannerAction.stories.tsx +4 -10
- package/lib/components/design/blogSection/blogSection.stories.tsx +4 -10
- package/lib/components/design/carouselSection/carouselSection.stories.tsx +4 -10
- package/lib/components/design/designList/designList.stories.tsx +4 -10
- package/lib/components/design/faq/faq.stories.tsx +4 -10
- package/lib/components/design/fileGrid/fileGrid.stories.tsx +4 -10
- package/lib/components/design/fileViewer/fileViewer.stories.tsx +4 -10
- package/lib/components/design/footerSection/footerSection.stories.tsx +4 -10
- package/lib/components/design/googleReview/googleReview.stories.tsx +4 -10
- package/lib/components/design/heroSection/heroSection.stories.tsx +4 -10
- package/lib/components/design/iconList/iconList.stories.tsx +4 -10
- package/lib/components/design/imageGallery/imageGallery.stories.tsx +4 -10
- package/lib/components/design/imageZoom/imageZoom.stories.tsx +4 -10
- package/lib/components/design/leftContent/leftContent.stories.tsx +4 -10
- package/lib/components/design/logoCloud/logoCloud.stories.tsx +4 -10
- package/lib/components/design/onboarding/onboarding.stories.tsx +4 -10
- package/lib/components/design/pricing/pricing.stories.tsx +4 -10
- package/lib/components/design/rightContent/rightContent.stories.tsx +4 -10
- package/lib/components/design/sectionList/sectionList.stories.tsx +4 -10
- package/lib/components/design/teams/teams.stories.tsx +4 -10
- package/lib/components/display/alert/alert.stories.tsx +4 -10
- package/lib/components/display/calendar/README.md +49 -0
- package/lib/components/display/calendar/calendar.stories.tsx +71 -28
- package/lib/components/display/clipboard/clipboard.stories.tsx +4 -10
- package/lib/components/display/detailList/detailList.stories.tsx +5 -10
- package/lib/components/display/drawer/drawer.stories.tsx +5 -10
- package/lib/components/display/emptyState/emptyState.stories.tsx +4 -10
- package/lib/components/display/feeds/feeds.stories.tsx +4 -10
- package/lib/components/display/flexTable/README.md +11 -7
- package/lib/components/display/flexTable/flexTable.stories.tsx +114 -11
- package/lib/components/display/grid/README.md +28 -27
- package/lib/components/display/grid/grid.stories.tsx +4 -10
- package/lib/components/display/kanban/kanban.stories.tsx +14 -20
- package/lib/components/display/list/README.md +30 -29
- package/lib/components/display/list/list.stories.tsx +4 -10
- package/lib/components/display/loading/loading.stories.tsx +5 -10
- package/lib/components/display/mapView/mapView.stories.tsx +4 -10
- package/lib/components/display/modal/modal.stories.tsx +4 -11
- package/lib/components/display/notification/notification.stories.tsx +4 -10
- package/lib/components/display/progress/progress.stories.tsx +5 -10
- package/lib/components/display/stepper/stepper.stories.tsx +5 -10
- package/lib/components/display/table/README.md +38 -37
- package/lib/components/display/table/table.stories.tsx +8 -14
- package/lib/components/display/tag/tag.stories.tsx +4 -10
- package/lib/components/input/address/address.stories.tsx +4 -10
- package/lib/components/input/canvas/canvas.stories.tsx +4 -10
- package/lib/components/input/checkbox/checkbox.stories.tsx +4 -10
- package/lib/components/input/datePicker/datePicker.stories.tsx +4 -10
- package/lib/components/input/form/form.stories.tsx +4 -10
- package/lib/components/input/markdown/markdown.stories.tsx +5 -10
- package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +4 -10
- package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +4 -10
- package/lib/components/input/rating/rating.stories.tsx +4 -10
- package/lib/components/input/select/README.md +30 -29
- package/lib/components/input/select/select.stories.tsx +4 -10
- package/lib/components/input/signature/signature.stories.tsx +4 -10
- package/lib/components/input/textArea/textArea.stories.tsx +4 -10
- package/lib/components/input/textInput/textinput.stories.tsx +4 -10
- package/lib/components/input/uploadInput/uploadInput.stories.tsx +135 -11
- package/lib/components/navigation/bars/README.md +90 -17
- package/lib/components/navigation/bars/bars.stories.tsx +128 -60
- package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +5 -10
- package/lib/components/navigation/breadcrumb/README.md +40 -20
- package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +34 -14
- package/lib/components/navigation/header/README.md +67 -108
- package/lib/components/navigation/header/header.stories.tsx +165 -49
- package/lib/components/navigation/leftNav/README.md +121 -66
- package/lib/components/navigation/leftNav/leftNav.stories.tsx +178 -91
- package/lib/components/navigation/tabs/tabs.stories.tsx +57 -39
- package/lib/components/structure/column/column.stories.tsx +5 -10
- package/lib/components/structure/container/container.stories.tsx +5 -10
- package/lib/components/structure/link/link.stories.tsx +4 -10
- package/lib/components/structure/text/text.stories.tsx +5 -10
- package/lib/components/template/authPage/authPage.stories.tsx +6 -5
- package/lib/components/template/landingPage/landingPage.stories.tsx +8 -6
- package/lib/components/template/productListing/productListing.stories.tsx +7 -13
- package/lib/components/template/productOverview/productOverview.stories.tsx +5 -11
- package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +6 -12
- package/lib/components/template/userHomePage/userHomePage.stories.tsx +7 -6
- package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +5 -11
- package/package.json +1 -1
|
@@ -1,53 +1,119 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
1
|
import axios from "axios";
|
|
3
|
-
import { useState } from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
4
3
|
import { DataReference } from "../dataReference/index";
|
|
5
|
-
import
|
|
4
|
+
import { StorySection } from "../../storyUtils";
|
|
6
5
|
|
|
7
|
-
const
|
|
6
|
+
const meta = { title: "Data/Data Reference" };
|
|
7
|
+
export default meta;
|
|
8
8
|
|
|
9
|
-
stories.addParameters({
|
|
10
|
-
readme: {
|
|
11
|
-
content: README,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const devSettings = {
|
|
11
|
+
apiEndpoint: "http://localhost:3000/api",
|
|
12
|
+
apiEndpointType: "mondayServer" as const,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const DataReferenceStory = () => {
|
|
16
|
+
const [singleValue, setSingleValue] = useState("");
|
|
17
|
+
const [filteredValue, setFilteredValue] = useState("");
|
|
18
|
+
const [multiValue, setMultiValue] = useState<string[]>([]);
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
21
|
+
<>
|
|
22
|
+
<StorySection
|
|
23
|
+
title="Single Reference"
|
|
24
|
+
description="type='reference' renders a single-select. Options are fetched from the referenceSpaceId collection and labelled by referenceLabel."
|
|
25
|
+
>
|
|
26
|
+
<div className="w-80">
|
|
27
|
+
<DataReference
|
|
28
|
+
value={singleValue}
|
|
29
|
+
schema={{
|
|
30
|
+
id: "salesSelected",
|
|
31
|
+
name: "Sales Person",
|
|
32
|
+
type: "reference",
|
|
33
|
+
referenceSpaceId: "nonAuthSalesNameList",
|
|
34
|
+
referenceLabel: "name",
|
|
35
|
+
}}
|
|
36
|
+
devSettings={devSettings}
|
|
37
|
+
lib={{ axios }}
|
|
38
|
+
onChange={(value) => setSingleValue(value)}
|
|
39
|
+
staticDropdown
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</StorySection>
|
|
43
|
+
|
|
44
|
+
<StorySection
|
|
45
|
+
title="With Query Filter & Sort"
|
|
46
|
+
description="referenceQuery filters the fetched options server-side. referenceSort controls the order. subLabel adds a secondary hint below the field label."
|
|
47
|
+
>
|
|
48
|
+
<div className="w-80">
|
|
49
|
+
<DataReference
|
|
50
|
+
value={filteredValue}
|
|
51
|
+
schema={{
|
|
52
|
+
id: "filteredSales",
|
|
53
|
+
name: "Referral Sales Person",
|
|
54
|
+
type: "reference",
|
|
55
|
+
referenceSpaceId: "nonAuthSalesNameList",
|
|
56
|
+
referenceLabel: "name",
|
|
57
|
+
referenceQuery: [
|
|
58
|
+
{ type: "=", value: "Sales", queryId: "dup__of_role__1" },
|
|
59
|
+
],
|
|
60
|
+
referenceSort: { sortId: "name", type: "asc" },
|
|
61
|
+
}}
|
|
62
|
+
devSettings={devSettings}
|
|
63
|
+
lib={{ axios }}
|
|
64
|
+
onChange={(value) => setFilteredValue(value)}
|
|
65
|
+
subLabel="Only Sales role members are shown"
|
|
66
|
+
staticDropdown
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
</StorySection>
|
|
70
|
+
|
|
71
|
+
<StorySection
|
|
72
|
+
title="Multi-select (listReference)"
|
|
73
|
+
description="type='listReference' enables multi-select — value is a string array. closeOnClickOutside keeps the dropdown open until the user clicks away."
|
|
74
|
+
>
|
|
75
|
+
<div className="w-80">
|
|
76
|
+
<DataReference
|
|
77
|
+
value={multiValue}
|
|
78
|
+
schema={{
|
|
79
|
+
id: "assignees",
|
|
80
|
+
name: "Assignees",
|
|
81
|
+
type: "listReference",
|
|
82
|
+
referenceSpaceId: "nonAuthSalesNameList",
|
|
83
|
+
referenceLabel: "name",
|
|
84
|
+
}}
|
|
85
|
+
devSettings={devSettings}
|
|
86
|
+
lib={{ axios }}
|
|
87
|
+
onChange={(value) => setMultiValue(value)}
|
|
88
|
+
closeOnClickOutside
|
|
89
|
+
staticDropdown
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
</StorySection>
|
|
93
|
+
|
|
94
|
+
<StorySection
|
|
95
|
+
title="Dark Mode"
|
|
96
|
+
description="Pass darkMode=true for use on dark backgrounds."
|
|
97
|
+
dark
|
|
98
|
+
>
|
|
99
|
+
<div className="w-80">
|
|
100
|
+
<DataReference
|
|
101
|
+
value={singleValue}
|
|
102
|
+
schema={{
|
|
103
|
+
id: "darkSales",
|
|
104
|
+
name: "Sales Person",
|
|
105
|
+
type: "reference",
|
|
106
|
+
referenceSpaceId: "nonAuthSalesNameList",
|
|
107
|
+
referenceLabel: "name",
|
|
108
|
+
}}
|
|
109
|
+
devSettings={devSettings}
|
|
110
|
+
lib={{ axios }}
|
|
111
|
+
onChange={(value) => setSingleValue(value)}
|
|
112
|
+
darkMode
|
|
113
|
+
staticDropdown
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
</StorySection>
|
|
117
|
+
</>
|
|
52
118
|
);
|
|
53
|
-
}
|
|
119
|
+
}
|
|
@@ -683,57 +683,58 @@ const devSettings = parseWorkspaceSettings(
|
|
|
683
683
|
|
|
684
684
|
### Organise
|
|
685
685
|
|
|
686
|
-
| Name | Type | Description
|
|
687
|
-
| ----------------------------- | --------------------------------------------------------------------------- |
|
|
688
|
-
| `sort` | `Sort` | Default sort applied to list queries
|
|
689
|
-
| `pageIndex` | `number` | Initial page index
|
|
690
|
-
| `viewId` | `string` | Active view type: `"general"`, `"calendar"`, `"grid"`, `"list"`, `"feeds"`, `"kanban"`, etc.
|
|
691
|
-
| `idField` | `string` | DataStructure column ID whose value becomes the new record's ID on creation
|
|
692
|
-
| `extendedTabs` | `ExtendedTabs[]` | Additional tabs rendered alongside the main view — see Extended Tab below
|
|
693
|
-
| `additionalQuery` | `AdditionalQuery[]` | Filter/search controls rendered above the list — see Additional Query below
|
|
694
|
-
| `darkMode` | `boolean` | Applies dark colour scheme to the organise bar
|
|
695
|
-
| `hideSearch` | `boolean` | Hides the search input
|
|
696
|
-
| `hidePagination` | `boolean` | Hides pagination on Table, List, Grid, and Feeds views
|
|
697
|
-
| `hideNewTabs` | `boolean` | Hides the new-tab creation button
|
|
698
|
-
| `splitView` | `boolean` | Renders a split list/detail layout in read mode
|
|
699
|
-
| `listObjectTableView` | `boolean` | Shows list objects in table view during read and update
|
|
700
|
-
| `disableMulti` | `boolean` | Disables multi-row selection
|
|
701
|
-
| `disableSelectFullData` | `{ table?: boolean; list?: boolean }` | Disables "select all pages" for table and/or list views
|
|
702
|
-
| `disabledOnEnter` | `boolean` | Prevents Enter key from submitting forms
|
|
703
|
-
| `breadcrumbType` | `"button" \| "hidden"` | `"button"` shows a back button; `"hidden"` hides the breadcrumb entirely
|
|
704
|
-
| `breadcrumbAttributeId` | `string` | Column ID whose value is used as the breadcrumb label in read view
|
|
705
|
-
| `tabAlign` | `"top" \| "left" \| "stepper"` | Tab layout direction
|
|
706
|
-
| `groupRead` | `"groupId"` | Groups and separates read view sections by DataStructure `groupId`
|
|
707
|
-
| `showCollapsibleTab` | `boolean` | Renders tabs as collapsible sections
|
|
708
|
-
| `showBaseUpdatedAt` | `boolean` | Shows the `baseUpdatedAt` timestamp in Table, Grid, List, and Kanban views
|
|
709
|
-
| `showGroupByFeature` | `boolean` | Shows the group-by selector in the toolbar
|
|
710
|
-
| `showReadFloatingNav` | `boolean` | Shows a floating section navigator in read view
|
|
711
|
-
| `showExport` | `boolean` | Shows import/export options (default `true`)
|
|
712
|
-
| `disableEllipsisOnLongWord` | `boolean` | Wraps long text instead of truncating with ellipsis
|
|
713
|
-
| `fixedPagination` | `boolean` | Fixes the pagination bar to the bottom of the viewport
|
|
714
|
-
| `filterComponentNewRow` | `boolean` | Renders each filter component on its own row
|
|
715
|
-
| `addColumnEnabled` | `boolean` | Shows an add-column button in the table header
|
|
716
|
-
| `advSortEnabled` | `boolean` | Shows advanced sort controls
|
|
717
|
-
| `advFilterEnabled` | `boolean` | Shows advanced filter controls
|
|
718
|
-
| `advDragEnabled` | `boolean` | Enables drag-to-reorder columns
|
|
719
|
-
| `groupBy` | `string` | Column ID to group list results by
|
|
720
|
-
| `groupIdCollapsible` | `{ [key: string]: boolean }` | Initial collapsed/expanded state per group ID
|
|
721
|
-
| `sortGroupByAlphabetically` | `boolean` | Sorts group-by values alphabetically
|
|
722
|
-
| `unionCollections` | `any[]` | Additional collections to union-query alongside the main collection
|
|
723
|
-
| `moreSettings` | `{ text: string; onClick: () => void }[]` | Extra items appended to the "more" dropdown menu
|
|
724
|
-
| `exportSettings` | `ExportSettings` | See Export Settings below
|
|
725
|
-
| `onChangeSort` | `(value: Sort) => void` | Called when the user changes the sort
|
|
726
|
-
| `onChangeFilter` | `(value: AdditionalQuery[]) => void` | Called when the user changes filters
|
|
727
|
-
| `onChangeHide` | `(value: DataStructure[]) => void` | Called when the user hides/shows columns
|
|
728
|
-
| `onChangeDrag` | `(dragId: string, dropId: string, newHeader: TableHeader[]) => void` | Called after a column is reordered
|
|
729
|
-
| `onChangeTabs` | `(value: ExtendedTabs[]) => void` | Called when tabs are added/removed/reordered
|
|
730
|
-
| `onChangePagination` | `(page: number) => void` | Called when the page changes
|
|
731
|
-
| `
|
|
732
|
-
| `
|
|
733
|
-
| `
|
|
734
|
-
| `
|
|
735
|
-
| `
|
|
736
|
-
| `
|
|
686
|
+
| Name | Type | Description |
|
|
687
|
+
| ----------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
688
|
+
| `sort` | `Sort` | Default sort applied to list queries |
|
|
689
|
+
| `pageIndex` | `number` | Initial page index |
|
|
690
|
+
| `viewId` | `string` | Active view type: `"general"`, `"calendar"`, `"grid"`, `"list"`, `"feeds"`, `"kanban"`, etc. |
|
|
691
|
+
| `idField` | `string` | DataStructure column ID whose value becomes the new record's ID on creation |
|
|
692
|
+
| `extendedTabs` | `ExtendedTabs[]` | Additional tabs rendered alongside the main view — see Extended Tab below |
|
|
693
|
+
| `additionalQuery` | `AdditionalQuery[]` | Filter/search controls rendered above the list — see Additional Query below |
|
|
694
|
+
| `darkMode` | `boolean` | Applies dark colour scheme to the organise bar |
|
|
695
|
+
| `hideSearch` | `boolean` | Hides the search input |
|
|
696
|
+
| `hidePagination` | `boolean` | Hides pagination on Table, List, Grid, and Feeds views |
|
|
697
|
+
| `hideNewTabs` | `boolean` | Hides the new-tab creation button |
|
|
698
|
+
| `splitView` | `boolean` | Renders a split list/detail layout in read mode |
|
|
699
|
+
| `listObjectTableView` | `boolean` | Shows list objects in table view during read and update |
|
|
700
|
+
| `disableMulti` | `boolean` | Disables multi-row selection |
|
|
701
|
+
| `disableSelectFullData` | `{ table?: boolean; list?: boolean }` | Disables "select all pages" for table and/or list views |
|
|
702
|
+
| `disabledOnEnter` | `boolean` | Prevents Enter key from submitting forms |
|
|
703
|
+
| `breadcrumbType` | `"button" \| "hidden"` | `"button"` shows a back button; `"hidden"` hides the breadcrumb entirely |
|
|
704
|
+
| `breadcrumbAttributeId` | `string` | Column ID whose value is used as the breadcrumb label in read view |
|
|
705
|
+
| `tabAlign` | `"top" \| "left" \| "stepper"` | Tab layout direction |
|
|
706
|
+
| `groupRead` | `"groupId"` | Groups and separates read view sections by DataStructure `groupId` |
|
|
707
|
+
| `showCollapsibleTab` | `boolean` | Renders tabs as collapsible sections |
|
|
708
|
+
| `showBaseUpdatedAt` | `boolean` | Shows the `baseUpdatedAt` timestamp in Table, Grid, List, and Kanban views |
|
|
709
|
+
| `showGroupByFeature` | `boolean` | Shows the group-by selector in the toolbar |
|
|
710
|
+
| `showReadFloatingNav` | `boolean` | Shows a floating section navigator in read view |
|
|
711
|
+
| `showExport` | `boolean` | Shows import/export options (default `true`) |
|
|
712
|
+
| `disableEllipsisOnLongWord` | `boolean` | Wraps long text instead of truncating with ellipsis |
|
|
713
|
+
| `fixedPagination` | `boolean` | Fixes the pagination bar to the bottom of the viewport |
|
|
714
|
+
| `filterComponentNewRow` | `boolean` | Renders each filter component on its own row |
|
|
715
|
+
| `addColumnEnabled` | `boolean` | Shows an add-column button in the table header |
|
|
716
|
+
| `advSortEnabled` | `boolean` | Shows advanced sort controls |
|
|
717
|
+
| `advFilterEnabled` | `boolean` | Shows advanced filter controls |
|
|
718
|
+
| `advDragEnabled` | `boolean` | Enables drag-to-reorder columns |
|
|
719
|
+
| `groupBy` | `string` | Column ID to group list results by |
|
|
720
|
+
| `groupIdCollapsible` | `{ [key: string]: boolean }` | Initial collapsed/expanded state per group ID |
|
|
721
|
+
| `sortGroupByAlphabetically` | `boolean` | Sorts group-by values alphabetically |
|
|
722
|
+
| `unionCollections` | `any[]` | Additional collections to union-query alongside the main collection |
|
|
723
|
+
| `moreSettings` | `{ text: string; onClick: () => void }[]` | Extra items appended to the "more" dropdown menu |
|
|
724
|
+
| `exportSettings` | `ExportSettings` | See Export Settings below |
|
|
725
|
+
| `onChangeSort` | `(value: Sort) => void` | Called when the user changes the sort |
|
|
726
|
+
| `onChangeFilter` | `(value: AdditionalQuery[]) => void` | Called when the user changes filters |
|
|
727
|
+
| `onChangeHide` | `(value: DataStructure[]) => void` | Called when the user hides/shows columns |
|
|
728
|
+
| `onChangeDrag` | `(dragId: string, dropId: string, newHeader: TableHeader[]) => void` | Called after a column is reordered |
|
|
729
|
+
| `onChangeTabs` | `(value: ExtendedTabs[]) => void` | Called when tabs are added/removed/reordered |
|
|
730
|
+
| `onChangePagination` | `(page: number) => void` | Called when the page changes |
|
|
731
|
+
| `customPaginationCount` | `(pageDataCount: number) => void` | Called after each data fetch with the actual record count. Use this to override the count shown in the pagination bar — store the value in your own state and pass it back via `customPaginationSize` on `Table`, `Grid`, `List`, or `Pagination` if needed, or use it to display a custom count elsewhere in your UI |
|
|
732
|
+
| `onAddColumns` | `(model: DataStructure[]) => void` | Called when a new column is added |
|
|
733
|
+
| `handleNavigate` | `(type: string, selectedId?: string, viewId?: string) => void` | Called when the component needs to navigate (e.g. row click → read view) |
|
|
734
|
+
| `handleCustomDownloadFile` | `(url: string, fileName?: string) => void` | Overrides the default file download behaviour |
|
|
735
|
+
| `renderReferenceLabelOptions` | `(spaceId?: string, includeReference?: boolean, type?: string) => Option[]` | Returns column options for reference label selectors |
|
|
736
|
+
| `renderReferenceSpaceOptions` | `() => Option[]` | Returns space options for reference space selectors |
|
|
737
|
+
| `renderGroupByOptions` | `() => Option[]` | Returns custom options for the group-by selector |
|
|
737
738
|
|
|
738
739
|
### Export Settings
|
|
739
740
|
|
|
@@ -863,16 +864,42 @@ Injects custom React components and callbacks into the list, read, and update vi
|
|
|
863
864
|
|
|
864
865
|
### Calendar Settings
|
|
865
866
|
|
|
866
|
-
| Name | Type
|
|
867
|
-
| ------------------ |
|
|
868
|
-
| `title` | `string`
|
|
869
|
-
| `startDate` | `string`
|
|
870
|
-
| `endDate` | `string`
|
|
871
|
-
| `defaultStartDate` | `Date`
|
|
872
|
-
| `customView` | `CalendarCustomView`
|
|
873
|
-
| `groupId` | `string`
|
|
874
|
-
| `groupColor` | `Color[]`
|
|
875
|
-
| `customHeader` | `string`
|
|
867
|
+
| Name | Type | Description |
|
|
868
|
+
| ------------------ | -------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
869
|
+
| `title` | `string` | Column ID for event title |
|
|
870
|
+
| `startDate` | `string` | Column ID for event start date |
|
|
871
|
+
| `endDate` | `string` | Column ID for event end date |
|
|
872
|
+
| `defaultStartDate` | `Date` | Default calendar start date |
|
|
873
|
+
| `customView` | `CalendarCustomView` | Custom calendar view config |
|
|
874
|
+
| `groupId` | `string` | Column ID — events with the same value share a background colour |
|
|
875
|
+
| `groupColor` | `Color[]` | Background colours for groups |
|
|
876
|
+
| `customHeader` | `string` | Custom title replacing the default calendar header |
|
|
877
|
+
| `eventColorRules` | `CalendarEventColorRule[]` | Maps a field+value on each event to an explicit color. Takes priority over `groupId` coloring. See below. |
|
|
878
|
+
|
|
879
|
+
### CalendarEventColorRule
|
|
880
|
+
|
|
881
|
+
| Name | Type | Required | Description |
|
|
882
|
+
| ------------ | -------- | -------- | -------------------------------------------------------------------- |
|
|
883
|
+
| `field` | `string` | yes | Column ID on the event data to match against (e.g. `"status"`) |
|
|
884
|
+
| `value` | `any` | yes | The value to match (e.g. `"Approved"`) |
|
|
885
|
+
| `color` | `string` | yes | Tailwind bg class for the event pill, e.g. `"bg-green-500"` |
|
|
886
|
+
| `hoverColor` | `string` | no | Tailwind hover class for the event pill, e.g. `"hover:bg-green-700"` |
|
|
887
|
+
| `textColor` | `string` | no | Tailwind text class for the event pill, e.g. `"text-white"` |
|
|
888
|
+
|
|
889
|
+
Example — color events by status:
|
|
890
|
+
|
|
891
|
+
```tsx
|
|
892
|
+
calendarSettings: {
|
|
893
|
+
title: "name",
|
|
894
|
+
startDate: "startAt",
|
|
895
|
+
endDate: "endAt",
|
|
896
|
+
eventColorRules: [
|
|
897
|
+
{ field: "status", value: "Approved", color: "bg-green-500", hoverColor: "hover:bg-green-700", textColor: "text-white" },
|
|
898
|
+
{ field: "status", value: "Pending", color: "bg-yellow-400", hoverColor: "hover:bg-yellow-600", textColor: "text-white" },
|
|
899
|
+
{ field: "status", value: "Rejected", color: "bg-red-500", hoverColor: "hover:bg-red-700", textColor: "text-white" },
|
|
900
|
+
],
|
|
901
|
+
}
|
|
902
|
+
```
|
|
876
903
|
|
|
877
904
|
### Feeds Settings
|
|
878
905
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Menu, Transition } from "@headlessui/react";
|
|
2
|
-
import { storiesOf } from "@storybook/react";
|
|
3
2
|
import axios from "axios";
|
|
4
3
|
import Papa from "papaparse";
|
|
5
4
|
import React, { useEffect, useState } from "react";
|
|
@@ -11,20 +10,15 @@ import { blixifyDevCollection, blixifyDevWorkspace } from "../testData";
|
|
|
11
10
|
import { parseSpaceToDataStructure, parseWorkspaceSettings } from "../utils";
|
|
12
11
|
import { DataTemplateProps } from "./dataStateModel";
|
|
13
12
|
import { DataStructure } from "./model";
|
|
14
|
-
import README from "./README.md";
|
|
15
13
|
import SampleModule from "./SampleModule";
|
|
16
14
|
import { AdditionalQuery, ExtendedTabs, Space } from "./spaceModel";
|
|
17
15
|
import { Workspace } from "./workspaceModel";
|
|
18
16
|
|
|
19
|
-
const
|
|
17
|
+
const meta = { title: "Data/Data Module" };
|
|
18
|
+
export default meta;
|
|
20
19
|
|
|
21
|
-
stories.addParameters({
|
|
22
|
-
readme: {
|
|
23
|
-
content: README,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
20
|
|
|
27
|
-
|
|
21
|
+
export const DataModule = () => {
|
|
28
22
|
const [selectedSpace, setSelectedSpace] = useState<Space | null>(null);
|
|
29
23
|
const [selectedWorkspace, setSelectedWorkspace] =
|
|
30
24
|
useState<Workspace | null>(null);
|
|
@@ -193,4 +187,4 @@ stories.add("Data Module", () => {
|
|
|
193
187
|
)}
|
|
194
188
|
</Container>
|
|
195
189
|
);
|
|
196
|
-
}
|
|
190
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Menu, Transition } from "@headlessui/react";
|
|
2
2
|
import { TagIcon } from "@heroicons/react/24/outline";
|
|
3
|
-
import { storiesOf } from "@storybook/react";
|
|
4
3
|
import axios from "axios";
|
|
5
4
|
import Papa from "papaparse";
|
|
6
5
|
import React, { useEffect, useRef, useState } from "react";
|
|
@@ -24,19 +23,14 @@ import {
|
|
|
24
23
|
import { blixifyDevCollection, blixifyDevWorkspace } from "../testData";
|
|
25
24
|
import { parseSpaceToDataStructure, parseWorkspaceSettings } from "../utils";
|
|
26
25
|
import { DataStructure } from "./model";
|
|
27
|
-
import README from "./README.md";
|
|
28
26
|
import { AdditionalQuery, ExtendedTabs, Space } from "./spaceModel";
|
|
29
27
|
import { Workspace } from "./workspaceModel";
|
|
30
28
|
|
|
31
|
-
const
|
|
29
|
+
const meta = { title: "Data/Data Template" };
|
|
30
|
+
export default meta;
|
|
32
31
|
|
|
33
|
-
stories.addParameters({
|
|
34
|
-
readme: {
|
|
35
|
-
content: README,
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
export const DataTemplateStory = () => {
|
|
40
34
|
const [selectedSpace, setSelectedSpace] = useState<Space | null>(null);
|
|
41
35
|
const [allWorkspaceSpace, setAllWorkspaceSpace] = useState<Space[]>([]);
|
|
42
36
|
const [selectedWorkspace, setSelectedWorkspace] =
|
|
@@ -334,4 +328,4 @@ stories.add("Data Template", () => {
|
|
|
334
328
|
</StorySection>
|
|
335
329
|
</>
|
|
336
330
|
);
|
|
337
|
-
}
|
|
331
|
+
}
|
|
@@ -397,7 +397,8 @@ bareSettings={{
|
|
|
397
397
|
<span className="text-sm text-gray-500">{item.status}</span>
|
|
398
398
|
</li>
|
|
399
399
|
))}
|
|
400
|
-
</ul
|
|
400
|
+
</ul>,
|
|
401
|
+
viewSettings={{ listImage: "image" }} // Pass in image column ID (or just "image") for bareListComponent to replace the ddefault UI
|
|
401
402
|
),
|
|
402
403
|
|
|
403
404
|
// Always-on filter applied to every list fetch (e.g. scope to current user)
|
|
@@ -630,7 +631,7 @@ async function prefetchReferenceOptions() {
|
|
|
630
631
|
await db.put(
|
|
631
632
|
"references",
|
|
632
633
|
siteRecords.map((r) => ({ key: r._id, label: r.name })),
|
|
633
|
-
"sites-ref"
|
|
634
|
+
"sites-ref",
|
|
634
635
|
);
|
|
635
636
|
await db.put(
|
|
636
637
|
"references",
|
|
@@ -639,7 +640,7 @@ async function prefetchReferenceOptions() {
|
|
|
639
640
|
label: r.name,
|
|
640
641
|
secondaryLabel: r.email,
|
|
641
642
|
})),
|
|
642
|
-
"users-ref"
|
|
643
|
+
"users-ref",
|
|
643
644
|
);
|
|
644
645
|
}
|
|
645
646
|
|
|
@@ -1023,49 +1024,50 @@ A shorthand that builds the `extendedTabs` and `viewId` config for you. Only one
|
|
|
1023
1024
|
|
|
1024
1025
|
### Bare Settings
|
|
1025
1026
|
|
|
1026
|
-
| Name | Type | Description
|
|
1027
|
-
| ---------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
1028
|
-
| `bareReadComponent` | `(data: any) => ReactElement` | Custom component rendered in read view
|
|
1029
|
-
| `bareReadComponentPos` | `"top"` | Renders `bareReadComponent` above the default read content
|
|
1030
|
-
| `bareReadComponentHide` | `boolean` | Hides the default read content
|
|
1031
|
-
| `bareReadDescription` | `(key, value) => any` | Custom renderer for read view field values
|
|
1032
|
-
| `bareReadReferenceView` | `(dataId, collectionId, attributeId) => boolean \| void` | Controls whether a reference field opens a view
|
|
1033
|
-
| `bareReadHandleData` | `(data: any) => void` | Called when read view data is loaded
|
|
1034
|
-
| `bareReadListTabs` | `boolean` | Shows list-style tabs in read view
|
|
1035
|
-
| `bareListComponent` | `(data, prettierData, loading, pageIndex) => ReactElement` | Fully replaces the list UI
|
|
1036
|
-
| `bareListActionBtns` | `(data: any) => ReactElement[]` | Extra icon buttons on each list row
|
|
1037
|
-
| `bareListMultipleSelectAddtionalActions` | `{ text: string; className?: string; onClick: (ids, selectAll, query) => void }[]` | Extra bulk-action buttons when rows are selected
|
|
1038
|
-
| `bareListGridComponent` | `(data: any) => ReactElement` | Custom card renderer for grid view
|
|
1039
|
-
| `bareListGridColClassName` | `string` | Tailwind class for grid column width
|
|
1040
|
-
| `bareListGridTags` | `(data: any) => string[]` | Tag strings shown on grid cards
|
|
1041
|
-
| `bareListGridRibbonText` | `(data: any) => string` | Ribbon text on grid cards
|
|
1042
|
-
| `bareListGridFallbackImg` | `(data: any) => string \| ReactElement` | Fallback image for grid cards
|
|
1043
|
-
| `bareListHandleData` | `(data, prettierData) => void` | Called when list data is loaded
|
|
1044
|
-
| `bareListHandleFilter` | `(search, select, date, reference) => void` | Called when any filter changes
|
|
1045
|
-
| `bareListHandleSelection` | `(selectAll, selectedIds, query?) => void` | Called when row selection changes
|
|
1046
|
-
| `bareListDescription` | `(key, value) => any` | Custom renderer for list view field values
|
|
1047
|
-
| `bareListFilterQuery` | `Query[]` | Additional queries always applied to list fetches
|
|
1048
|
-
| `bareListFilterAddComponent` | `ReactElement[]` | Extra filter components in the filter bar
|
|
1049
|
-
| `
|
|
1050
|
-
| `
|
|
1051
|
-
| `
|
|
1052
|
-
| `
|
|
1053
|
-
| `
|
|
1054
|
-
| `
|
|
1055
|
-
| `
|
|
1056
|
-
| `
|
|
1057
|
-
| `
|
|
1058
|
-
| `
|
|
1059
|
-
| `
|
|
1060
|
-
| `
|
|
1061
|
-
| `
|
|
1062
|
-
| `
|
|
1063
|
-
| `
|
|
1064
|
-
| `
|
|
1065
|
-
| `
|
|
1066
|
-
| `
|
|
1067
|
-
| `
|
|
1068
|
-
| `
|
|
1027
|
+
| Name | Type | Description |
|
|
1028
|
+
| ---------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
1029
|
+
| `bareReadComponent` | `(data: any) => ReactElement` | Custom component rendered in read view |
|
|
1030
|
+
| `bareReadComponentPos` | `"top"` | Renders `bareReadComponent` above the default read content |
|
|
1031
|
+
| `bareReadComponentHide` | `boolean` | Hides the default read content |
|
|
1032
|
+
| `bareReadDescription` | `(key, value) => any` | Custom renderer for read view field values |
|
|
1033
|
+
| `bareReadReferenceView` | `(dataId, collectionId, attributeId) => boolean \| void` | Controls whether a reference field opens a view |
|
|
1034
|
+
| `bareReadHandleData` | `(data: any) => void` | Called when read view data is loaded |
|
|
1035
|
+
| `bareReadListTabs` | `boolean` | Shows list-style tabs in read view |
|
|
1036
|
+
| `bareListComponent` | `(data, prettierData, loading, pageIndex) => ReactElement` | Fully replaces the list UI |
|
|
1037
|
+
| `bareListActionBtns` | `(data: any) => ReactElement[]` | Extra icon buttons on each list row |
|
|
1038
|
+
| `bareListMultipleSelectAddtionalActions` | `{ text: string; className?: string; onClick: (ids, selectAll, query) => void }[]` | Extra bulk-action buttons when rows are selected |
|
|
1039
|
+
| `bareListGridComponent` | `(data: any) => ReactElement` | Custom card renderer for grid view |
|
|
1040
|
+
| `bareListGridColClassName` | `string` | Tailwind class for grid column width |
|
|
1041
|
+
| `bareListGridTags` | `(data: any) => string[]` | Tag strings shown on grid cards |
|
|
1042
|
+
| `bareListGridRibbonText` | `(data: any) => string` | Ribbon text on grid cards |
|
|
1043
|
+
| `bareListGridFallbackImg` | `(data: any) => string \| ReactElement` | Fallback image for grid cards |
|
|
1044
|
+
| `bareListHandleData` | `(data, prettierData) => void` | Called when list data is loaded |
|
|
1045
|
+
| `bareListHandleFilter` | `(search, select, date, reference) => void` | Called when any filter changes |
|
|
1046
|
+
| `bareListHandleSelection` | `(selectAll, selectedIds, query?) => void` | Called when row selection changes |
|
|
1047
|
+
| `bareListDescription` | `(key, value) => any` | Custom renderer for list view field values |
|
|
1048
|
+
| `bareListFilterQuery` | `Query[]` | Additional queries always applied to list fetches |
|
|
1049
|
+
| `bareListFilterAddComponent` | `ReactElement[]` | Extra filter components in the filter bar |
|
|
1050
|
+
| `bareListFilterAsPopup` | `boolean` | Collapses all `additionalQuery` filters into a funnel icon popup instead of showing them inline |
|
|
1051
|
+
| `bareListPipeline` | `PipeLine[]` | Additional MongoDB aggregation pipeline stages |
|
|
1052
|
+
| `bareListFilterSelected` | `(filterSearchParams, filterSelection, filterReference, filterReferenceDate) => void` | Called with the current filter state on every change |
|
|
1053
|
+
| `bareUpdatePrefill` | `(data: any) => { key: string; value: any }[]` | Returns prefill values for the update form |
|
|
1054
|
+
| `bareUpdateComponent` | `(data: any) => ReactElement` | Custom component rendered inside the update form |
|
|
1055
|
+
| `bareUpdateComponentAbove` | `boolean` | Renders `bareUpdateComponent` above the form fields |
|
|
1056
|
+
| `bareUpdateActionComponent` | `(data: any) => ReactElement` | Custom action buttons in the form footer |
|
|
1057
|
+
| `bareUpdateColumnType` | `"one" \| "two" \| "four"` | Form column layout |
|
|
1058
|
+
| `bareUpdateMobileView` | `boolean` | Mobile-optimised form layout |
|
|
1059
|
+
| `bareUpdateActionBottom` | `boolean` | Moves action buttons to the bottom of the form |
|
|
1060
|
+
| `bareUpdateHandleData` | `(data, changedAttributeIds?) => void` | Called on every form field change |
|
|
1061
|
+
| `bareUpdateHandlePreComplete` | `(data: any) => Promise<boolean>` | Called before save — return `false` to cancel |
|
|
1062
|
+
| `bareUpdateHandleComplete` | `(data: any) => void` | Called after save completes |
|
|
1063
|
+
| `bareUpdateHandlePostComplete` | `(data: any) => void` | Called after post-save operations complete |
|
|
1064
|
+
| `bareUpdateTabId` | `(tabId: string) => void` | Called when the active form tab changes |
|
|
1065
|
+
| `bareUpdateTabComponent` | `(tabIds: string[]) => { tabId: string; icon?: ReactElement; skip?: boolean }[]` | Customise tab icons or skip specific tabs in the form |
|
|
1066
|
+
| `bareUpdateIndividualComponent` | `(columnId, ref, selectedData, setSelectedData) => ReactElement \| null` | Replaces a specific form field with a custom component |
|
|
1067
|
+
| `bareReferenceDel` | `{ collectionId, collectionName, columnId, schema }[]` | Blocks deletion when the record is referenced elsewhere |
|
|
1068
|
+
| `bareOffline` | `boolean` | Enables offline data caching |
|
|
1069
|
+
| `bareCSVImportEndpoint` | `string` | Custom CSV import endpoint |
|
|
1070
|
+
| `bareCSVExportEndpoint` | `string` | Custom CSV export endpoint |
|
|
1069
1071
|
|
|
1070
1072
|
---
|
|
1071
1073
|
|