@anguless/angulux 22.3.0 → 22.4.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.
Files changed (40) hide show
  1. package/README.md +8 -6
  2. package/fesm2022/anguless-angulux-baseeditableholder.mjs +42 -3
  3. package/fesm2022/anguless-angulux-baseeditableholder.mjs.map +1 -1
  4. package/fesm2022/anguless-angulux-baseinput.mjs +38 -9
  5. package/fesm2022/anguless-angulux-baseinput.mjs.map +1 -1
  6. package/fesm2022/anguless-angulux-checkbox.mjs +7 -5
  7. package/fesm2022/anguless-angulux-checkbox.mjs.map +1 -1
  8. package/fesm2022/anguless-angulux-colorpicker.mjs +2 -0
  9. package/fesm2022/anguless-angulux-colorpicker.mjs.map +1 -1
  10. package/fesm2022/anguless-angulux-datepicker.mjs +33 -19
  11. package/fesm2022/anguless-angulux-datepicker.mjs.map +1 -1
  12. package/fesm2022/anguless-angulux-inputnumber.mjs +14 -14
  13. package/fesm2022/anguless-angulux-inputnumber.mjs.map +1 -1
  14. package/fesm2022/anguless-angulux-inputtext.mjs +36 -6
  15. package/fesm2022/anguless-angulux-inputtext.mjs.map +1 -1
  16. package/fesm2022/anguless-angulux-multiselect.mjs +8 -6
  17. package/fesm2022/anguless-angulux-multiselect.mjs.map +1 -1
  18. package/fesm2022/anguless-angulux-password.mjs +9 -8
  19. package/fesm2022/anguless-angulux-password.mjs.map +1 -1
  20. package/fesm2022/anguless-angulux-radiobutton.mjs +7 -5
  21. package/fesm2022/anguless-angulux-radiobutton.mjs.map +1 -1
  22. package/fesm2022/anguless-angulux-select.mjs +7 -3
  23. package/fesm2022/anguless-angulux-select.mjs.map +1 -1
  24. package/fesm2022/anguless-angulux-selectbutton.mjs +4 -3
  25. package/fesm2022/anguless-angulux-selectbutton.mjs.map +1 -1
  26. package/fesm2022/anguless-angulux-table.mjs +19 -5
  27. package/fesm2022/anguless-angulux-table.mjs.map +1 -1
  28. package/fesm2022/anguless-angulux-textarea.mjs +41 -10
  29. package/fesm2022/anguless-angulux-textarea.mjs.map +1 -1
  30. package/fesm2022/anguless-angulux-togglebutton.mjs +4 -3
  31. package/fesm2022/anguless-angulux-togglebutton.mjs.map +1 -1
  32. package/fesm2022/anguless-angulux-toggleswitch.mjs +5 -3
  33. package/fesm2022/anguless-angulux-toggleswitch.mjs.map +1 -1
  34. package/fesm2022/anguless-angulux-treetable.mjs +7 -7
  35. package/fesm2022/anguless-angulux-treetable.mjs.map +1 -1
  36. package/package.json +1 -1
  37. package/types/anguless-angulux-baseeditableholder.d.ts +21 -1
  38. package/types/anguless-angulux-baseinput.d.ts +9 -6
  39. package/types/anguless-angulux-inputtext.d.ts +18 -1
  40. package/types/anguless-angulux-textarea.d.ts +31 -14
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, InjectionToken, input, inject, booleanAttribute, computed, effect, HostListener, Input, Directive, NgModule } from '@angular/core';
2
+ import { Injectable, InjectionToken, booleanAttribute, input, inject, computed, effect, HostListener, Input, Directive, NgModule } from '@angular/core';
3
3
  import { NgControl } from '@angular/forms';
