@hitachivantara/uikit-react-lab 3.45.12 → 3.47.0

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.
Files changed (97) hide show
  1. package/dist/QueryBuilder/Context.js +4 -1
  2. package/dist/QueryBuilder/Context.js.map +1 -1
  3. package/dist/QueryBuilder/Rule/Value/Value.js +1 -5
  4. package/dist/QueryBuilder/Rule/Value/Value.js.map +1 -1
  5. package/dist/QueryBuilder/index.d.ts +1 -0
  6. package/dist/QueryBuilder/index.js +20 -0
  7. package/dist/QueryBuilder/index.js.map +1 -1
  8. package/dist/Table/Table.d.ts +5 -1
  9. package/dist/Table/Table.js +20 -5
  10. package/dist/Table/Table.js.map +1 -1
  11. package/dist/Table/TableBody/TableBody.js +33 -5
  12. package/dist/Table/TableBody/TableBody.js.map +1 -1
  13. package/dist/Table/TableBody/styles.js.map +1 -1
  14. package/dist/Table/TableCell/TableCell.d.ts +3 -1
  15. package/dist/Table/TableCell/TableCell.js +22 -2
  16. package/dist/Table/TableCell/TableCell.js.map +1 -1
  17. package/dist/Table/TableCell/styles.js +28 -0
  18. package/dist/Table/TableCell/styles.js.map +1 -1
  19. package/dist/Table/TableHeader/TableHeader.d.ts +1 -0
  20. package/dist/Table/TableHeader/TableHeader.js +6 -1
  21. package/dist/Table/TableHeader/TableHeader.js.map +1 -1
  22. package/dist/Table/TableHeader/styles.js +9 -0
  23. package/dist/Table/TableHeader/styles.js.map +1 -1
  24. package/dist/Table/TableRow/TableRow.d.ts +3 -1
  25. package/dist/Table/TableRow/TableRow.js +16 -2
  26. package/dist/Table/TableRow/TableRow.js.map +1 -1
  27. package/dist/Table/TableRow/styles.js +28 -3
  28. package/dist/Table/TableRow/styles.js.map +1 -1
  29. package/dist/Table/styles.js +5 -0
  30. package/dist/Table/styles.js.map +1 -1
  31. package/dist/index.js +13 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/legacy/QueryBuilder/Context.js +3 -3
  34. package/dist/legacy/QueryBuilder/Context.js.map +1 -1
  35. package/dist/legacy/QueryBuilder/Rule/Value/Value.js +1 -5
  36. package/dist/legacy/QueryBuilder/Rule/Value/Value.js.map +1 -1
  37. package/dist/legacy/QueryBuilder/index.d.ts +1 -0
  38. package/dist/legacy/QueryBuilder/index.js +1 -0
  39. package/dist/legacy/QueryBuilder/index.js.map +1 -1
  40. package/dist/legacy/Table/Table.d.ts +5 -1
  41. package/dist/legacy/Table/Table.js +21 -6
  42. package/dist/legacy/Table/Table.js.map +1 -1
  43. package/dist/legacy/Table/TableBody/TableBody.js +31 -6
  44. package/dist/legacy/Table/TableBody/TableBody.js.map +1 -1
  45. package/dist/legacy/Table/TableBody/styles.js.map +1 -1
  46. package/dist/legacy/Table/TableCell/TableCell.d.ts +3 -1
  47. package/dist/legacy/Table/TableCell/TableCell.js +22 -2
  48. package/dist/legacy/Table/TableCell/TableCell.js.map +1 -1
  49. package/dist/legacy/Table/TableCell/styles.js +28 -0
  50. package/dist/legacy/Table/TableCell/styles.js.map +1 -1
  51. package/dist/legacy/Table/TableHeader/TableHeader.d.ts +1 -0
  52. package/dist/legacy/Table/TableHeader/TableHeader.js +6 -1
  53. package/dist/legacy/Table/TableHeader/TableHeader.js.map +1 -1
  54. package/dist/legacy/Table/TableHeader/styles.js +9 -0
  55. package/dist/legacy/Table/TableHeader/styles.js.map +1 -1
  56. package/dist/legacy/Table/TableRow/TableRow.d.ts +3 -1
  57. package/dist/legacy/Table/TableRow/TableRow.js +16 -2
  58. package/dist/legacy/Table/TableRow/TableRow.js.map +1 -1
  59. package/dist/legacy/Table/TableRow/styles.js +27 -3
  60. package/dist/legacy/Table/TableRow/styles.js.map +1 -1
  61. package/dist/legacy/Table/styles.js +5 -0
  62. package/dist/legacy/Table/styles.js.map +1 -1
  63. package/dist/legacy/index.js +1 -0
  64. package/dist/legacy/index.js.map +1 -1
  65. package/dist/modern/QueryBuilder/Context.js +3 -3
  66. package/dist/modern/QueryBuilder/Context.js.map +1 -1
  67. package/dist/modern/QueryBuilder/Rule/Value/Value.js +1 -5
  68. package/dist/modern/QueryBuilder/Rule/Value/Value.js.map +1 -1
  69. package/dist/modern/QueryBuilder/index.d.ts +1 -0
  70. package/dist/modern/QueryBuilder/index.js +1 -0
  71. package/dist/modern/QueryBuilder/index.js.map +1 -1
  72. package/dist/modern/Table/Table.d.ts +5 -1
  73. package/dist/modern/Table/Table.js +21 -7
  74. package/dist/modern/Table/Table.js.map +1 -1
  75. package/dist/modern/Table/TableBody/TableBody.js +30 -7
  76. package/dist/modern/Table/TableBody/TableBody.js.map +1 -1
  77. package/dist/modern/Table/TableBody/styles.js.map +1 -1
  78. package/dist/modern/Table/TableCell/TableCell.d.ts +3 -1
  79. package/dist/modern/Table/TableCell/TableCell.js +22 -2
  80. package/dist/modern/Table/TableCell/TableCell.js.map +1 -1
  81. package/dist/modern/Table/TableCell/styles.js +28 -0
  82. package/dist/modern/Table/TableCell/styles.js.map +1 -1
  83. package/dist/modern/Table/TableHeader/TableHeader.d.ts +1 -0
  84. package/dist/modern/Table/TableHeader/TableHeader.js +6 -1
  85. package/dist/modern/Table/TableHeader/TableHeader.js.map +1 -1
  86. package/dist/modern/Table/TableHeader/styles.js +9 -0
  87. package/dist/modern/Table/TableHeader/styles.js.map +1 -1
  88. package/dist/modern/Table/TableRow/TableRow.d.ts +3 -1
  89. package/dist/modern/Table/TableRow/TableRow.js +16 -2
  90. package/dist/modern/Table/TableRow/TableRow.js.map +1 -1
  91. package/dist/modern/Table/TableRow/styles.js +26 -3
  92. package/dist/modern/Table/TableRow/styles.js.map +1 -1
  93. package/dist/modern/Table/styles.js +5 -0
  94. package/dist/modern/Table/styles.js.map +1 -1
  95. package/dist/modern/index.js +1 -0
  96. package/dist/modern/index.js.map +1 -1
  97. package/package.json +3 -3
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.defaultOperators = exports.defaultLabels = exports.defaultCombinators = exports.default = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
@@ -138,6 +138,7 @@ var defaultOperators = {
138
138
  combinators: ["and"]
139
139
  }]
140
140
  };
