Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added : Issue 2037 - Added angular support for vf-tabs #2085

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/vf-tabs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2.1.5

* Added : Experimental Angular support for Tabs [Tracking issue](https://github.com/visual-framework/vf-core/issues/2037)

### 2.1.4

* Changelog correction [Tracking issue](https://github.com/visual-framework/vf-core/issues/2035)
Expand Down
114 changes: 114 additions & 0 deletions components/vf-tabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,120 @@ These tabs have been made with accessibility in mind, however tabs should be avo

Nested tabs are also possible, as demonstrated in the example, however this provides further usability challenges and should be strongly avoided.

### Angular

As of version 2.1.5 vf-tabs has experimental Angular support.
This package was generated with Angular version 15.2.0 and has been tested on application with Angular version 15.2.0.

1. Install `yarn add @visual-framework/vf-tabs`
2. Import in your app.module
```
import { VfTabsAngularModule } from '@visual-framework/vf-tabs/vf-tabs.angular';

@NgModule({
imports: [VfTabsAngularModule, YourOtherModules],
...
})
```
3. Can be used as
```
<vf-tabs [tabsdata]="tabsdata"></vf-tabs>
```
Here `tabsdata` can be declared in app.component.ts as below -
```
public tabsdata = [
[
{ tab_title: `Section` },
{ tab_number: 58 },
{ tab_heading: `Section 1` },
{ tab_content: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam euismod, tortor nec pharetra ultricies, ante erat imperdiet velit, nec laoreet enim lacus a velit. <a class='vf-link' href='#'>Nam luctus</a>, enim in interdum condimentum, nisl diam iaculis lorem, vel volutpat mi leo sit amet lectus. Praesent non odio bibendum magna bibendum accumsan.` }
],
[
{ tab_title: `A Short Section` },
{ tab_number: 546 },
{ tab_heading: `Section 2` },
{ tab_content: `Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl. Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam. Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.` }
],
[
{ tab_title: `A Rather Long Section` },
{ tab_number: 878 },
{ tab_heading: `Section 3` },
{ tab_content: `Phasellus ac tristique orci. Nulla maximus <a class='vf-link' href='#'>justo nec dignissim consequat</a>. Sed vehicula diam sit amet mi efficitur vehicula in in nisl. Aliquam erat volutpat. Suspendisse lorem turpis, accumsan consequat consectetur gravida, <a class='vf-link' href='#'>pellentesque ac ante</a>. Aliquam in commodo ligula, sit amet mollis neque. Vestibulum at facilisis massa.` }
],
[
{ tab_title: `Nested Tabs` },
{ tab_number: 8793456 },
{ tab_heading: `Section 4` },
{ tab_content: `
<div class="vf-tabs">
<ul class="vf-tabs__list" data-vf-js-tabs>
<li class="vf-tabs__item">
<a class="vf-tabs__link" href="#vf-tabs__section-nested--234548">Nested tab 1</a>
</li>
<li class="vf-tabs__item">
<a class="vf-tabs__link" href="#vf-tabs__section-nested--29974">Nested tab 2</a>
</li>
</ul>
</div>

<div class="vf-tabs-content" data-vf-js-tabs-content>
<section class="vf-tabs__section" id="vf-tabs__section-nested--234548">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam euismod, tortor nec pharetra ultricies, ante erat imperdiet velit, nec laoreet enim lacus a velit. <a href="#">Nam luctus</a>, enim in interdum condimentum, nisl diam iaculis lorem, vel volutpat mi leo sit amet lectus. Praesent non odio bibendum magna bibendum accumsan.</p>
</section>
<section class="vf-tabs__section" id="vf-tabs__section-nested--29974">
<p>Nullam at diam nec arcu suscipit auctor non a erat. Sed et magna semper, eleifend magna non, facilisis nisl. Proin et est et lorem dictum finibus ut nec turpis. Aenean nisi tortor, euismod a mauris a, mattis scelerisque tortor. Sed dolor risus, varius a nibh id, condimentum lacinia est. In lacinia cursus odio a aliquam. Curabitur tortor magna, laoreet ut rhoncus at, sodales consequat tellus.</p>
</section>
</div>`}
],
[
{tab_title: `A fifth section`},
{tab_number: 545541},
{tab_heading: `Section 5`},
{tab_content: `Phasellus ac tristique orci. Nulla maximus <a class="vf-link" href="#">justo nec dignissim consequat</a>. Sed vehicula diam sit amet mi efficitur vehicula in in nisl. Aliquam erat volutpat. Suspendisse lorem turpis, accumsan consequat consectetur gravida, <a class="vf-link" href="#">pellentesque ac ante</a>. Aliquam in commodo ligula, sit amet mollis neque. Vestibulum at facilisis massa.`}
],
[
{tab_title: `A sixth section`},
{tab_number: 621211},
{tab_heading: `Section 6`},
{tab_content: `Phasellus ac tristique orci. Nulla maximus <a class="vf-link" href="#">justo nec dignissim consequat</a>. Sed vehicula diam sit amet mi efficitur vehicula in in nisl. Aliquam erat volutpat. Suspendisse lorem turpis, accumsan consequat consectetur gravida, <a class="vf-link" href="#">pellentesque ac ante</a>. Aliquam in commodo ligula, sit amet mollis neque. Vestibulum at facilisis massa.`}
],
[
{ tab_title: `Section` },
{ tab_number: 99999 },
{ tab_heading: `Default` },
{ tab_content: `An <a href="/#vf-tabs__section--88888">example deep link</a> loading this anchor will directly activate the neighbouring tab. <code>/vf-tabs#vf-tabs__section--88888</code>` }
],
[
{ tab_title: `A Short Section` },
{ tab_number: 88888 },
{ tab_heading: `Deep-linked tab` },
{ tab_content: `If you see me on page load, the deep link has worked.` }
]
];
```

4. CSS to be added to your styles.scss
```
@import '../node_modules/@visual-framework/vf-sass-config/index.scss';
@import '../node_modules/@visual-framework/vf-tabs/vf-tabs.scss';
```
you should also install [vf-sass-starter](https://stable.visual-framework.dev/components/vf-sass-starter) for the styles

5. Javascript file:
1. Copy the vf-tabs.js (from Assets section below) to your src/assets/vf-tabs folder.
2. Comment or remove the last line "export { vfTabs };" in this copied file.
3. In the angular.json inside "scripts": [] add the above file reference like -
"scripts": [
"src/assets/vf-tabs/vf-tabs.js"
]
4. Rerun the project if already running.

Usage:

```
<vf-tabs [tabsdata]="tabsdata"></vf-tabs>
```

### Deep linking

A tab can be activated on page load by passing it on the link `#vf-tabs__section-tab_id`
Expand Down
24 changes: 24 additions & 0 deletions components/vf-tabs/vf-tabs.angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# VfTabsAngular

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.0.

