ngx-dynamic-entity 2.1.0 → 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 +2003 -572
- 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 +312 -184
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);
|