@smartsoft001/angular 2.93.0 → 2.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, ComponentFactoryResolver, InjectionToken, ApplicationRef, NgModuleRef, PLATFORM_ID, Inject, signal, NgModule, ViewContainerRef, Directive, input, output, HostListener, Pipe, Type, model, Component, ChangeDetectorRef, ElementRef, Injector, viewChild, effect, computed, ChangeDetectionStrategy, ViewEncapsulation, viewChildren, forwardRef, Renderer2, NgZone, untracked } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, ComponentFactoryResolver, InjectionToken, ApplicationRef, NgModuleRef, PLATFORM_ID, Inject, signal, NgModule, ViewContainerRef, Directive, input, output, HostListener, Pipe, Type, model, Component, ChangeDetectorRef, ElementRef, Injector, viewChild, effect, computed, runInInjectionContext, ChangeDetectionStrategy, ViewEncapsulation, viewChildren, forwardRef, Renderer2, NgZone, untracked } from '@angular/core';
|
|
3
3
|
import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import { Router, NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
|
5
5
|
import * as i1 from '@ngx-translate/core';
|
|
@@ -1545,8 +1545,10 @@ function CreateDynamicComponent(type) {
|
|
|
1545
1545
|
cd = inject(ChangeDetectorRef);
|
|
1546
1546
|
moduleRef = inject((NgModuleRef));
|
|
1547
1547
|
componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
1548
|
+
injector = inject(Injector);
|
|
1548
1549
|
_renderCustom = false;
|
|
1549
1550
|
_findDynamicContent = false;
|
|
1551
|
+
_dynamicContents$ = null;
|
|
1550
1552
|
baseInstance = null;
|
|
1551
1553
|
baseComponentRef = null;
|
|
1552
1554
|
dynamicType = type;
|
|
@@ -1561,9 +1563,10 @@ function CreateDynamicComponent(type) {
|
|
|
1561
1563
|
if (this._findDynamicContent || !this.dynamicContents())
|
|
1562
1564
|
return;
|
|
1563
1565
|
this._findDynamicContent = true;
|
|
1564
|
-
|
|
1565
|
-
.
|
|
1566
|
-
|
|
1566
|
+
if (!this._dynamicContents$) {
|
|
1567
|
+
this._dynamicContents$ = runInInjectionContext(this.injector, () => toObservable(this.dynamicContents));
|
|
1568
|
+
}
|
|
1569
|
+
this._dynamicContents$.pipe(this.takeUntilDestroy).subscribe(() => {
|
|
1567
1570
|
this.init();
|
|
1568
1571
|
});
|
|
1569
1572
|
this.init();
|
|
@@ -5045,7 +5048,7 @@ class PageBaseComponent {
|
|
|
5045
5048
|
hardwareService = inject(HardwareService);
|
|
5046
5049
|
// private popover: PopoverController, //TODO: to be injected
|
|
5047
5050
|
static smartType = 'page';
|
|
5048
|
-
options = input
|
|
5051
|
+
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
5049
5052
|
_subscriptions = new Subscription();
|
|
5050
5053
|
get isMobile() {
|
|
5051
5054
|
return this.hardwareService.isMobile || this.hardwareService.isMobileWeb;
|
|
@@ -5072,7 +5075,7 @@ class PageBaseComponent {
|
|
|
5072
5075
|
}
|
|
5073
5076
|
}
|
|
5074
5077
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: PageBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5075
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.1.0", type: PageBaseComponent, isStandalone: true, inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired:
|
|
5078
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.1.0", type: PageBaseComponent, isStandalone: true, inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }], ngImport: i0 });
|
|
5076
5079
|
}
|
|
5077
5080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: PageBaseComponent, decorators: [{
|
|
5078
5081
|
type: Directive
|
|
@@ -5080,17 +5083,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
|
|
|
5080
5083
|
|
|
5081
5084
|
class PageStandardComponent extends PageBaseComponent {
|
|
5082
5085
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: PageStandardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5083
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: PageStandardComponent, isStandalone: true, selector: "smart-page-standard", usesInheritance: true, ngImport: i0, template: "<!--<ion-header [hidden]=\"!options || options.hideHeader\">-->\n<!-- <ion-toolbar>-->\n<!-- <ion-buttons slot=\"start\">-->\n<!-- <ion-menu-button-->\n<!-- [hidden]=\"!options || options.hideMenuButton\"-->\n<!-- ></ion-menu-button>-->\n@if (options()
|
|
5086
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: PageStandardComponent, isStandalone: true, selector: "smart-page-standard", usesInheritance: true, ngImport: i0, template: "<!--<ion-header [hidden]=\"!options || options.hideHeader\">-->\n<!-- <ion-toolbar>-->\n<!-- <ion-buttons slot=\"start\">-->\n<!-- <ion-menu-button-->\n<!-- [hidden]=\"!options || options.hideMenuButton\"-->\n<!-- ></ion-menu-button>-->\n@if (options()?.showBackButton) {\n <!-- <ion-button (click)=\"back()\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"arrow-back\"> </ion-icon>-->\n <!-- </ion-button>-->\n}\n<!-- </ion-buttons>-->\n<!-- <ion-title [innerHTML]=\"options?.title ?? '' | translate\"></ion-title>-->\n\n<!-- <ion-buttons slot=\"end\">-->\n@let search = options()?.search;\n@if (search) {\n <smart-searchbar\n [text]=\"search.text() ?? null\"\n (textChange)=\"search.set($event)\"\n ></smart-searchbar>\n}\n\n@if (options()?.endButtons) {\n @for (btn of options()!.endButtons; track btn.number) {\n @if (btn.type === 'popover') {\n <!-- <ion-button-->\n <!-- (click)=\"presentPopover($event, btn)\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n } @else {\n <!-- <ion-button-->\n <!-- (click)=\"btn?.handler?.()\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n }\n }\n}\n\n@for (btn of appService.endButtons$ | async; track btn.number) {\n @if (btn.type === 'popover') {\n <!-- <ion-button-->\n <!-- (click)=\"presentPopover($event, btn)\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n } @else {\n <!-- <ion-button-->\n <!-- (click)=\"btn?.handler?.()\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n }\n}\n<!-- </ion-buttons>-->\n<!-- </ion-toolbar>-->\n<!--</ion-header>-->\n<!--<ion-content scroll>-->\n<ng-content></ng-content>\n<!--</ion-content>-->\n\n<ng-template #btnContent let-btn=\"btn\">\n @if (!isMobile && btn.text) {\n <!-- <ion-icon slot=\"start\" [name]=\"btn.icon\"></ion-icon>-->\n {{ btn.text | translate }}\n @if (btn.number) {\n <!--<ion-badge class=\"absolute top-5 -right-1 opacity-90\" color=\"primary\">-->{{\n btn.number\n }}<!--</ion-badge>-->\n }\n } @else if (isMobile || !btn.text) {\n <!-- <ion-icon slot=\"icon-only\" [name]=\"btn.icon\"></ion-icon>-->\n @if (btn.number) {\n <!--<ion-badge class=\"absolute top-5 -right-1 opacity-90\" color=\"primary\">-->{{\n btn.number\n }}<!--</ion-badge>-->\n }\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: SearchbarComponent, selector: "smart-searchbar", inputs: ["show", "text"], outputs: ["showChange", "textChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5084
5087
|
}
|
|
5085
5088
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: PageStandardComponent, decorators: [{
|
|
5086
5089
|
type: Component,
|
|
5087
|
-
args: [{ selector: 'smart-page-standard', imports: [TranslatePipe, SearchbarComponent, AsyncPipe, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--<ion-header [hidden]=\"!options || options.hideHeader\">-->\n<!-- <ion-toolbar>-->\n<!-- <ion-buttons slot=\"start\">-->\n<!-- <ion-menu-button-->\n<!-- [hidden]=\"!options || options.hideMenuButton\"-->\n<!-- ></ion-menu-button>-->\n@if (options()
|
|
5090
|
+
args: [{ selector: 'smart-page-standard', imports: [TranslatePipe, SearchbarComponent, AsyncPipe, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--<ion-header [hidden]=\"!options || options.hideHeader\">-->\n<!-- <ion-toolbar>-->\n<!-- <ion-buttons slot=\"start\">-->\n<!-- <ion-menu-button-->\n<!-- [hidden]=\"!options || options.hideMenuButton\"-->\n<!-- ></ion-menu-button>-->\n@if (options()?.showBackButton) {\n <!-- <ion-button (click)=\"back()\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"arrow-back\"> </ion-icon>-->\n <!-- </ion-button>-->\n}\n<!-- </ion-buttons>-->\n<!-- <ion-title [innerHTML]=\"options?.title ?? '' | translate\"></ion-title>-->\n\n<!-- <ion-buttons slot=\"end\">-->\n@let search = options()?.search;\n@if (search) {\n <smart-searchbar\n [text]=\"search.text() ?? null\"\n (textChange)=\"search.set($event)\"\n ></smart-searchbar>\n}\n\n@if (options()?.endButtons) {\n @for (btn of options()!.endButtons; track btn.number) {\n @if (btn.type === 'popover') {\n <!-- <ion-button-->\n <!-- (click)=\"presentPopover($event, btn)\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n } @else {\n <!-- <ion-button-->\n <!-- (click)=\"btn?.handler?.()\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n }\n }\n}\n\n@for (btn of appService.endButtons$ | async; track btn.number) {\n @if (btn.type === 'popover') {\n <!-- <ion-button-->\n <!-- (click)=\"presentPopover($event, btn)\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n } @else {\n <!-- <ion-button-->\n <!-- (click)=\"btn?.handler?.()\"-->\n <!-- [disabled]=\"btn.disabled$ | async\"-->\n <!-- >-->\n <ng-container\n [ngTemplateOutlet]=\"btnContent\"\n [ngTemplateOutletContext]=\"{ btn: btn }\"\n ></ng-container>\n <!-- </ion-button>-->\n }\n}\n<!-- </ion-buttons>-->\n<!-- </ion-toolbar>-->\n<!--</ion-header>-->\n<!--<ion-content scroll>-->\n<ng-content></ng-content>\n<!--</ion-content>-->\n\n<ng-template #btnContent let-btn=\"btn\">\n @if (!isMobile && btn.text) {\n <!-- <ion-icon slot=\"start\" [name]=\"btn.icon\"></ion-icon>-->\n {{ btn.text | translate }}\n @if (btn.number) {\n <!--<ion-badge class=\"absolute top-5 -right-1 opacity-90\" color=\"primary\">-->{{\n btn.number\n }}<!--</ion-badge>-->\n }\n } @else if (isMobile || !btn.text) {\n <!-- <ion-icon slot=\"icon-only\" [name]=\"btn.icon\"></ion-icon>-->\n @if (btn.number) {\n <!--<ion-badge class=\"absolute top-5 -right-1 opacity-90\" color=\"primary\">-->{{\n btn.number\n }}<!--</ion-badge>-->\n }\n }\n</ng-template>\n" }]
|
|
5088
5091
|
}] });
|
|
5089
5092
|
|
|
5090
5093
|
class PageComponent extends CreateDynamicComponent('page') {
|
|
5091
5094
|
el = inject(ElementRef);
|
|
5092
5095
|
renderer = inject(Renderer2);
|
|
5093
|
-
options = input
|
|
5096
|
+
options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
|
|
5094
5097
|
contentTpl = viewChild('contentTpl', ...(ngDevMode ? [{ debugName: "contentTpl" }] : []));
|
|
5095
5098
|
dynamicContents = viewChildren(DynamicContentDirective, ...(ngDevMode ? [{ debugName: "dynamicContents" }] : []));
|
|
5096
5099
|
constructor() {
|
|
@@ -5107,7 +5110,7 @@ class PageComponent extends CreateDynamicComponent('page') {
|
|
|
5107
5110
|
this.baseInstance.options = this.options;
|
|
5108
5111
|
}
|
|
5109
5112
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: PageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5110
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: PageComponent, isStandalone: true, selector: "smart-page", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired:
|
|
5113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: PageComponent, isStandalone: true, selector: "smart-page", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }, { propertyName: "dynamicContents", predicate: DynamicContentDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
5111
5114
|
@if (template() === 'default') {
|
|
5112
5115
|
<smart-page-standard [options]="options()">
|
|
5113
5116
|
<ng-container [ngTemplateOutlet]="contentTpl"></ng-container>
|