ng-primitives 0.65.0 → 0.66.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.
|
@@ -160,15 +160,23 @@ class NgpFormControl {
|
|
|
160
160
|
alias: 'ngpFormControlDisabled',
|
|
161
161
|
transform: booleanAttribute,
|
|
162
162
|
});
|
|
163
|
+
/**
|
|
164
|
+
* The element reference.
|
|
165
|
+
*/
|
|
166
|
+
this.elementRef = injectElementRef();
|
|
167
|
+
/**
|
|
168
|
+
* Whether the element supports the disabled attribute.
|
|
169
|
+
*/
|
|
170
|
+
this.supportsDisabledAttribute = 'disabled' in this.elementRef.nativeElement;
|
|
163
171
|
/**
|
|
164
172
|
* The state of the form control.
|
|
165
173
|
*/
|
|
166
174
|
this.state = formControlState(this);
|
|
167
175
|
// Sync the form control state with the control state.
|
|
168
|
-
setupFormControl({ id: this.state.id, disabled: this.state.disabled });
|
|
176
|
+
this.status = setupFormControl({ id: this.state.id, disabled: this.state.disabled });
|
|
169
177
|
}
|
|
170
178
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpFormControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
171
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpFormControl, isStandalone: true, selector: "[ngpFormControl]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpFormControlDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideFormControlState()], exportAs: ["ngpFormControl"], ngImport: i0 }); }
|
|
179
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpFormControl, isStandalone: true, selector: "[ngpFormControl]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpFormControlDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "supportsDisabledAttribute && status().disabled ? \"\" : null" } }, providers: [provideFormControlState()], exportAs: ["ngpFormControl"], ngImport: i0 }); }
|
|
172
180
|
}
|
|
173
181
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpFormControl, decorators: [{
|
|
174
182
|
type: Directive,
|
|
@@ -176,6 +184,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
176
184
|
selector: '[ngpFormControl]',
|
|
177
185
|
exportAs: 'ngpFormControl',
|
|
178
186
|
providers: [provideFormControlState()],
|
|
187
|
+
host: {
|
|
188
|
+
'[attr.disabled]': 'supportsDisabledAttribute && status().disabled ? "" : null',
|
|
189
|
+
},
|
|
179
190
|
}]
|
|
180
191
|
}], ctorParameters: () => [] });
|
|
181
192
|
function setupFormControl({ id, disabled = signal(false), }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-form-field.mjs","sources":["../../../../packages/ng-primitives/form-field/src/form-field/form-field-state.ts","../../../../packages/ng-primitives/form-field/src/description/description.ts","../../../../packages/ng-primitives/form-field/src/error/error.ts","../../../../packages/ng-primitives/form-field/src/form-control/form-control-state.ts","../../../../packages/ng-primitives/form-field/src/form-control/form-control.ts","../../../../packages/ng-primitives/form-field/src/form-field/form-field.ts","../../../../packages/ng-primitives/form-field/src/label/label.ts","../../../../packages/ng-primitives/form-field/src/ng-primitives-form-field.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpFormField } from './form-field';\n\n/**\n * The state token for the FormField primitive.\n */\nexport const NgpFormFieldStateToken = createStateToken<NgpFormField>('FormField');\n\n/**\n * Provides the FormField state.\n */\nexport const provideFormFieldState = createStateProvider(NgpFormFieldStateToken);\n\n/**\n * Injects the FormField state.\n */\nexport const injectFormFieldState = createStateInjector<NgpFormField>(NgpFormFieldStateToken);\n\n/**\n * The FormField state registration function.\n */\nexport const formFieldState = createState(NgpFormFieldStateToken);\n","import { Directive, effect, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\n\n/**\n * The `NgpDescription` directive is used to mark a description element within a form field. There may be multiple descriptions associated with a form control.\n */\n@Directive({\n selector: '[ngpDescription]',\n exportAs: 'ngpDescription',\n host: {\n '[attr.id]': 'id()',\n '[attr.data-invalid]': 'formField()?.invalid() ? \"\" : null',\n '[attr.data-valid]': 'formField()?.valid() ? \"\" : null',\n '[attr.data-touched]': 'formField()?.touched() ? \"\" : null',\n '[attr.data-pristine]': 'formField()?.pristine() ? \"\" : null',\n '[attr.data-dirty]': 'formField()?.dirty() ? \"\" : null',\n '[attr.data-pending]': 'formField()?.pending() ? \"\" : null',\n '[attr.data-disabled]': 'formField()?.disabled() ? \"\" : null',\n },\n})\nexport class NgpDescription {\n /**\n * The id of the description. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-description'));\n /**\n * Access the form field that the description is associated with.\n */\n protected readonly formField = injectFormFieldState({ optional: true });\n\n constructor() {\n effect(onCleanup => {\n this.formField()?.addDescription(this.id());\n onCleanup(() => this.formField()?.removeDescription(this.id()));\n });\n }\n}\n","import { Directive, OnChanges, OnDestroy, SimpleChanges, computed, input } from '@angular/core';\nimport { onBooleanChange, uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\n\n/**\n * The `NgpError` directive is used to mark an error message element within a form field. There may be multiple error messages associated with a form control.\n */\n@Directive({\n selector: '[ngpError]',\n exportAs: 'ngpError',\n host: {\n '[attr.id]': 'id()',\n '[attr.data-invalid]': 'formField()?.invalid() ? \"\" : null',\n '[attr.data-valid]': 'formField()?.valid() ? \"\" : null',\n '[attr.data-touched]': 'formField()?.touched() ? \"\" : null',\n '[attr.data-pristine]': 'formField()?.pristine() ? \"\" : null',\n '[attr.data-dirty]': 'formField()?.dirty() ? \"\" : null',\n '[attr.data-pending]': 'formField()?.pending() ? \"\" : null',\n '[attr.data-disabled]': 'formField()?.disabled() ? \"\" : null',\n '[attr.data-validator]': 'state()',\n },\n})\nexport class NgpError implements OnChanges, OnDestroy {\n /**\n * Access the form field that the description is associated with.\n */\n protected readonly formField = injectFormFieldState({ optional: true });\n\n /**\n * The id of the error message. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-error'));\n\n /**\n * The validator associated with the error message.\n */\n readonly validator = input<string | null>(null, {\n alias: 'ngpErrorValidator',\n });\n\n /**\n * Determine if there is an error message.\n */\n protected readonly hasError = computed(() => {\n const errors = this.formField()?.errors() ?? [];\n const validator = this.validator();\n\n return validator ? errors?.includes(validator) : errors?.length > 0;\n });\n\n /**\n * Determine whether the validator associated with this error is failing.\n */\n protected readonly state = computed(() => (this.hasError() ? 'fail' : 'pass'));\n\n constructor() {\n // add or remove the error message when the error state changes\n onBooleanChange(\n this.hasError,\n () => this.formField()?.addDescription(this.id()),\n () => this.formField()?.removeDescription(this.id()),\n );\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('id' in changes) {\n this.formField()?.removeDescription(changes['id'].previousValue);\n }\n }\n\n ngOnDestroy(): void {\n this.formField()?.removeDescription(this.id());\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpFormControl } from './form-control';\n\n/**\n * The state token for the FormControl primitive.\n */\nexport const NgpFormControlStateToken = createStateToken<NgpFormControl>('FormControl');\n\n/**\n * Provides the FormControl state.\n */\nexport const provideFormControlState = createStateProvider(NgpFormControlStateToken);\n\n/**\n * Injects the FormControl state.\n */\nexport const injectFormControlState = createStateInjector<NgpFormControl>(NgpFormControlStateToken);\n\n/**\n * The FormControl state registration function.\n */\nexport const formControlState = createState(NgpFormControlStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n input,\n signal,\n Signal,\n} from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { controlStatus, NgpControlStatus, uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\nimport { formControlState, provideFormControlState } from './form-control-state';\n\n/**\n * Typically this primitive would be not be used directly, but instead a more specific form control primitive would be used (e.g. `ngpInput`). All of our form control primitives use `ngpFormControl` internally so they will have the same accessibility features as described below.\n *\n * The `NgpFormControl` directive is used to mark a form control element within a form field. This element will have an `aria-labelledby` attribute set to the ID of the label element within the form field and an `aria-describedby` attribute set to the ID of the description elements within the form field.\n */\n@Directive({\n selector: '[ngpFormControl]',\n exportAs: 'ngpFormControl',\n providers: [provideFormControlState()],\n})\nexport class NgpFormControl {\n /**\n * The id of the form control. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-form-control'));\n\n /**\n * Whether the form control is disabled by a parent.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpFormControlDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The state of the form control.\n */\n private readonly state = formControlState<NgpFormControl>(this);\n\n constructor() {\n // Sync the form control state with the control state.\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n\ninterface FormControlState {\n id: Signal<string>;\n disabled?: Signal<boolean>;\n}\n\nexport function setupFormControl({\n id,\n disabled = signal(false),\n}: FormControlState): Signal<NgpControlStatus> {\n const element = injectElementRef().nativeElement;\n // Access the form field that the form control is associated with.\n const formField = injectFormFieldState({ optional: true });\n // Access the form control status.\n const status = controlStatus();\n // Determine the aria-labelledby attribute value.\n const ariaLabelledBy = computed(() => formField()?.labels().join(' '));\n // Determine the aria-describedby attribute value.\n const ariaDescribedBy = computed(() => formField()?.descriptions().join(' '));\n\n explicitEffect([id], ([id], onCleanup) => {\n formField()?.setFormControl(id);\n onCleanup(() => formField()?.removeFormControl());\n });\n\n afterRenderEffect({\n write: () => {\n setAttribute(element, 'id', id());\n setAttribute(element, 'aria-labelledby', ariaLabelledBy());\n setAttribute(element, 'aria-describedby', ariaDescribedBy());\n\n setStateAttribute(element, status().invalid, 'data-invalid');\n setStateAttribute(element, status().valid, 'data-valid');\n setStateAttribute(element, status().touched, 'data-touched');\n setStateAttribute(element, status().pristine, 'data-pristine');\n setStateAttribute(element, status().dirty, 'data-dirty');\n setStateAttribute(element, status().pending, 'data-pending');\n setStateAttribute(element, disabled() || status().disabled, 'data-disabled');\n },\n });\n\n return computed(() => ({ ...status(), disabled: status().disabled || disabled() }));\n}\n\n/**\n * Sets the attribute on the element. If the value is not empty, the attribute is set to the value.\n * If the value is empty, the attribute is removed.\n * @param element The element to set the attribute on.\n * @param attribute The attribute to set on the element.\n * @param value The value to set on the attribute.\n */\nfunction setAttribute(element: HTMLElement, attribute: string, value: string) {\n if (value && value.length > 0) {\n element.setAttribute(attribute, value);\n } else {\n element.removeAttribute(attribute);\n }\n}\n\n/**\n * Sets the attribute on the element based on the state. If the state is true, the attribute\n * is set to an empty string. If the state is false, the attribute is removed.\n * @param element The element to set the attribute on.\n * @param state The state to set the attribute based on.\n * @param attribute The attribute to set on the element.\n */\nfunction setStateAttribute(element: HTMLElement, state: boolean | null, attribute: string) {\n if (state) {\n element.setAttribute(attribute, '');\n } else {\n element.removeAttribute(attribute);\n }\n}\n","import { Directive, OnDestroy, contentChild, signal } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { onChange } from 'ng-primitives/utils';\nimport { Subscription } from 'rxjs';\nimport { formFieldState, provideFormFieldState } from './form-field-state';\n\n/**\n * The `NgpFormField` directive is a container for form field elements. Any labels, form controls, or descriptions should be placed within this directive.\n */\n@Directive({\n selector: '[ngpFormField]',\n exportAs: 'ngpFormField',\n providers: [provideFormFieldState()],\n host: {\n '[attr.data-invalid]': 'invalid() ? \"\" : null',\n '[attr.data-valid]': 'valid() ? \"\" : null',\n '[attr.data-touched]': 'touched() ? \"\" : null',\n '[attr.data-pristine]': 'pristine() ? \"\" : null',\n '[attr.data-dirty]': 'dirty() ? \"\" : null',\n '[attr.data-pending]': 'pending() ? \"\" : null',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n})\nexport class NgpFormField implements OnDestroy {\n /**\n * Store the form label.\n * @internal\n */\n readonly labels = signal<string[]>([]);\n\n /**\n * Store the form descriptions.\n * @internal\n */\n readonly descriptions = signal<string[]>([]);\n\n /**\n * Store the id of the associated form control.\n * @internal\n */\n readonly formControl = signal<string | null>(null);\n\n /**\n * Find any NgControl within the form field.\n * @internal\n */\n private readonly ngControl = contentChild(NgControl);\n\n /**\n * Store the validation error messages.\n * @internal\n */\n readonly errors = signal<string[]>([]);\n\n /**\n * Whether the control is pristine.\n * @internal\n */\n readonly pristine = signal<boolean | null>(null);\n\n /**\n * Whether the control is touched.\n * @internal\n */\n readonly touched = signal<boolean | null>(null);\n\n /**\n * Whether the control is dirty.\n * @internal\n */\n readonly dirty = signal<boolean | null>(null);\n\n /**\n * Whether the control is valid.\n */\n readonly valid = signal<boolean | null>(null);\n\n /**\n * Whether the control is invalid.\n * @internal\n */\n readonly invalid = signal<boolean | null>(null);\n\n /**\n * Whether the control is pending.\n * @internal\n */\n readonly pending = signal<boolean | null>(null);\n\n /**\n * Whether the control is disabled.\n * @internal\n */\n readonly disabled = signal<boolean | null>(null);\n\n /**\n * Store the current status subscription.\n */\n private subscription?: Subscription;\n\n /**\n * The form field state.\n */\n protected readonly state = formFieldState<NgpFormField>(this);\n\n constructor() {\n // any time the ngControl changes, setup the subscriptions.\n onChange(this.ngControl, this.setupSubscriptions.bind(this));\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n\n /**\n * Setup a listener for the form control status.\n * @param control\n */\n private setupSubscriptions(control: NgControl | null | undefined): void {\n // Unsubscribe from the previous subscriptions.\n this.subscription?.unsubscribe();\n\n // set the initial values\n this.updateStatus();\n\n const underlyingControl = control?.control;\n\n // Listen for changes to the underlying control's status.\n this.subscription = underlyingControl?.events?.subscribe(this.updateStatus.bind(this));\n }\n\n private updateStatus(): void {\n const control = this.ngControl();\n\n if (!control) {\n return;\n }\n\n this.pristine.set(control.pristine);\n this.touched.set(control.touched);\n this.dirty.set(control.dirty);\n this.valid.set(control.valid);\n this.invalid.set(control.invalid);\n this.pending.set(control.pending);\n this.disabled.set(control.disabled);\n this.errors.set(control?.errors ? Object.keys(control.errors) : []);\n }\n\n /**\n * Register the id of the associated form control.\n * @param id\n * @internal\n */\n setFormControl(id: string): void {\n this.formControl.set(id);\n }\n\n /**\n * Register a label with the form field.\n * @param label\n * @internal\n */\n addLabel(label: string): void {\n this.labels.update(labels => [...labels, label]);\n }\n\n /**\n * Register a description with the form field.\n * @param description\n * @internal\n */\n addDescription(description: string): void {\n this.descriptions.update(descriptions => [...descriptions, description]);\n }\n\n /**\n * Remove the associated form control.\n * @internal\n */\n removeFormControl(): void {\n this.formControl.set(null);\n }\n\n /**\n * Remove a label from the form field.\n * @param label\n * @internal\n */\n removeLabel(label: string): void {\n this.labels.update(labels => labels.filter(l => l !== label));\n }\n\n /**\n * Remove a description from the form field.\n * @param description\n * @internal\n */\n removeDescription(description: string): void {\n this.descriptions.update(descriptions => descriptions.filter(d => d !== description));\n }\n}\n","import {\n computed,\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n input,\n} from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\n\n/**\n * The `NgpLabel` directive is used to mark a label element within a form field. Preferably, there should use an HTML `<label>` element.\n */\n@Directive({\n selector: '[ngpLabel]',\n exportAs: 'ngpLabel',\n host: {\n '[attr.id]': 'id()',\n '[attr.for]': 'htmlFor()',\n '[attr.data-invalid]': 'formField()?.invalid() ? \"\" : null',\n '[attr.data-valid]': 'formField()?.valid() ? \"\" : null',\n '[attr.data-touched]': 'formField()?.touched() ? \"\" : null',\n '[attr.data-pristine]': 'formField()?.pristine() ? \"\" : null',\n '[attr.data-dirty]': 'formField()?.dirty() ? \"\" : null',\n '[attr.data-pending]': 'formField()?.pending() ? \"\" : null',\n '[attr.data-disabled]': 'formField()?.disabled() ? \"\" : null',\n },\n})\nexport class NgpLabel {\n /**\n * The id of the label. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-label'));\n /**\n * Access the form field that the label is associated with.\n */\n protected readonly formField = injectFormFieldState({ optional: true });\n /**\n * Derive the for attribute value if the label is an HTML label element.\n */\n protected readonly htmlFor = computed(() => this.formField()?.formControl());\n /**\n * Access the element that the label is associated with.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n /**\n * Determine if the label is an HTML label element.\n */\n protected readonly isLabel = this.elementRef.nativeElement instanceof HTMLLabelElement;\n\n constructor() {\n effect(onCleanup => {\n this.formField()?.addLabel(this.id());\n onCleanup(() => this.formField()?.removeLabel(this.id()));\n });\n }\n\n @HostListener('click', ['$event'])\n protected onClick(event: MouseEvent): void {\n // by default a label will perform a click on the associated form control, however\n // this only works if the associated form control is an input element which may not always\n // be the case, so we prevent the default behavior and handle the click event ourselves.\n // This was inspired by the HeadlessUI approach:\n // https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/components/label/label.tsx#L58\n if (this.isLabel) {\n event.preventDefault();\n }\n\n // to find the associated form control we can lookup via the known id\n const targetId = this.htmlFor();\n\n if (!targetId) {\n return;\n }\n\n const target = document.getElementById(targetId);\n\n if (!target) {\n return;\n }\n\n // if the target is disabled then do nothing\n const disabled = target.getAttribute('disabled');\n const ariaDisabled = target.getAttribute('aria-disabled');\n\n if (disabled === '' || disabled === 'true' || ariaDisabled === 'true') {\n return;\n }\n\n // radio buttons, checkboxes and switches should all be clicked immediately as they require state changes\n if (\n (target instanceof HTMLInputElement &&\n (target.type === 'radio' || target.type === 'checkbox')) ||\n target.role === 'radio' ||\n target.role === 'checkbox' ||\n target.role === 'switch'\n ) {\n target.click();\n }\n\n // Move focus to the element, this allows you to start using keyboard shortcuts since the\n // bound element is now focused.\n target.focus({ preventScroll: true });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AACI,MAAM,sBAAsB,GAAG,gBAAgB,CAAe,WAAW,CAAC;AAEjF;;AAEG;MACU,qBAAqB,GAAG,mBAAmB,CAAC,sBAAsB;AAE/E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAe,sBAAsB;AAE5F;;AAEG;AACI,MAAM,cAAc,GAAG,WAAW,CAAC,sBAAsB,CAAC;;ACtBjE;;AAEG;MAeU,cAAc,CAAA;AAUzB,IAAA,WAAA,GAAA;AATA;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AACxD;;AAEG;QACgB,IAAA,CAAA,SAAS,GAAG,oBAAoB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAGrE,MAAM,CAAC,SAAS,IAAG;YACjB,IAAI,CAAC,SAAS,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;AAC3C,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACjE,QAAA,CAAC,CAAC;IACJ;+GAfW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAA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ages/ng-primitives/form-field/src/description/description.ts","../../../../packages/ng-primitives/form-field/src/error/error.ts","../../../../packages/ng-primitives/form-field/src/form-control/form-control-state.ts","../../../../packages/ng-primitives/form-field/src/form-control/form-control.ts","../../../../packages/ng-primitives/form-field/src/form-field/form-field.ts","../../../../packages/ng-primitives/form-field/src/label/label.ts","../../../../packages/ng-primitives/form-field/src/ng-primitives-form-field.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpFormField } from './form-field';\n\n/**\n * The state token for the FormField primitive.\n */\nexport const NgpFormFieldStateToken = createStateToken<NgpFormField>('FormField');\n\n/**\n * Provides the FormField state.\n */\nexport const provideFormFieldState = createStateProvider(NgpFormFieldStateToken);\n\n/**\n * Injects the FormField state.\n */\nexport const injectFormFieldState = createStateInjector<NgpFormField>(NgpFormFieldStateToken);\n\n/**\n * The FormField state registration function.\n */\nexport const formFieldState = createState(NgpFormFieldStateToken);\n","import { Directive, effect, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\n\n/**\n * The `NgpDescription` directive is used to mark a description element within a form field. There may be multiple descriptions associated with a form control.\n */\n@Directive({\n selector: '[ngpDescription]',\n exportAs: 'ngpDescription',\n host: {\n '[attr.id]': 'id()',\n '[attr.data-invalid]': 'formField()?.invalid() ? \"\" : null',\n '[attr.data-valid]': 'formField()?.valid() ? \"\" : null',\n '[attr.data-touched]': 'formField()?.touched() ? \"\" : null',\n '[attr.data-pristine]': 'formField()?.pristine() ? \"\" : null',\n '[attr.data-dirty]': 'formField()?.dirty() ? \"\" : null',\n '[attr.data-pending]': 'formField()?.pending() ? \"\" : null',\n '[attr.data-disabled]': 'formField()?.disabled() ? \"\" : null',\n },\n})\nexport class NgpDescription {\n /**\n * The id of the description. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-description'));\n /**\n * Access the form field that the description is associated with.\n */\n protected readonly formField = injectFormFieldState({ optional: true });\n\n constructor() {\n effect(onCleanup => {\n this.formField()?.addDescription(this.id());\n onCleanup(() => this.formField()?.removeDescription(this.id()));\n });\n }\n}\n","import { Directive, OnChanges, OnDestroy, SimpleChanges, computed, input } from '@angular/core';\nimport { onBooleanChange, uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\n\n/**\n * The `NgpError` directive is used to mark an error message element within a form field. There may be multiple error messages associated with a form control.\n */\n@Directive({\n selector: '[ngpError]',\n exportAs: 'ngpError',\n host: {\n '[attr.id]': 'id()',\n '[attr.data-invalid]': 'formField()?.invalid() ? \"\" : null',\n '[attr.data-valid]': 'formField()?.valid() ? \"\" : null',\n '[attr.data-touched]': 'formField()?.touched() ? \"\" : null',\n '[attr.data-pristine]': 'formField()?.pristine() ? \"\" : null',\n '[attr.data-dirty]': 'formField()?.dirty() ? \"\" : null',\n '[attr.data-pending]': 'formField()?.pending() ? \"\" : null',\n '[attr.data-disabled]': 'formField()?.disabled() ? \"\" : null',\n '[attr.data-validator]': 'state()',\n },\n})\nexport class NgpError implements OnChanges, OnDestroy {\n /**\n * Access the form field that the description is associated with.\n */\n protected readonly formField = injectFormFieldState({ optional: true });\n\n /**\n * The id of the error message. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-error'));\n\n /**\n * The validator associated with the error message.\n */\n readonly validator = input<string | null>(null, {\n alias: 'ngpErrorValidator',\n });\n\n /**\n * Determine if there is an error message.\n */\n protected readonly hasError = computed(() => {\n const errors = this.formField()?.errors() ?? [];\n const validator = this.validator();\n\n return validator ? errors?.includes(validator) : errors?.length > 0;\n });\n\n /**\n * Determine whether the validator associated with this error is failing.\n */\n protected readonly state = computed(() => (this.hasError() ? 'fail' : 'pass'));\n\n constructor() {\n // add or remove the error message when the error state changes\n onBooleanChange(\n this.hasError,\n () => this.formField()?.addDescription(this.id()),\n () => this.formField()?.removeDescription(this.id()),\n );\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('id' in changes) {\n this.formField()?.removeDescription(changes['id'].previousValue);\n }\n }\n\n ngOnDestroy(): void {\n this.formField()?.removeDescription(this.id());\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpFormControl } from './form-control';\n\n/**\n * The state token for the FormControl primitive.\n */\nexport const NgpFormControlStateToken = createStateToken<NgpFormControl>('FormControl');\n\n/**\n * Provides the FormControl state.\n */\nexport const provideFormControlState = createStateProvider(NgpFormControlStateToken);\n\n/**\n * Injects the FormControl state.\n */\nexport const injectFormControlState = createStateInjector<NgpFormControl>(NgpFormControlStateToken);\n\n/**\n * The FormControl state registration function.\n */\nexport const formControlState = createState(NgpFormControlStateToken);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n input,\n signal,\n Signal,\n} from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { controlStatus, NgpControlStatus, uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\nimport { formControlState, provideFormControlState } from './form-control-state';\n\n/**\n * Typically this primitive would be not be used directly, but instead a more specific form control primitive would be used (e.g. `ngpInput`). All of our form control primitives use `ngpFormControl` internally so they will have the same accessibility features as described below.\n *\n * The `NgpFormControl` directive is used to mark a form control element within a form field. This element will have an `aria-labelledby` attribute set to the ID of the label element within the form field and an `aria-describedby` attribute set to the ID of the description elements within the form field.\n */\n@Directive({\n selector: '[ngpFormControl]',\n exportAs: 'ngpFormControl',\n providers: [provideFormControlState()],\n host: {\n '[attr.disabled]': 'supportsDisabledAttribute && status().disabled ? \"\" : null',\n },\n})\nexport class NgpFormControl {\n /**\n * The id of the form control. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-form-control'));\n\n /**\n * Whether the form control is disabled by a parent.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpFormControlDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The status of the form control.\n */\n readonly status: Signal<NgpControlStatus>;\n\n /**\n * The element reference.\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Whether the element supports the disabled attribute.\n */\n protected readonly supportsDisabledAttribute = 'disabled' in this.elementRef.nativeElement;\n\n /**\n * The state of the form control.\n */\n private readonly state = formControlState<NgpFormControl>(this);\n\n constructor() {\n // Sync the form control state with the control state.\n this.status = setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n\ninterface FormControlState {\n id: Signal<string>;\n disabled?: Signal<boolean>;\n}\n\nexport function setupFormControl({\n id,\n disabled = signal(false),\n}: FormControlState): Signal<NgpControlStatus> {\n const element = injectElementRef().nativeElement;\n // Access the form field that the form control is associated with.\n const formField = injectFormFieldState({ optional: true });\n // Access the form control status.\n const status = controlStatus();\n // Determine the aria-labelledby attribute value.\n const ariaLabelledBy = computed(() => formField()?.labels().join(' '));\n // Determine the aria-describedby attribute value.\n const ariaDescribedBy = computed(() => formField()?.descriptions().join(' '));\n\n explicitEffect([id], ([id], onCleanup) => {\n formField()?.setFormControl(id);\n onCleanup(() => formField()?.removeFormControl());\n });\n\n afterRenderEffect({\n write: () => {\n setAttribute(element, 'id', id());\n setAttribute(element, 'aria-labelledby', ariaLabelledBy());\n setAttribute(element, 'aria-describedby', ariaDescribedBy());\n\n setStateAttribute(element, status().invalid, 'data-invalid');\n setStateAttribute(element, status().valid, 'data-valid');\n setStateAttribute(element, status().touched, 'data-touched');\n setStateAttribute(element, status().pristine, 'data-pristine');\n setStateAttribute(element, status().dirty, 'data-dirty');\n setStateAttribute(element, status().pending, 'data-pending');\n setStateAttribute(element, disabled() || status().disabled, 'data-disabled');\n },\n });\n\n return computed(() => ({ ...status(), disabled: status().disabled || disabled() }));\n}\n\n/**\n * Sets the attribute on the element. If the value is not empty, the attribute is set to the value.\n * If the value is empty, the attribute is removed.\n * @param element The element to set the attribute on.\n * @param attribute The attribute to set on the element.\n * @param value The value to set on the attribute.\n */\nfunction setAttribute(element: HTMLElement, attribute: string, value: string) {\n if (value && value.length > 0) {\n element.setAttribute(attribute, value);\n } else {\n element.removeAttribute(attribute);\n }\n}\n\n/**\n * Sets the attribute on the element based on the state. If the state is true, the attribute\n * is set to an empty string. If the state is false, the attribute is removed.\n * @param element The element to set the attribute on.\n * @param state The state to set the attribute based on.\n * @param attribute The attribute to set on the element.\n */\nfunction setStateAttribute(element: HTMLElement, state: boolean | null, attribute: string) {\n if (state) {\n element.setAttribute(attribute, '');\n } else {\n element.removeAttribute(attribute);\n }\n}\n","import { Directive, OnDestroy, contentChild, signal } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { onChange } from 'ng-primitives/utils';\nimport { Subscription } from 'rxjs';\nimport { formFieldState, provideFormFieldState } from './form-field-state';\n\n/**\n * The `NgpFormField` directive is a container for form field elements. Any labels, form controls, or descriptions should be placed within this directive.\n */\n@Directive({\n selector: '[ngpFormField]',\n exportAs: 'ngpFormField',\n providers: [provideFormFieldState()],\n host: {\n '[attr.data-invalid]': 'invalid() ? \"\" : null',\n '[attr.data-valid]': 'valid() ? \"\" : null',\n '[attr.data-touched]': 'touched() ? \"\" : null',\n '[attr.data-pristine]': 'pristine() ? \"\" : null',\n '[attr.data-dirty]': 'dirty() ? \"\" : null',\n '[attr.data-pending]': 'pending() ? \"\" : null',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n})\nexport class NgpFormField implements OnDestroy {\n /**\n * Store the form label.\n * @internal\n */\n readonly labels = signal<string[]>([]);\n\n /**\n * Store the form descriptions.\n * @internal\n */\n readonly descriptions = signal<string[]>([]);\n\n /**\n * Store the id of the associated form control.\n * @internal\n */\n readonly formControl = signal<string | null>(null);\n\n /**\n * Find any NgControl within the form field.\n * @internal\n */\n private readonly ngControl = contentChild(NgControl);\n\n /**\n * Store the validation error messages.\n * @internal\n */\n readonly errors = signal<string[]>([]);\n\n /**\n * Whether the control is pristine.\n * @internal\n */\n readonly pristine = signal<boolean | null>(null);\n\n /**\n * Whether the control is touched.\n * @internal\n */\n readonly touched = signal<boolean | null>(null);\n\n /**\n * Whether the control is dirty.\n * @internal\n */\n readonly dirty = signal<boolean | null>(null);\n\n /**\n * Whether the control is valid.\n */\n readonly valid = signal<boolean | null>(null);\n\n /**\n * Whether the control is invalid.\n * @internal\n */\n readonly invalid = signal<boolean | null>(null);\n\n /**\n * Whether the control is pending.\n * @internal\n */\n readonly pending = signal<boolean | null>(null);\n\n /**\n * Whether the control is disabled.\n * @internal\n */\n readonly disabled = signal<boolean | null>(null);\n\n /**\n * Store the current status subscription.\n */\n private subscription?: Subscription;\n\n /**\n * The form field state.\n */\n protected readonly state = formFieldState<NgpFormField>(this);\n\n constructor() {\n // any time the ngControl changes, setup the subscriptions.\n onChange(this.ngControl, this.setupSubscriptions.bind(this));\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n }\n\n /**\n * Setup a listener for the form control status.\n * @param control\n */\n private setupSubscriptions(control: NgControl | null | undefined): void {\n // Unsubscribe from the previous subscriptions.\n this.subscription?.unsubscribe();\n\n // set the initial values\n this.updateStatus();\n\n const underlyingControl = control?.control;\n\n // Listen for changes to the underlying control's status.\n this.subscription = underlyingControl?.events?.subscribe(this.updateStatus.bind(this));\n }\n\n private updateStatus(): void {\n const control = this.ngControl();\n\n if (!control) {\n return;\n }\n\n this.pristine.set(control.pristine);\n this.touched.set(control.touched);\n this.dirty.set(control.dirty);\n this.valid.set(control.valid);\n this.invalid.set(control.invalid);\n this.pending.set(control.pending);\n this.disabled.set(control.disabled);\n this.errors.set(control?.errors ? Object.keys(control.errors) : []);\n }\n\n /**\n * Register the id of the associated form control.\n * @param id\n * @internal\n */\n setFormControl(id: string): void {\n this.formControl.set(id);\n }\n\n /**\n * Register a label with the form field.\n * @param label\n * @internal\n */\n addLabel(label: string): void {\n this.labels.update(labels => [...labels, label]);\n }\n\n /**\n * Register a description with the form field.\n * @param description\n * @internal\n */\n addDescription(description: string): void {\n this.descriptions.update(descriptions => [...descriptions, description]);\n }\n\n /**\n * Remove the associated form control.\n * @internal\n */\n removeFormControl(): void {\n this.formControl.set(null);\n }\n\n /**\n * Remove a label from the form field.\n * @param label\n * @internal\n */\n removeLabel(label: string): void {\n this.labels.update(labels => labels.filter(l => l !== label));\n }\n\n /**\n * Remove a description from the form field.\n * @param description\n * @internal\n */\n removeDescription(description: string): void {\n this.descriptions.update(descriptions => descriptions.filter(d => d !== description));\n }\n}\n","import {\n computed,\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n input,\n} from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectFormFieldState } from '../form-field/form-field-state';\n\n/**\n * The `NgpLabel` directive is used to mark a label element within a form field. Preferably, there should use an HTML `<label>` element.\n */\n@Directive({\n selector: '[ngpLabel]',\n exportAs: 'ngpLabel',\n host: {\n '[attr.id]': 'id()',\n '[attr.for]': 'htmlFor()',\n '[attr.data-invalid]': 'formField()?.invalid() ? \"\" : null',\n '[attr.data-valid]': 'formField()?.valid() ? \"\" : null',\n '[attr.data-touched]': 'formField()?.touched() ? \"\" : null',\n '[attr.data-pristine]': 'formField()?.pristine() ? \"\" : null',\n '[attr.data-dirty]': 'formField()?.dirty() ? \"\" : null',\n '[attr.data-pending]': 'formField()?.pending() ? \"\" : null',\n '[attr.data-disabled]': 'formField()?.disabled() ? \"\" : null',\n },\n})\nexport class NgpLabel {\n /**\n * The id of the label. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-label'));\n /**\n * Access the form field that the label is associated with.\n */\n protected readonly formField = injectFormFieldState({ optional: true });\n /**\n * Derive the for attribute value if the label is an HTML label element.\n */\n protected readonly htmlFor = computed(() => this.formField()?.formControl());\n /**\n * Access the element that the label is associated with.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n /**\n * Determine if the label is an HTML label element.\n */\n protected readonly isLabel = this.elementRef.nativeElement instanceof HTMLLabelElement;\n\n constructor() {\n effect(onCleanup => {\n this.formField()?.addLabel(this.id());\n onCleanup(() => this.formField()?.removeLabel(this.id()));\n });\n }\n\n @HostListener('click', ['$event'])\n protected onClick(event: MouseEvent): void {\n // by default a label will perform a click on the associated form control, however\n // this only works if the associated form control is an input element which may not always\n // be the case, so we prevent the default behavior and handle the click event ourselves.\n // This was inspired by the HeadlessUI approach:\n // https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/components/label/label.tsx#L58\n if (this.isLabel) {\n event.preventDefault();\n }\n\n // to find the associated form control we can lookup via the known id\n const targetId = this.htmlFor();\n\n if (!targetId) {\n return;\n }\n\n const target = document.getElementById(targetId);\n\n if (!target) {\n return;\n }\n\n // if the target is disabled then do nothing\n const disabled = target.getAttribute('disabled');\n const ariaDisabled = target.getAttribute('aria-disabled');\n\n if (disabled === '' || disabled === 'true' || ariaDisabled === 'true') {\n return;\n }\n\n // radio buttons, checkboxes and switches should all be clicked immediately as they require state changes\n if (\n (target instanceof HTMLInputElement &&\n (target.type === 'radio' || target.type === 'checkbox')) ||\n target.role === 'radio' ||\n target.role === 'checkbox' ||\n target.role === 'switch'\n ) {\n target.click();\n }\n\n // Move focus to the element, this allows you to start using keyboard shortcuts since the\n // bound element is now focused.\n target.focus({ preventScroll: true });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AACI,MAAM,sBAAsB,GAAG,gBAAgB,CAAe,WAAW,CAAC;AAEjF;;AAEG;MACU,qBAAqB,GAAG,mBAAmB,CAAC,sBAAsB;AAE/E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAe,sBAAsB;AAE5F;;AAEG;AACI,MAAM,cAAc,GAAG,WAAW,CAAC,sBAAsB,CAAC;;ACtBjE;;AAEG;MAeU,cAAc,CAAA;AAUzB,IAAA,WAAA,GAAA;AATA;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC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,EAAA,UAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,sCAAA,EAAA,iBAAA,EAAA,oCAAA,EAAA,mBAAA,EAAA,sCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,iBAAA,EAAA,oCAAA,EAAA,mBAAA,EAAA,sCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAfpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,YAAY,EAAE,WAAW;AACzB,wBAAA,qBAAqB,EAAE,oCAAoC;AAC3D,wBAAA,mBAAmB,EAAE,kCAAkC;AACvD,wBAAA,qBAAqB,EAAE,oCAAoC;AAC3D,wBAAA,sBAAsB,EAAE,qCAAqC;AAC7D,wBAAA,mBAAmB,EAAE,kCAAkC;AACvD,wBAAA,qBAAqB,EAAE,oCAAoC;AAC3D,wBAAA,sBAAsB,EAAE,qCAAqC;AAC9D,qBAAA;AACF,iBAAA;wDA+BW,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;AC3DnC;;AAEG;;;;"}
|
|
@@ -16,6 +16,18 @@ export declare class NgpFormControl {
|
|
|
16
16
|
* Whether the form control is disabled by a parent.
|
|
17
17
|
*/
|
|
18
18
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
|
19
|
+
/**
|
|
20
|
+
* The status of the form control.
|
|
21
|
+
*/
|
|
22
|
+
readonly status: Signal<NgpControlStatus>;
|
|
23
|
+
/**
|
|
24
|
+
* The element reference.
|
|
25
|
+
*/
|
|
26
|
+
private readonly elementRef;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the element supports the disabled attribute.
|
|
29
|
+
*/
|
|
30
|
+
protected readonly supportsDisabledAttribute: boolean;
|
|
19
31
|
/**
|
|
20
32
|
* The state of the form control.
|
|
21
33
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ng-primitives",
|
|
3
3
|
"description": "Angular Primitives is a low-level headless UI component library with a focus on accessibility, customization, and developer experience. ",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.66.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"angular",
|
|
8
8
|
"primitives",
|
|
@@ -71,42 +71,42 @@
|
|
|
71
71
|
"types": "./accordion/index.d.ts",
|
|
72
72
|
"default": "./fesm2022/ng-primitives-accordion.mjs"
|
|
73
73
|
},
|
|
74
|
-
"./autofill": {
|
|
75
|
-
"types": "./autofill/index.d.ts",
|
|
76
|
-
"default": "./fesm2022/ng-primitives-autofill.mjs"
|
|
77
|
-
},
|
|
78
74
|
"./avatar": {
|
|
79
75
|
"types": "./avatar/index.d.ts",
|
|
80
76
|
"default": "./fesm2022/ng-primitives-avatar.mjs"
|
|
81
77
|
},
|
|
82
|
-
"./
|
|
83
|
-
"types": "./
|
|
84
|
-
"default": "./fesm2022/ng-primitives-
|
|
78
|
+
"./autofill": {
|
|
79
|
+
"types": "./autofill/index.d.ts",
|
|
80
|
+
"default": "./fesm2022/ng-primitives-autofill.mjs"
|
|
85
81
|
},
|
|
86
82
|
"./checkbox": {
|
|
87
83
|
"types": "./checkbox/index.d.ts",
|
|
88
84
|
"default": "./fesm2022/ng-primitives-checkbox.mjs"
|
|
89
85
|
},
|
|
90
|
-
"./
|
|
91
|
-
"types": "./
|
|
92
|
-
"default": "./fesm2022/ng-primitives-
|
|
86
|
+
"./button": {
|
|
87
|
+
"types": "./button/index.d.ts",
|
|
88
|
+
"default": "./fesm2022/ng-primitives-button.mjs"
|
|
93
89
|
},
|
|
94
90
|
"./common": {
|
|
95
91
|
"types": "./common/index.d.ts",
|
|
96
92
|
"default": "./fesm2022/ng-primitives-common.mjs"
|
|
97
93
|
},
|
|
94
|
+
"./combobox": {
|
|
95
|
+
"types": "./combobox/index.d.ts",
|
|
96
|
+
"default": "./fesm2022/ng-primitives-combobox.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./date-picker": {
|
|
99
99
|
"types": "./date-picker/index.d.ts",
|
|
100
100
|
"default": "./fesm2022/ng-primitives-date-picker.mjs"
|
|
101
101
|
},
|
|
102
|
-
"./date-time": {
|
|
103
|
-
"types": "./date-time/index.d.ts",
|
|
104
|
-
"default": "./fesm2022/ng-primitives-date-time.mjs"
|
|
105
|
-
},
|
|
106
102
|
"./date-time-luxon": {
|
|
107
103
|
"types": "./date-time-luxon/index.d.ts",
|
|
108
104
|
"default": "./fesm2022/ng-primitives-date-time-luxon.mjs"
|
|
109
105
|
},
|
|
106
|
+
"./date-time": {
|
|
107
|
+
"types": "./date-time/index.d.ts",
|
|
108
|
+
"default": "./fesm2022/ng-primitives-date-time.mjs"
|
|
109
|
+
},
|
|
110
110
|
"./dialog": {
|
|
111
111
|
"types": "./dialog/index.d.ts",
|
|
112
112
|
"default": "./fesm2022/ng-primitives-dialog.mjs"
|
package/schematics/ng-generate/templates/listbox/listbox.__fileSuffix@dasherize__.ts.template
CHANGED
|
@@ -34,6 +34,7 @@ import { ChangeFn, provideValueAccessor, TouchedFn } from 'ng-primitives/utils';
|
|
|
34
34
|
[ngpListboxMode]="mode()"
|
|
35
35
|
[ngpListboxDisabled]="disabled()"
|
|
36
36
|
[ngpListboxCompareWith]="compareWith()"
|
|
37
|
+
(ngpListboxValueChange)="onListboxValueChange($event)"
|
|
37
38
|
ngpPopover
|
|
38
39
|
ngpListbox
|
|
39
40
|
>
|
|
@@ -139,4 +140,9 @@ export class Listbox<%= componentSuffix %> implements ControlValueAccessor {
|
|
|
139
140
|
setDisabledState(isDisabled: boolean): void {
|
|
140
141
|
this.state()?.disabled.set(isDisabled);
|
|
141
142
|
}
|
|
143
|
+
|
|
144
|
+
onListboxValueChange(value: string[]): void {
|
|
145
|
+
this.value.set(value);
|
|
146
|
+
if (this.onChange) this.onChange(value);
|
|
147
|
+
}
|
|
142
148
|
}
|