@meshmakers/octo-ui 3.4.730 → 3.4.770

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.
@@ -5542,6 +5542,24 @@ class OctoGraphQlDataSource extends DataSourceTyped {
5542
5542
  set searchFilterAttributePaths(value) {
5543
5543
  this._searchFilterAttributePaths = value;
5544
5544
  }
5545
+ /**
5546
+ * The OctoMesh API rejects a page window that lies beyond the result set
5547
+ * with an INCOMPLETE_SLICE GraphQL error (e.g. a persisted page offset
5548
+ * combined with filters that now match fewer rows). Reporting it here lets
5549
+ * MmListViewDataBindingDirective recover by resetting to page 1 instead of
5550
+ * silently keeping the previous rows on screen.
5551
+ */
5552
+ isPageOutOfRangeError(error) {
5553
+ const graphQLErrors = error?.graphQLErrors;
5554
+ if (!graphQLErrors) {
5555
+ return false;
5556
+ }
5557
+ return graphQLErrors.some((e) => {
5558
+ const extensions = e?.extensions;
5559
+ const codes = Array.isArray(extensions?.['codes']) ? extensions['codes'] : [];
5560
+ return codes.includes('INCOMPLETE_SLICE') || extensions?.['code'] === 'INCOMPLETE_SLICE';
5561
+ });
5562
+ }
5545
5563
  // noinspection JSUnusedGlobalSymbols
5546
5564
  getFieldFilterDefinitions(state) {
5547
5565
  let fieldFilters = null;