@servicetitan/table 28.5.0 → 28.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,13 +26,13 @@ const NumericExtFilterCell = ({ operators, operator = '', value, onChange, }) =>
26
26
  syntheticEvent: e.syntheticEvent,
27
27
  });
28
28
  const handleOperatorChange = (event) => {
29
- // set value to null when switching to unary operator
30
- const newValue = isNumericExtendedOperator(event.target.value.operator) ? null : value;
29
+ // set value to 0 when switching to unary operator to allow select
30
+ const newValue = isNumericExtendedOperator(event.target.value.operator) ? 0 : value;
31
31
  cellOperatorChange(event, newValue, onChange);
32
32
  };
33
33
  const isUnary = (typeof operator === 'string' && IsUnaryFilter(operator)) ||
34
34
  isNumericExtendedOperator(operator);
35
- return (_jsxs("div", { children: [_jsx(DropDownList, { className: "m-b-1", value: operatorValue, onChange: handleOperatorChange, data: operatorsExt, textField: "text" }), _jsx(NumericTextBox, { value: value, onChange: handleInputChange, disabled: isUnary, className: "m-b-1" })] }));
35
+ return (_jsxs("div", { children: [_jsx(DropDownList, { className: "m-b-1", value: operatorValue, onChange: handleOperatorChange, data: operatorsExt, textField: "text" }), _jsx(NumericTextBox, { value: isUnary ? null : value, onChange: handleInputChange, disabled: isUnary, className: "m-b-1" })] }));
36
36
  };
37
37
  const PercentageExtFilterCell = (_a) => {
38
38
  var { onChange, value } = _a, restProps = __rest(_a, ["onChange", "value"]);
@@ -1 +1 @@
1
- {"version":3,"file":"numeric-filter-extended.js","sourceRoot":"","sources":["../../../src/filters/numeric-filter-extended/numeric-filter-extended.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,OAAO,EAAE,cAAc,EAA6B,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,YAAY,EAA2B,MAAM,iCAAiC,CAAC;AAGxF,OAAO,EACH,aAAa,EACb,kBAAkB,GACrB,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,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B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAC,OAAO,GACnB,IACA,CACT,CAAC;AACN,CAAC,CAAC;AACF,MAAM,uBAAuB,GAAuC,CAAC,EAIpE,EAAE,EAAE;QAJgE,EACjE,QAAQ,EACR,KAAK,OAER,EADM,SAAS,cAHqD,qBAIpE,CADe;IAEZ,MAAM,iBAAiB,GAAG,CAAC,KAI1B,EAAE,EAAE;QACD,QAAQ,iCAAM,KAAK,KAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAG,CAAC;IACjF,CAAC,CAAC;IACF,OAAO,CACH,KAAC,oBAAoB,kBACjB,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,IAC9B,SAAS,EACf,CACL,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"numeric-filter-extended.js","sourceRoot":"","sources":["../../../src/filters/numeric-filter-extended/numeric-filter-extended.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,OAAO,EAAE,cAAc,EAA6B,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,YAAY,EAA2B,MAAM,iCAAiC,CAAC;AAGxF,OAAO,EACH,aAAa,EACb,kBAAkB,GACrB,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,EAAE;AAEF,4GAA4G;AAC5G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ACT,CAAC;AACN,CAAC,CAAC;AACF,MAAM,uBAAuB,GAAuC,CAAC,EAIpE,EAAE,EAAE;QAJgE,EACjE,QAAQ,EACR,KAAK,OAER,EADM,SAAS,cAHqD,qBAIpE,CADe;IAEZ,MAAM,iBAAiB,GAAG,CAAC,KAI1B,EAAE,EAAE;QACD,QAAQ,iCAAM,KAAK,KAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAG,CAAC;IACjF,CAAC,CAAC;IACF,OAAO,CACH,KAAC,oBAAoB,kBACjB,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,IAC9B,SAAS,EACf,CACL,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/table",
3
- "version": "28.5.0",
3
+ "version": "28.5.1",
4
4
  "description": "",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/table",
6
6
  "repository": {
@@ -28,9 +28,9 @@
28
28
  "@progress/kendo-react-grid": "~5.5.0",
29
29
  "@progress/kendo-react-inputs": "~5.5.0",
30
30
  "@progress/kendo-react-pdf": "~5.5.0",
31
- "@servicetitan/data-query": "^28.5.0",
31
+ "@servicetitan/data-query": "^28.5.1",
32
32
  "@servicetitan/design-system": "~14.5.1",
33
- "@servicetitan/form": "^28.5.0",
33
+ "@servicetitan/form": "^28.5.1",
34
34
  "@servicetitan/react-ioc": "^24.0.3",
35
35
  "@servicetitan/suppress-warnings": "^24.0.3",
36
36
  "@types/accounting": "~0.4.2",
@@ -49,9 +49,9 @@
49
49
  "@progress/kendo-react-grid": "~5.5.0",
50
50
  "@progress/kendo-react-inputs": "~5.5.0",
51
51
  "@progress/kendo-react-pdf": "~5.5.0",
52
- "@servicetitan/data-query": "^28.5.0",
52
+ "@servicetitan/data-query": "^28.5.1",
53
53
  "@servicetitan/design-system": ">=13.2.1",
54
- "@servicetitan/form": "^28.5.0",
54
+ "@servicetitan/form": "^28.5.1",
55
55
  "@servicetitan/react-ioc": ">21.0.0",
56
56
  "@servicetitan/suppress-warnings": ">21.0.0",
57
57
  "accounting": "~0.4.1",
@@ -68,5 +68,5 @@
68
68
  "cli": {
69
69
  "webpack": false
70
70
  },
71
- "gitHead": "6fa6090c540d952e22511579dd6d8f82938b8397"
71
+ "gitHead": "1820e5b017bb456161b9342d57a7a48efb362ccb"
72
72
  }
@@ -32,8 +32,8 @@ const NumericExtFilterCell: FC<TableColumnMenuFilterCellProps> = ({
32
32
  });
33
33
 
34
34
  const handleOperatorChange = (event: DropDownListChangeEvent) => {
35
- // set value to null when switching to unary operator
36
- const newValue = isNumericExtendedOperator(event.target.value.operator) ? null : value;
35
+ // set value to 0 when switching to unary operator to allow select
36
+ const newValue = isNumericExtendedOperator(event.target.value.operator) ? 0 : value;
37
37
  cellOperatorChange(event, newValue, onChange);
38
38
  };
39
39
 
@@ -51,7 +51,7 @@ const NumericExtFilterCell: FC<TableColumnMenuFilterCellProps> = ({
51
51
  textField="text"
52
52
  />
53
53
  <NumericTextBox
54
- value={value}
54
+ value={isUnary ? null : value}
55
55
  onChange={handleInputChange}
56
56
  disabled={isUnary}
57
57
  className="m-b-1"