141
+ exports.defaultOperators = defaultOperators;
141
142
  var defaultCombinators = [{
142
143
  operand: "and",
143
144
  label: "AND"
@@ -145,6 +146,7 @@ var defaultCombinators = [{
145
146
  operand: "or",
146
147
  label: "OR"
147
148
  }];
149
+ exports.defaultCombinators = defaultCombinators;
148
150
  var defaultLabels = {
149
151
  query: {
150
152
  delete: {
@@ -268,6 +270,7 @@ var defaultLabels = {
268
270
  spacer: " or a "
269
271
  }
270
272
  };
273
+ exports.defaultLabels = defaultLabels;
271
274
 
272
275
  var _default = /*#__PURE__*/(0, _react.createContext)({
273
276
  dispatchAction: function dispatchAction() {
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","names":["defaultOperators","numeric","operator","label","combinators","text","textarea","boolean","dateandtime","defaultCombinators","operand","defaultLabels","query","delete","ariaLabel","tooltip","dialogTitle","dialogMessage","dialogConfirm","dialogCancel","dialogCloseTooltip","rule","attribute","placeholder","exists","value","distance","connectorText","button","validation","required","invalid","options","true","false","equal","greaterThan","range","leftLabel","rightLabel","datetime","dateLabel","datePlaceholder","timeLabel","timePlaceholder","startDateLabel","startDatePlaceholder","startTimeLabel","startTimePlaceholder","endDateLabel","endDatePlaceholder","endTimeLabel","endTimePlaceholder","invalidInterval","group","reset","addRule","addGroup","empty","title","createCondition","createGroup","spacer","dispatchAction","askAction","selectLocation","attributes","operators","maxDepth","labels","initialTouched"],"sources":["../../src/QueryBuilder/Context.js"],"sourcesContent":["import { createContext } from \"react\";\n\nconst defaultOperators = {\n numeric: [\n {\n operator: \"greaterThan\",\n label: \"Greater than (>)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than (<)\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to (=)\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to (>=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to (<=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to (!=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n text: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n textarea: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n boolean: [\n {\n operator: \"equalsTo\",\n label: \"=\",\n combinators: [\"and\", \"or\"],\n },\n ],\n dateandtime: [\n {\n operator: \"greaterThan\",\n label: \"Greater than\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n};\n\nconst defaultCombinators = [\n { operand: \"and\", label: \"AND\" },\n { operand: \"or\", label: \"OR\" },\n];\n\nconst defaultLabels = {\n query: {\n delete: {\n ariaLabel: \"Reset query\",\n tooltip: \"Reset query\",\n dialogTitle: \"Remove all conditions?\",\n dialogMessage:\n \"Are you sure you want to remove all the conditions? They will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n rule: {\n attribute: {\n label: \"Attribute\",\n placeholder: \"Select attribute...\",\n exists: \"Attribute already exists.\",\n },\n operator: {\n label: \"Operator\",\n placeholder: \"Select operator...\",\n },\n value: {\n distance: {\n label: \"Value\",\n connectorText: \"radius miles from\",\n button: \"Select location\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a positive number.\",\n },\n },\n text: {\n label: \"Value\",\n placeholder: \"Enter value...\",\n validation: {\n required: \"The value is required.\",\n },\n },\n boolean: {\n label: \"Value\",\n placeholder: \"Enter value\",\n options: {\n true: \"True\",\n false: \"False\",\n },\n },\n numeric: {\n label: \"Value\",\n placeholder: \"Enter value\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a number.\",\n equal: \"Cannot be equal.\",\n greaterThan: \"Needs to be greater.\",\n },\n range: {\n leftLabel: \"From\",\n rightLabel: \"To\",\n },\n },\n datetime: {\n dateLabel: \"Date\",\n datePlaceholder: \"Select Date\",\n timeLabel: \"Time\",\n timePlaceholder: \"Select Time\",\n startDateLabel: \"Start Date\",\n startDatePlaceholder: \"Select Start Date\",\n startTimeLabel: \"Start Time\",\n startTimePlaceholder: \"Select Start Time\",\n endDateLabel: \"End Date\",\n endDatePlaceholder: \"Select End Date\",\n endTimeLabel: \"End Time\",\n endTimePlaceholder: \"Select End Time\",\n validation: {\n required: \"The value is required.\",\n invalidInterval: \"End date and time must be after start date and time.\",\n },\n },\n },\n delete: {\n ariaLabel: \"Remove condition\",\n tooltip: \"Remove condition\",\n dialogTitle: \"Remove condition?\",\n dialogMessage:\n \"Are you sure you want to remove the condition? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n group: {\n delete: {\n ariaLabel: \"Remove group\",\n tooltip: \"Remove group\",\n dialogTitle: \"Remove group?\",\n dialogMessage: \"Are you sure you want to remove the group? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n reset: {\n ariaLabel: \"Change operator\",\n tooltip: \"Change operator query\",\n dialogTitle: \"Change conditional operator?\",\n dialogMessage:\n \"Do you want to change conditional operator? You won't be able to undo this operation. Conditions and/or groups will be removed.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n addRule: {\n label: \"Add condition\",\n },\n addGroup: {\n label: \"Add group\",\n },\n },\n empty: {\n title: \"No conditions created yet\",\n createCondition: \"Create a condition\",\n createGroup: \"condition group\",\n spacer: \" or a \",\n },\n};\n\nexport default createContext({\n dispatchAction: () => ({}),\n askAction: () => ({}),\n selectLocation: () => ({}),\n attributes: {},\n operators: defaultOperators,\n combinators: defaultCombinators,\n maxDepth: 1,\n labels: defaultLabels,\n initialTouched: false,\n});\n"],"mappings":";;;;;;;AA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AAvHa,CAAtB;;4BA+He,0BAAc;EAC3BC,cAAc,EAAE;IAAA,OAAO,EAAP;EAAA,CADW;EAE3BC,SAAS,EAAE;IAAA,OAAO,EAAP;EAAA,CAFgB;EAG3BC,cAAc,EAAE;IAAA,OAAO,EAAP;EAAA,CAHW;EAI3BC,UAAU,EAAE,EAJe;EAK3BC,SAAS,EAAEnE,gBALgB;EAM3BI,WAAW,EAAEK,kBANc;EAO3B2D,QAAQ,EAAE,CAPiB;EAQ3BC,MAAM,EAAE1D,aARmB;EAS3B2D,cAAc,EAAE;AATW,CAAd,C"}
1
+ {"version":3,"file":"Context.js","names":["defaultOperators","numeric","operator","label","combinators","text","textarea","boolean","dateandtime","defaultCombinators","operand","defaultLabels","query","delete","ariaLabel","tooltip","dialogTitle","dialogMessage","dialogConfirm","dialogCancel","dialogCloseTooltip","rule","attribute","placeholder","exists","value","distance","connectorText","button","validation","required","invalid","options","true","false","equal","greaterThan","range","leftLabel","rightLabel","datetime","dateLabel","datePlaceholder","timeLabel","timePlaceholder","startDateLabel","startDatePlaceholder","startTimeLabel","startTimePlaceholder","endDateLabel","endDatePlaceholder","endTimeLabel","endTimePlaceholder","invalidInterval","group","reset","addRule","addGroup","empty","title","createCondition","createGroup","spacer","dispatchAction","askAction","selectLocation","attributes","operators","maxDepth","labels","initialTouched"],"sources":["../../src/QueryBuilder/Context.js"],"sourcesContent":["import { createContext } from \"react\";\n\nexport const defaultOperators = {\n numeric: [\n {\n operator: \"greaterThan\",\n label: \"Greater than (>)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than (<)\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to (=)\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to (>=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to (<=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to (!=)\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n text: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n textarea: [\n {\n operator: \"equals\",\n label: \"Equals\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"equalsIgnoreCase\",\n label: \"Equals Ignore Case\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"Contains\",\n label: \"Contains\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"StartsWith\",\n label: \"A string begins with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"EndsWith\",\n label: \"A string ends with\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"IsNotEmpty\",\n label: \"Is Not empty\",\n combinators: [\"and\"],\n },\n {\n operator: \"IsNot\",\n label: \"Is Not\",\n combinators: [\"and\"],\n },\n {\n operator: \"Empty\",\n label: \"Empty\",\n combinators: [\"and\"],\n },\n ],\n boolean: [\n {\n operator: \"equalsTo\",\n label: \"=\",\n combinators: [\"and\", \"or\"],\n },\n ],\n dateandtime: [\n {\n operator: \"greaterThan\",\n label: \"Greater than\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThan\",\n label: \"Less than\",\n combinators: [\"and\"],\n },\n {\n operator: \"equalsTo\",\n label: \"Equal to\",\n combinators: [\"and\", \"or\"],\n },\n {\n operator: \"greaterThanEq\",\n label: \"Greater than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"lessThanEq\",\n label: \"Less than or equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"notEqual\",\n label: \"Not equal to\",\n combinators: [\"and\"],\n },\n {\n operator: \"range\",\n label: \"Range\",\n combinators: [\"and\"],\n },\n ],\n};\n\nexport const defaultCombinators = [\n { operand: \"and\", label: \"AND\" },\n { operand: \"or\", label: \"OR\" },\n];\n\nexport const defaultLabels = {\n query: {\n delete: {\n ariaLabel: \"Reset query\",\n tooltip: \"Reset query\",\n dialogTitle: \"Remove all conditions?\",\n dialogMessage:\n \"Are you sure you want to remove all the conditions? They will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n rule: {\n attribute: {\n label: \"Attribute\",\n placeholder: \"Select attribute...\",\n exists: \"Attribute already exists.\",\n },\n operator: {\n label: \"Operator\",\n placeholder: \"Select operator...\",\n },\n value: {\n distance: {\n label: \"Value\",\n connectorText: \"radius miles from\",\n button: \"Select location\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a positive number.\",\n },\n },\n text: {\n label: \"Value\",\n placeholder: \"Enter value...\",\n validation: {\n required: \"The value is required.\",\n },\n },\n boolean: {\n label: \"Value\",\n placeholder: \"Enter value\",\n options: {\n true: \"True\",\n false: \"False\",\n },\n },\n numeric: {\n label: \"Value\",\n placeholder: \"Enter value\",\n validation: {\n required: \"The value is required.\",\n invalid: \"Value must be a number.\",\n equal: \"Cannot be equal.\",\n greaterThan: \"Needs to be greater.\",\n },\n range: {\n leftLabel: \"From\",\n rightLabel: \"To\",\n },\n },\n datetime: {\n dateLabel: \"Date\",\n datePlaceholder: \"Select Date\",\n timeLabel: \"Time\",\n timePlaceholder: \"Select Time\",\n startDateLabel: \"Start Date\",\n startDatePlaceholder: \"Select Start Date\",\n startTimeLabel: \"Start Time\",\n startTimePlaceholder: \"Select Start Time\",\n endDateLabel: \"End Date\",\n endDatePlaceholder: \"Select End Date\",\n endTimeLabel: \"End Time\",\n endTimePlaceholder: \"Select End Time\",\n validation: {\n required: \"The value is required.\",\n invalidInterval: \"End date and time must be after start date and time.\",\n },\n },\n },\n delete: {\n ariaLabel: \"Remove condition\",\n tooltip: \"Remove condition\",\n dialogTitle: \"Remove condition?\",\n dialogMessage:\n \"Are you sure you want to remove the condition? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n },\n group: {\n delete: {\n ariaLabel: \"Remove group\",\n tooltip: \"Remove group\",\n dialogTitle: \"Remove group?\",\n dialogMessage: \"Are you sure you want to remove the group? It will be removed permanently.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n reset: {\n ariaLabel: \"Change operator\",\n tooltip: \"Change operator query\",\n dialogTitle: \"Change conditional operator?\",\n dialogMessage:\n \"Do you want to change conditional operator? You won't be able to undo this operation. Conditions and/or groups will be removed.\",\n dialogConfirm: \"Yes\",\n dialogCancel: \"No\",\n dialogCloseTooltip: \"Close\",\n },\n addRule: {\n label: \"Add condition\",\n },\n addGroup: {\n label: \"Add group\",\n },\n },\n empty: {\n title: \"No conditions created yet\",\n createCondition: \"Create a condition\",\n createGroup: \"condition group\",\n spacer: \" or a \",\n },\n};\n\nexport default createContext({\n dispatchAction: () => ({}),\n askAction: () => ({}),\n selectLocation: () => ({}),\n attributes: {},\n operators: defaultOperators,\n combinators: defaultCombinators,\n maxDepth: 1,\n labels: defaultLabels,\n initialTouched: false,\n});\n"],"mappings":";;;;;;;AAAA;;AAEO,IAAMA,gBAAgB,GAAG;EAC9BC,OAAO,EAAE,CACP;IACEC,QAAQ,EAAE,aADZ;IAEEC,KAAK,EAAE,kBAFT;IAGEC,WAAW,EAAE,CAAC,KAA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A,CAFgB;EAG3BC,cAAc,EAAE;IAAA,OAAO,EAAP;EAAA,CAHW;EAI3BC,UAAU,EAAE,EAJe;EAK3BC,SAAS,EAAEnE,gBALgB;EAM3BI,WAAW,EAAEK,kBANc;EAO3B2D,QAAQ,EAAE,CAPiB;EAQ3BC,MAAM,EAAE1D,aARmB;EAS3B2D,cAAc,EAAE;AATW,CAAd,C"}
@@ -79,6 +79,7 @@ var Value = function Value(_ref) {
79
79
 
80
80
  case "text":
81
81
  case "textarea":
82
+ default:
82
83
  {
83
84
  return /*#__PURE__*/_react.default.createElement(_TextValue.default, {
84
85
  id: id,
@@ -96,11 +97,6 @@ var Value = function Value(_ref) {
96
97
  initialTouched: initialTouched
97
98
  });
98
99
  }
99
-
100
- default:
101
- {
102
- return null;
103
- }
104
100
  }
105
101
  };
106
102
 
@@ -1 +1 @@
1
- {"version":3,"file":"Value.js","names":["Value","id","attribute","operator","valueProp","value","context","React","useContext","Context","attributes","initialTouched","type","propTypes","PropTypes","number","string","any","memo"],"sources":["../../../../src/QueryBuilder/Rule/Value/Value.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Context from \"../../Context\";\nimport BooleanValue from \"./BooleanValue\";\nimport NumericValue from \"./NumericValue\";\nimport TextValue from \"./TextValue\";\nimport DateTimeValue from \"./DateTimeValue\";\n\nconst Value = ({ id, attribute, operator, value: valueProp }) => {\n const context = React.useContext(Context);\n const { attributes, initialTouched } = context;\n const { type } = attribute ? { ...attributes[attribute] } : { type: null };\n\n switch (type) {\n case \"boolean\": {\n return <BooleanValue id={id} value={!!valueProp} initialTouched={initialTouched} />;\n }\n case \"numeric\": {\n return (\n <NumericValue\n id={id}\n operator={operator}\n value={valueProp}\n initialTouched={initialTouched}\n />\n );\n }\n case \"text\":\n case \"textarea\": {\n return <TextValue id={id} value={valueProp} initialTouched={initialTouched} />;\n }\n case \"dateandtime\": {\n return (\n <DateTimeValue\n id={id}\n operator={operator}\n value={valueProp}\n initialTouched={initialTouched}\n />\n );\n }\n default: {\n return null;\n }\n }\n};\n\nValue.propTypes = {\n id: PropTypes.number,\n attribute: PropTypes.string,\n operator: PropTypes.string,\n value: PropTypes.any,\n};\n\nexport default React.memo(Value);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAmD;EAAA,IAAhDC,EAAgD,QAAhDA,EAAgD;EAAA,IAA5CC,SAA4C,QAA5CA,SAA4C;EAAA,IAAjCC,QAAiC,QAAjCA,QAAiC;EAAA,IAAhBC,SAAgB,QAAvBC,KAAuB;;EAC/D,IAAMC,OAAO,GAAGC,eAAMC,UAAN,CAAiBC,gBAAjB,CAAhB;;EACA,IAAQC,UAAR,GAAuCJ,OAAvC,CAAQI,UAAR;EAAA,IAAoBC,cAApB,GAAuCL,OAAvC,CAAoBK,cAApB;;EACA,YAAiBT,SAAS,qBAAQQ,UAAU,CAACR,SAAD,CAAlB,IAAkC;IAAEU,IAAI,EAAE;EAAR,CAA5D;EAAA,IAAQA,IAAR,SAAQA,IAAR;;EAEA,QAAQA,IAAR;IACE,KAAK,SAAL;MAAgB;QACd,oBAAO,6BAAC,qBAAD;UAAc,EAAE,EAAEX,EAAlB;UAAsB,KAAK,EAAE,CAAC,CAACG,SAA/B;UAA0C,cAAc,EAAEO;QAA1D,EAAP;MACD;;IACD,KAAK,SAAL;MAAgB;QACd,oBACE,6BAAC,qBAAD;UACE,EAAE,EAAEV,EADN;UAEE,QAAQ,EAAEE,QAFZ;UAGE,KAAK,EAAEC,SAHT;UAIE,cAAc,EAAEO;QAJlB,EADF;MAQD;;IACD,KAAK,MAAL;IACA,KAAK,UAAL;MAAiB;QACf,oBAAO,6BAAC,kBAAD;UAAW,EAAE,EAAEV,EAAf;UAAmB,KAAK,EAAEG,SAA1B;UAAqC,cAAc,EAAEO;QAArD,EAAP;MACD;;IACD,KAAK,aAAL;MAAoB;QAClB,oBACE,6BAAC,sBAAD;UACE,EAAE,EAAEV,EADN;UAEE,QAAQ,EAAEE,QAFZ;UAGE,KAAK,EAAEC,SAHT;UAIE,cAAc,EAAEO;QAJlB,EADF;MAQD;;IACD;MAAS;QACP,OAAO,IAAP;MACD;EA9BH;AAgCD,CArCD;;AAuCA,wCAAAX,KAAK,CAACa,SAAN,GAAkB;EAChBZ,EAAE,EAAEa,mBAAUC,MADE;EAEhBb,SAAS,EAAEY,mBAAUE,MAFL;EAGhBb,QAAQ,EAAEW,mBAAUE,MAHJ;EAIhBX,KAAK,EAAES,mBAAUG;AAJD,CAAlB;;4BAOeV,eAAMW,IAAN,CAAWlB,KAAX,C"}
1
+ {"version":3,"file":"Value.js","names":["Value","id","attribute","operator","valueProp","value","context","React","useContext","Context","attributes","initialTouched","type","propTypes","PropTypes","number","string","any","memo"],"sources":["../../../../src/QueryBuilder/Rule/Value/Value.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport Context from \"../../Context\";\nimport BooleanValue from \"./BooleanValue\";\nimport NumericValue from \"./NumericValue\";\nimport TextValue from \"./TextValue\";\nimport DateTimeValue from \"./DateTimeValue\";\n\nconst Value = ({ id, attribute, operator, value: valueProp }) => {\n const context = React.useContext(Context);\n const { attributes, initialTouched } = context;\n const { type } = attribute ? { ...attributes[attribute] } : { type: null };\n\n switch (type) {\n case \"boolean\": {\n return <BooleanValue id={id} value={!!valueProp} initialTouched={initialTouched} />;\n }\n case \"numeric\": {\n return (\n <NumericValue\n id={id}\n operator={operator}\n value={valueProp}\n initialTouched={initialTouched}\n />\n );\n }\n case \"text\":\n case \"textarea\":\n default: {\n return <TextValue id={id} value={valueProp} initialTouched={initialTouched} />;\n }\n case \"dateandtime\": {\n return (\n <DateTimeValue\n id={id}\n operator={operator}\n value={valueProp}\n initialTouched={initialTouched}\n />\n );\n }\n }\n};\n\nValue.propTypes = {\n id: PropTypes.number,\n attribute: PropTypes.string,\n operator: Prop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AAK,EAAEC,SAHT;UAIE,cAAc,EAAEO;QAJlB,EADF;MAQD;EA5BH;AA8BD,CAnCD;;AAqCA,wCAAAX,KAAK,CAACa,SAAN,GAAkB;EAChBZ,EAAE,EAAEa,mBAAUC,MADE;EAEhBb,SAAS,EAAEY,mBAAUE,MAFL;EAGhBb,QAAQ,EAAEW,mBAAUE,MAHJ;EAIhBX,KAAK,EAAES,mBAAUG;AAJD,CAAlB;;4BAOeV,eAAMW,IAAN,CAAWlB,KAAX,C"}
@@ -1,4 +1,5 @@
1
1
  export { default } from "./QueryBuilder";
2
2
 
3
3
  export * from "./QueryBuilder";
4
+ export { defaultCombinators, defaultLabels, defaultOperators } from "./Context";
4
5
  export * from "./types";
@@ -11,6 +11,26 @@ Object.defineProperty(exports, "default", {
11
11
  return _QueryBuilder.default;
12
12
  }
13
13
  });
14
+ Object.defineProperty(exports, "defaultCombinators", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _Context.defaultCombinators;
18
+ }
19
+ });
20
+ Object.defineProperty(exports, "defaultLabels", {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _Context.defaultLabels;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "defaultOperators", {
27
+ enumerable: true,
28
+ get: function get() {
29
+ return _Context.defaultOperators;
30
+ }
31
+ });
14
32
 
15
33
  var _QueryBuilder = _interopRequireDefault(require("./QueryBuilder"));
34
+
35
+ var _Context = require("./Context");
16
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/QueryBuilder/index.js"],"sourcesContent":["export { default } from \"./QueryBuilder\";\n"],"mappings":";;;;;;;;;;;;;;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/QueryBuilder/index.js"],"sourcesContent":["export { default } from \"./QueryBuilder\";\nexport { defaultCombinators, defaultLabels, defaultOperators } from \"./Context\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA"}
@@ -1,6 +1,6 @@
1
1
  import { StandardProps } from "@material-ui/core";
2
2
 
3
- export type HvTableClassKey = "root" | "stickyHeader" | "stickyColumns";
3
+ export type HvTableClassKey = "root" | "stickyHeader" | "stickyColumns" | "listRow";
4
4
 
5
5
  export interface HvTableProps
6
6
  extends StandardProps<React.TableHTMLAttributes<HTMLTableElement>, HvTableClassKey> {
@@ -20,6 +20,10 @@ export interface HvTableProps
20
20
  * Whether the `HvTable` has sticky columns.
21
21
  */
22
22
  stickyColumns?: boolean;
23
+ /**
24
+ * Variant of table.
25
+ */
26
+ variant?: "listrow" | "default";
23
27
  }
24
28
 
25
29
  export default function HvTable(props: HvTableProps): JSX.Element | null;
@@ -37,7 +37,7 @@ var _TableContext = _interopRequireDefault(require("./TableContext"));
37
37
 
38
38
  var _styles = _interopRequireDefault(require("./styles"));
39
39
 
40
- var _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns"];
40
+ var _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns", "variant"];
41
41
 
42
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
43
43
 
@@ -90,21 +90,26 @@ var HvTable = /*#__PURE__*/(0, _react.forwardRef)(function HvTable(props, ref) {
90
90
  stickyHeader = _props$stickyHeader === void 0 ? false : _props$stickyHeader,
91
91
  _props$stickyColumns = props.stickyColumns,
92
92
  stickyColumns = _props$stickyColumns === void 0 ? false : _props$stickyColumns,
93
+ _props$variant = props.variant,
94
+ variant = _props$variant === void 0 ? "default" : _props$variant,
93
95
  others = (0, _objectWithoutProperties2.default)(props, _excluded);
96
+ var containerRef = (0, _react.useRef)(ref);
94
97
  var components = (0, _react.useMemo)(function () {
95
98
  return computeTablePartComponents(component);
96
99
  }, [component]);
97
100
  var tableContext = (0, _react.useMemo)(function () {
98
101
  return {
99
- components: components
102
+ components: components,
103
+ variant: variant,
104
+ containerRef: containerRef
100
105
  };
101
- }, [components]);
106
+ }, [components, variant, containerRef]);
102
107
  return /*#__PURE__*/_react.default.createElement(_TableContext.default.Provider, {
103
108
  value: tableContext
104
109
  }, /*#__PURE__*/_react.default.createElement(components.Table, (0, _extends2.default)({
105
110
  ref: ref,
106
111
  role: component === defaultComponent ? null : "table",
107
- className: (0, _clsx.default)(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns)
112
+ className: (0, _clsx.default)(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns, variant !== "default" && classes.listRow)
108
113
  }, others)));
109
114
  });
110
115
  process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
@@ -136,6 +141,11 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
136
141
  */
137
142
  stickyColumns: _propTypes.default.bool,
138
143
 
144
+ /**
145
+ * Whether the `HvTable` has the list row styles or the default.
146
+ */
147
+ variant: _propTypes.default.oneOf(["listrow", "default"]),
148
+
139
149
  /**
140
150
  * A Jss Object used to override or extend the styles applied.
141
151
  */
@@ -153,7 +163,12 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
153
163
  /**
154
164
  * Styles applied to the component root class when it has sticky columns.
155
165
  */
156
- stickyColumns: _propTypes.default.string
166
+ stickyColumns: _propTypes.default.string,
167
+
168
+ /**
169
+ * Styles applied to the component root class when it has sticky columns.
170
+ */
171
+ listRow: _propTypes.default.string
157
172
  }).isRequired
