File

src/app/modules/groups/components/activity/activity-search/activity-search.component.ts

Implements

OnInit OnDestroy

Metadata

Index

Properties
Methods

Constructor

constructor(resourceService: ResourceService, configService: ConfigService, frameworkService: FrameworkService, searchService: SearchService, toasterService: ToasterService, formService: FormService, activatedRoute: ActivatedRoute, paginationService: PaginationService, utilService: UtilService, userService: UserService, cacheService: CacheService, router: Router, groupsService: GroupsService, layoutService: LayoutService, courseConsumptionService: CourseConsumptionService, orgDetailsService: OrgDetailsService, groupService: GroupsService, activityDashboardService: ActivityDashboardService)
Parameters :
Name Type Optional
resourceService ResourceService No
configService ConfigService No
frameworkService FrameworkService No
searchService SearchService No
toasterService ToasterService No
formService FormService No
activatedRoute ActivatedRoute No
paginationService PaginationService No
utilService UtilService No
userService UserService No
cacheService CacheService No
router Router No
groupsService GroupsService No
layoutService LayoutService No
courseConsumptionService CourseConsumptionService No
orgDetailsService OrgDetailsService No
groupService GroupsService No
activityDashboardService ActivityDashboardService No

Methods

addActivity
addActivity(activityCard)
Parameters :
Name Optional
activityCard No
Returns : void
addTelemetry
addTelemetry(id, cdata, extra?, edata?)
Parameters :
Name Optional Description
id No
cdata No
extra Yes
edata Yes

? - it's an object to specify the type and subtype of edata

Returns : void
Private fetchContentOnParamChange
fetchContentOnParamChange()
Returns : void
Private fetchContents
fetchContents()
Returns : void
Public getFilters
getFilters(filters)
Parameters :
Name Optional
filters No
Returns : void
Private getFrameWork
getFrameWork()
Returns : any
getFrameworkId
getFrameworkId()
Returns : void
hoverActionClicked
hoverActionClicked(event, appAddToGroupElement: HTMLDivElement)
Parameters :
Name Type Optional
event No
appAddToGroupElement HTMLDivElement No
Returns : void
initLayout
initLayout()

used to archive the both theme

Returns : void
Public navigateToPage
navigateToPage(page: number)
Parameters :
Name Type Optional
page number No
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
search
search()
Returns : void
Private setNoResultMessage
setNoResultMessage()
Returns : void
toggleFilter
toggleFilter()
Returns : void

Properties

