@sd-angular/core 19.0.0-beta.95 → 19.0.0-beta.97

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 (107) hide show
  1. package/README.md +8 -9
  2. package/components/badge/src/badge.component.d.ts +3 -4
  3. package/components/button/src/button.component.d.ts +2 -2
  4. package/components/document-builder/src/components/header-footer-builder/header-footer-builder.component.d.ts +2 -2
  5. package/components/document-builder/src/document-builder.model.d.ts +6 -2
  6. package/components/editor/src/editor.component.d.ts +8 -0
  7. package/components/editor/src/models/image-upload.plugin.model.d.ts +33 -0
  8. package/components/editor/src/plugins/image-upload/utils/style.utils.d.ts +1 -0
  9. package/components/index.d.ts +0 -2
  10. package/components/modal/src/modal.component.d.ts +1 -2
  11. package/components/section/src/section.component.d.ts +1 -2
  12. package/components/table/index.d.ts +1 -0
  13. package/components/table/src/components/column-filter/column-filter.component.d.ts +3 -3
  14. package/components/table/src/models/index.d.ts +1 -0
  15. package/components/table/src/models/table-item.model.d.ts +10 -0
  16. package/components/table/src/models/table-option-style.model.d.ts +6 -1
  17. package/components/table/src/models/table-option-tree.model.d.ts +12 -0
  18. package/components/table/src/models/table-option.model.d.ts +6 -0
  19. package/components/table/src/pipes/index.d.ts +1 -0
  20. package/components/table/src/pipes/sd-tree.pipe.d.ts +9 -0
  21. package/components/table/src/services/tree/tree.util.d.ts +14 -0
  22. package/components/table/src/table.component.d.ts +3 -0
  23. package/fesm2022/sd-angular-core-components-document-builder.mjs +9 -4
  24. package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
  25. package/fesm2022/sd-angular-core-components-editor.mjs +222 -97
  26. package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
  27. package/fesm2022/sd-angular-core-components-form-generic.mjs +4 -4
  28. package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
  29. package/fesm2022/sd-angular-core-components-tab-router.mjs +80 -33
  30. package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
  31. package/fesm2022/sd-angular-core-components-table.mjs +325 -41
  32. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  33. package/fesm2022/sd-angular-core-components.mjs +0 -2
  34. package/fesm2022/sd-angular-core-components.mjs.map +1 -1
  35. package/fesm2022/sd-angular-core-forms-input.mjs +20 -5
  36. package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
  37. package/fesm2022/sd-angular-core-i18n.mjs +35 -0
  38. package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
  39. package/fesm2022/sd-angular-core-models.mjs +1 -4
  40. package/fesm2022/sd-angular-core-models.mjs.map +1 -1
  41. package/fesm2022/sd-angular-core-modules-layout.mjs +172 -37
  42. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  43. package/fesm2022/sd-angular-core-services-notify.mjs +21 -21
  44. package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
  45. package/fesm2022/sd-angular-core-utilities-extensions.mjs +29 -819
  46. package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
  47. package/fesm2022/sd-angular-core-utilities-models.mjs +36 -136
  48. package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
  49. package/forms/autocomplete/src/autocomplete.component.d.ts +1 -2
  50. package/forms/chip/src/chip.component.d.ts +1 -2
  51. package/forms/chip-calendar/src/chip-calendar.component.d.ts +1 -2
  52. package/forms/date/src/date.component.d.ts +1 -2
  53. package/forms/date-range/src/date-range.component.d.ts +1 -2
  54. package/forms/datetime/src/datetime.component.d.ts +1 -2
  55. package/forms/input/src/input.component.d.ts +1 -2
  56. package/forms/input-number/src/input-number.component.d.ts +1 -2
  57. package/forms/select/src/select.component.d.ts +5 -5
  58. package/forms/textarea/src/textarea.component.d.ts +1 -2
  59. package/i18n/src/en.d.ts +6 -0
  60. package/models/src/language.model.d.ts +2 -4
  61. package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +8 -1
  62. package/modules/layout/configurations/layout.configuration.d.ts +8 -0
  63. package/modules/layout/services/storage/storage.service.d.ts +2 -0
  64. package/package.json +68 -79
  65. package/sd-angular-core-19.0.0-beta.97.tgz +0 -0
  66. package/services/notify/index.d.ts +1 -1
  67. package/services/notify/src/components/toast/toast.component.d.ts +3 -3
  68. package/services/notify/src/components/toast-container.component.d.ts +3 -4
  69. package/services/notify/src/notify.model.d.ts +1 -1
  70. package/services/notify/src/notify.service.d.ts +5 -5
  71. package/utilities/extensions/src/array.extension.d.ts +1 -7
  72. package/utilities/extensions/src/color.extension.d.ts +5 -20
  73. package/utilities/extensions/src/date.extension.d.ts +1 -18
  74. package/utilities/extensions/src/number.extension.d.ts +1 -10
  75. package/utilities/extensions/src/string.extension.d.ts +30 -4
  76. package/utilities/extensions/src/utility.extension.d.ts +6 -0
  77. package/utilities/models/src/color.model.d.ts +4 -1
  78. package/utilities/models/src/empty.model.d.ts +3 -0
  79. package/utilities/models/src/filter.model.d.ts +12 -24
  80. package/utilities/models/src/maybe-async.model.d.ts +10 -4
  81. package/utilities/models/src/nested-key-of.model.d.ts +4 -5
  82. package/utilities/models/src/operator.model.d.ts +9 -4
  83. package/utilities/models/src/order.model.d.ts +4 -5
  84. package/utilities/models/src/paging.model.d.ts +8 -16
  85. package/utilities/models/src/pattern.model.d.ts +13 -0
  86. package/utilities/models/src/size.model.d.ts +4 -1
  87. package/components/anchor-v2/index.d.ts +0 -1
  88. package/components/anchor-v2/src/components/anchor-item-v2/anchor-item-v2.component.d.ts +0 -12
  89. package/components/anchor-v2/src/components/anchor-v2/anchor-v2.component.d.ts +0 -19
  90. package/components/anchor-v2/src/components/anchor-vertical-v2/anchor-vertical-list-v2.component.d.ts +0 -16
  91. package/components/anchor-v2/src/components/index.d.ts +0 -2
  92. package/components/anchor-v2/src/index.d.ts +0 -2
  93. package/components/anchor-v2/src/models/index.d.ts +0 -1
  94. package/components/anchor-v2/src/models/sd-anchor-v2.model.d.ts +0 -7
  95. package/components/workflow/index.d.ts +0 -2
  96. package/components/workflow/src/configurations/index.d.ts +0 -1
  97. package/components/workflow/src/configurations/workflow.configuration.d.ts +0 -10
  98. package/fesm2022/sd-angular-core-components-anchor-v2.mjs +0 -151
  99. package/fesm2022/sd-angular-core-components-anchor-v2.mjs.map +0 -1
  100. package/fesm2022/sd-angular-core-components-workflow.mjs +0 -17
  101. package/fesm2022/sd-angular-core-components-workflow.mjs.map +0 -1
  102. package/fesm2022/sd-angular-core-services-firebase.mjs +0 -38
  103. package/fesm2022/sd-angular-core-services-firebase.mjs.map +0 -1
  104. package/sd-angular-core-19.0.0-beta.95.tgz +0 -0
  105. package/services/firebase/index.d.ts +0 -2
  106. package/services/firebase/src/firebase.model.d.ts +0 -8
  107. package/services/firebase/src/firebase.service.d.ts +0 -14
