@ngflux/ngflux 2.1.0 → 2.2.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.
- package/fesm2022/ngflux-ngflux.mjs +846 -59
- package/fesm2022/ngflux-ngflux.mjs.map +1 -1
- package/lib/components/actions/actions.component.scss +13 -0
- package/lib/components/frame/frame.component.scss +228 -0
- package/lib/components/frame/header-menu/header-menu.component.scss +102 -0
- package/lib/components/frame/side-menu/side-menu.component.scss +83 -0
- package/lib/components/input/pin/pin.component.scss +38 -0
- package/lib/components/input/select/items/items.component.scss +73 -0
- package/lib/components/input/select/select.component.scss +149 -0
- package/lib/components/tab/group/group.component.scss +3 -0
- package/lib/components/tab/navbar/navbar.component.scss +10 -0
- package/lib/components/tab/panel/panel.component.scss +3 -0
- package/lib/components/tab/tab.component.scss +3 -0
- package/package.json +1 -1
- package/scss/features/_index.scss +1 -0
- package/scss/features/icons.scss +34 -0
- package/scss/features/tab.scss +31 -0
- package/types/ngflux-ngflux.d.ts +224 -9
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ElementRef,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { InjectionToken, input, Component, inject, ElementRef, computed, HostBinding, ChangeDetectionStrategy, Injector, viewChild, ViewContainerRef, ApplicationRef, signal, createComponent, effect, Injectable, linkedSignal, output, model, untracked, booleanAttribute, Directive, viewChildren, TemplateRef, debounced, HostListener, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/router';
|
|
4
|
+
import { TitleStrategy, Router, ActivationEnd, RouterLink, RouterLinkActive, isActive, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
|
|
5
|
+
import { filter, map, AsyncSubject } from 'rxjs';
|
|
6
|
+
import { NgClass, KeyValuePipe, NgTemplateOutlet } from '@angular/common';
|
|
7
|
+
import { Title, Meta } from '@angular/platform-browser';
|
|
6
8
|
import * as i1 from '@angular/forms';
|
|
7
9
|
import { FormsModule } from '@angular/forms';
|
|
10
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
8
11
|
|
|
9
12
|
const NGF_CONFIG = new InjectionToken('ngf-config');
|
|
13
|
+
// END: Pagination
|
|
10
14
|
|
|
11
15
|
const NGF_DIALOG_DATA = new InjectionToken('ngf-dialog-data');
|
|
12
16
|
|
|
17
|
+
class NgFluxActions {
|
|
18
|
+
justify = input('end', /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []));
|
|
20
|
+
wrap = input(true, /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
22
|
+
gap = input(10, /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: NgFluxActions, isStandalone: true, selector: "ngf-actions", inputs: { justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"wrapper\" [class.wrap]=\"wrap()\" [style.gap.px]=\"gap()\" [style.justify-content]=\"justify()\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block}:host>.wrapper{display:flex;flex-direction:row;align-items:center}:host>.wrapper.wrap{flex-wrap:wrap}\n"] });
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxActions, decorators: [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{ selector: 'ngf-actions', imports: [], template: "<div class=\"wrapper\" [class.wrap]=\"wrap()\" [style.gap.px]=\"gap()\" [style.justify-content]=\"justify()\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block}:host>.wrapper{display:flex;flex-direction:row;align-items:center}:host>.wrapper.wrap{flex-wrap:wrap}\n"] }]
|
|
30
|
+
}], propDecorators: { justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }] } });
|
|
31
|
+
|
|
13
32
|
class NgFluxButton {
|
|
14
33
|
ref = inject(ElementRef);
|
|
15
34
|
icon = input(/* @ts-ignore */
|
|
@@ -40,10 +59,10 @@ class NgFluxButton {
|
|
|
40
59
|
get isBlock() { return this.block(); }
|
|
41
60
|
get isDisabled() { return this.disabled(); }
|
|
42
61
|
get tabIndex() { return 1; }
|
|
43
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
44
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxButton, isStandalone: true, selector: "ngf-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.bindClass", "class.block": "this.isBlock", "class.disabled": "this.isDisabled", "tabIndex": "this.tabIndex" } }, ngImport: i0, template: "<button [type]=\"type()\" [disabled]=\"disabled()\">\n <div class=\"wrapper\" [ngClass]=\"btnClassNames()\">\n @if (icon(); as ico) {\n <div class=\"icon\">\n <i [ngClass]=\"ico\"></i>\n </div>\n }\n\n <div class=\"content\">\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</button>\n", styles: [":host{display:inline-block;border:1px solid rgba(0,0,0,.2);border-radius:3px;cursor:pointer;font-size:1rem;overflow:clip}:host.block{display:block}:host.disabled{opacity:.5!important;-webkit-user-select:none!important;user-select:none!important;cursor:not-allowed}:host.xs{font-size:.6rem}:host.sm{font-size:.8rem}:host.md{font-size:1rem}:host.lg{font-size:1.25rem}:host.xl{font-size:1.5rem}:host.default{background-color:var(--ngf-default)!important;color:var(--ngf-default-fg)!important}:host.primary{background-color:var(--ngf-primary)!important;color:var(--ngf-primary-fg)!important}:host.secondary{background-color:var(--ngf-secondary)!important;color:var(--ngf-secondary-fg)!important}:host.error{background-color:var(--ngf-error)!important;color:var(--ngf-error-fg)!important}:host.danger{background-color:var(--ngf-danger)!important;color:var(--ngf-danger-fg)!important}:host.success{background-color:var(--ngf-success)!important;color:var(--ngf-success-fg)!important}:host.warning{background-color:var(--ngf-warning)!important;color:var(--ngf-warning-fg)!important}:host.info{background-color:var(--ngf-info)!important;color:var(--ngf-info-fg)!important}:host.light{background-color:var(--ngf-light)!important;color:var(--ngf-light-fg)!important}:host.dark{background-color:var(--ngf-dark)!important;color:var(--ngf-dark-fg)!important}:host>button{display:block;padding:0!important;background-color:transparent;border:none!important;width:100%!important;cursor:inherit!important;color:inherit!important;font-weight:500;font-size:1em}:host>button:focus{outline:none!important}:host .wrapper{display:flex;flex-direction:var(--flex-direction)!important;--flex-direction: row;--icon-border-left: none;--icon-border-right: 1px solid rgba(0, 0, 0, .2)}:host .wrapper.reversed{--flex-direction: row-reverse;--icon-border-left: 1px solid rgba(0, 0, 0, .2);--icon-border-right: none}:host .wrapper>.icon{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:1.05em;border-left:var(--icon-border-left)!important;border-right:var(--icon-border-right)!important;padding:0 .5em}:host .wrapper>.content{display:block;flex-grow:1;padding:.5em 1em;white-space:nowrap!important;text-align:center!important;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
45
64
|
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxButton, decorators: [{
|
|
47
66
|
type: Component,
|
|
48
67
|
args: [{ selector: 'ngf-button', imports: [NgClass], template: "<button [type]=\"type()\" [disabled]=\"disabled()\">\n <div class=\"wrapper\" [ngClass]=\"btnClassNames()\">\n @if (icon(); as ico) {\n <div class=\"icon\">\n <i [ngClass]=\"ico\"></i>\n </div>\n }\n\n <div class=\"content\">\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</button>\n", styles: [":host{display:inline-block;border:1px solid rgba(0,0,0,.2);border-radius:3px;cursor:pointer;font-size:1rem;overflow:clip}:host.block{display:block}:host.disabled{opacity:.5!important;-webkit-user-select:none!important;user-select:none!important;cursor:not-allowed}:host.xs{font-size:.6rem}:host.sm{font-size:.8rem}:host.md{font-size:1rem}:host.lg{font-size:1.25rem}:host.xl{font-size:1.5rem}:host.default{background-color:var(--ngf-default)!important;color:var(--ngf-default-fg)!important}:host.primary{background-color:var(--ngf-primary)!important;color:var(--ngf-primary-fg)!important}:host.secondary{background-color:var(--ngf-secondary)!important;color:var(--ngf-secondary-fg)!important}:host.error{background-color:var(--ngf-error)!important;color:var(--ngf-error-fg)!important}:host.danger{background-color:var(--ngf-danger)!important;color:var(--ngf-danger-fg)!important}:host.success{background-color:var(--ngf-success)!important;color:var(--ngf-success-fg)!important}:host.warning{background-color:var(--ngf-warning)!important;color:var(--ngf-warning-fg)!important}:host.info{background-color:var(--ngf-info)!important;color:var(--ngf-info-fg)!important}:host.light{background-color:var(--ngf-light)!important;color:var(--ngf-light-fg)!important}:host.dark{background-color:var(--ngf-dark)!important;color:var(--ngf-dark-fg)!important}:host>button{display:block;padding:0!important;background-color:transparent;border:none!important;width:100%!important;cursor:inherit!important;color:inherit!important;font-weight:500;font-size:1em}:host>button:focus{outline:none!important}:host .wrapper{display:flex;flex-direction:var(--flex-direction)!important;--flex-direction: row;--icon-border-left: none;--icon-border-right: 1px solid rgba(0, 0, 0, .2)}:host .wrapper.reversed{--flex-direction: row-reverse;--icon-border-left: 1px solid rgba(0, 0, 0, .2);--icon-border-right: none}:host .wrapper>.icon{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:1.05em;border-left:var(--icon-border-left)!important;border-right:var(--icon-border-right)!important;padding:0 .5em}:host .wrapper>.content{display:block;flex-grow:1;padding:.5em 1em;white-space:nowrap!important;text-align:center!important;text-overflow:ellipsis;overflow:hidden}\n"] }]
|
|
49
68
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], bindClass: [{
|
|
@@ -61,30 +80,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
|
|
|
61
80
|
}] } });
|
|
62
81
|
|
|
63
82
|
class NgFluxDialogBodyComponent {
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: NgFluxDialogBodyComponent, isStandalone: true, selector: "ngf-dialog-body", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block;padding:20px}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
66
85
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogBodyComponent, decorators: [{
|
|
68
87
|
type: Component,
|
|
69
88
|
args: [{ selector: 'ngf-dialog-body', changeDetection: ChangeDetectionStrategy.Eager, imports: [], template: "<ng-content></ng-content>\n", styles: [":host{display:block;padding:20px}\n"] }]
|
|
70
89
|
}] });
|
|
71
90
|
|
|
72
91
|
class NgFluxDialogFooterComponent {
|
|
73
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
74
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: NgFluxDialogFooterComponent, isStandalone: true, selector: "ngf-dialog-footer", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:row;align-items:center;justify-content:end;position:sticky;background-color:var(--ngf-dialog-background-color)!important;border-top:var(--ngf-dialog-border)!important;padding:7px 15px;bottom:0;gap:10px}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
75
94
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogFooterComponent, decorators: [{
|
|
77
96
|
type: Component,
|
|
78
97
|
args: [{ selector: 'ngf-dialog-footer', changeDetection: ChangeDetectionStrategy.Eager, imports: [], template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:row;align-items:center;justify-content:end;position:sticky;background-color:var(--ngf-dialog-background-color)!important;border-top:var(--ngf-dialog-border)!important;padding:7px 15px;bottom:0;gap:10px}\n"] }]
|
|
79
98
|
}] });
|
|
80
99
|
|
|
81
100
|
class NgFluxDialogRootComponent {
|
|
82
101
|
injector = inject(Injector);
|
|
83
|
-
viewContainer = viewChild.required('container', { read: ViewContainerRef });
|
|
84
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
85
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.
|
|
102
|
+
viewContainer = viewChild.required('container', { ...(ngDevMode ? { debugName: "viewContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: NgFluxDialogRootComponent, isStandalone: true, selector: "ngf-dialog-root", viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<ng-template #container></ng-template>\n", styles: [":host{display:block;width:0px;height:0px;visibility:hidden}\n"] });
|
|
86
105
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogRootComponent, decorators: [{
|
|
88
107
|
type: Component,
|
|
89
108
|
args: [{ selector: 'ngf-dialog-root', imports: [], template: "<ng-template #container></ng-template>\n", styles: [":host{display:block;width:0px;height:0px;visibility:hidden}\n"] }]
|
|
90
109
|
}], propDecorators: { viewContainer: [{ type: i0.ViewChild, args: ['container', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
@@ -168,10 +187,10 @@ class NgFluxDialogInternal {
|
|
|
168
187
|
clear = () => {
|
|
169
188
|
this.list.set([]);
|
|
170
189
|
};
|
|
171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
172
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogInternal, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
191
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogInternal, providedIn: 'root' });
|
|
173
192
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogInternal, decorators: [{
|
|
175
194
|
type: Injectable,
|
|
176
195
|
args: [{ providedIn: 'root' }]
|
|
177
196
|
}], ctorParameters: () => [] });
|
|
@@ -181,24 +200,183 @@ const NGF_DIALOG_CONFIG = new InjectionToken('ngf-dialog-config');
|
|
|
181
200
|
const NGF_DIALOG_INSTANCE = new InjectionToken('ngf-dialog-instance');
|
|
182
201
|
const NGF_DIALOG_CLOSE_FN = new InjectionToken('ngf-dialog-close-fn');
|
|
183
202
|
|
|
203
|
+
class RouteTitleStrategy extends TitleStrategy {
|
|
204
|
+
config = inject(NGF_CONFIG);
|
|
205
|
+
service = inject(Title);
|
|
206
|
+
getChildSnapshot(snapshot) {
|
|
207
|
+
if (snapshot.firstChild)
|
|
208
|
+
return this.getChildSnapshot(snapshot.firstChild);
|
|
209
|
+
return snapshot;
|
|
210
|
+
}
|
|
211
|
+
getParentTitle(snapshot) {
|
|
212
|
+
if (snapshot.parent) {
|
|
213
|
+
const title = snapshot.parent.title;
|
|
214
|
+
if (title)
|
|
215
|
+
return title;
|
|
216
|
+
return this.getParentTitle(snapshot.parent);
|
|
217
|
+
}
|
|
218
|
+
return undefined;
|
|
219
|
+
}
|
|
220
|
+
updateTitle(snapshot) {
|
|
221
|
+
const { config, service } = this;
|
|
222
|
+
const entries = [];
|
|
223
|
+
if (config.title?.prefix)
|
|
224
|
+
entries.push(config.title.prefix);
|
|
225
|
+
const child = this.getChildSnapshot(snapshot.root);
|
|
226
|
+
const routeConfig = (child.routeConfig ?? {});
|
|
227
|
+
let routeTitle = routeConfig.getTitle?.(child.data) ?? this.buildTitle(snapshot);
|
|
228
|
+
if (routeConfig.addParentTitle) {
|
|
229
|
+
const parentTitle = this.getParentTitle(child);
|
|
230
|
+
if (parentTitle) {
|
|
231
|
+
const separator = routeConfig.parentTitleSeparator ?? ' - ';
|
|
232
|
+
if (routeTitle) {
|
|
233
|
+
routeTitle += separator + parentTitle;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
routeTitle = parentTitle;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (routeTitle)
|
|
241
|
+
entries.push(routeTitle);
|
|
242
|
+
if (config.title?.suffix)
|
|
243
|
+
entries.push(config.title.suffix);
|
|
244
|
+
const separator = config.title?.separator ?? ' | ';
|
|
245
|
+
const title = entries.join(separator);
|
|
246
|
+
if (title)
|
|
247
|
+
service.setTitle(title);
|
|
248
|
+
}
|
|
249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RouteTitleStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
250
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RouteTitleStrategy, providedIn: 'root' });
|
|
251
|
+
}
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RouteTitleStrategy, decorators: [{
|
|
253
|
+
type: Injectable,
|
|
254
|
+
args: [{ providedIn: 'root' }]
|
|
255
|
+
}] });
|
|
256
|
+
|
|
257
|
+
class MetaInternal {
|
|
258
|
+
meta = inject(Meta);
|
|
259
|
+
router = inject(Router);
|
|
260
|
+
snapshot = this.router.events.pipe(filter(e => e instanceof ActivationEnd), filter(e => !e.snapshot.firstChild), map(e => e.snapshot));
|
|
261
|
+
initialize() {
|
|
262
|
+
const { meta, snapshot } = this;
|
|
263
|
+
const initialDescription = meta.getTag('name="description"')?.content;
|
|
264
|
+
const initialKeywords = meta.getTag('name="keywords"')?.content;
|
|
265
|
+
snapshot.subscribe(snap => {
|
|
266
|
+
const config = (snap.routeConfig ?? {});
|
|
267
|
+
const description = config.getDescription?.(snap.data) ?? config.description ?? initialDescription;
|
|
268
|
+
if (description)
|
|
269
|
+
meta.updateTag({ name: 'description', content: description });
|
|
270
|
+
let keywords = config.getKeywords?.(snap.data) ?? config.keywords ?? initialKeywords;
|
|
271
|
+
if (Array.isArray(keywords))
|
|
272
|
+
keywords = keywords.join(', ');
|
|
273
|
+
if (keywords)
|
|
274
|
+
meta.updateTag({ name: 'keywords', content: keywords });
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MetaInternal, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
278
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MetaInternal, providedIn: 'root' });
|
|
279
|
+
}
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MetaInternal, decorators: [{
|
|
281
|
+
type: Injectable,
|
|
282
|
+
args: [{ providedIn: 'root' }]
|
|
283
|
+
}] });
|
|
284
|
+
|
|
285
|
+
class TabNavController {
|
|
286
|
+
map = signal(new Map(), /* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
288
|
+
navs = computed(() => Array.from(this.map().keys()), /* @ts-ignore */
|
|
289
|
+
...(ngDevMode ? [{ debugName: "navs" }] : /* istanbul ignore next */ []));
|
|
290
|
+
selected = linkedSignal({ ...(ngDevMode ? { debugName: "selected" } : /* istanbul ignore next */ {}), source: () => ({
|
|
291
|
+
navs: this.navs(),
|
|
292
|
+
selectedIndex: this.selectedIndex(),
|
|
293
|
+
}),
|
|
294
|
+
computation: (src, prev) => {
|
|
295
|
+
const { navs, selectedIndex } = src;
|
|
296
|
+
const value = prev?.value ?? null;
|
|
297
|
+
let index = Math.min(Math.max(selectedIndex, 0), navs.length - 1);
|
|
298
|
+
return navs.find(v => v === value) ?? navs.at(index) ?? null;
|
|
299
|
+
} });
|
|
300
|
+
selectedIndex = signal(0, /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
302
|
+
active = this.selected.asReadonly();
|
|
303
|
+
activeContent = computed(() => this.active()?.navContent(), /* @ts-ignore */
|
|
304
|
+
...(ngDevMode ? [{ debugName: "activeContent" }] : /* istanbul ignore next */ []));
|
|
305
|
+
activate(nav) {
|
|
306
|
+
const map = this.map();
|
|
307
|
+
if (!map.has(nav))
|
|
308
|
+
return;
|
|
309
|
+
this.selected.set(nav);
|
|
310
|
+
}
|
|
311
|
+
add(nav) {
|
|
312
|
+
this.map.update(v => {
|
|
313
|
+
const map = new Map(v);
|
|
314
|
+
map.set(nav, true);
|
|
315
|
+
return map;
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
remove(nav) {
|
|
319
|
+
this.map.update(v => {
|
|
320
|
+
if (!v.has(nav))
|
|
321
|
+
return v;
|
|
322
|
+
const map = new Map(v);
|
|
323
|
+
map.delete(nav);
|
|
324
|
+
return map;
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabNavController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
328
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabNavController });
|
|
329
|
+
}
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabNavController, decorators: [{
|
|
331
|
+
type: Injectable
|
|
332
|
+
}] });
|
|
333
|
+
|
|
334
|
+
class TabGroupController {
|
|
335
|
+
map = signal(new Map(), /* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
337
|
+
tabs = computed(() => Array.from(this.map().keys()), /* @ts-ignore */
|
|
338
|
+
...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
|
|
339
|
+
add(nav) {
|
|
340
|
+
this.map.update(v => {
|
|
341
|
+
const map = new Map(v);
|
|
342
|
+
map.set(nav, true);
|
|
343
|
+
return map;
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
remove(nav) {
|
|
347
|
+
this.map.update(v => {
|
|
348
|
+
if (!v.has(nav))
|
|
349
|
+
return v;
|
|
350
|
+
const map = new Map(v);
|
|
351
|
+
map.delete(nav);
|
|
352
|
+
return map;
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabGroupController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
356
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabGroupController });
|
|
357
|
+
}
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabGroupController, decorators: [{
|
|
359
|
+
type: Injectable
|
|
360
|
+
}] });
|
|
361
|
+
|
|
184
362
|
class NgFluxDialogHeaderComponent {
|
|
185
363
|
config = inject(NGF_DIALOG_CONFIG);
|
|
186
364
|
dialogRef = inject(NgFluxDialogRef);
|
|
187
365
|
icon = input(/* @ts-ignore */
|
|
188
366
|
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
189
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
190
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
367
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxDialogHeaderComponent, isStandalone: true, selector: "ngf-dialog-header", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (icon(); as ico) {\n <div class=\"left\">\n <i [ngClass]=\"ico\"></i>\n </div>\n}\n\n<div class=\"middle\">\n <ng-content></ng-content>\n</div>\n\n@if (config.closeBtn) {\n <div class=\"right\" title=\"Close\" (click)=\"dialogRef.close()\">\n <i class=\"ngf-icon close\"></i>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:row;position:sticky;background-color:var(--ngf-dialog-background-color)!important;border-bottom:var(--ngf-dialog-border)!important;min-height:50px;top:0}:host>.left{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:10px}:host>.middle{display:flex;flex-direction:column;justify-content:center;align-items:start;overflow:hidden;text-overflow:ellipsis;padding:10px 20px;flex:1 0 0;width:0px}:host>.right{display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;padding:10px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
191
369
|
}
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogHeaderComponent, decorators: [{
|
|
193
371
|
type: Component,
|
|
194
372
|
args: [{ selector: 'ngf-dialog-header', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgClass], template: "@if (icon(); as ico) {\n <div class=\"left\">\n <i [ngClass]=\"ico\"></i>\n </div>\n}\n\n<div class=\"middle\">\n <ng-content></ng-content>\n</div>\n\n@if (config.closeBtn) {\n <div class=\"right\" title=\"Close\" (click)=\"dialogRef.close()\">\n <i class=\"ngf-icon close\"></i>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:row;position:sticky;background-color:var(--ngf-dialog-background-color)!important;border-bottom:var(--ngf-dialog-border)!important;min-height:50px;top:0}:host>.left{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:10px}:host>.middle{display:flex;flex-direction:column;justify-content:center;align-items:start;overflow:hidden;text-overflow:ellipsis;padding:10px 20px;flex:1 0 0;width:0px}:host>.right{display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;padding:10px}\n"] }]
|
|
195
373
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
|
|
196
374
|
|
|
197
375
|
class NgFluxLoadingComponent {
|
|
198
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
199
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
376
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
377
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: NgFluxLoadingComponent, isStandalone: true, selector: "ngf-loading", ngImport: i0, template: "<svg viewBox=\"25 25 50 50\">\n <circle r=\"20\" cy=\"50\" cx=\"50\"></circle>\n</svg>\n", styles: [":host{display:block}:host svg{width:3.25em;transform-origin:center;animation:rotate4 2s linear infinite}:host circle{fill:none;stroke:var(--ngf-loading-foreground)!important;stroke-width:5;stroke-dasharray:1,200;stroke-dashoffset:0;stroke-linecap:round;animation:dash4 1.5s ease-in-out infinite}@keyframes rotate4{to{transform:rotate(360deg)}}@keyframes dash4{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,200;stroke-dashoffset:-35px}to{stroke-dashoffset:-125px}}\n"] });
|
|
200
378
|
}
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingComponent, decorators: [{
|
|
202
380
|
type: Component,
|
|
203
381
|
args: [{ selector: 'ngf-loading', imports: [], template: "<svg viewBox=\"25 25 50 50\">\n <circle r=\"20\" cy=\"50\" cx=\"50\"></circle>\n</svg>\n", styles: [":host{display:block}:host svg{width:3.25em;transform-origin:center;animation:rotate4 2s linear infinite}:host circle{fill:none;stroke:var(--ngf-loading-foreground)!important;stroke-width:5;stroke-dasharray:1,200;stroke-dashoffset:0;stroke-linecap:round;animation:dash4 1.5s ease-in-out infinite}@keyframes rotate4{to{transform:rotate(360deg)}}@keyframes dash4{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,200;stroke-dashoffset:-35px}to{stroke-dashoffset:-125px}}\n"] }]
|
|
204
382
|
}] });
|
|
@@ -213,7 +391,7 @@ class NgFluxLoadingRootComponent {
|
|
|
213
391
|
isLoading = computed(() => this.count() > 0, /* @ts-ignore */
|
|
214
392
|
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
215
393
|
get showLoading() { return this.isLoading(); }
|
|
216
|
-
viewContainer = viewChild.required('container', { read: ViewContainerRef });
|
|
394
|
+
viewContainer = viewChild.required('container', { ...(ngDevMode ? { debugName: "viewContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
217
395
|
componentRef;
|
|
218
396
|
constructor() {
|
|
219
397
|
const { config, injector } = this;
|
|
@@ -244,10 +422,10 @@ class NgFluxLoadingRootComponent {
|
|
|
244
422
|
entries.pop();
|
|
245
423
|
return entries;
|
|
246
424
|
});
|
|
247
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
248
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.
|
|
425
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
426
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: NgFluxLoadingRootComponent, isStandalone: true, selector: "ngf-loading-root", host: { properties: { "class.show": "this.showLoading" } }, viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n <ng-template #container></ng-template>\n</div>\n", styles: [":host{display:none;position:fixed;z-index:var(--ngf-loading-z-index)!important;inset:0}:host.show{display:block}:host>.wrapper{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:var(--ngf-loading-background)!important;height:100%!important;width:100%!important}\n"] });
|
|
249
427
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingRootComponent, decorators: [{
|
|
251
429
|
type: Component,
|
|
252
430
|
args: [{ selector: 'ngf-loading-root', imports: [], template: "<div class=\"wrapper\">\n <ng-template #container></ng-template>\n</div>\n", styles: [":host{display:none;position:fixed;z-index:var(--ngf-loading-z-index)!important;inset:0}:host.show{display:block}:host>.wrapper{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:var(--ngf-loading-background)!important;height:100%!important;width:100%!important}\n"] }]
|
|
253
431
|
}], ctorParameters: () => [], propDecorators: { showLoading: [{
|
|
@@ -295,10 +473,10 @@ class NgFluxPaginationInfo {
|
|
|
295
473
|
limit: data.perPage,
|
|
296
474
|
});
|
|
297
475
|
}
|
|
298
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
299
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
476
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPaginationInfo, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
477
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxPaginationInfo, isStandalone: true, selector: "ngf-pagination-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: true, transformFunction: null }, limitOptions: { classPropertyName: "limitOptions", publicName: "limitOptions", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { callback: "callback", limit: "limitChange" }, ngImport: i0, template: "<div class=\"wrapper\">\n <div class=\"block limit\">\n <div>Per page</div>\n <select name=\"\" id=\"\" [(ngModel)]=\"limit\">\n @for (entry of limitOptions(); track $index) {\n <option [value]=\"entry\">{{ entry }}</option>\n }\n </select>\n </div>\n\n <div class=\"block info\">\n <div>{{ info() }}</div>\n </div>\n\n <div class=\"block nav\">\n <button (click)=\"prev()\" [disabled]=\"disablePrev()\">\n <i class=\"ngf-icon chevron-left\"></i>\n </button>\n\n <button (click)=\"next()\" [disabled]=\"disableNext()\">\n <i class=\"ngf-icon chevron-right\"></i>\n </button>\n </div>\n</div>\n", styles: [":host{display:block;container:pagination/inline-size}:host .wrapper{display:flex;flex-direction:column;font-family:Poppins,sans-serif;align-items:end;text-align:center;font-size:.8rem;gap:5px}@container pagination (min-width: 400px){:host .wrapper{flex-direction:row;justify-content:end;align-items:center;gap:15px}}:host .wrapper .block{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:5px}:host .wrapper .limit>select{display:block;padding:2px 5px;font-size:inherit;outline:none!important;width:50px}:host .wrapper .nav>button{display:block;background-color:transparent;box-shadow:none!important;outline:none!important;cursor:pointer;border:none;padding:0}:host .wrapper .nav>button:disabled{cursor:default;color:#aaa}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
300
478
|
}
|
|
301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPaginationInfo, decorators: [{
|
|
302
480
|
type: Component,
|
|
303
481
|
args: [{ selector: 'ngf-pagination-info', changeDetection: ChangeDetectionStrategy.Eager, imports: [FormsModule], template: "<div class=\"wrapper\">\n <div class=\"block limit\">\n <div>Per page</div>\n <select name=\"\" id=\"\" [(ngModel)]=\"limit\">\n @for (entry of limitOptions(); track $index) {\n <option [value]=\"entry\">{{ entry }}</option>\n }\n </select>\n </div>\n\n <div class=\"block info\">\n <div>{{ info() }}</div>\n </div>\n\n <div class=\"block nav\">\n <button (click)=\"prev()\" [disabled]=\"disablePrev()\">\n <i class=\"ngf-icon chevron-left\"></i>\n </button>\n\n <button (click)=\"next()\" [disabled]=\"disableNext()\">\n <i class=\"ngf-icon chevron-right\"></i>\n </button>\n </div>\n</div>\n", styles: [":host{display:block;container:pagination/inline-size}:host .wrapper{display:flex;flex-direction:column;font-family:Poppins,sans-serif;align-items:end;text-align:center;font-size:.8rem;gap:5px}@container pagination (min-width: 400px){:host .wrapper{flex-direction:row;justify-content:end;align-items:center;gap:15px}}:host .wrapper .block{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:5px}:host .wrapper .limit>select{display:block;padding:2px 5px;font-size:inherit;outline:none!important;width:50px}:host .wrapper .nav>button{display:block;background-color:transparent;box-shadow:none!important;outline:none!important;cursor:pointer;border:none;padding:0}:host .wrapper .nav>button:disabled{cursor:default;color:#aaa}\n"] }]
|
|
304
482
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], callback: [{ type: i0.Output, args: ["callback"] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: true }] }, { type: i0.Output, args: ["limitChange"] }], limitOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitOptions", required: true }] }] } });
|
|
@@ -345,14 +523,617 @@ class NgFluxPagination {
|
|
|
345
523
|
init = true;
|
|
346
524
|
});
|
|
347
525
|
}
|
|
348
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
349
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPagination, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
527
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: NgFluxPagination, isStandalone: true, selector: "ngf-pagination", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, preload: { classPropertyName: "preload", publicName: "preload", isSignal: true, isRequired: false, transformFunction: null }, transform: { classPropertyName: "transform", publicName: "transform", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, limitOptions: { classPropertyName: "limitOptions", publicName: "limitOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { limit: "limitChange", callback: "callback" }, ngImport: i0, template: "<ngf-pagination-info\n [data]=\"value()\"\n [(limit)]=\"limit\"\n [limitOptions]=\"limitOptions()\"\n (callback)=\"callback.emit($event)\"\n></ngf-pagination-info>\n\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n\n<ngf-pagination-info\n [data]=\"value()\"\n [(limit)]=\"limit\"\n [limitOptions]=\"limitOptions()\"\n (callback)=\"callback.emit($event)\"\n></ngf-pagination-info>\n", styles: [":host{display:block}:host>.content{margin:20px 0}\n"], dependencies: [{ kind: "component", type: NgFluxPaginationInfo, selector: "ngf-pagination-info", inputs: ["data", "limit", "limitOptions"], outputs: ["callback", "limitChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
350
528
|
}
|
|
351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPagination, decorators: [{
|
|
352
530
|
type: Component,
|
|
353
531
|
args: [{ selector: 'ngf-pagination', changeDetection: ChangeDetectionStrategy.Eager, imports: [NgFluxPaginationInfo], template: "<ngf-pagination-info\n [data]=\"value()\"\n [(limit)]=\"limit\"\n [limitOptions]=\"limitOptions()\"\n (callback)=\"callback.emit($event)\"\n></ngf-pagination-info>\n\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n\n<ngf-pagination-info\n [data]=\"value()\"\n [(limit)]=\"limit\"\n [limitOptions]=\"limitOptions()\"\n (callback)=\"callback.emit($event)\"\n></ngf-pagination-info>\n", styles: [":host{display:block}:host>.content{margin:20px 0}\n"] }]
|
|
354
532
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], preload: [{ type: i0.Input, args: [{ isSignal: true, alias: "preload", required: false }] }], transform: [{ type: i0.Input, args: [{ isSignal: true, alias: "transform", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }, { type: i0.Output, args: ["limitChange"] }], limitOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitOptions", required: false }] }], callback: [{ type: i0.Output, args: ["callback"] }] } });
|
|
355
533
|
|
|
534
|
+
class NgFluxSelectItems {
|
|
535
|
+
parent = inject(NgFluxSelectItems, {
|
|
536
|
+
optional: true,
|
|
537
|
+
skipSelf: true,
|
|
538
|
+
});
|
|
539
|
+
data = input.required(/* @ts-ignore */
|
|
540
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
541
|
+
options = input.required(/* @ts-ignore */
|
|
542
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
543
|
+
transform = input.required(/* @ts-ignore */
|
|
544
|
+
...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
545
|
+
select = output();
|
|
546
|
+
getItem(item) {
|
|
547
|
+
const transform = this.transform();
|
|
548
|
+
return {
|
|
549
|
+
label: transform.getLabel(item),
|
|
550
|
+
value: transform.getValue(item),
|
|
551
|
+
children: transform.getChildren?.(item) ?? [],
|
|
552
|
+
disabled: transform.isDisabled?.(item) ?? false,
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
onSelect(item) {
|
|
556
|
+
const info = this.getItem(item);
|
|
557
|
+
if (info.disabled)
|
|
558
|
+
return;
|
|
559
|
+
this.select.emit(item);
|
|
560
|
+
}
|
|
561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxSelectItems, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxSelectItems, isStandalone: true, selector: "ngf-select-items", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, transform: { classPropertyName: "transform", publicName: "transform", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { select: "select" }, host: { properties: { "class.has-parent": "!!parent" } }, ngImport: i0, template: "<ul class=\"wrapper\">\n @for (entry of data(); track $index) {\n @let item = getItem(entry);\n\n <li [class.disabled]=\"item.disabled\" [class.has-parent]=\"!!parent\" [class.active]=\"options().getSelected(entry)\">\n <div class=\"text\" (click)=\"onSelect(entry)\">\n <span>{{ item.label }}</span>\n </div>\n\n @if (item.children?.length) {\n <ngf-select-items [data]=\"item.children\" [options]=\"options()\" [transform]=\"transform()\" (select)=\"onSelect($event)\" />\n }\n </li>\n }\n</ul>\n", styles: [":host{display:block;position:relative;max-height:200px;overflow:hidden auto}:host.has-parent{padding:0 0 0 10px}:host.has-parent:before{display:block;position:absolute;inset:0 auto 0 5px;background-color:#0003;content:\"\";width:1px}:host>.wrapper{display:block;list-style:none;font-size:.9rem;padding:0;margin:0}:host>.wrapper>li{display:block;cursor:pointer;--background-color: transparent;--color: inherit}:host>.wrapper>li>.text{padding:5px;background-color:var(--background-color)!important;color:var(--color)!important}:host>.wrapper>li>.text:hover{--background-color: rgba(var(--ngf-primary-rgb), .1)}:host>.wrapper>li.disabled{pointer-events:none;cursor:not-allowed;--color: #666}:host>.wrapper>li.active>.text{--background-color: var(--ngf-primary);--color: #FFF}:host>.wrapper>li.has-parent{position:relative}:host>.wrapper>li.has-parent:before{display:block;position:absolute;inset:50% 100% auto -4px;transform:translateY(-50%);background-color:#0003;content:\"\";height:1px}\n"], dependencies: [{ kind: "component", type: NgFluxSelectItems, selector: "ngf-select-items", inputs: ["data", "options", "transform"], outputs: ["select"] }] });
|
|
563
|
+
}
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxSelectItems, decorators: [{
|
|
565
|
+
type: Component,
|
|
566
|
+
args: [{ selector: 'ngf-select-items', imports: [], host: {
|
|
567
|
+
'[class.has-parent]': '!!parent',
|
|
568
|
+
}, template: "<ul class=\"wrapper\">\n @for (entry of data(); track $index) {\n @let item = getItem(entry);\n\n <li [class.disabled]=\"item.disabled\" [class.has-parent]=\"!!parent\" [class.active]=\"options().getSelected(entry)\">\n <div class=\"text\" (click)=\"onSelect(entry)\">\n <span>{{ item.label }}</span>\n </div>\n\n @if (item.children?.length) {\n <ngf-select-items [data]=\"item.children\" [options]=\"options()\" [transform]=\"transform()\" (select)=\"onSelect($event)\" />\n }\n </li>\n }\n</ul>\n", styles: [":host{display:block;position:relative;max-height:200px;overflow:hidden auto}:host.has-parent{padding:0 0 0 10px}:host.has-parent:before{display:block;position:absolute;inset:0 auto 0 5px;background-color:#0003;content:\"\";width:1px}:host>.wrapper{display:block;list-style:none;font-size:.9rem;padding:0;margin:0}:host>.wrapper>li{display:block;cursor:pointer;--background-color: transparent;--color: inherit}:host>.wrapper>li>.text{padding:5px;background-color:var(--background-color)!important;color:var(--color)!important}:host>.wrapper>li>.text:hover{--background-color: rgba(var(--ngf-primary-rgb), .1)}:host>.wrapper>li.disabled{pointer-events:none;cursor:not-allowed;--color: #666}:host>.wrapper>li.active>.text{--background-color: var(--ngf-primary);--color: #FFF}:host>.wrapper>li.has-parent{position:relative}:host>.wrapper>li.has-parent:before{display:block;position:absolute;inset:50% 100% auto -4px;transform:translateY(-50%);background-color:#0003;content:\"\";height:1px}\n"] }]
|
|
569
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], transform: [{ type: i0.Input, args: [{ isSignal: true, alias: "transform", required: true }] }], select: [{ type: i0.Output, args: ["select"] }] } });
|
|
570
|
+
|
|
571
|
+
class NgFluxSelect {
|
|
572
|
+
ref = inject(ElementRef);
|
|
573
|
+
data = input.required(/* @ts-ignore */
|
|
574
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
575
|
+
block = input(false, { ...(ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
576
|
+
multi = input(false, { ...(ngDevMode ? { debugName: "multi" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
577
|
+
placeholder = input(/* @ts-ignore */
|
|
578
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
579
|
+
transform = input({
|
|
580
|
+
getLabel: item => item.label ?? '',
|
|
581
|
+
getValue: item => item.value,
|
|
582
|
+
getChildren: item => item.children ?? [],
|
|
583
|
+
setChildren: (item, children) => item.children = children,
|
|
584
|
+
}, /* @ts-ignore */
|
|
585
|
+
...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
586
|
+
mapper = computed(() => {
|
|
587
|
+
const data = this.data();
|
|
588
|
+
const value = new Map();
|
|
589
|
+
this.doFlatMap(value, data);
|
|
590
|
+
return value;
|
|
591
|
+
}, /* @ts-ignore */
|
|
592
|
+
...(ngDevMode ? [{ debugName: "mapper" }] : /* istanbul ignore next */ []));
|
|
593
|
+
value = model(null, /* @ts-ignore */
|
|
594
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
595
|
+
vmap = computed(() => {
|
|
596
|
+
let value = this.value() ?? [];
|
|
597
|
+
value = Array.isArray(value) ? value : [value];
|
|
598
|
+
const mapper = this.mapper();
|
|
599
|
+
const result = new Map();
|
|
600
|
+
for (let val of value) {
|
|
601
|
+
const item = mapper.get(val);
|
|
602
|
+
if (!item)
|
|
603
|
+
continue;
|
|
604
|
+
result.set(val, item);
|
|
605
|
+
}
|
|
606
|
+
return result;
|
|
607
|
+
}, /* @ts-ignore */
|
|
608
|
+
...(ngDevMode ? [{ debugName: "vmap" }] : /* istanbul ignore next */ []));
|
|
609
|
+
open = signal(false, /* @ts-ignore */
|
|
610
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
611
|
+
searchbox = signal('', /* @ts-ignore */
|
|
612
|
+
...(ngDevMode ? [{ debugName: "searchbox" }] : /* istanbul ignore next */ []));
|
|
613
|
+
search = computed(() => {
|
|
614
|
+
const data = this.data();
|
|
615
|
+
const text = this.searchbox().toLowerCase();
|
|
616
|
+
if (!text)
|
|
617
|
+
return data;
|
|
618
|
+
return this.doSearch(text, data);
|
|
619
|
+
}, /* @ts-ignore */
|
|
620
|
+
...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
621
|
+
headerText = computed(() => {
|
|
622
|
+
const multi = this.multi();
|
|
623
|
+
const placeholder = this.placeholder() ?? 'Select Item' + (multi ? 's' : '');
|
|
624
|
+
const items = Array.from(this.vmap().values());
|
|
625
|
+
if (!items.length)
|
|
626
|
+
return placeholder;
|
|
627
|
+
const transform = this.transform();
|
|
628
|
+
const first = items.splice(0, 1).at(0);
|
|
629
|
+
let text = transform.getLabel(first);
|
|
630
|
+
if (items.length)
|
|
631
|
+
text += ` + ${items.length.toLocaleString()} more`;
|
|
632
|
+
return text;
|
|
633
|
+
}, /* @ts-ignore */
|
|
634
|
+
...(ngDevMode ? [{ debugName: "headerText" }] : /* istanbul ignore next */ []));
|
|
635
|
+
doFlatMap(map, data) {
|
|
636
|
+
const transform = this.transform();
|
|
637
|
+
for (let item of data) {
|
|
638
|
+
const key = transform.getValue(item);
|
|
639
|
+
map.set(key, item);
|
|
640
|
+
const children = transform.getChildren?.(item) ?? [];
|
|
641
|
+
this.doFlatMap(map, children);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
doSearch(text, data) {
|
|
645
|
+
const transform = this.transform();
|
|
646
|
+
const result = [];
|
|
647
|
+
for (let entry of data) {
|
|
648
|
+
const item = Object.assign({}, entry);
|
|
649
|
+
let children = transform.getChildren?.(item) ?? [];
|
|
650
|
+
children = this.doSearch(text, children);
|
|
651
|
+
transform.setChildren?.(item, children);
|
|
652
|
+
if (children.length) {
|
|
653
|
+
result.push(item);
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
const label = transform.getLabel(item).toLowerCase();
|
|
657
|
+
if (label.includes(text))
|
|
658
|
+
result.push(item);
|
|
659
|
+
}
|
|
660
|
+
return result;
|
|
661
|
+
}
|
|
662
|
+
toggleOpen() {
|
|
663
|
+
if (this.multi())
|
|
664
|
+
return;
|
|
665
|
+
this.open.update(v => !v);
|
|
666
|
+
}
|
|
667
|
+
toggle(item) {
|
|
668
|
+
const multi = this.multi();
|
|
669
|
+
const transform = this.transform();
|
|
670
|
+
const vmap = new Map(this.vmap());
|
|
671
|
+
const key = transform.getValue(item);
|
|
672
|
+
if (!key)
|
|
673
|
+
return;
|
|
674
|
+
if (!vmap.has(key)) {
|
|
675
|
+
if (!multi)
|
|
676
|
+
vmap.clear();
|
|
677
|
+
vmap.set(key, item);
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
vmap.delete(key);
|
|
681
|
+
}
|
|
682
|
+
const values = Array.from(vmap.keys());
|
|
683
|
+
if (values.length) {
|
|
684
|
+
this.value.set(multi ? values : values[0]);
|
|
685
|
+
}
|
|
686
|
+
else {
|
|
687
|
+
this.value.set(null);
|
|
688
|
+
}
|
|
689
|
+
this.open.set(false);
|
|
690
|
+
}
|
|
691
|
+
options = {
|
|
692
|
+
getSelected: item => {
|
|
693
|
+
const transform = this.transform();
|
|
694
|
+
const key = transform.getValue(item);
|
|
695
|
+
if (!key)
|
|
696
|
+
return false;
|
|
697
|
+
return this.vmap().has(key);
|
|
698
|
+
},
|
|
699
|
+
};
|
|
700
|
+
onDocumentClick(e) {
|
|
701
|
+
if (this.multi())
|
|
702
|
+
return;
|
|
703
|
+
const { ref: { nativeElement: elem } } = this;
|
|
704
|
+
const target = e.target;
|
|
705
|
+
if (elem.contains(target))
|
|
706
|
+
return;
|
|
707
|
+
this.open.set(false);
|
|
708
|
+
}
|
|
709
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
710
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxSelect, isStandalone: true, selector: "ngf-select", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, transform: { classPropertyName: "transform", publicName: "transform", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class.block": "block()" } }, ngImport: i0, template: "<div class=\"wrapper\">\n <div class=\"header\" [class.single]=\"!multi()\" (click)=\"toggleOpen()\">\n <div class=\"text\">{{ headerText() }}</div>\n @if (!multi()) {\n @let icons = ['ngf-icon', (open() ? 'arrow-drop-up' : 'arrow-drop-down')];\n <i [className]=\"icons.join(' ')\"></i>\n }\n </div>\n\n <div class=\"body\" [class.single]=\"!multi()\" [class.show]=\"open()\">\n <div class=\"searchbox\">\n <input type=\"text\" placeholder=\"Search Items\" [(ngModel)]=\"searchbox\">\n\n @if (searchbox().length) {\n <div class=\"clear\" (click)=\"searchbox.set('')\">\n <i class=\"ngf-icon close\"></i>\n </div>\n }\n </div>\n\n <ngf-select-items [data]=\"search()\" [options]=\"options\" [transform]=\"transform()\" (select)=\"toggle($event)\" />\n </div>\n\n @if (multi()) {\n <div class=\"footer\">\n @if (!vmap().size) {\n <div class=\"none\">No item selected</div>\n } @else {\n <div class=\"entries\">\n @for (item of vmap() | keyvalue; track $index) {\n <div class=\"entries-item\">\n <div class=\"text\">{{ transform().getLabel(item.value) }}</div>\n <div class=\"btn\" (click)=\"toggle(item.value)\">\n <i class=\"ngf-icon close\"></i>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (multi()) {\n <div class=\"clear-btn\" (click)=\"value.set(null)\">\n <span>Clear All</span>\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;border:var(--border)!important;border-radius:3px;width:200px;font-size:.8rem;--border: 1px solid rgba(0, 0, 0, .2);--height: 40px}:host.block{display:block;width:100%}:host>.wrapper{display:block;position:relative}:host>.wrapper .header{display:flex;flex-direction:row;align-items:center;border-bottom:var(--border)!important;height:var(--height)!important;padding:0 10px;font-weight:500;color:#333;gap:10px}:host>.wrapper .header.single{cursor:pointer;--border: none}:host>.wrapper .header>.text{flex:1 0 0;width:0px;overflow:hidden;text-overflow:ellipsis}:host>.wrapper .header .ngf-icon{font-size:1.8em}:host>.wrapper .body{display:block;background-color:#fff;font-size:1em}:host>.wrapper .body.single{display:none;position:absolute;inset:100% 0 auto;box-shadow:0 0 3px #000000b3;z-index:5}:host>.wrapper .body.single.show{display:block!important}:host>.wrapper .body>.searchbox{display:block;position:relative;border-bottom:var(--border)!important;padding:7px}:host>.wrapper .body>.searchbox>input{display:block;width:100%!important;border:var(--border)!important;background-color:#fff;font-size:.9rem;padding:5px}:host>.wrapper .body>.searchbox>input:focus{box-shadow:none!important;outline:none!important}:host>.wrapper .body>.searchbox>.clear{display:block;position:absolute;inset:50% 15px auto auto;transform:translateY(-50%);cursor:pointer}:host>.wrapper .body>.searchbox>.clear .ngf-icon{font-size:1em}:host>.wrapper .footer{display:block;border-top:var(--border)!important;font-size:.9em;padding:5px}:host>.wrapper .footer .none{text-align:center;color:#666}:host>.wrapper .footer .entries{display:flex;flex-direction:row;flex-wrap:wrap;gap:5px}:host>.wrapper .footer .entries-item{display:flex;flex-direction:row;align-items:center;padding:0 3px;border-radius:2px;background-color:var(--ngf-primary);color:#fff;gap:5px}:host>.wrapper .footer .entries-item .btn{cursor:pointer}:host>.wrapper .footer .entries-item .btn .ngf-icon{font-size:1em}:host>.wrapper>.clear-btn{display:block;border-top:var(--border)!important;font-size:.8em;padding:3px;text-align:center;background-color:#444;color:#fff;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgFluxSelectItems, selector: "ngf-select-items", inputs: ["data", "options", "transform"], outputs: ["select"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }] });
|
|
711
|
+
}
|
|
712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxSelect, decorators: [{
|
|
713
|
+
type: Component,
|
|
714
|
+
args: [{ selector: 'ngf-select', imports: [
|
|
715
|
+
FormsModule,
|
|
716
|
+
NgFluxSelectItems,
|
|
717
|
+
KeyValuePipe,
|
|
718
|
+
], host: {
|
|
719
|
+
'[class.block]': 'block()',
|
|
720
|
+
'(document:click)': 'onDocumentClick($event)',
|
|
721
|
+
}, template: "<div class=\"wrapper\">\n <div class=\"header\" [class.single]=\"!multi()\" (click)=\"toggleOpen()\">\n <div class=\"text\">{{ headerText() }}</div>\n @if (!multi()) {\n @let icons = ['ngf-icon', (open() ? 'arrow-drop-up' : 'arrow-drop-down')];\n <i [className]=\"icons.join(' ')\"></i>\n }\n </div>\n\n <div class=\"body\" [class.single]=\"!multi()\" [class.show]=\"open()\">\n <div class=\"searchbox\">\n <input type=\"text\" placeholder=\"Search Items\" [(ngModel)]=\"searchbox\">\n\n @if (searchbox().length) {\n <div class=\"clear\" (click)=\"searchbox.set('')\">\n <i class=\"ngf-icon close\"></i>\n </div>\n }\n </div>\n\n <ngf-select-items [data]=\"search()\" [options]=\"options\" [transform]=\"transform()\" (select)=\"toggle($event)\" />\n </div>\n\n @if (multi()) {\n <div class=\"footer\">\n @if (!vmap().size) {\n <div class=\"none\">No item selected</div>\n } @else {\n <div class=\"entries\">\n @for (item of vmap() | keyvalue; track $index) {\n <div class=\"entries-item\">\n <div class=\"text\">{{ transform().getLabel(item.value) }}</div>\n <div class=\"btn\" (click)=\"toggle(item.value)\">\n <i class=\"ngf-icon close\"></i>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (multi()) {\n <div class=\"clear-btn\" (click)=\"value.set(null)\">\n <span>Clear All</span>\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;border:var(--border)!important;border-radius:3px;width:200px;font-size:.8rem;--border: 1px solid rgba(0, 0, 0, .2);--height: 40px}:host.block{display:block;width:100%}:host>.wrapper{display:block;position:relative}:host>.wrapper .header{display:flex;flex-direction:row;align-items:center;border-bottom:var(--border)!important;height:var(--height)!important;padding:0 10px;font-weight:500;color:#333;gap:10px}:host>.wrapper .header.single{cursor:pointer;--border: none}:host>.wrapper .header>.text{flex:1 0 0;width:0px;overflow:hidden;text-overflow:ellipsis}:host>.wrapper .header .ngf-icon{font-size:1.8em}:host>.wrapper .body{display:block;background-color:#fff;font-size:1em}:host>.wrapper .body.single{display:none;position:absolute;inset:100% 0 auto;box-shadow:0 0 3px #000000b3;z-index:5}:host>.wrapper .body.single.show{display:block!important}:host>.wrapper .body>.searchbox{display:block;position:relative;border-bottom:var(--border)!important;padding:7px}:host>.wrapper .body>.searchbox>input{display:block;width:100%!important;border:var(--border)!important;background-color:#fff;font-size:.9rem;padding:5px}:host>.wrapper .body>.searchbox>input:focus{box-shadow:none!important;outline:none!important}:host>.wrapper .body>.searchbox>.clear{display:block;position:absolute;inset:50% 15px auto auto;transform:translateY(-50%);cursor:pointer}:host>.wrapper .body>.searchbox>.clear .ngf-icon{font-size:1em}:host>.wrapper .footer{display:block;border-top:var(--border)!important;font-size:.9em;padding:5px}:host>.wrapper .footer .none{text-align:center;color:#666}:host>.wrapper .footer .entries{display:flex;flex-direction:row;flex-wrap:wrap;gap:5px}:host>.wrapper .footer .entries-item{display:flex;flex-direction:row;align-items:center;padding:0 3px;border-radius:2px;background-color:var(--ngf-primary);color:#fff;gap:5px}:host>.wrapper .footer .entries-item .btn{cursor:pointer}:host>.wrapper .footer .entries-item .btn .ngf-icon{font-size:1em}:host>.wrapper>.clear-btn{display:block;border-top:var(--border)!important;font-size:.8em;padding:3px;text-align:center;background-color:#444;color:#fff;cursor:pointer}\n"] }]
|
|
722
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], transform: [{ type: i0.Input, args: [{ isSignal: true, alias: "transform", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
723
|
+
|
|
724
|
+
class PinInputDirective {
|
|
725
|
+
ref = inject(ElementRef);
|
|
726
|
+
elem = this.ref.nativeElement;
|
|
727
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PinInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
728
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: PinInputDirective, isStandalone: true, selector: "[pinInput]", ngImport: i0 });
|
|
729
|
+
}
|
|
730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PinInputDirective, decorators: [{
|
|
731
|
+
type: Directive,
|
|
732
|
+
args: [{
|
|
733
|
+
selector: '[pinInput]',
|
|
734
|
+
}]
|
|
735
|
+
}] });
|
|
736
|
+
|
|
737
|
+
class NgFluxPinInput {
|
|
738
|
+
chars = input(4, /* @ts-ignore */
|
|
739
|
+
...(ngDevMode ? [{ debugName: "chars" }] : /* istanbul ignore next */ []));
|
|
740
|
+
block = input(false, { ...(ngDevMode ? { debugName: "block" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
741
|
+
value = model('', /* @ts-ignore */
|
|
742
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
743
|
+
values = computed(() => {
|
|
744
|
+
const chars = this.chars(), value = this.value() ?? '';
|
|
745
|
+
return Array.from({ length: chars }, (_, i) => value.charAt(i));
|
|
746
|
+
}, /* @ts-ignore */
|
|
747
|
+
...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
|
|
748
|
+
inputs = viewChildren(PinInputDirective, /* @ts-ignore */
|
|
749
|
+
...(ngDevMode ? [{ debugName: "inputs" }] : /* istanbul ignore next */ []));
|
|
750
|
+
onKeyDown(e, index) {
|
|
751
|
+
const target = e.target;
|
|
752
|
+
const values = Array.from(this.values());
|
|
753
|
+
switch (e.key) {
|
|
754
|
+
case 'Backspace':
|
|
755
|
+
{
|
|
756
|
+
e.preventDefault();
|
|
757
|
+
values[index] = '';
|
|
758
|
+
this.setFocus(index - 1);
|
|
759
|
+
}
|
|
760
|
+
break;
|
|
761
|
+
case 'Delete':
|
|
762
|
+
{
|
|
763
|
+
e.preventDefault();
|
|
764
|
+
values[index] = '';
|
|
765
|
+
this.setFocus(index);
|
|
766
|
+
}
|
|
767
|
+
break;
|
|
768
|
+
default: {
|
|
769
|
+
if (e.key.length !== 1)
|
|
770
|
+
return;
|
|
771
|
+
if (e.ctrlKey || e.altKey || e.metaKey)
|
|
772
|
+
return;
|
|
773
|
+
e.preventDefault();
|
|
774
|
+
const code = e.key.charCodeAt(0);
|
|
775
|
+
if (!this.allowed(code))
|
|
776
|
+
return;
|
|
777
|
+
values[index] = e.key;
|
|
778
|
+
this.setFocus(index + 1);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
this.value.set(values.join(''));
|
|
782
|
+
}
|
|
783
|
+
onPaste(e, index) {
|
|
784
|
+
e.preventDefault();
|
|
785
|
+
const values = Array.from(this.values());
|
|
786
|
+
const data = e.clipboardData?.getData('text/plain');
|
|
787
|
+
if (!data)
|
|
788
|
+
return;
|
|
789
|
+
let cursor = 0, lastIndex = index;
|
|
790
|
+
for (let i = index; i < values.length; i++) {
|
|
791
|
+
while (cursor < data.length) {
|
|
792
|
+
const ptr = cursor++;
|
|
793
|
+
let code = data.charCodeAt(ptr);
|
|
794
|
+
if (!this.allowed(code))
|
|
795
|
+
continue;
|
|
796
|
+
let char = data.charAt(ptr);
|
|
797
|
+
values[i] = char;
|
|
798
|
+
break;
|
|
799
|
+
}
|
|
800
|
+
if (cursor >= data.length)
|
|
801
|
+
break;
|
|
802
|
+
lastIndex++;
|
|
803
|
+
}
|
|
804
|
+
this.value.set(values.join(''));
|
|
805
|
+
this.setFocus(lastIndex + 1);
|
|
806
|
+
}
|
|
807
|
+
setFocus(index) {
|
|
808
|
+
const maxIndex = this.chars() - 1;
|
|
809
|
+
index = Math.min(maxIndex, Math.max(index, 0));
|
|
810
|
+
const input = this.inputs().at(index);
|
|
811
|
+
input?.elem.focus();
|
|
812
|
+
input?.elem.select();
|
|
813
|
+
}
|
|
814
|
+
allowed = (code) => ((code > 47 && code < 58) || // Numeric (0-9)
|
|
815
|
+
(code > 64 && code < 91) || // Uppercase (A-Z)
|
|
816
|
+
(code > 96 && code < 123) // Lowercase (a-z)
|
|
817
|
+
);
|
|
818
|
+
focus(options) {
|
|
819
|
+
const inputs = this.inputs();
|
|
820
|
+
inputs.at(0)?.elem.focus();
|
|
821
|
+
}
|
|
822
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPinInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
823
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxPinInput, isStandalone: true, selector: "ngf-pin-input", inputs: { chars: { classPropertyName: "chars", publicName: "chars", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.block": "block()" } }, viewQueries: [{ propertyName: "inputs", predicate: PinInputDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n @for (val of values(); track $index) {\n <input type=\"text\" pinInput [value]=\"val\" (keydown)=\"onKeyDown($event, $index)\" (paste)=\"onPaste($event, $index)\">\n }\n</div>\n", styles: [":host{display:inline-block;width:200px;--padding-y: 10px;--border: 1px solid rgba(0, 0, 0, .2);--background-color: #FFF;--color: inherit;--gap: 5px}:host.block{display:block;width:100%}:host>.wrapper{display:flex;flex-direction:row;gap:var(--gap)!important}:host>.wrapper>input{display:block;flex:1 0 0;width:0px;text-align:center;font-size:1em;color:var(--color)!important;padding:var(--padding-y) 0px var(--padding-y) 0px!important;background-color:var(--background-color)!important;border:var(--border)!important}:host>.wrapper>input:focus{outline:var(--border);box-shadow:none}\n"], dependencies: [{ kind: "directive", type: PinInputDirective, selector: "[pinInput]" }] });
|
|
824
|
+
}
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPinInput, decorators: [{
|
|
826
|
+
type: Component,
|
|
827
|
+
args: [{ selector: 'ngf-pin-input', imports: [
|
|
828
|
+
PinInputDirective,
|
|
829
|
+
], host: {
|
|
830
|
+
'[class.block]': 'block()',
|
|
831
|
+
}, template: "<div class=\"wrapper\">\n @for (val of values(); track $index) {\n <input type=\"text\" pinInput [value]=\"val\" (keydown)=\"onKeyDown($event, $index)\" (paste)=\"onPaste($event, $index)\">\n }\n</div>\n", styles: [":host{display:inline-block;width:200px;--padding-y: 10px;--border: 1px solid rgba(0, 0, 0, .2);--background-color: #FFF;--color: inherit;--gap: 5px}:host.block{display:block;width:100%}:host>.wrapper{display:flex;flex-direction:row;gap:var(--gap)!important}:host>.wrapper>input{display:block;flex:1 0 0;width:0px;text-align:center;font-size:1em;color:var(--color)!important;padding:var(--padding-y) 0px var(--padding-y) 0px!important;background-color:var(--background-color)!important;border:var(--border)!important}:host>.wrapper>input:focus{outline:var(--border);box-shadow:none}\n"] }]
|
|
832
|
+
}], propDecorators: { chars: [{ type: i0.Input, args: [{ isSignal: true, alias: "chars", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputs: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => PinInputDirective), { isSignal: true }] }] } });
|
|
833
|
+
|
|
834
|
+
class NgFluxTabNavDirective {
|
|
835
|
+
routerLink = inject(RouterLink);
|
|
836
|
+
routerLinkActive = inject(RouterLinkActive);
|
|
837
|
+
ctrl = inject(TabNavController);
|
|
838
|
+
content = input(/* @ts-ignore */
|
|
839
|
+
...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
840
|
+
navContent = computed(() => this.content(), /* @ts-ignore */
|
|
841
|
+
...(ngDevMode ? [{ debugName: "navContent" }] : /* istanbul ignore next */ []));
|
|
842
|
+
routeActive = toSignal(this.routerLinkActive.isActiveChange, { initialValue: false });
|
|
843
|
+
active = computed(() => this.ctrl.active() === this, /* @ts-ignore */
|
|
844
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
845
|
+
constructor() {
|
|
846
|
+
const { ctrl } = this;
|
|
847
|
+
effect((onCleanup) => {
|
|
848
|
+
ctrl.add(this);
|
|
849
|
+
onCleanup(() => {
|
|
850
|
+
ctrl.remove(this);
|
|
851
|
+
});
|
|
852
|
+
});
|
|
853
|
+
effect(() => {
|
|
854
|
+
const active = this.routeActive();
|
|
855
|
+
if (active)
|
|
856
|
+
ctrl.activate(this);
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
activate(e) {
|
|
860
|
+
const { ctrl, routerLink, routeActive } = this;
|
|
861
|
+
if (routerLink.href !== null && !routeActive())
|
|
862
|
+
return;
|
|
863
|
+
ctrl.activate(this);
|
|
864
|
+
}
|
|
865
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabNavDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
866
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: NgFluxTabNavDirective, isStandalone: true, selector: "[ngfTabNav]", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "activate($event)" }, properties: { "class.ngf-tab-nav": "true", "class.active": "active()" } }, hostDirectives: [{ directive: i1$1.RouterLink, inputs: ["routerLink", "link"] }, { directive: i1$1.RouterLinkActive }], ngImport: i0 });
|
|
867
|
+
}
|
|
868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabNavDirective, decorators: [{
|
|
869
|
+
type: Directive,
|
|
870
|
+
args: [{
|
|
871
|
+
selector: '[ngfTabNav]',
|
|
872
|
+
hostDirectives: [
|
|
873
|
+
{ directive: RouterLink, inputs: ['routerLink: link'] },
|
|
874
|
+
RouterLinkActive,
|
|
875
|
+
],
|
|
876
|
+
host: {
|
|
877
|
+
'[class.ngf-tab-nav]': 'true',
|
|
878
|
+
'[class.active]': 'active()',
|
|
879
|
+
'(click)': 'activate($event)',
|
|
880
|
+
},
|
|
881
|
+
}]
|
|
882
|
+
}], ctorParameters: () => [], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
|
|
883
|
+
|
|
884
|
+
class NgFluxTabContentDirective {
|
|
885
|
+
templateRef = inject(TemplateRef);
|
|
886
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
887
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: NgFluxTabContentDirective, isStandalone: true, selector: "[ngfTabContent]", exportAs: ["content"], ngImport: i0 });
|
|
888
|
+
}
|
|
889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabContentDirective, decorators: [{
|
|
890
|
+
type: Directive,
|
|
891
|
+
args: [{
|
|
892
|
+
selector: '[ngfTabContent]',
|
|
893
|
+
exportAs: 'content',
|
|
894
|
+
}]
|
|
895
|
+
}] });
|
|
896
|
+
|
|
897
|
+
class NgFluxTab {
|
|
898
|
+
ctrl = inject(TabGroupController);
|
|
899
|
+
label = input.required(/* @ts-ignore */
|
|
900
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
901
|
+
navLabel = computed(() => this.label(), /* @ts-ignore */
|
|
902
|
+
...(ngDevMode ? [{ debugName: "navLabel" }] : /* istanbul ignore next */ []));
|
|
903
|
+
content = viewChild.required(NgFluxTabContentDirective, /* @ts-ignore */
|
|
904
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
905
|
+
constructor() {
|
|
906
|
+
const { ctrl } = this;
|
|
907
|
+
effect(onCleanup => {
|
|
908
|
+
ctrl.add(this);
|
|
909
|
+
onCleanup(() => {
|
|
910
|
+
ctrl.remove(this);
|
|
911
|
+
});
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
915
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: NgFluxTab, isStandalone: true, selector: "ngf-tab", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "content", first: true, predicate: NgFluxTabContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template ngfTabContent>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgFluxTabContentDirective, selector: "[ngfTabContent]", exportAs: ["content"] }] });
|
|
916
|
+
}
|
|
917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTab, decorators: [{
|
|
918
|
+
type: Component,
|
|
919
|
+
args: [{ selector: 'ngf-tab', imports: [
|
|
920
|
+
NgFluxTabContentDirective,
|
|
921
|
+
], template: "<ng-template ngfTabContent>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
922
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], content: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgFluxTabContentDirective), { isSignal: true }] }] } });
|
|
923
|
+
|
|
924
|
+
class NgFluxTabNavbar {
|
|
925
|
+
ctrl = inject(TabNavController);
|
|
926
|
+
panel = input(/* @ts-ignore */
|
|
927
|
+
...(ngDevMode ? [undefined, { debugName: "panel" }] : /* istanbul ignore next */ []));
|
|
928
|
+
selectedIndex = input(0, /* @ts-ignore */
|
|
929
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
930
|
+
constructor() {
|
|
931
|
+
const { ctrl } = this;
|
|
932
|
+
effect(() => {
|
|
933
|
+
const index = this.selectedIndex();
|
|
934
|
+
ctrl.selectedIndex.set(index);
|
|
935
|
+
});
|
|
936
|
+
effect(() => {
|
|
937
|
+
const panel = this.panel();
|
|
938
|
+
const content = ctrl.activeContent();
|
|
939
|
+
panel?.setContent(content?.templateRef);
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabNavbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
943
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: NgFluxTabNavbar, isStandalone: true, selector: "ngf-tab-navbar", inputs: { panel: { classPropertyName: "panel", publicName: "panel", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TabNavController], ngImport: i0, template: "<div class=\"wrapper\">\n <ng-content select=\"[ngfTabNav]\"></ng-content>\n</div>\n", styles: [":host{display:block;border-bottom:1px solid #CCC;overflow:auto hidden}:host>.wrapper{display:flex;flex-direction:row}\n"] });
|
|
944
|
+
}
|
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabNavbar, decorators: [{
|
|
946
|
+
type: Component,
|
|
947
|
+
args: [{ selector: 'ngf-tab-navbar', providers: [TabNavController], imports: [], template: "<div class=\"wrapper\">\n <ng-content select=\"[ngfTabNav]\"></ng-content>\n</div>\n", styles: [":host{display:block;border-bottom:1px solid #CCC;overflow:auto hidden}:host>.wrapper{display:flex;flex-direction:row}\n"] }]
|
|
948
|
+
}], ctorParameters: () => [], propDecorators: { panel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panel", required: false }] }], selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }] } });
|
|
949
|
+
|
|
950
|
+
class NgFluxTabPanel {
|
|
951
|
+
label = input(/* @ts-ignore */
|
|
952
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
953
|
+
content = signal(null, /* @ts-ignore */
|
|
954
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
955
|
+
setContent(tpl) {
|
|
956
|
+
this.content.set(tpl ?? null);
|
|
957
|
+
}
|
|
958
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
959
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: NgFluxTabPanel, isStandalone: true, selector: "ngf-tab-panel", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"wrapper\">\n <ng-container [ngTemplateOutlet]=\"content()\"></ng-container>\n</div>\n", styles: [".wrapper{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
960
|
+
}
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabPanel, decorators: [{
|
|
962
|
+
type: Component,
|
|
963
|
+
args: [{ selector: 'ngf-tab-panel', imports: [NgTemplateOutlet], template: "<div class=\"wrapper\">\n <ng-container [ngTemplateOutlet]=\"content()\"></ng-container>\n</div>\n", styles: [".wrapper{display:block}\n"] }]
|
|
964
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
965
|
+
|
|
966
|
+
class NgFluxTabGroup {
|
|
967
|
+
ctrl = inject(TabGroupController);
|
|
968
|
+
selectedIndex = input(0, /* @ts-ignore */
|
|
969
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
970
|
+
showTabs = false;
|
|
971
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
972
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxTabGroup, isStandalone: true, selector: "ngf-tab-group", inputs: { selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TabGroupController], ngImport: i0, template: "<ngf-tab-navbar [panel]=\"panel\" [selectedIndex]=\"selectedIndex()\">\n @for (tab of ctrl.tabs(); track $index) {\n <div ngfTabNav [content]=\"tab.content()\">\n <span>{{ tab.navLabel() }}</span>\n </div>\n }\n</ngf-tab-navbar>\n\n<ngf-tab-panel #panel></ngf-tab-panel>\n\n@if (showTabs) {\n <ng-content select=\"ngf-tab\"></ng-content>\n}\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: NgFluxTabNavbar, selector: "ngf-tab-navbar", inputs: ["panel", "selectedIndex"] }, { kind: "directive", type: NgFluxTabNavDirective, selector: "[ngfTabNav]", inputs: ["content"] }, { kind: "component", type: NgFluxTabPanel, selector: "ngf-tab-panel", inputs: ["label"] }] });
|
|
973
|
+
}
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxTabGroup, decorators: [{
|
|
975
|
+
type: Component,
|
|
976
|
+
args: [{ selector: 'ngf-tab-group', providers: [TabGroupController], imports: [
|
|
977
|
+
NgFluxTabNavbar,
|
|
978
|
+
NgFluxTabNavDirective,
|
|
979
|
+
NgFluxTabPanel
|
|
980
|
+
], template: "<ngf-tab-navbar [panel]=\"panel\" [selectedIndex]=\"selectedIndex()\">\n @for (tab of ctrl.tabs(); track $index) {\n <div ngfTabNav [content]=\"tab.content()\">\n <span>{{ tab.navLabel() }}</span>\n </div>\n }\n</ngf-tab-navbar>\n\n<ngf-tab-panel #panel></ngf-tab-panel>\n\n@if (showTabs) {\n <ng-content select=\"ngf-tab\"></ng-content>\n}\n", styles: [":host{display:block}\n"] }]
|
|
981
|
+
}], propDecorators: { selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }] } });
|
|
982
|
+
|
|
983
|
+
class NgFluxFrameSideMenu {
|
|
984
|
+
router = inject(Router, { optional: true });
|
|
985
|
+
parent = inject(NgFluxFrameSideMenu, {
|
|
986
|
+
optional: true,
|
|
987
|
+
skipSelf: true,
|
|
988
|
+
});
|
|
989
|
+
menu = input.required(/* @ts-ignore */
|
|
990
|
+
...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
|
|
991
|
+
expanded = signal(new Map(), /* @ts-ignore */
|
|
992
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
993
|
+
map = computed(() => {
|
|
994
|
+
const { router } = this;
|
|
995
|
+
const menu = this.menu();
|
|
996
|
+
const map = new Map();
|
|
997
|
+
for (let item of menu) {
|
|
998
|
+
const active = (router && item.href && !item.isExternal) ? isActive(item.href, router) : () => false;
|
|
999
|
+
map.set(item, active);
|
|
1000
|
+
}
|
|
1001
|
+
return map;
|
|
1002
|
+
}, /* @ts-ignore */
|
|
1003
|
+
...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
1004
|
+
hasParent = computed(() => !!this.parent, /* @ts-ignore */
|
|
1005
|
+
...(ngDevMode ? [{ debugName: "hasParent" }] : /* istanbul ignore next */ []));
|
|
1006
|
+
target = (item) => item.targetBlank ? '_blank' : null;
|
|
1007
|
+
isExpanded(item) {
|
|
1008
|
+
return this.expanded().has(item);
|
|
1009
|
+
}
|
|
1010
|
+
isActive(item) {
|
|
1011
|
+
return this.map().get(item)?.() ?? false;
|
|
1012
|
+
}
|
|
1013
|
+
toggle(e, item) {
|
|
1014
|
+
e.preventDefault();
|
|
1015
|
+
e.stopPropagation();
|
|
1016
|
+
this.expanded.update(v => {
|
|
1017
|
+
const map = new Map(v);
|
|
1018
|
+
if (!map.has(item)) {
|
|
1019
|
+
map.set(item, true);
|
|
1020
|
+
}
|
|
1021
|
+
else {
|
|
1022
|
+
map.delete(item);
|
|
1023
|
+
}
|
|
1024
|
+
return map;
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxFrameSideMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1028
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxFrameSideMenu, isStandalone: true, selector: "ngf-frame-side-menu", inputs: { menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.has-parent": "hasParent()" } }, ngImport: i0, template: "@if (menu().length) {\n <ul class=\"wrapper\">\n @for (item of menu(); track $index) {\n <li routerLinkActive=\"active\">\n @if(item.isExternal) {\n <a [href]=\"item.href ?? null\" [attr.target]=\"target(item)\" (click)=\"item.onClick?.($event, item)\">\n <div class=\"icon\">\n @if (item.icon) {<i [className]=\"item.icon\"></i>}\n </div>\n\n <div class=\"text\" [attr.title]=\"item.text\">{{ item.text }}</div>\n\n @if (item.children?.length) {\n @let icons = ['ngf-icon', isExpanded(item) ? 'unfold-less' : 'unfold-more'];\n <div class=\"toggle\" (click)=\"toggle($event, item)\">\n <i [className]=\"icons.join(' ')\"></i>\n </div>\n }\n </a>\n } @else {\n <a [routerLink]=\"item.href\" [attr.target]=\"target(item)\" (click)=\"item.onClick?.($event, item)\">\n <div class=\"icon\">\n @if (item.icon) {<i [className]=\"item.icon\"></i>}\n </div>\n\n <div class=\"text\" [attr.title]=\"item.text\">{{ item.text }}</div>\n\n @if (item.children?.length) {\n @let icons = ['ngf-icon', isExpanded(item) ? 'unfold-less' : 'unfold-more'];\n <div class=\"toggle\" (click)=\"toggle($event, item)\">\n <i [className]=\"icons.join(' ')\"></i>\n </div>\n }\n </a>\n }\n\n @if (item.children?.length && (isActive(item) || isExpanded(item))) {\n <ngf-frame-side-menu [menu]=\"item.children\" />\n }\n </li>\n }\n </ul>\n}\n", styles: [":host{display:block;font-size:var(--font-size)!important;--color: #333;--bg-color: transparent;--font-size: .8rem;--active-color: var(--ngf-primary);--active-bg-color: rgba(var(--ngf-primary-rgb), .1);--hover-color: var(--ngf-primary);--hover-bg-color: rgba(var(--ngf-primary-rgb), .1)}:host.has-parent{padding:0 0 0 20px}:host .wrapper{display:block;list-style:none;padding:0;margin:0}:host .wrapper>li{display:block;background-color:var(--bg-color)!important;padding:0;margin:0}:host .wrapper>li:hover{--bg-color: var(--hover-bg-color)}:host .wrapper>li.active{--color: var(--active-color);--bg-color: var(--active-bg-color)}:host .wrapper>li>a{display:flex;flex-direction:row;align-items:center;padding:5px;text-decoration:none!important;cursor:pointer;width:100%;gap:5px}:host .wrapper>li>a,:host .wrapper>li>a:link{color:var(--color)!important}:host .wrapper>li>a>.icon{display:block;width:13px}:host .wrapper>li>a>.icon .ngf-icon{font-size:1em}:host .wrapper>li>a>.text{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1 0 0;width:0px}:host .wrapper>li>a>.toggle{display:block;cursor:pointer}:host .wrapper>li>a>.toggle .ngf-icon{font-size:1em}\n"], dependencies: [{ kind: "component", type: NgFluxFrameSideMenu, selector: "ngf-frame-side-menu", inputs: ["menu"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
1029
|
+
}
|
|
1030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxFrameSideMenu, decorators: [{
|
|
1031
|
+
type: Component,
|
|
1032
|
+
args: [{ selector: 'ngf-frame-side-menu', imports: [
|
|
1033
|
+
RouterLink,
|
|
1034
|
+
RouterLinkActive,
|
|
1035
|
+
], host: {
|
|
1036
|
+
'[class.has-parent]': 'hasParent()',
|
|
1037
|
+
}, template: "@if (menu().length) {\n <ul class=\"wrapper\">\n @for (item of menu(); track $index) {\n <li routerLinkActive=\"active\">\n @if(item.isExternal) {\n <a [href]=\"item.href ?? null\" [attr.target]=\"target(item)\" (click)=\"item.onClick?.($event, item)\">\n <div class=\"icon\">\n @if (item.icon) {<i [className]=\"item.icon\"></i>}\n </div>\n\n <div class=\"text\" [attr.title]=\"item.text\">{{ item.text }}</div>\n\n @if (item.children?.length) {\n @let icons = ['ngf-icon', isExpanded(item) ? 'unfold-less' : 'unfold-more'];\n <div class=\"toggle\" (click)=\"toggle($event, item)\">\n <i [className]=\"icons.join(' ')\"></i>\n </div>\n }\n </a>\n } @else {\n <a [routerLink]=\"item.href\" [attr.target]=\"target(item)\" (click)=\"item.onClick?.($event, item)\">\n <div class=\"icon\">\n @if (item.icon) {<i [className]=\"item.icon\"></i>}\n </div>\n\n <div class=\"text\" [attr.title]=\"item.text\">{{ item.text }}</div>\n\n @if (item.children?.length) {\n @let icons = ['ngf-icon', isExpanded(item) ? 'unfold-less' : 'unfold-more'];\n <div class=\"toggle\" (click)=\"toggle($event, item)\">\n <i [className]=\"icons.join(' ')\"></i>\n </div>\n }\n </a>\n }\n\n @if (item.children?.length && (isActive(item) || isExpanded(item))) {\n <ngf-frame-side-menu [menu]=\"item.children\" />\n }\n </li>\n }\n </ul>\n}\n", styles: [":host{display:block;font-size:var(--font-size)!important;--color: #333;--bg-color: transparent;--font-size: .8rem;--active-color: var(--ngf-primary);--active-bg-color: rgba(var(--ngf-primary-rgb), .1);--hover-color: var(--ngf-primary);--hover-bg-color: rgba(var(--ngf-primary-rgb), .1)}:host.has-parent{padding:0 0 0 20px}:host .wrapper{display:block;list-style:none;padding:0;margin:0}:host .wrapper>li{display:block;background-color:var(--bg-color)!important;padding:0;margin:0}:host .wrapper>li:hover{--bg-color: var(--hover-bg-color)}:host .wrapper>li.active{--color: var(--active-color);--bg-color: var(--active-bg-color)}:host .wrapper>li>a{display:flex;flex-direction:row;align-items:center;padding:5px;text-decoration:none!important;cursor:pointer;width:100%;gap:5px}:host .wrapper>li>a,:host .wrapper>li>a:link{color:var(--color)!important}:host .wrapper>li>a>.icon{display:block;width:13px}:host .wrapper>li>a>.icon .ngf-icon{font-size:1em}:host .wrapper>li>a>.text{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1 0 0;width:0px}:host .wrapper>li>a>.toggle{display:block;cursor:pointer}:host .wrapper>li>a>.toggle .ngf-icon{font-size:1em}\n"] }]
|
|
1038
|
+
}], propDecorators: { menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu", required: true }] }] } });
|
|
1039
|
+
|
|
1040
|
+
class NgFluxFrameHeaderMenu {
|
|
1041
|
+
menu = input.required(/* @ts-ignore */
|
|
1042
|
+
...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
|
|
1043
|
+
open = signal(false, /* @ts-ignore */
|
|
1044
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
1045
|
+
target = (item) => item.targetBlank ? '_blank' : null;
|
|
1046
|
+
toggle(e) {
|
|
1047
|
+
e.stopPropagation();
|
|
1048
|
+
this.open.update(v => !v);
|
|
1049
|
+
}
|
|
1050
|
+
onDocumentClick(e) {
|
|
1051
|
+
this.open.set(false);
|
|
1052
|
+
}
|
|
1053
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxFrameHeaderMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1054
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxFrameHeaderMenu, isStandalone: true, selector: "ngf-frame-header-menu", inputs: { menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div class=\"toggle\" (click)=\"toggle($event)\">\n @let icons = ['ngf-icon', open() ? 'close' : 'menu'];\n <i [className]=\"icons.join(' ')\"></i>\n</div>\n\n<div class=\"wrapper\" [class.open]=\"open()\">\n @if (menu().length) {\n <ul class=\"menu\">\n @for (item of menu(); track $index) {\n <li>\n @if (item.isExternal) {\n <a [href]=\"item.href\" [attr.target]=\"target(item)\">\n @if (item.icon) {\n <div class=\"icon\">\n <i [className]=\"item.icon\"></i>\n </div>\n }\n\n <div class=\"text\">{{ item.text }}</div>\n </a>\n } @else {\n <a [routerLink]=\"item.href\" [attr.target]=\"target(item)\">\n @if (item.icon) {\n <div class=\"icon\">\n <i [className]=\"item.icon\"></i>\n </div>\n }\n\n <div class=\"text\">{{ item.text }}</div>\n </a>\n }\n </li>\n }\n </ul>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:row;justify-content:end;container:main/inline-size scroll-state!important;align-self:stretch;--border: 1px solid #DDD}:host .toggle{display:flex;flex-direction:row;align-items:center;justify-content:center;border-left:var(--border)!important;border-right:var(--border)!important;padding:0 10px;cursor:pointer}@container main (min-width: 576px){:host .toggle{display:none}}:host .wrapper{display:none;position:relative}:host .wrapper.open{display:block}@container main (min-width: 576px){:host .wrapper{display:block}}:host .wrapper>.menu{display:block;position:absolute;inset:100% 0 auto auto;box-shadow:0 3px 3px #00000080;background-color:#fff;list-style:none;height:auto;padding:0;margin:0}@container main (min-width: 576px){:host .wrapper>.menu{display:flex;flex-direction:row;align-items:center;justify-content:end;position:static;background-color:transparent;box-shadow:none;height:100%;inset:auto;gap:15px}}:host .wrapper>.menu>li{display:block;padding:0;margin:0}:host .wrapper>.menu>li>a{display:flex;flex-direction:row;align-items:center;text-decoration:none!important;padding:7px 20px;gap:5px}@container main (min-width: 576px){:host .wrapper>.menu>li>a{padding:0}}:host .wrapper>.menu>li>a>.icon{display:block}:host .wrapper>.menu>li>a>.icon>*{font-size:1.2em}:host .wrapper>.menu>li>a>.text{display:block;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
1055
|
+
}
|
|
1056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxFrameHeaderMenu, decorators: [{
|
|
1057
|
+
type: Component,
|
|
1058
|
+
args: [{ selector: 'ngf-frame-header-menu', imports: [RouterLink], host: {
|
|
1059
|
+
'(document:click)': 'onDocumentClick($event)',
|
|
1060
|
+
}, template: "<div class=\"toggle\" (click)=\"toggle($event)\">\n @let icons = ['ngf-icon', open() ? 'close' : 'menu'];\n <i [className]=\"icons.join(' ')\"></i>\n</div>\n\n<div class=\"wrapper\" [class.open]=\"open()\">\n @if (menu().length) {\n <ul class=\"menu\">\n @for (item of menu(); track $index) {\n <li>\n @if (item.isExternal) {\n <a [href]=\"item.href\" [attr.target]=\"target(item)\">\n @if (item.icon) {\n <div class=\"icon\">\n <i [className]=\"item.icon\"></i>\n </div>\n }\n\n <div class=\"text\">{{ item.text }}</div>\n </a>\n } @else {\n <a [routerLink]=\"item.href\" [attr.target]=\"target(item)\">\n @if (item.icon) {\n <div class=\"icon\">\n <i [className]=\"item.icon\"></i>\n </div>\n }\n\n <div class=\"text\">{{ item.text }}</div>\n </a>\n }\n </li>\n }\n </ul>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:row;justify-content:end;container:main/inline-size scroll-state!important;align-self:stretch;--border: 1px solid #DDD}:host .toggle{display:flex;flex-direction:row;align-items:center;justify-content:center;border-left:var(--border)!important;border-right:var(--border)!important;padding:0 10px;cursor:pointer}@container main (min-width: 576px){:host .toggle{display:none}}:host .wrapper{display:none;position:relative}:host .wrapper.open{display:block}@container main (min-width: 576px){:host .wrapper{display:block}}:host .wrapper>.menu{display:block;position:absolute;inset:100% 0 auto auto;box-shadow:0 3px 3px #00000080;background-color:#fff;list-style:none;height:auto;padding:0;margin:0}@container main (min-width: 576px){:host .wrapper>.menu{display:flex;flex-direction:row;align-items:center;justify-content:end;position:static;background-color:transparent;box-shadow:none;height:100%;inset:auto;gap:15px}}:host .wrapper>.menu>li{display:block;padding:0;margin:0}:host .wrapper>.menu>li>a{display:flex;flex-direction:row;align-items:center;text-decoration:none!important;padding:7px 20px;gap:5px}@container main (min-width: 576px){:host .wrapper>.menu>li>a{padding:0}}:host .wrapper>.menu>li>a>.icon{display:block}:host .wrapper>.menu>li>a>.icon>*{font-size:1.2em}:host .wrapper>.menu>li>a>.text{display:block;white-space:nowrap}\n"] }]
|
|
1061
|
+
}], propDecorators: { menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu", required: true }] }] } });
|
|
1062
|
+
|
|
1063
|
+
class NgFluxFrame {
|
|
1064
|
+
leftRef = viewChild.required('left', /* @ts-ignore */
|
|
1065
|
+
...(ngDevMode ? [{ debugName: "leftRef" }] : /* istanbul ignore next */ []));
|
|
1066
|
+
viewport = input(false, { ...(ngDevMode ? { debugName: "viewport" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1067
|
+
options = input({}, /* @ts-ignore */
|
|
1068
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
1069
|
+
title = computed(() => this.options().title?.() ?? '', /* @ts-ignore */
|
|
1070
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1071
|
+
icon = computed(() => this.options().icon?.() ?? '', /* @ts-ignore */
|
|
1072
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1073
|
+
image = computed(() => this.options().image?.() ?? '', /* @ts-ignore */
|
|
1074
|
+
...(ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []));
|
|
1075
|
+
toolbarItems = computed(() => this.options().toolbarItems?.() ?? [], /* @ts-ignore */
|
|
1076
|
+
...(ngDevMode ? [{ debugName: "toolbarItems" }] : /* istanbul ignore next */ []));
|
|
1077
|
+
headerMenu = computed(() => this.options().headerMenu?.() ?? [], /* @ts-ignore */
|
|
1078
|
+
...(ngDevMode ? [{ debugName: "headerMenu" }] : /* istanbul ignore next */ []));
|
|
1079
|
+
drawer = signal(false, /* @ts-ignore */
|
|
1080
|
+
...(ngDevMode ? [{ debugName: "drawer" }] : /* istanbul ignore next */ []));
|
|
1081
|
+
search = signal('', /* @ts-ignore */
|
|
1082
|
+
...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
1083
|
+
searchText = debounced(this.search, 300);
|
|
1084
|
+
sideMenu = computed(() => {
|
|
1085
|
+
const menu = this.options().sideMenu?.() ?? [];
|
|
1086
|
+
const text = (this.searchText.value() ?? '').trim().toLowerCase();
|
|
1087
|
+
if (!text)
|
|
1088
|
+
return menu;
|
|
1089
|
+
return this.searchMenu(text, menu);
|
|
1090
|
+
}, /* @ts-ignore */
|
|
1091
|
+
...(ngDevMode ? [{ debugName: "sideMenu" }] : /* istanbul ignore next */ []));
|
|
1092
|
+
searchMenu(text, menu) {
|
|
1093
|
+
const result = [];
|
|
1094
|
+
for (let entry of menu ?? []) {
|
|
1095
|
+
const item = Object.assign({}, entry);
|
|
1096
|
+
item.children = this.searchMenu(text, item.children);
|
|
1097
|
+
if (item.children.length) {
|
|
1098
|
+
result.push(item);
|
|
1099
|
+
continue;
|
|
1100
|
+
}
|
|
1101
|
+
const itemText = item.text.toLowerCase();
|
|
1102
|
+
if (itemText.includes(text))
|
|
1103
|
+
result.push(item);
|
|
1104
|
+
}
|
|
1105
|
+
return result;
|
|
1106
|
+
}
|
|
1107
|
+
toggleDrawer(e) {
|
|
1108
|
+
e?.stopPropagation();
|
|
1109
|
+
this.drawer.update(v => !v);
|
|
1110
|
+
}
|
|
1111
|
+
closeDrawer(e) {
|
|
1112
|
+
e?.stopPropagation();
|
|
1113
|
+
this.drawer.set(false);
|
|
1114
|
+
}
|
|
1115
|
+
onDocumentClick(e) {
|
|
1116
|
+
const target = e.target;
|
|
1117
|
+
const left = this.leftRef().nativeElement;
|
|
1118
|
+
if (left.contains(target))
|
|
1119
|
+
return;
|
|
1120
|
+
this.drawer.set(false);
|
|
1121
|
+
}
|
|
1122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxFrame, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxFrame, isStandalone: true, selector: "ngf-frame", inputs: { viewport: { classPropertyName: "viewport", publicName: "viewport", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)" }, properties: { "class.viewport": "viewport()" } }, viewQueries: [{ propertyName: "leftRef", first: true, predicate: ["left"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"frame\">\n <!-- BEGIN: Frame Header -->\n <div class=\"frame-header\">\n @if (image()) {\n <img [src]=\"image()\" alt=\"\" class=\"image\">\n } @else if (icon()) {\n <div class=\"icon\">\n <i [className]=\"icon()\"></i>\n </div>\n }\n\n @if (title()) {<h1>{{ title() }}</h1>}\n\n <ngf-frame-header-menu [menu]=\"headerMenu()\" />\n </div>\n <!-- END: Frame Header -->\n\n <div class=\"frame-body\">\n <!-- BEGIN: Left Sidebar -->\n <div #left class=\"frame-body-left\" [class.drawer]=\"drawer()\">\n <div class=\"btn-row\">\n <div class=\"close-btn\" (click)=\"closeDrawer($event)\">\n <i class=\"ngf-icon close\"></i>\n </div>\n </div>\n\n <div class=\"search-form\">\n <input type=\"text\" placeholder=\"Search menu\" [(ngModel)]=\"search\">\n\n @if (search()) {\n <div class=\"clear\" (click)=\"search.set('')\">\n <i class=\"ngf-icon close\"></i>\n </div>\n }\n </div>\n\n <div class=\"menu-pane\">\n <ngf-frame-side-menu [menu]=\"sideMenu()\" />\n </div>\n </div>\n <!-- END: Left Sidebar -->\n\n <div class=\"frame-body-overlay\" [class.drawer]=\"drawer()\"></div>\n\n <!-- BEGIN: Right Sidebar -->\n <div class=\"frame-body-right\" [class.drawer]=\"drawer()\">\n <div class=\"frame-toolbar\">\n <div class=\"drawer-btn\" (click)=\"toggleDrawer($event)\">\n <i class=\"ngf-icon menu\"></i>\n </div>\n\n <div class=\"spacer\"></div>\n\n <!--\n <div class=\"drawer-btn\" (click)=\"toggleDrawer($event)\">\n <i class=\"ngf-icon close\"></i>\n </div>\n -->\n </div>\n\n <div class=\"frame-content\">\n <ng-content></ng-content>\n </div>\n </div>\n <!-- END: Right Sidebar -->\n </div>\n</div>\n", styles: [":host{display:block;border:var(--border)!important;font-size:1rem;color:#333;--border: 1px solid #CCC;--left-width: 100%}:host .frame{display:block;position:relative;container:frame/inline-size;overflow:hidden}:host .frame-header{display:flex;flex-direction:row;box-shadow:0 0 5px #00000080;background-color:#fff;align-items:center;position:relative;padding:0 20px;height:40px;z-index:20;gap:15px}:host .frame-header>.image{display:block;object-position:center;object-fit:cover;aspect-ratio:1;height:80%}:host .frame-header>.icon{display:block}:host .frame-header>.icon>*{font-size:1.5em}:host .frame-header>h1{display:block;font-size:1.1em;font-weight:600;color:inherit;margin:0}:host .frame-header>ngf-frame-header-menu{flex:1 0 0}:host .frame-body{display:flex;flex-direction:row;position:relative;min-height:100px}@container frame (min-width: 375px){:host .frame-body{--left-width: 200px}}@container frame (min-width: 992px){:host .frame-body{--left-width: 250px}}:host .frame-body-left{display:flex;flex-direction:column;position:relative;width:var(--left-width)!important;box-shadow:0 0 5px #00000080;margin-left:calc(var(--left-width) * -1);transition:all .3s ease-in-out;background-color:#fff;z-index:15}:host .frame-body-left.drawer{margin-left:0}@container frame (min-width: 768px){:host .frame-body-left{margin-left:0}}:host .frame-body-left .btn-row{display:flex;flex-direction:row;align-items:center;justify-content:end;border-bottom:var(--border)!important;padding:2px}@container frame (min-width: 375px){:host .frame-body-left .btn-row{display:none}}:host .frame-body-left .btn-row .close-btn{display:block;cursor:pointer;padding:0 3px}:host .frame-body-left .search-form{display:block;position:relative;border-bottom:var(--border)!important;padding:10px}:host .frame-body-left .search-form>input{display:block;background-color:#fff;border:var(--border)!important;border-radius:3px;padding:10px;width:100%}:host .frame-body-left .search-form>input:focus{outline:var(--border)!important;box-shadow:none}:host .frame-body-left .search-form>.clear{display:block;position:absolute;inset:50% 20px auto auto;transform:translateY(-50%);cursor:pointer;z-index:5}:host .frame-body-left .menu-pane{display:block;flex:1 1 auto;overflow:hidden auto}:host .frame-body-overlay{display:none;position:absolute;inset:0;background-color:#0003;z-index:10}:host .frame-body-overlay.drawer{display:block}@container frame (min-width: 768px){:host .frame-body-overlay{display:none}}:host .frame-body-right{display:flex;flex-direction:column;background-color:#eee;margin-right:calc(var(--left-width) * -1);transition:all .3s ease-in-out;flex:1 0 0;width:0px}:host .frame-body-right.drawer{margin-left:0}@container frame (min-width: 768px){:host .frame-body-right{margin-left:0}}:host .frame-toolbar{display:flex;flex-direction:row;border-bottom:var(--border)!important;background-color:#fff;height:30px}:host .frame-toolbar>.spacer{display:block;flex:1 0 0;width:0px}:host .frame-toolbar>.drawer-btn{display:block;position:relative;border-right:var(--border)!important;cursor:pointer;width:30px}@container frame (min-width: 768px){:host .frame-toolbar>.drawer-btn{display:none}}:host .frame-toolbar>.drawer-btn>.ngf-icon{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);font-size:1em}:host .frame-content{display:block;flex:1 1 auto;overflow:hidden auto}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgFluxFrameHeaderMenu, selector: "ngf-frame-header-menu", inputs: ["menu"] }, { kind: "component", type: NgFluxFrameSideMenu, selector: "ngf-frame-side-menu", inputs: ["menu"] }] });
|
|
1124
|
+
}
|
|
1125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxFrame, decorators: [{
|
|
1126
|
+
type: Component,
|
|
1127
|
+
args: [{ selector: 'ngf-frame', imports: [
|
|
1128
|
+
FormsModule,
|
|
1129
|
+
NgFluxFrameHeaderMenu,
|
|
1130
|
+
NgFluxFrameSideMenu,
|
|
1131
|
+
], host: {
|
|
1132
|
+
'[class.viewport]': 'viewport()',
|
|
1133
|
+
'(document:click)': 'onDocumentClick($event)',
|
|
1134
|
+
}, template: "<div class=\"frame\">\n <!-- BEGIN: Frame Header -->\n <div class=\"frame-header\">\n @if (image()) {\n <img [src]=\"image()\" alt=\"\" class=\"image\">\n } @else if (icon()) {\n <div class=\"icon\">\n <i [className]=\"icon()\"></i>\n </div>\n }\n\n @if (title()) {<h1>{{ title() }}</h1>}\n\n <ngf-frame-header-menu [menu]=\"headerMenu()\" />\n </div>\n <!-- END: Frame Header -->\n\n <div class=\"frame-body\">\n <!-- BEGIN: Left Sidebar -->\n <div #left class=\"frame-body-left\" [class.drawer]=\"drawer()\">\n <div class=\"btn-row\">\n <div class=\"close-btn\" (click)=\"closeDrawer($event)\">\n <i class=\"ngf-icon close\"></i>\n </div>\n </div>\n\n <div class=\"search-form\">\n <input type=\"text\" placeholder=\"Search menu\" [(ngModel)]=\"search\">\n\n @if (search()) {\n <div class=\"clear\" (click)=\"search.set('')\">\n <i class=\"ngf-icon close\"></i>\n </div>\n }\n </div>\n\n <div class=\"menu-pane\">\n <ngf-frame-side-menu [menu]=\"sideMenu()\" />\n </div>\n </div>\n <!-- END: Left Sidebar -->\n\n <div class=\"frame-body-overlay\" [class.drawer]=\"drawer()\"></div>\n\n <!-- BEGIN: Right Sidebar -->\n <div class=\"frame-body-right\" [class.drawer]=\"drawer()\">\n <div class=\"frame-toolbar\">\n <div class=\"drawer-btn\" (click)=\"toggleDrawer($event)\">\n <i class=\"ngf-icon menu\"></i>\n </div>\n\n <div class=\"spacer\"></div>\n\n <!--\n <div class=\"drawer-btn\" (click)=\"toggleDrawer($event)\">\n <i class=\"ngf-icon close\"></i>\n </div>\n -->\n </div>\n\n <div class=\"frame-content\">\n <ng-content></ng-content>\n </div>\n </div>\n <!-- END: Right Sidebar -->\n </div>\n</div>\n", styles: [":host{display:block;border:var(--border)!important;font-size:1rem;color:#333;--border: 1px solid #CCC;--left-width: 100%}:host .frame{display:block;position:relative;container:frame/inline-size;overflow:hidden}:host .frame-header{display:flex;flex-direction:row;box-shadow:0 0 5px #00000080;background-color:#fff;align-items:center;position:relative;padding:0 20px;height:40px;z-index:20;gap:15px}:host .frame-header>.image{display:block;object-position:center;object-fit:cover;aspect-ratio:1;height:80%}:host .frame-header>.icon{display:block}:host .frame-header>.icon>*{font-size:1.5em}:host .frame-header>h1{display:block;font-size:1.1em;font-weight:600;color:inherit;margin:0}:host .frame-header>ngf-frame-header-menu{flex:1 0 0}:host .frame-body{display:flex;flex-direction:row;position:relative;min-height:100px}@container frame (min-width: 375px){:host .frame-body{--left-width: 200px}}@container frame (min-width: 992px){:host .frame-body{--left-width: 250px}}:host .frame-body-left{display:flex;flex-direction:column;position:relative;width:var(--left-width)!important;box-shadow:0 0 5px #00000080;margin-left:calc(var(--left-width) * -1);transition:all .3s ease-in-out;background-color:#fff;z-index:15}:host .frame-body-left.drawer{margin-left:0}@container frame (min-width: 768px){:host .frame-body-left{margin-left:0}}:host .frame-body-left .btn-row{display:flex;flex-direction:row;align-items:center;justify-content:end;border-bottom:var(--border)!important;padding:2px}@container frame (min-width: 375px){:host .frame-body-left .btn-row{display:none}}:host .frame-body-left .btn-row .close-btn{display:block;cursor:pointer;padding:0 3px}:host .frame-body-left .search-form{display:block;position:relative;border-bottom:var(--border)!important;padding:10px}:host .frame-body-left .search-form>input{display:block;background-color:#fff;border:var(--border)!important;border-radius:3px;padding:10px;width:100%}:host .frame-body-left .search-form>input:focus{outline:var(--border)!important;box-shadow:none}:host .frame-body-left .search-form>.clear{display:block;position:absolute;inset:50% 20px auto auto;transform:translateY(-50%);cursor:pointer;z-index:5}:host .frame-body-left .menu-pane{display:block;flex:1 1 auto;overflow:hidden auto}:host .frame-body-overlay{display:none;position:absolute;inset:0;background-color:#0003;z-index:10}:host .frame-body-overlay.drawer{display:block}@container frame (min-width: 768px){:host .frame-body-overlay{display:none}}:host .frame-body-right{display:flex;flex-direction:column;background-color:#eee;margin-right:calc(var(--left-width) * -1);transition:all .3s ease-in-out;flex:1 0 0;width:0px}:host .frame-body-right.drawer{margin-left:0}@container frame (min-width: 768px){:host .frame-body-right{margin-left:0}}:host .frame-toolbar{display:flex;flex-direction:row;border-bottom:var(--border)!important;background-color:#fff;height:30px}:host .frame-toolbar>.spacer{display:block;flex:1 0 0;width:0px}:host .frame-toolbar>.drawer-btn{display:block;position:relative;border-right:var(--border)!important;cursor:pointer;width:30px}@container frame (min-width: 768px){:host .frame-toolbar>.drawer-btn{display:none}}:host .frame-toolbar>.drawer-btn>.ngf-icon{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);font-size:1em}:host .frame-content{display:block;flex:1 1 auto;overflow:hidden auto}\n"] }]
|
|
1135
|
+
}], propDecorators: { leftRef: [{ type: i0.ViewChild, args: ['left', { isSignal: true }] }], viewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewport", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
1136
|
+
|
|
356
1137
|
class NgFluxLoadingInternal {
|
|
357
1138
|
config = inject(NGF_CONFIG);
|
|
358
1139
|
appRef = inject(ApplicationRef);
|
|
@@ -384,10 +1165,10 @@ class NgFluxLoadingInternal {
|
|
|
384
1165
|
router.events.pipe(navError).subscribe(nav => root.stop());
|
|
385
1166
|
}
|
|
386
1167
|
}
|
|
387
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
388
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingInternal, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1169
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingInternal, providedIn: 'root' });
|
|
389
1170
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoadingInternal, decorators: [{
|
|
391
1172
|
type: Injectable,
|
|
392
1173
|
args: [{ providedIn: 'root' }]
|
|
393
1174
|
}], ctorParameters: () => [] });
|
|
@@ -401,10 +1182,10 @@ class NgFluxLoading {
|
|
|
401
1182
|
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
402
1183
|
start = (text = '') => this.root.start(text);
|
|
403
1184
|
stop = () => this.root.stop();
|
|
404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
405
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1185
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1186
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoading, providedIn: 'root' });
|
|
406
1187
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxLoading, decorators: [{
|
|
408
1189
|
type: Injectable,
|
|
409
1190
|
args: [{ providedIn: 'root' }]
|
|
410
1191
|
}] });
|
|
@@ -415,7 +1196,7 @@ class NgFluxDialogComponent {
|
|
|
415
1196
|
onClosed = inject(NGF_DIALOG_CLOSE_FN);
|
|
416
1197
|
content = inject(NGF_DIALOG_CONTENT);
|
|
417
1198
|
config = inject(NGF_DIALOG_CONFIG);
|
|
418
|
-
viewContainer = viewChild.required('container', { read: ViewContainerRef });
|
|
1199
|
+
viewContainer = viewChild.required('container', { ...(ngDevMode ? { debugName: "viewContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
419
1200
|
componentRef;
|
|
420
1201
|
data;
|
|
421
1202
|
constructor() {
|
|
@@ -473,10 +1254,10 @@ class NgFluxDialogComponent {
|
|
|
473
1254
|
const ref = this.componentRef.location;
|
|
474
1255
|
ref.nativeElement.classList.add('close');
|
|
475
1256
|
}
|
|
476
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
477
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.
|
|
1257
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1258
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: NgFluxDialogComponent, isStandalone: true, selector: "ngf-dialog", host: { listeners: { "click": "onBackdropClick($event)" } }, viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n <div class=\"content\">\n <ng-template #container></ng-template>\n </div>\n</div>\n", styles: [":host{display:block;position:fixed;background-color:var(--ngf-dialog-backdrop-color)!important;visibility:visible!important;z-index:var(--ngf-dialog-z-index)!important;inset:0}:host>.wrapper{display:block;width:100%!important;height:100%!important;overflow:hidden auto}:host>.wrapper>.content{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:100%;min-height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
478
1259
|
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialogComponent, decorators: [{
|
|
480
1261
|
type: Component,
|
|
481
1262
|
args: [{ selector: 'ngf-dialog', changeDetection: ChangeDetectionStrategy.Eager, imports: [], template: "<div class=\"wrapper\">\n <div class=\"content\">\n <ng-template #container></ng-template>\n </div>\n</div>\n", styles: [":host{display:block;position:fixed;background-color:var(--ngf-dialog-backdrop-color)!important;visibility:visible!important;z-index:var(--ngf-dialog-z-index)!important;inset:0}:host>.wrapper{display:block;width:100%!important;height:100%!important;overflow:hidden auto}:host>.wrapper>.content{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:100%;min-height:100%}\n"] }]
|
|
482
1263
|
}], ctorParameters: () => [], propDecorators: { viewContainer: [{ type: i0.ViewChild, args: ['container', { ...{ read: ViewContainerRef }, isSignal: true }] }], onBackdropClick: [{
|
|
@@ -604,10 +1385,10 @@ class NgFluxAlertDialog {
|
|
|
604
1385
|
dialogRef.close();
|
|
605
1386
|
}
|
|
606
1387
|
}
|
|
607
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
608
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxAlertDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1389
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxAlertDialog, isStandalone: true, selector: "ngf-dialog-box-alert", ngImport: i0, template: "@if (options.title) {\n <ngf-dialog-header>\n <h1 ngf-dialog-title>{{ options.title }}</h1>\n </ngf-dialog-header>\n}\n\n<ngf-dialog-body>\n <div [innerHTML]=\"options.content\"></div>\n</ngf-dialog-body>\n\n<ngf-dialog-footer>\n @for (btn of buttons(); track $index) {\n @switch (btn) {\n @case ('flex') {<div ngf-flex-x></div>}\n\n @default {\n <ngf-button [theme]=\"btn.theme\" [size]=\"btn.size\" [direction]=\"btn.direction\" (click)=\"onButtonClick($event, btn)\">\n <span>{{ btn.text }}</span>\n </ngf-button>\n }\n }\n }\n</ngf-dialog-footer>\n", styles: [":host{display:block;width:90%;max-width:500px;background-color:#fff}:host .success{color:var(--ngf-success)}:host .error{color:var(--ngf-error)}\n"], dependencies: [{ kind: "component", type: NgFluxButton, selector: "ngf-button", inputs: ["icon", "theme", "type", "size", "direction", "block", "disabled"] }, { kind: "component", type: NgFluxDialogHeaderComponent, selector: "ngf-dialog-header", inputs: ["icon"] }, { kind: "component", type: NgFluxDialogBodyComponent, selector: "ngf-dialog-body" }, { kind: "component", type: NgFluxDialogFooterComponent, selector: "ngf-dialog-footer" }] });
|
|
609
1390
|
}
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxAlertDialog, decorators: [{
|
|
611
1392
|
type: Component,
|
|
612
1393
|
args: [{ selector: 'ngf-dialog-box-alert', imports: [
|
|
613
1394
|
NgFluxButton,
|
|
@@ -642,10 +1423,10 @@ class NgFluxConfirmDialog {
|
|
|
642
1423
|
onButtonClick(e, btn) {
|
|
643
1424
|
btn.onClick?.call(null, e, btn, this.dialogRef);
|
|
644
1425
|
}
|
|
645
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
646
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1426
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxConfirmDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1427
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxConfirmDialog, isStandalone: true, selector: "ngf-dialog-box-confirm", ngImport: i0, template: "@if (options.title) {\n <ngf-dialog-header>\n <h1 ngf-dialog-title>{{ options.title }}</h1>\n </ngf-dialog-header>\n}\n\n<ngf-dialog-body>\n <div [innerHTML]=\"options.content\"></div>\n</ngf-dialog-body>\n\n<ngf-dialog-footer>\n @for (btn of buttons(); track $index) {\n <ngf-button [theme]=\"btn.theme\" (click)=\"onButtonClick($event, btn)\">\n <span>{{ btn.text }}</span>\n </ngf-button>\n }\n</ngf-dialog-footer>\n", styles: [":host{display:block;width:90%;max-width:500px;background-color:#fff}\n"], dependencies: [{ kind: "component", type: NgFluxButton, selector: "ngf-button", inputs: ["icon", "theme", "type", "size", "direction", "block", "disabled"] }, { kind: "component", type: NgFluxDialogHeaderComponent, selector: "ngf-dialog-header", inputs: ["icon"] }, { kind: "component", type: NgFluxDialogFooterComponent, selector: "ngf-dialog-footer" }, { kind: "component", type: NgFluxDialogBodyComponent, selector: "ngf-dialog-body" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
647
1428
|
}
|
|
648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxConfirmDialog, decorators: [{
|
|
649
1430
|
type: Component,
|
|
650
1431
|
args: [{ selector: 'ngf-dialog-box-confirm', changeDetection: ChangeDetectionStrategy.Eager, imports: [
|
|
651
1432
|
NgFluxButton,
|
|
@@ -686,10 +1467,10 @@ class NgFluxPromptDialog {
|
|
|
686
1467
|
onButtonClick(e, btn) {
|
|
687
1468
|
btn.onClick?.call(null, e, btn, this.dialogRef);
|
|
688
1469
|
}
|
|
689
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
690
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPromptDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgFluxPromptDialog, isStandalone: true, selector: "ngf-dialog-box-prompt", ngImport: i0, template: "<ngf-dialog-header>\n <h1 ngf-dialog-title>{{ options.title }}</h1>\n</ngf-dialog-header>\n\n<ngf-dialog-body>\n <div class=\"content\" [innerHTML]=\"options.content\"></div>\n <input type=\"text\" name=\"text\" [placeholder]=\"options.placeholder\" [(ngModel)]=\"text\">\n</ngf-dialog-body>\n\n<ngf-dialog-footer>\n @for (btn of buttons(); track $index) {\n <ngf-button [theme]=\"btn.theme\" (click)=\"onButtonClick($event, btn)\" [disabled]=\"btn.disabled?.() ?? false\">\n <span>{{ btn.text }}</span>\n </ngf-button>\n }\n</ngf-dialog-footer>\n", styles: [":host{display:block;width:90%;max-width:350px;background-color:#fff}:host .content{margin:0 0 10px}:host input{display:block;width:100%!important;border:1px solid #DDD;background-color:#fff;padding:10px 15px;font-size:1.2rem}:host input:focus{outline:2px solid #DDD;box-shadow:none!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgFluxButton, selector: "ngf-button", inputs: ["icon", "theme", "type", "size", "direction", "block", "disabled"] }, { kind: "component", type: NgFluxDialogHeaderComponent, selector: "ngf-dialog-header", inputs: ["icon"] }, { kind: "component", type: NgFluxDialogFooterComponent, selector: "ngf-dialog-footer" }, { kind: "component", type: NgFluxDialogBodyComponent, selector: "ngf-dialog-body" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
691
1472
|
}
|
|
692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxPromptDialog, decorators: [{
|
|
693
1474
|
type: Component,
|
|
694
1475
|
args: [{ selector: 'ngf-dialog-box-prompt', changeDetection: ChangeDetectionStrategy.Eager, imports: [
|
|
695
1476
|
FormsModule,
|
|
@@ -753,10 +1534,10 @@ class NgFluxDialog {
|
|
|
753
1534
|
});
|
|
754
1535
|
return dialog.closed;
|
|
755
1536
|
}
|
|
756
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
757
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1537
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1538
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialog, providedIn: 'root' });
|
|
758
1539
|
}
|
|
759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgFluxDialog, decorators: [{
|
|
760
1541
|
type: Injectable,
|
|
761
1542
|
args: [{ providedIn: 'root' }]
|
|
762
1543
|
}] });
|
|
@@ -765,10 +1546,16 @@ const provideNgFlux = (config) => {
|
|
|
765
1546
|
config ??= {};
|
|
766
1547
|
return makeEnvironmentProviders([
|
|
767
1548
|
{ provide: NGF_CONFIG, useValue: config },
|
|
1549
|
+
{ provide: TitleStrategy, useClass: RouteTitleStrategy },
|
|
768
1550
|
NgFluxDialog,
|
|
769
1551
|
NgFluxDialogInternal,
|
|
770
1552
|
NgFluxLoading,
|
|
771
1553
|
NgFluxLoadingInternal,
|
|
1554
|
+
MetaInternal,
|
|
1555
|
+
provideAppInitializer(() => {
|
|
1556
|
+
const meta = inject(MetaInternal);
|
|
1557
|
+
meta.initialize();
|
|
1558
|
+
}),
|
|
772
1559
|
provideAppInitializer(() => {
|
|
773
1560
|
const dialog = inject(NgFluxDialogInternal);
|
|
774
1561
|
dialog.initialize();
|
|
@@ -789,5 +1576,5 @@ const provideNgFlux = (config) => {
|
|
|
789
1576
|
* Generated bundle index. Do not edit.
|
|
790
1577
|
*/
|
|
791
1578
|
|
|
792
|
-
export { NGF_CONFIG, NGF_DIALOG_DATA, NgFluxButton, NgFluxDialog, NgFluxDialogBodyComponent, NgFluxDialogFooterComponent, NgFluxDialogHeaderComponent, NgFluxDialogInstance, NgFluxDialogRef, NgFluxDialogRootComponent, NgFluxLoading, NgFluxLoadingRootComponent, NgFluxPagination, provideNgFlux };
|
|
1579
|
+
export { NGF_CONFIG, NGF_DIALOG_DATA, NgFluxActions, NgFluxButton, NgFluxDialog, NgFluxDialogBodyComponent, NgFluxDialogFooterComponent, NgFluxDialogHeaderComponent, NgFluxDialogInstance, NgFluxDialogRef, NgFluxDialogRootComponent, NgFluxFrame, NgFluxLoading, NgFluxLoadingRootComponent, NgFluxPagination, NgFluxPinInput, NgFluxSelect, NgFluxTab, NgFluxTabContentDirective, NgFluxTabGroup, NgFluxTabNavDirective, NgFluxTabNavbar, NgFluxTabPanel, provideNgFlux };
|
|
793
1580
|
//# sourceMappingURL=ngflux-ngflux.mjs.map
|