@storybook/angular 9.1.0-alpha.5 → 9.1.0-alpha.7
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/build-schema.json +199 -0
- package/builders.json +14 -0
- package/dist/builders/build-storybook/index.js +31 -80
- package/dist/builders/start-storybook/index.js +31 -101
- package/dist/chunk-CUDJAP6K.mjs +3 -0
- package/dist/chunk-KMSSK3DZ.mjs +6 -0
- package/dist/chunk-LXSTVAFF.mjs +40 -0
- package/dist/client/config.d.ts +20 -6
- package/dist/client/config.js +49 -20
- package/dist/client/config.mjs +10 -13
- package/dist/client/docs/config.d.ts +6 -3
- package/dist/client/docs/config.js +18 -14
- package/dist/client/docs/config.mjs +6 -10
- package/dist/client/index.d.ts +144 -6
- package/dist/client/index.js +47 -30
- package/dist/client/index.mjs +3 -9
- package/dist/client/preview-prod.d.ts +2 -1
- package/dist/client/preview-prod.js +5 -4
- package/dist/client/preview-prod.mjs +1 -0
- package/dist/index.d.ts +59 -2
- package/dist/index.js +47 -29
- package/dist/index.mjs +3 -13
- package/dist/preset.js +8 -38
- package/dist/server/framework-preset-angular-cli.js +20 -83
- package/dist/server/framework-preset-angular-ivy.js +6 -59
- package/dist/{client/types.d.ts → types-3b0b7107.d.ts} +9 -9
- package/package.json +59 -12
- package/start-schema.json +234 -0
- package/dist/builders/build-storybook/index.d.ts +0 -25
- package/dist/builders/build-storybook/index.mjs +0 -78
- package/dist/builders/build-storybook/index.spec.d.ts +0 -1
- package/dist/builders/build-storybook/index.spec.js +0 -222
- package/dist/builders/build-storybook/index.spec.mjs +0 -187
- package/dist/builders/build-storybook/schema.json +0 -199
- package/dist/builders/builders.json +0 -14
- package/dist/builders/start-storybook/index.d.ts +0 -21
- package/dist/builders/start-storybook/index.mjs +0 -99
- package/dist/builders/start-storybook/index.spec.d.ts +0 -1
- package/dist/builders/start-storybook/index.spec.js +0 -188
- package/dist/builders/start-storybook/index.spec.mjs +0 -186
- package/dist/builders/start-storybook/schema.json +0 -234
- package/dist/builders/utils/error-handler.d.ts +0 -2
- package/dist/builders/utils/error-handler.js +0 -38
- package/dist/builders/utils/error-handler.mjs +0 -33
- package/dist/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/builders/utils/run-compodoc.js +0 -35
- package/dist/builders/utils/run-compodoc.mjs +0 -31
- package/dist/builders/utils/run-compodoc.spec.d.ts +0 -1
- package/dist/builders/utils/run-compodoc.spec.js +0 -76
- package/dist/builders/utils/run-compodoc.spec.mjs +0 -74
- package/dist/builders/utils/standalone-options.d.ts +0 -18
- package/dist/builders/utils/standalone-options.js +0 -2
- package/dist/builders/utils/standalone-options.mjs +0 -1
- package/dist/client/angular-beta/AbstractRenderer.d.ts +0 -75
- package/dist/client/angular-beta/AbstractRenderer.js +0 -201
- package/dist/client/angular-beta/AbstractRenderer.mjs +0 -164
- package/dist/client/angular-beta/CanvasRenderer.d.ts +0 -12
- package/dist/client/angular-beta/CanvasRenderer.js +0 -13
- package/dist/client/angular-beta/CanvasRenderer.mjs +0 -9
- package/dist/client/angular-beta/ComputesTemplateFromComponent.d.ts +0 -24
- package/dist/client/angular-beta/ComputesTemplateFromComponent.js +0 -160
- package/dist/client/angular-beta/ComputesTemplateFromComponent.mjs +0 -154
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.d.ts +0 -1
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.js +0 -730
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.mjs +0 -728
- package/dist/client/angular-beta/DocsRenderer.d.ts +0 -13
- package/dist/client/angular-beta/DocsRenderer.js +0 -39
- package/dist/client/angular-beta/DocsRenderer.mjs +0 -35
- package/dist/client/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/client/angular-beta/RendererFactory.js +0 -56
- package/dist/client/angular-beta/RendererFactory.mjs +0 -50
- package/dist/client/angular-beta/RendererFactory.test.d.ts +0 -1
- package/dist/client/angular-beta/RendererFactory.test.js +0 -235
- package/dist/client/angular-beta/RendererFactory.test.mjs +0 -233
- package/dist/client/angular-beta/StorybookModule.d.ts +0 -8
- package/dist/client/angular-beta/StorybookModule.js +0 -27
- package/dist/client/angular-beta/StorybookModule.mjs +0 -23
- package/dist/client/angular-beta/StorybookModule.test.d.ts +0 -1
- package/dist/client/angular-beta/StorybookModule.test.js +0 -321
- package/dist/client/angular-beta/StorybookModule.test.mjs +0 -319
- package/dist/client/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/client/angular-beta/StorybookProvider.js +0 -26
- package/dist/client/angular-beta/StorybookProvider.mjs +0 -22
- package/dist/client/angular-beta/StorybookWrapperComponent.d.ts +0 -13
- package/dist/client/angular-beta/StorybookWrapperComponent.js +0 -127
- package/dist/client/angular-beta/StorybookWrapperComponent.mjs +0 -123
- package/dist/client/angular-beta/__testfixtures__/input.component.d.ts +0 -29
- package/dist/client/angular-beta/__testfixtures__/input.component.js +0 -76
- package/dist/client/angular-beta/__testfixtures__/input.component.mjs +0 -73
- package/dist/client/angular-beta/__testfixtures__/test.module.d.ts +0 -2
- package/dist/client/angular-beta/__testfixtures__/test.module.js +0 -20
- package/dist/client/angular-beta/__testfixtures__/test.module.mjs +0 -17
- package/dist/client/angular-beta/utils/BootstrapQueue.d.ts +0 -12
- package/dist/client/angular-beta/utils/BootstrapQueue.js +0 -86
- package/dist/client/angular-beta/utils/BootstrapQueue.mjs +0 -49
- package/dist/client/angular-beta/utils/BootstrapQueue.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/BootstrapQueue.test.js +0 -164
- package/dist/client/angular-beta/utils/BootstrapQueue.test.mjs +0 -162
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -22
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.js +0 -93
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.mjs +0 -84
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.js +0 -388
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.mjs +0 -386
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.js +0 -41
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.mjs +0 -37
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.js +0 -24
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.mjs +0 -22
- package/dist/client/angular-beta/utils/PropertyExtractor.d.ts +0 -30
- package/dist/client/angular-beta/utils/PropertyExtractor.js +0 -196
- package/dist/client/angular-beta/utils/PropertyExtractor.mjs +0 -158
- package/dist/client/angular-beta/utils/PropertyExtractor.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/PropertyExtractor.test.js +0 -177
- package/dist/client/angular-beta/utils/PropertyExtractor.test.mjs +0 -175
- package/dist/client/angular-beta/utils/StoryUID.d.ts +0 -22
- package/dist/client/angular-beta/utils/StoryUID.js +0 -43
- package/dist/client/angular-beta/utils/StoryUID.mjs +0 -38
- package/dist/client/argsToTemplate.d.ts +0 -56
- package/dist/client/argsToTemplate.js +0 -58
- package/dist/client/argsToTemplate.mjs +0 -55
- package/dist/client/argsToTemplate.test.d.ts +0 -1
- package/dist/client/argsToTemplate.test.js +0 -102
- package/dist/client/argsToTemplate.test.mjs +0 -100
- package/dist/client/compodoc-types.d.ts +0 -102
- package/dist/client/compodoc-types.js +0 -2
- package/dist/client/compodoc-types.mjs +0 -1
- package/dist/client/compodoc.d.ts +0 -12
- package/dist/client/compodoc.js +0 -261
- package/dist/client/compodoc.mjs +0 -248
- package/dist/client/compodoc.test.d.ts +0 -1
- package/dist/client/compodoc.test.js +0 -132
- package/dist/client/compodoc.test.mjs +0 -130
- package/dist/client/decorateStory.d.ts +0 -4
- package/dist/client/decorateStory.js +0 -48
- package/dist/client/decorateStory.mjs +0 -45
- package/dist/client/decorateStory.test.d.ts +0 -1
- package/dist/client/decorateStory.test.js +0 -306
- package/dist/client/decorateStory.test.mjs +0 -301
- package/dist/client/decorators.d.ts +0 -13
- package/dist/client/decorators.js +0 -69
- package/dist/client/decorators.mjs +0 -63
- package/dist/client/decorators.test.d.ts +0 -1
- package/dist/client/decorators.test.js +0 -159
- package/dist/client/decorators.test.mjs +0 -157
- package/dist/client/docs/__testfixtures__/doc-button/input.d.ts +0 -110
- package/dist/client/docs/__testfixtures__/doc-button/input.js +0 -204
- package/dist/client/docs/__testfixtures__/doc-button/input.mjs +0 -201
- package/dist/client/docs/__testfixtures__/doc-button/tsconfig.json +0 -7
- package/dist/client/docs/angular-properties.test.d.ts +0 -1
- package/dist/client/docs/angular-properties.test.js +0 -36
- package/dist/client/docs/angular-properties.test.mjs +0 -34
- package/dist/client/docs/sourceDecorator.d.ts +0 -10
- package/dist/client/docs/sourceDecorator.js +0 -53
- package/dist/client/docs/sourceDecorator.mjs +0 -48
- package/dist/client/globals.d.ts +0 -1
- package/dist/client/globals.js +0 -33
- package/dist/client/globals.mjs +0 -31
- package/dist/client/portable-stories.d.ts +0 -23
- package/dist/client/portable-stories.js +0 -62
- package/dist/client/portable-stories.mjs +0 -26
- package/dist/client/public-types.d.ts +0 -54
- package/dist/client/public-types.js +0 -2
- package/dist/client/public-types.mjs +0 -1
- package/dist/client/render.d.ts +0 -7
- package/dist/client/render.js +0 -19
- package/dist/client/render.mjs +0 -14
- package/dist/client/types.js +0 -2
- package/dist/client/types.mjs +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.js +0 -6
- package/dist/node/index.mjs +0 -3
- package/dist/preset.d.ts +0 -5
- package/dist/preset.mjs +0 -34
- package/dist/renderer.d.ts +0 -6
- package/dist/renderer.js +0 -15
- package/dist/renderer.mjs +0 -6
- package/dist/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -4
- package/dist/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/some-config/angular.json +0 -19
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -64
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-lib/angular.json +0 -28
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -20
- package/dist/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-nx/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-nx/nx.json +0 -3
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -8
- package/dist/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -14
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -3
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -8
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -14
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -5
- package/dist/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -11
- package/dist/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -7
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -3
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -20
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -16
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -13
- package/dist/server/__tests__/angular.json +0 -96
- package/dist/server/angular-cli-webpack.d.ts +0 -1
- package/dist/server/angular-cli-webpack.js +0 -80
- package/dist/server/angular-cli-webpack.mjs +0 -80
- package/dist/server/framework-preset-angular-cli.d.ts +0 -3
- package/dist/server/framework-preset-angular-cli.mjs +0 -81
- package/dist/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/server/framework-preset-angular-ivy.mjs +0 -56
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.d.ts +0 -12
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.js +0 -55
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.mjs +0 -52
- package/dist/server/preset-options.d.ts +0 -9
- package/dist/server/preset-options.js +0 -2
- package/dist/server/preset-options.mjs +0 -1
- package/dist/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/server/utils/filter-out-styling-rules.js +0 -17
- package/dist/server/utils/filter-out-styling-rules.mjs +0 -13
- package/dist/server/utils/module-is-available.d.ts +0 -1
- package/dist/server/utils/module-is-available.js +0 -13
- package/dist/server/utils/module-is-available.mjs +0 -9
- package/dist/test-setup.d.ts +0 -1
- package/dist/test-setup.js +0 -6
- package/dist/test-setup.mjs +0 -4
- package/dist/types.d.ts +0 -27
- package/dist/types.js +0 -2
- package/dist/types.mjs +0 -1
- package/scripts/postbuild.js +0 -17
- package/template/cli/.eslintrc.json +0 -5
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { vi, expect, describe, it } from 'vitest';
|
|
8
|
-
import { Component } from '@angular/core';
|
|
9
|
-
import { moduleMetadata, applicationConfig } from './decorators';
|
|
10
|
-
const defaultContext = {
|
|
11
|
-
componentId: 'unspecified',
|
|
12
|
-
kind: 'unspecified',
|
|
13
|
-
title: 'unspecified',
|
|
14
|
-
id: 'unspecified',
|
|
15
|
-
name: 'unspecified',
|
|
16
|
-
story: 'unspecified',
|
|
17
|
-
tags: [],
|
|
18
|
-
parameters: {},
|
|
19
|
-
initialArgs: {},
|
|
20
|
-
args: {},
|
|
21
|
-
argTypes: {},
|
|
22
|
-
globals: {},
|
|
23
|
-
globalTypes: {},
|
|
24
|
-
storyGlobals: {},
|
|
25
|
-
reporting: {
|
|
26
|
-
reports: [],
|
|
27
|
-
addReport: vi.fn(),
|
|
28
|
-
},
|
|
29
|
-
hooks: {},
|
|
30
|
-
loaded: {},
|
|
31
|
-
originalStoryFn: vi.fn(),
|
|
32
|
-
viewMode: 'story',
|
|
33
|
-
abortSignal: undefined,
|
|
34
|
-
canvasElement: undefined,
|
|
35
|
-
step: undefined,
|
|
36
|
-
context: undefined,
|
|
37
|
-
canvas: undefined,
|
|
38
|
-
userEvent: undefined,
|
|
39
|
-
mount: undefined,
|
|
40
|
-
};
|
|
41
|
-
defaultContext.context = defaultContext;
|
|
42
|
-
class MockModule {
|
|
43
|
-
}
|
|
44
|
-
class MockModuleTwo {
|
|
45
|
-
}
|
|
46
|
-
class MockService {
|
|
47
|
-
}
|
|
48
|
-
let MockComponent = class MockComponent {
|
|
49
|
-
};
|
|
50
|
-
MockComponent = __decorate([
|
|
51
|
-
Component({})
|
|
52
|
-
], MockComponent);
|
|
53
|
-
describe('applicationConfig', () => {
|
|
54
|
-
const provider1 = () => { };
|
|
55
|
-
const provider2 = () => { };
|
|
56
|
-
it('should apply global config', () => {
|
|
57
|
-
expect(applicationConfig({
|
|
58
|
-
providers: [provider1],
|
|
59
|
-
})(() => ({}), defaultContext)).toEqual({
|
|
60
|
-
applicationConfig: {
|
|
61
|
-
providers: [provider1],
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
it('should apply story config', () => {
|
|
66
|
-
expect(applicationConfig({
|
|
67
|
-
providers: [],
|
|
68
|
-
})(() => ({
|
|
69
|
-
applicationConfig: {
|
|
70
|
-
providers: [provider2],
|
|
71
|
-
},
|
|
72
|
-
}), {
|
|
73
|
-
...defaultContext,
|
|
74
|
-
})).toEqual({
|
|
75
|
-
applicationConfig: {
|
|
76
|
-
providers: [provider2],
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
it('should merge global and story config', () => {
|
|
81
|
-
expect(applicationConfig({
|
|
82
|
-
providers: [provider1],
|
|
83
|
-
})(() => ({
|
|
84
|
-
applicationConfig: {
|
|
85
|
-
providers: [provider2],
|
|
86
|
-
},
|
|
87
|
-
}), {
|
|
88
|
-
...defaultContext,
|
|
89
|
-
})).toEqual({
|
|
90
|
-
applicationConfig: {
|
|
91
|
-
providers: [provider1, provider2],
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
describe('moduleMetadata', () => {
|
|
97
|
-
it('should add metadata to a story without it', () => {
|
|
98
|
-
const result = moduleMetadata({
|
|
99
|
-
imports: [MockModule],
|
|
100
|
-
providers: [MockService],
|
|
101
|
-
})(() => ({}),
|
|
102
|
-
// deepscan-disable-next-line
|
|
103
|
-
defaultContext);
|
|
104
|
-
expect(result).toEqual({
|
|
105
|
-
moduleMetadata: {
|
|
106
|
-
declarations: [],
|
|
107
|
-
entryComponents: [],
|
|
108
|
-
imports: [MockModule],
|
|
109
|
-
schemas: [],
|
|
110
|
-
providers: [MockService],
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
it('should combine with individual metadata on a story', () => {
|
|
115
|
-
const result = moduleMetadata({
|
|
116
|
-
imports: [MockModule],
|
|
117
|
-
})(() => ({
|
|
118
|
-
component: MockComponent,
|
|
119
|
-
moduleMetadata: {
|
|
120
|
-
imports: [MockModuleTwo],
|
|
121
|
-
providers: [MockService],
|
|
122
|
-
},
|
|
123
|
-
}),
|
|
124
|
-
// deepscan-disable-next-line
|
|
125
|
-
defaultContext);
|
|
126
|
-
expect(result).toEqual({
|
|
127
|
-
component: MockComponent,
|
|
128
|
-
moduleMetadata: {
|
|
129
|
-
declarations: [],
|
|
130
|
-
entryComponents: [],
|
|
131
|
-
imports: [MockModule, MockModuleTwo],
|
|
132
|
-
schemas: [],
|
|
133
|
-
providers: [MockService],
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
it('should return the original metadata if passed null', () => {
|
|
138
|
-
const result = moduleMetadata(null)(() => ({
|
|
139
|
-
component: MockComponent,
|
|
140
|
-
moduleMetadata: {
|
|
141
|
-
providers: [MockService],
|
|
142
|
-
},
|
|
143
|
-
}),
|
|
144
|
-
// deepscan-disable-next-line
|
|
145
|
-
defaultContext);
|
|
146
|
-
expect(result).toEqual({
|
|
147
|
-
component: MockComponent,
|
|
148
|
-
moduleMetadata: {
|
|
149
|
-
declarations: [],
|
|
150
|
-
entryComponents: [],
|
|
151
|
-
imports: [],
|
|
152
|
-
schemas: [],
|
|
153
|
-
providers: [MockService],
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
});
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
-
export declare const exportedConstant = "An exported constant";
|
|
3
|
-
export type ButtonSize = 'small' | 'medium' | 'large' | 'xlarge';
|
|
4
|
-
export declare enum ButtonAccent {
|
|
5
|
-
'Normal' = "Normal",
|
|
6
|
-
'High' = "High"
|
|
7
|
-
}
|
|
8
|
-
export interface ISomeInterface {
|
|
9
|
-
one: string;
|
|
10
|
-
two: boolean;
|
|
11
|
-
three: any[];
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular.
|
|
15
|
-
*
|
|
16
|
-
* It supports [markdown](https://en.wikipedia.org/wiki/Markdown), so you can embed formatted text,
|
|
17
|
-
* like **bold**, _italic_, and `inline code`.> How you like dem apples?! It's never been easier to
|
|
18
|
-
* document all your components.
|
|
19
|
-
*
|
|
20
|
-
* @string Hello world
|
|
21
|
-
* @link [Example](http://example.com)
|
|
22
|
-
* @code `ThingThing`
|
|
23
|
-
* @html <span class="badge">aaa</span>
|
|
24
|
-
*/
|
|
25
|
-
export declare class InputComponent<T> {
|
|
26
|
-
buttonRef: ElementRef;
|
|
27
|
-
/** Appearance style of the button. */
|
|
28
|
-
appearance: 'primary' | 'secondary';
|
|
29
|
-
/** Specify the accent-type of the button */
|
|
30
|
-
accent: ButtonAccent;
|
|
31
|
-
/** Sets the button to a disabled state. */
|
|
32
|
-
isDisabled: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The inner text of the button.
|
|
35
|
-
*
|
|
36
|
-
* @required
|
|
37
|
-
*/
|
|
38
|
-
label: string;
|
|
39
|
-
/** Size of the button. */
|
|
40
|
-
size?: ButtonSize;
|
|
41
|
-
/** Specifies some arbitrary object */
|
|
42
|
-
someDataObject: ISomeInterface;
|
|
43
|
-
/**
|
|
44
|
-
* Some input you shouldn't use.
|
|
45
|
-
*
|
|
46
|
-
* @deprecated
|
|
47
|
-
*/
|
|
48
|
-
somethingYouShouldNotUse: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Handler to be called when the button is clicked by a user.
|
|
51
|
-
*
|
|
52
|
-
* Will also block the emission of the event if `isDisabled` is true.
|
|
53
|
-
*/
|
|
54
|
-
onClick: EventEmitter<Event>;
|
|
55
|
-
/**
|
|
56
|
-
* This is an internal method that we don't want to document and have added the `ignore`
|
|
57
|
-
* annotation to.
|
|
58
|
-
*
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
handleClick(event: Event): void;
|
|
62
|
-
private _inputValue;
|
|
63
|
-
/** Setter for `inputValue` that is also an `@Input`. */
|
|
64
|
-
set inputValue(value: string);
|
|
65
|
-
/** Getter for `inputValue`. */
|
|
66
|
-
get inputValue(): string;
|
|
67
|
-
onClickListener(btn: any): void;
|
|
68
|
-
focus: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Returns all the CSS classes for the button.
|
|
71
|
-
*
|
|
72
|
-
* @ignore
|
|
73
|
-
*/
|
|
74
|
-
get classes(): string[];
|
|
75
|
-
/** @ignore */
|
|
76
|
-
ignoredProperty: string;
|
|
77
|
-
/** Public value. */
|
|
78
|
-
internalProperty: string;
|
|
79
|
-
/** Private value. */
|
|
80
|
-
private _value;
|
|
81
|
-
/** Set the private value. */
|
|
82
|
-
set value(value: string | number);
|
|
83
|
-
/** Get the private value. */
|
|
84
|
-
get value(): string | number;
|
|
85
|
-
/**
|
|
86
|
-
* An internal calculation method which adds `x` and `y` together.
|
|
87
|
-
*
|
|
88
|
-
* @param x Some number you'd like to use.
|
|
89
|
-
* @param y Some other number or string you'd like to use, will have `parseInt()` applied before
|
|
90
|
-
* calculation.
|
|
91
|
-
*/
|
|
92
|
-
calc(x: number, y: string | number): number;
|
|
93
|
-
/** A public method using an interface. */
|
|
94
|
-
publicMethod(things: ISomeInterface): void;
|
|
95
|
-
/**
|
|
96
|
-
* A protected method.
|
|
97
|
-
*
|
|
98
|
-
* @param id Some `id`.
|
|
99
|
-
*/
|
|
100
|
-
protected protectedMethod(id?: number): void;
|
|
101
|
-
/**
|
|
102
|
-
* A private method.
|
|
103
|
-
*
|
|
104
|
-
* @param password Some `password`.
|
|
105
|
-
*/
|
|
106
|
-
private privateMethod;
|
|
107
|
-
showKey: keyof T;
|
|
108
|
-
set item(item: T[]);
|
|
109
|
-
processedItem: T[];
|
|
110
|
-
}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
|
-
};
|
|
10
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.InputComponent = exports.ButtonAccent = exports.exportedConstant = void 0;
|
|
15
|
-
const core_1 = require("@angular/core");
|
|
16
|
-
exports.exportedConstant = 'An exported constant';
|
|
17
|
-
var ButtonAccent;
|
|
18
|
-
(function (ButtonAccent) {
|
|
19
|
-
ButtonAccent["Normal"] = "Normal";
|
|
20
|
-
ButtonAccent["High"] = "High";
|
|
21
|
-
})(ButtonAccent || (exports.ButtonAccent = ButtonAccent = {}));
|
|
22
|
-
/**
|
|
23
|
-
* This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular.
|
|
24
|
-
*
|
|
25
|
-
* It supports [markdown](https://en.wikipedia.org/wiki/Markdown), so you can embed formatted text,
|
|
26
|
-
* like **bold**, _italic_, and `inline code`.> How you like dem apples?! It's never been easier to
|
|
27
|
-
* document all your components.
|
|
28
|
-
*
|
|
29
|
-
* @string Hello world
|
|
30
|
-
* @link [Example](http://example.com)
|
|
31
|
-
* @code `ThingThing`
|
|
32
|
-
* @html <span class="badge">aaa</span>
|
|
33
|
-
*/
|
|
34
|
-
let InputComponent = class InputComponent {
|
|
35
|
-
constructor() {
|
|
36
|
-
/** Appearance style of the button. */
|
|
37
|
-
this.appearance = 'secondary';
|
|
38
|
-
/** Sets the button to a disabled state. */
|
|
39
|
-
this.isDisabled = false;
|
|
40
|
-
/** Size of the button. */
|
|
41
|
-
this.size = 'medium';
|
|
42
|
-
/**
|
|
43
|
-
* Some input you shouldn't use.
|
|
44
|
-
*
|
|
45
|
-
* @deprecated
|
|
46
|
-
*/
|
|
47
|
-
this.somethingYouShouldNotUse = false;
|
|
48
|
-
/**
|
|
49
|
-
* Handler to be called when the button is clicked by a user.
|
|
50
|
-
*
|
|
51
|
-
* Will also block the emission of the event if `isDisabled` is true.
|
|
52
|
-
*/
|
|
53
|
-
this.onClick = new core_1.EventEmitter();
|
|
54
|
-
this._inputValue = 'some value';
|
|
55
|
-
this.focus = false;
|
|
56
|
-
/** @ignore */
|
|
57
|
-
this.ignoredProperty = 'Ignore me';
|
|
58
|
-
/** Public value. */
|
|
59
|
-
this.internalProperty = 'Public hello';
|
|
60
|
-
/** Private value. */
|
|
61
|
-
this._value = 'Private hello';
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* This is an internal method that we don't want to document and have added the `ignore`
|
|
65
|
-
* annotation to.
|
|
66
|
-
*
|
|
67
|
-
* @ignore
|
|
68
|
-
*/
|
|
69
|
-
handleClick(event) {
|
|
70
|
-
event.stopPropagation();
|
|
71
|
-
if (!this.isDisabled) {
|
|
72
|
-
this.onClick.emit(event);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/** Setter for `inputValue` that is also an `@Input`. */
|
|
76
|
-
set inputValue(value) {
|
|
77
|
-
this._inputValue = value;
|
|
78
|
-
}
|
|
79
|
-
/** Getter for `inputValue`. */
|
|
80
|
-
get inputValue() {
|
|
81
|
-
return this._inputValue;
|
|
82
|
-
}
|
|
83
|
-
onClickListener(btn) {
|
|
84
|
-
console.log('button', btn);
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Returns all the CSS classes for the button.
|
|
88
|
-
*
|
|
89
|
-
* @ignore
|
|
90
|
-
*/
|
|
91
|
-
get classes() {
|
|
92
|
-
return [this.appearance, this.size]
|
|
93
|
-
.filter((_class) => !!_class)
|
|
94
|
-
.map((_class) => `btn-${_class}`);
|
|
95
|
-
}
|
|
96
|
-
/** Set the private value. */
|
|
97
|
-
set value(value) {
|
|
98
|
-
this._value = `${value}`;
|
|
99
|
-
}
|
|
100
|
-
/** Get the private value. */
|
|
101
|
-
get value() {
|
|
102
|
-
return this._value;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* An internal calculation method which adds `x` and `y` together.
|
|
106
|
-
*
|
|
107
|
-
* @param x Some number you'd like to use.
|
|
108
|
-
* @param y Some other number or string you'd like to use, will have `parseInt()` applied before
|
|
109
|
-
* calculation.
|
|
110
|
-
*/
|
|
111
|
-
calc(x, y) {
|
|
112
|
-
return x + parseInt(`${y}`, 10);
|
|
113
|
-
}
|
|
114
|
-
/** A public method using an interface. */
|
|
115
|
-
publicMethod(things) {
|
|
116
|
-
console.log(things);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* A protected method.
|
|
120
|
-
*
|
|
121
|
-
* @param id Some `id`.
|
|
122
|
-
*/
|
|
123
|
-
protectedMethod(id) {
|
|
124
|
-
console.log(id);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* A private method.
|
|
128
|
-
*
|
|
129
|
-
* @param password Some `password`.
|
|
130
|
-
*/
|
|
131
|
-
privateMethod(password) {
|
|
132
|
-
console.log(password);
|
|
133
|
-
}
|
|
134
|
-
set item(item) {
|
|
135
|
-
this.processedItem = item;
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
exports.InputComponent = InputComponent;
|
|
139
|
-
__decorate([
|
|
140
|
-
(0, core_1.ViewChild)('buttonRef', { static: false }),
|
|
141
|
-
__metadata("design:type", core_1.ElementRef)
|
|
142
|
-
], InputComponent.prototype, "buttonRef", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, core_1.Input)(),
|
|
145
|
-
__metadata("design:type", String)
|
|
146
|
-
], InputComponent.prototype, "appearance", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
(0, core_1.Input)(),
|
|
149
|
-
__metadata("design:type", String)
|
|
150
|
-
], InputComponent.prototype, "accent", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
(0, core_1.Input)(),
|
|
153
|
-
__metadata("design:type", Object)
|
|
154
|
-
], InputComponent.prototype, "isDisabled", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
(0, core_1.Input)(),
|
|
157
|
-
__metadata("design:type", String)
|
|
158
|
-
], InputComponent.prototype, "label", void 0);
|
|
159
|
-
__decorate([
|
|
160
|
-
(0, core_1.Input)(),
|
|
161
|
-
__metadata("design:type", String)
|
|
162
|
-
], InputComponent.prototype, "size", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
(0, core_1.Input)(),
|
|
165
|
-
__metadata("design:type", Object)
|
|
166
|
-
], InputComponent.prototype, "someDataObject", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
(0, core_1.Input)(),
|
|
169
|
-
__metadata("design:type", Object)
|
|
170
|
-
], InputComponent.prototype, "somethingYouShouldNotUse", void 0);
|
|
171
|
-
__decorate([
|
|
172
|
-
(0, core_1.Output)(),
|
|
173
|
-
__metadata("design:type", Object)
|
|
174
|
-
], InputComponent.prototype, "onClick", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
(0, core_1.Input)(),
|
|
177
|
-
__metadata("design:type", String),
|
|
178
|
-
__metadata("design:paramtypes", [String])
|
|
179
|
-
], InputComponent.prototype, "inputValue", null);
|
|
180
|
-
__decorate([
|
|
181
|
-
(0, core_1.HostListener)('click', ['$event.target']),
|
|
182
|
-
__metadata("design:type", Function),
|
|
183
|
-
__metadata("design:paramtypes", [Object]),
|
|
184
|
-
__metadata("design:returntype", void 0)
|
|
185
|
-
], InputComponent.prototype, "onClickListener", null);
|
|
186
|
-
__decorate([
|
|
187
|
-
(0, core_1.HostBinding)('class.focused'),
|
|
188
|
-
__metadata("design:type", Object)
|
|
189
|
-
], InputComponent.prototype, "focus", void 0);
|
|
190
|
-
__decorate([
|
|
191
|
-
(0, core_1.Input)('showKeyAlias'),
|
|
192
|
-
__metadata("design:type", Object)
|
|
193
|
-
], InputComponent.prototype, "showKey", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
(0, core_1.Input)(),
|
|
196
|
-
__metadata("design:type", Array),
|
|
197
|
-
__metadata("design:paramtypes", [Array])
|
|
198
|
-
], InputComponent.prototype, "item", null);
|
|
199
|
-
exports.InputComponent = InputComponent = __decorate([
|
|
200
|
-
(0, core_1.Component)({
|
|
201
|
-
selector: 'doc-button',
|
|
202
|
-
template: '<button>{{ label }}</button>',
|
|
203
|
-
})
|
|
204
|
-
], InputComponent);
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
-
};
|
|
9
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11
|
-
};
|
|
12
|
-
import { Component, EventEmitter, HostBinding, HostListener, Input, Output, ViewChild, ElementRef, } from '@angular/core';
|
|
13
|
-
export const exportedConstant = 'An exported constant';
|
|
14
|
-
export var ButtonAccent;
|
|
15
|
-
(function (ButtonAccent) {
|
|
16
|
-
ButtonAccent["Normal"] = "Normal";
|
|
17
|
-
ButtonAccent["High"] = "High";
|
|
18
|
-
})(ButtonAccent || (ButtonAccent = {}));
|
|
19
|
-
/**
|
|
20
|
-
* This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular.
|
|
21
|
-
*
|
|
22
|
-
* It supports [markdown](https://en.wikipedia.org/wiki/Markdown), so you can embed formatted text,
|
|
23
|
-
* like **bold**, _italic_, and `inline code`.> How you like dem apples?! It's never been easier to
|
|
24
|
-
* document all your components.
|
|
25
|
-
*
|
|
26
|
-
* @string Hello world
|
|
27
|
-
* @link [Example](http://example.com)
|
|
28
|
-
* @code `ThingThing`
|
|
29
|
-
* @html <span class="badge">aaa</span>
|
|
30
|
-
*/
|
|
31
|
-
let InputComponent = class InputComponent {
|
|
32
|
-
constructor() {
|
|
33
|
-
/** Appearance style of the button. */
|
|
34
|
-
this.appearance = 'secondary';
|
|
35
|
-
/** Sets the button to a disabled state. */
|
|
36
|
-
this.isDisabled = false;
|
|
37
|
-
/** Size of the button. */
|
|
38
|
-
this.size = 'medium';
|
|
39
|
-
/**
|
|
40
|
-
* Some input you shouldn't use.
|
|
41
|
-
*
|
|
42
|
-
* @deprecated
|
|
43
|
-
*/
|
|
44
|
-
this.somethingYouShouldNotUse = false;
|
|
45
|
-
/**
|
|
46
|
-
* Handler to be called when the button is clicked by a user.
|
|
47
|
-
*
|
|
48
|
-
* Will also block the emission of the event if `isDisabled` is true.
|
|
49
|
-
*/
|
|
50
|
-
this.onClick = new EventEmitter();
|
|
51
|
-
this._inputValue = 'some value';
|
|
52
|
-
this.focus = false;
|
|
53
|
-
/** @ignore */
|
|
54
|
-
this.ignoredProperty = 'Ignore me';
|
|
55
|
-
/** Public value. */
|
|
56
|
-
this.internalProperty = 'Public hello';
|
|
57
|
-
/** Private value. */
|
|
58
|
-
this._value = 'Private hello';
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* This is an internal method that we don't want to document and have added the `ignore`
|
|
62
|
-
* annotation to.
|
|
63
|
-
*
|
|
64
|
-
* @ignore
|
|
65
|
-
*/
|
|
66
|
-
handleClick(event) {
|
|
67
|
-
event.stopPropagation();
|
|
68
|
-
if (!this.isDisabled) {
|
|
69
|
-
this.onClick.emit(event);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/** Setter for `inputValue` that is also an `@Input`. */
|
|
73
|
-
set inputValue(value) {
|
|
74
|
-
this._inputValue = value;
|
|
75
|
-
}
|
|
76
|
-
/** Getter for `inputValue`. */
|
|
77
|
-
get inputValue() {
|
|
78
|
-
return this._inputValue;
|
|
79
|
-
}
|
|
80
|
-
onClickListener(btn) {
|
|
81
|
-
console.log('button', btn);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Returns all the CSS classes for the button.
|
|
85
|
-
*
|
|
86
|
-
* @ignore
|
|
87
|
-
*/
|
|
88
|
-
get classes() {
|
|
89
|
-
return [this.appearance, this.size]
|
|
90
|
-
.filter((_class) => !!_class)
|
|
91
|
-
.map((_class) => `btn-${_class}`);
|
|
92
|
-
}
|
|
93
|
-
/** Set the private value. */
|
|
94
|
-
set value(value) {
|
|
95
|
-
this._value = `${value}`;
|
|
96
|
-
}
|
|
97
|
-
/** Get the private value. */
|
|
98
|
-
get value() {
|
|
99
|
-
return this._value;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* An internal calculation method which adds `x` and `y` together.
|
|
103
|
-
*
|
|
104
|
-
* @param x Some number you'd like to use.
|
|
105
|
-
* @param y Some other number or string you'd like to use, will have `parseInt()` applied before
|
|
106
|
-
* calculation.
|
|
107
|
-
*/
|
|
108
|
-
calc(x, y) {
|
|
109
|
-
return x + parseInt(`${y}`, 10);
|
|
110
|
-
}
|
|
111
|
-
/** A public method using an interface. */
|
|
112
|
-
publicMethod(things) {
|
|
113
|
-
console.log(things);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* A protected method.
|
|
117
|
-
*
|
|
118
|
-
* @param id Some `id`.
|
|
119
|
-
*/
|
|
120
|
-
protectedMethod(id) {
|
|
121
|
-
console.log(id);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* A private method.
|
|
125
|
-
*
|
|
126
|
-
* @param password Some `password`.
|
|
127
|
-
*/
|
|
128
|
-
privateMethod(password) {
|
|
129
|
-
console.log(password);
|
|
130
|
-
}
|
|
131
|
-
set item(item) {
|
|
132
|
-
this.processedItem = item;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
__decorate([
|
|
136
|
-
ViewChild('buttonRef', { static: false }),
|
|
137
|
-
__metadata("design:type", ElementRef)
|
|
138
|
-
], InputComponent.prototype, "buttonRef", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
Input(),
|
|
141
|
-
__metadata("design:type", String)
|
|
142
|
-
], InputComponent.prototype, "appearance", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
Input(),
|
|
145
|
-
__metadata("design:type", String)
|
|
146
|
-
], InputComponent.prototype, "accent", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
Input(),
|
|
149
|
-
__metadata("design:type", Object)
|
|
150
|
-
], InputComponent.prototype, "isDisabled", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
Input(),
|
|
153
|
-
__metadata("design:type", String)
|
|
154
|
-
], InputComponent.prototype, "label", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
Input(),
|
|
157
|
-
__metadata("design:type", String)
|
|
158
|
-
], InputComponent.prototype, "size", void 0);
|
|
159
|
-
__decorate([
|
|
160
|
-
Input(),
|
|
161
|
-
__metadata("design:type", Object)
|
|
162
|
-
], InputComponent.prototype, "someDataObject", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
Input(),
|
|
165
|
-
__metadata("design:type", Object)
|
|
166
|
-
], InputComponent.prototype, "somethingYouShouldNotUse", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
Output(),
|
|
169
|
-
__metadata("design:type", Object)
|
|
170
|
-
], InputComponent.prototype, "onClick", void 0);
|
|
171
|
-
__decorate([
|
|
172
|
-
Input(),
|
|
173
|
-
__metadata("design:type", String),
|
|
174
|
-
__metadata("design:paramtypes", [String])
|
|
175
|
-
], InputComponent.prototype, "inputValue", null);
|
|
176
|
-
__decorate([
|
|
177
|
-
HostListener('click', ['$event.target']),
|
|
178
|
-
__metadata("design:type", Function),
|
|
179
|
-
__metadata("design:paramtypes", [Object]),
|
|
180
|
-
__metadata("design:returntype", void 0)
|
|
181
|
-
], InputComponent.prototype, "onClickListener", null);
|
|
182
|
-
__decorate([
|
|
183
|
-
HostBinding('class.focused'),
|
|
184
|
-
__metadata("design:type", Object)
|
|
185
|
-
], InputComponent.prototype, "focus", void 0);
|
|
186
|
-
__decorate([
|
|
187
|
-
Input('showKeyAlias'),
|
|
188
|
-
__metadata("design:type", Object)
|
|
189
|
-
], InputComponent.prototype, "showKey", void 0);
|
|
190
|
-
__decorate([
|
|
191
|
-
Input(),
|
|
192
|
-
__metadata("design:type", Array),
|
|
193
|
-
__metadata("design:paramtypes", [Array])
|
|
194
|
-
], InputComponent.prototype, "item", null);
|
|
195
|
-
InputComponent = __decorate([
|
|
196
|
-
Component({
|
|
197
|
-
selector: 'doc-button',
|
|
198
|
-
template: '<button>{{ label }}</button>',
|
|
199
|
-
})
|
|
200
|
-
], InputComponent);
|
|
201
|
-
export { InputComponent };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|