@mintplayer/ng-bootstrap 21.6.0 → 21.8.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/mintplayer-ng-bootstrap-accordion.mjs +34 -73
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +10 -31
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -29
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +17 -19
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +14 -41
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +47 -89
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +10 -13
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +294 -383
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +10 -44
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +16 -23
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +24 -74
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +43 -73
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +8 -12
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +23 -60
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +34 -86
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +9 -12
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +35 -96
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +9 -10
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +23 -26
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +29 -54
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +35 -67
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs +75 -114
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs +16 -15
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +17 -44
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs +12 -16
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +74 -160
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +25 -87
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +136 -232
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs +40 -68
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +11 -15
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +70 -138
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +16 -39
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +40 -70
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +28 -97
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +30 -58
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +10 -17
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +96 -153
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +26 -41
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +30 -61
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +59 -108
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +99 -131
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +63 -106
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +15 -33
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +16 -33
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +16 -35
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +39 -81
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +80 -154
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +116 -153
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +25 -62
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +16 -33
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +13 -20
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +14 -26
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs +6 -9
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs.map +1 -1
- package/package.json +4 -4
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +20 -30
- package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -9
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +3 -10
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +4 -4
- package/types/mintplayer-ng-bootstrap-card.d.ts +5 -12
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +6 -14
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +43 -54
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +2 -11
- package/types/mintplayer-ng-bootstrap-copy.d.ts +5 -7
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +7 -18
- package/types/mintplayer-ng-bootstrap-dock.d.ts +18 -31
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +16 -28
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +16 -27
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-for.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-form.d.ts +11 -20
- package/types/mintplayer-ng-bootstrap-grid.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-instance-of.d.ts +34 -41
- package/types/mintplayer-ng-bootstrap-let.d.ts +3 -2
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +4 -13
- package/types/mintplayer-ng-bootstrap-modal.d.ts +13 -29
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +8 -21
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +38 -51
- package/types/mintplayer-ng-bootstrap-navigation-lock.d.ts +8 -15
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +20 -30
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +3 -11
- package/types/mintplayer-ng-bootstrap-popover.d.ts +18 -31
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +9 -27
- package/types/mintplayer-ng-bootstrap-range.d.ts +14 -22
- package/types/mintplayer-ng-bootstrap-rating.d.ts +0 -2
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +23 -32
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +3 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +7 -16
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +20 -34
- package/types/mintplayer-ng-bootstrap-select.d.ts +24 -30
- package/types/mintplayer-ng-bootstrap-select2.d.ts +21 -33
- package/types/mintplayer-ng-bootstrap-shell.d.ts +12 -19
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +4 -12
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +9 -21
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-toast.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +20 -29
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +4 -24
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +13 -21
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-viewport.d.ts +2 -2
|
@@ -20,10 +20,10 @@ class EnumService {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
24
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: EnumService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: EnumService, providedIn: 'root' }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: EnumService, decorators: [{
|
|
27
27
|
type: Injectable,
|
|
28
28
|
args: [{
|
|
29
29
|
providedIn: 'root'
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe,
|
|
3
|
-
import { Color } from '@mintplayer/ng-bootstrap';
|
|
4
|
-
import * as i1 from '@angular/common';
|
|
2
|
+
import { Pipe, input, signal, model, output, ChangeDetectionStrategy, Component, inject, TemplateRef, Directive } from '@angular/core';
|
|
5
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
6
|
-
import * as i2 from '@mintplayer/ng-bootstrap/for';
|
|
7
4
|
import { BsForDirective } from '@mintplayer/ng-bootstrap/for';
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import { BsListGroupModule } from '@mintplayer/ng-bootstrap/list-group';
|
|
12
|
-
import { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';
|
|
5
|
+
import { BsListGroupComponent, BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';
|
|
6
|
+
import { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';
|
|
7
|
+
import { Color } from '@mintplayer/ng-bootstrap';
|
|
13
8
|
|
|
14
9
|
class BsFormatBytesPipe {
|
|
15
10
|
transform(value, decimals = 2) {
|
|
@@ -22,27 +17,26 @@ class BsFormatBytesPipe {
|
|
|
22
17
|
const i = Math.floor(Math.log(value) / Math.log(k));
|
|
23
18
|
return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
24
19
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
26
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
21
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: BsFormatBytesPipe, isStandalone: true, name: "bsFormatBytes" }); }
|
|
27
22
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFormatBytesPipe, decorators: [{
|
|
29
24
|
type: Pipe,
|
|
30
25
|
args: [{
|
|
31
26
|
name: 'bsFormatBytes',
|
|
32
|
-
standalone: false,
|
|
33
27
|
pure: true,
|
|
34
28
|
}]
|
|
35
29
|
}] });
|
|
36
30
|
|
|
37
31
|
class BsFileUploadComponent {
|
|
38
32
|
constructor() {
|
|
39
|
-
this.dropFilesCaption = 'Drop your files here';
|
|
40
|
-
this.browseFilesCaption = 'Browse for files';
|
|
41
|
-
this.placeholder = 'Drop files to upload';
|
|
33
|
+
this.dropFilesCaption = input('Drop your files here', ...(ngDevMode ? [{ debugName: "dropFilesCaption" }] : []));
|
|
34
|
+
this.browseFilesCaption = input('Browse for files', ...(ngDevMode ? [{ debugName: "browseFilesCaption" }] : []));
|
|
35
|
+
this.placeholder = input('Drop files to upload', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
42
36
|
this.colors = Color;
|
|
43
|
-
this.isDraggingFile = false;
|
|
44
|
-
this.files = [];
|
|
45
|
-
this.filesDropped =
|
|
37
|
+
this.isDraggingFile = signal(false, ...(ngDevMode ? [{ debugName: "isDraggingFile" }] : []));
|
|
38
|
+
this.files = model([], ...(ngDevMode ? [{ debugName: "files" }] : []));
|
|
39
|
+
this.filesDropped = output();
|
|
46
40
|
}
|
|
47
41
|
onChange(event) {
|
|
48
42
|
if (!event.target)
|
|
@@ -60,19 +54,19 @@ class BsFileUploadComponent {
|
|
|
60
54
|
event.preventDefault();
|
|
61
55
|
event.stopPropagation();
|
|
62
56
|
if (event.dataTransfer) {
|
|
63
|
-
this.isDraggingFile
|
|
57
|
+
this.isDraggingFile.set(true);
|
|
64
58
|
event.dataTransfer.effectAllowed = "copy";
|
|
65
59
|
}
|
|
66
60
|
}
|
|
67
61
|
onDragLeave(event) {
|
|
68
62
|
event.preventDefault();
|
|
69
63
|
event.stopPropagation();
|
|
70
|
-
this.isDraggingFile
|
|
64
|
+
this.isDraggingFile.set(false);
|
|
71
65
|
}
|
|
72
66
|
onDrop(event) {
|
|
73
67
|
event.preventDefault();
|
|
74
68
|
event.stopPropagation();
|
|
75
|
-
this.isDraggingFile
|
|
69
|
+
this.isDraggingFile.set(false);
|
|
76
70
|
if (event.dataTransfer && event.dataTransfer.files) {
|
|
77
71
|
this.processDroppedFiles(event.dataTransfer.files);
|
|
78
72
|
}
|
|
@@ -81,107 +75,52 @@ class BsFileUploadComponent {
|
|
|
81
75
|
const newFiles = [...Array(fileList.length).keys()]
|
|
82
76
|
.map(i => fileList.item(i))
|
|
83
77
|
.filter(f => !!f)
|
|
84
|
-
.map((file, index) => ({ file, progress: 0, index: this.files.length + index }));
|
|
85
|
-
this.files.
|
|
78
|
+
.map((file, index) => ({ file, progress: 0, index: this.files().length + index }));
|
|
79
|
+
this.files.update(f => [...f, ...newFiles]);
|
|
86
80
|
this.filesDropped.emit(newFiles);
|
|
87
81
|
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
83
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsFileUploadComponent, isStandalone: true, selector: "bs-file-upload", inputs: { dropFilesCaption: { classPropertyName: "dropFilesCaption", publicName: "dropFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, browseFilesCaption: { classPropertyName: "browseFilesCaption", publicName: "browseFilesCaption", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { files: "filesChange", filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#dc88a8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsForDirective, selector: "label[bsFor]", inputs: ["bsFor"] }, { kind: "component", type: BsListGroupComponent, selector: "bs-list-group" }, { kind: "component", type: BsListGroupItemComponent, selector: "bs-list-group-item" }, { kind: "component", type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate"] }, { kind: "component", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: ["minimum", "maximum", "value", "color", "striped", "animated"] }, { kind: "pipe", type: BsFormatBytesPipe, name: "bsFormatBytes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
90
84
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFileUploadComponent, decorators: [{
|
|
92
86
|
type: Component,
|
|
93
|
-
args: [{ selector: 'bs-file-upload',
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
type: Input
|
|
100
|
-
}], files: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], filesDropped: [{
|
|
103
|
-
type: Output
|
|
104
|
-
}], onDragOver: [{
|
|
105
|
-
type: HostListener,
|
|
106
|
-
args: ['dragover', ['$event']]
|
|
107
|
-
}], onDragLeave: [{
|
|
108
|
-
type: HostListener,
|
|
109
|
-
args: ['dragleave', ['$event']]
|
|
110
|
-
}], onDrop: [{
|
|
111
|
-
type: HostListener,
|
|
112
|
-
args: ['drop', ['$event']]
|
|
113
|
-
}] } });
|
|
87
|
+
args: [{ selector: 'bs-file-upload', imports: [NgTemplateOutlet, BsForDirective, BsListGroupComponent, BsListGroupItemComponent, BsProgressComponent, BsProgressBarComponent, BsFormatBytesPipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
88
|
+
'(dragover)': 'onDragOver($event)',
|
|
89
|
+
'(dragleave)': 'onDragLeave($event)',
|
|
90
|
+
'(drop)': 'onDrop($event)',
|
|
91
|
+
}, template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#dc88a8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"] }]
|
|
92
|
+
}], propDecorators: { dropFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropFilesCaption", required: false }] }], browseFilesCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "browseFilesCaption", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }], filesDropped: [{ type: i0.Output, args: ["filesDropped"] }] } });
|
|
114
93
|
|
|
115
94
|
class BsFileUploadTemplateDirective {
|
|
116
95
|
constructor() {
|
|
117
96
|
this.fileUploadComponent = inject(BsFileUploadComponent);
|
|
97
|
+
this.bsFileUploadTemplateOf = input(undefined, ...(ngDevMode ? [{ debugName: "bsFileUploadTemplateOf" }] : []));
|
|
118
98
|
const templateRef = inject(TemplateRef);
|
|
119
99
|
this.fileUploadComponent.fileTemplate = templateRef;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this.fileUploadComponent.files = value;
|
|
100
|
+
// TODO: fileUploadComponent.files is now an input() signal and cannot be assigned from the directive.
|
|
101
|
+
// Consider converting files to model() on BsFileUploadComponent to restore this functionality.
|
|
123
102
|
}
|
|
124
103
|
static ngTemplateContextGuard(dir, ctx) {
|
|
125
104
|
return true;
|
|
126
105
|
}
|
|
127
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
128
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFileUploadTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: BsFileUploadTemplateDirective, isStandalone: true, selector: "[bsFileUploadTemplate]", inputs: { bsFileUploadTemplateOf: { classPropertyName: "bsFileUploadTemplateOf", publicName: "bsFileUploadTemplateOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
129
108
|
}
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFileUploadTemplateDirective, decorators: [{
|
|
131
110
|
type: Directive,
|
|
132
111
|
args: [{
|
|
133
112
|
selector: '[bsFileUploadTemplate]',
|
|
134
|
-
standalone: false,
|
|
135
113
|
}]
|
|
136
|
-
}], ctorParameters: () => [], propDecorators: { bsFileUploadTemplateOf: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}] } });
|
|
114
|
+
}], ctorParameters: () => [], propDecorators: { bsFileUploadTemplateOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsFileUploadTemplateOf", required: false }] }] } });
|
|
139
115
|
class BsFileUploadTemplateContext {
|
|
140
116
|
constructor() {
|
|
141
117
|
this.$implicit = null;
|
|
142
118
|
}
|
|
143
119
|
}
|
|
144
120
|
|
|
145
|
-
class BsFileUploadModule {
|
|
146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
147
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsFileUploadModule, declarations: [BsFileUploadComponent,
|
|
148
|
-
BsFileUploadTemplateDirective,
|
|
149
|
-
BsFormatBytesPipe], imports: [NgTemplateOutlet,
|
|
150
|
-
BsForDirective,
|
|
151
|
-
BsProgressBarModule,
|
|
152
|
-
BsListGroupModule,
|
|
153
|
-
BsButtonTypeDirective], exports: [BsFileUploadComponent,
|
|
154
|
-
BsFileUploadTemplateDirective,
|
|
155
|
-
BsFormatBytesPipe] }); }
|
|
156
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsFileUploadModule, imports: [BsProgressBarModule,
|
|
157
|
-
BsListGroupModule] }); }
|
|
158
|
-
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsFileUploadModule, decorators: [{
|
|
160
|
-
type: NgModule,
|
|
161
|
-
args: [{
|
|
162
|
-
declarations: [
|
|
163
|
-
BsFileUploadComponent,
|
|
164
|
-
BsFileUploadTemplateDirective,
|
|
165
|
-
BsFormatBytesPipe
|
|
166
|
-
],
|
|
167
|
-
imports: [
|
|
168
|
-
NgTemplateOutlet,
|
|
169
|
-
BsForDirective,
|
|
170
|
-
BsProgressBarModule,
|
|
171
|
-
BsListGroupModule,
|
|
172
|
-
BsButtonTypeDirective,
|
|
173
|
-
],
|
|
174
|
-
exports: [
|
|
175
|
-
BsFileUploadComponent,
|
|
176
|
-
BsFileUploadTemplateDirective,
|
|
177
|
-
BsFormatBytesPipe
|
|
178
|
-
]
|
|
179
|
-
}]
|
|
180
|
-
}] });
|
|
181
|
-
|
|
182
121
|
/**
|
|
183
122
|
* Generated bundle index. Do not edit.
|
|
184
123
|
*/
|
|
185
124
|
|
|
186
|
-
export { BsFileUploadComponent,
|
|
125
|
+
export { BsFileUploadComponent, BsFileUploadTemplateContext, BsFileUploadTemplateDirective, BsFormatBytesPipe };
|
|
187
126
|
//# sourceMappingURL=mintplayer-ng-bootstrap-file-upload.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-file-upload.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/file-upload/src/pipes/format-bytes/format-bytes.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.html","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/directive/file-upload-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/file-upload.module.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/mintplayer-ng-bootstrap-file-upload.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFormatBytes',\n standalone: false,\n pure: true,\n})\nexport class BsFormatBytesPipe implements PipeTransform {\n\n transform(value: number, decimals = 2) {\n if (value === 0) {\n return \"0 Bytes\";\n }\n\n const k = 1024;\n const dm = decimals <= 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(value) / Math.log(k));\n\n return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n }\n\n}\n","import { Component, EventEmitter, HostListener, Input, Output, TemplateRef } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { FileUpload } from '../file-upload';\n\n@Component({\n selector: 'bs-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n standalone: false,\n})\nexport class BsFileUploadComponent {\n\n @Input() public dropFilesCaption = 'Drop your files here';\n @Input() public browseFilesCaption = 'Browse for files';\n @Input() public placeholder = 'Drop files to upload';\n\n colors = Color;\n isDraggingFile = false;\n fileTemplate?: TemplateRef<FileUpload>;\n @Input() public files: FileUpload[] = [];\n @Output() public filesDropped = new EventEmitter<FileUpload[]>();\n\n onChange(event: Event) {\n if (!event.target) return;\n if (!('files' in event.target)) return;\n if (!event.target['files']) return;\n\n const files = (<HTMLInputElement>event.target).files;\n if (!files) return;\n \n this.processDroppedFiles(files);\n }\n\n @HostListener('dragover', ['$event'])\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n \n if (event.dataTransfer) {\n this.isDraggingFile = true;\n event.dataTransfer.effectAllowed = \"copy\";\n }\n }\n\n @HostListener('dragleave', ['$event'])\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile = false;\n }\n\n @HostListener('drop', ['$event'])\n onDrop(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile = false;\n if (event.dataTransfer && event.dataTransfer.files) {\n this.processDroppedFiles(event.dataTransfer.files);\n }\n }\n\n private processDroppedFiles(fileList: FileList) {\n const newFiles = [...Array(fileList.length).keys()]\n .map(i => fileList.item(i))\n .filter(f => !!f)\n .map((file, index) => <FileUpload>{ file, progress: 0, index: this.files.length + index });\n \n this.files.push(...newFiles);\n this.filesDropped.emit(newFiles);\n }\n}\n","<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder\" [placeholder]=\"placeholder\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files; track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>","import { Directive, inject, Input, TemplateRef } from '@angular/core';\nimport { BsFileUploadComponent } from '../component/file-upload.component';\nimport { FileUpload } from '../file-upload';\n\n@Directive({\n selector: '[bsFileUploadTemplate]',\n standalone: false,\n})\nexport class BsFileUploadTemplateDirective {\n private fileUploadComponent = inject(BsFileUploadComponent);\n\n constructor() {\n const templateRef = inject(TemplateRef);\n this.fileUploadComponent.fileTemplate = templateRef;\n }\n\n @Input() set bsFileUploadTemplateOf(value: FileUpload[]) {\n this.fileUploadComponent.files = value;\n }\n\n static ngTemplateContextGuard(dir: BsFileUploadTemplateDirective, ctx: any): ctx is BsFileUploadTemplateContext {\n return true;\n }\n\n}\n\nexport class BsFileUploadTemplateContext {\n $implicit: FileUpload = null!;\n}","import { NgModule } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsForDirective } from '@mintplayer/ng-bootstrap/for';\nimport { BsProgressBarModule } from '@mintplayer/ng-bootstrap/progress-bar';\nimport { BsListGroupModule } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { BsFileUploadComponent } from './component/file-upload.component';\nimport { BsFileUploadTemplateDirective } from './directive/file-upload-template.directive';\nimport { BsFormatBytesPipe } from './pipes/format-bytes/format-bytes.pipe';\n\n@NgModule({\n declarations: [\n BsFileUploadComponent,\n BsFileUploadTemplateDirective,\n BsFormatBytesPipe\n ],\n imports: [\n NgTemplateOutlet,\n BsForDirective,\n BsProgressBarModule,\n BsListGroupModule,\n BsButtonTypeDirective,\n ],\n exports: [\n BsFileUploadComponent,\n BsFileUploadTemplateDirective,\n BsFormatBytesPipe\n ]\n})\nexport class BsFileUploadModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5.BsFormatBytesPipe"],"mappings":";;;;;;;;;;;;;MAOa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAA;AACnC,QAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,YAAA,OAAO,SAAS;QAClB;QAEA,MAAM,CAAC,GAAG,IAAI;AACd,QAAA,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ;QACvC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACvE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEnD,OAAO,UAAU,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1E;8GAbW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAA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AAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,iBAjB3B,qBAAqB;YACrB,6BAA6B;AAC7B,YAAA,iBAAiB,aAGjB,gBAAgB;YAChB,cAAc;YACd,mBAAmB;YACnB,iBAAiB;AACjB,YAAA,qBAAqB,aAGrB,qBAAqB;YACrB,6BAA6B;YAC7B,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAGR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAV3B,mBAAmB;YACnB,iBAAiB,CAAA,EAAA,CAAA,CAAA;;2FASR,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAnB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,qBAAqB;wBACrB,6BAA6B;wBAC7B;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,gBAAgB;wBAChB,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,qBAAqB;wBACrB,6BAA6B;wBAC7B;AACD;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-file-upload.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/file-upload/src/pipes/format-bytes/format-bytes.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/component/file-upload.component.html","../../../../libs/mintplayer-ng-bootstrap/file-upload/src/directive/file-upload-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/file-upload/mintplayer-ng-bootstrap-file-upload.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFormatBytes',\n pure: true,\n})\nexport class BsFormatBytesPipe implements PipeTransform {\n\n transform(value: number, decimals = 2) {\n if (value === 0) {\n return \"0 Bytes\";\n }\n\n const k = 1024;\n const dm = decimals <= 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(value) / Math.log(k));\n\n return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n }\n\n}\n","import { Component, input, model, output, signal, TemplateRef, ChangeDetectionStrategy} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsForDirective } from '@mintplayer/ng-bootstrap/for';\nimport { BsListGroupComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsListGroupItemComponent } from '@mintplayer/ng-bootstrap/list-group';\nimport { BsProgressComponent, BsProgressBarComponent } from '@mintplayer/ng-bootstrap/progress-bar';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { FileUpload } from '../file-upload';\nimport { BsFormatBytesPipe } from '../pipes/format-bytes/format-bytes.pipe';\n\n@Component({\n selector: 'bs-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n imports: [NgTemplateOutlet, BsForDirective, BsListGroupComponent, BsListGroupItemComponent, BsProgressComponent, BsProgressBarComponent, BsFormatBytesPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)',\n '(drop)': 'onDrop($event)',\n },\n})\nexport class BsFileUploadComponent {\n\n readonly dropFilesCaption = input('Drop your files here');\n readonly browseFilesCaption = input('Browse for files');\n readonly placeholder = input('Drop files to upload');\n\n colors = Color;\n isDraggingFile = signal(false);\n fileTemplate?: TemplateRef<FileUpload>;\n readonly files = model<FileUpload[]>([]);\n readonly filesDropped = output<FileUpload[]>();\n\n onChange(event: Event) {\n if (!event.target) return;\n if (!('files' in event.target)) return;\n if (!event.target['files']) return;\n\n const files = (<HTMLInputElement>event.target).files;\n if (!files) return;\n\n this.processDroppedFiles(files);\n }\n\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n if (event.dataTransfer) {\n this.isDraggingFile.set(true);\n event.dataTransfer.effectAllowed = \"copy\";\n }\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n }\n\n onDrop(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isDraggingFile.set(false);\n if (event.dataTransfer && event.dataTransfer.files) {\n this.processDroppedFiles(event.dataTransfer.files);\n }\n }\n\n private processDroppedFiles(fileList: FileList) {\n const newFiles = [...Array(fileList.length).keys()]\n .map(i => fileList.item(i))\n .filter(f => !!f)\n .map((file, index) => <FileUpload>{ file, progress: 0, index: this.files().length + index });\n\n this.files.update(f => [...f, ...newFiles]);\n this.filesDropped.emit(newFiles);\n }\n}\n","<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile()\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder()\" [placeholder]=\"placeholder()\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder()\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption() }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption() }}</label>\n</div>\n<bs-list-group class=\"files-list\">\n @for (upload of files(); track upload.index) {\n <bs-list-group-item>\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </bs-list-group-item>\n }\n</bs-list-group>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { BsFileUploadComponent } from '../component/file-upload.component';\nimport { FileUpload } from '../file-upload';\n\n@Directive({\n selector: '[bsFileUploadTemplate]',\n})\nexport class BsFileUploadTemplateDirective {\n private fileUploadComponent = inject(BsFileUploadComponent);\n\n constructor() {\n const templateRef = inject(TemplateRef);\n this.fileUploadComponent.fileTemplate = templateRef;\n\n // TODO: fileUploadComponent.files is now an input() signal and cannot be assigned from the directive.\n // Consider converting files to model() on BsFileUploadComponent to restore this functionality.\n }\n\n readonly bsFileUploadTemplateOf = input<FileUpload[] | undefined>(undefined);\n\n static ngTemplateContextGuard(dir: BsFileUploadTemplateDirective, ctx: any): ctx is BsFileUploadTemplateContext {\n return true;\n }\n\n}\n\nexport class BsFileUploadTemplateContext {\n $implicit: FileUpload = null!;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAA;AACnC,QAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,YAAA,OAAO,SAAS;QAClB;QAEA,MAAM,CAAC,GAAG,IAAI;AACd,QAAA,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,GAAG,CAAC,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AE,wBAAwB;AACnC,iBAAA;;MAoBY,2BAA2B,CAAA;AAAxC,IAAA,WAAA,GAAA;QACE,IAAA,CAAA,SAAS,GAAe,IAAK;IAC/B;AAAC;;AC5BD;;AAEG;;;;"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { BsFormComponent } from '@mintplayer/ng-bootstrap/form';
|
|
4
4
|
|
|
5
5
|
class BsFloatingLabelComponent {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor() {
|
|
7
|
+
const bsForm = inject(BsFormComponent, { optional: true });
|
|
7
8
|
if (!bsForm) {
|
|
8
9
|
throw '<bs-floating-label> must be inside a <bs-form>';
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFloatingLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", type: BsFloatingLabelComponent, isStandalone: true, selector: "bs-floating-label", ngImport: i0, template: "<div class=\"form-floating\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n</div>", styles: [":host ::ng-deep .form-floating{position:relative}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext,:host ::ng-deep .form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}:host ::ng-deep .form-floating>label{position:absolute;top:0;left:0;z-index:2;max-width:100%;height:100%;padding:1rem .75rem;overflow:hidden;color:rgba(var(--bs-body-color-rgb),.65);text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-floating>label{transition:none}}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext{padding:1rem .75rem}:host ::ng-deep .form-floating>.form-control::placeholder,:host ::ng-deep .form-floating>.form-control-plaintext::placeholder{color:transparent}:host ::ng-deep .form-floating>.form-control:focus,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown),:host ::ng-deep .form-floating>.form-control-plaintext:focus,:host ::ng-deep .form-floating>.form-control-plaintext:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-control:-webkit-autofill,:host ::ng-deep .form-floating>.form-control-plaintext:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem;padding-left:.75rem}:host ::ng-deep .form-floating>.form-control:focus~label,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown)~label,:host ::ng-deep .form-floating>.form-control-plaintext~label,:host ::ng-deep .form-floating>.form-select~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>.form-control:-webkit-autofill~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>textarea:focus~label:after,:host ::ng-deep .form-floating>textarea:not(:placeholder-shown)~label:after{position:absolute;inset:1rem .375rem;z-index:-1;height:1.5em;content:\"\";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}:host ::ng-deep .form-floating>textarea:disabled~label:after{background-color:var(--bs-secondary-bg)}:host ::ng-deep .form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}:host ::ng-deep .form-floating>:disabled~label,:host ::ng-deep .form-floating>.form-control:disabled~label{color:#6c757d}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13
14
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFloatingLabelComponent, decorators: [{
|
|
15
16
|
type: Component,
|
|
16
|
-
args: [{ selector: 'bs-floating-label',
|
|
17
|
-
}], ctorParameters: () => [
|
|
18
|
-
type: Optional
|
|
19
|
-
}] }] });
|
|
17
|
+
args: [{ selector: 'bs-floating-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-floating\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n</div>", styles: [":host ::ng-deep .form-floating{position:relative}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext,:host ::ng-deep .form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}:host ::ng-deep .form-floating>label{position:absolute;top:0;left:0;z-index:2;max-width:100%;height:100%;padding:1rem .75rem;overflow:hidden;color:rgba(var(--bs-body-color-rgb),.65);text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .form-floating>label{transition:none}}:host ::ng-deep .form-floating>.form-control,:host ::ng-deep .form-floating>.form-control-plaintext{padding:1rem .75rem}:host ::ng-deep .form-floating>.form-control::placeholder,:host ::ng-deep .form-floating>.form-control-plaintext::placeholder{color:transparent}:host ::ng-deep .form-floating>.form-control:focus,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown),:host ::ng-deep .form-floating>.form-control-plaintext:focus,:host ::ng-deep .form-floating>.form-control-plaintext:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-control:-webkit-autofill,:host ::ng-deep .form-floating>.form-control-plaintext:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}:host ::ng-deep .form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem;padding-left:.75rem}:host ::ng-deep .form-floating>.form-control:focus~label,:host ::ng-deep .form-floating>.form-control:not(:placeholder-shown)~label,:host ::ng-deep .form-floating>.form-control-plaintext~label,:host ::ng-deep .form-floating>.form-select~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>.form-control:-webkit-autofill~label{transform:scale(.85) translateY(-.5rem) translate(.15rem)}:host ::ng-deep .form-floating>textarea:focus~label:after,:host ::ng-deep .form-floating>textarea:not(:placeholder-shown)~label:after{position:absolute;inset:1rem .375rem;z-index:-1;height:1.5em;content:\"\";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}:host ::ng-deep .form-floating>textarea:disabled~label:after{background-color:var(--bs-secondary-bg)}:host ::ng-deep .form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}:host ::ng-deep .form-floating>:disabled~label,:host ::ng-deep .form-floating>.form-control:disabled~label{color:#6c757d}\n"] }]
|
|
18
|
+
}], ctorParameters: () => [] });
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-floating-labels.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/floating-labels/src/floating-label/floating-label.component.ts","../../../../libs/mintplayer-ng-bootstrap/floating-labels/src/floating-label/floating-label.component.html","../../../../libs/mintplayer-ng-bootstrap/floating-labels/mintplayer-ng-bootstrap-floating-labels.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-floating-labels.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/floating-labels/src/floating-label/floating-label.component.ts","../../../../libs/mintplayer-ng-bootstrap/floating-labels/src/floating-label/floating-label.component.html","../../../../libs/mintplayer-ng-bootstrap/floating-labels/mintplayer-ng-bootstrap-floating-labels.ts"],"sourcesContent":["import { Component, inject, ChangeDetectionStrategy} from '@angular/core';\nimport { BsFormComponent } from '@mintplayer/ng-bootstrap/form';\n\n@Component({\n selector: 'bs-floating-label',\n templateUrl: './floating-label.component.html',\n styleUrls: ['./floating-label.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsFloatingLabelComponent {\n constructor() {\n const bsForm = inject(BsFormComponent, { optional: true });\n if (!bsForm) {\n throw '<bs-floating-label> must be inside a <bs-form>';\n }\n }\n}\n","<div class=\"form-floating\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"label\"></ng-content>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,wBAAwB,CAAA;AACnC,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,MAAM,gDAAgD;QACxD;IACF;8GANW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6ECTrC,uIAGM,EAAA,MAAA,EAAA,CAAA,soFAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDMO,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACE,mBAAmB,EAAA,eAAA,EAGZ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uIAAA,EAAA,MAAA,EAAA,CAAA,soFAAA,CAAA,EAAA;;;AEPjD;;AAEG;;;;"}
|
|
@@ -15,14 +15,13 @@ class BsFontColorPipe {
|
|
|
15
15
|
const CONTRAST_HEX = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';
|
|
16
16
|
return CONTRAST_HEX;
|
|
17
17
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
19
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFontColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
19
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: BsFontColorPipe, isStandalone: true, name: "bsFontColor" }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsFontColorPipe, decorators: [{
|
|
22
22
|
type: Pipe,
|
|
23
23
|
args: [{
|
|
24
24
|
name: 'bsFontColor',
|
|
25
|
-
standalone: true,
|
|
26
25
|
pure: true,
|
|
27
26
|
}]
|
|
28
27
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-font-color.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/font-color/src/font-color.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/font-color/mintplayer-ng-bootstrap-font-color.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFontColor',\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-font-color.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/font-color/src/font-color.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/font-color/mintplayer-ng-bootstrap-font-color.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bsFontColor',\n pure: true,\n})\nexport class BsFontColorPipe implements PipeTransform {\n\n transform(color_hex: any, defaultColor = '#FFFFFF'): any {\n if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {\n return defaultColor;\n }\n const R_HEX: string = color_hex.substr(1, 2);\n const G_HEX: string = color_hex.substr(3, 2);\n const B_HEX: string = color_hex.substr(5, 2);\n const R_DEC: number = parseInt(R_HEX, 16);\n const G_DEC: number = parseInt(G_HEX, 16);\n const B_DEC: number = parseInt(B_HEX, 16);\n const CONTRAST_HEX: string = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';\n return CONTRAST_HEX;\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,eAAe,CAAA;AAE1B,IAAA,SAAS,CAAC,SAAc,EAAE,YAAY,GAAG,SAAS,EAAA;QAChD,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,SAAS,CAAC,KAAK,QAAQ,EAAE;AAC5G,YAAA,OAAO,YAAY;QACrB;QACA,MAAM,KAAK,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAW,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QACzC,MAAM,KAAK,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QACzC,MAAM,KAAK,GAAW,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;QACzC,MAAM,YAAY,GAAW,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,SAAS,GAAG,SAAS;AACxG,QAAA,OAAO,YAAY;IACrB;8GAdW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACnB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -1,40 +1,37 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, effect, Directive } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class BsForDirective {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.defaultCursor = true;
|
|
7
|
-
}
|
|
8
5
|
static { this.counter = 1; }
|
|
9
|
-
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.target
|
|
6
|
+
constructor() {
|
|
7
|
+
this.bsFor = input(undefined, ...(ngDevMode ? [{ debugName: "bsFor" }] : []));
|
|
8
|
+
effect(() => {
|
|
9
|
+
const value = this.bsFor();
|
|
10
|
+
if (value !== undefined) {
|
|
11
|
+
this.target = value;
|
|
12
|
+
if (this.target instanceof HTMLElement) {
|
|
13
|
+
if (!this.target.id) {
|
|
14
|
+
const count = BsForDirective.counter++;
|
|
15
|
+
this.target.id = `for-target-${count}`;
|
|
16
|
+
}
|
|
17
|
+
this.forValue = this.target.id;
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
// console.log('target', this.target);
|
|
20
|
+
});
|
|
19
21
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
21
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: BsForDirective, isStandalone: true, selector: "label[bsFor]", inputs: { bsFor: { classPropertyName: "bsFor", publicName: "bsFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cursor-default": "true", "attr.for": "forValue" } }, ngImport: i0 }); }
|
|
22
24
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsForDirective, decorators: [{
|
|
24
26
|
type: Directive,
|
|
25
27
|
args: [{
|
|
26
28
|
selector: 'label[bsFor]',
|
|
27
|
-
|
|
29
|
+
host: {
|
|
30
|
+
'[class.cursor-default]': 'true',
|
|
31
|
+
'[attr.for]': 'forValue',
|
|
32
|
+
},
|
|
28
33
|
}]
|
|
29
|
-
}], propDecorators: {
|
|
30
|
-
type: HostBinding,
|
|
31
|
-
args: ['class.cursor-default']
|
|
32
|
-
}], bsFor: [{
|
|
33
|
-
type: Input
|
|
34
|
-
}], forValue: [{
|
|
35
|
-
type: HostBinding,
|
|
36
|
-
args: ['attr.for']
|
|
37
|
-
}] } });
|
|
34
|
+
}], ctorParameters: () => [], propDecorators: { bsFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsFor", required: false }] }] } });
|
|
38
35
|
|
|
39
36
|
/**
|
|
40
37
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-for.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/for/src/for.directive.ts","../../../../libs/mintplayer-ng-bootstrap/for/mintplayer-ng-bootstrap-for.ts"],"sourcesContent":["import { Directive,
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-for.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/for/src/for.directive.ts","../../../../libs/mintplayer-ng-bootstrap/for/mintplayer-ng-bootstrap-for.ts"],"sourcesContent":["import { Directive, effect, input } from '@angular/core';\n\n@Directive({\n selector: 'label[bsFor]',\n host: {\n '[class.cursor-default]': 'true',\n '[attr.for]': 'forValue',\n },\n})\nexport class BsForDirective {\n\n static counter = 1;\n private target: any;\n readonly bsFor = input<any>(undefined);\n\n constructor() {\n effect(() => {\n const value = this.bsFor();\n if (value !== undefined) {\n this.target = value;\n if (this.target instanceof HTMLElement) {\n if (!this.target.id) {\n const count = BsForDirective.counter++;\n this.target.id = `for-target-${count}`;\n }\n this.forValue = this.target.id;\n }\n }\n });\n }\n\n forValue?: string;\n\n // @HostListener('click') onMouseClick() {\n // if (!('tagName' in this.target)) {\n // // Not a form-control, let's just assume the class has some \"focus\" method\n // this.target.focus();\n // } else if (this.target.tagName.toLowerCase() !== 'input') {\n // // HTML element, but not an input, probably a textarea\n // this.target.focus();\n // } else if (this.target.type.toLowerCase() === 'file') {\n // // HtmlInputElement for a file\n // this.target.click();\n // } else {\n // // HtmlInputElement\n // this.target.focus();\n // }\n // }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,cAAc,CAAA;aAElB,IA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