@gisce/react-ooui 1.2.0-rc.49 → 1.2.0-rc.50

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.
@@ -22073,11 +22073,21 @@ const {
22073
22073
  }, getKeysWithoutChildsInFields = ({
22074
22074
  fields: e,
22075
22075
  keys: t
22076
- }) => [
22076
+ }) => splitAndSortKeys([
22077
22077
  ...new Set(
22078
- t.filter((r) => r.indexOf("/") === -1 ? !e["/"][r] : !e[getParentKey(r)]).map((r) => getParentKey(r)).sort((r, n) => r.split("/").length - n.split("/").length)
22078
+ t.filter((r) => {
22079
+ var n, a, o;
22080
+ if (r.indexOf("/") === -1)
22081
+ return !((n = e["/"]) != null && n[r]);
22082
+ {
22083
+ const s = getParentKey(r);
22084
+ console.log({ key: r, parentKey: s, fields: e });
22085
+ const u = (a = e == null ? void 0 : e[getParentKey(r)]) == null ? void 0 : a[r];
22086
+ return console.log({ exists: u }), !((o = e == null ? void 0 : e[getParentKey(r)]) != null && o[r]);
22087
+ }
22088
+ }).map((r) => getParentKey(r))
22079
22089
  )
22080
- ], retrieveKeyFieldsForPredefinedExports = async ({
22090
+ ]), retrieveKeyFieldsForPredefinedExports = async ({
22081
22091
  predefinedExports: e,
22082
22092
  fields: t,
22083
22093
  onGetFieldChilds: r
@@ -22097,7 +22107,21 @@ const {
22097
22107
  }) => e.map((r) => {
22098
22108
  const n = getChildKey(r), o = getFieldDefinition(r, t)[n];
22099
22109
  return isRelationField(o) ? `${r}/id` : r;
22100
- }), ExportModal = (e) => {
22110
+ }), splitAndSortKeys = (e) => {
22111
+ const t = /* @__PURE__ */ new Map(), r = [];
22112
+ for (const n of e) {
22113
+ const a = n.split("/");
22114
+ let o = "";
22115
+ for (const s of a) {
22116
+ const u = o ? `${o}/${s}` : s;
22117
+ t.has(u) || (r.push(u), t.set(u, !0)), o = u;
22118
+ }
22119
+ }
22120
+ return r.sort((n, a) => {
22121
+ const o = n.split("/").length, s = a.split("/").length;
22122
+ return o - s;
22123
+ }), r;
22124
+ }, ExportModal = (e) => {
22101
22125
  const {
22102
22126
  visible: t,
22103
22127
  locale: r,