4
4
  import { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';
5
5
  import { BaseModelHolder } from '@anguless/angulux/basemodelholder';
@@ -28,7 +28,7 @@ const classes = {
28
28
  'p-filled': instance.$filled(),
29
29
  'p-inputtext-sm': instance.aglSize === 'small',
30
30
  'p-inputtext-lg': instance.aglSize === 'large',
31
- 'p-invalid': instance.invalid(),
31
+ 'p-invalid': instance.$invalid(),
32
32
  'p-variant-filled': instance.$variant() === 'filled',
33
33
  'p-inputtext-fluid': instance.hasFluid
34
34
  }
@@ -60,6 +60,10 @@ var InputTextClasses;
60
60
  })(InputTextClasses || (InputTextClasses = {}));
61
61
 
62
62
  const INPUTTEXT_INSTANCE = new InjectionToken('INPUTTEXT_INSTANCE');
63
+ /** `booleanAttribute` that keeps "not set" as `undefined` — see `BaseEditableHolder` for why. */
64
+ function interactionState(value) {
65
+ return value === null || value === undefined ? undefined : booleanAttribute(value);
66
+ }
63
67
  /**
64
68
  * InputText directive is an extension to standard input element with theming.
65
69
  * @group Components
@@ -117,8 +121,33 @@ class InputText extends BaseModelHolder {
117
121
  * @group Props
118
122
  */
119
123
  invalid = input(undefined, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
124
+ /**
125
+ * Whether the user has visited the field. Once this or `dirty` is set, the invalid state
126
+ * style waits for interaction: it appears when the field is touched or dirty. Signal Forms'
127
+ * `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both
128
+ * unset and `invalid` alone decides.
129
+ * @defaultValue undefined
130
+ * @group Props
131
+ */
132
+ touched = input(undefined, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: interactionState });
133
+ /**
134
+ * Whether the user has changed the value. See `touched`.
135
+ * @defaultValue undefined
136
+ * @group Props
137
+ */
138
+ dirty = input(undefined, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: interactionState });
120
139
  $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant(), /* @ts-ignore */
121
140
  ...(ngDevMode ? [{ debugName: "$variant" }] : /* istanbul ignore next */ []));
141
+ /** Whether the invalid state is shown — the same rule as `BaseEditableHolder.$invalid`. */
142
+ $invalid = computed(() => {
143
+ if (!this.invalid()) {
144
+ return false;
145
+ }
146
+ const touched = this.touched();
147
+ const dirty = this.dirty();
148
+ return (touched === undefined && dirty === undefined) || !!touched || !!dirty;
149
+ }, /* @ts-ignore */
150
+ ...(ngDevMode ? [{ debugName: "$invalid" }] : /* istanbul ignore next */ []));
122
151
  _componentStyle = inject(InputTextStyle);
123
152
  constructor() {
124
153
  super();
@@ -148,14 +177,14 @@ class InputText extends BaseModelHolder {
148
177
  }
149
178
  get dataP() {
150
179
  return this.cn({
151
- invalid: this.invalid(),
180
+ invalid: this.$invalid(),
152
181
  fluid: this.hasFluid,
153
182
  filled: this.$variant() === 'filled',
154
183
  [this.aglSize]: this.aglSize
155
184
  });
156
185
  }
157
186
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: InputText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
158
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: InputText, isStandalone: true, selector: "[aglInputText]", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, ptInputText: { classPropertyName: "ptInputText", publicName: "ptInputText", isSignal: true, isRequired: false, transformFunction: null }, pInputTextPT: { classPropertyName: "pInputTextPT", publicName: "pInputTextPT", isSignal: true, isRequired: false, transformFunction: null }, pInputTextUnstyled: { classPropertyName: "pInputTextUnstyled", publicName: "pInputTextUnstyled", isSignal: true, isRequired: false, transformFunction: null }, aglSize: { classPropertyName: "aglSize", publicName: "aglSize", isSignal: false, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput()" }, properties: { "class": "cx('root')", "attr.data-p": "dataP" } }, providers: [InputTextStyle, { provide: INPUTTEXT_INSTANCE, useExisting: InputText }, { provide: PARENT_INSTANCE, useExisting: InputText }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
187
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.1", type: InputText, isStandalone: true, selector: "[aglInputText]", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, ptInputText: { classPropertyName: "ptInputText", publicName: "ptInputText", isSignal: true, isRequired: false, transformFunction: null }, pInputTextPT: { classPropertyName: "pInputTextPT", publicName: "pInputTextPT", isSignal: true, isRequired: false, transformFunction: null }, pInputTextUnstyled: { classPropertyName: "pInputTextUnstyled", publicName: "pInputTextUnstyled", isSignal: true, isRequired: false, transformFunction: null }, aglSize: { classPropertyName: "aglSize", publicName: "aglSize", isSignal: false, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput()" }, properties: { "class": "cx('root')", "attr.data-p": "dataP", "attr.aria-invalid": "$invalid() || undefined" } }, providers: [InputTextStyle, { provide: INPUTTEXT_INSTANCE, useExisting: InputText }, { provide: PARENT_INSTANCE, useExisting: InputText }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
159
188
  }