@@ -212,6 +212,54 @@ const countTextLength = (content) => {
212
212
  doc.querySelectorAll('img, figure').forEach(el => el.remove());
213
213
  return doc.body.textContent?.length ?? 0;
214
214
  };
215
+ const imageInlineStylesToClasses = (html) => {
216
+ if (!html)
217
+ return html;
218
+ const doc = new DOMParser().parseFromString(html, 'text/html');
219
+ doc.querySelectorAll('figure.image').forEach(figure => {
220
+ const styleMap = parseStyle(figure.getAttribute('style') || '');
221
+ const floatVal = styleMap.get('float') || '';
222
+ const marginVal = styleMap.get('margin') || '';
223
+ const widthVal = styleMap.get('width') || '';
224
+ const hasNumericWidth = /\d/.test(widthVal) && widthVal !== 'fit-content';
225
+ styleMap.delete('display');
226
+ styleMap.delete('max-width');
227
+ styleMap.delete('float');
228
+ styleMap.delete('margin');
229
+ if (widthVal === 'fit-content')
230
+ styleMap.delete('width');
231
+ figure.classList.remove('image-style-align-left', 'image-style-align-right', 'image-style-block-align-left', 'image-style-block-align-right');
232
+ if (floatVal === 'left') {
233
+ figure.classList.add('image-style-align-left');
234
+ }
235
+ else if (floatVal === 'right') {
236
+ figure.classList.add('image-style-align-right');
237
+ }
238
+ else if (marginVal === '0 auto 0 0') {
239
+ figure.classList.add(hasNumericWidth ? 'image-style-align-left' : 'image-style-block-align-left');
240
+ }
241
+ else if (marginVal === '0 0 0 auto') {
242
+ figure.classList.add(hasNumericWidth ? 'image-style-align-right' : 'image-style-block-align-right');
243
+ }
244
+ figure.setAttribute('style', serializeStyle(styleMap));
245
+ if (hasNumericWidth) {
246
+ const img = figure.querySelector('img');
247
+ if (img) {
248
+ const imgStyle = parseStyle(img.getAttribute('style') || '');
249
+ if (imgStyle.get('width') === '100%')
250
+ imgStyle.delete('width');
251
+ if (imgStyle.get('height') === 'auto')
252
+ imgStyle.delete('height');
253
+ const serialized = serializeStyle(imgStyle);
254
+ if (serialized)
255
+ img.setAttribute('style', serialized);
256
+ else
257
+ img.removeAttribute('style');
258
+ }
259
+ }
260
+ });
261
+ return doc.body.innerHTML;
262
+ };
215
263
  const imageClassesToInlineStyles = (html) => {
216
264
  if (!html)
217
265
  return html;
@@ -635,8 +683,8 @@ class SdEditor {
635
683
  #i18n = inject(I18nService);
636
684
  // Input
637
685
  option = input({});
638
- height = input('250px');
639
- maxHeight = input('250px');
686
+ height = input('250px'); // Chiều dài height hiển thị mặc định
687
+ maxHeight = input('250px'); // Chiều dài tối đa mở rộng nếu nội dung vượt quá height mặc định
640
688
  maxlength = input(undefined);
641
689
  label = input();
642
690
  helperText = input();
@@ -754,16 +802,18 @@ class SdEditor {
754
802
  this.#setupSubscriptions();
755
803
  this.#setupDestroy();
756
804
  }
757
- // Public API
758
805
  onReady = (editor) => {
759
806
  this.#editor = editor;
760
807
  const currentValue = this.valueModel();
761
- if (currentValue)
762
- this.#setContent(currentValue);
763
- if (this.formControl.disabled)
808
+ if (currentValue) {
809
+ this.#setToEditor(currentValue);
810
+ }
811
+ if (this.formControl.disabled) {
764
812
  editor.enableReadOnlyMode('sd-editor');
765
- if (this.readonly())
813
+ }
814
+ if (this.readonly()) {
766
815
  editor.enableReadOnlyMode('sd-editor-readonly');
816
+ }
767
817
  editor.model.document.registerPostFixer(writer => {
768
818
  let changed = false;
769
819
  for (const change of editor.model.document.differ.getChanges()) {
@@ -786,6 +836,159 @@ class SdEditor {
786
836
  });
787
837
  };
788
838
  focusEditor = () => this.#editor?.editing?.view?.focus?.();
839
+ /**
840
+ * Xử lý tải lên các file và trả về nội dung dữ liệu cuối cùng.
841
+ * * @description
842
+ * - Đối với các file upload chế độ 'deferred' (chỉ xử lý khi submit), cần @ViewChild component và gọi hàm upload() này.
843
+ * - Hỗ trợ two-way binding.
844
+ * - Hàm hỗ trợ trả ra data cuối cùng.
845
+ * * @returns {Promise<string>} Nội dung cuối cùng được trích xuất từ sd-editor.
846
+ */
847
+ upload = async () => {
848
+ await this.#uploadImages();
849
+ return this.#getFromEditor();
850
+ };
851
+ // Editor Content
852
+ #setToEditor(html) {
853
+ this.#editor?.setData?.(this.#normalizeHtmlForEditor(html));
854
+ }
855
+ #getFromEditor() {
856
+ return this.#editor ? this.#normalizeEditorToHtml(this.#editor.getData()) : '';
857
+ }
858
+ // Normalize HTML từ bên ngoài -> format CKEditor.
859
+ #normalizeHtmlForEditor = (html) => {
860
+ if (!html) {
861
+ return '';
862
+ }
863
+ let result = html;
864
+ result = imageInlineStylesToClasses(result);
865
+ return result;
866
+ };
867
+ // Normalize HTML từ CKEditor → format HTML.
868
+ #normalizeEditorToHtml = (html) => {
869
+ if (!html) {
870
+ return '';
871
+ }
872
+ let result = html;
873
+ result = imageClassesToInlineStyles(result);
874
+ return result;
875
+ };
876
+ // Xử lý binding 2 chiều
877
+ #onModelSignalChange(html) {
878
+ const v = html ?? '';
879
+ if (this.formControl.value === v) {
880
+ return;
881
+ }
882
+ this.formControl.setValue(v, { emitEvent: false });
883
+ this._textLength.set(countTextLength(v));
884
+ if (this.#editor) {
885
+ this.#setToEditor(v);
886
+ }
887
+ }
888
+ // Xử lý khi user soạn thảo
889
+ #onEditorUserInput(rawHtml) {
890
+ const out = imageClassesToInlineStyles(rawHtml);
891
+ this._textLength.set(countTextLength(out));
892
+ if (this.formControl.value !== out) {
893
+ this.formControl.setValue(out, { emitEvent: false });
894
+ }
895
+ this.formControl.updateValueAndValidity({ emitEvent: false });
896
+ this.formControl.sdChanges.next(true);
897
+ this.valueModel.set(out);
898
+ this.sdChange.emit(out);
899
+ }
900
+ // Xử lý nếu dev sử dụng form và set trực tiếp data
901
+ #onFormGroupExternalChange(html) {
902
+ const v = html ?? '';
903
+ this.valueModel.set(v);
904
+ this._textLength.set(countTextLength(v));
905
+ if (this.#editor) {
906
+ this.#setToEditor(v);
907
+ }
908
+ }
909
+ // Validators
910
+ #requiredValidator() {
911
+ return () => (this._textLength() ? null : { required: true });
912
+ }
913
+ #maxLengthValidator() {
914
+ return () => {
915
+ const max = this.maxlength();
916
+ const len = this._textLength();
917
+ return len > max ? { maxlength: { requiredLength: max, actualLength: len } } : null;
918
+ };
919
+ }
920
+ #inlineErrorValidator() {
921
+ return () => ({ inlineError: true });
922
+ }
923
+ #updateValidators() {
924
+ const validators = [];
925
+ const asyncValidators = [];
926
+ if (this.required()) {
927
+ validators.push(this.#requiredValidator());
928
+ }
929
+ if (this.maxlength() !== undefined) {
930
+ validators.push(this.#maxLengthValidator());
931
+ }
932
+ if (this.inlineError()) {
933
+ validators.push(this.#inlineErrorValidator());
934
+ }
935
+ const val = this.validator();
936
+ if (val) {
937
+ asyncValidators.push(HandleSdCustomValidator(val));
938
+ }
939
+ this.formControl.setValidators(validators.length ? validators : null);
940
+ this.formControl.setAsyncValidators(asyncValidators.length ? asyncValidators : null);
941
+ this.formControl.updateValueAndValidity({ emitEvent: false });
942
+ }
943
+ // Setup
944
+ #setupEffects() {
945
+ // Lắng nghe disabled
946
+ effect(() => {
947
+ this.disabled() ? this.formControl.disable({ emitEvent: false }) : this.formControl.enable({ emitEvent: false });
948
+ });
949
+ // Lắng nghe readonly
950
+ effect(() => {
951
+ if (!this.#editor) {
952
+ return;
953
+ }
954
+ if (this.readonly()) {
955
+ this.#editor.enableReadOnlyMode('sd-editor-readonly');
956
+ }
957
+ else {
958
+ this.#editor.disableReadOnlyMode('sd-editor-readonly');
959
+ }
960
+ });
961
+ // Lắng nghe binđing 2 chiều model
962
+ effect(() => this.#onModelSignalChange(this.valueModel()));
963
+ // Lắng nghe name form
964
+ effect(() => this.form()?.addControl(this.name(), this.formControl));
965
+ // Lắng nghe validators
966
+ effect(() => {
967
+ this.required();
968
+ this.maxlength();
969
+ this.inlineError();
970
+ this.validator();
971
+ this.#updateValidators();
972
+ });
973
+ }
974
+ #setupSubscriptions() {
975
+ // Đăng ký nếu dev sử dụng form để set data trực tiếp từ bên ngoài vào
976
+ this.formControl.valueChanges
977
+ .pipe(takeUntilDestroyed(this.#destroyRef))
978
+ .subscribe((val) => this.#onFormGroupExternalChange(val));
979
+ this.formControl.sdChanges.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => this.#cdRef.markForCheck());
980
+ // Đăng ký user gõ trong editor
981
+ this.#contentChangeSubject
982
+ .pipe(debounceTime(100), takeUntilDestroyed(this.#destroyRef))
983
+ .subscribe(rawHtml => this.#onEditorUserInput(rawHtml));
984
+ }
985
+ #setupDestroy() {
986
+ this.#destroyRef.onDestroy(() => {
987
+ this.form()?.removeControl(this.name());
988
+ this.#editor?.destroy?.();
989
+ });
990
+ }
991
+ // Helpers
789
992
  #uploadImages = async () => {
790
993
  const uploadMode = this.option()?.imageConfig?.uploadMode ?? 'deferred';
791
994
  // Early return nếu không phải 'deferred' mode.
@@ -823,77 +1026,18 @@ class SdEditor {
823
1026
  throw new Error(`Upload failed for ${failedBatches.flat().length} image(s)`);
824
1027
  }
825
1028
  };
826
- upload = async () => {
827
- await this.#uploadImages();
828
- return this.#getContent();
829
- };
830
- // Setup
831
- #setupEffects = () => {
832
- effect(() => {
833
- this.disabled() ? this.formControl.disable({ emitEvent: false }) : this.formControl.enable({ emitEvent: false });
834
- });
835
- effect(() => {
836
- if (!this.#editor)
837
- return;
838
- this.readonly() ? this.#editor.enableReadOnlyMode('sd-editor-readonly') : this.#editor.disableReadOnlyMode('sd-editor-readonly');
839
- });
840
- effect(() => {
841
- const val = this.valueModel();
842
- if (this.formControl.value !== val) {
843
- this.formControl.setValue(val, { emitEvent: false });
844
- if (this.#editor)
845
- this.#setContent(val);
846
- }
847
- });
848
- effect(() => this.form()?.addControl(this.name(), this.formControl));
849
- effect(() => {
850
- this.required();
851
- this.maxlength();
852
- this.inlineError();
853
- this.validator();
854
- this.#updateValidators();
855
- });
856
- };
857
- #setupSubscriptions = () => {
858
- this.formControl.valueChanges.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((val) => {
859
- const v = val ?? '';
860
- this.valueModel.set(v);
861
- this._textLength.set(countTextLength(v));
862
- if (this.#editor) {
863
- this.#setContent(v);
864
- }
865
- });
866
- this.formControl.sdChanges.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => this.#cdRef.markForCheck());
867
- this.#contentChangeSubject.pipe(debounceTime(100), takeUntilDestroyed(this.#destroyRef)).subscribe(content => {
868
- const out = imageClassesToInlineStyles(content);
869
- this._textLength.set(countTextLength(out));
870
- if (this.formControl.value !== out)
871
- this.formControl.setValue(out, { emitEvent: false });
872
- this.formControl.updateValueAndValidity({ emitEvent: false });
873
- this.formControl.sdChanges.next(true);
874
- this.valueModel.set(out);
875
- this.sdChange.emit(out);
876
- });
877
- };
878
- #setupDestroy = () => {
879
- this.#destroyRef.onDestroy(() => {
880
- this.form()?.removeControl(this.name());
881
- this.#editor?.destroy?.();
882
- });
883
- };
884
- // Helpers
885
- #setContent = (content) => this.#editor?.setData?.(content);
886
- #getContent = () => (this.#editor ? imageClassesToInlineStyles(this.#editor.getData()) : '');
887
1029
  #getConfigurations = () => {
