Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/react-query/es/core/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import _extends from "@babel/runtime/helpers/esm/extends";
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import { QueryObserver } from './queryObserver';
import { hasNextPage, hasPreviousPage, infiniteQueryBehavior } from './infiniteQueryBehavior';
export var InfiniteQueryObserver = /*#__PURE__*/function (_QueryObserver) {
_inheritsLoose(InfiniteQueryObserver, _QueryObserver);
// Type override
// Type override
// Type override
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
function InfiniteQueryObserver(client, options) {
return _QueryObserver.call(this, client, options) || this;
}
var _proto = InfiniteQueryObserver.prototype;
_proto.bindMethods = function bindMethods() {
_QueryObserver.prototype.bindMethods.call(this);
this.fetchNextPage = this.fetchNextPage.bind(this);
this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
};
_proto.setOptions = function setOptions(options) {
_QueryObserver.prototype.setOptions.call(this, _extends({}, options, {
behavior: infiniteQueryBehavior()
}));
};
_proto.getOptimisticResult = function getOptimisticResult(options) {
options.behavior = infiniteQueryBehavior();
return _QueryObserver.prototype.getOptimisticResult.call(this, options);
};
_proto.fetchNextPage = function fetchNextPage(options) {
return this.fetch({
cancelRefetch: true,
throwOnError: options == null ? void 0 : options.throwOnError,
meta: {
fetchMore: {
direction: 'forward',
pageParam: options == null ? void 0 : options.pageParam
}
}
});
};
_proto.fetchPreviousPage = function fetchPreviousPage(options) {
return this.fetch({
cancelRefetch: true,
throwOnError: options == null ? void 0 : options.throwOnError,
meta: {
fetchMore: {
direction: 'backward',
pageParam: options == null ? void 0 : options.pageParam
}
}
});
};
_proto.createResult = function createResult(query, options) {
var _state$data, _state$data2, _state$fetchMeta, _state$fetchMeta$fetc, _state$fetchMeta2, _state$fetchMeta2$fet;
var state = query.state;
var result = _QueryObserver.prototype.createResult.call(this, query, options);
return _extends({}, result, {
fetchNextPage: this.fetchNextPage,
fetchPreviousPage: this.fetchPreviousPage,
hasNextPage: hasNextPage(options, (_state$data = state.data) == null ? void 0 : _state$data.pages),
hasPreviousPage: hasPreviousPage(options, (_state$data2 = state.data) == null ? void 0 : _state$data2.pages),
isFetchingNextPage: state.isFetching && ((_state$fetchMeta = state.fetchMeta) == null ? void 0 : (_state$fetchMeta$fetc = _state$fetchMeta.fetchMore) == null ? void 0 : _state$fetchMeta$fetc.direction) === 'forward',
isFetchingPreviousPage: state.isFetching && ((_state$fetchMeta2 = state.fetchMeta) == null ? void 0 : (_state$fetchMeta2$fet = _state$fetchMeta2.fetchMore) == null ? void 0 : _state$fetchMeta2$fet.direction) === 'backward'
});
};
return InfiniteQueryObserver;
}(QueryObserver); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0255 ]-- |