Public activityDashboardService
Type : ActivityDashboardService
Public ADD_ACTIVITY_TO_GROUP
Default value : ADD_ACTIVITY_TO_GROUP
Public allTabData
Public configService
Type : ConfigService
contentList
Type : any[]
Default value : []
Public courseConsumptionService
Type : CourseConsumptionService
Private csGroupAddableBloc
Type : CsGroupAddableBloc
dataDrivenFilterEvent
Default value : new EventEmitter()
dataDrivenFilters
Type : any
Default value : {}
facets
Type : Array<string>
facetsList
Type : any
filterType
Type : string
frameworkId
Type : string
frameWorkName
Type : string
Public globalSearchFacets
Type : Array<string>
groupAddableBlocData
Type : any
groupData
groupId
Type : string
Public groupService
Type : GroupsService
initFilters
Default value : false
layoutConfiguration
Type : any
Public layoutService
Type : LayoutService
noResultMessage
Type : any
numberOfSections
Default value : new Array(this.configService.appConfig.SEARCH.PAGE_LIMIT)
orgDetailsFromSlug
Default value : this.cacheService.get('orgDetailsFromSlug')
Public orgDetailsService
Type : OrgDetailsService
paginationDetails
Type : IPagination
queryParams
Type : any
Public resourceService
Type : ResourceService
searchQuery
Type : string
searchResultCount
Type : number
Default value : 0
Public selectedFilters
showFilters
Default value : false
showLoader
Default value : true
Public slugForProminentFilter
Default value : (<HTMLInputElement>document.getElementById('slugForProminentFilter')) ? (<HTMLInputElement>document.getElementById('slugForProminentFilter')).value : null
telemetryImpression
Type : IImpressionEventInput
unsubscribe$
Default value : new Subject<void>()
import { ADD_ACTIVITY_TO_GROUP } from './../../../interfaces/routerLinks';
import { CourseConsumptionService } from '@sunbird/learn';
import { Component, OnInit, EventEmitter, OnDestroy } from '@angular/core';
import { FrameworkService, SearchService, FormService, UserService, OrgDetailsService } from '@sunbird/core';
import {
  ConfigService,
  ResourceService,
  ToasterService,
  PaginationService,
  UtilService,
  LayoutService
} from '@sunbird/shared';
import * as _ from 'lodash-es';
import { Subject, of, combineLatest } from 'rxjs';
import { takeUntil, map, catchError, first, debounceTime, tap, delay, mergeMap } from 'rxjs/operators';
import { ActivatedRoute, Router } from '@angular/router';
import { IPagination } from '../../../../shared/interfaces/index';
import { CacheService } from '../../../../shared/services/cache-service/cache.service';
import { GroupsService } from '../../../services/groups/groups.service';
import { IImpressionEventInput } from '@sunbird/telemetry';
import { CsGroupAddableBloc } from '@project-sunbird/client-services/blocs';
import { VIEW_ACTIVITY, CATEGORY_SEARCH } from '../../../interfaces/telemetryConstants';
import { ActivityDashboardService } from '@sunbird/shared';
import { sessionKeys } from '../../../interfaces/group';


@Component({
  selector: 'app-activity-search',
  templateUrl: './activity-search.component.html',
  styleUrls: ['./activity-search.component.scss']
})
export class ActivitySearchComponent implements OnInit, OnDestroy {
  showFilters = false;
  searchResultCount = 0;
  searchQuery: string;
  showLoader = true;
  numberOfSections = new Array(this.configService.appConfig.SEARCH.PAGE_LIMIT);
  queryParams: any;
  unsubscribe$ = new Subject<void>();
  frameworkId: string;
  contentList: any[] = [];
  initFilters = false;
  frameWorkName: string;
  filterType: string;
  facets: Array<string>;
  facetsList: any;
  dataDrivenFilters: any = {};
  dataDrivenFilterEvent = new EventEmitter();
  paginationDetails: IPagination;
  noResultMessage: any;
  groupData;
  groupId: string;
  telemetryImpression: IImpressionEventInput;
  layoutConfiguration: any;
  groupAddableBlocData: any;
  public globalSearchFacets: Array<string>;
  public allTabData;
  public selectedFilters;
  public ADD_ACTIVITY_TO_GROUP = ADD_ACTIVITY_TO_GROUP;
  private csGroupAddableBloc: CsGroupAddableBloc;


  public slugForProminentFilter = (<HTMLInputElement>document.getElementById('slugForProminentFilter')) ?
    (<HTMLInputElement>document.getElementById('slugForProminentFilter')).value : null;
  orgDetailsFromSlug = this.cacheService.get('orgDetailsFromSlug');


  constructor(
    public resourceService: ResourceService,
    public configService: ConfigService,
    private frameworkService: FrameworkService,
    private searchService: SearchService,
    private toasterService: ToasterService,
    private formService: FormService,
    private activatedRoute: ActivatedRoute,
    private paginationService: PaginationService,
    private utilService: UtilService,
    private userService: UserService,
    private cacheService: CacheService,
    private router: Router,
    private groupsService: GroupsService,
    public layoutService: LayoutService,
    public courseConsumptionService: CourseConsumptionService,
    public orgDetailsService: OrgDetailsService,
    public groupService: GroupsService,
    public activityDashboardService: ActivityDashboardService,
  ) {
    this.csGroupAddableBloc = CsGroupAddableBloc.instance;
  }