158
173
  } : void 0;
159
174
 
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","names":["defaultComponent","computeTablePartComponents","rootComponent","Table","THead","TBody","Tr","Th","Td","HvTable","props","ref","classes","className","component","stickyHeader","stickyColumns","others","components","tableContext","root","propTypes","PropTypes","elementType","children","node","isRequired","string","bool","shape","styles","name"],"sources":["../../src/Table/Table.js"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"./TableContext\";\nimport styles from \"./styles\";\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A Table gathers relational data, it displays values arranged to allow quick numerical analysis\n * like comparison and sorting.\n *\n * **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection .\n * See the <a href=\"?id=lab-table-hooks--main&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n *\n * **PLEASE NOTE**: This Table implementation is still a WIP. There might be breaking changes.\n */\nconst HvTable = forwardRef(function HvTable(props, ref) {\n const {\n classes,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n ...others\n } = props;\n\n const components = useMemo(() => computeTablePartComponents(component), [component]);\n\n const tableContext = useMemo(() => ({ components }), [components]);\n\n return (\n <TableContext.Provider value={tableContext}>\n <components.Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={clsx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n },\n className\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n\nHvTable.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component: PropTypes.elementType,\n\n /**\n * Content to be rendered\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n\n /**\n * Whether the `HvTable` has a sticky header row.\n */\n stickyHeader: PropTypes.bool,\n /**\n * Whether the `HvTable` has sticky columns.\n */\n stickyColumns: PropTypes.bool,\n\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component root class when it has a sticky header.\n */\n stickyHeader: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n stickyColumns: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTable\" })(HvTable);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,OAAzB;;AAEA,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACC,aAAD,EAAmB;EACpD,IAAIA,aAAa,KAAK,OAAtB,EAA+B;IAC7B,OAAO;MACLC,KAAK,EAAE,OADF;MAELC,KAAK,EAAE,OAFF;MAGLC,KAAK,EAAE,OAHF;MAILC,EAAE,EAAE,IAJC;MAKLC,EAAE,EAAE,IALC;MAMLC,EAAE,EAAE;IANC,CAAP;EAQD;;EAED,OAAO;IACLL,KAAK,EAAED,aADF;IAELE,KAAK,EAAEF,aAFF;IAGLG,KAAK,EAAEH,aAHF;IAILI,EAAE,EAAEJ,aAJC;IAKLK,EAAE,EAAEL,aALC;IAMLM,EAAE,EAAEN;EANC,CAAP;AAQD,CApBD;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMO,OAAO,gBAAG,uBAAW,SAASA,OAAT,CAAiBC,KAAjB,EAAwBC,GAAxB,EAA6B;EACtD,IACEC,OADF,GAOIF,KAPJ,CACEE,OADF;EAAA,IAEEC,SAFF,GAOIH,KAPJ,CAEEG,SAFF;E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AUO,KAAV,CAAgB;IACvB;AACJ;AACA;IACIT,IAAI,EAAEE,mBAAUK,MAJO;;IAKvB;AACJ;AACA;IACIZ,YAAY,EAAEO,mBAAUK,MARD;;IASvB;AACJ;AACA;IACIX,aAAa,EAAEM,mBAAUK;EAZF,CAAhB,EAaND;AA5Ce,CAApB;;eA+Ce,sBAAWI,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAwCtB,OAAxC,C"}
1
+ {"version":3,"file":"Table.js","names":["defaultComponent","computeTablePartComponents","rootComponent","Table","THead","TBody","Tr","Th","Td","HvTable","props","ref","classes","className","component","stickyHeader","stickyColumns","variant","others","containerRef","components","tableContext","root","listRow","propTypes","PropTypes","elementType","children","node","isRequired","string","bool","oneOf","shape","styles","name"],"sources":["../../src/Table/Table.js"],"sourcesContent":["import React, { useRef, forwardRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"./TableContext\";\nimport styles from \"./styles\";\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A Table gathers relational data, it displays values arranged to allow quick numerical analysis\n * like comparison and sorting.\n *\n * **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection .\n * See the <a href=\"?id=lab-table-hooks--main&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n *\n * **PLEASE NOTE**: This Table implementation is still a WIP. There might be breaking changes.\n */\nconst HvTable = forwardRef(function HvTable(props, ref) {\n const {\n classes,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n variant = \"default\",\n ...others\n } = props;\n\n const containerRef = useRef(ref);\n\n const components = useMemo(() => computeTablePartComponents(component), [component]);\n\n const tableContext = useMemo(\n () => ({ components, variant, containerRef }),\n [components, variant, containerRef]\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n <components.Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={clsx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n [classes.listRow]: variant === \"listrow\",\n },\n className\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n\nHvTable.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component: PropTypes.elementType,\n /**\n * Content to be rendered\n */\n children: PropTypes.node.isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Whether the `HvTable` has a sticky header row.\n */\n stickyHeader: PropTypes.bool,\n /**\n * Whether the `HvTable` has sticky columns.\n */\n stickyColumns: PropTypes.bool,\n /**\n * Whether the `HvTable` has the list row styles or the default.\n */\n variant: PropTypes.oneOf([\"listrow\", \"default\"]),\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component root class when it has a sticky header.\n */\n stickyHeader: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n stickyColumns: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n listRow: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTable\" })(HvTable);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;AAEA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B;AACJ;AACA;IACIP,OAAO,EAAEE,mBAAUK;EAhBI,CAAhB,EAiBND;AAhDe,CAApB;;eAmDe,sBAAWK,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAwC1B,OAAxC,C"}
@@ -21,6 +21,8 @@ Object.defineProperty(exports, "__esModule", {
21
21
  });
22
22
  exports.default = void 0;
23
23
 
24
+ require("core-js/modules/es.array.map.js");
25
+
24
26
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
25
27
 
26
28
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
@@ -33,20 +35,25 @@ var _clsx = _interopRequireDefault(require("clsx"));
33
35
 
34
36
  var _core = require("@material-ui/core");
35
37
 
38
+ var _uikitReactCore = require("@hitachivantara/uikit-react-core");
39
+
40
+ var _Focus = _interopRequireDefault(require("@hitachivantara/uikit-react-core/dist/Focus"));
41
+
36
42
  var _TableContext = _interopRequireDefault(require("../TableContext"));
37
43
 
38
44
  var _TableSectionContext = _interopRequireDefault(require("../TableSectionContext"));
39
45
 
40
46
  var _styles = _interopRequireDefault(require("./styles"));
41
47
 
42
- var _excluded = ["classes", "className", "component"];
48
+ var _excluded = ["classes", "className", "component", "children", "withNavigation"];
43
49
 
44
50
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
51
 
46
52
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
47
53
 
48
54
  var tableSectionContext = {
49
- type: "body"
55
+ type: "body",
56
+ filterClassName: "grid"
50
57
  };
51
58
  var defaultComponent = "tbody";
52
59
  /**
@@ -54,22 +61,38 @@ var defaultComponent = "tbody";
54
61
  * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles
55
62
  */
56
63
 
57
- var HvTableBody = /*#__PURE__*/(0, _react.forwardRef)(function HvTableBody(props, ref) {
64
+ var HvTableBody = /*#__PURE__*/(0, _react.forwardRef)(function HvTableBody(props, externalRef) {
58
65
  var _tableContext$compone;
59
66
 
60
67
  var classes = props.classes,
61
68
  className = props.className,
62
69
  component = props.component,
70
+ children = props.children,
71
+ _props$withNavigation = props.withNavigation,
72
+ withNavigation = _props$withNavigation === void 0 ? false : _props$withNavigation,
63
73
  others = (0, _objectWithoutProperties2.default)(props, _excluded);
64
74
  var tableContext = (0, _react.useContext)(_TableContext.default);
75
+ var bodyRef = (0, _react.useRef)(null);
76
+ var handleRef = (0, _uikitReactCore.useForkRef)(externalRef, bodyRef);
65
77
  var Component = component || (tableContext === null || tableContext === void 0 ? void 0 : (_tableContext$compone = tableContext.components) === null || _tableContext$compone === void 0 ? void 0 : _tableContext$compone.TBody) || defaultComponent;
66
78
  return /*#__PURE__*/_react.default.createElement(_TableSectionContext.default.Provider, {
67
79
  value: tableSectionContext
68
80
  }, /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
69
81
  className: (0, _clsx.default)(classes.root, className),
70
- ref: ref,
82
+ ref: handleRef,
71
83
  role: Component === defaultComponent ? null : "rowgroup"
72
- }, others)));
84
+ }, others), withNavigation ? children.map(function (element) {
85
+ return /*#__PURE__*/_react.default.createElement(_Focus.default, {
86
+ rootRef: bodyRef,
87
+ key: "row-".concat(element.key),
88
+ strategy: "grid",
89
+ useArrows: "true",
90
+ filterClass: tableSectionContext.filterClassName,
91
+ navigationJump: 1,
92
+ focusDisabled: false,
93
+ selected: element.props.selected
94
+ }, element);
95
+ }) : children));
73
96
  });
