@gaddario98/react-core 2.1.2 → 2.1.4

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.
@@ -422,7 +422,7 @@ const useGenerateContentRender = ({
422
422
  } = useGenerateContentRender(t4);
423
423
  let t5;
424
424
  if ($[7] !== components) {
425
- t5 = components.filter(_temp$1).map(_temp2$1);
425
+ t5 = components.filter(_temp$2).map(_temp2$2);
426
426
  $[7] = components;
427
427
  $[8] = t5;
428
428
  } else {
@@ -465,10 +465,10 @@ const useGenerateContentRender = ({
465
465
  }
466
466
  return t8;
467
467
  };
468
- function _temp$1(el) {
468
+ function _temp$2(el) {
469
469
  return !el.renderInFooter && !el.renderInHeader;
470
470
  }
471
- function _temp2$1(item) {
471
+ function _temp2$2(item) {
472
472
  return item.element;
473
473
  }
474
474
  function _temp3(el_0) {
@@ -1445,7 +1445,7 @@ function useFormData({
1445
1445
  const hiddenMapped = useCallback(() => {
1446
1446
  const isHidden = form === null || form === void 0 ? void 0 : form.hidden;
1447
1447
  if (!isHidden) return false;
1448
- if (typeof isHidden === 'function') {
1448
+ if (typeof isHidden === "function") {
1449
1449
  return isHidden({
1450
1450
  get,
1451
1451
  set
@@ -1457,16 +1457,14 @@ function useFormData({
1457
1457
  const mappedFormData = useMemo(() => {
1458
1458
  if (!(form === null || form === void 0 ? void 0 : form.data) || hiddenMapped()) return [];
1459
1459
  return form.data.map(el => {
1460
- if (typeof el === 'function') {
1460
+ if (typeof el === "function") {
1461
1461
  return el({
1462
1462
  get,
1463
1463
  set
1464
1464
  });
1465
1465
  }
1466
1466
  return el;
1467
- })
1468
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1469
- .filter(el_0 => !!el_0).map((el_1, i) => {
1467
+ }).filter(el_0 => !!el_0).map((el_1, i) => {
1470
1468
  var _a;
1471
1469
  return Object.assign(Object.assign({}, el_1), {
1472
1470
  key: (_a = el_1.key) !== null && _a !== void 0 ? _a : `${i}`
@@ -1476,7 +1474,7 @@ function useFormData({
1476
1474
  const formSubmit = useMemo(() => {
1477
1475
  if (!(form === null || form === void 0 ? void 0 : form.submit) || hiddenMapped()) return [];
1478
1476
  const submitFn = form.submit;
1479
- return (typeof submitFn === 'function' ? submitFn({
1477
+ return (typeof submitFn === "function" ? submitFn({
1480
1478
  get,
1481
1479
  set
1482
1480
  }) : submitFn).map((el_2, i_0) => {
@@ -1520,8 +1518,8 @@ function useFormData({
1520
1518
  return () => unsubscribe();
1521
1519
  }, [form === null || form === void 0 ? void 0 : form.defaultValueQueryKey, form === null || form === void 0 ? void 0 : form.defaultValues, queryClient]);
1522
1520
  const defaultValues = useMemo(() => {
1523
- var _a, _b;
1524
- return Object.assign(Object.assign({}, defaultValueQuery !== null && defaultValueQuery !== void 0 ? defaultValueQuery : {}), (_b = (_a = form === null || form === void 0 ? void 0 : form.defaultValueQueryMap) === null || _a === void 0 ? void 0 : _a.call(form, defaultValueQuery)) !== null && _b !== void 0 ? _b : {});
1521
+ var _a, _b, _c;
1522
+ return Object.assign({}, (_c = (_b = (_a = form === null || form === void 0 ? void 0 : form.defaultValueQueryMap) === null || _a === void 0 ? void 0 : _a.call(form, defaultValueQuery)) !== null && _b !== void 0 ? _b : defaultValueQuery) !== null && _c !== void 0 ? _c : {});
1525
1523
  }, [defaultValueQuery, form]);
1526
1524
  const {
1527
1525
  mappedFormData,
@@ -1845,6 +1843,27 @@ function useApplyMetadata() {
1845
1843
  t0 = $[1];
1846
1844
  }
1847
1845
  return t0;
1846
+ }const usePageUtiles = () => {
1847
+ const $ = c(1);
1848
+ const getContentProps = _temp$1;
1849
+ const getContentItems = _temp2$1;
1850
+ let t0;
1851
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1852
+ t0 = {
1853
+ getContentProps,
1854
+ getContentItems
1855
+ };
1856
+ $[0] = t0;
1857
+ } else {
1858
+ t0 = $[0];
1859
+ }
1860
+ return t0;
1861
+ };
1862
+ function _temp$1(props) {
1863
+ return props;
1864
+ }
1865
+ function _temp2$1(props_0) {
1866
+ return props_0;
1848
1867
  }/**
1849
1868
  * Headless component that manages metadata injection.
1850
1869
  * On web: injects metadata into `<head>`.
@@ -1908,20 +1927,20 @@ const MetadataManager = MetadataManagerImpl;const PageGenerator = _a => {
1908
1927
  } = usePageConfigValue();
1909
1928
  const isUnlogged = useMemo(() => enableAuthControl && !isLogged(authValues ? authValues : null), [enableAuthControl, authValues, isLogged]);
1910
1929
  const selectedProps = useMemo(() => {
1911
- return enableAuthControl && isUnlogged ? authPageProps : props;
1912
- }, [enableAuthControl, isUnlogged, authPageProps, props]);
1930
+ return isUnlogged ? authPageProps : props;
1931
+ }, [isUnlogged, authPageProps, props]);
1913
1932
  const {
1914
1933
  contents = [],
1915
1934
  queries = [],
1916
1935
  form,
1917
- id = 'default-page-id',
1936
+ id = "default-page-id",
1918
1937
  viewSettings,
1919
1938
  ns
1920
1939
  } = useMemo(() => selectedProps, [selectedProps]);
1921
1940
  const config = usePageConfig({
1922
1941
  queries,
1923
1942
  form,
1924
- ns: ns !== null && ns !== void 0 ? ns : '',
1943
+ ns: ns !== null && ns !== void 0 ? ns : "",
1925
1944
  viewSettings,
1926
1945
  pageId: id,
1927
1946
  variables
@@ -2923,4 +2942,4 @@ function pageToMarkdown(options) {
2923
2942
  lines.push('');
2924
2943
  lines.push(options.content);
2925
2944
  return lines.join('\n');
2926
- }export{MemoizationCache,MetadataStoreProvider,PageGenerator,RenderComponents,applyMetadataToDom,buildArticleJsonLd,buildBreadcrumbListJsonLd,buildFAQPageJsonLd,buildOrganizationJsonLd,buildProductJsonLd,buildWebSiteJsonLd,clearMetadataLog,collectMetadataToHtml,createMetadataStore,createScopePageVariablesAtom,deepEqual,generateLlmsFullTxt,generateLlmsTxt,generateRobotsTxt,generateSitemapEntries,generateSitemapXml,getMetadata,getMetadataLog,getPageConfig,getPageVariablesCompositeKey,isStableValue,logMetadata,memoPropsComparator,memoize,optimizeDeps,pageConfigAtom,pageToMarkdown,pageVariablesAtom,pageVariablesAtomFamily,resetMetadata,resolveMetadata,setMetadata,setMetadataLogging,shallowEqual,toNextHeadTags,toNextMetadata,useApplyMetadata,useFormData,useGenerateContent,useGenerateContentRender,useMetadata,useMetadataStore,usePageConfig,usePageConfigReset,usePageConfigState,usePageConfigValue,useViewSettings};//# sourceMappingURL=index.mjs.map
2945
+ }export{MemoizationCache,MetadataStoreProvider,PageGenerator,RenderComponents,applyMetadataToDom,buildArticleJsonLd,buildBreadcrumbListJsonLd,buildFAQPageJsonLd,buildOrganizationJsonLd,buildProductJsonLd,buildWebSiteJsonLd,clearMetadataLog,collectMetadataToHtml,createMetadataStore,createScopePageVariablesAtom,deepEqual,generateLlmsFullTxt,generateLlmsTxt,generateRobotsTxt,generateSitemapEntries,generateSitemapXml,getMetadata,getMetadataLog,getPageConfig,getPageVariablesCompositeKey,isStableValue,logMetadata,memoPropsComparator,memoize,optimizeDeps,pageConfigAtom,pageToMarkdown,pageVariablesAtom,pageVariablesAtomFamily,resetMetadata,resolveMetadata,setMetadata,setMetadataLogging,shallowEqual,toNextHeadTags,toNextMetadata,useApplyMetadata,useFormData,useGenerateContent,useGenerateContentRender,useMetadata,useMetadataStore,usePageConfig,usePageConfigReset,usePageConfigState,usePageConfigValue,usePageUtiles,useViewSettings};//# sourceMappingURL=index.mjs.map