  ngOnInit() {
    CsGroupAddableBloc.instance.state$.pipe(takeUntil(this.unsubscribe$)).subscribe(data => {
      if(data){
        sessionStorage.setItem(sessionKeys.GROUPADDABLEBLOCDATA, JSON.stringify((data)))
      }
      this.groupAddableBlocData = data || JSON.parse(sessionStorage.getItem(sessionKeys.GROUPADDABLEBLOCDATA));
    });
    this.activityDashboardService.isActivityAdded = false; // setting this value to enable or disable the activity dashboard button in activity-dashboard directive
    this.searchService.getContentTypes().pipe(takeUntil(this.unsubscribe$)).subscribe(formData => {
      this.allTabData = _.find(formData, (o) => o.title === 'frmelmnts.tab.all');
      this.globalSearchFacets = _.get(this.allTabData, 'search.facets');
    }, error => {
      this.toasterService.error(this.resourceService.frmelmnts.lbl.fetchingContentFailed);
    });
    this.initLayout();
    this.filterType = this.configService.appConfig.courses.filterType;
    this.groupData = this.groupsService.groupData;
    this.groupId = _.get(this.activatedRoute, 'snapshot.params.groupId');
    this.paginationDetails = this.paginationService.getPager(0, 1, this.configService.appConfig.SEARCH.PAGE_LIMIT);
    this.getFrameworkId();
    this.getFrameWork().pipe(first()).subscribe(framework => {
      this.initFilters = true;
      this.frameWorkName = framework;
      if (this.userService._isCustodianUser && this.orgDetailsFromSlug) {
        if (_.get(this.orgDetailsFromSlug, 'slug') === this.slugForProminentFilter) {
          this.showFilters = false;
        }
      }
      this.dataDrivenFilters = {};
      this.fetchContentOnParamChange();
      this.setNoResultMessage();
      // tslint:disable-next-line:max-line-length
      this.telemetryImpression = this.groupsService.getImpressionObject(this.activatedRoute.snapshot, this.router.url, {type: CATEGORY_SEARCH});
    }, error => {
      this.toasterService.error(this.resourceService.messages.fmsg.m0002);
    });
  }

  /**
   * used to archive the both theme
   */
  initLayout() {
    this.layoutConfiguration = this.layoutService.initlayoutConfig();
    this.layoutService.switchableLayout().pipe(takeUntil(this.unsubscribe$)).subscribe(layoutConfig => {
      if (layoutConfig != null) {
        this.layoutConfiguration = layoutConfig.layout;
      }
    });
  }

  private fetchContentOnParamChange() {
    combineLatest([this.activatedRoute.params, this.activatedRoute.queryParams])
      .pipe(debounceTime(5), // to sync params and queryParams events
        delay(10), // to trigger pageexit telemetry event
        tap(data => {
          this.showLoader = true;
          // TODO set telemetry here
        }),
        map((result) => ({ params: { pageNumber: Number(result[0].pageNumber) }, queryParams: result[1] })),
        takeUntil(this.unsubscribe$))
      .subscribe(({ params, queryParams }) => {
          this.queryParams = { ...queryParams };
          this.paginationDetails.currentPage = params.pageNumber;
          this.contentList = [];
          this.fetchContents();
      });
  }

  getFrameworkId() {
    this.frameworkService.channelData$
      .pipe(takeUntil(this.unsubscribe$))
      .subscribe((channelData) => {
        /* istanbul ignore else */
        if (!channelData.err) {
          this.frameworkId = _.get(channelData, 'channelData.defaultFramework');
        }
      }, error => {
        console.error('Unable to fetch framework', error);
      });
  }

