Skip to content

Commit 6436a71

Browse files
author
svetlanabrennan
committed
docs: update for 12.8.2
1 parent f83e039 commit 6436a71

File tree

78 files changed

+18357
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+18357
-0
lines changed

docs/API.html

Lines changed: 72 additions & 0 deletions
Large diffs are not rendered by default.

docs/ClassWrapSpec.html

Lines changed: 17 additions & 0 deletions
Large diffs are not rendered by default.

docs/DatastoreParameters.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/DatastoreShim.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/InstrumentationDescriptor.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/MessageShim.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/MessageSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/MessageSubscribeSpec.html

Lines changed: 18 additions & 0 deletions
Large diffs are not rendered by default.

docs/MiddlewareMounterSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/MiddlewareSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/OperationSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/ParsedQueryData.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/PromiseShim.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/QuerySpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/QueueMessageParameters.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/RecorderSpec.html

Lines changed: 11 additions & 0 deletions
Large diffs are not rendered by default.

docs/RenderSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/SegmentSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/Shim.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/TransactionHandle.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/TransactionShim.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/TransactionSpec.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/WebFrameworkShim.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/WrapSpec.html

Lines changed: 10 additions & 0 deletions
Large diffs are not rendered by default.

docs/api.js.html

Lines changed: 1958 additions & 0 deletions
Large diffs are not rendered by default.

docs/fonts/Inconsolata-Regular.ttf

95.6 KB
Binary file not shown.

docs/fonts/OpenSans-Regular.ttf

127 KB
Binary file not shown.

docs/fonts/WorkSans-Bold.ttf

188 KB
Binary file not shown.

docs/global.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 45 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_instrumentation-descriptor.js.html

Lines changed: 218 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_conglomerate-shim.js.html

Lines changed: 86 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_datastore-shim.js.html

Lines changed: 711 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_index.js.html

Lines changed: 58 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_message-shim_index.js.html

Lines changed: 445 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_promise-shim.js.html

Lines changed: 628 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_shim.js.html

Lines changed: 2096 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_class.js.html

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_message-subscribe.js.html

Lines changed: 69 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_message.js.html

Lines changed: 116 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_middleware-mounter.js.html

Lines changed: 86 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_middleware.js.html

Lines changed: 153 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_operation.js.html

Lines changed: 53 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_params_datastore.js.html

Lines changed: 43 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_params_queue-message.js.html

Lines changed: 36 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_query.js.html

Lines changed: 56 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_recorder.js.html

Lines changed: 133 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_render.js.html

Lines changed: 46 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_segment.js.html

Lines changed: 117 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_transaction.js.html

Lines changed: 61 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_specs_wrap.js.html

Lines changed: 62 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_transaction-shim.js.html

Lines changed: 419 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_webframework-shim_common.js.html

Lines changed: 91 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_webframework-shim_index.js.html

Lines changed: 403 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_shim_webframework-shim_middleware-mounter.js.html

Lines changed: 120 additions & 0 deletions
Large diffs are not rendered by default.

docs/lib_transaction_handle.js.html

Lines changed: 130 additions & 0 deletions
Large diffs are not rendered by default.

docs/scripts/core.js

Lines changed: 726 additions & 0 deletions
Large diffs are not rendered by default.

