Skip to content

Commit

Permalink
MOBILE-4464 siteplugins: Add class to identify site plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonso-salces committed Nov 20, 2023
1 parent f0c1e83 commit 884c860
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/core/features/siteplugins/components/block/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { Component, OnChanges, ViewChild } from '@angular/core';
import { Component, HostBinding, OnChanges, ViewChild } from '@angular/core';

import { CoreBlockBaseComponent } from '@features/block/classes/base-block-component';
import { CoreBlockDelegate } from '@features/block/services/block-delegate';
Expand All @@ -31,7 +31,7 @@ export class CoreSitePluginsBlockComponent extends CoreBlockBaseComponent implem

@ViewChild(CoreSitePluginsPluginContentComponent) content?: CoreSitePluginsPluginContentComponent;

component?: string;
@HostBinding('class') component?: string;
method?: string;
args?: Record<string, unknown>;
initResult?: CoreSitePluginsContent | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { Component, OnChanges, Input, ViewChild, Output, EventEmitter } from '@angular/core';
import { Component, OnChanges, Input, ViewChild, Output, EventEmitter, HostBinding } from '@angular/core';
import { IonRefresher } from '@ionic/angular';

import { CoreCourseFormatComponent } from '@features/course/components/course-format/course-format';
Expand Down Expand Up @@ -51,7 +51,7 @@ export class CoreSitePluginsCourseFormatComponent implements OnChanges {

@ViewChild(CoreSitePluginsPluginContentComponent) content?: CoreSitePluginsPluginContentComponent;

component?: string;
@HostBinding('class') component?: string;
method?: string;
args?: Record<string, unknown>;
initResult?: CoreSitePluginsContent | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import { CoreConstants } from '@/core/constants';
import { Component, OnInit, OnDestroy, Input, ViewChild } from '@angular/core';
import { Component, OnInit, OnDestroy, Input, ViewChild, HostBinding } from '@angular/core';
import { CoreIonLoadingElement } from '@classes/ion-loading';

import { CoreSiteWSPreSets } from '@classes/site';
Expand Down Expand Up @@ -54,7 +54,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C

@ViewChild(CoreSitePluginsPluginContentComponent) content?: CoreSitePluginsPluginContentComponent;

component?: string;
@HostBinding('class') component?: string;
method?: string;
args?: Record<string, unknown>;
initResult?: CoreSitePluginsContent | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { Component, OnInit, Input, Output, EventEmitter, DoCheck, KeyValueDiffers, ViewChild, KeyValueDiffer } from '@angular/core';
import {
Component,
OnInit,
Input,
Output,
EventEmitter,
DoCheck,
KeyValueDiffers,
ViewChild,
KeyValueDiffer,
HostBinding,
} from '@angular/core';
import { Subject } from 'rxjs';
import { Md5 } from 'ts-md5';

Expand All @@ -37,7 +48,7 @@ export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck {
// Get the compile element. Don't set the right type to prevent circular dependencies.
@ViewChild('compile') compileComponent?: CoreCompileHtmlComponent;

@Input() component!: string;
@HostBinding('class') @Input() component!: string;
@Input() method!: string;
@Input() args?: Record<string, unknown>;
@Input() initResult?: CoreSitePluginsContent | null; // Result of the init WS call of the handler.
Expand Down

0 comments on commit 884c860

Please sign in to comment.