This is an automated email from the ASF dual-hosted git repository. shazwazza pushed a commit to branch docs-poc in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 3c6a7d874dbad50eb804ae6719542de4d506e3fb Author: Shannon <[email protected]> AuthorDate: Tue Jun 2 00:30:06 2020 +1000 Gets sub-sites almost working, no xref support between them but they build and render pretty well --- .../ManagedReference.common.js | 275 ++++++++++++++++++ .../ManagedReference.extension.js | 34 +++ .../ManagedReference.html.primary.js | 59 ++++ .../ManagedReference.html.primary.tmpl | 13 + .../DefaultTemplateNoAssets/RestApi.common.js | 309 +++++++++++++++++++++ .../DefaultTemplateNoAssets/RestApi.extension.js | 34 +++ .../RestApi.html.primary.js | 44 +++ .../RestApi.html.primary.tmpl | 3 + .../UniversalReference.common.js | 308 ++++++++++++++++++++ .../UniversalReference.extension.js | 34 +++ .../UniversalReference.html.primary.js | 47 ++++ .../UniversalReference.html.primary.tmpl | 12 + websites/apidocs/DefaultTemplateNoAssets/common.js | 235 ++++++++++++++++ .../conceptual.extension.js | 34 +++ .../conceptual.html.primary.js | 38 +++ .../conceptual.html.primary.tmpl | 4 + .../apidocs/DefaultTemplateNoAssets/favicon.ico | Bin 0 -> 99678 bytes .../DefaultTemplateNoAssets/layout/_master.tmpl | 55 ++++ websites/apidocs/DefaultTemplateNoAssets/logo.svg | 45 +++ .../DefaultTemplateNoAssets/partials/_affix.liquid | 24 ++ .../partials/_breadcrumb.liquid | 8 + .../partials/_footer.liquid | 16 ++ .../DefaultTemplateNoAssets/partials/_head.liquid | 38 +++ .../DefaultTemplateNoAssets/partials/_logo.liquid | 8 + .../partials/_navbar.liquid | 21 ++ .../partials/_scripts.liquid | 4 + .../DefaultTemplateNoAssets/partials/_toc.liquid | 7 + .../partials/affix.tmpl.partial | 25 ++ .../partials/breadcrumb.tmpl.partial | 9 + .../partials/class.header.tmpl.partial | 121 ++++++++ .../partials/class.tmpl.partial | 234 ++++++++++++++++ .../partials/classSubtitle.tmpl.partial | 28 ++ .../partials/customMREFContent.tmpl.partial | 2 + .../partials/dd-li.tmpl.partial | 3 + .../partials/enum.tmpl.partial | 50 ++++ .../partials/footer.tmpl.partial | 14 + .../partials/head.tmpl.partial | 20 ++ .../partials/li.tmpl.partial | 30 ++ .../partials/logo.tmpl.partial | 5 + .../partials/namespace.tmpl.partial | 13 + .../partials/namespaceSubtitle.tmpl.partial | 16 ++ .../partials/navbar.tmpl.partial | 22 ++ .../partials/rest.child.tmpl.partial | 87 ++++++ .../partials/rest.tmpl.partial | 37 +++ .../partials/scripts.tmpl.partial | 5 + .../partials/searchResults.tmpl.partial | 9 + .../partials/title.tmpl.partial | 43 +++ .../partials/toc.tmpl.partial | 8 + .../partials/uref/class.header.tmpl.partial | 43 +++ .../partials/uref/class.tmpl.partial | 235 ++++++++++++++++ .../partials/uref/enum.tmpl.partial | 35 +++ .../partials/uref/parameters.tmpl.partial | 28 ++ .../DefaultTemplateNoAssets/search-stopwords.json | 121 ++++++++ .../DefaultTemplateNoAssets/toc.extension.js | 34 +++ .../apidocs/DefaultTemplateNoAssets/toc.html.js | 57 ++++ .../apidocs/DefaultTemplateNoAssets/toc.html.tmpl | 21 ++ .../apidocs/DefaultTemplateNoAssets/token.json | 46 +++ .../LuceneTemplate/ManagedReference.extension.js | 41 +++ .../LuceneTemplate/partials/logo.tmpl.partial | 5 + .../styles/main.css | 0 .../styles/main.js | 0 websites/apidocs/api/toc.yml | 81 ------ websites/apidocs/docfx.core.json | 29 +- websites/apidocs/docfx.json | 2 +- websites/apidocs/docfx.site.json | 36 +++ websites/apidocs/docfx.test-framework.json | 29 +- websites/apidocs/docs.ps1 | 39 ++- websites/apidocs/filterConfig.yml | 5 +- websites/apidocs/lucenetemplate/web.config | 29 -- websites/apidocs/toc.yml | 3 +- websites/apidocs/toc/subsite/toc.yml | 6 + 71 files changed, 3245 insertions(+), 170 deletions(-) diff --git a/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.common.js b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.common.js new file mode 100644 index 0000000..90bc1df --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.common.js @@ -0,0 +1,275 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. +var common = require('./common.js'); +var classCategory = 'class'; +var namespaceCategory = 'ns'; + +exports.transform = function (model) { + + if (!model) return null; + + langs = model.langs; + handleItem(model, model._gitContribute, model._gitUrlPattern); + if (model.children) { + model.children.forEach(function (item) { + handleItem(item, model._gitContribute, model._gitUrlPattern); + }); + } + + if (model.type) { + switch (model.type.toLowerCase()) { + case 'namespace': + model.isNamespace = true; + if (model.children) groupChildren(model, namespaceCategory); + break; + case 'class': + case 'interface': + case 'struct': + case 'delegate': + case 'enum': + model.isClass = true; + if (model.children) groupChildren(model, classCategory); + model[getTypePropertyName(model.type)] = true; + break; + default: + break; + } + } + + return model; +} + +exports.getBookmarks = function (model, ignoreChildren) { + if (!model || !model.type || model.type.toLowerCase() === "namespace") return null; + + var bookmarks = {}; + + if (typeof ignoreChildren == 'undefined' || ignoreChildren === false) { + if (model.children) { + model.children.forEach(function (item) { + bookmarks[item.uid] = common.getHtmlId(item.uid); + if (item.overload && item.overload.uid) { + bookmarks[item.overload.uid] = common.getHtmlId(item.overload.uid); + } + }); + } + } + + // Reference's first level bookmark should have no anchor + bookmarks[model.uid] = ""; + return bookmarks; +} + +exports.groupChildren = groupChildren; +exports.getTypePropertyName = getTypePropertyName; +exports.getCategory = getCategory; + +function groupChildren(model, category) { + if (!model || !model.type) { + return; + } + var typeChildrenItems = getDefinitions(category); + var grouped = {}; + + model.children.forEach(function (c) { + if (c.isEii) { + var type = "eii"; + } else { + var type = c.type.toLowerCase(); + } + if (!grouped.hasOwnProperty(type)) { + grouped[type] = []; + } + // special handle for field + if (type === "field" && c.syntax) { + c.syntax.fieldValue = c.syntax.return; + c.syntax.return = undefined; + } + // special handle for property + if ((type === "property" || type === "attachedproperty") && c.syntax) { + c.syntax.propertyValue = c.syntax.return; + c.syntax.return = undefined; + } + // special handle for event + if ((type === "event" || type === "attachedevent") && c.syntax) { + c.syntax.eventType = c.syntax.return; + c.syntax.return = undefined; + } + grouped[type].push(c); + }) + + var children = []; + for (var key in typeChildrenItems) { + if (typeChildrenItems.hasOwnProperty(key) && grouped.hasOwnProperty(key)) { + var typeChildrenItem = typeChildrenItems[key]; + var items = grouped[key]; + if (items && items.length > 0) { + var item = {}; + for (var itemKey in typeChildrenItem) { + if (typeChildrenItem.hasOwnProperty(itemKey)) { + item[itemKey] = typeChildrenItem[itemKey]; + } + } + item.children = items; + children.push(item); + } + } + } + + model.children = children; +} + +function getTypePropertyName(type) { + if (!type) { + return undefined; + } + var loweredType = type.toLowerCase(); + var definition = getDefinition(loweredType); + if (definition) { + return definition.typePropertyName; + } + + return undefined; +} + +function getCategory(type) { + var classItems = getDefinitions(classCategory); + if (classItems.hasOwnProperty(type)) { + return classCategory; + } + + var namespaceItems = getDefinitions(namespaceCategory); + if (namespaceItems.hasOwnProperty(type)) { + return namespaceCategory; + } + return undefined; +} + +function getDefinition(type) { + var classItems = getDefinitions(classCategory); + if (classItems.hasOwnProperty(type)) { + return classItems[type]; + } + var namespaceItems = getDefinitions(namespaceCategory); + if (namespaceItems.hasOwnProperty(type)) { + return namespaceItems[type]; + } + return undefined; +} + +function getDefinitions(category) { + var namespaceItems = { + "class": { inClass: true, typePropertyName: "inClass", id: "classes" }, + "struct": { inStruct: true, typePropertyName: "inStruct", id: "structs" }, + "interface": { inInterface: true, typePropertyName: "inInterface", id: "interfaces" }, + "enum": { inEnum: true, typePropertyName: "inEnum", id: "enums" }, + "delegate": { inDelegate: true, typePropertyName: "inDelegate", id: "delegates" } + }; + var classItems = { + "constructor": { inConstructor: true, typePropertyName: "inConstructor", id: "constructors" }, + "field": { inField: true, typePropertyName: "inField", id: "fields" }, + "property": { inProperty: true, typePropertyName: "inProperty", id: "properties" }, + "attachedproperty": { inAttachedProperty: true, typePropertyName: "inAttachedProperty", id: "attachedProperties" }, + "method": { inMethod: true, typePropertyName: "inMethod", id: "methods" }, + "event": { inEvent: true, typePropertyName: "inEvent", id: "events" }, + "attachedevent": { inAttachedEvent: true, typePropertyName: "inAttachedEvent", id: "attachedEvents" }, + "operator": { inOperator: true, typePropertyName: "inOperator", id: "operators" }, + "eii": { inEii: true, typePropertyName: "inEii", id: "eii" } + }; + if (category === 'class') { + return classItems; + } + if (category === 'ns') { + return namespaceItems; + } + console.err("category '" + category + "' is not valid."); + return undefined; +} + +function handleItem(vm, gitContribute, gitUrlPattern) { + // get contribution information + vm.docurl = common.getImproveTheDocHref(vm, gitContribute, gitUrlPattern); + vm.sourceurl = common.getViewSourceHref(vm, null, gitUrlPattern); + + // set to null incase mustache looks up + vm.summary = vm.summary || null; + vm.remarks = vm.remarks || null; + vm.conceptual = vm.conceptual || null; + vm.syntax = vm.syntax || null; + vm.implements = vm.implements || null; + vm.example = vm.example || null; + common.processSeeAlso(vm); + + // id is used as default template's bookmark + vm.id = common.getHtmlId(vm.uid); + if (vm.overload && vm.overload.uid) { + vm.overload.id = common.getHtmlId(vm.overload.uid); + } + + if (vm.supported_platforms) { + vm.supported_platforms = transformDictionaryToArray(vm.supported_platforms); + } + + if (vm.requirements) { + var type = vm.type.toLowerCase(); + if (type == "method") { + vm.requirements_method = transformDictionaryToArray(vm.requirements); + } else { + vm.requirements = transformDictionaryToArray(vm.requirements); + } + } + + if (vm && langs) { + if (shouldHideTitleType(vm)) { + vm.hideTitleType = true; + } else { + vm.hideTitleType = false; + } + + if (shouldHideSubtitle(vm)) { + vm.hideSubtitle = true; + } else { + vm.hideSubtitle = false; + } + } + + function shouldHideTitleType(vm) { + var type = vm.type.toLowerCase(); + return ((type === 'namespace' && langs.length == 1 && (langs[0] === 'objectivec' || langs[0] === 'java' || langs[0] === 'c')) + || ((type === 'class' || type === 'enum') && langs.length == 1 && langs[0] === 'c')); + } + + function shouldHideSubtitle(vm) { + var type = vm.type.toLowerCase(); + return (type === 'class' || type === 'namespace') && langs.length == 1 && langs[0] === 'c'; + } + + function transformDictionaryToArray(dic) { + var array = []; + for (var key in dic) { + if (dic.hasOwnProperty(key)) { + array.push({ "name": key, "value": dic[key] }) + } + } + + return array; + } +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.extension.js b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.extension.js new file mode 100644 index 0000000..e4c6237 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.extension.js @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/** + * This method will be called at the start of exports.transform in ManagedReference.html.primary.js + */ +exports.preTransform = function (model) { + return model; +} + +/** + * This method will be called at the end of exports.transform in ManagedReference.html.primary.js + */ +exports.postTransform = function (model) { + return model; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.html.primary.js b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.html.primary.js new file mode 100644 index 0000000..0de462f --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.html.primary.js @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +var mrefCommon = require('./ManagedReference.common.js'); +var extension = require('./ManagedReference.extension.js'); +var overwrite = require('./ManagedReference.overwrite.js'); + +exports.transform = function (model) { + if (overwrite && overwrite.transform) { + return overwrite.transform(model); + } + + if (extension && extension.preTransform) { + model = extension.preTransform(model); + } + + if (mrefCommon && mrefCommon.transform) { + model = mrefCommon.transform(model); + } + if (model.type.toLowerCase() === "enum") { + model.isClass = false; + model.isEnum = true; + } + model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath); + + if (extension && extension.postTransform) { + model = extension.postTransform(model); + } + + return model; +} + +exports.getOptions = function (model) { + if (overwrite && overwrite.getOptions) { + return overwrite.getOptions(model); + } + + return { + "bookmarks": mrefCommon.getBookmarks(model) + }; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.html.primary.tmpl b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.html.primary.tmpl new file mode 100644 index 0000000..b497774 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/ManagedReference.html.primary.tmpl @@ -0,0 +1,13 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{!master(layout/_master.tmpl)}} + +{{#isNamespace}} + {{>partials/namespace}} +{{/isNamespace}} +{{#isClass}} + {{>partials/class}} +{{/isClass}} +{{#isEnum}} + {{>partials/enum}} +{{/isEnum}} +{{>partials/customMREFContent}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/RestApi.common.js b/websites/apidocs/DefaultTemplateNoAssets/RestApi.common.js new file mode 100644 index 0000000..1d4e5fa --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/RestApi.common.js @@ -0,0 +1,309 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. +var common = require('./common.js'); + +exports.transform = function (model) { + var _fileNameWithoutExt = common.path.getFileNameWithoutExtension(model._path); + model._jsonPath = _fileNameWithoutExt + ".swagger.json"; + model.title = model.title || model.name; + model.docurl = model.docurl || common.getImproveTheDocHref(model, model._gitContribute, model._gitUrlPattern); + model.sourceurl = model.sourceurl || common.getViewSourceHref(model, null, model._gitUrlPattern); + model.htmlId = common.getHtmlId(model.uid); + if (model.children) { + for (var i = 0; i < model.children.length; i++) { + var child = model.children[i]; + child.docurl = child.docurl || common.getImproveTheDocHref(child, model._gitContribute, model._gitUrlPattern); + if (child.operation) { + child.operation = child.operation.toUpperCase(); + } + child.path = appendQueryParamsToPath(child.path, child.parameters); + child.sourceurl = child.sourceurl || common.getViewSourceHref(child, null, model._gitUrlPattern); + child.conceptual = child.conceptual || ''; // set to empty incase mustache looks up + child.summary = child.summary || ''; // set to empty incase mustache looks up + child.description = child.description || ''; // set to empty incase mustache looks up + child.footer = child.footer || ''; // set to empty incase mustache looks up + child.remarks = child.remarks || ''; // set to empty incase mustache looks up + child.htmlId = common.getHtmlId(child.uid); + + formatExample(child.responses); + resolveAllOf(child); + transformReference(child); + }; + if (!model.tags || model.tags.length === 0) { + var childTags = []; + for (var i = 0; i < model.children.length; i++) { + var child = model.children[i]; + if (child.tags && child.tags.length > 0) { + for (var k = 0; k < child.tags.length; k++) { + // for each tag in child, add unique tag string into childTags + if (childTags.indexOf(child.tags[k]) === -1) { + childTags.push(child.tags[k]); + } + } + } + } + // sort alphabetically + childTags.sort(); + if (childTags.length > 0) { + model.tags = []; + for (var i = 0; i < childTags.length; i++) { + // add tags into model + model.tags.push({ "name": childTags[i] }); + } + } + } + if (model.tags) { + for (var i = 0; i < model.tags.length; i++) { + var children = getChildrenByTag(model.children, model.tags[i].name); + if (children) { + // set children into tag section + model.tags[i].children = children; + } + model.tags[i].conceptual = model.tags[i].conceptual || ''; // set to empty incase mustache looks up + if (model.tags[i]["x-bookmark-id"]) { + model.tags[i].htmlId = model.tags[i]["x-bookmark-id"]; + } else if (model.tags[i].uid) { + model.tags[i].htmlId = common.getHtmlId(model.tags[i].uid); + } + } + for (var i = 0; i < model.children.length; i++) { + var child = model.children[i]; + if (child.includedInTags) { + // set child to undefined, which is already moved to tag section + model.children[i] = undefined; + if (!model.isTagLayout) { + // flags to indicate the model is tag layout + model.isTagLayout = true; + } + } + } + // remove undefined child + model.children = model.children.filter(function (o) { return o; }); + } + } + + return model; + + function getChildrenByTag(children, tag) { + if (!children) return; + return children.filter(function (child) { + if (child.tags && child.tags.indexOf(tag) > -1) { + child.includedInTags = true; + return true; + } + }) + } + + function formatExample(responses) { + if (!responses) return; + for (var i = responses.length - 1; i >= 0; i--) { + var examples = responses[i].examples; + if (!examples) continue; + for (var j = examples.length - 1; j >= 0; j--) { + var content = examples[j].content; + if (!content) continue; + var mimeType = examples[j].mimeType; + if (mimeType === 'application/json') { + try { + var json = JSON.parse(content) + responses[i].examples[j].content = JSON.stringify(json, null, ' '); + } catch (e) { + console.warn("example is not a valid JSON object."); + } + } + } + } + } + + function resolveAllOf(obj) { + if (Array.isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + resolveAllOf(obj[i]); + } + } + else if (typeof obj === "object") { + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + if (key === "allOf" && Array.isArray(obj[key])) { + // find 'allOf' array and process + processAllOfArray(obj[key], obj); + // delete 'allOf' value + delete obj[key]; + } else { + resolveAllOf(obj[key]); + } + } + } + } + } + + function processAllOfArray(allOfArray, originalObj) { + // for each object in 'allOf' array, merge the values to those in the same level with 'allOf' + for (var i = 0; i < allOfArray.length; i++) { + var item = allOfArray[i]; + for (var key in item) { + if (originalObj.hasOwnProperty(key)) { + mergeObjByKey(originalObj[key], item[key]); + } else { + originalObj[key] = item[key]; + } + } + } + } + + function mergeObjByKey(targetObj, sourceObj) { + for (var key in sourceObj) { + // merge only when target object doesn't define the key + if (!targetObj.hasOwnProperty(key)) { + targetObj[key] = sourceObj[key]; + } + } + } + + function transformReference(obj) { + if (Array.isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + transformReference(obj[i]); + } + } + else if (typeof obj === "object") { + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + if (key === "schema") { + // transform schema.properties from obj to key value pair + transformProperties(obj[key]); + } else { + transformReference(obj[key]); + } + } + } + } + } + + function transformProperties(obj) { + if (obj.properties) { + if (obj.required && Array.isArray(obj.required)) { + for (var i = 0; i < obj.required.length; i++) { + var field = obj.required[i]; + if (obj.properties[field]) { + // add required field as property + obj.properties[field].required = true; + } + } + delete obj.required; + } + var array = []; + for (var key in obj.properties) { + if (obj.properties.hasOwnProperty(key)) { + var value = obj.properties[key]; + // set description to null incase mustache looks up + value.description = value.description || null; + + transformPropertiesValue(value); + array.push({ key: key, value: value }); + } + } + obj.properties = array; + } + } + + function transformPropertiesValue(obj) { + if (obj.type === "array" && obj.items) { + // expand array to transformProperties + obj.items.properties = obj.items.properties || null; + obj.items['x-internal-ref-name'] = obj.items['x-internal-ref-name'] || null; + obj.items['x-internal-loop-ref-name'] = obj.items['x-internal-loop-ref-name'] || null; + transformProperties(obj.items); + } else if (obj.properties && !obj.items) { + // fill obj.properties into obj.items.properties, to be rendered in the same way with array + obj.items = {}; + obj.items.properties = obj.properties || null; + delete obj.properties; + if (obj.required) { + obj.items.required = obj.required; + delete obj.required; + } + obj.items['x-internal-ref-name'] = obj['x-internal-ref-name'] || null; + obj.items['x-internal-loop-ref-name'] = obj['x-internal-loop-ref-name'] || null; + transformProperties(obj.items); + } + } + + function appendQueryParamsToPath(path, parameters) { + if (!path || !parameters) return path; + + var requiredQueryParams = parameters.filter(function (p) { return p.in === 'query' && p.required; }); + if (requiredQueryParams.length > 0) { + path = formatParams(path, requiredQueryParams, true); + } + + var optionalQueryParams = parameters.filter(function (p) { return p.in === 'query' && !p.required; }); + if (optionalQueryParams.length > 0) { + path += "["; + path = formatParams(path, optionalQueryParams, requiredQueryParams.length === 0); + path += "]"; + } + return path; + } + + function formatParams(path, parameters, isFirst) { + for (var i = 0; i < parameters.length; i++) { + if (i === 0 && isFirst) { + path += "?"; + } else { + path += "&"; + } + path += parameters[i].name; + } + return path; + } +} + +exports.getBookmarks = function (model) { + if (!model) return null; + + var bookmarks = {}; + + bookmarks[model.uid] = ""; + if (model.tags) { + model.tags.forEach(function (tag) { + if (tag.uid) { + bookmarks[tag.uid] = tag["x-bookmark-id"] ? tag["x-bookmark-id"] : common.getHtmlId(tag.uid); + } + if (tag.children) { + tag.children.forEach(function (child) { + if (child.uid) { + bookmarks[child.uid] = common.getHtmlId(child.uid); + } + }) + } + }) + } + if (model.children) { + model.children.forEach(function (child) { + if (child.uid) { + bookmarks[child.uid] = common.getHtmlId(child.uid); + } + }); + } + + return bookmarks; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/RestApi.extension.js b/websites/apidocs/DefaultTemplateNoAssets/RestApi.extension.js new file mode 100644 index 0000000..da63c5f --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/RestApi.extension.js @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/** + * This method will be called at the start of exports.transform in RestApi.html.primary.js + */ +exports.preTransform = function (model) { + return model; +} + +/** + * This method will be called at the end of exports.transform in RestApi.html.primary.js + */ +exports.postTransform = function (model) { + return model; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/RestApi.html.primary.js b/websites/apidocs/DefaultTemplateNoAssets/RestApi.html.primary.js new file mode 100644 index 0000000..3c577af --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/RestApi.html.primary.js @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +var restApiCommon = require('./RestApi.common.js'); +var extension = require('./RestApi.extension.js') + +exports.transform = function (model) { + if (extension && extension.preTransform) { + model = extension.preTransform(model); + } + + if (restApiCommon && restApiCommon.transform) { + model = restApiCommon.transform(model); + } + model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath); + + if (extension && extension.postTransform) { + model = extension.postTransform(model); + } + + return model; +} + +exports.getOptions = function (model) { + return { "bookmarks": restApiCommon.getBookmarks(model) }; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/RestApi.html.primary.tmpl b/websites/apidocs/DefaultTemplateNoAssets/RestApi.html.primary.tmpl new file mode 100644 index 0000000..9fd9df0 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/RestApi.html.primary.tmpl @@ -0,0 +1,3 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{!master(layout/_master.tmpl)}} +{{>partials/rest}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.common.js b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.common.js new file mode 100644 index 0000000..adbc449 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.common.js @@ -0,0 +1,308 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +var common = require('./common.js');; +var classCategory = 'class'; +var namespaceCategory = 'ns'; + +exports.transform = function (model) { + if (!model) return + + handleItem(model, model._gitContribute, model._gitUrlPattern); + if (model.children) { + normalizeChildren(model.children).forEach(function (item) { + handleItem(item, model._gitContribute, model._gitUrlPattern); + }); + }; + + if (model.type) { + switch (model.type.toLowerCase()) { + case 'namespace': + model.isNamespace = true; + if (model.children) groupChildren(model, namespaceCategory); + break; + case 'package': + case 'class': + case 'interface': + case 'struct': + case 'delegate': + model.isClass = true; + if (model.children) groupChildren(model, classCategory); + model[getTypePropertyName(model.type)] = true; + break; + case 'enum': + model.isEnum = true; + if (model.children) groupChildren(model, classCategory); + model[getTypePropertyName(model.type)] = true; + break; + default: + break; + } + } + + return model; +} + +exports.getBookmarks = function (model, ignoreChildren) { + if (!model || !model.type || model.type.toLowerCase() === "namespace") return null; + + var bookmarks = {}; + + if (typeof ignoreChildren == 'undefined' || ignoreChildren === false) { + if (model.children) { + normalizeChildren(model.children).forEach(function (item) { + bookmarks[item.uid] = common.getHtmlId(item.uid); + if (item.overload && item.overload.uid) { + bookmarks[item.overload.uid] = common.getHtmlId(item.overload.uid); + } + }); + } + } + + // Reference's first level bookmark should have no anchor + bookmarks[model.uid] = ""; + return bookmarks; +} + +function handleItem(vm, gitContribute, gitUrlPattern) { + // get contribution information + vm.docurl = common.getImproveTheDocHref(vm, gitContribute, gitUrlPattern); + vm.sourceurl = common.getViewSourceHref(vm, null, gitUrlPattern); + + // set to null incase mustache looks up + vm.summary = vm.summary || null; + vm.remarks = vm.remarks || null; + vm.conceptual = vm.conceptual || null; + vm.syntax = vm.syntax || null; + vm.implements = vm.implements || null; + vm.example = vm.example || null; + common.processSeeAlso(vm); + + // id is used as default template's bookmark + vm.id = common.getHtmlId(vm.uid); + if (vm.overload && vm.overload.uid) { + vm.overload.id = common.getHtmlId(vm.overload.uid); + } + + // concatenate multiple types with `|` + if (vm.syntax) { + var syntax = vm.syntax; + if (syntax.parameters) { + syntax.parameters = syntax.parameters.map(function (p) { + return joinType(p); + }) + syntax.parameters = groupParameters(syntax.parameters); + } + if (syntax.return) { + syntax.return = joinType(syntax.return); + } + } +} + +function joinType(parameter) { + // change type in syntax from array to string + var joinTypeProperty = function (type, key) { + if (!type || !type[0] || !type[0][key]) return null; + var value = type.map(function (t) { + return t[key][0].value; + }).join(' | '); + return [{ + lang: type[0][key][0].lang, + value: value + }]; + }; + if (parameter.type) { + parameter.type = { + name: joinTypeProperty(parameter.type, "name"), + nameWithType: joinTypeProperty(parameter.type, "nameWithType"), + fullName: joinTypeProperty(parameter.type, "fullName"), + specName: joinTypeProperty(parameter.type, "specName") + } + } + return parameter; +} + +function groupParameters(parameters) { + // group parameter with properties + if (!parameters || parameters.length == 0) return parameters; + var groupedParameters = []; + var stack = []; + for (var i = 0; i < parameters.length; i++) { + var parameter = parameters[i]; + parameter.properties = null; + var prefixLength = 0; + while (stack.length > 0) { + var top = stack.pop(); + var prefix = top.id + '.'; + if (parameter.id.indexOf(prefix) == 0) { + prefixLength = prefix.length; + if (!top.parameter.properties) { + top.parameter.properties = []; + } + top.parameter.properties.push(parameter); + stack.push(top); + break; + } + if (stack.length == 0) { + groupedParameters.push(top.parameter); + } + } + stack.push({ id: parameter.id, parameter: parameter }); + parameter.id = parameter.id.substring(prefixLength); + } + while (stack.length > 0) { + top = stack.pop(); + } + groupedParameters.push(top.parameter); + return groupedParameters; +} + +function groupChildren(model, category, typeChildrenItems) { + if (!model || !model.type) { + return; + } + if (!typeChildrenItems) { + var typeChildrenItems = getDefinitions(category); + } + var grouped = {}; + + normalizeChildren(model.children).forEach(function (c) { + if (c.isEii) { + var type = "eii"; + } else { + var type = c.type.toLowerCase(); + } + if (!grouped.hasOwnProperty(type)) { + grouped[type] = []; + } + // special handle for field + if (type === "field" && c.syntax) { + c.syntax.fieldValue = c.syntax.return; + c.syntax.return = undefined; + } + // special handle for property + if (type === "property" && c.syntax) { + c.syntax.propertyValue = c.syntax.return; + c.syntax.return = undefined; + } + // special handle for event + if (type === "event" && c.syntax) { + c.syntax.eventType = c.syntax.return; + c.syntax.return = undefined; + } + grouped[type].push(c); + }) + + var children = []; + for (var key in typeChildrenItems) { + if (typeChildrenItems.hasOwnProperty(key) && grouped.hasOwnProperty(key)) { + var typeChildrenItem = typeChildrenItems[key]; + var items = grouped[key]; + if (items && items.length > 0) { + var item = {}; + for (var itemKey in typeChildrenItem) { + if (typeChildrenItem.hasOwnProperty(itemKey)){ + item[itemKey] = typeChildrenItem[itemKey]; + } + } + item.children = items; + children.push(item); + } + } + } + + model.children = children; +} + +function getTypePropertyName(type) { + if (!type) { + return undefined; + } + var loweredType = type.toLowerCase(); + var definition = getDefinition(loweredType); + if (definition) { + return definition.typePropertyName; + } + + return undefined; +} + +function getCategory(type) { + var classItems = getDefinitions(classCategory); + if (classItems.hasOwnProperty(type)) { + return classCategory; + } + + var namespaceItems = getDefinitions(namespaceCategory); + if (namespaceItems.hasOwnProperty(type)) { + return namespaceCategory; + } + return undefined; +} + +function getDefinition(type) { + var classItems = getDefinitions(classCategory); + if (classItems.hasOwnProperty(type)) { + return classItems[type]; + } + var namespaceItems = getDefinitions(namespaceCategory); + if (namespaceItems.hasOwnProperty(type)) { + return namespaceItems[type]; + } + return undefined; +} + +function getDefinitions(category) { + var namespaceItems = { + "class": { inClass: true, typePropertyName: "inClass", id: "classes" }, + "struct": { inStruct: true, typePropertyName: "inStruct", id: "structs" }, + "interface": { inInterface: true, typePropertyName: "inInterface", id: "interfaces" }, + "enum": { inEnum: true, typePropertyName: "inEnum", id: "enums" }, + "delegate": { inDelegate: true, typePropertyName: "inDelegate", id: "delegates" }, + "package": { inDelegate: true, typePropertyName: "inPackage", id: "packages" } + }; + var classItems = { + "constructor": { inConstructor: true, typePropertyName: "inConstructor", id: "constructors" }, + "field": { inField: true, typePropertyName: "inField", id: "fields" }, + "property": { inProperty: true, typePropertyName: "inProperty", id: "properties" }, + "method": { inMethod: true, typePropertyName: "inMethod", id: "methods" }, + "event": { inEvent: true, typePropertyName: "inEvent", id: "events" }, + "operator": { inOperator: true, typePropertyName: "inOperator", id: "operators" }, + "eii": { inEii: true, typePropertyName: "inEii", id: "eii" }, + "function": { inFunction: true, typePropertyName: "inFunction", id: "functions"}, + "member": { inMember: true, typePropertyName: "inMember", id: "members"} + }; + if (category === 'class') { + return classItems; + } + if (category === 'ns') { + return namespaceItems; + } + console.err("category '" + category + "' is not valid."); + return undefined; +} + +function normalizeChildren(children) { + if (children[0] && children[0].lang && children[0].value) { + return children[0].value; + } + return children; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.extension.js b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.extension.js new file mode 100644 index 0000000..c1333b2 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.extension.js @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/** + * This method will be called at the start of exports.transform in UniversalReference.html.primary.js + */ +exports.preTransform = function (model) { + return model; +} + +/** + * This method will be called at the end of exports.transform in UniversalReference.html.primary.js + */ +exports.postTransform = function (model) { + return model; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.html.primary.js b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.html.primary.js new file mode 100644 index 0000000..c92e0e6 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.html.primary.js @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +var urefCommon = require('./UniversalReference.common.js'); +var extension = require('./UniversalReference.extension.js'); + +exports.transform = function (model) { + if (extension && extension.preTransform) { + model = extension.preTransform(model); + } + + if (urefCommon && urefCommon.transform) { + model = urefCommon.transform(model); + } + + model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath); + + if (extension && extension.postTransform) { + model = extension.postTransform(model); + } + + return model; +} + +exports.getOptions = function (model) { + return { + "bookmarks": urefCommon.getBookmarks(model) + }; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.html.primary.tmpl b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.html.primary.tmpl new file mode 100644 index 0000000..ff9a3ee --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/UniversalReference.html.primary.tmpl @@ -0,0 +1,12 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{!master(layout/_master.tmpl)}} + +{{#isNamespace}} + {{>partials/namespace}} +{{/isNamespace}} +{{#isClass}} + {{>partials/uref/class}} +{{/isClass}} +{{#isEnum}} + {{>partials/enum}} +{{/isEnum}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/common.js b/websites/apidocs/DefaultTemplateNoAssets/common.js new file mode 100644 index 0000000..7b3b6c9 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/common.js @@ -0,0 +1,235 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. +exports.path = {}; +exports.path.getFileNameWithoutExtension = getFileNameWithoutExtension; +exports.path.getDirectoryName = getDirectoryName; + +exports.getHtmlId = getHtmlId; + +exports.getViewSourceHref = getViewSourceHref; +exports.getImproveTheDocHref = getImproveTheDocHref; +exports.processSeeAlso = processSeeAlso; + +exports.isAbsolutePath = isAbsolutePath; +exports.isRelativePath = isRelativePath; + +function getFileNameWithoutExtension(path) { + if (!path || path[path.length - 1] === '/' || path[path.length - 1] === '\\') return ''; + var fileName = path.split('\\').pop().split('/').pop(); + return fileName.slice(0, fileName.lastIndexOf('.')); +} + +function getDirectoryName(path) { + if (!path) return ''; + var index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} + +function getHtmlId(input) { + if (!input) return ''; + return input.replace(/\W/g, '_'); +} + +// Note: the parameter `gitContribute` won't be used in this function +function getViewSourceHref(item, gitContribute, gitUrlPattern) { + if (!item || !item.source || !item.source.remote) return ''; + return getRemoteUrl(item.source.remote, item.source.startLine - '0' + 1, null, gitUrlPattern); +} + +function getImproveTheDocHref(item, gitContribute, gitUrlPattern) { + if (!item) return ''; + if (!item.documentation || !item.documentation.remote) { + return getNewFileUrl(item, gitContribute, gitUrlPattern); + } else { + return getRemoteUrl(item.documentation.remote, item.documentation.startLine + 1, gitContribute, gitUrlPattern); + } +} + +function processSeeAlso(item) { + if (item.seealso) { + for (var key in item.seealso) { + addIsCref(item.seealso[key]); + } + } + item.seealso = item.seealso || null; +} + +function isAbsolutePath(path) { + return /^(\w+:)?\/\//g.test(path); +} + +function isRelativePath(path) { + if (!path) return false; + return !exports.isAbsolutePath(path); +} + +var gitUrlPatternItems = { + 'github': { + // HTTPS form: https://github.com/{org}/{repo}.git + // SSH form: [email protected]:{org}/{repo}.git + // generate URL: https://github.com/{org}/{repo}/blob/{branch}/{path} + 'testRegex': /^(https?:\/\/)?(\S+\@)?(\S+\.)?github\.com(\/|:).*/i, + 'generateUrl': function (gitInfo) { + var url = normalizeGitUrlToHttps(gitInfo.repo); + url = getRepoWithoutGitExtension(url); + url += '/blob' + '/' + gitInfo.branch + '/' + gitInfo.path; + if (gitInfo.startLine && gitInfo.startLine > 0) { + url += '/#L' + gitInfo.startLine; + } + return url; + }, + 'generateNewFileUrl': function (gitInfo, uid) { + var url = normalizeGitUrlToHttps(gitInfo.repo); + url = getRepoWithoutGitExtension(url); + url += '/new'; + url += '/' + gitInfo.branch; + url += '/' + getOverrideFolder(gitInfo.apiSpecFolder); + url += '/new?filename=' + getHtmlId(uid) + '.md'; + url += '&value=' + encodeURIComponent(getOverrideTemplate(uid)); + return url; + } + }, + 'vso': { + // HTTPS form: https://{user}.visualstudio.com/{org}/_git/{repo} + // SSH form: ssh://{user}@{user}.visualstudio.com:22/{org}/_git/{repo} + // generated URL under branch: https://{user}.visualstudio.com/{org}/_git/{repo}?path={path}&version=GB{branch} + // generated URL under detached HEAD: https://{user}.visualstudio.com/{org}/_git/{repo}?path={path}&version=GC{commit} + 'testRegex': /^(https?:\/\/)?(ssh:\/\/\S+\@)?(\S+\.)?visualstudio\.com(\/|:).*/i, + 'generateUrl': function (gitInfo) { + var url = normalizeGitUrlToHttps(gitInfo.repo); + var branchPrefix = /[0-9a-fA-F]{40}/.test(gitInfo.branch) ? 'GC' : 'GB'; + url += '?path=' + gitInfo.path + '&version=' + branchPrefix + gitInfo.branch; + if (gitInfo.startLine && gitInfo.startLine > 0) { + url += '&line=' + gitInfo.startLine; + } + return url; + }, + 'generateNewFileUrl': function (gitInfo, uid) { + return ''; + } + } +} + +function getRepoWithoutGitExtension(repo) { + if (repo.substr(-4) === '.git') { + repo = repo.substr(0, repo.length - 4); + } + return repo; +} + +function normalizeGitUrlToHttps(repo) { + var pos = repo.indexOf('@'); + if (pos == -1) return repo; + return 'https://' + repo.substr(pos + 1).replace(/:[0-9]+/g, '').replace(/:/g, '/'); +} + +function getNewFileUrl(item, gitContribute, gitUrlPattern) { + // do not support VSO for now + if (!item.source) { + return ''; + } + + var gitInfo = getGitInfo(gitContribute, item.source.remote); + if (!gitInfo.repo || !gitInfo.branch || !gitInfo.path) { + return ''; + } + + var patternName = getPatternName(gitInfo.repo, gitUrlPattern); + if (!patternName) return patternName; + return gitUrlPatternItems[patternName].generateNewFileUrl(gitInfo, item.uid); +} + +function getRemoteUrl(remote, startLine, gitContribute, gitUrlPattern) { + var gitInfo = getGitInfo(gitContribute, remote); + if (!gitInfo.repo || !gitInfo.branch || !gitInfo.path) { + return ''; + } + + var patternName = getPatternName(gitInfo.repo, gitUrlPattern); + if (!patternName) return ''; + + gitInfo.startLine = startLine; + return gitUrlPatternItems[patternName].generateUrl(gitInfo); +} + +function getGitInfo(gitContribute, gitRemote) { + // apiSpecFolder defines the folder contains overwrite files for MRef, the default value is apiSpec + var defaultApiSpecFolder = 'apiSpec'; + + var result = {}; + if (gitContribute && gitContribute.apiSpecFolder) { + result.apiSpecFolder = gitContribute.apiSpecFolder; + } else { + result.apiSpecFolder = defaultApiSpecFolder; + } + mergeKey(gitContribute, gitRemote, result, 'repo'); + mergeKey(gitContribute, gitRemote, result, 'branch'); + mergeKey(gitContribute, gitRemote, result, 'path'); + + return result; + + function mergeKey(source, sourceFallback, dest, key) { + if (source && source.hasOwnProperty(key)) { + dest[key] = source[key]; + } else if (sourceFallback && sourceFallback.hasOwnProperty(key)) { + dest[key] = sourceFallback[key]; + } + } +} + +function getPatternName(repo, gitUrlPattern) { + if (gitUrlPattern && gitUrlPattern.toLowerCase() in gitUrlPatternItems) { + return gitUrlPattern.toLowerCase(); + } else { + for (var p in gitUrlPatternItems) { + if (gitUrlPatternItems[p].testRegex.test(repo)) { + return p; + } + } + } + return ''; +} + +function getOverrideFolder(path) { + if (!path) return ""; + path = path.replace('\\', '/'); + if (path.charAt(path.length - 1) == '/') path = path.substring(0, path.length - 1); + return path; +} + +function getOverrideTemplate(uid) { + if (!uid) return ""; + var content = ""; + content += "---\n"; + content += "uid: " + uid + "\n"; + content += "summary: '*You can override summary for the API here using *MARKDOWN* syntax'\n"; + content += "---\n"; + content += "\n"; + content += "*Please type below more information about this API:*\n"; + content += "\n"; + return content; +} + +function addIsCref(seealso) { + if (!seealso.linkType || seealso.linkType.toLowerCase() == "cref") { + seealso.isCref = true; + } +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/conceptual.extension.js b/websites/apidocs/DefaultTemplateNoAssets/conceptual.extension.js new file mode 100644 index 0000000..ed752c1 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/conceptual.extension.js @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/** + * This method will be called at the start of exports.transform in conceptual.html.primary.js + */ +exports.preTransform = function (model) { + return model; +} + +/** + * This method will be called at the end of exports.transform in conceptual.html.primary.js + */ +exports.postTransform = function (model) { + return model; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/conceptual.html.primary.js b/websites/apidocs/DefaultTemplateNoAssets/conceptual.html.primary.js new file mode 100644 index 0000000..4354938 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/conceptual.html.primary.js @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +var common = require('./common.js'); +var extension = require('./conceptual.extension.js') + +exports.transform = function (model) { + if (extension && extension.preTransform) { + model = extension.preTransform(model); + } + + model._disableToc = model._disableToc || !model._tocPath || (model._navPath === model._tocPath); + model.docurl = model.docurl || common.getImproveTheDocHref(model, model._gitContribute, model._gitUrlPattern); + + if (extension && extension.postTransform) { + model = extension.postTransform(model); + } + + return model; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/conceptual.html.primary.tmpl b/websites/apidocs/DefaultTemplateNoAssets/conceptual.html.primary.tmpl new file mode 100644 index 0000000..8ba5203 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/conceptual.html.primary.tmpl @@ -0,0 +1,4 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{!master(layout/_master.tmpl)}} +{{{rawTitle}}} +{{{conceptual}}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/favicon.ico b/websites/apidocs/DefaultTemplateNoAssets/favicon.ico new file mode 100644 index 0000000..71570f6 Binary files /dev/null and b/websites/apidocs/DefaultTemplateNoAssets/favicon.ico differ diff --git a/websites/apidocs/DefaultTemplateNoAssets/layout/_master.tmpl b/websites/apidocs/DefaultTemplateNoAssets/layout/_master.tmpl new file mode 100644 index 0000000..1145dc2 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/layout/_master.tmpl @@ -0,0 +1,55 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{!include(/^styles/.*/)}} +{{!include(/^fonts/.*/)}} +{{!include(favicon.ico)}} +{{!include(logo.svg)}} +{{!include(search-stopwords.json)}} +<!DOCTYPE html> +<!--[if IE]><![endif]--> +<html> + {{>partials/head}} + <body data-spy="scroll" data-target="#affix" data-offset="120"> + <div id="wrapper"> + <header> + {{^_disableNavbar}} + {{>partials/navbar}} + {{/_disableNavbar}} + {{^_disableBreadcrumb}} + {{>partials/breadcrumb}} + {{/_disableBreadcrumb}} + </header> + {{#_enableSearch}} + <div class="container body-content"> + {{>partials/searchResults}} + </div> + {{/_enableSearch}} + <div role="main" class="container body-content hide-when-search"> + {{^_disableToc}} + {{>partials/toc}} + <div class="article row grid-right"> + {{/_disableToc}} + {{#_disableToc}} + <div class="article row grid"> + {{/_disableToc}} + {{#_disableAffix}} + <div class="col-md-12"> + {{/_disableAffix}} + {{^_disableAffix}} + <div class="col-md-10"> + {{/_disableAffix}} + <article class="content wrap" id="_content" data-uid="{{uid}}"> + {{!body}} + </article> + </div> + {{^_disableAffix}} + {{>partials/affix}} + {{/_disableAffix}} + </div> + </div> + {{^_disableFooter}} + {{>partials/footer}} + {{/_disableFooter}} + </div> + {{>partials/scripts}} + </body> +</html> diff --git a/websites/apidocs/DefaultTemplateNoAssets/logo.svg b/websites/apidocs/DefaultTemplateNoAssets/logo.svg new file mode 100644 index 0000000..2eb9d1e --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/logo.svg @@ -0,0 +1,45 @@ +<?xml version="1.0" standalone="no"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<svg version="1.0" xmlns="http://www.w3.org/2000/svg" + width="38.000000pt" height="38.000000pt" viewBox="0 0 172.000000 172.000000" + preserveAspectRatio="xMidYMid meet"> +<metadata> +Created by Docfx +</metadata> +<g transform="translate(0.000000,172.000000) scale(0.100000,-0.100000)" +fill="#dddddd" stroke="none"> +<path d="M230 1359 c0 -18 11 -30 44 -48 80 -42 81 -45 81 -441 0 -400 -1 +-404 -79 -436 -36 -15 -46 -24 -46 -43 0 -23 2 -24 61 -17 34 3 88 6 120 6 +l59 0 0 495 0 495 -82 0 c-46 0 -100 3 -120 6 -35 6 -38 5 -38 -17z"/> +<path d="M618 1373 l-118 -4 0 -493 0 -494 154 -7 c181 -9 235 -3 313 34 68 +33 168 130 207 202 75 136 75 384 1 536 -71 145 -234 240 -399 231 -23 -1 -94 +-4 -158 -5z m287 -119 c68 -24 144 -101 176 -179 22 -54 24 -75 24 -210 0 +-141 -2 -153 -26 -206 -36 -76 -89 -132 -152 -160 -45 -21 -68 -24 -164 -24 +-71 0 -116 4 -123 11 -22 22 -31 175 -28 463 2 208 6 293 15 302 32 32 188 33 +278 3z"/> +<path d="M1170 1228 c75 -104 110 -337 76 -508 -21 -100 -56 -178 -105 -233 +l-36 -41 34 20 c75 43 160 133 198 212 37 75 38 78 38 191 -1 129 -18 191 -75 +270 -28 38 -136 131 -153 131 -4 0 6 -19 23 -42z"/> +</g> +</svg> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_affix.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_affix.liquid new file mode 100644 index 0000000..73c5e51 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_affix.liquid @@ -0,0 +1,24 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<div class="hidden-sm col-md-2" role="complementary"> + <div class="sideaffix"> + {%- if not _disableContribution -%} + <div class="contribution"> + <ul class="nav"> + {%- if docurl -%} + <li> + <a href="{{docurl}}" class="contribution-link">{{__global.improveThisDoc}}</a> + </li> + {%- endif -%} + {%- if sourceurl -%} + <li> + <a href="{{sourceurl}}" class="contribution-link">{{__global.viewSource}}</a> + </li> + {%- endif -%} + </ul> + </div> + {%- endif -%} + <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> + <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> + </nav> + </div> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_breadcrumb.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_breadcrumb.liquid new file mode 100644 index 0000000..3bf0d72 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_breadcrumb.liquid @@ -0,0 +1,8 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<div class="subnav navbar navbar-default"> + <div class="container hide-when-search" id="breadcrumb"> + <ul class="breadcrumb"> + <li>{{_tocTitle}}</li> + </ul> + </div> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_footer.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_footer.liquid new file mode 100644 index 0000000..6bd9090 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_footer.liquid @@ -0,0 +1,16 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<footer> + <div class="grad-bottom"></div> + <div class="footer"> + <div class="container"> + <span class="pull-right"> + <a href="#top">Back to top</a> + </span> + {%- if _appFooter -%} + {{_appFooter}} + {%- else -%} + <span>Copyright © 2015-2018 Microsoft<br>Generated by <strong>DocFX</strong></span> + {%- endif -%} + </div> + </div> +</footer> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_head.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_head.liquid new file mode 100644 index 0000000..2af71a6 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_head.liquid @@ -0,0 +1,38 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + {%- if title and _appTitle -%} + <title>{{title}} | {{appTitle}}</title> + <meta name="title" content="{{title}} | {{appTitle}}"> + {%- else -%} + {%- if title or _appTitle -%} + <title>{{title}}{{appTitle}}</title> + <meta name="title" content="{{title}}{{appTitle}}"> + {%- endif -%} + {%- endif -%} + <meta name="viewport" content="width=device-width"> + <meta name="generator" content="docfx {{_docfxVersion}}"> + {%- if _description -%} + <meta name="description" content="{{_description}}"> + {%- endif -%} + {%- if _appFaviconPath -%} + <link rel="shortcut icon" href="{{_rel}}{{_appFaviconPath}}"> + {%- else -%} + <link rel="shortcut icon" href="{{_rel}}favicon.ico"> + {%- endif -%} + <link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css"> + <link rel="stylesheet" href="{{_rel}}styles/docfx.css"> + <link rel="stylesheet" href="{{_rel}}styles/main.css"> + <meta property="docfx:navrel" content="{{_navRel}}"> + <meta property="docfx:tocrel" content="{{_tocRel}}"> + {%- if _noindex -%} + <meta name="searchOption" content="noindex"> + {%- endif -%} + {%- if _enableSearch -%} + <meta property="docfx:rel" content="{{_rel}}"> + {%- endif -%} + {%- if _enableNewTab -%} + <meta property="docfx:newtab" content="true"> + {%- endif -%} +</head> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_logo.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_logo.liquid new file mode 100644 index 0000000..7bc65a6 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_logo.liquid @@ -0,0 +1,8 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<a class="navbar-brand" href="{{_rel}}index.html"> + {%- if _appLogoPath -%} + <img id="logo" class="svg" src="{{_rel}}{{_appLogoPath}}" alt="{{_appName}}" > + {%- else -%} + <img id="logo" class="svg" src="{{_rel}}logo.svg" alt="{{_appName}}" > + {%- endif -%} +</a> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_navbar.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_navbar.liquid new file mode 100644 index 0000000..bcfde28 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_navbar.liquid @@ -0,0 +1,21 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + {% include partials/logo -%} + </div> + <div class="collapse navbar-collapse" id="navbar"> + <form class="navbar-form navbar-right" role="search" id="search"> + <div class="form-group"> + <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> + </div> + </form> + </div> + </div> +</nav> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_scripts.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_scripts.liquid new file mode 100644 index 0000000..6640a85 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_scripts.liquid @@ -0,0 +1,4 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<script type="text/javascript" src="{{_rel}}styles/docfx.vendor.js"></script> +<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script> +<script type="text/javascript" src="{{_rel}}styles/main.js"></script> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/_toc.liquid b/websites/apidocs/DefaultTemplateNoAssets/partials/_toc.liquid new file mode 100644 index 0000000..ef44c45 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/_toc.liquid @@ -0,0 +1,7 @@ +{% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} +<div class="sidenav hide-when-search"> + <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> + <div class="sidetoggle collapse" id="sidetoggle"> + <div id="sidetoc"></div> + </div> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/affix.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/affix.tmpl.partial new file mode 100644 index 0000000..227c256 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/affix.tmpl.partial @@ -0,0 +1,25 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<div class="hidden-sm col-md-2" role="complementary"> + <div class="sideaffix"> + {{^_disableContribution}} + <div class="contribution"> + <ul class="nav"> + {{#docurl}} + <li> + <a href="{{docurl}}" class="contribution-link">{{__global.improveThisDoc}}</a> + </li> + {{/docurl}} + {{#sourceurl}} + <li> + <a href="{{sourceurl}}" class="contribution-link">{{__global.viewSource}}</a> + </li> + {{/sourceurl}} + </ul> + </div> + {{/_disableContribution}} + <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> + <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> + </nav> + </div> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/breadcrumb.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/breadcrumb.tmpl.partial new file mode 100644 index 0000000..f63f7e3 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/breadcrumb.tmpl.partial @@ -0,0 +1,9 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<div class="subnav navbar navbar-default"> + <div class="container hide-when-search" id="breadcrumb"> + <ul class="breadcrumb"> + <li>{{_tocTitle}}</li> + </ul> + </div> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/class.header.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/class.header.tmpl.partial new file mode 100644 index 0000000..a8ed088 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/class.header.tmpl.partial @@ -0,0 +1,121 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<h1 id="{{id}}" data-uid="{{uid}}" class="text-break">{{>partials/title}}</h1> +<div class="markdown level0 summary">{{{summary}}}</div> +<div class="markdown level0 conceptual">{{{conceptual}}}</div> +{{#inClass}} +<div class="inheritance"> + <h5>{{__global.inheritance}}</h5> + {{#inheritance}} + <div class="level{{index}}">{{{specName.0.value}}}</div> + {{/inheritance}} + <div class="level{{level}}"><span class="xref">{{name.0.value}}</span></div> + {{#derivedClasses}} + <div class="level{{index}}">{{{specName.0.value}}}</div> + {{/derivedClasses}} +</div> +{{/inClass}} +{{#implements.0}} +<div classs="implements"> + <h5>{{__global.implements}}</h5> +{{/implements.0}} +{{#implements}} + <div>{{{specName.0.value}}}</div> +{{/implements}} +{{#implements.0}} +</div> +{{/implements.0}} +{{#inheritedMembers.0}} +<div class="inheritedMembers"> + <h5>{{__global.inheritedMembers}}</h5> +{{/inheritedMembers.0}} +{{#inheritedMembers}} + <div> + {{#definition}} + <xref uid="{{definition}}" text="{{nameWithType.0.value}}" alt="{{fullName.0.value}}"/> + {{/definition}} + {{^definition}} + <xref uid="{{uid}}" text="{{nameWithType.0.value}}" alt="{{fullName.0.value}}"/> + {{/definition}} + </div> +{{/inheritedMembers}} +{{#inheritedMembers.0}} +</div> +{{/inheritedMembers.0}} +<h6><strong>{{__global.namespace}}</strong>: {{{namespace.specName.0.value}}}</h6> +<h6><strong>{{__global.assembly}}</strong>: {{assemblies.0}}.dll</h6> +<h5 id="{{id}}_syntax">{{__global.syntax}}</h5> +<div class="codewrapper"> + <pre><code class="lang-{{_lang}} hljs">{{syntax.content.0.value}}</code></pre> +</div> +{{#syntax.parameters.0}} +<h5 class="parameters">{{__global.parameters}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/syntax.parameters.0}} +{{#syntax.parameters}} + <tr> + <td>{{{type.specName.0.value}}}</td> + <td><span class="parametername">{{{id}}}</span></td> + <td>{{{description}}}</td> + </tr> +{{/syntax.parameters}} +{{#syntax.parameters.0}} + </tbody> +</table> +{{/syntax.parameters.0}} +{{#syntax.return}} +<h5 class="returns">{{__global.returns}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> + </tbody> +</table> +{{/syntax.return}} +{{#syntax.typeParameters.0}} +<h5 class="typeParameters">{{__global.typeParameters}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/syntax.typeParameters.0}} +{{#syntax.typeParameters}} + <tr> + <td><span class="parametername">{{{id}}}</span></td> + <td>{{{description}}}</td> + </tr> +{{/syntax.typeParameters}} +{{#syntax.typeParameters.0}} + </tbody> +</table> +{{/syntax.typeParameters.0}} +{{#remarks}} +<h5 id="{{id}}_remarks"><strong>{{__global.remarks}}</strong></h5> +<div class="markdown level0 remarks">{{{remarks}}}</div> +{{/remarks}} +{{#example.0}} +<h5 id="{{id}}_examples"><strong>{{__global.examples}}</strong></h5> +{{/example.0}} +{{#example}} +{{{.}}} +{{/example}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/class.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/class.tmpl.partial new file mode 100644 index 0000000..7490fbe --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/class.tmpl.partial @@ -0,0 +1,234 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{>partials/class.header}} +{{#children}} +<h3 id="{{id}}">{{>partials/classSubtitle}}</h3> +{{#children}} +{{^_disableContribution}} +{{#docurl}} +<span class="small pull-right mobile-hide"> + <span class="divider">|</span> + <a href="{{docurl}}">{{__global.improveThisDoc}}</a> +</span>{{/docurl}} +{{#sourceurl}} +<span class="small pull-right mobile-hide"> + <a href="{{sourceurl}}">{{__global.viewSource}}</a> +</span>{{/sourceurl}} +{{/_disableContribution}} +{{#overload}} +<a id="{{id}}" data-uid="{{uid}}"></a> +{{/overload}} +<h4 id="{{id}}" data-uid="{{uid}}">{{name.0.value}}</h4> +<div class="markdown level1 summary">{{{summary}}}</div> +<div class="markdown level1 conceptual">{{{conceptual}}}</div> +<h5 class="decalaration">{{__global.declaration}}</h5> +{{#syntax}} +<div class="codewrapper"> + <pre><code class="lang-{{_lang}} hljs">{{syntax.content.0.value}}</code></pre> +</div> +{{#parameters.0}} +<h5 class="parameters">{{__global.parameters}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/parameters.0}} +{{#parameters}} + <tr> + <td>{{{type.specName.0.value}}}</td> + <td><span class="parametername">{{{id}}}</span></td> + <td>{{{description}}}</td> + </tr> +{{/parameters}} +{{#parameters.0}} + </tbody> +</table> +{{/parameters.0}} +{{#return}} +<h5 class="returns">{{__global.returns}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> + </tbody> +</table> +{{/return}} +{{#typeParameters.0}} +<h5 class="typeParameters">{{__global.typeParameters}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/typeParameters.0}} +{{#typeParameters}} + <tr> + <td><span class="parametername">{{{id}}}</span></td> + <td>{{{description}}}</td> + </tr> +{{/typeParameters}} +{{#typeParameters.0}} + </tbody> +</table> +{{/typeParameters.0}} +{{#fieldValue}} +<h5 class="fieldValue">{{__global.fieldValue}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> + </tbody> +</table> +{{/fieldValue}} +{{#propertyValue}} +<h5 class="propertyValue">{{__global.propertyValue}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> + </tbody> +</table> +{{/propertyValue}} +{{#eventType}} +<h5 class="eventType">{{__global.eventType}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> + </tbody> +</table> +{{/eventType}} +{{/syntax}} +{{#overridden}} +<h5 class="overrides">{{__global.overrides}}</h5> +<div><xref uid="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/></div> +{{/overridden}} +{{#remarks}} +<h5 id="{{id}}_remarks">{{__global.remarks}}</h5> +<div class="markdown level1 remarks">{{{remarks}}}</div> +{{/remarks}} +{{#example.0}} +<h5 id="{{id}}_examples">{{__global.examples}}</h5> +{{/example.0}} +{{#example}} +{{{.}}} +{{/example}} +{{#exceptions.0}} +<h5 class="exceptions">{{__global.exceptions}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.condition}}</th> + </tr> + </thead> + <tbody> +{{/exceptions.0}} +{{#exceptions}} + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> +{{/exceptions}} +{{#exceptions.0}} + </tbody> +</table> +{{/exceptions.0}} +{{#seealso.0}} +<h5 id="{{id}}_seealso">{{__global.seealso}}</h5> +<div class="seealso"> +{{/seealso.0}} +{{#seealso}} + {{#isCref}} + <div>{{{type.specName.0.value}}}</div> + {{/isCref}} + {{^isCref}} + <div>{{{url}}}</div> + {{/isCref}} +{{/seealso}} +{{#seealso.0}} +</div> +{{/seealso.0}} +{{/children}} +{{/children}} +{{#implements.0}} +<h3 id="implements">{{__global.implements}}</h3> +{{/implements.0}} +{{#implements}} +<div> + {{#definition}} + <xref uid="{{definition}}" altProperty="fullName" displayProperty="nameWithType"/> + {{/definition}} + {{^definition}} + <xref uid="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/> + {{/definition}} +</div> +{{/implements}} +{{#extensionMethods.0}} +<h3 id="extensionmethods">{{__global.extensionMethods}}</h3> +{{/extensionMethods.0}} +{{#extensionMethods}} +<div> + {{#definition}} + <xref uid="{{definition}}" altProperty="fullName" displayProperty="nameWithType"/> + {{/definition}} + {{^definition}} + <xref uid="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/> + {{/definition}} +</div> +{{/extensionMethods}} +{{#seealso.0}} +<h3 id="seealso">{{__global.seealso}}</h3> +<div class="seealso"> +{{/seealso.0}} +{{#seealso}} + {{#isCref}} + <div>{{{type.specName.0.value}}}</div> + {{/isCref}} + {{^isCref}} + <div>{{{url}}}</div> + {{/isCref}} +{{/seealso}} +{{#seealso.0}} +</div> +{{/seealso.0}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/classSubtitle.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/classSubtitle.tmpl.partial new file mode 100644 index 0000000..5caea36 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/classSubtitle.tmpl.partial @@ -0,0 +1,28 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{#inConstructor}} +{{__global.constructorsInSubtitle}} +{{/inConstructor}} +{{#inField}} +{{__global.fieldsInSubtitle}} +{{/inField}} +{{#inProperty}} +{{__global.propertiesInSubtitle}} +{{/inProperty}} +{{#inMethod}} +{{__global.methodsInSubtitle}} +{{/inMethod}} +{{#inEvent}} +{{__global.eventsInSubtitle}} +{{/inEvent}} +{{#inOperator}} +{{__global.operatorsInSubtitle}} +{{/inOperator}} +{{#inEii}} +{{__global.eiisInSubtitle}} +{{/inEii}} +{{#inFunction}} +{{__global.functionsInSubtitle}} +{{/inFunction}} +{{#inMember}} +{{__global.membersInSubtitle}} +{{/inMember}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/customMREFContent.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/customMREFContent.tmpl.partial new file mode 100644 index 0000000..67395b8 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/customMREFContent.tmpl.partial @@ -0,0 +1,2 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{!Add your own custom template for the content for ManagedReference here}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/dd-li.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/dd-li.tmpl.partial new file mode 100644 index 0000000..75636c2 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/dd-li.tmpl.partial @@ -0,0 +1,3 @@ +{{#items}} + <li><a href="{{topicHref}}">{{name}}</a></li> +{{/items}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/enum.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/enum.tmpl.partial new file mode 100644 index 0000000..b5584ad --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/enum.tmpl.partial @@ -0,0 +1,50 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{>partials/class.header}} +{{#children}} +<h3 id="{{id}}">{{>partials/classSubtitle}}</h3> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + <thead> + <tbody> + {{#children}} + <tr> + <td id="{{id}}">{{name.0.value}}</td> + <td>{{{summary}}}</td> + </tr> + {{/children}} + </tbody> +</table> +{{/children}} +{{#seealso.0}} +<h5 id="{{id}}_seealso">{{__global.seealso}}</h5> +<div class="seealso"> +{{/seealso.0}} +{{#seealso}} + {{#isCref}} + <div>{{{type.specName.0.value}}}</div> + {{/isCref}} + {{^isCref}} + <div>{{{url}}}</div> + {{/isCref}} +{{/seealso}} +{{#seealso.0}} +</div> +{{/seealso.0}} +{{#extensionMethods.0}} +<h3 id="extensionmethods">{{__global.extensionMethods}}</h3> +{{/extensionMethods.0}} +{{#extensionMethods}} +<div> + {{#definition}} + <xref uid="{{definition}}" fullName="{{fullName.0.value}}" name="{{nameWithType.0.value}}"/> + {{/definition}} + {{^definition}} + <xref uid="{{uid}}" fullName="{{fullName.0.value}}" name="{{nameWithType.0.value}}"/> + {{/definition}} +</div> +{{/extensionMethods}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/footer.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/footer.tmpl.partial new file mode 100644 index 0000000..372b22d --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/footer.tmpl.partial @@ -0,0 +1,14 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<footer> + <div class="grad-bottom"></div> + <div class="footer"> + <div class="container"> + <span class="pull-right"> + <a href="#top">Back to top</a> + </span> + {{{_appFooter}}} + {{^_appFooter}}<span>Generated by <strong>DocFX</strong></span>{{/_appFooter}} + </div> + </div> +</footer> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/head.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/head.tmpl.partial new file mode 100644 index 0000000..4e8cd79 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/head.tmpl.partial @@ -0,0 +1,20 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title> + <meta name="viewport" content="width=device-width"> + <meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}"> + <meta name="generator" content="docfx {{_docfxVersion}}"> + {{#_description}}<meta name="description" content="{{_description}}">{{/_description}} + <link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}"> + <link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css"> + <link rel="stylesheet" href="{{_rel}}styles/docfx.css"> + <link rel="stylesheet" href="{{_rel}}styles/main.css"> + <meta property="docfx:navrel" content="{{_navRel}}"> + <meta property="docfx:tocrel" content="{{_tocRel}}"> + {{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}} + {{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}} + {{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}} +</head> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/li.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/li.tmpl.partial new file mode 100644 index 0000000..7e2d689 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/li.tmpl.partial @@ -0,0 +1,30 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<ul class="nav level{{level}}"> + {{#items}} + {{^dropdown}} + <li> + {{^leaf}} + <span class="expand-stub"></span> + {{/leaf}} + {{#topicHref}} + <a href="{{topicHref}}" name="{{tocHref}}" title="{{name}}">{{name}}</a> + {{/topicHref}} + {{^topicHref}} + <a>{{{name}}}</a> + {{/topicHref}} + {{^leaf}} + {{>partials/li}} + {{/leaf}} + </li> + {{/dropdown}} + {{#dropdown}} + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">{{name}} <span class="caret"></span></a> + <ul class="dropdown-menu level{{level}}"> + {{>partials/dd-li}} + </ul> + </li> + {{/dropdown}} + {{/items}} +</ul> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/logo.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/logo.tmpl.partial new file mode 100644 index 0000000..8209615 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/logo.tmpl.partial @@ -0,0 +1,5 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<a class="navbar-brand" href="{{_rel}}index.html"> + <img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" > +</a> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/namespace.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/namespace.tmpl.partial new file mode 100644 index 0000000..e8b6b14 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/namespace.tmpl.partial @@ -0,0 +1,13 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<h1 id="{{id}}" data-uid="{{uid}}" class="text-break">{{>partials/title}}</h1> +<div class="markdown level0 summary">{{{summary}}}</div> +<div class="markdown level0 conceptual">{{{conceptual}}}</div> +<div class="markdown level0 remarks">{{{remarks}}}</div> +{{#children}} + <h3 id="{{id}}">{{>partials/namespaceSubtitle}}</h3> + {{#children}} + <h4><xref uid="{{uid}}" altProperty="fullName" displayProperty="name"/></h4> + <section>{{{summary}}}</section> + {{/children}} +{{/children}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/namespaceSubtitle.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/namespaceSubtitle.tmpl.partial new file mode 100644 index 0000000..8cb3231 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/namespaceSubtitle.tmpl.partial @@ -0,0 +1,16 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{#inClass}} +{{__global.classesInSubtitle}} +{{/inClass}} +{{#inStruct}} +{{__global.structsInSubtitle}} +{{/inStruct}} +{{#inInterface}} +{{__global.interfacesInSubtitle}} +{{/inInterface}} +{{#inEnum}} +{{__global.enumsInSubtitle}} +{{/inEnum}} +{{#inDelegate}} +{{__global.delegatesInSubtitle}} +{{/inDelegate}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/navbar.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/navbar.tmpl.partial new file mode 100644 index 0000000..fb22e78 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/navbar.tmpl.partial @@ -0,0 +1,22 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + {{>partials/logo}} + </div> + <div class="collapse navbar-collapse" id="navbar"> + <form class="navbar-form navbar-right" role="search" id="search"> + <div class="form-group"> + <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> + </div> + </form> + </div> + </div> +</nav> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/rest.child.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/rest.child.tmpl.partial new file mode 100644 index 0000000..b8be203 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/rest.child.tmpl.partial @@ -0,0 +1,87 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{^_disableContribution}} +{{#docurl}} +<span class="small pull-right mobile-hide"> + <span class="divider">|</span> + <a href="{{docurl}}">Improve this Doc</a> +</span>{{/docurl}} +{{#sourceurl}} +<span class="small pull-right mobile-hide"> + <a href="{{sourceurl}}">View Source</a> +</span>{{/sourceurl}} +{{/_disableContribution}} + <h3 id="{{htmlId}}" data-uid="{{uid}}" class="text-capitalize">{{operationId}}</h3> +{{#summary}} +<div class="markdown level1 summary">{{{summary}}}</div> +{{/summary}} +{{#description}} +<div class="markdown level1 description">{{{description}}}</div> +{{/description}} +{{#conceptual}} + <div class="markdown level1 conceptual">{{{conceptual}}}</div> +{{/conceptual}} +<h5>Request</h5> +<div class="codewrapper"> + <pre><code class="lang-restApi hljs">{{operation}} {{path}}</code></pre> +</div> +{{#parameters.0}} +<h5>Parameters</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Value</th> + <th>Notes</th> + </tr> + </thead> + <tbody> +{{/parameters.0}} +{{#parameters}} + <tr> + <td><span class="parametername">{{#required}}*{{/required}}{{name}}</span></td> + <td>{{type}}</td> + <td>{{default}}</td> + <td>{{{description}}}</td> + </tr> + {{/parameters}} + {{#parameters.0}} + </tbody> +</table> +{{/parameters.0}} +{{#responses.0}} +<div class="responses"> + <h5>Responses</h5> + <table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>Status Code</th> + <th>Description</th> + <th>Samples</th> + </tr> + </thead> + <tbody> +{{/responses.0}} +{{#responses}} + <tr> + <td><span class="status">{{statusCode}}</span></td> + <td>{{{description}}}</td> + <td class="sample-response"> + {{#examples}} + <div class="mime-type"> + <i>Mime type: </i><span class="mime">{{mimeType}}</span> + </div> + <pre class="response-content"><code class="lang-js json hljs">{{content}}</code></pre> + {{/examples}} + </td> + </tr> + {{/responses}} + {{#responses.0}} + </tbody> + </table> +</div> +{{/responses.0}} +{{#footer}} +<div class="markdown level1 api-footer">{{{footer}}}</div> +{{/footer}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/rest.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/rest.tmpl.partial new file mode 100644 index 0000000..a7c73ec --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/rest.tmpl.partial @@ -0,0 +1,37 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<h1 id="{{htmlId}}" data-uid="{{uid}}" class="text-capitalize text-break">{{name}}</h1> +{{#summary}} +<div class="markdown level0 summary">{{{summary}}}</div> +{{/summary}} +{{#description}} +<div class="markdown level0 description">{{{description}}}</div> +{{/description}} +{{#conceptual}} + <div class="markdown level0 conceptual">{{{conceptual}}}</div> +{{/conceptual}} +{{#tags}} +<h2 id="{{htmlId}}">{{name}}</h2> +{{#description}} +<div class="markdown level0 description">{{{description}}}</div> +{{/description}} +{{#conceptual}} + <div class="markdown level0 conceptual">{{{conceptual}}}</div> +{{/conceptual}} +{{#children}} + {{>partials/rest.child}} +{{/children}} +{{/tags}} +{{!if some children are not tagged while other children are tagged, add default title}} +{{#children.0}} +{{#isTagLayout}} +<h2 id="other-apis">Other APIs</h2> +{{/isTagLayout}} +{{/children.0}} +{{#children}} + {{>partials/rest.child}} +{{/children}} +{{#footer}} +<div class="markdown level0 api-footer">{{{footer}}}</div> +{{/footer}} + diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/scripts.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/scripts.tmpl.partial new file mode 100644 index 0000000..ab3204e --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/scripts.tmpl.partial @@ -0,0 +1,5 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<script type="text/javascript" src="{{_rel}}styles/docfx.vendor.js"></script> +<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script> +<script type="text/javascript" src="{{_rel}}styles/main.js"></script> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/searchResults.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/searchResults.tmpl.partial new file mode 100644 index 0000000..16fca4f --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/searchResults.tmpl.partial @@ -0,0 +1,9 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<div id="search-results"> + <div class="search-list"></div> + <div class="sr-items"> + <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> + </div> + <ul id="pagination"></ul> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/title.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/title.tmpl.partial new file mode 100644 index 0000000..4e08f47 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/title.tmpl.partial @@ -0,0 +1,43 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} +{{#isNamespace}} +Namespace {{name.0.value}} +{{/isNamespace}} +{{#inClass}} +Class {{name.0.value}} +{{/inClass}} +{{#inStruct}} +Struct {{name.0.value}} +{{/inStruct}} +{{#inInterface}} +Interface {{name.0.value}} +{{/inInterface}} +{{#inEnum}} +Enum {{name.0.value}} +{{/inEnum}} +{{#inDelegate}} +Delegate {{name.0.value}} +{{/inDelegate}} +{{#inConstructor}} +Constructor {{name.0.value}} +{{/inConstructor}} +{{#inField}} +Field {{name.0.value}} +{{/inField}} +{{#inProperty}} +Property {{name.0.value}} +{{/inProperty}} +{{#inMethod}} +Method {{name.0.value}} +{{/inMethod}} +{{#inEvent}} +Event {{name.0.value}} +{{/inEvent}} +{{#inOperator}} +Operator {{name.0.value}} +{{/inOperator}} +{{#inEii}} +Explict Interface Implementation {{name.0.value}} +{{/inEii}} +{{#inPackage}} +Package {{name.0.value}} +{{/inPackage}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/toc.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/toc.tmpl.partial new file mode 100644 index 0000000..84cef1d --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/toc.tmpl.partial @@ -0,0 +1,8 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<div class="sidenav hide-when-search"> + <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> + <div class="sidetoggle collapse" id="sidetoggle"> + <div id="sidetoc"></div> + </div> +</div> diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/uref/class.header.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/class.header.tmpl.partial new file mode 100644 index 0000000..aa353b4 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/class.header.tmpl.partial @@ -0,0 +1,43 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<h1 id="{{id}}" data-uid="{{uid}}">{{>partials/title}}</h1> +<div class="markdown level0 summary">{{{summary}}}</div> +<div class="markdown level0 conceptual">{{{conceptual}}}</div> +{{#inheritance.0}} +<div class="inheritance"> + <h5>{{__global.inheritance}}</h5> +{{/inheritance.0}} +{{#inheritance}} + <div class="level{{index}}">{{{specName.0.value}}}</div> +{{/inheritance}} +{{#inheritance.0}} + <div class="level{{item.level}}"><span class="xref">{{item.name.0.value}}</span></div> +</div> +{{/inheritance.0}} +{{#inheritedMembers.0}} +<div class="inheritedMembers"> + <h5>{{__global.inheritedMembers}}</h5> +{{/inheritedMembers.0}} +{{#inheritedMembers}} + <div> + {{#definition}} + <xref uid="{{definition}}" altProperty="fullName" displayProperty="name"/> + {{/definition}} + {{^definition}} + <xref uid="{{uid}}" altProperty="fullName" displayProperty="name"/> + {{/definition}} + </div> +{{/inheritedMembers}} +{{#inheritedMembers.0}} +</div> +{{/inheritedMembers.0}} +{{#remarks}} +<h5 id="{{id}}_remarks"><strong>{{__global.remarks}}</strong></h5> +<div class="markdown level0 remarks">{{{remarks}}}</div> +{{/remarks}} +{{#example.0}} +<h5 id="{{id}}_examples"><strong>{{__global.examples}}</strong></h5> +{{/example.0}} +{{#example}} +{{{.}}} +{{/example}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/uref/class.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/class.tmpl.partial new file mode 100644 index 0000000..13f1450 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/class.tmpl.partial @@ -0,0 +1,235 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{>partials/uref/class.header}} +{{#children}} +<h3 id="{{id}}">{{>partials/classSubtitle}}</h3> +{{#children}} +{{^_disableContribution}} +{{#docurl}} +<span class="small pull-right mobile-hide"> + <span class="divider">|</span> + <a href="{{docurl}}">{{__global.improveThisDoc}}</a> +</span>{{/docurl}} +{{#sourceurl}} +<span class="small pull-right mobile-hide"> + <a href="{{sourceurl}}">{{__global.viewSource}}</a> +</span>{{/sourceurl}} +{{/_disableContribution}} +{{#overload}} +<a id="{{id}}" data-uid="{{uid}}"></a> +{{/overload}} +<h4 id="{{id}}" data-uid="{{uid}}">{{name.0.value}}</h4> +<div class="markdown level1 summary">{{{summary}}}</div> +<div class="markdown level1 conceptual">{{{conceptual}}}</div> +<h5 class="decalaration">{{__global.declaration}}</h5> +{{#syntax}} +<div class="codewrapper"> + <pre><code class="lang-{{syntax.content.0.lang}} hljs">{{syntax.content.0.value}}</code></pre> +</div> +{{#parameters.0}} +<h5 class="parameters">{{__global.parameters}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/parameters.0}} +{{#parameters}} + <tr> + <td>{{{type.specName.0.value}}}</td> + <td><em>{{{id}}}</em></td> + <td> + {{{description}}} + {{>partials/uref/parameters}} + </td> + </tr> +{{/parameters}} +{{#parameters.0}} + </tbody> +</table> +{{/parameters.0}} +{{#return}} +<h5 class="returns">{{__global.returns}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{value.type.0.specName.0.value}}}</td> + <td>{{{value.description}}}</td> + </tr> + </tbody> +</table> +{{/return}} +{{#typeParameters.0}} +<h5 class="typeParameters">{{__global.typeParameters}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/typeParameters.0}} +{{#typeParameters}} + <tr> + <td><em>{{{id}}}</em></td> + <td>{{{description}}}</td> + </tr> +{{/typeParameters}} +{{#typeParameters.0}} + </tbody> +</table> +{{/typeParameters.0}} +{{#fieldValue}} +<h5 class="fieldValue">{{__global.fieldValue}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{value.type.0.specName.0.value}}}</td> + <td>{{{value.description}}}</td> + </tr> + </tbody> +</table> +{{/fieldValue}} +{{#propertyValue}} +<h5 class="propertyValue">{{__global.propertyValue}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{value.type.0.specName.0.value}}}</td> + <td>{{{value.description}}}</td> + </tr> + </tbody> +</table> +{{/propertyValue}} +{{#eventType}} +<h5 class="eventType">{{__global.eventType}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> + </tbody> +</table> +{{/eventType}} +{{/syntax}} +{{#overridden}} +<h5 class="overrides">{{__global.overrides}}</h5> +<div><xref href="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/></div> +{{/overridden}} +{{#implements.0}} +<h5 class="implements">{{__global.implements}}</h5> +{{/implements.0}} +{{#implements}} + {{#definition}} + <div><xref href="{{definition}}" altProperty="fullName" displayProperty="nameWithType"/></div> + {{/definition}} + {{^definition}} + <div><xref href="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/></div> + {{/definition}} +{{/implements}} +{{#remarks}} +<h5 id="{{id}}_remarks">{{__global.remarks}}</h5> +<div class="markdown level1 remarks">{{{remarks}}}</div> +{{/remarks}} +{{#example.0}} +<h5 id="{{id}}_examples">{{__global.examples}}</h5> +{{/example.0}} +{{#example}} +{{{.}}} +{{/example}} +{{#exceptions.0}} +<h5 class="exceptions">{{__global.exceptions}}</h5> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.condition}}</th> + </tr> + </thead> + <tbody> +{{/exceptions.0}} +{{#exceptions.0.value}} + <tr> + <td>{{{type.specName.0.value}}}</td> + <td>{{{description}}}</td> + </tr> +{{/exceptions.0.value}} +{{#exceptions.0}} + </tbody> +</table> +{{/exceptions.0}} +{{#seealso.0}} +<h5 id="{{id}}_seealso">{{__global.seealso}}</h5> +<div class="seealso"> +{{/seealso.0}} +{{#seealso}} + {{#isCref}} + <div>{{{type.specName.0.value}}}</div> + {{/isCref}} + {{^isCref}} + <div>{{{url}}}</div> + {{/isCref}} +{{/seealso}} +{{#seealso.0}} +</div> +{{/seealso.0}} +{{/children}} +{{/children}} +{{#extensionMethods.0}} +<h3 id="extensionmethods">{{__global.extensionMethods}}</h3> +{{/extensionMethods.0}} +{{#extensionMethods}} +<div> + {{#definition}} + <xref href="{{definition}}" altProperty="fullName" displayProperty="nameWithType"/> + {{/definition}} + {{^definition}} + <xref href="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/> + {{/definition}} +</div> +{{/extensionMethods}} +{{#seealso.0}} +<h3 id="seealso">{{__global.seealso}}</h3> +<div class="seealso"> +{{/seealso.0}} +{{#seealso}} + {{#isCref}} + <div>{{{type.specName.0.value}}}</div> + {{/isCref}} + {{^isCref}} + <div>{{{url}}}</div> + {{/isCref}} +{{/seealso}} +{{#seealso.0}} +</div> +{{/seealso.0}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/uref/enum.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/enum.tmpl.partial new file mode 100644 index 0000000..ef9fcb3 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/enum.tmpl.partial @@ -0,0 +1,35 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{>partials/uref/class.header}} +{{#children}} +<h3 id="{{id}}">{{>partials/classSubtitle}}</h3> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + <thead> + <tbody> + {{#children}} + <tr> + <td id="{{id}}">{{name.0.value}}</td> + <td>{{{summary}}}</td> + </tr> + {{/children}} + </tbody> +</table> +{{/children}} +{{#extensionMethods.0}} +<h3 id="extensionmethods">{{__global.extensionMethods}}</h3> +{{/extensionMethods.0}} +{{#extensionMethods}} +<div> + {{#definition}} + <xref uid="{{definition}}" fullName="{{fullName.0.value}}" name="{{nameWithType.0.value}}"/> + {{/definition}} + {{^definition}} + <xref uid="{{uid}}" fullName="{{fullName.0.value}}" name="{{nameWithType.0.value}}"/> + {{/definition}} +</div> +{{/extensionMethods}} diff --git a/websites/apidocs/DefaultTemplateNoAssets/partials/uref/parameters.tmpl.partial b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/parameters.tmpl.partial new file mode 100644 index 0000000..25feab9 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/partials/uref/parameters.tmpl.partial @@ -0,0 +1,28 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +{{#properties.0}} +<h6 class="parameters">Properties</h6> +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>{{__global.type}}</th> + <th>{{__global.name}}</th> + <th>{{__global.description}}</th> + </tr> + </thead> + <tbody> +{{/properties.0}} +{{#properties}} + <tr> + <td>{{{type.specName.0.value}}}</td> + <td><em class="text-break">{{{id}}}</em></td> + <td> + {{{description}}} + {{>partials/parameters}} + </td> + </tr> +{{/properties}} +{{#properties.0}} + </tbody> +</table> +{{/properties.0}} \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/search-stopwords.json b/websites/apidocs/DefaultTemplateNoAssets/search-stopwords.json new file mode 100644 index 0000000..0bdcc2c --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/search-stopwords.json @@ -0,0 +1,121 @@ +[ + "a", + "able", + "about", + "across", + "after", + "all", + "almost", + "also", + "am", + "among", + "an", + "and", + "any", + "are", + "as", + "at", + "be", + "because", + "been", + "but", + "by", + "can", + "cannot", + "could", + "dear", + "did", + "do", + "does", + "either", + "else", + "ever", + "every", + "for", + "from", + "get", + "got", + "had", + "has", + "have", + "he", + "her", + "hers", + "him", + "his", + "how", + "however", + "i", + "if", + "in", + "into", + "is", + "it", + "its", + "just", + "least", + "let", + "like", + "likely", + "may", + "me", + "might", + "most", + "must", + "my", + "neither", + "no", + "nor", + "not", + "of", + "off", + "often", + "on", + "only", + "or", + "other", + "our", + "own", + "rather", + "said", + "say", + "says", + "she", + "should", + "since", + "so", + "some", + "than", + "that", + "the", + "their", + "them", + "then", + "there", + "these", + "they", + "this", + "tis", + "to", + "too", + "twas", + "us", + "wants", + "was", + "we", + "were", + "what", + "when", + "where", + "which", + "while", + "who", + "whom", + "why", + "will", + "with", + "would", + "yet", + "you", + "your" +] diff --git a/websites/apidocs/DefaultTemplateNoAssets/toc.extension.js b/websites/apidocs/DefaultTemplateNoAssets/toc.extension.js new file mode 100644 index 0000000..1e37838 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/toc.extension.js @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/** + * This method will be called at the start of exports.transform in toc.html.js + */ +exports.preTransform = function (model) { + return model; +} + +/** + * This method will be called at the end of exports.transform in toc.html.js + */ +exports.postTransform = function (model) { + return model; +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/toc.html.js b/websites/apidocs/DefaultTemplateNoAssets/toc.html.js new file mode 100644 index 0000000..69a8541 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/toc.html.js @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. +var extension = require('./toc.extension.js') + +exports.transform = function (model) { + + if (extension && extension.preTransform) { + model = extension.preTransform(model); + } + + transformItem(model, 1); + if (model.items && model.items.length > 0) model.leaf = false; + model.title = "Table of Content"; + model._disableToc = true; + + if (extension && extension.postTransform) { + model = extension.postTransform(model); + } + + return model; + + function transformItem(item, level) { + // set to null incase mustache looks up + item.topicHref = item.topicHref || null; + item.tocHref = item.tocHref || null; + item.name = item.name || null; + + item.level = level; + if (item.items && item.items.length > 0) { + var length = item.items.length; + for (var i = 0; i < length; i++) { + transformItem(item.items[i], level + 1); + }; + } else { + item.items = []; + item.leaf = true; + } + } +} diff --git a/websites/apidocs/DefaultTemplateNoAssets/toc.html.tmpl b/websites/apidocs/DefaultTemplateNoAssets/toc.html.tmpl new file mode 100644 index 0000000..01dbddd --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/toc.html.tmpl @@ -0,0 +1,21 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<div id="sidetoggle"> + <div> + {{^_disableSideFilter}} + <div class="sidefilter"> + <form class="toc-filter"> + <span class="glyphicon glyphicon-filter filter-icon"></span> + <input type="text" id="toc_filter_input" placeholder="Enter here to filter..." onkeypress="if(event.keyCode==13) {return false;}"> + </form> + </div> + {{/_disableSideFilter}} + <div class="sidetoc"> + <div class="toc" id="toc"> + {{^leaf}} + {{>partials/li}} + {{/leaf}} + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/websites/apidocs/DefaultTemplateNoAssets/token.json b/websites/apidocs/DefaultTemplateNoAssets/token.json new file mode 100644 index 0000000..f6f0756 --- /dev/null +++ b/websites/apidocs/DefaultTemplateNoAssets/token.json @@ -0,0 +1,46 @@ +{ + "classesInSubtitle": "Classes", + "structsInSubtitle": "Structs", + "interfacesInSubtitle": "Interfaces", + "enumsInSubtitle": "Enums", + "delegatesInSubtitle": "Delegates", + "constructorsInSubtitle": "Constructors", + "fieldsInSubtitle": "Fields", + "propertiesInSubtitle": "Properties", + "methodsInSubtitle": "Methods", + "eventsInSubtitle": "Events", + "operatorsInSubtitle": "Operators", + "eiisInSubtitle": "Explicit Interface Implementations", + "functionsInSubtitle": "Functions", + "membersInSubtitle": "Members", + "improveThisDoc": "Improve this Doc", + "viewSource": "View Source", + "inheritance": "Inheritance", + "inheritedMembers": "Inherited Members", + "namespace": "Namespace", + "assembly": "Assembly", + "syntax": "Syntax", + "overrides": "Overrides", + "implements": "Implements", + "remarks": "Remarks", + "examples": "Examples", + "seealso": "See Also", + "declaration": "Declaration", + "parameters": "Parameters", + "typeParameters": "Type Parameters", + "type": "Type", + "name": "Name", + "description": "Description", + "returns": "Returns", + "fieldValue": "Field Value", + "propertyValue": "Property Value", + "eventType": "Event Type", + "exceptions": "Exceptions", + "condition": "Condition", + "extensionMethods": "Extension Methods", + "note": "<h5>Note</h5>", + "warning": "<h5>Warning</h5>", + "tip": "<h5>Tip</h5>", + "important": "<h5>Important</h5>", + "caution": "<h5>Caution</h5>" +} \ No newline at end of file diff --git a/websites/apidocs/LuceneTemplate/ManagedReference.extension.js b/websites/apidocs/LuceneTemplate/ManagedReference.extension.js new file mode 100644 index 0000000..03bb818 --- /dev/null +++ b/websites/apidocs/LuceneTemplate/ManagedReference.extension.js @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/** + * This method will be called at the start of exports.transform in ManagedReference.html.primary.js + */ +exports.preTransform = function (model) { + + // manually update the remove repo address so we never need to worry about where it's built since + // otherwise this address is based purely on the git commands remote sources + if (model && model._gitSource && model.source && model.source.remote && model.source.remote.repo) { + model.source.remote.repo = model._gitSource; + } + + return model; +} + +/** + * This method will be called at the end of exports.transform in ManagedReference.html.primary.js + */ +exports.postTransform = function (model) { + return model; +} diff --git a/websites/apidocs/LuceneTemplate/partials/logo.tmpl.partial b/websites/apidocs/LuceneTemplate/partials/logo.tmpl.partial new file mode 100644 index 0000000..8209615 --- /dev/null +++ b/websites/apidocs/LuceneTemplate/partials/logo.tmpl.partial @@ -0,0 +1,5 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + +<a class="navbar-brand" href="{{_rel}}index.html"> + <img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" > +</a> diff --git a/websites/apidocs/lucenetemplate/styles/main.css b/websites/apidocs/LuceneTemplateAssets/styles/main.css similarity index 100% rename from websites/apidocs/lucenetemplate/styles/main.css rename to websites/apidocs/LuceneTemplateAssets/styles/main.css diff --git a/websites/apidocs/lucenetemplate/styles/main.js b/websites/apidocs/LuceneTemplateAssets/styles/main.js similarity index 100% rename from websites/apidocs/lucenetemplate/styles/main.js rename to websites/apidocs/LuceneTemplateAssets/styles/main.js diff --git a/websites/apidocs/api/toc.yml b/websites/apidocs/api/toc.yml deleted file mode 100644 index a24c119..0000000 --- a/websites/apidocs/api/toc.yml +++ /dev/null @@ -1,81 +0,0 @@ -- name: Lucene.Net - href: ../obj/docfx/api/Lucene.Net/toc.yml - topicUid: Lucene.Net -- name: Lucene.Net.Analysis.Common - href: ../obj/docfx/api/Lucene.Net.Analysis.Common/toc.yml - topicUid: Lucene.Net.Analysis.Common -- name: Lucene.Net.Analysis.Kuromoji - href: ../obj/docfx/api/Lucene.Net.Analysis.Kuromoji/toc.yml - topicUid: Lucene.Net.Analysis.Ja -- name: Lucene.Net.Analysis.Morfologik - href: ../obj/docfx/api/Lucene.Net.Analysis.Morfologik/toc.yml - topicUid: Lucene.Net.Analysis.Morfologik -- name: Lucene.Net.Analysis.OpenNLP - href: ../obj/docfx/api/Lucene.Net.Analysis.OpenNLP/toc.yml - topicUid: Lucene.Net.Analysis.OpenNLP -- name: Lucene.Net.Analysis.Phonetic - href: ../obj/docfx/api/Lucene.Net.Analysis.Phonetic/toc.yml - topicUid: Lucene.Net.Analysis.Phonetic -- name: Lucene.Net.Analysis.SmartCn - href: ../obj/docfx/api/Lucene.Net.Analysis.SmartCn/toc.yml - topicUid: Lucene.Net.Analysis.Cn.Smart -- name: Lucene.Net.Analysis.Stempel - href: ../obj/docfx/api/Lucene.Net.Analysis.Stempel/toc.yml - topicUid: Lucene.Net.Analysis.Stempel -- name: Lucene.Net.Benchmarks - href: ../obj/docfx/api/Lucene.Net.Benchmarks/toc.yml - topicUid: Lucene.Net.Benchmarks -- name: Lucene.Net.Classification - href: ../obj/docfx/api/Lucene.Net.Classification/toc.yml - topicUid: Lucene.Net.Classification -- name: Lucene.Net.Codecs - href: ../obj/docfx/api/Lucene.Net.Codecs/toc.yml - topicUid: Lucene.Net.Codecs -- name: Lucene.Net.Expressions - href: ../obj/docfx/api/Lucene.Net.Expressions/toc.yml - topicUid: Lucene.Net.Expressions -- name: Lucene.Net.Facet - href: ../obj/docfx/api/Lucene.Net.Facet/toc.yml - topicUid: Lucene.Net.Facet -- name: Lucene.Net.Grouping - href: ../obj/docfx/api/Lucene.Net.Grouping/toc.yml - topicUid: Lucene.Net.Grouping -- name: Lucene.Net.Highlighter - href: ../obj/docfx/api/Lucene.Net.Highlighter/toc.yml - topicUid: Lucene.Net.Highlighter -- name: Lucene.Net.ICU - href: ../obj/docfx/api/Lucene.Net.ICU/toc.yml - topicUid: Lucene.Net.Analysis.Icu -- name: Lucene.Net.Join - href: ../obj/docfx/api/Lucene.Net.Join/toc.yml - topicUid: Lucene.Net.Join -- name: Lucene.Net.Memory - href: ../obj/docfx/api/Lucene.Net.Memory/toc.yml - topicUid: Lucene.Net.Index.Memory -- name: Lucene.Net.Misc - href: ../obj/docfx/api/Lucene.Net.Misc/toc.yml - topicUid: Lucene.Net.Misc -- name: Lucene.Net.Queries - href: ../obj/docfx/api/Lucene.Net.Queries/toc.yml - topicUid: Lucene.Net.Queries -- name: Lucene.Net.QueryParser - href: ../obj/docfx/api/Lucene.Net.QueryParser/toc.yml - topicUid: Lucene.Net.QueryParser -- name: Lucene.Net.Replicator - href: ../obj/docfx/api/Lucene.Net.Replicator/toc.yml - topicUid: Lucene.Net.Replicator -- name: Lucene.Net.Sandbox - href: ../obj/docfx/api/Lucene.Net.Sandbox/toc.yml - topicUid: Lucene.Net.Sandbox -- name: Lucene.Net.Spatial - href: ../obj/docfx/api/Lucene.Net.Spatial/toc.yml - topicUid: Lucene.Net.Spatial -- name: Lucene.Net.Suggest - href: ../obj/docfx/api/Lucene.Net.Suggest/toc.yml - topicUid: Lucene.Net.Suggest -- name: Lucene.Net.TestFramework - href: ../obj/docfx/api/Lucene.Net.TestFramework/toc.yml - topicUid: Lucene.Net.TestFramework -- name: Lucene.Net.Demo - href: ../obj/docfx/api/Lucene.Net.Demo/toc.yml - topicUid: Lucene.Net.Demo \ No newline at end of file diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json index f095f87..f4a6356 100644 --- a/websites/apidocs/docfx.core.json +++ b/websites/apidocs/docfx.core.json @@ -25,35 +25,27 @@ "files": [ "overview.md" ], - "src": "../../src/Lucene.Net", - "dest": "docs" + "src": "../../src/Lucene.Net" }, { "files": [ "**.yml", "**.md" ], - "src": "obj/docfx/api/core", - "dest": "docs" + "src": "obj/docfx/api/core" }, { "files": [ "toc/core/toc.yml" - ], - "dest": "docs" - } - ], - "resource": [ + ] + }, { "files": [ - "logo/favicon.ico", - "logo/lucene-net-icon-64x64.png", - "logo/lucene-net-color.png", - "logo/lucene-net-reverse-color.png" + "toc.yml" ], - "src": "../../branding" + "src": "toc/subsite" } - ], + ], "overwrite": [ { "files": [ @@ -63,11 +55,12 @@ ], "dest": "_site/api/core", "globalMetadataFiles": [ - "docfx.global.json" + "docfx.global.json", + "docfx.global.subsite.json" ], "template": [ - "default", - "lucenetemplate" + "DefaultTemplateNoAssets", + "LuceneTemplate" ], "postProcessors": [], "markdownEngineName": "dfm", diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 5c110b4..84d26ef 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -622,7 +622,7 @@ "fileMetadataFiles": [], "template": [ "default", - "lucenetemplate" + "LuceneTemplate" ], "postProcessors": [], "markdownEngineName": "dfm", diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json new file mode 100644 index 0000000..631f909 --- /dev/null +++ b/websites/apidocs/docfx.site.json @@ -0,0 +1,36 @@ +{ + "build": { + "content": [ + { + "files": [ + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "logo/favicon.ico", + "logo/lucene-net-icon-64x64.png", + "logo/lucene-net-color.png", + "logo/lucene-net-reverse-color.png" + ], + "src": "../../branding" + } + ], + "dest": "_site", + "globalMetadataFiles": ["docfx.global.json"], + "template": [ + "default", + "LuceneTemplate", + "LuceneTemplateAssets" + ], + "postProcessors": [], + "markdownEngineName": "dfm", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index cc0ee4c..8cd9415 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -25,35 +25,27 @@ "files": [ "overview.md" ], - "src": "../../src/Lucene.Net.TestFramework", - "dest": "docs" + "src": "../../src/Lucene.Net.TestFramework" }, { "files": [ "**.yml", "**.md" ], - "src": "obj/docfx/api/test-framework", - "dest": "docs" + "src": "obj/docfx/api/test-framework" }, { "files": [ "toc/test-framework/toc.yml" - ], - "dest": "docs" - } - ], - "resource": [ + ] + }, { "files": [ - "logo/favicon.ico", - "logo/lucene-net-icon-64x64.png", - "logo/lucene-net-color.png", - "logo/lucene-net-reverse-color.png" + "toc.yml" ], - "src": "../../branding" + "src": "toc/subsite" } - ], + ], "overwrite": [ { "files": [ @@ -63,11 +55,12 @@ ], "dest": "_site/api/test-framework", "globalMetadataFiles": [ - "docfx.global.json" + "docfx.global.json", + "docfx.global.subsite.json" ], "template": [ - "default", - "lucenetemplate" + "DefaultTemplateNoAssets", + "LuceneTemplate" ], "postProcessors": [], "markdownEngineName": "dfm", diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 2050512..a5c613e 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -119,8 +119,7 @@ $DocFxJsonMeta = @( "docfx.core.json", "docfx.test-framework.json" ) -# $DocFxJsonSite = Join-Path -Path $ApiDocsFolder "docfx.site.json" -$DocFxJsonSite = Join-Path -Path $ApiDocsFolder "docfx.core.json" +$DocFxJsonSite = Join-Path -Path $ApiDocsFolder "docfx.site.json" # set env vars that will be replaced in Markdown $env:LuceneNetVersion = $LuceneNetVersion @@ -143,21 +142,21 @@ if ($?) { } } -# if ($?) { -# foreach ($proj in $DocFxJsonMeta) { -# $projFile = Join-Path -Path $ApiDocsFolder $proj -# -# # build the output -# Write-Host "Building site output for $projFile..." -# -# if ($Clean -eq 1) { -# & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --force -# } -# else { -# & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel -# } -# } -# } +if ($?) { + foreach ($proj in $DocFxJsonMeta) { + $projFile = Join-Path -Path $ApiDocsFolder $proj + + # build the output + Write-Host "Building site output for $projFile..." + + if ($Clean -eq 1) { + & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --force --debug + } + else { + & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --debug + } + } +} if ($?) { if ($ServeDocs -eq 0) { @@ -166,16 +165,16 @@ if ($?) { Write-Host "Building docs..." if ($Clean -eq 1) { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --force + & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --force --debug } else { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel + & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --debug } } else { # build + serve (for testing) Write-Host "starting website..." - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --serve + & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --serve --debug } } diff --git a/websites/apidocs/filterConfig.yml b/websites/apidocs/filterConfig.yml index ea8d3b8..4a7b065 100644 --- a/websites/apidocs/filterConfig.yml +++ b/websites/apidocs/filterConfig.yml @@ -1,4 +1,7 @@ apiRules: - exclude: uidRegex: ^Lucene\.Net\.Support\.Character\.\w*SURROGATE - type: Field \ No newline at end of file + type: Field +- exclude: + uidRegex: ^Lucene\.Net\.Test$ + type: Namespace \ No newline at end of file diff --git a/websites/apidocs/lucenetemplate/web.config b/websites/apidocs/lucenetemplate/web.config deleted file mode 100644 index 51f0d98..0000000 --- a/websites/apidocs/lucenetemplate/web.config +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - - -<configuration> - <system.webServer> - <staticContent> - <mimeMap fileExtension=".json" mimeType="application/json" /> - </staticContent> - </system.webServer> -</configuration> \ No newline at end of file diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index fb08318..b111255 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -1,6 +1,5 @@ - name: Lucene.Net API - href: api/ - topicUid: Lucene.Net + href: / - name: Lucene.Net CLI href: ../../src/dotnet/tools/lucene-cli/docs/ topicHref: ../../src/dotnet/tools/lucene-cli/docs/index.md diff --git a/websites/apidocs/toc/subsite/toc.yml b/websites/apidocs/toc/subsite/toc.yml new file mode 100644 index 0000000..033099d --- /dev/null +++ b/websites/apidocs/toc/subsite/toc.yml @@ -0,0 +1,6 @@ +- name: Lucene.Net API + href: / +- name: Lucene.Net CLI + href: /cli/index.html +- name: Lucene.Net Website + href: https://lucenenet.apache.org/ \ No newline at end of file
