Skip to content

Commit

Permalink
docs: update for 12.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 committed Dec 18, 2024
1 parent ad039d9 commit 0d100f4
Show file tree
Hide file tree
Showing 78 changed files with 18,357 additions and 0 deletions.
72 changes: 72 additions & 0 deletions docs/API.html

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions docs/ClassWrapSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/DatastoreParameters.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/DatastoreShim.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/InstrumentationDescriptor.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/MessageShim.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/MessageSpec.html

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions docs/MessageSubscribeSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/MiddlewareMounterSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/MiddlewareSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/OperationSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/ParsedQueryData.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/PromiseShim.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/QuerySpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/QueueMessageParameters.html

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/RecorderSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/RenderSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/SegmentSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/Shim.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/TransactionHandle.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/TransactionShim.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/TransactionSpec.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/WebFrameworkShim.html

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/WrapSpec.html

Large diffs are not rendered by default.

1,958 changes: 1,958 additions & 0 deletions docs/api.js.html

Large diffs are not rendered by default.

Binary file added docs/fonts/Inconsolata-Regular.ttf
Binary file not shown.
Binary file added docs/fonts/OpenSans-Regular.ttf
Binary file not shown.
Binary file added docs/fonts/WorkSans-Bold.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions docs/global.html

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions docs/index.html

Large diffs are not rendered by default.

218 changes: 218 additions & 0 deletions docs/lib_instrumentation-descriptor.js.html

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions docs/lib_shim_conglomerate-shim.js.html

Large diffs are not rendered by default.

711 changes: 711 additions & 0 deletions docs/lib_shim_datastore-shim.js.html

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions docs/lib_shim_index.js.html

Large diffs are not rendered by default.

445 changes: 445 additions & 0 deletions docs/lib_shim_message-shim_index.js.html

Large diffs are not rendered by default.

628 changes: 628 additions & 0 deletions docs/lib_shim_promise-shim.js.html

Large diffs are not rendered by default.

2,096 changes: 2,096 additions & 0 deletions docs/lib_shim_shim.js.html

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions docs/lib_shim_specs_class.js.html

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions docs/lib_shim_specs_message-subscribe.js.html

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions docs/lib_shim_specs_message.js.html

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions docs/lib_shim_specs_middleware-mounter.js.html

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions docs/lib_shim_specs_middleware.js.html

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions docs/lib_shim_specs_operation.js.html

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions docs/lib_shim_specs_params_datastore.js.html

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions docs/lib_shim_specs_params_queue-message.js.html

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions docs/lib_shim_specs_query.js.html

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions docs/lib_shim_specs_recorder.js.html

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions docs/lib_shim_specs_render.js.html

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions docs/lib_shim_specs_segment.js.html

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions docs/lib_shim_specs_transaction.js.html

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions docs/lib_shim_specs_wrap.js.html

Large diffs are not rendered by default.

419 changes: 419 additions & 0 deletions docs/lib_shim_transaction-shim.js.html

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions docs/lib_shim_webframework-shim_common.js.html

Large diffs are not rendered by default.

403 changes: 403 additions & 0 deletions docs/lib_shim_webframework-shim_index.js.html

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions docs/lib_shim_webframework-shim_middleware-mounter.js.html

Large diffs are not rendered by default.

130 changes: 130 additions & 0 deletions docs/lib_transaction_handle.js.html

Large diffs are not rendered by default.

726 changes: 726 additions & 0 deletions docs/scripts/core.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions docs/scripts/core.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions docs/scripts/resize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/* global document */
// This file is @deprecated

var NAVBAR_OPTIONS = {};

