MOBILE-4464 siteplugins: Add class to identify site plugins

main
Alfonso Salces 2023-11-09 11:09:25 +01:00
parent f0c1e8339f
commit 884c860444
4 changed files with 19 additions and 8 deletions

View File

@ -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';
@ -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;

View File

@ -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';
@ -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;

View File

@ -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';
@ -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;

View File

@ -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';
@ -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.