@storybook/angular 5.3.13 → 5.3.18

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "5.3.13",
3
+ "version": "5.3.18",
4
4
  "description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -15,13 +15,6 @@
15
15
  "directory": "app/angular"
16
16
  },
17
17
  "license": "MIT",
18
- "files": [
19
- "bin/**/*",
20
- "dist/**/*",
21
- "README.md",
22
- "*.js",
23
- "*.d.ts"
24
- ],
25
18
  "main": "dist/client/index.js",
26
19
  "types": "dist/client/index.d.ts",
27
20
  "bin": {
@@ -29,13 +22,21 @@
29
22
  "start-storybook": "./bin/index.js",
30
23
  "storybook-server": "./bin/index.js"
31
24
  },
25
+ "files": [
26
+ "bin/**/*",
27
+ "dist/**/*",
28
+ "README.md",
29
+ "*.js",
30
+ "*.d.ts",
31
+ "ts3.5/**/*"
32
+ ],
32
33
  "scripts": {
33
34
  "prepare": "node ../../scripts/prepare.js"
34
35
  },
35
36
  "dependencies": {
36
- "@storybook/addons": "5.3.13",
37
- "@storybook/core": "5.3.13",
38
- "@storybook/node-logger": "5.3.13",
37
+ "@storybook/addons": "5.3.18",
38
+ "@storybook/core": "5.3.18",
39
+ "@storybook/node-logger": "5.3.18",
39
40
  "@types/webpack-env": "^1.15.0",
40
41
  "core-js": "^3.0.1",
41
42
  "fork-ts-checker-webpack-plugin": "^3.0.1",
@@ -72,5 +73,12 @@
72
73
  "publishConfig": {
73
74
  "access": "public"
74
75
  },
75
- "gitHead": "d840df052a887038e134207da26fd04cc2279d28"
76
+ "gitHead": "ff445da08f82a7b0931647754394b4de0a2a34f9",
77
+ "typesVersions": {
78
+ "<=3.5": {
79
+ "*": [
80
+ "ts3.5/*"
81
+ ]
82
+ }
83
+ }
76
84
  }
