@servicetitan/table 19.4.0 → 20.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/dist/demo/index.js +3 -15
  2. package/dist/demo/index.js.map +1 -1
  3. package/dist/demo/master-detail/detail-table.js +15 -18
  4. package/dist/demo/master-detail/detail-table.js.map +1 -1
  5. package/dist/demo/master-detail/detail-table.store.js +14 -17
  6. package/dist/demo/master-detail/detail-table.store.js.map +1 -1
  7. package/dist/demo/master-detail/index.js +1 -13
  8. package/dist/demo/master-detail/index.js.map +1 -1
  9. package/dist/demo/master-detail/master-table.store.js +14 -17
  10. package/dist/demo/master-detail/master-table.store.js.map +1 -1
  11. package/dist/demo/master-detail/product-detail.js +1 -2
  12. package/dist/demo/master-detail/product-details.js +1 -4
  13. package/dist/demo/master-detail/product-details.js.map +1 -1
  14. package/dist/demo/master-detail/product.js +4 -7
  15. package/dist/demo/master-detail/product.js.map +1 -1
  16. package/dist/demo/master-detail/products.js +15 -18
  17. package/dist/demo/master-detail/products.js.map +1 -1
  18. package/dist/demo/master-detail/table-master-detail.js +13 -16
  19. package/dist/demo/master-detail/table-master-detail.js.map +1 -1
  20. package/dist/demo/overview/actions-cell.js +8 -11
  21. package/dist/demo/overview/actions-cell.js.map +1 -1
  22. package/dist/demo/overview/index.js +1 -13
  23. package/dist/demo/overview/index.js.map +1 -1
  24. package/dist/demo/overview/product.js +4 -7
  25. package/dist/demo/overview/product.js.map +1 -1
  26. package/dist/demo/overview/products.js +15 -18
  27. package/dist/demo/overview/products.js.map +1 -1
  28. package/dist/demo/overview/table.js +24 -27
  29. package/dist/demo/overview/table.js.map +1 -1
  30. package/dist/demo/overview/table.store.js +27 -30
  31. package/dist/demo/overview/table.store.js.map +1 -1
  32. package/dist/demo/state-caching/beverages.js +1 -4
  33. package/dist/demo/state-caching/beverages.js.map +1 -1
  34. package/dist/demo/state-caching/index.js +1 -13
  35. package/dist/demo/state-caching/index.js.map +1 -1
  36. package/dist/demo/state-caching/product.js +1 -2
  37. package/dist/demo/state-caching/products.js +1 -4
  38. package/dist/demo/state-caching/products.js.map +1 -1
  39. package/dist/demo/state-caching/state-caching-table.js +12 -15
  40. package/dist/demo/state-caching/state-caching-table.js.map +1 -1
  41. package/dist/demo/state-caching/state-caching-table.store.js +9 -12
  42. package/dist/demo/state-caching/state-caching-table.store.js.map +1 -1
  43. package/dist/editable-cell/boolean-editable-cell.js +7 -10
  44. package/dist/editable-cell/boolean-editable-cell.js.map +1 -1
  45. package/dist/editable-cell/date-editable-cell.js +7 -10
  46. package/dist/editable-cell/date-editable-cell.js.map +1 -1
  47. package/dist/editable-cell/get-action-cell.js +6 -10
  48. package/dist/editable-cell/get-action-cell.js.map +1 -1
  49. package/dist/editable-cell/get-editable-cell.js +6 -10
  50. package/dist/editable-cell/get-editable-cell.js.map +1 -1
  51. package/dist/editable-cell/get-select-editable-cell.js +9 -16
  52. package/dist/editable-cell/get-select-editable-cell.js.map +1 -1
  53. package/dist/editable-cell/index.js +7 -19
  54. package/dist/editable-cell/index.js.map +1 -1
  55. package/dist/editable-cell/numeric-editable-cell.js +7 -10
  56. package/dist/editable-cell/numeric-editable-cell.js.map +1 -1
  57. package/dist/editable-cell/text-editable-cell.js +10 -14
  58. package/dist/editable-cell/text-editable-cell.js.map +1 -1
  59. package/dist/export/export.js +5 -28
  60. package/dist/export/export.js.map +1 -1
  61. package/dist/export/index.js +1 -13
  62. package/dist/export/index.js.map +1 -1
  63. package/dist/filters/column-menu-filters.js +7 -12
  64. package/dist/filters/column-menu-filters.js.map +1 -1
  65. package/dist/filters/datetime-filter/datetime-filter.js +17 -39
  66. package/dist/filters/datetime-filter/datetime-filter.js.map +1 -1
  67. package/dist/filters/field-values-filter.js +21 -26
  68. package/dist/filters/field-values-filter.js.map +1 -1
  69. package/dist/filters/index.js +8 -20
  70. package/dist/filters/index.js.map +1 -1
  71. package/dist/filters/multiselect-filter.js +17 -23
  72. package/dist/filters/multiselect-filter.js.map +1 -1
  73. package/dist/filters/numeric-filter-extended/numeric-extended-operators.js +2 -6
  74. package/dist/filters/numeric-filter-extended/numeric-extended-operators.js.map +1 -1
  75. package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +13 -16
  76. package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +1 -1
  77. package/dist/filters/range-filter/range-filter.js +20 -45
  78. package/dist/filters/range-filter/range-filter.js.map +1 -1
  79. package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +16 -38
  80. package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +1 -1
  81. package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js +2 -6
  82. package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js.map +1 -1
  83. package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +12 -16
  84. package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +1 -1
  85. package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +8 -12
  86. package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +1 -1
  87. package/dist/filters/time-filter/time-filter.js +17 -39
  88. package/dist/filters/time-filter/time-filter.js.map +1 -1
  89. package/dist/index.js +8 -29
  90. package/dist/index.js.map +1 -1
  91. package/dist/select-cell/index.js +1 -13
  92. package/dist/select-cell/index.js.map +1 -1
  93. package/dist/select-cell/select-cell.js +10 -35
  94. package/dist/select-cell/select-cell.js.map +1 -1
  95. package/dist/table-state.js +63 -68
  96. package/dist/table-state.js.map +1 -1
  97. package/dist/table.js +35 -60
  98. package/dist/table.js.map +1 -1
  99. package/package.json +15 -14
