Skip to content

Commit

Permalink
Documentation (#12)
Browse files Browse the repository at this point in the history
* Fixed token setting issue. (Azure#1108)

* Fixed refresh logic for shared access signature tokens. Fixed time formatting. (Azure#1112)

* Hide the product subscription name on delegation (Azure#1113)

closes Azure#787

* Cleaned up authentication logic. Fixed issue with read-only props in schema. Fixes Map widget issue. (Azure#1115)

* Added headers in operation response docs (Azure#1117)

close Azure#693

* Operation list improvements (Azure#1116)

* Added toggle to manage operation name wrap
* Added a toggle to manage to show operation urlTemplate or name
* added search operation by urlTemplate
* changed wrap mode to break-word
close Azure#1019

* Added api products widgets (grid and tiles) (Azure#1126)

* Added API products widgets (grid and tiles)

* added style class for tiles

closes Azure#1072

* Fixed tabs for representation contentType (Azure#1127)

closes Azure#1119

* Fixed signout on close user account (Azure#1129)

Fixed signout on close user account
added notification parameter to send an email for the developer portal

* Added basic XSD schema support in API documentation. (Azure#1137)

* Fix for migration between subscription-to-subscription apim developer portal (Azure#1145)

* Fix for migration between subscription to subscription apim dev portal by passing the az login details in parameters

* updated description of parameter

* Fixed PR comments - updated optional description in parameters

* Added header to trace get mapi requests (Azure#1147)

* Process for migration scripts will return error code when scrip fails (Azure#1149)

* Added notification parameter for create user with AAD (Azure#1150)

* Fixed notification parameter for create user with OAuth (Azure#1152)

* Temporarily added supplying state parameter to the client. (Azure#1153)

* Added token retrieve from user activate MAPI request (Azure#1158)

* Added token retrive from user activate MAPI request
close Azure#1157

* Added logic to prevent DOM changes on request to prevent error (Azure#1160)

* Changed variable requestUrl to url (Azure#1159)

Co-authored-by: Erik Mogensen <erik.mogensen@hm.com>

* Added tiles widgets for api products and products list (Azure#1162)

* Changed conflict destToken -> destKey (Azure#1164)

Co-authored-by: Erik Mogensen <erik.mogensen@hm.com>

* Accessibility fix 8954122: removed action from operation name (Azure#1167)

* Upgraded paperbits libraries to 0.1.382. (Azure#1174)

* Fixed several bugs (Azure#1185)

* Bump elliptic from 6.5.3 to 6.5.4 (Azure#1178)

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump prismjs from 1.22.0 to 1.23.0 (Azure#1169)

Bumps [prismjs](https://github.com/PrismJS/prism) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](PrismJS/prism@v1.22.0...v1.23.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Rolled back azure libraries due to discovered bugs. Upraded node-sass and sass-loader packages. (Azure#1188)

* Added support for tags as a refrence in url for apis and operations (Azure#1189)

* Fixed layout for blocks and inline-blocks. (Azure#1190)

* Fixed layout for navigation items. Fixed bug with "Open in new window" option. (Azure#1193)

* Fixed several accessibility issues. (Azure#1195)

* Added asterisks to required form fields.
* Fixed luminosity contrast ratio for the form group toggle button.
* Unified hyperlink selector controls across components. Fixed tooltip binding.
* Added setting the aria-selected tag to code samples tabs.

* Fixed some issues with hyperlink and anchor resolution. (Azure#1197)

* Increase apiversion to handle minimum apiversion set (Azure#1215)

Co-authored-by: Erik Mogensen <erik.mogensen@hm.com>

* Fixed issues with menu and hyperlink rendering. (Azure#1222)

* Fixed dropdown styles and functionality. Fixed report widgets. (Azure#1223)

* Extended "Operation details" widget with "Use CORS proxy" option. (Azure#1233)

* Fixed delegation actions names (Azure#1234)

Fixed delegation actions names

* Uncommented /portalRevisions endpoint to enable publishing. (Azure#1236)

* Contrast colors fix for try button and focus selection (Azure#1239)

* [scripts.v3] fix: http request fails when response code is 202, which means Accepted (Azure#1242)

Co-authored-by: Benas Taurosevicius <Benas.Taurosevicius@centric.eu>

* Fixes for token refresh logic. (Azure#1252)

* Removed devops scripts v1. (Azure#1259)

* Revise readme.md to point to new documentation (Azure#1263)

* Added support for "resource owner password" grant flow. (Azure#1219)

* Added missing hamburger icon style. (Azure#1270)

* Fixed close account. Reuse sign-out on account close. (Azure#1285)

* Fixed close account. Reuse signout on account close.

* use update instead of init in markdown bindingHandler (Azure#1279)

* Upgraded dependency libraries. Added new widget icons. (Azure#1288)

* Fixed several accessibility issues (Azure#1292)

* Fixed accessibility issues with tab controls.
* Fixed syntax highlight colors to comply with luminosity requirements.
* Added dialog-like behavior to Test console panel.

* Added capture/generate scripts metadata operations. (Azure#1295)

* Removed direct dependency of node-sass module. (Azure#1317)

* Fixed form controls focus highlight. (Azure#1318)

* Fixed serveal accessibility and security issues. Fixed build issues with sass-loader. (Azure#1324)

* Added support sso token in hash (Azure#1339)

* WebSocket APIs (Azure#1297)

Added code templates for ws
Added API type in API list
Improved WebSockets examples
Improved WebSockets support in test console
Merged changes from managed version

* Leveraged B2C signout. Moved AAD/B2C configuration publishing into config.json. Added option to override reply URL(s). (Azure#1346)

* Fixed minor issues with B2C configuration. Switched publishing functionality to portal revisions API. (Azure#1349)

* Added support for setting folders and timestamp (Azure#1365)

Co-authored-by: Erik Mogensen <erik.mogensen@users.noreply.github.com>

* Added support for multipart request body in Test console (Azure#1359)

Co-authored-by: Igor O <igo@microsoft.com>

* Added basic mulitpart form data support to API documentation. (Azure#1381)

* Azure Devops pipeline to migrate APIM dev portal from one instance to another instance of APIM (Azure#1362)

* Revert "Azure Devops pipeline to migrate APIM dev portal from one instance to another instance of APIM (Azure#1362)" (Azure#1390)

This reverts commit 0c618f7.

* Upgraded dependencies. Replaced deprecated awesome-typescript-loader with ts-loader. Fixed Terser build configuration. (Azure#1391)

* Fixed minor issue with AAD signout. Rolled back terser-webpack-plugin version to mitigate build issues. (Azure#1392)

* feat: ignore .DS_Store files (Azure#1397)

* fix aadB2CClientConfig casing (Azure#1395)

* Disabled scrolling to operation name by default. (Azure#1402)

* Fixed widget selection issue in layout editor. (Azure#1418)

* Added functionality to show legal text by default on product page load (Azure#1414)

* script to add GTM to developer portal (Azure#1405)

* Added npm dependencies

* Specify npm dependencies version

* Navigation menu for default layout update

* Import for icons fix

* Material icons import - Added sass logic

* Authentication

- Navigation menu through the widget designer
- Removed icon from B2C button

* Merge branch 'master' into feature/auth

* Testing Sign-in AD B2C

* Redirect to home when unauthorized

* Avatar menu when authenticated

* Fixed config modelBinder

* Custom widget config

* Custom avatar menu

* Fixing widget contract

* Basic widget contract and view model binder

* Removed widget editor

"Visible to" logic is directly set in the code not through the editor

* Code clean-up

* API custom tiles

* Seperating style for API tiles

* Same folder for custom style

* Include custom style in already existing file

* Custom documentation service

- Service to get markdowns from github repository

* API tiles & Github service (documentation)

- Avatar menu
- Service for Github documentation
- API list

* Fixing navigation issues

Updating dependencies

* Documentation

- Documentation paperbits widget
- Dynamic menu
- Anchors

* Generate SAS Token

Co-authored-by: Alexander Zaslonov <zaslonov.alexander@gmail.com>
Co-authored-by: Igor O <ygrik@hotmail.com>
Co-authored-by: Sanjeevi Subramani <ssanjeevi.ss@gmail.com>
Co-authored-by: Marcin Dudek <manekd@gmail.com>
Co-authored-by: Erik Mogensen <ErikMogensen@users.noreply.github.com>
Co-authored-by: Erik Mogensen <erik.mogensen@hm.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benas Taurosevičius <b.taurosevicius@gmail.com>
Co-authored-by: Benas Taurosevicius <Benas.Taurosevicius@centric.eu>
Co-authored-by: Mike Budzynski <40186513+mikebudzynski@users.noreply.github.com>
Co-authored-by: patst <patrick.steinig@googlemail.com>
Co-authored-by: Erik Mogensen <erik.mogensen@users.noreply.github.com>
Co-authored-by: Igor O <igo@microsoft.com>
Co-authored-by: Bernhard Rode <mail@bernhardrode.de>
Co-authored-by: Travis Whipps <88871562+traviswhipps@users.noreply.github.com>
Co-authored-by: Nik Osvalds <60047271+nosvalds@users.noreply.github.com>
Co-authored-by: Phil Martinez <contact@phfrc.dev>
Co-authored-by: Émilien Bassez <emilien.bassez@be-mo.io>
  • Loading branch information
19 people committed Jan 31, 2022
1 parent 6e41056 commit 2c0e671
Show file tree
Hide file tree
Showing 65 changed files with 5,157 additions and 3,124 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
env:
AZURE_APIM_DEVELOPER_PORTAL_URL: ${{ secrets.AZURE_APIM_DEVELOPER_PORTAL_URL }}
AZURE_APIM_ID: ${{ secrets.AZURE_APIM_ID }}
AZURE_APIM_MANAGEMENT_SAS_ACCESS_TOKEN: ${{ secrets.AZURE_APIM_MANAGEMENT_SAS_ACCESS_TOKEN }}
AZURE_APIM_MANAGEMENT_SAS_ACCESS_TOKEN: ${{ env.AZURE_APIM_MANAGEMENT_SAS_ACCESS_TOKEN }}
AZURE_APIM_MANAGEMENT_URL: ${{ secrets.AZURE_APIM_MANAGEMENT_URL }}
AZURE_STORAGE_SAS_URL: ${{ secrets.AZURE_STORAGE_SAS_URL }}
DOCUMENTATION_CONTAINER_URL: ${{ secrets.DOCUMENTATION_CONTAINER_URL }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Contract } from "@paperbits/common";

export interface BemoDocumentationContract extends Contract {
fileName: string;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { IWidgetOrder, IWidgetHandler } from "@paperbits/common/editing";
import { BemoDocumentationModel } from "./bemoDocumentationModel";
import { widgetName, widgetDisplayName, widgetCategory,defaultFileName } from "./constants";

import { widgetName, widgetDisplayName, widgetCategory } from "./constants";

export class BemoDocumentationHandlers implements IWidgetHandler {
public async getWidgetOrder(): Promise<IWidgetOrder> {
Expand All @@ -13,7 +12,6 @@ export class BemoDocumentationHandlers implements IWidgetHandler {
requires: ["html"],
createModel: async () => {
const model = new BemoDocumentationModel();
model.fileName = defaultFileName;
return model;
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export class BemoDocumentationModel {
public fileName: string;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IModelBinder } from "@paperbits/common/editing";
import { BemoDocumentationModel } from "./bemoDocumentationModel";
import { Contract } from "@paperbits/common";
import { widgetName, defaultFileName } from "./constants";
import { widgetName } from "./constants";
import { BemoDocumentationContract } from "./bemoDocumentationContract";

export class BemoDocumentationModelBinder implements IModelBinder<BemoDocumentationModel> {
Expand All @@ -15,14 +15,12 @@ export class BemoDocumentationModelBinder implements IModelBinder<BemoDocumentat

public async contractToModel(contract: BemoDocumentationContract): Promise<BemoDocumentationModel> {
const model = new BemoDocumentationModel();
model.fileName = contract.fileName || defaultFileName;
return model;
}

public modelToContract(model: BemoDocumentationModel): Contract {
const contract:BemoDocumentationContract = {
type: widgetName,
fileName: model.fileName
const contract: BemoDocumentationContract = {
type: widgetName
};

return contract;
Expand Down
3 changes: 1 addition & 2 deletions community/widgets/bemo-documentation/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export const widgetDisplayName = "Be:Mo Documentation";
export const widgetCategory = "Community";
export const widgetSelector = "bemo-documentation";
export const widgetRuntimeSelector = "bemo-documentation-runtime";
export const widgetEditorSelector = "bemo-documentation-editor";
export const defaultFileName = "sample_document.html";
export const widgetEditorSelector = "bemo-documentation-editor";
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<fieldset class="form" data-bind="scrollable: true">
<div class="form-group">
<label class="form-label">
File Name
<button class="btn btn-info" type="button" title="Help"
data-bind="tooltip: 'Name of the file'"></button>
</label>
<input type="string" class="form-control" data-bind="textInput: fileName" />
<p>No options for this widget.</p>
</div>
</fieldset>
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import * as ko from "knockout";
import template from "./bemoDocumentationEditorView.html";
import { Component, OnMounted, Param, Event } from "@paperbits/common/ko/decorators";
import { WidgetEditor } from "@paperbits/common/widgets";
import { BemoDocumentationModel } from "../bemoDocumentationModel";
import { widgetEditorSelector } from "..";


@Component({
selector: widgetEditorSelector,
template: template
})
export class BemoDocumentationEditor implements WidgetEditor<BemoDocumentationModel> {
public readonly fileName: ko.Observable<string>;

constructor() {
this.fileName = ko.observable();
}
constructor() { }

@Param()
public model: BemoDocumentationModel;
Expand All @@ -24,13 +19,9 @@ export class BemoDocumentationEditor implements WidgetEditor<BemoDocumentationMo
public onChange: (model: BemoDocumentationModel) => void;

@OnMounted()
public async initialize(): Promise<void> {
this.fileName(this.model.fileName);
this.fileName.subscribe(this.applyChanges);
}
public async initialize(): Promise<void> { }

private applyChanges(): void {
this.model.fileName = this.fileName();
this.onChange(this.model);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export class BemoDocumentationViewModelBinder implements ViewModelBinder<BemoDoc
constructor(private readonly eventManager: EventManager) { }

public async updateViewModel(model: BemoDocumentationModel, viewModel: BemoDocumentationViewModel): Promise<void> {
viewModel.runtimeConfig(JSON.stringify({ fileName: model.fileName }));
}

public async modelToViewModel(model: BemoDocumentationModel, viewModel?: BemoDocumentationViewModel, bindingContext?: Bag<any>): Promise<BemoDocumentationViewModel> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
<h1><span data-bind="text: api"></span></h1>
<div class="bemo-documentation">
<div class="documentation-menu sticky-menu" data-bind="css: { 'documentation-menu-collapsed': leftMenuCollapsed }">
<!--ko if: leftMenuCollapsed()-->
<span class="material-icons" data-bind="click: toggleLeftMenu">menu</span>
<li class="menu-divider" role="separator"></li>
<!--/ko-->
<!--ko ifnot: leftMenuCollapsed()-->
<div class="documentation-menu-header">
<span class="documentation-menu-title">Be:Mo Documentations</span>
<span class="material-icons" data-bind="click: toggleLeftMenu">close</span>
</div>
<li class="menu-divider" role="separator"></li>
<div class="documentation-menu-body">
<nav data-bind="template: { name: 'menuTemplate', foreach: structure }"></nav>
</div>
<!--/ko-->
</div>
<div class="documentation">
<!--ko if: loading()-->
<bemo-spinner></bemo-spinner>
<!--/ko-->
<!--ko ifnot: loading()-->
<div data-bind="html: markdown">No documentation here</div>
<!--/ko-->
</div>
<div class="documentation-anchor-menu sticky-menu" data-bind="css: { 'documentation-menu-collapsed': rightMenuCollapsed }">
<!--ko if: rightMenuCollapsed()-->
<span class="anchor-icon" data-bind="click: toggleRightMenu"></span>
<!--/ko-->
<!--ko ifnot: rightMenuCollapsed() -->
<div class="documentation-menu-header">
<span class="anchor-menu-title">On this page</span>
<span class="material-icons" data-bind="click: toggleRightMenu">close</span>
</div>
<li class="menu-divider" role="separator"></li>
<nav class="anchor-menu-body" data-bind="foreach: anchorTags">
<a role="button" class="anchor-item" data-bind="attr: { 'data-target-id': $data.children[0].id }, css: $data.tagName, text: $data.innerText, click: $component.onAnchorItemClick"></a>
</nav>
<!--/ko-->
</div>

<p data-bind="html: sessionDescription"></p>
<script type="text/html" id="menuTemplate">
<li>
<div data-bind="if: $data.type == 'folder', click: $component.toggleCollapsed">
<span data-bind="if: $data.collapsed" class="expand-icon material-icons">expand_more</span>
<span data-bind="ifnot: $data.collapsed" class="expand-icon material-icons">expand_less</span>
<a class="menu-item menu-item-folder" role="button" data-bind="attr: { 'data-path': $data.path }, text: $data.name, value: $data.path, click: $component.onMenuItemClick.bind($data)"></a>
</div>
<div data-bind="if: $data.type == 'file'">
<a class="menu-item" role="button" data-bind="attr: { 'data-path': $data.path }, text: $data.name, value: $data.path, click: $component.onMenuItemClick.bind($data)"></a>
</div>
<div data-bind="hidden: $data.collapsed, if: $data.menus.length">
<ul class="menu-folder" data-bind="template: { name: 'menuTemplate', foreach: $data.menus }"></ul>
</div>
</li>
</script>
</div>
Loading

0 comments on commit 2c0e671

Please sign in to comment.