blixify-ui-web-mcp 0.1.72 → 0.1.76
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/chart/barChart/README.md +2 -0
- package/lib/components/chart/barChart/barChart.stories.tsx +86 -3
- package/lib/components/chart/pieChart/README.md +3 -1
- package/lib/components/chart/pieChart/pieChart.stories.tsx +18 -1
- package/lib/components/data/dataGraph/README.md +18 -1
- package/lib/components/data/dataTemplate/README.md +6 -3
- package/lib/components/data/dataTemplate/dataTemplate.groupedBoard.stories.tsx +311 -0
- package/lib/components/data/dataTemplate/dataTemplate.readDrawer.stories.tsx +334 -0
- package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +162 -0
- package/lib/components/data/readQuery/README.md +8 -8
- package/lib/components/display/modal/README.md +1 -0
- package/lib/components/display/newList/README.md +30 -0
- package/lib/components/display/newTable/README.md +25 -20
- package/lib/components/display/newTable/newTable.stories.tsx +67 -0
- package/lib/components/navigation/leftNav/README.md +1 -1
- package/lib/components/navigation/leftNav/leftNav.stories.tsx +61 -0
- package/package.json +1 -1
|
@@ -833,3 +833,70 @@ export const RowLinks = () => {
|
|
|
833
833
|
</StorySection>
|
|
834
834
|
);
|
|
835
835
|
};
|
|
836
|
+
|
|
837
|
+
// INFO: reference columns carry a solid line under their header and lookup
|
|
838
|
+
// columns a dashed one; a lookup is drawn as its source column's type
|
|
839
|
+
export const LinkedColumns = () => {
|
|
840
|
+
const columns: NewTableColumn[] = [
|
|
841
|
+
{ key: "name", title: "Customer", type: "string" },
|
|
842
|
+
{
|
|
843
|
+
key: "project",
|
|
844
|
+
title: "PV Project",
|
|
845
|
+
type: "reference",
|
|
846
|
+
referenceSpaceId: "projects",
|
|
847
|
+
referenceLabel: "code",
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
key: "projectStatus",
|
|
851
|
+
title: "Project Status",
|
|
852
|
+
type: "string",
|
|
853
|
+
referenceFieldId: "project",
|
|
854
|
+
lookupFieldId: "status",
|
|
855
|
+
disabled: true,
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
key: "installer",
|
|
859
|
+
title: "Installer",
|
|
860
|
+
type: "string",
|
|
861
|
+
referenceFieldId: "project",
|
|
862
|
+
lookupFieldId: "installer",
|
|
863
|
+
disabled: true,
|
|
864
|
+
},
|
|
865
|
+
{ key: "notes", title: "Notes", type: "string" },
|
|
866
|
+
];
|
|
867
|
+
const rows = [
|
|
868
|
+
{
|
|
869
|
+
id: "1",
|
|
870
|
+
name: "Andrew Tan",
|
|
871
|
+
project: "PV-1023",
|
|
872
|
+
projectStatus: "Installed",
|
|
873
|
+
installer: "Ahmad",
|
|
874
|
+
notes: "Call before visit",
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
id: "2",
|
|
878
|
+
name: "Celine Wong",
|
|
879
|
+
project: "PV-1031",
|
|
880
|
+
projectStatus: "Scheduled",
|
|
881
|
+
installer: "Kumar",
|
|
882
|
+
notes: "",
|
|
883
|
+
},
|
|
884
|
+
];
|
|
885
|
+
return (
|
|
886
|
+
<StorySection
|
|
887
|
+
title="Linked columns"
|
|
888
|
+
description="A reference column has a solid line under its header; a lookup column, filled from the linked record, has a dashed one."
|
|
889
|
+
>
|
|
890
|
+
<NewTableImpl
|
|
891
|
+
columns={columns}
|
|
892
|
+
data={rows}
|
|
893
|
+
size={rows.length}
|
|
894
|
+
limit={10}
|
|
895
|
+
cursor=""
|
|
896
|
+
loading={false}
|
|
897
|
+
paginationType="page"
|
|
898
|
+
handleUpdatePageIndex={() => {}}
|
|
899
|
+
/>
|
|
900
|
+
</StorySection>
|
|
901
|
+
);
|
|
902
|
+
};
|
|
@@ -167,7 +167,7 @@ Below `lg` the rail moves into the mobile drawer as a row of icons above the sid
|
|
|
167
167
|
| `searchable` | `boolean` | `false` | Shows a filter box. Matches are listed flat, each with the path it sits under (e.g. `Sales › Reports`) |
|
|
168
168
|
| `searchAction` | `ReactElement` | — | A small control inside the right end of the filter box, such as a filter button opening the app's own pop-up. Shown only with `searchable` |
|
|
169
169
|
| `keepSearchAncestors` | `boolean` | `false` | With `searchable`, keeps each match under its parents (a workspace, a folder page), shown open, instead of the flat list. Rows that neither match nor hold a match are left out |
|
|
170
|
-
| `persistKey` | `string` | — | localStorage key that remembers open groups and pages. A new key loads that key's stored state.
|
|
170
|
+
| `persistKey` | `string` | — | localStorage key that remembers open groups and pages. A new key loads that key's stored state. Also keeps how far the sidebar is scrolled for the browser tab (sessionStorage `<persistKey>-scroll`), so a page that mounts its own sidebar opens it at the same place |
|
|
171
171
|
| `defaultExpandedIds` | `string[]` | — | Groups (by `groupId`) and pages (by `id`) open when nothing is stored for them |
|
|
172
172
|
|
|
173
173
|
##### Moving rows in a tree
|
|
@@ -819,3 +819,64 @@ export const LeftNav = () => {
|
|
|
819
819
|
</>
|
|
820
820
|
);
|
|
821
821
|
};
|
|
822
|
+
|
|
823
|
+
// INFO: a long sidebar beside a heavy page, for checking two things: typing in
|
|
824
|
+
// the filter does not redraw the page, and a page that mounts its own sidebar
|
|
825
|
+
// opens it where the last one was scrolled to
|
|
826
|
+
const longNavigation: Navigation[] = Array.from({ length: 80 }, (_, index) => ({
|
|
827
|
+
id: `sheet-${index + 1}`,
|
|
828
|
+
name: `Datasheet ${index + 1}`,
|
|
829
|
+
href: `/sheet-${index + 1}`,
|
|
830
|
+
icon: index % 2 ? FolderIcon : Squares2X2Icon,
|
|
831
|
+
groupId: index < 40 ? "Sales" : "Operations",
|
|
832
|
+
}));
|
|
833
|
+
|
|
834
|
+
const HeavyPage = (props: { title: string }) => {
|
|
835
|
+
const draws = React.useRef(0);
|
|
836
|
+
draws.current += 1;
|
|
837
|
+
return (
|
|
838
|
+
<div className="p-6 text-sm text-gray-600">
|
|
839
|
+
<p className="mb-2 font-semibold text-gray-900">{props.title}</p>
|
|
840
|
+
<p className="mb-4">Page drawn {draws.current} time(s)</p>
|
|
841
|
+
{Array.from({ length: 3000 }, (_, index) => (
|
|
842
|
+
<div key={index} className="border-b border-gray-100 py-1">
|
|
843
|
+
Row {index + 1}
|
|
844
|
+
</div>
|
|
845
|
+
))}
|
|
846
|
+
</div>
|
|
847
|
+
);
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
export const RememberedScroll = () => {
|
|
851
|
+
const [selectedId, setSelectedId] = useState("sheet-1");
|
|
852
|
+
return (
|
|
853
|
+
<StorySection
|
|
854
|
+
title="Remembered scroll and a quiet filter"
|
|
855
|
+
description="Scroll the sidebar down and pick a datasheet near the bottom: each pick mounts a new sidebar, as a page that draws its own does, and it opens where you left it (persistKey keeps the position for the browser tab). Type in the filter: the page's draw count stays the same while you type."
|
|
856
|
+
>
|
|
857
|
+
<div className="w-full h-[32rem] relative overflow-hidden border rounded-lg">
|
|
858
|
+
<LeftNavImpl
|
|
859
|
+
key={selectedId}
|
|
860
|
+
persistKey="story-left-nav-remembered"
|
|
861
|
+
searchable={true}
|
|
862
|
+
keepSearchAncestors={true}
|
|
863
|
+
selectedId={selectedId}
|
|
864
|
+
navigation={longNavigation}
|
|
865
|
+
leftNavMobileMenu={false}
|
|
866
|
+
handleBarsOnClick={(id) => setSelectedId(id)}
|
|
867
|
+
handleToggleLeftNavMobileMenu={() => {}}
|
|
868
|
+
renderDashboardLogo={() => renderLogo()}
|
|
869
|
+
renderDashboardContent={() => (
|
|
870
|
+
<HeavyPage
|
|
871
|
+
title={
|
|
872
|
+
longNavigation.find((each) => each.id === selectedId)?.name ??
|
|
873
|
+
""
|
|
874
|
+
}
|
|
875
|
+
/>
|
|
876
|
+
)}
|
|
877
|
+
renderDashboardHeaderContent={renderHeader}
|
|
878
|
+
/>
|
|
879
|
+
</div>
|
|
880
|
+
</StorySection>
|
|
881
|
+
);
|
|
882
|
+
};
|