  public getFilters(filters) {
    const filterData = filters && filters.filters || {};
    if (filterData.channel && this.facets) {
      const channelIds = [];
      const facetsData = _.find(this.facets, { 'name': 'channel' });
      _.forEach(filterData.channel, (value, index) => {
        const data = _.find(facetsData.values, { 'identifier': value });
        if (data) {
          channelIds.push(data.name);
        }
      });
      if (channelIds && Array.isArray(channelIds) && channelIds.length > 0) {
        filterData.channel = channelIds;
      }
    }
    this.selectedFilters = filterData;
    const defaultFilters = _.reduce(filters, (collector: any, element) => {

      /* istanbul ignore else */
      if (element.code === 'board') {
        collector.board = _.get(_.orderBy(element.range, ['index'], ['asc']), '[0].name') || '';
      }
      return collector;
    }, {});
    this.dataDrivenFilterEvent.emit(defaultFilters);
  }

  search() {
    const url = this.router.url.split('?')[0].replace(/[^\/]+$/, `1`);
    if (this.searchQuery.trim().length) {
      this.addTelemetry('add-course-activity-search', [], { query: this.searchQuery });
      this.router.navigate([url], { queryParams: { key: this.searchQuery } });
    } else {
      this.router.navigate([url]);
    }
  }

  private getFrameWork() {
    const formServiceInputParams = {
      formType: 'framework',
      formAction: 'search',
      contentType: 'framework-code',
    };
    return this.formService.getFormConfig(formServiceInputParams)
      .pipe(map((data) => {
        const frameWork = _.find(data, 'framework').framework;
        return frameWork;
      }), catchError((error) => {
        return of(false);
      }));
  }

  private fetchContents() {
    let filters = _.pickBy(this.queryParams, (value: Array<string> | string) => value && value.length);
    const searchQuery = _.get(this.groupAddableBlocData, 'params.searchQuery.request.filters');
    const user = _.omit(_.get(this.userService.userProfile, 'framework'), 'id');
    const option: any = {
      filters: _.omit({ ...filters, ...searchQuery, ...user }, 'key'),
      fields: _.get(this.allTabData, 'search.fields'),
      limit: this.configService.appConfig.SEARCH.PAGE_LIMIT,
      pageNumber: this.paginationDetails.currentPage,
      facets: this.globalSearchFacets,
      params: this.configService.appConfig.Course.contentApiQueryParams,
      mode: 'soft'
    };

    if (_.get(this.queryParams, 'sort_by')) {
      option.sort_by = { [this.queryParams.sort_by]: this.queryParams.sortType };
    }

    /* istanbul ignore else */
    if (_.get(this.queryParams, 'key')) {
      option.query = this.queryParams.key;
      option.filters =  _.omit({ ...filters, ...searchQuery }, 'key');
    }

    /* istanbul ignore else */
    if (this.frameWorkName) {
      option.params.framework = this.frameWorkName;
    }
    this.searchService.contentSearch(option, false)
      .pipe(
        mergeMap(data => {
          const channelFacet = _.find(_.get(data, 'result.facets') || [], facet => _.get(facet, 'name') === 'channel');
          if (channelFacet) {
            const rootOrgIds = this.orgDetailsService.processOrgData(_.get(channelFacet, 'values'));
            return this.orgDetailsService.searchOrgDetails({
              filters: { isTenant: true, id: rootOrgIds },
              fields: ['slug', 'identifier', 'orgName']
            }).pipe(
              mergeMap(orgDetails => {
                channelFacet.values = _.get(orgDetails, 'content');
                return of(data);
              })
            );
          }
          return of(data);
        })
      )
      .subscribe(data => {
        this.showLoader = false;
        this.facets = this.searchService.updateFacetsData(_.get(data, 'result.facets'));
        this.facetsList = this.searchService.processFilterData(_.get(data, 'result.facets'));
        this.paginationDetails = this.paginationService.getPager(data.result.count, this.paginationDetails.currentPage,
          this.configService.appConfig.SEARCH.PAGE_LIMIT);
        const { constantData, metaData, dynamicFields } = this.configService.appConfig.CoursePageSection.course;
        this.contentList = _.map(data.result.content, (content: any) =>
          this.utilService.processContent(content, constantData, dynamicFields, metaData));
        _.each(this.contentList, item => {
          item.hoverData = {
            'actions': [
              {
                'type': 'view',
                'label': this.resourceService.frmelmnts.lbl.group.viewActivity
              },
              {
                'type': 'addToGroup',
                'label': this.resourceService.frmelmnts.lbl.AddtoGroup
              }
            ]
          };
        });

      }, err => {
        this.showLoader = false;
        this.contentList = [];
        this.facetsList = [];
        this.paginationDetails = this.paginationService.getPager(0, this.paginationDetails.currentPage,
          this.configService.appConfig.SEARCH.PAGE_LIMIT);
        this.toasterService.error(this.resourceService.messages.fmsg.m0051);
      });
  }

