ngx-dynamic-entity 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/fesm2022/ngx-dynamic-entity.mjs +1553 -9
- package/fesm2022/ngx-dynamic-entity.mjs.map +1 -1
- package/package.json +2 -2
- package/styles.css +210 -0
- package/types/ngx-dynamic-entity.d.ts +268 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-dynamic-entity",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Angular standalone UI library for rendering dynamic entity forms.",
|
|
5
5
|
"//typings": "Local workspace resolution only: ng-packagr 21 writes types/ngx-dynamic-entity.d.ts into dist/package.json. Do NOT add a 'main' field here — ng-packagr does not generate one, so it would be copied verbatim and resolve wrongly in the published package.",
|
|
6
6
|
"typings": "types/ngx-dynamic-entity.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
9
9
|
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
10
10
|
"@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
11
|
-
"@dynamic-entity/core": "^2.
|
|
11
|
+
"@dynamic-entity/core": "^2.2.0",
|
|
12
12
|
"rxjs": "^7.0.0"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
package/styles.css
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
--ngx-color-info: var(--ngx-color-accent);
|
|
44
44
|
--ngx-color-info-soft: var(--ngx-color-accent-soft);
|
|
45
45
|
--ngx-color-disabled-bg: #eef1f4;
|
|
46
|
+
--ngx-color-rating: #a8660b;
|
|
46
47
|
|
|
47
48
|
/* Metrics */
|
|
48
49
|
--ngx-radius: 8px;
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
--ngx-color-warning-soft: #2f2517;
|
|
98
99
|
--ngx-color-success: #6fc9a8;
|
|
99
100
|
--ngx-color-disabled-bg: #1c2631;
|
|
101
|
+
--ngx-color-rating: #f0c05a;
|
|
100
102
|
--ngx-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -657,6 +659,214 @@ textarea.ngx-field__input:focus {
|
|
|
657
659
|
margin: 0;
|
|
658
660
|
}
|
|
659
661
|
|
|
662
|
+
/* Text for assistive technology only: announced, not drawn. */
|
|
663
|
+
.ngx-field__sr-only {
|
|
664
|
+
position: absolute;
|
|
665
|
+
width: 1px;
|
|
666
|
+
height: 1px;
|
|
667
|
+
padding: 0;
|
|
668
|
+
margin: -1px;
|
|
669
|
+
overflow: hidden;
|
|
670
|
+
clip: rect(0 0 0 0);
|
|
671
|
+
white-space: nowrap;
|
|
672
|
+
border: 0;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.ngx-field__link {
|
|
676
|
+
color: var(--ngx-color-accent);
|
|
677
|
+
overflow-wrap: anywhere;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/* Slider */
|
|
681
|
+
.ngx-field__slider-wrap,
|
|
682
|
+
.ngx-field__color-wrap {
|
|
683
|
+
display: flex;
|
|
684
|
+
align-items: center;
|
|
685
|
+
gap: 10px;
|
|
686
|
+
min-height: var(--ngx-control-height);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.ngx-field__slider {
|
|
690
|
+
flex: 1;
|
|
691
|
+
min-width: 0;
|
|
692
|
+
accent-color: var(--ngx-color-accent);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/* An untouched slider still draws a thumb; dimming it says the position is not a value. */
|
|
696
|
+
.ngx-field__slider--unset {
|
|
697
|
+
opacity: 0.55;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.ngx-field__slider-value,
|
|
701
|
+
.ngx-field__color-code {
|
|
702
|
+
min-width: 4ch;
|
|
703
|
+
font-variant-numeric: tabular-nums;
|
|
704
|
+
color: var(--ngx-color-muted);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/* Colour */
|
|
708
|
+
.ngx-field__color {
|
|
709
|
+
inline-size: 44px;
|
|
710
|
+
block-size: 34px;
|
|
711
|
+
padding: 2px;
|
|
712
|
+
border: 1px solid var(--ngx-color-border);
|
|
713
|
+
border-radius: var(--ngx-radius-sm);
|
|
714
|
+
background: var(--ngx-color-surface);
|
|
715
|
+
cursor: pointer;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.ngx-field__color:focus-visible {
|
|
719
|
+
outline: var(--ngx-focus-width) solid var(--ngx-color-accent);
|
|
720
|
+
outline-offset: 2px;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.ngx-field__color-value {
|
|
724
|
+
display: inline-flex;
|
|
725
|
+
align-items: center;
|
|
726
|
+
gap: 8px;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.ngx-field__swatch {
|
|
730
|
+
inline-size: 18px;
|
|
731
|
+
block-size: 18px;
|
|
732
|
+
border-radius: 4px;
|
|
733
|
+
border: 1px solid var(--ngx-color-border-strong);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/* Rating */
|
|
737
|
+
.ngx-field__rating {
|
|
738
|
+
display: flex;
|
|
739
|
+
align-items: center;
|
|
740
|
+
gap: 2px;
|
|
741
|
+
min-height: var(--ngx-control-height);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/* The radio stays in the page for the keyboard and screen readers; the star is what is seen. */
|
|
745
|
+
.ngx-field__star {
|
|
746
|
+
position: relative;
|
|
747
|
+
display: inline-flex;
|
|
748
|
+
align-items: center;
|
|
749
|
+
justify-content: center;
|
|
750
|
+
min-inline-size: 32px;
|
|
751
|
+
min-block-size: 32px;
|
|
752
|
+
cursor: pointer;
|
|
753
|
+
border-radius: var(--ngx-radius-sm);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.ngx-field__star-input {
|
|
757
|
+
position: absolute;
|
|
758
|
+
inset: 0;
|
|
759
|
+
margin: 0;
|
|
760
|
+
opacity: 0;
|
|
761
|
+
cursor: pointer;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.ngx-field__star:has(.ngx-field__star-input:focus-visible) {
|
|
765
|
+
box-shadow: var(--ngx-ring);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.ngx-field__star-glyph {
|
|
769
|
+
font-size: 22px;
|
|
770
|
+
line-height: 1;
|
|
771
|
+
color: var(--ngx-color-muted);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.ngx-field__star--on .ngx-field__star-glyph,
|
|
775
|
+
.ngx-field__star-glyph--on {
|
|
776
|
+
color: var(--ngx-color-rating);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
.ngx-field__rating .ngx-field__remove-btn {
|
|
780
|
+
margin-inline-start: 8px;
|
|
781
|
+
padding: 2px 8px;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.ngx-field__stars {
|
|
785
|
+
margin-inline-end: 6px;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/* Tags */
|
|
789
|
+
.ngx-field__tags {
|
|
790
|
+
display: flex;
|
|
791
|
+
flex-wrap: wrap;
|
|
792
|
+
align-items: center;
|
|
793
|
+
gap: 6px;
|
|
794
|
+
min-height: var(--ngx-control-height);
|
|
795
|
+
padding: 4px 8px;
|
|
796
|
+
border: 1px solid var(--ngx-color-border);
|
|
797
|
+
border-radius: var(--ngx-radius);
|
|
798
|
+
background: var(--ngx-color-surface);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.ngx-field__tags:focus-within {
|
|
802
|
+
border-color: var(--ngx-color-accent);
|
|
803
|
+
box-shadow: var(--ngx-ring);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.ngx-field--invalid .ngx-field__tags {
|
|
807
|
+
border-color: var(--ngx-color-error);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.ngx-field__tags--readonly {
|
|
811
|
+
min-height: 0;
|
|
812
|
+
padding: 0;
|
|
813
|
+
border: 0;
|
|
814
|
+
background: none;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.ngx-field__tags--disabled {
|
|
818
|
+
background: var(--ngx-color-disabled-bg);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.ngx-field__tag {
|
|
822
|
+
display: inline-flex;
|
|
823
|
+
align-items: center;
|
|
824
|
+
gap: 4px;
|
|
825
|
+
padding: 2px 4px 2px 10px;
|
|
826
|
+
border-radius: var(--ngx-radius-pill);
|
|
827
|
+
background: var(--ngx-color-accent-soft);
|
|
828
|
+
color: var(--ngx-color-text);
|
|
829
|
+
font-size: var(--ngx-hint-size);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.ngx-field__tags--readonly .ngx-field__tag {
|
|
833
|
+
padding-inline-end: 10px;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.ngx-field__tag-remove {
|
|
837
|
+
appearance: none;
|
|
838
|
+
border: 0;
|
|
839
|
+
background: none;
|
|
840
|
+
color: var(--ngx-color-muted);
|
|
841
|
+
font: inherit;
|
|
842
|
+
line-height: 1;
|
|
843
|
+
min-inline-size: 24px;
|
|
844
|
+
min-block-size: 24px;
|
|
845
|
+
border-radius: var(--ngx-radius-pill);
|
|
846
|
+
cursor: pointer;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.ngx-field__tag-remove:hover {
|
|
850
|
+
color: var(--ngx-color-accent);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.ngx-field__tag-remove:focus-visible {
|
|
854
|
+
outline: var(--ngx-focus-width) solid var(--ngx-color-accent);
|
|
855
|
+
outline-offset: 1px;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.ngx-field__tags-input {
|
|
859
|
+
flex: 1;
|
|
860
|
+
min-inline-size: 8ch;
|
|
861
|
+
border: 0;
|
|
862
|
+
outline: none;
|
|
863
|
+
background: transparent;
|
|
864
|
+
color: inherit;
|
|
865
|
+
font: inherit;
|
|
866
|
+
font-size: var(--ngx-font-size);
|
|
867
|
+
padding: 4px 2px;
|
|
868
|
+
}
|
|
869
|
+
|
|
660
870
|
/* Checkbox */
|
|
661
871
|
.ngx-field input[type='checkbox'] {
|
|
662
872
|
accent-color: var(--ngx-color-accent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Type, EnvironmentProviders, WritableSignal, OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Provider } from '@angular/core';
|
|
3
|
-
import { ReferenceOption, LocalizedText, EntityFormConfig, FormRule, ImportLookups, MappingPlan, ImportResult, TemplateSpec, SheetData, CommonModuleEntry, EntityReferenceLoader, LookupListSource, RecordMigration, FileUploadHandler, FieldValidators, NestedFieldConfig, ReferenceLoaderContext, DropdownOption, LookupListValue, NestedTabConfig, RuleEvaluationResult, FieldScopeEntry, EvaluateFormRulesOptions, ImportColumn, UnsupportedColumn, ImportRowError } from '@dynamic-entity/core';
|
|
3
|
+
import { ReferenceOption, LocalizedText, EntityFormConfig, FormRule, ImportLookups, MappingPlan, ImportResult, TemplateSpec, SheetData, CommonModuleEntry, EntityReferenceLoader, LookupListSource, RecordMigration, FileUploadHandler, FieldValidators, NestedFieldConfig, ReferenceLoaderContext, DropdownOption, LookupListValue, NestedTabConfig, RuleEvaluationResult, FieldScopeEntry, EvaluateFormRulesOptions, ImportColumn, UnsupportedColumn, ImportRowError, SliderBounds } from '@dynamic-entity/core';
|
|
4
4
|
export { AutoPatchConfig, CommonModuleEntry, ComponentClass, DropdownOption, EntityFormConfig, EntityPermissions, EntityReferenceConfig, EntityReferenceLoader, FieldTableConfig, FieldValidators, FileRef, FormRule, LocalizedText, NestedFieldConfig, NestedTabConfig, PatchOnTrueMapping, RbacContext, ReferenceLoaderContext, ReferenceOption, RichFieldType, RuleAction, RuleCondition, RuleEvaluationResult, VersionedRecord, formatDisplayValue, normalizeConfig, normalizeOption, resolveLabel, resolveOptionLabel, resolveOptionValue, valuesMatch } from '@dynamic-entity/core';
|
|
5
5
|
import { ValidatorFn, AsyncValidatorFn, AbstractControl, ValidationErrors, FormGroup, FormArray } from '@angular/forms';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
@@ -83,6 +83,10 @@ declare const DEFAULT_UI_TEXT: {
|
|
|
83
83
|
noImage: string;
|
|
84
84
|
uploadImage: string;
|
|
85
85
|
changeImage: string;
|
|
86
|
+
ratingValue: string;
|
|
87
|
+
clearValue: string;
|
|
88
|
+
addTagPlaceholder: string;
|
|
89
|
+
removeTag: string;
|
|
86
90
|
month: string;
|
|
87
91
|
year: string;
|
|
88
92
|
write: string;
|
|
@@ -616,7 +620,7 @@ declare const provideNgxDynamicEntity: (config?: NgxDynamicEntityConfig) => Envi
|
|
|
616
620
|
*
|
|
617
621
|
* `FieldRegistryService` imports no components. Whatever you register here is what gets
|
|
618
622
|
* bundled, so an app that only uses text/number/dropdown pays for three components and
|
|
619
|
-
* their imports, not twenty-
|
|
623
|
+
* their imports, not twenty-seven.
|
|
620
624
|
*
|
|
621
625
|
* ```ts
|
|
622
626
|
* // Everything (convenient; bundles all built-ins):
|
|
@@ -632,7 +636,7 @@ declare const provideNgxDynamicEntity: (config?: NgxDynamicEntityConfig) => Envi
|
|
|
632
636
|
declare function builtInFieldTypes(): Record<string, Type<any>>;
|
|
633
637
|
/** Register a specific set of field types. Only the components you name are bundled. */
|
|
634
638
|
declare function provideFieldTypes(types: Record<string, Type<any>>): EnvironmentProviders;
|
|
635
|
-
/** Register all
|
|
639
|
+
/** Register all 27 built-in field type keys. Convenience for apps that use most of them. */
|
|
636
640
|
declare function provideBuiltInFieldTypes(): EnvironmentProviders;
|
|
637
641
|
|
|
638
642
|
/**
|
|
@@ -678,6 +682,10 @@ declare class HookRegistryService {
|
|
|
678
682
|
static ɵprov: i0.ɵɵInjectableDeclaration<HookRegistryService>;
|
|
679
683
|
}
|
|
680
684
|
|
|
685
|
+
/** The built-in web address check. The rule itself is in core, so an import applies the same one. */
|
|
686
|
+
declare const urlValidator: ValidatorFn;
|
|
687
|
+
/** The built-in phone number check. The rule itself is in core, so an import applies the same one. */
|
|
688
|
+
declare const phoneValidator: ValidatorFn;
|
|
681
689
|
/**
|
|
682
690
|
* ValidatorRegistryService — resolves validator configs / key strings to Angular ValidatorFns.
|
|
683
691
|
*/
|
|
@@ -3257,5 +3265,261 @@ declare class FileFieldComponent {
|
|
|
3257
3265
|
static ɵcmp: i0.ɵɵComponentDeclaration<FileFieldComponent, "ngx-file-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
3258
3266
|
}
|
|
3259
3267
|
|
|
3260
|
-
|
|
3268
|
+
/**
|
|
3269
|
+
* URL field: a `type="url"` input, and a link when read-only.
|
|
3270
|
+
*
|
|
3271
|
+
* The read-only link is rendered only for a value that passes `isValidUrl`, meaning an http or
|
|
3272
|
+
* https address. A record can hold anything, including `javascript:`, and a field whose job is
|
|
3273
|
+
* to show an address must not turn a stored script into something to click. Anything else is
|
|
3274
|
+
* shown as plain text.
|
|
3275
|
+
*/
|
|
3276
|
+
declare class UrlFieldComponent {
|
|
3277
|
+
/**
|
|
3278
|
+
* Unique to this component instance: an `array` renders the same field once per row, and a
|
|
3279
|
+
* DOM id may not repeat. See `field-dom-id.ts`.
|
|
3280
|
+
*/
|
|
3281
|
+
private readonly instanceId;
|
|
3282
|
+
protected domId(suffix?: string): string;
|
|
3283
|
+
/** Overridable via MASKED_PLACEHOLDER; the default is the historic literal. */
|
|
3284
|
+
protected readonly maskedText: string;
|
|
3285
|
+
private readonly messages;
|
|
3286
|
+
field: NestedFieldConfig;
|
|
3287
|
+
control: AbstractControl;
|
|
3288
|
+
language: string;
|
|
3289
|
+
readonly: boolean;
|
|
3290
|
+
masked: boolean;
|
|
3291
|
+
get label(): string;
|
|
3292
|
+
get placeholder(): string;
|
|
3293
|
+
/** Author help text, shown under the control and named by `aria-describedby`. */
|
|
3294
|
+
get hint(): string;
|
|
3295
|
+
/** Whether the stored value is an http(s) address, and so safe to render as a link. */
|
|
3296
|
+
get linkable(): boolean;
|
|
3297
|
+
/** The ids of whatever is describing this control right now. */
|
|
3298
|
+
protected describedBy(): string | null;
|
|
3299
|
+
get errorMessage(): string;
|
|
3300
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UrlFieldComponent, never>;
|
|
3301
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UrlFieldComponent, "ngx-url-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
/**
|
|
3305
|
+
* Phone field: a `type="tel"` input, and a `tel:` link when read-only.
|
|
3306
|
+
*
|
|
3307
|
+
* The value is stored exactly as typed, spaces and brackets included. The number is shown back
|
|
3308
|
+
* to people far more often than it is dialled, and `+44 20 7946 0958` is easier to read than
|
|
3309
|
+
* its digits run together. Only the link target is stripped down to what a dialler needs.
|
|
3310
|
+
*/
|
|
3311
|
+
declare class PhoneFieldComponent {
|
|
3312
|
+
/**
|
|
3313
|
+
* Unique to this component instance: an `array` renders the same field once per row, and a
|
|
3314
|
+
* DOM id may not repeat. See `field-dom-id.ts`.
|
|
3315
|
+
*/
|
|
3316
|
+
private readonly instanceId;
|
|
3317
|
+
protected domId(suffix?: string): string;
|
|
3318
|
+
/** Overridable via MASKED_PLACEHOLDER; the default is the historic literal. */
|
|
3319
|
+
protected readonly maskedText: string;
|
|
3320
|
+
private readonly messages;
|
|
3321
|
+
field: NestedFieldConfig;
|
|
3322
|
+
control: AbstractControl;
|
|
3323
|
+
language: string;
|
|
3324
|
+
readonly: boolean;
|
|
3325
|
+
masked: boolean;
|
|
3326
|
+
get label(): string;
|
|
3327
|
+
get placeholder(): string;
|
|
3328
|
+
/** Author help text, shown under the control and named by `aria-describedby`. */
|
|
3329
|
+
get hint(): string;
|
|
3330
|
+
/** `tel:` plus the digits and a leading `+`, or null for a value that is not a phone number. */
|
|
3331
|
+
get dialHref(): string | null;
|
|
3332
|
+
/** The ids of whatever is describing this control right now. */
|
|
3333
|
+
protected describedBy(): string | null;
|
|
3334
|
+
get errorMessage(): string;
|
|
3335
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneFieldComponent, never>;
|
|
3336
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PhoneFieldComponent, "ngx-phone-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
/**
|
|
3340
|
+
* Slider field: a range input over `validators.min`–`validators.max` in steps of `field.step`.
|
|
3341
|
+
*
|
|
3342
|
+
* A range input cannot show that it is empty. With no value it puts the thumb at the midpoint,
|
|
3343
|
+
* which looks exactly like a chosen value. The readout beside it is therefore the value itself,
|
|
3344
|
+
* and shows a dash until someone moves the thumb. Without it, a required slider nobody touched
|
|
3345
|
+
* would look answered and still fail at save.
|
|
3346
|
+
*/
|
|
3347
|
+
declare class SliderFieldComponent {
|
|
3348
|
+
/**
|
|
3349
|
+
* Unique to this component instance: an `array` renders the same field once per row, and a
|
|
3350
|
+
* DOM id may not repeat. See `field-dom-id.ts`.
|
|
3351
|
+
*/
|
|
3352
|
+
private readonly instanceId;
|
|
3353
|
+
protected domId(suffix?: string): string;
|
|
3354
|
+
/** Overridable via MASKED_PLACEHOLDER; the default is the historic literal. */
|
|
3355
|
+
protected readonly maskedText: string;
|
|
3356
|
+
private readonly messages;
|
|
3357
|
+
field: NestedFieldConfig;
|
|
3358
|
+
control: AbstractControl;
|
|
3359
|
+
language: string;
|
|
3360
|
+
readonly: boolean;
|
|
3361
|
+
masked: boolean;
|
|
3362
|
+
get label(): string;
|
|
3363
|
+
/** Author help text, shown under the control and named by `aria-describedby`. */
|
|
3364
|
+
get hint(): string;
|
|
3365
|
+
get bounds(): SliderBounds;
|
|
3366
|
+
/** Whether the control holds a number. The thumb's position cannot say. */
|
|
3367
|
+
get hasValue(): boolean;
|
|
3368
|
+
get display(): string;
|
|
3369
|
+
/** The ids of whatever is describing this control right now. */
|
|
3370
|
+
protected describedBy(): string | null;
|
|
3371
|
+
get errorMessage(): string;
|
|
3372
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SliderFieldComponent, never>;
|
|
3373
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SliderFieldComponent, "ngx-slider-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3376
|
+
/**
|
|
3377
|
+
* Rating field: 1 to `validators.max` stars (default 5), stored as a number.
|
|
3378
|
+
*
|
|
3379
|
+
* Built from native radio inputs in a fieldset, not clickable spans. That gives it the
|
|
3380
|
+
* behaviour a radio group already has: arrow keys move the choice, Tab enters and leaves the
|
|
3381
|
+
* group once, and a screen reader announces "3 of 5, radio button, 3 of 5". Each star's
|
|
3382
|
+
* label is text a host can translate (`ratingValue`), because a star glyph read aloud is
|
|
3383
|
+
* "black star".
|
|
3384
|
+
*/
|
|
3385
|
+
declare class RatingFieldComponent implements OnDestroy {
|
|
3386
|
+
/**
|
|
3387
|
+
* Unique to this component instance: an `array` renders the same field once per row, and a
|
|
3388
|
+
* DOM id may not repeat. See `field-dom-id.ts`.
|
|
3389
|
+
*/
|
|
3390
|
+
private readonly instanceId;
|
|
3391
|
+
protected domId(suffix?: string): string;
|
|
3392
|
+
/** Overridable via MASKED_PLACEHOLDER; the default is the historic literal. */
|
|
3393
|
+
protected readonly maskedText: string;
|
|
3394
|
+
private readonly messages;
|
|
3395
|
+
private readonly cdr;
|
|
3396
|
+
protected readonly ui: UiTextService;
|
|
3397
|
+
field: NestedFieldConfig;
|
|
3398
|
+
language: string;
|
|
3399
|
+
readonly: boolean;
|
|
3400
|
+
masked: boolean;
|
|
3401
|
+
private _control;
|
|
3402
|
+
private _controlSub?;
|
|
3403
|
+
/**
|
|
3404
|
+
* Subscribed because the radios are not bound through a form directive. A value patched in
|
|
3405
|
+
* from outside (a reset, an autoPatch) would otherwise leave an OnPush view showing the old
|
|
3406
|
+
* stars.
|
|
3407
|
+
*/
|
|
3408
|
+
set control(value: AbstractControl);
|
|
3409
|
+
get control(): AbstractControl;
|
|
3410
|
+
ngOnDestroy(): void;
|
|
3411
|
+
get label(): string;
|
|
3412
|
+
/** Author help text, shown under the control and named by `aria-describedby`. */
|
|
3413
|
+
get hint(): string;
|
|
3414
|
+
get scale(): number;
|
|
3415
|
+
get stars(): number[];
|
|
3416
|
+
/** The stored rating, or null when there is none or it is not a star on this scale. */
|
|
3417
|
+
get current(): number | null;
|
|
3418
|
+
select(star: number): void;
|
|
3419
|
+
clear(): void;
|
|
3420
|
+
/** The ids of whatever is describing this control right now. */
|
|
3421
|
+
protected describedBy(): string | null;
|
|
3422
|
+
get errorMessage(): string;
|
|
3423
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RatingFieldComponent, never>;
|
|
3424
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RatingFieldComponent, "ngx-rating-field", never, { "field": { "alias": "field"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3427
|
+
/**
|
|
3428
|
+
* Colour field: a native colour picker, storing `#rrggbb`.
|
|
3429
|
+
*
|
|
3430
|
+
* Like a range input, a colour input has no empty state and shows black. The code beside it is
|
|
3431
|
+
* therefore the real value, a dash until a colour is chosen, and a clear button sets the value
|
|
3432
|
+
* back to nothing. Without them, "no colour" and "black" would look the same.
|
|
3433
|
+
*
|
|
3434
|
+
* Only a value that passes `normalizeHexColor` reaches a `style` binding. A record can hold
|
|
3435
|
+
* any string, and a colour swatch is no place to interpret one.
|
|
3436
|
+
*/
|
|
3437
|
+
declare class ColorFieldComponent {
|
|
3438
|
+
/**
|
|
3439
|
+
* Unique to this component instance: an `array` renders the same field once per row, and a
|
|
3440
|
+
* DOM id may not repeat. See `field-dom-id.ts`.
|
|
3441
|
+
*/
|
|
3442
|
+
private readonly instanceId;
|
|
3443
|
+
protected domId(suffix?: string): string;
|
|
3444
|
+
/** Overridable via MASKED_PLACEHOLDER; the default is the historic literal. */
|
|
3445
|
+
protected readonly maskedText: string;
|
|
3446
|
+
private readonly messages;
|
|
3447
|
+
protected readonly ui: UiTextService;
|
|
3448
|
+
field: NestedFieldConfig;
|
|
3449
|
+
control: AbstractControl;
|
|
3450
|
+
language: string;
|
|
3451
|
+
readonly: boolean;
|
|
3452
|
+
masked: boolean;
|
|
3453
|
+
get label(): string;
|
|
3454
|
+
/** Author help text, shown under the control and named by `aria-describedby`. */
|
|
3455
|
+
get hint(): string;
|
|
3456
|
+
/** The stored colour as `#rrggbb`, or null when there is none or it is not a colour. */
|
|
3457
|
+
get hex(): string | null;
|
|
3458
|
+
clear(): void;
|
|
3459
|
+
/** The ids of whatever is describing this control right now. */
|
|
3460
|
+
protected describedBy(): string | null;
|
|
3461
|
+
get errorMessage(): string;
|
|
3462
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorFieldComponent, never>;
|
|
3463
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColorFieldComponent, "ngx-color-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
/**
|
|
3467
|
+
* Tags field: free text entered as a list of chips, stored as `string[]`.
|
|
3468
|
+
*
|
|
3469
|
+
* Unlike `multiSelect`, the values are whatever the user types, so there is no option list to
|
|
3470
|
+
* keep in step. Enter or a comma ends a tag, Backspace in an empty box removes the last one,
|
|
3471
|
+
* and pasted text is split on commas, semicolons and line breaks. Leaving the box commits
|
|
3472
|
+
* what is in it, so a tag someone typed and then tabbed away from is not silently lost.
|
|
3473
|
+
*
|
|
3474
|
+
* The control holds the array. The text box is only a draft, which is why it is not bound
|
|
3475
|
+
* with a form directive.
|
|
3476
|
+
*/
|
|
3477
|
+
declare class TagsFieldComponent implements OnDestroy {
|
|
3478
|
+
/**
|
|
3479
|
+
* Unique to this component instance: an `array` renders the same field once per row, and a
|
|
3480
|
+
* DOM id may not repeat. See `field-dom-id.ts`.
|
|
3481
|
+
*/
|
|
3482
|
+
private readonly instanceId;
|
|
3483
|
+
protected domId(suffix?: string): string;
|
|
3484
|
+
/** Overridable via MASKED_PLACEHOLDER; the default is the historic literal. */
|
|
3485
|
+
protected readonly maskedText: string;
|
|
3486
|
+
private readonly messages;
|
|
3487
|
+
private readonly cdr;
|
|
3488
|
+
protected readonly ui: UiTextService;
|
|
3489
|
+
field: NestedFieldConfig;
|
|
3490
|
+
language: string;
|
|
3491
|
+
readonly: boolean;
|
|
3492
|
+
masked: boolean;
|
|
3493
|
+
private _control;
|
|
3494
|
+
private _controlSub?;
|
|
3495
|
+
/** Subscribed for the same reason as the rating field: nothing here is a form directive. */
|
|
3496
|
+
set control(value: AbstractControl);
|
|
3497
|
+
get control(): AbstractControl;
|
|
3498
|
+
ngOnDestroy(): void;
|
|
3499
|
+
get label(): string;
|
|
3500
|
+
get placeholder(): string;
|
|
3501
|
+
/** Author help text, shown under the control and named by `aria-describedby`. */
|
|
3502
|
+
get hint(): string;
|
|
3503
|
+
/** The stored tags, read leniently. A record may hold a single string or anything else. */
|
|
3504
|
+
get tags(): string[];
|
|
3505
|
+
onKeydown(event: KeyboardEvent, entry: HTMLInputElement): void;
|
|
3506
|
+
onPaste(event: ClipboardEvent, entry: HTMLInputElement): void;
|
|
3507
|
+
onBlur(entry: HTMLInputElement): void;
|
|
3508
|
+
/** Add whatever is in the draft box, split on separators, and empty it. */
|
|
3509
|
+
commit(entry: HTMLInputElement): void;
|
|
3510
|
+
private add;
|
|
3511
|
+
remove(tag: string): void;
|
|
3512
|
+
/**
|
|
3513
|
+
* An empty list is stored as `[]`, not `null`. `required` treats both as empty, and `[]`
|
|
3514
|
+
* stays the same shape as every other value this field holds.
|
|
3515
|
+
*/
|
|
3516
|
+
private write;
|
|
3517
|
+
/** The ids of whatever is describing this control right now. */
|
|
3518
|
+
protected describedBy(): string | null;
|
|
3519
|
+
get errorMessage(): string;
|
|
3520
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TagsFieldComponent, never>;
|
|
3521
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TagsFieldComponent, "ngx-tags-field", never, { "field": { "alias": "field"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
export { ASYNC_VALIDATOR_REGISTRY, ArrayFieldComponent, BooleanFieldComponent, COMMON_MODULES_REGISTRY, CONFIG_SOURCE, CascadeDataService, CheckboxFieldComponent, ColorFieldComponent, ConfigSourceService, CurrencyFieldComponent, DEFAULT_UI_TEXT, DEFAULT_VALIDATION_MESSAGES, DateFieldComponent, DateTimeFieldComponent, DropdownFieldComponent, DynamicFieldComponent, DynamicFormComponent, DynamicRecordFormComponent, ENTITY_REF_CACHE_STORE, ENTITY_REF_REGISTRY, EmailFieldComponent, EntityImportComponent, EntityRefFieldComponent, EntityRefRegistryService, EntityRefSelectionService, EntityReferenceService, FIELD_TYPE_REGISTRY, FIELD_TYPE_SETS, FieldRegistryService, FileFieldComponent, GroupFieldComponent, HOOK_REGISTRY, HookRegistryService, HttpImportTransport, IMPORT_TRANSPORT, ImageFieldComponent, ImportErrorsComponent, ImportMapperComponent, ImportPreviewComponent, ImportTemplateComponent, InMemoryEntityRefCacheStore, LOOKUP_REGISTRY, LocalImportTransport, LookupRegistryService, MARKDOWN_RENDERER, MASKED_PLACEHOLDER, MASKED_ROLES, MarkdownFieldComponent, MonthYearFieldComponent, MultiSelectFieldComponent, NumberFieldComponent, PasswordFieldComponent, PhoneFieldComponent, RECORD_MIGRATIONS, RadioFieldComponent, RatingFieldComponent, RbacService, RulesEvaluationService, SHEET_PARSER, SYSTEM_DEFAULT_CAN_EDIT, SliderFieldComponent, TagsFieldComponent, TextFieldComponent, TextareaFieldComponent, TimeFieldComponent, UI_TEXT, UPLOAD_HANDLER, UiTextService, UrlFieldComponent, VALIDATION_MESSAGES, VALIDATOR_REGISTRY, ValidationMessagesService, ValidatorRegistryService, builtInFieldTypes, defaultSheetParser, fieldDescribedBy, fieldDomId, nextFieldInstanceId, phoneValidator, provideBuiltInFieldTypes, provideFieldTypes, provideHttpImportTransport, provideNgxDynamicEntity, refreshChoiceOptions, resolveUiText, urlValidator };
|
|
3261
3525
|
export type { ChoiceOptionHost, ConfigSourceHandler, DynamicFieldComponentContract, EntityRefCacheStore, EntityRefSelection, HookFn, HttpImportTransportOptions, ImportContext, ImportPreview, ImportTransport, InvalidField, MessageOrderEntry, NgxDynamicEntityConfig, RuleSyncContext, SheetParser, TemplateFormat, UiTextKey, UiTextOverrides, UiTextOverridesFor, UiTextParams, UiTextResolver, UiTextResolverFor, UiTextValue, ValidationMessage };
|