@@ -1,44 +1,22 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
6
  };
20
- var __importStar = (this && this.__importStar) || function (mod) {
21
- if (mod && mod.__esModule) return mod;
22
- var result = {};
23
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
- __setModuleDefault(result, mod);
25
- return result;
26
- };
27
7
  var __metadata = (this && this.__metadata) || function (k, v) {
28
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
29
9
  };
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.TimeColumnMenuFilter = void 0;
32
- const jsx_runtime_1 = require("react/jsx-runtime");
33
- const react_1 = require("react");
34
- const mobx_react_1 = require("mobx-react");
35
- const mobx_1 = require("mobx");
36
- const kendo_react_dropdowns_1 = require("@progress/kendo-react-dropdowns");
37
- const kendo_react_dateinputs_1 = require("@progress/kendo-react-dateinputs");
38
- const filterCommon_1 = require("@progress/kendo-react-grid/dist/npm/filterCommon");
39
- const column_menu_filters_1 = require("../column-menu-filters");
40
- const Styles = __importStar(require("./time-filter.module.css"));
41
- let TimeFilterCell = class TimeFilterCell extends react_1.Component {
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ import { Component, Fragment } from 'react';
12
+ import { observer } from 'mobx-react';
13
+ import { observable, action, makeObservable } from 'mobx';
14
+ import { DropDownList } from '@progress/kendo-react-dropdowns';
15
+ import { TimePicker } from '@progress/kendo-react-dateinputs';
16
+ import { IsUnaryFilter, cellOperatorChange, } from '@progress/kendo-react-grid/dist/npm/filterCommon';
17
+ import { renderCustomColumnMenuFilter } from '../column-menu-filters';
18
+ import * as Styles from './time-filter.module.css';
19
+ let TimeFilterCell = class TimeFilterCell extends Component {
42
20
  constructor(props) {
43
21
  var _a;
44
22
  super(props);
@@ -54,7 +32,7 @@ let TimeFilterCell = class TimeFilterCell extends react_1.Component {
54
32
  writable: true,
55
33
  value: (event) => {
56
34
  this.operator = event.target.value;
57
- (0, filterCommon_1.cellOperatorChange)(event, this.props.value, this.props.onChange);
35
+ cellOperatorChange(event, this.props.value, this.props.onChange);
58
36
  }
59
37
  });
60
38
  Object.defineProperty(this, "handleChange", {
@@ -71,23 +49,23 @@ let TimeFilterCell = class TimeFilterCell extends react_1.Component {
71
49
  });
72
50
  }
73
51
  });