  public navigateToPage(page: number): void {
    /* istanbul ignore else */
    if (page < 1 || page > this.paginationDetails.totalPages) {
      return;
    }
    const url = this.router.url.split('?')[0].replace(/[^\/]+$/, page.toString());
    this.router.navigate([url], { queryParams: this.queryParams });
    window.scroll({
      top: 0,
      left: 0,
      behavior: 'smooth'
    });
  }

  toggleFilter() {
    this.showFilters = !this.showFilters;
    // TOTO add interact telemetry here
  }

  addActivity(activityCard) {
    this.groupAddableBlocData.pageIds = [_.get(activityCard, 'primaryCategory').toLowerCase(), ADD_ACTIVITY_TO_GROUP];
    this.csGroupAddableBloc.updateState(this.groupAddableBlocData);
    const cdata = [{ id: _.get(activityCard, 'identifier'), type: _.get(activityCard, 'primaryCategory') }];
    this.addTelemetry('activity-course-card', cdata, '', {type: VIEW_ACTIVITY});
    const isTrackable = this.courseConsumptionService.isTrackableCollection(activityCard);
    const contentMimeType = _.get(activityCard, 'mimeType');

    if (contentMimeType === 'application/vnd.ekstep.content-collection' && isTrackable) {

      this.router.navigate(['/learn/course', _.get(activityCard, 'identifier')], { queryParams: { groupId: _.get(this.groupData, 'id') } });

    } else if (contentMimeType === 'application/vnd.ekstep.content-collection' && !isTrackable) {

      this.router.navigate(['/resources/play/collection', _.get(activityCard, 'identifier')],
      {queryParams: {contentType: _.get(activityCard, 'primaryCategory'), groupId: _.get(this.groupData, 'id')}});

    } else if (contentMimeType === this.configService.appConfig.PLAYER_CONFIG.MIME_TYPE.questionset) {
      this.router.navigate(['/resources/play/questionset', _.get(activityCard, 'identifier')],
      {queryParams: {contentType: _.get(activityCard, 'primaryCategory'), groupId: _.get(this.groupData, 'id')}});
    } else {
      this.router.navigate(['/resources/play/content', _.get(activityCard, 'identifier')],
      {queryParams: {contentType: _.get(activityCard, 'primaryCategory'), groupId: _.get(this.groupData, 'id')}});
    }
  }

  /**
   * @description - To set the telemetry Intract event data
   * @param  {} edata? - it's an object to specify the type and subtype of edata
   */
  addTelemetry(id, cdata, extra?, edata?) {
    this.groupsService.addTelemetry({ id, extra, edata}, this.activatedRoute.snapshot, cdata || [], this.groupId);
  }

  private setNoResultMessage() {
    this.noResultMessage = {
      'message': 'messages.stmsg.m0007',
      'messageText': 'messages.stmsg.m0006'
    };
  }

  ngOnDestroy() {
    this.unsubscribe$.next();
    this.unsubscribe$.complete();
  }

