Merge branch 'next/minor' of github.com:Start9Labs/start-os into next/major

This commit is contained in:
Matt Hill
2024-12-02 16:50:37 -07:00
42 changed files with 605 additions and 194 deletions

View File

@@ -2,7 +2,10 @@ import { inject } from '@angular/core'
import { FormControlComponent } from './form-control/form-control.component'
import { IST } from '@start9labs/start-sdk'
export abstract class Control<Spec extends Exclude<IST.ValueSpec, IST.ValueSpecHidden>, Value> {
export abstract class Control<
Spec extends Exclude<IST.ValueSpec, IST.ValueSpecHidden>,
Value,
> {
private readonly control: FormControlComponent<Spec, Value> =
inject(FormControlComponent)

View File

@@ -37,4 +37,4 @@
Accept
</button>
</div>
</ng-template>
</ng-template>

View File

@@ -12,7 +12,12 @@ export const FORM_CONTROL_PROVIDERS: Provider[] = [
{
provide: TUI_VALIDATION_ERRORS,
deps: [forwardRef(() => FormControlComponent)],
useFactory: (control: FormControlComponent<Exclude<IST.ValueSpec, IST.ValueSpecHidden>, string>) => ({
useFactory: (
control: FormControlComponent<
Exclude<IST.ValueSpec, IST.ValueSpecHidden>,
string
>,
) => ({
required: 'Required',
pattern: ({ requiredPattern }: ValidatorsPatternError) =>
('patterns' in control.spec &&