888
1030
  const config = this.#uploadConfig;
889
- if (!config)
1031
+ if (!config) {
890
1032
  return [];
1033
+ }
891
1034
  return Array.isArray(config) ? config : [config];
892
1035
  };
893
- #validateDuplicateConfigKeys() {
1036
+ #validateDuplicateConfigKeys = () => {
894
1037
  const config = this.#uploadConfig;
895
- if (!config)
1038
+ if (!config) {
896
1039
  return;
1040
+ }
897
1041
  const configurations = Array.isArray(config) ? config : [config];
898
1042
  const seen = new Set();
899
1043
  for (const cfg of configurations) {
@@ -904,42 +1048,23 @@ class SdEditor {
904
1048
  }
905
1049
  seen.add(normalizedKey);
906
1050
  }
907
- }
1051
+ };
908
1052
  #getSelectedConfig = () => {
909
1053
  const configurations = this.#getConfigurations();
910
- if (!configurations.length)
1054
+ if (!configurations.length) {
911
1055
  return undefined;
1056
+ }
912
1057
  return configurations.find(cfg => cfg.key === this.key());
913
1058
  };
914
- #buildUploadFn = () => this.option()?.imageConfig?.uploadFn ?? this.#getSelectedConfig()?.upload;
915
- #updateValidators = () => {
916
- const validators = [];
917
- const asyncValidators = [];
918
- if (this.required()) {
919
- validators.push(() => (this._textLength() ? null : { required: true }));
920
- }
921
- const max = this.maxlength();
922
- if (max !== undefined) {
923
- validators.push(() => (this._textLength() > max ? { maxlength: { requiredLength: max, actualLength: this._textLength() } } : null));
924
- }
925
- const inl = this.inlineError();
926
- if (inl) {
927
- validators.push(() => ({ inlineError: true }));
928
- }
929
- const val = this.validator();
930
- if (val) {
931
- asyncValidators.push(HandleSdCustomValidator(val));
932
- }
933
- this.formControl.setValidators(validators.length ? validators : null);
934
- this.formControl.setAsyncValidators(asyncValidators.length ? asyncValidators : null);
935
- this.formControl.updateValueAndValidity({ emitEvent: false });
1059
+ #buildUploadFn = () => {
1060
+ return this.option()?.imageConfig?.uploadFn ?? this.#getSelectedConfig()?.upload;
936
1061
  };
