URL service docs (#125697)

* improve sharing menu docs

* improve locator docs

* improve locator docs

* add short URL docs

* add tsconfig

* update plugin list

* add share plugin readme to dev docs

* fix linter errors

* update docs list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Vadim Kibana 2022-02-23 15:23:04 +01:00 committed by GitHub
parent cc8b949b62
commit 6ee93e9470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 335 additions and 26 deletions

View file

@ -0,0 +1,3 @@
# Share plugin examples
Small demos of share plugin usage.

View file

@ -0,0 +1,14 @@
{
"id": "shareExamples",
"kibanaVersion": "kibana",
"version": "0.0.1",
"server": false,
"ui": true,
"owner": {
"name": "App Services",
"githubTeam": "kibana-app-services"
},
"description": "Small demos of share plugin usage",
"requiredPlugins": ["share"],
"optionalPlugins": []
}

View file

@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ShareDemoPlugin } from './plugin';
export const plugin = () => new ShareDemoPlugin();

View file

@ -0,0 +1,42 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { SharePluginStart, SharePluginSetup } from '../../../src/plugins/share/public';
import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public';
interface SetupDeps {
share: SharePluginSetup;
}
interface StartDeps {
share: SharePluginStart;
}
export class ShareDemoPlugin implements Plugin<void, void, SetupDeps, StartDeps> {
public setup(core: CoreSetup<StartDeps>, { share }: SetupDeps) {
share.register({
id: 'demo',
getShareMenuItems: (context) => [
{
panel: {
id: 'demo',
title: 'Panel title',
content: 'Panel content',
},
shareMenuItem: {
name: 'Demo list item (from share_example plugin)',
},
},
],
});
}
public start(core: CoreStart, { share }: StartDeps) {}
public stop() {}
}

View file

@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target/types"
},
"include": [
"index.ts",
"public/**/*.ts",
"public/**/*.tsx",
"server/**/*.ts",
"../../typings/**/*"
],
"exclude": [],
"references": [
{ "path": "../../src/core/tsconfig.json" },
{ "path": "../../src/plugins/share/tsconfig.json" },
]
}