ontotext-yasgui-web-component 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -0
  3. package/dist/cjs/index-c487dc05.js +1152 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/cjs/ontotext-yasgui-web-component.cjs.js +19 -0
  7. package/dist/cjs/ontotext-yasgui.cjs.entry.js +391 -0
  8. package/dist/collection/collection-manifest.json +12 -0
  9. package/dist/collection/components/ontotext-yasgui-web-component/ontotext-yasgui-web-component.css +2361 -0
  10. package/dist/collection/components/ontotext-yasgui-web-component/ontotext-yasgui-web-component.js +152 -0
  11. package/dist/collection/components/yasgui/yasgui-script.js +4 -0
  12. package/dist/collection/index.js +1 -0
  13. package/dist/collection/js/main.js +8 -0
  14. package/dist/collection/models/ontotext-yasgui.js +41 -0
  15. package/dist/collection/models/yasgui-configuration.js +11 -0
  16. package/dist/collection/pages/default-view/main.js +8 -0
  17. package/dist/collection/pages/view-configurations/main.js +31 -0
  18. package/dist/collection/pages/view-modes/main.js +18 -0
  19. package/dist/collection/services/yasgui/configuration/configurator.js +1 -0
  20. package/dist/collection/services/yasgui/configuration/yasgui-configuration-builder.js +28 -0
  21. package/dist/collection/services/yasgui/configuration/yasgui-configurator.js +45 -0
  22. package/dist/collection/services/yasgui/configuration/yasqe-configurator.js +17 -0
  23. package/dist/collection/services/yasgui/configuration/yasr-configurator.js +12 -0
  24. package/dist/collection/services/yasgui/yasgui-builder.js +26 -0
  25. package/dist/components/index.d.ts +22 -0
  26. package/dist/components/index.js +2 -0
  27. package/dist/components/ontotext-yasgui.d.ts +11 -0
  28. package/dist/components/ontotext-yasgui.js +407 -0
  29. package/dist/esm/index-5e3f8118.js +1124 -0
  30. package/dist/esm/index.js +1 -0
  31. package/dist/esm/loader.js +17 -0
  32. package/dist/esm/ontotext-yasgui-web-component.js +17 -0
  33. package/dist/esm/ontotext-yasgui.entry.js +387 -0
  34. package/dist/esm/polyfills/core-js.js +11 -0
  35. package/dist/esm/polyfills/css-shim.js +1 -0
  36. package/dist/esm/polyfills/dom.js +79 -0
  37. package/dist/esm/polyfills/es5-html-element.js +1 -0
  38. package/dist/esm/polyfills/index.js +34 -0
  39. package/dist/esm/polyfills/system.js +6 -0
  40. package/dist/index.cjs.js +1 -0
  41. package/dist/index.js +1 -0
  42. package/dist/ontotext-yasgui-web-component/index.esm.js +0 -0
  43. package/dist/ontotext-yasgui-web-component/ontotext-yasgui-web-component.esm.js +1 -0
  44. package/dist/ontotext-yasgui-web-component/p-498af5d3.js +2 -0
  45. package/dist/ontotext-yasgui-web-component/p-88daf135.entry.js +2 -0
  46. package/dist/types/components/ontotext-yasgui-web-component/ontotext-yasgui-web-component.d.ts +21 -0
  47. package/dist/types/components.d.ts +46 -0
  48. package/dist/types/index.d.ts +1 -0
  49. package/dist/types/models/ontotext-yasgui.d.ts +17 -0
  50. package/dist/types/models/yasgui-configuration.d.ts +40 -0
  51. package/dist/types/services/yasgui/configuration/configurator.d.ts +15 -0
  52. package/dist/types/services/yasgui/configuration/yasgui-configuration-builder.d.ts +18 -0
  53. package/dist/types/services/yasgui/configuration/yasgui-configurator.d.ts +14 -0
  54. package/dist/types/services/yasgui/configuration/yasqe-configurator.d.ts +8 -0
  55. package/dist/types/services/yasgui/configuration/yasr-configurator.d.ts +8 -0
  56. package/dist/types/services/yasgui/yasgui-builder.d.ts +20 -0
  57. package/dist/types/stencil-public-runtime.d.ts +1581 -0
  58. package/loader/cdn.js +3 -0
  59. package/loader/index.cjs.js +3 -0
  60. package/loader/index.d.ts +12 -0
  61. package/loader/index.es2017.js +3 -0
  62. package/loader/index.js +4 -0
  63. package/loader/package.json +11 -0
  64. package/package.json +41 -0
