@mk-kit/ui 0.42.0 → 0.44.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 +5 -3
- package/THIRD_PARTY_NOTICES.md +4 -2
- package/fesm2022/mk-kit-ui-block-editor.mjs +4 -2
- package/fesm2022/mk-kit-ui-block-editor.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-checkbox.mjs +4 -2
- package/fesm2022/mk-kit-ui-checkbox.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-core.mjs +136 -1
- package/fesm2022/mk-kit-ui-core.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-data.mjs +438 -8
- package/fesm2022/mk-kit-ui-data.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-datetime.mjs +88 -50
- package/fesm2022/mk-kit-ui-datetime.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-directives.mjs +27 -8
- package/fesm2022/mk-kit-ui-directives.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-dnd.mjs +43 -8
- package/fesm2022/mk-kit-ui-dnd.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-dynamic-form.mjs +149 -2
- package/fesm2022/mk-kit-ui-dynamic-form.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-feedback.mjs +1 -1
- package/fesm2022/mk-kit-ui-feedback.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-forms.mjs +326 -78
- package/fesm2022/mk-kit-ui-forms.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-icon-extended.mjs +425 -0
- package/fesm2022/mk-kit-ui-icon-extended.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-icon.mjs +296 -459
- package/fesm2022/mk-kit-ui-icon.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-media.mjs +1 -1
- package/fesm2022/mk-kit-ui-media.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-query-builder.mjs +1 -1
- package/fesm2022/mk-kit-ui-query-builder.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-rich-text.mjs +4 -2
- package/fesm2022/mk-kit-ui-rich-text.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-table.mjs +668 -24
- package/fesm2022/mk-kit-ui-table.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-testing.mjs +54 -0
- package/fesm2022/mk-kit-ui-testing.mjs.map +1 -1
- package/fesm2022/mk-kit-ui.mjs +1 -0
- package/fesm2022/mk-kit-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/schematics/migrate-primeng/transform.js +4 -1
- package/schematics/ng-add/index.js +30 -2
- package/schematics/ng-add/schema.json +6 -0
- package/types/mk-kit-ui-block-editor.d.ts +2 -0
- package/types/mk-kit-ui-checkbox.d.ts +2 -0
- package/types/mk-kit-ui-core.d.ts +82 -2
- package/types/mk-kit-ui-data.d.ts +203 -2
- package/types/mk-kit-ui-datetime.d.ts +41 -19
- package/types/mk-kit-ui-directives.d.ts +12 -6
- package/types/mk-kit-ui-dnd.d.ts +32 -4
- package/types/mk-kit-ui-dynamic-form.d.ts +44 -1
- package/types/mk-kit-ui-forms.d.ts +154 -16
- package/types/mk-kit-ui-icon-extended.d.ts +83 -0
- package/types/mk-kit-ui-icon.d.ts +100 -17
- package/types/mk-kit-ui-rich-text.d.ts +2 -0
- package/types/mk-kit-ui-table.d.ts +234 -25
- package/types/mk-kit-ui-testing.d.ts +16 -0
- package/types/mk-kit-ui.d.ts +1 -0
|
@@ -980,6 +980,12 @@ interface MkI18nStrings {
|
|
|
980
980
|
logCopyAll: string;
|
|
981
981
|
/** Log viewer: soft-wrap toolbar toggle. */
|
|
982
982
|
logWrapLines: string;
|
|
983
|
+
/** Org chart: default accessible label of the tree. */
|
|
984
|
+
orgChartLabel: string;
|
|
985
|
+
/** Org chart: aria-label of a collapsed node's toggle (`{label}` = node label). */
|
|
986
|
+
orgChartExpand: string;
|
|
987
|
+
/** Org chart: aria-label of an expanded node's toggle (`{label}` = node label). */
|
|
988
|
+
orgChartCollapse: string;
|
|
983
989
|
/** Chat: accessible name of the message log. */
|
|
984
990
|
chatLabel: string;
|
|
985
991
|
/** Chat: accessible name of the composer textarea. */
|
|
@@ -1180,6 +1186,16 @@ interface MkI18nStrings {
|
|
|
1180
1186
|
chartLabel: string;
|
|
1181
1187
|
/** Default accessible label of a QR code, carrying its encoded content. */
|
|
1182
1188
|
qrCodeLabel: (text: string) => string;
|
|
1189
|
+
/** Default accessible name of `mk-sortable-list` when no `label` is given. */
|
|
1190
|
+
sortableListLabel: string;
|
|
1191
|
+
/** Table filter row: accessible name of a column's filter control. */
|
|
1192
|
+
filterColumn: (column: string) => string;
|
|
1193
|
+
/** Table filter row: the per-control clear (×) button. */
|
|
1194
|
+
clearFilter: (column: string) => string;
|
|
1195
|
+
/** Table filter row: the "no filter" option of a select filter. */
|
|
1196
|
+
filterAny: string;
|
|
1197
|
+
/** Table filter row: placeholder of a number / date filter (matches values ≥ the entry). */
|
|
1198
|
+
filterMin: string;
|
|
1183
1199
|
/** Block editor chrome (deep-merged by provideMkI18n). */
|
|
1184
1200
|
blockEditor: MkBlockEditorStrings;
|
|
1185
1201
|
}
|
|
@@ -1315,6 +1331,70 @@ type MkErrorMessages = Readonly<Record<string, string | ((err: any) => string)>>
|
|
|
1315
1331
|
*/
|
|
1316
1332
|
declare function mkFirstErrorMessage(errors: ValidationErrors | null | undefined, strings: MkValidationStrings, overrides?: MkErrorMessages): string | null;
|
|
1317
1333
|
|
|
1334
|
+
/**
|
|
1335
|
+
* The shape of a Signal Forms validation error as `mk-kit` reads it — the
|
|
1336
|
+
* `{ kind, message? }` contract of `ValidationError` from
|
|
1337
|
+
* `@angular/forms/signals`, plus whatever payload the error class carries
|
|
1338
|
+
* (`min`, `maxLength`, `pattern`, …). Declared structurally so `@mk-kit/ui/core`
|
|
1339
|
+
* stays free of a runtime dependency on the signals entry point.
|
|
1340
|
+
*/
|
|
1341
|
+
interface MkSignalValidationError {
|
|
1342
|
+
/** Identifies the kind of error (`'required'`, `'minLength'`, …). */
|
|
1343
|
+
readonly kind: string;
|
|
1344
|
+
/** Human-readable message, when the schema supplied one. */
|
|
1345
|
+
readonly message?: string;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Converts Signal Forms errors to the reactive-forms `ValidationErrors` shape
|
|
1349
|
+
* the `validation` i18n table is keyed by, so both form systems render the
|
|
1350
|
+
* same messages. The built-in kinds map to Angular's classic keys and payloads
|
|
1351
|
+
* (`minLength` → `minlength: { requiredLength }`, `minDate` → `mkMinDate`,
|
|
1352
|
+
* …); any other kind is kept as-is with its payload spread into the value.
|
|
1353
|
+
*
|
|
1354
|
+
* @returns The error map in the order the errors were reported, or `null`
|
|
1355
|
+
* when the list is empty.
|
|
1356
|
+
*/
|
|
1357
|
+
declare function mkSignalErrorsToValidationErrors(errors: readonly MkSignalValidationError[] | null | undefined): ValidationErrors | null;
|
|
1358
|
+
/**
|
|
1359
|
+
* Resolves the message for the first Signal Forms error on a field, the way
|
|
1360
|
+
* `mkFirstErrorMessage` does for reactive forms.
|
|
1361
|
+
*
|
|
1362
|
+
* Lookup order: the field's `overrides` for that kind, then the `message` the
|
|
1363
|
+
* schema attached to the error (`required(p.email, { message: '…' })`), then
|
|
1364
|
+
* the i18n `validation` table, then the generic fallback.
|
|
1365
|
+
*
|
|
1366
|
+
* @returns The message, or `null` when there are no errors.
|
|
1367
|
+
*/
|
|
1368
|
+
declare function mkSignalErrorMessage(errors: readonly MkSignalValidationError[] | null | undefined, strings: MkValidationStrings, overrides?: MkErrorMessages): string | null;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Touched-gate for a control's `invalid` input under Signal Forms.
|
|
1372
|
+
*
|
|
1373
|
+
* When a control is bound with the `[formField]` directive, Angular writes the
|
|
1374
|
+
* field's `invalid()` state straight into the control's `invalid` input — from
|
|
1375
|
+
* the first render, before the user has reached the field. mk-kit controls
|
|
1376
|
+
* pass that input through this gate so the invalid visual (and `aria-invalid`)
|
|
1377
|
+
* only shows once the field is touched or dirty, matching how `mk-form-field`
|
|
1378
|
+
* reveals its message and how `submit()` (which marks every field touched)
|
|
1379
|
+
* surfaces the remaining problems.
|
|
1380
|
+
*
|
|
1381
|
+
* Returns a signal that is always `true` for a control that is not bound with
|
|
1382
|
+
* `[formField]`, so a standalone `[invalid]="true"` keeps working as before.
|
|
1383
|
+
* Call it in a field initializer (an injection context):
|
|
1384
|
+
*
|
|
1385
|
+
* ```ts
|
|
1386
|
+
* private readonly fieldTouched = mkInjectFieldTouched();
|
|
1387
|
+
* protected readonly isInvalid = computed(
|
|
1388
|
+
* () => (this.invalid() && this.fieldTouched()) || (this.field?.hasError() ?? false),
|
|
1389
|
+
* );
|
|
1390
|
+
* ```
|
|
1391
|
+
*
|
|
1392
|
+
* The binding is looked up lazily, on first read: the `FormField` directive
|
|
1393
|
+
* itself injects the element's `NG_VALUE_ACCESSOR` (the control) while it is
|
|
1394
|
+
* created, so resolving it from the control's constructor would be circular.
|
|
1395
|
+
*/
|
|
1396
|
+
declare function mkInjectFieldTouched(): Signal<boolean>;
|
|
1397
|
+
|
|
1318
1398
|
/** Value kind of a filterable field; decides the editor and the operators offered. */
|
|
1319
1399
|
type MkQueryValueType = 'string' | 'number' | 'boolean' | 'date' | 'select';
|
|
1320
1400
|
/** A choice for `select` fields. */
|
|
@@ -1393,5 +1473,5 @@ declare function mkQueryOperatorLabel(op: MkQueryOperator, i18n?: MkI18nStrings)
|
|
|
1393
1473
|
*/
|
|
1394
1474
|
declare function mkQueryToText(group: MkQueryGroup, fields?: readonly MkQueryField[], i18n?: MkI18nStrings): string;
|
|
1395
1475
|
|
|
1396
|
-
export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_QUERY_OPERATORS, MK_QUERY_UNARY, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkComputeAnchoredPosition, mkCreateQueryGroup, mkCreateQueryRule, mkFirstErrorMessage, mkGetFocusable, mkHighlight, mkHighlightJson, mkIsQueryGroup, mkIsResponsive, mkQueryCompact, mkQueryIsEmpty, mkQueryOperatorLabel, mkQueryOperatorsFor, mkQueryRuleCount, mkQueryRuleIsComplete, mkQueryRuleMatches, mkQueryToPredicate, mkQueryToText, mkUniqueId, mkValidatorChange, provideMkI18n };
|
|
1397
|
-
export type { MkAnchoredPosition, MkAnchoredPositionOptions, MkAriaLivePoliteness, MkBlockEditorStrings, MkBreakpoint, MkBreakpoints, MkCodeLanguage, MkContrastPreference, MkDateNames, MkDensity, MkErrorMessages, MkI18nStrings, MkOverlayConfig, MkPlacement, MkQueryCombinator, MkQueryField, MkQueryFieldOption, MkQueryGroup, MkQueryNode, MkQueryOperator, MkQueryRule, MkQueryValueType, MkResolvedContrast, MkResolvedTheme, MkResponsive, MkSize$1 as MkSize, MkSortAnnounceDirection, MkThemePreference, MkTone, MkValidationStrings, MkValidatorChangeRef, MkVariant };
|
|
1476
|
+
export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_QUERY_OPERATORS, MK_QUERY_UNARY, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkComputeAnchoredPosition, mkCreateQueryGroup, mkCreateQueryRule, mkFirstErrorMessage, mkGetFocusable, mkHighlight, mkHighlightJson, mkInjectFieldTouched, mkIsQueryGroup, mkIsResponsive, mkQueryCompact, mkQueryIsEmpty, mkQueryOperatorLabel, mkQueryOperatorsFor, mkQueryRuleCount, mkQueryRuleIsComplete, mkQueryRuleMatches, mkQueryToPredicate, mkQueryToText, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkUniqueId, mkValidatorChange, provideMkI18n };
|
|
1477
|
+
export type { MkAnchoredPosition, MkAnchoredPositionOptions, MkAriaLivePoliteness, MkBlockEditorStrings, MkBreakpoint, MkBreakpoints, MkCodeLanguage, MkContrastPreference, MkDateNames, MkDensity, MkErrorMessages, MkI18nStrings, MkOverlayConfig, MkPlacement, MkQueryCombinator, MkQueryField, MkQueryFieldOption, MkQueryGroup, MkQueryNode, MkQueryOperator, MkQueryRule, MkQueryValueType, MkResolvedContrast, MkResolvedTheme, MkResponsive, MkSignalValidationError, MkSize$1 as MkSize, MkSortAnnounceDirection, MkThemePreference, MkTone, MkValidationStrings, MkValidatorChangeRef, MkVariant };
|
|
@@ -385,6 +385,205 @@ declare class MkTimelineItem {
|
|
|
385
385
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkTimelineItem, "mk-timeline-item", never, { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "time": { "alias": "time"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
+
/** A node in an {@link MkOrgChart} tree. `children` makes it a parent. */
|
|
389
|
+
interface MkOrgChartNode<T = unknown> {
|
|
390
|
+
/** Unique id — drives selection (`[(selected)]`) and expansion (`[(expanded)]`). */
|
|
391
|
+
id: string;
|
|
392
|
+
/** Primary text of the default card (and the initials fallback). */
|
|
393
|
+
label?: string;
|
|
394
|
+
/**
|
|
395
|
+
* Arbitrary payload handed to the node template. The default card reads
|
|
396
|
+
* `data.title` (sub-label) and `data.avatar` (image URL) when present.
|
|
397
|
+
*/
|
|
398
|
+
data?: T;
|
|
399
|
+
/** Direct reports; a non-empty array makes the node collapsible. */
|
|
400
|
+
children?: MkOrgChartNode<T>[];
|
|
401
|
+
/** Initial expansion (default `true`). Only consulted when `[(expanded)]` is not bound. */
|
|
402
|
+
expanded?: boolean;
|
|
403
|
+
}
|
|
404
|
+
/** One row of a flat list accepted by {@link mkOrgChartFromFlat}. */
|
|
405
|
+
interface MkOrgChartFlatNode<T = unknown> {
|
|
406
|
+
id: string;
|
|
407
|
+
label?: string;
|
|
408
|
+
data?: T;
|
|
409
|
+
/** Id of the parent row; `null` / `undefined` / unknown id = root. */
|
|
410
|
+
parentId?: string | null;
|
|
411
|
+
expanded?: boolean;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Build the nested `nodes` input from a flat `parentId` list (the shape most
|
|
415
|
+
* HR / directory APIs return). Row order is preserved among siblings; rows
|
|
416
|
+
* whose `parentId` does not match any row become roots.
|
|
417
|
+
*
|
|
418
|
+
* ```ts
|
|
419
|
+
* const nodes = mkOrgChartFromFlat([
|
|
420
|
+
* { id: 'ceo', label: 'Ada' },
|
|
421
|
+
* { id: 'cto', label: 'Grace', parentId: 'ceo' },
|
|
422
|
+
* ]);
|
|
423
|
+
* ```
|
|
424
|
+
*/
|
|
425
|
+
declare function mkOrgChartFromFlat<T = unknown>(list: readonly MkOrgChartFlatNode<T>[]): MkOrgChartNode<T>[];
|
|
426
|
+
/**
|
|
427
|
+
* `data` type seen by a node template: `T` when it could be inferred (the
|
|
428
|
+
* template binds `[mkOrgChartNodeDef]="nodes"`), otherwise `any` so an
|
|
429
|
+
* untyped `<ng-template mkOrgChartNodeDef>` can still read `node.data?.title`.
|
|
430
|
+
*/
|
|
431
|
+
type MkOrgChartTemplateData<T> = keyof T extends never ? any : T;
|
|
432
|
+
/** Template context of `ng-template[mkOrgChartNodeDef]`. */
|
|
433
|
+
interface MkOrgChartNodeContext<T = unknown> {
|
|
434
|
+
/** The node (also available as `let-node`). */
|
|
435
|
+
$implicit: MkOrgChartNode<MkOrgChartTemplateData<T>>;
|
|
436
|
+
node: MkOrgChartNode<MkOrgChartTemplateData<T>>;
|
|
437
|
+
/** 1-based depth (roots are 1). */
|
|
438
|
+
depth: number;
|
|
439
|
+
/** Whether the node's children are currently shown. */
|
|
440
|
+
expanded: boolean;
|
|
441
|
+
/** Whether the node is the selected one. */
|
|
442
|
+
selected: boolean;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Custom node card for `mk-org-chart`:
|
|
446
|
+
*
|
|
447
|
+
* ```html
|
|
448
|
+
* <mk-org-chart [nodes]="nodes">
|
|
449
|
+
* <ng-template mkOrgChartNodeDef let-node let-selected="selected">
|
|
450
|
+
* <strong>{{ node.label }}</strong> — {{ node.data?.title }}
|
|
451
|
+
* </ng-template>
|
|
452
|
+
* </mk-org-chart>
|
|
453
|
+
* ```
|
|
454
|
+
*
|
|
455
|
+
* Bind the same array you pass to `nodes` to get a typed `node.data` in the
|
|
456
|
+
* template: `<ng-template [mkOrgChartNodeDef]="nodes" let-node>`.
|
|
457
|
+
*/
|
|
458
|
+
declare class MkOrgChartNodeDef<T = unknown> {
|
|
459
|
+
/**
|
|
460
|
+
* Type-inference hook only (the value is not used at runtime): bind the
|
|
461
|
+
* `nodes` array so `let-node` is typed as `MkOrgChartNode<T>`.
|
|
462
|
+
*/
|
|
463
|
+
readonly mkOrgChartNodeDef: _angular_core.InputSignal<"" | readonly MkOrgChartNode<T>[] | undefined>;
|
|
464
|
+
readonly template: TemplateRef<any>;
|
|
465
|
+
static ngTemplateContextGuard<T>(_dir: MkOrgChartNodeDef<T>, ctx: unknown): ctx is MkOrgChartNodeContext<T>;
|
|
466
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkOrgChartNodeDef<any>, never>;
|
|
467
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MkOrgChartNodeDef<any>, "ng-template[mkOrgChartNodeDef]", never, { "mkOrgChartNodeDef": { "alias": "mkOrgChartNodeDef"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
468
|
+
}
|
|
469
|
+
/** Chart direction: `top` = root at the top, `left` = root at the inline start. */
|
|
470
|
+
type MkOrgChartOrientation = 'top' | 'left';
|
|
471
|
+
/** Payload of `(nodeToggle)`. */
|
|
472
|
+
interface MkOrgChartToggleEvent<T = unknown> {
|
|
473
|
+
node: MkOrgChartNode<T>;
|
|
474
|
+
expanded: boolean;
|
|
475
|
+
}
|
|
476
|
+
/** One visible node after flattening (pre-order, i.e. DOM order). */
|
|
477
|
+
interface MkOrgChartRow {
|
|
478
|
+
node: MkOrgChartNode;
|
|
479
|
+
depth: number;
|
|
480
|
+
parentId: string | null;
|
|
481
|
+
/** Ids of the sibling set this row belongs to (in order). */
|
|
482
|
+
siblings: readonly string[];
|
|
483
|
+
hasChildren: boolean;
|
|
484
|
+
expanded: boolean;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Organisation chart — a reporting-line hierarchy drawn with plain nested
|
|
488
|
+
* lists and CSS connectors (no canvas, prints and themes like everything
|
|
489
|
+
* else). Feed it a tree (`nodes`) or convert a flat `parentId` list with
|
|
490
|
+
* {@link mkOrgChartFromFlat}. Nodes render as a default card (avatar /
|
|
491
|
+
* initials, label, `data.title`) or through an `mkOrgChartNodeDef` template.
|
|
492
|
+
*
|
|
493
|
+
* Follows the ARIA tree pattern (`role="tree"` / `treeitem` / `group`, one
|
|
494
|
+
* roving tab stop). Keyboard (top-down; the axes swap for `orientation="left"`
|
|
495
|
+
* and in RTL): Down = first child (expands a collapsed node first), Up =
|
|
496
|
+
* parent, Left/Right = previous/next sibling, Home/End = first/last visible
|
|
497
|
+
* node, Enter/Space = select (or toggle when not selectable), `*` = expand
|
|
498
|
+
* all siblings, `+`/`-` = expand/collapse.
|
|
499
|
+
*
|
|
500
|
+
* ```html
|
|
501
|
+
* <mk-org-chart
|
|
502
|
+
* [nodes]="company"
|
|
503
|
+
* selectable
|
|
504
|
+
* [(selected)]="personId"
|
|
505
|
+
* collapsible
|
|
506
|
+
* (nodeClick)="open($event)"
|
|
507
|
+
* />
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
declare class MkOrgChart<T = unknown> {
|
|
511
|
+
private readonly host;
|
|
512
|
+
private readonly document;
|
|
513
|
+
/** Localised strings (override globally via `provideMkI18n`). */
|
|
514
|
+
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
515
|
+
/** The hierarchy to render (roots first). */
|
|
516
|
+
readonly nodes: _angular_core.InputSignal<readonly MkOrgChartNode<T>[]>;
|
|
517
|
+
/** Root at the top (children below) or at the inline start (children to the side). */
|
|
518
|
+
readonly orientation: _angular_core.InputSignal<MkOrgChartOrientation>;
|
|
519
|
+
/** Allow choosing a node (adds selection styling + `aria-selected`). */
|
|
520
|
+
readonly selectable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
521
|
+
/** Show a toggle on every parent so branches can be hidden. */
|
|
522
|
+
readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
523
|
+
/** Scale factor applied to the whole chart (clamped to 0.5–2). */
|
|
524
|
+
readonly zoom: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
525
|
+
/** Accessible name for the tree. */
|
|
526
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
527
|
+
/** Two-way selected node id (`null` = nothing selected). */
|
|
528
|
+
readonly selected: _angular_core.ModelSignal<string | null>;
|
|
529
|
+
/**
|
|
530
|
+
* Two-way ids of the expanded parents. Leave unbound to let the chart
|
|
531
|
+
* manage expansion itself (seeded from each node's `expanded` flag).
|
|
532
|
+
*/
|
|
533
|
+
readonly expanded: _angular_core.ModelSignal<readonly string[] | undefined>;
|
|
534
|
+
/** Emits the node whose card was clicked or activated with Enter/Space. */
|
|
535
|
+
readonly nodeClick: _angular_core.OutputEmitterRef<MkOrgChartNode<T>>;
|
|
536
|
+
/** Emits whenever a node is expanded or collapsed. */
|
|
537
|
+
readonly nodeToggle: _angular_core.OutputEmitterRef<MkOrgChartToggleEvent<T>>;
|
|
538
|
+
protected readonly nodeDef: _angular_core.Signal<MkOrgChartNodeDef<T> | undefined>;
|
|
539
|
+
protected readonly zoomLevel: _angular_core.Signal<number>;
|
|
540
|
+
/**
|
|
541
|
+
* Expanded parent ids. Controlled by `expanded` when bound; otherwise kept
|
|
542
|
+
* locally — a node's `expanded` flag only seeds ids not present in the
|
|
543
|
+
* previous `nodes` value, so re-emitting the array never reverts branches
|
|
544
|
+
* the user has since toggled.
|
|
545
|
+
*/
|
|
546
|
+
private readonly expandedIds;
|
|
547
|
+
/** Id of the node holding the roving tab stop. */
|
|
548
|
+
private readonly activeId;
|
|
549
|
+
/** Visible nodes in DOM (pre-order) order. */
|
|
550
|
+
protected readonly rows: _angular_core.Signal<MkOrgChartRow[]>;
|
|
551
|
+
private readonly rowById;
|
|
552
|
+
/** The single id with `tabindex="0"` (falls back to the first visible node). */
|
|
553
|
+
private readonly tabStopId;
|
|
554
|
+
protected isExpanded(node: MkOrgChartNode<T>): boolean;
|
|
555
|
+
protected isSelected(node: MkOrgChartNode<T>): boolean;
|
|
556
|
+
protected tabIndexFor(node: MkOrgChartNode<T>): number;
|
|
557
|
+
protected toggleLabel(node: MkOrgChartNode<T>): string;
|
|
558
|
+
protected context(node: MkOrgChartNode<T>, depth: number): MkOrgChartNodeContext<T>;
|
|
559
|
+
/** `data.title` / `data.avatar` of the default card, read defensively. */
|
|
560
|
+
protected field(node: MkOrgChartNode<T>, key: 'title' | 'avatar'): string | undefined;
|
|
561
|
+
/** Expand or collapse a parent (no-op for leaves / non-collapsible charts). */
|
|
562
|
+
toggle(node: MkOrgChartNode<T>): void;
|
|
563
|
+
/** Expand or collapse a parent explicitly. */
|
|
564
|
+
setExpanded(node: MkOrgChartNode<T>, expanded: boolean): void;
|
|
565
|
+
/** Select a node by reference (no-op unless `selectable`). */
|
|
566
|
+
select(node: MkOrgChartNode<T>): void;
|
|
567
|
+
private activate;
|
|
568
|
+
protected onCardClick(event: Event, node: MkOrgChartNode<T>): void;
|
|
569
|
+
protected onToggleClick(event: Event, node: MkOrgChartNode<T>): void;
|
|
570
|
+
/** Keeps the roving tab stop on whichever item last received focus. */
|
|
571
|
+
protected onFocusIn(event: Event): void;
|
|
572
|
+
protected onKeydown(event: Event): void;
|
|
573
|
+
/**
|
|
574
|
+
* Map an arrow key to a tree direction. Top-down: Down = into, Up = parent,
|
|
575
|
+
* Left/Right = siblings (mirrored in RTL). Left-to-right: Right = into,
|
|
576
|
+
* Left = parent (mirrored in RTL), Up/Down = siblings.
|
|
577
|
+
*/
|
|
578
|
+
private intentOf;
|
|
579
|
+
private siblingsOf;
|
|
580
|
+
private isRtl;
|
|
581
|
+
private itemIdOf;
|
|
582
|
+
private focusItem;
|
|
583
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkOrgChart<any>, never>;
|
|
584
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkOrgChart<any>, "mk-org-chart", ["mkOrgChart"], { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "expanded": "expandedChange"; "nodeClick": "nodeClick"; "nodeToggle": "nodeToggle"; }, ["nodeDef"], never, true, never>;
|
|
585
|
+
}
|
|
586
|
+
|
|
388
587
|
/** Direction of a {@link MkStatCard} delta. */
|
|
389
588
|
type MkStatTrend = 'up' | 'down' | 'neutral';
|
|
390
589
|
/**
|
|
@@ -1819,6 +2018,8 @@ declare class MkSkeletonPreset {
|
|
|
1819
2018
|
declare class MkInlineEdit implements ControlValueAccessor {
|
|
1820
2019
|
private readonly injector;
|
|
1821
2020
|
private readonly field;
|
|
2021
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
2022
|
+
private readonly fieldTouched;
|
|
1822
2023
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
1823
2024
|
private readonly displayRef;
|
|
1824
2025
|
private readonly inputRef;
|
|
@@ -2777,5 +2978,5 @@ declare function mkParseMarkdown(src: string, options?: MkMarkdownParseOptions):
|
|
|
2777
2978
|
*/
|
|
2778
2979
|
declare function mkRenderMarkdown(blocks: MkMarkdownBlock[], options?: MkMarkdownRenderOptions): string;
|
|
2779
2980
|
|
|
2780
|
-
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, 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, mkParseAnsi, mkParseMarkdown, mkParseRgb, mkRelativeLuminance, mkRenderMarkdown, mkSplitDuration, mkSquarify, mkStripAnsi };
|
|
2781
|
-
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, MkPoint, MkProfileCardOrientation, MkQrEcc, MkRgb, MkScatterPoint, MkScatterSeries, MkSkeletonPresetKind, MkSkeletonShape, MkSparklineType, MkStatTrend, MkTagVariant, MkTreemapItem, MkTreemapRect };
|
|
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 };
|
|
@@ -111,9 +111,9 @@ declare class MkCalendar implements ControlValueAccessor, Validator {
|
|
|
111
111
|
/** Two-way selected date (single-date mode). */
|
|
112
112
|
readonly value: _angular_core.ModelSignal<Date | null>;
|
|
113
113
|
/** Earliest selectable date (inclusive, day granularity). */
|
|
114
|
-
readonly min: _angular_core.
|
|
114
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
115
115
|
/** Latest selectable date (inclusive, day granularity). */
|
|
116
|
-
readonly max: _angular_core.
|
|
116
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
117
117
|
/** First column of the week: 0 = Sunday … 6 = Saturday. */
|
|
118
118
|
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
119
119
|
/** Disable the whole calendar. */
|
|
@@ -158,6 +158,8 @@ declare class MkCalendar implements ControlValueAccessor, Validator {
|
|
|
158
158
|
protected readonly hoveredDate: _angular_core.WritableSignal<Date | null>;
|
|
159
159
|
/** Disabled by the `disabled` input or by the bound form control. */
|
|
160
160
|
protected readonly isControlDisabled: _angular_core.Signal<boolean>;
|
|
161
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
162
|
+
private readonly fieldTouched;
|
|
161
163
|
protected readonly isInvalid: _angular_core.Signal<boolean>;
|
|
162
164
|
/** First day of the visible month. */
|
|
163
165
|
protected readonly viewMonth: _angular_core.Signal<Date>;
|
|
@@ -235,6 +237,8 @@ declare class MkCalendar implements ControlValueAccessor, Validator {
|
|
|
235
237
|
declare class MkDatePicker implements ControlValueAccessor, Validator {
|
|
236
238
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
237
239
|
private readonly field;
|
|
240
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
241
|
+
private readonly fieldTouched;
|
|
238
242
|
private readonly host;
|
|
239
243
|
private readonly injector;
|
|
240
244
|
private readonly inputRef;
|
|
@@ -246,9 +250,9 @@ declare class MkDatePicker implements ControlValueAccessor, Validator {
|
|
|
246
250
|
/** Accessible name when the picker is used without an `mk-form-field` label. */
|
|
247
251
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
248
252
|
protected readonly ariaLabelAttr: _angular_core.Signal<string | null>;
|
|
249
|
-
readonly min: _angular_core.
|
|
253
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
250
254
|
/** Latest selectable date (inclusive). */
|
|
251
|
-
readonly max: _angular_core.
|
|
255
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
252
256
|
/** Predicate marking individual days as disabled (threaded to the calendar). */
|
|
253
257
|
readonly disabledDate: _angular_core.InputSignal<((d: Date) => boolean) | null>;
|
|
254
258
|
/** Placeholder shown when empty. */
|
|
@@ -261,6 +265,8 @@ declare class MkDatePicker implements ControlValueAccessor, Validator {
|
|
|
261
265
|
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
262
266
|
/** Force invalid styling + `aria-invalid`. */
|
|
263
267
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
268
|
+
/** Mark required (adds `aria-required`). Set by Signal Forms' `[formField]` from the schema. */
|
|
269
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
264
270
|
/** First column of the calendar week (0 = Sunday). */
|
|
265
271
|
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
266
272
|
/** Control size. Ignored when nested in an `mk-form-field`. */
|
|
@@ -314,7 +320,7 @@ declare class MkDatePicker implements ControlValueAccessor, Validator {
|
|
|
314
320
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
315
321
|
registerOnValidatorChange(fn: () => void): void;
|
|
316
322
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkDatePicker, never>;
|
|
317
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDatePicker, "mk-date-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabledDate": { "alias": "disabledDate"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
323
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDatePicker, "mk-date-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabledDate": { "alias": "disabledDate"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
318
324
|
}
|
|
319
325
|
|
|
320
326
|
/** A selectable time option. */
|
|
@@ -354,6 +360,8 @@ interface MkTimeOption$1 {
|
|
|
354
360
|
declare class MkTimePicker implements ControlValueAccessor, Validator {
|
|
355
361
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
356
362
|
private readonly field;
|
|
363
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
364
|
+
private readonly fieldTouched;
|
|
357
365
|
private readonly host;
|
|
358
366
|
private readonly injector;
|
|
359
367
|
private readonly inputRef;
|
|
@@ -371,9 +379,9 @@ declare class MkTimePicker implements ControlValueAccessor, Validator {
|
|
|
371
379
|
protected readonly ariaLabelAttr: _angular_core.Signal<string | null>;
|
|
372
380
|
readonly valueFormat: _angular_core.InputSignal<"string" | "date">;
|
|
373
381
|
/** Earliest selectable time `HH:mm` (inclusive). */
|
|
374
|
-
readonly min: _angular_core.
|
|
382
|
+
readonly min: _angular_core.InputSignalWithTransform<string | null, string | null | undefined>;
|
|
375
383
|
/** Latest selectable time `HH:mm` (inclusive). */
|
|
376
|
-
readonly max: _angular_core.
|
|
384
|
+
readonly max: _angular_core.InputSignalWithTransform<string | null, string | null | undefined>;
|
|
377
385
|
/** Interval between generated options, in minutes. */
|
|
378
386
|
readonly step: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
379
387
|
/** Display 12-hour time with AM/PM (the model stays 24h). */
|
|
@@ -386,6 +394,8 @@ declare class MkTimePicker implements ControlValueAccessor, Validator {
|
|
|
386
394
|
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
387
395
|
/** Force invalid styling + `aria-invalid`. */
|
|
388
396
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
397
|
+
/** Mark required (adds `aria-required`). Set by Signal Forms' `[formField]` from the schema. */
|
|
398
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
389
399
|
/** Control size. Ignored when nested in an `mk-form-field`. */
|
|
390
400
|
readonly size: _angular_core.InputSignal<MkSize>;
|
|
391
401
|
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
@@ -459,7 +469,7 @@ declare class MkTimePicker implements ControlValueAccessor, Validator {
|
|
|
459
469
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
460
470
|
registerOnValidatorChange(fn: () => void): void;
|
|
461
471
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkTimePicker, never>;
|
|
462
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkTimePicker, "mk-time-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "hour12": { "alias": "hour12"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
472
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkTimePicker, "mk-time-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "hour12": { "alias": "hour12"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
463
473
|
}
|
|
464
474
|
|
|
465
475
|
/** A selectable time-of-day option in the panel's list. */
|
|
@@ -499,6 +509,8 @@ interface MkTimeOption {
|
|
|
499
509
|
declare class MkDateTimePicker implements ControlValueAccessor, Validator {
|
|
500
510
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
501
511
|
private readonly field;
|
|
512
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
513
|
+
private readonly fieldTouched;
|
|
502
514
|
private readonly host;
|
|
503
515
|
private readonly injector;
|
|
504
516
|
private readonly inputRef;
|
|
@@ -508,9 +520,9 @@ declare class MkDateTimePicker implements ControlValueAccessor, Validator {
|
|
|
508
520
|
/** Two-way selected date-time (local; seconds and ms are zero). */
|
|
509
521
|
readonly value: _angular_core.ModelSignal<Date | null>;
|
|
510
522
|
/** Earliest selectable instant (inclusive, minute precision). */
|
|
511
|
-
readonly min: _angular_core.
|
|
523
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
512
524
|
/** Latest selectable instant (inclusive, minute precision). */
|
|
513
|
-
readonly max: _angular_core.
|
|
525
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
514
526
|
/** Predicate marking individual days as disabled (threaded to the calendar). */
|
|
515
527
|
readonly disabledDate: _angular_core.InputSignal<((d: Date) => boolean) | null>;
|
|
516
528
|
/** Placeholder shown when empty. */
|
|
@@ -530,6 +542,8 @@ declare class MkDateTimePicker implements ControlValueAccessor, Validator {
|
|
|
530
542
|
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
531
543
|
/** Force invalid styling + `aria-invalid`. */
|
|
532
544
|
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
545
|
+
/** Mark required (adds `aria-required`). Set by Signal Forms' `[formField]` from the schema. */
|
|
546
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
533
547
|
/** First column of the calendar week (0 = Sunday). */
|
|
534
548
|
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
535
549
|
/** Control size. Ignored when nested in an `mk-form-field`. */
|
|
@@ -614,7 +628,7 @@ declare class MkDateTimePicker implements ControlValueAccessor, Validator {
|
|
|
614
628
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
615
629
|
registerOnValidatorChange(fn: () => void): void;
|
|
616
630
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkDateTimePicker, never>;
|
|
617
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDateTimePicker, "mk-datetime-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabledDate": { "alias": "disabledDate"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "hour12": { "alias": "hour12"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
631
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkDateTimePicker, "mk-datetime-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabledDate": { "alias": "disabledDate"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "hour12": { "alias": "hour12"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
618
632
|
}
|
|
619
633
|
|
|
620
634
|
/** A selected date range. Either endpoint may be `null` while incomplete. */
|
|
@@ -636,6 +650,8 @@ interface MkDateRange {
|
|
|
636
650
|
declare class MkDateRangePicker implements ControlValueAccessor, Validator {
|
|
637
651
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
638
652
|
private readonly field;
|
|
653
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
654
|
+
private readonly fieldTouched;
|
|
639
655
|
private readonly host;
|
|
640
656
|
private readonly injector;
|
|
641
657
|
private readonly triggerRef;
|
|
@@ -644,9 +660,9 @@ declare class MkDateRangePicker implements ControlValueAccessor, Validator {
|
|
|
644
660
|
/** Two-way selected range. */
|
|
645
661
|
readonly value: _angular_core.ModelSignal<MkDateRange>;
|
|
646
662
|
/** Earliest selectable date (inclusive). */
|
|
647
|
-
readonly min: _angular_core.
|
|
663
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
648
664
|
/** Latest selectable date (inclusive). */
|
|
649
|
-
readonly max: _angular_core.
|
|
665
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
650
666
|
/** Predicate marking individual days as disabled. */
|
|
651
667
|
readonly disabledDate: _angular_core.InputSignal<((d: Date) => boolean) | null>;
|
|
652
668
|
/** Placeholder shown when no range is selected. */
|
|
@@ -744,6 +760,8 @@ interface Cell {
|
|
|
744
760
|
declare class MkMonthPicker implements ControlValueAccessor, Validator {
|
|
745
761
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
746
762
|
private readonly field;
|
|
763
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
764
|
+
private readonly fieldTouched;
|
|
747
765
|
private readonly host;
|
|
748
766
|
private readonly injector;
|
|
749
767
|
private readonly triggerRef;
|
|
@@ -754,9 +772,9 @@ declare class MkMonthPicker implements ControlValueAccessor, Validator {
|
|
|
754
772
|
/** Pick a month or a whole year. */
|
|
755
773
|
readonly mode: _angular_core.InputSignal<MkMonthPickerMode>;
|
|
756
774
|
/** Earliest selectable date. */
|
|
757
|
-
readonly min: _angular_core.
|
|
775
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
758
776
|
/** Latest selectable date. */
|
|
759
|
-
readonly max: _angular_core.
|
|
777
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
760
778
|
/** Placeholder shown when empty. */
|
|
761
779
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
762
780
|
/** Display pattern (defaults to `MMM yyyy` / `yyyy`). */
|
|
@@ -840,6 +858,8 @@ interface MkWeek {
|
|
|
840
858
|
declare class MkWeekPicker implements ControlValueAccessor, Validator {
|
|
841
859
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
842
860
|
private readonly field;
|
|
861
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
862
|
+
private readonly fieldTouched;
|
|
843
863
|
private readonly host;
|
|
844
864
|
private readonly injector;
|
|
845
865
|
private readonly triggerRef;
|
|
@@ -847,9 +867,9 @@ declare class MkWeekPicker implements ControlValueAccessor, Validator {
|
|
|
847
867
|
/** Two-way selected week. */
|
|
848
868
|
readonly value: _angular_core.ModelSignal<MkWeek | null>;
|
|
849
869
|
/** Earliest selectable date (inclusive). */
|
|
850
|
-
readonly min: _angular_core.
|
|
870
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
851
871
|
/** Latest selectable date (inclusive). */
|
|
852
|
-
readonly max: _angular_core.
|
|
872
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
853
873
|
/** First column of the calendar week (0 = Sunday). Also anchors the week. */
|
|
854
874
|
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
855
875
|
/** Placeholder shown when empty. */
|
|
@@ -1251,12 +1271,14 @@ interface MkDatePart {
|
|
|
1251
1271
|
*/
|
|
1252
1272
|
declare class MkMiniDate implements ControlValueAccessor, Validator {
|
|
1253
1273
|
private readonly field;
|
|
1274
|
+
/** Signal Forms: gates `invalid` until the bound field is touched or dirty. */
|
|
1275
|
+
private readonly fieldTouched;
|
|
1254
1276
|
protected readonly i18n: _mk_kit_ui_core.MkI18nStrings;
|
|
1255
1277
|
private readonly segEls;
|
|
1256
1278
|
/** Minimum selectable date (inclusive). */
|
|
1257
|
-
readonly min: _angular_core.
|
|
1279
|
+
readonly min: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
1258
1280
|
/** Maximum selectable date (inclusive). */
|
|
1259
|
-
readonly max: _angular_core.
|
|
1281
|
+
readonly max: _angular_core.InputSignalWithTransform<Date | null, Date | null | undefined>;
|
|
1260
1282
|
/** Two-way value — a real `Date`, or `null` while incomplete. */
|
|
1261
1283
|
readonly value: _angular_core.ModelSignal<Date | null>;
|
|
1262
1284
|
/** Disable the control. */
|
|
@@ -875,23 +875,29 @@ interface MkRelativeTimeOptions {
|
|
|
875
875
|
* The pipe picks the largest unit whose magnitude is at least 1 (seconds →
|
|
876
876
|
* minutes → hours → days → weeks → months → years) and rounds. Pass `now`
|
|
877
877
|
* for deterministic output in tests, or bind a ticking signal to keep a
|
|
878
|
-
* list live — a pure pipe only re-runs when an argument changes
|
|
878
|
+
* list live — a pure pipe only re-runs when an argument changes. The second
|
|
879
|
+
* argument is either that `now` or the options object, so options alone
|
|
880
|
+
* need no `null` placeholder; the three-argument form (`now`, then options)
|
|
881
|
+
* works too:
|
|
879
882
|
*
|
|
880
883
|
* ```html
|
|
881
884
|
* {{ comment.createdAt | mkRelativeTime }} <!-- 3 minutes ago -->
|
|
882
885
|
* {{ due | mkRelativeTime:now() }} <!-- in 2 days (now() ticks) -->
|
|
883
|
-
* {{ due | mkRelativeTime:
|
|
884
|
-
* {{ ts | mkRelativeTime:
|
|
886
|
+
* {{ due | mkRelativeTime:{ style: 'short' } }} <!-- in 2 days -->
|
|
887
|
+
* {{ ts | mkRelativeTime:{ locale: 'pl', numeric: 'always' } }} <!-- 3 minuty temu -->
|
|
888
|
+
* {{ due | mkRelativeTime:now():{ style: 'short' } }} <!-- in 2 days (ticking) -->
|
|
885
889
|
* ```
|
|
886
890
|
*/
|
|
887
891
|
declare class MkRelativeTimePipe implements PipeTransform {
|
|
888
892
|
private readonly i18n;
|
|
889
893
|
/**
|
|
890
894
|
* @param value The instant to describe.
|
|
891
|
-
* @param
|
|
892
|
-
*
|
|
895
|
+
* @param nowOrOptions Reference instant (defaults to `Date.now()` at call
|
|
896
|
+
* time), or — when only options are wanted — the options object itself.
|
|
897
|
+
* @param options Locale, numeric mode, style and unit cap (three-argument
|
|
898
|
+
* form, after an explicit `now`).
|
|
893
899
|
*/
|
|
894
|
-
transform(value: Date | number | string | null | undefined,
|
|
900
|
+
transform(value: Date | number | string | null | undefined, nowOrOptions?: Date | number | string | MkRelativeTimeOptions | null, options?: MkRelativeTimeOptions): string;
|
|
895
901
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkRelativeTimePipe, never>;
|
|
896
902
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<MkRelativeTimePipe, "mkRelativeTime", true>;
|
|
897
903
|
}
|