@open-rlb/ng-bootstrap 3.1.23 → 3.1.24
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 { signal, Component, input, booleanAttribute, effect, Host, Self, Optional, Directive, Injectable, output, contentChild, computed, contentChildren, viewChild, numberAttribute, model, ViewChild, isSignal, Pipe, ChangeDetectionStrategy, inject, DOCUMENT, Inject, HostListener, InjectionToken, viewChildren,
|
|
2
|
+
import { signal, Component, input, booleanAttribute, effect, Host, Self, Optional, Directive, Injectable, output, contentChild, computed, contentChildren, viewChild, numberAttribute, model, ViewChild, isSignal, Pipe, ChangeDetectionStrategy, inject, ViewContainerRef, Renderer2, DOCUMENT, Inject, HostListener, InjectionToken, viewChildren, untracked, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { Collapse, Carousel, Dropdown, Modal, Toast, Offcanvas, ScrollSpy, Popover, Tooltip } from 'bootstrap';
|
|
4
4
|
import * as i2 from '@angular/router';
|
|
5
5
|
import { RouterModule } from '@angular/router';
|
|
@@ -4211,8 +4211,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4211
4211
|
}], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }] } });
|
|
4212
4212
|
|
|
4213
4213
|
class NavbarDropdownItemComponent {
|
|
4214
|
-
constructor(
|
|
4215
|
-
this.
|
|
4214
|
+
constructor() {
|
|
4215
|
+
this.listeners = [];
|
|
4216
4216
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), alias: 'disabled', transform: booleanAttribute });
|
|
4217
4217
|
this.dropdown = input(false, { ...(ngDevMode ? { debugName: "dropdown" } : {}), alias: 'dropdown', transform: booleanAttribute });
|
|
4218
4218
|
this.href = input(undefined, ...(ngDevMode ? [{ debugName: "href" }] : []));
|
|
@@ -4220,6 +4220,7 @@ class NavbarDropdownItemComponent {
|
|
|
4220
4220
|
this.toggle = input(undefined, ...(ngDevMode ? [{ debugName: "toggle" }] : []));
|
|
4221
4221
|
this.autoClose = input('default', { ...(ngDevMode ? { debugName: "autoClose" } : {}), alias: 'auto-close' });
|
|
4222
4222
|
this.click = output();
|
|
4223
|
+
this.statusChanged = output({ alias: 'status-changed' });
|
|
4223
4224
|
this._autoClose = computed(() => {
|
|
4224
4225
|
switch (this.autoClose()) {
|
|
4225
4226
|
case 'default':
|
|
@@ -4234,58 +4235,76 @@ class NavbarDropdownItemComponent {
|
|
|
4234
4235
|
return 'true';
|
|
4235
4236
|
}
|
|
4236
4237
|
}, ...(ngDevMode ? [{ debugName: "_autoClose" }] : []));
|
|
4238
|
+
this.template = viewChild.required('template');
|
|
4239
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
4240
|
+
this.renderer = inject(Renderer2);
|
|
4237
4241
|
}
|
|
4238
4242
|
ngOnInit() {
|
|
4239
|
-
const templateView = this.viewContainerRef.createEmbeddedView(this.template);
|
|
4243
|
+
const templateView = this.viewContainerRef.createEmbeddedView(this.template());
|
|
4240
4244
|
this.element = templateView.rootNodes[0];
|
|
4241
4245
|
this.viewContainerRef.element.nativeElement.remove();
|
|
4246
|
+
const anchor = this.element.querySelector('a');
|
|
4247
|
+
if (anchor && this.dropdown()) {
|
|
4248
|
+
this.listeners.push(this.renderer.listen(anchor, 'show.bs.dropdown', () => this.statusChanged.emit('show')), this.renderer.listen(anchor, 'shown.bs.dropdown', () => this.statusChanged.emit('shown')), this.renderer.listen(anchor, 'hide.bs.dropdown', () => this.statusChanged.emit('hide')), this.renderer.listen(anchor, 'hidden.bs.dropdown', () => this.statusChanged.emit('hidden')));
|
|
4249
|
+
}
|
|
4242
4250
|
}
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
[
|
|
4253
|
-
[href]="(dropdown() || toggle()) ? '#' : href()"
|
|
4254
|
-
(click)="click.emit($event)"
|
|
4251
|
+
ngOnDestroy() {
|
|
4252
|
+
this.listeners.forEach(unsub => unsub());
|
|
4253
|
+
this.listeners = [];
|
|
4254
|
+
}
|
|
4255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavbarDropdownItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4256
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.1", type: NavbarDropdownItemComponent, isStandalone: false, selector: "rlb-navbar-dropdown-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "auto-close", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click", statusChanged: "status-changed" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
4257
|
+
<ng-template #template>
|
|
4258
|
+
<li
|
|
4259
|
+
class="nav-item"
|
|
4260
|
+
[class.dropdown]="dropdown()"
|
|
4255
4261
|
>
|
|
4256
|
-
<
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4262
|
+
<a
|
|
4263
|
+
class="nav-link {{ cssClass() }}"
|
|
4264
|
+
[class.dropdown-toggle]="dropdown()"
|
|
4265
|
+
[attr.role]="dropdown() || toggle() ? 'button' : undefined"
|
|
4266
|
+
[attr.data-bs-toggle]="dropdown() ? 'dropdown' : undefined"
|
|
4267
|
+
[attr.aria-expanded]="dropdown() || toggle() ? 'false' : undefined"
|
|
4268
|
+
[attr.data-bs-auto-close]="_autoClose()"
|
|
4269
|
+
[href]="dropdown() || toggle() ? '#' : href()"
|
|
4270
|
+
(click)="click.emit($event)"
|
|
4271
|
+
>
|
|
4272
|
+
<ng-content select=":not(rlb-dropdown-container)"></ng-content>
|
|
4273
|
+
</a>
|
|
4274
|
+
<ng-content select="rlb-dropdown-container"></ng-content>
|
|
4275
|
+
</li>
|
|
4276
|
+
</ng-template>
|
|
4277
|
+
`, isInline: true }); }
|
|
4261
4278
|
}
|
|
4262
4279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavbarDropdownItemComponent, decorators: [{
|
|
4263
4280
|
type: Component,
|
|
4264
4281
|
args: [{
|
|
4265
4282
|
selector: 'rlb-navbar-dropdown-item',
|
|
4266
|
-
template: `
|
|
4267
|
-
<
|
|
4268
|
-
<
|
|
4269
|
-
class="nav-
|
|
4270
|
-
[class.dropdown
|
|
4271
|
-
[attr.role]="(dropdown() || toggle()) ? 'button' : undefined"
|
|
4272
|
-
[attr.data-bs-toggle]="dropdown() ? 'dropdown' : undefined"
|
|
4273
|
-
[attr.aria-expanded]="(dropdown() || toggle()) ? 'false' : undefined"
|
|
4274
|
-
[attr.data-bs-auto-close]="_autoClose()"
|
|
4275
|
-
[href]="(dropdown() || toggle()) ? '#' : href()"
|
|
4276
|
-
(click)="click.emit($event)"
|
|
4283
|
+
template: `
|
|
4284
|
+
<ng-template #template>
|
|
4285
|
+
<li
|
|
4286
|
+
class="nav-item"
|
|
4287
|
+
[class.dropdown]="dropdown()"
|
|
4277
4288
|
>
|
|
4278
|
-
<
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4289
|
+
<a
|
|
4290
|
+
class="nav-link {{ cssClass() }}"
|
|
4291
|
+
[class.dropdown-toggle]="dropdown()"
|
|
4292
|
+
[attr.role]="dropdown() || toggle() ? 'button' : undefined"
|
|
4293
|
+
[attr.data-bs-toggle]="dropdown() ? 'dropdown' : undefined"
|
|
4294
|
+
[attr.aria-expanded]="dropdown() || toggle() ? 'false' : undefined"
|
|
4295
|
+
[attr.data-bs-auto-close]="_autoClose()"
|
|
4296
|
+
[href]="dropdown() || toggle() ? '#' : href()"
|
|
4297
|
+
(click)="click.emit($event)"
|
|
4298
|
+
>
|
|
4299
|
+
<ng-content select=":not(rlb-dropdown-container)"></ng-content>
|
|
4300
|
+
</a>
|
|
4301
|
+
<ng-content select="rlb-dropdown-container"></ng-content>
|
|
4302
|
+
</li>
|
|
4303
|
+
</ng-template>
|
|
4304
|
+
`,
|
|
4305
|
+
standalone: false,
|
|
4284
4306
|
}]
|
|
4285
|
-
}],
|
|
4286
|
-
type: ViewChild,
|
|
4287
|
-
args: ['template', { static: true }]
|
|
4288
|
-
}] } });
|
|
4307
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], toggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggle", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "auto-close", required: false }] }], click: [{ type: i0.Output, args: ["click"] }], statusChanged: [{ type: i0.Output, args: ["status-changed"] }], template: [{ type: i0.ViewChild, args: ['template', { isSignal: true }] }] } });
|
|
4289
4308
|
|
|
4290
4309
|
class NavbarItemComponent {
|
|
4291
4310
|
constructor(viewContainerRef) {
|