@ui5/webcomponents-base 2.28.1 → 2.29.0-rc.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.
- package/CHANGELOG.md +27 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/css/SystemCSSVars.css +2 -2
- package/dist/generated/VersionInfo.js +5 -5
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/generated/css/SystemCSSVars.css.d.ts +1 -1
- package/dist/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +2 -2
- package/dist/prod/generated/css/SystemCSSVars.css.js +1 -1
- package/dist/prod/generated/css/SystemCSSVars.css.js.map +1 -1
- package/dist/prod/util/generateHighlightedMarkup.js.map +2 -2
- package/dist/prod/util/getEffectiveContentDensity.js +1 -1
- package/dist/prod/util/getEffectiveContentDensity.js.map +2 -2
- package/dist/prod/util/highlightText.js +1 -1
- package/dist/prod/util/highlightText.js.map +3 -3
- package/dist/prod/validateThemeRoot.js +1 -1
- package/dist/prod/validateThemeRoot.js.map +3 -3
- package/dist/util/generateHighlightedMarkup.d.ts +2 -1
- package/dist/util/generateHighlightedMarkup.js +2 -1
- package/dist/util/generateHighlightedMarkup.js.map +1 -1
- package/dist/util/getEffectiveContentDensity.js +1 -1
- package/dist/util/getEffectiveContentDensity.js.map +1 -1
- package/dist/util/highlightText.d.ts +6 -4
- package/dist/util/highlightText.js +8 -4
- package/dist/util/highlightText.js.map +1 -1
- package/dist/validateThemeRoot.js +6 -1
- package/dist/validateThemeRoot.js.map +1 -1
- package/package.json +3 -3
- package/src/css/SystemCSSVars.css +2 -2
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--_ui5-cozy-size: var(--_ui5-f2d95f8);
|
|
13
13
|
|
|
14
14
|
--_ui5-compact-size: ;
|
|
15
|
-
--
|
|
15
|
+
--_ui5_content_density: cozy;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
[data-ui5-compact-size],
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
always considered invalid and undefined.
|
|
31
31
|
*/
|
|
32
32
|
--_ui5-compact-size: var(--_ui5-f2d95f8);
|
|
33
|
-
--
|
|
33
|
+
--_ui5_content_density: compact;
|
|
34
34
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.
|
|
2
|
+
version: "2.29.0-rc.1",
|
|
3
3
|
major: 2,
|
|
4
|
-
minor:
|
|
5
|
-
patch:
|
|
6
|
-
suffix: "",
|
|
4
|
+
minor: 29,
|
|
5
|
+
patch: 0,
|
|
6
|
+
suffix: "-rc.1",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1794298252,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.29.0-rc.1\",\n\tmajor: 2,\n\tminor: 29,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1794298252,\n};\nexport default VersionInfo;"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: ":root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--
|
|
1
|
+
declare const _default: ":root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5-cozy-size: ;--_ui5-compact-size:var(--_ui5-f2d95f8);--_ui5_content_density:compact}";
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default `:root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--
|
|
1
|
+
export default `:root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5-cozy-size: ;--_ui5-compact-size:var(--_ui5-f2d95f8);--_ui5_content_density:compact}`;
|
|
2
2
|
//# sourceMappingURL=SystemCSSVars.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemCSSVars.css.js","sourceRoot":"","sources":["../../../src/generated/css/SystemCSSVars.css.ts"],"names":[],"mappings":"AAAA,eAAe,
|
|
1
|
+
{"version":3,"file":"SystemCSSVars.css.js","sourceRoot":"","sources":["../../../src/generated/css/SystemCSSVars.css.ts"],"names":[],"mappings":"AAAA,eAAe,gQAAgQ,CAAC","sourcesContent":["export default `:root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5-cozy-size: ;--_ui5-compact-size:var(--_ui5-f2d95f8);--_ui5_content_density:compact}`;"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e={version:"2.
|
|
1
|
+
"use strict";const e={version:"2.29.0-rc.1",major:2,minor:29,patch:0,suffix:"-rc.1",isNext:!1,buildTime:1794298252};export default e;
|
|
2
2
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/generated/VersionInfo.ts"],
|
|
4
|
-
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.
|
|
5
|
-
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,
|
|
4
|
+
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.29.0-rc.1\",\n\tmajor: 2,\n\tminor: 29,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1794298252,\n};\nexport default VersionInfo;"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,cACT,MAAO,EACP,MAAO,GACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
|
|
6
6
|
"names": ["VersionInfo"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";export default":root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--
|
|
1
|
+
"use strict";export default":root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5-cozy-size: ;--_ui5-compact-size:var(--_ui5-f2d95f8);--_ui5_content_density:compact}";
|
|
2
2
|
//# sourceMappingURL=SystemCSSVars.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/generated/css/SystemCSSVars.css.ts"],
|
|
4
|
-
"sourcesContent": ["export default `:root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--
|
|
4
|
+
"sourcesContent": ["export default `:root{--_ui5-cozy-size:var(--_ui5-f2d95f8);--_ui5-compact-size: ;--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5-cozy-size: ;--_ui5-compact-size:var(--_ui5-f2d95f8);--_ui5_content_density:compact}`;"],
|
|
5
5
|
"mappings": "aAAA,cAAe",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/util/generateHighlightedMarkup.ts"],
|
|
4
|
-
"sourcesContent": ["import escapeRegex from \"./escapeRegex.js\";\n// @ts-ignore\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\n// utility to replace all occurances of a string\nfunction replaceAll(text: string, find: string, replace: string | ((substring: string, ...args: any[]) => string), caseInsensitive: boolean) {\n\treturn text.replaceAll(new RegExp(escapeRegex(find), `${caseInsensitive ? \"i\" : \"\"}g`), replace as string);\n}\n\n/**\n * Generate markup for a raw string where a particular text is wrapped with
|
|
5
|
-
"mappings": "aAAA,OAAOA,MAAiB,mBAExB,OAAOC,MAAe,oCAGtB,SAASC,EAAWC,EAAcC,EAAcC,EAAmEC,EAA0B,CAC5I,OAAOH,EAAK,WAAW,IAAI,OAAOH,EAAYI,CAAI,EAAG,GAAGE,EAAkB,IAAM,EAAE,GAAG,EAAGD,CAAiB,CAC1G,
|
|
4
|
+
"sourcesContent": ["import escapeRegex from \"./escapeRegex.js\";\n// @ts-ignore\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\n// utility to replace all occurances of a string\nfunction replaceAll(text: string, find: string, replace: string | ((substring: string, ...args: any[]) => string), caseInsensitive: boolean) {\n\treturn text.replaceAll(new RegExp(escapeRegex(find), `${caseInsensitive ? \"i\" : \"\"}g`), replace as string);\n}\n\n/**\n * Generate markup for a raw string where a particular text is wrapped with a `<b>` (bold) tag.\n * All inputs to this function are considered literal text, and special characters will always be escaped.\n * @param {string} text The text to add highlighting to\n * @param {string} textToHighlight The text which should be highlighted\n * @return {string} the markup HTML which contains all occurrances of the input text surrounded with a `<b>` tag.\n * @deprecated Use `highlightText` from `@ui5/webcomponents-base/dist/util/highlightText.js` instead.\n */\nfunction generateHighlightedMarkup(text: string, textToHighlight: string) {\n\tif (!text || !textToHighlight) {\n\t\treturn text;\n\t}\n\t// a token is some string that does not appear in either of the input strings\n\t// repeat the token until it does not appear in the string\n\tconst makeToken = (t: string) => {\n\t\tconst [s, e] = t.split(\"\");\n\t\twhile (text.indexOf(t) >= 0 || textToHighlight.indexOf(t) >= 0) {\n\t\t\tt = `${s}${t}${e}`;\n\t\t}\n\t\treturn t;\n\t};\n\t// It doesn't matter what characters are used as long as all 4 of them are unique\n\t// And also that encodeXML will not change these characters\n\tconst openToken = makeToken(\"12\");\n\tconst closeToken = makeToken(\"34\");\n\t// wrap every occurance of the textToHighlight using the open/close tokens (instead of markup at this point)\n\tlet result = encodeXML(replaceAll(text, textToHighlight, (match: string) => `${openToken}${match}${closeToken}`, true)) as string;\n\t// now replace the open and close tokens with the markup that we expect\n\t[[openToken, \"<b>\"], [closeToken, \"</b>\"]].forEach(([find, replace]) => {\n\t\tresult = replaceAll(result, find, replace, false);\n\t});\n\treturn result;\n}\n\nexport default generateHighlightedMarkup;\n"],
|
|
5
|
+
"mappings": "aAAA,OAAOA,MAAiB,mBAExB,OAAOC,MAAe,oCAGtB,SAASC,EAAWC,EAAcC,EAAcC,EAAmEC,EAA0B,CAC5I,OAAOH,EAAK,WAAW,IAAI,OAAOH,EAAYI,CAAI,EAAG,GAAGE,EAAkB,IAAM,EAAE,GAAG,EAAGD,CAAiB,CAC1G,CAUA,SAASE,EAA0BJ,EAAcK,EAAyB,CACzE,GAAI,CAACL,GAAQ,CAACK,EACb,OAAOL,EAIR,MAAMM,EAAaC,GAAc,CAChC,KAAM,CAACC,EAAGC,CAAC,EAAIF,EAAE,MAAM,EAAE,EACzB,KAAOP,EAAK,QAAQO,CAAC,GAAK,GAAKF,EAAgB,QAAQE,CAAC,GAAK,GAC5DA,EAAI,GAAGC,CAAC,GAAGD,CAAC,GAAGE,CAAC,GAEjB,OAAOF,CACR,EAGMG,EAAYJ,EAAU,IAAI,EAC1BK,EAAaL,EAAU,IAAI,EAEjC,IAAIM,EAASd,EAAUC,EAAWC,EAAMK,EAAkBQ,GAAkB,GAAGH,CAAS,GAAGG,CAAK,GAAGF,CAAU,GAAI,EAAI,CAAC,EAEtH,OAAC,CAACD,EAAW,KAAK,EAAG,CAACC,EAAY,MAAM,CAAC,EAAE,QAAQ,CAAC,CAACV,EAAMC,CAAO,IAAM,CACvEU,EAASb,EAAWa,EAAQX,EAAMC,EAAS,EAAK,CACjD,CAAC,EACMU,CACR,CAEA,eAAeR",
|
|
6
6
|
"names": ["escapeRegex", "encodeXML", "replaceAll", "text", "find", "replace", "caseInsensitive", "generateHighlightedMarkup", "textToHighlight", "makeToken", "t", "s", "e", "openToken", "closeToken", "result", "match"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e="--
|
|
1
|
+
"use strict";const e="--_ui5_content_density",n=t=>getComputedStyle(t).getPropertyValue(e);export default n;
|
|
2
2
|
//# sourceMappingURL=getEffectiveContentDensity.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/util/getEffectiveContentDensity.ts"],
|
|
4
|
-
"sourcesContent": ["const GLOBAL_CONTENT_DENSITY_CSS_VAR = \"--
|
|
5
|
-
"mappings": "aAAA,MAAMA,EAAiC,
|
|
4
|
+
"sourcesContent": ["const GLOBAL_CONTENT_DENSITY_CSS_VAR = \"--_ui5_content_density\";\n\nconst getEffectiveContentDensity = (el: HTMLElement) => getComputedStyle(el).getPropertyValue(GLOBAL_CONTENT_DENSITY_CSS_VAR);\n\nexport default getEffectiveContentDensity;\n"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAiC,yBAEjCC,EAA8BC,GAAoB,iBAAiBA,CAAE,EAAE,iBAAiBF,CAA8B,EAE5H,eAAeC",
|
|
6
6
|
"names": ["GLOBAL_CONTENT_DENSITY_CSS_VAR", "getEffectiveContentDensity", "el"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import l from"../sap/base/security/encodeXML.js";function
|
|
1
|
+
"use strict";import l from"../sap/base/security/encodeXML.js";function p(n){const r=[],o=[];let t=0;return Array.from(n).forEach(i=>{const s=i.toLowerCase(),e=t+i.length;Array.from({length:s.length}).forEach(()=>{r.push(t),o.push(e)}),t=e}),{originalStart:r,originalEnd:o}}const w=(n,r,o)=>{n=n||"",r=r||"";const t=n.toLowerCase(),i=r.toLowerCase(),s=i.length;let e=t.indexOf(i);if(!s||e===-1)return l(n);const g=p(n);let a="",c=0;for(;e>-1;){const d=g.originalStart[e],u=g.originalEnd[e+s-1],f=o?`<span class="${o}">`:"<b>",h=o?"</span>":"</b>";a+=`${l(n.slice(c,d))}${f}${l(n.slice(d,u))}${h}`,c=u,e=t.indexOf(i,e+s)}return a+=l(n.slice(c)),a};export default w;
|
|
2
2
|
//# sourceMappingURL=highlightText.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/util/highlightText.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-expect-error\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\nfunction createLowerCaseIndexMap(text: string) {\n\tconst originalStart: number[] = [];\n\tconst originalEnd: number[] = [];\n\tlet originalIndex = 0;\n\n\tArray.from(text).forEach(character => {\n\t\tconst lowerCharacter = character.toLowerCase();\n\t\tconst end = originalIndex + character.length;\n\n\t\tArray.from({ length: lowerCharacter.length }).forEach(() => {\n\t\t\toriginalStart.push(originalIndex);\n\t\t\toriginalEnd.push(end);\n\t\t});\n\n\t\toriginalIndex = end;\n\t});\n\n\treturn {\n\t\toriginalStart,\n\t\toriginalEnd,\n\t};\n}\n\n/**\n * Highlights the occurrences of the highlightedText in the text
|
|
5
|
-
"mappings": "aACA,OAAOA,MAAe,oCAEtB,SAASC,EAAwBC,EAAc,CAC9C,MAAMC,EAA0B,CAAC,EAC3BC,EAAwB,CAAC,EAC/B,IAAIC,EAAgB,EAEpB,aAAM,KAAKH,CAAI,EAAE,QAAQI,GAAa,CACrC,MAAMC,EAAiBD,EAAU,YAAY,EACvCE,EAAMH,EAAgBC,EAAU,OAEtC,MAAM,KAAK,CAAE,OAAQC,EAAe,MAAO,CAAC,EAAE,QAAQ,IAAM,CAC3DJ,EAAc,KAAKE,CAAa,EAChCD,EAAY,KAAKI,CAAG,CACrB,CAAC,EAEDH,EAAgBG,CACjB,CAAC,EAEM,CACN,cAAAL,EACA,YAAAC,CACD,CACD,
|
|
6
|
-
"names": ["encodeXML", "createLowerCaseIndexMap", "text", "originalStart", "originalEnd", "originalIndex", "character", "lowerCharacter", "end", "highlightText", "highlightedText", "sClass", "lowerText", "lowerHighlight", "highlightLength", "index", "indexMap", "result", "lastEnd", "start"]
|
|
4
|
+
"sourcesContent": ["// @ts-expect-error\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\nfunction createLowerCaseIndexMap(text: string) {\n\tconst originalStart: number[] = [];\n\tconst originalEnd: number[] = [];\n\tlet originalIndex = 0;\n\n\tArray.from(text).forEach(character => {\n\t\tconst lowerCharacter = character.toLowerCase();\n\t\tconst end = originalIndex + character.length;\n\n\t\tArray.from({ length: lowerCharacter.length }).forEach(() => {\n\t\t\toriginalStart.push(originalIndex);\n\t\t\toriginalEnd.push(end);\n\t\t});\n\n\t\toriginalIndex = end;\n\t});\n\n\treturn {\n\t\toriginalStart,\n\t\toriginalEnd,\n\t};\n}\n\n/**\n * Highlights the occurrences of the highlightedText in the text.\n * When a CSS class is provided, matches are wrapped in `<span class=\"...\">`.\n * When no class is provided, matches are wrapped in `<b>`.\n * @param text The original text in which to highlight occurrences.\n * @param highlightedText The text to highlight within the original text.\n * @param sClass The CSS class to apply to the highlighted spans. When omitted, a `<b>` tag is used instead.\n * @returns The text with the highlighted occurrences wrapped in the appropriate tag.\n * @since 2.28.0\n */\nconst highlightText = (text: string | null | undefined, highlightedText: string | null | undefined, sClass?: string) => {\n\ttext = text || \"\";\n\thighlightedText = highlightedText || \"\";\n\n\tconst lowerText = text.toLowerCase();\n\tconst lowerHighlight = highlightedText.toLowerCase();\n\tconst highlightLength = lowerHighlight.length;\n\tlet index = lowerText.indexOf(lowerHighlight);\n\n\tif (!highlightLength || index === -1) {\n\t\treturn encodeXML(text) as string;\n\t}\n\n\t// Lowercasing can expand a single character (for example Turkish dotted \u0130).\n\t// The index map keeps the lowercase search positions aligned with the original text slices.\n\tconst indexMap = createLowerCaseIndexMap(text);\n\n\tlet result = \"\";\n\tlet lastEnd = 0;\n\n\twhile (index > -1) {\n\t\tconst start = indexMap.originalStart[index];\n\t\tconst end = indexMap.originalEnd[index + highlightLength - 1];\n\n\t\tconst open = sClass ? `<span class=\"${sClass}\">` : \"<b>\";\n\t\tconst close = sClass ? \"</span>\" : \"</b>\";\n\t\tresult += `${encodeXML(text.slice(lastEnd, start))}${open}${encodeXML(text.slice(start, end))}${close}`;\n\t\tlastEnd = end;\n\t\tindex = lowerText.indexOf(lowerHighlight, index + highlightLength);\n\t}\n\n\tresult += encodeXML(text.slice(lastEnd));\n\n\treturn result;\n};\n\nexport default highlightText;\n"],
|
|
5
|
+
"mappings": "aACA,OAAOA,MAAe,oCAEtB,SAASC,EAAwBC,EAAc,CAC9C,MAAMC,EAA0B,CAAC,EAC3BC,EAAwB,CAAC,EAC/B,IAAIC,EAAgB,EAEpB,aAAM,KAAKH,CAAI,EAAE,QAAQI,GAAa,CACrC,MAAMC,EAAiBD,EAAU,YAAY,EACvCE,EAAMH,EAAgBC,EAAU,OAEtC,MAAM,KAAK,CAAE,OAAQC,EAAe,MAAO,CAAC,EAAE,QAAQ,IAAM,CAC3DJ,EAAc,KAAKE,CAAa,EAChCD,EAAY,KAAKI,CAAG,CACrB,CAAC,EAEDH,EAAgBG,CACjB,CAAC,EAEM,CACN,cAAAL,EACA,YAAAC,CACD,CACD,CAYA,MAAMK,EAAgB,CAACP,EAAiCQ,EAA4CC,IAAoB,CACvHT,EAAOA,GAAQ,GACfQ,EAAkBA,GAAmB,GAErC,MAAME,EAAYV,EAAK,YAAY,EAC7BW,EAAiBH,EAAgB,YAAY,EAC7CI,EAAkBD,EAAe,OACvC,IAAIE,EAAQH,EAAU,QAAQC,CAAc,EAE5C,GAAI,CAACC,GAAmBC,IAAU,GACjC,OAAOf,EAAUE,CAAI,EAKtB,MAAMc,EAAWf,EAAwBC,CAAI,EAE7C,IAAIe,EAAS,GACTC,EAAU,EAEd,KAAOH,EAAQ,IAAI,CAClB,MAAMI,EAAQH,EAAS,cAAcD,CAAK,EACpCP,EAAMQ,EAAS,YAAYD,EAAQD,EAAkB,CAAC,EAEtDM,EAAOT,EAAS,gBAAgBA,CAAM,KAAO,MAC7CU,EAAQV,EAAS,UAAY,OACnCM,GAAU,GAAGjB,EAAUE,EAAK,MAAMgB,EAASC,CAAK,CAAC,CAAC,GAAGC,CAAI,GAAGpB,EAAUE,EAAK,MAAMiB,EAAOX,CAAG,CAAC,CAAC,GAAGa,CAAK,GACrGH,EAAUV,EACVO,EAAQH,EAAU,QAAQC,EAAgBE,EAAQD,CAAe,CAClE,CAEA,OAAAG,GAAUjB,EAAUE,EAAK,MAAMgB,CAAO,CAAC,EAEhCD,CACR,EAEA,eAAeR",
|
|
6
|
+
"names": ["encodeXML", "createLowerCaseIndexMap", "text", "originalStart", "originalEnd", "originalIndex", "character", "lowerCharacter", "end", "highlightText", "highlightedText", "sClass", "lowerText", "lowerHighlight", "highlightLength", "index", "indexMap", "result", "lastEnd", "start", "open", "close"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{getLocationHref as s}from"./Location.js";const a=t=>{const e=document.querySelector(`META[name="${t}"]`);return e&&e.getAttribute("content")},g=(t,e=!1)=>{const
|
|
1
|
+
"use strict";import{getLocationHref as s}from"./Location.js";const a=t=>{const e=document.querySelector(`META[name="${t}"]`);return e&&e.getAttribute("content")},g=(t,e=!1)=>{const r=a("sap-allowed-theme-origins")??a("sap-allowedThemeOrigins");return r?e?!0:r.split(",").some(n=>n==="*"||t===n.trim()):!1},l=t=>{let e,r=!1;try{if(t.startsWith(".")||t.startsWith("/")&&!t.startsWith("//")){const n=new URL(t,s()),i=new URL(s()).origin;if(n.origin!==i)return;e=n.toString(),r=!0}else{const n=t.startsWith("//")?new URL(t,s()):new URL(t),i=n.origin,o=new URL(s()).origin;if(r=i===o,i&&g(i,r))e=n.toString();else return}return e.endsWith("/")||(e=`${e}/`),`${e}UI5/`}catch{return}};export default l;
|
|
2
2
|
//# sourceMappingURL=validateThemeRoot.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validateThemeRoot.ts"],
|
|
4
|
-
"sourcesContent": ["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string, isSameOrigin: boolean = false) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowed-theme-origins\") ?? getMetaTagValue(\"sap-allowedThemeOrigins\"); // Prioritize the new meta tag name\n\n\t// If no allowed origins are specified, block.\n\tif (!allowedOrigins) {\n\t\treturn false;\n\t}\n\n\t// If it's same-origin (relative URL resolved to current page), allow it when there's any meta tag present\n\t// The presence of the meta tag indicates the user wants to use theme roots\n\tif (isSameOrigin) {\n\t\treturn true;\n\t}\n\n\treturn allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\tlet isSameOrigin = false;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || (themeRoot.startsWith(\"/\") && !themeRoot.startsWith(\"//\"))) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\
|
|
5
|
-
"mappings": "aAAA,OAAS,mBAAAA,MAAuB,gBAEhC,MAAMC,EAAmBC,GAAwB,CAChD,MAAMC,EAAU,SAAS,cAAc,cAAcD,CAAW,IAAI,EAGpE,OAFkBC,GAAWA,EAAQ,aAAa,SAAS,CAG5D,EAEMC,EAAsB,CAACC,EAAgBC,EAAwB,KAAU,CAC9E,MAAMC,EAAiBN,EAAgB,2BAA2B,GAAKA,EAAgB,yBAAyB,EAGhH,OAAKM,EAMDD,EACI,GAGDC,EAAe,MAAM,GAAG,EAAE,KAAKC,GAC9BA,IAAkB,KAAOH,IAAWG,EAAc,KAAK,CAC9D,EAXO,EAYT,EAEMC,EAAqBC,GAAsB,CAChD,IAAIC,EACAL,EAAe,GAEnB,GAAI,CACH,GAAII,EAAU,WAAW,GAAG,GAAMA,EAAU,WAAW,GAAG,GAAK,CAACA,EAAU,WAAW,IAAI,
|
|
6
|
-
"names": ["getLocationHref", "getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "isSameOrigin", "allowedOrigins", "allowedOrigin", "validateThemeRoot", "themeRoot", "resultUrl", "
|
|
4
|
+
"sourcesContent": ["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string, isSameOrigin: boolean = false) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowed-theme-origins\") ?? getMetaTagValue(\"sap-allowedThemeOrigins\"); // Prioritize the new meta tag name\n\n\t// If no allowed origins are specified, block.\n\tif (!allowedOrigins) {\n\t\treturn false;\n\t}\n\n\t// If it's same-origin (relative URL resolved to current page), allow it when there's any meta tag present\n\t// The presence of the meta tag indicates the user wants to use theme roots\n\tif (isSameOrigin) {\n\t\treturn true;\n\t}\n\n\treturn allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\tlet isSameOrigin = false;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || (themeRoot.startsWith(\"/\") && !themeRoot.startsWith(\"//\"))) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tconst resolvedUrl = new URL(themeRoot, getLocationHref());\n\t\t\tconst currentOrigin = new URL(getLocationHref()).origin;\n\n\t\t\tif (resolvedUrl.origin !== currentOrigin) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tresultUrl = resolvedUrl.toString();\n\t\t\tisSameOrigin = true;\n\t\t} else {\n\t\t\t// Protocol-relative URLs (//host/path) need a base to resolve the protocol\n\t\t\tconst themeRootURL = themeRoot.startsWith(\"//\") ? new URL(themeRoot, getLocationHref()) : new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\t\t\tconst currentOrigin = new URL(getLocationHref()).origin;\n\n\t\t\t// Check if the absolute URL is same-origin\n\t\t\tisSameOrigin = origin === currentOrigin;\n\n\t\t\tif (origin && validateThemeOrigin(origin, isSameOrigin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allowed, return undefined to indicate validation failed\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t\treturn undefined;\n\t}\n};\n\nexport default validateThemeRoot;\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,mBAAAA,MAAuB,gBAEhC,MAAMC,EAAmBC,GAAwB,CAChD,MAAMC,EAAU,SAAS,cAAc,cAAcD,CAAW,IAAI,EAGpE,OAFkBC,GAAWA,EAAQ,aAAa,SAAS,CAG5D,EAEMC,EAAsB,CAACC,EAAgBC,EAAwB,KAAU,CAC9E,MAAMC,EAAiBN,EAAgB,2BAA2B,GAAKA,EAAgB,yBAAyB,EAGhH,OAAKM,EAMDD,EACI,GAGDC,EAAe,MAAM,GAAG,EAAE,KAAKC,GAC9BA,IAAkB,KAAOH,IAAWG,EAAc,KAAK,CAC9D,EAXO,EAYT,EAEMC,EAAqBC,GAAsB,CAChD,IAAIC,EACAL,EAAe,GAEnB,GAAI,CACH,GAAII,EAAU,WAAW,GAAG,GAAMA,EAAU,WAAW,GAAG,GAAK,CAACA,EAAU,WAAW,IAAI,EAAI,CAK5F,MAAME,EAAc,IAAI,IAAIF,EAAWV,EAAgB,CAAC,EAClDa,EAAgB,IAAI,IAAIb,EAAgB,CAAC,EAAE,OAEjD,GAAIY,EAAY,SAAWC,EAC1B,OAEDF,EAAYC,EAAY,SAAS,EACjCN,EAAe,EAChB,KAAO,CAEN,MAAMQ,EAAeJ,EAAU,WAAW,IAAI,EAAI,IAAI,IAAIA,EAAWV,EAAgB,CAAC,EAAI,IAAI,IAAIU,CAAS,EACrGL,EAASS,EAAa,OACtBD,EAAgB,IAAI,IAAIb,EAAgB,CAAC,EAAE,OAKjD,GAFAM,EAAeD,IAAWQ,EAEtBR,GAAUD,EAAoBC,EAAQC,CAAY,EAErDK,EAAYG,EAAa,SAAS,MAGlC,OAEF,CAEA,OAAKH,EAAU,SAAS,GAAG,IAC1BA,EAAY,GAAGA,CAAS,KAGlB,GAAGA,CAAS,MACpB,MAAY,CAEX,MACD,CACD,EAEA,eAAeF",
|
|
6
|
+
"names": ["getLocationHref", "getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "isSameOrigin", "allowedOrigins", "allowedOrigin", "validateThemeRoot", "themeRoot", "resultUrl", "resolvedUrl", "currentOrigin", "themeRootURL"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generate markup for a raw string where a particular text is wrapped with
|
|
2
|
+
* Generate markup for a raw string where a particular text is wrapped with a `<b>` (bold) tag.
|
|
3
3
|
* All inputs to this function are considered literal text, and special characters will always be escaped.
|
|
4
4
|
* @param {string} text The text to add highlighting to
|
|
5
5
|
* @param {string} textToHighlight The text which should be highlighted
|
|
6
6
|
* @return {string} the markup HTML which contains all occurrances of the input text surrounded with a `<b>` tag.
|
|
7
|
+
* @deprecated Use `highlightText` from `@ui5/webcomponents-base/dist/util/highlightText.js` instead.
|
|
7
8
|
*/
|
|
8
9
|
declare function generateHighlightedMarkup(text: string, textToHighlight: string): string;
|
|
9
10
|
export default generateHighlightedMarkup;
|
|
@@ -6,11 +6,12 @@ function replaceAll(text, find, replace, caseInsensitive) {
|
|
|
6
6
|
return text.replaceAll(new RegExp(escapeRegex(find), `${caseInsensitive ? "i" : ""}g`), replace);
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Generate markup for a raw string where a particular text is wrapped with
|
|
9
|
+
* Generate markup for a raw string where a particular text is wrapped with a `<b>` (bold) tag.
|
|
10
10
|
* All inputs to this function are considered literal text, and special characters will always be escaped.
|
|
11
11
|
* @param {string} text The text to add highlighting to
|
|
12
12
|
* @param {string} textToHighlight The text which should be highlighted
|
|
13
13
|
* @return {string} the markup HTML which contains all occurrances of the input text surrounded with a `<b>` tag.
|
|
14
|
+
* @deprecated Use `highlightText` from `@ui5/webcomponents-base/dist/util/highlightText.js` instead.
|
|
14
15
|
*/
|
|
15
16
|
function generateHighlightedMarkup(text, textToHighlight) {
|
|
16
17
|
if (!text || !textToHighlight) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateHighlightedMarkup.js","sourceRoot":"","sources":["../../src/util/generateHighlightedMarkup.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,aAAa;AACb,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAE1D,gDAAgD;AAChD,SAAS,UAAU,CAAC,IAAY,EAAE,IAAY,EAAE,OAAiE,EAAE,eAAwB;IAC1I,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,OAAiB,CAAC,CAAC;AAC5G,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"generateHighlightedMarkup.js","sourceRoot":"","sources":["../../src/util/generateHighlightedMarkup.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,aAAa;AACb,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAE1D,gDAAgD;AAChD,SAAS,UAAU,CAAC,IAAY,EAAE,IAAY,EAAE,OAAiE,EAAE,eAAwB;IAC1I,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,OAAiB,CAAC,CAAC;AAC5G,CAAC;AAED;;;;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eRegex from \"./escapeRegex.js\";\n// @ts-ignore\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\n// utility to replace all occurances of a string\nfunction replaceAll(text: string, find: string, replace: string | ((substring: string, ...args: any[]) => string), caseInsensitive: boolean) {\n\treturn text.replaceAll(new RegExp(escapeRegex(find), `${caseInsensitive ? \"i\" : \"\"}g`), replace as string);\n}\n\n/**\n * Generate markup for a raw string where a particular text is wrapped with a `<b>` (bold) tag.\n * All inputs to this function are considered literal text, and special characters will always be escaped.\n * @param {string} text The text to add highlighting to\n * @param {string} textToHighlight The text which should be highlighted\n * @return {string} the markup HTML which contains all occurrances of the input text surrounded with a `<b>` tag.\n * @deprecated Use `highlightText` from `@ui5/webcomponents-base/dist/util/highlightText.js` instead.\n */\nfunction generateHighlightedMarkup(text: string, textToHighlight: string) {\n\tif (!text || !textToHighlight) {\n\t\treturn text;\n\t}\n\t// a token is some string that does not appear in either of the input strings\n\t// repeat the token until it does not appear in the string\n\tconst makeToken = (t: string) => {\n\t\tconst [s, e] = t.split(\"\");\n\t\twhile (text.indexOf(t) >= 0 || textToHighlight.indexOf(t) >= 0) {\n\t\t\tt = `${s}${t}${e}`;\n\t\t}\n\t\treturn t;\n\t};\n\t// It doesn't matter what characters are used as long as all 4 of them are unique\n\t// And also that encodeXML will not change these characters\n\tconst openToken = makeToken(\"12\");\n\tconst closeToken = makeToken(\"34\");\n\t// wrap every occurance of the textToHighlight using the open/close tokens (instead of markup at this point)\n\tlet result = encodeXML(replaceAll(text, textToHighlight, (match: string) => `${openToken}${match}${closeToken}`, true)) as string;\n\t// now replace the open and close tokens with the markup that we expect\n\t[[openToken, \"<b>\"], [closeToken, \"</b>\"]].forEach(([find, replace]) => {\n\t\tresult = replaceAll(result, find, replace, false);\n\t});\n\treturn result;\n}\n\nexport default generateHighlightedMarkup;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const GLOBAL_CONTENT_DENSITY_CSS_VAR = "--
|
|
1
|
+
const GLOBAL_CONTENT_DENSITY_CSS_VAR = "--_ui5_content_density";
|
|
2
2
|
const getEffectiveContentDensity = (el) => getComputedStyle(el).getPropertyValue(GLOBAL_CONTENT_DENSITY_CSS_VAR);
|
|
3
3
|
export default getEffectiveContentDensity;
|
|
4
4
|
//# sourceMappingURL=getEffectiveContentDensity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEffectiveContentDensity.js","sourceRoot":"","sources":["../../src/util/getEffectiveContentDensity.ts"],"names":[],"mappings":"AAAA,MAAM,8BAA8B,GAAG,
|
|
1
|
+
{"version":3,"file":"getEffectiveContentDensity.js","sourceRoot":"","sources":["../../src/util/getEffectiveContentDensity.ts"],"names":[],"mappings":"AAAA,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AAEhE,MAAM,0BAA0B,GAAG,CAAC,EAAe,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,gBAAgB,CAAC,8BAA8B,CAAC,CAAC;AAE9H,eAAe,0BAA0B,CAAC","sourcesContent":["const GLOBAL_CONTENT_DENSITY_CSS_VAR = \"--_ui5_content_density\";\n\nconst getEffectiveContentDensity = (el: HTMLElement) => getComputedStyle(el).getPropertyValue(GLOBAL_CONTENT_DENSITY_CSS_VAR);\n\nexport default getEffectiveContentDensity;\n"]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Highlights the occurrences of the highlightedText in the text
|
|
2
|
+
* Highlights the occurrences of the highlightedText in the text.
|
|
3
|
+
* When a CSS class is provided, matches are wrapped in `<span class="...">`.
|
|
4
|
+
* When no class is provided, matches are wrapped in `<b>`.
|
|
3
5
|
* @param text The original text in which to highlight occurrences.
|
|
4
6
|
* @param highlightedText The text to highlight within the original text.
|
|
5
|
-
* @param sClass The CSS class to apply to the highlighted spans.
|
|
6
|
-
* @returns The text with the highlighted occurrences wrapped in
|
|
7
|
+
* @param sClass The CSS class to apply to the highlighted spans. When omitted, a `<b>` tag is used instead.
|
|
8
|
+
* @returns The text with the highlighted occurrences wrapped in the appropriate tag.
|
|
7
9
|
* @since 2.28.0
|
|
8
10
|
*/
|
|
9
|
-
declare const highlightText: (text: string | null | undefined, highlightedText: string | null | undefined, sClass
|
|
11
|
+
declare const highlightText: (text: string | null | undefined, highlightedText: string | null | undefined, sClass?: string) => string;
|
|
10
12
|
export default highlightText;
|
|
@@ -19,11 +19,13 @@ function createLowerCaseIndexMap(text) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Highlights the occurrences of the highlightedText in the text
|
|
22
|
+
* Highlights the occurrences of the highlightedText in the text.
|
|
23
|
+
* When a CSS class is provided, matches are wrapped in `<span class="...">`.
|
|
24
|
+
* When no class is provided, matches are wrapped in `<b>`.
|
|
23
25
|
* @param text The original text in which to highlight occurrences.
|
|
24
26
|
* @param highlightedText The text to highlight within the original text.
|
|
25
|
-
* @param sClass The CSS class to apply to the highlighted spans.
|
|
26
|
-
* @returns The text with the highlighted occurrences wrapped in
|
|
27
|
+
* @param sClass The CSS class to apply to the highlighted spans. When omitted, a `<b>` tag is used instead.
|
|
28
|
+
* @returns The text with the highlighted occurrences wrapped in the appropriate tag.
|
|
27
29
|
* @since 2.28.0
|
|
28
30
|
*/
|
|
29
31
|
const highlightText = (text, highlightedText, sClass) => {
|
|
@@ -44,7 +46,9 @@ const highlightText = (text, highlightedText, sClass) => {
|
|
|
44
46
|
while (index > -1) {
|
|
45
47
|
const start = indexMap.originalStart[index];
|
|
46
48
|
const end = indexMap.originalEnd[index + highlightLength - 1];
|
|
47
|
-
|
|
49
|
+
const open = sClass ? `<span class="${sClass}">` : "<b>";
|
|
50
|
+
const close = sClass ? "</span>" : "</b>";
|
|
51
|
+
result += `${encodeXML(text.slice(lastEnd, start))}${open}${encodeXML(text.slice(start, end))}${close}`;
|
|
48
52
|
lastEnd = end;
|
|
49
53
|
index = lowerText.indexOf(lowerHighlight, index + highlightLength);
|
|
50
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlightText.js","sourceRoot":"","sources":["../../src/util/highlightText.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAE1D,SAAS,uBAAuB,CAAC,IAAY;IAC5C,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,IAAI,aAAa,GAAG,CAAC,CAAC;IAEtB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACpC,MAAM,cAAc,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QAC/C,MAAM,GAAG,GAAG,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC;QAE7C,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE;YAC1D,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAClC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,aAAa,GAAG,GAAG,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,OAAO;QACN,aAAa;QACb,WAAW;KACX,CAAC;AACH,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"highlightText.js","sourceRoot":"","sources":["../../src/util/highlightText.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAE1D,SAAS,uBAAuB,CAAC,IAAY;IAC5C,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,IAAI,aAAa,GAAG,CAAC,CAAC;IAEtB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACpC,MAAM,cAAc,GAAG,SAAS,CAAC,WAAW,EAA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AG,QAAQ,CAAC,WAAW,CAAC,KAAK,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC;QAE9D,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,gBAAgB,MAAM,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;QACzD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;QAC1C,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC;QACxG,OAAO,GAAG,GAAG,CAAC;QACd,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,GAAG,eAAe,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzC,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// @ts-expect-error\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\nfunction createLowerCaseIndexMap(text: string) {\n\tconst originalStart: number[] = [];\n\tconst originalEnd: number[] = [];\n\tlet originalIndex = 0;\n\n\tArray.from(text).forEach(character => {\n\t\tconst lowerCharacter = character.toLowerCase();\n\t\tconst end = originalIndex + character.length;\n\n\t\tArray.from({ length: lowerCharacter.length }).forEach(() => {\n\t\t\toriginalStart.push(originalIndex);\n\t\t\toriginalEnd.push(end);\n\t\t});\n\n\t\toriginalIndex = end;\n\t});\n\n\treturn {\n\t\toriginalStart,\n\t\toriginalEnd,\n\t};\n}\n\n/**\n * Highlights the occurrences of the highlightedText in the text.\n * When a CSS class is provided, matches are wrapped in `<span class=\"...\">`.\n * When no class is provided, matches are wrapped in `<b>`.\n * @param text The original text in which to highlight occurrences.\n * @param highlightedText The text to highlight within the original text.\n * @param sClass The CSS class to apply to the highlighted spans. When omitted, a `<b>` tag is used instead.\n * @returns The text with the highlighted occurrences wrapped in the appropriate tag.\n * @since 2.28.0\n */\nconst highlightText = (text: string | null | undefined, highlightedText: string | null | undefined, sClass?: string) => {\n\ttext = text || \"\";\n\thighlightedText = highlightedText || \"\";\n\n\tconst lowerText = text.toLowerCase();\n\tconst lowerHighlight = highlightedText.toLowerCase();\n\tconst highlightLength = lowerHighlight.length;\n\tlet index = lowerText.indexOf(lowerHighlight);\n\n\tif (!highlightLength || index === -1) {\n\t\treturn encodeXML(text) as string;\n\t}\n\n\t// Lowercasing can expand a single character (for example Turkish dotted İ).\n\t// The index map keeps the lowercase search positions aligned with the original text slices.\n\tconst indexMap = createLowerCaseIndexMap(text);\n\n\tlet result = \"\";\n\tlet lastEnd = 0;\n\n\twhile (index > -1) {\n\t\tconst start = indexMap.originalStart[index];\n\t\tconst end = indexMap.originalEnd[index + highlightLength - 1];\n\n\t\tconst open = sClass ? `<span class=\"${sClass}\">` : \"<b>\";\n\t\tconst close = sClass ? \"</span>\" : \"</b>\";\n\t\tresult += `${encodeXML(text.slice(lastEnd, start))}${open}${encodeXML(text.slice(start, end))}${close}`;\n\t\tlastEnd = end;\n\t\tindex = lowerText.indexOf(lowerHighlight, index + highlightLength);\n\t}\n\n\tresult += encodeXML(text.slice(lastEnd));\n\n\treturn result;\n};\n\nexport default highlightText;\n"]}
|
|
@@ -27,7 +27,12 @@ const validateThemeRoot = (themeRoot) => {
|
|
|
27
27
|
// new URL("/newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
|
|
28
28
|
// new URL("./newExmPath", "http://example.com/exmPath") => http://example.com/exmPath/newExmPath
|
|
29
29
|
// new URL("../newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath
|
|
30
|
-
|
|
30
|
+
const resolvedUrl = new URL(themeRoot, getLocationHref());
|
|
31
|
+
const currentOrigin = new URL(getLocationHref()).origin;
|
|
32
|
+
if (resolvedUrl.origin !== currentOrigin) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
resultUrl = resolvedUrl.toString();
|
|
31
36
|
isSameOrigin = true;
|
|
32
37
|
}
|
|
33
38
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateThemeRoot.js","sourceRoot":"","sources":["../src/validateThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,WAAW,IAAI,CAAC,EACpE,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAE7D,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,eAAwB,KAAK,EAAE,EAAE;IAC7E,MAAM,cAAc,GAAG,eAAe,CAAC,2BAA2B,CAAC,IAAI,eAAe,CAAC,yBAAyB,CAAC,CAAC,CAAC,mCAAmC;IAEtJ,8CAA8C;IAC9C,IAAI,CAAC,cAAc,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACd,CAAC;IAED,0GAA0G;IAC1G,2EAA2E;IAC3E,IAAI,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;QACrD,OAAO,aAAa,KAAK,GAAG,IAAI,MAAM,KAAK,aAAa,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC/C,IAAI,SAAS,CAAC;IACd,IAAI,YAAY,GAAG,K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gBAC3E,OAAO,SAAS,CAAC;YAClB,CAAC;QACF,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,SAAS,GAAG,GAAG,SAAS,GAAG,CAAC;QAC7B,CAAC;QAED,OAAO,GAAG,SAAS,MAAM,CAAC;IAC3B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACZ,8BAA8B;QAC9B,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string, isSameOrigin: boolean = false) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowed-theme-origins\") ?? getMetaTagValue(\"sap-allowedThemeOrigins\"); // Prioritize the new meta tag name\n\n\t// If no allowed origins are specified, block.\n\tif (!allowedOrigins) {\n\t\treturn false;\n\t}\n\n\t// If it's same-origin (relative URL resolved to current page), allow it when there's any meta tag present\n\t// The presence of the meta tag indicates the user wants to use theme roots\n\tif (isSameOrigin) {\n\t\treturn true;\n\t}\n\n\treturn allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\tlet isSameOrigin = false;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || (themeRoot.startsWith(\"/\") && !themeRoot.startsWith(\"//\"))) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tconst resolvedUrl = new URL(themeRoot, getLocationHref());\n\t\t\tconst currentOrigin = new URL(getLocationHref()).origin;\n\n\t\t\tif (resolvedUrl.origin !== currentOrigin) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tresultUrl = resolvedUrl.toString();\n\t\t\tisSameOrigin = true;\n\t\t} else {\n\t\t\t// Protocol-relative URLs (//host/path) need a base to resolve the protocol\n\t\t\tconst themeRootURL = themeRoot.startsWith(\"//\") ? new URL(themeRoot, getLocationHref()) : new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\t\t\tconst currentOrigin = new URL(getLocationHref()).origin;\n\n\t\t\t// Check if the absolute URL is same-origin\n\t\t\tisSameOrigin = origin === currentOrigin;\n\n\t\t\tif (origin && validateThemeOrigin(origin, isSameOrigin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allowed, return undefined to indicate validation failed\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t\treturn undefined;\n\t}\n};\n\nexport default validateThemeRoot;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.0-rc.1",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@openui5/sap.ui.core": "1.151.0",
|
|
67
67
|
"@sap-theming/theming-base-content": "11.36.4",
|
|
68
68
|
"@ui5/cypress-internal": "0.1.0",
|
|
69
|
-
"@ui5/webcomponents-tools": "2.
|
|
69
|
+
"@ui5/webcomponents-tools": "2.29.0-rc.1",
|
|
70
70
|
"clean-css": "^5.2.2",
|
|
71
71
|
"cypress": "15.18.1",
|
|
72
72
|
"mocha": "^11.7.2",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"customElements": "dist/custom-elements.json",
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "87edd7e1a7e71ff6b967b6102d5b31ae9c2b8287"
|
|
89
89
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--_ui5-cozy-size: var(--_ui5-f2d95f8);
|
|
13
13
|
|
|
14
14
|
--_ui5-compact-size: ;
|
|
15
|
-
--
|
|
15
|
+
--_ui5_content_density: cozy;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
[data-ui5-compact-size],
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
always considered invalid and undefined.
|
|
31
31
|
*/
|
|
32
32
|
--_ui5-compact-size: var(--_ui5-f2d95f8);
|
|
33
|
-
--
|
|
33
|
+
--_ui5_content_density: compact;
|
|
34
34
|
}
|