@storybook/angular 7.0.0-alpha.5 → 7.0.0-alpha.51
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/.eslintrc.js +8 -0
- package/README.md +1 -1
- package/dist/{types/builders → builders}/build-storybook/index.d.ts +3 -3
- package/dist/{types/builders → builders}/build-storybook/index.js +0 -0
- package/dist/builders/build-storybook/index.spec.d.ts +1 -0
- package/dist/builders/build-storybook/index.spec.js +218 -0
- package/dist/{types/builders → builders}/build-storybook/schema.json +0 -0
- package/dist/{types/builders → builders}/builders.json +0 -0
- package/dist/{types/builders → builders}/start-storybook/index.d.ts +3 -3
- package/dist/{types/builders → builders}/start-storybook/index.js +0 -0
- package/dist/builders/start-storybook/index.spec.d.ts +1 -0
- package/dist/builders/start-storybook/index.spec.js +214 -0
- package/dist/{types/builders → builders}/start-storybook/schema.json +0 -0
- package/dist/{types/builders → builders}/utils/build-standalone-errors-handler.d.ts +0 -0
- package/dist/{types/builders → builders}/utils/build-standalone-errors-handler.js +3 -6
- package/dist/{types/builders → builders}/utils/run-compodoc.d.ts +0 -0
- package/dist/{types/builders → builders}/utils/run-compodoc.js +0 -1
- package/dist/builders/utils/run-compodoc.spec.d.ts +1 -0
- package/dist/builders/utils/run-compodoc.spec.js +59 -0
- package/dist/{types/builders → builders}/utils/standalone-options.d.ts +3 -3
- package/dist/{types/builders → builders}/utils/standalone-options.js +0 -0
- package/dist/{types/client/preview/angular/components → client/angular}/app.component.d.ts +2 -2
- package/dist/{types/client/preview/angular/components → client/angular}/app.component.js +1 -2
- package/dist/{types/client/preview → client}/angular/app.token.d.ts +0 -0
- package/dist/{types/client/preview → client}/angular/app.token.js +0 -0
- package/dist/{types/client/preview → client}/angular/helpers.d.ts +3 -3
- package/dist/{types/client/preview → client}/angular/helpers.js +2 -3
- package/dist/{types/client/preview → client}/angular-beta/AbstractRenderer.d.ts +2 -3
- package/dist/{types/client/preview → client}/angular-beta/AbstractRenderer.js +13 -13
- package/dist/{types/client/preview → client}/angular-beta/CanvasRenderer.d.ts +1 -2
- package/dist/{types/client/preview → client}/angular-beta/CanvasRenderer.js +0 -0
- package/dist/{types/client/preview → client}/angular-beta/ComputesTemplateFromComponent.d.ts +4 -4
- package/dist/{types/client/preview → client}/angular-beta/ComputesTemplateFromComponent.js +0 -0
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.d.ts +1 -0
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.js +389 -0
- package/dist/{types/client/preview → client}/angular-beta/DocsRenderer.d.ts +1 -2
- package/dist/{types/client/preview → client}/angular-beta/DocsRenderer.js +3 -6
- package/dist/{types/client/preview → client}/angular-beta/RendererFactory.d.ts +1 -1
- package/dist/{types/client/preview → client}/angular-beta/RendererFactory.js +3 -3
- package/dist/client/angular-beta/RendererFactory.test.d.ts +1 -0
- package/dist/client/angular-beta/RendererFactory.test.js +297 -0
- package/dist/{types/client/preview → client}/angular-beta/StorybookModule.d.ts +2 -2
- package/dist/{types/client/preview → client}/angular-beta/StorybookModule.js +4 -23
- package/dist/client/angular-beta/StorybookModule.test.d.ts +1 -0
- package/dist/client/angular-beta/StorybookModule.test.js +279 -0
- package/dist/{types/client/preview → client}/angular-beta/StorybookProvider.d.ts +1 -1
- package/dist/{types/client/preview → client}/angular-beta/StorybookProvider.js +0 -0
- package/dist/{types/client/preview → client}/angular-beta/StorybookWrapperComponent.d.ts +0 -0
- package/dist/{types/client/preview → client}/angular-beta/StorybookWrapperComponent.js +0 -1
- package/dist/client/angular-beta/__testfixtures__/input.component.d.ts +26 -0
- package/dist/client/angular-beta/__testfixtures__/input.component.js +67 -0
- package/dist/{types/client/preview → client}/angular-beta/utils/NgComponentAnalyzer.d.ts +2 -2
- package/dist/{types/client/preview → client}/angular-beta/utils/NgComponentAnalyzer.js +0 -0
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.d.ts +1 -0
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.js +340 -0
- package/dist/{types/client/preview → client}/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -0
- package/dist/{types/client/preview → client}/angular-beta/utils/NgModulesAnalyzer.js +0 -0
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.d.ts +1 -0
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.js +23 -0
- package/dist/client/config.d.ts +6 -0
- package/dist/client/config.js +10 -0
- package/dist/client/decorateStory.d.ts +4 -0
- package/dist/{types/client/preview → client}/decorateStory.js +1 -1
- package/dist/client/decorateStory.test.d.ts +1 -0
- package/dist/client/decorateStory.test.js +335 -0
- package/dist/client/decorators.d.ts +5 -0
- package/dist/{types/client/preview → client}/decorators.js +0 -0
- package/dist/client/decorators.test.d.ts +1 -0
- package/dist/client/decorators.test.js +106 -0
- package/dist/client/docs/__testfixtures__/doc-button/input.d.ts +111 -0
- package/dist/client/docs/__testfixtures__/doc-button/input.js +207 -0
- package/dist/client/docs/__testfixtures__/doc-button/tsconfig.json +7 -0
- package/dist/client/docs/angular-properties.test.d.ts +1 -0
- package/dist/client/docs/angular-properties.test.js +56 -0
- package/dist/{types/client → client}/docs/compodoc.d.ts +4 -4
- package/dist/{types/client → client}/docs/compodoc.js +2 -3
- package/dist/client/docs/compodoc.test.d.ts +1 -0
- package/dist/client/docs/compodoc.test.js +131 -0
- package/dist/client/docs/config.d.ts +4 -0
- package/dist/{types/client → client}/docs/config.js +0 -0
- package/dist/{types/client → client}/docs/index.d.ts +0 -0
- package/dist/{types/client → client}/docs/index.js +0 -0
- package/dist/{types/client → client}/docs/sourceDecorator.d.ts +3 -3
- package/dist/{types/client → client}/docs/sourceDecorator.js +0 -0
- package/dist/{types/client → client}/docs/types.d.ts +1 -1
- package/dist/{types/client → client}/docs/types.js +0 -0
- package/dist/{types/client/preview/angular-polyfills.d.ts → client/globals.d.ts} +0 -10
- package/dist/{types/client/preview/angular-polyfills.js → client/globals.js} +7 -1
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +28 -0
- package/dist/client/public-api.d.ts +15 -0
- package/dist/client/public-api.js +36 -0
- package/dist/client/public-types.d.ts +36 -0
- package/dist/{types/client/preview/types-6-0.js → client/public-types.js} +0 -0
- package/dist/client/render.d.ts +6 -0
- package/dist/{types/client/preview → client}/render.js +3 -3
- package/dist/{types/client/preview → client}/types.d.ts +17 -8
- package/dist/{types/client/preview → client}/types.js +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/{types/index.js → index.js} +1 -1
- package/dist/preset.d.ts +6 -0
- package/dist/{types/preset.js → preset.js} +12 -9
- package/dist/renderer.d.ts +4 -0
- package/dist/{types/renderer.js → renderer.js} +4 -4
- package/dist/{types/server → server}/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/minimal-config/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/minimal-config/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -0
- package/dist/{types/server/__mocks-ng-workspace__/some-config → server/__mocks-ng-workspace__/minimal-config}/tsconfig.json +1 -4
- package/dist/{types/server → server}/__mocks-ng-workspace__/some-config/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/some-config/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -0
- package/dist/{types/server/__mocks-ng-workspace__/with-angularBrowserTarget → server/__mocks-ng-workspace__/some-config}/tsconfig.json +1 -4
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -0
- package/dist/{types/server/__mocks-ng-workspace__/minimal-config → server/__mocks-ng-workspace__/with-angularBrowserTarget}/tsconfig.json +1 -4
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-lib/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -0
- package/dist/{types/server/__mocks-ng-workspace__/without-projects-entry → server/__mocks-ng-workspace__/with-lib}/projects/pattern-lib/tsconfig.lib.json +2 -8
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-lib/tsconfig.json +1 -4
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx/nx.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -0
- package/dist/server/__mocks-ng-workspace__/with-nx/tsconfig.json +14 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -0
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +14 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-options-styles/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -0
- package/dist/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +13 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-architect-build/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -0
- package/dist/{types/server/__mocks-ng-workspace__/with-lib → server/__mocks-ng-workspace__/without-projects-entry}/projects/pattern-lib/tsconfig.lib.json +2 -8
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +13 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -0
- package/dist/{types/server → server}/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -0
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +13 -0
- package/dist/server/__tests__/angular.json +96 -0
- package/dist/{types/server → server}/angular-cli-webpack-13.x.x.d.ts +0 -0
- package/dist/{types/server → server}/angular-cli-webpack-13.x.x.js +0 -0
- package/dist/{types/server → server}/angular-read-workspace.d.ts +0 -0
- package/dist/{types/server → server}/angular-read-workspace.js +1 -1
- package/dist/{types/server → server}/framework-preset-angular-cli.d.ts +1 -1
- package/dist/{types/server → server}/framework-preset-angular-cli.js +3 -22
- package/dist/server/framework-preset-angular-cli.test.d.ts +1 -0
- package/dist/server/framework-preset-angular-cli.test.js +708 -0
- package/dist/{types/server → server}/framework-preset-angular-docs.d.ts +1 -1
- package/dist/{types/server → server}/framework-preset-angular-docs.js +1 -1
- package/dist/{types/server → server}/framework-preset-angular-ivy.d.ts +1 -1
- package/dist/{types/server → server}/framework-preset-angular-ivy.js +4 -2
- package/dist/{types/server → server}/preset-options.d.ts +2 -2
- package/dist/{types/server → server}/preset-options.js +0 -0
- package/dist/{types/server → server}/utils/filter-out-styling-rules.d.ts +1 -1
- package/dist/{types/server → server}/utils/filter-out-styling-rules.js +0 -0
- package/dist/{types/server → server}/utils/module-is-available.d.ts +0 -0
- package/dist/{types/server → server}/utils/module-is-available.js +0 -0
- package/dist/{types/server → server}/utils/normalize-asset-patterns.d.ts +1 -1
- package/dist/{types/server → server}/utils/normalize-asset-patterns.js +0 -0
- package/dist/{types/server → server}/utils/normalize-optimization.d.ts +0 -0
- package/dist/{types/server → server}/utils/normalize-optimization.js +0 -0
- package/dist/types.d.ts +29 -0
- package/dist/{types/types.js → types.js} +0 -0
- package/jest.config.js +8 -1
- package/package.json +46 -50
- package/preset.js +1 -1
- package/renderer.d.ts +1 -1
- package/renderer.js +1 -1
- package/template/cli/.eslintrc.json +5 -0
- package/template/cli/Button.stories.ts +51 -0
- package/template/cli/Header.stories.ts +37 -0
- package/template/cli/Page.stories.ts +46 -0
- package/template/cli/User.ts +2 -0
- package/template/cli/button.component.ts +53 -0
- package/template/cli/header.component.ts +75 -0
- package/template/cli/page.component.ts +77 -0
- package/template/components/button.component.ts +54 -0
- package/template/components/button.css +30 -0
- package/template/components/form.component.ts +37 -0
- package/template/components/html.component.ts +22 -0
- package/template/components/index.js +8 -0
- package/template/components/pre.component.ts +29 -0
- package/template/stories/angular-mdx.stories.mdx +25 -0
- package/template/stories/argTypes/doc-button/doc-button.component.html +7 -0
- package/template/stories/argTypes/doc-button/doc-button.component.scss +3 -0
- package/template/stories/argTypes/doc-button/doc-button.component.ts +233 -0
- package/template/stories/argTypes/doc-button/doc-button.stories.ts +24 -0
- package/template/stories/argTypes/doc-directive/doc-directive.directive.ts +24 -0
- package/template/stories/argTypes/doc-directive/doc-directive.stories.ts +14 -0
- package/template/stories/argTypes/doc-injectable/doc-injectable.service.ts +27 -0
- package/template/stories/argTypes/doc-injectable/doc-injectable.stories.ts +17 -0
- package/template/stories/argTypes/doc-pipe/doc-pipe.pipe.ts +18 -0
- package/template/stories/argTypes/doc-pipe/doc-pipe.stories.ts +17 -0
- package/template/stories/basics/README.stories.mdx +7 -0
- package/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva-component.stories.ts +27 -0
- package/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts +57 -0
- package/template/stories/basics/component-with-complex-selectors/attribute-selector.component.ts +19 -0
- package/template/stories/basics/component-with-complex-selectors/attribute-selectors.component.stories.ts +8 -0
- package/template/stories/basics/component-with-complex-selectors/class-selector.component.stories.ts +8 -0
- package/template/stories/basics/component-with-complex-selectors/class-selector.component.ts +19 -0
- package/template/stories/basics/component-with-complex-selectors/multiple-class-selector.component.stories.ts +8 -0
- package/template/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts +8 -0
- package/template/stories/basics/component-with-complex-selectors/multiple-selector.component.ts +37 -0
- package/template/stories/basics/component-with-enums/enums.component.html +8 -0
- package/template/stories/basics/component-with-enums/enums.component.stories.ts +24 -0
- package/template/stories/basics/component-with-enums/enums.component.ts +53 -0
- package/template/stories/basics/component-with-inheritance/base-button.component.ts +10 -0
- package/template/stories/basics/component-with-inheritance/base-button.stories.ts +12 -0
- package/template/stories/basics/component-with-inheritance/icon-button.component.ts +11 -0
- package/template/stories/basics/component-with-inheritance/icon-button.stories.ts +13 -0
- package/template/stories/basics/component-with-ng-content/ng-content-about-parent.stories.ts +58 -0
- package/template/stories/basics/component-with-ng-content/ng-content-simple.stories.ts +29 -0
- package/template/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts +42 -0
- package/template/stories/basics/component-with-on-push/on-push-box.component.ts +21 -0
- package/template/stories/basics/component-with-on-push/on-push.stories.ts +21 -0
- package/template/stories/basics/component-with-pipe/custom-pipes.stories.ts +31 -0
- package/template/stories/basics/component-with-pipe/custom.pipe.ts +10 -0
- package/template/stories/basics/component-with-pipe/with-pipe.component.ts +10 -0
- package/template/stories/basics/component-with-provider/di.component.html +7 -0
- package/template/stories/basics/component-with-provider/di.component.stories.ts +26 -0
- package/template/stories/basics/component-with-provider/di.component.ts +28 -0
- package/template/stories/basics/component-with-style/styled.component.css +3 -0
- package/template/stories/basics/component-with-style/styled.component.html +5 -0
- package/template/stories/basics/component-with-style/styled.component.scss +5 -0
- package/template/stories/basics/component-with-style/styled.component.stories.ts +10 -0
- package/template/stories/basics/component-with-style/styled.component.ts +8 -0
- package/template/stories/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts +73 -0
- package/template/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts +71 -0
- package/template/stories/basics/component-without-selector/without-selector.component.ts +30 -0
- package/template/stories/basics/component-without-selector/without-selector.stories.ts +30 -0
- package/template/stories/basics/ng-module/angular-src/chip-color.token.ts +3 -0
- package/template/stories/basics/ng-module/angular-src/chip-text.pipe.ts +29 -0
- package/template/stories/basics/ng-module/angular-src/chip.component.ts +60 -0
- package/template/stories/basics/ng-module/angular-src/chips-group.component.ts +49 -0
- package/template/stories/basics/ng-module/angular-src/chips.module.ts +31 -0
- package/template/stories/basics/ng-module/import-module-for-root.stories.ts +50 -0
- package/template/stories/basics/ng-module/import-module.stories.ts +46 -0
- package/template/stories/button.component.ts +26 -0
- package/template/stories/core/README.stories.mdx +7 -0
- package/template/stories/core/decorators/componentWrapperDecorator/child.component.ts +20 -0
- package/template/stories/core/decorators/componentWrapperDecorator/decorators.stories.ts +117 -0
- package/template/stories/core/decorators/componentWrapperDecorator/parent.component.ts +18 -0
- package/template/stories/core/decorators/theme-decorator/decorators.stories.ts +20 -0
- package/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts +10 -0
- package/template/stories/core/moduleMetadata/angular-src/dummy.service.ts +14 -0
- package/template/stories/core/moduleMetadata/angular-src/service.component.ts +24 -0
- package/template/stories/core/moduleMetadata/angular-src/token.component.ts +31 -0
- package/template/stories/core/moduleMetadata/in-export-default.stories.ts +38 -0
- package/template/stories/core/moduleMetadata/in-stories.stories.ts +46 -0
- package/template/stories/core/moduleMetadata/merge-default-and-story.stories.ts +35 -0
- package/template/stories/core/parameters/bootstrap-options.stories.ts +22 -0
- package/template/stories/core/styles/story-styles.stories.ts +50 -0
- package/template/stories/others/issues/12009-unknown-component.stories.ts +14 -0
- package/template/stories/others/ngx-translate/README.stories.mdx +58 -0
- package/LICENSE +0 -21
- package/dist/types/client/docs/config.d.ts +0 -14
- package/dist/types/client/index.d.ts +0 -4
- package/dist/types/client/index.js +0 -32
- package/dist/types/client/preview/config.d.ts +0 -6
- package/dist/types/client/preview/config.js +0 -10
- package/dist/types/client/preview/decorateStory.d.ts +0 -4
- package/dist/types/client/preview/decorators.d.ts +0 -6
- package/dist/types/client/preview/globals.d.ts +0 -1
- package/dist/types/client/preview/globals.js +0 -9
- package/dist/types/client/preview/index.d.ts +0 -25
- package/dist/types/client/preview/index.js +0 -29
- package/dist/types/client/preview/render.d.ts +0 -7
- package/dist/types/client/preview/types-6-0.d.ts +0 -42
- package/dist/types/client/preview/types-7-0.d.ts +0 -9
- package/dist/types/client/preview/types-7-0.js +0 -2
- package/dist/types/index.d.ts +0 -2
- package/dist/types/preset.d.ts +0 -13
- package/dist/types/renderer.d.ts +0 -4
- package/dist/types/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -19
- package/dist/types/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -19
- package/dist/types/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -16
- package/dist/types/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -16
- package/dist/types/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -16
- package/dist/types/server/angular-cli-webpack-12.2.x.d.ts +0 -1
- package/dist/types/server/angular-cli-webpack-12.2.x.js +0 -66
- package/dist/types/server/angular-cli-webpack-older.d.ts +0 -6
- package/dist/types/server/angular-cli-webpack-older.js +0 -111
- package/dist/types/server/angular-devkit-build-webpack.d.ts +0 -30
- package/dist/types/server/angular-devkit-build-webpack.js +0 -164
- package/dist/types/server/create-fork-ts-checker-plugin.d.ts +0 -3
- package/dist/types/server/create-fork-ts-checker-plugin.js +0 -19
- package/dist/types/server/framework-preset-angular.d.ts +0 -5
- package/dist/types/server/framework-preset-angular.js +0 -103
- package/dist/types/server/ngx-template-loader/index.d.ts +0 -1
- package/dist/types/server/ngx-template-loader/index.js +0 -46
- package/dist/types/server/ts_config.d.ts +0 -2
- package/dist/types/server/ts_config.js +0 -28
- package/dist/types/types.d.ts +0 -13
- package/types-6-0.d.ts +0 -1
- package/types-7-0.d.ts +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Args, Meta, componentWrapperDecorator } from '@storybook/angular';
|
|
2
|
+
|
|
3
|
+
export const Base = (args: Args) => ({
|
|
4
|
+
template: 'Change theme with the brush in toolbar',
|
|
5
|
+
props: {
|
|
6
|
+
...args,
|
|
7
|
+
},
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
// title: 'Core / Decorators / Theme Decorators',
|
|
12
|
+
component: Base,
|
|
13
|
+
decorators: [
|
|
14
|
+
componentWrapperDecorator(
|
|
15
|
+
(story) => `<div [class]="myTheme">${story}</div>`,
|
|
16
|
+
|
|
17
|
+
({ globals }) => ({ myTheme: `${globals['theme']}-theme` })
|
|
18
|
+
),
|
|
19
|
+
],
|
|
20
|
+
} as Meta;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Injectable({ providedIn: 'root' })
|
|
4
|
+
export class DummyService {
|
|
5
|
+
constructor() {}
|
|
6
|
+
|
|
7
|
+
getItems() {
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
setTimeout(() => {
|
|
10
|
+
resolve(['Joe', 'Jane']);
|
|
11
|
+
}, 2000);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OnInit, Component, Input } from '@angular/core';
|
|
2
|
+
import { DummyService } from './dummy.service';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'storybook-simple-service-component',
|
|
6
|
+
template: `
|
|
7
|
+
<p>{{ name }}:</p>
|
|
8
|
+
<ul>
|
|
9
|
+
<li *ngFor="let item of items">{{ item }}</li>
|
|
10
|
+
</ul>
|
|
11
|
+
`,
|
|
12
|
+
})
|
|
13
|
+
export class ServiceComponent implements OnInit {
|
|
14
|
+
items?: {};
|
|
15
|
+
|
|
16
|
+
@Input()
|
|
17
|
+
name?: any;
|
|
18
|
+
|
|
19
|
+
constructor(private dummy: DummyService) {}
|
|
20
|
+
|
|
21
|
+
async ngOnInit() {
|
|
22
|
+
this.items = (await this.dummy.getItems()) as any;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component, Input, InjectionToken, Inject, Optional } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
export const ITEMS = new InjectionToken<string[]>('TokenComponent.Items');
|
|
4
|
+
export const DEFAULT_NAME = new InjectionToken<string>('TokenComponent.DefaultName');
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'storybook-simple-token-component',
|
|
8
|
+
template: `
|
|
9
|
+
<h3>{{ name }}</h3>
|
|
10
|
+
<p>Items:</p>
|
|
11
|
+
<ul>
|
|
12
|
+
<li *ngFor="let item of items">{{ item }}</li>
|
|
13
|
+
</ul>
|
|
14
|
+
`,
|
|
15
|
+
})
|
|
16
|
+
export class TokenComponent {
|
|
17
|
+
items;
|
|
18
|
+
|
|
19
|
+
@Input()
|
|
20
|
+
name;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
@Optional()
|
|
24
|
+
@Inject(DEFAULT_NAME)
|
|
25
|
+
defaultName: string,
|
|
26
|
+
@Inject(ITEMS) items: string[]
|
|
27
|
+
) {
|
|
28
|
+
this.name = defaultName;
|
|
29
|
+
this.items = items;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { StoryFn, Meta, moduleMetadata } from '@storybook/angular';
|
|
2
|
+
import { TokenComponent, ITEMS, DEFAULT_NAME } from './angular-src/token.component';
|
|
3
|
+
|
|
4
|
+
export const Story1: StoryFn = () => ({
|
|
5
|
+
template: `<storybook-simple-token-component [name]="name"></storybook-simple-token-component>`,
|
|
6
|
+
props: {
|
|
7
|
+
name: 'Prop Name',
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
Story1.storyName = 'Story 1';
|
|
12
|
+
|
|
13
|
+
export const Story2: StoryFn = () => ({
|
|
14
|
+
template: `<storybook-simple-token-component></storybook-simple-token-component>`,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
Story2.storyName = 'Story 2';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
// title: 'Core / ModuleMetadata / In export default with decorator',
|
|
21
|
+
component: Story1,
|
|
22
|
+
decorators: [
|
|
23
|
+
moduleMetadata({
|
|
24
|
+
imports: [],
|
|
25
|
+
declarations: [TokenComponent],
|
|
26
|
+
providers: [
|
|
27
|
+
{
|
|
28
|
+
provide: ITEMS,
|
|
29
|
+
useValue: ['Joe', 'Jane'],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
provide: DEFAULT_NAME,
|
|
33
|
+
useValue: 'Provider Name',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
} as Meta;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/angular';
|
|
2
|
+
import { TokenComponent, ITEMS, DEFAULT_NAME } from './angular-src/token.component';
|
|
3
|
+
|
|
4
|
+
export const Individual1: StoryFn = () => ({
|
|
5
|
+
template: `<storybook-simple-token-component [name]="name"></storybook-simple-token-component>`,
|
|
6
|
+
props: {
|
|
7
|
+
name: 'Prop Name',
|
|
8
|
+
},
|
|
9
|
+
moduleMetadata: {
|
|
10
|
+
imports: [],
|
|
11
|
+
declarations: [TokenComponent],
|
|
12
|
+
providers: [
|
|
13
|
+
{
|
|
14
|
+
provide: ITEMS,
|
|
15
|
+
useValue: ['Joe', 'Jane'],
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
Individual1.storyName = 'Individual 1';
|
|
22
|
+
|
|
23
|
+
export const Individual2: StoryFn = () => ({
|
|
24
|
+
template: `<storybook-simple-token-component></storybook-simple-token-component>`,
|
|
25
|
+
moduleMetadata: {
|
|
26
|
+
imports: [],
|
|
27
|
+
declarations: [TokenComponent],
|
|
28
|
+
providers: [
|
|
29
|
+
{
|
|
30
|
+
provide: ITEMS,
|
|
31
|
+
useValue: ['Jim', 'Jill'],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
provide: DEFAULT_NAME,
|
|
35
|
+
useValue: 'Provider Name',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
Individual2.storyName = 'Individual 2';
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
// title: 'Core / ModuleMetadata / In stories',
|
|
45
|
+
component: Individual1,
|
|
46
|
+
} as Meta;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Meta, StoryFn, moduleMetadata } from '@storybook/angular';
|
|
2
|
+
import { TokenComponent, ITEMS, DEFAULT_NAME } from './angular-src/token.component';
|
|
3
|
+
import { CustomPipePipe } from './angular-src/custom.pipe';
|
|
4
|
+
|
|
5
|
+
export const MergeWithDefaultModuleMetadata: StoryFn = () => ({
|
|
6
|
+
template: `<storybook-simple-token-component [name]="name | customPipe"></storybook-simple-token-component>`,
|
|
7
|
+
props: {
|
|
8
|
+
name: 'Prop Name',
|
|
9
|
+
},
|
|
10
|
+
moduleMetadata: {
|
|
11
|
+
declarations: [CustomPipePipe],
|
|
12
|
+
providers: [],
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
MergeWithDefaultModuleMetadata.storyName = 'Merge with default ModuleMetadata';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
// title: 'Core / ModuleMetadata / Merge default and story',
|
|
19
|
+
component: MergeWithDefaultModuleMetadata,
|
|
20
|
+
decorators: [
|
|
21
|
+
moduleMetadata({
|
|
22
|
+
declarations: [TokenComponent],
|
|
23
|
+
providers: [
|
|
24
|
+
{
|
|
25
|
+
provide: ITEMS,
|
|
26
|
+
useValue: ['Joe', 'Jane'],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
provide: DEFAULT_NAME,
|
|
30
|
+
useValue: 'Provider Name',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
} as Meta;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/angular';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'component-with-whitespace',
|
|
6
|
+
template: ` <div>
|
|
7
|
+
<p>Some content</p>
|
|
8
|
+
</div>`,
|
|
9
|
+
})
|
|
10
|
+
class ComponentWithWhitespace {}
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
// title: 'Core / Parameters / With Bootstrap Options',
|
|
14
|
+
component: ComponentWithWhitespace,
|
|
15
|
+
parameters: {
|
|
16
|
+
bootstrapOptions: {
|
|
17
|
+
preserveWhitespaces: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
} as Meta;
|
|
21
|
+
|
|
22
|
+
export const WithPreserveWhitespaces: StoryFn = (_args) => ({});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Meta, StoryFn, moduleMetadata } from '@storybook/angular';
|
|
2
|
+
import Button from '../../button.component';
|
|
3
|
+
|
|
4
|
+
export const TemplateStory: StoryFn = () => ({
|
|
5
|
+
template: `<storybook-button-component [text]="text" (onClick)="onClick($event)"></storybook-button-component>`,
|
|
6
|
+
props: {
|
|
7
|
+
text: 'Button with custom styles',
|
|
8
|
+
onClick: () => {},
|
|
9
|
+
},
|
|
10
|
+
styles: [
|
|
11
|
+
`
|
|
12
|
+
storybook-button-component {
|
|
13
|
+
background-color: yellow;
|
|
14
|
+
padding: 25px;
|
|
15
|
+
}
|
|
16
|
+
`,
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
TemplateStory.storyName = 'With story template';
|
|
20
|
+
|
|
21
|
+
export const WithArgsStory: StoryFn = (args) => ({
|
|
22
|
+
template: `<storybook-button-component [text]="text" (onClick)="onClick($event)"></storybook-button-component>`,
|
|
23
|
+
props: args,
|
|
24
|
+
styles: [
|
|
25
|
+
`
|
|
26
|
+
storybook-button-component {
|
|
27
|
+
background-color: red;
|
|
28
|
+
padding: 25px;
|
|
29
|
+
}
|
|
30
|
+
`,
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
WithArgsStory.storyName = 'With Args';
|
|
34
|
+
WithArgsStory.argTypes = {
|
|
35
|
+
text: { control: 'text' },
|
|
36
|
+
onClick: { action: 'On click' },
|
|
37
|
+
};
|
|
38
|
+
WithArgsStory.args = {
|
|
39
|
+
text: 'Button with custom styles',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
// title: 'Core / Story host styles',
|
|
44
|
+
component: TemplateStory,
|
|
45
|
+
decorators: [
|
|
46
|
+
moduleMetadata({
|
|
47
|
+
declarations: [Button],
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
} as Meta;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/angular';
|
|
2
|
+
import Button from '../../button.component';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
// title: 'Others / Issues / 12009 unknown component',
|
|
6
|
+
component: Button,
|
|
7
|
+
} as Meta;
|
|
8
|
+
|
|
9
|
+
const Template: StoryFn = (args) => ({
|
|
10
|
+
props: args,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const Basic = Template.bind({});
|
|
14
|
+
Basic.args = { text: 'Unknown component' };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
|
2
|
+
|
|
3
|
+
<Meta title="stories / frameworks / angular / others / ngx-translate" />
|
|
4
|
+
|
|
5
|
+
# [ngx-translate](https://github.com/ngx-translate/core)
|
|
6
|
+
|
|
7
|
+
> No real example here to avoid adding more dependency to storybook mono repository
|
|
8
|
+
|
|
9
|
+
There are several ways to configure ngx-translate in storybook which will depend on your context.
|
|
10
|
+
|
|
11
|
+
Here is a simple example with a storybook decorator that you can place in the `preview.ts` or locally on the stories.
|
|
12
|
+
[See the doc on decorators](https://storybook.js.org/docs/angular/writing-stories/decorators)
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
16
|
+
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|
17
|
+
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
18
|
+
import { moduleMetadata } from '@storybook/angular';
|
|
19
|
+
|
|
20
|
+
function createTranslateLoader(http: HttpClient) {
|
|
21
|
+
return new TranslateHttpLoader(http, '/assets/i18n/', '.json');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const TranslateModuleDecorator = (storyFunc, context) => {
|
|
25
|
+
const { locale } = context.globals;
|
|
26
|
+
|
|
27
|
+
return moduleMetadata({
|
|
28
|
+
imports: [
|
|
29
|
+
HttpClientModule,
|
|
30
|
+
TranslateModule.forRoot({
|
|
31
|
+
defaultLanguage: locale,
|
|
32
|
+
loader: {
|
|
33
|
+
provide: TranslateLoader,
|
|
34
|
+
useFactory: createTranslateLoader,
|
|
35
|
+
deps: [HttpClient],
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
})(storyFunc, context);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// for `preview.ts`
|
|
43
|
+
export const decorators = [TranslateModuleDecorator];
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If the `TranslateModule.forRoot` is made by another module you can try to set this provider `DEFAULT_LANGUAGE`
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { DEFAULT_LANGUAGE } from '@ngx-translate/core';
|
|
50
|
+
|
|
51
|
+
const TranslateModuleDecorator = (storyFunc, context) => {
|
|
52
|
+
const { locale } = context.globals;
|
|
53
|
+
|
|
54
|
+
return moduleMetadata({
|
|
55
|
+
providers: [{ provide: DEFAULT_LANGUAGE, useValue: locale }],
|
|
56
|
+
})(storyFunc, context);
|
|
57
|
+
};
|
|
58
|
+
```
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Kadira Inc. <hello@kadira.io>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SourceType } from '@storybook/docs-tools';
|
|
2
|
-
export declare const parameters: {
|
|
3
|
-
docs: {
|
|
4
|
-
inlineStories: boolean;
|
|
5
|
-
extractArgTypes: (component: import("./types").Directive) => import("lib/api/dist/types").ArgTypes;
|
|
6
|
-
extractComponentDescription: (component: import("./types").Directive) => string;
|
|
7
|
-
source: {
|
|
8
|
-
type: SourceType;
|
|
9
|
-
language: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare const decorators: ((storyFn: import("@storybook/csf").PartialStoryFn<import("..").AngularFramework, import("@storybook/csf").Args>, context: import("..").StoryContext) => import("..").IStory)[];
|
|
14
|
-
export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args> | import("lib/addons/dist/types").Parameters)[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, } from './preview';
|
|
2
|
-
export * from './preview/types-6-0';
|
|
3
|
-
export type { StoryFnAngularReturnType as IStory } from './preview/types';
|
|
4
|
-
export { moduleMetadata, componentWrapperDecorator } from './preview/decorators';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.componentWrapperDecorator = exports.moduleMetadata = exports.raw = exports.forceReRender = exports.getStorybook = exports.configure = exports.addParameters = exports.addDecorator = exports.setAddon = exports.storiesOf = void 0;
|
|
18
|
-
var preview_1 = require("./preview");
|
|
19
|
-
Object.defineProperty(exports, "storiesOf", { enumerable: true, get: function () { return preview_1.storiesOf; } });
|
|
20
|
-
Object.defineProperty(exports, "setAddon", { enumerable: true, get: function () { return preview_1.setAddon; } });
|
|
21
|
-
Object.defineProperty(exports, "addDecorator", { enumerable: true, get: function () { return preview_1.addDecorator; } });
|
|
22
|
-
Object.defineProperty(exports, "addParameters", { enumerable: true, get: function () { return preview_1.addParameters; } });
|
|
23
|
-
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return preview_1.configure; } });
|
|
24
|
-
Object.defineProperty(exports, "getStorybook", { enumerable: true, get: function () { return preview_1.getStorybook; } });
|
|
25
|
-
Object.defineProperty(exports, "forceReRender", { enumerable: true, get: function () { return preview_1.forceReRender; } });
|
|
26
|
-
Object.defineProperty(exports, "raw", { enumerable: true, get: function () { return preview_1.raw; } });
|
|
27
|
-
__exportStar(require("./preview/types-6-0"), exports);
|
|
28
|
-
var decorators_1 = require("./preview/decorators");
|
|
29
|
-
Object.defineProperty(exports, "moduleMetadata", { enumerable: true, get: function () { return decorators_1.moduleMetadata; } });
|
|
30
|
-
Object.defineProperty(exports, "componentWrapperDecorator", { enumerable: true, get: function () { return decorators_1.componentWrapperDecorator; } });
|
|
31
|
-
// optimization: stop HMR propagation in webpack
|
|
32
|
-
module?.hot?.decline();
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parameters = exports.decorateStory = exports.renderToDOM = exports.render = void 0;
|
|
4
|
-
require("./globals");
|
|
5
|
-
var render_1 = require("./render");
|
|
6
|
-
Object.defineProperty(exports, "render", { enumerable: true, get: function () { return render_1.render; } });
|
|
7
|
-
Object.defineProperty(exports, "renderToDOM", { enumerable: true, get: function () { return render_1.renderToDOM; } });
|
|
8
|
-
var decorateStory_1 = require("./decorateStory");
|
|
9
|
-
Object.defineProperty(exports, "decorateStory", { enumerable: true, get: function () { return decorateStory_1.decorateStory; } });
|
|
10
|
-
exports.parameters = { framework: 'angular' };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
|
|
2
|
-
import type { AngularFramework } from './types-6-0';
|
|
3
|
-
export default function decorateStory(mainStoryFn: LegacyStoryFn<AngularFramework>, decorators: DecoratorFunction<AngularFramework>[]): LegacyStoryFn<AngularFramework>;
|
|
4
|
-
export { decorateStory };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Type } from '@angular/core';
|
|
2
|
-
import type { DecoratorFunction, StoryContext } from '@storybook/csf';
|
|
3
|
-
import type { ICollection, NgModuleMetadata } from './types';
|
|
4
|
-
import type { AngularFramework } from './types-6-0';
|
|
5
|
-
export declare const moduleMetadata: <TArgs = any>(metadata: Partial<NgModuleMetadata>) => DecoratorFunction<AngularFramework, TArgs>;
|
|
6
|
-
export declare const componentWrapperDecorator: <TArgs = any>(element: Type<unknown> | ((story: string) => string), props?: ICollection | ((storyContext: StoryContext<AngularFramework, TArgs>) => ICollection)) => DecoratorFunction<AngularFramework, TArgs>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './angular-polyfills';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const global_1 = __importDefault(require("global"));
|
|
7
|
-
require("./angular-polyfills");
|
|
8
|
-
const { window: globalWindow } = global_1.default;
|
|
9
|
-
globalWindow.STORYBOOK_ENV = 'angular';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
|
-
import './globals';
|
|
5
|
-
import type { IStorybookSection } from './types';
|
|
6
|
-
import type { AngularFramework } from './types-6-0';
|
|
7
|
-
interface ClientApi extends ClientStoryApi<AngularFramework['storyResult']> {
|
|
8
|
-
setAddon(addon: any): void;
|
|
9
|
-
configure(loader: Loadable, module: NodeModule): void;
|
|
10
|
-
getStorybook(): IStorybookSection[];
|
|
11
|
-
clearDecorators(): void;
|
|
12
|
-
forceReRender(): void;
|
|
13
|
-
raw: () => any;
|
|
14
|
-
load: (...args: any[]) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
|
17
|
-
export declare const configure: ClientApi['configure'];
|
|
18
|
-
export declare const addDecorator: ClientApi['addDecorator'];
|
|
19
|
-
export declare const addParameters: ClientApi['addParameters'];
|
|
20
|
-
export declare const clearDecorators: ClientApi['clearDecorators'];
|
|
21
|
-
export declare const setAddon: ClientApi['setAddon'];
|
|
22
|
-
export declare const forceReRender: ClientApi['forceReRender'];
|
|
23
|
-
export declare const getStorybook: ClientApi['getStorybook'];
|
|
24
|
-
export declare const raw: ClientApi['raw'];
|
|
25
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.raw = exports.getStorybook = exports.forceReRender = exports.setAddon = exports.clearDecorators = exports.addParameters = exports.addDecorator = exports.configure = exports.storiesOf = void 0;
|
|
7
|
-
const core_client_1 = require("@storybook/core-client");
|
|
8
|
-
require("./globals");
|
|
9
|
-
const render_1 = require("./render");
|
|
10
|
-
const decorateStory_1 = __importDefault(require("./decorateStory"));
|
|
11
|
-
const framework = 'angular';
|
|
12
|
-
const api = (0, core_client_1.start)(render_1.renderToDOM, { decorateStory: decorateStory_1.default, render: render_1.render });
|
|
13
|
-
const storiesOf = (kind, m) => {
|
|
14
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
15
|
-
framework,
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
exports.storiesOf = storiesOf;
|
|
19
|
-
const configure = (...args) => api.configure(framework, ...args);
|
|
20
|
-
exports.configure = configure;
|
|
21
|
-
exports.addDecorator = api.clientApi
|
|
22
|
-
.addDecorator;
|
|
23
|
-
exports.addParameters = api.clientApi
|
|
24
|
-
.addParameters;
|
|
25
|
-
exports.clearDecorators = api.clientApi.clearDecorators;
|
|
26
|
-
exports.setAddon = api.clientApi.setAddon;
|
|
27
|
-
exports.forceReRender = api.forceReRender;
|
|
28
|
-
exports.getStorybook = api.clientApi.getStorybook;
|
|
29
|
-
exports.raw = api.clientApi.raw;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { RenderContext } from '@storybook/store';
|
|
2
|
-
import type { ArgsStoryFn } from '@storybook/csf';
|
|
3
|
-
import type { AngularFramework } from './types-6-0';
|
|
4
|
-
import { RendererFactory } from './angular-beta/RendererFactory';
|
|
5
|
-
export declare const rendererFactory: RendererFactory;
|
|
6
|
-
export declare const render: ArgsStoryFn<AngularFramework>;
|
|
7
|
-
export declare function renderToDOM({ storyFn, showMain, forceRemount, storyContext: { parameters, component }, id, }: RenderContext<AngularFramework>, element: HTMLElement): Promise<void>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Args, Parameters as DefaultParameters, StoryContext as DefaultStoryContext, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
|
2
|
-
import type { StoryFnAngularReturnType } from './types';
|
|
3
|
-
export type { Args, ArgTypes } from '@storybook/csf';
|
|
4
|
-
export declare type AngularFramework = {
|
|
5
|
-
component: any;
|
|
6
|
-
storyResult: StoryFnAngularReturnType;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Metadata to configure the stories for a component.
|
|
10
|
-
*
|
|
11
|
-
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
|
12
|
-
*/
|
|
13
|
-
export declare type Meta<TArgs = Args> = ComponentAnnotations<AngularFramework, TArgs>;
|
|
14
|
-
/**
|
|
15
|
-
* Story function that represents a CSFv2 component example.
|
|
16
|
-
*
|
|
17
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
18
|
-
*/
|
|
19
|
-
export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<AngularFramework, TArgs>;
|
|
20
|
-
/**
|
|
21
|
-
* Story function that represents a CSFv3 component example.
|
|
22
|
-
*
|
|
23
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
24
|
-
*/
|
|
25
|
-
export declare type StoryObj<TArgs = Args> = StoryAnnotations<AngularFramework, TArgs>;
|
|
26
|
-
/**
|
|
27
|
-
* Story function that represents a CSFv2 component example.
|
|
28
|
-
*
|
|
29
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
30
|
-
*
|
|
31
|
-
* NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
export declare type Story<TArgs = Args> = StoryFn<TArgs>;
|
|
35
|
-
export declare type Parameters = DefaultParameters & {
|
|
36
|
-
/** Uses legacy angular rendering engine that use dynamic component */
|
|
37
|
-
angularLegacyRendering?: boolean;
|
|
38
|
-
bootstrapModuleOptions?: unknown;
|
|
39
|
-
};
|
|
40
|
-
export declare type StoryContext = DefaultStoryContext<AngularFramework> & {
|
|
41
|
-
parameters: Parameters;
|
|
42
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Args } from '@storybook/csf';
|
|
2
|
-
import type { StoryObj } from './types-6-0';
|
|
3
|
-
export type { StoryFn, StoryObj, Meta } from './types-6-0';
|
|
4
|
-
/**
|
|
5
|
-
* Story function that represents a CSFv3 component example.
|
|
6
|
-
*
|
|
7
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
8
|
-
*/
|
|
9
|
-
export declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
package/dist/types/index.d.ts
DELETED
package/dist/types/preset.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StorybookConfig } from './types';
|
|
2
|
-
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
|
3
|
-
export declare const addons: StorybookConfig['addons'];
|
|
4
|
-
export declare const core: (config: StorybookConfig['core']) => Promise<{
|
|
5
|
-
builder: string;
|
|
6
|
-
disableWebpackDefaults?: boolean;
|
|
7
|
-
channelOptions?: Partial<import("telejson").Options>;
|
|
8
|
-
disableProjectJson?: boolean;
|
|
9
|
-
disableTelemetry?: boolean;
|
|
10
|
-
enableCrashReports?: boolean;
|
|
11
|
-
crossOriginIsolated?: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const typescript: (config: StorybookConfig['typescript']) => Promise<StorybookConfig['typescript']>;
|
package/dist/types/renderer.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { computesTemplateSourceFromComponent } from './client/preview/angular-beta/ComputesTemplateFromComponent';
|
|
2
|
-
export { rendererFactory } from './client/preview/render';
|
|
3
|
-
export { AbstractRenderer } from './client/preview/angular-beta/AbstractRenderer';
|
|
4
|
-
export { getStorybookModuleMetadata } from './client/preview/angular-beta/StorybookModule';
|