## Code scaffolding

Run `ng generate component component-name --project vf-tabs.angular` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project vf-tabs.angular`.
> Note: Don't forget to add `--project vf-tabs.angular` or else it will be added to the default project in your `angular.json` file.

## Build

Run `ng build vf-tabs.angular` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build vf-tabs.angular`, go to the dist folder `cd dist/vf-tabs.angular` and run `npm publish`.

## Running unit tests

Run `ng test vf-tabs.angular` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/platform-browser";
import * as i2 from "@angular/common";
export class VfTabsAngularComponent {
constructor(sanitizer, cdr) {
this.sanitizer = sanitizer;
this.cdr = cdr;
}
ngOnChanges() {
this.setValues();
}
/* Set values as per input and updated changes */
setValues() {
/* Initialize/Reset the values for class and style */
this.tabs = this.tabsdata;
}
ngAfterViewInit() {
this.cdr.detectChanges();
vfTabs();
}
sanitizeHTML(t) {
return this.sanitizer.bypassSecurityTrustHtml(t);
}
}
VfTabsAngularComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VfTabsAngularComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
VfTabsAngularComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: VfTabsAngularComponent, selector: "vf-tabs", inputs: { tabsdata: "tabsdata" }, usesOnChanges: true, ngImport: i0, template: `
<div class="vf-tabs">
<ul class="vf-tabs__list" data-vf-js-tabs>
<li class="vf-tabs__item" *ngFor="let item of tabs">
<a
class="vf-tabs__link"
href="#vf-tabs__section--{{item[1].tab_number}}"
[innerHTML]="item[0].tab_title">
</a>
</li>
</ul>
</div>
<div class="vf-tabs-content" data-vf-js-tabs-content>
<section
class="vf-tabs__section"
id="vf-tabs__section--{{item[1].tab_number}}"
*ngFor="let item of tabs"
>
<h2 *ngIf="item[2].tab_heading !== ''" [innerHTML]="sanitizeHTML(item[2].tab_heading)"></h2>
<p [innerHTML]="sanitizeHTML(item[3].tab_content)"></p>
</section>
</div>
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VfTabsAngularComponent, decorators: [{
type: Component,
args: [{ selector: "vf-tabs", template: `
<div class="vf-tabs">
<ul class="vf-tabs__list" data-vf-js-tabs>
<li class="vf-tabs__item" *ngFor="let item of tabs">
<a
class="vf-tabs__link"
href="#vf-tabs__section--{{item[1].tab_number}}"
[innerHTML]="item[0].tab_title">
</a>
</li>
</ul>
</div>
<div class="vf-tabs-content" data-vf-js-tabs-content>
<section
class="vf-tabs__section"
id="vf-tabs__section--{{item[1].tab_number}}"
*ngFor="let item of tabs"
>
<h2 *ngIf="item[2].tab_heading !== ''" [innerHTML]="sanitizeHTML(item[2].tab_heading)"></h2>
<p [innerHTML]="sanitizeHTML(item[3].tab_content)"></p>
</section>
</div>
`, changeDetection: ChangeDetectionStrategy.OnPush }]
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tabsdata: [{
type: Input
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmYtdGFicy5hbmd1bGFyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3ZmLXRhYnMuYW5ndWxhci9zcmMvbGliL3ZmLXRhYnMuYW5ndWxhci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsdUJBQXVCLEVBQW9DLE1BQU0sZUFBZSxDQUFDOzs7O0FBaUM1RyxNQUFNLE9BQU8sc0JBQXNCO0lBR2pDLFlBQW9CLFNBQXVCLEVBQVUsR0FBc0I7UUFBdkQsY0FBUyxHQUFULFNBQVMsQ0FBYztRQUFVLFFBQUcsR0FBSCxHQUFHLENBQW1CO0lBQUcsQ0FBQztJQUUvRSxXQUFXO1FBQ1QsSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDO0lBQ25CLENBQUM7SUFFRCxpREFBaUQ7SUFDakQsU0FBUztRQUNQLHFEQUFxRDtRQUNyRCxJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDNUIsQ0FBQztJQUVELGVBQWU7UUFDYixJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsRUFBRSxDQUFDO1FBQ3pCLE1BQU0sRUFBRSxDQUFDO0lBQ1gsQ0FBQztJQUVELFlBQVksQ0FBQyxDQU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gdGhpcy5zZXRWYWx1ZXMoKTtcbiAgfVxuXG4gIC8qIFNldCB2YWx1ZXMgYXMgcGVyIGlucHV0IGFuZCB1cGRhdGVkIGNoYW5nZXMgKi9cbiAgc2V0VmFsdWVzKCk6IHZvaWQge1xuICAgIC8qIEluaXRpYWxpemUvUmVzZXQgdGhlIHZhbHVlcyBmb3IgY2xhc3MgYW5kIHN0eWxlICovXG4gICAgdGhpcy50YWJzID0gdGhpcy50YWJzZGF0YTtcbiAgfVxuXG4gIG5nQWZ0ZXJWaWV3SW5pdCgpOiB2b2lkIHtcbiAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XG4gICAgdmZUYWJzKCk7XG4gIH1cblxuICBzYW5pdGl6ZUhUTUwodDogYW55KXtcbiAgICByZXR1cm4gdGhpcy5zYW5pdGl6ZXIuYnlwYXNzU2VjdXJpdHlUcnVzdEh0bWwodCk7XG4gIH1cbn1cbiJdfQ==
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Directive, EventEmitter, Output } from '@angular/core';
import * as i0 from "@angular/core";
export class VfTabsAngularDomChangeDirective {
constructor(elementRef) {
this.elementRef = elementRef;
this.domChange = new EventEmitter();
const element = this.elementRef.nativeElement;
var disableObserver = false;
this.changes = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (!disableObserver) {
disableObserver = true;
}
this.domChange.emit(mutation);
});
});
this.changes.observe(element, {
attributes: true,
childList: true,
characterData: true
});
}
ngOnDestroy() {
this.changes.disconnect();
}
}
VfTabsAngularDomChangeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VfTabsAngularDomChangeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
VfTabsAngularDomChangeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: VfTabsAngularDomChangeDirective, selector: "[domChange]", outputs: { domChange: "domChange" }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: VfTabsAngularDomChangeDirective, decorators: [{
type: Directive,
args: [{
selector: '[domChange]'
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { domChange: [{
type: Output
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmYtdGFicy5hbmd1bGFyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3ZmLXRhYnMuYW5ndWxhci9zcmMvbGliL3ZmLXRhYnMuYW5ndWxhci5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBYyxZQUFZLEVBQWEsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUt2RixNQUFNLE9BQU8sK0JBQStCO0lBTTFDLFlBQW9CLFVBQXNCO1FBQXRCLGVBQVUsR0FBVixVQUFVLENBQVk7UUFGbkMsY0FBUyxHQUFHLElBQUksWUFBWSxFQUFFLENBQUM7UUFHcEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQyxhQUFhLENBQUM7UUFDOUMsSUFBSSxlQUFlLEdBQUcsS0FBSyxDQUFDO1FBQzVCLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxnQkFBZ0IsQ0FBQyxDQUFDLFNBQTJCLEVBQUUsRUFBRTtZQUNoRSxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUMsUUFBd0IsRUFBRSxFQUFFO2dCQUUvQyxJQUFHLENBQUMsZUFBZSxFQUNqQjtvQkFDSSxlQUFlLEdBQUcsSUFBSSxDQUFDO2lCQUMxQjtnQkFDRCxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQT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