@dev-tcloud/tcloud-ui 6.21.6 → 6.21.7
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.
- package/fesm2022/dev-tcloud-tcloud-ui.mjs +62 -28
- package/fesm2022/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/js/tcloud-ui-app.js +1 -1
- package/lib/_modules/tcloud-ui-dialog/services/tcloud-ui-dialog-service.d.ts +7 -11
- package/lib/_modules/tcloud-ui-dialog/tcloud-ui-dialog-host.component.d.ts +14 -0
- package/lib/tcloud-ui.module.d.ts +47 -46
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, EventEmitter, Input, Output, InjectionToken, Optional, Inject, inject, signal, Pipe, forwardRef, ViewChild, input, effect, Directive, ViewEncapsulation, SkipSelf, ChangeDetectionStrategy, HostListener, ChangeDetectorRef, computed, ApplicationRef, output, model, ContentChildren, viewChild, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, EventEmitter, Input, Output, InjectionToken, Optional, Inject, inject, signal, Pipe, forwardRef, ViewChild, input, effect, Directive, ViewEncapsulation, SkipSelf, ChangeDetectionStrategy, HostListener, ChangeDetectorRef, computed, ApplicationRef, output, model, ContentChildren, viewChild, EnvironmentInjector, createComponent, ViewContainerRef, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DatePipe, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { Subject, Subscription, BehaviorSubject, debounceTime, distinctUntilChanged, map } from 'rxjs';
|
|
@@ -9306,47 +9306,49 @@ class TCloudUiDialogModel {
|
|
|
9306
9306
|
|
|
9307
9307
|
class TCloudUiDialogService {
|
|
9308
9308
|
constructor() {
|
|
9309
|
-
// * [Injects]
|
|
9310
9309
|
this.i18n = inject(I18nService);
|
|
9310
|
+
this.appRef = inject(ApplicationRef);
|
|
9311
|
+
this.environmentInjector = inject(EnvironmentInjector);
|
|
9311
9312
|
}
|
|
9312
9313
|
/**
|
|
9313
|
-
*
|
|
9314
|
-
*
|
|
9314
|
+
* Opcional. Por padrão o diálogo é criado em `document.body` com o injector da aplicação.
|
|
9315
|
+
* Use apenas quando precisar de um host explícito na árvore de views (ex.: `tcloud-ui-dialog-host`).
|
|
9315
9316
|
*/
|
|
9316
9317
|
setRootViewContainerRef(viewContainerRef) {
|
|
9317
|
-
|
|
9318
|
-
return;
|
|
9319
|
-
this.rootViewContainer = viewContainerRef;
|
|
9318
|
+
this.rootViewContainer = viewContainerRef ?? undefined;
|
|
9320
9319
|
}
|
|
9321
|
-
/**
|
|
9322
|
-
* Método usado para abrir o modal de dialog
|
|
9323
|
-
* @param _data Info do dialog
|
|
9324
|
-
*/
|
|
9325
9320
|
open(_data = {}) {
|
|
9326
|
-
|
|
9327
|
-
throw new Error('TCloudUiDialogService: ViewContainerRef não configurado. ' +
|
|
9328
|
-
'Declare no template um âncora (ex.: <ng-container #dialogRoot></ng-container>), ' +
|
|
9329
|
-
'use @ViewChild("dialogRoot", { read: ViewContainerRef }) e chame setRootViewContainerRef(ref) no ngAfterViewInit. ' +
|
|
9330
|
-
'Se #dialogRoot estiver dentro de *ngIf, chame setRootViewContainerRef de novo quando o bloco for exibido.');
|
|
9331
|
-
}
|
|
9332
|
-
const componentRef = this.rootViewContainer.createComponent(TCloudUiDialogComponent, {
|
|
9333
|
-
injector: this.rootViewContainer.injector,
|
|
9334
|
-
});
|
|
9321
|
+
const componentRef = this.createDialogComponent();
|
|
9335
9322
|
componentRef.instance.data = new TCloudUiDialogModel(_data.title || this.i18n.i18nTranslate('dialogConfirmation.default_title', 'Atenção'), _data.message || this.i18n.i18nTranslate('dialogConfirmation.default_message', 'Deseja realmente executar esta ação?'), _data.loading, _data.disable, _data.disableClickOutside, _data.inputConfirmationText || TCloudUiDialogTextConfirmationEnum.confirm, _data.buttonConfirmText, _data.buttonCancelText);
|
|
9336
|
-
// * Configura o texto do input de confirmação
|
|
9337
9323
|
if (componentRef.instance.data.inputConfirmationText)
|
|
9338
9324
|
this.setTextConfirmation(componentRef.instance);
|
|
9339
9325
|
componentRef.instance.events.subscribe(event => {
|
|
9340
|
-
// * Fecha o dialogo
|
|
9341
9326
|
if (event === TCloudUiDialogEventsEnum.close)
|
|
9342
|
-
|
|
9327
|
+
this.destroyDialog(componentRef);
|
|
9343
9328
|
});
|
|
9344
9329
|
return componentRef.instance;
|
|
9345
9330
|
}
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9331
|
+
createDialogComponent() {
|
|
9332
|
+
if (this.rootViewContainer) {
|
|
9333
|
+
return this.rootViewContainer.createComponent(TCloudUiDialogComponent, {
|
|
9334
|
+
injector: this.rootViewContainer.injector,
|
|
9335
|
+
});
|
|
9336
|
+
}
|
|
9337
|
+
const componentRef = createComponent(TCloudUiDialogComponent, {
|
|
9338
|
+
environmentInjector: this.environmentInjector,
|
|
9339
|
+
});
|
|
9340
|
+
this.appRef.attachView(componentRef.hostView);
|
|
9341
|
+
document.body.appendChild(componentRef.location.nativeElement);
|
|
9342
|
+
return componentRef;
|
|
9343
|
+
}
|
|
9344
|
+
destroyDialog(componentRef) {
|
|
9345
|
+
if (this.rootViewContainer) {
|
|
9346
|
+
componentRef.destroy();
|
|
9347
|
+
return;
|
|
9348
|
+
}
|
|
9349
|
+
this.appRef.detachView(componentRef.hostView);
|
|
9350
|
+
componentRef.destroy();
|
|
9351
|
+
}
|
|
9350
9352
|
setTextConfirmation(component) {
|
|
9351
9353
|
switch (component.data.inputConfirmationText) {
|
|
9352
9354
|
case TCloudUiDialogTextConfirmationEnum.continue:
|
|
@@ -9370,6 +9372,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
9370
9372
|
}]
|
|
9371
9373
|
}] });
|
|
9372
9374
|
|
|
9375
|
+
/**
|
|
9376
|
+
* Opcional: use apenas se precisar ancorar o diálogo em um container específico da árvore de views
|
|
9377
|
+
* (ex.: stacking context, Shadow DOM). Caso contrário, `TCloudUiDialogService.open()` funciona sem setup.
|
|
9378
|
+
*/
|
|
9379
|
+
class TCloudUiDialogHostComponent {
|
|
9380
|
+
constructor() {
|
|
9381
|
+
this.dialogService = inject(TCloudUiDialogService);
|
|
9382
|
+
}
|
|
9383
|
+
ngAfterViewInit() {
|
|
9384
|
+
this.dialogService.setRootViewContainerRef(this.dialogRoot);
|
|
9385
|
+
}
|
|
9386
|
+
ngOnDestroy() {
|
|
9387
|
+
this.dialogService.setRootViewContainerRef(null);
|
|
9388
|
+
}
|
|
9389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiDialogHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9390
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TCloudUiDialogHostComponent, isStandalone: true, selector: "tcloud-ui-dialog-host", viewQueries: [{ propertyName: "dialogRoot", first: true, predicate: ["dialogRoot"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: '<ng-container #dialogRoot />', isInline: true }); }
|
|
9391
|
+
}
|
|
9392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiDialogHostComponent, decorators: [{
|
|
9393
|
+
type: Component,
|
|
9394
|
+
args: [{
|
|
9395
|
+
selector: 'tcloud-ui-dialog-host',
|
|
9396
|
+
standalone: true,
|
|
9397
|
+
template: '<ng-container #dialogRoot />',
|
|
9398
|
+
}]
|
|
9399
|
+
}], propDecorators: { dialogRoot: [{
|
|
9400
|
+
type: ViewChild,
|
|
9401
|
+
args: ['dialogRoot', { read: ViewContainerRef }]
|
|
9402
|
+
}] } });
|
|
9403
|
+
|
|
9373
9404
|
const COMPONENTS = [
|
|
9374
9405
|
TCloudUiAccordionComponent,
|
|
9375
9406
|
TCloudUiAccordionBodyComponent,
|
|
@@ -9422,6 +9453,7 @@ const COMPONENTS = [
|
|
|
9422
9453
|
TCloudUiDropdownComponent,
|
|
9423
9454
|
TCloudUiDropdownMultiComponent,
|
|
9424
9455
|
TCloudUiDialogComponent,
|
|
9456
|
+
TCloudUiDialogHostComponent,
|
|
9425
9457
|
TCloudUiEmptyContentComponent,
|
|
9426
9458
|
TCloudUiFaqComponent,
|
|
9427
9459
|
TCloudUiMessageComponent,
|
|
@@ -9553,6 +9585,7 @@ class TCloudUiModule {
|
|
|
9553
9585
|
TCloudUiDropdownComponent,
|
|
9554
9586
|
TCloudUiDropdownMultiComponent,
|
|
9555
9587
|
TCloudUiDialogComponent,
|
|
9588
|
+
TCloudUiDialogHostComponent,
|
|
9556
9589
|
TCloudUiEmptyContentComponent,
|
|
9557
9590
|
TCloudUiFaqComponent,
|
|
9558
9591
|
TCloudUiMessageComponent,
|
|
@@ -9646,6 +9679,7 @@ class TCloudUiModule {
|
|
|
9646
9679
|
TCloudUiDropdownComponent,
|
|
9647
9680
|
TCloudUiDropdownMultiComponent,
|
|
9648
9681
|
TCloudUiDialogComponent,
|
|
9682
|
+
TCloudUiDialogHostComponent,
|
|
9649
9683
|
TCloudUiEmptyContentComponent,
|
|
9650
9684
|
TCloudUiFaqComponent,
|
|
9651
9685
|
TCloudUiMessageComponent,
|
|
@@ -11777,5 +11811,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
11777
11811
|
* Generated bundle index. Do not edit.
|
|
11778
11812
|
*/
|
|
11779
11813
|
|
|
11780
|
-
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize$1 as DropdownMultiSize, DropdownSize$1 as DropdownSize, MonthNamePipe, MultiLevelDropdownSize$1 as MultiLevelDropdownSize, ProductActionPipe, ProgressStatusBarGradientStatus$1 as ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCLOUD_UI_CONFIG, TCLOUD_UI_LAYOUT_SERVICE, TCLOUD_UI_LOCALE_SERVICE, TCLOUD_UI_USER_SERVICE, TCLOUD_UI_VIEWPORT_SERVICE, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionTitleComponent, TCloudUiAlertBannerComponent, TCloudUiAlignDirective, TCloudUiBreadcrumbComponent, TCloudUiBreadcrumbService, TCloudUiButtonDirective, TCloudUiCalendarComponent, TCloudUiCardAccordionComponent, TCloudUiCardComponent, TCloudUiCardTitleComponent, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiCheckboxDirective, TCloudUiChoiceIssuesComponent, TCloudUiContainerColComponent, TCloudUiContainerComponent, TCloudUiContainerContentComponent, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerTimeComponent, TCloudUiDialogComponent, TCloudUiDialogEventsEnum, TCloudUiDialogModel, TCloudUiDialogService, TCloudUiDialogStatusEnum, TCloudUiDialogTextConfirmationEnum, TCloudUiDigitOnlyDirective, TCloudUiDropdownComponent, TCloudUiDropdownMultiComponent, TCloudUiDropdownMultiLevelComponent, TCloudUiElCopyDirective, TCloudUiEmptyContentComponent, TCloudUiFaqComponent, TCloudUiFilterBarComponent, TCloudUiFiltersComponent, TCloudUiFormDirective, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiIconButtonDirective, TCloudUiInputContainerComponent, TCloudUiInputDirective, TCloudUiInputPasswordComponent, TCloudUiInputSearchComponent, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLegendComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepTitleComponent, TCloudUiLinhaLogoComponent, TCloudUiLoadingComponent, TCloudUiLoadingTransitionsService, TCloudUiMessageComponent, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiSelectComponent, TCloudUiMultiplesValuesComponent, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNumberStepComponent, TCloudUiPaginationComponent, TCloudUiPaginationPipe, TCloudUiProgressBarComponent, TCloudUiProgressStatusBarComponent, TCloudUiRadioDirective, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiScrollBoxComponent, TCloudUiSearchBarComponent, TCloudUiSearchInObjectService, TCloudUiSearchInputComponent, TCloudUiSkeletonLoadingComponent, TCloudUiSkeletonLoadingComponentStyle, TCloudUiSlideToggleDirective, TCloudUiSubNavbarComponent, TCloudUiSubNavbarGroupComponent, TCloudUiSubNavbarItemComponent, TCloudUiTabContentComponent, TCloudUiTabGroupComponent, TCloudUiTabHeadComponent, TCloudUiTabItemComponent, TCloudUiTabMenuComponent, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTagComponent, TCloudUiToastComponent, TCloudUiTooltipDirective, TCloudUiUploadAreaComponent, TCloudUiWelcomeComponent, TCloudUiWizardStepsComponent, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSkeletonLoadingComponent, TcRevSkeletonLoadingComponentStyle, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevTooltipDirective, TcRevWizardStepsComponent, ToTextPipe, TopologyEnvironmentPipe, TopologyProductPipe, TopologyRegionPipe, TopologyStatusPipe, echartBarConfig, isTextEllipsed, provideTCloudUi };
|
|
11814
|
+
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize$1 as DropdownMultiSize, DropdownSize$1 as DropdownSize, MonthNamePipe, MultiLevelDropdownSize$1 as MultiLevelDropdownSize, ProductActionPipe, ProgressStatusBarGradientStatus$1 as ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCLOUD_UI_CONFIG, TCLOUD_UI_LAYOUT_SERVICE, TCLOUD_UI_LOCALE_SERVICE, TCLOUD_UI_USER_SERVICE, TCLOUD_UI_VIEWPORT_SERVICE, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionTitleComponent, TCloudUiAlertBannerComponent, TCloudUiAlignDirective, TCloudUiBreadcrumbComponent, TCloudUiBreadcrumbService, TCloudUiButtonDirective, TCloudUiCalendarComponent, TCloudUiCardAccordionComponent, TCloudUiCardComponent, TCloudUiCardTitleComponent, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiCheckboxDirective, TCloudUiChoiceIssuesComponent, TCloudUiContainerColComponent, TCloudUiContainerComponent, TCloudUiContainerContentComponent, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerTimeComponent, TCloudUiDialogComponent, TCloudUiDialogEventsEnum, TCloudUiDialogHostComponent, TCloudUiDialogModel, TCloudUiDialogService, TCloudUiDialogStatusEnum, TCloudUiDialogTextConfirmationEnum, TCloudUiDigitOnlyDirective, TCloudUiDropdownComponent, TCloudUiDropdownMultiComponent, TCloudUiDropdownMultiLevelComponent, TCloudUiElCopyDirective, TCloudUiEmptyContentComponent, TCloudUiFaqComponent, TCloudUiFilterBarComponent, TCloudUiFiltersComponent, TCloudUiFormDirective, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiIconButtonDirective, TCloudUiInputContainerComponent, TCloudUiInputDirective, TCloudUiInputPasswordComponent, TCloudUiInputSearchComponent, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLegendComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepTitleComponent, TCloudUiLinhaLogoComponent, TCloudUiLoadingComponent, TCloudUiLoadingTransitionsService, TCloudUiMessageComponent, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiSelectComponent, TCloudUiMultiplesValuesComponent, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNumberStepComponent, TCloudUiPaginationComponent, TCloudUiPaginationPipe, TCloudUiProgressBarComponent, TCloudUiProgressStatusBarComponent, TCloudUiRadioDirective, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiScrollBoxComponent, TCloudUiSearchBarComponent, TCloudUiSearchInObjectService, TCloudUiSearchInputComponent, TCloudUiSkeletonLoadingComponent, TCloudUiSkeletonLoadingComponentStyle, TCloudUiSlideToggleDirective, TCloudUiSubNavbarComponent, TCloudUiSubNavbarGroupComponent, TCloudUiSubNavbarItemComponent, TCloudUiTabContentComponent, TCloudUiTabGroupComponent, TCloudUiTabHeadComponent, TCloudUiTabItemComponent, TCloudUiTabMenuComponent, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTagComponent, TCloudUiToastComponent, TCloudUiTooltipDirective, TCloudUiUploadAreaComponent, TCloudUiWelcomeComponent, TCloudUiWizardStepsComponent, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSkeletonLoadingComponent, TcRevSkeletonLoadingComponentStyle, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevTooltipDirective, TcRevWizardStepsComponent, ToTextPipe, TopologyEnvironmentPipe, TopologyProductPipe, TopologyRegionPipe, TopologyStatusPipe, echartBarConfig, isTextEllipsed, provideTCloudUi };
|
|
11781
11815
|
//# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map
|