Skip to content

Commit

Permalink
Merge branch 'develop' into feat/CXSPA-7604
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhw0630 authored Sep 10, 2024
2 parents 3472322 + 8f6fa96 commit 5c370f2
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ Submit the form to us through one of the following methods:

The "guidelines and standards" requirement could fill entire books and still lack a 100% clear definition, but rest assured that you will receive feedback if something is not right. That being said, please consult the [Contributor's Guide](https://sap.github.io/spartacus-docs/contributors-guide/).

### Contribution of generated AI content

To contribute generated AI content, please read the following [guide](https://github.com/SAP/.github/blob/main/CONTRIBUTING_USING_GENAI.md)

### Contribution Process

1. Make sure the change would be welcome, as described above.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"importProductsNewSavedCartSubtitle": "Add products by importing a .CSV file and creating a new saved cart.",
"importProductFileDetails": "Text file should contain list of products with required columns separated by comma: SKU and quantity.",
"selectFile": "Select File",
"selectedSuccessfully": "CSV file has been successfully selected.",
"savedCartName": "Saved Cart Name",
"savedCartDescription": "Saved Cart Description",
"optional": "optional",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
[formGroup]="form"
(submit)="formSubmitSubject$.next(undefined)"
>
<ng-container *cxFeature="'a11yCartImportConfirmationMessage'">
<div aria-live="assertive" aria-atomic="true">
<cx-message
*ngIf="form.get('file')?.value && form.get('file')?.valid"
[text]="'importEntriesDialog.selectedSuccessfully' | cxTranslate"
[type]="globalMessageType.MSG_TYPE_CONFIRMATION"
[isVisibleCloseButton]="false"
[cxFocus]="{ autofocus: '.cx-message' }"
></cx-message>
</div>
</ng-container>
<p class="cx-import-entries-subtitle">
{{ 'importEntriesDialog.importProductsSubtitle' | cxTranslate }}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
import { of, Subject } from 'rxjs';
import { filter, startWith, switchMap, take, tap } from 'rxjs/operators';
import { ImportProductsFromCsvService } from '../../import-products-from-csv.service';
import { GlobalMessageType } from '@spartacus/core';

@Component({
selector: 'cx-import-entries-form',
Expand All @@ -38,6 +39,7 @@ export class ImportEntriesFormComponent implements OnInit {
form: UntypedFormGroup;
loadedFile: string[][] | null;
formSubmitSubject$ = new Subject();
globalMessageType = GlobalMessageType;

@Output()
submitEvent = new EventEmitter<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
[formGroup]="form"
(submit)="formSubmitSubject$.next(undefined)"
>
<ng-container *cxFeature="'a11yCartImportConfirmationMessage'">
<div aria-live="assertive" aria-atomic="true">
<cx-message
*ngIf="form.get('file')?.value && form.get('file')?.valid"
[text]="'importEntriesDialog.selectedSuccessfully' | cxTranslate"
[type]="globalMessageType.MSG_TYPE_CONFIRMATION"
[isVisibleCloseButton]="false"
[cxFocus]="{ autofocus: '.cx-message' }"
></cx-message>
</div>
</ng-container>
<p class="cx-import-entries-subtitle">
{{ 'importEntriesDialog.importProductsNewSavedCartSubtitle' | cxTranslate }}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
FormErrorsModule,
IconModule,
KeyboardFocusModule,
MessageComponentModule,
} from '@spartacus/storefront';
import { defaultImportEntriesLayoutConfig } from './default-import-entries-layout.config';
import { ImportEntriesDialogComponent } from './import-entries-dialog/import-entries-dialog.component';
Expand All @@ -37,6 +38,8 @@ import { ImportOrderEntriesComponent } from './import-entries/import-order-entri
KeyboardFocusModule,
FileUploadModule,
I18nModule,
MessageComponentModule,
FeaturesConfigModule,
ConfigModule.withConfig(<CmsConfig>{
cmsComponents: {
ImportOrderEntriesComponent: {
Expand Down
20 changes: 9 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"ts-morph": "^23.0.0",
"ts-node": "^10.6.0",
"typescript": "^5.2.2",
"webpack": "~5.93.0",
"webpack": "~5.94.0",
"webpack-cli": "^5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ export interface FeatureTogglesInterface {
*/
a11yOrganizationListHeadingOrder?: boolean;

/**
* In `ImportToNewSavedCartFormComponent`,`ImportEntriesFormComponent` after selecting a file
* confirmation message is displayed and read out
*/
a11yCartImportConfirmationMessage?: boolean;

/**
* Changes 'order days' check list into a fieldset inside of 'CheckoutScheduleReplenishmentOrderComponent'.
*/
Expand Down Expand Up @@ -523,7 +529,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
pdfInvoicesSortByInvoiceDate: false,
storeFrontLibCardParagraphTruncated: true,
useProductCarouselBatchApi: false,
productConfiguratorAttributeTypesV2: false,
productConfiguratorAttributeTypesV2: true,
productConfiguratorDeltaRendering: false,
a11yRequiredAsterisks: false,
a11yQuantityOrderTabbing: false,
Expand All @@ -543,6 +549,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yMobileVisibleFocus: false,
a11yOrganizationsBanner: false,
a11yOrganizationListHeadingOrder: false,
a11yCartImportConfirmationMessage: false,
a11yReplenishmentOrderFieldset: false,
a11yListOversizedFocus: false,
a11yStoreFinderOverflow: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ if (environment.cpq) {
a11yMobileVisibleFocus: true,
a11yOrganizationsBanner: true,
a11yOrganizationListHeadingOrder: true,
a11yCartImportConfirmationMessage: true,
a11yReplenishmentOrderFieldset: true,
a11yListOversizedFocus: true,
a11yStoreFinderOverflow: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ import { ReactiveFormsModule } from '@angular/forms';
import { I18nModule } from '@spartacus/core';
import { FormErrorsModule } from '../form-errors/form-errors.module';
import { FileUploadComponent } from './file-upload.component';
import { KeyboardFocusModule } from '../../../../layout/a11y';

@NgModule({
imports: [CommonModule, ReactiveFormsModule, FormErrorsModule, I18nModule],
imports: [
CommonModule,
ReactiveFormsModule,
FormErrorsModule,
I18nModule,
KeyboardFocusModule,
],
declarations: [FileUploadComponent],
exports: [FileUploadComponent],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
color: currentColor;

@include forFeature('a11yImproveContrast') {
color: var(--cx-color-dark);
color: var(--cx-color-secondary);
}
}
}
Expand Down

0 comments on commit 5c370f2

Please sign in to comment.