@tech4good/angular-schematics 20.3.0 → 21.0.0
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/.agents/skills/publish-npm/SKILL.md +1 -1
- package/.agents/skills/publish-npm/eval.yaml +15 -0
- package/.agents/skills/publish-npm/fixtures/package-v21.json.template +8 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +1 -0
- package/.t4g/agent-memory.db +0 -0
- package/CHANGELOG.md +100 -26
- package/commitlint.config.js +15 -0
- package/contributing-docs/commit-message.md +3 -6
- package/package.json +10 -6
- package/src/collection.json +8 -0
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +1 -3
- package/src/component/index_spec.js +57 -4
- package/src/component/index_spec.js.map +1 -1
- package/src/entity/index.js +7 -1
- package/src/entity/index.js.map +1 -1
- package/src/entity/index_spec.js +108 -4
- package/src/entity/index_spec.js.map +1 -1
- package/src/guard/files/__name@dasherize__.guard.spec.ts.template +45 -0
- package/src/guard/files/__name@dasherize__.guard.ts.template +32 -0
- package/src/guard/index.d.ts +2 -0
- package/src/guard/index.js +38 -0
- package/src/guard/index.js.map +1 -0
- package/src/guard/index_spec.d.ts +1 -0
- package/src/guard/index_spec.js +64 -0
- package/src/guard/index_spec.js.map +1 -0
- package/src/guard/schema.json +46 -0
- package/src/ng-add/files/.firebaserc.template +3 -2
- package/src/ng-add/files/.github/workflows/angular-github-ci.yml.template +105 -39
- package/src/ng-add/files/.gitignore.template +1 -2
- package/src/ng-add/files/angular.json.template +1 -5
- package/src/ng-add/files/docs-infra/infrastructure-guide.md.template +390 -0
- package/src/ng-add/files/docs-infra/load-system-architecture.md.template +166 -0
- package/src/ng-add/files/docs-infra/querying-strategy.md.template +157 -0
- package/src/ng-add/files/docs-infra/stream-system-architecture.md.template +283 -0
- package/src/ng-add/files/eslint.config.js.template +4 -1
- package/src/ng-add/files/firebase.json.template +37 -0
- package/src/ng-add/files/firestore.rules.spec.ts.template +221 -0
- package/src/ng-add/files/firestore.rules.template +67 -0
- package/src/ng-add/files/jest.config.ts.template +6 -1
- package/src/ng-add/files/package.json.template +41 -31
- package/src/ng-add/files/setup-jest.ts.template +13 -5
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.spec.ts.template +76 -12
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.ts.template +1 -3
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.spec.ts.template +90 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.ts.template +1 -1
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.spec.ts.template +12 -17
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.component.ts.template +2 -4
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.spec.ts.template +40 -19
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.component.ts.template +3 -5
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.html.template +2 -2
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.spec.ts.template +108 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.ts.template +11 -11
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.html.template +6 -2
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.spec.ts.template +136 -19
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.ts.template +8 -5
- package/src/ng-add/files/src/app/app.component.html.template +1 -1
- package/src/ng-add/files/src/app/app.component.scss.template +10 -0
- package/src/ng-add/files/src/app/app.component.ts.template +1 -1
- package/src/ng-add/files/src/app/app.config.ts.template +11 -11
- package/src/ng-add/files/src/app/auth-routing.spec.ts.template +101 -0
- package/src/ng-add/files/src/app/core/analytics/log.service.ts.template +5 -8
- package/src/ng-add/files/src/app/core/analytics/time-analytics.service.spec.ts.template +140 -0
- package/src/ng-add/files/src/app/core/analytics/time-analytics.service.ts.template +25 -7
- package/src/ng-add/files/src/app/core/auth/guards/redirect-if-authenticated.guard.ts.template +1 -1
- package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.ts.template +1 -1
- package/src/ng-add/files/src/app/core/auth/guards/require-auth-and-consent.guard.ts.template +1 -1
- package/src/ng-add/files/src/app/core/auth/guards/require-auth.guard.ts.template +1 -1
- package/src/ng-add/files/src/app/core/firebase/cached-listeners.service.ts.template +229 -14
- package/src/ng-add/files/src/app/core/firebase/database.service.ts.template +1 -1
- package/src/ng-add/files/src/app/core/firebase/firebase.mock.service.ts.template +34 -9
- package/src/ng-add/files/src/app/core/firebase/firebase.service.ts.template +4 -4
- package/src/ng-add/files/src/app/core/firebase/query-logger.ts.template +11 -0
- package/src/ng-add/files/src/app/core/firebase/simulate-load.spec.ts.template +104 -0
- package/src/ng-add/files/src/app/core/firebase/simulate-stream.spec.ts.template +127 -0
- package/src/ng-add/files/src/app/core/firebase/simulation.mock.ts.template +38 -0
- package/src/ng-add/files/src/app/core/firebase/stream-multiplexer.ts.template +443 -0
- package/src/ng-add/files/src/app/core/store/app.store.spec.ts.template +920 -0
- package/src/ng-add/files/src/app/core/store/app.store.ts.template +303 -137
- package/src/ng-add/files/src/app/core/store/auth/auth.mock.ts.template +65 -23
- package/src/ng-add/files/src/app/core/store/auth/auth.store.ts.template +68 -67
- package/src/ng-add/files/src/app/core/store/user/user.mock.ts.template +46 -0
- package/src/ng-add/files/src/app/core/store/user-context/user-context.mock.ts.template +17 -0
- package/src/ng-add/files/src/app/core/testing/test-utils.ts.template +26 -0
- package/src/ng-add/files/src/app/first-time/consent/consent.component.html.template +3 -3
- package/src/ng-add/files/src/app/first-time/consent/consent.component.spec.ts.template +89 -13
- package/src/ng-add/files/src/app/first-time/consent/consent.component.ts.template +46 -17
- package/src/ng-add/files/src/app/first-time/consent/consent.guard.ts.template +1 -1
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.html.template +5 -63
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.scss.template +1 -94
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.spec.ts.template +150 -14
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.ts.template +15 -42
- package/src/ng-add/files/src/app/first-time/early-access/early-access.guard.ts.template +2 -2
- package/src/ng-add/files/src/app/first-time/early-access/early-access.model.ts.template +5 -0
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.html.template +42 -0
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.scss.template +96 -0
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.spec.ts.template +37 -0
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.ts.template +63 -0
- package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.html.template +16 -0
- package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.scss.template +7 -0
- package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.spec.ts.template +41 -0
- package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.ts.template +26 -0
- package/src/ng-add/files/src/app/first-time/first-time-routing.spec.ts.template +123 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.html.template +11 -4
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.scss.template +17 -4
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.ts.template +5 -5
- package/src/ng-add/files/src/app/first-time/landing/landing.component.html.template +1 -1
- package/src/ng-add/files/src/app/first-time/landing/landing.component.scss.template +0 -1
- package/src/ng-add/files/src/app/first-time/landing/landing.component.spec.ts.template +25 -17
- package/src/ng-add/files/src/app/first-time/landing/landing.component.ts.template +4 -12
- package/src/ng-add/files/src/app/first-time/landing/rotating-quotes/rotating-quotes.component.ts.template +1 -1
- package/src/ng-add/files/src/app/first-time/login/login.component.spec.ts.template +36 -16
- package/src/ng-add/files/src/app/first-time/login/login.component.ts.template +1 -1
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.spec.ts.template +11 -15
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.ts.template +1 -3
- package/src/ng-add/files/src/app/main/home/home.component.ts.template +1 -3
- package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.spec.ts.template +98 -0
- package/src/ng-add/files/src/app/shared/dev-status-bar/dev-status-bar.component.ts.template +9 -3
- package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.spec.ts.template +164 -0
- package/src/ng-add/files/src/app/shared/hint-visibility/hint-visibility.directive.ts.template +20 -18
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.spec.ts.template +38 -17
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.ts.template +1 -1
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +1 -1
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.spec.ts.template +49 -10
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.ts.template +5 -5
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.spec.ts.template +86 -0
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.ts.template +11 -9
- package/src/ng-add/files/src/environments/environment.prod.ts.template +1 -0
- package/src/ng-add/files/src/environments/environment.test.ts.template +1 -0
- package/src/ng-add/files/src/environments/environment.ts.template +2 -8
- package/src/ng-add/files/src/styles.scss.template +29 -1
- package/src/ng-add/files/tsconfig.app.json.template +6 -6
- package/src/ng-add/files/tsconfig.json.template +13 -8
- package/src/ng-add/files/tsconfig.spec.json.template +6 -5
- package/src/ng-add/index.js +19 -1
- package/src/ng-add/index.js.map +1 -1
- package/src/component/files/__name@dasherize__/__name@dasherize__.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-count-pill/admin-count-pill.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-counts/admin-user-counts.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/first-time/consent/consent.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/first-time/early-access/early-access.animations.ts.template +0 -10
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.animations.ts.template +0 -15
- package/src/ng-add/files/src/app/first-time/landing/landing.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.animations.ts.template +0 -4
- package/src/ng-add/files/src/app/main/home/home.animations.ts.template +0 -4
package/src/ng-add/files/src/app/first-time/early-access/early-access.component.html.template
CHANGED
|
@@ -5,78 +5,20 @@
|
|
|
5
5
|
<div class="text-section">
|
|
6
6
|
<!-- Core questions on motivation and desired value -->
|
|
7
7
|
@if (data.currentUser.accessState === AccessState.SUBMIT_INTEREST) {
|
|
8
|
-
<div
|
|
8
|
+
<div animate.enter="animate-fade-in">
|
|
9
9
|
<h1>Hello and Welcome! 👋</h1>
|
|
10
10
|
<p class="subtitle">Please help us understand your context and needs so that we know how to best support you!</p>
|
|
11
|
-
<form [
|
|
12
|
-
<div class="form-field-group">
|
|
13
|
-
<mat-label class="question">QUESTION_1 [What is your current role and what are you hoping to achieve?]</mat-label>
|
|
14
|
-
<mat-form-field class="question-one" appearance="outline">
|
|
15
|
-
<mat-label>QUESTION_1_SHORT_LABEL [Current role & goals]</mat-label>
|
|
16
|
-
<textarea #q1Text matInput cdkTextareaAutosize formControlName="questionOne" name="questionOne" required appHintVisibility [hintControl]="questionOne!" [hintSiblingControl]="questionTwo!" #q1Hint="hintVisibility"></textarea>
|
|
17
|
-
@if (q1Hint.showHint()) {
|
|
18
|
-
<mat-hint>
|
|
19
|
-
@if (q1Text.value?.length < 25) {
|
|
20
|
-
You've shared {{q1Text.value?.length || 0}} of 25 characters. If you could say a little more, that'd help us! 🙏
|
|
21
|
-
} @else {
|
|
22
|
-
Thank you! This helps us understand your context better! 🙏
|
|
23
|
-
}
|
|
24
|
-
</mat-hint>
|
|
25
|
-
}
|
|
26
|
-
</mat-form-field>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="form-field-group">
|
|
29
|
-
<mat-label class="question">QUESTION_2 [What is the biggest hurdle preventing you from achieving this right now?]</mat-label>
|
|
30
|
-
<mat-form-field class="question-two" appearance="outline">
|
|
31
|
-
<mat-label>QUESTION_2_SHORT_LABEL [Biggest hurdle]</mat-label>
|
|
32
|
-
<textarea #q2Text matInput cdkTextareaAutosize formControlName="questionTwo" required appHintVisibility [hintControl]="questionTwo!" [hintSiblingControl]="questionOne!" #q2Hint="hintVisibility"></textarea>
|
|
33
|
-
@if (q2Hint.showHint() && questionOne?.valid) {
|
|
34
|
-
<mat-hint>
|
|
35
|
-
@if (q2Text.value?.length < 50) {
|
|
36
|
-
You've shared {{q2Text.value?.length || 0}} of 50 characters. Knowing your hurdles helps us build the right tools!
|
|
37
|
-
} @else {
|
|
38
|
-
Thank you! We're excited to see how we can help clear these hurdles.
|
|
39
|
-
}
|
|
40
|
-
</mat-hint>
|
|
41
|
-
}
|
|
42
|
-
</mat-form-field>
|
|
43
|
-
</div>
|
|
44
|
-
<button type="submit" class="btn continue-btn" [disabled]="surveyForm.invalid || loading()">
|
|
45
|
-
@if (loading()) {
|
|
46
|
-
Submitting...
|
|
47
|
-
} @else {
|
|
48
|
-
Submit and Continue
|
|
49
|
-
<img src="https://icongr.am/feather/arrow-right.svg?size=20&color=B2B6C7">
|
|
50
|
-
}
|
|
51
|
-
</button>
|
|
52
|
-
</form>
|
|
11
|
+
<app-survey-form [loading]="loading()" (submitSurvey)="submitInterest($event)"></app-survey-form>
|
|
53
12
|
</div>
|
|
54
13
|
} @else if (data.currentUser.accessState === AccessState.WAITING) {
|
|
55
14
|
<!-- Waiting list position and path for going getting access early -->
|
|
56
15
|
@let position = positionText$ | async;
|
|
57
16
|
@let total = totalWaiting$ | async;
|
|
58
|
-
<
|
|
59
|
-
@if (position && total) {
|
|
60
|
-
<h1 class="waitlist-header">
|
|
61
|
-
You are <span class="your-position">{{ position }}</span> of {{ total }} on the waitlist
|
|
62
|
-
</h1>
|
|
63
|
-
} @else {
|
|
64
|
-
<h1 class="waitlist-header">
|
|
65
|
-
You are on the waitlist!
|
|
66
|
-
</h1>
|
|
67
|
-
}
|
|
68
|
-
<p>Thanks for signing up! We're personally onboarding our first cohort of users
|
|
69
|
-
to ensure we understand your context deeply and can provide a delightful experience. We'll be in touch soon!
|
|
70
|
-
😊
|
|
71
|
-
</p>
|
|
72
|
-
<p>If you would really benefit from getting off the waitlist faster, send {{
|
|
73
|
-
outreachLeadName }} an email at <a [href]="'mailto:' + outreachLeadEmail">{{ outreachLeadEmail }}</a>
|
|
74
|
-
explaining and we'll see what we can do!</p>
|
|
75
|
-
</div>
|
|
17
|
+
<app-waitlist-view [positionText]="position" [totalWaiting]="total" [outreachLeadName]="outreachLeadName" [outreachLeadEmail]="outreachLeadEmail"></app-waitlist-view>
|
|
76
18
|
}
|
|
77
19
|
</div>
|
|
78
|
-
<div
|
|
79
|
-
<img src="/images/abstract.png" alt="Abstract
|
|
20
|
+
<div animate.enter="animate-fade-in" class="survey-graphic">
|
|
21
|
+
<img src="/images/abstract.png" alt="Abstract survey graphic" />
|
|
80
22
|
</div>
|
|
81
23
|
</div>
|
|
82
24
|
</div>
|
package/src/ng-add/files/src/app/first-time/early-access/early-access.component.scss.template
CHANGED
|
@@ -33,49 +33,6 @@
|
|
|
33
33
|
color: #6e84f8;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.continue-btn {
|
|
37
|
-
margin: 18px 15px 15px 0;
|
|
38
|
-
border: 1px solid #8c9fff;
|
|
39
|
-
background-color: #6e84f8;
|
|
40
|
-
color: #f1f3ff;
|
|
41
|
-
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
|
|
42
|
-
border-radius: 6px;
|
|
43
|
-
font-weight: 200;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
font-size: 1.1em;
|
|
47
|
-
padding: 10px 22px 10px;
|
|
48
|
-
transition: color 0.8s ease, border 0.8s ease;
|
|
49
|
-
|
|
50
|
-
>img {
|
|
51
|
-
margin: 0 3px 0 2px;
|
|
52
|
-
transition: margin 0.2s ease;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&[disabled] {
|
|
56
|
-
background-color: white;
|
|
57
|
-
border: 1px solid #d8d8d8;
|
|
58
|
-
color: #b2b6c7;
|
|
59
|
-
box-shadow: none;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:hover {
|
|
63
|
-
>img {
|
|
64
|
-
margin: 0 0 0 5px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&[disabled] {
|
|
68
|
-
>img {
|
|
69
|
-
margin: 0 3px 0 2px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:focus {
|
|
75
|
-
outline: 0;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
36
|
.subtitle {
|
|
80
37
|
color: #888;
|
|
81
38
|
font-size: 1.1rem;
|
|
@@ -83,52 +40,6 @@
|
|
|
83
40
|
margin-bottom: 30px;
|
|
84
41
|
}
|
|
85
42
|
|
|
86
|
-
form {
|
|
87
|
-
margin-top: 1em;
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
align-items: flex-start;
|
|
91
|
-
|
|
92
|
-
.checkbox-error {
|
|
93
|
-
font-size: 0.75rem;
|
|
94
|
-
font-weight: 400;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.form-field-group {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
width: 100%;
|
|
101
|
-
margin-bottom: 20px;
|
|
102
|
-
|
|
103
|
-
.checkbox-group {
|
|
104
|
-
display: flex;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.question {
|
|
109
|
-
margin-bottom: 10px;
|
|
110
|
-
font-weight: 600;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
mat-form-field {
|
|
114
|
-
width: 100%;
|
|
115
|
-
|
|
116
|
-
::ng-deep .mdc-text-field--outlined {
|
|
117
|
-
background-color: #ffffff;
|
|
118
|
-
border-radius: 4px;
|
|
119
|
-
--mdc-outlined-text-field-focus-outline-color: #6e84f8;
|
|
120
|
-
--mdc-outlined-text-field-focus-label-text-color: #6e84f8;
|
|
121
|
-
--mdc-outlined-text-field-caret-color: #6e84f8;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
button {
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
margin-top: 30px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
43
|
.content-split {
|
|
133
44
|
display: flex;
|
|
134
45
|
flex-direction: row;
|
|
@@ -147,11 +58,7 @@
|
|
|
147
58
|
}
|
|
148
59
|
}
|
|
149
60
|
|
|
150
|
-
.
|
|
151
|
-
color: #6e84f8;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.mentorship-graphic {
|
|
61
|
+
.survey-graphic {
|
|
155
62
|
flex: 1;
|
|
156
63
|
display: flex;
|
|
157
64
|
justify-content: center;
|
package/src/ng-add/files/src/app/first-time/early-access/early-access.component.spec.ts.template
CHANGED
|
@@ -1,40 +1,176 @@
|
|
|
1
|
-
import { render } from '@testing-library/angular';
|
|
1
|
+
import { render, screen, waitFor } from '@testing-library/angular';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
+
import { Provider } from '@angular/core';
|
|
6
|
+
import { Timestamp } from '@angular/fire/firestore';
|
|
7
|
+
import { of } from 'rxjs';
|
|
3
8
|
|
|
4
9
|
import { EarlyAccessComponent } from './early-access.component';
|
|
5
10
|
import { DATABASE_SERVICE } from 'src/app/core/firebase/database.service';
|
|
6
11
|
import { FirebaseMockService } from 'src/app/core/firebase/firebase.mock.service';
|
|
7
|
-
import { BatchWriteMockService } from 'src/app/core/store/batch-write.mock.service';
|
|
8
12
|
import { BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
|
|
13
|
+
import { BatchWriteMockService } from 'src/app/core/store/batch-write.mock.service';
|
|
9
14
|
import { AuthStore } from 'src/app/core/store/auth/auth.store';
|
|
10
15
|
import { AuthLoggedInMockDB } from 'src/app/core/store/auth/auth.mock';
|
|
16
|
+
import { UserStore } from 'src/app/core/store/user/user.store';
|
|
17
|
+
import { UserContextStore } from 'src/app/core/store/user-context/user-context.store';
|
|
18
|
+
import { AccessState } from 'src/app/core/store/user/user.model';
|
|
19
|
+
import { provideFirebaseMock } from 'src/app/core/firebase/firebase.mock.service';
|
|
20
|
+
import { USER_DB } from 'src/app/core/store/user/user.mock';
|
|
11
21
|
|
|
12
|
-
/** Sets up the testing environment for EarlyAccessComponent using render
|
|
13
|
-
async function setup() {
|
|
22
|
+
/** Sets up the testing environment for EarlyAccessComponent using render. */
|
|
23
|
+
async function setup(providers: Provider[] = [], seededUsers: any[] = []) {
|
|
14
24
|
const user = userEvent.setup();
|
|
15
|
-
const
|
|
25
|
+
const snackBarMock = {
|
|
26
|
+
open: jest.fn().mockReturnValue({
|
|
27
|
+
onAction: () => of(),
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
const routerMock = {
|
|
31
|
+
navigate: jest.fn(),
|
|
32
|
+
routerState: { snapshot: {} },
|
|
33
|
+
};
|
|
34
|
+
const activatedRouteMock = {
|
|
35
|
+
snapshot: {},
|
|
36
|
+
};
|
|
16
37
|
|
|
17
38
|
const view = await render(EarlyAccessComponent, {
|
|
18
|
-
imports: [],
|
|
19
39
|
providers: [
|
|
20
|
-
{
|
|
21
|
-
|
|
40
|
+
...provideFirebaseMock({
|
|
41
|
+
users: seededUsers,
|
|
42
|
+
}),
|
|
43
|
+
{ provide: MatSnackBar, useValue: snackBarMock },
|
|
22
44
|
{ provide: BATCH_WRITE_SERVICE, useClass: BatchWriteMockService },
|
|
45
|
+
{ provide: Router, useValue: routerMock },
|
|
46
|
+
{ provide: ActivatedRoute, useValue: activatedRouteMock },
|
|
47
|
+
{ provide: AuthStore, useClass: AuthLoggedInMockDB },
|
|
48
|
+
UserStore,
|
|
49
|
+
UserContextStore,
|
|
50
|
+
...providers,
|
|
23
51
|
],
|
|
24
|
-
componentInputs: {},
|
|
25
|
-
on: {},
|
|
26
52
|
});
|
|
27
53
|
|
|
28
54
|
return {
|
|
29
55
|
user,
|
|
30
56
|
fixture: view.fixture,
|
|
31
|
-
|
|
57
|
+
routerMock,
|
|
58
|
+
snackBarMock,
|
|
59
|
+
batchWriteMock: view.fixture.debugElement.injector.get(BATCH_WRITE_SERVICE) as any,
|
|
32
60
|
};
|
|
33
61
|
}
|
|
34
62
|
|
|
35
63
|
describe('EarlyAccessComponent', () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
64
|
+
beforeEach(() => {
|
|
65
|
+
// Default mock user to submit interest state
|
|
66
|
+
USER_DB[0].accessState = AccessState.SUBMIT_INTEREST;
|
|
67
|
+
USER_DB[0].joinedWaitlistAt = undefined;
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should render the interest survey form when access state is SUBMIT_INTEREST', async () => {
|
|
71
|
+
await setup();
|
|
72
|
+
|
|
73
|
+
expect(screen.getByText(/Please help us understand/i)).toBeVisible();
|
|
74
|
+
expect(screen.getByRole('button', { name: /Submit/i })).toBeDisabled();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should enforce minLength validators on survey inputs', async () => {
|
|
78
|
+
const { user } = await setup();
|
|
79
|
+
|
|
80
|
+
const textareas = screen.getAllByRole('textbox');
|
|
81
|
+
const q1Input = textareas[0];
|
|
82
|
+
const topicsInput = textareas[1];
|
|
83
|
+
const submitBtn = screen.getByRole('button', { name: /Submit/i });
|
|
84
|
+
|
|
85
|
+
// Under minLength 25 for first textarea
|
|
86
|
+
await user.type(q1Input, 'too short');
|
|
87
|
+
// Under minLength 50 for second textarea
|
|
88
|
+
await user.type(topicsInput, 'this is also way too short to meet the validator requirement.');
|
|
89
|
+
|
|
90
|
+
expect(submitBtn).toBeDisabled();
|
|
91
|
+
|
|
92
|
+
// Make first valid (25+ chars)
|
|
93
|
+
await user.clear(q1Input);
|
|
94
|
+
await user.type(q1Input, 'This input has more than twenty five characters now.');
|
|
95
|
+
// Make second valid (50+ chars)
|
|
96
|
+
await user.clear(topicsInput);
|
|
97
|
+
await user.type(topicsInput, 'This second input is now sufficiently long enough to reach fifty characters easily.');
|
|
98
|
+
|
|
99
|
+
expect(submitBtn).not.toBeDisabled();
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('should perform batch write and update accessState and user context on submit', async () => {
|
|
103
|
+
const { user, batchWriteMock, snackBarMock } = await setup();
|
|
104
|
+
|
|
105
|
+
const writeSpy = jest.spyOn(batchWriteMock, 'batchWrite');
|
|
106
|
+
|
|
107
|
+
const textareas = screen.getAllByRole('textbox');
|
|
108
|
+
await user.type(textareas[0], 'This is the first input text for question one.');
|
|
109
|
+
await user.type(textareas[1], 'This is the second input text for primary topics of interest and hurdles.');
|
|
110
|
+
|
|
111
|
+
const submitBtn = screen.getByRole('button', { name: /Submit/i });
|
|
112
|
+
await user.click(submitBtn);
|
|
113
|
+
|
|
114
|
+
// Verify batchWrite called
|
|
115
|
+
expect(writeSpy).toHaveBeenCalled();
|
|
116
|
+
|
|
117
|
+
// Verify that the timestamp passed to users doc update is an instance of Timestamp from @angular/fire/firestore
|
|
118
|
+
const batchFn = writeSpy.mock.calls[0][0] as any;
|
|
119
|
+
const dummyBatch = {
|
|
120
|
+
update: jest.fn(),
|
|
121
|
+
set: jest.fn(),
|
|
122
|
+
delete: jest.fn(),
|
|
123
|
+
commit: jest.fn(),
|
|
124
|
+
};
|
|
125
|
+
await batchFn({
|
|
126
|
+
batch: dummyBatch as any,
|
|
127
|
+
revertBatch: dummyBatch as any,
|
|
128
|
+
patchFns: [],
|
|
129
|
+
revertFns: [],
|
|
130
|
+
dbRevertFns: [],
|
|
131
|
+
});
|
|
132
|
+
const updateCall = dummyBatch.update.mock.calls.find((call) => call[0].path.startsWith('users/'));
|
|
133
|
+
expect(updateCall).toBeDefined();
|
|
134
|
+
const changes = updateCall[1];
|
|
135
|
+
expect(changes.joinedWaitlistAt).toBeInstanceOf(Timestamp);
|
|
136
|
+
|
|
137
|
+
// Verify success notification shown with Undo action
|
|
138
|
+
await waitFor(() => {
|
|
139
|
+
expect(snackBarMock.open).toHaveBeenCalledWith('Submitted interest form!', 'Undo', expect.any(Object));
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
writeSpy.mockRestore();
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('should render waitlist card and display correct position when accessState is WAITING', async () => {
|
|
146
|
+
// Seed database with two waitlisted users to verify position calculation
|
|
147
|
+
const time1 = Timestamp.fromDate(new Date('2026-05-10T12:00:00Z'));
|
|
148
|
+
const time2 = Timestamp.fromDate(new Date('2026-05-15T12:00:00Z'));
|
|
149
|
+
|
|
150
|
+
// Mutate the auth store user to WAITING (joined at time2)
|
|
151
|
+
USER_DB[0].accessState = AccessState.WAITING;
|
|
152
|
+
USER_DB[0].joinedWaitlistAt = time2;
|
|
153
|
+
|
|
154
|
+
const testUsers = [
|
|
155
|
+
USER_DB[0],
|
|
156
|
+
{
|
|
157
|
+
__id: 'u2',
|
|
158
|
+
name: 'Another Waiting User',
|
|
159
|
+
email: 'u2@example.com',
|
|
160
|
+
accessState: AccessState.WAITING,
|
|
161
|
+
isAdmin: false,
|
|
162
|
+
consented: false,
|
|
163
|
+
joinedWaitlistAt: time1, // joined earlier
|
|
164
|
+
_createdAt: time1,
|
|
165
|
+
_updatedAt: time1,
|
|
166
|
+
_deleted: false,
|
|
167
|
+
},
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
await setup([], testUsers);
|
|
171
|
+
|
|
172
|
+
// Should display waitlist stats by waiting for the async position text to render
|
|
173
|
+
expect(await screen.findByText(/2nd/i)).toBeVisible();
|
|
174
|
+
expect(screen.getByText(/of 2 on the waitlist/i)).toBeVisible();
|
|
39
175
|
});
|
|
40
176
|
});
|
|
@@ -3,42 +3,31 @@ import { toObservable } from '@angular/core/rxjs-interop';
|
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
5
5
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
|
-
import {
|
|
7
|
-
import { WaitlistData } from './early-access.model';
|
|
6
|
+
import { AsyncPipe } from '@angular/common';
|
|
7
|
+
import { WaitlistData, SurveyData } from './early-access.model';
|
|
8
8
|
import { User, AccessState } from 'src/app/core/store/user/user.model';
|
|
9
9
|
import { handleAccess } from './early-access.guard';
|
|
10
10
|
import { UserContext } from 'src/app/core/store/user-context/user-context.model';
|
|
11
|
-
import { Timestamp, serverTimestamp } from '
|
|
12
|
-
import {
|
|
11
|
+
import { Timestamp, serverTimestamp } from '@angular/fire/firestore';
|
|
12
|
+
import { BatchWriteService, BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
|
|
13
|
+
import { NavbarComponent } from 'src/app/shared/navbar/navbar.component';
|
|
14
|
+
import { SurveyFormComponent } from './survey-form/survey-form.component';
|
|
15
|
+
import { WaitlistViewComponent } from './waitlist-view/waitlist-view.component';
|
|
13
16
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
14
17
|
import { AuthStore } from 'src/app/core/store/auth/auth.store';
|
|
15
18
|
import { UserStore } from 'src/app/core/store/user/user.store';
|
|
16
19
|
import { UserContextStore } from 'src/app/core/store/user-context/user-context.store';
|
|
17
|
-
import { MatInput } from '@angular/material/input';
|
|
18
|
-
import { AsyncPipe } from '@angular/common';
|
|
19
|
-
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
20
|
-
import { MatLabel, MatFormField, MatHint } from '@angular/material/form-field';
|
|
21
|
-
import { BatchWriteService, BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
|
|
22
|
-
import { NavbarComponent } from 'src/app/shared/navbar/navbar.component';
|
|
23
|
-
import { HintVisibilityDirective } from 'src/app/shared/hint-visibility/hint-visibility.directive';
|
|
24
20
|
|
|
25
21
|
@Component({
|
|
26
22
|
selector: 'app-early-access',
|
|
27
23
|
templateUrl: './early-access.component.html',
|
|
28
|
-
|
|
24
|
+
styleUrl: './early-access.component.scss',
|
|
29
25
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
30
|
-
animations: EarlyAccessAnimations,
|
|
31
26
|
imports: [
|
|
32
27
|
NavbarComponent,
|
|
33
|
-
FormsModule,
|
|
34
|
-
MatLabel,
|
|
35
|
-
ReactiveFormsModule,
|
|
36
|
-
MatFormField,
|
|
37
|
-
MatInput,
|
|
38
|
-
MatHint,
|
|
39
28
|
AsyncPipe,
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
SurveyFormComponent,
|
|
30
|
+
WaitlistViewComponent,
|
|
42
31
|
],
|
|
43
32
|
})
|
|
44
33
|
export class EarlyAccessComponent implements OnInit {
|
|
@@ -65,21 +54,6 @@ export class EarlyAccessComponent implements OnInit {
|
|
|
65
54
|
outreachLeadName = 'OUTREACH_LEAD_NAME [FirstName]';
|
|
66
55
|
outreachLeadEmail = 'OUTREACH_LEAD_EMAIL [email@ucsc.edu]';
|
|
67
56
|
|
|
68
|
-
/** Form controls for early access survey. */
|
|
69
|
-
surveyForm = this.form.group({
|
|
70
|
-
questionOne: ['', Validators.minLength(25)],
|
|
71
|
-
questionTwo: ['', Validators.minLength(50)],
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
/** Convenience getter for questionOne. */
|
|
75
|
-
get questionOne() {
|
|
76
|
-
return this.surveyForm.get('questionOne');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** Convenience getter for questionTwo. */
|
|
80
|
-
get questionTwo() {
|
|
81
|
-
return this.surveyForm.get('questionTwo');
|
|
82
|
-
}
|
|
83
57
|
|
|
84
58
|
// --------------- COMPUTED DATA -----------------------
|
|
85
59
|
|
|
@@ -138,7 +112,7 @@ export class EarlyAccessComponent implements OnInit {
|
|
|
138
112
|
// --------------- EVENT HANDLING ----------------------
|
|
139
113
|
|
|
140
114
|
/** Submit background and interests. */
|
|
141
|
-
async submitInterest() {
|
|
115
|
+
async submitInterest(formData: SurveyData) {
|
|
142
116
|
try {
|
|
143
117
|
await this.batch.batchWrite(async (batchConfig) => {
|
|
144
118
|
await this.userStore.update(this.waitlistData().currentUser.__id, {
|
|
@@ -148,14 +122,14 @@ export class EarlyAccessComponent implements OnInit {
|
|
|
148
122
|
|
|
149
123
|
if (this.waitlistData().userContext) {
|
|
150
124
|
this.userContextStore.update(this.waitlistData().userContext.__id, {
|
|
151
|
-
questionOne:
|
|
152
|
-
questionTwo:
|
|
125
|
+
questionOne: formData.questionOne ?? '',
|
|
126
|
+
questionTwo: formData.questionTwo ?? '',
|
|
153
127
|
}, { batchConfig });
|
|
154
128
|
} else {
|
|
155
129
|
this.userContextStore.add({
|
|
156
130
|
__userId: this.waitlistData().currentUser.__id,
|
|
157
|
-
questionOne:
|
|
158
|
-
questionTwo:
|
|
131
|
+
questionOne: formData.questionOne ?? '',
|
|
132
|
+
questionTwo: formData.questionTwo ?? '',
|
|
159
133
|
}, { batchConfig });
|
|
160
134
|
}
|
|
161
135
|
}, {
|
|
@@ -178,7 +152,6 @@ export class EarlyAccessComponent implements OnInit {
|
|
|
178
152
|
private router: Router,
|
|
179
153
|
private route: ActivatedRoute,
|
|
180
154
|
private snackBar: MatSnackBar,
|
|
181
|
-
private form: FormBuilder,
|
|
182
155
|
@Inject(BATCH_WRITE_SERVICE) private batch: BatchWriteService,
|
|
183
156
|
private injector: Injector,
|
|
184
157
|
) {
|
|
@@ -16,7 +16,7 @@ export function handleAccess(
|
|
|
16
16
|
user: User | null | undefined,
|
|
17
17
|
router: Router,
|
|
18
18
|
route: ActivatedRouteSnapshot,
|
|
19
|
-
state: RouterStateSnapshot
|
|
19
|
+
state: RouterStateSnapshot,
|
|
20
20
|
): boolean {
|
|
21
21
|
if (hasAdminOverride(user, state.url)) return true;
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ export function handleAccess(
|
|
|
25
25
|
router.navigate(['/consent'], { queryParams: route.queryParams });
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
return true;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<form class="early-access-form" [formRoot]="surveyForm">
|
|
2
|
+
<div class="form-field-group">
|
|
3
|
+
<mat-label class="question">QUESTION_1 [What is your current role and what are you hoping to achieve?]</mat-label>
|
|
4
|
+
<mat-form-field class="question-one" appearance="outline">
|
|
5
|
+
<mat-label>QUESTION_1_SHORT_LABEL [Current role & goals]</mat-label>
|
|
6
|
+
<textarea #q1Text matInput cdkTextareaAutosize [formField]="questionOne" appHintVisibility [hintControl]="questionOne" [hintSiblingControl]="questionTwo" #q1Hint="hintVisibility"></textarea>
|
|
7
|
+
@if (q1Hint.showHint()) {
|
|
8
|
+
<mat-hint>
|
|
9
|
+
@if (q1Text.value?.length < 25) {
|
|
10
|
+
You've shared {{q1Text.value?.length || 0}} of 25 characters. If you could say a little more, that'd help us! 🙏
|
|
11
|
+
} @else {
|
|
12
|
+
Thank you! This helps us understand your context better! 🙏
|
|
13
|
+
}
|
|
14
|
+
</mat-hint>
|
|
15
|
+
}
|
|
16
|
+
</mat-form-field>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="form-field-group">
|
|
19
|
+
<mat-label class="question">QUESTION_2 [What is the biggest hurdle preventing you from achieving this right now?]</mat-label>
|
|
20
|
+
<mat-form-field class="question-two" appearance="outline">
|
|
21
|
+
<mat-label>QUESTION_2_SHORT_LABEL [Biggest hurdle]</mat-label>
|
|
22
|
+
<textarea #q2Text matInput cdkTextareaAutosize [formField]="questionTwo" appHintVisibility [hintControl]="questionTwo" [hintCharThreshold]="100" [hintDebounceMs]="5000" #q2Hint="hintVisibility"></textarea>
|
|
23
|
+
@if (q2Hint.showHint() && questionOne().valid()) {
|
|
24
|
+
<mat-hint>
|
|
25
|
+
@if (q2Text.value?.length < 50) {
|
|
26
|
+
You've shared {{q2Text.value?.length || 0}} of 50 characters. Knowing your hurdles helps us build the right tools!
|
|
27
|
+
} @else {
|
|
28
|
+
Thank you! We're excited to see how we can help clear these hurdles.
|
|
29
|
+
}
|
|
30
|
+
</mat-hint>
|
|
31
|
+
}
|
|
32
|
+
</mat-form-field>
|
|
33
|
+
</div>
|
|
34
|
+
<button type="submit" class="btn continue-btn" [disabled]="!surveyForm().valid() || loading()">
|
|
35
|
+
@if (loading()) {
|
|
36
|
+
Submitting...
|
|
37
|
+
} @else {
|
|
38
|
+
Submit and Continue
|
|
39
|
+
<img src="https://icongr.am/feather/arrow-right.svg?size=20&color=ffffff">
|
|
40
|
+
}
|
|
41
|
+
</button>
|
|
42
|
+
</form>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.early-access-form {
|
|
6
|
+
margin-top: 1em;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
|
|
11
|
+
.checkbox-error {
|
|
12
|
+
font-size: 0.75rem;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.form-field-group {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
width: 100%;
|
|
20
|
+
margin-bottom: 20px;
|
|
21
|
+
|
|
22
|
+
.checkbox-group {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.question {
|
|
28
|
+
margin-bottom: 10px;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
color: #4b5563;
|
|
32
|
+
line-height: 1.5;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
mat-form-field {
|
|
36
|
+
width: 100%;
|
|
37
|
+
|
|
38
|
+
::ng-deep .mdc-text-field--outlined {
|
|
39
|
+
background-color: #ffffff;
|
|
40
|
+
border-radius: 4px;
|
|
41
|
+
--mdc-outlined-text-field-focus-outline-color: #6e84f8;
|
|
42
|
+
--mdc-outlined-text-field-focus-label-text-color: #6e84f8;
|
|
43
|
+
--mdc-outlined-text-field-caret-color: #6e84f8;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
button {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
margin-top: 30px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.continue-btn {
|
|
56
|
+
margin: 18px 15px 15px 0;
|
|
57
|
+
border: 1px solid #8c9fff;
|
|
58
|
+
background-color: #6e84f8;
|
|
59
|
+
color: #f1f3ff;
|
|
60
|
+
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
|
|
61
|
+
border-radius: 6px;
|
|
62
|
+
font-weight: 200;
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
font-size: 1.1em;
|
|
66
|
+
padding: 10px 22px 10px;
|
|
67
|
+
transition: color 0.8s ease, border 0.8s ease;
|
|
68
|
+
|
|
69
|
+
>img {
|
|
70
|
+
margin: 0 3px 0 2px;
|
|
71
|
+
transition: margin 0.2s ease;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&[disabled] {
|
|
75
|
+
background-color: white;
|
|
76
|
+
border: 1px solid #d8d8d8;
|
|
77
|
+
color: #b2b6c7;
|
|
78
|
+
box-shadow: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
>img {
|
|
83
|
+
margin: 0 0 0 5px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&[disabled] {
|
|
87
|
+
>img {
|
|
88
|
+
margin: 0 3px 0 2px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:focus {
|
|
94
|
+
outline: 0;
|
|
95
|
+
}
|
|
96
|
+
}
|