diff --git a/cosmoz-data-nav.js b/cosmoz-data-nav.js index 37e03e8..5a7550d 100644 --- a/cosmoz-data-nav.js +++ b/cosmoz-data-nav.js @@ -4,6 +4,8 @@ import '@webcomponents/shadycss/entrypoints/apply-shim'; import '@polymer/paper-icon-button'; import '@polymer/paper-spinner/paper-spinner-lite'; +import { render } from 'lit-html'; + import { PolymerElement } from '@polymer/polymer/polymer-element'; import { html } from '@polymer/polymer/lib/utils/html-tag'; import { useShadow } from '@polymer/polymer/lib/utils/settings'; @@ -23,61 +25,15 @@ import '@neovici/cosmoz-page-router/cosmoz-page-location'; import { hauntedPolymer } from '@neovici/cosmoz-utils'; -import { useCache } from './lib/use-cache.js'; +import { useDataNav } from './lib/use-data-nav.js'; const _async = window.requestIdleCallback || window.requestAnimationFrame || window.setTimeout, _hasDeadline = 'IdleDeadline' in window, _asyncPeriod = (cb, timeout = 1500) => { _async(() => cb(), _hasDeadline && { timeout }); - }, - _doAsyncSteps = (steps, timeout) => { - const callStep = () => { - if (!Array.isArray(steps) || steps.length < 1) { - return; - } - const step = steps.shift(); - step(); - _asyncPeriod(callStep, timeout); - }; - return _asyncPeriod(callStep, timeout); }; -/** -`cosmoz-data-nav` provides a way to show each individual item of a list in a queue-style behavior -to the user. - -A list of `items` and a `