@patternfly/documentation-framework 6.44.0 → 6.44.2
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
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.44.2 (2026-06-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **CopyIcon:** Replace with brand icon ([#5036](https://github.com/patternfly/patternfly-org/issues/5036)) ([e628208](https://github.com/patternfly/patternfly-org/commit/e6282081668ed61fd3f22960e9dc96a036c4548e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 6.44.1 (2026-06-04)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# 6.44.0 (2026-05-26)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -4,7 +4,7 @@ import { CodeEditor, CodeEditorControl, Language } from '@patternfly/react-code-
|
|
|
4
4
|
import { convertToJSX } from '@patternfly/ast-helpers';
|
|
5
5
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
6
6
|
import CodepenIcon from '@patternfly/react-icons/dist/esm/icons/codepen-icon';
|
|
7
|
-
import
|
|
7
|
+
import RhUiCopyIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-copy-icon';
|
|
8
8
|
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
|
|
9
9
|
import AngleDoubleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-double-right-icon';
|
|
10
10
|
import ReplyAllIcon from '@patternfly/react-icons/dist/esm/icons/reply-all-icon';
|
|
@@ -107,7 +107,7 @@ export const ExampleToolbar = ({
|
|
|
107
107
|
aria-label={copyAriaLabel}
|
|
108
108
|
className={editorControlProps.className}
|
|
109
109
|
>
|
|
110
|
-
<
|
|
110
|
+
<RhUiCopyIcon />
|
|
111
111
|
</Button>
|
|
112
112
|
</Tooltip>
|
|
113
113
|
{codeBoxParams &&
|
|
@@ -192,6 +192,33 @@ const HeaderTools = ({
|
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
// https://github.com/algolia/autocomplete.js#global-options
|
|
195
|
+
const hitDataByUrl = {};
|
|
196
|
+
let lastAlgoliaQueryID = null;
|
|
197
|
+
|
|
198
|
+
// DocSearch v2 discards queryID from Algolia responses, so intercept XHR to capture it
|
|
199
|
+
if (typeof XMLHttpRequest !== 'undefined') {
|
|
200
|
+
const origOpen = XMLHttpRequest.prototype.open;
|
|
201
|
+
XMLHttpRequest.prototype.open = function(method, url) {
|
|
202
|
+
this._algoliaUrl = typeof url === 'string' && url.includes('.algolia.') ? url : null;
|
|
203
|
+
return origOpen.apply(this, arguments);
|
|
204
|
+
};
|
|
205
|
+
const origSend = XMLHttpRequest.prototype.send;
|
|
206
|
+
XMLHttpRequest.prototype.send = function(body) {
|
|
207
|
+
if (this._algoliaUrl) {
|
|
208
|
+
this.addEventListener('load', function() {
|
|
209
|
+
try {
|
|
210
|
+
const data = JSON.parse(this.responseText);
|
|
211
|
+
const result = data.results ? data.results[0] : data;
|
|
212
|
+
if (result && result.queryID) {
|
|
213
|
+
lastAlgoliaQueryID = result.queryID;
|
|
214
|
+
}
|
|
215
|
+
} catch (e) {}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
return origSend.apply(this, arguments);
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
195
222
|
export function attachDocSearch(algolia, inputSelector, timeout) {
|
|
196
223
|
if (window.docsearch) {
|
|
197
224
|
return window.docsearch({
|
|
@@ -200,6 +227,40 @@ export function attachDocSearch(algolia, inputSelector, timeout) {
|
|
|
200
227
|
hint: false,
|
|
201
228
|
appendTo: `.ws-global-search .pf-v6-c-text-input-group`
|
|
202
229
|
},
|
|
230
|
+
algoliaOptions: {
|
|
231
|
+
clickAnalytics: true
|
|
232
|
+
},
|
|
233
|
+
transformData: function(hits) {
|
|
234
|
+
Object.keys(hitDataByUrl).forEach(k => delete hitDataByUrl[k]);
|
|
235
|
+
hits.forEach((hit, index) => {
|
|
236
|
+
if (hit.url && hit.objectID) {
|
|
237
|
+
hitDataByUrl[hit.url] = {
|
|
238
|
+
objectID: hit.objectID,
|
|
239
|
+
position: index + 1
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
return hits;
|
|
244
|
+
},
|
|
245
|
+
handleSelected: function(input, event, suggestion, datasetNumber, context) {
|
|
246
|
+
const hitData = hitDataByUrl[suggestion.url];
|
|
247
|
+
if (!window.__algoliaInsightsDisabled && window.aa && hitData && lastAlgoliaQueryID) {
|
|
248
|
+
window.aa('clickedObjectIDsAfterSearch', {
|
|
249
|
+
eventName: 'Search Result Clicked',
|
|
250
|
+
index: algolia.indexName,
|
|
251
|
+
queryID: lastAlgoliaQueryID,
|
|
252
|
+
objectIDs: [hitData.objectID],
|
|
253
|
+
positions: [hitData.position]
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
if (event && (event.metaKey || event.ctrlKey)) {
|
|
257
|
+
window.open(suggestion.url, '_blank');
|
|
258
|
+
} else if (event && event.shiftKey) {
|
|
259
|
+
window.open(suggestion.url);
|
|
260
|
+
} else {
|
|
261
|
+
window.location.href = suggestion.url;
|
|
262
|
+
}
|
|
263
|
+
},
|
|
203
264
|
debug: process.env.NODE_ENV !== 'production',
|
|
204
265
|
...algolia
|
|
205
266
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/documentation-framework",
|
|
3
3
|
"description": "A framework to build documentation for PatternFly.",
|
|
4
|
-
"version": "6.44.
|
|
4
|
+
"version": "6.44.2",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"http-cache-semantics": ">=4.1.1",
|
|
93
93
|
"nanoid": "3.3.8"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "ce93cf545b3104b6c159770821ab8e65b741460b"
|
|
96
96
|
}
|
package/templates/html.ejs
CHANGED
|
@@ -46,6 +46,24 @@
|
|
|
46
46
|
media="print"
|
|
47
47
|
onload="this.media='all'; this.onload=null;"
|
|
48
48
|
>
|
|
49
|
+
<script>
|
|
50
|
+
var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@2/dist/search-insights.min.js";
|
|
51
|
+
!function(e,a,t,n,s,i,c){e.AlgoliaAnalyticsObject=s;e[s]=e[s]||function(){
|
|
52
|
+
(e[s].queue=e[s].queue||[]).push(arguments)};i=a.createElement(t);c=a.getElementsByTagName(t)[0];
|
|
53
|
+
i.async=1;i.src=n;c.parentNode.insertBefore(i,c)}(window,document,"script",ALGOLIA_INSIGHTS_SRC,"aa");
|
|
54
|
+
</script>
|
|
55
|
+
<script>
|
|
56
|
+
if(!(parseInt(navigator.doNotTrack) === 1 || parseInt(window.doNotTrack) === 1 || parseInt(navigator.msDoNotTrack) === 1 || navigator.doNotTrack === "yes")) {
|
|
57
|
+
aa('init', {
|
|
58
|
+
appId: '<%= algolia.appId %>',
|
|
59
|
+
apiKey: '<%= algolia.apiKey %>',
|
|
60
|
+
useCookie: true,
|
|
61
|
+
useSendBeacon: true
|
|
62
|
+
});
|
|
63
|
+
} else {
|
|
64
|
+
window.__algoliaInsightsDisabled = true;
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
49
67
|
<% } %>
|
|
50
68
|
<% if (googleAnalyticsID) { %>
|
|
51
69
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|