74
- (0, mobx_1.makeObservable)(this);
52
+ makeObservable(this);
75
53
  }
76
54
  render() {
77
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(kendo_react_dropdowns_1.DropDownList, { value: this.operator, onChange: this.handleOperatorChange, data: this.props.operators, dataItemKey: "operator", textField: "text" }, void 0), !(0, filterCommon_1.IsUnaryFilter)(this.operator.operator) && ((0, jsx_runtime_1.jsx)(kendo_react_dateinputs_1.TimePicker, { value: this.props.value, onChange: this.handleChange, className: Styles.timePicker }, void 0))] }, void 0));
55
+ return (_jsxs(Fragment, { children: [_jsx(DropDownList, { value: this.operator, onChange: this.handleOperatorChange, data: this.props.operators, dataItemKey: "operator", textField: "text" }, void 0), !IsUnaryFilter(this.operator.operator) && (_jsx(TimePicker, { value: this.props.value, onChange: this.handleChange, className: Styles.timePicker }, void 0))] }, void 0));
78
56
  }
79
57
  };
80
58
  __decorate([
81
- mobx_1.observable,
59
+ observable,
82
60
  __metadata("design:type", Object)
83
61
  ], TimeFilterCell.prototype, "operator", void 0);
84
62
  __decorate([
85
- mobx_1.action,
63
+ action,
86
64
  __metadata("design:type", Object)
87
65
  ], TimeFilterCell.prototype, "handleOperatorChange", void 0);
88
66
  TimeFilterCell = __decorate([
89
- mobx_react_1.observer,
67
+ observer,
90
68
  __metadata("design:paramtypes", [Object])
91
69
  ], TimeFilterCell);
92
- exports.TimeColumnMenuFilter = (0, column_menu_filters_1.renderCustomColumnMenuFilter)(TimeFilterCell, true);
70
+ export const TimeColumnMenuFilter = renderCustomColumnMenuFilter(TimeFilterCell, true);
93
71
  //# sourceMappingURL=time-filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time-filter.js","sourceRoot":"","sources":["../../../src/filters/time-filter/time-filter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA4C;AAE5C,2CAAsC;AACtC,+BAA0D;AAE1D,2EAAwF;AACxF,6EAAqF;AAErF,mFAG0D;AAI1D,gEAAsE;AAEtE,iEAAmD;AAGnD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,iBAA+B;IAKxD,YAAY,KAA2B;;QACnC,KAAK,CAAC,KAAK,CAAC,CAAC;QALL;;;;mBACR,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,mCAClE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;WAAC;QAQ5B;;;;mBAAuB,CAAC,KAA8B,EAAE,EAAE;gBACtD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;gBACnC,IAAA,iCAAkB,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACrE,CAAC;WAAC;QAEF;;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C;oBAChB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;oBAChF,QAAQ,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE;oBACnC,cAAc,EAAE,KAAK,CAAC,cAAc;iBACvC,CAAC,CAAC;YACP,CAAC;WAAC;QAjBE,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAkBD,MAAM;QACF,OAAO,CACH,MAAC,QAAQ,eACL,KAAC,YAAY,IACT,KAAK,EAAE,IAAI,CAAC,QAAQ,EACpB,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EACnC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC1B,WAAW,EAAC,UAAU,EACtB,SAAS,EAAC,MAAM,WAClB,EACD,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CACvC,KAAC,UAAU,IACP,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,SAAS,EAAE,MAAM,CAAC,UAAU,WAC9B,CACL,YACM,CACd,CAAC;IACN,CAAC;CACJ,CAAA;AA7Ce;IAAX,UAAU;;gDAEiB;AAQ5B;IADC,MAAM;;4DAIL;AAdA,cAAc;IADnB,QAAQ;;GACH,cAAc,CA8CnB;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,4BAA4B,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -1,30 +1,9 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.AsyncDataSource = exports.InMemoryDataSource = exports.TableNoRecords = exports.TableToolbar = exports.TableDetailRow = exports.TableCell = exports.TableColumnMenuFilter = exports.TableColumn = void 0;
