@ngstarter-ui/components 22.2.4 → 22.2.5
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/ai/component-registry.json +75 -8
- package/content-editor/BLOCK_FORMAT.md +38 -0
- package/data-view/API.md +262 -0
- package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs → ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs.map → ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs.map → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs.map → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs.map → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs.map → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs} +5 -5
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs.map → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs} +8 -5
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs → ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs} +4 -4
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs.map → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs.map → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs} +93 -41
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs.map → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs → ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs.map → ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +46 -1
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-menu.mjs +17 -4
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_common.scss +2 -1
- package/styles/_tokens.scss +32 -1
- package/styles/themes/default.scss +1 -1
- package/types/ngstarter-ui-components-content-editor.d.ts +6 -1
- package/types/ngstarter-ui-components-core.d.ts +4 -1
- package/types/ngstarter-ui-components-data-view.d.ts +204 -11
- package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
- package/types/ngstarter-ui-components-menu.d.ts +5 -1
- package/types/ngstarter-ui-components-sort.d.ts +1 -0
- package/types/ngstarter-ui-components-table.d.ts +2 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, LOCALE_ID, Injectable, input, output, signal, computed, ChangeDetectionStrategy, Component, numberAttribute, effect, ViewContainerRef, viewChild, contentChild, ViewEncapsulation, forwardRef, Directive, booleanAttribute, ElementRef, untracked } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, LOCALE_ID, Injectable, input, output, signal, computed, ChangeDetectionStrategy, Component, numberAttribute, effect, ViewContainerRef, viewChild, contentChild, ViewEncapsulation, forwardRef, Directive, booleanAttribute, ElementRef, untracked, model } from '@angular/core';
|
|
3
3
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
4
4
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
@@ -841,12 +841,18 @@ class StartDate {
|
|
|
841
841
|
_dateAdapter = inject(DateAdapter);
|
|
842
842
|
_rangeInput;
|
|
843
843
|
_onInput(value) {
|
|
844
|
-
|
|
844
|
+
let date;
|
|
845
|
+
try {
|
|
846
|
+
date = this._dateAdapter.parse(value, null);
|
|
847
|
+
}
|
|
848
|
+
catch {
|
|
849
|
+
date = this._dateAdapter.invalid();
|
|
850
|
+
}
|
|
845
851
|
this._rangeInput._startUpdated(date);
|
|
846
852
|
this._rangeInput._inputUpdated();
|
|
847
853
|
}
|
|
848
854
|
_formatValue(value) {
|
|
849
|
-
this._elementRef.nativeElement.value = value ? this._dateAdapter.format(value, { year: 'numeric', month: '2-digit', day: '2-digit' }) : '';
|
|
855
|
+
this._elementRef.nativeElement.value = value && this._dateAdapter.isValid(value) ? this._dateAdapter.format(value, { year: 'numeric', month: '2-digit', day: '2-digit' }) : '';
|
|
850
856
|
this._rangeInput._inputUpdated();
|
|
851
857
|
}
|
|
852
858
|
_onFocus() {
|
|
@@ -881,12 +887,18 @@ class EndDate {
|
|
|
881
887
|
_dateAdapter = inject(DateAdapter);
|
|
882
888
|
_rangeInput;
|
|
883
889
|
_onInput(value) {
|
|
884
|
-
|
|
890
|
+
let date;
|
|
891
|
+
try {
|
|
892
|
+
date = this._dateAdapter.parse(value, null);
|
|
893
|
+
}
|
|
894
|
+
catch {
|
|
895
|
+
date = this._dateAdapter.invalid();
|
|
896
|
+
}
|
|
885
897
|
this._rangeInput._endUpdated(date);
|
|
886
898
|
this._rangeInput._inputUpdated();
|
|
887
899
|
}
|
|
888
900
|
_formatValue(value) {
|
|
889
|
-
this._elementRef.nativeElement.value = value ? this._dateAdapter.format(value, { year: 'numeric', month: '2-digit', day: '2-digit' }) : '';
|
|
901
|
+
this._elementRef.nativeElement.value = value && this._dateAdapter.isValid(value) ? this._dateAdapter.format(value, { year: 'numeric', month: '2-digit', day: '2-digit' }) : '';
|
|
890
902
|
this._rangeInput._inputUpdated();
|
|
891
903
|
}
|
|
892
904
|
_onFocus() {
|
|
@@ -923,6 +935,9 @@ class DateRangeInput {
|
|
|
923
935
|
...(ngDevMode ? [{ debugName: "rangePicker" }] : /* istanbul ignore next */ []));
|
|
924
936
|
separator = input('–', /* @ts-ignore */
|
|
925
937
|
...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
938
|
+
/** Calendar range shared by typed inputs and picker selection. */
|
|
939
|
+
range = model(null, /* @ts-ignore */
|
|
940
|
+
...(ngDevMode ? [{ debugName: "range" }] : /* istanbul ignore next */ []));
|
|
926
941
|
ngControl = inject(NgControl, { optional: true, self: true });
|
|
927
942
|
_startInput = contentChild(StartDate, /* @ts-ignore */
|
|
928
943
|
...(ngDevMode ? [{ debugName: "_startInput" }] : /* istanbul ignore next */ []));
|
|
@@ -965,6 +980,26 @@ class DateRangeInput {
|
|
|
965
980
|
disabled = false;
|
|
966
981
|
errorState = false;
|
|
967
982
|
constructor() {
|
|
983
|
+
let previousStart = this._startInput();
|
|
984
|
+
let previousEnd = this._endInput();
|
|
985
|
+
effect(() => {
|
|
986
|
+
const range = this.range();
|
|
987
|
+
const start = this._startInput();
|
|
988
|
+
const end = this._endInput();
|
|
989
|
+
untracked(() => {
|
|
990
|
+
if (start)
|
|
991
|
+
start._rangeInput = this;
|
|
992
|
+
if (end)
|
|
993
|
+
end._rangeInput = this;
|
|
994
|
+
if (range !== this._value || start !== previousStart || end !== previousEnd) {
|
|
995
|
+
previousStart = start;
|
|
996
|
+
previousEnd = end;
|
|
997
|
+
const value = range ?? new DateRange(null, null);
|
|
998
|
+
this._rangeUpdated(value);
|
|
999
|
+
this.rangePicker()._selectedRange.set(value);
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
968
1003
|
effect(() => {
|
|
969
1004
|
const picker = this.rangePicker();
|
|
970
1005
|
untracked(() => {
|
|
@@ -973,18 +1008,6 @@ class DateRangeInput {
|
|
|
973
1008
|
}
|
|
974
1009
|
});
|
|
975
1010
|
});
|
|
976
|
-
effect(() => {
|
|
977
|
-
const start = this._startInput();
|
|
978
|
-
if (start) {
|
|
979
|
-
start._rangeInput = this;
|
|
980
|
-
}
|
|
981
|
-
});
|
|
982
|
-
effect(() => {
|
|
983
|
-
const end = this._endInput();
|
|
984
|
-
if (end) {
|
|
985
|
-
end._rangeInput = this;
|
|
986
|
-
}
|
|
987
|
-
});
|
|
988
1011
|
}
|
|
989
1012
|
ngOnInit() { }
|
|
990
1013
|
ngOnDestroy() {
|
|
@@ -992,17 +1015,20 @@ class DateRangeInput {
|
|
|
992
1015
|
}
|
|
993
1016
|
_startUpdated(date) {
|
|
994
1017
|
this._value = new DateRange(date, this._value?.end || null);
|
|
1018
|
+
this.range.set(this._value);
|
|
995
1019
|
this.rangePicker()._selectedRange.set(this._value);
|
|
996
1020
|
this.stateChanges.next();
|
|
997
1021
|
}
|
|
998
1022
|
_endUpdated(date) {
|
|
999
1023
|
this._value = new DateRange(this._value?.start || null, date);
|
|
1024
|
+
this.range.set(this._value);
|
|
1000
1025
|
this.rangePicker()._selectedRange.set(this._value);
|
|
1001
1026
|
this.stateChanges.next();
|
|
1002
1027
|
}
|
|
1003
1028
|
_rangeUpdated(range) {
|
|
1004
1029
|
const prevStart = this._value?.start;
|
|
1005
1030
|
this._value = range;
|
|
1031
|
+
this.range.set(range);
|
|
1006
1032
|
this._startInput()?._formatValue(range.start);
|
|
1007
1033
|
this._endInput()?._formatValue(range.end);
|
|
1008
1034
|
this.stateChanges.next();
|
|
@@ -1042,7 +1068,7 @@ class DateRangeInput {
|
|
|
1042
1068
|
}
|
|
1043
1069
|
}
|
|
1044
1070
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DateRangeInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1045
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: DateRangeInput, isStandalone: true, selector: "ngs-date-range-input", inputs: { rangePicker: { classPropertyName: "rangePicker", publicName: "rangePicker", isSignal: true, isRequired: true, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "focus()" }, properties: { "attr.id": "id", "class.ngs-date-range-input-floating": "shouldLabelFloat" }, classAttribute: "ngs-date-range-input" }, providers: [
|
|
1071
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: DateRangeInput, isStandalone: true, selector: "ngs-date-range-input", inputs: { rangePicker: { classPropertyName: "rangePicker", publicName: "rangePicker", isSignal: true, isRequired: true, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { range: "rangeChange" }, host: { listeners: { "click": "focus()" }, properties: { "attr.id": "id", "class.ngs-date-range-input-floating": "shouldLabelFloat" }, classAttribute: "ngs-date-range-input" }, providers: [
|
|
1046
1072
|
{
|
|
1047
1073
|
provide: FormFieldControl,
|
|
1048
1074
|
useExisting: forwardRef(() => DateRangeInput)
|
|
@@ -1062,7 +1088,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
1062
1088
|
useExisting: forwardRef(() => DateRangeInput)
|
|
1063
1089
|
}
|
|
1064
1090
|
], template: "<div class=\"ngs-date-range-input-container\">\n <div class=\"ngs-date-range-input-start-wrapper\">\n <ng-content select=\"input[ngsStartDate]\"/>\n </div>\n <span class=\"ngs-date-range-input-separator\">{{ separator() }}</span>\n <div class=\"ngs-date-range-input-end-wrapper\">\n <ng-content select=\"input[ngsEndDate]\"/>\n </div>\n</div>\n", styles: [":host{display:flex;width:100%}:host.ngs-date-range-input-floating .ngs-date-range-input-container{opacity:1}:host:not(.ngs-date-range-input-floating) .ngs-date-range-input-container{opacity:0}:host .ngs-date-range-input-container{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);width:100%;transition:opacity .2s,visibility .2s}:host .ngs-date-range-input-separator{flex-shrink:0}:host ::ng-deep .ngs-date-range-input-start,:host ::ng-deep .ngs-date-range-input-end{background:transparent;border:none;outline:none;width:86px}:host ::ng-deep .ngs-date-range-input-start::placeholder,:host ::ng-deep .ngs-date-range-input-end::placeholder{color:var(--ngs-field-label-color)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1065
|
-
}], ctorParameters: () => [], propDecorators: { rangePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangePicker", required: true }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], _startInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StartDate), { isSignal: true }] }], _endInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EndDate), { isSignal: true }] }] } });
|
|
1091
|
+
}], ctorParameters: () => [], propDecorators: { rangePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangePicker", required: true }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }, { type: i0.Output, args: ["rangeChange"] }], _startInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StartDate), { isSignal: true }] }], _endInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EndDate), { isSignal: true }] }] } });
|
|
1066
1092
|
let nextUniqueId = 0;
|
|
1067
1093
|
|
|
1068
1094
|
class DatepickerToggleIcon {
|