@neo4j-ndl/react 4.14.1 → 4.14.3
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/cjs/_common/component-docs-page.js +72 -0
- package/lib/cjs/_common/component-docs-page.js.map +1 -0
- package/lib/cjs/data-grid/Components.js +3 -1
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/data-grid/DataGrid.js +2 -1
- package/lib/cjs/data-grid/DataGrid.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
- package/lib/cjs/data-grid/index.js +14 -1
- package/lib/cjs/data-grid/index.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js +142 -0
- package/lib/cjs/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js.map +1 -0
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js +133 -0
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -0
- package/lib/cjs/data-grid/stories/index.js +9 -1
- package/lib/cjs/data-grid/stories/index.js.map +1 -1
- package/lib/cjs/data-grid/style-rules/evaluate.js +283 -0
- package/lib/cjs/data-grid/style-rules/evaluate.js.map +1 -0
- package/lib/cjs/data-grid/style-rules/hooks.js +45 -0
- package/lib/cjs/data-grid/style-rules/hooks.js.map +1 -0
- package/lib/cjs/data-grid/style-rules/index.js +37 -0
- package/lib/cjs/data-grid/style-rules/index.js.map +1 -0
- package/lib/cjs/data-grid/style-rules/types.js +158 -0
- package/lib/cjs/data-grid/style-rules/types.js.map +1 -0
- package/lib/cjs/graph-label/GraphLabel.js +9 -8
- package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
- package/lib/cjs/index.js +3 -8
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/_common/component-docs-page.js +69 -0
- package/lib/esm/_common/component-docs-page.js.map +1 -0
- package/lib/esm/data-grid/Components.js +3 -1
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/data-grid/DataGrid.js +2 -1
- package/lib/esm/data-grid/DataGrid.js.map +1 -1
- package/lib/esm/data-grid/data-grid-context.js.map +1 -1
- package/lib/esm/data-grid/index.js +3 -0
- package/lib/esm/data-grid/index.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js +140 -0
- package/lib/esm/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js.map +1 -0
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js +131 -0
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -0
- package/lib/esm/data-grid/stories/index.js +6 -0
- package/lib/esm/data-grid/stories/index.js.map +1 -1
- package/lib/esm/data-grid/style-rules/evaluate.js +279 -0
- package/lib/esm/data-grid/style-rules/evaluate.js.map +1 -0
- package/lib/esm/data-grid/style-rules/hooks.js +42 -0
- package/lib/esm/data-grid/style-rules/hooks.js.map +1 -0
- package/lib/esm/data-grid/style-rules/index.js +24 -0
- package/lib/esm/data-grid/style-rules/index.js.map +1 -0
- package/lib/esm/data-grid/style-rules/types.js +155 -0
- package/lib/esm/data-grid/style-rules/types.js.map +1 -0
- package/lib/esm/graph-label/GraphLabel.js +9 -8
- package/lib/esm/graph-label/GraphLabel.js.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/types/_common/{readme-docs-page.d.ts → component-docs-page.d.ts} +2 -2
- package/lib/types/_common/component-docs-page.d.ts.map +1 -0
- package/lib/types/data-grid/Components.d.ts.map +1 -1
- package/lib/types/data-grid/DataGrid.d.ts +4 -1
- package/lib/types/data-grid/DataGrid.d.ts.map +1 -1
- package/lib/types/data-grid/data-grid-context.d.ts +2 -0
- package/lib/types/data-grid/data-grid-context.d.ts.map +1 -1
- package/lib/types/data-grid/index.d.ts +4 -0
- package/lib/types/data-grid/index.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-custom-cell-with-style-rules.story.d.ts +24 -0
- package/lib/types/data-grid/stories/datagrid-custom-cell-with-style-rules.story.d.ts.map +1 -0
- package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +2 -2
- package/lib/types/data-grid/stories/datagrid-rule-based-styling.story.d.ts +24 -0
- package/lib/types/data-grid/stories/datagrid-rule-based-styling.story.d.ts.map +1 -0
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +2 -2
- package/lib/types/data-grid/stories/index.d.ts +4 -0
- package/lib/types/data-grid/stories/index.d.ts.map +1 -1
- package/lib/types/data-grid/style-rules/evaluate.d.ts +41 -0
- package/lib/types/data-grid/style-rules/evaluate.d.ts.map +1 -0
- package/lib/types/data-grid/style-rules/hooks.d.ts +27 -0
- package/lib/types/data-grid/style-rules/hooks.d.ts.map +1 -0
- package/lib/types/data-grid/style-rules/index.d.ts +25 -0
- package/lib/types/data-grid/style-rules/index.d.ts.map +1 -0
- package/lib/types/data-grid/style-rules/types.d.ts +161 -0
- package/lib/types/data-grid/style-rules/types.d.ts.map +1 -0
- package/lib/types/graph-label/GraphLabel.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/lib/cjs/_common/readme-docs-page.js +0 -55
- package/lib/cjs/_common/readme-docs-page.js.map +0 -1
- package/lib/esm/_common/readme-docs-page.js +0 -52
- package/lib/esm/_common/readme-docs-page.js.map +0 -1
- package/lib/types/_common/readme-docs-page.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datagrid-rule-based-styling.story.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-rule-based-styling.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AA0EjD,QAAA,MAAM,SAAS,+CAyDd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
22
|
declare const _default: {
|
|
23
|
-
component: (<T extends import("@tanstack/react-table").RowData = unknown>({ isResizable, isLoading, isKeyboardNavigable, isAutoResizingColumns, tableInstance, components, rootProps, styling, tableNavRef, isSkeletonLoading, skeletonProps, ref, portalTarget, htmlAttributes, className, style, ...restProps }: import("../../_common/types").CommonProps<"div", import("../DataGrid").DataGridProps<T>>) => import("react/jsx-runtime").JSX.Element) & {
|
|
23
|
+
component: (<T extends import("@tanstack/react-table").RowData = unknown>({ isResizable, isLoading, isKeyboardNavigable, isAutoResizingColumns, tableInstance, components, rootProps, styling, tableNavRef, isSkeletonLoading, skeletonProps, ref, portalTarget, styleRules, htmlAttributes, className, style, ...restProps }: import("../../_common/types").CommonProps<"div", import("../DataGrid").DataGridProps<T>>) => import("react/jsx-runtime").JSX.Element) & {
|
|
24
24
|
ActionButton: <T extends React.ElementType = "button">({ action, onClose, as, className, style, htmlAttributes, ref, ...restProps }: import("../../_common/types").PolymorphicCommonProps<T, {
|
|
25
|
-
action: import("
|
|
25
|
+
action: import("@neo4j-ndl/react").ColumnAction;
|
|
26
26
|
onClose: () => void;
|
|
27
27
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
ActionCell: <T extends import("@tanstack/react-table").RowData>({ cell, innerCleanIconButtonProps, innerMenuProps, }: import("../Components").ActionCellProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -36,6 +36,10 @@ export { PinnedBothSides as DataGridPinnedBothSides, PinnedLeftSide as DataGridP
|
|
|
36
36
|
export { default as DataGridNoPaginationTable } from './datagrid-no-pagination-table.story';
|
|
37
37
|
export { default as DataGridSingleSelectable } from './datagrid-single-selectable.story';
|
|
38
38
|
export { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';
|
|
39
|
+
export { default as DataGridRuleBasedStyling } from './datagrid-rule-based-styling.story';
|
|
40
|
+
export { default as DataGridCustomCellWithStyleRules } from './datagrid-custom-cell-with-style-rules.story';
|
|
41
|
+
export declare const DataGridCustomCellWithStyleRulesSource: string;
|
|
42
|
+
export declare const DataGridRuleBasedStylingSource: string;
|
|
39
43
|
export declare const DataGridSimpleSource: string;
|
|
40
44
|
export declare const DataGridCompactModeSource: string;
|
|
41
45
|
export declare const DataGridSortableSource: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,UAAU,IAAI,kBAAkB,EAChC,eAAe,IAAI,uBAAuB,GAC3C,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAC7F,O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,eAAO,MAAM,gCAAgC,QAE5C,CAAC;AACF,eAAO,MAAM,oCAAoC,QAEhD,CAAC;AACF,eAAO,MAAM,2BAA2B,QAEvC,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,8BAA8B,QAE1C,CAAC;AACF,eAAO,MAAM,gCAAgC,QAE5C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { type DataGridStyleRule } from './types';
|
|
22
|
+
export type ComputedDataGridStyles = {
|
|
23
|
+
cellStyles: Record<string, React.CSSProperties | undefined>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Computes styles for all cells in a row based on the given style rules.
|
|
27
|
+
* When a rule's `column` is `null`, its style is applied to every cell.
|
|
28
|
+
*
|
|
29
|
+
* Used internally by hooks, but exported for context-free usage.
|
|
30
|
+
*/
|
|
31
|
+
export declare function computeDataGridRowStyles(rules: DataGridStyleRule[], rowData: Record<string, unknown>): ComputedDataGridStyles;
|
|
32
|
+
/**
|
|
33
|
+
* Evaluate style rules for a single cell.
|
|
34
|
+
* Pure function -- no React context needed.
|
|
35
|
+
*
|
|
36
|
+
* @param rules - Array of style rules to evaluate
|
|
37
|
+
* @param rowData - The row's data as a record (column id -> value)
|
|
38
|
+
* @param columnId - Returns the computed style for this specific cell.
|
|
39
|
+
*/
|
|
40
|
+
export declare function evaluateDataGridStyleRules(rules: DataGridStyleRule[], rowData: Record<string, unknown>, columnId: string): React.CSSProperties | undefined;
|
|
41
|
+
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAGL,KAAK,iBAAiB,EAIvB,MAAM,SAAS,CAAC;AAmTjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC7D,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,sBAAsB,CAsExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,GACf,KAAK,CAAC,aAAa,GAAG,SAAS,CAGjC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { type Cell, type RowData } from '@tanstack/react-table';
|
|
22
|
+
/**
|
|
23
|
+
* Returns computed inline style for a specific cell based on style rules in context.
|
|
24
|
+
* Use this in custom BodyCell overrides to apply rule-based styling.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useDataGridCellStyle<T extends RowData>(cell: Cell<T, unknown>): React.CSSProperties | undefined;
|
|
27
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMhE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,OAAO,EACpD,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GACrB,KAAK,CAAC,aAAa,GAAG,SAAS,CAejC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { evaluateDataGridStyleRules } from './evaluate';
|
|
22
|
+
export { useDataGridCellStyle } from './hooks';
|
|
23
|
+
export { DataGridCellStyleSchema, DataGridColorRangeSchema, DataGridColumnRefSchema, DataGridDisableableColorSchema, DataGridStyleRuleLiteralSchema, DataGridStyleRuleOperandSchema, DataGridStyleRuleSchema, DataGridStyleRuleWhereSchema, } from './types';
|
|
24
|
+
export type { DataGridCellStyle, DataGridColorRange, DataGridColumnRef, DataGridDisableableColor, DataGridStyleRuleLiteral, DataGridStyleRuleOperand, DataGridStyleRule, DataGridStyleRuleWhere, } from './types';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
/** A scalar literal that can appear as an operand in a style-rule where clause. */
|
|
23
|
+
export declare const DataGridStyleRuleLiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
24
|
+
export type DataGridStyleRuleLiteral = z.infer<typeof DataGridStyleRuleLiteralSchema>;
|
|
25
|
+
/** A reference to a column whose cell value is resolved at evaluation time. */
|
|
26
|
+
export declare const DataGridColumnRefSchema: z.ZodObject<{
|
|
27
|
+
column: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type DataGridColumnRef = z.infer<typeof DataGridColumnRefSchema>;
|
|
30
|
+
/** An operand in a style-rule where clause -- either a literal value or a column reference. */
|
|
31
|
+
export declare const DataGridStyleRuleOperandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
32
|
+
column: z.ZodString;
|
|
33
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>]>;
|
|
34
|
+
export type DataGridStyleRuleOperand = z.infer<typeof DataGridStyleRuleOperandSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* Recursive WHERE clause for conditional expressions.
|
|
37
|
+
* Inspired by the graph visualization style rule system but adapted for tabular data.
|
|
38
|
+
*
|
|
39
|
+
* The type is manually defined for the export, since zod doesn't support
|
|
40
|
+
* exporting inferred recursive types.
|
|
41
|
+
*/
|
|
42
|
+
export type DataGridStyleRuleWhere = {
|
|
43
|
+
not: DataGridStyleRuleWhere;
|
|
44
|
+
} | {
|
|
45
|
+
and: DataGridStyleRuleWhere[];
|
|
46
|
+
} | {
|
|
47
|
+
or: DataGridStyleRuleWhere[];
|
|
48
|
+
} | {
|
|
49
|
+
equal: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
50
|
+
} | {
|
|
51
|
+
lessThan: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
52
|
+
} | {
|
|
53
|
+
lessThanOrEqual: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
54
|
+
} | {
|
|
55
|
+
greaterThan: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
56
|
+
} | {
|
|
57
|
+
greaterThanOrEqual: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
58
|
+
} | {
|
|
59
|
+
contains: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
60
|
+
} | {
|
|
61
|
+
startsWith: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
62
|
+
} | {
|
|
63
|
+
endsWith: [DataGridStyleRuleOperand, DataGridStyleRuleOperand];
|
|
64
|
+
} | {
|
|
65
|
+
isNull: DataGridStyleRuleOperand;
|
|
66
|
+
};
|
|
67
|
+
export declare const DataGridStyleRuleWhereSchema: z.ZodType<DataGridStyleRuleWhere>;
|
|
68
|
+
/**
|
|
69
|
+
* Gradient coloring based on a continuous numeric column value.
|
|
70
|
+
* Colors should be hex strings (#rrggbb).
|
|
71
|
+
* If the column value is missing or non-numeric, the colorRange is ignored.
|
|
72
|
+
*/
|
|
73
|
+
export declare const DataGridColorRangeSchema: z.ZodObject<{
|
|
74
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
maxColor: z.ZodString;
|
|
76
|
+
maxValue: z.ZodNumber;
|
|
77
|
+
midColor: z.ZodOptional<z.ZodString>;
|
|
78
|
+
midValue: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
minColor: z.ZodString;
|
|
80
|
+
minValue: z.ZodNumber;
|
|
81
|
+
onColumn: z.ZodString;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type DataGridColorRange = z.infer<typeof DataGridColorRangeSchema>;
|
|
84
|
+
/** A disable-able static color value. */
|
|
85
|
+
export declare const DataGridDisableableColorSchema: z.ZodObject<{
|
|
86
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
value: z.ZodString;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export type DataGridDisableableColor = z.infer<typeof DataGridDisableableColorSchema>;
|
|
90
|
+
/** Visual properties that a style rule can apply to a cell or row. */
|
|
91
|
+
export declare const DataGridCellStyleSchema: z.ZodObject<{
|
|
92
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
value: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
colorRange: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
maxColor: z.ZodString;
|
|
99
|
+
maxValue: z.ZodNumber;
|
|
100
|
+
midColor: z.ZodOptional<z.ZodString>;
|
|
101
|
+
midValue: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
minColor: z.ZodString;
|
|
103
|
+
minValue: z.ZodNumber;
|
|
104
|
+
onColumn: z.ZodString;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
textColor: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
value: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
textColorRange: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
maxColor: z.ZodString;
|
|
113
|
+
maxValue: z.ZodNumber;
|
|
114
|
+
midColor: z.ZodOptional<z.ZodString>;
|
|
115
|
+
midValue: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
minColor: z.ZodString;
|
|
117
|
+
minValue: z.ZodNumber;
|
|
118
|
+
onColumn: z.ZodString;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
export type DataGridCellStyle = z.infer<typeof DataGridCellStyleSchema>;
|
|
122
|
+
/** A single declarative rule that conditionally applies styles to DataGrid cells. */
|
|
123
|
+
export declare const DataGridStyleRuleSchema: z.ZodObject<{
|
|
124
|
+
apply: z.ZodObject<{
|
|
125
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
value: z.ZodString;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
colorRange: z.ZodOptional<z.ZodObject<{
|
|
130
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
maxColor: z.ZodString;
|
|
132
|
+
maxValue: z.ZodNumber;
|
|
133
|
+
midColor: z.ZodOptional<z.ZodString>;
|
|
134
|
+
midValue: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
minColor: z.ZodString;
|
|
136
|
+
minValue: z.ZodNumber;
|
|
137
|
+
onColumn: z.ZodString;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
textColor: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
value: z.ZodString;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
textColorRange: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
maxColor: z.ZodString;
|
|
146
|
+
maxValue: z.ZodNumber;
|
|
147
|
+
midColor: z.ZodOptional<z.ZodString>;
|
|
148
|
+
midValue: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
minColor: z.ZodString;
|
|
150
|
+
minValue: z.ZodNumber;
|
|
151
|
+
onColumn: z.ZodString;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
column: z.ZodNullable<z.ZodString>;
|
|
155
|
+
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
metaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
157
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
where: z.ZodOptional<z.ZodType<DataGridStyleRuleWhere, unknown, z.core.$ZodTypeInternals<DataGridStyleRuleWhere, unknown>>>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
export type DataGridStyleRule = z.infer<typeof DataGridStyleRuleSchema>;
|
|
161
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,0EAKzC,C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AC;IAClB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1B,CAAC;AA8FF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAAE,oIAehE,sBAAsB,CAAC,CAAC,EAAE,eAAe,CAAC,4CAyM5C,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export { SegmentedControl } from './segmented-control';
|
|
|
33
33
|
export { Popover } from './popover';
|
|
34
34
|
export { ProgressBar } from './progress-bar';
|
|
35
35
|
export { Dropzone } from './dropzone';
|
|
36
|
-
export
|
|
36
|
+
export * from './data-grid';
|
|
37
37
|
export { TextInput } from './text-input';
|
|
38
38
|
export { TextArea } from './text-area';
|
|
39
39
|
export { TextLink } from './text-link';
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,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,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.3",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@tanstack/react-table": "8.21.3",
|
|
88
88
|
"react": ">=19.0.0",
|
|
89
89
|
"react-dom": ">=19.0.0",
|
|
90
|
-
"@neo4j-ndl/base": "^4.14.
|
|
90
|
+
"@neo4j-ndl/base": "^4.14.1"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@dnd-kit/core": "6.3.1",
|
|
@@ -112,7 +112,8 @@
|
|
|
112
112
|
"sonner": "2.0.7",
|
|
113
113
|
"streamdown": "1.6.11",
|
|
114
114
|
"tinycolor2": "1.6.0",
|
|
115
|
-
"usehooks-ts": "3.1.1"
|
|
115
|
+
"usehooks-ts": "3.1.1",
|
|
116
|
+
"zod": "4.3.6"
|
|
116
117
|
},
|
|
117
118
|
"scripts": {
|
|
118
119
|
"generate-component": "node ./scripts/component-generator.js",
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createReadmeDocsPage = createReadmeDocsPage;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) "Neo4j"
|
|
8
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
9
|
-
*
|
|
10
|
-
* This file is part of Neo4j.
|
|
11
|
-
*
|
|
12
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
13
|
-
* it under the terms of the GNU General Public License as published by
|
|
14
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
15
|
-
* (at your option) any later version.
|
|
16
|
-
*
|
|
17
|
-
* This program is distributed in the hope that it will be useful,
|
|
18
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
-
* GNU General Public License for more details.
|
|
21
|
-
*
|
|
22
|
-
* You should have received a copy of the GNU General Public License
|
|
23
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
24
|
-
*/
|
|
25
|
-
const blocks_1 = require("@storybook/addon-docs/blocks");
|
|
26
|
-
/**
|
|
27
|
-
* Creates a Storybook docs page component that renders markdown content (e.g. a README.md).
|
|
28
|
-
*
|
|
29
|
-
* Requires the `autodocs` tag on the component meta to create a Docs entry in the sidebar
|
|
30
|
-
* (the global preview config disables autodocs with `!autodocs`).
|
|
31
|
-
*
|
|
32
|
-
* Usage in a *.stories.tsx file:
|
|
33
|
-
* ```ts
|
|
34
|
-
* import ReadmeContent from '../README.md?raw';
|
|
35
|
-
* import { createReadmeDocsPage } from '../../_common/readme-docs-page';
|
|
36
|
-
*
|
|
37
|
-
* const meta: Meta = {
|
|
38
|
-
* // ...
|
|
39
|
-
* tags: ['docsPage', 'autodocs'],
|
|
40
|
-
* parameters: {
|
|
41
|
-
* docs: { page: createReadmeDocsPage(ReadmeContent) },
|
|
42
|
-
* },
|
|
43
|
-
* };
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
function stripMarkdownComments(content) {
|
|
47
|
-
return content.replace(/^\[\/\/\]: #.*\n*/gm, '');
|
|
48
|
-
}
|
|
49
|
-
function createReadmeDocsPage(markdownContent) {
|
|
50
|
-
const cleaned = stripMarkdownComments(markdownContent);
|
|
51
|
-
return function ReadmeDocsPage() {
|
|
52
|
-
return (0, jsx_runtime_1.jsx)(blocks_1.Markdown, { children: cleaned });
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=readme-docs-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readme-docs-page.js","sourceRoot":"","sources":["../../../src/_common/readme-docs-page.tsx"],"names":[],"mappings":";;AA8CA,oDAKC;;AAnDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,yDAAwD;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,qBAAqB,CAAC,OAAe;IAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,SAAgB,oBAAoB,CAAC,eAAuB;IAC1D,MAAM,OAAO,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACvD,OAAO,SAAS,cAAc;QAC5B,OAAO,uBAAC,iBAAQ,cAAE,OAAO,GAAY,CAAC;IACxC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Markdown } from '@storybook/addon-docs/blocks';\n\n/**\n * Creates a Storybook docs page component that renders markdown content (e.g. a README.md).\n *\n * Requires the `autodocs` tag on the component meta to create a Docs entry in the sidebar\n * (the global preview config disables autodocs with `!autodocs`).\n *\n * Usage in a *.stories.tsx file:\n * ```ts\n * import ReadmeContent from '../README.md?raw';\n * import { createReadmeDocsPage } from '../../_common/readme-docs-page';\n *\n * const meta: Meta = {\n * // ...\n * tags: ['docsPage', 'autodocs'],\n * parameters: {\n * docs: { page: createReadmeDocsPage(ReadmeContent) },\n * },\n * };\n * ```\n */\nfunction stripMarkdownComments(content: string): string {\n return content.replace(/^\\[\\/\\/\\]: #.*\\n*/gm, '');\n}\n\nexport function createReadmeDocsPage(markdownContent: string) {\n const cleaned = stripMarkdownComments(markdownContent);\n return function ReadmeDocsPage() {\n return <Markdown>{cleaned}</Markdown>;\n };\n}\n"]}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) "Neo4j"
|
|
5
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
-
*
|
|
7
|
-
* This file is part of Neo4j.
|
|
8
|
-
*
|
|
9
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
-
* it under the terms of the GNU General Public License as published by
|
|
11
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
-
* (at your option) any later version.
|
|
13
|
-
*
|
|
14
|
-
* This program is distributed in the hope that it will be useful,
|
|
15
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
* GNU General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU General Public License
|
|
20
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*/
|
|
22
|
-
import { Markdown } from '@storybook/addon-docs/blocks';
|
|
23
|
-
/**
|
|
24
|
-
* Creates a Storybook docs page component that renders markdown content (e.g. a README.md).
|
|
25
|
-
*
|
|
26
|
-
* Requires the `autodocs` tag on the component meta to create a Docs entry in the sidebar
|
|
27
|
-
* (the global preview config disables autodocs with `!autodocs`).
|
|
28
|
-
*
|
|
29
|
-
* Usage in a *.stories.tsx file:
|
|
30
|
-
* ```ts
|
|
31
|
-
* import ReadmeContent from '../README.md?raw';
|
|
32
|
-
* import { createReadmeDocsPage } from '../../_common/readme-docs-page';
|
|
33
|
-
*
|
|
34
|
-
* const meta: Meta = {
|
|
35
|
-
* // ...
|
|
36
|
-
* tags: ['docsPage', 'autodocs'],
|
|
37
|
-
* parameters: {
|
|
38
|
-
* docs: { page: createReadmeDocsPage(ReadmeContent) },
|
|
39
|
-
* },
|
|
40
|
-
* };
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
function stripMarkdownComments(content) {
|
|
44
|
-
return content.replace(/^\[\/\/\]: #.*\n*/gm, '');
|
|
45
|
-
}
|
|
46
|
-
export function createReadmeDocsPage(markdownContent) {
|
|
47
|
-
const cleaned = stripMarkdownComments(markdownContent);
|
|
48
|
-
return function ReadmeDocsPage() {
|
|
49
|
-
return _jsx(Markdown, { children: cleaned });
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=readme-docs-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readme-docs-page.js","sourceRoot":"","sources":["../../../src/_common/readme-docs-page.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,qBAAqB,CAAC,OAAe;IAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,eAAuB;IAC1D,MAAM,OAAO,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACvD,OAAO,SAAS,cAAc;QAC5B,OAAO,KAAC,QAAQ,cAAE,OAAO,GAAY,CAAC;IACxC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Markdown } from '@storybook/addon-docs/blocks';\n\n/**\n * Creates a Storybook docs page component that renders markdown content (e.g. a README.md).\n *\n * Requires the `autodocs` tag on the component meta to create a Docs entry in the sidebar\n * (the global preview config disables autodocs with `!autodocs`).\n *\n * Usage in a *.stories.tsx file:\n * ```ts\n * import ReadmeContent from '../README.md?raw';\n * import { createReadmeDocsPage } from '../../_common/readme-docs-page';\n *\n * const meta: Meta = {\n * // ...\n * tags: ['docsPage', 'autodocs'],\n * parameters: {\n * docs: { page: createReadmeDocsPage(ReadmeContent) },\n * },\n * };\n * ```\n */\nfunction stripMarkdownComments(content: string): string {\n return content.replace(/^\\[\\/\\/\\]: #.*\\n*/gm, '');\n}\n\nexport function createReadmeDocsPage(markdownContent: string) {\n const cleaned = stripMarkdownComments(markdownContent);\n return function ReadmeDocsPage() {\n return <Markdown>{cleaned}</Markdown>;\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readme-docs-page.d.ts","sourceRoot":"","sources":["../../../src/_common/readme-docs-page.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,iDAK3D"}
|