docs/scripts/core.min.js

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/scripts/resize.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/* global document */
2+
// This file is @deprecated
3+
4+
var NAVBAR_OPTIONS = {};
5+
6+
(function() {
7+
var NAVBAR_RESIZE_LOCAL_STORAGE_KEY = 'NAVBAR_RESIZE_LOCAL_STORAGE_KEY';
8+
9+
var navbar = document.querySelector('#navbar');
10+
var footer = document.querySelector('#footer');
11+
var mainSection = document.querySelector('#main');
12+
var localStorageResizeObject = JSON.parse(
13+
// eslint-disable-next-line no-undef
14+
localStorage.getItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY)
15+
);
16+
17+
/**
18+
* Check whether we have any resize value in local storage or not.
19+
* If we have resize value then resize the navbar.
20+
**/
21+
if (localStorageResizeObject) {
22+
navbar.style.width = localStorageResizeObject.width;
23+
mainSection.style.marginLeft = localStorageResizeObject.width;
24+
footer.style.marginLeft = localStorageResizeObject.width;
25+
}
26+
27+
var navbarSlider = document.querySelector('#navbar-resize');
28+
29+
function resizeNavbar(event) {
30+
var pageX = event.pageX,
31+
pageXPlusPx = event.pageX + 'px',
32+
min = Number.parseInt(NAVBAR_OPTIONS.min, 10) || 300,
33+
max = Number.parseInt(NAVBAR_OPTIONS.max, 10) || 600;
34+
35+
/**
36+
* Just to add some checks. If min is smaller than 10 then
37+
* user may accidentally end up reducing the size of navbar
38+
* less than 10. In that case user will not able to resize navbar
39+
* because navbar slider will be hidden.
40+
*/
41+
if (min < 10) {
42+
min = 10;
43+
}
44+
45+
/**
46+
* Only resize if pageX in range between min and max
47+
* allowed value.
48+
*/
49+
if (min < pageX && pageX < max) {
50+
navbar.style.width = pageXPlusPx;
51+
mainSection.style.marginLeft = pageXPlusPx;
52+
footer.style.marginLeft = pageXPlusPx;
53+
}
54+
}
55+
56+
function setupEventListeners() {
57+
// eslint-disable-next-line no-undef
58+
window.addEventListener('mousemove', resizeNavbar);
59+
// eslint-disable-next-line no-undef
60+
window.addEventListener('touchmove', resizeNavbar);
61+
}
62+
63+
function afterRemovingEventListeners() {
64+
// eslint-disable-next-line no-undef
65+
localStorage.setItem(
66+
NAVBAR_RESIZE_LOCAL_STORAGE_KEY,
67+
JSON.stringify({
68+
width: navbar.style.width
69+
})
70+
);
71+
}
72+
73+
function removeEventListeners() {
74+
// eslint-disable-next-line no-undef
75+
window.removeEventListener('mousemove', resizeNavbar);
76+
// eslint-disable-next-line no-undef
77+
window.removeEventListener('touchend', resizeNavbar);
78+
afterRemovingEventListeners();
79+
}
80+
81+
navbarSlider.addEventListener('mousedown', setupEventListeners);
82+
navbarSlider.addEventListener('touchstart', setupEventListeners);
83+
// eslint-disable-next-line no-undef
84+
window.addEventListener('mouseup', removeEventListeners);
85+
})();
86+
87+
// eslint-disable-next-line no-unused-vars
88+
function setupResizeOptions(options) {
89+
NAVBAR_OPTIONS = options;
90+
}

