@smartsoft001/crud-shell-angular 2.133.0 → 2.135.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 { Injectable, inject, ElementRef, Injector, Directive, ChangeDetectionStrategy, Component, InjectionToken, DestroyRef, signal, input, computed, Pipe, NgModule, ChangeDetectorRef, viewChild, viewChildren, output, effect } from '@angular/core';
|
|
2
|
+
import { Injectable, inject, ElementRef, Injector, Directive, ChangeDetectionStrategy, Component, InjectionToken, DestroyRef, signal, input, computed, Pipe, NgModule, ChangeDetectorRef, viewChild, viewChildren, output, ViewContainerRef, effect } from '@angular/core';
|
|
3
3
|
import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { map, first, filter, take } from 'rxjs/operators';
|
|
5
5
|
import { NgrxStoreService, PaginationMode, BaseComponent as BaseComponent$1, PopoverService, StyleService, ButtonComponent, DateEditComponent, InputFlagComponent, InputIntComponent, InputRadioComponent, InputTextComponent, MenuService, FormComponent, ListComponent as ListComponent$1, IModelLabelProvider, SharedModule, DetailsComponent, AuthService, CreateDynamicComponent, DynamicComponentLoader, ToastService, DetailsService, DynamicContentDirective, PageComponent, HardwareService, ListMode, FILE_SERVICE_CONFIG } from '@smartsoft001/angular';
|
|
@@ -3169,13 +3169,15 @@ class ItemComponent extends CreateDynamicComponent('crud-item-page') {
|
|
|
3169
3169
|
hideMenuButton: true,
|
|
3170
3170
|
}, /* @ts-ignore */
|
|
3171
3171
|
...(ngDevMode ? [{ debugName: "pageOptions" }] : /* istanbul ignore next */ []));
|
|
3172
|
-
detailsOptions
|
|
3172
|
+
detailsOptions = signal(undefined, /* @ts-ignore */
|
|
3173
|
+
...(ngDevMode ? [{ debugName: "detailsOptions" }] : /* istanbul ignore next */ []));
|
|
3173
3174
|
id;
|
|
3174
3175
|
formValue;
|
|
3175
3176
|
formValid = false;
|
|
3176
3177
|
item;
|
|
3177
3178
|
formPartialValue;
|
|
3178
|
-
uniqueProvider
|
|
3179
|
+
uniqueProvider = signal(undefined, /* @ts-ignore */
|
|
3180
|
+
...(ngDevMode ? [{ debugName: "uniqueProvider" }] : /* istanbul ignore next */ []));
|
|
3179
3181
|
set mode(val) {
|
|
3180
3182
|
this._mode = signal(val, /* @ts-ignore */
|
|
3181
3183
|
...(ngDevMode ? [{ debugName: "_mode" }] : /* istanbul ignore next */ []));
|
|
@@ -3189,10 +3191,11 @@ class ItemComponent extends CreateDynamicComponent('crud-item-page') {
|
|
|
3189
3191
|
...(ngDevMode ? [{ debugName: "standardComponents" }] : /* istanbul ignore next */ []));
|
|
3190
3192
|
contentTpl = viewChild('contentTpl', /* @ts-ignore */
|
|
3191
3193
|
...(ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []));
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
...(ngDevMode ?
|
|
3194
|
+
// Both anchors are plain elements, so they must be read as view containers:
|
|
3195
|
+
// `generateComponents()` drives them with `get`, `createComponent` and
|
|
3196
|
+
// `clear`, and the default read would hand back an `ElementRef`.
|
|
3197
|
+
topTpl = viewChild('topTpl', { ...(ngDevMode ? { debugName: "topTpl" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
3198
|
+
bottomTpl = viewChild('bottomTpl', { ...(ngDevMode ? { debugName: "bottomTpl" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
3196
3199
|
dynamicContents = viewChildren(DynamicContentDirective, /* @ts-ignore */
|
|
3197
3200
|
...(ngDevMode ? [{ debugName: "dynamicContents" }] : /* istanbul ignore next */ []));
|
|
3198
3201
|
subscription = new Subscription();
|
|
@@ -3202,7 +3205,6 @@ class ItemComponent extends CreateDynamicComponent('crud-item-page') {
|
|
|
3202
3205
|
effect(() => {
|
|
3203
3206
|
this.item = this.facade.selected();
|
|
3204
3207
|
this.initPageOptions();
|
|
3205
|
-
this.cd.detectChanges();
|
|
3206
3208
|
});
|
|
3207
3209
|
}
|
|
3208
3210
|
refreshProperties() {
|
|
@@ -3340,11 +3342,14 @@ class ItemComponent extends CreateDynamicComponent('crud-item-page') {
|
|
|
3340
3342
|
this.formValid = val;
|
|
3341
3343
|
}
|
|
3342
3344
|
initPageOptions() {
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
+
// `update` reads the current options without consuming the signal
|
|
3346
|
+
// reactively: this runs inside the constructor effect, and a tracked read
|
|
3347
|
+
// would make the write below re-trigger that effect forever.
|
|
3348
|
+
this.pageOptions.update((options) => ({
|
|
3349
|
+
...options,
|
|
3345
3350
|
title: this.getTitle() || '',
|
|
3346
3351
|
endButtons: this.getButtons(),
|
|
3347
|
-
});
|
|
3352
|
+
}));
|
|
3348
3353
|
}
|
|
3349
3354
|
getButtons() {
|
|
3350
3355
|
const options = getModelOptions(this.config.type);
|
|
@@ -3485,7 +3490,7 @@ class ItemComponent extends CreateDynamicComponent('crud-item-page') {
|
|
|
3485
3490
|
}
|
|
3486
3491
|
}
|
|
3487
3492
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3488
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ItemComponent, isStandalone: true, selector: "smart-crud-item-page", viewQueries: [{ propertyName: "standardComponents", predicate: ItemStandardComponent, descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }, { propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }, { propertyName: "bottomTpl", first: true, predicate: ["bottomTpl"], descendants: true, isSignal: true }, { propertyName: "dynamicContents", predicate: DynamicContentDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3493
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ItemComponent, isStandalone: true, selector: "smart-crud-item-page", viewQueries: [{ propertyName: "standardComponents", predicate: ItemStandardComponent, descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }, { propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "bottomTpl", first: true, predicate: ["bottomTpl"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "dynamicContents", predicate: DynamicContentDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3489
3494
|
<smart-page [options]="pageOptions()" [class]="config.cssClass || ''">
|
|
3490
3495
|
<div #topTpl class="text-xl py-2.5 separator"></div>
|
|
3491
3496
|
@if (template() === 'default') {
|
|
@@ -3537,7 +3542,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
3537
3542
|
</smart-page>
|
|
3538
3543
|
`,
|
|
3539
3544
|
}]
|
|
3540
|
-
}], ctorParameters: () => [], propDecorators: { standardComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ItemStandardComponent), { isSignal: true }] }], contentTpl: [{ type: i0.ViewChild, args: ['contentTpl', { isSignal: true }] }], topTpl: [{ type: i0.ViewChild, args: ['topTpl', { isSignal: true }] }], bottomTpl: [{ type: i0.ViewChild, args: ['bottomTpl', { isSignal: true }] }], dynamicContents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DynamicContentDirective), { isSignal: true }] }] } });
|
|
3545
|
+
}], ctorParameters: () => [], propDecorators: { standardComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ItemStandardComponent), { isSignal: true }] }], contentTpl: [{ type: i0.ViewChild, args: ['contentTpl', { isSignal: true }] }], topTpl: [{ type: i0.ViewChild, args: ['topTpl', { ...{ read: ViewContainerRef }, isSignal: true }] }], bottomTpl: [{ type: i0.ViewChild, args: ['bottomTpl', { ...{ read: ViewContainerRef }, isSignal: true }] }], dynamicContents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DynamicContentDirective), { isSignal: true }] }] } });
|
|
3541
3546
|
|
|
3542
3547
|
class CrudListPageBaseComponent extends BaseComponent$1 {
|
|
3543
3548
|
config = inject((CrudFullConfig));
|