@coveord/plasma-mantine 52.8.0 → 52.8.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS;;;;;;;;CAIZ,CAAC;AAEJ,KAAK,yBAAyB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY,CAAC,yBAAyB,CAAC;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAgCjE,CAAC"}
1
+ {"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS;;;;;;;;CAIZ,CAAC;AAEJ,KAAK,yBAAyB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY,CAAC,yBAAyB,CAAC;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CA+BjE,CAAC"}
@@ -38,10 +38,9 @@ var TablePredicate = function(_param) {
38
38
  styles: styles,
39
39
  unstyled: unstyled
40
40
  }).classes;
41
- var _useTable = (0, _TableContext.useTable)(), onChange = _useTable.onChange, form = _useTable.form;
41
+ var form = (0, _TableContext.useTable)().form;
42
42
  var onUpdate = function(newValue) {
43
43
  form.setFieldValue("predicates", _object_spread_props._(_object_spread._({}, form.values.predicates), _define_property._({}, id, newValue)));
44
- onChange === null || onChange === void 0 ? void 0 : onChange();
45
44
  };
46
45
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Grid.Col, _object_spread_props._(_object_spread._({
47
46
  span: "content",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {onChange, form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n onChange?.();\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["TablePredicate","useStyles","createStyles","theme","root","wrapper","label","id","data","classNames","styles","unstyled","others","classes","name","useTable","onChange","form","onUpdate","newValue","setFieldValue","values","predicates","Grid","Col","span","order","TableComponentsOrder","Predicate","py","className","Group","spacing","Text","Select","withinPortal","value","aria-label","searchable","length"],"mappings":";;;;+BA+BaA;;;eAAAA;;;;;;;;oBA/B8E;2BAGxD;4BACZ;AAEvB,IAAMC,YAAYC,IAAAA,oBAAa,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;IACZ;;AAqBO,IAAMN,iBAAyD;QAClEO,YAAAA,IACAC,cAAAA,MACAF,eAAAA,OACAG,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QANHL;QACAC;QACAF;QACAG;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWZ,UAAU,MAAM;QAACa,MAAM;QAAkBL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAAhFE;IACP,IAAyBE,YAAAA,IAAAA,2BAAlBC,WAAkBD,UAAlBC,UAAUC,OAAQF,UAARE;IAEjB,IAAMC,WAAW,SAACC;QACdF,KAAKG,cAAc,cAAc,4CAAIH,KAAKI,OAAOC,aAAY,uBAACf,IAAKY;QACnEH,qBAAAA,sBAAAA,KAAAA,IAAAA;IACJ;IAEA,qBACI,qBAACO,WAAKC;QAAIC,MAAK;QAAUC,OAAOC,kCAAqBC;QAAWC,IAAG;QAAKC,WAAWjB,QAAQT;OAAUQ;kBACjG,cAAA,sBAACmB;YAAMC,SAAQ;YAAKF,WAAWjB,QAAQR;;gBAClCC,sBAAQ,sBAAC2B;oBAAKH,WAAWjB,QAAQP;;wBAAQA;wBAAM;;qBAAW;8BAC3D,qBAAC4B;oBACGC,YAAY;oBACZC,OAAOnB,KAAKI,OAAOC,UAAU,CAACf,GAAG;oBACjCS,UAAUE;oBACVV,MAAMA;oBACN6B,cAAY/B,kBAAAA,mBAAAA,QAASC;oBACrB+B,YAAY9B,KAAK+B,SAAS;;;;;AAK9C"}
1
+ {"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["TablePredicate","useStyles","createStyles","theme","root","wrapper","label","id","data","classNames","styles","unstyled","others","classes","name","form","useTable","onUpdate","newValue","setFieldValue","values","predicates","Grid","Col","span","order","TableComponentsOrder","Predicate","py","className","Group","spacing","Text","Select","withinPortal","value","onChange","aria-label","searchable","length"],"mappings":";;;;+BA+BaA;;;eAAAA;;;;;;;;oBA/B8E;2BAGxD;4BACZ;AAEvB,IAAMC,YAAYC,IAAAA,oBAAa,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;IACZ;;AAqBO,IAAMN,iBAAyD;QAClEO,YAAAA,IACAC,cAAAA,MACAF,eAAAA,OACAG,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QANHL;QACAC;QACAF;QACAG;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWZ,UAAU,MAAM;QAACa,MAAM;QAAkBL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAAhFE;IACP,IAAM,AAACE,OAAQC,IAAAA,0BAARD;IAEP,IAAME,WAAW,SAACC;QACdH,KAAKI,cAAc,cAAc,4CAAIJ,KAAKK,OAAOC,aAAY,uBAACd,IAAKW;IACvE;IAEA,qBACI,qBAACI,WAAKC;QAAIC,MAAK;QAAUC,OAAOC,kCAAqBC;QAAWC,IAAG;QAAKC,WAAWhB,QAAQT;OAAUQ;kBACjG,cAAA,sBAACkB;YAAMC,SAAQ;YAAKF,WAAWhB,QAAQR;;gBAClCC,sBAAQ,sBAAC0B;oBAAKH,WAAWhB,QAAQP;;wBAAQA;wBAAM;;qBAAW;8BAC3D,qBAAC2B;oBACGC,YAAY;oBACZC,OAAOpB,KAAKK,OAAOC,UAAU,CAACd,GAAG;oBACjC6B,UAAUnB;oBACVT,MAAMA;oBACN6B,cAAY/B,kBAAAA,mBAAAA,QAASC;oBACrB+B,YAAY9B,KAAK+B,SAAS;;;;;AAK9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS;;;;;;;;CAIZ,CAAC;AAEJ,KAAK,yBAAyB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY,CAAC,yBAAyB,CAAC;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAgCjE,CAAC"}
1
+ {"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS;;;;;;;;CAIZ,CAAC;AAEJ,KAAK,yBAAyB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY,CAAC,yBAAyB,CAAC;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CA+BjE,CAAC"}
@@ -28,10 +28,9 @@ export var TablePredicate = function(_param) {
28
28
  styles: styles,
29
29
  unstyled: unstyled
30
30
  }).classes;
31
- var _useTable = useTable(), onChange = _useTable.onChange, form = _useTable.form;
31
+ var form = useTable().form;
32
32
  var onUpdate = function(newValue) {
33
33
  form.setFieldValue("predicates", _object_spread_props(_object_spread({}, form.values.predicates), _define_property({}, id, newValue)));
34
- onChange === null || onChange === void 0 ? void 0 : onChange();
35
34
  };
36
35
  return /*#__PURE__*/ _jsx(Grid.Col, _object_spread_props(_object_spread({
37
36
  span: "content",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {onChange, form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n onChange?.();\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["createStyles","Grid","Group","Select","Text","TableComponentsOrder","useTable","useStyles","theme","root","wrapper","label","TablePredicate","id","data","classNames","styles","unstyled","others","classes","name","onChange","form","onUpdate","newValue","setFieldValue","values","predicates","Col","span","order","Predicate","py","className","spacing","withinPortal","value","aria-label","searchable","length"],"mappings":";;;;;AAAA,SAAQA,YAAY,EAAgBC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAyBC,IAAI,QAAO,gBAAgB;AAG3G,SAAQC,oBAAoB,QAAO,iBAAiB;AACpD,SAAQC,QAAQ,QAAO,iBAAiB;AAExC,IAAMC,YAAYP,aAAa,SAACQ;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;IACZ;;AAqBA,OAAO,IAAMC,iBAAyD;QAClEC,YAAAA,IACAC,cAAAA,MACAH,eAAAA,OACAI,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QANHL;QACAC;QACAH;QACAI;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWZ,UAAU,MAAM;QAACa,MAAM;QAAkBL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAAhFE;IACP,IAAyBb,YAAAA,YAAlBe,WAAkBf,UAAlBe,UAAUC,OAAQhB,UAARgB;IAEjB,IAAMC,WAAW,SAACC;QACdF,KAAKG,cAAc,cAAc,wCAAIH,KAAKI,OAAOC,aAAY,qBAACd,IAAKW;QACnEH,qBAAAA,sBAAAA,KAAAA,IAAAA;IACJ;IAEA,qBACI,KAACpB,KAAK2B;QAAIC,MAAK;QAAUC,OAAOzB,qBAAqB0B;QAAWC,IAAG;QAAKC,WAAWd,QAAQV;OAAUS;kBACjG,cAAA,MAAChB;YAAMgC,SAAQ;YAAKD,WAAWd,QAAQT;;gBAClCC,sBAAQ,MAACP;oBAAK6B,WAAWd,QAAQR;;wBAAQA;wBAAM;;qBAAW;8BAC3D,KAACR;oBACGgC,YAAY;oBACZC,OAAOd,KAAKI,OAAOC,UAAU,CAACd,GAAG;oBACjCQ,UAAUE;oBACVT,MAAMA;oBACNuB,cAAY1B,kBAAAA,mBAAAA,QAASE;oBACrByB,YAAYxB,KAAKyB,SAAS;;;;;AAK9C,EAAE"}
1
+ {"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["createStyles","Grid","Group","Select","Text","TableComponentsOrder","useTable","useStyles","theme","root","wrapper","label","TablePredicate","id","data","classNames","styles","unstyled","others","classes","name","form","onUpdate","newValue","setFieldValue","values","predicates","Col","span","order","Predicate","py","className","spacing","withinPortal","value","onChange","aria-label","searchable","length"],"mappings":";;;;;AAAA,SAAQA,YAAY,EAAgBC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAyBC,IAAI,QAAO,gBAAgB;AAG3G,SAAQC,oBAAoB,QAAO,iBAAiB;AACpD,SAAQC,QAAQ,QAAO,iBAAiB;AAExC,IAAMC,YAAYP,aAAa,SAACQ;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;IACZ;;AAqBA,OAAO,IAAMC,iBAAyD;QAClEC,YAAAA,IACAC,cAAAA,MACAH,eAAAA,OACAI,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QANHL;QACAC;QACAH;QACAI;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWZ,UAAU,MAAM;QAACa,MAAM;QAAkBL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAAhFE;IACP,IAAM,AAACE,OAAQf,WAARe;IAEP,IAAMC,WAAW,SAACC;QACdF,KAAKG,cAAc,cAAc,wCAAIH,KAAKI,OAAOC,aAAY,qBAACb,IAAKU;IACvE;IAEA,qBACI,KAACtB,KAAK0B;QAAIC,MAAK;QAAUC,OAAOxB,qBAAqByB;QAAWC,IAAG;QAAKC,WAAWb,QAAQV;OAAUS;kBACjG,cAAA,MAAChB;YAAM+B,SAAQ;YAAKD,WAAWb,QAAQT;;gBAClCC,sBAAQ,MAACP;oBAAK4B,WAAWb,QAAQR;;wBAAQA;wBAAM;;qBAAW;8BAC3D,KAACR;oBACG+B,YAAY;oBACZC,OAAOd,KAAKI,OAAOC,UAAU,CAACb,GAAG;oBACjCuB,UAAUd;oBACVR,MAAMA;oBACNuB,cAAY1B,kBAAAA,mBAAAA,QAASE;oBACrByB,YAAYxB,KAAKyB,SAAS;;;;;AAK9C,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveord/plasma-mantine",
3
- "version": "52.8.0",
3
+ "version": "52.8.1",
4
4
  "description": "A Plasma flavoured Mantine theme",
5
5
  "keywords": [
6
6
  "plasma",
@@ -39,11 +39,10 @@ export const TablePredicate: FunctionComponent<TablePredicateProps> = ({
39
39
  ...others
40
40
  }) => {
41
41
  const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});
42
- const {onChange, form} = useTable();
42
+ const {form} = useTable();
43
43
 
44
44
  const onUpdate = (newValue: string) => {
45
45
  form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});
46
- onChange?.();
47
46
  };
48
47
 
49
48
  return (
@@ -1,5 +1,5 @@
1
1
  import {ColumnDef, createColumnHelper} from '@tanstack/table-core';
2
- import {render, screen, userEvent, waitFor} from '@test-utils';
2
+ import {act, render, screen, userEvent, waitFor} from '@test-utils';
3
3
 
4
4
  import {Table} from '../Table';
5
5
 
@@ -75,7 +75,7 @@ describe('Table.Predicate', () => {
75
75
  });
76
76
 
77
77
  it('calls onChange when changing the predicate', async () => {
78
- const user = userEvent.setup({delay: null});
78
+ const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});
79
79
  const onChange = vi.fn();
80
80
  render(
81
81
  <Table
@@ -96,33 +96,18 @@ describe('Table.Predicate', () => {
96
96
  </Table>
97
97
  );
98
98
 
99
- await waitFor(() => {
100
- expect(
101
- screen.getByRole('searchbox', {
102
- name: 'rank',
103
- })
104
- ).toHaveValue('Second');
105
- });
99
+ expect(screen.getByRole('searchbox', {name: 'rank'})).toHaveValue('Second');
106
100
 
107
- await user.click(
108
- screen.getByRole('searchbox', {
109
- name: 'rank',
110
- })
111
- );
101
+ await user.click(screen.getByRole('searchbox', {name: 'rank'}));
112
102
 
113
- await user.click(
114
- screen.getByRole('option', {
115
- name: 'First',
116
- })
117
- );
103
+ await user.click(screen.getByRole('option', {name: 'First'}));
118
104
 
119
- expect(
120
- screen.getByRole('searchbox', {
121
- name: 'rank',
122
- })
123
- ).toHaveValue('First');
124
- vi.advanceTimersByTime(500);
105
+ expect(screen.getByRole('searchbox', {name: 'rank'})).toHaveValue('First');
106
+ act(() => {
107
+ vi.advanceTimersByTime(500);
108
+ });
125
109
 
110
+ expect(onChange).toHaveBeenCalledTimes(1);
126
111
  expect(onChange).toHaveBeenCalledWith(expect.objectContaining({predicates: {rank: 'first'}}));
127
112
  });
128
113
  });