@4sh/ui-kit 0.1.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/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, numberAttribute, booleanAttribute, output, contentChild, viewChild, viewChildren, ElementRef, signal, computed, isDevMode, effect, forwardRef, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
+
import { BaseFormField, formatLabel, dropdownOverlayPositions, createOptionResolver, warnMissingAccessibleName } from '@4sh/ui-kit/forms';
|
|
8
|
+
import { UiField } from '@4sh/ui-kit/ui-field';
|
|
9
|
+
import { UiIcon } from '@4sh/ui-kit/ui-icon';
|
|
10
|
+
import { UiChip } from '@4sh/ui-kit/ui-chip';
|
|
11
|
+
import { UiMotion } from '@4sh/ui-kit/motion';
|
|
12
|
+
import { closeOnNavigation } from '@4sh/ui-kit/overlay';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ui-input-tags — headless multi-value tag entry built on the `ui-field` shell
|
|
16
|
+
* (label + box + helper). Tags are entered by typing and pressing `Enter`
|
|
17
|
+
* (and/or a `delimiter`), and removed with `Backspace` / the × action.
|
|
18
|
+
*
|
|
19
|
+
* The model is an **array** driven through {@link BaseFormField}
|
|
20
|
+
* (`ControlValueAccessor`) — compatible with `[(ngModel)]`, Reactive Forms and
|
|
21
|
+
* Signal Forms (`[formField]`, stable since Angular 22). Options: `max`,
|
|
22
|
+
* `allowDuplicate`, `addOnBlur` / `addOnTab` / `addOnPaste`, and a `typeahead`
|
|
23
|
+
* mode (a CDK-overlay suggestions panel fed by the parent via `completeMethod`).
|
|
24
|
+
*
|
|
25
|
+
* A11y: the tag list is a `role="listbox"` (`aria-orientation="horizontal"`);
|
|
26
|
+
* each tag is a `role="option"` with roving focus (`←` / `→` between tags,
|
|
27
|
+
* `Backspace` / `Delete` to delete). The editable input follows the combobox
|
|
28
|
+
* pattern in `typeahead` mode.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```html
|
|
32
|
+
* <ui-input-tags label="Mots-clés" [(ngModel)]="keywords" placeholder="Ajouter…" />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
class UiInputTags extends BaseFormField {
|
|
36
|
+
constructor() {
|
|
37
|
+
super();
|
|
38
|
+
/** Native placeholder shown when the input is empty (and no tag exists). */
|
|
39
|
+
this.placeholder = input(/* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Maximum number of tags allowed (`undefined` = unlimited). */
|
|
42
|
+
this.max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
43
|
+
/** Delimiter that splits typed/pasted text into several tags (in addition to `Enter`). */
|
|
44
|
+
this.delimiter = input(/* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [undefined, { debugName: "delimiter" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** Allow the same value to be added several times. */
|
|
47
|
+
this.allowDuplicate = input(false, { ...(ngDevMode ? { debugName: "allowDuplicate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
48
|
+
/** Add the current input as a tag when the field loses focus. */
|
|
49
|
+
this.addOnBlur = input(false, { ...(ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
50
|
+
/** Add the current input as a tag on `Tab`. */
|
|
51
|
+
this.addOnTab = input(false, { ...(ngDevMode ? { debugName: "addOnTab" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
52
|
+
/** Split pasted text with the `delimiter` (or whitespace/newlines) and add each part. */
|
|
53
|
+
this.addOnPaste = input(false, { ...(ngDevMode ? { debugName: "addOnPaste" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
54
|
+
/** Max character length of a single typed tag. */
|
|
55
|
+
this.maxLength = input(undefined, { ...(ngDevMode ? { debugName: "maxLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
56
|
+
/** Color family of the default `ui-chip` tags (ignored when an `#item` template is used). */
|
|
57
|
+
this.chipLevel = input('default', /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "chipLevel" }] : /* istanbul ignore next */ []));
|
|
59
|
+
/** Intensity of the default `ui-chip` tags: `low` (subtle, default) or `high` (solid). */
|
|
60
|
+
this.chipSubLevel = input('low', /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "chipSubLevel" }] : /* istanbul ignore next */ []));
|
|
62
|
+
/** Pill shape (default) vs rounded-rectangle for the default `ui-chip` tags. */
|
|
63
|
+
this.chipRounded = input(true, { ...(ngDevMode ? { debugName: "chipRounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
64
|
+
/** Show a suggestions dropdown as the user types (fed via `completeMethod`). */
|
|
65
|
+
this.typeahead = input(false, { ...(ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
66
|
+
/** Suggestions to display — set by the parent in response to `completeMethod`. */
|
|
67
|
+
this.suggestions = input([], /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
|
|
69
|
+
/** Field name (dot-path) read as a suggestion label. */
|
|
70
|
+
this.optionLabel = input(/* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
72
|
+
/** Field name (dot-path) read as the value added to the model. */
|
|
73
|
+
this.optionValue = input(/* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
75
|
+
/** Field name (dot-path) read as a suggestion's disabled flag. */
|
|
76
|
+
this.optionDisabled = input(/* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
78
|
+
/** Property compared for value equality (duplicate detection on objects). */
|
|
79
|
+
this.dataKey = input(/* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
|
|
81
|
+
/** Treat `suggestions` as groups. */
|
|
82
|
+
this.group = input(false, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
83
|
+
/** Field name of a group's label. */
|
|
84
|
+
this.optionGroupLabel = input('label', /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
|
|
86
|
+
/** Field name of a group's children array. */
|
|
87
|
+
this.optionGroupChildren = input('items', /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
|
|
89
|
+
/** Minimum number of characters before `completeMethod` is emitted. */
|
|
90
|
+
this.minLength = input(1, { ...(ngDevMode ? { debugName: "minLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
91
|
+
/** Debounce (ms) between the last keystroke and `completeMethod`. */
|
|
92
|
+
this.delay = input(300, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
93
|
+
/** Emit a query as soon as the input is focused (before any typing). */
|
|
94
|
+
this.completeOnFocus = input(false, { ...(ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
95
|
+
/** Max height of the suggestions list (CSS size). Defaults from the SCSS. */
|
|
96
|
+
this.scrollHeight = input(/* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
98
|
+
/** Visually focus the first suggestion when the panel opens. */
|
|
99
|
+
this.autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
100
|
+
/** Visually focus the suggestion under the mouse pointer. */
|
|
101
|
+
this.focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
102
|
+
/** Auto-flip the panel above the input when space is lacking below. */
|
|
103
|
+
this.autoFlip = input(true, { ...(ngDevMode ? { debugName: "autoFlip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
104
|
+
/** Extra class(es) applied to the suggestions panel. */
|
|
105
|
+
this.panelStyleClass = input(/* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
|
|
107
|
+
/** Message shown when a query returns no suggestion. */
|
|
108
|
+
this.emptyMessage = input('Aucun résultat', /* @ts-ignore */
|
|
109
|
+
...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
110
|
+
/** Accessible label of each tag's remove action — `{0}` is the tag label. */
|
|
111
|
+
this.removeTagLabel = input('Supprimer {0}', /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "removeTagLabel" }] : /* istanbul ignore next */ []));
|
|
113
|
+
/** Emitted when a tag is added. */
|
|
114
|
+
this.tagAdd = output();
|
|
115
|
+
/** Emitted when a tag is removed. */
|
|
116
|
+
this.tagRemove = output();
|
|
117
|
+
/** Emitted whenever the model changes. */
|
|
118
|
+
this.valueChange = output();
|
|
119
|
+
/** Emitted (debounced) when a typeahead query should run. */
|
|
120
|
+
this.completeMethod = output();
|
|
121
|
+
/** Emitted when a suggestion is selected. */
|
|
122
|
+
this.optionSelect = output();
|
|
123
|
+
/** Emitted when the suggestions panel opens. */
|
|
124
|
+
this.opened = output();
|
|
125
|
+
/** Emitted when the suggestions panel closes. */
|
|
126
|
+
this.closed = output();
|
|
127
|
+
/** Emitted when the input receives focus. */
|
|
128
|
+
this.inputFocus = output();
|
|
129
|
+
/** Emitted when the input loses focus. */
|
|
130
|
+
this.inputBlur = output();
|
|
131
|
+
/** Custom tag template: `<ng-template #item let-value let-remove="onRemove">`. */
|
|
132
|
+
this.itemTemplate = contentChild('item', /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
134
|
+
/** Custom suggestion template: `<ng-template #option let-option>`. */
|
|
135
|
+
this.optionTemplate = contentChild('option', /* @ts-ignore */
|
|
136
|
+
...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
137
|
+
/** Custom group-header template: `<ng-template #group let-group>`. */
|
|
138
|
+
this.groupTemplate = contentChild('group', /* @ts-ignore */
|
|
139
|
+
...(ngDevMode ? [{ debugName: "groupTemplate" }] : /* istanbul ignore next */ []));
|
|
140
|
+
/** @ignore Component root (overlay origin). */
|
|
141
|
+
this.containerEl = viewChild.required('container', /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
|
|
143
|
+
/** @ignore Editable input. */
|
|
144
|
+
this.inputEl = viewChild('inputEl', /* @ts-ignore */
|
|
145
|
+
...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
|
|
146
|
+
/** @ignore Panel root element. */
|
|
147
|
+
this.panelEl = viewChild('panel', /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "panelEl" }] : /* istanbul ignore next */ []));
|
|
149
|
+
/** @ignore Tag option elements (roving focus). `read: ElementRef` covers both the
|
|
150
|
+
* plain `<span>` (template mode) and the `<ui-chip>` host (default mode). */
|
|
151
|
+
this.tagEls = viewChildren('tagEl', { ...(ngDevMode ? { debugName: "tagEls" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
152
|
+
/** @ignore */
|
|
153
|
+
this.panelOpen = signal(false, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
|
|
155
|
+
/** @ignore */
|
|
156
|
+
this.overlayOrigin = signal(null, /* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
|
|
158
|
+
/** @ignore */
|
|
159
|
+
this.overlayWidth = signal(null, /* @ts-ignore */
|
|
160
|
+
...(ngDevMode ? [{ debugName: "overlayWidth" }] : /* istanbul ignore next */ []));
|
|
161
|
+
/** @ignore Text currently typed in the input. */
|
|
162
|
+
this.inputText = signal('', /* @ts-ignore */
|
|
163
|
+
...(ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []));
|
|
164
|
+
/** @ignore Index of the roving-focused tag (-1 = the input holds focus). */
|
|
165
|
+
this.focusedTag = signal(-1, /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "focusedTag" }] : /* istanbul ignore next */ []));
|
|
167
|
+
/** @ignore Index of the visually focused suggestion (-1 = none). */
|
|
168
|
+
this.focusedOption = signal(-1, /* @ts-ignore */
|
|
169
|
+
...(ngDevMode ? [{ debugName: "focusedOption" }] : /* istanbul ignore next */ []));
|
|
170
|
+
/** @ignore A query has been emitted and is awaiting fresh suggestions. */
|
|
171
|
+
this.queryDirty = false;
|
|
172
|
+
// --- Derived state -----------------------------------------------------
|
|
173
|
+
/** @ignore Current tags. */
|
|
174
|
+
this.tagValues = computed(() => this.modelValue() ?? [], /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "tagValues" }] : /* istanbul ignore next */ []));
|
|
176
|
+
/** @ignore Tags as display rows (value + resolved label). */
|
|
177
|
+
this.tagRows = computed(() => this.tagValues().map((value, index) => {
|
|
178
|
+
const label = this.labelOfValue(value);
|
|
179
|
+
return { value, index, label, removeAriaLabel: formatLabel(this.removeTagLabel(), label) };
|
|
180
|
+
}), /* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "tagRows" }] : /* istanbul ignore next */ []));
|
|
182
|
+
/** @ignore */
|
|
183
|
+
this.listboxId = computed(() => `${this.resolvedId()}-tags`, /* @ts-ignore */
|
|
184
|
+
...(ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []));
|
|
185
|
+
/** @ignore */
|
|
186
|
+
this.panelListId = computed(() => `${this.resolvedId()}-list`, /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "panelListId" }] : /* istanbul ignore next */ []));
|
|
188
|
+
/** @ignore Icon size aligned with the field size. */
|
|
189
|
+
this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
|
|
190
|
+
...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
191
|
+
/** @ignore Tags can be removed (not disabled / read-only). */
|
|
192
|
+
this.canRemove = computed(() => !this.isDisabled() && !this.readonly(), /* @ts-ignore */
|
|
193
|
+
...(ngDevMode ? [{ debugName: "canRemove" }] : /* istanbul ignore next */ []));
|
|
194
|
+
/** @ignore The tag cap has been reached. */
|
|
195
|
+
this.isFull = computed(() => {
|
|
196
|
+
const max = this.max();
|
|
197
|
+
return max != null && max > 0 && this.tagValues().length >= max;
|
|
198
|
+
}, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "isFull" }] : /* istanbul ignore next */ []));
|
|
200
|
+
/** @ignore The input accepts typing. */
|
|
201
|
+
this.canType = computed(() => !this.isDisabled() && !this.readonly() && !this.isFull(), /* @ts-ignore */
|
|
202
|
+
...(ngDevMode ? [{ debugName: "canType" }] : /* istanbul ignore next */ []));
|
|
203
|
+
/** @ignore The placeholder is shown only while there is no tag. */
|
|
204
|
+
this.effectivePlaceholder = computed(() => (this.tagValues().length ? '' : (this.placeholder() ?? '')), /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
206
|
+
/** @ignore Flat entries (no groups). */
|
|
207
|
+
this.flatEntries = computed(() => {
|
|
208
|
+
if (this.group())
|
|
209
|
+
return this.groupEntries().flatMap((g) => g.entries);
|
|
210
|
+
return (this.suggestions() ?? []).map((option) => this.toEntry(option));
|
|
211
|
+
}, /* @ts-ignore */
|
|
212
|
+
...(ngDevMode ? [{ debugName: "flatEntries" }] : /* istanbul ignore next */ []));
|
|
213
|
+
/** @ignore Groups of entries. */
|
|
214
|
+
this.groupEntries = computed(() => {
|
|
215
|
+
if (!this.group())
|
|
216
|
+
return [];
|
|
217
|
+
return (this.suggestions() ?? []).map((groupOption) => {
|
|
218
|
+
const children = this.getField(groupOption, this.optionGroupChildren());
|
|
219
|
+
return {
|
|
220
|
+
label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? '',
|
|
221
|
+
original: groupOption,
|
|
222
|
+
entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option)),
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
}, /* @ts-ignore */
|
|
226
|
+
...(ngDevMode ? [{ debugName: "groupEntries" }] : /* istanbul ignore next */ []));
|
|
227
|
+
/** @ignore Rendered suggestion rows (already-added values are marked present/disabled). */
|
|
228
|
+
this.visibleRows = computed(() => {
|
|
229
|
+
const rows = [];
|
|
230
|
+
let index = 0;
|
|
231
|
+
const pushOption = (entry) => {
|
|
232
|
+
const present = this.isPresent(entry.value);
|
|
233
|
+
rows.push({
|
|
234
|
+
kind: 'option',
|
|
235
|
+
key: `${this.panelListId()}-${index}`,
|
|
236
|
+
id: `${this.resolvedId()}-option-${index}`,
|
|
237
|
+
index,
|
|
238
|
+
entry: { ...entry, disabled: entry.disabled || (present && !this.allowDuplicate()) },
|
|
239
|
+
present,
|
|
240
|
+
});
|
|
241
|
+
index++;
|
|
242
|
+
};
|
|
243
|
+
if (this.group()) {
|
|
244
|
+
this.groupEntries().forEach((g, gi) => {
|
|
245
|
+
if (!g.entries.length)
|
|
246
|
+
return;
|
|
247
|
+
rows.push({ kind: 'group', key: `${this.panelListId()}-group-${gi}`, label: g.label, original: g.original });
|
|
248
|
+
g.entries.forEach(pushOption);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
this.flatEntries().forEach(pushOption);
|
|
253
|
+
}
|
|
254
|
+
return rows;
|
|
255
|
+
}, /* @ts-ignore */
|
|
256
|
+
...(ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []));
|
|
257
|
+
/** @ignore Visible option rows only (visual-focus space). */
|
|
258
|
+
this.visibleOptions = computed(() => this.visibleRows().filter((r) => r.kind === 'option'), /* @ts-ignore */
|
|
259
|
+
...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
|
|
260
|
+
/** @ignore */
|
|
261
|
+
this.optionCount = computed(() => this.visibleOptions().length, /* @ts-ignore */
|
|
262
|
+
...(ngDevMode ? [{ debugName: "optionCount" }] : /* istanbul ignore next */ []));
|
|
263
|
+
/** @ignore */
|
|
264
|
+
this.showEmpty = computed(() => this.panelOpen() && !this.visibleRows().length, /* @ts-ignore */
|
|
265
|
+
...(ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []));
|
|
266
|
+
/** @ignore id of the visually focused suggestion (aria-activedescendant). */
|
|
267
|
+
this.activeDescendant = computed(() => {
|
|
268
|
+
if (!this.panelOpen())
|
|
269
|
+
return null;
|
|
270
|
+
return this.visibleOptions()[this.focusedOption()]?.id ?? null;
|
|
271
|
+
}, /* @ts-ignore */
|
|
272
|
+
...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
|
|
273
|
+
/** @ignore */
|
|
274
|
+
this.overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()), /* @ts-ignore */
|
|
275
|
+
...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
|
|
276
|
+
/** @ignore Shared option resolution (see `option-resolver.ts`). */
|
|
277
|
+
this.resolver = createOptionResolver({
|
|
278
|
+
optionValue: this.optionValue,
|
|
279
|
+
optionLabel: this.optionLabel,
|
|
280
|
+
optionDisabled: this.optionDisabled,
|
|
281
|
+
dataKey: this.dataKey,
|
|
282
|
+
});
|
|
283
|
+
// Never carry an open panel over to the next page (the field can live in
|
|
284
|
+
// an app shell that survives the navigation).
|
|
285
|
+
closeOnNavigation(() => this.close(false));
|
|
286
|
+
if (isDevMode()) {
|
|
287
|
+
effect(() => {
|
|
288
|
+
if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) {
|
|
289
|
+
warnMissingAccessibleName('ui-input-tags', 'Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.');
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// --- CVA -----------------------------------------------------------------
|
|
295
|
+
writeValue(value) {
|
|
296
|
+
this.modelValue.set(Array.isArray(value) ? value : []);
|
|
297
|
+
}
|
|
298
|
+
/** Moves focus to the input. */
|
|
299
|
+
focus(options) {
|
|
300
|
+
this.inputEl()?.nativeElement.focus(options);
|
|
301
|
+
}
|
|
302
|
+
// --- Tag mutations -------------------------------------------------------
|
|
303
|
+
/** @ignore Add one value as a tag (respects `max` and `allowDuplicate`). Returns true if added. */
|
|
304
|
+
addValue(value, event) {
|
|
305
|
+
if (!this.canType())
|
|
306
|
+
return false;
|
|
307
|
+
if (!this.allowDuplicate() && this.isPresent(value))
|
|
308
|
+
return false;
|
|
309
|
+
this.commit([...this.tagValues(), value]);
|
|
310
|
+
this.tagAdd.emit({ originalEvent: event, value });
|
|
311
|
+
return true;
|
|
312
|
+
}
|
|
313
|
+
/** @ignore Add the typed text (or its delimiter-split parts) as tag(s). */
|
|
314
|
+
addFromInput(event) {
|
|
315
|
+
const parts = this.split(this.inputText())
|
|
316
|
+
.map((p) => p.trim())
|
|
317
|
+
.filter(Boolean);
|
|
318
|
+
let added = false;
|
|
319
|
+
for (const part of parts) {
|
|
320
|
+
if (this.addValue(part, event))
|
|
321
|
+
added = true;
|
|
322
|
+
if (this.isFull())
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
if (added || parts.length)
|
|
326
|
+
this.inputText.set('');
|
|
327
|
+
}
|
|
328
|
+
/** Removes the tag at `index`. */
|
|
329
|
+
removeAt(index, event) {
|
|
330
|
+
if (this.isDisabled() || this.readonly())
|
|
331
|
+
return;
|
|
332
|
+
const tags = this.tagValues();
|
|
333
|
+
if (index < 0 || index >= tags.length)
|
|
334
|
+
return;
|
|
335
|
+
const value = tags[index];
|
|
336
|
+
this.commit(tags.filter((_, i) => i !== index));
|
|
337
|
+
this.tagRemove.emit({ originalEvent: event, value, index });
|
|
338
|
+
// Keep the roving focus coherent after removal.
|
|
339
|
+
const nextCount = tags.length - 1;
|
|
340
|
+
if (nextCount === 0)
|
|
341
|
+
this.focusInput();
|
|
342
|
+
else
|
|
343
|
+
this.focusTag(Math.min(index, nextCount - 1));
|
|
344
|
+
}
|
|
345
|
+
/** @ignore Propagate a user-driven value change (view → form). */
|
|
346
|
+
commit(value) {
|
|
347
|
+
this.modelValue.set(value);
|
|
348
|
+
this.emitChange(value);
|
|
349
|
+
this.valueChange.emit(value);
|
|
350
|
+
}
|
|
351
|
+
// --- Input interactions --------------------------------------------------
|
|
352
|
+
/** @ignore */
|
|
353
|
+
onInput(event) {
|
|
354
|
+
const value = event.target.value;
|
|
355
|
+
this.inputText.set(value);
|
|
356
|
+
// A typed delimiter flushes the completed part(s) into tags.
|
|
357
|
+
if (this.delimiter() && this.split(value).length > 1) {
|
|
358
|
+
this.flushDelimited(event);
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
if (!this.typeahead())
|
|
362
|
+
return;
|
|
363
|
+
if (this.searchTimeout)
|
|
364
|
+
clearTimeout(this.searchTimeout);
|
|
365
|
+
const query = this.inputText();
|
|
366
|
+
if (query.length < this.minLength()) {
|
|
367
|
+
this.close(false);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
this.focusedOption.set(-1);
|
|
371
|
+
this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());
|
|
372
|
+
}
|
|
373
|
+
/** @ignore Split the text, add every completed part, keep the trailing remainder in the input. */
|
|
374
|
+
flushDelimited(event) {
|
|
375
|
+
const parts = this.split(this.inputText());
|
|
376
|
+
const remainder = parts.pop() ?? '';
|
|
377
|
+
parts.map((p) => p.trim()).filter(Boolean).forEach((p) => this.addValue(p, event));
|
|
378
|
+
this.inputText.set(remainder);
|
|
379
|
+
}
|
|
380
|
+
/** @ignore */
|
|
381
|
+
onKeydown(event) {
|
|
382
|
+
if (this.isDisabled() || this.readonly())
|
|
383
|
+
return;
|
|
384
|
+
const input = this.inputEl()?.nativeElement;
|
|
385
|
+
const atStart = !input || (input.selectionStart === 0 && input.selectionEnd === 0);
|
|
386
|
+
switch (event.key) {
|
|
387
|
+
case 'Enter':
|
|
388
|
+
event.preventDefault();
|
|
389
|
+
if (this.panelOpen() && this.focusedOption() !== -1)
|
|
390
|
+
this.selectFocusedOption(event);
|
|
391
|
+
else
|
|
392
|
+
this.addFromInput(event);
|
|
393
|
+
return;
|
|
394
|
+
case 'Backspace':
|
|
395
|
+
if (this.inputText().length === 0 && this.tagValues().length) {
|
|
396
|
+
event.preventDefault();
|
|
397
|
+
this.removeAt(this.tagValues().length - 1, event);
|
|
398
|
+
}
|
|
399
|
+
return;
|
|
400
|
+
case 'ArrowLeft':
|
|
401
|
+
if (atStart && this.tagValues().length) {
|
|
402
|
+
event.preventDefault();
|
|
403
|
+
this.focusTag(this.tagValues().length - 1);
|
|
404
|
+
}
|
|
405
|
+
return;
|
|
406
|
+
case 'ArrowDown':
|
|
407
|
+
if (this.typeahead()) {
|
|
408
|
+
event.preventDefault();
|
|
409
|
+
this.panelOpen() ? this.moveOption(1) : this.reopen();
|
|
410
|
+
}
|
|
411
|
+
return;
|
|
412
|
+
case 'ArrowUp':
|
|
413
|
+
if (this.typeahead() && this.panelOpen()) {
|
|
414
|
+
event.preventDefault();
|
|
415
|
+
this.moveOption(-1);
|
|
416
|
+
}
|
|
417
|
+
return;
|
|
418
|
+
case 'Escape':
|
|
419
|
+
if (this.panelOpen()) {
|
|
420
|
+
event.preventDefault();
|
|
421
|
+
event.stopPropagation();
|
|
422
|
+
this.close();
|
|
423
|
+
}
|
|
424
|
+
return;
|
|
425
|
+
case 'Tab':
|
|
426
|
+
if (this.addOnTab() && this.inputText().trim()) {
|
|
427
|
+
event.preventDefault();
|
|
428
|
+
this.addFromInput(event);
|
|
429
|
+
}
|
|
430
|
+
if (this.panelOpen())
|
|
431
|
+
this.close(false);
|
|
432
|
+
return;
|
|
433
|
+
default:
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
/** @ignore */
|
|
438
|
+
onPaste(event) {
|
|
439
|
+
if (!this.addOnPaste() || !this.canType())
|
|
440
|
+
return;
|
|
441
|
+
const text = event.clipboardData?.getData('text') ?? '';
|
|
442
|
+
if (!text)
|
|
443
|
+
return;
|
|
444
|
+
event.preventDefault();
|
|
445
|
+
const parts = (this.delimiter() ? this.split(text) : text.split(/[\r\n\t,;]+/))
|
|
446
|
+
.map((p) => p.trim())
|
|
447
|
+
.filter(Boolean);
|
|
448
|
+
for (const part of parts) {
|
|
449
|
+
this.addValue(part, event);
|
|
450
|
+
if (this.isFull())
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/** @ignore */
|
|
455
|
+
onInputFocus(event) {
|
|
456
|
+
if (this.isDisabled())
|
|
457
|
+
return;
|
|
458
|
+
this.focusedTag.set(-1);
|
|
459
|
+
if (this.typeahead() && !this.queryDirty && this.completeOnFocus())
|
|
460
|
+
this.runSearch(event, this.inputText());
|
|
461
|
+
this.inputFocus.emit(event);
|
|
462
|
+
}
|
|
463
|
+
/** @ignore */
|
|
464
|
+
onInputBlur(event) {
|
|
465
|
+
const next = event.relatedTarget;
|
|
466
|
+
const insideComponent = this.containerEl().nativeElement.contains(next);
|
|
467
|
+
const insidePanel = this.panelEl()?.nativeElement.contains(next);
|
|
468
|
+
if (!insideComponent && !insidePanel) {
|
|
469
|
+
if (this.addOnBlur() && this.inputText().trim())
|
|
470
|
+
this.addFromInput(event);
|
|
471
|
+
this.emitTouch();
|
|
472
|
+
}
|
|
473
|
+
this.inputBlur.emit(event);
|
|
474
|
+
}
|
|
475
|
+
/** @ignore Focus / clicks on the field box (but not a tag / button) land on the input. */
|
|
476
|
+
onBoxMousedown(event) {
|
|
477
|
+
const target = event.target;
|
|
478
|
+
if (target.closest('button') || target.closest('.ui-input-tags-tag') || target.closest('input'))
|
|
479
|
+
return;
|
|
480
|
+
event.preventDefault();
|
|
481
|
+
this.focusInput();
|
|
482
|
+
}
|
|
483
|
+
// --- Roving tag focus ----------------------------------------------------
|
|
484
|
+
/** @ignore */
|
|
485
|
+
onTagKeydown(event, index) {
|
|
486
|
+
if (this.isDisabled() || this.readonly())
|
|
487
|
+
return;
|
|
488
|
+
switch (event.key) {
|
|
489
|
+
case 'ArrowLeft':
|
|
490
|
+
event.preventDefault();
|
|
491
|
+
if (index > 0)
|
|
492
|
+
this.focusTag(index - 1);
|
|
493
|
+
return;
|
|
494
|
+
case 'ArrowRight':
|
|
495
|
+
event.preventDefault();
|
|
496
|
+
if (index < this.tagValues().length - 1)
|
|
497
|
+
this.focusTag(index + 1);
|
|
498
|
+
else
|
|
499
|
+
this.focusInput();
|
|
500
|
+
return;
|
|
501
|
+
case 'Backspace':
|
|
502
|
+
case 'Delete':
|
|
503
|
+
event.preventDefault();
|
|
504
|
+
this.removeAt(index, event);
|
|
505
|
+
return;
|
|
506
|
+
case 'Home':
|
|
507
|
+
event.preventDefault();
|
|
508
|
+
this.focusTag(0);
|
|
509
|
+
return;
|
|
510
|
+
case 'End':
|
|
511
|
+
event.preventDefault();
|
|
512
|
+
this.focusTag(this.tagValues().length - 1);
|
|
513
|
+
return;
|
|
514
|
+
default:
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
/** @ignore */
|
|
519
|
+
focusTag(index) {
|
|
520
|
+
this.focusedTag.set(index);
|
|
521
|
+
setTimeout(() => this.tagEls()[index]?.nativeElement.focus());
|
|
522
|
+
}
|
|
523
|
+
/** @ignore */
|
|
524
|
+
focusInput() {
|
|
525
|
+
this.focusedTag.set(-1);
|
|
526
|
+
this.focus();
|
|
527
|
+
}
|
|
528
|
+
// --- Typeahead panel -----------------------------------------------------
|
|
529
|
+
/** @ignore */
|
|
530
|
+
runSearch(event, query) {
|
|
531
|
+
this.queryDirty = true;
|
|
532
|
+
this.completeMethod.emit({ originalEvent: event, query });
|
|
533
|
+
this.open();
|
|
534
|
+
}
|
|
535
|
+
/** @ignore */
|
|
536
|
+
open() {
|
|
537
|
+
if (!this.canType() || this.panelOpen())
|
|
538
|
+
return;
|
|
539
|
+
const origin = this.containerEl().nativeElement.querySelector('.ui-field-box') ?? this.containerEl().nativeElement;
|
|
540
|
+
this.overlayOrigin.set(origin);
|
|
541
|
+
this.overlayWidth.set(origin.getBoundingClientRect().width);
|
|
542
|
+
this.focusedOption.set(this.autoOptionFocus() ? this.visibleOptions().findIndex((o) => !o.entry.disabled) : -1);
|
|
543
|
+
this.panelOpen.set(true);
|
|
544
|
+
this.opened.emit();
|
|
545
|
+
}
|
|
546
|
+
/** @ignore */
|
|
547
|
+
close(focusInput = true) {
|
|
548
|
+
if (!this.panelOpen())
|
|
549
|
+
return;
|
|
550
|
+
this.panelOpen.set(false);
|
|
551
|
+
this.focusedOption.set(-1);
|
|
552
|
+
this.queryDirty = false;
|
|
553
|
+
this.closed.emit();
|
|
554
|
+
if (focusInput)
|
|
555
|
+
this.focus();
|
|
556
|
+
}
|
|
557
|
+
/** @ignore */
|
|
558
|
+
reopen() {
|
|
559
|
+
if (!this.visibleRows().length)
|
|
560
|
+
return;
|
|
561
|
+
this.open();
|
|
562
|
+
if (this.focusedOption() === -1)
|
|
563
|
+
this.moveOption(1);
|
|
564
|
+
}
|
|
565
|
+
/** @ignore */
|
|
566
|
+
onOptionClick(row, event) {
|
|
567
|
+
event.preventDefault();
|
|
568
|
+
this.selectRow(row, event);
|
|
569
|
+
}
|
|
570
|
+
/** @ignore Keep focus on the input when clicking an option. */
|
|
571
|
+
onOptionMousedown(event) {
|
|
572
|
+
event.preventDefault();
|
|
573
|
+
}
|
|
574
|
+
/** @ignore */
|
|
575
|
+
onOptionMouseEnter(row) {
|
|
576
|
+
if (this.focusOnHover() && !row.entry.disabled)
|
|
577
|
+
this.focusedOption.set(row.index);
|
|
578
|
+
}
|
|
579
|
+
/** @ignore */
|
|
580
|
+
selectRow(row, event) {
|
|
581
|
+
if (row.entry.disabled)
|
|
582
|
+
return;
|
|
583
|
+
if (this.addValue(row.entry.value, event)) {
|
|
584
|
+
this.optionSelect.emit({ originalEvent: event, value: row.entry.original });
|
|
585
|
+
}
|
|
586
|
+
this.inputText.set('');
|
|
587
|
+
this.close();
|
|
588
|
+
}
|
|
589
|
+
/** @ignore */
|
|
590
|
+
selectFocusedOption(event) {
|
|
591
|
+
const row = this.visibleOptions()[this.focusedOption()];
|
|
592
|
+
if (row)
|
|
593
|
+
this.selectRow(row, event);
|
|
594
|
+
else
|
|
595
|
+
this.addFromInput(event);
|
|
596
|
+
}
|
|
597
|
+
/** @ignore Move the visual focus, skipping disabled options (no wrap). */
|
|
598
|
+
moveOption(delta) {
|
|
599
|
+
const options = this.visibleOptions();
|
|
600
|
+
if (!options.length)
|
|
601
|
+
return;
|
|
602
|
+
let i = this.focusedOption();
|
|
603
|
+
if (i === -1)
|
|
604
|
+
i = delta === 1 ? -1 : options.length;
|
|
605
|
+
for (i += delta; i >= 0 && i < options.length; i += delta) {
|
|
606
|
+
if (!options[i].entry.disabled) {
|
|
607
|
+
this.focusedOption.set(i);
|
|
608
|
+
this.scrollOptionIntoView(options[i].id);
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
/** @ignore */
|
|
614
|
+
scrollOptionIntoView(id) {
|
|
615
|
+
this.panelEl()?.nativeElement.querySelector(`[id="${id}"]`)?.scrollIntoView({ block: 'nearest' });
|
|
616
|
+
}
|
|
617
|
+
// --- Option resolution ---------------------------------------------------
|
|
618
|
+
/** @ignore Display label for a tag value. */
|
|
619
|
+
labelOfValue(value) {
|
|
620
|
+
if (value === null || value === undefined)
|
|
621
|
+
return '';
|
|
622
|
+
const entry = this.flatEntries().find((e) => this.equals(e.value, value));
|
|
623
|
+
if (entry)
|
|
624
|
+
return entry.label;
|
|
625
|
+
return this.resolveLabel(value) ?? this.asText(value) ?? '';
|
|
626
|
+
}
|
|
627
|
+
/** @ignore */
|
|
628
|
+
toEntry(option) {
|
|
629
|
+
return this.resolver.toEntry(option);
|
|
630
|
+
}
|
|
631
|
+
/** @ignore Read a (dot-path) field from an object. */
|
|
632
|
+
getField(target, path) {
|
|
633
|
+
return this.resolver.getField(target, path);
|
|
634
|
+
}
|
|
635
|
+
/** @ignore */
|
|
636
|
+
resolveValue(option) {
|
|
637
|
+
return this.resolver.resolveValue(option);
|
|
638
|
+
}
|
|
639
|
+
/** @ignore */
|
|
640
|
+
resolveLabel(option) {
|
|
641
|
+
return this.resolver.resolveLabel(option);
|
|
642
|
+
}
|
|
643
|
+
/** @ignore */
|
|
644
|
+
asText(value) {
|
|
645
|
+
return this.resolver.asText(value);
|
|
646
|
+
}
|
|
647
|
+
/** @ignore Whether a value is already a tag. */
|
|
648
|
+
isPresent(value) {
|
|
649
|
+
return this.tagValues().some((v) => this.equals(v, value));
|
|
650
|
+
}
|
|
651
|
+
/** @ignore Value equality — by `dataKey` for objects, strict otherwise. */
|
|
652
|
+
equals(a, b) {
|
|
653
|
+
return this.resolver.equals(a, b);
|
|
654
|
+
}
|
|
655
|
+
/** @ignore Split text by the delimiter (string or regex); whole text when none. */
|
|
656
|
+
split(text) {
|
|
657
|
+
const d = this.delimiter();
|
|
658
|
+
if (!d)
|
|
659
|
+
return [text];
|
|
660
|
+
return text.split(d);
|
|
661
|
+
}
|
|
662
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiInputTags, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
663
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: UiInputTags, isStandalone: true, selector: "ui-input-tags", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, delimiter: { classPropertyName: "delimiter", publicName: "delimiter", isSignal: true, isRequired: false, transformFunction: null }, allowDuplicate: { classPropertyName: "allowDuplicate", publicName: "allowDuplicate", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: true, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "addOnPaste", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, chipLevel: { classPropertyName: "chipLevel", publicName: "chipLevel", isSignal: true, isRequired: false, transformFunction: null }, chipSubLevel: { classPropertyName: "chipSubLevel", publicName: "chipSubLevel", isSignal: true, isRequired: false, transformFunction: null }, chipRounded: { classPropertyName: "chipRounded", publicName: "chipRounded", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, removeTagLabel: { classPropertyName: "removeTagLabel", publicName: "removeTagLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tagAdd: "tagAdd", tagRemove: "tagRemove", valueChange: "valueChange", completeMethod: "completeMethod", optionSelect: "optionSelect", opened: "opened", closed: "closed", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["option"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "tagEls", predicate: ["tagEl"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, index: row.index }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div class=\"ui-input-tags-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : (focusedTag() === tag.index ? 0 : -1)\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: tag.value, value: tag.value, label: tag.label, index: tag.index, onRemove: removeAt.bind(this, tag.index) }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : (focusedTag() === tag.index ? 0 : -1)\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--units-xs);min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--units-md)}.ui-input-tags-control:last-child{padding-inline-end:var(--units-md)}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--radius-full);transition:box-shadow var(--transition-default) var(--transition-easeinout)}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--units-2xs) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--units-2xs);min-height:1.5rem;color:var(--form-high-content-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md)}.ui-input-tags-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-tags-input::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-tags-input{flex:1 1 5rem;min-width:5rem;width:auto}.ui-input-tags-input._small{font-size:var(--size-typography-text-md)}.ui-input-tags-panel{border:var(--stroke-default) solid var(--ui-overlay-stroke, var(--form-high-stroke-default));border-radius:var(--ui-overlay-radius, var(--radius-default));background-color:var(--ui-overlay-surface, var(--form-high-surface-default));box-shadow:var(--ui-overlay-shadow, var(--shadow-default-md));font-family:var(--fontfamily-base);display:flex;flex-direction:column;box-sizing:border-box;max-width:calc(100vw - var(--units-lg));padding:var(--units-xs)}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:12.5rem}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:11.25rem}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--units-xs);margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;height:2.5rem;flex-shrink:0;padding:0 var(--units-default);border-radius:var(--radius-sm);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-default) var(--transition-easeinout),color var(--transition-default) var(--transition-easeinout)}.ui-input-tags-panel .ui-input-tags-option._small{height:2rem;padding:0 var(--units-md);font-size:var(--size-typography-text-md)}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--global-background-default-hover)}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--form-high-content-checked)}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--form-high-content-checked)}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:2rem;flex-shrink:0;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);font-weight:var(--weight-bold);color:var(--form-low-content-default)}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--units-md)}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:2.5rem;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-low-content-default)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "hasFooter"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiChip, selector: "ui-chip", inputs: ["label", "level", "subLevel", "size", "icon", "image", "alt", "rounded", "removable", "removeIcon", "disabled", "selectable", "selected", "selectedIcon", "ariaLabel", "ariaLabelledBy", "removeAriaLabel", "removeTabindex"], outputs: ["selectedChange", "remove", "chipClick", "imageError"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }] }); }
|
|
664
|
+
}
|
|
665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiInputTags, decorators: [{
|
|
666
|
+
type: Component,
|
|
667
|
+
args: [{ selector: 'ui-input-tags', imports: [NgTemplateOutlet, OverlayModule, UiField, UiIcon, UiChip, UiMotion], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true }], template: "<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, index: row.index }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div class=\"ui-input-tags-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : (focusedTag() === tag.index ? 0 : -1)\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: tag.value, value: tag.value, label: tag.label, index: tag.index, onRemove: removeAt.bind(this, tag.index) }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : (focusedTag() === tag.index ? 0 : -1)\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n", styles: [".ui-input-tags{display:block;--ui-field-box-cursor: text}.ui-input-tags-control{display:flex;align-items:center;align-self:stretch;flex:1 1 auto;flex-wrap:wrap;gap:var(--units-xs);min-width:0}.ui-input-tags-control:first-child{padding-inline-start:var(--units-md)}.ui-input-tags-control:last-child{padding-inline-end:var(--units-md)}.ui-input-tags-list{display:contents}.ui-input-tags-tag{display:inline-flex;align-items:center;max-width:100%;border-radius:var(--radius-full);transition:box-shadow var(--transition-default) var(--transition-easeinout)}.ui-input-tags-tag:focus-visible{outline:none;box-shadow:0 0 0 var(--units-2xs) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-input-tags-tag._custom{gap:var(--units-2xs);min-height:1.5rem;color:var(--form-high-content-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md)}.ui-input-tags-input{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-tags-input::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-tags-input:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-tags-input{flex:1 1 5rem;min-width:5rem;width:auto}.ui-input-tags-input._small{font-size:var(--size-typography-text-md)}.ui-input-tags-panel{border:var(--stroke-default) solid var(--ui-overlay-stroke, var(--form-high-stroke-default));border-radius:var(--ui-overlay-radius, var(--radius-default));background-color:var(--ui-overlay-surface, var(--form-high-surface-default));box-shadow:var(--ui-overlay-shadow, var(--shadow-default-md));font-family:var(--fontfamily-base);display:flex;flex-direction:column;box-sizing:border-box;max-width:calc(100vw - var(--units-lg));padding:var(--units-xs)}.ui-input-tags-panel .ui-input-tags-scroller{overflow:auto;max-height:12.5rem}.ui-input-tags-panel .ui-input-tags-scroller._small{max-height:11.25rem}.ui-input-tags-panel .ui-input-tags-list{display:flex;flex-direction:column;gap:var(--units-xs);margin:0;padding:0;list-style:none}.ui-input-tags-panel .ui-input-tags-option{display:flex;align-items:center;gap:var(--units-sm);box-sizing:border-box;height:2.5rem;flex-shrink:0;padding:0 var(--units-default);border-radius:var(--radius-sm);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-default) var(--transition-easeinout),color var(--transition-default) var(--transition-easeinout)}.ui-input-tags-panel .ui-input-tags-option._small{height:2rem;padding:0 var(--units-md);font-size:var(--size-typography-text-md)}.ui-input-tags-panel .ui-input-tags-option._focused,.ui-input-tags-panel .ui-input-tags-option:hover:not(._disabled){background-color:var(--global-background-default-hover)}.ui-input-tags-panel .ui-input-tags-option._present{color:var(--form-high-content-checked)}.ui-input-tags-panel .ui-input-tags-option._disabled{color:var(--form-high-content-disabled);cursor:not-allowed}.ui-input-tags-panel .ui-input-tags-option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-input-tags-panel .ui-input-tags-option-check{flex-shrink:0;margin-left:auto;color:var(--form-high-content-checked)}.ui-input-tags-panel .ui-input-tags-group{display:flex;align-items:center;box-sizing:border-box;height:2rem;flex-shrink:0;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-md);font-weight:var(--weight-bold);color:var(--form-low-content-default)}.ui-input-tags-panel .ui-input-tags-group._small{padding:0 var(--units-md)}.ui-input-tags-panel .ui-input-tags-empty{display:flex;align-items:center;box-sizing:border-box;min-height:2.5rem;padding:0 var(--units-default);font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-low-content-default)}\n"] }]
|
|
668
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], delimiter: [{ type: i0.Input, args: [{ isSignal: true, alias: "delimiter", required: false }] }], allowDuplicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDuplicate", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnBlur", required: false }] }], addOnTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnTab", required: false }] }], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnPaste", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], chipLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipLevel", required: false }] }], chipSubLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipSubLevel", required: false }] }], chipRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "chipRounded", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], removeTagLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeTagLabel", required: false }] }], tagAdd: [{ type: i0.Output, args: ["tagAdd"] }], tagRemove: [{ type: i0.Output, args: ["tagRemove"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], optionSelect: [{ type: i0.Output, args: ["optionSelect"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], containerEl: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], tagEls: [{ type: i0.ViewChildren, args: ['tagEl', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
669
|
+
|
|
670
|
+
/*
|
|
671
|
+
* Public API Surface of ui-kit/ui-input-tags
|
|
672
|
+
*/
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Generated bundle index. Do not edit.
|
|
676
|
+
*/
|
|
677
|
+
|
|
678
|
+
export { UiInputTags };
|
|
679
|
+
//# sourceMappingURL=4sh-ui-kit-ui-input-tags.mjs.map
|