160
189
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: InputText, decorators: [{
161
190
  type: Directive,
@@ -164,7 +193,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
164
193
  standalone: true,
165
194
  host: {
166
195
  '[class]': "cx('root')",
167
- '[attr.data-p]': 'dataP'
196
+ '[attr.data-p]': 'dataP',
197
+ '[attr.aria-invalid]': '$invalid() || undefined'
168
198
  },
169
199
  providers: [InputTextStyle, { provide: INPUTTEXT_INSTANCE, useExisting: InputText }, { provide: PARENT_INSTANCE, useExisting: InputText }],
170
200
  hostDirectives: [Bind]
@@ -174,7 +204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
174
204
  }], ptInputText: [{ type: i0.Input, args: [{ isSignal: true, alias: "ptInputText", required: false }] }], pInputTextPT: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputTextPT", required: false }] }], pInputTextUnstyled: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputTextUnstyled", required: false }] }], aglSize: [{
175
205
  type: Input,
176
206
  args: ['aglSize']
177
- }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], onInput: [{
207
+ }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], onInput: [{
178
208
  type: HostListener,
179
209
  args: ['input']
180
210
  }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"anguless-angulux-inputtext.mjs","sources":["../../src/inputtext/style/inputtextstyle.ts","../../src/inputtext/inputtext.ts","../../src/inputtext/anguless-angulux-inputtext.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as inputtext_style } from '@anguless/angulux-styles/inputtext';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${inputtext_style}\n\n /* For AnguluxConfig */\n .p-inputtext.ng-invalid.ng-dirty {\n border-color: dt('inputtext.invalid.border.color');\n }\n\n .p-inputtext.ng-invalid.ng-dirty::placeholder {\n color: dt('inputtext.invalid.placeholder.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-inputtext p-component',\n {\n 'p-filled': instance.$filled(),\n 'p-inputtext-sm': instance.aglSize === 'small',\n 'p-inputtext-lg': instance.aglSize === 'large',\n 'p-invalid': instance.invalid(),\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-inputtext-fluid': instance.hasFluid\n }\n ]\n};\n\n@Injectable()\nexport class InputTextStyle extends BaseStyle {\n name = 'inputtext';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * InputText renders a text field to enter data.\n *\n * @module inputtextstyle\n *\n */\nexport enum InputTextClasses {\n /**\n * The class of root element\n */\n root = 'p-inputtext'\n}\n\nexport interface InputTextStyle extends BaseStyle {}\n","import { booleanAttribute, computed, Directive, effect, HostListener, inject, InjectionToken, input, Input, NgModule } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { BaseModelHolder } from '@anguless/angulux/basemodelholder';\nimport { Bind } from '@anguless/angulux/bind';\nimport { Fluid } from '@anguless/angulux/fluid';\nimport { InputTextPassThrough } from '@anguless/angulux/types/inputtext';\nimport { InputTextStyle } from './style/inputtextstyle';\n\nconst INPUTTEXT_INSTANCE = new InjectionToken<InputText>('INPUTTEXT_INSTANCE');\n\n/**\n * InputText directive is an extension to standard input element with theming.\n * @group Components\n */\n@Directive({\n selector: '[aglInputText]',\n standalone: true,\n host: {\n '[class]': \"cx('root')\",\n '[attr.data-p]': 'dataP'\n },\n providers: [InputTextStyle, { provide: INPUTTEXT_INSTANCE, useExisting: InputText }, { provide: PARENT_INSTANCE, useExisting: InputText }],\n hostDirectives: [Bind]\n})\nexport class InputText extends BaseModelHolder<InputTextPassThrough> {\n componentName = 'InputText';\n\n @Input() hostName: any = '';\n\n /**\n * Used to pass attributes to DOM elements inside the InputText component.\n * @defaultValue undefined\n * @deprecated use pInputTextPT instead.\n * @group Props\n */\n ptInputText = input<InputTextPassThrough>();\n /**\n * Used to pass attributes to DOM elements inside the InputText component.\n * @defaultValue undefined\n * @group Props\n */\n pInputTextPT = input<InputTextPassThrough>();\n /**\n * Indicates whether the component should be rendered without styles.\n * @defaultValue undefined\n * @group Props\n */\n pInputTextUnstyled = input<boolean | undefined>();\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcInputText: InputText | undefined = inject(INPUTTEXT_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n ngControl = inject(NgControl, { optional: true, self: true });\n\n pcFluid: Fluid | null = inject(Fluid, { optional: true, host: true, skipSelf: true });\n\n /**\n * Defines the size of the component.\n * @group Props\n */\n @Input('aglSize') aglSize: 'large' | 'small' | undefined;\n /**\n * Specifies the input variant of the component.\n * @defaultValue undefined\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have invalid state style.\n * @defaultValue false\n * @group Props\n */\n invalid = input(undefined, { transform: booleanAttribute });\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n _componentStyle = inject(InputTextStyle);\n\n constructor() {\n super();\n effect(() => {\n const pt = this.ptInputText() || this.pInputTextPT();\n pt && this.directivePT.set(pt);\n });\n\n effect(() => {\n this.pInputTextUnstyled() && this.directiveUnstyled.set(this.pInputTextUnstyled());\n });\n }\n\n onAfterViewInit() {\n this.writeModelValue(this.ngControl?.value ?? this.el.nativeElement.value);\n this.cd.detectChanges();\n }\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptm('root'));\n }\n\n onDoCheck() {\n this.writeModelValue(this.ngControl?.value ?? this.el.nativeElement.value);\n }\n\n @HostListener('input')\n onInput() {\n this.writeModelValue(this.ngControl?.value ?? this.el.nativeElement.value);\n }\n\n get hasFluid() {\n return this.fluid() ?? !!this.pcFluid;\n }\n\n get dataP() {\n return this.cn({\n invalid: this.invalid(),\n fluid: this.hasFluid,\n filled: this.$variant() === 'filled',\n [this.aglSize as string]: this.aglSize\n });\n }\n}\n\n@NgModule({\n imports: [InputText],\n exports: [InputText]\n})\nexport class InputTextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"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AS,CAAA,EAAA,CAAA;wGA6GT,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,OAAO,EAAE,CAAC,SAAS;AACtB,iBAAA;;;ACrID;;AAEG;;;;"}
1
+ {"version":3,"file":"anguless-angulux-inputtext.mjs","sources":["../../src/inputtext/style/inputtextstyle.ts","../../src/inputtext/inputtext.ts","../../src/inputtext/anguless-angulux-inputtext.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as inputtext_style } from '@anguless/angulux-styles/inputtext';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${inputtext_style}\n\n /* For AnguluxConfig */\n .p-inputtext.ng-invalid.ng-dirty {\n border-color: dt('inputtext.invalid.border.color');\n }\n\n .p-inputtext.ng-invalid.ng-dirty::placeholder {\n color: dt('inputtext.invalid.placeholder.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-inputtext p-component',\n {\n 'p-filled': instance.$filled(),\n 'p-inputtext-sm': instance.aglSize === 'small',\n 'p-inputtext-lg': instance.aglSize === 'large',\n 'p-invalid': instance.$invalid(),\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-inputtext-fluid': instance.hasFluid\n }\n ]\n};\n\n@Injectable()\nexport class InputTextStyle extends BaseStyle {\n name = 'inputtext';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * InputText renders a text field to enter data.\n *\n * @module inputtextstyle\n *\n */\nexport enum InputTextClasses {\n /**\n * The class of root element\n */\n root = 'p-inputtext'\n}\n\nexport interface InputTextStyle extends BaseStyle {}\n","import { booleanAttribute, computed, Directive, effect, HostListener, inject, InjectionToken, input, Input, NgModule } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { BaseModelHolder } from '@anguless/angulux/basemodelholder';\nimport { Bind } from '@anguless/angulux/bind';\nimport { Fluid } from '@anguless/angulux/fluid';\nimport { InputTextPassThrough } from '@anguless/angulux/types/inputtext';\nimport { InputTextStyle } from './style/inputtextstyle';\n\nconst INPUTTEXT_INSTANCE = new InjectionToken<InputText>('INPUTTEXT_INSTANCE');\n\n/** `booleanAttribute` that keeps \"not set\" as `undefined` — see `BaseEditableHolder` for why. */\nfunction interactionState(value: unknown): boolean | undefined {\n return value === null || value === undefined ? undefined : booleanAttribute(value);\n}\n\n/**\n * InputText directive is an extension to standard input element with theming.\n * @group Components\n */\n@Directive({\n selector: '[aglInputText]',\n standalone: true,\n host: {\n '[class]': \"cx('root')\",\n '[attr.data-p]': 'dataP',\n '[attr.aria-invalid]': '$invalid() || undefined'\n },\n providers: [InputTextStyle, { provide: INPUTTEXT_INSTANCE, useExisting: InputText }, { provide: PARENT_INSTANCE, useExisting: InputText }],\n hostDirectives: [Bind]\n})\nexport class InputText extends BaseModelHolder<InputTextPassThrough> {\n componentName = 'InputText';\n\n @Input() hostName: any = '';\n\n /**\n * Used to pass attributes to DOM elements inside the InputText component.\n * @defaultValue undefined\n * @deprecated use pInputTextPT instead.\n * @group Props\n */\n ptInputText = input<InputTextPassThrough>();\n /**\n * Used to pass attributes to DOM elements inside the InputText component.\n * @defaultValue undefined\n * @group Props\n */\n pInputTextPT = input<InputTextPassThrough>();\n /**\n * Indicates whether the component should be rendered without styles.\n * @defaultValue undefined\n * @group Props\n */\n pInputTextUnstyled = input<boolean | undefined>();\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcInputText: InputText | undefined = inject(INPUTTEXT_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n ngControl = inject(NgControl, { optional: true, self: true });\n\n pcFluid: Fluid | null = inject(Fluid, { optional: true, host: true, skipSelf: true });\n\n /**\n * Defines the size of the component.\n * @group Props\n */\n @Input('aglSize') aglSize: 'large' | 'small' | undefined;\n /**\n * Specifies the input variant of the component.\n * @defaultValue undefined\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * When present, it specifies that the component should have invalid state style.\n * @defaultValue false\n * @group Props\n */\n invalid = input(undefined, { transform: booleanAttribute });\n /**\n * Whether the user has visited the field. Once this or `dirty` is set, the invalid state\n * style waits for interaction: it appears when the field is touched or dirty. Signal Forms'\n * `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both\n * unset and `invalid` alone decides.\n * @defaultValue undefined\n * @group Props\n */\n touched = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n /**\n * Whether the user has changed the value. See `touched`.\n * @defaultValue undefined\n * @group Props\n */\n dirty = input<boolean | undefined, unknown>(undefined, { transform: interactionState });\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n /** Whether the invalid state is shown — the same rule as `BaseEditableHolder.$invalid`. */\n $invalid = computed(() => {\n if (!this.invalid()) {\n return false;\n }\n\n const touched = this.touched();\n const dirty = this.dirty();\n\n return (touched === undefined && dirty === undefined) || !!touched || !!dirty;\n });\n\n _componentStyle = inject(InputTextStyle);\n\n constructor() {\n super();\n effect(() => {\n const pt = this.ptInputText() || this.pInputTextPT();\n pt && this.directivePT.set(pt);\n });\n\n effect(() => {\n this.pInputTextUnstyled() && this.directiveUnstyled.set(this.pInputTextUnstyled());\n });\n }\n\n onAfterViewInit() {\n this.writeModelValue(this.ngControl?.value ?? this.el.nativeElement.value);\n this.cd.detectChanges();\n }\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptm('root'));\n }\n\n onDoCheck() {\n this.writeModelValue(this.ngControl?.value ?? this.el.nativeElement.value);\n }\n\n @HostListener('input')\n onInput() {\n this.writeModelValue(this.ngControl?.value ?? this.el.nativeElement.value);\n }\n\n get hasFluid() {\n return this.fluid() ?? !!this.pcFluid;\n }\n\n get dataP() {\n return this.cn({\n invalid: this.$invalid(),\n fluid: this.hasFluid,\n filled: this.$variant() === 'filled',\n [this.aglSize as string]: this.aglSize\n });\n }\n}\n\n@NgModule({\n imports: [InputText],\n exports: [InputText]\n})\nexport class InputTextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["inputtext_style"],"mappings":";;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAe;;;;;;;;;;CAUpB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,yBAAyB;AACzB,QAAA;AACI,YAAA,UAAU,EAAE,QAAQ,CAAC,OAAO,EAAE;AAC9B,YAAA,gBAAgB,EAAE,QAAQ,CAAC,OAAO,KAAK,OAAO;AAC9C,YAAA,gBAAgB,EAAE,QAAQ,CAAC,OAAO,KAAK,OAAO;AAC9C,YAAA,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;AAChC,YAAA,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,QAAQ;YACpD,mBAAmB,EAAE,QAAQ,CAAC;AACjC;AACJ;CACJ;AAGK,MAAO,cAAe,SAAQ,SAAS,CAAA;IACzC,IAAI,GAAG,WAAW;IAElB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAd,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;AASD;;;;;;AAMG;IACS;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB;;AAEG;AACH,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,aAAoB;AACxB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;ACtC5B,MAAM,kBAAkB,GAAG,IAAI,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xIf,SAAS,CAAA,EAAA,OAAA,EAAA,CAAT,SAAS,CAAA,EAAA,CAAA;wGAwIT,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,OAAO,EAAE,CAAC,SAAS;AACtB,iBAAA;;;ACtKD;;AAEG;;;;"}
@@ -35,9 +35,9 @@ const style = /*css*/ `
35
35
  .p-multiselect.ng-invalid.ng-dirty {
36
36
  border-color: dt('multiselect.invalid.border.color');
37
37
  }
38
- p-multiSelect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder,
39
- p-multi-select.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder,
40
- p-multiselect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder {
38
+ agl-multiSelect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder,
39
+ agl-multi-select.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder,
40
+ agl-multiselect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder {
41
41
  color: dt('multiselect.invalid.placeholder.color');
42
42
  }
43
43
  `;
@@ -51,7 +51,7 @@ const classes = {
51
51
  'p-multiselect p-component p-inputwrapper': true,
52
52
  'p-multiselect-display-chip': instance.display === 'chip',
53
53
  'p-disabled': instance.$disabled(),
54
- 'p-invalid': instance.invalid(),
54
+ 'p-invalid': instance.$invalid(),
55
55
  'p-variant-filled': instance.$variant() === 'filled',
56
56
  'p-focus': instance.focused,
57
57
  'p-inputwrapper-filled': instance.$filled(),
@@ -1704,7 +1704,7 @@ class MultiSelect extends BaseEditableHolder {
1704
1704
  }
1705
1705
  get containerDataP() {
1706
1706
  return this.cn({
1707
- invalid: this.invalid(),
1707
+ invalid: this.$invalid(),
1708
1708
  disabled: this.$disabled(),
1709
1709
  focus: this.focused,
1710
1710
  fluid: this.hasFluid,
@@ -1786,6 +1786,7 @@ class MultiSelect extends BaseEditableHolder {
1786
1786
  [attr.value]="modelValue()"
1787
1787
  [attr.name]="name()"
1788
1788
  [attr.required]="required() ? '' : undefined"
1789
+ [attr.aria-invalid]="$invalid() || undefined"
1789
1790
  [attr.disabled]="$disabled() ? '' : undefined"
1790
1791
  [aglBind]="ptm('hiddenInput')"
1791
1792
  />
@@ -2049,7 +2050,7 @@ class MultiSelect extends BaseEditableHolder {
2049
2050
  </div>
2050
2051
  </ng-template>
2051
2052
  </agl-overlay>
2052
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MultiSelectItem, selector: "li[aglMultiSelectItem]", inputs: ["option", "selected", "label", "disabled", "itemSize", "focused", "ariaPosInset", "ariaSetSize", "variant", "template", "checkIconTemplate", "itemCheckboxIconTemplate", "highlightOnSelect"], outputs: ["onClick", "onMouseEnter"] }, { kind: "component", type: Overlay, selector: "agl-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Tooltip, selector: "[aglTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "aglTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Scroller, selector: "agl-scroller, agl-virtualscroller, agl-virtual-scroller, agl-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "directive", type: AutoFocus, selector: "[aglAutoFocus]", inputs: ["aglAutoFocus"] }, { kind: "component", type: CheckIcon, selector: "[data-p-icon=\"check\"]" }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: IconField, selector: "agl-iconfield, agl-iconField, agl-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "agl-inputicon, agl-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: InputText, selector: "[aglInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "aglSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Chip, selector: "agl-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: Checkbox, selector: "agl-checkbox, agl-checkBox, agl-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i4.Bind, selector: "[aglBind]", inputs: ["aglBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2053
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MultiSelectItem, selector: "li[aglMultiSelectItem]", inputs: ["option", "selected", "label", "disabled", "itemSize", "focused", "ariaPosInset", "ariaSetSize", "variant", "template", "checkIconTemplate", "itemCheckboxIconTemplate", "highlightOnSelect"], outputs: ["onClick", "onMouseEnter"] }, { kind: "component", type: Overlay, selector: "agl-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Tooltip, selector: "[aglTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "aglTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Scroller, selector: "agl-scroller, agl-virtualscroller, agl-virtual-scroller, agl-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "directive", type: AutoFocus, selector: "[aglAutoFocus]", inputs: ["aglAutoFocus"] }, { kind: "component", type: CheckIcon, selector: "[data-p-icon=\"check\"]" }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: IconField, selector: "agl-iconfield, agl-iconField, agl-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "agl-inputicon, agl-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: InputText, selector: "[aglInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "aglSize", "variant", "fluid", "invalid", "touched", "dirty"] }, { kind: "component", type: Chip, selector: "agl-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: Checkbox, selector: "agl-checkbox, agl-checkBox, agl-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i4.Bind, selector: "[aglBind]", inputs: ["aglBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2053
2054
  }
2054
2055
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: MultiSelect, decorators: [{
2055
2056
  type: Component,
@@ -2084,6 +2085,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2084
2085
  [attr.value]="modelValue()"
2085
2086
  [attr.name]="name()"
2086
2087
  [attr.required]="required() ? '' : undefined"
2088
+ [attr.aria-invalid]="$invalid() || undefined"
2087
2089
  [attr.disabled]="$disabled() ? '' : undefined"
2088
2090
  [aglBind]="ptm('hiddenInput')"
2089
2091
  />