@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,11 +13,9 @@ 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 { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
18
|
-
import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
|
|
19
18
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
20
|
-
import { ANIMATION_MODULE_TYPE, BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
21
19
|
|
|
22
20
|
function baoColorToHex(baoColor) {
|
|
23
21
|
switch (baoColor) {
|
|
@@ -45,7 +43,7 @@ function baoColorToHex(baoColor) {
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
/*
|
|
48
|
-
* Copyright (c)
|
|
46
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
49
47
|
* Licensed under the MIT license.
|
|
50
48
|
* See LICENSE file in the project root for full license information.
|
|
51
49
|
*/
|
|
@@ -62,6 +60,7 @@ const ICONS_DCT = {
|
|
|
62
60
|
'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'/>",
|
|
63
61
|
'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'/>",
|
|
64
62
|
'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'/>",
|
|
63
|
+
'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' />",
|
|
65
64
|
'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'/>",
|
|
66
65
|
'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'/>",
|
|
67
66
|
'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'/>",
|
|
@@ -169,7 +168,7 @@ const ICONS_DCT = {
|
|
|
169
168
|
};
|
|
170
169
|
|
|
171
170
|
/*
|
|
172
|
-
* Copyright (c)
|
|
171
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
173
172
|
* Licensed under the MIT license.
|
|
174
173
|
* See LICENSE file in the project root for full license information.
|
|
175
174
|
*/
|
|
@@ -208,7 +207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
208
207
|
}] }, { type: i1.DomSanitizer }]; } });
|
|
209
208
|
|
|
210
209
|
/*
|
|
211
|
-
* Copyright (c)
|
|
210
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
212
211
|
* Licensed under the MIT license.
|
|
213
212
|
* See LICENSE file in the project root for full license information.
|
|
214
213
|
*/
|
|
@@ -360,7 +359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
360
359
|
}] } });
|
|
361
360
|
|
|
362
361
|
/*
|
|
363
|
-
* Copyright (c)
|
|
362
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
364
363
|
* Licensed under the MIT license.
|
|
365
364
|
* See LICENSE file in the project root for full license information.
|
|
366
365
|
*/
|
|
@@ -380,7 +379,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
380
379
|
}] });
|
|
381
380
|
|
|
382
381
|
/*
|
|
383
|
-
* Copyright (c)
|
|
382
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
384
383
|
* Licensed under the MIT license.
|
|
385
384
|
* See LICENSE file in the project root for full license information.
|
|
386
385
|
*/
|
|
@@ -476,7 +475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
476
475
|
}] } });
|
|
477
476
|
|
|
478
477
|
/*
|
|
479
|
-
* Copyright (c)
|
|
478
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
480
479
|
* Licensed under the MIT license.
|
|
481
480
|
* See LICENSE file in the project root for full license information.
|
|
482
481
|
*/
|
|
@@ -496,7 +495,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
496
495
|
}] });
|
|
497
496
|
|
|
498
497
|
/*
|
|
499
|
-
* Copyright (c)
|
|
498
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
500
499
|
* Licensed under the MIT license.
|
|
501
500
|
* See LICENSE file in the project root for full license information.
|
|
502
501
|
*/
|
|
@@ -653,7 +652,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
653
652
|
}] } });
|
|
654
653
|
|
|
655
654
|
/*
|
|
656
|
-
* Copyright (c)
|
|
655
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
657
656
|
* Licensed under the MIT license.
|
|
658
657
|
* See LICENSE file in the project root for full license information.
|
|
659
658
|
*/
|
|
@@ -688,13 +687,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
688
687
|
}] });
|
|
689
688
|
|
|
690
689
|
/*
|
|
691
|
-
* Copyright (c)
|
|
690
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
692
691
|
* Licensed under the MIT license.
|
|
693
692
|
* See LICENSE file in the project root for full license information.
|
|
694
693
|
*/
|
|
695
694
|
|
|
696
695
|
/*
|
|
697
|
-
* Copyright (c)
|
|
696
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
698
697
|
* Licensed under the MIT license.
|
|
699
698
|
* See LICENSE file in the project root for full license information.
|
|
700
699
|
*/
|
|
@@ -727,7 +726,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
727
726
|
}] } });
|
|
728
727
|
|
|
729
728
|
/*
|
|
730
|
-
* Copyright (c)
|
|
729
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
731
730
|
* Licensed under the MIT license.
|
|
732
731
|
* See LICENSE file in the project root for full license information.
|
|
733
732
|
*/
|
|
@@ -747,19 +746,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
747
746
|
}] });
|
|
748
747
|
|
|
749
748
|
/*
|
|
750
|
-
* Copyright (c)
|
|
749
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
751
750
|
* Licensed under the MIT license.
|
|
752
751
|
* See LICENSE file in the project root for full license information.
|
|
753
752
|
*/
|
|
754
753
|
|
|
755
754
|
/*
|
|
756
|
-
* Copyright (c)
|
|
755
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
757
756
|
* Licensed under the MIT license.
|
|
758
757
|
* See LICENSE file in the project root for full license information.
|
|
759
758
|
*/
|
|
760
759
|
|
|
761
760
|
/*
|
|
762
|
-
* Copyright (c)
|
|
761
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
763
762
|
* Licensed under the MIT license.
|
|
764
763
|
* See LICENSE file in the project root for full license information.
|
|
765
764
|
*/
|
|
@@ -851,7 +850,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
851
850
|
}] });
|
|
852
851
|
|
|
853
852
|
/*
|
|
854
|
-
* Copyright (c)
|
|
853
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
855
854
|
* Licensed under the MIT license.
|
|
856
855
|
* See LICENSE file in the project root for full license information.
|
|
857
856
|
*/
|
|
@@ -885,13 +884,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
885
884
|
}] });
|
|
886
885
|
|
|
887
886
|
/*
|
|
888
|
-
* Copyright (c)
|
|
887
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
889
888
|
* Licensed under the MIT license.
|
|
890
889
|
* See LICENSE file in the project root for full license information.
|
|
891
890
|
*/
|
|
892
891
|
|
|
893
892
|
/*
|
|
894
|
-
* Copyright (c)
|
|
893
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
895
894
|
* Licensed under the MIT license.
|
|
896
895
|
* See LICENSE file in the project root for full license information.
|
|
897
896
|
*/
|
|
@@ -905,7 +904,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
905
904
|
}] });
|
|
906
905
|
|
|
907
906
|
/*
|
|
908
|
-
* Copyright (c)
|
|
907
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
909
908
|
* Licensed under the MIT license.
|
|
910
909
|
* See LICENSE file in the project root for full license information.
|
|
911
910
|
*/
|
|
@@ -919,7 +918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
919
918
|
}] });
|
|
920
919
|
|
|
921
920
|
/*
|
|
922
|
-
* Copyright (c)
|
|
921
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
923
922
|
* Licensed under the MIT license.
|
|
924
923
|
* See LICENSE file in the project root for full license information.
|
|
925
924
|
*/
|
|
@@ -929,16 +928,16 @@ class BaoLabelTextComponent {
|
|
|
929
928
|
}
|
|
930
929
|
}
|
|
931
930
|
BaoLabelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoLabelTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
932
|
-
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: '<
|
|
931
|
+
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 });
|
|
933
932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoLabelTextComponent, decorators: [{
|
|
934
933
|
type: Component,
|
|
935
|
-
args: [{ selector: 'bao-label, [bao-label]', encapsulation: ViewEncapsulation.None, template: '<
|
|
934
|
+
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"] }]
|
|
936
935
|
}], propDecorators: { required: [{
|
|
937
936
|
type: Input
|
|
938
937
|
}] } });
|
|
939
938
|
|
|
940
939
|
/*
|
|
941
|
-
* Copyright (c)
|
|
940
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
942
941
|
* Licensed under the MIT license.
|
|
943
942
|
* See LICENSE file in the project root for full license information.
|
|
944
943
|
*/
|
|
@@ -952,13 +951,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
952
951
|
}] });
|
|
953
952
|
|
|
954
953
|
/*
|
|
955
|
-
* Copyright (c)
|
|
956
|
-
* Licensed under the MIT license.
|
|
957
|
-
* See LICENSE file in the project root for full license information.
|
|
958
|
-
*/
|
|
959
|
-
|
|
960
|
-
/*
|
|
961
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
954
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
962
955
|
* Licensed under the MIT license.
|
|
963
956
|
* See LICENSE file in the project root for full license information.
|
|
964
957
|
*/
|
|
@@ -989,7 +982,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
989
982
|
}] });
|
|
990
983
|
|
|
991
984
|
/*
|
|
992
|
-
* Copyright (c)
|
|
985
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
993
986
|
* Licensed under the MIT license.
|
|
994
987
|
* See LICENSE file in the project root for full license information.
|
|
995
988
|
*/
|
|
@@ -1344,7 +1337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1344
1337
|
}] });
|
|
1345
1338
|
|
|
1346
1339
|
/*
|
|
1347
|
-
* Copyright (c)
|
|
1340
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1348
1341
|
* Licensed under the MIT license.
|
|
1349
1342
|
* See LICENSE file in the project root for full license information.
|
|
1350
1343
|
*/
|
|
@@ -1372,13 +1365,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1372
1365
|
}] });
|
|
1373
1366
|
|
|
1374
1367
|
/*
|
|
1375
|
-
* Copyright (c)
|
|
1368
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1369
|
+
* Licensed under the MIT license.
|
|
1370
|
+
* See LICENSE file in the project root for full license information.
|
|
1371
|
+
*/
|
|
1372
|
+
|
|
1373
|
+
/*
|
|
1374
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1376
1375
|
* Licensed under the MIT license.
|
|
1377
1376
|
* See LICENSE file in the project root for full license information.
|
|
1378
1377
|
*/
|
|
1379
1378
|
|
|
1380
1379
|
/*
|
|
1381
|
-
* Copyright (c)
|
|
1380
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1382
1381
|
* Licensed under the MIT license.
|
|
1383
1382
|
* See LICENSE file in the project root for full license information.
|
|
1384
1383
|
*/
|
|
@@ -1479,7 +1478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1479
1478
|
}] });
|
|
1480
1479
|
|
|
1481
1480
|
/*
|
|
1482
|
-
* Copyright (c)
|
|
1481
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1483
1482
|
* Licensed under the MIT license.
|
|
1484
1483
|
* See LICENSE file in the project root for full license information.
|
|
1485
1484
|
*/
|
|
@@ -1516,19 +1515,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1516
1515
|
}] });
|
|
1517
1516
|
|
|
1518
1517
|
/*
|
|
1519
|
-
* Copyright (c)
|
|
1518
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1520
1519
|
* Licensed under the MIT license.
|
|
1521
1520
|
* See LICENSE file in the project root for full license information.
|
|
1522
1521
|
*/
|
|
1523
1522
|
|
|
1524
1523
|
/*
|
|
1525
|
-
* Copyright (c)
|
|
1524
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1526
1525
|
* Licensed under the MIT license.
|
|
1527
1526
|
* See LICENSE file in the project root for full license information.
|
|
1528
1527
|
*/
|
|
1529
1528
|
|
|
1530
1529
|
/*
|
|
1531
|
-
* Copyright (c)
|
|
1530
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1532
1531
|
* Licensed under the MIT license.
|
|
1533
1532
|
* See LICENSE file in the project root for full license information.
|
|
1534
1533
|
*/
|
|
@@ -1599,7 +1598,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1599
1598
|
}] });
|
|
1600
1599
|
|
|
1601
1600
|
/*
|
|
1602
|
-
* Copyright (c)
|
|
1601
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1603
1602
|
* Licensed under the MIT license.
|
|
1604
1603
|
* See LICENSE file in the project root for full license information.
|
|
1605
1604
|
*/
|
|
@@ -1633,13 +1632,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1633
1632
|
}] });
|
|
1634
1633
|
|
|
1635
1634
|
/*
|
|
1636
|
-
* Copyright (c)
|
|
1635
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1637
1636
|
* Licensed under the MIT license.
|
|
1638
1637
|
* See LICENSE file in the project root for full license information.
|
|
1639
1638
|
*/
|
|
1640
1639
|
|
|
1641
1640
|
/*
|
|
1642
|
-
* Copyright (c)
|
|
1641
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
1643
1642
|
* Licensed under the MIT license.
|
|
1644
1643
|
* See LICENSE file in the project root for full license information.
|
|
1645
1644
|
*/
|
|
@@ -2165,7 +2164,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2165
2164
|
}] });
|
|
2166
2165
|
|
|
2167
2166
|
/*
|
|
2168
|
-
* Copyright (c)
|
|
2167
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2169
2168
|
* Licensed under the MIT license.
|
|
2170
2169
|
* See LICENSE file in the project root for full license information.
|
|
2171
2170
|
*/
|
|
@@ -2212,13 +2211,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2212
2211
|
}] });
|
|
2213
2212
|
|
|
2214
2213
|
/*
|
|
2215
|
-
* Copyright (c)
|
|
2214
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2216
2215
|
* Licensed under the MIT license.
|
|
2217
2216
|
* See LICENSE file in the project root for full license information.
|
|
2218
2217
|
*/
|
|
2219
2218
|
|
|
2220
2219
|
/*
|
|
2221
|
-
* Copyright (c)
|
|
2220
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2222
2221
|
* Licensed under the MIT license.
|
|
2223
2222
|
* See LICENSE file in the project root for full license information.
|
|
2224
2223
|
*/
|
|
@@ -2291,7 +2290,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2291
2290
|
}] } });
|
|
2292
2291
|
|
|
2293
2292
|
/*
|
|
2294
|
-
* Copyright (c)
|
|
2293
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2295
2294
|
* Licensed under the MIT license.
|
|
2296
2295
|
* See LICENSE file in the project root for full license information.
|
|
2297
2296
|
*/
|
|
@@ -2311,13 +2310,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2311
2310
|
}] });
|
|
2312
2311
|
|
|
2313
2312
|
/*
|
|
2314
|
-
* Copyright (c)
|
|
2313
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2315
2314
|
* Licensed under the MIT license.
|
|
2316
2315
|
* See LICENSE file in the project root for full license information.
|
|
2317
2316
|
*/
|
|
2318
2317
|
|
|
2319
2318
|
/*
|
|
2320
|
-
* Copyright (c)
|
|
2319
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2321
2320
|
* Licensed under the MIT license.
|
|
2322
2321
|
* See LICENSE file in the project root for full license information.
|
|
2323
2322
|
*/
|
|
@@ -2408,7 +2407,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2408
2407
|
}] });
|
|
2409
2408
|
|
|
2410
2409
|
/*
|
|
2411
|
-
* Copyright (c)
|
|
2410
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2412
2411
|
* Licensed under the MIT license.
|
|
2413
2412
|
* See LICENSE file in the project root for full license information.
|
|
2414
2413
|
*/
|
|
@@ -2443,7 +2442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2443
2442
|
}] });
|
|
2444
2443
|
|
|
2445
2444
|
/*
|
|
2446
|
-
* Copyright (c)
|
|
2445
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2447
2446
|
* Licensed under the MIT license.
|
|
2448
2447
|
* See LICENSE file in the project root for full license information.
|
|
2449
2448
|
*/
|
|
@@ -2474,13 +2473,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2474
2473
|
}] });
|
|
2475
2474
|
|
|
2476
2475
|
/*
|
|
2477
|
-
* Copyright (c)
|
|
2476
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2478
2477
|
* Licensed under the MIT license.
|
|
2479
2478
|
* See LICENSE file in the project root for full license information.
|
|
2480
2479
|
*/
|
|
2481
2480
|
|
|
2482
2481
|
/*
|
|
2483
|
-
* Copyright (c)
|
|
2482
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2484
2483
|
* Licensed under the MIT license.
|
|
2485
2484
|
* See LICENSE file in the project root for full license information.
|
|
2486
2485
|
*/
|
|
@@ -2580,7 +2579,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2580
2579
|
}] } });
|
|
2581
2580
|
|
|
2582
2581
|
/*
|
|
2583
|
-
* Copyright (c)
|
|
2582
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2584
2583
|
* Licensed under the MIT license.
|
|
2585
2584
|
* See LICENSE file in the project root for full license information.
|
|
2586
2585
|
*/
|
|
@@ -2600,13 +2599,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2600
2599
|
}] });
|
|
2601
2600
|
|
|
2602
2601
|
/*
|
|
2603
|
-
* Copyright (c)
|
|
2602
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2604
2603
|
* Licensed under the MIT license.
|
|
2605
2604
|
* See LICENSE file in the project root for full license information.
|
|
2606
2605
|
*/
|
|
2607
2606
|
|
|
2608
2607
|
/*
|
|
2609
|
-
* Copyright (c)
|
|
2608
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2610
2609
|
* Licensed under the MIT license.
|
|
2611
2610
|
* See LICENSE file in the project root for full license information.
|
|
2612
2611
|
*/
|
|
@@ -2899,7 +2898,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2899
2898
|
}] } });
|
|
2900
2899
|
|
|
2901
2900
|
/*
|
|
2902
|
-
* Copyright (c)
|
|
2901
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2903
2902
|
* Licensed under the MIT license.
|
|
2904
2903
|
* See LICENSE file in the project root for full license information.
|
|
2905
2904
|
*/
|
|
@@ -2930,41 +2929,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2930
2929
|
}] });
|
|
2931
2930
|
|
|
2932
2931
|
/*
|
|
2933
|
-
* Copyright (c)
|
|
2932
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2934
2933
|
* Licensed under the MIT license.
|
|
2935
2934
|
* See LICENSE file in the project root for full license information.
|
|
2936
2935
|
*/
|
|
2937
2936
|
|
|
2938
2937
|
/*
|
|
2939
|
-
* Copyright (c)
|
|
2940
|
-
* Licensed under the MIT license.
|
|
2941
|
-
* See LICENSE file in the project root for full license information.
|
|
2942
|
-
*/
|
|
2943
|
-
/**
|
|
2944
|
-
* Animations used by MatDialog.
|
|
2945
|
-
* @docs-private
|
|
2946
|
-
*/
|
|
2947
|
-
const baoModalAnimations = {
|
|
2948
|
-
/** Animation that is applied on the modal container by default. */
|
|
2949
|
-
modalContainer: trigger('modalContainer', [
|
|
2950
|
-
// Note: The `enter` animation transitions to `transform: none`, because for some reason
|
|
2951
|
-
// specifying the transform explicitly, causes IE both to blur the modal content and
|
|
2952
|
-
// decimate the animation performance. Leaving it as `none` solves both issues.
|
|
2953
|
-
state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
|
|
2954
|
-
state('enter', style({ transform: 'none' })),
|
|
2955
|
-
transition('* => enter', group([
|
|
2956
|
-
animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
|
|
2957
|
-
query('@*', animateChild(), { optional: true })
|
|
2958
|
-
])),
|
|
2959
|
-
transition('* => void, * => exit', group([
|
|
2960
|
-
animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
|
|
2961
|
-
query('@*', animateChild(), { optional: true })
|
|
2962
|
-
]))
|
|
2963
|
-
])
|
|
2964
|
-
};
|
|
2965
|
-
|
|
2966
|
-
/*
|
|
2967
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2938
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
2968
2939
|
* Licensed under the MIT license.
|
|
2969
2940
|
* See LICENSE file in the project root for full license information.
|
|
2970
2941
|
*/
|
|
@@ -3226,39 +3197,29 @@ class BaoModalContainer extends _BaoModalContainerBase {
|
|
|
3226
3197
|
/** State of the modal animation. */
|
|
3227
3198
|
this._state = 'enter';
|
|
3228
3199
|
}
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
await this._trapFocus();
|
|
3233
|
-
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3234
|
-
}
|
|
3235
|
-
else if (toState === 'exit') {
|
|
3236
|
-
this._restoreFocus();
|
|
3237
|
-
this._animationStateChanged.next({ state: 'closed', totalTime });
|
|
3238
|
-
}
|
|
3239
|
-
}
|
|
3240
|
-
/** Callback, invoked when an animation on the host starts. */
|
|
3241
|
-
_onAnimationStart({ toState, totalTime }) {
|
|
3242
|
-
if (toState === 'enter') {
|
|
3243
|
-
this._animationStateChanged.next({ state: 'opening', totalTime });
|
|
3244
|
-
}
|
|
3245
|
-
else if (toState === 'exit' || toState === 'void') {
|
|
3246
|
-
this._animationStateChanged.next({ state: 'closing', totalTime });
|
|
3247
|
-
}
|
|
3200
|
+
_startOpenAnimation() {
|
|
3201
|
+
this._animationStateChanged.emit({ state: 'opening', totalTime: 20 });
|
|
3202
|
+
void Promise.resolve().then(() => this._finishDialogOpen());
|
|
3248
3203
|
}
|
|
3249
3204
|
/** Starts the modal exit animation. */
|
|
3250
3205
|
_startExitAnimation() {
|
|
3251
|
-
this.
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
this.
|
|
3206
|
+
this._animationStateChanged.emit({ state: 'closed', totalTime: 20 });
|
|
3207
|
+
}
|
|
3208
|
+
_finishDialogOpen() {
|
|
3209
|
+
this._openAnimationDone(20);
|
|
3210
|
+
}
|
|
3211
|
+
_openAnimationDone(totalTime) {
|
|
3212
|
+
if (this._config.delayFocusTrap) {
|
|
3213
|
+
void this._trapFocus();
|
|
3214
|
+
}
|
|
3215
|
+
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3255
3216
|
}
|
|
3256
3217
|
}
|
|
3257
3218
|
BaoModalContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3258
|
-
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" },
|
|
3219
|
+
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 });
|
|
3259
3220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3260
3221
|
type: Component,
|
|
3261
|
-
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default,
|
|
3222
|
+
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
3262
3223
|
class: 'bao-modal-container',
|
|
3263
3224
|
tabindex: '-1',
|
|
3264
3225
|
'aria-modal': 'true',
|
|
@@ -3266,10 +3227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3266
3227
|
'[attr.role]': '_config.role',
|
|
3267
3228
|
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3268
3229
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
3269
|
-
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3270
|
-
'[@modalContainer]': '_state',
|
|
3271
|
-
'(@modalContainer.start)': '_onAnimationStart($event)',
|
|
3272
|
-
'(@modalContainer.done)': '_onAnimationDone($event)'
|
|
3230
|
+
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3273
3231
|
}, 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"] }]
|
|
3274
3232
|
}] });
|
|
3275
3233
|
|
|
@@ -3362,6 +3320,9 @@ class BaoModalRef {
|
|
|
3362
3320
|
this._state = 1 /* CLOSING */;
|
|
3363
3321
|
this._containerInstance._startExitAnimation();
|
|
3364
3322
|
}
|
|
3323
|
+
startOpenAnimation() {
|
|
3324
|
+
this._containerInstance._startOpenAnimation();
|
|
3325
|
+
}
|
|
3365
3326
|
/**
|
|
3366
3327
|
* Gets an observable that is notified when the modal is finished opening.
|
|
3367
3328
|
*/
|
|
@@ -3467,14 +3428,14 @@ function _closeModalVia(ref, interactionType, result) {
|
|
|
3467
3428
|
}
|
|
3468
3429
|
|
|
3469
3430
|
/*
|
|
3470
|
-
* Copyright (c)
|
|
3431
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3471
3432
|
* Licensed under the MIT license.
|
|
3472
3433
|
* See LICENSE file in the project root for full license information.
|
|
3473
3434
|
*/
|
|
3474
3435
|
/** Injection token that can be used to access the data that was passed in to a modal. */
|
|
3475
3436
|
const BAO_MODAL_DATA = new InjectionToken('BaoModalData');
|
|
3476
3437
|
class BaoModalBase {
|
|
3477
|
-
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken
|
|
3438
|
+
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken) {
|
|
3478
3439
|
this._overlay = _overlay;
|
|
3479
3440
|
this._injector = _injector;
|
|
3480
3441
|
this._parentModal = _parentModal;
|
|
@@ -3482,7 +3443,6 @@ class BaoModalBase {
|
|
|
3482
3443
|
this._modalRefConstructor = _modalRefConstructor;
|
|
3483
3444
|
this._modalContainerType = _modalContainerType;
|
|
3484
3445
|
this._modalDataToken = _modalDataToken;
|
|
3485
|
-
this._animationMode = _animationMode;
|
|
3486
3446
|
this.afterAllClosed = defer(() => this.openModals.length
|
|
3487
3447
|
? this.getAfterAllClosed()
|
|
3488
3448
|
: this.getAfterAllClosed().pipe(startWith(undefined)));
|
|
@@ -3522,21 +3482,6 @@ class BaoModalBase {
|
|
|
3522
3482
|
}
|
|
3523
3483
|
const overlayRef = this._createOverlay(conf);
|
|
3524
3484
|
const modalContainer = this._attachModalContainer(overlayRef, conf);
|
|
3525
|
-
if (this._animationMode !== 'NoopAnimations') {
|
|
3526
|
-
const animationStateSubscription = modalContainer._animationStateChanged.subscribe(modalAnimationEvent => {
|
|
3527
|
-
if (modalAnimationEvent.state === 'opening') {
|
|
3528
|
-
this._modalAnimatingOpen = true;
|
|
3529
|
-
}
|
|
3530
|
-
if (modalAnimationEvent.state === 'opened') {
|
|
3531
|
-
this._modalAnimatingOpen = false;
|
|
3532
|
-
animationStateSubscription.unsubscribe();
|
|
3533
|
-
}
|
|
3534
|
-
});
|
|
3535
|
-
if (!this._animationStateSubscriptions) {
|
|
3536
|
-
this._animationStateSubscriptions = new Subscription();
|
|
3537
|
-
}
|
|
3538
|
-
this._animationStateSubscriptions.add(animationStateSubscription);
|
|
3539
|
-
}
|
|
3540
3485
|
const modalRef = this._attachModalContent(componentOrTemplateRef, modalContainer, overlayRef, conf);
|
|
3541
3486
|
this._lastModalRef = modalRef;
|
|
3542
3487
|
// If this is the first modal that we're opening, hide all the non-overlay content.
|
|
@@ -3607,6 +3552,7 @@ class BaoModalBase {
|
|
|
3607
3552
|
});
|
|
3608
3553
|
const containerPortal = new ComponentPortal(this._modalContainerType, config.viewContainerRef, injector);
|
|
3609
3554
|
const containerRef = overlay.attach(containerPortal);
|
|
3555
|
+
containerRef.instance._startOpenAnimation();
|
|
3610
3556
|
return containerRef.instance;
|
|
3611
3557
|
}
|
|
3612
3558
|
/**
|
|
@@ -3724,16 +3670,16 @@ BaoModalBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
|
|
|
3724
3670
|
BaoModalBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaoModalBase, ngImport: i0 });
|
|
3725
3671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalBase, decorators: [{
|
|
3726
3672
|
type: Directive
|
|
3727
|
-
}], 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 }
|
|
3673
|
+
}], 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 }]; } });
|
|
3728
3674
|
/**
|
|
3729
3675
|
* Service to open modal.
|
|
3730
3676
|
*/
|
|
3731
3677
|
class BaoModal extends BaoModalBase {
|
|
3732
|
-
constructor(overlay, injector, parentModal, overlayContainer
|
|
3733
|
-
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA
|
|
3678
|
+
constructor(overlay, injector, parentModal, overlayContainer) {
|
|
3679
|
+
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA);
|
|
3734
3680
|
}
|
|
3735
3681
|
}
|
|
3736
|
-
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 }
|
|
3682
|
+
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 });
|
|
3737
3683
|
BaoModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModal });
|
|
3738
3684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModal, decorators: [{
|
|
3739
3685
|
type: Injectable
|
|
@@ -3741,15 +3687,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3741
3687
|
type: Optional
|
|
3742
3688
|
}, {
|
|
3743
3689
|
type: SkipSelf
|
|
3744
|
-
}] }, { type: i1$4.OverlayContainer }
|
|
3745
|
-
type: Optional
|
|
3746
|
-
}, {
|
|
3747
|
-
type: Inject,
|
|
3748
|
-
args: [ANIMATION_MODULE_TYPE]
|
|
3749
|
-
}] }]; } });
|
|
3690
|
+
}] }, { type: i1$4.OverlayContainer }]; } });
|
|
3750
3691
|
|
|
3751
3692
|
/*
|
|
3752
|
-
* Copyright (c)
|
|
3693
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3753
3694
|
* Licensed under the MIT license.
|
|
3754
3695
|
* See LICENSE file in the project root for full license information.
|
|
3755
3696
|
*/
|
|
@@ -3828,7 +3769,7 @@ function getClosestDialog(element, openDialogs) {
|
|
|
3828
3769
|
}
|
|
3829
3770
|
|
|
3830
3771
|
/*
|
|
3831
|
-
* Copyright (c)
|
|
3772
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3832
3773
|
* Licensed under the MIT license.
|
|
3833
3774
|
* See LICENSE file in the project root for full license information.
|
|
3834
3775
|
*/
|
|
@@ -3836,28 +3777,12 @@ const MODAL_DIRECTIVES = [BaoModalContainer, BaoModalClose];
|
|
|
3836
3777
|
class BaoModalModule {
|
|
3837
3778
|
}
|
|
3838
3779
|
BaoModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3839
|
-
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule,
|
|
3840
|
-
|
|
3841
|
-
PortalModule,
|
|
3842
|
-
BrowserAnimationsModule,
|
|
3843
|
-
NoopAnimationsModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3844
|
-
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [[
|
|
3845
|
-
CommonModule,
|
|
3846
|
-
OverlayModule,
|
|
3847
|
-
PortalModule,
|
|
3848
|
-
BrowserAnimationsModule,
|
|
3849
|
-
NoopAnimationsModule
|
|
3850
|
-
]] });
|
|
3780
|
+
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] });
|
|
3781
|
+
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [[CommonModule, OverlayModule, PortalModule]] });
|
|
3851
3782
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoModalModule, decorators: [{
|
|
3852
3783
|
type: NgModule,
|
|
3853
3784
|
args: [{
|
|
3854
|
-
imports: [
|
|
3855
|
-
CommonModule,
|
|
3856
|
-
OverlayModule,
|
|
3857
|
-
PortalModule,
|
|
3858
|
-
BrowserAnimationsModule,
|
|
3859
|
-
NoopAnimationsModule
|
|
3860
|
-
],
|
|
3785
|
+
imports: [CommonModule, OverlayModule, PortalModule],
|
|
3861
3786
|
declarations: MODAL_DIRECTIVES,
|
|
3862
3787
|
exports: MODAL_DIRECTIVES,
|
|
3863
3788
|
providers: [BaoModal]
|
|
@@ -3865,7 +3790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3865
3790
|
}] });
|
|
3866
3791
|
|
|
3867
3792
|
/*
|
|
3868
|
-
* Copyright (c)
|
|
3793
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3869
3794
|
* Licensed under the MIT license.
|
|
3870
3795
|
* See LICENSE file in the project root for full license information.
|
|
3871
3796
|
*/
|
|
@@ -3938,7 +3863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3938
3863
|
}] } });
|
|
3939
3864
|
|
|
3940
3865
|
/*
|
|
3941
|
-
* Copyright (c)
|
|
3866
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3942
3867
|
* Licensed under the MIT license.
|
|
3943
3868
|
* See LICENSE file in the project root for full license information.
|
|
3944
3869
|
*/
|
|
@@ -3958,13 +3883,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3958
3883
|
}] });
|
|
3959
3884
|
|
|
3960
3885
|
/*
|
|
3961
|
-
* Copyright (c)
|
|
3886
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3962
3887
|
* Licensed under the MIT license.
|
|
3963
3888
|
* See LICENSE file in the project root for full license information.
|
|
3964
3889
|
*/
|
|
3965
3890
|
|
|
3966
3891
|
/*
|
|
3967
|
-
* Copyright (c)
|
|
3892
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
3968
3893
|
* Licensed under the MIT license.
|
|
3969
3894
|
* See LICENSE file in the project root for full license information.
|
|
3970
3895
|
*/
|
|
@@ -3981,6 +3906,10 @@ class BaoDropdownMenuItem {
|
|
|
3981
3906
|
* Is the list item disabled
|
|
3982
3907
|
*/
|
|
3983
3908
|
this.disabled = false;
|
|
3909
|
+
/**
|
|
3910
|
+
* Emits when menu item is clicked
|
|
3911
|
+
*/
|
|
3912
|
+
this.itemClicked = new EventEmitter();
|
|
3984
3913
|
}
|
|
3985
3914
|
get nativeElement() {
|
|
3986
3915
|
return this.elementRef.nativeElement;
|
|
@@ -4061,19 +3990,25 @@ class BaoDropdownMenuItem {
|
|
|
4061
3990
|
}
|
|
4062
3991
|
}
|
|
4063
3992
|
/**
|
|
4064
|
-
* This method propagates a click event to menu item children with inputs (checkbox, radio button)
|
|
3993
|
+
* This method propagates a click event to menu item children with inputs (checkbox, radio button).
|
|
3994
|
+
* It emits event to close menu if item does not contain an input.
|
|
4065
3995
|
*/
|
|
4066
3996
|
propagateClick() {
|
|
3997
|
+
let closeMenu = true;
|
|
4067
3998
|
for (let i = 0; i < this.nativeElement.children.length; i++) {
|
|
4068
3999
|
if (this.nativeElement.children.item(i).firstElementChild.localName ==
|
|
4069
4000
|
'input') {
|
|
4070
4001
|
this.nativeElement.children.item(i).firstElementChild.click();
|
|
4002
|
+
closeMenu = false;
|
|
4071
4003
|
}
|
|
4072
4004
|
}
|
|
4005
|
+
if (closeMenu) {
|
|
4006
|
+
this.itemClicked.emit();
|
|
4007
|
+
}
|
|
4073
4008
|
}
|
|
4074
4009
|
}
|
|
4075
4010
|
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 });
|
|
4076
|
-
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:
|
|
4011
|
+
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 });
|
|
4077
4012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoDropdownMenuItem, decorators: [{
|
|
4078
4013
|
type: Directive,
|
|
4079
4014
|
args: [{
|
|
@@ -4085,6 +4020,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4085
4020
|
}]
|
|
4086
4021
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: BaoDropdownMenuComponent }]; }, propDecorators: { disabled: [{
|
|
4087
4022
|
type: Input
|
|
4023
|
+
}], itemClicked: [{
|
|
4024
|
+
type: Output
|
|
4088
4025
|
}], spaceKeyEvent: [{
|
|
4089
4026
|
type: HostListener,
|
|
4090
4027
|
args: ['window:keyup.space']
|
|
@@ -4093,7 +4030,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4093
4030
|
args: ['click', ['$event.target']]
|
|
4094
4031
|
}], enterKeyEvent: [{
|
|
4095
4032
|
type: HostListener,
|
|
4096
|
-
args: ['window:
|
|
4033
|
+
args: ['window:keyup.enter']
|
|
4097
4034
|
}] } });
|
|
4098
4035
|
class BaoDropdownMenuComponent {
|
|
4099
4036
|
constructor(cdr, renderer, elementRef) {
|
|
@@ -4171,6 +4108,9 @@ class BaoDropdownMenuComponent {
|
|
|
4171
4108
|
this.renderer.setAttribute(this.nativeElement, 'id', this.menuId);
|
|
4172
4109
|
this._menuPortal = new DomPortal(this._menuContent);
|
|
4173
4110
|
}
|
|
4111
|
+
ngAfterContentInit() {
|
|
4112
|
+
this._listItems.forEach((item) => item.itemClicked.subscribe(() => this.isClosedByKeyEvent.emit()));
|
|
4113
|
+
}
|
|
4174
4114
|
focusFirstItem() {
|
|
4175
4115
|
this._activeItemIndex = 0;
|
|
4176
4116
|
this._listItems.first.nativeElement.focus();
|
|
@@ -4291,8 +4231,9 @@ class BaoDropdownMenuTrigger {
|
|
|
4291
4231
|
}
|
|
4292
4232
|
/** Enter key event triggers click event which opens menu,
|
|
4293
4233
|
* then focus is put on first item in the menu */
|
|
4294
|
-
enterKeyEvent() {
|
|
4234
|
+
enterKeyEvent(event) {
|
|
4295
4235
|
if (this._isMenuOpen && document.activeElement === this.nativeElement) {
|
|
4236
|
+
event.stopImmediatePropagation();
|
|
4296
4237
|
this.menu.focusFirstItem();
|
|
4297
4238
|
}
|
|
4298
4239
|
}
|
|
@@ -4362,6 +4303,13 @@ class BaoDropdownMenuTrigger {
|
|
|
4362
4303
|
originY: 'top',
|
|
4363
4304
|
overlayX: 'start',
|
|
4364
4305
|
overlayY: 'bottom'
|
|
4306
|
+
},
|
|
4307
|
+
{
|
|
4308
|
+
// top-right of the overlay is connected to bottom-left of the origin;
|
|
4309
|
+
originX: 'start',
|
|
4310
|
+
originY: 'bottom',
|
|
4311
|
+
overlayX: 'end',
|
|
4312
|
+
overlayY: 'top'
|
|
4365
4313
|
}
|
|
4366
4314
|
]),
|
|
4367
4315
|
backdropClass: 'bao-overlay-transparent-backdrop',
|
|
@@ -4371,7 +4319,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4371
4319
|
}
|
|
4372
4320
|
}
|
|
4373
4321
|
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 });
|
|
4374
|
-
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 });
|
|
4322
|
+
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 });
|
|
4375
4323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoDropdownMenuTrigger, decorators: [{
|
|
4376
4324
|
type: Directive,
|
|
4377
4325
|
args: [{
|
|
@@ -4386,7 +4334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4386
4334
|
args: ['window:keyup.escape']
|
|
4387
4335
|
}], enterKeyEvent: [{
|
|
4388
4336
|
type: HostListener,
|
|
4389
|
-
args: ['window:keyup.enter']
|
|
4337
|
+
args: ['window:keyup.enter', ['$event']]
|
|
4390
4338
|
}], onClick: [{
|
|
4391
4339
|
type: HostListener,
|
|
4392
4340
|
args: ['click']
|
|
@@ -4481,7 +4429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4481
4429
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4482
4430
|
|
|
4483
4431
|
/*
|
|
4484
|
-
* Copyright (c)
|
|
4432
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4485
4433
|
* Licensed under the MIT license.
|
|
4486
4434
|
* See LICENSE file in the project root for full license information.
|
|
4487
4435
|
*/
|
|
@@ -4521,13 +4469,514 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4521
4469
|
}] });
|
|
4522
4470
|
|
|
4523
4471
|
/*
|
|
4524
|
-
* Copyright (c)
|
|
4472
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4473
|
+
* Licensed under the MIT license.
|
|
4474
|
+
* See LICENSE file in the project root for full license information.
|
|
4475
|
+
*/
|
|
4476
|
+
|
|
4477
|
+
/*
|
|
4478
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4479
|
+
* Licensed under the MIT license.
|
|
4480
|
+
* See LICENSE file in the project root for full license information.
|
|
4481
|
+
*/
|
|
4482
|
+
const KILO_THRESHOLD = 1000;
|
|
4483
|
+
const MEGA_THRESHOLD = 1000000;
|
|
4484
|
+
class BaoFilePreviewComponent {
|
|
4485
|
+
constructor(elementRef, renderer) {
|
|
4486
|
+
this.elementRef = elementRef;
|
|
4487
|
+
this.renderer = renderer;
|
|
4488
|
+
/**
|
|
4489
|
+
* Is file loading
|
|
4490
|
+
*/
|
|
4491
|
+
this.isLoading = false;
|
|
4492
|
+
/**
|
|
4493
|
+
* True if projected content has no icon and file does not have a thumbnail.
|
|
4494
|
+
*/
|
|
4495
|
+
this.insertGenericIcon = false;
|
|
4496
|
+
this.thumbnailURL = '';
|
|
4497
|
+
}
|
|
4498
|
+
get nativeElement() {
|
|
4499
|
+
return this.elementRef.nativeElement;
|
|
4500
|
+
}
|
|
4501
|
+
get fileSize() {
|
|
4502
|
+
return this.formatSize(this.file.size);
|
|
4503
|
+
}
|
|
4504
|
+
ngAfterContentInit() {
|
|
4505
|
+
this.getThumbnail();
|
|
4506
|
+
this.setIcon();
|
|
4507
|
+
}
|
|
4508
|
+
setIcon() {
|
|
4509
|
+
// If no icon is in the projected content, generic icon is added
|
|
4510
|
+
const contentIcon = Array.from(this.nativeElement.children.item(0).children).find((el) => el.localName === 'bao-icon');
|
|
4511
|
+
if (!contentIcon) {
|
|
4512
|
+
this.insertGenericIcon = true;
|
|
4513
|
+
}
|
|
4514
|
+
else {
|
|
4515
|
+
this.renderer.addClass(contentIcon, 'bao-file-media');
|
|
4516
|
+
}
|
|
4517
|
+
}
|
|
4518
|
+
getThumbnail() {
|
|
4519
|
+
if (this.file &&
|
|
4520
|
+
(this.file.type === 'image/png' || this.file.type === 'image/jpeg')) {
|
|
4521
|
+
const reader = new FileReader();
|
|
4522
|
+
reader.onload = (event) => {
|
|
4523
|
+
this.thumbnailURL = event.target.result;
|
|
4524
|
+
};
|
|
4525
|
+
reader.onerror = () => {
|
|
4526
|
+
this.thumbnailURL = '';
|
|
4527
|
+
};
|
|
4528
|
+
reader.readAsDataURL(this.file);
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
formatSize(size) {
|
|
4532
|
+
if (size >= KILO_THRESHOLD && size / KILO_THRESHOLD < KILO_THRESHOLD) {
|
|
4533
|
+
return this.getSizeAndUnit(size, KILO_THRESHOLD, 'Ko');
|
|
4534
|
+
}
|
|
4535
|
+
const sizeDividedByKoMultiplicator = size / KILO_THRESHOLD;
|
|
4536
|
+
if (sizeDividedByKoMultiplicator >= KILO_THRESHOLD) {
|
|
4537
|
+
const toFixed = sizeDividedByKoMultiplicator > 10 ? 0 : 1;
|
|
4538
|
+
return this.getSizeAndUnit(size, MEGA_THRESHOLD, 'Mo', toFixed);
|
|
4539
|
+
}
|
|
4540
|
+
return `${size} octets`;
|
|
4541
|
+
}
|
|
4542
|
+
getSizeAndUnit(size, multiplicator, unit, toFixed = 0) {
|
|
4543
|
+
return `${(size / multiplicator).toFixed(toFixed)} ${unit}`;
|
|
4544
|
+
}
|
|
4545
|
+
}
|
|
4546
|
+
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 });
|
|
4547
|
+
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 });
|
|
4548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFilePreviewComponent, decorators: [{
|
|
4549
|
+
type: Component,
|
|
4550
|
+
args: [{ selector: 'bao-file-preview, [bao-file-preview]', encapsulation: ViewEncapsulation.None, host: {
|
|
4551
|
+
class: 'bao-file-preview'
|
|
4552
|
+
}, 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"] }]
|
|
4553
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { file: [{
|
|
4554
|
+
type: Input
|
|
4555
|
+
}], isLoading: [{
|
|
4556
|
+
type: Input
|
|
4557
|
+
}] } });
|
|
4558
|
+
|
|
4559
|
+
/*
|
|
4560
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4561
|
+
* Licensed under the MIT license.
|
|
4562
|
+
* See LICENSE file in the project root for full license information.
|
|
4563
|
+
*/
|
|
4564
|
+
/**
|
|
4565
|
+
* To modify the labels and text displayed, create a new instance of BaoFileIntl and
|
|
4566
|
+
* include it in a custom provider
|
|
4567
|
+
*/
|
|
4568
|
+
class BaoFileIntl {
|
|
4569
|
+
constructor() {
|
|
4570
|
+
/**
|
|
4571
|
+
* Stream to emit from when labels are changed. Use this to notify components when the labels have
|
|
4572
|
+
* changed after initialization.
|
|
4573
|
+
*/
|
|
4574
|
+
this.changes = new Subject();
|
|
4575
|
+
/** The label for button in dropzone */
|
|
4576
|
+
this.dropzoneButtonLabel = 'Parcourir';
|
|
4577
|
+
/** The default dropzone instructions */
|
|
4578
|
+
this.defaultDropzoneInstructions = 'ou déposer votre fichier ici';
|
|
4579
|
+
/** Error message displayed when uploaded file is too large */
|
|
4580
|
+
this.fileTooBigErrorMessage = 'La taille de ce fichier est trop grande';
|
|
4581
|
+
/** Error message displayed when uploaded file has an invalid type */
|
|
4582
|
+
this.invalidFileTypeErrorMessage = "Ce format de fichier n'est pas autorisé";
|
|
4583
|
+
}
|
|
4584
|
+
}
|
|
4585
|
+
BaoFileIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4586
|
+
BaoFileIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntl, providedIn: 'root' });
|
|
4587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntl, decorators: [{
|
|
4588
|
+
type: Injectable,
|
|
4589
|
+
args: [{ providedIn: 'root' }]
|
|
4590
|
+
}] });
|
|
4591
|
+
class BaoFileIntlEnglish extends BaoFileIntl {
|
|
4592
|
+
constructor() {
|
|
4593
|
+
super(...arguments);
|
|
4594
|
+
/** The label for button in dropzone */
|
|
4595
|
+
this.dropzoneButtonLabel = 'Browse';
|
|
4596
|
+
/** The default dropzone instructions */
|
|
4597
|
+
this.defaultDropzoneInstructions = 'or drop your file here';
|
|
4598
|
+
/** Error message displayed when uploaded file is too large */
|
|
4599
|
+
this.fileTooBigErrorMessage = 'The size of this file is too large';
|
|
4600
|
+
/** Error message displayed when uploaded file has an invalid type */
|
|
4601
|
+
this.invalidFileTypeErrorMessage = 'The format of this file is unauthorized';
|
|
4602
|
+
}
|
|
4603
|
+
}
|
|
4604
|
+
BaoFileIntlEnglish.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntlEnglish, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4605
|
+
BaoFileIntlEnglish.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntlEnglish });
|
|
4606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileIntlEnglish, decorators: [{
|
|
4607
|
+
type: Injectable
|
|
4608
|
+
}] });
|
|
4609
|
+
/** @docs-private */
|
|
4610
|
+
function BAO_FILE_INTL_PROVIDER_FACTORY(parentIntl) {
|
|
4611
|
+
return parentIntl || new BaoFileIntl();
|
|
4612
|
+
}
|
|
4613
|
+
/** @docs-private */
|
|
4614
|
+
const BAO_FILE_INTL_PROVIDER = {
|
|
4615
|
+
// If there is already an BaoFileIntl available, use that. Otherwise, provide a new one.
|
|
4616
|
+
provide: BaoFileIntl,
|
|
4617
|
+
deps: [[new Optional(), new SkipSelf(), BaoFileIntl]],
|
|
4618
|
+
useFactory: BAO_FILE_INTL_PROVIDER_FACTORY
|
|
4619
|
+
};
|
|
4620
|
+
|
|
4621
|
+
/*
|
|
4622
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4623
|
+
* Licensed under the MIT license.
|
|
4624
|
+
* See LICENSE file in the project root for full license information.
|
|
4625
|
+
*/
|
|
4626
|
+
/**
|
|
4627
|
+
* Unique number to generate a unique ID
|
|
4628
|
+
*/
|
|
4629
|
+
let fileInputUniqueId = 0;
|
|
4630
|
+
let fileTextUniqueId = 0;
|
|
4631
|
+
class BaoFileInputComponent {
|
|
4632
|
+
constructor(intl, elementRef, renderer, cdr) {
|
|
4633
|
+
this.intl = intl;
|
|
4634
|
+
this.elementRef = elementRef;
|
|
4635
|
+
this.renderer = renderer;
|
|
4636
|
+
this.cdr = cdr;
|
|
4637
|
+
/**
|
|
4638
|
+
* Size of the file input label
|
|
4639
|
+
*/
|
|
4640
|
+
this.size = 'medium';
|
|
4641
|
+
/**
|
|
4642
|
+
* Maximum size accepted for uploaded files
|
|
4643
|
+
*/
|
|
4644
|
+
this.maximalFileSize = -1;
|
|
4645
|
+
/**
|
|
4646
|
+
* Accepted types of files
|
|
4647
|
+
*/
|
|
4648
|
+
this.acceptedMIMETypes = [];
|
|
4649
|
+
/**
|
|
4650
|
+
* Is field required
|
|
4651
|
+
*/
|
|
4652
|
+
this.required = false;
|
|
4653
|
+
/**
|
|
4654
|
+
* Is field disabled
|
|
4655
|
+
*/
|
|
4656
|
+
this.disabled = false;
|
|
4657
|
+
/**
|
|
4658
|
+
* File selected to be uploaded
|
|
4659
|
+
*/
|
|
4660
|
+
this.uploadedFile = new EventEmitter();
|
|
4661
|
+
this.insertDefaultInstructions = false;
|
|
4662
|
+
this.isFileTooBig = false;
|
|
4663
|
+
this.isFileTypeInvalid = false;
|
|
4664
|
+
/**
|
|
4665
|
+
* Saves the registerOnChange function so the component can call it whenever it wants.
|
|
4666
|
+
*/
|
|
4667
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
4668
|
+
this.propagateChange = (_) => { };
|
|
4669
|
+
/**
|
|
4670
|
+
* Saves the registerOnTouched function so the component can call it whenever it wants.
|
|
4671
|
+
*/
|
|
4672
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4673
|
+
this.propagateTouched = () => { };
|
|
4674
|
+
this._intlChanges = intl.changes.subscribe(() => this.cdr.markForCheck());
|
|
4675
|
+
}
|
|
4676
|
+
get nativeElement() {
|
|
4677
|
+
return this.elementRef.nativeElement;
|
|
4678
|
+
}
|
|
4679
|
+
enterKeyEvent() {
|
|
4680
|
+
if (document.activeElement.id === this.inputId) {
|
|
4681
|
+
document.getElementById(this.inputId).click();
|
|
4682
|
+
}
|
|
4683
|
+
}
|
|
4684
|
+
tabKeyEvent() {
|
|
4685
|
+
if (document.activeElement.id === this.inputId) {
|
|
4686
|
+
this.renderer.addClass(this.dropzoneElement.nativeElement, 'dropzone-focus');
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
shiftTabKeyEvent() {
|
|
4690
|
+
if (document.activeElement.id === this.inputId) {
|
|
4691
|
+
this.renderer.addClass(this.dropzoneElement.nativeElement, 'dropzone-focus');
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4694
|
+
ngAfterContentInit() {
|
|
4695
|
+
this._errorForm.changes.subscribe(() => this.setErrorTextsAttribute());
|
|
4696
|
+
if (!this.inputId) {
|
|
4697
|
+
this.inputId = `file-input-${fileInputUniqueId++}`;
|
|
4698
|
+
}
|
|
4699
|
+
// If no content was added for dropzone instructions, add default text.
|
|
4700
|
+
const dropzoneElement = Array.from(this.nativeElement.children).find((el) => el.className === 'file-drop-zone');
|
|
4701
|
+
if (!Array.from(dropzoneElement.children).find(el => el.localName === 'bao-file-dropzone-instructions')) {
|
|
4702
|
+
this.insertDefaultInstructions = true;
|
|
4703
|
+
}
|
|
4704
|
+
this.setDescribedByAttribute();
|
|
4705
|
+
this._files.changes.subscribe((files) => {
|
|
4706
|
+
const filesList = files.map((el) => el.file);
|
|
4707
|
+
this.setValue(filesList);
|
|
4708
|
+
});
|
|
4709
|
+
}
|
|
4710
|
+
ngAfterViewInit() {
|
|
4711
|
+
this._errorTexts.changes.subscribe(() => this.setErrorTextsAttribute());
|
|
4712
|
+
}
|
|
4713
|
+
ngOnDestroy() {
|
|
4714
|
+
this._intlChanges.unsubscribe();
|
|
4715
|
+
}
|
|
4716
|
+
/**
|
|
4717
|
+
* Implements ControlValueAccessor interface
|
|
4718
|
+
*/
|
|
4719
|
+
writeValue(obj) {
|
|
4720
|
+
this._value = obj;
|
|
4721
|
+
}
|
|
4722
|
+
/**
|
|
4723
|
+
* Implements ControlValueAccessor interface
|
|
4724
|
+
*/
|
|
4725
|
+
registerOnChange(fn) {
|
|
4726
|
+
this.propagateChange = fn;
|
|
4727
|
+
}
|
|
4728
|
+
/**
|
|
4729
|
+
* Implements ControlValueAccessor interface
|
|
4730
|
+
*/
|
|
4731
|
+
registerOnTouched(fn) {
|
|
4732
|
+
this.propagateTouched = fn;
|
|
4733
|
+
}
|
|
4734
|
+
/**
|
|
4735
|
+
* Implements ControlValueAccessor interface
|
|
4736
|
+
*/
|
|
4737
|
+
setDisabledState(isDisabled) {
|
|
4738
|
+
this.disabled = isDisabled;
|
|
4739
|
+
}
|
|
4740
|
+
uploadFile(file) {
|
|
4741
|
+
if (!this.disabled) {
|
|
4742
|
+
this.isFileTypeInvalid = false;
|
|
4743
|
+
this.isFileTooBig = false;
|
|
4744
|
+
this.uploader.nativeElement.value = '';
|
|
4745
|
+
if (this.maximalFileSize > 0 && file.size > this.maximalFileSize) {
|
|
4746
|
+
this.isFileTooBig = true;
|
|
4747
|
+
}
|
|
4748
|
+
if (this.acceptedMIMETypes.length > 0 &&
|
|
4749
|
+
this.acceptedMIMETypes.indexOf(file.type) < 0) {
|
|
4750
|
+
this.isFileTypeInvalid = true;
|
|
4751
|
+
}
|
|
4752
|
+
if (!this.isFileTooBig && !this.isFileTypeInvalid) {
|
|
4753
|
+
this.uploadedFile.emit(file);
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
}
|
|
4757
|
+
setValue(value) {
|
|
4758
|
+
this._value = value;
|
|
4759
|
+
this.propagateChange(this._value);
|
|
4760
|
+
this.propagateTouched();
|
|
4761
|
+
}
|
|
4762
|
+
setDescribedByAttribute() {
|
|
4763
|
+
const helperText = Array.from(this.nativeElement.children).find((el) => el.localName === 'bao-guiding-text');
|
|
4764
|
+
if (helperText) {
|
|
4765
|
+
this._helperTextId = `bao-guiding-text-${fileTextUniqueId++}`;
|
|
4766
|
+
this.renderer.setAttribute(helperText.firstElementChild, 'id', this._helperTextId);
|
|
4767
|
+
const inputElement = Array.from(this.nativeElement.children)
|
|
4768
|
+
.find((el) => el.className == 'file-drop-zone')
|
|
4769
|
+
.children.item(1);
|
|
4770
|
+
this.renderer.setAttribute(inputElement, 'aria-describedby', this._helperTextId);
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
setErrorTextsAttribute() {
|
|
4774
|
+
const textsIds = [];
|
|
4775
|
+
const errors = Array.from(this.nativeElement.children).filter((el) => el.localName == 'bao-error');
|
|
4776
|
+
errors.forEach((errorText) => {
|
|
4777
|
+
const errorTextId = `bao-error-${fileTextUniqueId++}`;
|
|
4778
|
+
this.renderer.setAttribute(errorText.firstElementChild, 'id', errorTextId);
|
|
4779
|
+
textsIds.push(errorTextId);
|
|
4780
|
+
});
|
|
4781
|
+
const inputElement = Array.from(this.nativeElement.children)
|
|
4782
|
+
.find((el) => el.classList.contains('file-drop-zone'))
|
|
4783
|
+
.children.item(1);
|
|
4784
|
+
if (this._helperTextId) {
|
|
4785
|
+
textsIds.unshift(this._helperTextId);
|
|
4786
|
+
}
|
|
4787
|
+
this.renderer.setAttribute(inputElement, 'aria-describedby', textsIds.join(' '));
|
|
4788
|
+
}
|
|
4789
|
+
}
|
|
4790
|
+
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 });
|
|
4791
|
+
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: [
|
|
4792
|
+
{
|
|
4793
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4794
|
+
// tslint:disable-next-line:no-forward-ref
|
|
4795
|
+
useExisting: forwardRef(() => BaoFileInputComponent),
|
|
4796
|
+
multi: true
|
|
4797
|
+
}
|
|
4798
|
+
], 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 });
|
|
4799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileInputComponent, decorators: [{
|
|
4800
|
+
type: Component,
|
|
4801
|
+
args: [{ selector: 'bao-file-input, [bao-file-input]', providers: [
|
|
4802
|
+
{
|
|
4803
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4804
|
+
// tslint:disable-next-line:no-forward-ref
|
|
4805
|
+
useExisting: forwardRef(() => BaoFileInputComponent),
|
|
4806
|
+
multi: true
|
|
4807
|
+
}
|
|
4808
|
+
], encapsulation: ViewEncapsulation.None, host: {
|
|
4809
|
+
class: 'bao-file-input',
|
|
4810
|
+
'[class.bao-file-label-small]': 'size === "small"',
|
|
4811
|
+
'[class.bao-file-label-medium]': 'size === "medium"',
|
|
4812
|
+
'[class.bao-file-input-disabled]': 'disabled'
|
|
4813
|
+
}, 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"] }]
|
|
4814
|
+
}], ctorParameters: function () { return [{ type: BaoFileIntl }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { inputId: [{
|
|
4815
|
+
type: Input,
|
|
4816
|
+
args: ['id']
|
|
4817
|
+
}], label: [{
|
|
4818
|
+
type: Input
|
|
4819
|
+
}], size: [{
|
|
4820
|
+
type: Input
|
|
4821
|
+
}], maximalFileSize: [{
|
|
4822
|
+
type: Input
|
|
4823
|
+
}], acceptedMIMETypes: [{
|
|
4824
|
+
type: Input
|
|
4825
|
+
}], required: [{
|
|
4826
|
+
type: Input
|
|
4827
|
+
}], disabled: [{
|
|
4828
|
+
type: Input
|
|
4829
|
+
}], uploadedFile: [{
|
|
4830
|
+
type: Output
|
|
4831
|
+
}], _files: [{
|
|
4832
|
+
type: ContentChildren,
|
|
4833
|
+
args: [BaoFilePreviewComponent, { descendants: true }]
|
|
4834
|
+
}], _errorForm: [{
|
|
4835
|
+
type: ContentChildren,
|
|
4836
|
+
args: [BaoErrorTextComponent, { descendants: true }]
|
|
4837
|
+
}], _errorTexts: [{
|
|
4838
|
+
type: ViewChildren,
|
|
4839
|
+
args: [BaoErrorTextComponent]
|
|
4840
|
+
}], uploader: [{
|
|
4841
|
+
type: ViewChild,
|
|
4842
|
+
args: ['uploader', { static: false }]
|
|
4843
|
+
}], dropzoneElement: [{
|
|
4844
|
+
type: ViewChild,
|
|
4845
|
+
args: ['dropzone', { static: false }]
|
|
4846
|
+
}], enterKeyEvent: [{
|
|
4847
|
+
type: HostListener,
|
|
4848
|
+
args: ['window:keyup.enter']
|
|
4849
|
+
}], tabKeyEvent: [{
|
|
4850
|
+
type: HostListener,
|
|
4851
|
+
args: ['window:keyup.tab']
|
|
4852
|
+
}], shiftTabKeyEvent: [{
|
|
4853
|
+
type: HostListener,
|
|
4854
|
+
args: ['window:keyup.shift.tab']
|
|
4855
|
+
}] } });
|
|
4856
|
+
class BaoFileDropDirective {
|
|
4857
|
+
constructor() {
|
|
4858
|
+
this.fileDrop = new EventEmitter();
|
|
4859
|
+
this._isDragOver = false;
|
|
4860
|
+
}
|
|
4861
|
+
onDragOver(event) {
|
|
4862
|
+
this.preventAndStop(event);
|
|
4863
|
+
this._isDragOver = true;
|
|
4864
|
+
}
|
|
4865
|
+
onDragLeave(event) {
|
|
4866
|
+
this.preventAndStop(event);
|
|
4867
|
+
this._isDragOver = false;
|
|
4868
|
+
}
|
|
4869
|
+
onDrop(event) {
|
|
4870
|
+
this.preventAndStop(event);
|
|
4871
|
+
this._isDragOver = false;
|
|
4872
|
+
const transfer = this.getDataTransfer(event);
|
|
4873
|
+
this.fileDrop.emit(transfer.files[0]);
|
|
4874
|
+
}
|
|
4875
|
+
preventAndStop(event) {
|
|
4876
|
+
event.preventDefault();
|
|
4877
|
+
event.stopPropagation();
|
|
4878
|
+
}
|
|
4879
|
+
getDataTransfer(event) {
|
|
4880
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
4881
|
+
return event.dataTransfer
|
|
4882
|
+
? event.dataTransfer
|
|
4883
|
+
: event.originalEvent.dataTransfer;
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4886
|
+
BaoFileDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4887
|
+
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 });
|
|
4888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropDirective, decorators: [{
|
|
4889
|
+
type: Directive,
|
|
4890
|
+
args: [{
|
|
4891
|
+
selector: '[baoFileDrop]',
|
|
4892
|
+
host: { '[class.drag-over]': '_isDragOver == true' }
|
|
4893
|
+
}]
|
|
4894
|
+
}], propDecorators: { fileDrop: [{
|
|
4895
|
+
type: Output
|
|
4896
|
+
}], onDragOver: [{
|
|
4897
|
+
type: HostListener,
|
|
4898
|
+
args: ['dragover', ['$event']]
|
|
4899
|
+
}], onDragLeave: [{
|
|
4900
|
+
type: HostListener,
|
|
4901
|
+
args: ['dragleave', ['$event']]
|
|
4902
|
+
}], onDrop: [{
|
|
4903
|
+
type: HostListener,
|
|
4904
|
+
args: ['drop', ['$event']]
|
|
4905
|
+
}] } });
|
|
4906
|
+
class BaoFileDropzoneIntructions {
|
|
4907
|
+
constructor(renderer, elementRef) {
|
|
4908
|
+
this.renderer = renderer;
|
|
4909
|
+
this.elementRef = elementRef;
|
|
4910
|
+
}
|
|
4911
|
+
get nativeElement() {
|
|
4912
|
+
return this.elementRef.nativeElement;
|
|
4913
|
+
}
|
|
4914
|
+
ngAfterContentInit() {
|
|
4915
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-hidden', 'true');
|
|
4916
|
+
}
|
|
4917
|
+
}
|
|
4918
|
+
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 });
|
|
4919
|
+
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 });
|
|
4920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileDropzoneIntructions, decorators: [{
|
|
4921
|
+
type: Directive,
|
|
4922
|
+
args: [{
|
|
4923
|
+
selector: 'bao-file-dropzone-instructions, [bao-file-dropzone-instructions]',
|
|
4924
|
+
host: {
|
|
4925
|
+
class: 'bao-file-dropzone-instructions'
|
|
4926
|
+
}
|
|
4927
|
+
}]
|
|
4928
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4929
|
+
|
|
4930
|
+
/*
|
|
4931
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4525
4932
|
* Licensed under the MIT license.
|
|
4526
4933
|
* See LICENSE file in the project root for full license information.
|
|
4527
4934
|
*/
|
|
4935
|
+
const FILE_DIRECTIVES = [
|
|
4936
|
+
BaoFileInputComponent,
|
|
4937
|
+
BaoFileDropzoneIntructions,
|
|
4938
|
+
BaoFileDropDirective,
|
|
4939
|
+
BaoFilePreviewComponent
|
|
4940
|
+
];
|
|
4941
|
+
class BaoFileModule {
|
|
4942
|
+
}
|
|
4943
|
+
BaoFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4944
|
+
BaoFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, declarations: [BaoFileInputComponent,
|
|
4945
|
+
BaoFileDropzoneIntructions,
|
|
4946
|
+
BaoFileDropDirective,
|
|
4947
|
+
BaoFilePreviewComponent], imports: [CommonModule,
|
|
4948
|
+
BaoDropdownMenuModule,
|
|
4949
|
+
BaoCommonComponentsModule,
|
|
4950
|
+
BaoIconModule,
|
|
4951
|
+
BaoButtonModule], exports: [BaoFileInputComponent,
|
|
4952
|
+
BaoFileDropzoneIntructions,
|
|
4953
|
+
BaoFileDropDirective,
|
|
4954
|
+
BaoFilePreviewComponent] });
|
|
4955
|
+
BaoFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, providers: [BAO_FILE_INTL_PROVIDER], imports: [[
|
|
4956
|
+
CommonModule,
|
|
4957
|
+
BaoDropdownMenuModule,
|
|
4958
|
+
BaoCommonComponentsModule,
|
|
4959
|
+
BaoIconModule,
|
|
4960
|
+
BaoButtonModule
|
|
4961
|
+
]] });
|
|
4962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaoFileModule, decorators: [{
|
|
4963
|
+
type: NgModule,
|
|
4964
|
+
args: [{
|
|
4965
|
+
imports: [
|
|
4966
|
+
CommonModule,
|
|
4967
|
+
BaoDropdownMenuModule,
|
|
4968
|
+
BaoCommonComponentsModule,
|
|
4969
|
+
BaoIconModule,
|
|
4970
|
+
BaoButtonModule
|
|
4971
|
+
],
|
|
4972
|
+
declarations: [FILE_DIRECTIVES],
|
|
4973
|
+
exports: [FILE_DIRECTIVES],
|
|
4974
|
+
providers: [BAO_FILE_INTL_PROVIDER]
|
|
4975
|
+
}]
|
|
4976
|
+
}] });
|
|
4528
4977
|
|
|
4529
4978
|
/*
|
|
4530
|
-
* Copyright (c)
|
|
4979
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4531
4980
|
* Licensed under the MIT license.
|
|
4532
4981
|
* See LICENSE file in the project root for full license information.
|
|
4533
4982
|
*/
|
|
@@ -4538,7 +4987,8 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
|
4538
4987
|
BaoButtonModule,
|
|
4539
4988
|
BaoAlertModule,
|
|
4540
4989
|
BaoCardModule,
|
|
4541
|
-
BaoBreadcrumbModule
|
|
4990
|
+
BaoBreadcrumbModule,
|
|
4991
|
+
BaoModalModule], exports: [BaoIconModule,
|
|
4542
4992
|
BaoButtonModule,
|
|
4543
4993
|
BaoAlertModule,
|
|
4544
4994
|
BaoBreadcrumbModule,
|
|
@@ -4554,7 +5004,8 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
|
4554
5004
|
BaoTabsModule,
|
|
4555
5005
|
BaoModalModule,
|
|
4556
5006
|
BaoHyperlinkModule,
|
|
4557
|
-
BaoDropdownMenuModule
|
|
5007
|
+
BaoDropdownMenuModule,
|
|
5008
|
+
BaoFileModule
|
|
4558
5009
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4559
5010
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4560
5011
|
] });
|
|
@@ -4563,7 +5014,8 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
|
4563
5014
|
BaoButtonModule,
|
|
4564
5015
|
BaoAlertModule,
|
|
4565
5016
|
BaoCardModule,
|
|
4566
|
-
BaoBreadcrumbModule
|
|
5017
|
+
BaoBreadcrumbModule,
|
|
5018
|
+
BaoModalModule
|
|
4567
5019
|
], BaoIconModule,
|
|
4568
5020
|
BaoButtonModule,
|
|
4569
5021
|
BaoAlertModule,
|
|
@@ -4580,7 +5032,8 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
|
4580
5032
|
BaoTabsModule,
|
|
4581
5033
|
BaoModalModule,
|
|
4582
5034
|
BaoHyperlinkModule,
|
|
4583
|
-
BaoDropdownMenuModule
|
|
5035
|
+
BaoDropdownMenuModule,
|
|
5036
|
+
BaoFileModule
|
|
4584
5037
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4585
5038
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4586
5039
|
] });
|
|
@@ -4592,7 +5045,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4592
5045
|
BaoButtonModule,
|
|
4593
5046
|
BaoAlertModule,
|
|
4594
5047
|
BaoCardModule,
|
|
4595
|
-
BaoBreadcrumbModule
|
|
5048
|
+
BaoBreadcrumbModule,
|
|
5049
|
+
BaoModalModule
|
|
4596
5050
|
],
|
|
4597
5051
|
exports: [
|
|
4598
5052
|
BaoIconModule,
|
|
@@ -4611,7 +5065,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4611
5065
|
BaoTabsModule,
|
|
4612
5066
|
BaoModalModule,
|
|
4613
5067
|
BaoHyperlinkModule,
|
|
4614
|
-
BaoDropdownMenuModule
|
|
5068
|
+
BaoDropdownMenuModule,
|
|
5069
|
+
BaoFileModule
|
|
4615
5070
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4616
5071
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4617
5072
|
]
|
|
@@ -4619,7 +5074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4619
5074
|
}] });
|
|
4620
5075
|
|
|
4621
5076
|
/*
|
|
4622
|
-
* Copyright (c)
|
|
5077
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4623
5078
|
* Licensed under the MIT license.
|
|
4624
5079
|
* See LICENSE file in the project root for full license information.
|
|
4625
5080
|
*/
|
|
@@ -4644,7 +5099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4644
5099
|
}] } });
|
|
4645
5100
|
|
|
4646
5101
|
/*
|
|
4647
|
-
* Copyright (c)
|
|
5102
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4648
5103
|
* Licensed under the MIT license.
|
|
4649
5104
|
* See LICENSE file in the project root for full license information.
|
|
4650
5105
|
*/
|
|
@@ -4664,25 +5119,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4664
5119
|
}] });
|
|
4665
5120
|
|
|
4666
5121
|
/*
|
|
4667
|
-
* Copyright (c)
|
|
5122
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
5123
|
+
* Licensed under the MIT license.
|
|
5124
|
+
* See LICENSE file in the project root for full license information.
|
|
5125
|
+
*/
|
|
5126
|
+
|
|
5127
|
+
/*
|
|
5128
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4668
5129
|
* Licensed under the MIT license.
|
|
4669
5130
|
* See LICENSE file in the project root for full license information.
|
|
4670
5131
|
*/
|
|
4671
5132
|
|
|
4672
5133
|
/*
|
|
4673
|
-
* Copyright (c)
|
|
5134
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4674
5135
|
* Licensed under the MIT license.
|
|
4675
5136
|
* See LICENSE file in the project root for full license information.
|
|
4676
5137
|
*/
|
|
4677
5138
|
|
|
4678
5139
|
/*
|
|
4679
|
-
* Copyright (c)
|
|
5140
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4680
5141
|
* Licensed under the MIT license.
|
|
4681
5142
|
* See LICENSE file in the project root for full license information.
|
|
4682
5143
|
*/
|
|
4683
5144
|
|
|
4684
5145
|
/*
|
|
4685
|
-
* Copyright (c)
|
|
5146
|
+
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
4686
5147
|
* Licensed under the MIT license.
|
|
4687
5148
|
* See LICENSE file in the project root for full license information.
|
|
4688
5149
|
*/
|
|
@@ -4691,5 +5152,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4691
5152
|
* Generated bundle index. Do not edit.
|
|
4692
5153
|
*/
|
|
4693
5154
|
|
|
4694
|
-
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 };
|
|
5155
|
+
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 };
|
|
4695
5156
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|