@ptsecurity/mosaic 15.6.0 → 15.7.2
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/_theming.scss +19 -0
- package/_visual.scss +2 -0
- package/autocomplete/autocomplete-trigger.directive.d.ts +5 -15
- package/checkbox/_checkbox-theme.scss +4 -0
- package/core/formatters/index.d.ts +1 -1
- package/core/formatters/number/formatter.d.ts +25 -0
- package/core/locales/en-US.d.ts +1 -2
- package/core/locales/es-LA.d.ts +9 -0
- package/core/locales/fa-IR.d.ts +9 -0
- package/core/locales/locale-service.d.ts +39 -5
- package/core/locales/pt-BR.d.ts +9 -0
- package/core/locales/ru-RU.d.ts +1 -2
- package/core/locales/zh-CN.d.ts +9 -0
- package/core/option/option.d.ts +36 -7
- package/core/overlay/overlay-position-map.d.ts +7 -1
- package/core/styles/_variables.scss +1 -0
- package/core/styles/theming/_theming.scss +1 -0
- package/datepicker/calendar-header.component.d.ts +8 -2
- package/datepicker/calendar.component.d.ts +3 -4
- package/datepicker/month-view.component.d.ts +3 -4
- package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +27 -24
- package/esm2020/core/formatters/index.mjs +6 -2
- package/esm2020/core/formatters/number/formatter.mjs +90 -1
- package/esm2020/core/locales/en-US.mjs +3 -4
- package/esm2020/core/locales/es-LA.mjs +11 -2
- package/esm2020/core/locales/fa-IR.mjs +11 -2
- package/esm2020/core/locales/locale-service.mjs +4 -4
- package/esm2020/core/locales/pt-BR.mjs +11 -2
- package/esm2020/core/locales/ru-RU.mjs +3 -4
- package/esm2020/core/locales/zh-CN.mjs +11 -2
- package/esm2020/core/option/option.mjs +43 -7
- package/esm2020/core/overlay/overlay-position-map.mjs +7 -1
- package/esm2020/core/version.mjs +2 -2
- package/esm2020/datepicker/calendar-header.component.mjs +8 -7
- package/esm2020/datepicker/calendar.component.mjs +5 -14
- package/esm2020/datepicker/datepicker-input.directive.mjs +7 -6
- package/esm2020/datepicker/month-view.component.mjs +6 -15
- package/esm2020/file-upload/multiple-file-upload.component.mjs +9 -5
- package/esm2020/file-upload/single-file-upload.component.mjs +10 -6
- package/esm2020/loader-overlay/loader-overlay.component.mjs +2 -2
- package/esm2020/modal/modal.component.mjs +6 -5
- package/esm2020/modal/modal.module.mjs +8 -4
- package/esm2020/navbar/navbar.component.mjs +18 -9
- package/esm2020/navbar/vertical-navbar.component.mjs +9 -6
- package/esm2020/select/select.component.mjs +23 -9
- package/esm2020/tabs/tab.component.mjs +13 -4
- package/esm2020/timezone/timezone-select.component.mjs +2 -2
- package/esm2020/title/title.directive.mjs +2 -2
- package/esm2020/toast/toast.module.mjs +10 -4
- package/esm2020/tree/tree-option.component.mjs +6 -3
- package/esm2020/tree/tree-selection.component.mjs +6 -5
- package/esm2020/tree-select/tree-select.component.mjs +3 -3
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +30 -24
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-core.mjs +189 -22
- package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs +20 -36
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-file-upload.mjs +15 -7
- package/fesm2015/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-modal.mjs +10 -5
- package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-navbar.mjs +23 -15
- package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-select.mjs +23 -8
- package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tabs.mjs +12 -3
- package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-timezone.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-title.mjs +1 -1
- package/fesm2015/ptsecurity-mosaic-title.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-toast.mjs +8 -2
- package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree.mjs +11 -6
- package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +27 -24
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-core.mjs +189 -21
- package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs +20 -36
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-file-upload.mjs +15 -7
- package/fesm2020/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-modal.mjs +10 -5
- package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-navbar.mjs +23 -15
- package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-select.mjs +22 -8
- package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tabs.mjs +12 -3
- package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-timezone.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-title.mjs +1 -1
- package/fesm2020/ptsecurity-mosaic-title.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-toast.mjs +8 -2
- package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree.mjs +10 -6
- package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/file-upload/multiple-file-upload.component.d.ts +4 -3
- package/file-upload/single-file-upload.component.d.ts +4 -3
- package/form-field/_form-field-theme.scss +4 -0
- package/loader-overlay/loader-overlay.scss +3 -0
- package/modal/modal.module.d.ts +2 -1
- package/modal/modal.scss +14 -2
- package/navbar/navbar.component.d.ts +5 -2
- package/navbar/vertical-navbar.component.d.ts +4 -2
- package/package.json +4 -7
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/prebuilt-visual/default-visual.css +1 -1
- package/radio/_radio-theme.scss +4 -0
- package/select/select.component.d.ts +12 -9
- package/select/select.scss +1 -1
- package/tree/tree-option.scss +4 -2
@@ -13,9 +13,9 @@ import { CommonModule, DOCUMENT } from '@angular/common';
|
|
13
13
|
import { ENTER, SPACE, TAB, ESCAPE } from '@ptsecurity/cdk/keycodes';
|
14
14
|
import { takeUntil, distinctUntilChanged, delay } from 'rxjs/operators';
|
15
15
|
import * as i1$1 from '@angular/cdk/a11y';
|
16
|
-
import { ComponentPortal } from '@angular/cdk/portal';
|
17
16
|
import * as i1$2 from '@angular/cdk/overlay';
|
18
17
|
import { Overlay } from '@angular/cdk/overlay';
|
18
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
19
19
|
|
20
20
|
const fadeAnimation = trigger('fadeAnimation', [
|
21
21
|
state('void', style({ opacity: 0 })),
|
@@ -517,58 +517,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
517
517
|
}], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
|
518
518
|
|
519
519
|
const enUSLocaleData = {
|
520
|
-
en: {
|
520
|
+
'en-US': {
|
521
521
|
select: { hiddenItemsText: 'one more' },
|
522
522
|
datepicker: {
|
523
|
-
placeholder: 'dd/mm/yyyy'
|
524
|
-
dateInput: 'dd/MM/yyyy'
|
523
|
+
placeholder: 'dd/mm/yyyy'
|
525
524
|
}
|
526
525
|
}
|
527
526
|
};
|
528
527
|
|
529
528
|
const esLALocaleData = {
|
530
529
|
'es-LA': {
|
531
|
-
select: { hiddenItemsText: 'más' }
|
530
|
+
select: { hiddenItemsText: 'más' },
|
531
|
+
datepicker: {
|
532
|
+
placeholder: 'dd/mm/aaaa'
|
533
|
+
},
|
534
|
+
timepicker: {
|
535
|
+
placeholder: {
|
536
|
+
full: 'hh:mm:ss',
|
537
|
+
short: 'hh:mm'
|
538
|
+
}
|
539
|
+
}
|
532
540
|
}
|
533
541
|
};
|
534
542
|
|
535
543
|
const faIRLocaleData = {
|
536
544
|
'fa-IR': {
|
537
|
-
select: { hiddenItemsText: 'أكثر' }
|
545
|
+
select: { hiddenItemsText: 'أكثر' },
|
546
|
+
datepicker: {
|
547
|
+
placeholder: 'روز/ ماه/سال'
|
548
|
+
},
|
549
|
+
timepicker: {
|
550
|
+
placeholder: {
|
551
|
+
full: 'ثانیه:دقیقه:ساعت',
|
552
|
+
short: 'دقیقه:ساعت'
|
553
|
+
}
|
554
|
+
}
|
538
555
|
}
|
539
556
|
};
|
540
557
|
|
541
558
|
const ptBRLocaleData = {
|
542
559
|
'pt-BR': {
|
543
|
-
select: { hiddenItemsText: 'mais' }
|
560
|
+
select: { hiddenItemsText: 'mais' },
|
561
|
+
datepicker: {
|
562
|
+
placeholder: 'dd/mm/yyyy'
|
563
|
+
},
|
564
|
+
timepicker: {
|
565
|
+
placeholder: {
|
566
|
+
full: 'hh:mm:ss',
|
567
|
+
short: 'hh:mm'
|
568
|
+
}
|
569
|
+
}
|
544
570
|
}
|
545
571
|
};
|
546
572
|
|
547
573
|
const ruRULocaleData = {
|
548
|
-
ru: {
|
574
|
+
'ru-RU': {
|
549
575
|
select: { hiddenItemsText: 'еще' },
|
550
576
|
datepicker: {
|
551
|
-
placeholder: 'дд.мм.гггг'
|
552
|
-
dateInput: 'dd.MM.yyyy'
|
577
|
+
placeholder: 'дд.мм.гггг'
|
553
578
|
}
|
554
579
|
}
|
555
580
|
};
|
556
581
|
|
557
582
|
const znCNLocaleData = {
|
558
583
|
'zh-CN': {
|
559
|
-
select: { hiddenItemsText: '更多的' }
|
584
|
+
select: { hiddenItemsText: '更多的' },
|
585
|
+
datepicker: {
|
586
|
+
placeholder: '年/月/日'
|
587
|
+
},
|
588
|
+
timepicker: {
|
589
|
+
placeholder: {
|
590
|
+
full: '时:分:秒',
|
591
|
+
short: '时:分'
|
592
|
+
}
|
593
|
+
}
|
560
594
|
}
|
561
595
|
};
|
562
596
|
|
563
597
|
const MC_LOCALE_ID$1 = new InjectionToken('McLocaleId');
|
564
|
-
const MC_DEFAULT_LOCALE_ID = 'ru';
|
598
|
+
const MC_DEFAULT_LOCALE_ID = 'ru-RU';
|
565
599
|
function MC_DEFAULT_LOCALE_DATA_FACTORY() {
|
566
600
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ items: [
|
567
|
-
{ id: 'en', name: 'English' },
|
601
|
+
{ id: 'en-US', name: 'English' },
|
568
602
|
{ id: 'zh-CN', name: '简体中文' },
|
569
603
|
{ id: 'es-LA', name: 'Español' },
|
570
604
|
{ id: 'pt-BR', name: 'Português' },
|
571
|
-
{ id: 'ru', name: 'Русский' },
|
605
|
+
{ id: 'ru-RU', name: 'Русский' },
|
572
606
|
{ id: 'fa-IR', name: 'فارسی' }
|
573
607
|
] }, ruRULocaleData), enUSLocaleData), esLALocaleData), faIRLocaleData), ptBRLocaleData), znCNLocaleData);
|
574
608
|
}
|
@@ -660,6 +694,7 @@ const maxFractionGroupPosition = 5;
|
|
660
694
|
const useGroupingPosition = 7;
|
661
695
|
class ParsedDigitsInfo {
|
662
696
|
}
|
697
|
+
const defaultValueForGroupingInRULocale = 10000;
|
663
698
|
function parseDigitsInfo(digitsInfo) {
|
664
699
|
const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
|
665
700
|
if (parts === null) {
|
@@ -720,14 +755,26 @@ class McDecimalPipe {
|
|
720
755
|
parsedDigitsInfo = parseDigitsInfo(digitsInfo);
|
721
756
|
}
|
722
757
|
const options = Object.assign(Object.assign({}, this.options), parsedDigitsInfo);
|
758
|
+
if (this.isSpecialFormatForRULocale(currentLocale, value, parsedDigitsInfo === null || parsedDigitsInfo === void 0 ? void 0 : parsedDigitsInfo.useGrouping)) {
|
759
|
+
options.useGrouping = false;
|
760
|
+
}
|
723
761
|
try {
|
724
762
|
const num = strToNumber(value);
|
763
|
+
/* Guideline requires for group separator to be `space`, as in 'ru-RU' locale.
|
764
|
+
* But by default in es-LA locale is used `comma`.
|
765
|
+
* To reduce data manipulation, 'ru-RU' locale is used. */
|
766
|
+
if (currentLocale === 'es-LA') {
|
767
|
+
return Intl.NumberFormat.call(this, 'ru-RU', options).format(num);
|
768
|
+
}
|
725
769
|
return Intl.NumberFormat.call(this, currentLocale, options).format(num);
|
726
770
|
}
|
727
771
|
catch (error) {
|
728
772
|
throw Error(`InvalidPipeArgument: McDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
|
729
773
|
}
|
730
774
|
}
|
775
|
+
isSpecialFormatForRULocale(locale, value, grouping) {
|
776
|
+
return ['ru', 'ru-RU'].includes(locale) && grouping === undefined && value < defaultValueForGroupingInRULocale;
|
777
|
+
}
|
731
778
|
}
|
732
779
|
/** @nocollapse */ McDecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDecimalPipe, deps: [{ token: MC_LOCALE_ID, optional: true }, { token: MC_LOCALE_SERVICE, optional: true }, { token: MC_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
733
780
|
/** @nocollapse */ McDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: McDecimalPipe, name: "mcNumber", pure: false });
|
@@ -756,11 +803,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
756
803
|
args: [MC_NUMBER_FORMATTER_OPTIONS]
|
757
804
|
}] }];
|
758
805
|
} });
|
806
|
+
class McTableNumberPipe {
|
807
|
+
constructor(id, localeService, options) {
|
808
|
+
var _a;
|
809
|
+
this.id = id;
|
810
|
+
this.localeService = localeService;
|
811
|
+
this.options = options;
|
812
|
+
this.options = this.options || MC_NUMBER_FORMATTER_DEFAULT_OPTIONS;
|
813
|
+
(_a = this.localeService) === null || _a === void 0 ? void 0 : _a.changes.subscribe((newId) => this.id = newId);
|
814
|
+
}
|
815
|
+
/**
|
816
|
+
* @param value The number to be formatted.
|
817
|
+
* @param digitsInfo Decimal representation options, specified by a string
|
818
|
+
* in the following format:<br>
|
819
|
+
* <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
|
820
|
+
* - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
|
821
|
+
* Default is `1`.
|
822
|
+
* - `minFractionDigits`: The minimum number of digits after the decimal point.
|
823
|
+
* Default is `0`.
|
824
|
+
* - `maxFractionDigits`: The maximum number of digits after the decimal point.
|
825
|
+
* Default is `3`.
|
826
|
+
* @param locale A locale code for the locale format rules to use.
|
827
|
+
* When not supplied, uses the value of `MC_LOCALE_ID`, which is `ru` by default.
|
828
|
+
*/
|
829
|
+
transform(value, digitsInfo, locale) {
|
830
|
+
if (isEmpty(value)) {
|
831
|
+
return null;
|
832
|
+
}
|
833
|
+
const currentLocale = locale || this.id || MC_DEFAULT_LOCALE_ID;
|
834
|
+
let parsedDigitsInfo;
|
835
|
+
if (digitsInfo) {
|
836
|
+
parsedDigitsInfo = parseDigitsInfo(digitsInfo);
|
837
|
+
}
|
838
|
+
const options = Object.assign(Object.assign({}, this.options), parsedDigitsInfo);
|
839
|
+
try {
|
840
|
+
const num = strToNumber(value);
|
841
|
+
/* Guideline requires for group separator to be `space`, as in 'ru-RU' locale.
|
842
|
+
* But by default in es-LA locale is used `comma`.
|
843
|
+
* To reduce data manipulation, 'ru-RU' locale is used. */
|
844
|
+
if (currentLocale === 'es-LA') {
|
845
|
+
return Intl.NumberFormat.call(this, 'ru-RU', options).format(num);
|
846
|
+
}
|
847
|
+
return Intl.NumberFormat.call(this, currentLocale, options).format(num);
|
848
|
+
}
|
849
|
+
catch (error) {
|
850
|
+
throw Error(`InvalidPipeArgument: McDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
|
851
|
+
}
|
852
|
+
}
|
853
|
+
}
|
854
|
+
/** @nocollapse */ McTableNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McTableNumberPipe, deps: [{ token: MC_LOCALE_ID, optional: true }, { token: MC_LOCALE_SERVICE, optional: true }, { token: MC_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
855
|
+
/** @nocollapse */ McTableNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: McTableNumberPipe, name: "mcTableNumber", pure: false });
|
856
|
+
/** @nocollapse */ McTableNumberPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McTableNumberPipe, providedIn: 'root' });
|
857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McTableNumberPipe, decorators: [{
|
858
|
+
type: Injectable,
|
859
|
+
args: [{ providedIn: 'root' }]
|
860
|
+
}, {
|
861
|
+
type: Pipe,
|
862
|
+
args: [{ name: 'mcTableNumber', pure: false }]
|
863
|
+
}], ctorParameters: function () {
|
864
|
+
return [{ type: undefined, decorators: [{
|
865
|
+
type: Optional
|
866
|
+
}, {
|
867
|
+
type: Inject,
|
868
|
+
args: [MC_LOCALE_ID]
|
869
|
+
}] }, { type: McLocaleService, decorators: [{
|
870
|
+
type: Optional
|
871
|
+
}, {
|
872
|
+
type: Inject,
|
873
|
+
args: [MC_LOCALE_SERVICE]
|
874
|
+
}] }, { type: ParsedDigitsInfo, decorators: [{
|
875
|
+
type: Optional
|
876
|
+
}, {
|
877
|
+
type: Inject,
|
878
|
+
args: [MC_NUMBER_FORMATTER_OPTIONS]
|
879
|
+
}] }];
|
880
|
+
} });
|
759
881
|
|
760
882
|
class McFormattersModule {
|
761
883
|
}
|
762
884
|
/** @nocollapse */ McFormattersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
763
885
|
/** @nocollapse */ McFormattersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: McFormattersModule, declarations: [McDecimalPipe,
|
886
|
+
McTableNumberPipe,
|
764
887
|
AbsoluteDateFormatterPipe,
|
765
888
|
AbsoluteDateTimeFormatterPipe,
|
766
889
|
AbsoluteDateShortFormatterPipe,
|
@@ -774,6 +897,7 @@ class McFormattersModule {
|
|
774
897
|
RangeDateTimeFormatterPipe,
|
775
898
|
RangeShortDateTimeFormatterPipe,
|
776
899
|
RangeMiddleDateTimeFormatterPipe], exports: [McDecimalPipe,
|
900
|
+
McTableNumberPipe,
|
777
901
|
AbsoluteDateFormatterPipe,
|
778
902
|
AbsoluteDateTimeFormatterPipe,
|
779
903
|
AbsoluteDateShortFormatterPipe,
|
@@ -793,6 +917,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
793
917
|
args: [{
|
794
918
|
declarations: [
|
795
919
|
McDecimalPipe,
|
920
|
+
McTableNumberPipe,
|
796
921
|
AbsoluteDateFormatterPipe,
|
797
922
|
AbsoluteDateTimeFormatterPipe,
|
798
923
|
AbsoluteDateShortFormatterPipe,
|
@@ -809,6 +934,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
809
934
|
],
|
810
935
|
exports: [
|
811
936
|
McDecimalPipe,
|
937
|
+
McTableNumberPipe,
|
812
938
|
AbsoluteDateFormatterPipe,
|
813
939
|
AbsoluteDateTimeFormatterPipe,
|
814
940
|
AbsoluteDateShortFormatterPipe,
|
@@ -1109,11 +1235,51 @@ class McOptionSelectionChange {
|
|
1109
1235
|
* Injection token used to provide the parent component to options.
|
1110
1236
|
*/
|
1111
1237
|
const MC_OPTION_PARENT_COMPONENT = new InjectionToken('MC_OPTION_PARENT_COMPONENT');
|
1238
|
+
class McOptionBase {
|
1239
|
+
/** Emits the selection change event. */
|
1240
|
+
emitSelectionChangeEvent(isUserInput = false) {
|
1241
|
+
this.onSelectionChange.emit(new McOptionSelectionChange(this, isUserInput));
|
1242
|
+
}
|
1243
|
+
}
|
1244
|
+
class McVirtualOption extends McOptionBase {
|
1245
|
+
constructor(value, _disabled = false) {
|
1246
|
+
super();
|
1247
|
+
this.value = value;
|
1248
|
+
this._disabled = _disabled;
|
1249
|
+
this._selected = false;
|
1250
|
+
this.onSelectionChange = new EventEmitter();
|
1251
|
+
}
|
1252
|
+
get disabled() {
|
1253
|
+
return this._disabled;
|
1254
|
+
}
|
1255
|
+
set disabled(value) {
|
1256
|
+
this._disabled = coerceBooleanProperty(value);
|
1257
|
+
}
|
1258
|
+
get selected() {
|
1259
|
+
return this._selected;
|
1260
|
+
}
|
1261
|
+
get viewValue() {
|
1262
|
+
return this.value;
|
1263
|
+
}
|
1264
|
+
select() {
|
1265
|
+
if (!this._selected) {
|
1266
|
+
this._selected = true;
|
1267
|
+
this.emitSelectionChangeEvent();
|
1268
|
+
}
|
1269
|
+
}
|
1270
|
+
deselect() {
|
1271
|
+
if (this._selected) {
|
1272
|
+
this._selected = false;
|
1273
|
+
this.emitSelectionChangeEvent();
|
1274
|
+
}
|
1275
|
+
}
|
1276
|
+
}
|
1112
1277
|
/**
|
1113
1278
|
* Single option inside of a `<mc-select>` element.
|
1114
1279
|
*/
|
1115
|
-
class McOption {
|
1280
|
+
class McOption extends McOptionBase {
|
1116
1281
|
constructor(element, changeDetectorRef, parent, group) {
|
1282
|
+
super();
|
1117
1283
|
this.element = element;
|
1118
1284
|
this.changeDetectorRef = changeDetectorRef;
|
1119
1285
|
this.parent = parent;
|
@@ -1262,15 +1428,11 @@ class McOption {
|
|
1262
1428
|
getHostElement() {
|
1263
1429
|
return this.element.nativeElement;
|
1264
1430
|
}
|
1265
|
-
/** Emits the selection change event. */
|
1266
|
-
emitSelectionChangeEvent(isUserInput = false) {
|
1267
|
-
this.onSelectionChange.emit(new McOptionSelectionChange(this, isUserInput));
|
1268
|
-
}
|
1269
1431
|
}
|
1270
1432
|
/** @nocollapse */ McOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MC_OPTION_PARENT_COMPONENT, optional: true }, { token: McOptgroup, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1271
1433
|
/** @nocollapse */ McOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: McOption, selector: "mc-option", inputs: { value: "value", showCheckbox: "showCheckbox", disabled: "disabled" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "click": "selectViaInteraction()", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "getTabIndex()", "class.mc-selected": "selected", "class.mc-option-multiple": "multiple", "class.mc-active": "active", "class.mc-disabled": "disabled", "id": "id" }, classAttribute: "mc-option" }, providers: [{
|
1272
1434
|
provide: MC_TITLE_TEXT_REF, useExisting: McOption
|
1273
|
-
}], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["mcTitleText"], descendants: true }], exportAs: ["mcOption"], ngImport: i0, template: "<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<span #mcTitleText class=\"mc-option-text\"><ng-content></ng-content></span>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--mc-option-size-height, 32px);border:var(--mc-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:var(--mc-option-size-horizontal-padding, 10px);padding-right:var(--mc-option-size-horizontal-padding, 10px);-webkit-tap-highlight-color:transparent}.mc-option.mc-disabled{cursor:default}.mc-option .mc-pseudo-checkbox{margin-right:8px}.mc-option .mc-option-overlay{position:absolute;top:calc(-1 * var(--mc-option-size-border-width, 2px));left:calc(-1 * var(--mc-option-size-border-width, 2px));right:calc(-1 * var(--mc-option-size-border-width, 2px));bottom:calc(-1 * var(--mc-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: ["color", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
1435
|
+
}], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["mcTitleText"], descendants: true }], exportAs: ["mcOption"], usesInheritance: true, ngImport: i0, template: "<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<span #mcTitleText class=\"mc-option-text\"><ng-content></ng-content></span>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--mc-option-size-height, 32px);border:var(--mc-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:var(--mc-option-size-horizontal-padding, 10px);padding-right:var(--mc-option-size-horizontal-padding, 10px);-webkit-tap-highlight-color:transparent}.mc-option.mc-disabled{cursor:default}.mc-option .mc-pseudo-checkbox{margin-right:8px}.mc-option .mc-option-overlay{position:absolute;top:calc(-1 * var(--mc-option-size-border-width, 2px));left:calc(-1 * var(--mc-option-size-border-width, 2px));right:calc(-1 * var(--mc-option-size-border-width, 2px));bottom:calc(-1 * var(--mc-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: ["color", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
1274
1436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McOption, decorators: [{
|
1275
1437
|
type: Component,
|
1276
1438
|
args: [{ selector: 'mc-option', exportAs: 'mcOption', host: {
|
@@ -1726,6 +1888,11 @@ const POSITION_TO_CSS_MAP = {
|
|
1726
1888
|
bottomLeft: 'bottom-left',
|
1727
1889
|
bottomRight: 'bottom-right'
|
1728
1890
|
};
|
1891
|
+
const MC_CUSTOM_SCROLL_STRATEGY_PROVIDER = (token, factory) => ({
|
1892
|
+
provide: token,
|
1893
|
+
deps: [Overlay],
|
1894
|
+
useFactory: factory
|
1895
|
+
});
|
1729
1896
|
function arrayMap(array, iteratee) {
|
1730
1897
|
let index = -1;
|
1731
1898
|
const length = array === null ? 0 : array.length;
|
@@ -2304,11 +2471,11 @@ const validationTooltipShowDelay = 10;
|
|
2304
2471
|
const validationTooltipHideDelay = 3000;
|
2305
2472
|
const MC_VALIDATION = new InjectionToken('McUseValidation', { factory: () => ({ useValidation: true }) });
|
2306
2473
|
|
2307
|
-
const VERSION = new Version('15.
|
2474
|
+
const VERSION = new Version('15.7.2+sha-5634186');
|
2308
2475
|
|
2309
2476
|
/**
|
2310
2477
|
* Generated bundle index. Do not edit.
|
2311
2478
|
*/
|
2312
2479
|
|
2313
|
-
export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MC_DATE_FORMATS, MC_DATE_LOCALE, MC_DATE_LOCALE_FACTORY, MC_DEFAULT_LOCALE_DATA_FACTORY, MC_DEFAULT_LOCALE_ID, MC_LABEL_GLOBAL_OPTIONS, MC_LOCALE_DATA, MC_LOCALE_ID, MC_LOCALE_SERVICE, MC_NUMBER_FORMATTER_DEFAULT_OPTIONS, MC_NUMBER_FORMATTER_OPTIONS, MC_OPTION_ACTION_PARENT, MC_OPTION_PARENT_COMPONENT, MC_SANITY_CHECKS, MC_SELECT_SCROLL_STRATEGY, MC_SELECT_SCROLL_STRATEGY_PROVIDER, MC_TITLE_TEXT_REF, MC_VALIDATION, McCommonModule, McDataSizeModule, McDataSizePipe, McDecimalPipe, McForm, McFormElement, McFormattersModule, McFormsModule, McHighlightModule, McHighlightPipe, McLine, McLineModule, McLineSetter, McLocaleService, McLocaleServiceModule, McMeasureScrollbarService, McOptgroup, McOptgroupBase, McOptgroupMixinBase, McOption, McOptionActionBase, McOptionActionComponent, McOptionActionMixinBase, McOptionModule, McOptionSelectionChange, McPopUp, McPopUpTrigger, McPseudoCheckbox, McPseudoCheckboxBase, McPseudoCheckboxMixinBase, McPseudoCheckboxModule, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, formatDataSize, getHumanizedBytes, getMcSelectDynamicMultipleError, getMcSelectNonArrayValueError, getMcSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, mcSelectAnimations, mcSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, sizeUnitsConfig, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
|
2480
|
+
export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MC_CUSTOM_SCROLL_STRATEGY_PROVIDER, MC_DATE_FORMATS, MC_DATE_LOCALE, MC_DATE_LOCALE_FACTORY, MC_DEFAULT_LOCALE_DATA_FACTORY, MC_DEFAULT_LOCALE_ID, MC_LABEL_GLOBAL_OPTIONS, MC_LOCALE_DATA, MC_LOCALE_ID, MC_LOCALE_SERVICE, MC_NUMBER_FORMATTER_DEFAULT_OPTIONS, MC_NUMBER_FORMATTER_OPTIONS, MC_OPTION_ACTION_PARENT, MC_OPTION_PARENT_COMPONENT, MC_SANITY_CHECKS, MC_SELECT_SCROLL_STRATEGY, MC_SELECT_SCROLL_STRATEGY_PROVIDER, MC_TITLE_TEXT_REF, MC_VALIDATION, McCommonModule, McDataSizeModule, McDataSizePipe, McDecimalPipe, McForm, McFormElement, McFormattersModule, McFormsModule, McHighlightModule, McHighlightPipe, McLine, McLineModule, McLineSetter, McLocaleService, McLocaleServiceModule, McMeasureScrollbarService, McOptgroup, McOptgroupBase, McOptgroupMixinBase, McOption, McOptionActionBase, McOptionActionComponent, McOptionActionMixinBase, McOptionBase, McOptionModule, McOptionSelectionChange, McPopUp, McPopUpTrigger, McPseudoCheckbox, McPseudoCheckboxBase, McPseudoCheckboxMixinBase, McPseudoCheckboxModule, McTableNumberPipe, McVirtualOption, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, formatDataSize, getHumanizedBytes, getMcSelectDynamicMultipleError, getMcSelectNonArrayValueError, getMcSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, mcSelectAnimations, mcSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, sizeUnitsConfig, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
|
2314
2481
|
//# sourceMappingURL=ptsecurity-mosaic-core.mjs.map
|