How to use the @lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js.store.findItem function in @lrnwebcomponents/haxcms-elements

To help you get started, we’ve selected a few @lrnwebcomponents/haxcms-elements examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / ui-components / active-item / site-render-item.js View on Github external
_computeLocation(itemId, render) {
    if (itemId && render) {
      let item = store.findItem(itemId);
      // ensure it loads fresh
      return item.location + "?" + Math.floor(Date.now() / 1000);
    }
  }
  locationChanged(newValue) {
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / ui-components / magic / active-when-visible.js View on Github external
handleIntersectionCallback(entries) {
    for (let entry of entries) {
      if (Number(entry.intersectionRatio).toFixed(2) >= this.visibleLimit) {
        // now we care
        if (this.itemId) {
          let item = store.findItem(this.itemId);
          this._a = item.location
            .replace("pages/", "")
            .replace("/index.html", "");
          this.isVisible = true;
          setTimeout(() => {
            this.shadowRoot.querySelector("#a").click();
          }, 25);
        }
      }
    }
  }
}

@lrnwebcomponents/haxcms-elements

HAX CMS series of elements to provide a full on CMS

Apache-2.0
Latest version published 5 months ago

Package Health Score

69 / 100
Full package analysis

Popular @lrnwebcomponents/haxcms-elements functions