matcha-components 20.277.0 → 20.278.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/matcha-components.mjs +1004 -15
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/index.d.ts +319 -8
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnChanges, EventEmitter, SimpleChanges, AfterContentInit, OnDestroy, QueryList, ElementRef, Renderer2, InjectionToken, ChangeDetectorRef, AfterViewInit, PipeTransform, AfterViewChecked, TemplateRef, NgZone, ApplicationRef, Injector, RendererFactory2, Type, ComponentRef } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
|
-
import { ControlValueAccessor, FormControlName, Validator, FormControl, ValidationErrors, NgControl, AbstractControl } from '@angular/forms';
|
|
5
|
+
import { ControlValueAccessor, FormControlName, Validator, FormControl, ValidationErrors, NgControl, FormGroup, AbstractControl } from '@angular/forms';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import { Observable, Subject } from 'rxjs';
|
|
8
8
|
import { HttpClient } from '@angular/common/http';
|
|
@@ -2169,19 +2169,183 @@ declare class MatchaDateRangeComponent implements AfterContentInit, OnDestroy {
|
|
|
2169
2169
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatchaDateRangeComponent, "matcha-date-range", never, {}, {}, ["controls"], ["*"], false, never>;
|
|
2170
2170
|
}
|
|
2171
2171
|
|
|
2172
|
-
|
|
2172
|
+
/**
|
|
2173
|
+
* Serviço de internacionalização do matcha-calendar-picker.
|
|
2174
|
+
* Inspirado no MatchaPaginatorIntl, porém registrado APENAS via
|
|
2175
|
+
* `providedIn: 'root'` — nunca em `providers:` de módulo. Isso garante uma
|
|
2176
|
+
* única instância em todo o app mesmo com lazy loading (o registro em
|
|
2177
|
+
* `providers` de um módulo lazy criaria uma instância separada no injector
|
|
2178
|
+
* daquele módulo, e as alterações de label não chegariam ao componente).
|
|
2179
|
+
*
|
|
2180
|
+
* Uso no app consumidor:
|
|
2181
|
+
* constructor(private calendarIntl: MatchaCalendarIntl) {}
|
|
2182
|
+
* setEnglish() {
|
|
2183
|
+
* this.calendarIntl.monthNames = ['January', ...];
|
|
2184
|
+
* this.calendarIntl.changes.next();
|
|
2185
|
+
* }
|
|
2186
|
+
*/
|
|
2187
|
+
declare class MatchaCalendarIntl {
|
|
2188
|
+
/** Emite quando os labels mudam. O picker reconstrói as células ao receber. */
|
|
2189
|
+
readonly changes: Subject<void>;
|
|
2190
|
+
/** Nomes completos dos meses (view de meses). Índice 0 = Janeiro. */
|
|
2191
|
+
monthNames: string[];
|
|
2192
|
+
/** Nomes abreviados dos meses (cabeçalho da view de dias). Índice 0 = Jan. */
|
|
2193
|
+
monthNamesShort: string[];
|
|
2194
|
+
/** Abreviações dos dias da semana (cabeçalho do grid). Índice 0 = Domingo. */
|
|
2195
|
+
weekdayNamesShort: string[];
|
|
2196
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaCalendarIntl, never>;
|
|
2197
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatchaCalendarIntl>;
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
/** Níveis de navegação do calendário. */
|
|
2201
|
+
type MatchaCalendarView = 'day' | 'month' | 'year';
|
|
2202
|
+
interface MatchaCalendarDayCell {
|
|
2203
|
+
/** Data no formato 'YYYY-MM-DD'. */
|
|
2204
|
+
date: string;
|
|
2205
|
+
day: number;
|
|
2206
|
+
inCurrentMonth: boolean;
|
|
2207
|
+
selected: boolean;
|
|
2208
|
+
disabled: boolean;
|
|
2209
|
+
isToday: boolean;
|
|
2210
|
+
}
|
|
2211
|
+
interface MatchaCalendarMonthCell {
|
|
2212
|
+
month: number;
|
|
2213
|
+
label: string;
|
|
2214
|
+
selected: boolean;
|
|
2215
|
+
disabled: boolean;
|
|
2216
|
+
}
|
|
2217
|
+
interface MatchaCalendarYearCell {
|
|
2218
|
+
year: number;
|
|
2219
|
+
selected: boolean;
|
|
2220
|
+
disabled: boolean;
|
|
2221
|
+
}
|
|
2222
|
+
/**
|
|
2223
|
+
* Calendário/datepicker apresentacional com três views (dias, meses, anos).
|
|
2224
|
+
*
|
|
2225
|
+
* É um componente "burro": recebe `value`/`min`/`max` (todos no formato
|
|
2226
|
+
* 'YYYY-MM-DD') e emite `dateChange` com a data selecionada. Não implementa
|
|
2227
|
+
* ControlValueAccessor — o host (ex: matcha-date) é quem mantém o valor.
|
|
2228
|
+
*
|
|
2229
|
+
* Tradução via {@link MatchaCalendarIntl} (global) ou pelos @Inputs de label
|
|
2230
|
+
* (override por instância). Os arrays de label são CACHEADOS dentro das
|
|
2231
|
+
* células, por isso reconstruímos as células quando `intl.changes` emite.
|
|
2232
|
+
*/
|
|
2233
|
+
declare class MatchaCalendarPickerComponent implements OnChanges, OnDestroy {
|
|
2234
|
+
intl: MatchaCalendarIntl;
|
|
2235
|
+
private cdr;
|
|
2236
|
+
/** Data selecionada no formato 'YYYY-MM-DD' (ou null). */
|
|
2237
|
+
value: string | null;
|
|
2238
|
+
/** Limite inferior 'YYYY-MM-DD' (ou '' para sem limite). */
|
|
2239
|
+
min: string;
|
|
2240
|
+
/** Limite superior 'YYYY-MM-DD' (ou '' para sem limite). */
|
|
2241
|
+
max: string;
|
|
2242
|
+
/** Override por instância dos nomes completos de mês (12). */
|
|
2243
|
+
monthNames?: string[];
|
|
2244
|
+
/** Override por instância dos nomes abreviados de mês (12). */
|
|
2245
|
+
monthNamesShort?: string[];
|
|
2246
|
+
/** Override por instância das abreviações de dia da semana (7, índice 0 = Domingo). */
|
|
2247
|
+
weekdayNamesShort?: string[];
|
|
2248
|
+
/** Emite a data selecionada no formato 'YYYY-MM-DD'. */
|
|
2249
|
+
dateChange: EventEmitter<string>;
|
|
2250
|
+
view: MatchaCalendarView;
|
|
2251
|
+
activeYear: number;
|
|
2252
|
+
activeMonth: number;
|
|
2253
|
+
decadeStart: number;
|
|
2254
|
+
weekdayHeaders: string[];
|
|
2255
|
+
dayCells: MatchaCalendarDayCell[];
|
|
2256
|
+
monthCells: MatchaCalendarMonthCell[];
|
|
2257
|
+
yearCells: MatchaCalendarYearCell[];
|
|
2258
|
+
private selectedDate;
|
|
2259
|
+
private minDate;
|
|
2260
|
+
private maxDate;
|
|
2261
|
+
private userNavigated;
|
|
2262
|
+
private intlSub;
|
|
2263
|
+
constructor(intl: MatchaCalendarIntl, cdr: ChangeDetectorRef);
|
|
2264
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2265
|
+
ngOnDestroy(): void;
|
|
2266
|
+
private get months();
|
|
2267
|
+
private get monthsShort();
|
|
2268
|
+
private get weekdays();
|
|
2269
|
+
get activeMonthLabelShort(): string;
|
|
2270
|
+
get decadeLabel(): string;
|
|
2271
|
+
private parseYmd;
|
|
2272
|
+
private formatYmd;
|
|
2273
|
+
private parseSelection;
|
|
2274
|
+
private parseBounds;
|
|
2275
|
+
private initActiveFromToday;
|
|
2276
|
+
/** Posiciona o período exibido na seleção, ou hoje, clampando para [min,max]. */
|
|
2277
|
+
private syncActiveToSelection;
|
|
2278
|
+
/** Reposiciona a view ao reabrir (chamado pelo host). */
|
|
2279
|
+
resetView(): void;
|
|
2280
|
+
private rebuildAll;
|
|
2281
|
+
private buildDayGrid;
|
|
2282
|
+
private buildMonthGrid;
|
|
2283
|
+
private buildYearGrid;
|
|
2284
|
+
private isSelected;
|
|
2285
|
+
private isToday;
|
|
2286
|
+
private isDateDisabled;
|
|
2287
|
+
private isMonthFullyOutOfRange;
|
|
2288
|
+
private isYearFullyOutOfRange;
|
|
2289
|
+
prev(): void;
|
|
2290
|
+
next(): void;
|
|
2291
|
+
private shift;
|
|
2292
|
+
openMonthView(): void;
|
|
2293
|
+
openYearView(): void;
|
|
2294
|
+
selectDay(cell: MatchaCalendarDayCell): void;
|
|
2295
|
+
selectMonth(cell: MatchaCalendarMonthCell): void;
|
|
2296
|
+
selectYear(cell: MatchaCalendarYearCell): void;
|
|
2297
|
+
/** trackBy para os grids (evita recriar nós ao reconstruir). */
|
|
2298
|
+
trackByDate(_: number, cell: MatchaCalendarDayCell): string;
|
|
2299
|
+
trackByMonth(_: number, cell: MatchaCalendarMonthCell): number;
|
|
2300
|
+
trackByYear(_: number, cell: MatchaCalendarYearCell): number;
|
|
2301
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaCalendarPickerComponent, never>;
|
|
2302
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatchaCalendarPickerComponent, "matcha-calendar-picker", never, { "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "monthNames": { "alias": "monthNames"; "required": false; }; "monthNamesShort": { "alias": "monthNamesShort"; "required": false; }; "weekdayNamesShort": { "alias": "weekdayNamesShort"; "required": false; }; }, { "dateChange": "dateChange"; }, never, never, false, never>;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
declare class MatchaDateComponent implements ControlValueAccessor, AfterViewInit {
|
|
2306
|
+
private elRef;
|
|
2307
|
+
private cdr;
|
|
2173
2308
|
placeholder: string;
|
|
2174
2309
|
min: string;
|
|
2175
2310
|
max: string;
|
|
2176
2311
|
disabled: boolean;
|
|
2177
2312
|
showNativePicker: boolean;
|
|
2313
|
+
/**
|
|
2314
|
+
* Define o que o botão de calendário faz ao ser clicado.
|
|
2315
|
+
* - true (padrão): abre o datepicker nativo do navegador (comportamento histórico).
|
|
2316
|
+
* - false: NÃO abre o nativo. A abertura passa a ser responsabilidade do
|
|
2317
|
+
* matcha-calendar-picker (Parte 2), que conterá essa lógica.
|
|
2318
|
+
*/
|
|
2319
|
+
useNativePicker: boolean;
|
|
2320
|
+
/**
|
|
2321
|
+
* Quando true, o painel do matcha-calendar-picker NÃO dispara o evento global
|
|
2322
|
+
* que fecha os demais painéis. Use quando este matcha-date estiver ANINHADO
|
|
2323
|
+
* dentro de outro matcha-panel (ex: o modo "Personalizado" do matcha-period),
|
|
2324
|
+
* para que abrir o calendário não feche o painel pai.
|
|
2325
|
+
*/
|
|
2326
|
+
suppressPanelGlobalClose: boolean;
|
|
2327
|
+
/**
|
|
2328
|
+
* Emite o elemento do painel do calendário quando ele abre/fecha. O painel
|
|
2329
|
+
* pai (quando aninhado) usa esses elementos em `ignoreClickOutsideElements`
|
|
2330
|
+
* para não fechar ao clicar dentro do calendário.
|
|
2331
|
+
*/
|
|
2332
|
+
calendarPanelOpened: EventEmitter<HTMLElement>;
|
|
2333
|
+
calendarPanelClosed: EventEmitter<HTMLElement>;
|
|
2178
2334
|
textInput: ElementRef<HTMLInputElement>;
|
|
2179
2335
|
nativeDateInput: ElementRef<HTMLInputElement>;
|
|
2336
|
+
calendarPanel?: MatchaPanelComponent;
|
|
2337
|
+
calendarPicker?: MatchaCalendarPickerComponent;
|
|
2180
2338
|
value: string;
|
|
2181
2339
|
displayValue: string;
|
|
2182
2340
|
isDisabled: boolean;
|
|
2183
2341
|
private onChange;
|
|
2184
2342
|
private onTouched;
|
|
2343
|
+
/** Overlay do calendário atualmente aberto (emitido ao pai quando aninhado). */
|
|
2344
|
+
private lastCalendarPane?;
|
|
2345
|
+
constructor(elRef: ElementRef, cdr: ChangeDetectorRef);
|
|
2346
|
+
ngAfterViewInit(): void;
|
|
2347
|
+
/** Elemento âncora do painel: o matcha-form-field envolvente, ou o host. */
|
|
2348
|
+
private panelAnchor;
|
|
2185
2349
|
writeValue(value: any): void;
|
|
2186
2350
|
registerOnChange(fn: any): void;
|
|
2187
2351
|
registerOnTouched(fn: any): void;
|
|
@@ -2192,17 +2356,26 @@ declare class MatchaDateComponent implements ControlValueAccessor {
|
|
|
2192
2356
|
onNativeDateChange(event: Event): void;
|
|
2193
2357
|
onBlur(): void;
|
|
2194
2358
|
openNativeDatePicker(): void;
|
|
2359
|
+
/** Dia selecionado no matcha-calendar-picker (recebe 'YYYY-MM-DD'). */
|
|
2360
|
+
onCalendarDateSelected(ymd: string): void;
|
|
2361
|
+
onCalendarPanelClosed(): void;
|
|
2195
2362
|
private isValidDateFormat;
|
|
2196
2363
|
private isValidDate;
|
|
2197
2364
|
private convertToYYYYMMDD;
|
|
2198
2365
|
private formatDateForDisplay;
|
|
2199
2366
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaDateComponent, never>;
|
|
2200
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatchaDateComponent, "matcha-date", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showNativePicker": { "alias": "showNativePicker"; "required": false; }; }, {}, never, never, false, never>;
|
|
2367
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatchaDateComponent, "matcha-date", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showNativePicker": { "alias": "showNativePicker"; "required": false; }; "useNativePicker": { "alias": "useNativePicker"; "required": false; }; "suppressPanelGlobalClose": { "alias": "suppressPanelGlobalClose"; "required": false; }; }, { "calendarPanelOpened": "calendarPanelOpened"; "calendarPanelClosed": "calendarPanelClosed"; }, never, never, false, never>;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
declare class MatchaCalendarPickerModule {
|
|
2371
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaCalendarPickerModule, never>;
|
|
2372
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaCalendarPickerModule, [typeof MatchaCalendarPickerComponent], [typeof i2.CommonModule, typeof MatchaCardModule, typeof MatchaIconModule, typeof MatchaDividerModule], [typeof MatchaCalendarPickerComponent]>;
|
|
2373
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaCalendarPickerModule>;
|
|
2201
2374
|
}
|
|
2202
2375
|
|
|
2203
2376
|
declare class MatchaDateModule {
|
|
2204
2377
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaDateModule, never>;
|
|
2205
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaDateModule, [typeof MatchaDateComponent], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof MatchaDateComponent]>;
|
|
2378
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaDateModule, [typeof MatchaDateComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof MatchaPanelModule, typeof MatchaCalendarPickerModule], [typeof MatchaDateComponent]>;
|
|
2206
2379
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaDateModule>;
|
|
2207
2380
|
}
|
|
2208
2381
|
|
|
@@ -2212,6 +2385,144 @@ declare class MatchaDateRangeModule {
|
|
|
2212
2385
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaDateRangeModule>;
|
|
2213
2386
|
}
|
|
2214
2387
|
|
|
2388
|
+
/**
|
|
2389
|
+
* Tipagem pública do componente matcha-period (seletor de período / presets).
|
|
2390
|
+
*/
|
|
2391
|
+
/** Intervalo de datas (início e fim). */
|
|
2392
|
+
interface MatchaPeriodRange {
|
|
2393
|
+
start: Date;
|
|
2394
|
+
end: Date;
|
|
2395
|
+
}
|
|
2396
|
+
/**
|
|
2397
|
+
* Preset de período passado via @Input.
|
|
2398
|
+
*
|
|
2399
|
+
* Padrão rígido: cada preset é auto-contido e sabe calcular o próprio intervalo
|
|
2400
|
+
* através de `getRange()`. Isso permite presets dinâmicos (ex.: "Hoje", "Últimos
|
|
2401
|
+
* 7 dias") que recalculam a data relativa ao momento da seleção.
|
|
2402
|
+
*/
|
|
2403
|
+
interface MatchaPeriodPreset {
|
|
2404
|
+
/** Identificador único e estável do preset (usado no valor emitido). */
|
|
2405
|
+
key: string;
|
|
2406
|
+
/** Texto exibido na lista. */
|
|
2407
|
+
label: string;
|
|
2408
|
+
/** Calcula o intervalo de datas deste preset. */
|
|
2409
|
+
getRange: () => MatchaPeriodRange;
|
|
2410
|
+
}
|
|
2411
|
+
/**
|
|
2412
|
+
* Valor do componente: intervalo selecionado + a chave do preset de origem.
|
|
2413
|
+
* `presetKey` é `null` quando o intervalo veio do modo "Personalizado".
|
|
2414
|
+
*/
|
|
2415
|
+
interface MatchaPeriodValue {
|
|
2416
|
+
start: Date;
|
|
2417
|
+
end: Date;
|
|
2418
|
+
presetKey: string | null;
|
|
2419
|
+
}
|
|
2420
|
+
/** Formatos aceitos para exibir o intervalo no gatilho do componente. */
|
|
2421
|
+
type MatchaPeriodDisplayFormat = 'dd/MM/yy' | 'dd/MM/yyyy';
|
|
2422
|
+
|
|
2423
|
+
declare class MatchaPeriodComponent implements AfterViewInit, ControlValueAccessor {
|
|
2424
|
+
elRef: ElementRef;
|
|
2425
|
+
private cdr;
|
|
2426
|
+
panel: MatchaPanelComponent;
|
|
2427
|
+
/** Lista de presets exibidos. Cada preset é auto-contido (ver matcha-period.types). */
|
|
2428
|
+
presets: MatchaPeriodPreset[];
|
|
2429
|
+
/** Habilita a opção "Personalizado" (com Data início / Data fim). */
|
|
2430
|
+
allowCustom: boolean;
|
|
2431
|
+
/** Texto exibido no gatilho quando não há valor. */
|
|
2432
|
+
placeholder: string;
|
|
2433
|
+
/** Rótulo da opção de período personalizado. */
|
|
2434
|
+
customLabel: string;
|
|
2435
|
+
/** Formato do intervalo exibido no gatilho. */
|
|
2436
|
+
displayFormat: MatchaPeriodDisplayFormat;
|
|
2437
|
+
disabled: boolean;
|
|
2438
|
+
placement: PanelPlacement;
|
|
2439
|
+
maxHeight: number;
|
|
2440
|
+
minWidth: number;
|
|
2441
|
+
/** Emite sempre que um intervalo é definido (preset selecionado ou "Aplicar" do custom). */
|
|
2442
|
+
periodChange: EventEmitter<MatchaPeriodValue>;
|
|
2443
|
+
opened: EventEmitter<void>;
|
|
2444
|
+
closed: EventEmitter<void>;
|
|
2445
|
+
openedChange: EventEmitter<boolean>;
|
|
2446
|
+
value: MatchaPeriodValue | null;
|
|
2447
|
+
open: boolean;
|
|
2448
|
+
showingCustom: boolean;
|
|
2449
|
+
/**
|
|
2450
|
+
* Overlays dos calendários (matcha-date aninhados no modo personalizado).
|
|
2451
|
+
* Repassados ao painel via `ignoreClickOutsideElements` para que clicar
|
|
2452
|
+
* dentro de um calendário não feche o painel do período.
|
|
2453
|
+
*/
|
|
2454
|
+
calendarOverlays: HTMLElement[];
|
|
2455
|
+
customForm: FormGroup<{
|
|
2456
|
+
start: FormControl<string | null>;
|
|
2457
|
+
end: FormControl<string | null>;
|
|
2458
|
+
}>;
|
|
2459
|
+
customError: string;
|
|
2460
|
+
activeIndex: number;
|
|
2461
|
+
triggerElement?: HTMLElement;
|
|
2462
|
+
private onChange;
|
|
2463
|
+
private onTouched;
|
|
2464
|
+
private isDisabledByForm;
|
|
2465
|
+
constructor(elRef: ElementRef, cdr: ChangeDetectorRef);
|
|
2466
|
+
get isCurrentlyDisabled(): boolean;
|
|
2467
|
+
get hostDisabledClass(): boolean;
|
|
2468
|
+
get hostDisabledAttr(): string | null;
|
|
2469
|
+
/** Quantidade total de itens navegáveis (presets + custom, se habilitado). */
|
|
2470
|
+
private get navCount();
|
|
2471
|
+
ngAfterViewInit(): void;
|
|
2472
|
+
/** Rótulo exibido no gatilho: intervalo formatado ou placeholder. */
|
|
2473
|
+
get triggerLabel(): string;
|
|
2474
|
+
get hasValue(): boolean;
|
|
2475
|
+
isPresetSelected(preset: MatchaPeriodPreset): boolean;
|
|
2476
|
+
get isCustomSelected(): boolean;
|
|
2477
|
+
get customStartMax(): string;
|
|
2478
|
+
get customEndMin(): string;
|
|
2479
|
+
private formatDate;
|
|
2480
|
+
onTriggerClick(): void;
|
|
2481
|
+
openPanel(): void;
|
|
2482
|
+
closePanel(): void;
|
|
2483
|
+
selectPreset(preset: MatchaPeriodPreset): void;
|
|
2484
|
+
/**
|
|
2485
|
+
* Registra o overlay de um calendário aninhado (ao abrir) para ignorá-lo no
|
|
2486
|
+
* click-outside do painel do período.
|
|
2487
|
+
*
|
|
2488
|
+
* NÃO removemos o overlay quando o calendário fecha: selecionar uma data fecha
|
|
2489
|
+
* o calendário no MESMO clique que ainda propaga até o listener de click-outside
|
|
2490
|
+
* do período. Como o `composedPath()` desse clique ainda contém o pane (mesmo já
|
|
2491
|
+
* destruído), mantê-lo na lista evita que o período feche junto. Panes destruídos
|
|
2492
|
+
* são inofensivos (nunca casam com cliques futuros) e a lista é zerada ao abrir/
|
|
2493
|
+
* fechar o período.
|
|
2494
|
+
*/
|
|
2495
|
+
registerCalendarOverlay(el: HTMLElement): void;
|
|
2496
|
+
/** Abre/realça a área de período personalizado, mantendo o painel aberto. */
|
|
2497
|
+
toggleCustom(): void;
|
|
2498
|
+
applyCustom(): void;
|
|
2499
|
+
private commitValue;
|
|
2500
|
+
/** Converte uma string 'YYYY-MM-DD' válida em Date; retorna null caso contrário. */
|
|
2501
|
+
private parseDate;
|
|
2502
|
+
private syncCustomInputsFromValue;
|
|
2503
|
+
/** Formata um Date para o formato consumido pelo matcha-date ('YYYY-MM-DD'). */
|
|
2504
|
+
private toInputValue;
|
|
2505
|
+
onTriggerKeyDown(event: KeyboardEvent): void;
|
|
2506
|
+
private moveActive;
|
|
2507
|
+
isActiveIndex(index: number): boolean;
|
|
2508
|
+
get isCustomActive(): boolean;
|
|
2509
|
+
private activateCurrent;
|
|
2510
|
+
writeValue(value: MatchaPeriodValue | null): void;
|
|
2511
|
+
registerOnChange(fn: (value: MatchaPeriodValue | null) => void): void;
|
|
2512
|
+
registerOnTouched(fn: () => void): void;
|
|
2513
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2514
|
+
/** Garante que start/end sejam Date (aceita strings/ISO vindas do FormControl). */
|
|
2515
|
+
private normalizeValue;
|
|
2516
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaPeriodComponent, never>;
|
|
2517
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatchaPeriodComponent, "matcha-period", never, { "presets": { "alias": "presets"; "required": false; }; "allowCustom": { "alias": "allowCustom"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customLabel": { "alias": "customLabel"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; }, { "periodChange": "periodChange"; "opened": "opened"; "closed": "closed"; "openedChange": "openedChange"; }, never, never, false, never>;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
declare class MatchaPeriodModule {
|
|
2521
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaPeriodModule, never>;
|
|
2522
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaPeriodModule, [typeof MatchaPeriodComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof MatchaPanelModule, typeof MatchaButtonModule, typeof MatchaIconModule, typeof MatchaDividerModule, typeof MatchaDateModule, typeof MatchaDateRangeModule, typeof MatchaFormFieldModule], [typeof MatchaPeriodComponent]>;
|
|
2523
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaPeriodModule>;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2215
2526
|
declare class MatchaTimeComponent implements ControlValueAccessor, Validator {
|
|
2216
2527
|
placeholder: string;
|
|
2217
2528
|
disabled: boolean;
|
|
@@ -2912,7 +3223,7 @@ declare class MatchaSnackBarComponent implements OnInit, OnDestroy {
|
|
|
2912
3223
|
visible: boolean;
|
|
2913
3224
|
private timeoutId;
|
|
2914
3225
|
get colorAttr(): "error" | "warning" | "info" | "success";
|
|
2915
|
-
get positionAttr(): "
|
|
3226
|
+
get positionAttr(): "top" | "bottom";
|
|
2916
3227
|
get classes(): string;
|
|
2917
3228
|
constructor(snackBarService: MatchaSnackBarService);
|
|
2918
3229
|
ngOnInit(): void;
|
|
@@ -3056,7 +3367,7 @@ declare class MatchaAvatarModule {
|
|
|
3056
3367
|
|
|
3057
3368
|
declare class MatchaComponentsModule {
|
|
3058
3369
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaComponentsModule, never>;
|
|
3059
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaComponentsModule, [typeof MatchaOverflowDraggableComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof MatchaAccordionModule, typeof MatchaAutocompleteModule, typeof MatchaOptionModule, typeof MatchaPanelModule, typeof MatchaSelectModule, typeof MatchaSelectMultipleModule, typeof MatchaButtonModule, typeof MatchaButtonToggleModule, typeof MatchaCardModule, typeof MatchaCheckboxModule, typeof MatchaRadioModule, typeof MatchaDividerModule, typeof MatchaElevationModule, typeof MatchaFormFieldModule, typeof MatchaHintTextModule, typeof MatchaIconModule, typeof MatchaInfiniteScrollModule, typeof MatchaLazyloadModule, typeof MatchaInputPhoneModule, typeof MatchaMasonryModule, typeof MatchaModalModule, typeof MatchaPaginatorModule, typeof MatchaRippleModule, typeof MatchaSlideToggleModule, typeof MatchaMsgBoxModule, typeof MatchaSliderModule, typeof MatchaSpinModule, typeof MatchaSpinnerModule, typeof MatchaProgressBarModule, typeof MatchaStepperModule, typeof MatchaTabsModule, typeof MatchaTitleModule, typeof MatchaTooltipModule, typeof MatchaDateRangeModule, typeof MatchaTimeModule, typeof MatchaTimeRangeModule, typeof MatchaDropListModule, typeof MatchaPageLayoutModule, typeof MatchaDrawerModule, typeof MatchaHighlightModule, typeof MatchaMaskModule, typeof MatchaChipModule, typeof MatchaMenuModule, typeof MatchaListModule, typeof MatchaSnackBarModule, typeof MatchaTextEditorModule], [typeof MatchaAccordionModule, typeof MatchaAutocompleteModule, typeof MatchaOptionModule, typeof MatchaPanelModule, typeof MatchaSelectModule, typeof MatchaSelectMultipleModule, typeof MatchaButtonModule, typeof MatchaButtonToggleModule, typeof MatchaCardModule, typeof MatchaCheckboxModule, typeof MatchaRadioModule, typeof MatchaDividerModule, typeof MatchaElevationModule, typeof MatchaFormFieldModule, typeof MatchaHintTextModule, typeof MatchaIconModule, typeof MatchaInfiniteScrollModule, typeof MatchaLazyloadModule, typeof MatchaInputPhoneModule, typeof MatchaMasonryModule, typeof MatchaModalModule, typeof MatchaPaginatorModule, typeof MatchaRippleModule, typeof MatchaSlideToggleModule, typeof MatchaMsgBoxModule, typeof MatchaSliderModule, typeof MatchaSpinModule, typeof MatchaSpinnerModule, typeof MatchaProgressBarModule, typeof MatchaStepperModule, typeof MatchaTabsModule, typeof MatchaTitleModule, typeof MatchaTooltipModule, typeof MatchaDateRangeModule, typeof MatchaTimeModule, typeof MatchaTimeRangeModule, typeof MatchaDropListModule, typeof MatchaPageLayoutModule, typeof MatchaAvatarModule, typeof MatchaDrawerModule, typeof MatchaHighlightModule, typeof MatchaMaskModule, typeof MatchaChipModule, typeof MatchaMenuModule, typeof MatchaListModule, typeof MatchaSnackBarModule, typeof MatchaTextEditorModule]>;
|
|
3370
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaComponentsModule, [typeof MatchaOverflowDraggableComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof MatchaAccordionModule, typeof MatchaAutocompleteModule, typeof MatchaOptionModule, typeof MatchaPanelModule, typeof MatchaSelectModule, typeof MatchaSelectMultipleModule, typeof MatchaButtonModule, typeof MatchaButtonToggleModule, typeof MatchaCardModule, typeof MatchaCheckboxModule, typeof MatchaRadioModule, typeof MatchaDividerModule, typeof MatchaElevationModule, typeof MatchaFormFieldModule, typeof MatchaHintTextModule, typeof MatchaIconModule, typeof MatchaInfiniteScrollModule, typeof MatchaLazyloadModule, typeof MatchaInputPhoneModule, typeof MatchaMasonryModule, typeof MatchaModalModule, typeof MatchaPaginatorModule, typeof MatchaRippleModule, typeof MatchaSlideToggleModule, typeof MatchaMsgBoxModule, typeof MatchaSliderModule, typeof MatchaSpinModule, typeof MatchaSpinnerModule, typeof MatchaProgressBarModule, typeof MatchaStepperModule, typeof MatchaTabsModule, typeof MatchaTitleModule, typeof MatchaTooltipModule, typeof MatchaDateRangeModule, typeof MatchaPeriodModule, typeof MatchaCalendarPickerModule, typeof MatchaTimeModule, typeof MatchaTimeRangeModule, typeof MatchaDropListModule, typeof MatchaPageLayoutModule, typeof MatchaDrawerModule, typeof MatchaHighlightModule, typeof MatchaMaskModule, typeof MatchaChipModule, typeof MatchaMenuModule, typeof MatchaListModule, typeof MatchaSnackBarModule, typeof MatchaTextEditorModule], [typeof MatchaAccordionModule, typeof MatchaAutocompleteModule, typeof MatchaOptionModule, typeof MatchaPanelModule, typeof MatchaSelectModule, typeof MatchaSelectMultipleModule, typeof MatchaButtonModule, typeof MatchaButtonToggleModule, typeof MatchaCardModule, typeof MatchaCheckboxModule, typeof MatchaRadioModule, typeof MatchaDividerModule, typeof MatchaElevationModule, typeof MatchaFormFieldModule, typeof MatchaHintTextModule, typeof MatchaIconModule, typeof MatchaInfiniteScrollModule, typeof MatchaLazyloadModule, typeof MatchaInputPhoneModule, typeof MatchaMasonryModule, typeof MatchaModalModule, typeof MatchaPaginatorModule, typeof MatchaRippleModule, typeof MatchaSlideToggleModule, typeof MatchaMsgBoxModule, typeof MatchaSliderModule, typeof MatchaSpinModule, typeof MatchaSpinnerModule, typeof MatchaProgressBarModule, typeof MatchaStepperModule, typeof MatchaTabsModule, typeof MatchaTitleModule, typeof MatchaTooltipModule, typeof MatchaDateRangeModule, typeof MatchaPeriodModule, typeof MatchaCalendarPickerModule, typeof MatchaTimeModule, typeof MatchaTimeRangeModule, typeof MatchaDropListModule, typeof MatchaPageLayoutModule, typeof MatchaAvatarModule, typeof MatchaDrawerModule, typeof MatchaHighlightModule, typeof MatchaMaskModule, typeof MatchaChipModule, typeof MatchaMenuModule, typeof MatchaListModule, typeof MatchaSnackBarModule, typeof MatchaTextEditorModule]>;
|
|
3060
3371
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaComponentsModule>;
|
|
3061
3372
|
}
|
|
3062
3373
|
|
|
@@ -3435,5 +3746,5 @@ declare class MatchaToolbarModule {
|
|
|
3435
3746
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaToolbarModule>;
|
|
3436
3747
|
}
|
|
3437
3748
|
|
|
3438
|
-
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MaskExpression, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaDropListService, MatchaDropZoneDirective, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaListComponent, MatchaListItemComponent, MatchaListModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaMsgBoxActionsComponent, MatchaMsgBoxComponent, MatchaMsgBoxModule, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageBuilderComponent, MatchaPageBuilderModule, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectMultipleComponent, MatchaSelectMultipleModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarComponent, MatchaSnackBarModule, MatchaSnackBarService, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaSubmenuTriggerDirective, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTextEditorComponent, MatchaTextEditorModule, MatchaTimeComponent, MatchaTimeModule, MatchaTimeRangeComponent, MatchaTimeRangeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, buildSunEditorConfig, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
3439
|
-
export type { BreakpointState, DrawerMode, DrawerPosition, ILevelClasses, InputTransformFn, MatchaDropListConnectedToEvent, MatchaDropListDroppedEvent, MatchaDropZoneDroppedEvent, MatchaMaskConfig, MatchaMaskOptions, MatchaOptionParent, MatchaSnackBarConfig, MatchaTextEditorOptions, ModalComponent, OutputTransformFn, PageEvent, PanelPlacement, PanelPosition, SliderOptions, TabChangeEvent };
|
|
3749
|
+
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MaskExpression, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCalendarIntl, MatchaCalendarPickerComponent, MatchaCalendarPickerModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaDropListService, MatchaDropZoneDirective, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaListComponent, MatchaListItemComponent, MatchaListModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaMsgBoxActionsComponent, MatchaMsgBoxComponent, MatchaMsgBoxModule, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageBuilderComponent, MatchaPageBuilderModule, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaPeriodComponent, MatchaPeriodModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectMultipleComponent, MatchaSelectMultipleModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarComponent, MatchaSnackBarModule, MatchaSnackBarService, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaSubmenuTriggerDirective, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTextEditorComponent, MatchaTextEditorModule, MatchaTimeComponent, MatchaTimeModule, MatchaTimeRangeComponent, MatchaTimeRangeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, buildSunEditorConfig, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
3750
|
+
export type { BreakpointState, DrawerMode, DrawerPosition, ILevelClasses, InputTransformFn, MatchaCalendarDayCell, MatchaCalendarMonthCell, MatchaCalendarView, MatchaCalendarYearCell, MatchaDropListConnectedToEvent, MatchaDropListDroppedEvent, MatchaDropZoneDroppedEvent, MatchaMaskConfig, MatchaMaskOptions, MatchaOptionParent, MatchaPeriodDisplayFormat, MatchaPeriodPreset, MatchaPeriodRange, MatchaPeriodValue, MatchaSnackBarConfig, MatchaTextEditorOptions, ModalComponent, OutputTransformFn, PageEvent, PanelPlacement, PanelPosition, SliderOptions, TabChangeEvent };
|