docs/scripts/search.js

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
/* global document */
2+
3+
const searchId = 'LiBfqbJVcV';
4+
const searchHash = '#' + searchId;
5+
const searchContainer = document.querySelector('#PkfLWpAbet');
6+
const searchWrapper = document.querySelector('#iCxFxjkHbP');
7+
const searchCloseButton = document.querySelector('#VjLlGakifb');
8+
const searchInput = document.querySelector('#vpcKVYIppa');
9+
const resultBox = document.querySelector('#fWwVHRuDuN');
10+
11+
function showResultText(text) {
12+
resultBox.innerHTML = `<span class="search-result-c-text">${text}</span>`;
13+
}
14+
15+
function hideSearch() {
16+
// eslint-disable-next-line no-undef
17+
if (window.location.hash === searchHash) {
18+
// eslint-disable-next-line no-undef
19+
history.go(-1);
20+
}
21+
22+
// eslint-disable-next-line no-undef
23+
window.onhashchange = null;
24+
25+
if (searchContainer) {
26+
searchContainer.style.display = 'none';
27+
}
28+
}
29+
30+
function listenCloseKey(event) {
31+
if (event.key === 'Escape') {
32+
hideSearch();
33+
// eslint-disable-next-line no-undef
34+
window.removeEventListener('keyup', listenCloseKey);
35+
}
36+
}
37+
38+
function showSearch() {
39+
try {
40+
// Closing mobile menu before opening
41+
// search box.
42+
// It is defined in core.js
43+
// eslint-disable-next-line no-undef
44+
hideMobileMenu();
45+
} catch (error) {
46+
console.error(error);
47+
}
48+
49+
// eslint-disable-next-line no-undef
50+
window.onhashchange = hideSearch;
51+
52+
// eslint-disable-next-line no-undef
53+
if (window.location.hash !== searchHash) {
54+
// eslint-disable-next-line no-undef
55+
history.pushState(null, null, searchHash);
56+
}
57+
58+
if (searchContainer) {
59+
searchContainer.style.display = 'flex';
60+
// eslint-disable-next-line no-undef
61+
window.addEventListener('keyup', listenCloseKey);
62+
}
63+
64+
if (searchInput) {
65+
searchInput.focus();
66+
}
67+
}
68+
69+
async function fetchAllData() {
70+
// eslint-disable-next-line no-undef
71+
const { hostname, protocol, port } = location;
72+
73+
// eslint-disable-next-line no-undef
74+
const base = protocol + '//' + hostname + (port !== '' ? ':' + port : '') + baseURL;
75+
// eslint-disable-next-line no-undef
76+
const url = new URL('data/search.json', base);
77+
const result = await fetch(url);
78+
const { list } = await result.json();
79+
80+
return list;
81+
}
82+
83+
// eslint-disable-next-line no-unused-vars
84+
function onClickSearchItem(event) {
85+
const target = event.currentTarget;
86+
87+
if (target) {
88+
const href = target.getAttribute('href') || '';
89+
let elementId = href.split('#')[1] || '';
90+
let element = document.getElementById(elementId);
91+
92+
if (!element) {
93+
elementId = decodeURI(elementId);
94+
element = document.getElementById(elementId);
95+
}
96+
97+
if (element) {
98+
setTimeout(function() {
99+
// eslint-disable-next-line no-undef
100+
bringElementIntoView(element); // defined in core.js
101+
}, 100);
102+
}
103+
}
104+
}
105+
106+
function buildSearchResult(result) {
107+
let output = '';
108+
const removeHTMLTagsRegExp = /(<([^>]+)>)/ig;
109+
110+
for (const res of result) {
111+
const { title = '', description = '' } = res.item;
112+
113+
const _link = res.item.link.replace('<a href="', '').replace(/">.*/, '');
114+
const _title = title.replace(removeHTMLTagsRegExp, "");
115+
const _description = description.replace(removeHTMLTagsRegExp, "");
116+
117+
output += `
118+
<a onclick="onClickSearchItem(event)" href="${_link}" class="search-result-item">
119+
<div class="search-result-item-title">${_title}</div>
120+
<div class="search-result-item-p">${_description || 'No description available.'}</div>
121+
</a>
122+
`;
123+
}
124+
125+
return output;
126+
}
127+
128+
function getSearchResult(list, keys, searchKey) {
129+
const defaultOptions = {
130+
shouldSort: true,
131+
threshold: 0.4,
132+
location: 0,
133+
distance: 100,
134+
maxPatternLength: 32,
135+
minMatchCharLength: 1,
136+
keys: keys
137+
};
138+
139+
const options = { ...defaultOptions };
140+
141+
// eslint-disable-next-line no-undef
142+
const searchIndex = Fuse.createIndex(options.keys, list);
143+
144+
// eslint-disable-next-line no-undef
145+
const fuse = new Fuse(list, options, searchIndex);
146+
147+
const result = fuse.search(searchKey);
148+
149+
if (result.length > 20) {
150+
return result.slice(0, 20);
151+
}
152+
153+
return result;
154+
}
155+
156+
function debounce(func, wait, immediate) {
157+
let timeout;
158+
159+
return function() {
160+
const args = arguments;
161+
162+
clearTimeout(timeout);
163+
timeout = setTimeout(() => {
164+
timeout = null;
165+
if (!immediate) {
166+
// eslint-disable-next-line consistent-this, no-invalid-this
167+
func.apply(this, args);
168+
}
169+
}, wait);
170+
171+
if (immediate && !timeout) {
172+
// eslint-disable-next-line consistent-this, no-invalid-this
173+
func.apply(this, args);
174+
}
175+
};
176+
}
177+
178+
let searchData;
179+
180+
async function search(event) {
181+
const value = event.target.value;
182+
const keys = ['title', 'description'];
183+
184+
if (!resultBox) {
185+
console.error('Search result container not found');
186+
187+
return;
188+
}
189+
190+
if (!value) {
191+
showResultText('Type anything to view search result');
192+
193+
return;
194+
}
195+
196+
if (!searchData) {
197+
showResultText('Loading...');
198+
199+
try {
200+
// eslint-disable-next-line require-atomic-updates
201+
searchData = await fetchAllData();
202+
} catch (e) {
203+
console.log(e);
204+
showResultText('Failed to load result.');
205+
206+
return;
207+
}
208+
}
209+
210+
const result = getSearchResult(searchData, keys, value);
211+
212+
if (!result.length) {
213+
showResultText('No result found! Try some different combination.');
214+
215+
return;
216+
}
217+
218+
// eslint-disable-next-line require-atomic-updates
219+
resultBox.innerHTML = buildSearchResult(result);
220+
}
221+
222+
function onDomContentLoaded() {
223+
const searchButton = document.querySelectorAll('.search-button');
224+
const debouncedSearch = debounce(search, 300);
225+
226+
if (searchCloseButton) {
227+
searchCloseButton.addEventListener('click', hideSearch);
228+
}
229+
230+
if (searchButton) {
231+
searchButton.forEach(function(item) {
232+
item.addEventListener('click', showSearch);
233+
});
234+
}
235+
236+
if (searchContainer) {
237+
searchContainer.addEventListener('click', hideSearch);
238+
}
239+
240+
if (searchWrapper) {
241+
searchWrapper.addEventListener('click', function(event) {
242+
event.stopPropagation();
243+
});
244+
}
245+
246+
if (searchInput) {
247+
searchInput.addEventListener('keyup', debouncedSearch);
248+
}
249+
250+
// eslint-disable-next-line no-undef
251+
if (window.location.hash === searchHash) {
252+
showSearch();
253+
}
254+
}
255+
256+
// eslint-disable-next-line no-undef
257+
window.addEventListener('DOMContentLoaded', onDomContentLoaded);
258+
259+
// eslint-disable-next-line no-undef
260+
window.addEventListener('hashchange', function() {
261+
// eslint-disable-next-line no-undef
262+
if (window.location.hash === searchHash) {
263+
showSearch();
264+
}
265+
});

0 commit comments

Comments
 (0)