@aaamb/ngx-design-system 1.3.9 → 1.4.1

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.
Files changed (108) hide show
  1. package/.editorconfig +17 -0
  2. package/.nvmrc +1 -0
  3. package/.postcssrc.json +5 -0
  4. package/.storybook/main.ts +20 -0
  5. package/.storybook/preview.ts +23 -0
  6. package/.storybook/storybook.css +1 -0
  7. package/.storybook/tsconfig.json +19 -0
  8. package/.vscode/extensions.json +4 -0
  9. package/.vscode/launch.json +20 -0
  10. package/.vscode/tasks.json +42 -0
  11. package/CHANGELOG.md +10 -0
  12. package/LOCAL_DEVELOPMENT.md +129 -0
  13. package/angular.json +74 -0
  14. package/bitbucket-pipelines.yml +41 -0
  15. package/iac/bin/app.ts +42 -0
  16. package/iac/cdk.json +82 -0
  17. package/iac/lib/config/environments.ts +19 -0
  18. package/iac/lib/config/types.ts +13 -0
  19. package/iac/lib/stacks/certificate-stack.ts +34 -0
  20. package/iac/lib/stacks/frontend-stack.ts +120 -0
  21. package/iac/lib/stacks/index.ts +2 -0
  22. package/iac/package-lock.json +726 -0
  23. package/iac/package.json +25 -0
  24. package/iac/tsconfig.json +24 -0
  25. package/ng-package.json +8 -0
  26. package/package.json +58 -14
  27. package/src/components/button/button-green.stories.ts +101 -0
  28. package/src/components/button/button-text.stories.ts +105 -0
  29. package/src/components/button/button-white.stories.ts +105 -0
  30. package/src/components/button/button.component.stories.ts +91 -0
  31. package/src/components/button/button.component.ts +93 -0
  32. package/src/components/checkbox/checkbox.component.html +30 -0
  33. package/src/components/checkbox/checkbox.component.stories.ts +183 -0
  34. package/src/components/checkbox/checkbox.component.ts +211 -0
  35. package/src/components/datepicker-selector/datepicker-selector.component.html +103 -0
  36. package/src/components/datepicker-selector/datepicker-selector.component.stories.ts +123 -0
  37. package/src/components/datepicker-selector/datepicker-selector.component.ts +337 -0
  38. package/src/components/error-message/error-message.component.html +3 -0
  39. package/src/components/error-message/error-message.component.ts +13 -0
  40. package/src/components/filter-button/filter-button.component.html +286 -0
  41. package/src/components/filter-button/filter-button.component.stories.ts +123 -0
  42. package/src/components/filter-button/filter-button.component.ts +582 -0
  43. package/src/components/icon/icon.component.ts +20 -0
  44. package/src/components/icon/icon.html +1424 -0
  45. package/src/components/icon/icon.stories.ts +49 -0
  46. package/src/components/icon/icons-list.stories.ts +42 -0
  47. package/src/components/input/input.component.stories.ts +101 -0
  48. package/src/components/input/input.component.ts +317 -0
  49. package/src/components/input/input.html +160 -0
  50. package/src/components/input-datepicker/input-datepicker.component.ts +356 -0
  51. package/src/components/input-datepicker/input-datepicker.html +69 -0
  52. package/src/components/input-datepicker/input-datepicker.stories.ts +99 -0
  53. package/src/components/input-rangepicker/input-rangepicker.component.ts +365 -0
  54. package/src/components/input-rangepicker/input-rangepicker.html +54 -0
  55. package/src/components/input-rangepicker/input-rangepicker.stories.ts +88 -0
  56. package/src/components/input-weekpicker/input-weekpicker.component.ts +417 -0
  57. package/src/components/input-weekpicker/input-weekpicker.html +54 -0
  58. package/src/components/input-weekpicker/input-weekpicker.stories.ts +103 -0
  59. package/src/components/label/label.component.html +20 -0
  60. package/src/components/label/label.component.ts +22 -0
  61. package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.html +32 -0
  62. package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.stories.ts +57 -0
  63. package/src/components/modals/delicate-confirmation-modal/delicate-confirmation-modal.component.ts +48 -0
  64. package/src/components/modals/feedback-modal/feedback-modal.component.html +118 -0
  65. package/src/components/modals/feedback-modal/feedback-modal.component.stories.ts +93 -0
  66. package/src/components/modals/feedback-modal/feedback-modal.component.ts +187 -0
  67. package/src/components/modals/help-modal/help-modal.component.html +32 -0
  68. package/src/components/modals/help-modal/help-modal.component.stories.ts +76 -0
  69. package/src/components/modals/help-modal/help-modal.component.ts +54 -0
  70. package/src/components/modals/information-modal/information-modal.component.html +24 -0
  71. package/src/components/modals/information-modal/information-modal.component.stories.ts +62 -0
  72. package/src/components/modals/information-modal/information-modal.component.ts +35 -0
  73. package/src/components/modals/main-modal/main-modal.component.html +85 -0
  74. package/src/components/modals/main-modal/main-modal.component.stories.ts +127 -0
  75. package/src/components/modals/main-modal/main-modal.component.ts +85 -0
  76. package/src/components/modals/notification-modal/notification-modal.component.html +22 -0
  77. package/src/components/modals/notification-modal/notification-modal.component.stories.ts +59 -0
  78. package/src/components/modals/notification-modal/notification-modal.component.ts +37 -0
  79. package/src/components/selectors/multiple-selector/multiple-selector.component.html +51 -0
  80. package/src/components/selectors/multiple-selector/multiple-selector.component.stories.ts +306 -0
  81. package/src/components/selectors/multiple-selector/multiple-selector.component.ts +308 -0
  82. package/src/components/selectors/single-selector/single-selector.component.html +46 -0
  83. package/src/components/selectors/single-selector/single-selector.component.stories.ts +294 -0
  84. package/src/components/selectors/single-selector/single-selector.component.ts +239 -0
  85. package/src/components/side-nav/side-nav.component.stories.ts +176 -0
  86. package/src/components/side-nav/side-nav.component.ts +325 -0
  87. package/src/components/snackbar/snackbar.component.ts +150 -0
  88. package/src/components/snackbar/snackbar.html +21 -0
  89. package/src/components/snackbar/snackbar.stories.ts +51 -0
  90. package/src/components/state/state.component.ts +30 -0
  91. package/src/components/state/state.html +13 -0
  92. package/src/components/state/state.stories.ts +74 -0
  93. package/src/components/table/table.component.html +466 -0
  94. package/src/components/table/table.component.scss +28 -0
  95. package/src/components/table/table.component.stories.ts +655 -0
  96. package/src/components/table/table.component.ts +475 -0
  97. package/src/components/tabs/tabs.component.stories.ts +114 -0
  98. package/src/components/tabs/tabs.component.ts +69 -0
  99. package/src/core/types.ts +494 -0
  100. package/src/public-api.ts +23 -0
  101. package/tsconfig.json +37 -0
  102. package/tsconfig.lib.json +17 -0
  103. package/tsconfig.lib.prod.json +9 -0
  104. package/tsconfig.spec.json +13 -0
  105. package/fesm2022/aaamb-ngx-design-system.mjs +0 -4075
  106. package/fesm2022/aaamb-ngx-design-system.mjs.map +0 -1
  107. package/styles/compiled.css +0 -2
  108. package/types/aaamb-ngx-design-system.d.ts +0 -1142
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export { CertificateStack } from './certificate-stack';
2
+ export { FrontendStack } from './frontend-stack';