@ngstarter-ui/components 22.2.3 → 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.
Files changed (96) hide show
  1. package/ai/component-registry.json +97 -8
  2. package/content-editor/BLOCK_FORMAT.md +182 -0
  3. package/data-view/API.md +262 -0
  4. package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
  5. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs +35 -0
  7. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs.map +1 -0
  8. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs} +3 -4
  9. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs.map → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs} +4 -4
  11. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs.map → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs} +2 -2
  13. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs.map → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs.map} +1 -1
  14. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs} +16 -39
  15. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs.map +1 -0
  16. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs} +5 -6
  17. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs.map → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs.map} +1 -1
  18. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs} +8 -5
  19. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs.map +1 -0
  20. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs +113 -0
  21. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs.map +1 -0
  22. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs} +4 -4
  23. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs.map → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs.map} +1 -1
  24. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs} +4 -4
  25. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs.map +1 -0
  26. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs} +2089 -1521
  27. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs.map +1 -0
  28. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs} +4 -4
  29. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs.map} +1 -1
  30. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs} +4 -4
  31. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs.map} +1 -1
  32. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs} +4 -4
  33. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs.map → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs.map} +1 -1
  34. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs} +3 -4
  35. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs.map → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs.map} +1 -1
  36. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +19 -0
  37. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +1 -0
  38. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs +134 -0
  39. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs.map +1 -0
  40. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  41. package/fesm2022/ngstarter-ui-components-core.mjs +46 -1
  42. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
  44. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
  46. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
  48. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-form-builder.mjs +1 -1
  50. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +58 -1
  52. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
  54. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
  56. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-menu.mjs +17 -4
  58. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
  60. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
  62. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-phone-input.mjs +1 -1
  64. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
  66. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
  68. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
  70. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  71. package/package.json +1 -1
  72. package/styles/_common.scss +2 -1
  73. package/styles/_tokens.scss +32 -1
  74. package/styles/themes/default.scss +1 -1
  75. package/types/ngstarter-ui-components-content-editor.d.ts +211 -11
  76. package/types/ngstarter-ui-components-core.d.ts +4 -1
  77. package/types/ngstarter-ui-components-data-view.d.ts +204 -11
  78. package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
  79. package/types/ngstarter-ui-components-headless-editor.d.ts +6 -1
  80. package/types/ngstarter-ui-components-menu.d.ts +5 -1
  81. package/types/ngstarter-ui-components-sort.d.ts +1 -0
  82. package/types/ngstarter-ui-components-table.d.ts +2 -0
  83. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs +0 -54
  84. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs.map +0 -1
  85. package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs +0 -47
  86. package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs.map +0 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs.map +0 -1
  88. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs.map +0 -1
  89. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs +0 -169
  90. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs.map +0 -1
  91. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs.map +0 -1
  92. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs.map +0 -1
  93. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs +0 -29
  94. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs.map +0 -1
  95. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs +0 -201
  96. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.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
- const date = this._dateAdapter.parse(value, null);
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
- const date = this._dateAdapter.parse(value, null);
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 {