@economic/taco 2.26.7 → 2.26.8
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/esm/packages/taco/src/components/Report/Report.js +11 -1
- package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +11 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/taco.cjs.development.js +22 -2
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ function Column(_) {
|
|
|
9
9
|
function Group(_) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const BaseReport = /*#__PURE__*/fixedForwardRef(function BaseReport(props, ref) {
|
|
13
13
|
const report = useReport(props, ref);
|
|
14
14
|
return /*#__PURE__*/React__default.createElement(Table, null, /*#__PURE__*/React__default.createElement(Table.Toolbar, {
|
|
15
15
|
table: report
|
|
@@ -18,6 +18,16 @@ const Report = /*#__PURE__*/fixedForwardRef(function Report(props, ref) {
|
|
|
18
18
|
table: report
|
|
19
19
|
}));
|
|
20
20
|
});
|
|
21
|
+
const Report = /*#__PURE__*/fixedForwardRef(function Report(props, ref) {
|
|
22
|
+
const stringifiedChildren = String(props.children);
|
|
23
|
+
// we force a remount (using key) when the child columns change because there are too many places to add children as an effect
|
|
24
|
+
// this is cheaper from a complexity perspective, and probably performance wise as well
|
|
25
|
+
const key = React__default.useMemo(() => String('tableKey_' + stringifiedChildren), [stringifiedChildren]);
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(BaseReport, Object.assign({}, props, {
|
|
27
|
+
key: key,
|
|
28
|
+
ref: ref
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
21
31
|
Report.Column = Column;
|
|
22
32
|
Report.Group = Group;
|
|
23
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Report.js","sources":["../../../../../../../src/components/Report/Report.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useReport } from './useReport';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';\n\nfunction Column<TType = unknown>(_: ReportColumnProps<TType>) {\n return null;\n}\n\nfunction Group(_: ReportGroupProps) {\n return null;\n}\n\
|
|
1
|
+
{"version":3,"file":"Report.js","sources":["../../../../../../../src/components/Report/Report.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useReport } from './useReport';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';\n\nfunction Column<TType = unknown>(_: ReportColumnProps<TType>) {\n return null;\n}\n\nfunction Group(_: ReportGroupProps) {\n return null;\n}\n\nconst BaseReport = fixedForwardRef(function BaseReport<TType = unknown>(props: ReportProps<TType>, ref: React.Ref<ReportRef>) {\n const report = useReport<TType>(props, ref);\n\n return (\n <Table>\n <Table.Toolbar<TType> table={report} />\n <Table.Grid<TType> data-taco=\"table-report\" table={report} />\n </Table>\n );\n});\n\nexport const Report = fixedForwardRef(function Report<TType = unknown>(props: ReportProps<TType>, ref: React.Ref<ReportRef>) {\n const stringifiedChildren = String(props.children);\n // we force a remount (using key) when the child columns change because there are too many places to add children as an effect\n // this is cheaper from a complexity perspective, and probably performance wise as well\n const key = React.useMemo(() => String('tableKey_' + stringifiedChildren), [stringifiedChildren]);\n return <BaseReport<TType> {...props} key={key} ref={ref} />;\n}) as (<TType = unknown>(props: ReportProps<TType> & React.RefAttributes<ReportRef>) => JSX.Element) & {\n Column: typeof Column;\n Group: typeof Group;\n};\nReport.Column = Column;\nReport.Group = Group;\n\nexport type { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';\n"],"names":["Column","_","Group","BaseReport","fixedForwardRef","props","ref","report","useReport","React","Table","Toolbar","table","Grid","Report","stringifiedChildren","String","children","key","useMemo"],"mappings":";;;;;AAMA,SAASA,MAAMA,CAAkBC,CAA2B;EACxD,OAAO,IAAI;AACf;AAEA,SAASC,KAAKA,CAACD,CAAmB;EAC9B,OAAO,IAAI;AACf;AAEA,MAAME,UAAU,gBAAGC,eAAe,CAAC,SAASD,UAAUA,CAAkBE,KAAyB,EAAEC,GAAyB;EACxH,MAAMC,MAAM,GAAGC,SAAS,CAAQH,KAAK,EAAEC,GAAG,CAAC;EAE3C,oBACIG,6BAACC,KAAK,qBACFD,6BAACC,KAAK,CAACC,OAAO;IAAQC,KAAK,EAAEL;IAAU,eACvCE,6BAACC,KAAK,CAACG,IAAI;iBAAkB,cAAc;IAACD,KAAK,EAAEL;IAAU,CACzD;AAEhB,CAAC,CAAC;MAEWO,MAAM,gBAAGV,eAAe,CAAC,SAASU,MAAMA,CAAkBT,KAAyB,EAAEC,GAAyB;EACvH,MAAMS,mBAAmB,GAAGC,MAAM,CAACX,KAAK,CAACY,QAAQ,CAAC;;;EAGlD,MAAMC,GAAG,GAAGT,cAAK,CAACU,OAAO,CAAC,MAAMH,MAAM,CAAC,WAAW,GAAGD,mBAAmB,CAAC,EAAE,CAACA,mBAAmB,CAAC,CAAC;EACjG,oBAAON,6BAACN,UAAU,oBAAYE,KAAK;IAAEa,GAAG,EAAEA,GAAG;IAAEZ,GAAG,EAAEA;KAAO;AAC/D,CAAC;AAIDQ,MAAM,CAACd,MAAM,GAAGA,MAAM;AACtBc,MAAM,CAACZ,KAAK,GAAGA,KAAK;;;;"}
|
|
@@ -13,7 +13,7 @@ function Group(_) {
|
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
Group.displayName = 'Table3Group';
|
|
16
|
-
const
|
|
16
|
+
const BaseTable3 = /*#__PURE__*/fixedForwardRef(function BaseTable3(props, ref) {
|
|
17
17
|
var _table3$meta$editing, _table3$meta$editing2;
|
|
18
18
|
const table3 = useTable3(props, ref);
|
|
19
19
|
const handleBlur = event => {
|
|
@@ -42,6 +42,16 @@ const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
|
|
|
42
42
|
table: table3
|
|
43
43
|
})));
|
|
44
44
|
});
|
|
45
|
+
const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
|
|
46
|
+
const stringifiedChildren = String(props.children);
|
|
47
|
+
// we force a remount (using key) when the child columns change because there are too many places to add children as an effect
|
|
48
|
+
// this is cheaper from a complexity perspective, and probably performance wise as well
|
|
49
|
+
const key = React__default.useMemo(() => String('tableKey_' + stringifiedChildren), [stringifiedChildren]);
|
|
50
|
+
return /*#__PURE__*/React__default.createElement(BaseTable3, Object.assign({}, props, {
|
|
51
|
+
key: key,
|
|
52
|
+
ref: ref
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
45
55
|
Table3.Column = Column;
|
|
46
56
|
Table3.Group = Group;
|
|
47
57
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table3.js","sources":["../../../../../../../src/components/Table3/Table3.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useTable3 } from './useTable3';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { Alert } from './components/Editing/Alert';\nimport { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps } from './types';\nimport { Editing } from './components/Toolbar/Editing/Editing';\nimport './style.css';\n\nfunction Column<TType = unknown>(_: Table3ColumnProps<TType>) {\n return null;\n}\nColumn.displayName = 'Table3Column';\n\nfunction Group(_: Table3GroupProps) {\n return null;\n}\nGroup.displayName = 'Table3Group';\n\
|
|
1
|
+
{"version":3,"file":"Table3.js","sources":["../../../../../../../src/components/Table3/Table3.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useTable3 } from './useTable3';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { Alert } from './components/Editing/Alert';\nimport { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps } from './types';\nimport { Editing } from './components/Toolbar/Editing/Editing';\nimport './style.css';\n\nfunction Column<TType = unknown>(_: Table3ColumnProps<TType>) {\n return null;\n}\nColumn.displayName = 'Table3Column';\n\nfunction Group(_: Table3GroupProps) {\n return null;\n}\nGroup.displayName = 'Table3Group';\n\nconst BaseTable3 = fixedForwardRef(function BaseTable3<TType = unknown>(props: Table3Props<TType>, ref: React.Ref<Table3Ref>) {\n const table3 = useTable3<TType>(props, ref);\n\n const handleBlur = (event: React.FocusEvent<HTMLTableElement>) => {\n if (table3.meta.editing.isEditing) {\n table3.meta.editing.handleBlur(event);\n }\n };\n\n const gridAttributes = {\n 'data-table-editing-mode': table3.meta.editing?.isEditing\n ? table3.meta.editing?.isDetailedMode\n ? 'detailed'\n : 'normal'\n : undefined,\n enableHorizontalArrowKeyNavigation: table3.meta.editing.isEditing,\n onBlur: handleBlur,\n };\n\n const hasValidationErrors = table3.meta.editing.hasErrors(table3.instance, table3.ref);\n\n return (\n <Table>\n <Table.Toolbar<TType> table={table3}>\n {table3.meta.editing.isEnabled ? (\n <Editing scrollToIndex={table3.renderer.scrollToIndex} table={table3.instance} />\n ) : null}\n </Table.Toolbar>\n {hasValidationErrors ? (\n <Alert\n className=\"mb-4\"\n scrollToIndex={table3.renderer.scrollToIndex}\n table={table3.instance}\n tableRef={table3.ref}\n />\n ) : null}\n <Table.Grid<TType> {...gridAttributes} data-taco=\"table3\" table={table3} />\n </Table>\n );\n});\n\nexport const Table3 = fixedForwardRef(function Table3<TType = unknown>(props: Table3Props<TType>, ref: React.Ref<Table3Ref>) {\n const stringifiedChildren = String(props.children);\n // we force a remount (using key) when the child columns change because there are too many places to add children as an effect\n // this is cheaper from a complexity perspective, and probably performance wise as well\n const key = React.useMemo(() => String('tableKey_' + stringifiedChildren), [stringifiedChildren]);\n return <BaseTable3<TType> {...props} key={key} ref={ref} />;\n}) as (<TType = unknown>(props: Table3Props<TType> & React.RefAttributes<Table3Ref>) => JSX.Element) & {\n Column: typeof Column;\n Group: typeof Group;\n};\nTable3.Column = Column;\nTable3.Group = Group;\n\nexport type {\n Table3Props,\n Table3Ref,\n Table3ColumnProps,\n Table3GroupProps,\n Table3EditingSaveHandler,\n Table3EditingValidatorFn,\n Table3FeatureProps,\n Table3Texts,\n} from './types';\n"],"names":["Column","_","displayName","Group","BaseTable3","fixedForwardRef","props","ref","table3","useTable3","handleBlur","event","meta","editing","isEditing","gridAttributes","_table3$meta$editing","_table3$meta$editing2","isDetailedMode","undefined","enableHorizontalArrowKeyNavigation","onBlur","hasValidationErrors","hasErrors","instance","React","Table","Toolbar","table","isEnabled","Editing","scrollToIndex","renderer","Alert","className","tableRef","Grid","Table3","stringifiedChildren","String","children","key","useMemo"],"mappings":";;;;;;;AASA,SAASA,MAAMA,CAAkBC,CAA2B;EACxD,OAAO,IAAI;AACf;AACAD,MAAM,CAACE,WAAW,GAAG,cAAc;AAEnC,SAASC,KAAKA,CAACF,CAAmB;EAC9B,OAAO,IAAI;AACf;AACAE,KAAK,CAACD,WAAW,GAAG,aAAa;AAEjC,MAAME,UAAU,gBAAGC,eAAe,CAAC,SAASD,UAAUA,CAAkBE,KAAyB,EAAEC,GAAyB;;EACxH,MAAMC,MAAM,GAAGC,SAAS,CAAQH,KAAK,EAAEC,GAAG,CAAC;EAE3C,MAAMG,UAAU,GAAIC,KAAyC;IACzD,IAAIH,MAAM,CAACI,IAAI,CAACC,OAAO,CAACC,SAAS,EAAE;MAC/BN,MAAM,CAACI,IAAI,CAACC,OAAO,CAACH,UAAU,CAACC,KAAK,CAAC;;GAE5C;EAED,MAAMI,cAAc,GAAG;IACnB,yBAAyB,EAAE,CAAAC,oBAAA,GAAAR,MAAM,CAACI,IAAI,CAACC,OAAO,cAAAG,oBAAA,eAAnBA,oBAAA,CAAqBF,SAAS,GACnD,CAAAG,qBAAA,GAAAT,MAAM,CAACI,IAAI,CAACC,OAAO,cAAAI,qBAAA,eAAnBA,qBAAA,CAAqBC,cAA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AAO;AAC/D,CAAC;AAID8B,MAAM,CAACrC,MAAM,GAAGA,MAAM;AACtBqC,MAAM,CAAClC,KAAK,GAAGA,KAAK;;;;"}
|
|
@@ -15787,7 +15787,7 @@ function Column$1(_) {
|
|
|
15787
15787
|
function Group$3(_) {
|
|
15788
15788
|
return null;
|
|
15789
15789
|
}
|
|
15790
|
-
const
|
|
15790
|
+
const BaseReport = /*#__PURE__*/fixedForwardRef(function BaseReport(props, ref) {
|
|
15791
15791
|
const report = useReport(props, ref);
|
|
15792
15792
|
return /*#__PURE__*/React__default.createElement(Table, null, /*#__PURE__*/React__default.createElement(Table.Toolbar, {
|
|
15793
15793
|
table: report
|
|
@@ -15796,6 +15796,16 @@ const Report$1 = /*#__PURE__*/fixedForwardRef(function Report(props, ref) {
|
|
|
15796
15796
|
table: report
|
|
15797
15797
|
}));
|
|
15798
15798
|
});
|
|
15799
|
+
const Report$1 = /*#__PURE__*/fixedForwardRef(function Report(props, ref) {
|
|
15800
|
+
const stringifiedChildren = String(props.children);
|
|
15801
|
+
// we force a remount (using key) when the child columns change because there are too many places to add children as an effect
|
|
15802
|
+
// this is cheaper from a complexity perspective, and probably performance wise as well
|
|
15803
|
+
const key = React__default.useMemo(() => String('tableKey_' + stringifiedChildren), [stringifiedChildren]);
|
|
15804
|
+
return /*#__PURE__*/React__default.createElement(BaseReport, Object.assign({}, props, {
|
|
15805
|
+
key: key,
|
|
15806
|
+
ref: ref
|
|
15807
|
+
}));
|
|
15808
|
+
});
|
|
15799
15809
|
Report$1.Column = Column$1;
|
|
15800
15810
|
Report$1.Group = Group$3;
|
|
15801
15811
|
|
|
@@ -18509,7 +18519,7 @@ function Group$4(_) {
|
|
|
18509
18519
|
return null;
|
|
18510
18520
|
}
|
|
18511
18521
|
Group$4.displayName = 'Table3Group';
|
|
18512
|
-
const
|
|
18522
|
+
const BaseTable3 = /*#__PURE__*/fixedForwardRef(function BaseTable3(props, ref) {
|
|
18513
18523
|
var _table3$meta$editing, _table3$meta$editing2;
|
|
18514
18524
|
const table3 = useTable3(props, ref);
|
|
18515
18525
|
const handleBlur = event => {
|
|
@@ -18538,6 +18548,16 @@ const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
|
|
|
18538
18548
|
table: table3
|
|
18539
18549
|
})));
|
|
18540
18550
|
});
|
|
18551
|
+
const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
|
|
18552
|
+
const stringifiedChildren = String(props.children);
|
|
18553
|
+
// we force a remount (using key) when the child columns change because there are too many places to add children as an effect
|
|
18554
|
+
// this is cheaper from a complexity perspective, and probably performance wise as well
|
|
18555
|
+
const key = React__default.useMemo(() => String('tableKey_' + stringifiedChildren), [stringifiedChildren]);
|
|
18556
|
+
return /*#__PURE__*/React__default.createElement(BaseTable3, Object.assign({}, props, {
|
|
18557
|
+
key: key,
|
|
18558
|
+
ref: ref
|
|
18559
|
+
}));
|
|
18560
|
+
});
|
|
18541
18561
|
Table3.Column = Column$3;
|
|
18542
18562
|
Table3.Group = Group$4;
|
|
18543
18563
|
|