@mk-kit/ui 0.48.0 → 0.50.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/README.md +4 -2
- package/fesm2022/mk-kit-ui-core.mjs +9 -380
- package/fesm2022/mk-kit-ui-core.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-data.mjs +6 -842
- package/fesm2022/mk-kit-ui-data.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-datetime.mjs +4 -247
- package/fesm2022/mk-kit-ui-datetime.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-embed.mjs +24 -5
- package/fesm2022/mk-kit-ui-embed.mjs.map +1 -1
- package/package.json +2 -1
- package/types/mk-kit-ui-core.d.ts +7 -162
- package/types/mk-kit-ui-data.d.ts +6 -173
- package/types/mk-kit-ui-datetime.d.ts +5 -77
- package/types/mk-kit-ui-embed.d.ts +19 -2
|
@@ -3,7 +3,9 @@ import { TemplateRef, ElementRef } from '@angular/core';
|
|
|
3
3
|
import * as _mk_kit_ui_core from '@mk-kit/ui/core';
|
|
4
4
|
import { MkTone, MkSize, MkCodeLanguage } from '@mk-kit/ui/core';
|
|
5
5
|
import { ControlValueAccessor } from '@angular/forms';
|
|
6
|
-
import * as
|
|
6
|
+
import * as _mk_kit_core from '@mk-kit/core';
|
|
7
|
+
import { MkDiffRow } from '@mk-kit/core';
|
|
8
|
+
export { MkAnsiSpan, MkDiffOp, MkDiffOptions, MkDiffRow, MkDiffSegment, MkDiffStats, MkMarkdownAlign, MkMarkdownBlock, MkMarkdownInline, MkMarkdownList, MkMarkdownListItem, MkMarkdownParseOptions, MkMarkdownRenderOptions, mkComputeDiff, mkDiffStats, mkParseAnsi, mkParseMarkdown, mkRenderMarkdown, mkStripAnsi } from '@mk-kit/core';
|
|
7
9
|
import { MkDropEvent } from '@mk-kit/ui/dnd';
|
|
8
10
|
|
|
9
11
|
/** Surface treatment for a {@link MkCard}. */
|
|
@@ -2396,53 +2398,6 @@ declare class MkCarousel {
|
|
|
2396
2398
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkCarousel, "mk-carousel", never, { "index": { "alias": "index"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "loop": { "alias": "loop"; "required": false; "isSignal": true; }; "showDots": { "alias": "showDots"; "required": false; "isSignal": true; }; "showArrows": { "alias": "showArrows"; "required": false; "isSignal": true; }; "autoplay": { "alias": "autoplay"; "required": false; "isSignal": true; }; "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "userPaused": { "alias": "userPaused"; "required": false; "isSignal": true; }; }, { "index": "indexChange"; "userPaused": "userPausedChange"; }, ["slides"], ["*"], true, never>;
|
|
2397
2399
|
}
|
|
2398
2400
|
|
|
2399
|
-
/**
|
|
2400
|
-
* Dependency-free text diff for {@link MkDiff} — an LCS line diff with optional
|
|
2401
|
-
* intra-line word highlighting. Pure and SSR-safe (no DOM). Suited to revision
|
|
2402
|
-
* comparison ("what changed between save N and N+1").
|
|
2403
|
-
*/
|
|
2404
|
-
/** The kind of change for a diff row/segment. */
|
|
2405
|
-
type MkDiffOp = 'equal' | 'insert' | 'delete';
|
|
2406
|
-
/** A word-level segment within a changed line. */
|
|
2407
|
-
interface MkDiffSegment {
|
|
2408
|
-
text: string;
|
|
2409
|
-
/** True when this word differs from the paired line. */
|
|
2410
|
-
changed: boolean;
|
|
2411
|
-
}
|
|
2412
|
-
/** One line of a computed diff. */
|
|
2413
|
-
interface MkDiffRow {
|
|
2414
|
-
op: MkDiffOp;
|
|
2415
|
-
text: string;
|
|
2416
|
-
/** 1-based line number in the "before" text (null for inserts). */
|
|
2417
|
-
beforeNo: number | null;
|
|
2418
|
-
/** 1-based line number in the "after" text (null for deletes). */
|
|
2419
|
-
afterNo: number | null;
|
|
2420
|
-
/** Word segments for changed lines (present when word highlighting runs). */
|
|
2421
|
-
segments?: MkDiffSegment[];
|
|
2422
|
-
}
|
|
2423
|
-
/** Summary counts for a diff. */
|
|
2424
|
-
interface MkDiffStats {
|
|
2425
|
-
added: number;
|
|
2426
|
-
removed: number;
|
|
2427
|
-
unchanged: number;
|
|
2428
|
-
}
|
|
2429
|
-
/** Options for {@link mkComputeDiff}. */
|
|
2430
|
-
interface MkDiffOptions {
|
|
2431
|
-
/** Highlight the specific words that changed within paired lines. */
|
|
2432
|
-
wordHighlight?: boolean;
|
|
2433
|
-
/** Treat trailing whitespace as insignificant when comparing lines. */
|
|
2434
|
-
ignoreTrailingWhitespace?: boolean;
|
|
2435
|
-
}
|
|
2436
|
-
/**
|
|
2437
|
-
* Compute a line diff between `before` and `after`. Returns one {@link MkDiffRow}
|
|
2438
|
-
* per line in document order, with `equal` / `insert` / `delete` ops and 1-based
|
|
2439
|
-
* before/after line numbers. With `wordHighlight` (default true) changed lines
|
|
2440
|
-
* also carry word-level `segments`.
|
|
2441
|
-
*/
|
|
2442
|
-
declare function mkComputeDiff(before: string, after: string, options?: MkDiffOptions): MkDiffRow[];
|
|
2443
|
-
/** Summary counts (added / removed / unchanged lines) for a diff. */
|
|
2444
|
-
declare function mkDiffStats(rows: MkDiffRow[]): MkDiffStats;
|
|
2445
|
-
|
|
2446
2401
|
/** How {@link MkDiff} lays out the comparison. */
|
|
2447
2402
|
type MkDiffMode = 'unified' | 'split';
|
|
2448
2403
|
interface SplitRow {
|
|
@@ -2479,7 +2434,7 @@ declare class MkDiff {
|
|
|
2479
2434
|
readonly beforeLabel: _angular_core.InputSignal<string>;
|
|
2480
2435
|
readonly afterLabel: _angular_core.InputSignal<string>;
|
|
2481
2436
|
protected readonly rows: _angular_core.Signal<MkDiffRow[]>;
|
|
2482
|
-
protected readonly stats: _angular_core.Signal<
|
|
2437
|
+
protected readonly stats: _angular_core.Signal<_mk_kit_core.MkDiffStats>;
|
|
2483
2438
|
/** Rows paired into two columns for the split view. */
|
|
2484
2439
|
protected readonly splitRows: _angular_core.Signal<SplitRow[]>;
|
|
2485
2440
|
protected marker(op: MkDiffRow['op']): string;
|
|
@@ -2728,39 +2683,6 @@ declare class MkJsonViewer {
|
|
|
2728
2683
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkJsonViewer, "mk-json-viewer", ["mkJsonViewer"], { "data": { "alias": "data"; "required": true; "isSignal": true; }; "expandDepth": { "alias": "expandDepth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2729
2684
|
}
|
|
2730
2685
|
|
|
2731
|
-
/**
|
|
2732
|
-
* Minimal ANSI SGR parser for {@link MkLogViewer}.
|
|
2733
|
-
*
|
|
2734
|
-
* Understands the SGR (`ESC[…m`) subset that matters for log output — reset
|
|
2735
|
-
* (0), bold (1), italic (3), underline (4), the 22/23/24 "off" codes, the 8
|
|
2736
|
-
* standard + 8 bright foreground colours (30–37 / 90–97, 39 reset) and the
|
|
2737
|
-
* matching backgrounds (40–47 / 100–107, 49 reset). Extended-colour
|
|
2738
|
-
* introducers (38/48;5;… and 38/48;2;r;g;b) are consumed so their arguments
|
|
2739
|
-
* are never misread as other codes, but map to "no colour" (the theme has no
|
|
2740
|
-
* 256-colour palette). Every other escape sequence — cursor movement, erase,
|
|
2741
|
-
* OSC titles, single-character escapes — is stripped rather than rendered as
|
|
2742
|
-
* garbage.
|
|
2743
|
-
*
|
|
2744
|
-
* Colours are emitted as CSS class names (`mk-ansi--fg-red`,
|
|
2745
|
-
* `mk-ansi--bg-bright-blue`, `mk-ansi--bold`, …) themed in
|
|
2746
|
-
* `log-viewer.scss`, not as raw terminal colours.
|
|
2747
|
-
*/
|
|
2748
|
-
/** One styled run of text within a parsed line. */
|
|
2749
|
-
interface MkAnsiSpan {
|
|
2750
|
-
/** The plain text of the run (escape sequences removed). */
|
|
2751
|
-
text: string;
|
|
2752
|
-
/** `mk-ansi--*` class names styling the run; empty for plain text. */
|
|
2753
|
-
classes: readonly string[];
|
|
2754
|
-
}
|
|
2755
|
-
/**
|
|
2756
|
-
* Parse one log line into styled spans. Pure — same input, same output.
|
|
2757
|
-
* Adjacent runs with identical styling are merged, so a plain line yields a
|
|
2758
|
-
* single span (or none when empty).
|
|
2759
|
-
*/
|
|
2760
|
-
declare function mkParseAnsi(line: string): MkAnsiSpan[];
|
|
2761
|
-
/** Remove every ANSI escape sequence from a line (for copy / search). */
|
|
2762
|
-
declare function mkStripAnsi(line: string): string;
|
|
2763
|
-
|
|
2764
2686
|
/** One render token of a log line: a styled run, optionally a search match. */
|
|
2765
2687
|
interface MkLogToken {
|
|
2766
2688
|
text: string;
|
|
@@ -2889,94 +2811,5 @@ declare class MkMarkdown {
|
|
|
2889
2811
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkMarkdown, "mk-markdown", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "autolink": { "alias": "autolink"; "required": false; "isSignal": true; }; "linkTarget": { "alias": "linkTarget"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2890
2812
|
}
|
|
2891
2813
|
|
|
2892
|
-
|
|
2893
|
-
type
|
|
2894
|
-
/** Inline (phrasing) node of the markdown AST. */
|
|
2895
|
-
type MkMarkdownInline = {
|
|
2896
|
-
kind: 'text';
|
|
2897
|
-
text: string;
|
|
2898
|
-
} | {
|
|
2899
|
-
kind: 'softbreak';
|
|
2900
|
-
} | {
|
|
2901
|
-
kind: 'break';
|
|
2902
|
-
} | {
|
|
2903
|
-
kind: 'code';
|
|
2904
|
-
code: string;
|
|
2905
|
-
} | {
|
|
2906
|
-
kind: 'strong';
|
|
2907
|
-
children: MkMarkdownInline[];
|
|
2908
|
-
} | {
|
|
2909
|
-
kind: 'em';
|
|
2910
|
-
children: MkMarkdownInline[];
|
|
2911
|
-
} | {
|
|
2912
|
-
kind: 'del';
|
|
2913
|
-
children: MkMarkdownInline[];
|
|
2914
|
-
} | {
|
|
2915
|
-
kind: 'link';
|
|
2916
|
-
href: string;
|
|
2917
|
-
children: MkMarkdownInline[];
|
|
2918
|
-
} | {
|
|
2919
|
-
kind: 'image';
|
|
2920
|
-
src: string;
|
|
2921
|
-
alt: string;
|
|
2922
|
-
};
|
|
2923
|
-
/** One `<li>`: tight inline content plus an optional nested list. */
|
|
2924
|
-
interface MkMarkdownListItem {
|
|
2925
|
-
children: MkMarkdownInline[];
|
|
2926
|
-
sublist: MkMarkdownList | null;
|
|
2927
|
-
}
|
|
2928
|
-
/** An ordered or unordered (tight) list block. */
|
|
2929
|
-
interface MkMarkdownList {
|
|
2930
|
-
kind: 'list';
|
|
2931
|
-
ordered: boolean;
|
|
2932
|
-
/** First ordinal of an ordered list (`3.` starts at 3). Always 1 for bullets. */
|
|
2933
|
-
start: number;
|
|
2934
|
-
items: MkMarkdownListItem[];
|
|
2935
|
-
}
|
|
2936
|
-
/** Block-level node of the markdown AST. */
|
|
2937
|
-
type MkMarkdownBlock = {
|
|
2938
|
-
kind: 'heading';
|
|
2939
|
-
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
2940
|
-
children: MkMarkdownInline[];
|
|
2941
|
-
} | {
|
|
2942
|
-
kind: 'paragraph';
|
|
2943
|
-
children: MkMarkdownInline[];
|
|
2944
|
-
} | {
|
|
2945
|
-
kind: 'code';
|
|
2946
|
-
language: string;
|
|
2947
|
-
code: string;
|
|
2948
|
-
} | {
|
|
2949
|
-
kind: 'blockquote';
|
|
2950
|
-
children: MkMarkdownBlock[];
|
|
2951
|
-
} | {
|
|
2952
|
-
kind: 'hr';
|
|
2953
|
-
} | MkMarkdownList | {
|
|
2954
|
-
kind: 'table';
|
|
2955
|
-
align: MkMarkdownAlign[];
|
|
2956
|
-
header: MkMarkdownInline[][];
|
|
2957
|
-
rows: MkMarkdownInline[][][];
|
|
2958
|
-
};
|
|
2959
|
-
interface MkMarkdownParseOptions {
|
|
2960
|
-
/** Turn bare `http(s)://…` URLs into links. Off by default. */
|
|
2961
|
-
autolink?: boolean;
|
|
2962
|
-
}
|
|
2963
|
-
interface MkMarkdownRenderOptions {
|
|
2964
|
-
/** `'_blank'` renders `target="_blank" rel="noopener noreferrer"` on links. */
|
|
2965
|
-
linkTarget?: '' | '_blank';
|
|
2966
|
-
}
|
|
2967
|
-
/**
|
|
2968
|
-
* Parse markdown source into a typed AST. Pure and dependency-free — safe to
|
|
2969
|
-
* run on a server. Unsafe link/image URLs are already dropped at this stage,
|
|
2970
|
-
* so the AST never carries a `javascript:` (or other non-allow-listed) URL.
|
|
2971
|
-
*/
|
|
2972
|
-
declare function mkParseMarkdown(src: string, options?: MkMarkdownParseOptions): MkMarkdownBlock[];
|
|
2973
|
-
/**
|
|
2974
|
-
* Render a parsed AST to an HTML string. The output contains only tags this
|
|
2975
|
-
* renderer generates (all source text is escaped), so it is safe to bind to
|
|
2976
|
-
* `[innerHTML]` — Angular's sanitizer keeps every element/attribute used here.
|
|
2977
|
-
* Fenced code is highlighted via `mkHighlight` for its known languages.
|
|
2978
|
-
*/
|
|
2979
|
-
declare function mkRenderMarkdown(blocks: MkMarkdownBlock[], options?: MkMarkdownRenderOptions): string;
|
|
2980
|
-
|
|
2981
|
-
export { MK_CHART_PALETTE_SIZE, MK_HEATMAP_MIN_CONTRAST, MkAvatar, MkAvatarGroup, MkBadge, MkBadgeOverlay, MkBarChart, MkCalendarHeatmap, MkCard, MkCardFooter, MkCardHeader, MkCardTitle, MkCarousel, MkCarouselSlide, MkCode, MkCountdown, MkDescItem, MkDescriptionList, MkDiff, MkDivider, MkDonutChart, MkEmptyState, MkFunnelChart, MkGauge, MkHeatmap, MkInlineEdit, MkJsonViewer, MkKanban, MkLineChart, MkList, MkListItem, MkLogViewer, MkMarkdown, MkOrgChart, MkOrgChartNodeDef, MkProfileActions, MkProfileCard, MkProfileMeta, MkProgressBar, MkProgressRing, MkQrCode, MkRadarChart, MkScatterChart, MkSkeleton, MkSkeletonPreset, MkSparkline, MkSpinner, MkStatCard, MkTag, MkTimeline, MkTimelineItem, MkTreemap, MkVirtualScroll, mkArcPath, mkAreaPath, mkBuildJsonTree, mkChartColor, mkComputeDiff, mkContrastRatio, mkDiffStats, mkEncodeQr, mkFormatCompact, mkHeatmapCellColors, mkLinePath, mkLinearScale, mkMixRgb, mkNiceTicks, mkOrgChartFromFlat, mkParseAnsi, mkParseMarkdown, mkParseRgb, mkRelativeLuminance, mkRenderMarkdown, mkSplitDuration, mkSquarify, mkStripAnsi };
|
|
2982
|
-
export type { MkAnsiSpan, MkAvatarShape, MkAvatarStatus, MkBadgeOverlayPosition, MkBadgeVariant, MkBarOrientation, MkCalendarHeatmapCell, MkCalendarHeatmapEntry, MkCardPadding, MkCardVariant, MkChartSeries, MkChartSlice, MkDescriptionLayout, MkDiffMode, MkDiffOp, MkDiffOptions, MkDiffRow, MkDiffSegment, MkDiffStats, MkDividerOrientation, MkDurationParts, MkFunnelSegment, MkHeatmapCellColors, MkHeatmapPalette, MkJsonNode, MkKanbanCard, MkKanbanCardMovedEvent, MkKanbanColumn, MkLogToken, MkMarkdownAlign, MkMarkdownBlock, MkMarkdownInline, MkMarkdownList, MkMarkdownListItem, MkMarkdownParseOptions, MkMarkdownRenderOptions, MkOrgChartFlatNode, MkOrgChartNode, MkOrgChartNodeContext, MkOrgChartOrientation, MkOrgChartTemplateData, MkOrgChartToggleEvent, MkPoint, MkProfileCardOrientation, MkQrEcc, MkRgb, MkScatterPoint, MkScatterSeries, MkSkeletonPresetKind, MkSkeletonShape, MkSparklineType, MkStatTrend, MkTagVariant, MkTreemapItem, MkTreemapRect };
|
|
2814
|
+
export { MK_CHART_PALETTE_SIZE, MK_HEATMAP_MIN_CONTRAST, MkAvatar, MkAvatarGroup, MkBadge, MkBadgeOverlay, MkBarChart, MkCalendarHeatmap, MkCard, MkCardFooter, MkCardHeader, MkCardTitle, MkCarousel, MkCarouselSlide, MkCode, MkCountdown, MkDescItem, MkDescriptionList, MkDiff, MkDivider, MkDonutChart, MkEmptyState, MkFunnelChart, MkGauge, MkHeatmap, MkInlineEdit, MkJsonViewer, MkKanban, MkLineChart, MkList, MkListItem, MkLogViewer, MkMarkdown, MkOrgChart, MkOrgChartNodeDef, MkProfileActions, MkProfileCard, MkProfileMeta, MkProgressBar, MkProgressRing, MkQrCode, MkRadarChart, MkScatterChart, MkSkeleton, MkSkeletonPreset, MkSparkline, MkSpinner, MkStatCard, MkTag, MkTimeline, MkTimelineItem, MkTreemap, MkVirtualScroll, mkArcPath, mkAreaPath, mkBuildJsonTree, mkChartColor, mkContrastRatio, mkEncodeQr, mkFormatCompact, mkHeatmapCellColors, mkLinePath, mkLinearScale, mkMixRgb, mkNiceTicks, mkOrgChartFromFlat, mkParseRgb, mkRelativeLuminance, mkSplitDuration, mkSquarify };
|
|
2815
|
+
export type { MkAvatarShape, MkAvatarStatus, MkBadgeOverlayPosition, MkBadgeVariant, MkBarOrientation, MkCalendarHeatmapCell, MkCalendarHeatmapEntry, MkCardPadding, MkCardVariant, MkChartSeries, MkChartSlice, MkDescriptionLayout, MkDiffMode, MkDividerOrientation, MkDurationParts, MkFunnelSegment, MkHeatmapCellColors, MkHeatmapPalette, MkJsonNode, MkKanbanCard, MkKanbanCardMovedEvent, MkKanbanColumn, MkLogToken, MkOrgChartFlatNode, MkOrgChartNode, MkOrgChartNodeContext, MkOrgChartOrientation, MkOrgChartTemplateData, MkOrgChartToggleEvent, MkPoint, MkProfileCardOrientation, MkQrEcc, MkRgb, MkScatterPoint, MkScatterSeries, MkSkeletonPresetKind, MkSkeletonShape, MkSparklineType, MkStatTrend, MkTagVariant, MkTreemapItem, MkTreemapRect };
|
|
@@ -1,82 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { MkDateNames, MkSize } from '@mk-kit/ui/core';
|
|
1
|
+
export { MkWeekday, addDays, addMonths, buildMonthMatrix, clampDate, endOfMonth, endOfWeek, formatDate, formatISODate, getISOWeek, getMonthNames, getWeekdayFullName, getWeekdayNames, isAfter, isBefore, isSameDay, isSameMonth, parseISODate, startOfDay, startOfMonth, startOfWeek } from '@mk-kit/core';
|
|
3
2
|
import * as _angular_core from '@angular/core';
|
|
4
3
|
import { OnDestroy } from '@angular/core';
|
|
4
|
+
import * as _mk_kit_ui_core from '@mk-kit/ui/core';
|
|
5
|
+
import { MkSize } from '@mk-kit/ui/core';
|
|
5
6
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
6
7
|
|
|
7
|
-
/**
|
|
8
|
-
* Dependency-free date helpers shared by the mk-kit DATE & TIME components.
|
|
9
|
-
* All functions are pure and operate on native `Date`. Name-producing helpers
|
|
10
|
-
* default to English but accept an optional {@link MkDateNames} table (from
|
|
11
|
-
* `MK_I18N`) for localisation. Dates are treated in the local time zone.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/** Day-of-week index 0 (Sunday) … 6 (Saturday). */
|
|
15
|
-
type MkWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
16
|
-
/** True when both dates fall on the same calendar day (local time). */
|
|
17
|
-
declare function isSameDay(a: Date, b: Date): boolean;
|
|
18
|
-
/** True when both dates fall in the same calendar month of the same year. */
|
|
19
|
-
declare function isSameMonth(a: Date, b: Date): boolean;
|
|
20
|
-
/** Midnight (00:00:00.000) on the first day of `date`'s month. */
|
|
21
|
-
declare function startOfMonth(date: Date): Date;
|
|
22
|
-
/** Midnight on the last day of `date`'s month. */
|
|
23
|
-
declare function endOfMonth(date: Date): Date;
|
|
24
|
-
/** A new date `count` months after `date` (negative to subtract). Clamps the
|
|
25
|
-
* day of month so e.g. Jan 31 + 1 month = Feb 28/29, not Mar 3. */
|
|
26
|
-
declare function addMonths(date: Date, count: number): Date;
|
|
27
|
-
/** A new date `count` days after `date` (negative to subtract). */
|
|
28
|
-
declare function addDays(date: Date, count: number): Date;
|
|
29
|
-
/** Midnight (00:00:00.000) on `date`'s calendar day. */
|
|
30
|
-
declare function startOfDay(date: Date): Date;
|
|
31
|
-
/**
|
|
32
|
-
* The first day of the week containing `date`, at midnight. `firstDayOfWeek`
|
|
33
|
-
* is the week's starting weekday (0 = Sunday … 6 = Saturday).
|
|
34
|
-
*/
|
|
35
|
-
declare function startOfWeek(date: Date, firstDayOfWeek?: number): Date;
|
|
36
|
-
/** The last day of the week containing `date`, at midnight. */
|
|
37
|
-
declare function endOfWeek(date: Date, firstDayOfWeek?: number): Date;
|
|
38
|
-
/**
|
|
39
|
-
* ISO-8601 week number (1–53) of `date`. Weeks start on Monday and week 1 is
|
|
40
|
-
* the week containing the first Thursday of the year.
|
|
41
|
-
*/
|
|
42
|
-
declare function getISOWeek(date: Date): number;
|
|
43
|
-
/** True when `a` is strictly before `b` (full timestamp comparison). */
|
|
44
|
-
declare function isBefore(a: Date, b: Date): boolean;
|
|
45
|
-
/** True when `a` is strictly after `b` (full timestamp comparison). */
|
|
46
|
-
declare function isAfter(a: Date, b: Date): boolean;
|
|
47
|
-
/** Clamp `date` into the inclusive `[min, max]` range (either bound optional). */
|
|
48
|
-
declare function clampDate(date: Date, min?: Date | null, max?: Date | null): Date;
|
|
49
|
-
/** Format `date` as an ISO calendar date `YYYY-MM-DD` (local time). */
|
|
50
|
-
declare function formatISODate(date: Date): string;
|
|
51
|
-
/** Parse a `YYYY-MM-DD` string into a local-time `Date`, or `null` if invalid. */
|
|
52
|
-
declare function parseISODate(value: string | null | undefined): Date | null;
|
|
53
|
-
/**
|
|
54
|
-
* Format `date` using a small pattern set. Supported tokens:
|
|
55
|
-
* `yyyy` (4-digit year), `MMMM` (full month), `MMM` (short month),
|
|
56
|
-
* `MM` (2-digit month), `dd` (2-digit day), `d` (day), `ddd` (short weekday),
|
|
57
|
-
* `HH` / `H` (24-hour, padded / bare), `hh` / `h` (12-hour, padded / bare),
|
|
58
|
-
* `mm` (2-digit minutes) and `a` (`AM` / `PM`). Longer tokens are matched
|
|
59
|
-
* first so `MMMM` wins over `MM`. Month/weekday names come from `names` when
|
|
60
|
-
* given, else English.
|
|
61
|
-
*/
|
|
62
|
-
declare function formatDate(date: Date, pattern: string, names?: MkDateNames): string;
|
|
63
|
-
/**
|
|
64
|
-
* Build a fixed 6×7 matrix of `Date` cells for `viewDate`'s month, including
|
|
65
|
-
* the leading days from the previous month and trailing days from the next so
|
|
66
|
-
* every row is full. `firstDayOfWeek` is 0 (Sunday) … 6 (Saturday).
|
|
67
|
-
*/
|
|
68
|
-
declare function buildMonthMatrix(viewDate: Date, firstDayOfWeek?: number): Date[][];
|
|
69
|
-
/** Full month names, index 0 = January (from `names`, else English). */
|
|
70
|
-
declare function getMonthNames(names?: MkDateNames): readonly string[];
|
|
71
|
-
/**
|
|
72
|
-
* Weekday header labels ordered to start at `firstDayOfWeek`.
|
|
73
|
-
* `format` selects `'short'` (e.g. `Mon`) or `'narrow'` (e.g. `M`).
|
|
74
|
-
* Labels come from `names` when given, else English.
|
|
75
|
-
*/
|
|
76
|
-
declare function getWeekdayNames(firstDayOfWeek?: number, format?: 'short' | 'narrow', names?: MkDateNames): string[];
|
|
77
|
-
/** Full weekday name for `date` (for screen-reader labels). */
|
|
78
|
-
declare function getWeekdayFullName(date: Date, names?: MkDateNames): string;
|
|
79
|
-
|
|
80
8
|
/** Weekday header descriptor (short label + full name for `abbr[title]`). */
|
|
81
9
|
interface MkWeekdayHeader$1 {
|
|
82
10
|
short: string;
|
|
@@ -1352,5 +1280,5 @@ declare class MkMiniDate implements ControlValueAccessor, Validator {
|
|
|
1352
1280
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkMiniDate, "mk-mini-date", ["mkMiniDate"], { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "order": { "alias": "order"; "required": false; "isSignal": true; }; "yearMin": { "alias": "yearMin"; "required": false; "isSignal": true; }; "yearMax": { "alias": "yearMax"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
1353
1281
|
}
|
|
1354
1282
|
|
|
1355
|
-
export { MkCalendar, MkDatePicker, MkDateRangePicker, MkDateTimePicker, MkEventCalendar, MkMiniDate, MkMonthPicker, MkTimePicker, MkWeekPicker
|
|
1356
|
-
export type { MkCalendarEvent, MkCalendarEventEdit, MkCalendarView, MkDateRange, MkMiniDateOrder, MkMonthPickerMode, MkWeek
|
|
1283
|
+
export { MkCalendar, MkDatePicker, MkDateRangePicker, MkDateTimePicker, MkEventCalendar, MkMiniDate, MkMonthPicker, MkTimePicker, MkWeekPicker };
|
|
1284
|
+
export type { MkCalendarEvent, MkCalendarEventEdit, MkCalendarView, MkDateRange, MkMiniDateOrder, MkMonthPickerMode, MkWeek };
|
|
@@ -25,6 +25,20 @@ interface MkEmbedInit {
|
|
|
25
25
|
* any number of instances), `<style>` elements otherwise.
|
|
26
26
|
*/
|
|
27
27
|
styles?: string | readonly string[];
|
|
28
|
+
/**
|
|
29
|
+
* Stylesheet URLs loaded as `<link rel="stylesheet">` into every shadow
|
|
30
|
+
* root (and the overlay host) — an alternative to inlining `styles` when
|
|
31
|
+
* the theme lives on a CDN. Loaded per shadow root by the browser's cache,
|
|
32
|
+
* so the network cost is paid once.
|
|
33
|
+
*/
|
|
34
|
+
styleUrls?: readonly string[];
|
|
35
|
+
/**
|
|
36
|
+
* CSP nonce applied to every style and link element this app creates —
|
|
37
|
+
* including Angular's own component styles (provided as `CSP_NONCE`) and
|
|
38
|
+
* the `<style>` fallback when constructable stylesheets are unavailable.
|
|
39
|
+
* For host pages with a `style-src` policy that forbids `'unsafe-inline'`.
|
|
40
|
+
*/
|
|
41
|
+
nonce?: string;
|
|
28
42
|
/**
|
|
29
43
|
* Extra providers for the shared application — `provideMkI18n(…)`,
|
|
30
44
|
* `provideMkExtendedIcons()`, `provideHttpClient()`, your services.
|
|
@@ -111,12 +125,15 @@ declare class MkEmbedApp {
|
|
|
111
125
|
}
|
|
112
126
|
/**
|
|
113
127
|
* The embed styles, parsed once and shared: constructable stylesheets where
|
|
114
|
-
* supported, cloned `<style>` elements otherwise
|
|
128
|
+
* supported, cloned `<style>` elements otherwise, plus `<link>` elements for
|
|
129
|
+
* `styleUrls`. The nonce lands on every element this class creates.
|
|
115
130
|
*/
|
|
116
131
|
declare class MkEmbedStyles {
|
|
117
132
|
private readonly css;
|
|
133
|
+
private readonly urls;
|
|
134
|
+
private readonly nonce?;
|
|
118
135
|
private sheets;
|
|
119
|
-
constructor(css: readonly string[]);
|
|
136
|
+
constructor(css: readonly string[], urls: readonly string[], nonce?: string | undefined);
|
|
120
137
|
adopt(root: ShadowRoot): void;
|
|
121
138
|
}
|
|
122
139
|
|