@frontify/guideline-blocks-settings 0.34.6 → 0.34.8
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.
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js +40 -35
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/PageLink.es.js +16 -15
- package/dist/components/Link/LinkSelector/PageLink.es.js.map +1 -1
- package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js +8 -0
- package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js.map +1 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import { LoadingIndicator as
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as s, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useEffect as m } from "react";
|
|
3
|
+
import { filterDocumentSectionsWithUnreadableTitles as v } from "../helpers/filterDocumentSectionsWithUnreadableTitles.es.js";
|
|
4
|
+
import { LoadingIndicator as E } from "./LoadingIndicator.es.js";
|
|
5
|
+
import { DocumentLink as S } from "./DocumentLink.es.js";
|
|
6
|
+
const O = ({
|
|
7
|
+
selectedUrl: n,
|
|
7
8
|
onSelectUrl: f,
|
|
8
9
|
getAllDocuments: l,
|
|
9
|
-
getDocumentPagesByDocumentId:
|
|
10
|
-
getDocumentSectionsByDocumentPageId:
|
|
10
|
+
getDocumentPagesByDocumentId: r,
|
|
11
|
+
getDocumentSectionsByDocumentPageId: a
|
|
11
12
|
}) => {
|
|
12
|
-
const [p, u] =
|
|
13
|
+
const [p, u] = d(!0), [e, I] = d([]), [g, L] = d({
|
|
13
14
|
documentId: void 0,
|
|
14
15
|
pageId: void 0
|
|
15
|
-
})
|
|
16
|
+
});
|
|
16
17
|
m(() => {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
n && e.length > 0 && h().then((t) => {
|
|
19
|
+
L(t);
|
|
19
20
|
});
|
|
20
21
|
}, [e.length]), m(() => {
|
|
21
|
-
l().then((
|
|
22
|
-
|
|
22
|
+
l().then((t) => {
|
|
23
|
+
I(t);
|
|
23
24
|
}).finally(() => {
|
|
24
25
|
u(!1);
|
|
25
26
|
});
|
|
26
27
|
}, []);
|
|
27
|
-
const
|
|
28
|
-
const
|
|
28
|
+
const h = async () => {
|
|
29
|
+
const t = {
|
|
29
30
|
documentId: void 0,
|
|
30
31
|
pageId: void 0
|
|
31
32
|
};
|
|
32
|
-
if (e.find((
|
|
33
|
-
return
|
|
34
|
-
for (const
|
|
35
|
-
const
|
|
36
|
-
if (!!
|
|
37
|
-
return
|
|
38
|
-
for (const
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
if (e.find((i) => i.permanentLink === n))
|
|
34
|
+
return t;
|
|
35
|
+
for (const i of e) {
|
|
36
|
+
const c = await r(i.id);
|
|
37
|
+
if (!!c.find((o) => o.permanentLink === n))
|
|
38
|
+
return t.documentId = i.id, t;
|
|
39
|
+
for (const o of c) {
|
|
40
|
+
const T = await a(o.id);
|
|
41
|
+
if (!!v(T).find(
|
|
42
|
+
(k) => k.permanentLink === n
|
|
43
|
+
))
|
|
44
|
+
return t.documentId = i.id, t.pageId = o.id, t;
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
|
-
return
|
|
47
|
+
return t;
|
|
43
48
|
};
|
|
44
|
-
return p ? /* @__PURE__ */
|
|
45
|
-
|
|
49
|
+
return p ? /* @__PURE__ */ s(E, {}) : /* @__PURE__ */ s(x, { children: e.map((t) => /* @__PURE__ */ s(
|
|
50
|
+
S,
|
|
46
51
|
{
|
|
47
|
-
document:
|
|
48
|
-
selectedUrl:
|
|
52
|
+
document: t,
|
|
53
|
+
selectedUrl: n,
|
|
49
54
|
onSelectUrl: f,
|
|
50
|
-
itemsToExpandInitially:
|
|
51
|
-
getDocumentSectionsByDocumentPageId:
|
|
52
|
-
getDocumentPagesByDocumentId:
|
|
55
|
+
itemsToExpandInitially: g,
|
|
56
|
+
getDocumentSectionsByDocumentPageId: a,
|
|
57
|
+
getDocumentPagesByDocumentId: r
|
|
53
58
|
},
|
|
54
|
-
|
|
59
|
+
t.id
|
|
55
60
|
)) });
|
|
56
61
|
};
|
|
57
62
|
export {
|
|
58
|
-
|
|
63
|
+
O as DocumentLinks
|
|
59
64
|
};
|
|
60
65
|
//# sourceMappingURL=DocumentLinks.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentLinks.es.js","sources":["../../../../src/components/Link/LinkSelector/DocumentLinks.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type
|
|
1
|
+
{"version":3,"file":"DocumentLinks.es.js","sources":["../../../../src/components/Link/LinkSelector/DocumentLinks.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type Document, type DocumentPage, type DocumentSection } from '@frontify/app-bridge';\nimport { ReactElement, useEffect, useState } from 'react';\n\nimport { filterDocumentSectionsWithUnreadableTitles } from '../helpers/filterDocumentSectionsWithUnreadableTitles';\nimport { InitiallyExpandedItems } from '../';\n\nimport { LoadingIndicator } from './LoadingIndicator';\nimport { DocumentLink } from './DocumentLink';\n\ntype DocumentLinksProps = {\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n getAllDocuments: () => Promise<Document[]>;\n getDocumentSectionsByDocumentPageId: (documentPageId: number) => Promise<DocumentSection[]>;\n getDocumentPagesByDocumentId: (documentId: number) => Promise<DocumentPage[]>;\n};\n\nexport const DocumentLinks = ({\n selectedUrl,\n onSelectUrl,\n getAllDocuments,\n getDocumentPagesByDocumentId,\n getDocumentSectionsByDocumentPageId,\n}: DocumentLinksProps): ReactElement => {\n const [isLoading, setIsLoading] = useState(true);\n const [documents, setDocuments] = useState<Document[]>([]);\n const [itemsToExpandInitially, setItemsToExpandInitially] = useState<InitiallyExpandedItems>({\n documentId: undefined,\n pageId: undefined,\n });\n\n useEffect(() => {\n if (selectedUrl && documents.length > 0) {\n findLocationOfSelectedUrl().then((items) => {\n setItemsToExpandInitially(items);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [documents.length]);\n\n useEffect(() => {\n getAllDocuments()\n .then((_documents) => {\n setDocuments(_documents);\n })\n .finally(() => {\n setIsLoading(false);\n });\n }, []);\n\n const findLocationOfSelectedUrl = async () => {\n const itemsToExpand: InitiallyExpandedItems = {\n documentId: undefined,\n pageId: undefined,\n };\n const selectedUrlIsDocument = documents.find((document) => document.permanentLink === selectedUrl);\n if (selectedUrlIsDocument) {\n return itemsToExpand;\n }\n for (const document of documents) {\n const pages = await getDocumentPagesByDocumentId(document.id);\n const selectedUrlIsPage = !!pages.find((page) => page.permanentLink === selectedUrl);\n if (selectedUrlIsPage) {\n itemsToExpand.documentId = document.id;\n return itemsToExpand;\n }\n for (const page of pages) {\n const sections = await getDocumentSectionsByDocumentPageId(page.id);\n const sectionsWithReadableTitles = filterDocumentSectionsWithUnreadableTitles(sections);\n const selectedUrlIsSection = !!sectionsWithReadableTitles.find(\n (section) => section.permanentLink === selectedUrl,\n );\n if (selectedUrlIsSection) {\n itemsToExpand.documentId = document.id;\n itemsToExpand.pageId = page.id;\n return itemsToExpand;\n }\n }\n }\n return itemsToExpand;\n };\n\n return isLoading ? (\n <LoadingIndicator />\n ) : (\n <>\n {documents.map((document) => {\n return (\n <DocumentLink\n key={document.id}\n document={document}\n selectedUrl={selectedUrl}\n onSelectUrl={onSelectUrl}\n itemsToExpandInitially={itemsToExpandInitially}\n getDocumentSectionsByDocumentPageId={getDocumentSectionsByDocumentPageId}\n getDocumentPagesByDocumentId={getDocumentPagesByDocumentId}\n />\n );\n })}\n </>\n );\n};\n"],"names":["DocumentLinks","selectedUrl","onSelectUrl","getAllDocuments","getDocumentPagesByDocumentId","getDocumentSectionsByDocumentPageId","isLoading","setIsLoading","useState","documents","setDocuments","itemsToExpandInitially","setItemsToExpandInitially","useEffect","findLocationOfSelectedUrl","items","_documents","itemsToExpand","document","pages","page","sections","filterDocumentSectionsWithUnreadableTitles","section","LoadingIndicator","jsx","DocumentLink"],"mappings":";;;;;AAmBO,MAAMA,IAAgB,CAAC;AAAA,EAC1B,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,8BAAAC;AAAA,EACA,qCAAAC;AACJ,MAAwC;AACpC,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAI,GACzC,CAACC,GAAWC,CAAY,IAAIF,EAAqB,CAAE,CAAA,GACnD,CAACG,GAAwBC,CAAyB,IAAIJ,EAAiC;AAAA,IACzF,YAAY;AAAA,IACZ,QAAQ;AAAA,EAAA,CACX;AAED,EAAAK,EAAU,MAAM;AACR,IAAAZ,KAAeQ,EAAU,SAAS,KACRK,EAAA,EAAE,KAAK,CAACC,MAAU;AACxC,MAAAH,EAA0BG,CAAK;AAAA,IAAA,CAClC;AAAA,EACL,GAED,CAACN,EAAU,MAAM,CAAC,GAErBI,EAAU,MAAM;AACI,IAAAV,EAAA,EACX,KAAK,CAACa,MAAe;AAClB,MAAAN,EAAaM,CAAU;AAAA,IAAA,CAC1B,EACA,QAAQ,MAAM;AACX,MAAAT,EAAa,EAAK;AAAA,IAAA,CACrB;AAAA,EACT,GAAG,CAAE,CAAA;AAEL,QAAMO,IAA4B,YAAY;AAC1C,UAAMG,IAAwC;AAAA,MAC1C,YAAY;AAAA,MACZ,QAAQ;AAAA,IAAA;AAGZ,QAD8BR,EAAU,KAAK,CAACS,MAAaA,EAAS,kBAAkBjB,CAAW;AAEtF,aAAAgB;AAEX,eAAWC,KAAYT,GAAW;AAC9B,YAAMU,IAAQ,MAAMf,EAA6Bc,EAAS,EAAE;AAE5D,UAD0B,CAAC,CAACC,EAAM,KAAK,CAACC,MAASA,EAAK,kBAAkBnB,CAAW;AAE/E,eAAAgB,EAAc,aAAaC,EAAS,IAC7BD;AAEX,iBAAWG,KAAQD,GAAO;AACtB,cAAME,IAAW,MAAMhB,EAAoCe,EAAK,EAAE;AAKlE,YAH6B,CAAC,CADKE,EAA2CD,CAAQ,EAC5B;AAAA,UACtD,CAACE,MAAYA,EAAQ,kBAAkBtB;AAAA,QAAA;AAGvC,iBAAAgB,EAAc,aAAaC,EAAS,IACpCD,EAAc,SAASG,EAAK,IACrBH;AAAA,MAEf;AAAA,IACJ;AACO,WAAAA;AAAA,EAAA;AAGJ,SAAAX,sBACFkB,GAAiB,CAAA,CAAA,2BAGb,UAAUf,EAAA,IAAI,CAACS,MAER,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MAEG,UAAAR;AAAA,MACA,aAAAjB;AAAA,MACA,aAAAC;AAAA,MACA,wBAAAS;AAAA,MACA,qCAAAN;AAAA,MACA,8BAAAD;AAAA,IAAA;AAAA,IANKc,EAAS;AAAA,EAAA,CASzB,EACL,CAAA;AAER;"}
|
|
@@ -2,23 +2,24 @@ import { jsxs as d, Fragment as v, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { merge as m } from "@frontify/fondue";
|
|
3
3
|
import { useState as h, useEffect as x } from "react";
|
|
4
4
|
import { SectionLink as g } from "./SectionLink.es.js";
|
|
5
|
-
|
|
5
|
+
import { filterDocumentSectionsWithUnreadableTitles as k } from "../helpers/filterDocumentSectionsWithUnreadableTitles.es.js";
|
|
6
|
+
const D = ({
|
|
6
7
|
page: t,
|
|
7
8
|
selectedUrl: i,
|
|
8
|
-
onSelectUrl:
|
|
9
|
+
onSelectUrl: c,
|
|
9
10
|
itemsToExpandInitially: r,
|
|
10
|
-
getDocumentSectionsByDocumentPageId:
|
|
11
|
+
getDocumentSectionsByDocumentPageId: w
|
|
11
12
|
}) => {
|
|
12
|
-
const [n, a] = h(t.id === r.documentId), [
|
|
13
|
+
const [n, a] = h(t.id === r.documentId), [o, b] = h([]), f = t.permanentLink === i;
|
|
13
14
|
x(() => {
|
|
14
15
|
(async () => {
|
|
15
|
-
const p = await
|
|
16
|
-
|
|
16
|
+
const p = await w(t.id), u = k(p);
|
|
17
|
+
b(u);
|
|
17
18
|
})();
|
|
18
|
-
}, [t.id,
|
|
19
|
+
}, [t.id, w]), x(() => {
|
|
19
20
|
t.id === r.pageId && a(!0);
|
|
20
21
|
}, [r, t.id]);
|
|
21
|
-
const
|
|
22
|
+
const l = o.length > 0;
|
|
22
23
|
return /* @__PURE__ */ d(v, { children: [
|
|
23
24
|
/* @__PURE__ */ e(
|
|
24
25
|
"button",
|
|
@@ -27,9 +28,9 @@ const j = ({
|
|
|
27
28
|
className: m([
|
|
28
29
|
"tw-py-2 tw-pr-2.5 tw-leading-5 tw-cursor-pointer tw-flex tw-w-full",
|
|
29
30
|
l ? "tw-pl-7" : "tw-pl-12",
|
|
30
|
-
|
|
31
|
+
f ? "tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover:hover hover:tw-text-box-selected-strong-inverse-hover:hover" : "hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover"
|
|
31
32
|
]),
|
|
32
|
-
onClick: () =>
|
|
33
|
+
onClick: () => c(t.permanentLink),
|
|
33
34
|
children: /* @__PURE__ */ d("div", { className: "tw-flex tw-flex-1 tw-space-x-1 tw-items-center tw-h-6", children: [
|
|
34
35
|
l && /* @__PURE__ */ e(
|
|
35
36
|
"button",
|
|
@@ -53,18 +54,18 @@ const j = ({
|
|
|
53
54
|
] }, t.id)
|
|
54
55
|
}
|
|
55
56
|
),
|
|
56
|
-
n &&
|
|
57
|
+
n && o.length > 0 && o.map((s) => /* @__PURE__ */ e(
|
|
57
58
|
g,
|
|
58
59
|
{
|
|
59
|
-
section:
|
|
60
|
+
section: s,
|
|
60
61
|
selectedUrl: i,
|
|
61
|
-
onSelectUrl:
|
|
62
|
+
onSelectUrl: c
|
|
62
63
|
},
|
|
63
|
-
|
|
64
|
+
s.id
|
|
64
65
|
))
|
|
65
66
|
] });
|
|
66
67
|
};
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
D as PageLink
|
|
69
70
|
};
|
|
70
71
|
//# sourceMappingURL=PageLink.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageLink.es.js","sources":["../../../../src/components/Link/LinkSelector/PageLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type DocumentSection } from '@frontify/app-bridge';\nimport { merge } from '@frontify/fondue';\nimport { useEffect, useState } from 'react';\nimport { InitiallyExpandedItems } from '../';\nimport { SectionLink } from './SectionLink';\n\ntype PageLinkProps = {\n page: {\n id: number;\n title: string;\n permanentLink: string;\n };\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n itemsToExpandInitially: InitiallyExpandedItems;\n getDocumentSectionsByDocumentPageId: (documentPageId: number) => Promise<DocumentSection[]>;\n};\n\nexport const PageLink = ({\n page,\n selectedUrl,\n onSelectUrl,\n itemsToExpandInitially,\n getDocumentSectionsByDocumentPageId,\n}: PageLinkProps) => {\n const [isExpanded, setIsExpanded] = useState(page.id === itemsToExpandInitially.documentId);\n const [documentSections, setDocumentSections] = useState<
|
|
1
|
+
{"version":3,"file":"PageLink.es.js","sources":["../../../../src/components/Link/LinkSelector/PageLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type DocumentSection } from '@frontify/app-bridge';\nimport { merge } from '@frontify/fondue';\nimport { useEffect, useState } from 'react';\nimport { DocumentSectionWithTitle, InitiallyExpandedItems } from '../';\nimport { SectionLink } from './SectionLink';\nimport { filterDocumentSectionsWithUnreadableTitles } from '../helpers/filterDocumentSectionsWithUnreadableTitles';\n\ntype PageLinkProps = {\n page: {\n id: number;\n title: string;\n permanentLink: string;\n };\n selectedUrl: string;\n onSelectUrl: (url: string) => void;\n itemsToExpandInitially: InitiallyExpandedItems;\n getDocumentSectionsByDocumentPageId: (documentPageId: number) => Promise<DocumentSection[]>;\n};\n\nexport const PageLink = ({\n page,\n selectedUrl,\n onSelectUrl,\n itemsToExpandInitially,\n getDocumentSectionsByDocumentPageId,\n}: PageLinkProps) => {\n const [isExpanded, setIsExpanded] = useState(page.id === itemsToExpandInitially.documentId);\n const [documentSections, setDocumentSections] = useState<DocumentSectionWithTitle[]>([]);\n const isActive = page.permanentLink === selectedUrl;\n\n useEffect(() => {\n const fetchDocumentSections = async () => {\n const sections = await getDocumentSectionsByDocumentPageId(page.id);\n const sectionsWithReadableTitles = filterDocumentSectionsWithUnreadableTitles(sections);\n setDocumentSections(sectionsWithReadableTitles);\n };\n\n fetchDocumentSections();\n }, [page.id, getDocumentSectionsByDocumentPageId]);\n\n useEffect(() => {\n if (page.id === itemsToExpandInitially.pageId) {\n setIsExpanded(true);\n }\n }, [itemsToExpandInitially, page.id]);\n\n const hasSections = documentSections.length > 0;\n\n return (\n <>\n <button\n data-test-id=\"internal-link-selector-page-link\"\n className={merge([\n 'tw-py-2 tw-pr-2.5 tw-leading-5 tw-cursor-pointer tw-flex tw-w-full',\n hasSections ? 'tw-pl-7' : 'tw-pl-12',\n isActive\n ? 'tw-bg-box-selected-strong tw-text-box-selected-strong-inverse hover:tw-bg-box-selected-strong-hover:hover hover:tw-text-box-selected-strong-inverse-hover:hover'\n : 'hover:tw-bg-box-neutral-hover hover:tw-text-box-neutral-inverse-hover',\n ])}\n onClick={() => onSelectUrl(page.permanentLink)}\n >\n <div key={page.id} className=\"tw-flex tw-flex-1 tw-space-x-1 tw-items-center tw-h-6\">\n {hasSections && (\n <button\n data-test-id=\"tree-item-toggle\"\n className=\"tw-flex tw-items-center tw-justify-center -tw-mr-2 tw-pr-3.5 tw-pt-1.5 tw-pb-1.5 tw-pl-3.5 tw-cursor-pointer\"\n onClick={() => setIsExpanded(!isExpanded)}\n >\n <div\n className={merge([\n 'tw-transition-transform tw-w-0 tw-h-0 tw-font-normal tw-border-t-4 tw-border-t-transparent tw-border-b-4 tw-border-b-transparent tw-border-l-4 tw-border-l-x-strong',\n isExpanded ? 'tw-rotate-90' : '',\n ])}\n ></div>\n </button>\n )}\n <span className=\"tw-text-s\">{page.title}</span>\n <span className=\"tw-flex-auto tw-font-sans tw-text-xs tw-text-right\">Page</span>\n </div>\n </button>\n {isExpanded &&\n documentSections.length > 0 &&\n documentSections.map((section) => {\n return (\n <SectionLink\n key={section.id}\n section={section}\n selectedUrl={selectedUrl}\n onSelectUrl={onSelectUrl}\n />\n );\n })}\n </>\n );\n};\n"],"names":["PageLink","page","selectedUrl","onSelectUrl","itemsToExpandInitially","getDocumentSectionsByDocumentPageId","isExpanded","setIsExpanded","useState","documentSections","setDocumentSections","isActive","useEffect","sections","sectionsWithReadableTitles","filterDocumentSectionsWithUnreadableTitles","hasSections","jsxs","Fragment","jsx","merge","section","SectionLink"],"mappings":";;;;;AAqBO,MAAMA,IAAW,CAAC;AAAA,EACrB,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,qCAAAC;AACJ,MAAqB;AACX,QAAA,CAACC,GAAYC,CAAa,IAAIC,EAASP,EAAK,OAAOG,EAAuB,UAAU,GACpF,CAACK,GAAkBC,CAAmB,IAAIF,EAAqC,CAAE,CAAA,GACjFG,IAAWV,EAAK,kBAAkBC;AAExC,EAAAU,EAAU,MAAM;AAOU,KANQ,YAAY;AACtC,YAAMC,IAAW,MAAMR,EAAoCJ,EAAK,EAAE,GAC5Da,IAA6BC,EAA2CF,CAAQ;AACtF,MAAAH,EAAoBI,CAA0B;AAAA,IAAA;EAInD,GAAA,CAACb,EAAK,IAAII,CAAmC,CAAC,GAEjDO,EAAU,MAAM;AACR,IAAAX,EAAK,OAAOG,EAAuB,UACnCG,EAAc,EAAI;AAAA,EAEvB,GAAA,CAACH,GAAwBH,EAAK,EAAE,CAAC;AAE9B,QAAAe,IAAcP,EAAiB,SAAS;AAE9C,SAEQ,gBAAAQ,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,gBAAa;AAAA,QACb,WAAWC,EAAM;AAAA,UACb;AAAA,UACAJ,IAAc,YAAY;AAAA,UAC1BL,IACM,oKACA;AAAA,QAAA,CACT;AAAA,QACD,SAAS,MAAMR,EAAYF,EAAK,aAAa;AAAA,QAE7C,UAAA,gBAAAgB,EAAC,OAAkB,EAAA,WAAU,yDACxB,UAAA;AAAA,UACGD,KAAA,gBAAAG;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,gBAAa;AAAA,cACb,WAAU;AAAA,cACV,SAAS,MAAMZ,EAAc,CAACD,CAAU;AAAA,cAExC,UAAA,gBAAAa;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACG,WAAWC,EAAM;AAAA,oBACb;AAAA,oBACAd,IAAa,iBAAiB;AAAA,kBAAA,CACjC;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA;AAAA,UACL;AAAA,UAEH,gBAAAa,EAAA,QAAA,EAAK,WAAU,aAAa,YAAK,OAAM;AAAA,UACvC,gBAAAA,EAAA,QAAA,EAAK,WAAU,sDAAqD,UAAI,QAAA;AAAA,QAAA,EAAA,GAhBnElB,EAAK,EAiBf;AAAA,MAAA;AAAA,IACJ;AAAA,IACCK,KACGG,EAAiB,SAAS,KAC1BA,EAAiB,IAAI,CAACY,MAEd,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QAEG,SAAAD;AAAA,QACA,aAAAnB;AAAA,QACA,aAAAC;AAAA,MAAA;AAAA,MAHKkB,EAAQ;AAAA,IAAA,CAMxB;AAAA,EACT,EAAA,CAAA;AAER;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterDocumentSectionsWithUnreadableTitles.es.js","sources":["../../../../src/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type DocumentSection } from '@frontify/app-bridge';\nimport { type DocumentSectionWithTitle } from '../types';\n\nexport const filterDocumentSectionsWithUnreadableTitles = (sections: DocumentSection[]) =>\n sections.filter((section) => !!section.title?.trim()) as DocumentSectionWithTitle[];\n"],"names":["filterDocumentSectionsWithUnreadableTitles","sections","section","_a"],"mappings":"AAKO,MAAMA,IAA6C,CAACC,MACvDA,EAAS,OAAO,CAACC,MAAY;AAD1B,MAAAC;AAC0B,UAAC,GAACA,IAAAD,EAAQ,UAAR,QAAAC,EAAe;AAAA,CAAM;"}
|