14
- __exportStar(require("./table"), exports);
15
- __exportStar(require("./table-state"), exports);
16
- __exportStar(require("./editable-cell"), exports);
17
- __exportStar(require("./filters"), exports);
18
- __exportStar(require("./export"), exports);
19
- __exportStar(require("./select-cell"), exports);
20
- var design_system_1 = require("@servicetitan/design-system");
21
- Object.defineProperty(exports, "TableColumn", { enumerable: true, get: function () { return design_system_1.TableColumn; } });
22
- Object.defineProperty(exports, "TableColumnMenuFilter", { enumerable: true, get: function () { return design_system_1.TableColumnMenuFilter; } });
23
- Object.defineProperty(exports, "TableCell", { enumerable: true, get: function () { return design_system_1.TableCell; } });
24
- Object.defineProperty(exports, "TableDetailRow", { enumerable: true, get: function () { return design_system_1.TableDetailRow; } });
25
- Object.defineProperty(exports, "TableToolbar", { enumerable: true, get: function () { return design_system_1.TableToolbar; } });
26
- Object.defineProperty(exports, "TableNoRecords", { enumerable: true, get: function () { return design_system_1.TableNoRecords; } });
27
- var data_query_1 = require("@servicetitan/data-query");
28
- Object.defineProperty(exports, "InMemoryDataSource", { enumerable: true, get: function () { return data_query_1.InMemoryDataSource; } });
29
- Object.defineProperty(exports, "AsyncDataSource", { enumerable: true, get: function () { return data_query_1.AsyncDataSource; } });
1
+ export * from './table';
2
+ export * from './table-state';
3
+ export * from './editable-cell';
4
+ export * from './filters';
5
+ export * from './export';
6
+ export * from './select-cell';
7
+ export { TableColumn, TableColumnMenuFilter, TableCell, TableDetailRow, TableToolbar, TableNoRecords, } from '@servicetitan/design-system';
8
+ export { InMemoryDataSource, AsyncDataSource } from '@servicetitan/data-query';
30
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0CAAwB;AACxB,gDAA8B;AAC9B,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,gDAA8B;AAE9B,6DAiBqC;AAhBjC,4GAAA,WAAW,OAAA;AAGX,sHAAA,qBAAqB,OAAA;AAErB,0GAAA,SAAS,OAAA;AAIT,+GAAA,cAAc,OAAA;AAGd,6GAAA,YAAY,OAAA;AACZ,+GAAA,cAAc,OAAA;AAMlB,uDAAmG;AAAtE,gHAAA,kBAAkB,OAAA;AAAE,6GAAA,eAAe,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAE9B,OAAO,EACH,WAAW,EAGX,qBAAqB,EAErB,SAAS,EAIT,cAAc,EAGd,YAAY,EACZ,cAAc,GAGjB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAsB,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,14 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./select-cell"), exports);
1
+ export * from './select-cell';
14
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/select-cell/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/select-cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1,23 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
1
  var __rest = (this && this.__rest) || function (s, e) {
22
2
  var t = {};
23
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -29,32 +9,27 @@ var __rest = (this && this.__rest) || function (s, e) {
29
9
  }
30
10
  return t;
31
11
  };
