@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i1 from '@angular/forms';
|
|
2
2
|
import { Validators, FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
+
import { schema, hidden, disabled, validate, applyEach, required, min, max, minLength, maxLength, pattern, email } from '@angular/forms/signals';
|
|
3
4
|
import * as i0 from '@angular/core';
|
|
4
5
|
import { input, inject, TemplateRef, Directive, forwardRef, numberAttribute, computed, ChangeDetectionStrategy, Component, DestroyRef, model, booleanAttribute, output, contentChildren, signal, effect, untracked } from '@angular/core';
|
|
5
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
@@ -196,6 +197,152 @@ function mkDynamicSpan(field, columns) {
|
|
|
196
197
|
return Math.min(12, Math.max(1, span));
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Converts an `mk-dynamic-form` schema into a Signal Forms `Schema`, so the
|
|
202
|
+
* same JSON definition can drive `form()` from `@angular/forms/signals`:
|
|
203
|
+
*
|
|
204
|
+
* ```ts
|
|
205
|
+
* const definition: MkDynamicSchema = { fields: [ … ] };
|
|
206
|
+
* const model = signal(mkDynamicDefaults(definition.fields));
|
|
207
|
+
* const f = form(model, mkDynamicFormToSignalSchema(definition));
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* What maps:
|
|
211
|
+
* - `required` → `required()` (for `checkbox` / `switch` this means "must be
|
|
212
|
+
* on", as Signal Forms treats `false` as empty — the `requiredTrue`
|
|
213
|
+
* behaviour of the renderer);
|
|
214
|
+
* - `validators.min` / `max` / `minLength` / `maxLength` / `pattern` / `email`
|
|
215
|
+
* (and `type: 'email'`) → the matching built-in rules, so the field's
|
|
216
|
+
* `min()` / `maxLength()` / `pattern()` state is set as well;
|
|
217
|
+
* - `validators.custom` → `validate()` running each `ValidatorFn` against a
|
|
218
|
+
* throw-away `FormControl` holding the field's value; the reactive error
|
|
219
|
+
* keys become error `kind`s with their payload attached, so
|
|
220
|
+
* `mk-form-field` renders them through the same i18n table;
|
|
221
|
+
* - `disabled: true` and `disabledWhen` → `disabled()`, `showWhen` →
|
|
222
|
+
* `hidden()` — the condition is evaluated against the form value exactly as
|
|
223
|
+
* the renderer does it (dotted paths, `and` / `or` / `not`, and inside an
|
|
224
|
+
* array item the item's own value with the root under `$root` and the
|
|
225
|
+
* position under `$index`);
|
|
226
|
+
* - `group` → the nested fields under the group's key, `array` → `applyEach`
|
|
227
|
+
* over the items plus `minItems` / `maxItems` errors from `min` / `max`.
|
|
228
|
+
*
|
|
229
|
+
* What differs from the renderer: a hidden Signal Forms field is skipped for
|
|
230
|
+
* validation and touched / dirty state but **keeps its value in the model**
|
|
231
|
+
* (the model is your data — nothing is stripped), so remove hidden controls
|
|
232
|
+
* from the template with `@if (!f.company().hidden())` and drop the value
|
|
233
|
+
* yourself before saving if it must not be sent. Layout properties (`span`,
|
|
234
|
+
* `columns`), `options`, `props` and `section` entries have no schema
|
|
235
|
+
* equivalent and are ignored.
|
|
236
|
+
*
|
|
237
|
+
* @param definition The dynamic-form schema, or just its `fields`.
|
|
238
|
+
* @template TModel The model type the schema binds to (defaults to a loose record).
|
|
239
|
+
*/
|
|
240
|
+
function mkDynamicFormToSignalSchema(definition) {
|
|
241
|
+
const fields = Array.isArray(definition) ? definition : definition.fields;
|
|
242
|
+
return schema((root) => {
|
|
243
|
+
const rootPath = root;
|
|
244
|
+
applyFields(root, fields, (ctx) => ctx.valueOf(rootPath));
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function applyFields(tree, fields, scopeOf) {
|
|
248
|
+
for (const f of fields) {
|
|
249
|
+
if (mkIsSection(f))
|
|
250
|
+
continue;
|
|
251
|
+
const path = tree[f.key];
|
|
252
|
+
if (!path)
|
|
253
|
+
continue;
|
|
254
|
+
if (f.showWhen !== undefined) {
|
|
255
|
+
const cond = f.showWhen;
|
|
256
|
+
hidden(path, { when: (ctx) => !mkDynamicCondition(cond, scopeOf(ctx)) });
|
|
257
|
+
}
|
|
258
|
+
if (f.disabledWhen !== undefined) {
|
|
259
|
+
const cond = f.disabledWhen;
|
|
260
|
+
disabled(path, { when: (ctx) => mkDynamicCondition(cond, scopeOf(ctx)) });
|
|
261
|
+
}
|
|
262
|
+
if (mkIsGroup(f)) {
|
|
263
|
+
applyFields(path, f.fields, scopeOf);
|
|
264
|
+
}
|
|
265
|
+
else if (mkIsArray(f)) {
|
|
266
|
+
applyArray(path, f, scopeOf);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
applyValueField(path, f);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function applyArray(path, f, scopeOf) {
|
|
274
|
+
if (f.min || f.max) {
|
|
275
|
+
const minItems = f.min;
|
|
276
|
+
const maxItems = f.max;
|
|
277
|
+
validate(path, (ctx) => {
|
|
278
|
+
const length = ctx.value()?.length ?? 0;
|
|
279
|
+
if (minItems && length < minItems) {
|
|
280
|
+
return customError('minItems', { requiredLength: minItems, actualLength: length });
|
|
281
|
+
}
|
|
282
|
+
if (maxItems && length > maxItems) {
|
|
283
|
+
return customError('maxItems', { requiredLength: maxItems, actualLength: length });
|
|
284
|
+
}
|
|
285
|
+
return undefined;
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
const itemPath = path;
|
|
289
|
+
applyEach(itemPath, (item) => {
|
|
290
|
+
const itemScope = (ctx) => ({
|
|
291
|
+
...ctx.valueOf(item),
|
|
292
|
+
$root: scopeOf(ctx),
|
|
293
|
+
$index: ctx.stateOf(item).keyInParent(),
|
|
294
|
+
});
|
|
295
|
+
applyFields(item, f.fields, itemScope);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
function applyValueField(path, f) {
|
|
299
|
+
const v = f.validators ?? {};
|
|
300
|
+
if (f.required)
|
|
301
|
+
required(path);
|
|
302
|
+
if (f.disabled)
|
|
303
|
+
disabled(path);
|
|
304
|
+
if (v.min !== undefined)
|
|
305
|
+
min(path, v.min);
|
|
306
|
+
if (v.max !== undefined)
|
|
307
|
+
max(path, v.max);
|
|
308
|
+
if (v.minLength !== undefined)
|
|
309
|
+
minLength(path, v.minLength);
|
|
310
|
+
if (v.maxLength !== undefined)
|
|
311
|
+
maxLength(path, v.maxLength);
|
|
312
|
+
if (v.pattern !== undefined) {
|
|
313
|
+
pattern(path, typeof v.pattern === 'string' ? new RegExp(v.pattern) : v.pattern);
|
|
314
|
+
}
|
|
315
|
+
if (v.email || f.type === 'email')
|
|
316
|
+
email(path);
|
|
317
|
+
if (v.custom?.length) {
|
|
318
|
+
const fns = v.custom;
|
|
319
|
+
validate(path, (ctx) => {
|
|
320
|
+
const control = new FormControl(ctx.value());
|
|
321
|
+
const out = [];
|
|
322
|
+
for (const fn of fns) {
|
|
323
|
+
const errors = fn(control);
|
|
324
|
+
if (!errors)
|
|
325
|
+
continue;
|
|
326
|
+
for (const [kind, payload] of Object.entries(errors)) {
|
|
327
|
+
out.push(customError(kind, payload));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return out.length ? out : undefined;
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* A validation error of the given kind carrying a reactive-forms payload
|
|
336
|
+
* (`{ requiredLength, actualLength }`, `true`, …) spread onto the error so
|
|
337
|
+
* per-key `errorMessages` functions receive what they always did.
|
|
338
|
+
*/
|
|
339
|
+
function customError(kind, payload) {
|
|
340
|
+
const err = { kind };
|
|
341
|
+
if (payload && typeof payload === 'object')
|
|
342
|
+
Object.assign(err, payload);
|
|
343
|
+
return err;
|
|
344
|
+
}
|
|
345
|
+
|
|
199
346
|
/**
|
|
200
347
|
* Registers a renderer for a custom field type:
|
|
201
348
|
*
|
|
@@ -310,7 +457,7 @@ class MkDynamicFields {
|
|
|
310
457
|
return item;
|
|
311
458
|
}
|
|
312
459
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: MkDynamicFields, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
313
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: MkDynamicFields, isStandalone: true, selector: "mk-dynamic-fields", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style.--mk-dyn-columns": "columns()" }, classAttribute: "mk-dynamic-fields" }, ngImport: i0, template: "@for (f of fields(); track f.type + ':' + ($any(f).key ?? $any(f).label ?? $index)) {\n @if (isVisible(f)) {\n @if (isSection(f)) {\n <div class=\"mk-dynamic-fields__section\" [style.--mk-dyn-span]=\"span(f)\">\n <h3 class=\"mk-dynamic-fields__section-title\">{{ f.label }}</h3>\n @if (f.hint) {\n <p class=\"mk-dynamic-fields__section-hint\">{{ f.hint }}</p>\n }\n </div>\n } @else if (isGroup(f)) {\n <fieldset class=\"mk-dynamic-fields__group\" [style.--mk-dyn-span]=\"span(f)\" [disabled]=\"control(f).disabled\">\n @if (f.label) {\n <legend class=\"mk-dynamic-fields__legend\">{{ f.label }}</legend>\n }\n @if (f.hint) {\n <p class=\"mk-dynamic-fields__section-hint\">{{ f.hint }}</p>\n }\n <mk-dynamic-fields [fields]=\"f.fields\" [group]=\"formGroup(f)\" [columns]=\"columnsOf(f)\" [scope]=\"scope()\" />\n </fieldset>\n } @else if (isArray(f)) {\n <fieldset class=\"mk-dynamic-fields__array\" [style.--mk-dyn-span]=\"span(f)\" [disabled]=\"control(f).disabled\">\n @if (f.label) {\n <legend class=\"mk-dynamic-fields__legend\">{{ f.label }}</legend>\n }\n @if (f.hint) {\n <p class=\"mk-dynamic-fields__section-hint\">{{ f.hint }}</p>\n }\n @for (item of formArray(f).controls; track item; let i = $index) {\n <div class=\"mk-dynamic-fields__item\">\n <mk-dynamic-fields class=\"mk-dynamic-fields__item-fields\" [fields]=\"f.fields\" [group]=\"item\" [columns]=\"columnsOf(f)\" [scope]=\"itemScope(f, i)\" />\n <button\n mkButton\n type=\"button\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n iconOnly\n class=\"mk-dynamic-fields__remove\"\n [attr.aria-label]=\"i18n.dynamicFormRemove(i + 1)\"\n [title]=\"i18n.dynamicFormRemove(i + 1)\"\n [disabled]=\"!canRemove(f)\"\n (click)=\"removeItem(f, i)\"\n >\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 4l8 8M12 4l-8 8\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n }\n <div class=\"mk-dynamic-fields__array-actions\">\n <button mkButton type=\"button\" variant=\"soft\" size=\"sm\" [disabled]=\"!canAdd(f)\" (click)=\"addItem(f)\">\n {{ f.addLabel || i18n.dynamicFormAdd }}\n </button>\n </div>\n </fieldset>\n } @else if (isValue(f)) {\n @let ctrl = control(f);\n @let custom = customTemplate(f);\n <mk-form-field\n class=\"mk-dynamic-fields__field\"\n [style.--mk-dyn-span]=\"span(f)\"\n [label]=\"f.type === 'checkbox' || f.type === 'switch' ? '' : (f.label ?? '')\"\n [hint]=\"f.hint ?? ''\"\n [required]=\"!!f.required\"\n [size]=\"size()\"\n [labelPosition]=\"labelPosition()\"\n >\n @if (custom) {\n <ng-container *ngTemplateOutlet=\"custom; context: customContext(f)\" />\n } @else {\n @switch (f.type) {\n @case ('textarea') {\n <textarea mkInput [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [rows]=\"p(f, 'rows', 3)\"></textarea>\n }\n @case ('password') {\n <mk-password-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [showStrength]=\"p(f, 'showStrength', false)\" [showRules]=\"p(f, 'showRules', false)\" [minLength]=\"p(f, 'minLength', 8)\" />\n }\n @case ('number') {\n <mk-number-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [min]=\"p(f, 'min', f.validators?.min ?? null)\" [max]=\"p(f, 'max', f.validators?.max ?? null)\" [step]=\"p(f, 'step', 1)\" />\n }\n @case ('currency') {\n <mk-currency-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [currency]=\"p(f, 'currency', 'USD')\" [locale]=\"p(f, 'locale', undefined)\" [min]=\"p(f, 'min', f.validators?.min ?? null)\" [max]=\"p(f, 'max', f.validators?.max ?? null)\" />\n }\n @case ('date') {\n <mk-date-picker [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [min]=\"p(f, 'min', null)\" [max]=\"p(f, 'max', null)\" [clearable]=\"p(f, 'clearable', true)\" />\n }\n @case ('time') {\n <mk-time-picker [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [step]=\"p(f, 'step', 15)\" [hour12]=\"p(f, 'hour12', false)\" [clearable]=\"p(f, 'clearable', true)\" />\n }\n @case ('datetime') {\n <mk-datetime-picker [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [min]=\"p(f, 'min', null)\" [max]=\"p(f, 'max', null)\" [clearable]=\"p(f, 'clearable', true)\" />\n }\n @case ('select') {\n <mk-select [formControl]=\"$any(ctrl)\" [options]=\"$any(f.options ?? [])\" [placeholder]=\"f.placeholder ?? ''\" />\n }\n @case ('multi-select') {\n <mk-multi-select [formControl]=\"$any(ctrl)\" [options]=\"$any(f.options ?? [])\" [placeholder]=\"f.placeholder ?? ''\" [max]=\"p(f, 'max', 0)\" />\n }\n @case ('autocomplete') {\n <mk-autocomplete [formControl]=\"$any(ctrl)\" [options]=\"$any(f.options ?? [])\" [placeholder]=\"f.placeholder ?? ''\" [requireSelection]=\"p(f, 'requireSelection', false)\" />\n }\n @case ('radio') {\n <mk-radio-group [formControl]=\"$any(ctrl)\" [orientation]=\"p(f, 'orientation', 'vertical')\">\n @for (o of f.options ?? []; track $index) {\n <mk-radio [value]=\"o.value\" [disabled]=\"!!o.disabled\">{{ o.label }}</mk-radio>\n }\n </mk-radio-group>\n }\n @case ('toggle') {\n <mk-button-toggle-group [formControl]=\"$any(ctrl)\" [multiple]=\"p(f, 'multiple', false)\" [aria-label]=\"f.label ?? ''\">\n @for (o of f.options ?? []; track $index) {\n <mk-button-toggle [value]=\"o.value\" [disabled]=\"!!o.disabled\">{{ o.label }}</mk-button-toggle>\n }\n </mk-button-toggle-group>\n }\n @case ('checkbox') {\n <mk-checkbox [formControl]=\"$any(ctrl)\" [required]=\"!!f.required\">{{ f.label }}</mk-checkbox>\n }\n @case ('switch') {\n <mk-switch [formControl]=\"$any(ctrl)\">{{ f.label }}</mk-switch>\n }\n @case ('slider') {\n <mk-slider [formControl]=\"$any(ctrl)\" [min]=\"p(f, 'min', f.validators?.min ?? 0)\" [max]=\"p(f, 'max', f.validators?.max ?? 100)\" [step]=\"p(f, 'step', 1)\" [aria-label]=\"f.label ?? ''\" />\n }\n @case ('rating') {\n <mk-rating [formControl]=\"$any(ctrl)\" [max]=\"p(f, 'max', 5)\" [ariaLabel]=\"f.label ?? ''\" />\n }\n @case ('color') {\n <mk-color-picker [formControl]=\"$any(ctrl)\" [swatches]=\"p(f, 'swatches', [])\" [ariaLabel]=\"f.label ?? ''\" />\n }\n @case ('tags') {\n <mk-tag-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [max]=\"p(f, 'max', 0)\" />\n }\n @case ('phone') {\n <mk-phone-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [valueFormat]=\"p(f, 'valueFormat', 'e164')\" [country]=\"p(f, 'country', undefined)\" />\n }\n @case ('file') {\n <mk-file-upload [formControl]=\"$any(ctrl)\" [accept]=\"p(f, 'accept', '')\" [multiple]=\"p(f, 'multiple', false)\" [maxSize]=\"p(f, 'maxSize', 0)\" [maxFiles]=\"p(f, 'maxFiles', 0)\" />\n }\n @case ('code') {\n <mk-code-editor [formControl]=\"$any(ctrl)\" [language]=\"p(f, 'language', 'json')\" [rows]=\"p(f, 'rows', 8)\" [placeholder]=\"f.placeholder ?? ''\" />\n }\n @default {\n <input\n mkInput\n [type]=\"inputType(f)\"\n [formControl]=\"$any(ctrl)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [attr.maxlength]=\"f.validators?.maxLength ?? null\"\n />\n }\n }\n }\n </mk-form-field>\n }\n }\n}\n", dependencies: [{ kind: "component", type: i0.forwardRef(() => MkDynamicFields), selector: "mk-dynamic-fields", inputs: ["fields", "group", "columns", "scope"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.DefaultValueAccessor), selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.RequiredValidator), selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormControlDirective), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => MkButton), selector: "button[mkButton], a[mkButton]", inputs: ["variant", "tone", "size", "loading", "fullWidth", "iconOnly", "disabled"] }, { kind: "component", type: i0.forwardRef(() => MkCheckbox), selector: "mk-checkbox", inputs: ["checked", "indeterminate", "disabled", "invalid", "required", "size", "tone", "aria-label"], outputs: ["checkedChange", "indeterminateChange"] }, { kind: "component", type: i0.forwardRef(() => MkFormField), selector: "mk-form-field", inputs: ["label", "hint", "error", "errorMessages", "errorOn", "required", "disabled", "size", "labelPosition"] }, { kind: "component", type: i0.forwardRef(() => MkInput), selector: "input[mkInput], textarea[mkInput]", inputs: ["size", "invalid"] }, { kind: "component", type: i0.forwardRef(() => MkNumberInput), selector: "mk-number-input", inputs: ["aria-label", "min", "max", "step", "value", "placeholder", "disabled", "invalid", "size"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkCurrencyInput), selector: "mk-currency-input", inputs: ["aria-label", "currency", "locale", "decimals", "min", "max", "allowNegative", "size", "invalid", "disabled", "placeholder", "value"], outputs: ["valueChange"], exportAs: ["mkCurrencyInput"] }, { kind: "component", type: i0.forwardRef(() => MkSelect), selector: "mk-select", inputs: ["aria-label", "options", "placeholder", "size", "invalid", "disabled", "value"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkMultiSelect), selector: "mk-multi-select", inputs: ["aria-label", "options", "placeholder", "size", "invalid", "disabled", "filterMode", "minChars", "loading", "max", "closeOnSelect", "emptyMessage", "value"], outputs: ["valueChange", "search", "optionAdded", "optionRemoved"] }, { kind: "component", type: i0.forwardRef(() => MkAutocomplete), selector: "mk-autocomplete", inputs: ["aria-label", "options", "placeholder", "size", "invalid", "disabled", "filterMode", "minChars", "loading", "requireSelection", "emptyMessage", "value"], outputs: ["valueChange", "search", "optionSelected"] }, { kind: "component", type: i0.forwardRef(() => MkRadioGroup), selector: "mk-radio-group", inputs: ["value", "disabled", "invalid", "required", "size", "tone", "name", "orientation"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkRadio), selector: "mk-radio", inputs: ["value", "disabled"] }, { kind: "component", type: i0.forwardRef(() => MkButtonToggleGroup), selector: "mk-button-toggle-group", inputs: ["multiple", "size", "tone", "disabled", "invalid", "aria-label", "value"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkButtonToggle), selector: "mk-button-toggle", inputs: ["value", "disabled"] }, { kind: "component", type: i0.forwardRef(() => MkSwitch), selector: "mk-switch", inputs: ["checked", "disabled", "invalid", "size", "tone", "aria-label"], outputs: ["checkedChange"] }, { kind: "component", type: i0.forwardRef(() => MkSlider), selector: "mk-slider", inputs: ["min", "max", "step", "disabled", "invalid", "size", "tone", "aria-label", "value"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkRating), selector: "mk-rating", inputs: ["max", "value", "readonly", "disabled", "invalid", "size", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkColorPicker), selector: "mk-color-picker", inputs: ["value", "swatches", "hexInput", "disabled", "invalid", "size", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkTagInput), selector: "mk-tag-input", inputs: ["value", "placeholder", "max", "allowDuplicates", "addOnBlur", "separators", "invalid", "disabled", "size"], outputs: ["valueChange", "added", "removed"] }, { kind: "component", type: i0.forwardRef(() => MkPhoneInput), selector: "mk-phone-input", inputs: ["countries", "preferredCountries", "valueFormat", "size", "invalid", "disabled", "placeholder", "country", "value"], outputs: ["countryChange", "valueChange"], exportAs: ["mkPhoneInput"] }, { kind: "component", type: i0.forwardRef(() => MkFileUpload), selector: "mk-file-upload", inputs: ["accept", "multiple", "maxSize", "maxFiles", "disabled", "invalid", "label", "hint", "hideList", "uploadFn", "autoUpload", "valueFormat", "files"], outputs: ["filesChange", "filesSelected", "rejected", "uploaded", "removed"] }, { kind: "component", type: i0.forwardRef(() => MkCodeEditor), selector: "mk-code-editor", inputs: ["language", "placeholder", "readOnly", "disabled", "invalid", "rows", "lineNumbers", "tabSize", "wrap", "size", "ariaLabel", "value"], outputs: ["valueChange", "validate"], exportAs: ["mkCodeEditor"] }, { kind: "component", type: i0.forwardRef(() => MkPasswordInput), selector: "mk-password-input", inputs: ["value", "placeholder", "disabled", "size", "invalid", "showStrength", "showRules", "minLength", "autocomplete"], outputs: ["valueChange"], exportAs: ["mkPasswordInput"] }, { kind: "component", type: i0.forwardRef(() => MkDatePicker), selector: "mk-date-picker", inputs: ["value", "aria-label", "min", "max", "disabledDate", "placeholder", "displayFormat", "disabled", "clearable", "invalid", "firstDayOfWeek", "size"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkTimePicker), selector: "mk-time-picker", inputs: ["value", "aria-label", "valueFormat", "min", "max", "step", "hour12", "disabled", "placeholder", "clearable", "invalid", "size"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkDateTimePicker), selector: "mk-datetime-picker", inputs: ["value", "min", "max", "disabledDate", "placeholder", "displayFormat", "step", "hour12", "disabled", "clearable", "invalid", "firstDayOfWeek", "size"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
460
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: MkDynamicFields, isStandalone: true, selector: "mk-dynamic-fields", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style.--mk-dyn-columns": "columns()" }, classAttribute: "mk-dynamic-fields" }, ngImport: i0, template: "@for (f of fields(); track f.type + ':' + ($any(f).key ?? $any(f).label ?? $index)) {\n @if (isVisible(f)) {\n @if (isSection(f)) {\n <div class=\"mk-dynamic-fields__section\" [style.--mk-dyn-span]=\"span(f)\">\n <h3 class=\"mk-dynamic-fields__section-title\">{{ f.label }}</h3>\n @if (f.hint) {\n <p class=\"mk-dynamic-fields__section-hint\">{{ f.hint }}</p>\n }\n </div>\n } @else if (isGroup(f)) {\n <fieldset class=\"mk-dynamic-fields__group\" [style.--mk-dyn-span]=\"span(f)\" [disabled]=\"control(f).disabled\">\n @if (f.label) {\n <legend class=\"mk-dynamic-fields__legend\">{{ f.label }}</legend>\n }\n @if (f.hint) {\n <p class=\"mk-dynamic-fields__section-hint\">{{ f.hint }}</p>\n }\n <mk-dynamic-fields [fields]=\"f.fields\" [group]=\"formGroup(f)\" [columns]=\"columnsOf(f)\" [scope]=\"scope()\" />\n </fieldset>\n } @else if (isArray(f)) {\n <fieldset class=\"mk-dynamic-fields__array\" [style.--mk-dyn-span]=\"span(f)\" [disabled]=\"control(f).disabled\">\n @if (f.label) {\n <legend class=\"mk-dynamic-fields__legend\">{{ f.label }}</legend>\n }\n @if (f.hint) {\n <p class=\"mk-dynamic-fields__section-hint\">{{ f.hint }}</p>\n }\n @for (item of formArray(f).controls; track item; let i = $index) {\n <div class=\"mk-dynamic-fields__item\">\n <mk-dynamic-fields class=\"mk-dynamic-fields__item-fields\" [fields]=\"f.fields\" [group]=\"item\" [columns]=\"columnsOf(f)\" [scope]=\"itemScope(f, i)\" />\n <button\n mkButton\n type=\"button\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n iconOnly\n class=\"mk-dynamic-fields__remove\"\n [attr.aria-label]=\"i18n.dynamicFormRemove(i + 1)\"\n [title]=\"i18n.dynamicFormRemove(i + 1)\"\n [disabled]=\"!canRemove(f)\"\n (click)=\"removeItem(f, i)\"\n >\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 4l8 8M12 4l-8 8\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n }\n <div class=\"mk-dynamic-fields__array-actions\">\n <button mkButton type=\"button\" variant=\"soft\" size=\"sm\" [disabled]=\"!canAdd(f)\" (click)=\"addItem(f)\">\n {{ f.addLabel || i18n.dynamicFormAdd }}\n </button>\n </div>\n </fieldset>\n } @else if (isValue(f)) {\n @let ctrl = control(f);\n @let custom = customTemplate(f);\n <mk-form-field\n class=\"mk-dynamic-fields__field\"\n [style.--mk-dyn-span]=\"span(f)\"\n [label]=\"f.type === 'checkbox' || f.type === 'switch' ? '' : (f.label ?? '')\"\n [hint]=\"f.hint ?? ''\"\n [required]=\"!!f.required\"\n [size]=\"size()\"\n [labelPosition]=\"labelPosition()\"\n >\n @if (custom) {\n <ng-container *ngTemplateOutlet=\"custom; context: customContext(f)\" />\n } @else {\n @switch (f.type) {\n @case ('textarea') {\n <textarea mkInput [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [rows]=\"p(f, 'rows', 3)\"></textarea>\n }\n @case ('password') {\n <mk-password-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [showStrength]=\"p(f, 'showStrength', false)\" [showRules]=\"p(f, 'showRules', false)\" [minLength]=\"p(f, 'minLength', 8)\" />\n }\n @case ('number') {\n <mk-number-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [min]=\"p(f, 'min', f.validators?.min ?? null)\" [max]=\"p(f, 'max', f.validators?.max ?? null)\" [step]=\"p(f, 'step', 1)\" />\n }\n @case ('currency') {\n <mk-currency-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [currency]=\"p(f, 'currency', 'USD')\" [locale]=\"p(f, 'locale', undefined)\" [min]=\"p(f, 'min', f.validators?.min ?? null)\" [max]=\"p(f, 'max', f.validators?.max ?? null)\" />\n }\n @case ('date') {\n <mk-date-picker [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [min]=\"p(f, 'min', null)\" [max]=\"p(f, 'max', null)\" [clearable]=\"p(f, 'clearable', true)\" />\n }\n @case ('time') {\n <mk-time-picker [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [step]=\"p(f, 'step', 15)\" [hour12]=\"p(f, 'hour12', false)\" [clearable]=\"p(f, 'clearable', true)\" />\n }\n @case ('datetime') {\n <mk-datetime-picker [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [min]=\"p(f, 'min', null)\" [max]=\"p(f, 'max', null)\" [clearable]=\"p(f, 'clearable', true)\" />\n }\n @case ('select') {\n <mk-select [formControl]=\"$any(ctrl)\" [options]=\"$any(f.options ?? [])\" [placeholder]=\"f.placeholder ?? ''\" />\n }\n @case ('multi-select') {\n <mk-multi-select [formControl]=\"$any(ctrl)\" [options]=\"$any(f.options ?? [])\" [placeholder]=\"f.placeholder ?? ''\" [max]=\"p(f, 'max', 0)\" />\n }\n @case ('autocomplete') {\n <mk-autocomplete [formControl]=\"$any(ctrl)\" [options]=\"$any(f.options ?? [])\" [placeholder]=\"f.placeholder ?? ''\" [requireSelection]=\"p(f, 'requireSelection', false)\" />\n }\n @case ('radio') {\n <mk-radio-group [formControl]=\"$any(ctrl)\" [orientation]=\"p(f, 'orientation', 'vertical')\">\n @for (o of f.options ?? []; track $index) {\n <mk-radio [value]=\"o.value\" [disabled]=\"!!o.disabled\">{{ o.label }}</mk-radio>\n }\n </mk-radio-group>\n }\n @case ('toggle') {\n <mk-button-toggle-group [formControl]=\"$any(ctrl)\" [multiple]=\"p(f, 'multiple', false)\" [aria-label]=\"f.label ?? ''\">\n @for (o of f.options ?? []; track $index) {\n <mk-button-toggle [value]=\"o.value\" [disabled]=\"!!o.disabled\">{{ o.label }}</mk-button-toggle>\n }\n </mk-button-toggle-group>\n }\n @case ('checkbox') {\n <mk-checkbox [formControl]=\"$any(ctrl)\" [required]=\"!!f.required\">{{ f.label }}</mk-checkbox>\n }\n @case ('switch') {\n <mk-switch [formControl]=\"$any(ctrl)\">{{ f.label }}</mk-switch>\n }\n @case ('slider') {\n <mk-slider [formControl]=\"$any(ctrl)\" [min]=\"p(f, 'min', f.validators?.min ?? 0)\" [max]=\"p(f, 'max', f.validators?.max ?? 100)\" [step]=\"p(f, 'step', 1)\" [aria-label]=\"f.label ?? ''\" />\n }\n @case ('rating') {\n <mk-rating [formControl]=\"$any(ctrl)\" [max]=\"p(f, 'max', 5)\" [ariaLabel]=\"f.label ?? ''\" />\n }\n @case ('color') {\n <mk-color-picker [formControl]=\"$any(ctrl)\" [swatches]=\"p(f, 'swatches', [])\" [ariaLabel]=\"f.label ?? ''\" />\n }\n @case ('tags') {\n <mk-tag-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [max]=\"p(f, 'max', 0)\" />\n }\n @case ('phone') {\n <mk-phone-input [formControl]=\"$any(ctrl)\" [placeholder]=\"f.placeholder ?? ''\" [valueFormat]=\"p(f, 'valueFormat', 'e164')\" [country]=\"p(f, 'country', undefined)\" />\n }\n @case ('file') {\n <mk-file-upload [formControl]=\"$any(ctrl)\" [accept]=\"p(f, 'accept', '')\" [multiple]=\"p(f, 'multiple', false)\" [maxSize]=\"p(f, 'maxSize', 0)\" [maxFiles]=\"p(f, 'maxFiles', 0)\" />\n }\n @case ('code') {\n <mk-code-editor [formControl]=\"$any(ctrl)\" [language]=\"p(f, 'language', 'json')\" [rows]=\"p(f, 'rows', 8)\" [placeholder]=\"f.placeholder ?? ''\" />\n }\n @default {\n <input\n mkInput\n [type]=\"inputType(f)\"\n [formControl]=\"$any(ctrl)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [attr.maxlength]=\"f.validators?.maxLength ?? null\"\n />\n }\n }\n }\n </mk-form-field>\n }\n }\n}\n", dependencies: [{ kind: "component", type: i0.forwardRef(() => MkDynamicFields), selector: "mk-dynamic-fields", inputs: ["fields", "group", "columns", "scope"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.DefaultValueAccessor), selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i1.RequiredValidator), selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormControlDirective), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => MkButton), selector: "button[mkButton], a[mkButton]", inputs: ["variant", "tone", "size", "loading", "fullWidth", "iconOnly", "disabled"] }, { kind: "component", type: i0.forwardRef(() => MkCheckbox), selector: "mk-checkbox", inputs: ["checked", "indeterminate", "disabled", "invalid", "required", "size", "tone", "aria-label"], outputs: ["checkedChange", "indeterminateChange"] }, { kind: "component", type: i0.forwardRef(() => MkFormField), selector: "mk-form-field", inputs: ["label", "hint", "error", "errorMessages", "errorOn", "required", "disabled", "size", "labelPosition", "field"] }, { kind: "component", type: i0.forwardRef(() => MkInput), selector: "input[mkInput], textarea[mkInput]", inputs: ["size", "invalid"] }, { kind: "component", type: i0.forwardRef(() => MkNumberInput), selector: "mk-number-input", inputs: ["aria-label", "min", "max", "step", "value", "placeholder", "disabled", "invalid", "required", "size"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkCurrencyInput), selector: "mk-currency-input", inputs: ["aria-label", "currency", "locale", "decimals", "min", "max", "allowNegative", "size", "invalid", "disabled", "placeholder", "value"], outputs: ["valueChange"], exportAs: ["mkCurrencyInput"] }, { kind: "component", type: i0.forwardRef(() => MkSelect), selector: "mk-select", inputs: ["aria-label", "options", "placeholder", "size", "invalid", "required", "disabled", "value"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkMultiSelect), selector: "mk-multi-select", inputs: ["aria-label", "options", "placeholder", "size", "invalid", "required", "disabled", "filterMode", "minChars", "loading", "max", "closeOnSelect", "emptyMessage", "value"], outputs: ["valueChange", "search", "optionAdded", "optionRemoved"] }, { kind: "component", type: i0.forwardRef(() => MkAutocomplete), selector: "mk-autocomplete", inputs: ["aria-label", "options", "placeholder", "size", "invalid", "required", "disabled", "filterMode", "minChars", "loading", "requireSelection", "emptyMessage", "value"], outputs: ["valueChange", "search", "optionSelected"] }, { kind: "component", type: i0.forwardRef(() => MkRadioGroup), selector: "mk-radio-group", inputs: ["value", "disabled", "invalid", "required", "size", "tone", "name", "orientation"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkRadio), selector: "mk-radio", inputs: ["value", "disabled"] }, { kind: "component", type: i0.forwardRef(() => MkButtonToggleGroup), selector: "mk-button-toggle-group", inputs: ["multiple", "size", "tone", "disabled", "invalid", "aria-label", "value"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkButtonToggle), selector: "mk-button-toggle", inputs: ["value", "disabled"] }, { kind: "component", type: i0.forwardRef(() => MkSwitch), selector: "mk-switch", inputs: ["checked", "disabled", "invalid", "required", "size", "tone", "aria-label"], outputs: ["checkedChange"] }, { kind: "component", type: i0.forwardRef(() => MkSlider), selector: "mk-slider", inputs: ["min", "max", "step", "disabled", "invalid", "required", "size", "tone", "aria-label", "value"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkRating), selector: "mk-rating", inputs: ["max", "value", "readonly", "disabled", "invalid", "size", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkColorPicker), selector: "mk-color-picker", inputs: ["value", "swatches", "hexInput", "disabled", "invalid", "size", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkTagInput), selector: "mk-tag-input", inputs: ["value", "placeholder", "max", "allowDuplicates", "addOnBlur", "separators", "invalid", "required", "disabled", "size"], outputs: ["valueChange", "added", "removed"] }, { kind: "component", type: i0.forwardRef(() => MkPhoneInput), selector: "mk-phone-input", inputs: ["countries", "preferredCountries", "valueFormat", "size", "invalid", "disabled", "placeholder", "country", "value"], outputs: ["countryChange", "valueChange"], exportAs: ["mkPhoneInput"] }, { kind: "component", type: i0.forwardRef(() => MkFileUpload), selector: "mk-file-upload", inputs: ["accept", "multiple", "maxSize", "maxFiles", "disabled", "invalid", "label", "hint", "hideList", "uploadFn", "autoUpload", "valueFormat", "files"], outputs: ["filesChange", "filesSelected", "rejected", "uploaded", "removed"] }, { kind: "component", type: i0.forwardRef(() => MkCodeEditor), selector: "mk-code-editor", inputs: ["language", "placeholder", "readOnly", "disabled", "invalid", "rows", "lineNumbers", "tabSize", "wrap", "size", "ariaLabel", "value"], outputs: ["valueChange", "validate"], exportAs: ["mkCodeEditor"] }, { kind: "component", type: i0.forwardRef(() => MkPasswordInput), selector: "mk-password-input", inputs: ["value", "placeholder", "disabled", "size", "invalid", "showStrength", "showRules", "minLength", "autocomplete"], outputs: ["valueChange"], exportAs: ["mkPasswordInput"] }, { kind: "component", type: i0.forwardRef(() => MkDatePicker), selector: "mk-date-picker", inputs: ["value", "aria-label", "min", "max", "disabledDate", "placeholder", "displayFormat", "disabled", "clearable", "invalid", "required", "firstDayOfWeek", "size"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkTimePicker), selector: "mk-time-picker", inputs: ["value", "aria-label", "valueFormat", "min", "max", "step", "hour12", "disabled", "placeholder", "clearable", "invalid", "required", "size"], outputs: ["valueChange"] }, { kind: "component", type: i0.forwardRef(() => MkDateTimePicker), selector: "mk-datetime-picker", inputs: ["value", "min", "max", "disabledDate", "placeholder", "displayFormat", "step", "hour12", "disabled", "clearable", "invalid", "required", "firstDayOfWeek", "size"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
314
461
|
}
|
|
315
462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: MkDynamicFields, decorators: [{
|
|
316
463
|
type: Component,
|
|
@@ -574,5 +721,5 @@ function shallowEqual(a, b) {
|
|
|
574
721
|
* Generated bundle index. Do not edit.
|
|
575
722
|
*/
|
|
576
723
|
|
|
577
|
-
export { MkDynamicFieldDef, MkDynamicFields, MkDynamicForm, mkDynamicCondition, mkDynamicControl, mkDynamicDefaults, mkDynamicEmptyValue, mkDynamicFlatten, mkDynamicForm, mkDynamicGroup, mkDynamicSpan, mkDynamicValidators, mkIsArray, mkIsGroup, mkIsSection, mkIsValueField };
|
|
724
|
+
export { MkDynamicFieldDef, MkDynamicFields, MkDynamicForm, mkDynamicCondition, mkDynamicControl, mkDynamicDefaults, mkDynamicEmptyValue, mkDynamicFlatten, mkDynamicForm, mkDynamicFormToSignalSchema, mkDynamicGroup, mkDynamicSpan, mkDynamicValidators, mkIsArray, mkIsGroup, mkIsSection, mkIsValueField };
|
|
578
725
|
//# sourceMappingURL=mk-kit-ui-dynamic-form.mjs.map
|