/*
* default property values
*/
const props = {
// the default spinner type
spinner: 'default',
// the default critical distance
distance: 100,
// the default force use infinite wrapper flag
forceUseInfiniteWrapper: false,
};
/**
* default system settings
*/
const system = {
// the default throttle space of time
throttleLimit: 50,
// the timeout for check infinite loop, unit: ms
loopCheckTimeout: 1000,
// the max allowed number of continuous calls, unit: ms
loopCheckMaxCalls: 10,
};
/**
* default slot messages
*/
const slots = {
noResults: 'No results :(',
noMore: 'No more data :)',
error: 'Opps, something went wrong :(',
errorBtnText: 'Retry',
spinner: '',
};
/**
* the 3rd argument for event bundler
* @see https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
*/
export const evt3rdArg = (() => {
let result = false;
try {
const arg = Object.defineProperty({}, 'passive', {
get() {
result = { passive: true };
return true;
},
});
window.addEventListener('testpassive', arg, arg);
window.remove('testpassive', arg, arg);
} catch (e) { /* */ }
return result;
})();
/**
* warning messages
*/
export const WARNINGS = {
STATE_CHANGER: [
'emit `loaded` and `complete` event through component instance of `$refs` may cause error, so it will be deprecated soon, please use the `$state` argument instead (`$state` just the special `$event` variable):',
'\ntemplate:',
'