937
1062
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
938
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdEditor, isStandalone: true, selector: "sd-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, validator: { classPropertyName: "validator", publicName: "validator", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange", sdBlur: "sdBlur", sdFocus: "sdFocus" }, ngImport: i0, template: "@let lbl = label();\r\n@let hText = helperText();\r\n@let hideErr = hideInlineError();\r\n@let errMsg = errorMessage;\r\n@let req = required();\r\n@let maxLen = maxlength();\r\n@let showCounter = !!maxLen && !formControl.disabled && !hideErr;\r\n\r\n@if (lbl) {\r\n <sd-label [label]=\"lbl\" [required]=\"req\" [helperText]=\"hText\"></sd-label>\r\n}\r\n\r\n<div\r\n class=\"sd-editor\"\r\n [class.sd-editor--readonly]=\"readonly()\"\r\n [class.sd-editor--error]=\"formControl.invalid && formControl.touched\"\r\n [class.has-counter]=\"showCounter\"\r\n [style.--sd-editor-content-min-height]=\"height()\"\r\n [style.--sd-editor-content-max-height]=\"maxHeight()\"\r\n [attr.data-autoId]=\"autoId()\">\r\n <ckeditor [editor]=\"Editor\" [config]=\"editorConfig()\" [disabled]=\"formControl.disabled\" (ready)=\"onReady($event)\"></ckeditor>\r\n\r\n @if (showCounter) {\r\n <div class=\"sd-editor-counter-row\">\r\n <span class=\"sd-editor-counter\" [class.sd-editor-counter--over]=\"isOverLimit()\"> {{ _textLength() }}/{{ maxLen }} </span>\r\n </div>\r\n }\r\n\r\n @if (hideErr && errMsg && formControl.touched) {\r\n <mat-icon class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\">error</mat-icon>\r\n }\r\n</div>\r\n\r\n<div class=\"sd-editor-footer\">\r\n @if (!hideErr && errMsg && formControl.touched) {\r\n <mat-error>{{ errMsg }}</mat-error>\r\n }\r\n</div>\r\n", styles: [".sd-editor{display:flex;flex-direction:column;width:100%;position:relative}.sd-editor-counter-row{display:flex;justify-content:flex-end;align-items:center;padding:4px 12px;border:1px solid var(--ck-color-base-border);border-top:none}.sd-editor-footer{min-height:20px;margin-top:4px}.sd-editor-footer mat-error{font-size:12px;color:var(--mdc-theme-error, #f44336)}.sd-error-icon{position:absolute;right:8px;bottom:8px;z-index:2;color:var(--mdc-theme-error, #f44336);height:20px;width:20px;font-size:20px;cursor:default}.sd-editor--readonly :host ::ng-deep .ck-editor__editable{background:#0000000a;cursor:default}.sd-editor-counter{font-size:12px;color:#0009}.sd-editor-counter--over{color:var(--mdc-theme-error, #f44336)}::ng-deep .ck-powered-by{display:none}:host ::ng-deep ckeditor,:host ::ng-deep .ck-editor{display:flex;flex-direction:column}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__main{overflow:visible}:host ::ng-deep .ck-editor__editable{min-height:var(--sd-editor-content-min-height, 200px)!important;max-height:var(--sd-editor-content-max-height, none)!important;padding:24px!important;overflow-y:auto!important;border:1px solid var(--ck-color-base-border)!important}:host ::ng-deep .sd-editor.has-counter .ck-editor__editable{border-bottom:none!important}:host ::ng-deep .sd-editor--error .ck-editor__editable,:host ::ng-deep .sd-editor--error .ck-toolbar{border-color:var(--mdc-theme-error, #f44336)!important}:host ::ng-deep .sd-editor--error.has-counter .sd-editor-counter-row{border-color:var(--mdc-theme-error, #f44336)}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{margin-left:0!important;padding-left:20px!important}\n", ":host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content figure.image{position:relative;display:block;width:fit-content;max-width:100%;margin:0 auto;overflow:visible}:host ::ng-deep .ck-content figure.image:hover,:host ::ng-deep .ck-content figure.image.ck-widget_selected{z-index:99999!important}:host ::ng-deep .ck-content figure.image.image-style-align-left{float:left;margin:0 1em 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-left[style*=\"width:100\"]{float:none;margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-right{float:right;margin:0 0 0 1em}:host ::ng-deep .ck-content figure.image.image-style-align-right[style*=\"width:100\"]{float:none;margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image.image-style-block-align-left{margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-block-align-right{margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image .ck-progress-bar{position:absolute;bottom:0;left:0;width:30%!important;height:3px;background:var(--sd-color-primary, #1565c0);border-radius:2px;z-index:10;pointer-events:none;animation:sd-progress-indeterminate 1.4s ease-in-out infinite}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar){overflow:hidden}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar) img{filter:blur(1px) brightness(.85);transition:filter .3s ease}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):after{content:\"\";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:9;background:#ffffff40;border-radius:inherit}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):before{content:\"\";position:absolute;top:50%;left:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border:3px solid rgba(255,255,255,.5);border-top-color:var(--sd-color-primary, #1565c0);border-radius:50%;animation:sd-spinner .75s linear infinite;z-index:11;pointer-events:none}@keyframes sd-spinner{to{transform:rotate(360deg)}}@keyframes sd-progress-indeterminate{0%{left:-30%}to{left:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1063
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdEditor, isStandalone: true, selector: "sd-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, validator: { classPropertyName: "validator", publicName: "validator", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange", sdBlur: "sdBlur", sdFocus: "sdFocus" }, ngImport: i0, template: "@let lbl = label();\r\n@let hText = helperText();\r\n@let hideErr = hideInlineError();\r\n@let errMsg = errorMessage;\r\n@let req = required();\r\n@let maxLen = maxlength();\r\n@let showCounter = !!maxLen && !formControl.disabled && !hideErr;\r\n\r\n@if (lbl) {\r\n <sd-label [label]=\"lbl\" [required]=\"req\" [helperText]=\"hText\"></sd-label>\r\n}\r\n\r\n<div\r\n class=\"sd-editor\"\r\n [class.sd-editor--readonly]=\"readonly()\"\r\n [class.sd-editor--error]=\"formControl.invalid && formControl.touched\"\r\n [class.has-counter]=\"showCounter\"\r\n [style.--sd-editor-content-min-height]=\"height()\"\r\n [style.--sd-editor-content-max-height]=\"maxHeight()\"\r\n [attr.data-autoId]=\"autoId()\">\r\n <ckeditor [editor]=\"Editor\" [config]=\"editorConfig()\" [disabled]=\"formControl.disabled\" (ready)=\"onReady($event)\"></ckeditor>\r\n\r\n @if (showCounter) {\r\n <div class=\"sd-editor-counter-row\">\r\n <span class=\"sd-editor-counter\" [class.sd-editor-counter--over]=\"isOverLimit()\"> {{ _textLength() }}/{{ maxLen }} </span>\r\n </div>\r\n }\r\n\r\n @if (hideErr && errMsg && formControl.touched) {\r\n <mat-icon class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\">error</mat-icon>\r\n }\r\n</div>\r\n\r\n<div class=\"sd-editor-footer\">\r\n @if (!hideErr && errMsg && formControl.touched) {\r\n <mat-error>{{ errMsg }}</mat-error>\r\n }\r\n</div>\r\n", styles: [".sd-editor{display:flex;flex-direction:column;width:100%;position:relative}.sd-editor-counter-row{display:flex;justify-content:flex-end;align-items:center;padding:4px 12px;border:1px solid var(--ck-color-base-border);border-top:none}.sd-editor-footer{min-height:20px;margin-top:4px}.sd-editor-footer mat-error{font-size:12px;color:var(--mdc-theme-error, #f44336)}.sd-error-icon{position:absolute;right:8px;bottom:8px;z-index:2;color:var(--mdc-theme-error, #f44336);height:20px;width:20px;font-size:20px;cursor:default}.sd-editor--readonly :host ::ng-deep .ck-editor__editable{background:#0000000a;cursor:default}.sd-editor-counter{font-size:12px;color:#0009}.sd-editor-counter--over{color:var(--mdc-theme-error, #f44336)}::ng-deep .ck-powered-by,::ng-deep .ck-powered-by-balloon{display:none!important}:host ::ng-deep ckeditor,:host ::ng-deep .ck-editor{display:flex;flex-direction:column}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__main{overflow:visible}:host ::ng-deep .ck-editor__editable{min-height:var(--sd-editor-content-min-height, 200px)!important;max-height:var(--sd-editor-content-max-height, none)!important;padding:24px!important;overflow-y:auto!important;border:1px solid var(--ck-color-base-border)!important}:host ::ng-deep .ck-editor__editable.ck-focused{box-shadow:none!important}:host ::ng-deep .sd-editor.has-counter .ck-editor__editable{border-bottom:none!important}:host ::ng-deep .sd-editor--error .ck-editor__editable,:host ::ng-deep .sd-editor--error .ck-toolbar{border-color:var(--mdc-theme-error, #f44336)!important}:host ::ng-deep .sd-editor--error.has-counter .sd-editor-counter-row{border-color:var(--mdc-theme-error, #f44336)}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{margin-left:0!important;padding-left:20px!important}\n", ":host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content figure.image{position:relative;display:block;width:fit-content;max-width:100%;margin:0 auto;overflow:visible}:host ::ng-deep .ck-content figure.image:hover{z-index:99999!important}:host ::ng-deep .ck-content figure.image.image-style-align-left{float:left;margin:0 1em 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-left[style*=\"width:100\"]{float:none;margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-right{float:right;margin:0 0 0 1em}:host ::ng-deep .ck-content figure.image.image-style-align-right[style*=\"width:100\"]{float:none;margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image.image-style-block-align-left{margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-block-align-right{margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image .ck-progress-bar{position:absolute;bottom:0;left:0;width:30%!important;height:3px;background:var(--sd-color-primary, #1565c0);border-radius:2px;z-index:10;pointer-events:none;animation:sd-progress-indeterminate 1.4s ease-in-out infinite}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar){overflow:hidden}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar) img{filter:blur(1px) brightness(.85);transition:filter .3s ease}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):after{content:\"\";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:9;background:#ffffff40;border-radius:inherit}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):before{content:\"\";position:absolute;top:50%;left:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border:3px solid rgba(255,255,255,.5);border-top-color:var(--sd-color-primary, #1565c0);border-radius:50%;animation:sd-spinner .75s linear infinite;z-index:11;pointer-events:none}@keyframes sd-spinner{to{transform:rotate(360deg)}}@keyframes sd-progress-indeterminate{0%{left:-30%}to{left:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
939
1064
  }
