@ethlete/query 4.0.1 → 4.1.0

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.
@@ -1178,6 +1178,7 @@ class QueryDirective {
1178
1178
  $implicit: null,
1179
1179
  etQuery: null,
1180
1180
  loading: false,
1181
+ refreshing: false,
1181
1182
  error: null,
1182
1183
  progress: null,
1183
1184
  };
@@ -1196,6 +1197,12 @@ class QueryDirective {
1196
1197
  this._subscription?.unsubscribe();
1197
1198
  this._subscription = null;
1198
1199
  if (!this.query) {
1200
+ this._viewContext.$implicit = null;
1201
+ this._viewContext.etQuery = null;
1202
+ this._viewContext.loading = false;
1203
+ this._viewContext.refreshing = false;
1204
+ this._viewContext.error = null;
1205
+ this._viewContext.progress = null;
1199
1206
  return;
1200
1207
  }
1201
1208
  const query = isQuery(this.query) ? this.query : this.query.query;
@@ -1206,9 +1213,11 @@ class QueryDirective {
1206
1213
  if (isQueryStateLoading(state)) {
1207
1214
  this._viewContext.loading = true;
1208
1215
  this._viewContext.progress = state.progress ?? null;
1216
+ this._viewContext.refreshing = state.meta.triggeredVia === 'auto' || state.meta.triggeredVia === 'poll';
1209
1217
  }
1210
1218
  else {
1211
1219
  this._viewContext.loading = false;
1220
+ this._viewContext.refreshing = false;
1212
1221
  this._viewContext.progress = null;
1213
1222
  }
1214
1223
  if (isQueryStateSuccess(state)) {