  hoverActionClicked(event, appAddToGroupElement: HTMLDivElement) {
    const mode = _.get(event, 'hover.type').toLowerCase();
    switch (mode) {
      case 'view':
        this.addActivity(_.get(event, 'content'));
        break;
      case 'addtogroup':
        appAddToGroupElement.click();
        break;
    }
  }
}
<app-landing-section [noTitle]="true" [layoutConfiguration]="layoutConfiguration">
</app-landing-section>
<div [ngClass]="layoutConfiguration ? 'sb-back-actionbar mt-0' : 'sb-bg-white cc-player__btn-back'" class="relative position mt-0" [appTelemetryImpression]="telemetryImpression">
  <div class="ui container d-flex flex-ai-center py-8">
    <app-back-button></app-back-button>
    <div class="d-flex flex-ai-center flex-jc-space-between flex-w-wrap ml-16 w-100">
      <div class="d-flex flex-dc w-100">
        <h4 class="mb-4 font-weight-bold sb__ellipsis sb__ellipsis--one d-flex">{{resourceService?.frmelmnts?.lbl?.addContentType | interpolate:'{contentType}': groupAddableBlocData?.params?.contentType}}</h4>
        <div class="d-flex flex-ai-end flex-w-wrap content-header__buttons flex-jc-space-between">
          <div class="sb-search-box large">
            <div class="input-div relative">
              <i aria-hidden="true" class="search icon"></i>
              <label for="search-for-content-group" class="hide">{{resourceService?.frmelmnts?.lbl?.TypeToSearchForContent}}</label>
              <input class="sb-search-input" id="search-for-content-group" type="text" [(ngModel)]="searchQuery"
                [placeholder]="resourceService?.frmelmnts?.lbl?.TypeToSearchForContent" />
            </div>
            <button class="sb-btn sb-btn-normal"
              tabindex="0" (click)="search()">{{resourceService?.frmelmnts?.lbl?.search}}</button>
          </div>
          <button class="sb-btn sb-btn-outline-primary sb-btn-normal" tabindex="0" (click)="toggleFilter()">
            <img class="mr-4" alt="{{resourceService?.frmelmnts?.lbl?.filterby}} icon" src="./assets/images/outline-tune.svg"
              width="16">{{resourceService?.frmelmnts?.lbl?.filterby}}
          </button>
        </div>
      </div>
 
    </div>
  </div>
</div>

