@crystaldesign/grid 25.2.0-rc.9 → 25.3.0-beta.10

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.
@@ -1605,7 +1605,8 @@ function BooleanCell (_ref) {
1605
1605
  var _useDivaCore = useDivaCore(),
1606
1606
  organization = _useDivaCore.state.organization;
1607
1607
  var stateValue = !!val;
1608
- if (column.dataType == 'organizationIdArray') {
1608
+ var isOrganizationIdArray = column.dataType == 'organizationIdArray' || column.type == 'organizationIdArray';
1609
+ if (isOrganizationIdArray) {
1609
1610
  if (Array.isArray(val)) {
1610
1611
  stateValue = val.includes(organization === null || organization === void 0 ? void 0 : organization._id);
1611
1612
  } else if (val && _typeof(val) == 'object' && 'organizations' in val) {
@@ -1635,19 +1636,22 @@ function BooleanCell (_ref) {
1635
1636
  var updatedData = _objectSpread$c({}, row.original);
1636
1637
  column.id.split('.').reduce(function (acc, key, index, arr) {
1637
1638
  if (index === arr.length - 1) {
1638
- if (column.dataType == 'organizationIdArray') {
1639
+ if (isOrganizationIdArray) {
1639
1640
  if (Array.isArray(acc[key])) {
1640
1641
  var _acc$key;
1641
1642
  acc[key] = (_acc$key = acc[key]) !== null && _acc$key !== void 0 ? _acc$key : [];
1642
1643
  acc[key] = acc[key].includes(organization === null || organization === void 0 ? void 0 : organization._id) ? acc[key].filter(function (id) {
1643
1644
  return id !== (organization === null || organization === void 0 ? void 0 : organization._id);
1644
1645
  }) : [].concat(_toConsumableArray(acc[key]), [organization === null || organization === void 0 ? void 0 : organization._id]);
1645
- } else if (acc[key] && _typeof(acc[key]) == 'object' && 'organizations' in acc[key]) {
1646
- var _acc$key$organization, _acc$key2;
1647
- acc[key].organizations = (_acc$key$organization = (_acc$key2 = acc[key]) === null || _acc$key2 === void 0 ? void 0 : _acc$key2.organizations) !== null && _acc$key$organization !== void 0 ? _acc$key$organization : [];
1648
- acc[key].organizations = acc[key].organizations.includes(organization === null || organization === void 0 ? void 0 : organization._id) ? acc[key].organizations.filter(function (id) {
1646
+ if (acc[key].length === 0) delete acc[key];
1647
+ } else if (acc && _typeof(acc) == 'object') {
1648
+ if (!Array.isArray(acc[key])) {
1649
+ acc[key] = [];
1650
+ }
1651
+ acc[key] = acc[key].includes(organization === null || organization === void 0 ? void 0 : organization._id) ? acc[key].filter(function (id) {
1649
1652
  return id !== (organization === null || organization === void 0 ? void 0 : organization._id);
1650
- }) : [].concat(_toConsumableArray(acc[key].organizations), [organization === null || organization === void 0 ? void 0 : organization._id]);
1653
+ }) : [].concat(_toConsumableArray(acc[key]), [organization === null || organization === void 0 ? void 0 : organization._id]);
1654
+ if (acc[key].length === 0) delete acc[key];
1651
1655
  } else {
1652
1656
  acc[key] = !value;
1653
1657
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanCell.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/cells/boolean/BooleanCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,MAAM,CAAC,OAAO,WAAW,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,qBAqF5H"}
1
+ {"version":3,"file":"BooleanCell.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/cells/boolean/BooleanCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,MAAM,CAAC,OAAO,WAAW,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,qBA0F5H"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/grid",
3
- "version": "25.2.0-rc.9",
3
+ "version": "25.3.0-beta.10",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@mui/x-date-pickers": "^7.22.0",
@@ -12,9 +12,9 @@
12
12
  "react-dom": "18.3.1"
13
13
  },
14
14
  "dependencies": {
15
- "@crystaldesign/content-box": "25.2.0-rc.9",
16
- "@crystaldesign/rtf-editor": "25.2.0-rc.9",
17
- "@crystaldesign/searchfield": "25.2.0-rc.9",
15
+ "@crystaldesign/content-box": "25.3.0-beta.10",
16
+ "@crystaldesign/rtf-editor": "25.3.0-beta.10",
17
+ "@crystaldesign/searchfield": "25.3.0-beta.10",
18
18
  "@hello-pangea/dnd": "^17.0.0",
19
19
  "@mui/icons-material": "^6.1.5",
20
20
  "@mui/lab": "^6.0.0-beta.13",
@@ -40,5 +40,5 @@
40
40
  },
41
41
  "module": "build/esm/index.js",
42
42
  "types": "./build/types/grid/src/index.d.ts",
43
- "gitHead": "13e792c390badc0b14805ce4b9bc6d8a17a3a22f"
43
+ "gitHead": "347bd6fcb9c89f8babfd7348f4cc6f51d261baf2"
44
44
  }