MCPcopy Index your code
hub / github.com/plotly/dash / CellFactory

Class CellFactory

components/dash-table/src/dash-table/components/CellFactory.tsx:26–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24import Markdown from 'dash-table/utils/Markdown';
25
26export default class CellFactory {
27 private get props() {
28 return this.propsFn();
29 }
30
31 constructor(
32 private readonly propsFn: () => ICellFactoryProps,
33 private readonly cellContents = derivedCellContents(propsFn),
34 private readonly cellDropdowns = derivedDropdowns(),
35 private readonly cellOperations = derivedCellOperations(),
36 private readonly dataPartialStyles = derivedPartialDataStyles(),
37 private readonly dataStyles = derivedDataStyles(),
38 private readonly dataOpStyles = derivedDataOpStyles(),
39 private readonly cellWrappers = derivedCellWrappers(propsFn),
40 private readonly relevantStyles = derivedRelevantCellStyles()
41 ) {}
42
43 private getMarkdown = memoizeOne(
44 (options: IMarkdownOptions) => new Markdown(options)
45 );
46
47 public createCells(
48 dataEdges: IEdgesMatrices | undefined,
49 dataOpEdges: IEdgesMatrices | undefined
50 ) {
51 const {
52 active_cell,
53 applyFocus,
54 dropdown_conditional,
55 dropdown,
56 data,
57 dropdown_data,
58 id,
59 is_focused,
60 loading_state,
61 markdown_options,
62 row_deletable,
63 row_selectable,
64 selected_cells,
65 selected_rows,
66 setProps,
67 style_cell,
68 style_cell_conditional,
69 style_data,
70 style_data_conditional,
71 virtualized,
72 visibleColumns
73 } = this.props;
74
75 const relevantStyles = this.relevantStyles(
76 style_cell,
77 style_data,
78 style_cell_conditional,
79 style_data_conditional
80 );
81
82 const partialCellStyles = this.dataPartialStyles(
83 visibleColumns,

Callers

nothing calls this directly

Calls 6

memoizeOneFunction · 0.90
arrayMap2Function · 0.90
matrixMap2Function · 0.90
matrixMap3Function · 0.90
getStyleMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…