@storybook/angular 6.5.9 → 7.0.0-alpha.2
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/dist/{ts3.9 → types}/builders/build-storybook/index.d.ts +1 -1
- package/dist/types/builders/build-storybook/index.js +58 -0
- package/dist/{ts3.9 → types}/builders/build-storybook/schema.json +0 -0
- package/dist/{ts3.9 → types}/builders/builders.json +0 -0
- package/dist/{ts3.9 → types}/builders/start-storybook/index.d.ts +1 -1
- package/dist/types/builders/start-storybook/index.js +66 -0
- package/dist/{ts3.9 → types}/builders/start-storybook/schema.json +0 -0
- package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.d.ts +0 -0
- package/dist/{ts3.9 → types}/builders/utils/build-standalone-errors-handler.js +5 -5
- package/dist/{ts3.9 → types}/builders/utils/run-compodoc.d.ts +0 -0
- package/dist/{ts3.9 → types}/builders/utils/run-compodoc.js +9 -4
- package/dist/{ts3.9 → types}/client/docs/compodoc.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/docs/compodoc.js +47 -34
- package/dist/{ts3.9 → types}/client/docs/config.d.ts +2 -3
- package/dist/{ts3.9 → types}/client/docs/config.js +0 -2
- package/dist/{ts3.9 → types}/client/docs/index.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/docs/index.js +6 -2
- package/dist/{ts3.9 → types}/client/docs/sourceDecorator.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/docs/sourceDecorator.js +10 -9
- package/dist/{ts3.9 → types}/client/docs/types.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/docs/types.js +0 -0
- package/dist/{ts3.9 → types}/client/index.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/index.js +9 -5
- package/dist/{ts3.9 → types}/client/preview/angular/app.token.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular/app.token.js +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular/components/app.component.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular/components/app.component.js +4 -4
- package/dist/{ts3.9 → types}/client/preview/angular/helpers.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular/helpers.js +6 -6
- package/dist/{ts3.9 → types}/client/preview/angular-beta/AbstractRenderer.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/AbstractRenderer.js +40 -48
- package/dist/{ts3.9 → types}/client/preview/angular-beta/CanvasRenderer.d.ts +0 -0
- package/dist/types/client/preview/angular-beta/CanvasRenderer.js +16 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/ComputesTemplateFromComponent.js +10 -8
- package/dist/{ts3.9 → types}/client/preview/angular-beta/DocsRenderer.d.ts +0 -0
- package/dist/types/client/preview/angular-beta/DocsRenderer.js +41 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/RendererFactory.d.ts +0 -0
- package/dist/types/client/preview/angular-beta/RendererFactory.js +55 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookModule.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookModule.js +17 -16
- package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookProvider.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookProvider.js +2 -1
- package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/StorybookWrapperComponent.js +11 -10
- package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgComponentAnalyzer.js +24 -13
- package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-beta/utils/NgModulesAnalyzer.js +3 -2
- package/dist/{ts3.9 → types}/client/preview/angular-polyfills.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/angular-polyfills.js +0 -0
- package/dist/{ts3.9 → types}/client/preview/config.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/config.js +1 -1
- package/dist/{ts3.9 → types}/client/preview/decorateStory.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/decorateStory.js +11 -6
- package/dist/{ts3.9 → types}/client/preview/decorators.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/decorators.js +23 -11
- package/dist/{ts3.9 → types}/client/preview/globals.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/globals.js +0 -0
- package/dist/{ts3.9 → types}/client/preview/index.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/index.js +6 -4
- package/dist/{ts3.9 → types}/client/preview/render.d.ts +0 -0
- package/dist/types/client/preview/render.js +24 -0
- package/dist/{ts3.9 → types}/client/preview/types-6-0.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/types-6-0.js +0 -0
- package/dist/{ts3.9 → types}/client/preview/types-7-0.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/types-7-0.js +0 -0
- package/dist/{ts3.9 → types}/client/preview/types.d.ts +0 -0
- package/dist/{ts3.9 → types}/client/preview/types.js +0 -0
- package/dist/{ts3.4/public_api.d.ts → types/index.d.ts} +2 -1
- package/dist/{ts3.9/public_api.js → types/index.js} +7 -2
- package/dist/types/preset.d.ts +13 -0
- package/dist/types/preset.js +32 -0
- package/dist/{ts3.9 → types}/renderer.d.ts +0 -0
- package/dist/{ts3.9 → types}/renderer.js +1 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/nx.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -0
- package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -0
- package/dist/{ts3.9 → types}/server/angular-cli-webpack-12.2.x.d.ts +0 -0
- package/dist/types/server/angular-cli-webpack-12.2.x.js +66 -0
- package/dist/{ts3.9 → types}/server/angular-cli-webpack-13.x.x.d.ts +0 -0
- package/dist/types/server/angular-cli-webpack-13.x.x.js +70 -0
- package/dist/types/server/angular-cli-webpack-older.d.ts +6 -0
- package/dist/types/server/angular-cli-webpack-older.js +111 -0
- package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.d.ts +6 -6
- package/dist/{ts3.9 → types}/server/angular-devkit-build-webpack.js +66 -54
- package/dist/{ts3.9 → types}/server/angular-read-workspace.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/angular-read-workspace.js +8 -14
- package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/create-fork-ts-checker-plugin.js +1 -1
- package/dist/{ts3.9 → types}/server/framework-preset-angular-cli.d.ts +1 -1
- package/dist/types/server/framework-preset-angular-cli.js +175 -0
- package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/framework-preset-angular-docs.js +4 -3
- package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.d.ts +1 -1
- package/dist/{ts3.9 → types}/server/framework-preset-angular-ivy.js +26 -22
- package/dist/{ts3.9 → types}/server/framework-preset-angular.d.ts +0 -0
- package/dist/types/server/framework-preset-angular.js +103 -0
- package/dist/{ts3.9 → types}/server/ngx-template-loader/index.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/ngx-template-loader/index.js +0 -0
- package/dist/{ts3.9/server/options.d.ts → types/server/preset-options.d.ts} +1 -3
- package/dist/{ts3.9/types/index.js → types/server/preset-options.js} +0 -0
- package/dist/{ts3.9 → types}/server/ts_config.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/ts_config.js +0 -0
- package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/utils/filter-out-styling-rules.js +2 -1
- package/dist/{ts3.9 → types}/server/utils/module-is-available.d.ts +0 -0
- package/dist/{ts3.9 → types}/server/utils/module-is-available.js +2 -1
- package/dist/{ts3.4 → types}/server/utils/normalize-asset-patterns.d.ts +7 -6
- package/dist/{ts3.9 → types}/server/utils/normalize-asset-patterns.js +9 -9
- package/dist/{ts3.9 → types}/server/utils/normalize-optimization.d.ts +1 -1
- package/dist/{ts3.9 → types}/server/utils/normalize-optimization.js +3 -2
- package/dist/types/types.d.ts +13 -0
- package/dist/types/types.js +2 -0
- package/jest.config.js +1 -0
- package/package.json +47 -56
- package/preset.js +1 -1
- package/renderer.d.ts +1 -1
- package/renderer.js +1 -1
- package/standalone.js +2 -3
- package/types-6-0.d.ts +1 -1
- package/types-7-0.d.ts +1 -1
- package/bin/build.js +0 -4
- package/bin/index.js +0 -3
- package/demo.d.ts +0 -4
- package/demo.js +0 -5
- package/dist/ts3.4/builders/build-storybook/index.d.ts +0 -15
- package/dist/ts3.4/builders/start-storybook/index.d.ts +0 -15
- package/dist/ts3.4/builders/utils/build-standalone-errors-handler.d.ts +0 -1
- package/dist/ts3.4/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/ts3.4/client/docs/compodoc.d.ts +0 -18
- package/dist/ts3.4/client/docs/config.d.ts +0 -15
- package/dist/ts3.4/client/docs/index.d.ts +0 -1
- package/dist/ts3.4/client/docs/prepareForInline.d.ts +0 -7
- package/dist/ts3.4/client/docs/sourceDecorator.d.ts +0 -9
- package/dist/ts3.4/client/docs/types.d.ts +0 -102
- package/dist/ts3.4/client/index.d.ts +0 -4
- package/dist/ts3.4/client/preview/angular/app.token.d.ts +0 -3
- package/dist/ts3.4/client/preview/angular/components/app.component.d.ts +0 -38
- package/dist/ts3.4/client/preview/angular/helpers.d.ts +0 -8
- package/dist/ts3.4/client/preview/angular-beta/AbstractRenderer.d.ts +0 -57
- package/dist/ts3.4/client/preview/angular-beta/CanvasRenderer.d.ts +0 -14
- package/dist/ts3.4/client/preview/angular-beta/ComputesTemplateFromComponent.d.ts +0 -17
- package/dist/ts3.4/client/preview/angular-beta/DocsRenderer.d.ts +0 -14
- package/dist/ts3.4/client/preview/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/ts3.4/client/preview/angular-beta/StorybookModule.d.ts +0 -9
- package/dist/ts3.4/client/preview/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/ts3.4/client/preview/angular-beta/StorybookWrapperComponent.d.ts +0 -9
- package/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -29
- package/dist/ts3.4/client/preview/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/ts3.4/client/preview/angular-polyfills.d.ts +0 -41
- package/dist/ts3.4/client/preview/config.d.ts +0 -6
- package/dist/ts3.4/client/preview/decorateStory.d.ts +0 -4
- package/dist/ts3.4/client/preview/decorators.d.ts +0 -6
- package/dist/ts3.4/client/preview/globals.d.ts +0 -1
- package/dist/ts3.4/client/preview/index.d.ts +0 -25
- package/dist/ts3.4/client/preview/render.d.ts +0 -7
- package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -42
- package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.4/client/preview/types.d.ts +0 -29
- package/dist/ts3.4/demo/button.component.d.ts +0 -5
- package/dist/ts3.4/demo/welcome.component.d.ts +0 -4
- package/dist/ts3.4/renderer.d.ts +0 -4
- package/dist/ts3.4/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/ts3.4/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/ts3.4/server/angular-cli-webpack-12.2.x.d.ts +0 -1
- package/dist/ts3.4/server/angular-cli-webpack-13.x.x.d.ts +0 -1
- package/dist/ts3.4/server/angular-cli-webpack-older.d.ts +0 -73
- package/dist/ts3.4/server/angular-devkit-build-webpack.d.ts +0 -30
- package/dist/ts3.4/server/angular-read-workspace.d.ts +0 -13
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/create-fork-ts-checker-plugin.d.ts +0 -3
- package/dist/ts3.4/server/framework-preset-angular-cli.d.ts +0 -3
- package/dist/ts3.4/server/framework-preset-angular-docs.d.ts +0 -2
- package/dist/ts3.4/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/ts3.4/server/framework-preset-angular.d.ts +0 -5
- package/dist/ts3.4/server/index.d.ts +0 -1
- package/dist/ts3.4/server/ngx-template-loader/index.d.ts +0 -1
- package/dist/ts3.4/server/options.d.ts +0 -14
- package/dist/ts3.4/server/preset.d.ts +0 -3
- package/dist/ts3.4/server/ts_config.d.ts +0 -2
- package/dist/ts3.4/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/ts3.4/server/utils/module-is-available.d.ts +0 -1
- package/dist/ts3.4/server/utils/normalize-optimization.d.ts +0 -3
- package/dist/ts3.4/types/index.d.ts +0 -6
- package/dist/ts3.9/builders/build-storybook/index.js +0 -65
- package/dist/ts3.9/builders/start-storybook/index.js +0 -73
- package/dist/ts3.9/client/docs/prepareForInline.d.ts +0 -7
- package/dist/ts3.9/client/docs/prepareForInline.js +0 -45
- package/dist/ts3.9/client/preview/angular-beta/CanvasRenderer.js +0 -34
- package/dist/ts3.9/client/preview/angular-beta/DocsRenderer.js +0 -59
- package/dist/ts3.9/client/preview/angular-beta/RendererFactory.js +0 -65
- package/dist/ts3.9/client/preview/render.js +0 -34
- package/dist/ts3.9/demo/button.component.d.ts +0 -5
- package/dist/ts3.9/demo/button.component.js +0 -46
- package/dist/ts3.9/demo/welcome.component.d.ts +0 -4
- package/dist/ts3.9/demo/welcome.component.js +0 -99
- package/dist/ts3.9/public_api.d.ts +0 -1
- package/dist/ts3.9/server/angular-cli-webpack-12.2.x.js +0 -56
- package/dist/ts3.9/server/angular-cli-webpack-13.x.x.js +0 -60
- package/dist/ts3.9/server/angular-cli-webpack-older.d.ts +0 -73
- package/dist/ts3.9/server/angular-cli-webpack-older.js +0 -110
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/build.js +0 -28
- package/dist/ts3.9/server/framework-preset-angular-cli.js +0 -177
- package/dist/ts3.9/server/framework-preset-angular.js +0 -100
- package/dist/ts3.9/server/index.d.ts +0 -1
- package/dist/ts3.9/server/index.js +0 -8
- package/dist/ts3.9/server/options.js +0 -8
- package/dist/ts3.9/server/preset.d.ts +0 -3
- package/dist/ts3.9/server/preset.js +0 -13
- package/dist/ts3.9/server/utils/normalize-asset-patterns.d.ts +0 -6
- package/dist/ts3.9/types/index.d.ts +0 -6
|
@@ -6,9 +6,9 @@ const reflectionCapabilities = new core_1.ɵReflectionCapabilities();
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns component Inputs / Outputs by browsing these properties and decorator
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
const componentMetadata = exports.getComponentDecoratorMetadata(component);
|
|
11
|
-
const componentPropsMetadata = exports.getComponentPropsDecoratorMetadata(component);
|
|
9
|
+
const getComponentInputsOutputs = (component) => {
|
|
10
|
+
const componentMetadata = (0, exports.getComponentDecoratorMetadata)(component);
|
|
11
|
+
const componentPropsMetadata = (0, exports.getComponentPropsDecoratorMetadata)(component);
|
|
12
12
|
const initialValue = {
|
|
13
13
|
inputs: [],
|
|
14
14
|
outputs: [],
|
|
@@ -26,42 +26,50 @@ exports.getComponentInputsOutputs = (component) => {
|
|
|
26
26
|
// Browses component properties to extract I/O
|
|
27
27
|
// Filters properties that have the same name as the one present in the @Component property
|
|
28
28
|
return Object.entries(componentPropsMetadata).reduce((previousValue, [propertyName, values]) => {
|
|
29
|
-
var _a, _b;
|
|
30
29
|
const value = values.find((v) => v instanceof core_1.Input || v instanceof core_1.Output);
|
|
31
30
|
if (value instanceof core_1.Input) {
|
|
32
31
|
const inputToAdd = {
|
|
33
32
|
propName: propertyName,
|
|
34
|
-
templateName:
|
|
33
|
+
templateName: value.bindingPropertyName ?? propertyName,
|
|
35
34
|
};
|
|
36
35
|
const previousInputsFiltered = previousValue.inputs.filter((i) => i.templateName !== propertyName);
|
|
37
|
-
return
|
|
36
|
+
return {
|
|
37
|
+
...previousValue,
|
|
38
|
+
inputs: [...previousInputsFiltered, inputToAdd],
|
|
39
|
+
};
|
|
38
40
|
}
|
|
39
41
|
if (value instanceof core_1.Output) {
|
|
40
42
|
const outputToAdd = {
|
|
41
43
|
propName: propertyName,
|
|
42
|
-
templateName:
|
|
44
|
+
templateName: value.bindingPropertyName ?? propertyName,
|
|
43
45
|
};
|
|
44
46
|
const previousOutputsFiltered = previousValue.outputs.filter((i) => i.templateName !== propertyName);
|
|
45
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
...previousValue,
|
|
49
|
+
outputs: [...previousOutputsFiltered, outputToAdd],
|
|
50
|
+
};
|
|
46
51
|
}
|
|
47
52
|
return previousValue;
|
|
48
53
|
}, initialValue);
|
|
49
54
|
};
|
|
50
|
-
exports.
|
|
55
|
+
exports.getComponentInputsOutputs = getComponentInputsOutputs;
|
|
56
|
+
const isDeclarable = (component) => {
|
|
51
57
|
if (!component) {
|
|
52
58
|
return false;
|
|
53
59
|
}
|
|
54
60
|
const decorators = reflectionCapabilities.annotations(component);
|
|
55
61
|
return !!(decorators || []).find((d) => d instanceof core_1.Directive || d instanceof core_1.Pipe || d instanceof core_1.Component);
|
|
56
62
|
};
|
|
57
|
-
exports.
|
|
63
|
+
exports.isDeclarable = isDeclarable;
|
|
64
|
+
const isComponent = (component) => {
|
|
58
65
|
if (!component) {
|
|
59
66
|
return false;
|
|
60
67
|
}
|
|
61
68
|
const decorators = reflectionCapabilities.annotations(component);
|
|
62
69
|
return (decorators || []).some((d) => d instanceof core_1.Component);
|
|
63
70
|
};
|
|
64
|
-
exports.
|
|
71
|
+
exports.isComponent = isComponent;
|
|
72
|
+
const isStandaloneComponent = (component) => {
|
|
65
73
|
if (!component) {
|
|
66
74
|
return false;
|
|
67
75
|
}
|
|
@@ -70,17 +78,20 @@ exports.isStandaloneComponent = (component) => {
|
|
|
70
78
|
// Angular deps are updated to v14.x.x.
|
|
71
79
|
return (decorators || []).some((d) => d instanceof core_1.Component && d.standalone);
|
|
72
80
|
};
|
|
81
|
+
exports.isStandaloneComponent = isStandaloneComponent;
|
|
73
82
|
/**
|
|
74
83
|
* Returns all component decorator properties
|
|
75
84
|
* is used to get all `@Input` and `@Output` Decorator
|
|
76
85
|
*/
|
|
77
|
-
|
|
86
|
+
const getComponentPropsDecoratorMetadata = (component) => {
|
|
78
87
|
return reflectionCapabilities.propMetadata(component);
|
|
79
88
|
};
|
|
89
|
+
exports.getComponentPropsDecoratorMetadata = getComponentPropsDecoratorMetadata;
|
|
80
90
|
/**
|
|
81
91
|
* Returns component decorator `@Component`
|
|
82
92
|
*/
|
|
83
|
-
|
|
93
|
+
const getComponentDecoratorMetadata = (component) => {
|
|
84
94
|
const decorators = reflectionCapabilities.annotations(component);
|
|
85
95
|
return decorators.reverse().find((d) => d instanceof core_1.Component);
|
|
86
96
|
};
|
|
97
|
+
exports.getComponentDecoratorMetadata = getComponentDecoratorMetadata;
|
|
File without changes
|
|
@@ -8,7 +8,7 @@ const reflectionCapabilities = new core_1.ɵReflectionCapabilities();
|
|
|
8
8
|
*
|
|
9
9
|
* Checks recursively if the component has already been declared in all import Module
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
const isComponentAlreadyDeclaredInModules = (componentToFind, moduleDeclarations, moduleImports) => {
|
|
12
12
|
if (moduleDeclarations &&
|
|
13
13
|
moduleDeclarations.some((declaration) => declaration === componentToFind)) {
|
|
14
14
|
// Found component in declarations array
|
|
@@ -23,9 +23,10 @@ exports.isComponentAlreadyDeclaredInModules = (componentToFind, moduleDeclaratio
|
|
|
23
23
|
// Not an NgModule
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
|
-
return exports.isComponentAlreadyDeclaredInModules(componentToFind, extractedNgModuleMetadata.declarations, extractedNgModuleMetadata.imports);
|
|
26
|
+
return (0, exports.isComponentAlreadyDeclaredInModules)(componentToFind, extractedNgModuleMetadata.declarations, extractedNgModuleMetadata.imports);
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
+
exports.isComponentAlreadyDeclaredInModules = isComponentAlreadyDeclaredInModules;
|
|
29
30
|
const extractNgModuleMetadata = (importItem) => {
|
|
30
31
|
const target = importItem && importItem.ngModule ? importItem.ngModule : importItem;
|
|
31
32
|
const decorators = reflectionCapabilities.annotations(target);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parameters = void 0;
|
|
3
|
+
exports.parameters = exports.decorateStory = exports.renderToDOM = exports.render = void 0;
|
|
4
4
|
require("./globals");
|
|
5
5
|
var render_1 = require("./render");
|
|
6
6
|
Object.defineProperty(exports, "render", { enumerable: true, get: function () { return render_1.render; } });
|
|
File without changes
|
|
@@ -6,7 +6,10 @@ const ComputesTemplateFromComponent_1 = require("./angular-beta/ComputesTemplate
|
|
|
6
6
|
function decorateStory(mainStoryFn, decorators) {
|
|
7
7
|
const returnDecorators = [cleanArgsDecorator, ...decorators].reduce((previousStoryFn, decorator) => (context) => {
|
|
8
8
|
const decoratedStory = decorator((update) => {
|
|
9
|
-
return previousStoryFn(
|
|
9
|
+
return previousStoryFn({
|
|
10
|
+
...context,
|
|
11
|
+
...(0, store_1.sanitizeStoryContextUpdate)(update),
|
|
12
|
+
});
|
|
10
13
|
}, context);
|
|
11
14
|
return decoratedStory;
|
|
12
15
|
}, (context) => prepareMain(mainStoryFn(context), context));
|
|
@@ -15,14 +18,16 @@ function decorateStory(mainStoryFn, decorators) {
|
|
|
15
18
|
exports.default = decorateStory;
|
|
16
19
|
exports.decorateStory = decorateStory;
|
|
17
20
|
const prepareMain = (story, context) => {
|
|
18
|
-
var _a;
|
|
19
21
|
let { template } = story;
|
|
20
|
-
const component =
|
|
22
|
+
const component = story.component ?? context.component;
|
|
21
23
|
const userDefinedTemplate = !hasNoTemplate(template);
|
|
22
24
|
if (!userDefinedTemplate && component) {
|
|
23
|
-
template = ComputesTemplateFromComponent_1.computesTemplateFromComponent(component, story.props, '');
|
|
25
|
+
template = (0, ComputesTemplateFromComponent_1.computesTemplateFromComponent)(component, story.props, '');
|
|
24
26
|
}
|
|
25
|
-
return
|
|
27
|
+
return {
|
|
28
|
+
...story,
|
|
29
|
+
...(template ? { template, userDefinedTemplate } : {}),
|
|
30
|
+
};
|
|
26
31
|
};
|
|
27
32
|
function hasNoTemplate(template) {
|
|
28
33
|
return template === null || template === undefined;
|
|
@@ -36,7 +41,7 @@ const cleanArgsDecorator = (storyFn, context) => {
|
|
|
36
41
|
const argType = context.argTypes[key];
|
|
37
42
|
// Only keeps args with a control or an action in argTypes
|
|
38
43
|
if (argType.action || argType.control) {
|
|
39
|
-
return
|
|
44
|
+
return { ...obj, [key]: arg };
|
|
40
45
|
}
|
|
41
46
|
return obj;
|
|
42
47
|
}, {});
|
|
File without changes
|
|
@@ -5,11 +5,13 @@ const ComputesTemplateFromComponent_1 = require("./angular-beta/ComputesTemplate
|
|
|
5
5
|
const NgComponentAnalyzer_1 = require("./angular-beta/utils/NgComponentAnalyzer");
|
|
6
6
|
// We use `any` here as the default type rather than `Args` because we need something that is
|
|
7
7
|
// castable to any component-specific args type when the user is being careful.
|
|
8
|
-
|
|
8
|
+
const moduleMetadata = (metadata) => (storyFn) => {
|
|
9
9
|
const story = storyFn();
|
|
10
10
|
const storyMetadata = story.moduleMetadata || {};
|
|
11
11
|
metadata = metadata || {};
|
|
12
|
-
return
|
|
12
|
+
return {
|
|
13
|
+
...story,
|
|
14
|
+
moduleMetadata: {
|
|
13
15
|
declarations: [...(metadata.declarations || []), ...(storyMetadata.declarations || [])],
|
|
14
16
|
entryComponents: [
|
|
15
17
|
...(metadata.entryComponents || []),
|
|
@@ -18,17 +20,27 @@ exports.moduleMetadata = (metadata) => (storyFn) => {
|
|
|
18
20
|
imports: [...(metadata.imports || []), ...(storyMetadata.imports || [])],
|
|
19
21
|
schemas: [...(metadata.schemas || []), ...(storyMetadata.schemas || [])],
|
|
20
22
|
providers: [...(metadata.providers || []), ...(storyMetadata.providers || [])],
|
|
21
|
-
}
|
|
23
|
+
},
|
|
24
|
+
};
|
|
22
25
|
};
|
|
23
|
-
exports.
|
|
26
|
+
exports.moduleMetadata = moduleMetadata;
|
|
27
|
+
const componentWrapperDecorator = (element, props) => (storyFn, storyContext) => {
|
|
24
28
|
const story = storyFn();
|
|
25
29
|
const currentProps = typeof props === 'function' ? props(storyContext) : props;
|
|
26
|
-
const template = NgComponentAnalyzer_1.isComponent(element)
|
|
27
|
-
? ComputesTemplateFromComponent_1.computesTemplateFromComponent(element, currentProps
|
|
30
|
+
const template = (0, NgComponentAnalyzer_1.isComponent)(element)
|
|
31
|
+
? (0, ComputesTemplateFromComponent_1.computesTemplateFromComponent)(element, currentProps ?? {}, story.template)
|
|
28
32
|
: element(story.template);
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
return {
|
|
34
|
+
...story,
|
|
35
|
+
template,
|
|
36
|
+
...(currentProps || story.props
|
|
37
|
+
? {
|
|
38
|
+
props: {
|
|
39
|
+
...currentProps,
|
|
40
|
+
...story.props,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
: {}),
|
|
44
|
+
};
|
|
34
45
|
};
|
|
46
|
+
exports.componentWrapperDecorator = componentWrapperDecorator;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,18 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.raw = exports.getStorybook = exports.forceReRender = exports.setAddon = exports.clearDecorators = exports.addParameters = exports.addDecorator = exports.configure = exports.storiesOf = void 0;
|
|
7
|
-
const
|
|
7
|
+
const core_client_1 = require("@storybook/core-client");
|
|
8
8
|
require("./globals");
|
|
9
9
|
const render_1 = require("./render");
|
|
10
10
|
const decorateStory_1 = __importDefault(require("./decorateStory"));
|
|
11
11
|
const framework = 'angular';
|
|
12
|
-
const api =
|
|
13
|
-
|
|
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
14
|
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
15
15
|
framework,
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
18
|
+
exports.storiesOf = storiesOf;
|
|
19
|
+
const configure = (...args) => api.configure(framework, ...args);
|
|
20
|
+
exports.configure = configure;
|
|
19
21
|
exports.addDecorator = api.clientApi
|
|
20
22
|
.addDecorator;
|
|
21
23
|
exports.addParameters = api.clientApi
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderToDOM = exports.render = exports.rendererFactory = void 0;
|
|
4
|
+
const helpers_1 = require("./angular/helpers");
|
|
5
|
+
const RendererFactory_1 = require("./angular-beta/RendererFactory");
|
|
6
|
+
exports.rendererFactory = new RendererFactory_1.RendererFactory();
|
|
7
|
+
const render = (props) => ({ props });
|
|
8
|
+
exports.render = render;
|
|
9
|
+
async function renderToDOM({ storyFn, showMain, forceRemount, storyContext: { parameters, component }, id, }, element) {
|
|
10
|
+
showMain();
|
|
11
|
+
if (parameters.angularLegacyRendering) {
|
|
12
|
+
(0, helpers_1.renderNgApp)(storyFn, !forceRemount);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const renderer = await exports.rendererFactory.getRendererInstance(id, element);
|
|
16
|
+
await renderer.render({
|
|
17
|
+
storyFnAngular: storyFn(),
|
|
18
|
+
component,
|
|
19
|
+
parameters,
|
|
20
|
+
forced: !forceRemount,
|
|
21
|
+
targetDOMNode: element,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.renderToDOM = renderToDOM;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './client';
|
|
1
|
+
export * from './client';
|
|
2
|
+
export * from './types';
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./client"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
14
19
|
/*
|
|
15
20
|
* ATTENTION:
|
|
16
21
|
* - moduleMetadata
|
|
@@ -0,0 +1,13 @@
|
|
|
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']>;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.typescript = exports.core = exports.addons = exports.previewAnnotations = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const previewAnnotations = (entries = []) => [
|
|
9
|
+
...entries,
|
|
10
|
+
require.resolve('./client/preview/config'),
|
|
11
|
+
];
|
|
12
|
+
exports.previewAnnotations = previewAnnotations;
|
|
13
|
+
exports.addons = [
|
|
14
|
+
require.resolve('./server/framework-preset-angular'),
|
|
15
|
+
require.resolve('./server/framework-preset-angular-cli'),
|
|
16
|
+
require.resolve('./server/framework-preset-angular-ivy'),
|
|
17
|
+
require.resolve('./server/framework-preset-angular-docs'),
|
|
18
|
+
];
|
|
19
|
+
const core = async (config) => {
|
|
20
|
+
return {
|
|
21
|
+
...config,
|
|
22
|
+
builder: path_1.default.dirname(require.resolve(path_1.default.join('@storybook/builder-webpack5', 'package.json'))),
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
exports.core = core;
|
|
26
|
+
const typescript = async (config) => {
|
|
27
|
+
return {
|
|
28
|
+
...config,
|
|
29
|
+
skipBabel: true,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.typescript = typescript;
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStorybookModuleMetadata = exports.AbstractRenderer = exports.rendererFactory = exports.computesTemplateSourceFromComponent = void 0;
|
|
3
4
|
var ComputesTemplateFromComponent_1 = require("./client/preview/angular-beta/ComputesTemplateFromComponent");
|
|
4
5
|
Object.defineProperty(exports, "computesTemplateSourceFromComponent", { enumerable: true, get: function () { return ComputesTemplateFromComponent_1.computesTemplateSourceFromComponent; } });
|
|
5
6
|
var render_1 = require("./client/preview/render");
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/empty-projects-entry/angular.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json
RENAMED
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json
RENAMED
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts
RENAMED
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js
RENAMED
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json
RENAMED
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json
RENAMED
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-architect-build/angular.json
RENAMED
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-compatible-projects/angular.json
RENAMED
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/angular.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{ts3.9 → types}/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Private angular devkit stuff
|
|
2
|
+
const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config');
|
|
3
|
+
const { getCommonConfig, getStylesConfig, getTypeScriptConfig, } = require('@angular-devkit/build-angular/src/webpack/configs');
|
|
4
|
+
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
5
|
+
const { filterOutStylingRules } = require('./utils/filter-out-styling-rules');
|
|
6
|
+
/**
|
|
7
|
+
* Extract webpack config from angular-cli 12.2.x
|
|
8
|
+
* ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI.
|
|
9
|
+
* FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞)
|
|
10
|
+
*
|
|
11
|
+
* @param {*} baseConfig Previous webpack config from storybook
|
|
12
|
+
* @param {*} options { builderOptions, builderContext }
|
|
13
|
+
*/
|
|
14
|
+
exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext }) => {
|
|
15
|
+
/**
|
|
16
|
+
* Get angular-cli Webpack config
|
|
17
|
+
*/
|
|
18
|
+
const { config: cliConfig } = await generateI18nBrowserWebpackConfigFromContext({
|
|
19
|
+
// Default options
|
|
20
|
+
index: 'noop-index',
|
|
21
|
+
main: 'noop-main',
|
|
22
|
+
outputPath: 'noop-out',
|
|
23
|
+
// Options provided by user
|
|
24
|
+
...builderOptions,
|
|
25
|
+
// Fixed options
|
|
26
|
+
optimization: false,
|
|
27
|
+
namedChunks: false,
|
|
28
|
+
progress: false,
|
|
29
|
+
buildOptimizer: false,
|
|
30
|
+
aot: false,
|
|
31
|
+
}, builderContext, (wco) => [getCommonConfig(wco), getStylesConfig(wco), getTypeScriptConfig(wco)]);
|
|
32
|
+
/**
|
|
33
|
+
* Merge baseConfig Webpack with angular-cli Webpack
|
|
34
|
+
*/
|
|
35
|
+
const entry = [
|
|
36
|
+
...baseConfig.entry,
|
|
37
|
+
...(cliConfig.entry.styles ?? []),
|
|
38
|
+
...(cliConfig.entry.polyfills ?? []),
|
|
39
|
+
];
|
|
40
|
+
// Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
|
|
41
|
+
// because @angular-devkit/build-angular created rules have include/exclude for global style files.
|
|
42
|
+
const rulesExcludingStyles = filterOutStylingRules(baseConfig);
|
|
43
|
+
const module = {
|
|
44
|
+
...baseConfig.module,
|
|
45
|
+
rules: [...cliConfig.module.rules, ...rulesExcludingStyles],
|
|
46
|
+
};
|
|
47
|
+
const plugins = [...(cliConfig.plugins ?? []), ...baseConfig.plugins];
|
|
48
|
+
const resolve = {
|
|
49
|
+
...baseConfig.resolve,
|
|
50
|
+
modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])),
|
|
51
|
+
plugins: [
|
|
52
|
+
new TsconfigPathsPlugin({
|
|
53
|
+
configFile: builderOptions.tsConfig,
|
|
54
|
+
mainFields: ['browser', 'module', 'main'],
|
|
55
|
+
}),
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
...baseConfig,
|
|
60
|
+
entry,
|
|
61
|
+
module,
|
|
62
|
+
plugins,
|
|
63
|
+
resolve,
|
|
64
|
+
resolveLoader: cliConfig.resolveLoader,
|
|
65
|
+
};
|
|
66
|
+
};
|
|
File without changes
|