@ng-matero/extensions 17.1.1 → 17.1.3
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/esm2022/core/datetime/datetime.module.mjs +3 -3
- package/esm2022/grid/column-menu.mjs +10 -4
- package/esm2022/grid/grid-pipes.mjs +2 -2
- package/esm2022/grid/grid.mjs +10 -9
- package/fesm2022/mtxCore.mjs +2 -2
- package/fesm2022/mtxCore.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +19 -12
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/grid/column-menu.d.ts +1 -2
- package/grid/grid-pipes.d.ts +1 -1
- package/grid/grid.d.ts +2 -1
- package/package.json +12 -12
package/fesm2022/mtxCore.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxCore.mjs","sources":["../../../projects/extensions/core/datetime/datetime-adapter.ts","../../../projects/extensions/core/datetime/datetime-formats.ts","../../../projects/extensions/core/datetime/native-datetime-adapter.ts","../../../projects/extensions/core/datetime/native-datetime-formats.ts","../../../projects/extensions/core/datetime/datetime.module.ts","../../../projects/extensions/core/pipes/to-observable.pipe.ts","../../../projects/extensions/core/pipes/is-template-ref.pipe.ts","../../../projects/extensions/core/pipes/pipes.module.ts","../../../projects/extensions/core/mtxCore.ts"],"sourcesContent":["import { DateAdapter } from '@angular/material/core';\n\nexport abstract class DatetimeAdapter<D> extends DateAdapter<D> {\n constructor(protected _delegate: DateAdapter<D>) {\n super();\n }\n\n abstract getHour(date: D): number;\n\n abstract getMinute(date: D): number;\n\n abstract getFirstDateOfMonth(date: D): D;\n\n abstract isInNextMonth(startDate: D, endDate: D): boolean;\n\n abstract getHourNames(): string[];\n\n abstract getMinuteNames(): string[];\n\n abstract addCalendarHours(date: D, months: number): D;\n\n abstract addCalendarMinutes(date: D, minutes: number): D;\n\n abstract createDatetime(\n year: number,\n month: number,\n date: number,\n hour: number,\n minute: number\n ): D;\n\n getValidDateOrNull(obj: any): D | null {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }\n\n compareDatetime(first: D, second: D, respectMinutePart: boolean = true): number | boolean {\n return (\n this.compareDate(first, second) ||\n this.getHour(first) - this.getHour(second) ||\n (respectMinutePart && this.getMinute(first) - this.getMinute(second))\n );\n }\n\n sameDatetime(first: D | null, second: D | null): boolean {\n if (first && second) {\n const firstValid = this.isValid(first);\n const secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDatetime(first, second);\n }\n return firstValid === secondValid;\n }\n return first === second;\n }\n\n sameYear(first: D, second: D) {\n return first && second && this.getYear(first) === this.getYear(second);\n }\n\n sameDay(first: D, second: D) {\n return (\n first &&\n second &&\n this.getDate(first) === this.getDate(second) &&\n this.sameMonthAndYear(first, second)\n );\n }\n\n sameHour(first: D, second: D) {\n return (\n first && second && this.getHour(first) === this.getHour(second) && this.sameDay(first, second)\n );\n }\n\n sameMinute(first: D, second: D) {\n return (\n first &&\n second &&\n this.getMinute(first) === this.getMinute(second) &&\n this.sameHour(first, second)\n );\n }\n\n sameMonthAndYear(first: D | null, second: D | null): boolean {\n if (first && second) {\n const firstValid = this.isValid(first);\n const secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !(\n this.getYear(first) - this.getYear(second) || this.getMonth(first) - this.getMonth(second)\n );\n }\n return firstValid === secondValid;\n }\n return first === second;\n }\n\n // delegate\n clone(date: D): D {\n return this._delegate.clone(date);\n }\n\n addCalendarYears(date: D, years: number): D {\n return this._delegate.addCalendarYears(date, years);\n }\n\n addCalendarMonths(date: D, months: number): D {\n return this._delegate.addCalendarMonths(date, months);\n }\n\n addCalendarDays(date: D, days: number): D {\n return this._delegate.addCalendarDays(date, days);\n }\n\n getYear(date: D): number {\n return this._delegate.getYear(date);\n }\n\n getMonth(date: D): number {\n return this._delegate.getMonth(date);\n }\n\n getDate(date: D): number {\n return this._delegate.getDate(date);\n }\n\n getDayOfWeek(date: D): number {\n return this._delegate.getDayOfWeek(date);\n }\n\n getMonthNames(style: any): string[] {\n return this._delegate.getMonthNames(style);\n }\n\n getDateNames(): string[] {\n return this._delegate.getDateNames();\n }\n\n getDayOfWeekNames(style: any): string[] {\n return this._delegate.getDayOfWeekNames(style);\n }\n\n getYearName(date: D): string {\n return this._delegate.getYearName(date);\n }\n\n getFirstDayOfWeek(): number {\n return this._delegate.getFirstDayOfWeek();\n }\n\n getNumDaysInMonth(date: D): number {\n return this._delegate.getNumDaysInMonth(date);\n }\n\n createDate(year: number, month: number, date: number): D {\n return this._delegate.createDate(year, month, date);\n }\n\n today(): D {\n return this._delegate.today();\n }\n\n parse(value: any, parseFormat: any): D | null {\n return this._delegate.parse(value, parseFormat);\n }\n\n format(date: D, displayFormat: any): string {\n return this._delegate.format(date, displayFormat);\n }\n\n toIso8601(date: D): string {\n return this._delegate.toIso8601(date);\n }\n\n isDateInstance(obj: any): boolean {\n return this._delegate.isDateInstance(obj);\n }\n\n isValid(date: D): boolean {\n return this._delegate.isValid(date);\n }\n\n invalid(): D {\n return this._delegate.invalid();\n }\n\n clampDate(date: D, min?: D | null, max?: D | null): D {\n if (min && (this.compareDatetime(date, min) as number) < 0) {\n return min;\n }\n if (max && (this.compareDatetime(date, max) as number) > 0) {\n return max;\n }\n return date;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface MtxDatetimeFormats {\n parse: {\n dateInput?: any;\n monthInput?: any;\n yearInput?: any;\n timeInput?: any;\n datetimeInput?: any;\n };\n display: {\n dateInput: any;\n monthInput: any;\n yearInput?: any;\n timeInput: any;\n datetimeInput: any;\n monthYearLabel: any;\n dateA11yLabel: any;\n monthYearA11yLabel: any;\n popupHeaderDateLabel: any;\n };\n}\n\nexport const MTX_DATETIME_FORMATS = new InjectionToken<MtxDatetimeFormats>('mtx-datetime-formats');\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';\nimport { DatetimeAdapter } from './datetime-adapter';\n\n/** The default hour names to use if Intl API is not available. */\nconst DEFAULT_HOUR_NAMES = range(24, i => String(i));\n\n/** The default minute names to use if Intl API is not available. */\nconst DEFAULT_MINUTE_NAMES = range(60, i => String(i));\n\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n@Injectable()\nexport class NativeDatetimeAdapter extends DatetimeAdapter<Date> {\n constructor(\n @Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: string,\n _delegate: DateAdapter<Date>\n ) {\n super(_delegate);\n this.setLocale(matDateLocale);\n }\n\n clone(date: Date): Date {\n return this.createDatetime(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHour(date),\n this.getMinute(date)\n );\n }\n\n getHour(date: Date): number {\n return date.getHours();\n }\n\n getMinute(date: Date): number {\n return date.getMinutes();\n }\n\n isInNextMonth(startDate: Date, endDate: Date): boolean {\n const nextMonth = this.getDateInNextMonth(startDate);\n return this.sameMonthAndYear(nextMonth, endDate);\n }\n\n createDatetime(year: number, month: number, date: number, hour: number, minute: number): Date {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n\n if (hour < 0 || hour > 23) {\n throw Error(`Invalid hour \"${hour}\". Hour has to be between 0 and 23.`);\n }\n\n if (minute < 0 || minute > 59) {\n throw Error(`Invalid minute \"${minute}\". Minute has to be between 0 and 59.`);\n }\n\n const result = this._createDateWithOverflow(year, month, date, hour, minute);\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() !== month) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n getFirstDateOfMonth(date: Date): Date {\n const result = new Date();\n result.setFullYear(date.getFullYear(), date.getMonth(), 1);\n return result;\n }\n\n getHourNames(): string[] {\n return DEFAULT_HOUR_NAMES;\n }\n\n getMinuteNames(): string[] {\n return DEFAULT_MINUTE_NAMES;\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return this.addCalendarMonths(date, years * 12);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n let newDate = this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + months,\n this.getDate(date),\n this.getHour(date),\n this.getMinute(date)\n );\n\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) !== (((this.getMonth(date) + months) % 12) + 12) % 12) {\n newDate = this._createDateWithOverflow(\n this.getYear(newDate),\n this.getMonth(newDate),\n 0,\n this.getHour(date),\n this.getMinute(date)\n );\n }\n\n return newDate;\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date) + days,\n this.getHour(date),\n this.getMinute(date)\n );\n }\n\n addCalendarHours(date: Date, hours: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHour(date) + hours,\n this.getMinute(date)\n );\n }\n\n addCalendarMinutes(date: Date, minutes: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHour(date),\n this.getMinute(date) + minutes\n );\n }\n\n toIso8601(date: Date): string {\n return (\n super.toIso8601(date) +\n 'T' +\n [this._2digit(date.getUTCHours()), this._2digit(date.getUTCMinutes())].join(':')\n );\n }\n\n private getDateInNextMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 1, date.getHours(), date.getMinutes());\n }\n\n /**\n * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while\n * other browsers do not. We remove them to make output consistent and because they interfere with\n * date parsing.\n * @param str The string to strip direction characters from.\n * @returns The stripped string.\n */\n private _stripDirectionalityCharacters(str: string) {\n return str.replace(/[\\u200e\\u200f]/g, '');\n }\n\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n private _2digit(n: number) {\n return ('00' + n).slice(-2);\n }\n\n /** Creates a date but allows the month and date to overflow. */\n private _createDateWithOverflow(\n year: number,\n month: number,\n date: number,\n hours: number,\n minutes: number\n ) {\n const result = new Date(year, month, date, hours, minutes);\n\n // We need to correct for the fact that JS native Date treats years in range [0, 99] as\n // abbreviations for 19xx.\n if (year >= 0 && year < 100) {\n result.setFullYear(this.getYear(result) - 1900);\n }\n return result;\n }\n}\n","import { MtxDatetimeFormats } from './datetime-formats';\n\nexport const MTX_NATIVE_DATETIME_FORMATS: MtxDatetimeFormats = {\n parse: {},\n display: {\n dateInput: { year: 'numeric', month: '2-digit', day: '2-digit' },\n monthInput: { month: 'long' },\n datetimeInput: {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n },\n timeInput: { hour: '2-digit', minute: '2-digit' },\n monthYearLabel: { year: 'numeric', month: 'short' },\n dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },\n monthYearA11yLabel: { year: 'numeric', month: 'long' },\n popupHeaderDateLabel: { weekday: 'short', month: 'short', day: '2-digit' },\n },\n};\n","import { NgModule, Provider } from '@angular/core';\nimport { NativeDateModule, provideNativeDateAdapter } from '@angular/material/core';\nimport { DatetimeAdapter } from './datetime-adapter';\nimport { MTX_DATETIME_FORMATS, MtxDatetimeFormats } from './datetime-formats';\nimport { NativeDatetimeAdapter } from './native-datetime-adapter';\nimport { MTX_NATIVE_DATETIME_FORMATS } from './native-datetime-formats';\n\n@NgModule({\n imports: [NativeDateModule],\n providers: [{ provide: DatetimeAdapter, useClass: NativeDatetimeAdapter }],\n})\nexport class NativeDatetimeModule {}\n\nexport function provideNativeDatetimeAdapter(\n formats: MtxDatetimeFormats = MTX_NATIVE_DATETIME_FORMATS\n): Provider[] {\n return [\n provideNativeDateAdapter(),\n { provide: DatetimeAdapter, useClass: NativeDatetimeAdapter },\n { provide: MTX_DATETIME_FORMATS, useValue: formats },\n ];\n}\n\n@NgModule({\n providers: [provideNativeDatetimeAdapter()],\n})\nexport class MtxNativeDatetimeModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Observable, of, isObservable } from 'rxjs';\n\n@Pipe({ name: 'toObservable', standalone: true })\nexport class MtxToObservablePipe implements PipeTransform {\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n transform(value: Observable<any> | unknown): Observable<any> {\n return isObservable(value) ? value : of(value);\n }\n}\n","import { Pipe, PipeTransform, TemplateRef } from '@angular/core';\n\n@Pipe({ name: 'isTemplateRef', standalone: true })\nexport class MtxIsTemplateRefPipe implements PipeTransform {\n transform(obj: any) {\n return obj instanceof TemplateRef;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MtxToObservablePipe } from './to-observable.pipe';\nimport { MtxIsTemplateRefPipe } from './is-template-ref.pipe';\n\n@NgModule({\n imports: [CommonModule, MtxToObservablePipe, MtxIsTemplateRefPipe],\n exports: [MtxToObservablePipe, MtxIsTemplateRefPipe],\n})\nexport class MtxPipesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAEM,MAAgB,eAAmB,SAAQ,WAAc,CAAA;AAC7D,IAAA,WAAA,CAAsB,SAAyB,EAAA;AAC7C,QAAA,KAAK,EAAE,CAAC;QADY,IAAS,CAAA,SAAA,GAAT,SAAS,CAAgB;KAE9C;AA0BD,IAAA,kBAAkB,CAAC,GAAQ,EAAA;QACzB,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;KACnE;AAED,IAAA,eAAe,CAA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AAE,CAAA;;;MCQpC,cAAc,CAAA;iIAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;kIAAd,cAAc,EAAA,OAAA,EAAA,CAHf,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,CAAA,EAAA,OAAA,EAAA,CACvD,mBAAmB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAExC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;AACrD,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mtxCore.mjs","sources":["../../../projects/extensions/core/datetime/datetime-adapter.ts","../../../projects/extensions/core/datetime/datetime-formats.ts","../../../projects/extensions/core/datetime/native-datetime-adapter.ts","../../../projects/extensions/core/datetime/native-datetime-formats.ts","../../../projects/extensions/core/datetime/datetime.module.ts","../../../projects/extensions/core/pipes/to-observable.pipe.ts","../../../projects/extensions/core/pipes/is-template-ref.pipe.ts","../../../projects/extensions/core/pipes/pipes.module.ts","../../../projects/extensions/core/mtxCore.ts"],"sourcesContent":["import { DateAdapter } from '@angular/material/core';\n\nexport abstract class DatetimeAdapter<D> extends DateAdapter<D> {\n constructor(protected _delegate: DateAdapter<D>) {\n super();\n }\n\n abstract getHour(date: D): number;\n\n abstract getMinute(date: D): number;\n\n abstract getFirstDateOfMonth(date: D): D;\n\n abstract isInNextMonth(startDate: D, endDate: D): boolean;\n\n abstract getHourNames(): string[];\n\n abstract getMinuteNames(): string[];\n\n abstract addCalendarHours(date: D, months: number): D;\n\n abstract addCalendarMinutes(date: D, minutes: number): D;\n\n abstract createDatetime(\n year: number,\n month: number,\n date: number,\n hour: number,\n minute: number\n ): D;\n\n getValidDateOrNull(obj: any): D | null {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }\n\n compareDatetime(first: D, second: D, respectMinutePart: boolean = true): number | boolean {\n return (\n this.compareDate(first, second) ||\n this.getHour(first) - this.getHour(second) ||\n (respectMinutePart && this.getMinute(first) - this.getMinute(second))\n );\n }\n\n sameDatetime(first: D | null, second: D | null): boolean {\n if (first && second) {\n const firstValid = this.isValid(first);\n const secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDatetime(first, second);\n }\n return firstValid === secondValid;\n }\n return first === second;\n }\n\n sameYear(first: D, second: D) {\n return first && second && this.getYear(first) === this.getYear(second);\n }\n\n sameDay(first: D, second: D) {\n return (\n first &&\n second &&\n this.getDate(first) === this.getDate(second) &&\n this.sameMonthAndYear(first, second)\n );\n }\n\n sameHour(first: D, second: D) {\n return (\n first && second && this.getHour(first) === this.getHour(second) && this.sameDay(first, second)\n );\n }\n\n sameMinute(first: D, second: D) {\n return (\n first &&\n second &&\n this.getMinute(first) === this.getMinute(second) &&\n this.sameHour(first, second)\n );\n }\n\n sameMonthAndYear(first: D | null, second: D | null): boolean {\n if (first && second) {\n const firstValid = this.isValid(first);\n const secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !(\n this.getYear(first) - this.getYear(second) || this.getMonth(first) - this.getMonth(second)\n );\n }\n return firstValid === secondValid;\n }\n return first === second;\n }\n\n // delegate\n clone(date: D): D {\n return this._delegate.clone(date);\n }\n\n addCalendarYears(date: D, years: number): D {\n return this._delegate.addCalendarYears(date, years);\n }\n\n addCalendarMonths(date: D, months: number): D {\n return this._delegate.addCalendarMonths(date, months);\n }\n\n addCalendarDays(date: D, days: number): D {\n return this._delegate.addCalendarDays(date, days);\n }\n\n getYear(date: D): number {\n return this._delegate.getYear(date);\n }\n\n getMonth(date: D): number {\n return this._delegate.getMonth(date);\n }\n\n getDate(date: D): number {\n return this._delegate.getDate(date);\n }\n\n getDayOfWeek(date: D): number {\n return this._delegate.getDayOfWeek(date);\n }\n\n getMonthNames(style: any): string[] {\n return this._delegate.getMonthNames(style);\n }\n\n getDateNames(): string[] {\n return this._delegate.getDateNames();\n }\n\n getDayOfWeekNames(style: any): string[] {\n return this._delegate.getDayOfWeekNames(style);\n }\n\n getYearName(date: D): string {\n return this._delegate.getYearName(date);\n }\n\n getFirstDayOfWeek(): number {\n return this._delegate.getFirstDayOfWeek();\n }\n\n getNumDaysInMonth(date: D): number {\n return this._delegate.getNumDaysInMonth(date);\n }\n\n createDate(year: number, month: number, date: number): D {\n return this._delegate.createDate(year, month, date);\n }\n\n today(): D {\n return this._delegate.today();\n }\n\n parse(value: any, parseFormat: any): D | null {\n return this._delegate.parse(value, parseFormat);\n }\n\n format(date: D, displayFormat: any): string {\n return this._delegate.format(date, displayFormat);\n }\n\n toIso8601(date: D): string {\n return this._delegate.toIso8601(date);\n }\n\n isDateInstance(obj: any): boolean {\n return this._delegate.isDateInstance(obj);\n }\n\n isValid(date: D): boolean {\n return this._delegate.isValid(date);\n }\n\n invalid(): D {\n return this._delegate.invalid();\n }\n\n clampDate(date: D, min?: D | null, max?: D | null): D {\n if (min && (this.compareDatetime(date, min) as number) < 0) {\n return min;\n }\n if (max && (this.compareDatetime(date, max) as number) > 0) {\n return max;\n }\n return date;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface MtxDatetimeFormats {\n parse: {\n dateInput?: any;\n monthInput?: any;\n yearInput?: any;\n timeInput?: any;\n datetimeInput?: any;\n };\n display: {\n dateInput: any;\n monthInput: any;\n yearInput?: any;\n timeInput: any;\n datetimeInput: any;\n monthYearLabel: any;\n dateA11yLabel: any;\n monthYearA11yLabel: any;\n popupHeaderDateLabel: any;\n };\n}\n\nexport const MTX_DATETIME_FORMATS = new InjectionToken<MtxDatetimeFormats>('mtx-datetime-formats');\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';\nimport { DatetimeAdapter } from './datetime-adapter';\n\n/** The default hour names to use if Intl API is not available. */\nconst DEFAULT_HOUR_NAMES = range(24, i => String(i));\n\n/** The default minute names to use if Intl API is not available. */\nconst DEFAULT_MINUTE_NAMES = range(60, i => String(i));\n\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n@Injectable()\nexport class NativeDatetimeAdapter extends DatetimeAdapter<Date> {\n constructor(\n @Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: string,\n _delegate: DateAdapter<Date>\n ) {\n super(_delegate);\n this.setLocale(matDateLocale);\n }\n\n clone(date: Date): Date {\n return this.createDatetime(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHour(date),\n this.getMinute(date)\n );\n }\n\n getHour(date: Date): number {\n return date.getHours();\n }\n\n getMinute(date: Date): number {\n return date.getMinutes();\n }\n\n isInNextMonth(startDate: Date, endDate: Date): boolean {\n const nextMonth = this.getDateInNextMonth(startDate);\n return this.sameMonthAndYear(nextMonth, endDate);\n }\n\n createDatetime(year: number, month: number, date: number, hour: number, minute: number): Date {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n\n if (hour < 0 || hour > 23) {\n throw Error(`Invalid hour \"${hour}\". Hour has to be between 0 and 23.`);\n }\n\n if (minute < 0 || minute > 59) {\n throw Error(`Invalid minute \"${minute}\". Minute has to be between 0 and 59.`);\n }\n\n const result = this._createDateWithOverflow(year, month, date, hour, minute);\n\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() !== month) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n getFirstDateOfMonth(date: Date): Date {\n const result = new Date();\n result.setFullYear(date.getFullYear(), date.getMonth(), 1);\n return result;\n }\n\n getHourNames(): string[] {\n return DEFAULT_HOUR_NAMES;\n }\n\n getMinuteNames(): string[] {\n return DEFAULT_MINUTE_NAMES;\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return this.addCalendarMonths(date, years * 12);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n let newDate = this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + months,\n this.getDate(date),\n this.getHour(date),\n this.getMinute(date)\n );\n\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) !== (((this.getMonth(date) + months) % 12) + 12) % 12) {\n newDate = this._createDateWithOverflow(\n this.getYear(newDate),\n this.getMonth(newDate),\n 0,\n this.getHour(date),\n this.getMinute(date)\n );\n }\n\n return newDate;\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date) + days,\n this.getHour(date),\n this.getMinute(date)\n );\n }\n\n addCalendarHours(date: Date, hours: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHour(date) + hours,\n this.getMinute(date)\n );\n }\n\n addCalendarMinutes(date: Date, minutes: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHour(date),\n this.getMinute(date) + minutes\n );\n }\n\n toIso8601(date: Date): string {\n return (\n super.toIso8601(date) +\n 'T' +\n [this._2digit(date.getUTCHours()), this._2digit(date.getUTCMinutes())].join(':')\n );\n }\n\n private getDateInNextMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 1, date.getHours(), date.getMinutes());\n }\n\n /**\n * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while\n * other browsers do not. We remove them to make output consistent and because they interfere with\n * date parsing.\n * @param str The string to strip direction characters from.\n * @returns The stripped string.\n */\n private _stripDirectionalityCharacters(str: string) {\n return str.replace(/[\\u200e\\u200f]/g, '');\n }\n\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n private _2digit(n: number) {\n return ('00' + n).slice(-2);\n }\n\n /** Creates a date but allows the month and date to overflow. */\n private _createDateWithOverflow(\n year: number,\n month: number,\n date: number,\n hours: number,\n minutes: number\n ) {\n const result = new Date(year, month, date, hours, minutes);\n\n // We need to correct for the fact that JS native Date treats years in range [0, 99] as\n // abbreviations for 19xx.\n if (year >= 0 && year < 100) {\n result.setFullYear(this.getYear(result) - 1900);\n }\n return result;\n }\n}\n","import { MtxDatetimeFormats } from './datetime-formats';\n\nexport const MTX_NATIVE_DATETIME_FORMATS: MtxDatetimeFormats = {\n parse: {},\n display: {\n dateInput: { year: 'numeric', month: '2-digit', day: '2-digit' },\n monthInput: { month: 'long' },\n datetimeInput: {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n },\n timeInput: { hour: '2-digit', minute: '2-digit' },\n monthYearLabel: { year: 'numeric', month: 'short' },\n dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },\n monthYearA11yLabel: { year: 'numeric', month: 'long' },\n popupHeaderDateLabel: { weekday: 'short', month: 'short', day: '2-digit' },\n },\n};\n","import { NgModule, Provider } from '@angular/core';\nimport { DateAdapter, NativeDateAdapter, NativeDateModule } from '@angular/material/core';\nimport { DatetimeAdapter } from './datetime-adapter';\nimport { MTX_DATETIME_FORMATS, MtxDatetimeFormats } from './datetime-formats';\nimport { NativeDatetimeAdapter } from './native-datetime-adapter';\nimport { MTX_NATIVE_DATETIME_FORMATS } from './native-datetime-formats';\n\n@NgModule({\n imports: [NativeDateModule],\n providers: [{ provide: DatetimeAdapter, useClass: NativeDatetimeAdapter }],\n})\nexport class NativeDatetimeModule {}\n\nexport function provideNativeDatetimeAdapter(\n formats: MtxDatetimeFormats = MTX_NATIVE_DATETIME_FORMATS\n): Provider[] {\n return [\n { provide: DateAdapter, useClass: NativeDateAdapter },\n { provide: DatetimeAdapter, useClass: NativeDatetimeAdapter },\n { provide: MTX_DATETIME_FORMATS, useValue: formats },\n ];\n}\n\n@NgModule({\n providers: [provideNativeDatetimeAdapter()],\n})\nexport class MtxNativeDatetimeModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Observable, of, isObservable } from 'rxjs';\n\n@Pipe({ name: 'toObservable', standalone: true })\nexport class MtxToObservablePipe implements PipeTransform {\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n transform(value: Observable<any> | unknown): Observable<any> {\n return isObservable(value) ? value : of(value);\n }\n}\n","import { Pipe, PipeTransform, TemplateRef } from '@angular/core';\n\n@Pipe({ name: 'isTemplateRef', standalone: true })\nexport class MtxIsTemplateRefPipe implements PipeTransform {\n transform(obj: any) {\n return obj instanceof TemplateRef;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MtxToObservablePipe } from './to-observable.pipe';\nimport { MtxIsTemplateRefPipe } from './is-template-ref.pipe';\n\n@NgModule({\n imports: [CommonModule, MtxToObservablePipe, MtxIsTemplateRefPipe],\n exports: [MtxToObservablePipe, MtxIsTemplateRefPipe],\n})\nexport class MtxPipesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAEM,MAAgB,eAAmB,SAAQ,WAAc,CAAA;AAC7D,IAAA,WAAA,CAAsB,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txGridRowClassPipe {
|
|
412
412
|
transform(rowData, index, dataIndex, rowClassFormatter) {
|
|
413
|
-
const rowIndex =
|
|
413
|
+
const rowIndex = index === undefined ? dataIndex : index;
|
|
414
414
|
const classList = rowIndex % 2 === 1 ? ['mat-row-odd'] : [];
|
|
415
415
|
if (rowClassFormatter) {
|
|
416
416
|
for (const key of Object.keys(rowClassFormatter)) {
|
|
@@ -676,7 +676,13 @@ class MtxGridColumnMenu {
|
|
|
676
676
|
moveItemInArray(this.columns, e.previousIndex, e.currentIndex);
|
|
677
677
|
this.columnChange.emit(this.columns);
|
|
678
678
|
}
|
|
679
|
-
_handleChecked(
|
|
679
|
+
_handleChecked(col) {
|
|
680
|
+
if (this.selectableChecked === 'show') {
|
|
681
|
+
col.hide = !col.show;
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
col.show = !col.hide;
|
|
685
|
+
}
|
|
680
686
|
this.columnChange.emit(this.columns);
|
|
681
687
|
}
|
|
682
688
|
_handlePinSelect(col, val) {
|
|
@@ -686,7 +692,7 @@ class MtxGridColumnMenu {
|
|
|
686
692
|
}
|
|
687
693
|
}
|
|
688
694
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxGridColumnMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
689
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: MtxGridColumnMenu, isStandalone: true, selector: "mtx-grid-column-menu", inputs: { columns: "columns", selectable: "selectable", selectableChecked: "selectableChecked", sortable: "sortable", pinnable: "pinnable", buttonText: "buttonText", buttonType: "buttonType", buttonColor: "buttonColor", buttonClass: "buttonClass", buttonIcon: "buttonIcon", showHeader: "showHeader", headerText: "headerText", headerTemplate: "headerTemplate", showFooter: "showFooter", footerText: "footerText", footerTemplate: "footerTemplate", pinOptions: "pinOptions" }, outputs: { columnChange: "columnChange" }, viewQueries: [{ propertyName: "menuPanel", first: true, predicate: ["menu"], descendants: true, static: true }, { propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], exportAs: ["mtxGridColumnMenu"], ngImport: i0, template: "@switch (buttonType) {\n @case ('raised') {\n <button [ngClass]=\"buttonClass\" mat-raised-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('stroked') {\n <button [ngClass]=\"buttonClass\" mat-stroked-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('flat') {\n <button [ngClass]=\"buttonClass\" mat-flat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('icon') {\n <button [ngClass]=\"buttonClass\" mat-icon-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n </button>\n }\n @case ('fab') {\n <button [ngClass]=\"buttonClass\" mat-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('mini-fab') {\n <button [ngClass]=\"buttonClass\" mat-mini-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @default {\n <button [ngClass]=\"buttonClass\" mat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n}\n\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\n <div class=\"mtx-grid-column-menu-content\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n @if (showHeader) {\n <div class=\"mtx-grid-column-menu-header\">\n @if (headerTemplate) {\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n } @else {\n {{headerText}}\n }\n </div>\n }\n\n <div class=\"mtx-grid-column-menu-body\">\n @if (sortable) {\n <div class=\"mtx-grid-column-menu-list\"\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\"\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\" />\n </svg>\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n\n @if (!sortable) {\n <div class=\"mtx-grid-column-menu-list\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\">\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"mtx-grid-column-menu-footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n {{footerText}}\n }\n </div>\n }\n </div>\n</mat-menu>\n\n<ng-template #checkboxList let-col>\n @if (pinnable) {\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button type=\"button\"\n [matMenuTriggerFor]=\"pinList\">\n @if (col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\n </svg>\n }\n @if (!col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\n </svg>\n }\n </button>\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\n @for (item of pinOptions; track item) {\n <button class=\"mtx-grid-column-pin-option\" type=\"button\"\n mat-menu-item\n (click)=\"_handlePinSelect(col, item.value)\">\n <span class=\"mtx-grid-column-pin-option-placeholder\">\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\n @if (col.pinned==item.value) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\n </svg>\n }\n </span>\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\n </button>\n }\n </mat-menu>\n }\n\n @if (selectable) {\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\"\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\n (change)=\"_handleChecked($event)\">{{col.header | toObservable | async}}</mat-checkbox>\n } @else {\n <span class=\"mtx-grid-column-menu-item-label\">{{col.header | toObservable | async}}</span>\n }\n</ng-template>\n", styles: [".mtx-grid-column-menu{color:var(--mtx-grid-column-menu-text-color)}.mtx-grid-column-menu .mat-mdc-menu-content{padding:0}.mtx-grid-column-menu-body{max-height:65vh;padding:8px 16px;overflow:auto}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0;border-bottom:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-footer{bottom:0;border-top:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 40px;padding:8px}.mtx-grid-column-pin-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px;vertical-align:middle}.mtx-grid-column-pin-option-text{padding:0 8px;vertical-align:middle}.mtx-grid-column-drag-handle-icon:hover{cursor:move}.mtx-grid-column-menu-item-label.mat-mdc-checkbox .mat-mdc-checkbox-touch-target{width:100%;height:100%}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "pipe", type: MtxToObservablePipe, name: "toObservable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
695
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: MtxGridColumnMenu, isStandalone: true, selector: "mtx-grid-column-menu", inputs: { columns: "columns", selectable: "selectable", selectableChecked: "selectableChecked", sortable: "sortable", pinnable: "pinnable", buttonText: "buttonText", buttonType: "buttonType", buttonColor: "buttonColor", buttonClass: "buttonClass", buttonIcon: "buttonIcon", showHeader: "showHeader", headerText: "headerText", headerTemplate: "headerTemplate", showFooter: "showFooter", footerText: "footerText", footerTemplate: "footerTemplate", pinOptions: "pinOptions" }, outputs: { columnChange: "columnChange" }, viewQueries: [{ propertyName: "menuPanel", first: true, predicate: ["menu"], descendants: true, static: true }, { propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], exportAs: ["mtxGridColumnMenu"], ngImport: i0, template: "@switch (buttonType) {\n @case ('raised') {\n <button [ngClass]=\"buttonClass\" mat-raised-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('stroked') {\n <button [ngClass]=\"buttonClass\" mat-stroked-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('flat') {\n <button [ngClass]=\"buttonClass\" mat-flat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('icon') {\n <button [ngClass]=\"buttonClass\" mat-icon-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n </button>\n }\n @case ('fab') {\n <button [ngClass]=\"buttonClass\" mat-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('mini-fab') {\n <button [ngClass]=\"buttonClass\" mat-mini-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @default {\n <button [ngClass]=\"buttonClass\" mat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n}\n\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\n <div class=\"mtx-grid-column-menu-content\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n @if (showHeader) {\n <div class=\"mtx-grid-column-menu-header\">\n @if (headerTemplate) {\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n } @else {\n {{headerText}}\n }\n </div>\n }\n\n <div class=\"mtx-grid-column-menu-body\">\n @if (sortable) {\n <div class=\"mtx-grid-column-menu-list\"\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\"\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\" />\n </svg>\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n\n @if (!sortable) {\n <div class=\"mtx-grid-column-menu-list\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\">\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"mtx-grid-column-menu-footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n {{footerText}}\n }\n </div>\n }\n </div>\n</mat-menu>\n\n<ng-template #checkboxList let-col>\n @if (pinnable) {\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button type=\"button\"\n [matMenuTriggerFor]=\"pinList\">\n @if (col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\n </svg>\n }\n @if (!col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\n </svg>\n }\n </button>\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\n @for (item of pinOptions; track item) {\n <button class=\"mtx-grid-column-pin-option\" type=\"button\"\n mat-menu-item\n (click)=\"_handlePinSelect(col, item.value)\">\n <span class=\"mtx-grid-column-pin-option-placeholder\">\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\n @if (col.pinned==item.value) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\n </svg>\n }\n </span>\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\n </button>\n }\n </mat-menu>\n }\n\n @if (selectable) {\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\"\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\n (change)=\"_handleChecked(col)\">{{col.header | toObservable | async}}</mat-checkbox>\n } @else {\n <span class=\"mtx-grid-column-menu-item-label\">{{col.header | toObservable | async}}</span>\n }\n</ng-template>\n", styles: [".mtx-grid-column-menu{color:var(--mtx-grid-column-menu-text-color)}.mtx-grid-column-menu .mat-mdc-menu-content{padding:0}.mtx-grid-column-menu-body{max-height:65vh;padding:8px 16px;overflow:auto}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0;border-bottom:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-footer{bottom:0;border-top:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 40px;padding:8px}.mtx-grid-column-pin-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px;vertical-align:middle}.mtx-grid-column-pin-option-text{padding:0 8px;vertical-align:middle}.mtx-grid-column-drag-handle-icon:hover{cursor:move}.mtx-grid-column-menu-item-label.mat-mdc-checkbox .mat-mdc-checkbox-touch-target{width:100%;height:100%}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "pipe", type: MtxToObservablePipe, name: "toObservable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
690
696
|
}
|
|
691
697
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxGridColumnMenu, decorators: [{
|
|
692
698
|
type: Component,
|
|
@@ -707,7 +713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImpor
|
|
|
707
713
|
CdkDrag,
|
|
708
714
|
CdkDropList,
|
|
709
715
|
MtxToObservablePipe,
|
|
710
|
-
], template: "@switch (buttonType) {\n @case ('raised') {\n <button [ngClass]=\"buttonClass\" mat-raised-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('stroked') {\n <button [ngClass]=\"buttonClass\" mat-stroked-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('flat') {\n <button [ngClass]=\"buttonClass\" mat-flat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('icon') {\n <button [ngClass]=\"buttonClass\" mat-icon-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n </button>\n }\n @case ('fab') {\n <button [ngClass]=\"buttonClass\" mat-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('mini-fab') {\n <button [ngClass]=\"buttonClass\" mat-mini-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @default {\n <button [ngClass]=\"buttonClass\" mat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n}\n\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\n <div class=\"mtx-grid-column-menu-content\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n @if (showHeader) {\n <div class=\"mtx-grid-column-menu-header\">\n @if (headerTemplate) {\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n } @else {\n {{headerText}}\n }\n </div>\n }\n\n <div class=\"mtx-grid-column-menu-body\">\n @if (sortable) {\n <div class=\"mtx-grid-column-menu-list\"\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\"\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\" />\n </svg>\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n\n @if (!sortable) {\n <div class=\"mtx-grid-column-menu-list\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\">\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"mtx-grid-column-menu-footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n {{footerText}}\n }\n </div>\n }\n </div>\n</mat-menu>\n\n<ng-template #checkboxList let-col>\n @if (pinnable) {\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button type=\"button\"\n [matMenuTriggerFor]=\"pinList\">\n @if (col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\n </svg>\n }\n @if (!col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\n </svg>\n }\n </button>\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\n @for (item of pinOptions; track item) {\n <button class=\"mtx-grid-column-pin-option\" type=\"button\"\n mat-menu-item\n (click)=\"_handlePinSelect(col, item.value)\">\n <span class=\"mtx-grid-column-pin-option-placeholder\">\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\n @if (col.pinned==item.value) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\n </svg>\n }\n </span>\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\n </button>\n }\n </mat-menu>\n }\n\n @if (selectable) {\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\"\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\n (change)=\"_handleChecked(
|
|
716
|
+
], template: "@switch (buttonType) {\n @case ('raised') {\n <button [ngClass]=\"buttonClass\" mat-raised-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('stroked') {\n <button [ngClass]=\"buttonClass\" mat-stroked-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('flat') {\n <button [ngClass]=\"buttonClass\" mat-flat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('icon') {\n <button [ngClass]=\"buttonClass\" mat-icon-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n </button>\n }\n @case ('fab') {\n <button [ngClass]=\"buttonClass\" mat-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @case ('mini-fab') {\n <button [ngClass]=\"buttonClass\" mat-mini-fab type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n @default {\n <button [ngClass]=\"buttonClass\" mat-button type=\"button\" [color]=\"buttonColor\"\n [matMenuTriggerFor]=\"menu\">\n @if (buttonIcon) {\n <mat-icon>{{buttonIcon}}</mat-icon>\n }\n {{buttonText}}\n </button>\n }\n}\n\n<mat-menu #menu=\"matMenu\" class=\"mtx-grid-column-menu\">\n <div class=\"mtx-grid-column-menu-content\"\n (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n @if (showHeader) {\n <div class=\"mtx-grid-column-menu-header\">\n @if (headerTemplate) {\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n } @else {\n {{headerText}}\n }\n </div>\n }\n\n <div class=\"mtx-grid-column-menu-body\">\n @if (sortable) {\n <div class=\"mtx-grid-column-menu-list\"\n cdkDropList (cdkDropListDropped)=\"_handleDroped($event)\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\"\n cdkDrag [cdkDragDisabled]=\"selectableChecked === 'show'? !col.show : col.hide\">\n <svg class=\"mtx-grid-icon mtx-grid-column-drag-handle-icon\" viewBox=\"0 0 24 24\"\n width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z\" />\n </svg>\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n\n @if (!sortable) {\n <div class=\"mtx-grid-column-menu-list\">\n @for (col of columns; track col) {\n <div class=\"mtx-grid-column-menu-item\">\n <ng-template [ngTemplateOutlet]=\"checkboxList\"\n [ngTemplateOutletContext]=\"{ $implicit: col }\">\n </ng-template>\n </div>\n }\n </div>\n }\n </div>\n\n @if (showFooter) {\n <div class=\"mtx-grid-column-menu-footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n {{footerText}}\n }\n </div>\n }\n </div>\n</mat-menu>\n\n<ng-template #checkboxList let-col>\n @if (pinnable) {\n <button class=\"mtx-grid-column-pin-button\" mat-icon-button type=\"button\"\n [matMenuTriggerFor]=\"pinList\">\n @if (col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z\" />\n </svg>\n }\n @if (!col.pinned) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-off-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\" />\n </svg>\n }\n </button>\n <mat-menu #pinList=\"matMenu\" class=\"mtx-grid-column-pin-list\">\n @for (item of pinOptions; track item) {\n <button class=\"mtx-grid-column-pin-option\" type=\"button\"\n mat-menu-item\n (click)=\"_handlePinSelect(col, item.value)\">\n <span class=\"mtx-grid-column-pin-option-placeholder\">\n <!-- eslint-disable-next-line @angular-eslint/template/eqeqeq -->\n @if (col.pinned==item.value) {\n <svg class=\"mtx-grid-icon mtx-grid-column-pin-check-icon\"\n viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\">\n <path d=\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\" />\n </svg>\n }\n </span>\n <span class=\"mtx-grid-column-pin-option-text\">{{item.label | toObservable | async}}</span>\n </button>\n }\n </mat-menu>\n }\n\n @if (selectable) {\n <mat-checkbox class=\"mtx-grid-column-menu-item-label\"\n [(ngModel)]=\"col[selectableChecked]\" [disabled]=\"col.disabled\"\n (change)=\"_handleChecked(col)\">{{col.header | toObservable | async}}</mat-checkbox>\n } @else {\n <span class=\"mtx-grid-column-menu-item-label\">{{col.header | toObservable | async}}</span>\n }\n</ng-template>\n", styles: [".mtx-grid-column-menu{color:var(--mtx-grid-column-menu-text-color)}.mtx-grid-column-menu .mat-mdc-menu-content{padding:0}.mtx-grid-column-menu-body{max-height:65vh;padding:8px 16px;overflow:auto}.mtx-grid-column-menu-header,.mtx-grid-column-menu-footer{position:sticky;z-index:1;padding:8px 16px}.mtx-grid-column-menu-header{top:0;border-bottom:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-footer{bottom:0;border-top:1px solid var(--mtx-grid-column-menu-divider-color)}.mtx-grid-column-menu-list{display:block;max-width:100%}.mtx-grid-column-menu-list.cdk-drop-list-dragging .mtx-grid-column-menu-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-menu-item{display:flex;flex-direction:row;align-items:center}.mtx-grid-column-menu-item.cdk-drag-disabled .cdk-drag-handle{opacity:.35;cursor:no-drop}.mtx-grid-column-menu-item .cdk-drag-handle{cursor:move}.mtx-grid-column-menu-item.cdk-drag-preview{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mtx-grid-column-menu-item.cdk-drag-placeholder{opacity:0}.mtx-grid-column-menu-item.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mtx-grid-column-pin-button.mat-mdc-icon-button{--mdc-icon-button-state-layer-size: 40px;padding:8px}.mtx-grid-column-pin-button.mat-mdc-icon-button .mat-mdc-button-touch-target{width:100%;height:100%}.mtx-grid-column-pin-option.mat-menu-item{display:flex;align-items:center;height:32px}.mtx-grid-column-pin-option-placeholder{display:inline-block;width:20px;height:20px;line-height:20px;vertical-align:middle}.mtx-grid-column-pin-option-text{padding:0 8px;vertical-align:middle}.mtx-grid-column-drag-handle-icon:hover{cursor:move}.mtx-grid-column-menu-item-label.mat-mdc-checkbox .mat-mdc-checkbox-touch-target{width:100%;height:100%}\n"] }]
|
|
711
717
|
}], propDecorators: { menuPanel: [{
|
|
712
718
|
type: ViewChild,
|
|
713
719
|
args: ['menu', { static: true }]
|
|
@@ -1042,18 +1048,19 @@ class MtxGrid {
|
|
|
1042
1048
|
_getColData(data, colDef) {
|
|
1043
1049
|
return this._utils.getColData(data, colDef);
|
|
1044
1050
|
}
|
|
1051
|
+
_isColumnHide(item) {
|
|
1052
|
+
return item.hide !== undefined ? item.hide : item.show !== undefined ? !item.show : false;
|
|
1053
|
+
}
|
|
1045
1054
|
// Waiting for async data
|
|
1046
1055
|
ngOnChanges(changes) {
|
|
1047
1056
|
this._countPinnedPosition();
|
|
1048
|
-
this.displayedColumns = this.columns
|
|
1057
|
+
this.displayedColumns = this.columns
|
|
1058
|
+
.filter(item => !this._isColumnHide(item))
|
|
1059
|
+
.map(item => item.field);
|
|
1049
1060
|
if (this.showColumnMenuButton) {
|
|
1050
1061
|
this.columns.forEach(item => {
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1054
|
-
else {
|
|
1055
|
-
item.hide = !!item.hide;
|
|
1056
|
-
}
|
|
1062
|
+
item.hide = this._isColumnHide(item);
|
|
1063
|
+
item.show = !item.hide;
|
|
1057
1064
|
});
|
|
1058
1065
|
}
|
|
1059
1066
|
if (this.rowSelectable && !this.hideRowSelectionCheckbox) {
|
|
@@ -1109,7 +1116,7 @@ class MtxGrid {
|
|
|
1109
1116
|
});
|
|
1110
1117
|
}
|
|
1111
1118
|
_getIndex(index, dataIndex) {
|
|
1112
|
-
return
|
|
1119
|
+
return index === undefined ? dataIndex : index;
|
|
1113
1120
|
}
|
|
1114
1121
|
_onSortChange(sort) {
|
|
1115
1122
|
this.sortChange.emit(sort);
|