@mk-kit/ui 0.51.0 → 0.52.1
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/mk-kit-ui-block-editor.mjs +2 -1
- package/fesm2022/mk-kit-ui-block-editor.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-checkbox.mjs +2 -1
- package/fesm2022/mk-kit-ui-checkbox.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-core-signal-forms.mjs +56 -0
- package/fesm2022/mk-kit-ui-core-signal-forms.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-core.mjs +1 -43
- package/fesm2022/mk-kit-ui-core.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-data.mjs +2 -1
- package/fesm2022/mk-kit-ui-data.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-datetime.mjs +2 -1
- package/fesm2022/mk-kit-ui-datetime.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-forms.mjs +2 -1
- package/fesm2022/mk-kit-ui-forms.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-rich-text.mjs +2 -1
- package/fesm2022/mk-kit-ui-rich-text.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-testing.mjs +8 -3
- 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/types/mk-kit-ui-core-signal-forms.d.ts +31 -0
- package/types/mk-kit-ui-core.d.ts +1 -29
- package/types/mk-kit-ui-testing.d.ts +5 -2
- package/types/mk-kit-ui.d.ts +1 -0
package/fesm2022/mk-kit-ui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mk-kit-ui.mjs","sources":["../../../projects/mk-kit/src/public-api.ts","../../../projects/mk-kit/src/mk-kit-ui.ts"],"sourcesContent":["/*\n * Public API Surface of @mk-kit/ui.\n *\n * The library ships Material-style secondary entry points — import from the\n * group entries (`@mk-kit/ui/forms`, `@mk-kit/ui/table`, …) so a code-split\n * app only carries the groups each chunk uses. This root entry re-exports\n * everything for convenience; importing it eagerly pulls all groups into the\n * importing chunk.\n */\nexport * from '@mk-kit/ui/core';\nexport * from '@mk-kit/ui/icon';\nexport * from '@mk-kit/ui/icon/extended';\nexport * from '@mk-kit/ui/chip';\nexport * from '@mk-kit/ui/checkbox';\nexport * from '@mk-kit/ui/button';\nexport * from '@mk-kit/ui/directives';\nexport * from '@mk-kit/ui/dnd';\nexport * from '@mk-kit/ui/navigation';\nexport * from '@mk-kit/ui/forms';\nexport * from '@mk-kit/ui/datetime';\nexport * from '@mk-kit/ui/table';\nexport * from '@mk-kit/ui/data';\nexport * from '@mk-kit/ui/feedback';\nexport * from '@mk-kit/ui/rich-text';\nexport * from '@mk-kit/ui/block-editor';\nexport * from '@mk-kit/ui/context-menu';\nexport * from '@mk-kit/ui/layout';\nexport * from '@mk-kit/ui/chat';\nexport * from '@mk-kit/ui/query-builder';\nexport * from '@mk-kit/ui/dynamic-form';\nexport * from '@mk-kit/ui/media';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mk-kit-ui.mjs","sources":["../../../projects/mk-kit/src/public-api.ts","../../../projects/mk-kit/src/mk-kit-ui.ts"],"sourcesContent":["/*\n * Public API Surface of @mk-kit/ui.\n *\n * The library ships Material-style secondary entry points — import from the\n * group entries (`@mk-kit/ui/forms`, `@mk-kit/ui/table`, …) so a code-split\n * app only carries the groups each chunk uses. This root entry re-exports\n * everything for convenience; importing it eagerly pulls all groups into the\n * importing chunk.\n */\nexport * from '@mk-kit/ui/core';\nexport * from '@mk-kit/ui/core/signal-forms';\nexport * from '@mk-kit/ui/icon';\nexport * from '@mk-kit/ui/icon/extended';\nexport * from '@mk-kit/ui/chip';\nexport * from '@mk-kit/ui/checkbox';\nexport * from '@mk-kit/ui/button';\nexport * from '@mk-kit/ui/directives';\nexport * from '@mk-kit/ui/dnd';\nexport * from '@mk-kit/ui/navigation';\nexport * from '@mk-kit/ui/forms';\nexport * from '@mk-kit/ui/datetime';\nexport * from '@mk-kit/ui/table';\nexport * from '@mk-kit/ui/data';\nexport * from '@mk-kit/ui/feedback';\nexport * from '@mk-kit/ui/rich-text';\nexport * from '@mk-kit/ui/block-editor';\nexport * from '@mk-kit/ui/context-menu';\nexport * from '@mk-kit/ui/layout';\nexport * from '@mk-kit/ui/chat';\nexport * from '@mk-kit/ui/query-builder';\nexport * from '@mk-kit/ui/dynamic-form';\nexport * from '@mk-kit/ui/media';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAQG;;ACRH;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mk-kit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -85,6 +85,10 @@
|
|
|
85
85
|
"types": "./types/mk-kit-ui-core.d.ts",
|
|
86
86
|
"default": "./fesm2022/mk-kit-ui-core.mjs"
|
|
87
87
|
},
|
|
88
|
+
"./core/signal-forms": {
|
|
89
|
+
"types": "./types/mk-kit-ui-core-signal-forms.d.ts",
|
|
90
|
+
"default": "./fesm2022/mk-kit-ui-core-signal-forms.mjs"
|
|
91
|
+
},
|
|
88
92
|
"./data": {
|
|
89
93
|
"types": "./types/mk-kit-ui-data.d.ts",
|
|
90
94
|
"default": "./fesm2022/mk-kit-ui-data.mjs"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Touched-gate for a control's `invalid` input under Signal Forms.
|
|
5
|
+
*
|
|
6
|
+
* When a control is bound with the `[formField]` directive, Angular writes the
|
|
7
|
+
* field's `invalid()` state straight into the control's `invalid` input — from
|
|
8
|
+
* the first render, before the user has reached the field. mk-kit controls
|
|
9
|
+
* pass that input through this gate so the invalid visual (and `aria-invalid`)
|
|
10
|
+
* only shows once the field is touched or dirty, matching how `mk-form-field`
|
|
11
|
+
* reveals its message and how `submit()` (which marks every field touched)
|
|
12
|
+
* surfaces the remaining problems.
|
|
13
|
+
*
|
|
14
|
+
* Returns a signal that is always `true` for a control that is not bound with
|
|
15
|
+
* `[formField]`, so a standalone `[invalid]="true"` keeps working as before.
|
|
16
|
+
* Call it in a field initializer (an injection context):
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* private readonly fieldTouched = mkInjectFieldTouched();
|
|
20
|
+
* protected readonly isInvalid = computed(
|
|
21
|
+
* () => (this.invalid() && this.fieldTouched()) || (this.field?.hasError() ?? false),
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* The binding is looked up lazily, on first read: the `FormField` directive
|
|
26
|
+
* itself injects the element's `NG_VALUE_ACCESSOR` (the control) while it is
|
|
27
|
+
* created, so resolving it from the control's constructor would be circular.
|
|
28
|
+
*/
|
|
29
|
+
declare function mkInjectFieldTouched(): Signal<boolean>;
|
|
30
|
+
|
|
31
|
+
export { mkInjectFieldTouched };
|
|
@@ -1335,33 +1335,5 @@ declare function mkSignalErrorsToValidationErrors(errors: readonly MkSignalValid
|
|
|
1335
1335
|
*/
|
|
1336
1336
|
declare function mkSignalErrorMessage(errors: readonly MkSignalValidationError[] | null | undefined, strings: MkValidationStrings, overrides?: MkErrorMessages): string | null;
|
|
1337
1337
|
|
|
1338
|
-
|
|
1339
|
-
* Touched-gate for a control's `invalid` input under Signal Forms.
|
|
1340
|
-
*
|
|
1341
|
-
* When a control is bound with the `[formField]` directive, Angular writes the
|
|
1342
|
-
* field's `invalid()` state straight into the control's `invalid` input — from
|
|
1343
|
-
* the first render, before the user has reached the field. mk-kit controls
|
|
1344
|
-
* pass that input through this gate so the invalid visual (and `aria-invalid`)
|
|
1345
|
-
* only shows once the field is touched or dirty, matching how `mk-form-field`
|
|
1346
|
-
* reveals its message and how `submit()` (which marks every field touched)
|
|
1347
|
-
* surfaces the remaining problems.
|
|
1348
|
-
*
|
|
1349
|
-
* Returns a signal that is always `true` for a control that is not bound with
|
|
1350
|
-
* `[formField]`, so a standalone `[invalid]="true"` keeps working as before.
|
|
1351
|
-
* Call it in a field initializer (an injection context):
|
|
1352
|
-
*
|
|
1353
|
-
* ```ts
|
|
1354
|
-
* private readonly fieldTouched = mkInjectFieldTouched();
|
|
1355
|
-
* protected readonly isInvalid = computed(
|
|
1356
|
-
* () => (this.invalid() && this.fieldTouched()) || (this.field?.hasError() ?? false),
|
|
1357
|
-
* );
|
|
1358
|
-
* ```
|
|
1359
|
-
*
|
|
1360
|
-
* The binding is looked up lazily, on first read: the `FormField` directive
|
|
1361
|
-
* itself injects the element's `NG_VALUE_ACCESSOR` (the control) while it is
|
|
1362
|
-
* created, so resolving it from the control's constructor would be circular.
|
|
1363
|
-
*/
|
|
1364
|
-
declare function mkInjectFieldTouched(): Signal<boolean>;
|
|
1365
|
-
|
|
1366
|
-
export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_OVERLAY_ROOT, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkBodyLevelAncestor, mkFirstErrorMessage, mkGetFocusable, mkInjectFieldTouched, mkIsResponsive, mkMergeI18n, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkValidatorChange, provideMkI18n };
|
|
1338
|
+
export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_OVERLAY_ROOT, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkBodyLevelAncestor, mkFirstErrorMessage, mkGetFocusable, mkIsResponsive, mkMergeI18n, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkValidatorChange, provideMkI18n };
|
|
1367
1339
|
export type { MkAriaLivePoliteness, MkBlockEditorStrings, MkBreakpoint, MkBreakpoints, MkContrastPreference, MkDensity, MkErrorMessages, MkI18nOverrides, MkI18nStrings, MkOverlayConfig, MkOverlayRootFn, MkResolvedContrast, MkResolvedTheme, MkResponsive, MkSignalValidationError, MkSize, MkSortAnnounceDirection, MkThemePreference, MkTone, MkValidationStrings, MkValidatorChangeRef, MkVariant };
|
|
@@ -279,9 +279,9 @@ declare class MkMenuHarness extends MkHarness {
|
|
|
279
279
|
private itemElements;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
/** One data row of `mk-table
|
|
282
|
+
/** One data row of `mk-table` (the `emptyMessage` placeholder row is not one). */
|
|
283
283
|
declare class MkTableRowHarness extends MkHarness {
|
|
284
|
-
static readonly hostSelector = "tr.mk-table__row";
|
|
284
|
+
static readonly hostSelector = "tr.mk-table__row:not(.mk-table__row--empty)";
|
|
285
285
|
/** Cell texts of the data columns (expand / select cells excluded). */
|
|
286
286
|
cells(): string[];
|
|
287
287
|
cell(index: number): string;
|
|
@@ -310,7 +310,10 @@ declare class MkTableHarness extends MkHarness {
|
|
|
310
310
|
selectedRowCount(): Promise<number>;
|
|
311
311
|
/** Toggle the header "select all" checkbox. */
|
|
312
312
|
toggleAll(): Promise<void>;
|
|
313
|
+
/** True when the table shows no data rows (an `emptyMessage` row does not count). */
|
|
313
314
|
isEmpty(): boolean;
|
|
315
|
+
/** The rendered `emptyMessage`, or `null` while the table has rows. */
|
|
316
|
+
emptyMessage(): string | null;
|
|
314
317
|
/**
|
|
315
318
|
* Set a header-row filter (table is `filterable`). `value` is typed into
|
|
316
319
|
* a text / number / date box, or picked from a select by option label or
|