74
97
  process.env.NODE_ENV !== "production" ? HvTableBody.propTypes = {
75
98
  /**
@@ -88,6 +111,11 @@ process.env.NODE_ENV !== "production" ? HvTableBody.propTypes = {
88
111
  */
89
112
  component: _propTypes.default.elementType,
90
113
 
114
+ /**
115
+ * Sets whether or not there should be arrow navigation between the table rows
116
+ */
117
+ withNavigation: _propTypes.default.bool,
118
+
91
119
  /**
92
120
  * A Jss Object used to override or extend the styles applied.
93
121
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.js","names":["tableSectionContext","type","defaultComponent","HvTableBody","props","ref","classes","className","component","others","tableContext","TableContext","Component","components","TBody","root","propTypes","PropTypes","string","children","node","elementType","shape","isRequired","styles","name"],"sources":["../../../src/Table/TableBody/TableBody.js"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport styles from \"./styles\";\n\nconst tableSectionContext = {\n type: \"body\",\n};\n\nconst defaultComponent = \"tbody\";\n\n/**\n * HvTableBody acts as a `tbody` element.\n * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles\n */\nconst HvTableBody = forwardRef(function HvTableBody(props, ref) {\n const { classes, className, component, ...others } = props;\n\n const tableContext = useContext(TableContext);\n\n const Component = component || tableContext?.components?.TBody || defaultComponent;\n\n return (\n <TableSectionContext.Provider value={tableSectionContext}>\n <Component\n className={clsx(classes.root, className)}\n ref={ref}\n role={Component === defaultComponent ? null : \"rowgroup\"}\n {...others}\n />\n </TableSectionContext.Provider>\n );\n});\n\nHvTableBody.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tbody.\n */\n component: PropTypes.elementType,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableBody\" })(HvTableBody);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,mBAAmB,GAAG;EAC1BC,IAAI,EAAE;AADoB,CAA5B;AAIA,IAAMC,gBAAgB,GAAG,OAAzB;AAEA;AACA;AACA;AACA;;AACA,IAAMC,WAAW,gBAAG,uBAAW,SAASA,WAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;EAAA;;EAC9D,IAAQC,OAAR,GAAqDF,KAArD,CAAQE,OAAR;EAAA,IAAiBC,SAAjB,GAAqDH,KAArD,CAAiBG,SAAjB;EAAA,IAA4BC,SAA5B,GAAqDJ,KAArD,CAA4BI,SAA5B;EAAA,IAA0CC,MAA1C,0CAAqDL,KAArD;EAEA,IAAMM,YAAY,GAAG,uBAAWC,qBAAX,CAArB;EAEA,IAAMC,SAAS,GAAGJ,SAAS,KAAIE,YAAJ,aAAIA,YAAJ,gDAAIA,YAAY,CAAEG,UAAlB,0DAAI,sBAA0BC,KAA9B,CAAT,IAAgDZ,gBAAlE;EAEA,oBACE,6BAAC,4BAAD,CAAqB,QAArB;IAA8B,KAAK,EAAEF;EAArC,gBACE,6BAAC,SAAD;IACE,SAAS,EAAE,mBAAKM,OAAO,CAACS,IAAb,EAAmBR,SAAnB,CADb;IAEE,GAAG,EAAEF,GAFP;IAGE,IAAI,EAAEO,SAAS,KAAKV,gBAAd,GAAiC,IAAjC,GAAwC;EAHhD,GAIMO,MAJN,EADF,CADF;AAUD,CAjBmB,CAApB;AAmBA,wCAAAN,WAAW,CAACa,SAAZ,GAAwB;EACtB;AACF;AACA;EACET,SAAS,EAAEU,mBAAUC,MAJC;;EAKtB;AACF;AACA;EACEC,QAAQ,EAAEF,mBAAUG,IARE;;EAStB;AACF;AACA;AACA;EACEZ,SAAS,EAAES,mBAAUI,WAbC;;EActB;AACF;AACA;EACEf,OAAO,EAAEW,mBAAUK,KAAV,CAAgB;IACvB;AACJ;AACA;IACIP,IAAI,EAAEE,mBAAUC;EAJO,CAAhB,EAKNK;AAtBmB,CAAxB;;eAyBe,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA4CtB,WAA5C,C"}
1
+ {"version":3,"file":"TableBody.js","names":["tableSectionContext","type","filterClassName","defaultComponent","HvTableBody","props","externalRef","classes","className","component","children","withNavigation","others","tableContext","TableContext","bodyRef","handleRef","Component","components","TBody","root","map","element","key","selected","propTypes","PropTypes","string","node","elementType","bool","shape","isRequired","styles","name"],"sources":["../../../src/Table/TableBody/TableBody.js"],"sourcesContent":["import React, { forwardRef, useContext, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { useForkRef } from \"@hitachivantara/uikit-react-core\";\n\nimport Focus from \"@hitachivantara/uikit-react-core/dist/Focus\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport styles from \"./styles\";\n\nconst tableSectionContext = {\n type: \"body\",\n filterClassName: \"grid\",\n};\n\nconst defaultComponent = \"tbody\";\n\n/**\n * HvTableBody acts as a `tbody` element.\n * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles\n */\nconst HvTableBody = forwardRef(function HvTableBody(props, externalRef) {\n const { classes, className, component, children, withNavigation = false, ...others } = props;\n\n const tableContext = useContext(TableContext);\n\n const bodyRef = useRef(null);\n\n const handleRef = useForkRef(externalRef, bodyRef);\n\n const Component = component || tableContext?.components?.TBody || defaultComponent;\n\n return (\n <TableSectionContext.Provider value={tableSectionContext}>\n <Component\n className={clsx(classes.root, className)}\n ref={handleRef}\n role={Component === defaultComponent ? null : \"rowgroup\"}\n {...others}\n >\n {withNavigation\n ? children.map((element) => {\n return (\n <Focus\n rootRef={bodyRef}\n key={`row-${element.key}`}\n strategy=\"grid\"\n useArrows=\"true\"\n filterClass={tableSectionContext.filterClassName}\n navigationJump={1}\n focusDisabled={false}\n selected={element.props.selected}\n >\n {element}\n </Focus>\n );\n })\n : children}\n </Component>\n </TableSectionContext.Provider>\n );\n});\n\nHvTableBody.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tbody.\n */\n component: PropTypes.elementType,\n /**\n * Sets whether or not there should be arrow navigation between the table rows\n */\n withNavigation: PropTypes.bool,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableBody\" })(HvTableBody);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,mBAAmB,GAAG;EAC1BC,IAAI,EAAE,MADoB;EAE1BC,eAAe,EAAE;AAFS,CAA5B;AAKA,IAAMC,gBAAgB,GAAG,OAAzB;AAEA;AACA;AACA;AACA;;AACA,IAAMC,WAAW,gBAAG,uBAAW,SAASA,WAAT,CAAqBC,KAArB,EAA4BC,WAA5B,EAAyC;EAAA;;EACtE,IAAQC,OAAR,GAAuFF,KAAvF,CAAQE,OAAR;EAAA,IAAiBC,SAAjB,GAAuFH,KAAvF,CAAiBG,SAAjB;EAAA,IAA4BC,SAA5B,GAAuFJ,KAAvF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jB,SAAS,EAAEkB,mBAAUC,MAJC;;EAKtB;AACF;AACA;EACEjB,QAAQ,EAAEgB,mBAAUE,IARE;;EAStB;AACF;AACA;AACA;EACEnB,SAAS,EAAEiB,mBAAUG,WAbC;;EActB;AACF;AACA;EACElB,cAAc,EAAEe,mBAAUI,IAjBJ;;EAkBtB;AACF;AACA;EACEvB,OAAO,EAAEmB,mBAAUK,KAAV,CAAgB;IACvB;AACJ;AACA;IACIX,IAAI,EAAEM,mBAAUC;EAJO,CAAhB,EAKNK;AA1BmB,CAAxB;;eA6Be,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA4C9B,WAA5C,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","root","backgroundColor","position","zIndex"],"sources":["../../../src/Table/TableBody/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n backgroundColor: \"inherit\",\n\n position: \"relative\",\n zIndex: 0,\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE;MACJC,eAAe,EAAE,SADb;MAGJC,QAAQ,EAAE,UAHN;MAIJC,MAAM,EAAE;IAJJ;EADc,CAAP;AAAA,CAAf;;eASeJ,M"}
1
+ {"version":3,"file":"styles.js","names":["styles","root","backgroundColor","position","zIndex"],"sources":["../../../src/Table/TableBody/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n backgroundColor: \"inherit\",\n position: \"relative\",\n zIndex: 0,\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE;MACJC,eAAe,EAAE,SADb;MAEJC,QAAQ,EAAE,UAFN;MAGJC,MAAM,EAAE;IAHJ;EADc,CAAP;AAAA,CAAf;;eAQeJ,M"}
@@ -15,6 +15,8 @@ export type HvTableCellClassKey =
15
15
  | "variantCheckbox"
16
16
  | "variantExpand"
17
17
  | "variantActions"
18
+ | "variantListactions"
19
+ | "variantListcheckbox"
18
20
  | "variantNone"
19
21
  | "resizable"
20
22
  | "resizing";
@@ -38,7 +40,7 @@ export interface HvTableCellProps
38
40
  /**
39
41
  * Sets the cell's variant.
40
42
  */
41
- variant?: "checkbox" | "expand" | "actions" | "default" | "none";
43
+ variant?: "checkbox" | "expand" | "actions" | "default" | "listcheckbox" | "listactions" | "none";
42
44
 
43
45
  /**
44
46
  * Specify the cell type.
@@ -90,7 +90,7 @@ var HvTableCell = /*#__PURE__*/(0, _react.forwardRef)(function HvTableCell(props
90
90
  ref: ref,
91
91
  role: Component === defaultComponent ? null : "cell",
92
92
  style: style,
93
- className: (0, _clsx.default)(classes.root, classes[type], className, align !== "inherit" && classes["align".concat((0, _capitalize.default)(align))], variant !== "default" && classes["variant".concat((0, _capitalize.default)(variant))], sorted && classes.sorted, stickyColumn && classes.stickyColumn, stickyColumnMostLeft && classes.stickyColumnMostLeft, stickyColumnLeastRight && classes.stickyColumnLeastRight, groupColumnMostLeft && classes.groupColumnMostLeft, groupColumnMostRight && classes.groupColumnMostRight, resizable && classes.resizable, resizing && classes.resizing)
93
+ className: (0, _clsx.default)(classes.root, classes[type], className, align !== "inherit" && classes["align".concat((0, _capitalize.default)(align))], variant !== "default" && classes["variant".concat((0, _capitalize.default)(variant))], sorted && classes.sorted, stickyColumn && classes.stickyColumn, stickyColumnMostLeft && classes.stickyColumnMostLeft, stickyColumnLeastRight && classes.stickyColumnLeastRight, groupColumnMostLeft && classes.groupColumnMostLeft, groupColumnMostRight && classes.groupColumnMostRight, resizable && classes.resizable, resizing && classes.resizing, tableContext.variant === "listrow" && [classes.variantList, type !== "body" && classes.variantListHead])
94
94
  }, others), children);
95
95
  });
96
96
  process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
@@ -123,7 +123,7 @@ process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
123
123
  /**
124
124
  * Sets the cell's variant.
125
125
  */
126
- variant: _propTypes.default.oneOf(["checkbox", "expand", "actions", "default", "none"]),
126
+ variant: _propTypes.default.oneOf(["checkbox", "expand", "actions", "default", "listcheckbox", "listactions", "none"]),
127
127
 
128
128
  /**
129
129
  * Specify the cell's type.
@@ -266,6 +266,26 @@ process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
266
266
  */
267
267
  variantNone: _propTypes.default.string,
268
268
 
269
+ /**
270
+ * Styles applied to the component root when its variant is list
271
+ */
272
+ variantList: _propTypes.default.string,
273
+
274
+ /**
275
+ * Styles applied to the cell when its variant is list and actions.
276
+ */
277
+ variantListactions: _propTypes.default.string,
278
+
279
+ /**
280
+ * Styles applied to the cell when its variant is list and checkbox.
281
+ */
282
+ variantListcheckbox: _propTypes.default.string,
283
+
284
+ /**
285
+ * Styles applied to the cell when its variant is list and the type is head .
286
+ */
287
+ variantListHead: _propTypes.default.string,
288
+
269
289
  /**
270
290
  * Styles applied to the cell when it's part of a resizable column.
271
291
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","names":["defaultComponent","HvTableCell","props","ref","children","component","className","style","classes","align","variant","typeProp","type","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sorted","resizable","resizing","others","tableContext","TableContext","tableSectionContext","TableSectionContext","Component","components","Td","root","propTypes","PropTypes","elementType","node","string","instanceOf","Object","oneOf","bool","shape","head","body","footer","sortIcon","alignLeft","alignRight","alignCenter","alignJustify","variantCheckbox","variantExpand","variantActions","variantNone","isRequired","styles","name"],"sources":["../../../src/Table/TableCell/TableCell.js"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"td\";\n\n/**\n * `HvTableCell` acts as a `td` element and inherits styles from its context\n */\nconst HvTableCell = forwardRef(function HvTableCell(props, ref) {\n const {\n children,\n\n component,\n\n className,\n style,\n classes,\n\n align = \"inherit\",\n variant = \"default\",\n\n type: typeProp,\n\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n\n sorted = false,\n\n resizable = false,\n resizing = false,\n\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n\n const Component = component || tableContext?.components?.Td || defaultComponent;\n\n return (\n <Component\n ref={ref}\n role={Component === defaultComponent ? null : \"cell\"}\n style={style}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n\n [classes.sorted]: sorted,\n\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n },\n className\n )}\n {...others}\n >\n {children}\n </Component>\n );\n});\n\nHvTableCell.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to td.\n */\n component: PropTypes.elementType,\n\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Inline styles to be applied to the root element.\n */\n style: PropTypes.instanceOf(Object),\n\n /**\n * Set the text-align on the table cell content.\n */\n align: PropTypes.oneOf([\"center\", \"inherit\", \"justify\", \"left\", \"right\"]),\n /**\n * Sets the cell's variant.\n */\n variant: PropTypes.oneOf([\"checkbox\", \"expand\", \"actions\", \"default\", \"none\"]),\n\n /**\n * Specify the cell's type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n type: PropTypes.oneOf([\"body\", \"footer\", \"head\"]),\n\n /**\n * Whether or not the cell is part of a sorted column.\n */\n sorted: PropTypes.bool,\n\n /**\n * The cell is part of a sticky column.\n */\n stickyColumn: PropTypes.bool,\n /**\n * The cell is part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the first sticky to the right column.\n */\n stickyColumnLeastRight: PropTypes.bool,\n\n /**\n * The cell is part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.bool,\n\n /**\n * Whether or not the cell is resizable\n */\n resizable: PropTypes.bool,\n /**\n * Whether or not the cell is being resized\n */\n resizing: PropTypes.bool,\n\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's in the table head.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table body.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table footer.\n */\n footer: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a sticky column.\n */\n stickyColumn: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first right sticky column.\n */\n stickyColumnLeastRight: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a sorted column.\n */\n sorted: PropTypes.string,\n\n sortIcon: PropTypes.string,\n\n /**\n * Styles applied to the component root when it is left aligned\n */\n alignLeft: PropTypes.string,\n /**\n * Styles applied to the component root when it is right aligned\n */\n alignRight: PropTypes.string,\n /**\n * Styles applied to the component root when it is center aligned\n */\n alignCenter: PropTypes.string,\n /**\n * Styles applied to the component root when it is justified\n */\n alignJustify: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is checkbox\n */\n variantCheckbox: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is expand\n */\n variantExpand: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is actions\n */\n variantActions: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is none\n */\n variantNone: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a resizable column.\n */\n resizable: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizing column.\n */\n resizing: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableCell\" })(HvTableCell);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,WAAW,gBAAG,uBAAW,SAASA,WAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;EAAA;;EAC9D,IACEC,QADF,GA2BIF,KA3BJ,CACEE,QADF;EAAA,IAGEC,SAHF,GA2BIH,KA3BJ,CAGEG,SAHF;EAAA,IAKEC,SALF,GA2BIJ,KA3BJ,CAKEI,SALF;EAAA,IAMEC,KANF,GA2BIL,KA3BJ,CAMEK,KANF;EAAA,IAOEC,OAPF,GA2BIN,KA3BJ,CAOEM,OAPF;EAAA,mBA2BIN,KA3BJ,CASEO,KATF;EAAA,IASEA,KATF,6BASU,SATV;EAAA,qBA2BIP,KA3BJ,CAUEQ,OAVF;EAAA,IAUEA,OAVF,+BAUY,SAVZ;EAAA,IAYQC,QAZR,GA2BIT,KA3BJ,CAYEU,IAZF;EAAA,0BA2BIV,KA3BJ,CAcEW,YAdF;EAAA,IAcEA,YAdF,oCAciB,KAdjB;EAAA,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UG,MA3DA;;IA4DvB;AACJ;AACA;IACIa,YAAY,EAAEhB,mBAAUG,MA/DD;;IAgEvB;AACJ;AACA;IACIc,eAAe,EAAEjB,mBAAUG,MAnEJ;;IAoEvB;AACJ;AACA;IACIe,aAAa,EAAElB,mBAAUG,MAvEF;;IAwEvB;AACJ;AACA;IACIgB,cAAc,EAAEnB,mBAAUG,MA3EH;;IA4EvB;AACJ;AACA;IACIiB,WAAW,EAAEpB,mBAAUG,MA/EA;;IAiFvB;AACJ;AACA;IACIf,SAAS,EAAEY,mBAAUG,MApFE;;IAqFvB;AACJ;AACA;IACId,QAAQ,EAAEW,mBAAUG;EAxFG,CAAhB,EAyFNkB;AApKmB,CAAxB;;eAuKe,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA4CrD,WAA5C,C"}
1
+ {"version":3,"file":"TableCell.js","names":["defaultComponent","HvTableCell","props","ref","children","component","className","style","classes","align","variant","typeProp","type","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sorted","resizable","resizing","others","tableContext","TableContext","tableSectionContext","TableSectionContext","Component","components","Td","root","variantList","variantListHead","propTypes","PropTypes","elementType","node","string","instanceOf","Object","oneOf","bool","shape","head","body","footer","sortIcon","alignLeft","alignRight","alignCenter","alignJustify","variantCheckbox","variantExpand","variantActions","variantNone","variantListactions","variantListcheckbox","isRequired","styles","name"],"sources":["../../../src/Table/TableCell/TableCell.js"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"td\";\n\n/**\n * `HvTableCell` acts as a `td` element and inherits styles from its context\n */\nconst HvTableCell = forwardRef(function HvTableCell(props, ref) {\n const {\n children,\n\n component,\n\n className,\n style,\n classes,\n\n align = \"inherit\",\n variant = \"default\",\n\n type: typeProp,\n\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n\n sorted = false,\n\n resizable = false,\n resizing = false,\n\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n\n const Component = component || tableContext?.components?.Td || defaultComponent;\n\n return (\n <Component\n ref={ref}\n role={Component === defaultComponent ? null : \"cell\"}\n style={style}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n [classes.variantList]: tableContext.variant === \"listrow\",\n [classes.variantListHead]: tableContext.variant === \"listrow\" && type !== \"body\",\n [classes.sorted]: sorted,\n\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n },\n className\n )}\n {...others}\n >\n {children}\n </Component>\n );\n});\n\nHvTableCell.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to td.\n */\n component: PropTypes.elementType,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Inline styles to be applied to the root element.\n */\n style: PropTypes.instanceOf(Object),\n /**\n * Set the text-align on the table cell content.\n */\n align: PropTypes.oneOf([\"center\", \"inherit\", \"justify\", \"left\", \"right\"]),\n /**\n * Sets the cell's variant.\n */\n variant: PropTypes.oneOf([\n \"checkbox\",\n \"expand\",\n \"actions\",\n \"default\",\n \"listcheckbox\",\n \"listactions\",\n \"none\",\n ]),\n /**\n * Specify the cell's type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n type: PropTypes.oneOf([\"body\", \"footer\", \"head\"]),\n /**\n * Whether or not the cell is part of a sorted column.\n */\n sorted: PropTypes.bool,\n /**\n * The cell is part of a sticky column.\n */\n stickyColumn: PropTypes.bool,\n /**\n * The cell is part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the first sticky to the right column.\n */\n stickyColumnLeastRight: PropTypes.bool,\n /**\n * The cell is part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.bool,\n /**\n * Whether or not the cell is resizable\n */\n resizable: PropTypes.bool,\n /**\n * Whether or not the cell is being resized\n */\n resizing: PropTypes.bool,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table head.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table body.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table footer.\n */\n footer: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a sticky column.\n */\n stickyColumn: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first right sticky column.\n */\n stickyColumnLeastRight: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a sorted column.\n */\n sorted: PropTypes.string,\n\n sortIcon: PropTypes.string,\n /**\n * Styles applied to the component root when it is left aligned\n */\n alignLeft: PropTypes.string,\n /**\n * Styles applied to the component root when it is right aligned\n */\n alignRight: PropTypes.string,\n /**\n * Styles applied to the component root when it is center aligned\n */\n alignCenter: PropTypes.string,\n /**\n * Styles applied to the component root when it is justified\n */\n alignJustify: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is checkbox\n */\n variantCheckbox: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is expand\n */\n variantExpand: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is actions\n */\n variantActions: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is none\n */\n variantNone: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is list\n */\n variantList: PropTypes.string,\n /**\n * Styles applied to the cell when its variant is list and actions.\n */\n variantListactions: PropTypes.string,\n /**\n * Styles applied to the cell when its variant is list and checkbox.\n */\n variantListcheckbox: PropTypes.string,\n /**\n * Styles applied to the cell when its variant is list and the type is head .\n */\n variantListHead: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizable column.\n */\n resizable: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizing column.\n */\n resizing: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableCell\" })(HvTableCell);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,WAAW,gBAAG,uBAAW,SAASA,WAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;EAAA;;EAC9D,IACEC,QADF,GA2BIF,KA3BJ,CACEE,QADF;EAAA,IAGEC,SAHF,GA2BIH,KA3BJ,CAGEG,SAHF;EAAA,IAKEC,SALF,GA2BIJ,KA3BJ,CAKEI,SALF;EAAA,IAMEC,KANF,GA2BIL,KA3BJ,CAMEK,KANF;EAAA,IAOEC,OAPF,GA2BIN,KA3BJ,CAOEM,OAPF;EAAA,mBA2BIN,KA3BJ,CASEO,KATF;EAAA,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
99
+ "td&": {
100
+ height: 52
101
+ },
102
+ padding: "0, 0, 0, 32px",
103
+ border: 0
104
+ },
105
+ variantListHead: {
106
+ backgroundColor: "inherit",
107
+ "td&": {
108
+ height: 16
109
+ }
110
+ },
111
+ variantListactions: {
112
+ borderLeft: "solid 2px ".concat(theme.hv.palette.atmosphere.atmo2),
113
+ paddingLeft: "0",
114
+ textAlign: "center",
115
+ width: 130,
116
+ maxWidth: 130
117
+ },
118
+ variantListcheckbox: {
119
+ borderRight: "solid 2px ".concat(theme.hv.palette.atmosphere.atmo2),
120
+ padding: 0,
121
+ textAlign: "center",
122
+ width: 34,
123
+ maxWidth: 34
124
+ },
97
125
  stickyColumn: {
98
126
  position: "sticky",
99
127
  zIndex: 2,