@aaamb/ngx-design-system 1.3.5 → 1.3.6
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/.editorconfig +17 -0
- package/.nvmrc +1 -0
- package/.postcssrc.json +5 -0
- package/.storybook/main.ts +20 -0
- package/.storybook/preview.ts +23 -0
- package/.storybook/storybook.css +1 -0
- package/.storybook/tsconfig.json +19 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +10 -0
- package/LOCAL_DEVELOPMENT.md +129 -0
- package/angular.json +74 -0
- package/bitbucket-pipelines.yml +41 -0
- package/iac/bin/app.ts +42 -0
- package/iac/cdk.json +82 -0
- package/iac/lib/config/environments.ts +19 -0
- package/iac/lib/config/types.ts +13 -0
- package/iac/lib/stacks/certificate-stack.ts +34 -0
- package/iac/lib/stacks/frontend-stack.ts +120 -0
- package/iac/lib/stacks/index.ts +2 -0
- package/iac/package-lock.json +726 -0
- package/iac/package.json +25 -0
- package/iac/tsconfig.json +24 -0
- package/ng-package.json +8 -0
- package/package.json +58 -14
- package/src/components/button/button-green.stories.ts +101 -0
- package/src/components/button/button-text.stories.ts +105 -0
- package/src/components/button/button-white.stories.ts +105 -0
- package/src/components/button/button.component.stories.ts +91 -0
- package/src/components/button/button.component.ts +93 -0
- package/src/components/checkbox/checkbox.component.html +30 -0
- package/src/components/checkbox/checkbox.component.stories.ts +183 -0
- package/src/components/checkbox/checkbox.component.ts +211 -0
- package/src/components/datepicker-selector/datepicker-selector.component.html +103 -0
- package/src/components/datepicker-selector/datepicker-selector.component.stories.ts +69 -0
- package/src/components/datepicker-selector/datepicker-selector.component.ts +287 -0
- package/src/components/error-message/error-message.component.html +3 -0
- package/src/components/error-message/error-message.component.ts +13 -0
- package/src/components/filter-button/filter-button.component.html +286 -0
- package/src/components/filter-button/filter-button.component.stories.ts +123 -0
- package/src/components/filter-button/filter-button.component.ts +582 -0
- package/src/components/icon/icon.component.ts +20 -0
- package/src/components/icon/icon.html +1333 -0
- package/src/components/icon/icon.stories.ts +49 -0
- package/src/components/icon/icons-list.stories.ts +42 -0
- package/src/components/input/input.component.stories.ts +101 -0
- package/src/components/input/input.component.ts +317 -0
- package/src/components/input/input.html +160 -0
- package/src/components/input-datepicker/input-datepicker.component.ts +356 -0
- package/src/components/input-datepicker/input-datepicker.html +69 -0
- package/src/components/input-datepicker/input-datepicker.stories.ts +99 -0
- package/src/components/input-rangepicker/input-rangepicker.component.ts +365 -0
- package/src/components/input-rangepicker/input-rangepicker.html +54 -0
- package/src/components/input-rangepicker/input-rangepicker.stories.ts +88 -0
- package/src/components/input-weekpicker/input-weekpicker.component.ts +417 -0
- package/src/components/input-weekpicker/input-weekpicker.html +54 -0
- package/src/components/input-weekpicker/input-weekpicker.stories.ts +103 -0
- package/src/components/label/label.component.html +20 -0
- package/src/components/label/label.component.ts +22 -0
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.html +32 -0
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.stories.ts +57 -0
- package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.ts +48 -0
- package/src/components/modals/feedback-modal/feedback-modal.component.html +118 -0
- package/src/components/modals/feedback-modal/feedback-modal.component.stories.ts +93 -0
- package/src/components/modals/feedback-modal/feedback-modal.component.ts +187 -0
- package/src/components/modals/help-modal/help-modal.component.html +32 -0
- package/src/components/modals/help-modal/help-modal.component.stories.ts +76 -0
- package/src/components/modals/help-modal/help-modal.component.ts +54 -0
- package/src/components/modals/information-modal/information-modal.component.html +24 -0
- package/src/components/modals/information-modal/information-modal.component.stories.ts +62 -0
- package/src/components/modals/information-modal/information-modal.component.ts +35 -0
- package/src/components/modals/main-modal/main-modal.component.html +85 -0
- package/src/components/modals/main-modal/main-modal.component.stories.ts +127 -0
- package/src/components/modals/main-modal/main-modal.component.ts +85 -0
- package/src/components/modals/notification-modal/notification-modal.component.html +22 -0
- package/src/components/modals/notification-modal/notification-modal.component.stories.ts +59 -0
- package/src/components/modals/notification-modal/notification-modal.component.ts +37 -0
- package/src/components/selectors/multiple-selector/multiple-selector.component.html +51 -0
- package/src/components/selectors/multiple-selector/multiple-selector.component.stories.ts +306 -0
- package/src/components/selectors/multiple-selector/multiple-selector.component.ts +308 -0
- package/src/components/selectors/single-selector/single-selector.component.html +46 -0
- package/src/components/selectors/single-selector/single-selector.component.stories.ts +294 -0
- package/src/components/selectors/single-selector/single-selector.component.ts +239 -0
- package/src/components/side-nav/side-nav.component.stories.ts +157 -0
- package/src/components/side-nav/side-nav.component.ts +306 -0
- package/src/components/snackbar/snackbar.component.ts +150 -0
- package/src/components/snackbar/snackbar.html +21 -0
- package/src/components/snackbar/snackbar.stories.ts +51 -0
- package/src/components/state/state.component.ts +30 -0
- package/src/components/state/state.html +13 -0
- package/src/components/state/state.stories.ts +74 -0
- package/src/components/table/table.component.html +441 -0
- package/src/components/table/table.component.scss +28 -0
- package/src/components/table/table.component.stories.ts +655 -0
- package/src/components/table/table.component.ts +475 -0
- package/src/components/tabs/tabs.component.stories.ts +114 -0
- package/src/components/tabs/tabs.component.ts +69 -0
- package/src/core/types.ts +486 -0
- package/src/public-api.ts +23 -0
- package/tsconfig.json +37 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +13 -0
- package/fesm2022/aaamb-ngx-design-system.mjs +0 -4024
- package/fesm2022/aaamb-ngx-design-system.mjs.map +0 -1
- package/styles/compiled.css +0 -2
- package/types/aaamb-ngx-design-system.d.ts +0 -1132
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import * as acm from 'aws-cdk-lib/aws-certificatemanager';
|
|
3
|
+
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
|
|
4
|
+
import * as origins from 'aws-cdk-lib/aws-cloudfront-origins';
|
|
5
|
+
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
6
|
+
import * as route53 from 'aws-cdk-lib/aws-route53';
|
|
7
|
+
import * as route53Targets from 'aws-cdk-lib/aws-route53-targets';
|
|
8
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
9
|
+
import { Construct } from 'constructs';
|
|
10
|
+
import { EnvironmentConfig } from '../config/types';
|
|
11
|
+
|
|
12
|
+
interface FrontendStackProps extends cdk.StackProps {
|
|
13
|
+
envConfig: EnvironmentConfig;
|
|
14
|
+
cloudFrontCertificateArn: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class FrontendStack extends cdk.Stack {
|
|
18
|
+
public readonly bucketName: string;
|
|
19
|
+
public readonly distributionId: string;
|
|
20
|
+
public readonly cicdUserName: string;
|
|
21
|
+
|
|
22
|
+
constructor(scope: Construct, id: string, props: FrontendStackProps) {
|
|
23
|
+
super(scope, id, props);
|
|
24
|
+
|
|
25
|
+
const { envConfig, cloudFrontCertificateArn } = props;
|
|
26
|
+
|
|
27
|
+
const hostedZone = route53.HostedZone.fromHostedZoneAttributes(this, 'HostedZone', {
|
|
28
|
+
hostedZoneId: envConfig.hostedZoneId,
|
|
29
|
+
zoneName: envConfig.hostedZoneName,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const certificate = acm.Certificate.fromCertificateArn(
|
|
33
|
+
this,
|
|
34
|
+
'CloudFrontCertificate',
|
|
35
|
+
cloudFrontCertificateArn
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const bucket = new s3.Bucket(this, 'Bucket', {
|
|
39
|
+
bucketName: envConfig.frontend.bucketName,
|
|
40
|
+
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
|
|
41
|
+
versioned: true,
|
|
42
|
+
encryption: s3.BucketEncryption.S3_MANAGED,
|
|
43
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
44
|
+
autoDeleteObjects: true,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const oac = new cloudfront.S3OriginAccessControl(this, 'Oac', {
|
|
48
|
+
originAccessControlName: 'design-system-oac',
|
|
49
|
+
signing: cloudfront.Signing.SIGV4_ALWAYS,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const distribution = new cloudfront.Distribution(this, 'Distribution', {
|
|
53
|
+
domainNames: [`${envConfig.frontend.recordName}.${envConfig.baseDomain}`],
|
|
54
|
+
certificate,
|
|
55
|
+
defaultBehavior: {
|
|
56
|
+
origin: origins.S3BucketOrigin.withOriginAccessControl(bucket, {
|
|
57
|
+
originAccessControl: oac,
|
|
58
|
+
}),
|
|
59
|
+
viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
60
|
+
allowedMethods: cloudfront.AllowedMethods.ALLOW_GET_HEAD_OPTIONS,
|
|
61
|
+
cachedMethods: cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS,
|
|
62
|
+
compress: true,
|
|
63
|
+
cachePolicy: cloudfront.CachePolicy.CACHING_OPTIMIZED,
|
|
64
|
+
},
|
|
65
|
+
defaultRootObject: 'index.html',
|
|
66
|
+
enableIpv6: true,
|
|
67
|
+
minimumProtocolVersion: cloudfront.SecurityPolicyProtocol.TLS_V1_2_2021,
|
|
68
|
+
httpVersion: cloudfront.HttpVersion.HTTP2_AND_3,
|
|
69
|
+
priceClass: cloudfront.PriceClass.PRICE_CLASS_100,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
new route53.ARecord(this, 'AppRecord', {
|
|
73
|
+
zone: hostedZone,
|
|
74
|
+
recordName: envConfig.frontend.recordName,
|
|
75
|
+
target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const cicdUser = new iam.User(this, 'CicdUser', {
|
|
79
|
+
userName: 'design-system-cicd',
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
cicdUser.addToPolicy(
|
|
83
|
+
new iam.PolicyStatement({
|
|
84
|
+
actions: ['s3:PutObject', 's3:GetObject', 's3:DeleteObject', 's3:ListBucket', 's3:GetBucketLocation'],
|
|
85
|
+
resources: [bucket.bucketArn, `${bucket.bucketArn}/*`],
|
|
86
|
+
})
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
cicdUser.addToPolicy(
|
|
90
|
+
new iam.PolicyStatement({
|
|
91
|
+
actions: ['cloudfront:CreateInvalidation', 'cloudfront:GetInvalidation', 'cloudfront:ListInvalidations'],
|
|
92
|
+
resources: [`arn:aws:cloudfront::${this.account}:distribution/${distribution.distributionId}`],
|
|
93
|
+
})
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
this.bucketName = bucket.bucketName;
|
|
97
|
+
this.distributionId = distribution.distributionId;
|
|
98
|
+
this.cicdUserName = cicdUser.userName;
|
|
99
|
+
|
|
100
|
+
new cdk.CfnOutput(this, 'AppUrl', {
|
|
101
|
+
value: `https://${envConfig.frontend.recordName}.${envConfig.baseDomain}`,
|
|
102
|
+
exportName: 'design-system-app-url',
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
new cdk.CfnOutput(this, 'FrontendBucketName', {
|
|
106
|
+
value: this.bucketName,
|
|
107
|
+
exportName: 'design-system-frontend-bucket',
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
new cdk.CfnOutput(this, 'FrontendDistributionId', {
|
|
111
|
+
value: this.distributionId,
|
|
112
|
+
exportName: 'design-system-frontend-distribution-id',
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
new cdk.CfnOutput(this, 'FrontendCicdUserName', {
|
|
116
|
+
value: this.cicdUserName,
|
|
117
|
+
exportName: 'design-system-frontend-cicd-user',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|