32
- Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.SelectHeaderCell = exports.SelectColumnCell = exports.SelectCell = void 0;
34
- const jsx_runtime_1 = require("react/jsx-runtime");
35
- const design_system_1 = require("@servicetitan/design-system");
36
- const Styles = __importStar(require("./select-cell.module.css"));
37
- const SelectCell = (_a) => {
38
- var { selectionChange, control: Control = design_system_1.Checkbox } = _a, props = __rest(_a, ["selectionChange", "control"]);
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { Checkbox, } from '@servicetitan/design-system';
14
+ import * as Styles from './select-cell.module.css';
15
+ export const SelectCell = (_a) => {
16
+ var { selectionChange, control: Control = Checkbox } = _a, props = __rest(_a, ["selectionChange", "control"]);
39
17
  const onChange = (_0, _1, event) => {
40
18
  if (!selectionChange) {
41
19
  return;
42
20
  }
43
21
  selectionChange({ syntheticEvent: event });
44
22
  };
45
- return (0, jsx_runtime_1.jsx)(Control, Object.assign({ className: Styles.checkbox, onChange: onChange }, props), void 0);
23
+ return _jsx(Control, Object.assign({ className: Styles.checkbox, onChange: onChange }, props), void 0);
46
24
  };
47
- exports.SelectCell = SelectCell;
48
- const SelectColumnCell = (props) => {
25
+ export const SelectColumnCell = (props) => {
49
26
  if (props.rowType === 'groupHeader') {
50
27
  return null;
51
28
  }
52
29
  if (props.rowType === 'groupFooter') {
53
- return (0, jsx_runtime_1.jsx)("td", {}, void 0);
30
+ return _jsx("td", {}, void 0);
54
31
  }
55
- return ((0, jsx_runtime_1.jsx)("td", Object.assign({ style: props.style, className: props.className }, { children: (0, jsx_runtime_1.jsx)(exports.SelectCell, { checked: props.dataItem.selected, disabled: !props.isRowSelectable, selectionChange: props.selectionChange, indeterminate: props.dataItem.indeterminate, control: props.control }, void 0) }), void 0));
32
+ return (_jsx("td", Object.assign({ style: props.style, className: props.className }, { children: _jsx(SelectCell, { checked: props.dataItem.selected, disabled: !props.isRowSelectable, selectionChange: props.selectionChange, indeterminate: props.dataItem.indeterminate, control: props.control }, void 0) }), void 0));
56
33
  };
57
- exports.SelectColumnCell = SelectColumnCell;
58
- const SelectHeaderCell = (props) => ((0, jsx_runtime_1.jsx)(exports.SelectCell, { checked: props.selectionValue, indeterminate: props.isSomeRowsSelected, selectionChange: props.selectionChange, control: props.control }, void 0));
59
- exports.SelectHeaderCell = SelectHeaderCell;
34
+ export const SelectHeaderCell = (props) => (_jsx(SelectCell, { checked: props.selectionValue, indeterminate: props.isSomeRowsSelected, selectionChange: props.selectionChange, control: props.control }, void 0));
60
35
  //# sourceMappingURL=select-cell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-cell.js","sourceRoot":"","sources":["../../src/select-cell/select-cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+DAKqC;AACrC,iEAAmD;AAsB5C,MAAM,UAAU,GAAwB,CAAC,EAI9B,EAAE,EAAE;QAJ0B,EAC5C,eAAe,EACf,OAAO,EAAE,OAAO,GAAG,wBAAQ,OAEb,EADX,KAAK,cAHoC,8BAI/C,CADW;IAER,MAAM,QAAQ,GAAG,CAAC,EAAS,EAAE,EAAW,EAAE,KAAuC,EAAE,EAAE;QACjF,IAAI,CAAC,eAAe,EAAE;YAClB,OAAO;SACV;QACD,eAAe,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,OAAO,uBAAC,OAAO,kBAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAAM,KAAK,UAAI,CAAC;AAClF,CAAC,CAAC;AAbW,QAAA,UAAU,cAarB;AAEK,MAAM,gBAAgB,GAA8B,CAAC,KAA4B,EAAE,EAAE;IACxF,IAAI,KAAK,CAAC,OAAO,KAAK,aAAa,EAAE;QACjC,OAAO,IAAI,CAAC;KACf;IAED,IAAI,KAAK,CAAC,OAAO,KAAK,aAAa,EAAE;QACjC,OAAO,wCAAM,CAAC;KACjB;IAED,OAAO,CACH,6CAAI,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,gBAC9C,uBAAC,kBAAU,IACP,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAChC,QAAQ,EAAE,CAAC,KAAK,CAAC,eAA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