<div [ngClass]="layoutConfiguration ? 'sbt-center-container sbt-back-header sbt-activity-search relative9':'sb-back-header'" >
  <div [ngClass]="layoutConfiguration ? 'd-flex':'ui container'">
    <div *ngIf="showFilters" class="flex-b" [ngClass]="layoutConfiguration ? '':'pr-16'">
        <app-global-search-filter *ngIf="initFilters && allTabData" [layoutConfiguration]="layoutConfiguration" [facets]="facets" [isOpen]='true' (filterChange)="getFilters($event)">
        </app-global-search-filter>
    </div>
    <div class="flex-basis-1" [ngClass]="layoutConfiguration ? '':'mt-24'">
      <div class="sb-pageSection">
        <div class="sb-pageSection-header">
          <h4 class="sb-pageSection-title m-0 sb-pageSection-activity-title">
            <span *ngIf="!queryParams?.key?.length">{{resourceService?.frmelmnts?.lbl?.activityRecommendation}}</span>
            <span *ngIf="queryParams?.key?.length && contentList?.length">
              {{resourceService?.frmelmnts?.lbl?.showingResultsForWithCount | interpolate:'{resultCount}' : contentList?.length}}&nbsp;
              "{{queryParams?.key}}"</span>
          </h4>
        </div>
      </div>

      <div class="sb-card-grid my-24" *ngIf="showLoader">
        <div class="sb-grid--item" *ngFor="let i of numberOfSections">
          <sb-course-card [isLoading]="true"></sb-course-card>
        </div>
      </div>

      <div *ngIf="!showLoader && contentList?.length" class="sb-card-grid my-24">
        <div class="sb-card-grid--item" *ngFor="let content of contentList;">
          <!-- <sb-course-card (cardClick)="addActivity($event)" [course]="content" [section]="null"
            [cardImg]="content?.image || './assets/images/book.png'">
          </sb-course-card> -->
          <sb-library-card [content]="content" [layoutConfig]="layoutConfiguration"
            [cardImg]="content?.image || 'assets/images/add-icon.svg'" [hover-template]="hoverTemplate"
            [type]="'recently_viewed'">
            <ng-template #hoverTemplate let-hoverData="hoverData" let-content="content">
              <sb-card-hover class="card-hover activity-card-hover" [hoverData]="hoverData" 
                [content]="content"
                (hoverActionClick)="hoverActionClicked($event, appAddToGroupElement)">
              </sb-card-hover>
            </ng-template>
            <div appAddToGroup #appAddToGroupElement [identifier]="content?.identifier" [pageId]="ADD_ACTIVITY_TO_GROUP"></div>
          </sb-library-card>
        </div>
      </div>

      <div class="twelve wide column" *ngIf="contentList?.length === 0 && !showLoader">
        <app-no-result [data]="noResultMessage"></app-no-result>
      </div>

      <div class="twelve wide column right aligned"
        *ngIf="paginationDetails?.totalItems > configService?.appConfig?.SEARCH.PAGE_LIMIT && !showLoader">
        <div class="sb-pagination-container flex-jc-flex-end mt-16" *ngIf="paginationDetails?.pages?.length">
          <div class="sb-pagination my-0">
            <a role="button" title="{{resourceService?.frmelmnts?.lbl?.first}}" attr.aria-label="{{resourceService?.frmelmnts?.lbl?.first}}" [ngClass]="{disabled:paginationDetails?.currentPage===1 }" class="sb-item "
              tabindex="0" (click)="navigateToPage(1)">&laquo;</a>
            <a role="button" title="{{resourceService?.frmelmnts?.lbl?.previous}}" attr.aria-label="{{resourceService?.frmelmnts?.lbl?.previous}}" [ngClass]="{disabled:paginationDetails?.currentPage===1 }" class="sb-item "
              tabindex="0" (click)="navigateToPage(paginationDetails?.currentPage - 1)">&lt;</a>
            <a href=“javascript:void(0);” role=“button” aria-current=“page” title="{{page}}" attr.aria-label="{{page}}" *ngFor="let page of paginationDetails?.pages" [ngClass]="{active:paginationDetails?.currentPage===page}"
              tabindex="0" (click)="navigateToPage(page)" class="sb-item">{{page}}</a>
            <a role="button" title="{{resourceService?.frmelmnts?.lbl?.next}}" attr.aria-label="{{resourceService?.frmelmnts?.lbl?.next}}" [ngClass]="{disabled:paginationDetails?.currentPage=== paginationDetails?.totalPages}"
              tabindex="0" (click)="navigateToPage(paginationDetails?.currentPage + 1)" class="sb-item">&gt;</a>
            <a role="button" title="{{resourceService?.frmelmnts?.lbl?.last}}" attr.aria-label="{{resourceService?.frmelmnts?.lbl?.last}}" [ngClass]="{disabled:paginationDetails?.currentPage=== paginationDetails?.totalPages}"
              tabindex="0" (click)="navigateToPage(paginationDetails?.totalPages)" class="sb-item ">&raquo;</a>
          </div>
        </div>
      </div>
    </div>
  
  </div>
</div>

./activity-search.component.scss

@use "@project-sunbird/sb-styles/assets/mixins/mixins" as *;
@use "components/tabs" as *;


.sb-pageSection-activity-title {
  color: var(--primary-400);
}

@include respond-below(sm) {
  .sb-filter-btn{
    margin-top: calculateRem(16px);
  }
  .activity-search{
    margin: 0 !important;
  }
}
::ng-deep {
  @include respond-below(sm){
    html[dir='rtl'] .activity-search {
      margin-left: 0 !important;
    }
  }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""