@recursyve/nice-ui-kit.v2 14.0.0-beta.106 → 14.0.0-beta.108
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/esm2020/lib/components/async-typeahead/async-typeahead.component.mjs +6 -2
- package/esm2020/lib/components/collapsable/collapsable.component.mjs +3 -3
- package/esm2020/lib/components/navigation/components/hint-component-base.mjs +120 -0
- package/esm2020/lib/components/navigation/directives/show-hint.directive.mjs +35 -12
- package/esm2020/lib/components/navigation/public-api.mjs +2 -1
- package/esm2020/lib/pipes/pipes.module.mjs +10 -5
- package/esm2020/lib/pipes/public-api.mjs +2 -1
- package/esm2020/lib/pipes/track-by-prop.pipe.mjs +14 -0
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +176 -18
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +176 -18
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/components/async-typeahead/async-typeahead.component.d.ts +2 -1
- package/lib/components/navigation/components/hint-component-base.d.ts +65 -0
- package/lib/components/navigation/directives/show-hint.directive.d.ts +7 -4
- package/lib/components/navigation/public-api.d.ts +1 -0
- package/lib/pipes/pipes.module.d.ts +2 -1
- package/lib/pipes/public-api.d.ts +1 -0
- package/lib/pipes/track-by-prop.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/src/lib/components/collapsable/collapsable.theme.scss +6 -9
|
@@ -2819,6 +2819,7 @@ class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComponent {
|
|
|
2819
2819
|
this.open = false;
|
|
2820
2820
|
this.panelWidth = 0;
|
|
2821
2821
|
this.active$ = this.service.active$;
|
|
2822
|
+
this.entityRemoved = new EventEmitter();
|
|
2822
2823
|
this.preloadResource = false;
|
|
2823
2824
|
this.allowNotFoundItems = false;
|
|
2824
2825
|
this.panelClass = [];
|
|
@@ -3029,6 +3030,7 @@ class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComponent {
|
|
|
3029
3030
|
this.ngControl.control.markAsTouched();
|
|
3030
3031
|
}
|
|
3031
3032
|
this.stateChanges.next();
|
|
3033
|
+
this.entityRemoved.emit();
|
|
3032
3034
|
if (reload) {
|
|
3033
3035
|
this.service.search(this.resource, "", this.searchOptions);
|
|
3034
3036
|
}
|
|
@@ -3111,7 +3113,7 @@ class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComponent {
|
|
|
3111
3113
|
}
|
|
3112
3114
|
}
|
|
3113
3115
|
NiceAsyncTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAsyncTypeaheadComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i1$2.NgForm, optional: true }, { token: i1$2.FormGroupDirective, optional: true }, { token: i2$1.ErrorStateMatcher }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: NiceAsyncTypeaheadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3114
|
-
NiceAsyncTypeaheadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAsyncTypeaheadComponent, selector: "nice-async-typeahead", inputs: { resource: "resource", searchOptions: "searchOptions", preloadResource: "preloadResource", allowNotFoundItems: "allowNotFoundItems", panelClass: "panelClass", bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", emptyPlaceholder: "emptyPlaceholder", optionTemplate: "optionTemplate", filterFn: "filterFn", labelFormatFn: "labelFormatFn", disabled: "disabled", value: "value", required: "required" }, outputs: { selected: "selected" }, host: { properties: { "class.floating": "this.shouldLabelFloat", "id": "this.id", "attr.aria-describedby": "this.describedBy" } }, providers: [
|
|
3116
|
+
NiceAsyncTypeaheadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAsyncTypeaheadComponent, selector: "nice-async-typeahead", inputs: { resource: "resource", searchOptions: "searchOptions", preloadResource: "preloadResource", allowNotFoundItems: "allowNotFoundItems", panelClass: "panelClass", bindValue: "bindValue", bindLabel: "bindLabel", placeholder: "placeholder", emptyPlaceholder: "emptyPlaceholder", optionTemplate: "optionTemplate", filterFn: "filterFn", labelFormatFn: "labelFormatFn", disabled: "disabled", value: "value", required: "required" }, outputs: { entityRemoved: "entityRemoved", selected: "selected" }, host: { properties: { "class.floating": "this.shouldLabelFloat", "id": "this.id", "attr.aria-describedby": "this.describedBy" } }, providers: [
|
|
3115
3117
|
{
|
|
3116
3118
|
provide: MatFormFieldControl,
|
|
3117
3119
|
useExisting: NiceAsyncTypeaheadComponent
|
|
@@ -3141,6 +3143,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
3141
3143
|
}], options: [{
|
|
3142
3144
|
type: ViewChildren,
|
|
3143
3145
|
args: [MatOption]
|
|
3146
|
+
}], entityRemoved: [{
|
|
3147
|
+
type: Output
|
|
3144
3148
|
}], resource: [{
|
|
3145
3149
|
type: Input
|
|
3146
3150
|
}], searchOptions: [{
|
|
@@ -3576,10 +3580,10 @@ class NiceCollapsableComponent {
|
|
|
3576
3580
|
}
|
|
3577
3581
|
}
|
|
3578
3582
|
NiceCollapsableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceCollapsableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3579
|
-
NiceCollapsableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceCollapsableComponent, selector: "nice-collapsable", inputs: { open: "open" }, outputs: { openChange: "openChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"collapse\">\n <input type=\"checkbox\" class=\"peer cursor-pointer\" [formControl]=\"control\"/>\n <div class=\"collapse-title\">\n <ng-content select=\"[niceCollapsableTitle]\"></ng-content>\n </div>\n <div class=\"collapse-content\">\n <div class=\"content\">\n <ng-content select=\"[niceCollapsableContent]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3583
|
+
NiceCollapsableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceCollapsableComponent, selector: "nice-collapsable", inputs: { open: "open" }, outputs: { openChange: "openChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"nice-collapse\">\n <input type=\"checkbox\" class=\"peer cursor-pointer\" [formControl]=\"control\"/>\n <div class=\"collapse-title\">\n <ng-content select=\"[niceCollapsableTitle]\"></ng-content>\n </div>\n <div class=\"collapse-content\">\n <div class=\"content\">\n <ng-content select=\"[niceCollapsableContent]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3580
3584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceCollapsableComponent, decorators: [{
|
|
3581
3585
|
type: Component,
|
|
3582
|
-
args: [{ selector: "nice-collapsable", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"collapse\">\n <input type=\"checkbox\" class=\"peer cursor-pointer\" [formControl]=\"control\"/>\n <div class=\"collapse-title\">\n <ng-content select=\"[niceCollapsableTitle]\"></ng-content>\n </div>\n <div class=\"collapse-content\">\n <div class=\"content\">\n <ng-content select=\"[niceCollapsableContent]\"></ng-content>\n </div>\n </div>\n</div>\n" }]
|
|
3586
|
+
args: [{ selector: "nice-collapsable", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"nice-collapse\">\n <input type=\"checkbox\" class=\"peer cursor-pointer\" [formControl]=\"control\"/>\n <div class=\"collapse-title\">\n <ng-content select=\"[niceCollapsableTitle]\"></ng-content>\n </div>\n <div class=\"collapse-content\">\n <div class=\"content\">\n <ng-content select=\"[niceCollapsableContent]\"></ng-content>\n </div>\n </div>\n</div>\n" }]
|
|
3583
3587
|
}], propDecorators: { open: [{
|
|
3584
3588
|
type: Input
|
|
3585
3589
|
}], openChange: [{
|
|
@@ -4199,6 +4203,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
4199
4203
|
args: [{ name: "sanitizeBypass" }]
|
|
4200
4204
|
}], ctorParameters: function () { return [{ type: i1$7.DomSanitizer }]; } });
|
|
4201
4205
|
|
|
4206
|
+
class TrackByPropPipe {
|
|
4207
|
+
transform(prop) {
|
|
4208
|
+
return (_, item) => item[prop];
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
TrackByPropPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TrackByPropPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4212
|
+
TrackByPropPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: TrackByPropPipe, name: "trackByProp" });
|
|
4213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TrackByPropPipe, decorators: [{
|
|
4214
|
+
type: Pipe,
|
|
4215
|
+
args: [{ name: "trackByProp" }]
|
|
4216
|
+
}] });
|
|
4217
|
+
|
|
4202
4218
|
class NicePipesModule {
|
|
4203
4219
|
}
|
|
4204
4220
|
NicePipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -4223,7 +4239,8 @@ NicePipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
4223
4239
|
RangePipe,
|
|
4224
4240
|
RoundPipe,
|
|
4225
4241
|
SanitizeBypassPipe,
|
|
4226
|
-
SecondsToTimePipe
|
|
4242
|
+
SecondsToTimePipe,
|
|
4243
|
+
TrackByPropPipe], exports: [BooleanPipe,
|
|
4227
4244
|
CapitalizeFirstLetterPipe,
|
|
4228
4245
|
CeilPipe,
|
|
4229
4246
|
FindByKeyPipe,
|
|
@@ -4244,7 +4261,8 @@ NicePipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
4244
4261
|
RangePipe,
|
|
4245
4262
|
RoundPipe,
|
|
4246
4263
|
SanitizeBypassPipe,
|
|
4247
|
-
SecondsToTimePipe
|
|
4264
|
+
SecondsToTimePipe,
|
|
4265
|
+
TrackByPropPipe] });
|
|
4248
4266
|
NicePipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePipesModule, providers: [
|
|
4249
4267
|
BooleanPipe,
|
|
4250
4268
|
CapitalizeFirstLetterPipe,
|
|
@@ -4294,7 +4312,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
4294
4312
|
RangePipe,
|
|
4295
4313
|
RoundPipe,
|
|
4296
4314
|
SanitizeBypassPipe,
|
|
4297
|
-
SecondsToTimePipe
|
|
4315
|
+
SecondsToTimePipe,
|
|
4316
|
+
TrackByPropPipe
|
|
4298
4317
|
],
|
|
4299
4318
|
providers: [
|
|
4300
4319
|
BooleanPipe,
|
|
@@ -4342,7 +4361,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
4342
4361
|
RangePipe,
|
|
4343
4362
|
RoundPipe,
|
|
4344
4363
|
SanitizeBypassPipe,
|
|
4345
|
-
SecondsToTimePipe
|
|
4364
|
+
SecondsToTimePipe,
|
|
4365
|
+
TrackByPropPipe
|
|
4346
4366
|
]
|
|
4347
4367
|
}]
|
|
4348
4368
|
}] });
|
|
@@ -7036,6 +7056,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
7036
7056
|
}]
|
|
7037
7057
|
}] });
|
|
7038
7058
|
|
|
7059
|
+
// tslint:disable-next-line:class-name directive-class-suffix
|
|
7060
|
+
class _HintComponentBase {
|
|
7061
|
+
constructor(_changeDetectorRef) {
|
|
7062
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
7063
|
+
/** Whether interactions on the page should close the tooltip */
|
|
7064
|
+
this._closeOnInteraction = false;
|
|
7065
|
+
/** Whether the tooltip is currently visible. */
|
|
7066
|
+
this._isVisible = false;
|
|
7067
|
+
/** Subject for notifying that the tooltip has been hidden from the view */
|
|
7068
|
+
this._onHide = new Subject();
|
|
7069
|
+
}
|
|
7070
|
+
/**
|
|
7071
|
+
* Shows the tooltip with an animation originating from the provided origin
|
|
7072
|
+
* @param delay Amount of milliseconds to the delay showing the tooltip.
|
|
7073
|
+
*/
|
|
7074
|
+
show(delay) {
|
|
7075
|
+
// Cancel the delayed hide if it is scheduled
|
|
7076
|
+
clearTimeout(this._hideTimeoutId);
|
|
7077
|
+
this._showTimeoutId = setTimeout(() => {
|
|
7078
|
+
this._toggleVisibility(true);
|
|
7079
|
+
this._showTimeoutId = undefined;
|
|
7080
|
+
}, delay);
|
|
7081
|
+
}
|
|
7082
|
+
/**
|
|
7083
|
+
* Begins the animation to hide the tooltip after the provided delay in ms.
|
|
7084
|
+
* @param delay Amount of milliseconds to delay showing the tooltip.
|
|
7085
|
+
*/
|
|
7086
|
+
hide(delay) {
|
|
7087
|
+
// Cancel the delayed show if it is scheduled
|
|
7088
|
+
clearTimeout(this._showTimeoutId);
|
|
7089
|
+
this._hideTimeoutId = setTimeout(() => {
|
|
7090
|
+
this._toggleVisibility(false);
|
|
7091
|
+
this._hideTimeoutId = undefined;
|
|
7092
|
+
}, delay);
|
|
7093
|
+
}
|
|
7094
|
+
/** Returns an observable that notifies when the tooltip has been hidden from view. */
|
|
7095
|
+
afterHidden() {
|
|
7096
|
+
return this._onHide;
|
|
7097
|
+
}
|
|
7098
|
+
/** Whether the tooltip is being displayed. */
|
|
7099
|
+
isVisible() {
|
|
7100
|
+
return this._isVisible;
|
|
7101
|
+
}
|
|
7102
|
+
ngOnDestroy() {
|
|
7103
|
+
this._cancelPendingAnimations();
|
|
7104
|
+
this._onHide.complete();
|
|
7105
|
+
this._triggerElement = null;
|
|
7106
|
+
}
|
|
7107
|
+
/**
|
|
7108
|
+
* Interactions on the HTML body should close the tooltip immediately as defined in the
|
|
7109
|
+
* material design spec.
|
|
7110
|
+
* https://material.io/design/components/tooltips.html#behavior
|
|
7111
|
+
*/
|
|
7112
|
+
_handleBodyInteraction() {
|
|
7113
|
+
if (this._closeOnInteraction) {
|
|
7114
|
+
this.hide(0);
|
|
7115
|
+
}
|
|
7116
|
+
}
|
|
7117
|
+
/**
|
|
7118
|
+
* Marks that the tooltip needs to be checked in the next change detection run.
|
|
7119
|
+
* Mainly used for rendering the initial text before positioning a tooltip, which
|
|
7120
|
+
* can be problematic in components with OnPush change detection.
|
|
7121
|
+
*/
|
|
7122
|
+
_markForCheck() {
|
|
7123
|
+
this._changeDetectorRef.markForCheck();
|
|
7124
|
+
}
|
|
7125
|
+
_handleMouseLeave({ relatedTarget }) {
|
|
7126
|
+
if (!relatedTarget || !this._triggerElement.contains(relatedTarget)) {
|
|
7127
|
+
if (this.isVisible()) {
|
|
7128
|
+
this.hide(this._mouseLeaveHideDelay);
|
|
7129
|
+
}
|
|
7130
|
+
else {
|
|
7131
|
+
this._finalizeAnimation(false);
|
|
7132
|
+
}
|
|
7133
|
+
}
|
|
7134
|
+
}
|
|
7135
|
+
/**
|
|
7136
|
+
* Callback for when the timeout in this.show() gets completed.
|
|
7137
|
+
* This method is only needed by the mdc-tooltip, and so it is only implemented
|
|
7138
|
+
* in the mdc-tooltip, not here.
|
|
7139
|
+
*/
|
|
7140
|
+
_onShow() { }
|
|
7141
|
+
/** Cancels any pending animation sequences. */
|
|
7142
|
+
_cancelPendingAnimations() {
|
|
7143
|
+
clearTimeout(this._showTimeoutId);
|
|
7144
|
+
clearTimeout(this._hideTimeoutId);
|
|
7145
|
+
this._showTimeoutId = this._hideTimeoutId = undefined;
|
|
7146
|
+
}
|
|
7147
|
+
/** Handles the cleanup after an animation has finished. */
|
|
7148
|
+
_finalizeAnimation(toVisible) {
|
|
7149
|
+
if (toVisible) {
|
|
7150
|
+
this._closeOnInteraction = true;
|
|
7151
|
+
}
|
|
7152
|
+
else if (!this.isVisible()) {
|
|
7153
|
+
this._onHide.next();
|
|
7154
|
+
}
|
|
7155
|
+
}
|
|
7156
|
+
/** Toggles the visibility of the tooltip element. */
|
|
7157
|
+
_toggleVisibility(isVisible) {
|
|
7158
|
+
// We set the classes directly here ourselves so that toggling the tooltip state
|
|
7159
|
+
// isn't bound by change detection. This allows us to hide it even if the
|
|
7160
|
+
// view ref has been detached from the CD tree.
|
|
7161
|
+
this._isVisible = isVisible;
|
|
7162
|
+
if (isVisible) {
|
|
7163
|
+
this._onShow();
|
|
7164
|
+
}
|
|
7165
|
+
}
|
|
7166
|
+
}
|
|
7167
|
+
_HintComponentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: _HintComponentBase, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
7168
|
+
_HintComponentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: _HintComponentBase, host: { listeners: { "mouseleave": "_handleMouseLeave($event)" } }, ngImport: i0 });
|
|
7169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: _HintComponentBase, decorators: [{
|
|
7170
|
+
type: Directive
|
|
7171
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { _handleMouseLeave: [{
|
|
7172
|
+
type: HostListener,
|
|
7173
|
+
args: ["mouseleave", ["$event"]]
|
|
7174
|
+
}] } });
|
|
7175
|
+
|
|
7039
7176
|
class NiceNavigationService {
|
|
7040
7177
|
/**
|
|
7041
7178
|
* Constructor
|
|
@@ -7880,12 +8017,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
7880
8017
|
}] });
|
|
7881
8018
|
|
|
7882
8019
|
class NiceShowHintDirective {
|
|
7883
|
-
constructor(_overlay, _elementRef, _viewContainerRef, _ngZone, _platform, _hintService) {
|
|
8020
|
+
constructor(_overlay, _elementRef, _viewContainerRef, _ngZone, _platform, _focusMonitor, _hintService) {
|
|
7884
8021
|
this._overlay = _overlay;
|
|
7885
8022
|
this._elementRef = _elementRef;
|
|
7886
8023
|
this._viewContainerRef = _viewContainerRef;
|
|
7887
8024
|
this._ngZone = _ngZone;
|
|
7888
8025
|
this._platform = _platform;
|
|
8026
|
+
this._focusMonitor = _focusMonitor;
|
|
7889
8027
|
this._hintService = _hintService;
|
|
7890
8028
|
this.shouldShow = false;
|
|
7891
8029
|
this._pointerExitEventsInitialized = false;
|
|
@@ -7894,9 +8032,18 @@ class NiceShowHintDirective {
|
|
|
7894
8032
|
}
|
|
7895
8033
|
ngAfterViewInit() {
|
|
7896
8034
|
this._setupPointerEnterEventsIfNeeded();
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
8035
|
+
this._focusMonitor
|
|
8036
|
+
.monitor(this._elementRef)
|
|
8037
|
+
.pipe(takeUntil(this.unsubscribeAll$))
|
|
8038
|
+
.subscribe(origin => {
|
|
8039
|
+
// Note that the focus monitor runs outside the Angular zone.
|
|
8040
|
+
if (!origin) {
|
|
8041
|
+
this._ngZone.run(() => this.hide());
|
|
8042
|
+
}
|
|
8043
|
+
else if (origin === "keyboard") {
|
|
8044
|
+
this._ngZone.run(() => this.show());
|
|
8045
|
+
}
|
|
8046
|
+
});
|
|
7900
8047
|
}
|
|
7901
8048
|
ngOnDestroy() {
|
|
7902
8049
|
this.unsubscribeAll$.next();
|
|
@@ -7907,15 +8054,26 @@ class NiceShowHintDirective {
|
|
|
7907
8054
|
return;
|
|
7908
8055
|
}
|
|
7909
8056
|
const overlayRef = this._createOverlay();
|
|
8057
|
+
this._portal = this._portal || new ComponentPortal(this.item.hint.component);
|
|
7910
8058
|
this._detach();
|
|
7911
8059
|
this._hintInstance = overlayRef.attach(this._portal).instance;
|
|
8060
|
+
this._hintInstance._triggerElement = this._elementRef.nativeElement;
|
|
8061
|
+
this._hintInstance
|
|
8062
|
+
.afterHidden()
|
|
8063
|
+
.pipe(takeUntil(this.unsubscribeAll$))
|
|
8064
|
+
.subscribe(() => this._detach());
|
|
7912
8065
|
this._hintService.setActiveHint(true);
|
|
7913
8066
|
}
|
|
7914
8067
|
hide() {
|
|
7915
8068
|
const instance = this._hintInstance;
|
|
7916
8069
|
if (instance) {
|
|
7917
|
-
|
|
7918
|
-
|
|
8070
|
+
if (instance.isVisible()) {
|
|
8071
|
+
instance.hide(0);
|
|
8072
|
+
}
|
|
8073
|
+
else {
|
|
8074
|
+
instance._cancelPendingAnimations();
|
|
8075
|
+
this._detach();
|
|
8076
|
+
}
|
|
7919
8077
|
}
|
|
7920
8078
|
}
|
|
7921
8079
|
_createOverlay() {
|
|
@@ -7958,10 +8116,10 @@ class NiceShowHintDirective {
|
|
|
7958
8116
|
.detachments()
|
|
7959
8117
|
.pipe(takeUntil(this.unsubscribeAll$))
|
|
7960
8118
|
.subscribe(() => this._detach());
|
|
7961
|
-
|
|
8119
|
+
this._overlayRef
|
|
7962
8120
|
.outsidePointerEvents()
|
|
7963
8121
|
.pipe(takeUntil(this.unsubscribeAll$))
|
|
7964
|
-
.subscribe(() => this._hintInstance?._handleBodyInteraction())
|
|
8122
|
+
.subscribe(() => this._hintInstance?._handleBodyInteraction());
|
|
7965
8123
|
return this._overlayRef;
|
|
7966
8124
|
}
|
|
7967
8125
|
_detach() {
|
|
@@ -8020,12 +8178,12 @@ class NiceShowHintDirective {
|
|
|
8020
8178
|
});
|
|
8021
8179
|
}
|
|
8022
8180
|
}
|
|
8023
|
-
NiceShowHintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceShowHintDirective, deps: [{ token: i1$5.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i1$d.Platform }, { token: NiceNavigationHintService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8181
|
+
NiceShowHintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceShowHintDirective, deps: [{ token: i1$5.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i1$d.Platform }, { token: i2$2.FocusMonitor }, { token: NiceNavigationHintService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8024
8182
|
NiceShowHintDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceShowHintDirective, selector: "[niceShowHint]", inputs: { shouldShow: "shouldShow", item: "item" }, ngImport: i0 });
|
|
8025
8183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceShowHintDirective, decorators: [{
|
|
8026
8184
|
type: Directive,
|
|
8027
8185
|
args: [{ selector: "[niceShowHint]" }]
|
|
8028
|
-
}], ctorParameters: function () { return [{ type: i1$5.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i1$d.Platform }, { type: NiceNavigationHintService }]; }, propDecorators: { shouldShow: [{
|
|
8186
|
+
}], ctorParameters: function () { return [{ type: i1$5.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i1$d.Platform }, { type: i2$2.FocusMonitor }, { type: NiceNavigationHintService }]; }, propDecorators: { shouldShow: [{
|
|
8029
8187
|
type: Input
|
|
8030
8188
|
}], item: [{
|
|
8031
8189
|
type: Input
|
|
@@ -10558,5 +10716,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
10558
10716
|
* Generated bundle index. Do not edit.
|
|
10559
10717
|
*/
|
|
10560
10718
|
|
|
10561
|
-
export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NavigationHideItemResolver, NavigationHintResolver, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselActiveContentDirective, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceCollapsableComponent, NiceCollapsableModule, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDateRangePickerComponent, NiceDateRangePickerModule, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertDirective, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TypeUtils, UrlUtils, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
|
|
10719
|
+
export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NavigationHideItemResolver, NavigationHintResolver, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselActiveContentDirective, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceCollapsableComponent, NiceCollapsableModule, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDateRangePickerComponent, NiceDateRangePickerModule, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertDirective, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TrackByPropPipe, TypeUtils, UrlUtils, _HintComponentBase, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
|
|
10562
10720
|
//# sourceMappingURL=recursyve-nice-ui-kit.v2.mjs.map
|