(function() {
var NAVBAR_RESIZE_LOCAL_STORAGE_KEY = 'NAVBAR_RESIZE_LOCAL_STORAGE_KEY';

var navbar = document.querySelector('#navbar');
var footer = document.querySelector('#footer');
var mainSection = document.querySelector('#main');
var localStorageResizeObject = JSON.parse(
// eslint-disable-next-line no-undef
localStorage.getItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY)
);

/**
* Check whether we have any resize value in local storage or not.
* If we have resize value then resize the navbar.
**/
if (localStorageResizeObject) {
navbar.style.width = localStorageResizeObject.width;
mainSection.style.marginLeft = localStorageResizeObject.width;
footer.style.marginLeft = localStorageResizeObject.width;
}

var navbarSlider = document.querySelector('#navbar-resize');

function resizeNavbar(event) {
var pageX = event.pageX,
pageXPlusPx = event.pageX + 'px',
min = Number.parseInt(NAVBAR_OPTIONS.min, 10) || 300,
max = Number.parseInt(NAVBAR_OPTIONS.max, 10) || 600;

/**
* Just to add some checks. If min is smaller than 10 then
* user may accidentally end up reducing the size of navbar
* less than 10. In that case user will not able to resize navbar
* because navbar slider will be hidden.
*/
if (min < 10) {
min = 10;
}

/**
* Only resize if pageX in range between min and max
* allowed value.
*/
if (min < pageX && pageX < max) {
navbar.style.width = pageXPlusPx;
mainSection.style.marginLeft = pageXPlusPx;
footer.style.marginLeft = pageXPlusPx;
}
}

function setupEventListeners() {
// eslint-disable-next-line no-undef
window.addEventListener('mousemove', resizeNavbar);
// eslint-disable-next-line no-undef
window.addEventListener('touchmove', resizeNavbar);
}

function afterRemovingEventListeners() {
// eslint-disable-next-line no-undef
localStorage.setItem(
NAVBAR_RESIZE_LOCAL_STORAGE_KEY,
JSON.stringify({
width: navbar.style.width
})
);
}

function removeEventListeners() {
// eslint-disable-next-line no-undef
window.removeEventListener('mousemove', resizeNavbar);
// eslint-disable-next-line no-undef
window.removeEventListener('touchend', resizeNavbar);
afterRemovingEventListeners();
}

navbarSlider.addEventListener('mousedown', setupEventListeners);
navbarSlider.addEventListener('touchstart', setupEventListeners);
// eslint-disable-next-line no-undef
window.addEventListener('mouseup', removeEventListeners);
})();

// eslint-disable-next-line no-unused-vars
function setupResizeOptions(options) {
NAVBAR_OPTIONS = options;
}
265 changes: 265 additions & 0 deletions docs/scripts/search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
/* global document */

const searchId = 'LiBfqbJVcV';
const searchHash = '#' + searchId;
const searchContainer = document.querySelector('#PkfLWpAbet');
const searchWrapper = document.querySelector('#iCxFxjkHbP');
const searchCloseButton = document.querySelector('#VjLlGakifb');
const searchInput = document.querySelector('#vpcKVYIppa');
const resultBox = document.querySelector('#fWwVHRuDuN');

function showResultText(text) {
resultBox.innerHTML = `<span class="search-result-c-text">${text}</span>`;
}

function hideSearch() {
// eslint-disable-next-line no-undef
if (window.location.hash === searchHash) {
// eslint-disable-next-line no-undef
history.go(-1);
}

// eslint-disable-next-line no-undef
window.onhashchange = null;

if (searchContainer) {
searchContainer.style.display = 'none';
}
}

function listenCloseKey(event) {
if (event.key === 'Escape') {
hideSearch();
// eslint-disable-next-line no-undef
window.removeEventListener('keyup', listenCloseKey);
}
}

function showSearch() {
try {
// Closing mobile menu before opening
// search box.
// It is defined in core.js
// eslint-disable-next-line no-undef
hideMobileMenu();
} catch (error) {
console.error(error);
}

// eslint-disable-next-line no-undef
window.onhashchange = hideSearch;

// eslint-disable-next-line no-undef
if (window.location.hash !== searchHash) {
// eslint-disable-next-line no-undef
history.pushState(null, null, searchHash);
}

if (searchContainer) {
searchContainer.style.display = 'flex';
// eslint-disable-next-line no-undef
window.addEventListener('keyup', listenCloseKey);
}

if (searchInput) {
searchInput.focus();
}
}