940
1065
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdEditor, decorators: [{
941
1066
  type: Component,
942
- args: [{ selector: 'sd-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CKEditorModule, SdLabel, MatFormFieldModule, MatIconModule, MatTooltipModule], template: "@let lbl = label();\r\n@let hText = helperText();\r\n@let hideErr = hideInlineError();\r\n@let errMsg = errorMessage;\r\n@let req = required();\r\n@let maxLen = maxlength();\r\n@let showCounter = !!maxLen && !formControl.disabled && !hideErr;\r\n\r\n@if (lbl) {\r\n <sd-label [label]=\"lbl\" [required]=\"req\" [helperText]=\"hText\"></sd-label>\r\n}\r\n\r\n<div\r\n class=\"sd-editor\"\r\n [class.sd-editor--readonly]=\"readonly()\"\r\n [class.sd-editor--error]=\"formControl.invalid && formControl.touched\"\r\n [class.has-counter]=\"showCounter\"\r\n [style.--sd-editor-content-min-height]=\"height()\"\r\n [style.--sd-editor-content-max-height]=\"maxHeight()\"\r\n [attr.data-autoId]=\"autoId()\">\r\n <ckeditor [editor]=\"Editor\" [config]=\"editorConfig()\" [disabled]=\"formControl.disabled\" (ready)=\"onReady($event)\"></ckeditor>\r\n\r\n @if (showCounter) {\r\n <div class=\"sd-editor-counter-row\">\r\n <span class=\"sd-editor-counter\" [class.sd-editor-counter--over]=\"isOverLimit()\"> {{ _textLength() }}/{{ maxLen }} </span>\r\n </div>\r\n }\r\n\r\n @if (hideErr && errMsg && formControl.touched) {\r\n <mat-icon class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\">error</mat-icon>\r\n }\r\n</div>\r\n\r\n<div class=\"sd-editor-footer\">\r\n @if (!hideErr && errMsg && formControl.touched) {\r\n <mat-error>{{ errMsg }}</mat-error>\r\n }\r\n</div>\r\n", styles: [".sd-editor{display:flex;flex-direction:column;width:100%;position:relative}.sd-editor-counter-row{display:flex;justify-content:flex-end;align-items:center;padding:4px 12px;border:1px solid var(--ck-color-base-border);border-top:none}.sd-editor-footer{min-height:20px;margin-top:4px}.sd-editor-footer mat-error{font-size:12px;color:var(--mdc-theme-error, #f44336)}.sd-error-icon{position:absolute;right:8px;bottom:8px;z-index:2;color:var(--mdc-theme-error, #f44336);height:20px;width:20px;font-size:20px;cursor:default}.sd-editor--readonly :host ::ng-deep .ck-editor__editable{background:#0000000a;cursor:default}.sd-editor-counter{font-size:12px;color:#0009}.sd-editor-counter--over{color:var(--mdc-theme-error, #f44336)}::ng-deep .ck-powered-by{display:none}:host ::ng-deep ckeditor,:host ::ng-deep .ck-editor{display:flex;flex-direction:column}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__main{overflow:visible}:host ::ng-deep .ck-editor__editable{min-height:var(--sd-editor-content-min-height, 200px)!important;max-height:var(--sd-editor-content-max-height, none)!important;padding:24px!important;overflow-y:auto!important;border:1px solid var(--ck-color-base-border)!important}:host ::ng-deep .sd-editor.has-counter .ck-editor__editable{border-bottom:none!important}:host ::ng-deep .sd-editor--error .ck-editor__editable,:host ::ng-deep .sd-editor--error .ck-toolbar{border-color:var(--mdc-theme-error, #f44336)!important}:host ::ng-deep .sd-editor--error.has-counter .sd-editor-counter-row{border-color:var(--mdc-theme-error, #f44336)}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{margin-left:0!important;padding-left:20px!important}\n", ":host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content figure.image{position:relative;display:block;width:fit-content;max-width:100%;margin:0 auto;overflow:visible}:host ::ng-deep .ck-content figure.image:hover,:host ::ng-deep .ck-content figure.image.ck-widget_selected{z-index:99999!important}:host ::ng-deep .ck-content figure.image.image-style-align-left{float:left;margin:0 1em 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-left[style*=\"width:100\"]{float:none;margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-right{float:right;margin:0 0 0 1em}:host ::ng-deep .ck-content figure.image.image-style-align-right[style*=\"width:100\"]{float:none;margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image.image-style-block-align-left{margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-block-align-right{margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image .ck-progress-bar{position:absolute;bottom:0;left:0;width:30%!important;height:3px;background:var(--sd-color-primary, #1565c0);border-radius:2px;z-index:10;pointer-events:none;animation:sd-progress-indeterminate 1.4s ease-in-out infinite}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar){overflow:hidden}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar) img{filter:blur(1px) brightness(.85);transition:filter .3s ease}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):after{content:\"\";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:9;background:#ffffff40;border-radius:inherit}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):before{content:\"\";position:absolute;top:50%;left:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border:3px solid rgba(255,255,255,.5);border-top-color:var(--sd-color-primary, #1565c0);border-radius:50%;animation:sd-spinner .75s linear infinite;z-index:11;pointer-events:none}@keyframes sd-spinner{to{transform:rotate(360deg)}}@keyframes sd-progress-indeterminate{0%{left:-30%}to{left:100%}}\n"] }]
1067
+ args: [{ selector: 'sd-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CKEditorModule, SdLabel, MatFormFieldModule, MatIconModule, MatTooltipModule], template: "@let lbl = label();\r\n@let hText = helperText();\r\n@let hideErr = hideInlineError();\r\n@let errMsg = errorMessage;\r\n@let req = required();\r\n@let maxLen = maxlength();\r\n@let showCounter = !!maxLen && !formControl.disabled && !hideErr;\r\n\r\n@if (lbl) {\r\n <sd-label [label]=\"lbl\" [required]=\"req\" [helperText]=\"hText\"></sd-label>\r\n}\r\n\r\n<div\r\n class=\"sd-editor\"\r\n [class.sd-editor--readonly]=\"readonly()\"\r\n [class.sd-editor--error]=\"formControl.invalid && formControl.touched\"\r\n [class.has-counter]=\"showCounter\"\r\n [style.--sd-editor-content-min-height]=\"height()\"\r\n [style.--sd-editor-content-max-height]=\"maxHeight()\"\r\n [attr.data-autoId]=\"autoId()\">\r\n <ckeditor [editor]=\"Editor\" [config]=\"editorConfig()\" [disabled]=\"formControl.disabled\" (ready)=\"onReady($event)\"></ckeditor>\r\n\r\n @if (showCounter) {\r\n <div class=\"sd-editor-counter-row\">\r\n <span class=\"sd-editor-counter\" [class.sd-editor-counter--over]=\"isOverLimit()\"> {{ _textLength() }}/{{ maxLen }} </span>\r\n </div>\r\n }\r\n\r\n @if (hideErr && errMsg && formControl.touched) {\r\n <mat-icon class=\"sd-error-icon\" [matTooltip]=\"errMsg\" matTooltipPosition=\"above\">error</mat-icon>\r\n }\r\n</div>\r\n\r\n<div class=\"sd-editor-footer\">\r\n @if (!hideErr && errMsg && formControl.touched) {\r\n <mat-error>{{ errMsg }}</mat-error>\r\n }\r\n</div>\r\n", styles: [".sd-editor{display:flex;flex-direction:column;width:100%;position:relative}.sd-editor-counter-row{display:flex;justify-content:flex-end;align-items:center;padding:4px 12px;border:1px solid var(--ck-color-base-border);border-top:none}.sd-editor-footer{min-height:20px;margin-top:4px}.sd-editor-footer mat-error{font-size:12px;color:var(--mdc-theme-error, #f44336)}.sd-error-icon{position:absolute;right:8px;bottom:8px;z-index:2;color:var(--mdc-theme-error, #f44336);height:20px;width:20px;font-size:20px;cursor:default}.sd-editor--readonly :host ::ng-deep .ck-editor__editable{background:#0000000a;cursor:default}.sd-editor-counter{font-size:12px;color:#0009}.sd-editor-counter--over{color:var(--mdc-theme-error, #f44336)}::ng-deep .ck-powered-by,::ng-deep .ck-powered-by-balloon{display:none!important}:host ::ng-deep ckeditor,:host ::ng-deep .ck-editor{display:flex;flex-direction:column}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__main{overflow:visible}:host ::ng-deep .ck-editor__editable{min-height:var(--sd-editor-content-min-height, 200px)!important;max-height:var(--sd-editor-content-max-height, none)!important;padding:24px!important;overflow-y:auto!important;border:1px solid var(--ck-color-base-border)!important}:host ::ng-deep .ck-editor__editable.ck-focused{box-shadow:none!important}:host ::ng-deep .sd-editor.has-counter .ck-editor__editable{border-bottom:none!important}:host ::ng-deep .sd-editor--error .ck-editor__editable,:host ::ng-deep .sd-editor--error .ck-toolbar{border-color:var(--mdc-theme-error, #f44336)!important}:host ::ng-deep .sd-editor--error.has-counter .sd-editor-counter-row{border-color:var(--mdc-theme-error, #f44336)}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{margin-left:0!important;padding-left:20px!important}\n", ":host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content figure.image{position:relative;display:block;width:fit-content;max-width:100%;margin:0 auto;overflow:visible}:host ::ng-deep .ck-content figure.image:hover{z-index:99999!important}:host ::ng-deep .ck-content figure.image.image-style-align-left{float:left;margin:0 1em 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-left[style*=\"width:100\"]{float:none;margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-align-right{float:right;margin:0 0 0 1em}:host ::ng-deep .ck-content figure.image.image-style-align-right[style*=\"width:100\"]{float:none;margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image.image-style-block-align-left{margin:0 auto 0 0}:host ::ng-deep .ck-content figure.image.image-style-block-align-right{margin:0 0 0 auto}:host ::ng-deep .ck-content figure.image .ck-progress-bar{position:absolute;bottom:0;left:0;width:30%!important;height:3px;background:var(--sd-color-primary, #1565c0);border-radius:2px;z-index:10;pointer-events:none;animation:sd-progress-indeterminate 1.4s ease-in-out infinite}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar){overflow:hidden}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar) img{filter:blur(1px) brightness(.85);transition:filter .3s ease}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):after{content:\"\";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:9;background:#ffffff40;border-radius:inherit}:host ::ng-deep .ck-content figure.image:has(.ck-progress-bar):before{content:\"\";position:absolute;top:50%;left:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border:3px solid rgba(255,255,255,.5);border-top-color:var(--sd-color-primary, #1565c0);border-radius:50%;animation:sd-spinner .75s linear infinite;z-index:11;pointer-events:none}@keyframes sd-spinner{to{transform:rotate(360deg)}}@keyframes sd-progress-indeterminate{0%{left:-30%}to{left:100%}}\n"] }]
943
1068
  }], ctorParameters: () => [] });
944
1069
 
945
1070
  /**