@villedemontreal/angular-ui 13.0.0 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/alert/alert.component.mjs +2 -2
- package/esm2020/lib/alert/index.mjs +2 -2
- package/esm2020/lib/alert/module.mjs +2 -2
- package/esm2020/lib/avatar/avatar.component.mjs +2 -2
- package/esm2020/lib/avatar/index.mjs +2 -2
- package/esm2020/lib/avatar/module.mjs +2 -2
- package/esm2020/lib/badge/badge.component.mjs +2 -2
- package/esm2020/lib/badge/index.mjs +2 -2
- package/esm2020/lib/badge/module.mjs +2 -2
- package/esm2020/lib/bao.module.mjs +15 -8
- package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +2 -2
- package/esm2020/lib/breadcrumb/index.mjs +2 -2
- package/esm2020/lib/breadcrumb/module.mjs +2 -2
- package/esm2020/lib/button/button.component.mjs +2 -2
- package/esm2020/lib/button/index.mjs +2 -2
- package/esm2020/lib/button/module.mjs +2 -2
- package/esm2020/lib/card/card.component.mjs +2 -2
- package/esm2020/lib/card/index.mjs +2 -2
- package/esm2020/lib/card/module.mjs +2 -2
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +2 -2
- package/esm2020/lib/checkbox/checkbox.component.mjs +1 -1
- package/esm2020/lib/checkbox/index.mjs +2 -2
- package/esm2020/lib/checkbox/module.mjs +2 -2
- package/esm2020/lib/common-components/error-text/errorText.component.mjs +2 -2
- package/esm2020/lib/common-components/guiding-text/guidingText.component.mjs +2 -2
- package/esm2020/lib/common-components/index.mjs +2 -2
- package/esm2020/lib/common-components/label-text/labelText.component.mjs +4 -4
- package/esm2020/lib/common-components/module.mjs +6 -3
- package/esm2020/lib/common-components/title-text/titleText.component.mjs +2 -2
- package/esm2020/lib/core/colors.mjs +1 -1
- package/esm2020/lib/dropdown-menu/dropdown-menu.component.mjs +31 -8
- package/esm2020/lib/dropdown-menu/index.mjs +2 -2
- package/esm2020/lib/dropdown-menu/module.mjs +2 -2
- package/esm2020/lib/file/file-input.component.mjs +319 -0
- package/esm2020/lib/file/file-intl.mjs +65 -0
- package/esm2020/lib/file/file-preview.component.mjs +86 -0
- package/esm2020/lib/file/index.mjs +10 -0
- package/esm2020/lib/file/module.mjs +58 -0
- package/esm2020/lib/header-info/header-info.component.mjs +2 -2
- package/esm2020/lib/header-info/index.mjs +2 -2
- package/esm2020/lib/header-info/module.mjs +2 -2
- package/esm2020/lib/hyperlink/hyperlink.component.mjs +2 -2
- package/esm2020/lib/hyperlink/index.mjs +2 -2
- package/esm2020/lib/hyperlink/module.mjs +2 -2
- package/esm2020/lib/icon/bao-icon-registry.mjs +2 -2
- package/esm2020/lib/icon/icon.component.mjs +2 -2
- package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
- package/esm2020/lib/icon/index.mjs +2 -2
- package/esm2020/lib/icon/module.mjs +2 -2
- package/esm2020/lib/list/index.mjs +2 -2
- package/esm2020/lib/list/list.component.mjs +2 -2
- package/esm2020/lib/list/module.mjs +2 -2
- package/esm2020/lib/modal/index.mjs +2 -2
- package/esm2020/lib/modal/modal-config.mjs +2 -2
- package/esm2020/lib/modal/modal-container.mjs +17 -31
- package/esm2020/lib/modal/modal-directives.mjs +2 -2
- package/esm2020/lib/modal/modal-ref.mjs +4 -1
- package/esm2020/lib/modal/modal.mjs +11 -32
- package/esm2020/lib/modal/module.mjs +5 -22
- package/esm2020/lib/radio/index.mjs +2 -2
- package/esm2020/lib/radio/module.mjs +2 -2
- package/esm2020/lib/radio/radio-group.component.mjs +2 -2
- package/esm2020/lib/radio/radio.component.mjs +1 -1
- package/esm2020/lib/shared/enum/display-mode.mjs +1 -1
- package/esm2020/lib/shared/index.mjs +2 -2
- package/esm2020/lib/summary/index.mjs +2 -2
- package/esm2020/lib/summary/list-summary.component.mjs +2 -2
- package/esm2020/lib/summary/module.mjs +2 -2
- package/esm2020/lib/summary/summary.component.mjs +2 -2
- package/esm2020/lib/tabs/index.mjs +2 -2
- package/esm2020/lib/tabs/module.mjs +2 -2
- package/esm2020/lib/tabs/tabs.component.mjs +2 -2
- package/esm2020/lib/tag/index.mjs +2 -2
- package/esm2020/lib/tag/module.mjs +2 -2
- package/esm2020/lib/tag/tag.component.mjs +2 -2
- package/esm2020/public-api.mjs +3 -2
- package/fesm2015/villedemontreal-angular-ui.mjs +653 -194
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +653 -192
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/lib/bao.module.d.ts +12 -11
- package/lib/dropdown-menu/dropdown-menu.component.d.ts +10 -4
- package/lib/file/file-input.component.d.ts +123 -0
- package/lib/file/file-intl.d.ts +44 -0
- package/lib/file/file-preview.component.d.ts +29 -0
- package/lib/file/index.d.ts +4 -0
- package/lib/file/module.d.ts +13 -0
- package/lib/modal/modal-container.d.ts +4 -5
- package/lib/modal/modal-ref.d.ts +1 -0
- package/lib/modal/modal.d.ts +3 -4
- package/lib/modal/module.d.ts +1 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2020/lib/modal/modal-animations.mjs +0 -29
- package/lib/modal/modal-animations.d.ts +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule, Directive, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, ViewChild, forwardRef, InjectionToken, ContentChildren, Optional, HostListener, ContentChild, Injector, TemplateRef, SkipSelf } from '@angular/core';
|
|
2
|
+
import { SecurityContext, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule, Directive, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, ViewChild, forwardRef, InjectionToken, ContentChildren, Optional, HostListener, ContentChild, Injector, TemplateRef, SkipSelf, ViewChildren } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -13,12 +13,10 @@ import * as i1$4 from '@angular/cdk/overlay';
|
|
|
13
13
|
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
14
14
|
import * as i3 from '@angular/cdk/portal';
|
|
15
15
|
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal } from '@angular/cdk/portal';
|
|
16
|
-
import { Subject, filter, take, defer, startWith
|
|
16
|
+
import { Subject, filter, take, defer, startWith } from 'rxjs';
|
|
17
17
|
import { __awaiter } from 'tslib';
|
|
18
18
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
19
|
-
import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
|
|
20
19
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
21
|
-
import { ANIMATION_MODULE_TYPE, BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
22
20
|
|
|
23
21
|
function baoColorToHex(baoColor) {
|
|
24
22
|
switch (baoColor) {
|
|
@@ -46,7 +44,7 @@ function baoColorToHex(baoColor) {
|
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
/*
|
|
49
|
-
* Copyright (c)
|
|
47
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
50
48
|
* Licensed under the MIT license.
|
|
51
49
|
* See LICENSE file in the project root for full license information.
|
|
52
50
|
*/
|
|
@@ -63,6 +61,7 @@ const ICONS_DCT = {
|
|
|
63
61
|
'icon-book': "<path fill-rule='evenodd' d='M11 7.5l-.4-.3A11 11 0 005 5.046v10.993a13 13 0 016 2.007V7.5zm2 0v10.546a13 13 0 016-2.007V5.046A11 11 0 0013.4 7.2l-.4.3zM3 7V4a1 1 0 011-1 13 13 0 017.8 2.6l.2.15.2-.15A13 13 0 0120 3a1 1 0 011 1v3h2a1 1 0 011 1v2a1 1 0 01-2 0V9h-1v8a1 1 0 01-1 1 11 11 0 00-4.583 1H22v-5a1 1 0 012 0v6a1 1 0 01-1 1H1a1 1 0 01-1-1V8a1 1 0 011-1h2zm0 2H2v10h6.583A11 11 0 004 18a1 1 0 01-1-1V9z'/>",
|
|
64
62
|
'icon-briefcase': "<path fill-rule='evenodd' clip-rule='evenodd' d='M14 2h-4a3 3 0 00-3 3v1H4a3 3 0 00-3 3v2.977a1 1 0 000 .046V19a3 3 0 003 3h16a3 3 0 003-3v-3a1 1 0 10-2 0v3a1 1 0 01-1 1H4a1 1 0 01-1-1v-5.523l8.629 3.451a1 1 0 00.742 0l9.979-3.99a1.002 1.002 0 00.65-.961V9a3 3 0 00-3-3h-3V5a3 3 0 00-3-3zm7 9.323V9a1 1 0 00-1-1H4a1 1 0 00-1 1v2.323l9 3.6 9-3.6zM15 6H9V5a1 1 0 011-1h4a1 1 0 011 1v1z'/>",
|
|
65
63
|
'icon-calendar': "<path fill-rule='evenodd' d='M20 10H4v9a1 1 0 001 1h14a1 1 0 001-1v-2a1 1 0 012 0v2a3 3 0 01-3 3H5a3 3 0 01-3-3V5a3 3 0 013-3h2V1a1 1 0 112 0v1h6V1a1 1 0 012 0v1h2a3 3 0 013 3v8a1 1 0 01-2 0v-3zm0-2V5a1 1 0 00-1-1h-2v1a1 1 0 01-2 0V4H9v1a1 1 0 11-2 0V4H5a1 1 0 00-1 1v3h16z'/>",
|
|
64
|
+
'icon-cell-phone': "<path fill-rule='evenodd' clip-rule='evenodd' d='M4 4C4 2.34315 5.34315 1 7 1H17C18.6569 1 20 2.34315 20 4V20C20 21.6569 18.6569 23 17 23H7C5.34315 23 4 21.6569 4 20V4ZM6 4C6 3.44772 6.44772 3 7 3H17C17.5523 3 18 3.44772 18 4V20C18 20.5523 17.5523 21 17 21H7C6.44771 21 6 20.5523 6 20V4ZM12 19C12.5523 19 13 18.5523 13 18C13 17.4477 12.5523 17 12 17C11.4477 17 11 17.4477 11 18C11 18.5523 11.4477 19 12 19Z' />",
|
|
66
65
|
'icon-check-circle-full': "<path fill-rule='evenodd' d='M12 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11-4.925 11-11 11zm3.293-13.707L11 13.586l-1.293-1.293a1 1 0 10-1.414 1.414l2 2a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/>",
|
|
67
66
|
'icon-check-circle': "<path fill-rule='evenodd' d='M21.542 17.477a1 1 0 01-1.734-.997A8.953 8.953 0 0021 12a9 9 0 10-9 9 8.953 8.953 0 004.484-1.195 1 1 0 01.998 1.733A10.953 10.953 0 0112 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11c0 1.948-.508 3.824-1.458 5.477zm-6.25-8.184a1 1 0 011.415 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L11 13.586l4.293-4.293z'/>",
|
|
68
67
|
'icon-check': "<path fill-rule='evenodd' d='M19.293 6.293a1 1 0 011.414 1.414l-7.947 7.948a1 1 0 01-1.415-1.415l7.948-7.947zm-9.586 11a1 1 0 11-1.414 1.414l-5-5a1 1 0 011.414-1.414l5 5z'/>",
|
|
@@ -170,7 +169,7 @@ const ICONS_DCT = {
|
|
|
170
169
|
};
|
|
171
170
|
|
|
172
171
|
/*
|
|
173
|
-
* Copyright (c)
|
|
172
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
174
173
|
* Licensed under the MIT license.
|
|
175
174
|
* See LICENSE file in the project root for full license information.
|
|
176
175
|
*/
|
|
@@ -211,7 +210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
211
210
|
} });
|
|
212
211
|
|
|
213
212
|
/*
|
|
214
|
-
* Copyright (c)
|
|
213
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
215
214
|
* Licensed under the MIT license.
|
|
216
215
|
* See LICENSE file in the project root for full license information.
|
|
217
216
|
*/
|
|
@@ -363,7 +362,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
363
362
|
}] } });
|
|
364
363
|
|
|
365
364
|
/*
|
|
366
|
-
* Copyright (c)
|
|
365
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
367
366
|
* Licensed under the MIT license.
|
|
368
367
|
* See LICENSE file in the project root for full license information.
|
|
369
368
|
*/
|
|
@@ -383,7 +382,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
383
382
|
}] });
|
|
384
383
|
|
|
385
384
|
/*
|
|
386
|
-
* Copyright (c)
|
|
385
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
387
386
|
* Licensed under the MIT license.
|
|
388
387
|
* See LICENSE file in the project root for full license information.
|
|
389
388
|
*/
|
|
@@ -479,7 +478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
479
478
|
}] } });
|
|
480
479
|
|
|
481
480
|
/*
|
|
482
|
-
* Copyright (c)
|
|
481
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
483
482
|
* Licensed under the MIT license.
|
|
484
483
|
* See LICENSE file in the project root for full license information.
|
|
485
484
|
*/
|
|
@@ -499,7 +498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
499
498
|
}] });
|
|
500
499
|
|
|
501
500
|
/*
|
|
502
|
-
* Copyright (c)
|
|
501
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
503
502
|
* Licensed under the MIT license.
|
|
504
503
|
* See LICENSE file in the project root for full license information.
|
|
505
504
|
*/
|
|
@@ -656,7 +655,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
656
655
|
}] } });
|
|
657
656
|
|
|
658
657
|
/*
|
|
659
|
-
* Copyright (c)
|
|
658
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
660
659
|
* Licensed under the MIT license.
|
|
661
660
|
* See LICENSE file in the project root for full license information.
|
|
662
661
|
*/
|
|
@@ -691,13 +690,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
691
690
|
}] });
|
|
692
691
|
|
|
693
692
|
/*
|
|
694
|
-
* Copyright (c)
|
|
693
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
695
694
|
* Licensed under the MIT license.
|
|
696
695
|
* See LICENSE file in the project root for full license information.
|
|
697
696
|
*/
|
|
698
697
|
|
|
699
698
|
/*
|
|
700
|
-
* Copyright (c)
|
|
699
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
701
700
|
* Licensed under the MIT license.
|
|
702
701
|
* See LICENSE file in the project root for full license information.
|
|
703
702
|
*/
|
|
@@ -730,7 +729,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
730
729
|
}] } });
|
|
731
730
|
|
|
732
731
|
/*
|
|
733
|
-
* Copyright (c)
|
|
732
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
734
733
|
* Licensed under the MIT license.
|
|
735
734
|
* See LICENSE file in the project root for full license information.
|
|
736
735
|
*/
|
|
@@ -750,19 +749,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
750
749
|
}] });
|
|
751
750
|
|
|
752
751
|
/*
|
|
753
|
-
* Copyright (c)
|
|
752
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
754
753
|
* Licensed under the MIT license.
|
|
755
754
|
* See LICENSE file in the project root for full license information.
|
|
756
755
|
*/
|
|
757
756
|
|
|
758
757
|
/*
|
|
759
|
-
* Copyright (c)
|
|
758
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
760
759
|
* Licensed under the MIT license.
|
|
761
760
|
* See LICENSE file in the project root for full license information.
|
|
762
761
|
*/
|
|
763
762
|
|
|
764
763
|
/*
|
|
765
|
-
* Copyright (c)
|
|
764
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
766
765
|
* Licensed under the MIT license.
|
|
767
766
|
* See LICENSE file in the project root for full license information.
|
|
768
767
|
*/
|
|
@@ -854,7 +853,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
854
853
|
}] });
|
|
855
854
|
|
|
856
855
|
/*
|
|
857
|
-
* Copyright (c)
|
|
856
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
858
857
|
* Licensed under the MIT license.
|
|
859
858
|
* See LICENSE file in the project root for full license information.
|
|
860
859
|
*/
|
|
@@ -888,13 +887,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
888
887
|
}] });
|
|
889
888
|
|
|
890
889
|
/*
|
|
891
|
-
* Copyright (c)
|
|
890
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
892
891
|
* Licensed under the MIT license.
|
|
893
892
|
* See LICENSE file in the project root for full license information.
|
|
894
893
|
*/
|
|
895
894
|
|
|
896
895
|
/*
|
|
897
|
-
* Copyright (c)
|
|
896
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
898
897
|
* Licensed under the MIT license.
|
|
899
898
|
* See LICENSE file in the project root for full license information.
|
|
900
899
|
*/
|
|
@@ -908,7 +907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
908
907
|
}] });
|
|
909
908
|
|
|
910
909
|
/*
|
|
911
|
-
* Copyright (c)
|
|
910
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
912
911
|
* Licensed under the MIT license.
|
|
913
912
|
* See LICENSE file in the project root for full license information.
|
|
914
913
|
*/
|
|
@@ -922,7 +921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
922
921
|
}] });
|
|
923
922
|
|
|
924
923
|
/*
|
|
925
|
-
* Copyright (c)
|
|
924
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
926
925
|
* Licensed under the MIT license.
|
|
927
926
|
* See LICENSE file in the project root for full license information.
|
|
928
927
|
*/
|
|
@@ -932,16 +931,16 @@ class BaoLabelTextComponent {
|
|
|
932
931
|
}
|
|
933
932
|
}
|
|
934
933
|
BaoLabelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoLabelTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
935
|
-
BaoLabelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaoLabelTextComponent, selector: "bao-label, [bao-label]", inputs: { required: "required" }, host: { classAttribute: "bao-label" }, ngImport: i0, template: '<
|
|
934
|
+
BaoLabelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaoLabelTextComponent, selector: "bao-label, [bao-label]", inputs: { required: "required" }, host: { classAttribute: "bao-label" }, ngImport: i0, template: '<ng-content></ng-content><span *ngIf="required"> *</span>', isInline: true, styles: [".bao-label{color:#212529!important;font-weight:700;line-height:1.5em;font-size:1rem;margin-bottom:.5rem}.bao-label span{color:#d3310a;margin:0}\n"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
936
935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoLabelTextComponent, decorators: [{
|
|
937
936
|
type: Component,
|
|
938
|
-
args: [{ selector: 'bao-label, [bao-label]', encapsulation: ViewEncapsulation.None, template: '<
|
|
937
|
+
args: [{ selector: 'bao-label, [bao-label]', encapsulation: ViewEncapsulation.None, template: '<ng-content></ng-content><span *ngIf="required"> *</span>', host: { class: 'bao-label' }, styles: [".bao-label{color:#212529!important;font-weight:700;line-height:1.5em;font-size:1rem;margin-bottom:.5rem}.bao-label span{color:#d3310a;margin:0}\n"] }]
|
|
939
938
|
}], propDecorators: { required: [{
|
|
940
939
|
type: Input
|
|
941
940
|
}] } });
|
|
942
941
|
|
|
943
942
|
/*
|
|
944
|
-
* Copyright (c)
|
|
943
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
945
944
|
* Licensed under the MIT license.
|
|
946
945
|
* See LICENSE file in the project root for full license information.
|
|
947
946
|
*/
|
|
@@ -955,13 +954,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
955
954
|
}] });
|
|
956
955
|
|
|
957
956
|
/*
|
|
958
|
-
* Copyright (c)
|
|
959
|
-
* Licensed under the MIT license.
|
|
960
|
-
* See LICENSE file in the project root for full license information.
|
|
961
|
-
*/
|
|
962
|
-
|
|
963
|
-
/*
|
|
964
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
957
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
965
958
|
* Licensed under the MIT license.
|
|
966
959
|
* See LICENSE file in the project root for full license information.
|
|
967
960
|
*/
|
|
@@ -992,7 +985,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
992
985
|
}] });
|
|
993
986
|
|
|
994
987
|
/*
|
|
995
|
-
* Copyright (c)
|
|
988
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
996
989
|
* Licensed under the MIT license.
|
|
997
990
|
* See LICENSE file in the project root for full license information.
|
|
998
991
|
*/
|
|
@@ -1347,7 +1340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1347
1340
|
}] });
|
|
1348
1341
|
|
|
1349
1342
|
/*
|
|
1350
|
-
* Copyright (c)
|
|
1343
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1351
1344
|
* Licensed under the MIT license.
|
|
1352
1345
|
* See LICENSE file in the project root for full license information.
|
|
1353
1346
|
*/
|
|
@@ -1375,13 +1368,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1375
1368
|
}] });
|
|
1376
1369
|
|
|
1377
1370
|
/*
|
|
1378
|
-
* Copyright (c)
|
|
1371
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1372
|
+
* Licensed under the MIT license.
|
|
1373
|
+
* See LICENSE file in the project root for full license information.
|
|
1374
|
+
*/
|
|
1375
|
+
|
|
1376
|
+
/*
|
|
1377
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1379
1378
|
* Licensed under the MIT license.
|
|
1380
1379
|
* See LICENSE file in the project root for full license information.
|
|
1381
1380
|
*/
|
|
1382
1381
|
|
|
1383
1382
|
/*
|
|
1384
|
-
* Copyright (c)
|
|
1383
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1385
1384
|
* Licensed under the MIT license.
|
|
1386
1385
|
* See LICENSE file in the project root for full license information.
|
|
1387
1386
|
*/
|
|
@@ -1482,7 +1481,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1482
1481
|
}] });
|
|
1483
1482
|
|
|
1484
1483
|
/*
|
|
1485
|
-
* Copyright (c)
|
|
1484
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1486
1485
|
* Licensed under the MIT license.
|
|
1487
1486
|
* See LICENSE file in the project root for full license information.
|
|
1488
1487
|
*/
|
|
@@ -1519,19 +1518,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1519
1518
|
}] });
|
|
1520
1519
|
|
|
1521
1520
|
/*
|
|
1522
|
-
* Copyright (c)
|
|
1521
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1523
1522
|
* Licensed under the MIT license.
|
|
1524
1523
|
* See LICENSE file in the project root for full license information.
|
|
1525
1524
|
*/
|
|
1526
1525
|
|
|
1527
1526
|
/*
|
|
1528
|
-
* Copyright (c)
|
|
1527
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1529
1528
|
* Licensed under the MIT license.
|
|
1530
1529
|
* See LICENSE file in the project root for full license information.
|
|
1531
1530
|
*/
|
|
1532
1531
|
|
|
1533
1532
|
/*
|
|
1534
|
-
* Copyright (c)
|
|
1533
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1535
1534
|
* Licensed under the MIT license.
|
|
1536
1535
|
* See LICENSE file in the project root for full license information.
|
|
1537
1536
|
*/
|
|
@@ -1602,7 +1601,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1602
1601
|
}] });
|
|
1603
1602
|
|
|
1604
1603
|
/*
|
|
1605
|
-
* Copyright (c)
|
|
1604
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1606
1605
|
* Licensed under the MIT license.
|
|
1607
1606
|
* See LICENSE file in the project root for full license information.
|
|
1608
1607
|
*/
|
|
@@ -1636,13 +1635,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1636
1635
|
}] });
|
|
1637
1636
|
|
|
1638
1637
|
/*
|
|
1639
|
-
* Copyright (c)
|
|
1638
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1640
1639
|
* Licensed under the MIT license.
|
|
1641
1640
|
* See LICENSE file in the project root for full license information.
|
|
1642
1641
|
*/
|
|
1643
1642
|
|
|
1644
1643
|
/*
|
|
1645
|
-
* Copyright (c)
|
|
1644
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1646
1645
|
* Licensed under the MIT license.
|
|
1647
1646
|
* See LICENSE file in the project root for full license information.
|
|
1648
1647
|
*/
|
|
@@ -2170,7 +2169,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2170
2169
|
}] });
|
|
2171
2170
|
|
|
2172
2171
|
/*
|
|
2173
|
-
* Copyright (c)
|
|
2172
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2174
2173
|
* Licensed under the MIT license.
|
|
2175
2174
|
* See LICENSE file in the project root for full license information.
|
|
2176
2175
|
*/
|
|
@@ -2217,13 +2216,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2217
2216
|
}] });
|
|
2218
2217
|
|
|
2219
2218
|
/*
|
|
2220
|
-
* Copyright (c)
|
|
2219
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2221
2220
|
* Licensed under the MIT license.
|
|
2222
2221
|
* See LICENSE file in the project root for full license information.
|
|
2223
2222
|
*/
|
|
2224
2223
|
|
|
2225
2224
|
/*
|
|
2226
|
-
* Copyright (c)
|
|
2225
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2227
2226
|
* Licensed under the MIT license.
|
|
2228
2227
|
* See LICENSE file in the project root for full license information.
|
|
2229
2228
|
*/
|
|
@@ -2296,7 +2295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2296
2295
|
}] } });
|
|
2297
2296
|
|
|
2298
2297
|
/*
|
|
2299
|
-
* Copyright (c)
|
|
2298
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2300
2299
|
* Licensed under the MIT license.
|
|
2301
2300
|
* See LICENSE file in the project root for full license information.
|
|
2302
2301
|
*/
|
|
@@ -2316,13 +2315,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2316
2315
|
}] });
|
|
2317
2316
|
|
|
2318
2317
|
/*
|
|
2319
|
-
* Copyright (c)
|
|
2318
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2320
2319
|
* Licensed under the MIT license.
|
|
2321
2320
|
* See LICENSE file in the project root for full license information.
|
|
2322
2321
|
*/
|
|
2323
2322
|
|
|
2324
2323
|
/*
|
|
2325
|
-
* Copyright (c)
|
|
2324
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2326
2325
|
* Licensed under the MIT license.
|
|
2327
2326
|
* See LICENSE file in the project root for full license information.
|
|
2328
2327
|
*/
|
|
@@ -2413,7 +2412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2413
2412
|
}] });
|
|
2414
2413
|
|
|
2415
2414
|
/*
|
|
2416
|
-
* Copyright (c)
|
|
2415
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2417
2416
|
* Licensed under the MIT license.
|
|
2418
2417
|
* See LICENSE file in the project root for full license information.
|
|
2419
2418
|
*/
|
|
@@ -2448,7 +2447,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2448
2447
|
}] });
|
|
2449
2448
|
|
|
2450
2449
|
/*
|
|
2451
|
-
* Copyright (c)
|
|
2450
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2452
2451
|
* Licensed under the MIT license.
|
|
2453
2452
|
* See LICENSE file in the project root for full license information.
|
|
2454
2453
|
*/
|
|
@@ -2479,13 +2478,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2479
2478
|
}] });
|
|
2480
2479
|
|
|
2481
2480
|
/*
|
|
2482
|
-
* Copyright (c)
|
|
2481
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2483
2482
|
* Licensed under the MIT license.
|
|
2484
2483
|
* See LICENSE file in the project root for full license information.
|
|
2485
2484
|
*/
|
|
2486
2485
|
|
|
2487
2486
|
/*
|
|
2488
|
-
* Copyright (c)
|
|
2487
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2489
2488
|
* Licensed under the MIT license.
|
|
2490
2489
|
* See LICENSE file in the project root for full license information.
|
|
2491
2490
|
*/
|
|
@@ -2585,7 +2584,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2585
2584
|
}] } });
|
|
2586
2585
|
|
|
2587
2586
|
/*
|
|
2588
|
-
* Copyright (c)
|
|
2587
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2589
2588
|
* Licensed under the MIT license.
|
|
2590
2589
|
* See LICENSE file in the project root for full license information.
|
|
2591
2590
|
*/
|
|
@@ -2605,13 +2604,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2605
2604
|
}] });
|
|
2606
2605
|
|
|
2607
2606
|
/*
|
|
2608
|
-
* Copyright (c)
|
|
2607
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2609
2608
|
* Licensed under the MIT license.
|
|
2610
2609
|
* See LICENSE file in the project root for full license information.
|
|
2611
2610
|
*/
|
|
2612
2611
|
|
|
2613
2612
|
/*
|
|
2614
|
-
* Copyright (c)
|
|
2613
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2615
2614
|
* Licensed under the MIT license.
|
|
2616
2615
|
* See LICENSE file in the project root for full license information.
|
|
2617
2616
|
*/
|
|
@@ -2904,7 +2903,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2904
2903
|
}] } });
|
|
2905
2904
|
|
|
2906
2905
|
/*
|
|
2907
|
-
* Copyright (c)
|
|
2906
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2908
2907
|
* Licensed under the MIT license.
|
|
2909
2908
|
* See LICENSE file in the project root for full license information.
|
|
2910
2909
|
*/
|
|
@@ -2935,41 +2934,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2935
2934
|
}] });
|
|
2936
2935
|
|
|
2937
2936
|
/*
|
|
2938
|
-
* Copyright (c)
|
|
2937
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2939
2938
|
* Licensed under the MIT license.
|
|
2940
2939
|
* See LICENSE file in the project root for full license information.
|
|
2941
2940
|
*/
|
|
2942
2941
|
|
|
2943
2942
|
/*
|
|
2944
|
-
* Copyright (c)
|
|
2945
|
-
* Licensed under the MIT license.
|
|
2946
|
-
* See LICENSE file in the project root for full license information.
|
|
2947
|
-
*/
|
|
2948
|
-
/**
|
|
2949
|
-
* Animations used by MatDialog.
|
|
2950
|
-
* @docs-private
|
|
2951
|
-
*/
|
|
2952
|
-
const baoModalAnimations = {
|
|
2953
|
-
/** Animation that is applied on the modal container by default. */
|
|
2954
|
-
modalContainer: trigger('modalContainer', [
|
|
2955
|
-
// Note: The `enter` animation transitions to `transform: none`, because for some reason
|
|
2956
|
-
// specifying the transform explicitly, causes IE both to blur the modal content and
|
|
2957
|
-
// decimate the animation performance. Leaving it as `none` solves both issues.
|
|
2958
|
-
state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
|
|
2959
|
-
state('enter', style({ transform: 'none' })),
|
|
2960
|
-
transition('* => enter', group([
|
|
2961
|
-
animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
|
|
2962
|
-
query('@*', animateChild(), { optional: true })
|
|
2963
|
-
])),
|
|
2964
|
-
transition('* => void, * => exit', group([
|
|
2965
|
-
animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
|
|
2966
|
-
query('@*', animateChild(), { optional: true })
|
|
2967
|
-
]))
|
|
2968
|
-
])
|
|
2969
|
-
};
|
|
2970
|
-
|
|
2971
|
-
/*
|
|
2972
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2943
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2973
2944
|
* Licensed under the MIT license.
|
|
2974
2945
|
* See LICENSE file in the project root for full license information.
|
|
2975
2946
|
*/
|
|
@@ -3237,41 +3208,29 @@ class BaoModalContainer extends _BaoModalContainerBase {
|
|
|
3237
3208
|
/** State of the modal animation. */
|
|
3238
3209
|
this._state = 'enter';
|
|
3239
3210
|
}
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
if (toState === 'enter') {
|
|
3244
|
-
yield this._trapFocus();
|
|
3245
|
-
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3246
|
-
}
|
|
3247
|
-
else if (toState === 'exit') {
|
|
3248
|
-
this._restoreFocus();
|
|
3249
|
-
this._animationStateChanged.next({ state: 'closed', totalTime });
|
|
3250
|
-
}
|
|
3251
|
-
});
|
|
3252
|
-
}
|
|
3253
|
-
/** Callback, invoked when an animation on the host starts. */
|
|
3254
|
-
_onAnimationStart({ toState, totalTime }) {
|
|
3255
|
-
if (toState === 'enter') {
|
|
3256
|
-
this._animationStateChanged.next({ state: 'opening', totalTime });
|
|
3257
|
-
}
|
|
3258
|
-
else if (toState === 'exit' || toState === 'void') {
|
|
3259
|
-
this._animationStateChanged.next({ state: 'closing', totalTime });
|
|
3260
|
-
}
|
|
3211
|
+
_startOpenAnimation() {
|
|
3212
|
+
this._animationStateChanged.emit({ state: 'opening', totalTime: 20 });
|
|
3213
|
+
void Promise.resolve().then(() => this._finishDialogOpen());
|
|
3261
3214
|
}
|
|
3262
3215
|
/** Starts the modal exit animation. */
|
|
3263
3216
|
_startExitAnimation() {
|
|
3264
|
-
this.
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
this.
|
|
3217
|
+
this._animationStateChanged.emit({ state: 'closed', totalTime: 20 });
|
|
3218
|
+
}
|
|
3219
|
+
_finishDialogOpen() {
|
|
3220
|
+
this._openAnimationDone(20);
|
|
3221
|
+
}
|
|
3222
|
+
_openAnimationDone(totalTime) {
|
|
3223
|
+
if (this._config.delayFocusTrap) {
|
|
3224
|
+
void this._trapFocus();
|
|
3225
|
+
}
|
|
3226
|
+
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3268
3227
|
}
|
|
3269
3228
|
}
|
|
3270
3229
|
BaoModalContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3271
|
-
BaoModalContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaoModalContainer, selector: "bao-modal-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" },
|
|
3230
|
+
BaoModalContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaoModalContainer, selector: "bao-modal-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, properties: { "id": "_id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledBy", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null" }, classAttribute: "bao-modal-container" }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;width:100%;height:100%;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"], directives: [{ type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
3272
3231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3273
3232
|
type: Component,
|
|
3274
|
-
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default,
|
|
3233
|
+
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
3275
3234
|
class: 'bao-modal-container',
|
|
3276
3235
|
tabindex: '-1',
|
|
3277
3236
|
'aria-modal': 'true',
|
|
@@ -3279,10 +3238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3279
3238
|
'[attr.role]': '_config.role',
|
|
3280
3239
|
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3281
3240
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
3282
|
-
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3283
|
-
'[@modalContainer]': '_state',
|
|
3284
|
-
'(@modalContainer.start)': '_onAnimationStart($event)',
|
|
3285
|
-
'(@modalContainer.done)': '_onAnimationDone($event)'
|
|
3241
|
+
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3286
3242
|
}, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;width:100%;height:100%;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"] }]
|
|
3287
3243
|
}] });
|
|
3288
3244
|
|
|
@@ -3375,6 +3331,9 @@ class BaoModalRef {
|
|
|
3375
3331
|
this._state = 1 /* CLOSING */;
|
|
3376
3332
|
this._containerInstance._startExitAnimation();
|
|
3377
3333
|
}
|
|
3334
|
+
startOpenAnimation() {
|
|
3335
|
+
this._containerInstance._startOpenAnimation();
|
|
3336
|
+
}
|
|
3378
3337
|
/**
|
|
3379
3338
|
* Gets an observable that is notified when the modal is finished opening.
|
|
3380
3339
|
*/
|
|
@@ -3480,14 +3439,14 @@ function _closeModalVia(ref, interactionType, result) {
|
|
|
3480
3439
|
}
|
|
3481
3440
|
|
|
3482
3441
|
/*
|
|
3483
|
-
* Copyright (c)
|
|
3442
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3484
3443
|
* Licensed under the MIT license.
|
|
3485
3444
|
* See LICENSE file in the project root for full license information.
|
|
3486
3445
|
*/
|
|
3487
3446
|
/** Injection token that can be used to access the data that was passed in to a modal. */
|
|
3488
3447
|
const BAO_MODAL_DATA = new InjectionToken('BaoModalData');
|
|
3489
3448
|
class BaoModalBase {
|
|
3490
|
-
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken
|
|
3449
|
+
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken) {
|
|
3491
3450
|
this._overlay = _overlay;
|
|
3492
3451
|
this._injector = _injector;
|
|
3493
3452
|
this._parentModal = _parentModal;
|
|
@@ -3495,7 +3454,6 @@ class BaoModalBase {
|
|
|
3495
3454
|
this._modalRefConstructor = _modalRefConstructor;
|
|
3496
3455
|
this._modalContainerType = _modalContainerType;
|
|
3497
3456
|
this._modalDataToken = _modalDataToken;
|
|
3498
|
-
this._animationMode = _animationMode;
|
|
3499
3457
|
this.afterAllClosed = defer(() => this.openModals.length
|
|
3500
3458
|
? this.getAfterAllClosed()
|
|
3501
3459
|
: this.getAfterAllClosed().pipe(startWith(undefined)));
|
|
@@ -3535,21 +3493,6 @@ class BaoModalBase {
|
|
|
3535
3493
|
}
|
|
3536
3494
|
const overlayRef = this._createOverlay(conf);
|
|
3537
3495
|
const modalContainer = this._attachModalContainer(overlayRef, conf);
|
|
3538
|
-
if (this._animationMode !== 'NoopAnimations') {
|
|
3539
|
-
const animationStateSubscription = modalContainer._animationStateChanged.subscribe(modalAnimationEvent => {
|
|
3540
|
-
if (modalAnimationEvent.state === 'opening') {
|
|
3541
|
-
this._modalAnimatingOpen = true;
|
|
3542
|
-
}
|
|
3543
|
-
if (modalAnimationEvent.state === 'opened') {
|
|
3544
|
-
this._modalAnimatingOpen = false;
|
|
3545
|
-
animationStateSubscription.unsubscribe();
|
|
3546
|
-
}
|
|
3547
|
-
});
|
|
3548
|
-
if (!this._animationStateSubscriptions) {
|
|
3549
|
-
this._animationStateSubscriptions = new Subscription();
|
|
3550
|
-
}
|
|
3551
|
-
this._animationStateSubscriptions.add(animationStateSubscription);
|
|
3552
|
-
}
|
|
3553
3496
|
const modalRef = this._attachModalContent(componentOrTemplateRef, modalContainer, overlayRef, conf);
|
|
3554
3497
|
this._lastModalRef = modalRef;
|
|
3555
3498
|
// If this is the first modal that we're opening, hide all the non-overlay content.
|
|
@@ -3620,6 +3563,7 @@ class BaoModalBase {
|
|
|
3620
3563
|
});
|
|
3621
3564
|
const containerPortal = new ComponentPortal(this._modalContainerType, config.viewContainerRef, injector);
|
|
3622
3565
|
const containerRef = overlay.attach(containerPortal);
|
|
3566
|
+
containerRef.instance._startOpenAnimation();
|
|
3623
3567
|
return containerRef.instance;
|
|
3624
3568
|
}
|
|
3625
3569
|
/**
|
|
@@ -3734,16 +3678,16 @@ BaoModalBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
|
|
|
3734
3678
|
BaoModalBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoModalBase, ngImport: i0 });
|
|
3735
3679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalBase, decorators: [{
|
|
3736
3680
|
type: Directive
|
|
3737
|
-
}], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: undefined }, { type: i1$4.OverlayContainer }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }
|
|
3681
|
+
}], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: undefined }, { type: i1$4.OverlayContainer }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }]; } });
|
|
3738
3682
|
/**
|
|
3739
3683
|
* Service to open modal.
|
|
3740
3684
|
*/
|
|
3741
3685
|
class BaoModal extends BaoModalBase {
|
|
3742
|
-
constructor(overlay, injector, parentModal, overlayContainer
|
|
3743
|
-
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA
|
|
3686
|
+
constructor(overlay, injector, parentModal, overlayContainer) {
|
|
3687
|
+
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA);
|
|
3744
3688
|
}
|
|
3745
3689
|
}
|
|
3746
|
-
BaoModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModal, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }, { token: BaoModal, optional: true, skipSelf: true }, { token: i1$4.OverlayContainer }
|
|
3690
|
+
BaoModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModal, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }, { token: BaoModal, optional: true, skipSelf: true }, { token: i1$4.OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3747
3691
|
BaoModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModal });
|
|
3748
3692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModal, decorators: [{
|
|
3749
3693
|
type: Injectable
|
|
@@ -3752,16 +3696,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3752
3696
|
type: Optional
|
|
3753
3697
|
}, {
|
|
3754
3698
|
type: SkipSelf
|
|
3755
|
-
}] }, { type: i1$4.OverlayContainer }
|
|
3756
|
-
type: Optional
|
|
3757
|
-
}, {
|
|
3758
|
-
type: Inject,
|
|
3759
|
-
args: [ANIMATION_MODULE_TYPE]
|
|
3760
|
-
}] }];
|
|
3699
|
+
}] }, { type: i1$4.OverlayContainer }];
|
|
3761
3700
|
} });
|
|
3762
3701
|
|
|
3763
3702
|
/*
|
|
3764
|
-
* Copyright (c)
|
|
3703
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3765
3704
|
* Licensed under the MIT license.
|
|
3766
3705
|
* See LICENSE file in the project root for full license information.
|
|
3767
3706
|
*/
|
|
@@ -3842,7 +3781,7 @@ function getClosestDialog(element, openDialogs) {
|
|
|
3842
3781
|
}
|
|
3843
3782
|
|
|
3844
3783
|
/*
|
|
3845
|
-
* Copyright (c)
|
|
3784
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3846
3785
|
* Licensed under the MIT license.
|
|
3847
3786
|
* See LICENSE file in the project root for full license information.
|
|
3848
3787
|
*/
|
|
@@ -3850,28 +3789,12 @@ const MODAL_DIRECTIVES = [BaoModalContainer, BaoModalClose];
|
|
|
3850
3789
|
class BaoModalModule {
|
|
3851
3790
|
}
|
|
3852
3791
|
BaoModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3853
|
-
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule,
|
|
3854
|
-
|
|
3855
|
-
PortalModule,
|
|
3856
|
-
BrowserAnimationsModule,
|
|
3857
|
-
NoopAnimationsModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3858
|
-
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [[
|
|
3859
|
-
CommonModule,
|
|
3860
|
-
OverlayModule,
|
|
3861
|
-
PortalModule,
|
|
3862
|
-
BrowserAnimationsModule,
|
|
3863
|
-
NoopAnimationsModule
|
|
3864
|
-
]] });
|
|
3792
|
+
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule, OverlayModule, PortalModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3793
|
+
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [[CommonModule, OverlayModule, PortalModule]] });
|
|
3865
3794
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, decorators: [{
|
|
3866
3795
|
type: NgModule,
|
|
3867
3796
|
args: [{
|
|
3868
|
-
imports: [
|
|
3869
|
-
CommonModule,
|
|
3870
|
-
OverlayModule,
|
|
3871
|
-
PortalModule,
|
|
3872
|
-
BrowserAnimationsModule,
|
|
3873
|
-
NoopAnimationsModule
|
|
3874
|
-
],
|
|
3797
|
+
imports: [CommonModule, OverlayModule, PortalModule],
|
|
3875
3798
|
declarations: MODAL_DIRECTIVES,
|
|
3876
3799
|
exports: MODAL_DIRECTIVES,
|
|
3877
3800
|
providers: [BaoModal]
|
|
@@ -3879,7 +3802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3879
3802
|
}] });
|
|
3880
3803
|
|
|
3881
3804
|
/*
|
|
3882
|
-
* Copyright (c)
|
|
3805
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3883
3806
|
* Licensed under the MIT license.
|
|
3884
3807
|
* See LICENSE file in the project root for full license information.
|
|
3885
3808
|
*/
|
|
@@ -3952,7 +3875,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3952
3875
|
}] } });
|
|
3953
3876
|
|
|
3954
3877
|
/*
|
|
3955
|
-
* Copyright (c)
|
|
3878
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3956
3879
|
* Licensed under the MIT license.
|
|
3957
3880
|
* See LICENSE file in the project root for full license information.
|
|
3958
3881
|
*/
|
|
@@ -3972,13 +3895,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3972
3895
|
}] });
|
|
3973
3896
|
|
|
3974
3897
|
/*
|
|
3975
|
-
* Copyright (c)
|
|
3898
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3976
3899
|
* Licensed under the MIT license.
|
|
3977
3900
|
* See LICENSE file in the project root for full license information.
|
|
3978
3901
|
*/
|
|
3979
3902
|
|
|
3980
3903
|
/*
|
|
3981
|
-
* Copyright (c)
|
|
3904
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3982
3905
|
* Licensed under the MIT license.
|
|
3983
3906
|
* See LICENSE file in the project root for full license information.
|
|
3984
3907
|
*/
|
|
@@ -3995,6 +3918,10 @@ class BaoDropdownMenuItem {
|
|
|
3995
3918
|
* Is the list item disabled
|
|
3996
3919
|
*/
|
|
3997
3920
|
this.disabled = false;
|
|
3921
|
+
/**
|
|
3922
|
+
* Emits when menu item is clicked
|
|
3923
|
+
*/
|
|
3924
|
+
this.itemClicked = new EventEmitter();
|
|
3998
3925
|
}
|
|
3999
3926
|
get nativeElement() {
|
|
4000
3927
|
return this.elementRef.nativeElement;
|
|
@@ -4075,19 +4002,25 @@ class BaoDropdownMenuItem {
|
|
|
4075
4002
|
}
|
|
4076
4003
|
}
|
|
4077
4004
|
/**
|
|
4078
|
-
* This method propagates a click event to menu item children with inputs (checkbox, radio button)
|
|
4005
|
+
* This method propagates a click event to menu item children with inputs (checkbox, radio button).
|
|
4006
|
+
* It emits event to close menu if item does not contain an input.
|
|
4079
4007
|
*/
|
|
4080
4008
|
propagateClick() {
|
|
4009
|
+
let closeMenu = true;
|
|
4081
4010
|
for (let i = 0; i < this.nativeElement.children.length; i++) {
|
|
4082
4011
|
if (this.nativeElement.children.item(i).firstElementChild.localName ==
|
|
4083
4012
|
'input') {
|
|
4084
4013
|
this.nativeElement.children.item(i).firstElementChild.click();
|
|
4014
|
+
closeMenu = false;
|
|
4085
4015
|
}
|
|
4086
4016
|
}
|
|
4017
|
+
if (closeMenu) {
|
|
4018
|
+
this.itemClicked.emit();
|
|
4019
|
+
}
|
|
4087
4020
|
}
|
|
4088
4021
|
}
|
|
4089
4022
|
BaoDropdownMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoDropdownMenuItem, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: BaoDropdownMenuComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4090
|
-
BaoDropdownMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoDropdownMenuItem, selector: "bao-dropdown-menu-item, [bao-dropdown-menu-item]", inputs: { disabled: "disabled" }, host: { listeners: { "window:keyup.space": "spaceKeyEvent()", "click": "onClick($event.target)", "window:
|
|
4023
|
+
BaoDropdownMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoDropdownMenuItem, selector: "bao-dropdown-menu-item, [bao-dropdown-menu-item]", inputs: { disabled: "disabled" }, outputs: { itemClicked: "itemClicked" }, host: { listeners: { "window:keyup.space": "spaceKeyEvent()", "click": "onClick($event.target)", "window:keyup.enter": "enterKeyEvent()" }, properties: { "class.bao-dropdown-menu-item-disabled": "disabled===true" }, classAttribute: "bao-dropdown-menu-item" }, usesOnChanges: true, ngImport: i0 });
|
|
4091
4024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoDropdownMenuItem, decorators: [{
|
|
4092
4025
|
type: Directive,
|
|
4093
4026
|
args: [{
|
|
@@ -4099,6 +4032,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4099
4032
|
}]
|
|
4100
4033
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: BaoDropdownMenuComponent }]; }, propDecorators: { disabled: [{
|
|
4101
4034
|
type: Input
|
|
4035
|
+
}], itemClicked: [{
|
|
4036
|
+
type: Output
|
|
4102
4037
|
}], spaceKeyEvent: [{
|
|
4103
4038
|
type: HostListener,
|
|
4104
4039
|
args: ['window:keyup.space']
|
|
@@ -4107,7 +4042,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4107
4042
|
args: ['click', ['$event.target']]
|
|
4108
4043
|
}], enterKeyEvent: [{
|
|
4109
4044
|
type: HostListener,
|
|
4110
|
-
args: ['window:
|
|
4045
|
+
args: ['window:keyup.enter']
|
|
4111
4046
|
}] } });
|
|
4112
4047
|
class BaoDropdownMenuComponent {
|
|
4113
4048
|
constructor(cdr, renderer, elementRef) {
|
|
@@ -4185,6 +4120,9 @@ class BaoDropdownMenuComponent {
|
|
|
4185
4120
|
this.renderer.setAttribute(this.nativeElement, 'id', this.menuId);
|
|
4186
4121
|
this._menuPortal = new DomPortal(this._menuContent);
|
|
4187
4122
|
}
|
|
4123
|
+
ngAfterContentInit() {
|
|
4124
|
+
this._listItems.forEach((item) => item.itemClicked.subscribe(() => this.isClosedByKeyEvent.emit()));
|
|
4125
|
+
}
|
|
4188
4126
|
focusFirstItem() {
|
|
4189
4127
|
this._activeItemIndex = 0;
|
|
4190
4128
|
this._listItems.first.nativeElement.focus();
|
|
@@ -4305,8 +4243,9 @@ class BaoDropdownMenuTrigger {
|
|
|
4305
4243
|
}
|
|
4306
4244
|
/** Enter key event triggers click event which opens menu,
|
|
4307
4245
|
* then focus is put on first item in the menu */
|
|
4308
|
-
enterKeyEvent() {
|
|
4246
|
+
enterKeyEvent(event) {
|
|
4309
4247
|
if (this._isMenuOpen && document.activeElement === this.nativeElement) {
|
|
4248
|
+
event.stopImmediatePropagation();
|
|
4310
4249
|
this.menu.focusFirstItem();
|
|
4311
4250
|
}
|
|
4312
4251
|
}
|
|
@@ -4376,6 +4315,13 @@ class BaoDropdownMenuTrigger {
|
|
|
4376
4315
|
originY: 'top',
|
|
4377
4316
|
overlayX: 'start',
|
|
4378
4317
|
overlayY: 'bottom'
|
|
4318
|
+
},
|
|
4319
|
+
{
|
|
4320
|
+
// top-right of the overlay is connected to bottom-left of the origin;
|
|
4321
|
+
originX: 'start',
|
|
4322
|
+
originY: 'bottom',
|
|
4323
|
+
overlayX: 'end',
|
|
4324
|
+
overlayY: 'top'
|
|
4379
4325
|
}
|
|
4380
4326
|
]),
|
|
4381
4327
|
backdropClass: 'bao-overlay-transparent-backdrop',
|
|
@@ -4385,7 +4331,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4385
4331
|
}
|
|
4386
4332
|
}
|
|
4387
4333
|
BaoDropdownMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoDropdownMenuTrigger, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$4.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4388
|
-
BaoDropdownMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoDropdownMenuTrigger, selector: "bao-dropdown-menu-trigger, [bao-dropdown-menu-trigger], [baoDropdownMenuTriggerFor]", inputs: { menu: ["baoDropdownMenuTriggerFor", "menu"] }, host: { listeners: { "window:keyup.escape": "escapeKeyEvent()", "window:keyup.enter": "enterKeyEvent()", "click": "onClick()" }, classAttribute: "bao-dropdown-menu-trigger" }, ngImport: i0 });
|
|
4334
|
+
BaoDropdownMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoDropdownMenuTrigger, selector: "bao-dropdown-menu-trigger, [bao-dropdown-menu-trigger], [baoDropdownMenuTriggerFor]", inputs: { menu: ["baoDropdownMenuTriggerFor", "menu"] }, host: { listeners: { "window:keyup.escape": "escapeKeyEvent()", "window:keyup.enter": "enterKeyEvent($event)", "click": "onClick()" }, classAttribute: "bao-dropdown-menu-trigger" }, ngImport: i0 });
|
|
4389
4335
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoDropdownMenuTrigger, decorators: [{
|
|
4390
4336
|
type: Directive,
|
|
4391
4337
|
args: [{
|
|
@@ -4400,7 +4346,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4400
4346
|
args: ['window:keyup.escape']
|
|
4401
4347
|
}], enterKeyEvent: [{
|
|
4402
4348
|
type: HostListener,
|
|
4403
|
-
args: ['window:keyup.enter']
|
|
4349
|
+
args: ['window:keyup.enter', ['$event']]
|
|
4404
4350
|
}], onClick: [{
|
|
4405
4351
|
type: HostListener,
|
|
4406
4352
|
args: ['click']
|
|
@@ -4495,7 +4441,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4495
4441
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4496
4442
|
|
|
4497
4443
|
/*
|
|
4498
|
-
* Copyright (c)
|
|
4444
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4499
4445
|
* Licensed under the MIT license.
|
|
4500
4446
|
* See LICENSE file in the project root for full license information.
|
|
4501
4447
|
*/
|
|
@@ -4535,13 +4481,514 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4535
4481
|
}] });
|
|
4536
4482
|
|
|
4537
4483
|
/*
|
|
4538
|
-
* Copyright (c)
|
|
4484
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4485
|
+
* Licensed under the MIT license.
|
|
4486
|
+
* See LICENSE file in the project root for full license information.
|
|
4487
|
+
*/
|
|
4488
|
+
|
|
4489
|
+
/*
|
|
4490
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4491
|
+
* Licensed under the MIT license.
|
|
4492
|
+
* See LICENSE file in the project root for full license information.
|
|
4493
|
+
*/
|
|
4494
|
+
const KILO_THRESHOLD = 1000;
|
|
4495
|
+
const MEGA_THRESHOLD = 1000000;
|
|
4496
|
+
class BaoFilePreviewComponent {
|
|
4497
|
+
constructor(elementRef, renderer) {
|
|
4498
|
+
this.elementRef = elementRef;
|
|
4499
|
+
this.renderer = renderer;
|
|
4500
|
+
/**
|
|
4501
|
+
* Is file loading
|
|
4502
|
+
*/
|
|
4503
|
+
this.isLoading = false;
|
|
4504
|
+
/**
|
|
4505
|
+
* True if projected content has no icon and file does not have a thumbnail.
|
|
4506
|
+
*/
|
|
4507
|
+
this.insertGenericIcon = false;
|
|
4508
|
+
this.thumbnailURL = '';
|
|
4509
|
+
}
|
|
4510
|
+
get nativeElement() {
|
|
4511
|
+
return this.elementRef.nativeElement;
|
|
4512
|
+
}
|
|
4513
|
+
get fileSize() {
|
|
4514
|
+
return this.formatSize(this.file.size);
|
|
4515
|
+
}
|
|
4516
|
+
ngAfterContentInit() {
|
|
4517
|
+
this.getThumbnail();
|
|
4518
|
+
this.setIcon();
|
|
4519
|
+
}
|
|
4520
|
+
setIcon() {
|
|
4521
|
+
// If no icon is in the projected content, generic icon is added
|
|
4522
|
+
const contentIcon = Array.from(this.nativeElement.children.item(0).children).find((el) => el.localName === 'bao-icon');
|
|
4523
|
+
if (!contentIcon) {
|
|
4524
|
+
this.insertGenericIcon = true;
|
|
4525
|
+
}
|
|
4526
|
+
else {
|
|
4527
|
+
this.renderer.addClass(contentIcon, 'bao-file-media');
|
|
4528
|
+
}
|
|
4529
|
+
}
|
|
4530
|
+
getThumbnail() {
|
|
4531
|
+
if (this.file &&
|
|
4532
|
+
(this.file.type === 'image/png' || this.file.type === 'image/jpeg')) {
|
|
4533
|
+
const reader = new FileReader();
|
|
4534
|
+
reader.onload = (event) => {
|
|
4535
|
+
this.thumbnailURL = event.target.result;
|
|
4536
|
+
};
|
|
4537
|
+
reader.onerror = () => {
|
|
4538
|
+
this.thumbnailURL = '';
|
|
4539
|
+
};
|
|
4540
|
+
reader.readAsDataURL(this.file);
|
|
4541
|
+
}
|
|
4542
|
+
}
|
|
4543
|
+
formatSize(size) {
|
|
4544
|
+
if (size >= KILO_THRESHOLD && size / KILO_THRESHOLD < KILO_THRESHOLD) {
|
|
4545
|
+
return this.getSizeAndUnit(size, KILO_THRESHOLD, 'Ko');
|
|
4546
|
+
}
|
|
4547
|
+
const sizeDividedByKoMultiplicator = size / KILO_THRESHOLD;
|
|
4548
|
+
if (sizeDividedByKoMultiplicator >= KILO_THRESHOLD) {
|
|
4549
|
+
const toFixed = sizeDividedByKoMultiplicator > 10 ? 0 : 1;
|
|
4550
|
+
return this.getSizeAndUnit(size, MEGA_THRESHOLD, 'Mo', toFixed);
|
|
4551
|
+
}
|
|
4552
|
+
return `${size} octets`;
|
|
4553
|
+
}
|
|
4554
|
+
getSizeAndUnit(size, multiplicator, unit, toFixed = 0) {
|
|
4555
|
+
return `${(size / multiplicator).toFixed(toFixed)} ${unit}`;
|
|
4556
|
+
}
|
|
4557
|
+
}
|
|
4558
|
+
BaoFilePreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFilePreviewComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
4559
|
+
BaoFilePreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaoFilePreviewComponent, selector: "bao-file-preview, [bao-file-preview]", inputs: { file: "file", isLoading: "isLoading" }, host: { classAttribute: "bao-file-preview" }, ngImport: i0, template: "<div class=\"bao-file-info\">\n <ng-content select=\"bao-icon\"></ng-content>\n <bao-icon\n *ngIf=\"insertGenericIcon && !thumbnailURL\"\n class=\"bao-file-media\"\n svgIcon=\"icon-file\"\n >\n </bao-icon>\n <ng-container *ngIf=\"thumbnailURL && !isLoading\">\n <img\n class=\"bao-file-media\"\n [src]=\"thumbnailURL\"\n width=\"40px\"\n height=\"40px\"\n />\n </ng-container>\n <div class=\"bao-file-text\">\n <div class=\"bao-file-name\">{{ file.name }}</div>\n <div class=\"bao-file-size\">{{ fileSize }}</div>\n </div>\n</div>\n<ng-container *ngIf=\"!isLoading\">\n <ng-content select=\"button[bao-button]\"></ng-content>\n <ng-content select=\"baoDropdownTriggerFor\"></ng-content>\n</ng-container>\n<bao-icon\n *ngIf=\"isLoading\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n title=\"chargement\"\n></bao-icon>\n", styles: [".bao-file-preview{display:flex;align-items:center;justify-content:space-between;padding-top:.625rem;padding-bottom:.625rem;list-style-type:none}.bao-file-preview>.bao-file-info{display:flex;align-items:center}.bao-file-preview>.bao-file-info>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-file-preview>.bao-file-info>.bao-file-media{margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text{display:inline-flex;flex-direction:column;margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-name{overflow:hidden;font-weight:700;font-size:.875rem;line-height:1.25rem;color:#212529}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-size{font-weight:400;font-size:.75rem;line-height:1rem;color:#637381}.bao-file-preview .loading-spinner{color:#097d6c}.bao-file-preview .bao-dropdown-menu-container{position:absolute;margin-left:auto}\n"], components: [{ type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
4560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFilePreviewComponent, decorators: [{
|
|
4561
|
+
type: Component,
|
|
4562
|
+
args: [{ selector: 'bao-file-preview, [bao-file-preview]', encapsulation: ViewEncapsulation.None, host: {
|
|
4563
|
+
class: 'bao-file-preview'
|
|
4564
|
+
}, template: "<div class=\"bao-file-info\">\n <ng-content select=\"bao-icon\"></ng-content>\n <bao-icon\n *ngIf=\"insertGenericIcon && !thumbnailURL\"\n class=\"bao-file-media\"\n svgIcon=\"icon-file\"\n >\n </bao-icon>\n <ng-container *ngIf=\"thumbnailURL && !isLoading\">\n <img\n class=\"bao-file-media\"\n [src]=\"thumbnailURL\"\n width=\"40px\"\n height=\"40px\"\n />\n </ng-container>\n <div class=\"bao-file-text\">\n <div class=\"bao-file-name\">{{ file.name }}</div>\n <div class=\"bao-file-size\">{{ fileSize }}</div>\n </div>\n</div>\n<ng-container *ngIf=\"!isLoading\">\n <ng-content select=\"button[bao-button]\"></ng-content>\n <ng-content select=\"baoDropdownTriggerFor\"></ng-content>\n</ng-container>\n<bao-icon\n *ngIf=\"isLoading\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n title=\"chargement\"\n></bao-icon>\n", styles: [".bao-file-preview{display:flex;align-items:center;justify-content:space-between;padding-top:.625rem;padding-bottom:.625rem;list-style-type:none}.bao-file-preview>.bao-file-info{display:flex;align-items:center}.bao-file-preview>.bao-file-info>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-file-preview>.bao-file-info>.bao-file-media{margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text{display:inline-flex;flex-direction:column;margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-name{overflow:hidden;font-weight:700;font-size:.875rem;line-height:1.25rem;color:#212529}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-size{font-weight:400;font-size:.75rem;line-height:1rem;color:#637381}.bao-file-preview .loading-spinner{color:#097d6c}.bao-file-preview .bao-dropdown-menu-container{position:absolute;margin-left:auto}\n"] }]
|
|
4565
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { file: [{
|
|
4566
|
+
type: Input
|
|
4567
|
+
}], isLoading: [{
|
|
4568
|
+
type: Input
|
|
4569
|
+
}] } });
|
|
4570
|
+
|
|
4571
|
+
/*
|
|
4572
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4573
|
+
* Licensed under the MIT license.
|
|
4574
|
+
* See LICENSE file in the project root for full license information.
|
|
4575
|
+
*/
|
|
4576
|
+
/**
|
|
4577
|
+
* To modify the labels and text displayed, create a new instance of BaoFileIntl and
|
|
4578
|
+
* include it in a custom provider
|
|
4579
|
+
*/
|
|
4580
|
+
class BaoFileIntl {
|
|
4581
|
+
constructor() {
|
|
4582
|
+
/**
|
|
4583
|
+
* Stream to emit from when labels are changed. Use this to notify components when the labels have
|
|
4584
|
+
* changed after initialization.
|
|
4585
|
+
*/
|
|
4586
|
+
this.changes = new Subject();
|
|
4587
|
+
/** The label for button in dropzone */
|
|
4588
|
+
this.dropzoneButtonLabel = 'Parcourir';
|
|
4589
|
+
/** The default dropzone instructions */
|
|
4590
|
+
this.defaultDropzoneInstructions = 'ou déposer votre fichier ici';
|
|
4591
|
+
/** Error message displayed when uploaded file is too large */
|
|
4592
|
+
this.fileTooBigErrorMessage = 'La taille de ce fichier est trop grande';
|
|
4593
|
+
/** Error message displayed when uploaded file has an invalid type */
|
|
4594
|
+
this.invalidFileTypeErrorMessage = "Ce format de fichier n'est pas autorisé";
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
BaoFileIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4598
|
+
BaoFileIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntl, providedIn: 'root' });
|
|
4599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntl, decorators: [{
|
|
4600
|
+
type: Injectable,
|
|
4601
|
+
args: [{ providedIn: 'root' }]
|
|
4602
|
+
}] });
|
|
4603
|
+
class BaoFileIntlEnglish extends BaoFileIntl {
|
|
4604
|
+
constructor() {
|
|
4605
|
+
super(...arguments);
|
|
4606
|
+
/** The label for button in dropzone */
|
|
4607
|
+
this.dropzoneButtonLabel = 'Browse';
|
|
4608
|
+
/** The default dropzone instructions */
|
|
4609
|
+
this.defaultDropzoneInstructions = 'or drop your file here';
|
|
4610
|
+
/** Error message displayed when uploaded file is too large */
|
|
4611
|
+
this.fileTooBigErrorMessage = 'The size of this file is too large';
|
|
4612
|
+
/** Error message displayed when uploaded file has an invalid type */
|
|
4613
|
+
this.invalidFileTypeErrorMessage = 'The format of this file is unauthorized';
|
|
4614
|
+
}
|
|
4615
|
+
}
|
|
4616
|
+
BaoFileIntlEnglish.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntlEnglish, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4617
|
+
BaoFileIntlEnglish.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntlEnglish });
|
|
4618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntlEnglish, decorators: [{
|
|
4619
|
+
type: Injectable
|
|
4620
|
+
}] });
|
|
4621
|
+
/** @docs-private */
|
|
4622
|
+
function BAO_FILE_INTL_PROVIDER_FACTORY(parentIntl) {
|
|
4623
|
+
return parentIntl || new BaoFileIntl();
|
|
4624
|
+
}
|
|
4625
|
+
/** @docs-private */
|
|
4626
|
+
const BAO_FILE_INTL_PROVIDER = {
|
|
4627
|
+
// If there is already an BaoFileIntl available, use that. Otherwise, provide a new one.
|
|
4628
|
+
provide: BaoFileIntl,
|
|
4629
|
+
deps: [[new Optional(), new SkipSelf(), BaoFileIntl]],
|
|
4630
|
+
useFactory: BAO_FILE_INTL_PROVIDER_FACTORY
|
|
4631
|
+
};
|
|
4632
|
+
|
|
4633
|
+
/*
|
|
4634
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4635
|
+
* Licensed under the MIT license.
|
|
4636
|
+
* See LICENSE file in the project root for full license information.
|
|
4637
|
+
*/
|
|
4638
|
+
/**
|
|
4639
|
+
* Unique number to generate a unique ID
|
|
4640
|
+
*/
|
|
4641
|
+
let fileInputUniqueId = 0;
|
|
4642
|
+
let fileTextUniqueId = 0;
|
|
4643
|
+
class BaoFileInputComponent {
|
|
4644
|
+
constructor(intl, elementRef, renderer, cdr) {
|
|
4645
|
+
this.intl = intl;
|
|
4646
|
+
this.elementRef = elementRef;
|
|
4647
|
+
this.renderer = renderer;
|
|
4648
|
+
this.cdr = cdr;
|
|
4649
|
+
/**
|
|
4650
|
+
* Size of the file input label
|
|
4651
|
+
*/
|
|
4652
|
+
this.size = 'medium';
|
|
4653
|
+
/**
|
|
4654
|
+
* Maximum size accepted for uploaded files
|
|
4655
|
+
*/
|
|
4656
|
+
this.maximalFileSize = -1;
|
|
4657
|
+
/**
|
|
4658
|
+
* Accepted types of files
|
|
4659
|
+
*/
|
|
4660
|
+
this.acceptedMIMETypes = [];
|
|
4661
|
+
/**
|
|
4662
|
+
* Is field required
|
|
4663
|
+
*/
|
|
4664
|
+
this.required = false;
|
|
4665
|
+
/**
|
|
4666
|
+
* Is field disabled
|
|
4667
|
+
*/
|
|
4668
|
+
this.disabled = false;
|
|
4669
|
+
/**
|
|
4670
|
+
* File selected to be uploaded
|
|
4671
|
+
*/
|
|
4672
|
+
this.uploadedFile = new EventEmitter();
|
|
4673
|
+
this.insertDefaultInstructions = false;
|
|
4674
|
+
this.isFileTooBig = false;
|
|
4675
|
+
this.isFileTypeInvalid = false;
|
|
4676
|
+
/**
|
|
4677
|
+
* Saves the registerOnChange function so the component can call it whenever it wants.
|
|
4678
|
+
*/
|
|
4679
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
4680
|
+
this.propagateChange = (_) => { };
|
|
4681
|
+
/**
|
|
4682
|
+
* Saves the registerOnTouched function so the component can call it whenever it wants.
|
|
4683
|
+
*/
|
|
4684
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4685
|
+
this.propagateTouched = () => { };
|
|
4686
|
+
this._intlChanges = intl.changes.subscribe(() => this.cdr.markForCheck());
|
|
4687
|
+
}
|
|
4688
|
+
get nativeElement() {
|
|
4689
|
+
return this.elementRef.nativeElement;
|
|
4690
|
+
}
|
|
4691
|
+
enterKeyEvent() {
|
|
4692
|
+
if (document.activeElement.id === this.inputId) {
|
|
4693
|
+
document.getElementById(this.inputId).click();
|
|
4694
|
+
}
|
|
4695
|
+
}
|
|
4696
|
+
tabKeyEvent() {
|
|
4697
|
+
if (document.activeElement.id === this.inputId) {
|
|
4698
|
+
this.renderer.addClass(this.dropzoneElement.nativeElement, 'dropzone-focus');
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
shiftTabKeyEvent() {
|
|
4702
|
+
if (document.activeElement.id === this.inputId) {
|
|
4703
|
+
this.renderer.addClass(this.dropzoneElement.nativeElement, 'dropzone-focus');
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
ngAfterContentInit() {
|
|
4707
|
+
this._errorForm.changes.subscribe(() => this.setErrorTextsAttribute());
|
|
4708
|
+
if (!this.inputId) {
|
|
4709
|
+
this.inputId = `file-input-${fileInputUniqueId++}`;
|
|
4710
|
+
}
|
|
4711
|
+
// If no content was added for dropzone instructions, add default text.
|
|
4712
|
+
const dropzoneElement = Array.from(this.nativeElement.children).find((el) => el.className === 'file-drop-zone');
|
|
4713
|
+
if (!Array.from(dropzoneElement.children).find(el => el.localName === 'bao-file-dropzone-instructions')) {
|
|
4714
|
+
this.insertDefaultInstructions = true;
|
|
4715
|
+
}
|
|
4716
|
+
this.setDescribedByAttribute();
|
|
4717
|
+
this._files.changes.subscribe((files) => {
|
|
4718
|
+
const filesList = files.map((el) => el.file);
|
|
4719
|
+
this.setValue(filesList);
|
|
4720
|
+
});
|
|
4721
|
+
}
|
|
4722
|
+
ngAfterViewInit() {
|
|
4723
|
+
this._errorTexts.changes.subscribe(() => this.setErrorTextsAttribute());
|
|
4724
|
+
}
|
|
4725
|
+
ngOnDestroy() {
|
|
4726
|
+
this._intlChanges.unsubscribe();
|
|
4727
|
+
}
|
|
4728
|
+
/**
|
|
4729
|
+
* Implements ControlValueAccessor interface
|
|
4730
|
+
*/
|
|
4731
|
+
writeValue(obj) {
|
|
4732
|
+
this._value = obj;
|
|
4733
|
+
}
|
|
4734
|
+
/**
|
|
4735
|
+
* Implements ControlValueAccessor interface
|
|
4736
|
+
*/
|
|
4737
|
+
registerOnChange(fn) {
|
|
4738
|
+
this.propagateChange = fn;
|
|
4739
|
+
}
|
|
4740
|
+
/**
|
|
4741
|
+
* Implements ControlValueAccessor interface
|
|
4742
|
+
*/
|
|
4743
|
+
registerOnTouched(fn) {
|
|
4744
|
+
this.propagateTouched = fn;
|
|
4745
|
+
}
|
|
4746
|
+
/**
|
|
4747
|
+
* Implements ControlValueAccessor interface
|
|
4748
|
+
*/
|
|
4749
|
+
setDisabledState(isDisabled) {
|
|
4750
|
+
this.disabled = isDisabled;
|
|
4751
|
+
}
|
|
4752
|
+
uploadFile(file) {
|
|
4753
|
+
if (!this.disabled) {
|
|
4754
|
+
this.isFileTypeInvalid = false;
|
|
4755
|
+
this.isFileTooBig = false;
|
|
4756
|
+
this.uploader.nativeElement.value = '';
|
|
4757
|
+
if (this.maximalFileSize > 0 && file.size > this.maximalFileSize) {
|
|
4758
|
+
this.isFileTooBig = true;
|
|
4759
|
+
}
|
|
4760
|
+
if (this.acceptedMIMETypes.length > 0 &&
|
|
4761
|
+
this.acceptedMIMETypes.indexOf(file.type) < 0) {
|
|
4762
|
+
this.isFileTypeInvalid = true;
|
|
4763
|
+
}
|
|
4764
|
+
if (!this.isFileTooBig && !this.isFileTypeInvalid) {
|
|
4765
|
+
this.uploadedFile.emit(file);
|
|
4766
|
+
}
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
setValue(value) {
|
|
4770
|
+
this._value = value;
|
|
4771
|
+
this.propagateChange(this._value);
|
|
4772
|
+
this.propagateTouched();
|
|
4773
|
+
}
|
|
4774
|
+
setDescribedByAttribute() {
|
|
4775
|
+
const helperText = Array.from(this.nativeElement.children).find((el) => el.localName === 'bao-guiding-text');
|
|
4776
|
+
if (helperText) {
|
|
4777
|
+
this._helperTextId = `bao-guiding-text-${fileTextUniqueId++}`;
|
|
4778
|
+
this.renderer.setAttribute(helperText.firstElementChild, 'id', this._helperTextId);
|
|
4779
|
+
const inputElement = Array.from(this.nativeElement.children)
|
|
4780
|
+
.find((el) => el.className == 'file-drop-zone')
|
|
4781
|
+
.children.item(1);
|
|
4782
|
+
this.renderer.setAttribute(inputElement, 'aria-describedby', this._helperTextId);
|
|
4783
|
+
}
|
|
4784
|
+
}
|
|
4785
|
+
setErrorTextsAttribute() {
|
|
4786
|
+
const textsIds = [];
|
|
4787
|
+
const errors = Array.from(this.nativeElement.children).filter((el) => el.localName == 'bao-error');
|
|
4788
|
+
errors.forEach((errorText) => {
|
|
4789
|
+
const errorTextId = `bao-error-${fileTextUniqueId++}`;
|
|
4790
|
+
this.renderer.setAttribute(errorText.firstElementChild, 'id', errorTextId);
|
|
4791
|
+
textsIds.push(errorTextId);
|
|
4792
|
+
});
|
|
4793
|
+
const inputElement = Array.from(this.nativeElement.children)
|
|
4794
|
+
.find((el) => el.classList.contains('file-drop-zone'))
|
|
4795
|
+
.children.item(1);
|
|
4796
|
+
if (this._helperTextId) {
|
|
4797
|
+
textsIds.unshift(this._helperTextId);
|
|
4798
|
+
}
|
|
4799
|
+
this.renderer.setAttribute(inputElement, 'aria-describedby', textsIds.join(' '));
|
|
4800
|
+
}
|
|
4801
|
+
}
|
|
4802
|
+
BaoFileInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileInputComponent, deps: [{ token: BaoFileIntl }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4803
|
+
BaoFileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BaoFileInputComponent, selector: "bao-file-input, [bao-file-input]", inputs: { inputId: ["id", "inputId"], label: "label", size: "size", maximalFileSize: "maximalFileSize", acceptedMIMETypes: "acceptedMIMETypes", required: "required", disabled: "disabled" }, outputs: { uploadedFile: "uploadedFile" }, host: { listeners: { "window:keyup.enter": "enterKeyEvent()", "window:keyup.tab": "tabKeyEvent()", "window:keyup.shift.tab": "shiftTabKeyEvent()" }, properties: { "class.bao-file-label-small": "size === \"small\"", "class.bao-file-label-medium": "size === \"medium\"", "class.bao-file-input-disabled": "disabled" }, classAttribute: "bao-file-input" }, providers: [
|
|
4804
|
+
{
|
|
4805
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4806
|
+
// tslint:disable-next-line:no-forward-ref
|
|
4807
|
+
useExisting: forwardRef(() => BaoFileInputComponent),
|
|
4808
|
+
multi: true
|
|
4809
|
+
}
|
|
4810
|
+
], queries: [{ propertyName: "_files", predicate: BaoFilePreviewComponent, descendants: true }, { propertyName: "_errorForm", predicate: BaoErrorTextComponent, descendants: true }], viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true }, { propertyName: "dropzoneElement", first: true, predicate: ["dropzone"], descendants: true }, { propertyName: "_errorTexts", predicate: BaoErrorTextComponent, descendants: true }], ngImport: i0, template: "<label bao-label [required]=\"required\" [for]=\"inputId\">{{ label }}</label>\n<ng-content select=\"bao-guiding-text\"></ng-content>\n<div\n baoFileDrop\n class=\"file-drop-zone\"\n (fileDrop)=\"uploadFile($event)\"\n #dropzone\n>\n <button\n bao-button\n type=\"button\"\n displayType=\"utility\"\n level=\"secondary\"\n [disabled]=\"disabled\"\n (click)=\"uploader.click()\"\n aria-hidden=\"true\"\n tabIndex=\"-1\"\n >\n {{ intl.dropzoneButtonLabel }}\n </button>\n <input\n [id]=\"inputId\"\n type=\"file\"\n class=\"sr-only\"\n [disabled]=\"disabled\"\n (change)=\"uploadFile($event.target.files[0])\"\n #uploader\n />\n <ng-container\n ><div #ref>\n <ng-content select=\"bao-file-dropzone-instructions\"></ng-content></div\n ></ng-container>\n <ng-container *ngIf=\"ref.childNodes.length === 0\"\n ><bao-file-dropzone-instructions>{{\n intl.defaultDropzoneInstructions\n }}</bao-file-dropzone-instructions></ng-container\n >\n</div>\n<bao-error *ngIf=\"isFileTooBig\">\n {{ intl.fileTooBigErrorMessage }}\n</bao-error>\n<bao-error *ngIf=\"isFileTypeInvalid\">\n {{ intl.invalidFileTypeErrorMessage }}\n</bao-error>\n<ng-content select=\"bao-error\"></ng-content>\n<ng-content></ng-content>\n", styles: ["bao-file-input{width:100%;display:inline-flex;flex-direction:column}bao-file-input>ul{padding:0;margin:0}bao-file-input .bao-label>span{font-size:inherit;font-weight:inherit}bao-file-input.bao-file-label-small label{font-weight:700;font-size:.875rem;line-height:1.25rem}bao-file-input.bao-file-label-medium label{font-weight:700;font-size:1rem;line-height:1.5rem}bao-file-input .bao-guiding-text{margin-bottom:.5rem}bao-file-input .file-drop-zone{padding:.5rem;background-color:#fff;border-radius:.25rem;border-style:dashed;border-color:#ced4da;border-width:1px;display:inline-flex;align-items:center}bao-file-input .file-drop-zone:focus-within.dropzone-focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#eefaf8}bao-file-input .file-drop-zone>.bao-button{margin-right:.5rem}bao-file-input .file-drop-zone.drag-over{background-color:#eefaf8;border-color:#097d6c;cursor:drag}bao-file-input .file-drop-zone.drag-over>.bao-button{background-color:#eefaf8}bao-file-input.bao-file-input-disabled .file-drop-zone{background-color:#f8f9fa;border-color:#ced4da}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button{background-color:#f8f9fa}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button:hover{background-color:#f8f9fa}bao-file-input .bao-file-preview:first-child{margin-top:1rem}bao-file-input .bao-error{margin-top:.5rem}\n"], components: [{ type: i0.forwardRef(function () { return BaoLabelTextComponent; }), selector: "bao-label, [bao-label]", inputs: ["required"] }, { type: i0.forwardRef(function () { return BaoButtonComponent; }), selector: "button[bao-button]", inputs: ["displayType", "level", "size", "loading", "reversed", "loadingSpinnerAriaLabel", "fullWidth"] }, { type: i0.forwardRef(function () { return BaoErrorTextComponent; }), selector: "bao-error, [bao-error]" }], directives: [{ type: i0.forwardRef(function () { return BaoFileDropDirective; }), selector: "[baoFileDrop]", outputs: ["fileDrop"] }, { type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return BaoFileDropzoneIntructions; }), selector: "bao-file-dropzone-instructions, [bao-file-dropzone-instructions]" }], encapsulation: i0.ViewEncapsulation.None });
|
|
4811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileInputComponent, decorators: [{
|
|
4812
|
+
type: Component,
|
|
4813
|
+
args: [{ selector: 'bao-file-input, [bao-file-input]', providers: [
|
|
4814
|
+
{
|
|
4815
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4816
|
+
// tslint:disable-next-line:no-forward-ref
|
|
4817
|
+
useExisting: forwardRef(() => BaoFileInputComponent),
|
|
4818
|
+
multi: true
|
|
4819
|
+
}
|
|
4820
|
+
], encapsulation: ViewEncapsulation.None, host: {
|
|
4821
|
+
class: 'bao-file-input',
|
|
4822
|
+
'[class.bao-file-label-small]': 'size === "small"',
|
|
4823
|
+
'[class.bao-file-label-medium]': 'size === "medium"',
|
|
4824
|
+
'[class.bao-file-input-disabled]': 'disabled'
|
|
4825
|
+
}, template: "<label bao-label [required]=\"required\" [for]=\"inputId\">{{ label }}</label>\n<ng-content select=\"bao-guiding-text\"></ng-content>\n<div\n baoFileDrop\n class=\"file-drop-zone\"\n (fileDrop)=\"uploadFile($event)\"\n #dropzone\n>\n <button\n bao-button\n type=\"button\"\n displayType=\"utility\"\n level=\"secondary\"\n [disabled]=\"disabled\"\n (click)=\"uploader.click()\"\n aria-hidden=\"true\"\n tabIndex=\"-1\"\n >\n {{ intl.dropzoneButtonLabel }}\n </button>\n <input\n [id]=\"inputId\"\n type=\"file\"\n class=\"sr-only\"\n [disabled]=\"disabled\"\n (change)=\"uploadFile($event.target.files[0])\"\n #uploader\n />\n <ng-container\n ><div #ref>\n <ng-content select=\"bao-file-dropzone-instructions\"></ng-content></div\n ></ng-container>\n <ng-container *ngIf=\"ref.childNodes.length === 0\"\n ><bao-file-dropzone-instructions>{{\n intl.defaultDropzoneInstructions\n }}</bao-file-dropzone-instructions></ng-container\n >\n</div>\n<bao-error *ngIf=\"isFileTooBig\">\n {{ intl.fileTooBigErrorMessage }}\n</bao-error>\n<bao-error *ngIf=\"isFileTypeInvalid\">\n {{ intl.invalidFileTypeErrorMessage }}\n</bao-error>\n<ng-content select=\"bao-error\"></ng-content>\n<ng-content></ng-content>\n", styles: ["bao-file-input{width:100%;display:inline-flex;flex-direction:column}bao-file-input>ul{padding:0;margin:0}bao-file-input .bao-label>span{font-size:inherit;font-weight:inherit}bao-file-input.bao-file-label-small label{font-weight:700;font-size:.875rem;line-height:1.25rem}bao-file-input.bao-file-label-medium label{font-weight:700;font-size:1rem;line-height:1.5rem}bao-file-input .bao-guiding-text{margin-bottom:.5rem}bao-file-input .file-drop-zone{padding:.5rem;background-color:#fff;border-radius:.25rem;border-style:dashed;border-color:#ced4da;border-width:1px;display:inline-flex;align-items:center}bao-file-input .file-drop-zone:focus-within.dropzone-focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#eefaf8}bao-file-input .file-drop-zone>.bao-button{margin-right:.5rem}bao-file-input .file-drop-zone.drag-over{background-color:#eefaf8;border-color:#097d6c;cursor:drag}bao-file-input .file-drop-zone.drag-over>.bao-button{background-color:#eefaf8}bao-file-input.bao-file-input-disabled .file-drop-zone{background-color:#f8f9fa;border-color:#ced4da}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button{background-color:#f8f9fa}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button:hover{background-color:#f8f9fa}bao-file-input .bao-file-preview:first-child{margin-top:1rem}bao-file-input .bao-error{margin-top:.5rem}\n"] }]
|
|
4826
|
+
}], ctorParameters: function () { return [{ type: BaoFileIntl }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { inputId: [{
|
|
4827
|
+
type: Input,
|
|
4828
|
+
args: ['id']
|
|
4829
|
+
}], label: [{
|
|
4830
|
+
type: Input
|
|
4831
|
+
}], size: [{
|
|
4832
|
+
type: Input
|
|
4833
|
+
}], maximalFileSize: [{
|
|
4834
|
+
type: Input
|
|
4835
|
+
}], acceptedMIMETypes: [{
|
|
4836
|
+
type: Input
|
|
4837
|
+
}], required: [{
|
|
4838
|
+
type: Input
|
|
4839
|
+
}], disabled: [{
|
|
4840
|
+
type: Input
|
|
4841
|
+
}], uploadedFile: [{
|
|
4842
|
+
type: Output
|
|
4843
|
+
}], _files: [{
|
|
4844
|
+
type: ContentChildren,
|
|
4845
|
+
args: [BaoFilePreviewComponent, { descendants: true }]
|
|
4846
|
+
}], _errorForm: [{
|
|
4847
|
+
type: ContentChildren,
|
|
4848
|
+
args: [BaoErrorTextComponent, { descendants: true }]
|
|
4849
|
+
}], _errorTexts: [{
|
|
4850
|
+
type: ViewChildren,
|
|
4851
|
+
args: [BaoErrorTextComponent]
|
|
4852
|
+
}], uploader: [{
|
|
4853
|
+
type: ViewChild,
|
|
4854
|
+
args: ['uploader', { static: false }]
|
|
4855
|
+
}], dropzoneElement: [{
|
|
4856
|
+
type: ViewChild,
|
|
4857
|
+
args: ['dropzone', { static: false }]
|
|
4858
|
+
}], enterKeyEvent: [{
|
|
4859
|
+
type: HostListener,
|
|
4860
|
+
args: ['window:keyup.enter']
|
|
4861
|
+
}], tabKeyEvent: [{
|
|
4862
|
+
type: HostListener,
|
|
4863
|
+
args: ['window:keyup.tab']
|
|
4864
|
+
}], shiftTabKeyEvent: [{
|
|
4865
|
+
type: HostListener,
|
|
4866
|
+
args: ['window:keyup.shift.tab']
|
|
4867
|
+
}] } });
|
|
4868
|
+
class BaoFileDropDirective {
|
|
4869
|
+
constructor() {
|
|
4870
|
+
this.fileDrop = new EventEmitter();
|
|
4871
|
+
this._isDragOver = false;
|
|
4872
|
+
}
|
|
4873
|
+
onDragOver(event) {
|
|
4874
|
+
this.preventAndStop(event);
|
|
4875
|
+
this._isDragOver = true;
|
|
4876
|
+
}
|
|
4877
|
+
onDragLeave(event) {
|
|
4878
|
+
this.preventAndStop(event);
|
|
4879
|
+
this._isDragOver = false;
|
|
4880
|
+
}
|
|
4881
|
+
onDrop(event) {
|
|
4882
|
+
this.preventAndStop(event);
|
|
4883
|
+
this._isDragOver = false;
|
|
4884
|
+
const transfer = this.getDataTransfer(event);
|
|
4885
|
+
this.fileDrop.emit(transfer.files[0]);
|
|
4886
|
+
}
|
|
4887
|
+
preventAndStop(event) {
|
|
4888
|
+
event.preventDefault();
|
|
4889
|
+
event.stopPropagation();
|
|
4890
|
+
}
|
|
4891
|
+
getDataTransfer(event) {
|
|
4892
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
4893
|
+
return event.dataTransfer
|
|
4894
|
+
? event.dataTransfer
|
|
4895
|
+
: event.originalEvent.dataTransfer;
|
|
4896
|
+
}
|
|
4897
|
+
}
|
|
4898
|
+
BaoFileDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4899
|
+
BaoFileDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoFileDropDirective, selector: "[baoFileDrop]", outputs: { fileDrop: "fileDrop" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class.drag-over": "_isDragOver == true" } }, ngImport: i0 });
|
|
4900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropDirective, decorators: [{
|
|
4901
|
+
type: Directive,
|
|
4902
|
+
args: [{
|
|
4903
|
+
selector: '[baoFileDrop]',
|
|
4904
|
+
host: { '[class.drag-over]': '_isDragOver == true' }
|
|
4905
|
+
}]
|
|
4906
|
+
}], propDecorators: { fileDrop: [{
|
|
4907
|
+
type: Output
|
|
4908
|
+
}], onDragOver: [{
|
|
4909
|
+
type: HostListener,
|
|
4910
|
+
args: ['dragover', ['$event']]
|
|
4911
|
+
}], onDragLeave: [{
|
|
4912
|
+
type: HostListener,
|
|
4913
|
+
args: ['dragleave', ['$event']]
|
|
4914
|
+
}], onDrop: [{
|
|
4915
|
+
type: HostListener,
|
|
4916
|
+
args: ['drop', ['$event']]
|
|
4917
|
+
}] } });
|
|
4918
|
+
class BaoFileDropzoneIntructions {
|
|
4919
|
+
constructor(renderer, elementRef) {
|
|
4920
|
+
this.renderer = renderer;
|
|
4921
|
+
this.elementRef = elementRef;
|
|
4922
|
+
}
|
|
4923
|
+
get nativeElement() {
|
|
4924
|
+
return this.elementRef.nativeElement;
|
|
4925
|
+
}
|
|
4926
|
+
ngAfterContentInit() {
|
|
4927
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-hidden', 'true');
|
|
4928
|
+
}
|
|
4929
|
+
}
|
|
4930
|
+
BaoFileDropzoneIntructions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropzoneIntructions, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4931
|
+
BaoFileDropzoneIntructions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoFileDropzoneIntructions, selector: "bao-file-dropzone-instructions, [bao-file-dropzone-instructions]", host: { classAttribute: "bao-file-dropzone-instructions" }, ngImport: i0 });
|
|
4932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropzoneIntructions, decorators: [{
|
|
4933
|
+
type: Directive,
|
|
4934
|
+
args: [{
|
|
4935
|
+
selector: 'bao-file-dropzone-instructions, [bao-file-dropzone-instructions]',
|
|
4936
|
+
host: {
|
|
4937
|
+
class: 'bao-file-dropzone-instructions'
|
|
4938
|
+
}
|
|
4939
|
+
}]
|
|
4940
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4941
|
+
|
|
4942
|
+
/*
|
|
4943
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4539
4944
|
* Licensed under the MIT license.
|
|
4540
4945
|
* See LICENSE file in the project root for full license information.
|
|
4541
4946
|
*/
|
|
4947
|
+
const FILE_DIRECTIVES = [
|
|
4948
|
+
BaoFileInputComponent,
|
|
4949
|
+
BaoFileDropzoneIntructions,
|
|
4950
|
+
BaoFileDropDirective,
|
|
4951
|
+
BaoFilePreviewComponent
|
|
4952
|
+
];
|
|
4953
|
+
class BaoFileModule {
|
|
4954
|
+
}
|
|
4955
|
+
BaoFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4956
|
+
BaoFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, declarations: [BaoFileInputComponent,
|
|
4957
|
+
BaoFileDropzoneIntructions,
|
|
4958
|
+
BaoFileDropDirective,
|
|
4959
|
+
BaoFilePreviewComponent], imports: [CommonModule,
|
|
4960
|
+
BaoDropdownMenuModule,
|
|
4961
|
+
BaoCommonComponentsModule,
|
|
4962
|
+
BaoIconModule,
|
|
4963
|
+
BaoButtonModule], exports: [BaoFileInputComponent,
|
|
4964
|
+
BaoFileDropzoneIntructions,
|
|
4965
|
+
BaoFileDropDirective,
|
|
4966
|
+
BaoFilePreviewComponent] });
|
|
4967
|
+
BaoFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, providers: [BAO_FILE_INTL_PROVIDER], imports: [[
|
|
4968
|
+
CommonModule,
|
|
4969
|
+
BaoDropdownMenuModule,
|
|
4970
|
+
BaoCommonComponentsModule,
|
|
4971
|
+
BaoIconModule,
|
|
4972
|
+
BaoButtonModule
|
|
4973
|
+
]] });
|
|
4974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, decorators: [{
|
|
4975
|
+
type: NgModule,
|
|
4976
|
+
args: [{
|
|
4977
|
+
imports: [
|
|
4978
|
+
CommonModule,
|
|
4979
|
+
BaoDropdownMenuModule,
|
|
4980
|
+
BaoCommonComponentsModule,
|
|
4981
|
+
BaoIconModule,
|
|
4982
|
+
BaoButtonModule
|
|
4983
|
+
],
|
|
4984
|
+
declarations: [FILE_DIRECTIVES],
|
|
4985
|
+
exports: [FILE_DIRECTIVES],
|
|
4986
|
+
providers: [BAO_FILE_INTL_PROVIDER]
|
|
4987
|
+
}]
|
|
4988
|
+
}] });
|
|
4542
4989
|
|
|
4543
4990
|
/*
|
|
4544
|
-
* Copyright (c)
|
|
4991
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4545
4992
|
* Licensed under the MIT license.
|
|
4546
4993
|
* See LICENSE file in the project root for full license information.
|
|
4547
4994
|
*/
|
|
@@ -4552,7 +4999,8 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
|
4552
4999
|
BaoButtonModule,
|
|
4553
5000
|
BaoAlertModule,
|
|
4554
5001
|
BaoCardModule,
|
|
4555
|
-
BaoBreadcrumbModule
|
|
5002
|
+
BaoBreadcrumbModule,
|
|
5003
|
+
BaoModalModule], exports: [BaoIconModule,
|
|
4556
5004
|
BaoButtonModule,
|
|
4557
5005
|
BaoAlertModule,
|
|
4558
5006
|
BaoBreadcrumbModule,
|
|
@@ -4568,7 +5016,8 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
|
4568
5016
|
BaoTabsModule,
|
|
4569
5017
|
BaoModalModule,
|
|
4570
5018
|
BaoHyperlinkModule,
|
|
4571
|
-
BaoDropdownMenuModule
|
|
5019
|
+
BaoDropdownMenuModule,
|
|
5020
|
+
BaoFileModule
|
|
4572
5021
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4573
5022
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4574
5023
|
] });
|
|
@@ -4577,7 +5026,8 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
|
4577
5026
|
BaoButtonModule,
|
|
4578
5027
|
BaoAlertModule,
|
|
4579
5028
|
BaoCardModule,
|
|
4580
|
-
BaoBreadcrumbModule
|
|
5029
|
+
BaoBreadcrumbModule,
|
|
5030
|
+
BaoModalModule
|
|
4581
5031
|
], BaoIconModule,
|
|
4582
5032
|
BaoButtonModule,
|
|
4583
5033
|
BaoAlertModule,
|
|
@@ -4594,7 +5044,8 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
|
4594
5044
|
BaoTabsModule,
|
|
4595
5045
|
BaoModalModule,
|
|
4596
5046
|
BaoHyperlinkModule,
|
|
4597
|
-
BaoDropdownMenuModule
|
|
5047
|
+
BaoDropdownMenuModule,
|
|
5048
|
+
BaoFileModule
|
|
4598
5049
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4599
5050
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4600
5051
|
] });
|
|
@@ -4606,7 +5057,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4606
5057
|
BaoButtonModule,
|
|
4607
5058
|
BaoAlertModule,
|
|
4608
5059
|
BaoCardModule,
|
|
4609
|
-
BaoBreadcrumbModule
|
|
5060
|
+
BaoBreadcrumbModule,
|
|
5061
|
+
BaoModalModule
|
|
4610
5062
|
],
|
|
4611
5063
|
exports: [
|
|
4612
5064
|
BaoIconModule,
|
|
@@ -4625,7 +5077,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4625
5077
|
BaoTabsModule,
|
|
4626
5078
|
BaoModalModule,
|
|
4627
5079
|
BaoHyperlinkModule,
|
|
4628
|
-
BaoDropdownMenuModule
|
|
5080
|
+
BaoDropdownMenuModule,
|
|
5081
|
+
BaoFileModule
|
|
4629
5082
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4630
5083
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4631
5084
|
]
|
|
@@ -4633,7 +5086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4633
5086
|
}] });
|
|
4634
5087
|
|
|
4635
5088
|
/*
|
|
4636
|
-
* Copyright (c)
|
|
5089
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4637
5090
|
* Licensed under the MIT license.
|
|
4638
5091
|
* See LICENSE file in the project root for full license information.
|
|
4639
5092
|
*/
|
|
@@ -4658,7 +5111,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4658
5111
|
}] } });
|
|
4659
5112
|
|
|
4660
5113
|
/*
|
|
4661
|
-
* Copyright (c)
|
|
5114
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4662
5115
|
* Licensed under the MIT license.
|
|
4663
5116
|
* See LICENSE file in the project root for full license information.
|
|
4664
5117
|
*/
|
|
@@ -4678,25 +5131,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4678
5131
|
}] });
|
|
4679
5132
|
|
|
4680
5133
|
/*
|
|
4681
|
-
* Copyright (c)
|
|
5134
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
5135
|
+
* Licensed under the MIT license.
|
|
5136
|
+
* See LICENSE file in the project root for full license information.
|
|
5137
|
+
*/
|
|
5138
|
+
|
|
5139
|
+
/*
|
|
5140
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4682
5141
|
* Licensed under the MIT license.
|
|
4683
5142
|
* See LICENSE file in the project root for full license information.
|
|
4684
5143
|
*/
|
|
4685
5144
|
|
|
4686
5145
|
/*
|
|
4687
|
-
* Copyright (c)
|
|
5146
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4688
5147
|
* Licensed under the MIT license.
|
|
4689
5148
|
* See LICENSE file in the project root for full license information.
|
|
4690
5149
|
*/
|
|
4691
5150
|
|
|
4692
5151
|
/*
|
|
4693
|
-
* Copyright (c)
|
|
5152
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4694
5153
|
* Licensed under the MIT license.
|
|
4695
5154
|
* See LICENSE file in the project root for full license information.
|
|
4696
5155
|
*/
|
|
4697
5156
|
|
|
4698
5157
|
/*
|
|
4699
|
-
* Copyright (c)
|
|
5158
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4700
5159
|
* Licensed under the MIT license.
|
|
4701
5160
|
* See LICENSE file in the project root for full license information.
|
|
4702
5161
|
*/
|
|
@@ -4705,5 +5164,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4705
5164
|
* Generated bundle index. Do not edit.
|
|
4706
5165
|
*/
|
|
4707
5166
|
|
|
4708
|
-
export { BAO_MODAL_DATA, BAO_RADIO_GROUP, BaoAlertActions, BaoAlertComponent, BaoAlertContent, BaoAlertLink, BaoAlertModule, BaoAlertTitle, BaoAvatarComponent, BaoAvatarContent, BaoAvatarModule, BaoBadgeComponent, BaoBadgeModule, BaoBreadcrumbComponent, BaoBreadcrumbModule, BaoButtonComponent, BaoButtonModule, BaoCardComponent, BaoCardContent, BaoCardHeader, BaoCardModule, BaoCardTextInterface, BaoCardTitle, BaoCheckBoxDescription, BaoCheckboxComponent, BaoCheckboxGroupComponent, BaoCheckboxModule, BaoCommonComponentsModule, BaoDropdownMenuComponent, BaoDropdownMenuDivider, BaoDropdownMenuItem, BaoDropdownMenuItemDescription, BaoDropdownMenuItemLabel, BaoDropdownMenuModule, BaoDropdownMenuSection, BaoDropdownMenuTrigger, BaoErrorTextComponent, BaoGuidingTextComponent, BaoHeaderInfoComponent, BaoHeaderInfoContent, BaoHeaderInfoModule, BaoHeaderInfoSubtitle, BaoHeaderInfoSurtitle, BaoHeaderInfoTitle, BaoHeaderInfoTitleGroupComponent, BaoHyperlinkComponent, BaoHyperlinkModule, BaoIconComponent, BaoIconModule, BaoLabelTextComponent, BaoList, BaoListItem, BaoListItemDescription, BaoListItemTitle, BaoListModule, BaoListSummary, BaoListSummaryItem, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
5167
|
+
export { BAO_FILE_INTL_PROVIDER, BAO_FILE_INTL_PROVIDER_FACTORY, BAO_MODAL_DATA, BAO_RADIO_GROUP, BaoAlertActions, BaoAlertComponent, BaoAlertContent, BaoAlertLink, BaoAlertModule, BaoAlertTitle, BaoAvatarComponent, BaoAvatarContent, BaoAvatarModule, BaoBadgeComponent, BaoBadgeModule, BaoBreadcrumbComponent, BaoBreadcrumbModule, BaoButtonComponent, BaoButtonModule, BaoCardComponent, BaoCardContent, BaoCardHeader, BaoCardModule, BaoCardTextInterface, BaoCardTitle, BaoCheckBoxDescription, BaoCheckboxComponent, BaoCheckboxGroupComponent, BaoCheckboxModule, BaoCommonComponentsModule, BaoDropdownMenuComponent, BaoDropdownMenuDivider, BaoDropdownMenuItem, BaoDropdownMenuItemDescription, BaoDropdownMenuItemLabel, BaoDropdownMenuModule, BaoDropdownMenuSection, BaoDropdownMenuTrigger, BaoErrorTextComponent, BaoFileDropDirective, BaoFileDropzoneIntructions, BaoFileInputComponent, BaoFileIntl, BaoFileIntlEnglish, BaoFileModule, BaoFilePreviewComponent, BaoGuidingTextComponent, BaoHeaderInfoComponent, BaoHeaderInfoContent, BaoHeaderInfoModule, BaoHeaderInfoSubtitle, BaoHeaderInfoSurtitle, BaoHeaderInfoTitle, BaoHeaderInfoTitleGroupComponent, BaoHyperlinkComponent, BaoHyperlinkModule, BaoIconComponent, BaoIconModule, BaoLabelTextComponent, BaoList, BaoListItem, BaoListItemDescription, BaoListItemTitle, BaoListModule, BaoListSummary, BaoListSummaryItem, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
4709
5168
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|