async function fetchAllData() {
// eslint-disable-next-line no-undef
const { hostname, protocol, port } = location;

// eslint-disable-next-line no-undef
const base = protocol + '//' + hostname + (port !== '' ? ':' + port : '') + baseURL;
// eslint-disable-next-line no-undef
const url = new URL('data/search.json', base);
const result = await fetch(url);
const { list } = await result.json();

return list;
}

// eslint-disable-next-line no-unused-vars
function onClickSearchItem(event) {
const target = event.currentTarget;

if (target) {
const href = target.getAttribute('href') || '';
let elementId = href.split('#')[1] || '';
let element = document.getElementById(elementId);

if (!element) {
elementId = decodeURI(elementId);
element = document.getElementById(elementId);
}

if (element) {
setTimeout(function() {
// eslint-disable-next-line no-undef
bringElementIntoView(element); // defined in core.js
}, 100);
}
}
}

function buildSearchResult(result) {
let output = '';
const removeHTMLTagsRegExp = /(<([^>]+)>)/ig;

for (const res of result) {
const { title = '', description = '' } = res.item;

const _link = res.item.link.replace('<a href="', '').replace(/">.*/, '');
const _title = title.replace(removeHTMLTagsRegExp, "");
const _description = description.replace(removeHTMLTagsRegExp, "");

output += `
<a onclick="onClickSearchItem(event)" href="${_link}" class="search-result-item">
<div class="search-result-item-title">${_title}</div>
<div class="search-result-item-p">${_description || 'No description available.'}</div>
</a>
`;
}

return output;
}

function getSearchResult(list, keys, searchKey) {
const defaultOptions = {
shouldSort: true,
threshold: 0.4,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: keys
};

const options = { ...defaultOptions };

// eslint-disable-next-line no-undef
const searchIndex = Fuse.createIndex(options.keys, list);

// eslint-disable-next-line no-undef
const fuse = new Fuse(list, options, searchIndex);

const result = fuse.search(searchKey);

if (result.length > 20) {
return result.slice(0, 20);
}

return result;
}

function debounce(func, wait, immediate) {
let timeout;

return function() {
const args = arguments;

clearTimeout(timeout);
timeout = setTimeout(() => {
timeout = null;
if (!immediate) {
// eslint-disable-next-line consistent-this, no-invalid-this
func.apply(this, args);
}
}, wait);

if (immediate && !timeout) {
// eslint-disable-next-line consistent-this, no-invalid-this
func.apply(this, args);
}
};
}

let searchData;

async function search(event) {
const value = event.target.value;
const keys = ['title', 'description'];

if (!resultBox) {
console.error('Search result container not found');

return;
}

if (!value) {
showResultText('Type anything to view search result');

return;
}

if (!searchData) {
showResultText('Loading...');

try {
// eslint-disable-next-line require-atomic-updates
searchData = await fetchAllData();
} catch (e) {
console.log(e);
showResultText('Failed to load result.');

return;
}
}

const result = getSearchResult(searchData, keys, value);

if (!result.length) {
showResultText('No result found! Try some different combination.');

return;
}

// eslint-disable-next-line require-atomic-updates
resultBox.innerHTML = buildSearchResult(result);
}

function onDomContentLoaded() {
const searchButton = document.querySelectorAll('.search-button');
const debouncedSearch = debounce(search, 300);

if (searchCloseButton) {
searchCloseButton.addEventListener('click', hideSearch);
}

if (searchButton) {
searchButton.forEach(function(item) {
item.addEventListener('click', showSearch);
});
}

if (searchContainer) {
searchContainer.addEventListener('click', hideSearch);
}

if (searchWrapper) {
searchWrapper.addEventListener('click', function(event) {
event.stopPropagation();
});
}

if (searchInput) {
searchInput.addEventListener('keyup', debouncedSearch);
}

// eslint-disable-next-line no-undef
if (window.location.hash === searchHash) {
showSearch();
}
}

// eslint-disable-next-line no-undef
window.addEventListener('DOMContentLoaded', onDomContentLoaded);

// eslint-disable-next-line no-undef
window.addEventListener('hashchange', function() {
// eslint-disable-next-line no-undef
if (window.location.hash === searchHash) {
showSearch();
}
});
Loading

0 comments on commit 0d100f4

Please sign in to comment.