@@ -0,0 +1,21 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { YasguiConfiguration } from '../../models/yasgui-configuration';
3
+ import { OntotextYasgui } from '../../models/ontotext-yasgui';
4
+ export declare class OntotextYasguiWebComponent {
5
+ private yasguiBuilder;
6
+ el: HTMLElement;
7
+ config: YasguiConfiguration;
8
+ queryExecuted: EventEmitter;
9
+ yasgui: OntotextYasgui;
10
+ constructor();
11
+ componentWillLoad(): void;
12
+ componentDidLoad(): void;
13
+ onWindowResize(event: any): void;
14
+ configurationChanged(newConfig: YasguiConfiguration): void;
15
+ setQuery(query: string): Promise<void>;
16
+ disconnectedCallback(): void;
17
+ render(): any;
18
+ private init;
19
+ private addOnQueryListener;
20
+ private destroy;
21
+ }
@@ -0,0 +1,46 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { YasguiConfiguration } from "./models/yasgui-configuration";
9
+ export namespace Components {
10
+ interface OntotextYasgui {
11
+ "config": YasguiConfiguration;
12
+ "setQuery": (query: string) => Promise<void>;
13
+ }
14
+ }
15
+ export interface OntotextYasguiCustomEvent<T> extends CustomEvent<T> {
16
+ detail: T;
17
+ target: HTMLOntotextYasguiElement;
18
+ }
19
+ declare global {
20
+ interface HTMLOntotextYasguiElement extends Components.OntotextYasgui, HTMLStencilElement {
21
+ }
22
+ var HTMLOntotextYasguiElement: {
23
+ prototype: HTMLOntotextYasguiElement;
24
+ new (): HTMLOntotextYasguiElement;
25
+ };
26
+ interface HTMLElementTagNameMap {
27
+ "ontotext-yasgui": HTMLOntotextYasguiElement;
28
+ }
29
+ }
30
+ declare namespace LocalJSX {
31
+ interface OntotextYasgui {
32
+ "config"?: YasguiConfiguration;
33
+ "onQueryExecuted"?: (event: OntotextYasguiCustomEvent<any>) => void;
34
+ }
35
+ interface IntrinsicElements {
36
+ "ontotext-yasgui": OntotextYasgui;
37
+ }
38
+ }
39
+ export { LocalJSX as JSX };
40
+ declare module "@stencil/core" {
41
+ export namespace JSX {
42
+ interface IntrinsicElements {
43
+ "ontotext-yasgui": LocalJSX.OntotextYasgui & JSXBase.HTMLAttributes<HTMLOntotextYasguiElement>;
44
+ }
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,17 @@
1
+ import { Yasgui } from '../../../Yasgui/packages/yasgui';
2
+ import { YasguiConfiguration } from './yasgui-configuration';
3
+ export declare class OntotextYasgui {
4
+ private yasgui;
5
+ constructor(yasgui: Yasgui, config: YasguiConfiguration);
6
+ setQuery(query: string): void;
7
+ getQuery(): string;
8
+ /**
9
+ * Initializes ontotext-yasgui component.
10
+ *
11
+ * @param config
12
+ * @private
13
+ */
14
+ private init;
15
+ addYasqeListener(eventName: any, callback: any): void;
16
+ destroy(): void;
17
+ }
@@ -0,0 +1,40 @@
1
+ import { Config } from '../../../Yasgui/packages/yasgui';
2
+ export interface YasguiConfiguration {
3
+ /**
4
+ * The default yasgui config.
5
+ */
6
+ yasguiConfig: Config;
7
+ /**
8
+ * Configure what part of the yasgui should be rendered.
9
+ */
10
+ render: RenderingMode;
11
+ /**
12
+ * Configure the yasgui layout orientation.
13
+ */
14
+ orientation: Orientation;
15
+ /**
16
+ * Default query when a tab is opened.
17
+ */
18
+ query?: string;
19
+ /**
20
+ * Initial query when yasgui is rendered if not set the default query will be set.
21
+ */
22
+ initialQuery?: string;
23
+ /**
24
+ * If the yasgui tabs should be rendered or not.
25
+ */
26
+ showEditorTabs: boolean;
27
+ /**
28
+ * If the yasr tabs should be rendered or not.
29
+ */
30
+ showResultTabs: boolean;
31
+ }
32
+ export declare enum RenderingMode {
33
+ YASGUI = "mode-yasgui",
34
+ YASQE = "mode-yasqe",
35
+ YASR = "mode-yasr"
36
+ }
37
+ export declare enum Orientation {
38
+ VERTICAL = "orientation-vertical",
39
+ HORIZONTAL = "orientation-horizontal"
40
+ }
@@ -0,0 +1,15 @@
1
+ import { YasguiConfiguration } from '../../../models/yasgui-configuration';
2
+ import { Config } from '../../../../../Yasgui/packages/yasgui';
3
+ /**
4
+ * The configuration of the yasgui component is divided into many configurators for easy maintenance and extension of yasgui.
5
+ * Every configurator have to implement {@see Configurator} interface.
6
+ */
7
+ export interface Configurator {
8
+ /**
9
+ * Apply configuration to <code>yasguiConfig</code> from <code>clientYasguiConfig</code>
10
+ * @param el - hte ontotext-yasgui element.
11
+ * @param config - configuration which is passing to yasgui constructor.
12
+ * @param yasguiConfig - configuration passed by client.
13
+ */
14
+ config(el: HTMLElement, config: Config, yasguiConfig: YasguiConfiguration): Config;
15
+ }
@@ -0,0 +1,18 @@
1
+ import { YasguiConfiguration } from '../../../models/yasgui-configuration';
2
+ import { Config } from '../../../../../Yasgui/packages/yasgui';
3
+ /**
4
+ * Builder for yasgui configuration.
5
+ */
6
+ declare class YasguiConfigurationBuilderDefinition {
7
+ private configurators;
8
+ constructor();
9
+ /**
10
+ * Builds a yasgui configuration.
11
+ * @param el - hte ontotext-yasgui element.
12
+ * @param config - custom configuration passed by client of component.
13
+ */
14
+ build(el: HTMLElement, config: YasguiConfiguration): Config;
15
+ private initConfigurators;
16
+ }
17
+ export declare const YasguiConfigurationBuilder: YasguiConfigurationBuilderDefinition;
18
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Configurator } from './configurator';
2
+ import { YasguiConfiguration } from '../../../models/yasgui-configuration';
3
+ import { Config } from '../../../../../Yasgui/packages/yasgui';
4
+ /**
5
+ * Manages all top configuration of yasgui.
6
+ */
7
+ declare class YasguiConfiguratorDefinition implements Configurator {
8
+ private defaultYasguiConfig;
9
+ config(_el: HTMLElement, config: Config, yasguiConfig: YasguiConfiguration): Config;
10
+ private setRenderMode;
11
+ private setOrientation;
12
+ }
13
+ export declare const YasguiConfigurator: YasguiConfiguratorDefinition;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Configurator } from './configurator';
2
+ import { YasguiConfiguration } from '../../../models/yasgui-configuration';
3
+ import { Config } from '../../../../../Yasgui/packages/yasgui';
4
+ declare class YasqeConfiguratorDefinition implements Configurator {
5
+ config(el: HTMLElement, config: Config, yasguiConfig: YasguiConfiguration): Config;
6
+ }
7
+ export declare const YasqeConfigurator: YasqeConfiguratorDefinition;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Configurator } from './configurator';
2
+ import { YasguiConfiguration } from '../../../models/yasgui-configuration';
3
+ import { Config } from '../../../../../Yasgui/packages/yasgui';
4
+ declare class YasrConfiguratorDefinition implements Configurator {
5
+ config(el: HTMLElement, config: Config, yasguiConfig: YasguiConfiguration): Config;
6
+ }
7
+ export declare const YasrConfigurator: YasrConfiguratorDefinition;
8
+ export {};
@@ -0,0 +1,20 @@
1
+ import { YasguiConfiguration } from '../../models/yasgui-configuration';
2
+ import { OntotextYasgui } from '../../models/ontotext-yasgui';
3
+ /**
4
+ * Builder yasgui instance.
5
+ * It configures, creates an instance of yasgui and apply patches to created instance.
6
+ */
7
+ declare class YasguiBuilderDefinition {
8
+ private yasguiConfigurationBuilder;
9
+ constructor();
10
+ /**
11
+ * Builds an instance of yasgui. The building of instances is a two-step process.
12
+ * A yasgui configuration is created on first step.
13
+ * The created instance is patched on second step.
14
+ * @param el - parent element of yasgui instance.
15
+ * @param config - configuration passed from client of component. It overrides default values of yasgui component.
16
+ */
17
+ build(el: HTMLElement, config: YasguiConfiguration): OntotextYasgui;
18
+ }
19
+ export declare const YasguiBuilder: YasguiBuilderDefinition;
20
+ export {};