@@ -0,0 +1,3 @@
1
+ export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, } from './preview';
2
+ export { StoryFnAngularReturnType as IStory } from './preview/types';
3
+ export { moduleMetadata } from './preview/angular/decorators';
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { StoryFnAngularReturnType } from '../types';
3
+ export declare const STORY: InjectionToken<StoryFnAngularReturnType>;
@@ -0,0 +1,29 @@
1
+ import { OnInit, ViewContainerRef, ComponentFactoryResolver, OnDestroy, ChangeDetectorRef } from '@angular/core';
2
+ import { Observable, Subscription } from 'rxjs';
3
+ import { StoryFnAngularReturnType } from '../../types';
4
+ export declare class AppComponent implements OnInit, OnDestroy {
5
+ private cfr;
6
+ private changeDetectorRef;
7
+ private data;
8
+ target: ViewContainerRef;
9
+ readonly previousValues: {
10
+ [key: string]: any;
11
+ };
12
+ subscription: Subscription;
13
+ constructor(cfr: ComponentFactoryResolver, changeDetectorRef: ChangeDetectorRef, data: Observable<StoryFnAngularReturnType>);
14
+ ngOnInit(): void;
15
+ ngOnDestroy(): void;
16
+ /**
17
+ * Set inputs and outputs
18
+ */
19
+ private setProps;
20
+ /**
21
+ * Manually call 'ngOnChanges' hook because angular doesn't do that for dynamic components
22
+ * Issue: [https://github.com/angular/angular/issues/8903]
23
+ */
24
+ private callNgOnChangesHook;
25
+ /**
26
+ * If component implements ControlValueAccessor interface try to set ngModel
27
+ */
28
+ private setNgModel;
29
+ }
@@ -0,0 +1,2 @@
1
+ import { NgModuleMetadata } from '../types';
2
+ export declare const moduleMetadata: (metadata: Partial<NgModuleMetadata>) => (storyFn: () => any) => any;
@@ -0,0 +1,8 @@
1
+ import { StoryFn } from '@storybook/addons';
2
+ import { StoryFnAngularReturnType } from '../types';
3
+ declare global {
4
+ interface Window {
5
+ NODE_ENV: 'string' | 'development' | undefined;
6
+ }
7
+ }
8
+ export declare const renderNgApp: (storyFn: StoryFn<StoryFnAngularReturnType>, forced: boolean) => void;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * This file includes polyfills needed by Angular and is loaded before the app.
3
+ * You can add your own extra polyfills to this file.
4
+ *
5
+ * This file is divided into 2 sections:
6
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
+ * file.
9
+ *
10
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
+ *
14
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
+ */
16
+ /** *************************************************************************************************
17
+ * BROWSER POLYFILLS
18
+ */
19
+ /** IE9, IE10 and IE11 requires all of the following polyfills. * */
20
+ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
21
+ /** Evergreen browsers require these. * */
22
+ import 'core-js/es/reflect';
23
+ import 'core-js/proposals/reflect-metadata';
24
+ /**
25
+ * Required to support Web Animations `@angular/animation`.
26
+ * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
27
+ * */
28
+ /** *************************************************************************************************
29
+ * Zone JS is required by Angular itself.
30
+ */
31
+ import 'zone.js/dist/zone';
32
+ /** *************************************************************************************************
33
+ * APPLICATION IMPORTS
34
+ */
35
+ /**
36
+ * Date, currency, decimal and percent pipes.
37
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
38
+ */
39
+ /**
40
+ * Need to import at least one locale-data with intl.
41
+ */
@@ -0,0 +1 @@
1
+ import './angular-polyfills';
@@ -0,0 +1,24 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="webpack-env" />
3
+ import { ClientStoryApi, Loadable } from '@storybook/addons';
4
+ import './globals';
5
+ import { IStorybookSection, StoryFnAngularReturnType } from './types';
6
+ interface ClientApi extends ClientStoryApi<StoryFnAngularReturnType> {
7
+ setAddon(addon: any): void;
8
+ configure(loader: Loadable, module: NodeModule): void;
9
+ getStorybook(): IStorybookSection[];
10
+ clearDecorators(): void;
11
+ forceReRender(): void;
12
+ raw: () => any;
13
+ load: (...args: any[]) => void;
14
+ }
15
+ export declare const storiesOf: ClientApi['storiesOf'];
16
+ export declare const configure: ClientApi['configure'];
17
+ export declare const addDecorator: ClientApi['addDecorator'];
18
+ export declare const addParameters: ClientApi['addParameters'];
19
+ export declare const clearDecorators: ClientApi['clearDecorators'];
20
+ export declare const setAddon: ClientApi['setAddon'];
21
+ export declare const forceReRender: ClientApi['forceReRender'];
22
+ export declare const getStorybook: ClientApi['getStorybook'];
23
+ export declare const raw: ClientApi['raw'];
24
+ export {};
@@ -0,0 +1,7 @@
1
+ import { StoryFn } from '@storybook/addons';
2
+ import { StoryFnAngularReturnType } from './types';
3
+ export default function render({ storyFn, showMain, forceRender, }: {
4
+ storyFn: StoryFn<StoryFnAngularReturnType>;
5
+ showMain: () => void;
6
+ forceRender: boolean;
7
+ }): void;
@@ -0,0 +1,30 @@
1
+ import { StoryFn } from '@storybook/addons';
2
+ export declare const moduleMetadata: (metadata: Partial<NgModuleMetadata>) => (storyFn: StoryFn<StoryFnAngularReturnType>) => any;
3
+ export interface NgModuleMetadata {
4
+ declarations?: any[];
5
+ entryComponents?: any[];
6
+ imports?: any[];
7
+ schemas?: any[];
8
+ providers?: any[];
9
+ }
10
+ export interface ICollection {
11
+ [p: string]: any;
12
+ }
13
+ export interface IStorybookStory {
14
+ name: string;
15
+ render: () => any;
16
+ }
17
+ export interface IStoribookSection extends IStorybookSection {
18
+ }
19
+ export interface IStorybookSection {
20
+ kind: string;
21
+ stories: IStorybookStory[];
22
+ }
23
+ export interface StoryFnAngularReturnType {
24
+ component?: any;
25
+ props?: ICollection;
26
+ propsMeta?: ICollection;
27
+ moduleMetadata?: NgModuleMetadata;
28
+ template?: string;
29
+ styles?: string[];
30
+ }
@@ -0,0 +1,5 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ export default class ButtonComponent {
3
+ text: string;
4
+ onClick: EventEmitter<any>;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ export default class WelcomeComponent {
3
+ showApp: EventEmitter<any>;
4
+ }
@@ -0,0 +1 @@
1
+ export * from './client';
@@ -0,0 +1,21 @@
1
+ import { Path } from '@angular-devkit/core';
2
+ interface BasicOptions {
3
+ options: {
4
+ baseUrl?: string | undefined;
5
+ };
6
+ raw: object;
7
+ fileNames: string[];
8
+ errors: any[];
9
+ }
10
+ export declare function getAngularCliConfig(dirToSearch: string): any;
11
+ export declare function getLeadingAngularCliProject(ngCliConfig: any): any;
12
+ export declare function getAngularCliWebpackConfigOptions(dirToSearch: Path): {
13
+ root: Path;
14
+ projectRoot: string;
15
+ tsConfigPath: Path;
16
+ tsConfig: BasicOptions;
17
+ supportES2015: boolean;
18
+ buildOptions: any;
19
+ };
20
+ export declare function applyAngularCliWebpackConfig(baseConfig: any, cliWebpackConfigOptions: any): any;
21
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Path } from '@angular-devkit/core';
2
+ import { RuleSetRule, Configuration } from 'webpack';
3
+ export declare function filterOutStylingRules(config: Configuration): RuleSetRule[];
4
+ export declare function isBuildAngularInstalled(): boolean;
5
+ export declare function getAngularCliParts(cliWebpackConfigOptions: any): {
6
+ cliCommonConfig: Configuration;
7
+ cliStyleConfig: {
8
+ entry: {
9
+ [key: string]: string[];
10
+ };
11
+ module: {
12
+ rules: RuleSetRule[];
13
+ };
14
+ plugins: any[];
15
+ };
16
+ };
17
+ export declare function normalizeAssetPatterns(assetPatterns: any, dirToSearch: Path, sourceRoot: Path): any;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
2
+ import { Options } from 'ts-loader';
3
+ export default function (tsLoaderOptions: Partial<Options>): ForkTsCheckerWebpackPlugin;
@@ -0,0 +1,2 @@
1
+ import { Configuration } from 'webpack';
2
+ export declare function webpackFinal(config: Configuration): any;
@@ -0,0 +1,4 @@
1
+ import { Configuration } from 'webpack';
2
+ export declare function webpack(config: Configuration, { configDir }: {
3
+ configDir: string;
4
+ }): Configuration;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export default function (source: string): string;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ packageJson: any;
3
+ framework: string;
4
+ frameworkPresets: string[];
5
+ };
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export default function (configDir: string): {
2
+ transpileOnly: boolean;
3
+ compilerOptions: {
4
+ emitDecoratorMetadata: boolean;
5
+ };
6
+ configFile: string;
7
+ };