@startinblox/core 2.0.1-beta.2 → 2.0.2-beta.1

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.
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { q as mergeContexts, n as normalizeContext, o as getRawContext } from "./helpers-dFpcGbvl.js";
5
- import { e as getStore, __tla as __tla_0 } from "./store-sU3CpiAU.js";
5
+ import { e as getStore, __tla as __tla_0 } from "./store-BUP_Lw_8.js";
6
6
  let CustomGetter;
7
7
  let __tla = Promise.all([
8
8
  (() => {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { g as getDefaultExportFromCjs, a as getStoreAsync, b as base_context, f as formatAttributesToServerPaginationOptions, m as mergeServerSearchOptions, c as formatAttributesToServerSearchOptions, d as commonjsGlobal, e as getStore, __tla as __tla_0 } from "./store-sU3CpiAU.js";
4
+ import { g as getDefaultExportFromCjs, a as getStoreAsync, b as base_context, f as formatAttributesToServerPaginationOptions, m as mergeServerSearchOptions, c as formatAttributesToServerSearchOptions, d as commonjsGlobal, e as getStore, __tla as __tla_0 } from "./store-BUP_Lw_8.js";
5
5
  import { d as defineComponent, n as normalizeContext, u as uniqID, e as evalTemplateString, a as doesResourceContainList, c as compare, p as parseFieldsString, f as findClosingBracketMatchIndex, g as generalComparator, b as fuzzyCompare, h as asyncQuerySelector, i as importInlineCSS, j as importCSS, t as transformArrayToContainer, s as setDeepProperty } from "./helpers-dFpcGbvl.js";
6
6
  import { k } from "./helpers-dFpcGbvl.js";
7
7
  let index$4, BaseWidgetMixin, index$3, CounterMixin, FederationMixin, FilterMixin, GrouperMixin, HighlighterMixin, ListMixin, NextMixin, PaginateMixin, RequiredMixin, Sib, SolidAcChecker, SolidDelete, SolidDisplay, SolidForm, SolidFormSearch, SolidLang, SolidMemberAdd, SolidMemberDelete, SolidMembership, SolidTable, SolidTemplateElement, SolidWidget, SorterMixin, StoreMixin, index$2, index$1, index, TranslationMixin, ValidationMixin, WidgetMixin, x, o$2, newWidgetFactory, B, o$1, m, widgetFactory;
@@ -8613,13 +8613,13 @@ let __tla = (async () => {
8613
8613
  this.contextParser = new jsonldContextParserExports.ContextParser();
8614
8614
  }
8615
8615
  async initGetter() {
8616
- const { CustomGetter } = await import("./custom-getter-CZS1zXzA.js").then(async (m) => {
8616
+ const { CustomGetter } = await import("./custom-getter-D66QA0eN.js").then(async (m) => {
8617
8617
  await m.__tla;
8618
8618
  return m;
8619
8619
  });
8620
8620
  return CustomGetter;
8621
8621
  }
8622
- async getData(id, context2 = [], parentId = "", localData, forceFetch = false, serverPagination, serverSearch) {
8622
+ async getData(id, context2 = [], parentId = "", localData, forceFetch = false, serverPagination, serverSearch, headers) {
8623
8623
  var _a;
8624
8624
  let key = id;
8625
8625
  if (serverPagination) {
@@ -8647,7 +8647,7 @@ let __tla = (async () => {
8647
8647
  localData["@id"] = id;
8648
8648
  resource = localData;
8649
8649
  } else try {
8650
- resource = localData || await this.fetchData(id, clientContext, parentId, serverPagination, serverSearch);
8650
+ resource = localData || await this.fetchData(id, clientContext, parentId, serverPagination, serverSearch, headers);
8651
8651
  } catch (error) {
8652
8652
  console.error(error);
8653
8653
  }
@@ -8691,17 +8691,21 @@ let __tla = (async () => {
8691
8691
  if (options.headers) options.headers = this._convertHeaders(options.headers);
8692
8692
  return fetch(iri, options).then((response) => response);
8693
8693
  }
8694
- async fetchData(id, context2 = null, parentId = "", serverPagination, serverSearch) {
8694
+ async fetchData(id, context2 = null, parentId = "", serverPagination, serverSearch, headers) {
8695
8695
  let iri = this._getAbsoluteIri(id, context2, parentId);
8696
8696
  if (serverPagination) iri = appendServerPaginationToIri(iri, serverPagination);
8697
8697
  if (serverSearch) iri = appendServerSearchToIri(iri, serverSearch);
8698
- const headers = {
8698
+ let requestHeaders = {
8699
8699
  ...this.headers,
8700
8700
  "accept-language": this._getLanguage()
8701
8701
  };
8702
+ if (headers) requestHeaders = {
8703
+ ...requestHeaders,
8704
+ ...headers
8705
+ };
8702
8706
  return this.fetchAuthn(iri, {
8703
8707
  method: "GET",
8704
- headers,
8708
+ headers: requestHeaders,
8705
8709
  credentials: "include"
8706
8710
  }).then((response) => {
8707
8711
  if (!response.ok) return;
package/dist/store.js CHANGED
@@ -1,5 +1,5 @@
1
- import { __tla as __tla_0 } from "./store-sU3CpiAU.js";
2
- import { b, e, a, s } from "./store-sU3CpiAU.js";
1
+ import { __tla as __tla_0 } from "./store-BUP_Lw_8.js";
2
+ import { b, e, a, s } from "./store-BUP_Lw_8.js";
3
3
  Promise.all([
4
4
  (() => {
5
5
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startinblox/core",
3
- "version": "2.0.1-beta.2",
3
+ "version": "2.0.2-beta.1",
4
4
  "description": "This is a series of web component respecting both the web components standards and the Linked Data Platform convention.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",