simpo-component-library 3.6.865 → 3.6.866

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.
@@ -32,18 +32,14 @@ import * as i10$2 from '@angular/material/slider';
32
32
  import { MatSliderModule, MatSlider } from '@angular/material/slider';
33
33
  import * as i10$1 from '@angular/material/progress-spinner';
34
34
  import { MatProgressSpinner, MatProgressSpinnerModule, MatSpinner } from '@angular/material/progress-spinner';
35
- import { Extension, Editor } from '@tiptap/core';
36
- import StarterKit from '@tiptap/starter-kit';
35
+ import * as i1$2 from '@angular/platform-browser';
36
+ import { DomSanitizer } from '@angular/platform-browser';
37
37
  import { CdkDrag, CdkDragPlaceholder, moveItemInArray } from '@angular/cdk/drag-drop';
38
- import { TextStyle } from '@tiptap/extension-text-style';
39
- import Color from '@tiptap/extension-color';
40
- import Underline from '@tiptap/extension-underline';
41
- import TextAlign from '@tiptap/extension-text-align';
42
38
  import * as i12 from '@angular/material/form-field';
43
39
  import { MatFormFieldModule } from '@angular/material/form-field';
40
+ import { Extension } from '@tiptap/core';
44
41
  import * as i2$2 from '@angular/router';
45
42
  import { RouterLink, NavigationEnd } from '@angular/router';
46
- import * as i1$2 from '@angular/platform-browser';
47
43
  import { MatMenuModule } from '@angular/material/menu';
48
44
  import * as i7$1 from 'ngx-skeleton-loader';
49
45
  import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@@ -1656,6 +1652,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1656
1652
  args: ['simpoObjectPosition']
1657
1653
  }] } });
1658
1654
 
1655
+ class ContenteditableValueAccessor {
1656
+ constructor(elementRef, renderer) {
1657
+ this.elementRef = elementRef;
1658
+ this.renderer = renderer;
1659
+ this.onTouched = () => { };
1660
+ this.contenteditable = true; // Allow dynamic input
1661
+ this.onChange = (_value) => { };
1662
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', 'true');
1663
+ }
1664
+ ngAfterViewInit() {
1665
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', this.contenteditable ? 'true' : 'false');
1666
+ this.observer = new MutationObserver(() => {
1667
+ this.onChange(this.elementRef.nativeElement.innerHTML);
1668
+ });
1669
+ this.observer.observe(this.elementRef.nativeElement, {
1670
+ characterData: true,
1671
+ childList: true,
1672
+ subtree: true,
1673
+ });
1674
+ }
1675
+ ngOnDestroy() {
1676
+ this.observer?.disconnect();
1677
+ }
1678
+ onInput() {
1679
+ this.observer?.disconnect();
1680
+ this.onChange(this.elementRef.nativeElement.innerHTML);
1681
+ }
1682
+ onBlur() {
1683
+ this.onTouched();
1684
+ }
1685
+ writeValue(value) {
1686
+ this.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', value || '');
1687
+ }
1688
+ registerOnChange(onChange) {
1689
+ this.onChange = onChange;
1690
+ }
1691
+ registerOnTouched(onTouched) {
1692
+ this.onTouched = onTouched;
1693
+ }
1694
+ setDisabledState(disabled) {
1695
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', String(!disabled));
1696
+ }
1697
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContenteditableValueAccessor, deps: [{ token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1698
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: ContenteditableValueAccessor, isStandalone: true, selector: "[contenteditable][ngModel]", inputs: { contenteditable: "contenteditable" }, host: { listeners: { "input": "onInput()", "blur": "onBlur()" } }, providers: [
1699
+ {
1700
+ provide: NG_VALUE_ACCESSOR,
1701
+ useExisting: forwardRef(() => ContenteditableValueAccessor),
1702
+ multi: true,
1703
+ },
1704
+ ], ngImport: i0 }); }
1705
+ }
1706
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContenteditableValueAccessor, decorators: [{
1707
+ type: Directive,
1708
+ args: [{
1709
+ selector: '[contenteditable][ngModel]',
1710
+ providers: [
1711
+ {
1712
+ provide: NG_VALUE_ACCESSOR,
1713
+ useExisting: forwardRef(() => ContenteditableValueAccessor),
1714
+ multi: true,
1715
+ },
1716
+ ],
1717
+ standalone: true
1718
+ }]
1719
+ }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
1720
+ type: Inject,
1721
+ args: [ElementRef]
1722
+ }] }, { type: i0.Renderer2, decorators: [{
1723
+ type: Inject,
1724
+ args: [Renderer2]
1725
+ }] }], propDecorators: { contenteditable: [{
1726
+ type: Input
1727
+ }], onInput: [{
1728
+ type: HostListener,
1729
+ args: ['input']
1730
+ }], onBlur: [{
1731
+ type: HostListener,
1732
+ args: ['blur']
1733
+ }] } });
1734
+
1659
1735
  const GradientExtension = Extension.create({
1660
1736
  name: 'gradient',
1661
1737
  addGlobalAttributes() {
@@ -1759,92 +1835,13 @@ const FontSize = Extension.create({
1759
1835
  }
1760
1836
  });
1761
1837
 
1762
- class ContenteditableValueAccessor {
1763
- constructor(elementRef, renderer) {
1764
- this.elementRef = elementRef;
1765
- this.renderer = renderer;
1766
- this.onTouched = () => { };
1767
- this.contenteditable = true; // Allow dynamic input
1768
- this.onChange = (_value) => { };
1769
- this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', 'true');
1770
- }
1771
- ngAfterViewInit() {
1772
- this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', this.contenteditable ? 'true' : 'false');
1773
- this.observer = new MutationObserver(() => {
1774
- this.onChange(this.elementRef.nativeElement.innerHTML);
1775
- });
1776
- this.observer.observe(this.elementRef.nativeElement, {
1777
- characterData: true,
1778
- childList: true,
1779
- subtree: true,
1780
- });
1781
- }
1782
- ngOnDestroy() {
1783
- this.observer?.disconnect();
1784
- }
1785
- onInput() {
1786
- this.observer?.disconnect();
1787
- this.onChange(this.elementRef.nativeElement.innerHTML);
1788
- }
1789
- onBlur() {
1790
- this.onTouched();
1791
- }
1792
- writeValue(value) {
1793
- this.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', value || '');
1794
- }
1795
- registerOnChange(onChange) {
1796
- this.onChange = onChange;
1797
- }
1798
- registerOnTouched(onTouched) {
1799
- this.onTouched = onTouched;
1800
- }
1801
- setDisabledState(disabled) {
1802
- this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', String(!disabled));
1803
- }
1804
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContenteditableValueAccessor, deps: [{ token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1805
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: ContenteditableValueAccessor, isStandalone: true, selector: "[contenteditable][ngModel]", inputs: { contenteditable: "contenteditable" }, host: { listeners: { "input": "onInput()", "blur": "onBlur()" } }, providers: [
1806
- {
1807
- provide: NG_VALUE_ACCESSOR,
1808
- useExisting: forwardRef(() => ContenteditableValueAccessor),
1809
- multi: true,
1810
- },
1811
- ], ngImport: i0 }); }
1812
- }
1813
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ContenteditableValueAccessor, decorators: [{
1814
- type: Directive,
1815
- args: [{
1816
- selector: '[contenteditable][ngModel]',
1817
- providers: [
1818
- {
1819
- provide: NG_VALUE_ACCESSOR,
1820
- useExisting: forwardRef(() => ContenteditableValueAccessor),
1821
- multi: true,
1822
- },
1823
- ],
1824
- standalone: true
1825
- }]
1826
- }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
1827
- type: Inject,
1828
- args: [ElementRef]
1829
- }] }, { type: i0.Renderer2, decorators: [{
1830
- type: Inject,
1831
- args: [Renderer2]
1832
- }] }], propDecorators: { contenteditable: [{
1833
- type: Input
1834
- }], onInput: [{
1835
- type: HostListener,
1836
- args: ['input']
1837
- }], onBlur: [{
1838
- type: HostListener,
1839
- args: ['blur']
1840
- }] } });
1841
-
1842
- // text-editor.component.ts
1843
1838
  class TextEditorComponent {
1844
1839
  constructor() {
1845
1840
  this.value = '<p>Hello this is palash makhija</p>';
1846
1841
  this.valueChange = new EventEmitter();
1847
1842
  this.editable = false;
1843
+ this.platformId = inject(PLATFORM_ID);
1844
+ this.sanitizer = inject(DomSanitizer);
1848
1845
  this.selectedFontSize = '';
1849
1846
  this.showToolbar = false;
1850
1847
  this.toolbarX = 0;
@@ -1855,31 +1852,60 @@ class TextEditorComponent {
1855
1852
  this.isColorPickerOpen = false;
1856
1853
  this.selectedColorType = 'SOLID';
1857
1854
  this.savedSelection = null;
1855
+ this.isFontSizeMenuOpen = false;
1856
+ this.toolbarData = {
1857
+ selectedSize: ''
1858
+ };
1858
1859
  this.handleWindowFocus = () => {
1859
1860
  setTimeout(() => {
1860
1861
  this.isColorPickerOpen = false;
1861
1862
  }, 300);
1862
1863
  };
1863
- this.isFontSizeMenuOpen = false;
1864
- this.toolbarData = {
1865
- selectedSize: ''
1866
- };
1864
+ }
1865
+ ngOnChanges(changes) {
1866
+ if (changes['value']) {
1867
+ console.log('INPUT VALUE:', this.value);
1868
+ this.updateSafeHtml();
1869
+ }
1870
+ }
1871
+ async ngAfterViewInit() {
1872
+ this.updateSafeHtml();
1873
+ if (this.editable &&
1874
+ isPlatformBrowser(this.platformId)) {
1875
+ await this.initializeEditor();
1876
+ }
1867
1877
  }
1868
1878
  ngOnDestroy() {
1869
- if (this.editor) {
1879
+ if (this.editor &&
1880
+ isPlatformBrowser(this.platformId)) {
1870
1881
  this.editor.destroy();
1871
1882
  }
1872
1883
  }
1873
- ngAfterViewInit() {
1874
- if (this.editable) {
1875
- this.initializeEditor();
1876
- }
1884
+ updateSafeHtml() {
1885
+ this.safeHtml =
1886
+ this.sanitizer
1887
+ .bypassSecurityTrustHtml(this.value || '');
1877
1888
  }
1878
- initializeEditor() {
1889
+ async initializeEditor() {
1879
1890
  if (!this.editorElement)
1880
1891
  return;
1892
+ const { Editor } = await import('@tiptap/core');
1893
+ const StarterKit = (await import('@tiptap/starter-kit')).default;
1894
+ const TextStyle = (await import('@tiptap/extension-text-style'))
1895
+ .TextStyle;
1896
+ const Color = (await import('@tiptap/extension-color'))
1897
+ .default;
1898
+ const Underline = (await import('@tiptap/extension-underline'))
1899
+ .default;
1900
+ const TextAlign = (await import('@tiptap/extension-text-align'))
1901
+ .default;
1881
1902
  this.editor = new Editor({
1882
1903
  element: this.editorElement.nativeElement,
1904
+ editorProps: {
1905
+ attributes: {
1906
+ class: 'ProseMirror'
1907
+ }
1908
+ },
1883
1909
  extensions: [
1884
1910
  StarterKit,
1885
1911
  TextStyle,
@@ -1888,7 +1914,11 @@ class TextEditorComponent {
1888
1914
  GradientExtension,
1889
1915
  Underline,
1890
1916
  TextAlign.configure({
1891
- types: ['heading', 'paragraph', 'listItem'],
1917
+ types: [
1918
+ 'heading',
1919
+ 'paragraph',
1920
+ 'listItem'
1921
+ ],
1892
1922
  }),
1893
1923
  ],
1894
1924
  content: this.value,
@@ -1897,19 +1927,36 @@ class TextEditorComponent {
1897
1927
  },
1898
1928
  onUpdate: ({ editor }) => {
1899
1929
  const html = editor.getHTML();
1930
+ console.log('EDITOR HTML:', html);
1900
1931
  this.value = html;
1932
+ this.updateSafeHtml();
1901
1933
  this.valueChange.emit(html);
1934
+ this.updateEmptyEditorClass();
1902
1935
  }
1903
1936
  });
1937
+ this.updateEmptyEditorClass();
1938
+ }
1939
+ updateEmptyEditorClass() {
1940
+ if (!this.editorElement)
1941
+ return;
1942
+ const editorWrapper = this.editorElement.nativeElement
1943
+ .closest('.editable-text');
1944
+ if (!editorWrapper)
1945
+ return;
1946
+ if (this.editor?.isEmpty) {
1947
+ editorWrapper.classList.add('editor-empty');
1948
+ }
1949
+ else {
1950
+ editorWrapper.classList.remove('editor-empty');
1951
+ }
1904
1952
  }
1905
1953
  saveSelection() {
1906
1954
  this.savedSelection =
1907
1955
  this.editor.state.selection;
1908
1956
  }
1909
1957
  restoreSelection() {
1910
- if (!this.savedSelection) {
1958
+ if (!this.savedSelection)
1911
1959
  return;
1912
- }
1913
1960
  this.editor
1914
1961
  .chain()
1915
1962
  .focus()
@@ -1952,30 +1999,30 @@ class TextEditorComponent {
1952
1999
  return;
1953
2000
  }
1954
2001
  const selection = window.getSelection();
1955
- if (!selection || selection.rangeCount === 0) {
2002
+ if (!selection ||
2003
+ selection.rangeCount === 0) {
1956
2004
  this.showToolbar = false;
1957
2005
  return;
1958
2006
  }
1959
2007
  const range = selection.getRangeAt(0);
1960
2008
  const rect = range.getBoundingClientRect();
1961
- const editorRect = this.editorElement.nativeElement.getBoundingClientRect();
2009
+ const editorRect = this.editorElement.nativeElement
2010
+ .getBoundingClientRect();
1962
2011
  this.showToolbar = true;
1963
2012
  setTimeout(() => {
1964
2013
  const toolbar = document.querySelector('.toolbar');
1965
2014
  if (!toolbar)
1966
2015
  return;
1967
2016
  const toolbarWidth = toolbar.offsetWidth;
1968
- // centered position
1969
2017
  let left = rect.left -
1970
2018
  editorRect.left +
1971
2019
  (rect.width / 2) -
1972
2020
  (toolbarWidth / 2);
1973
- // left limit
1974
2021
  left = Math.max(10, left);
1975
- // right limit
1976
- const maxLeft = editorRect.width - toolbarWidth - 10;
2022
+ const maxLeft = editorRect.width -
2023
+ toolbarWidth -
2024
+ 10;
1977
2025
  left = Math.min(left, maxLeft);
1978
- // prevent negative value
1979
2026
  left = Math.max(10, left);
1980
2027
  this.toolbarX = left;
1981
2028
  this.toolbarY =
@@ -2035,7 +2082,10 @@ class TextEditorComponent {
2035
2082
  this.editor
2036
2083
  .chain()
2037
2084
  .focus()
2038
- .setTextSelection({ from, to })
2085
+ .setTextSelection({
2086
+ from,
2087
+ to
2088
+ })
2039
2089
  .setMark('textStyle', {
2040
2090
  ...existingStyles,
2041
2091
  color: this.selectedColor,
@@ -2052,16 +2102,19 @@ class TextEditorComponent {
2052
2102
  return;
2053
2103
  const existingStyles = this.editor.getAttributes('textStyle');
2054
2104
  const gradient = `
2055
- linear-gradient(
2056
- to right,
2057
- ${this.primaryColor},
2058
- ${this.secondaryColor}
2059
- )
2105
+ linear - gradient(
2106
+ to right,
2107
+ ${this.primaryColor},
2108
+ ${this.secondaryColor}
2109
+ )
2060
2110
  `;
2061
2111
  this.editor
2062
2112
  .chain()
2063
2113
  .focus()
2064
- .setTextSelection({ from, to })
2114
+ .setTextSelection({
2115
+ from,
2116
+ to
2117
+ })
2065
2118
  .setMark('textStyle', {
2066
2119
  ...existingStyles,
2067
2120
  backgroundImage: gradient,
@@ -2077,53 +2130,30 @@ class TextEditorComponent {
2077
2130
  if (!this.editor)
2078
2131
  return;
2079
2132
  const { from, to } = this.editor.state.selection;
2080
- this.showToolbar = from !== to;
2133
+ this.showToolbar =
2134
+ from !== to;
2081
2135
  });
2082
2136
  }
2083
- toggleFontSizeMenu(event) {
2084
- this.isFontSizeMenuOpen = !this.isFontSizeMenuOpen;
2085
- event.stopPropagation();
2086
- }
2087
- getDisplayFontSize() {
2088
- const size = this.editor
2089
- ?.getAttributes('textStyle')?.['fontSize'];
2090
- if (!size)
2091
- return '16';
2092
- if (size.includes('0.75rem'))
2093
- return '14';
2094
- if (size.includes('1rem, 3vw'))
2095
- return '20';
2096
- if (size.includes('1.25rem'))
2097
- return '24';
2098
- if (size.includes('2rem'))
2099
- return '32';
2100
- if (size.includes('3.1rem'))
2101
- return '48';
2102
- return '16';
2103
- }
2104
- selectCustomFontSize(cssSize, event) {
2105
- event.stopPropagation();
2106
- this.changeFontSize(cssSize);
2107
- this.isFontSizeMenuOpen = false;
2108
- }
2109
2137
  changeFontSize(fontSize) {
2110
- this.selectedFontSize = fontSize;
2138
+ this.selectedFontSize =
2139
+ fontSize;
2111
2140
  const { from, to } = this.editor.state.selection;
2112
- if (from === to) {
2141
+ if (from === to)
2113
2142
  return;
2114
- }
2115
2143
  this.editor
2116
2144
  .chain()
2117
2145
  .focus()
2118
- .setTextSelection({ from, to })
2119
- // merges with existing styles
2146
+ .setTextSelection({
2147
+ from,
2148
+ to
2149
+ })
2120
2150
  .setMark('textStyle', {
2121
2151
  fontSize
2122
2152
  })
2123
2153
  .run();
2124
2154
  }
2125
2155
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2126
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TextEditorComponent, isStandalone: true, selector: "simpo-text-editor", inputs: { value: "value", editable: "editable", sectionId: "sectionId", label: "label", type: "type" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "document:mousedown": "onMouseDown()" } }, viewQueries: [{ propertyName: "editorElement", first: true, predicate: ["editorContainer"], descendants: true }], ngImport: i0, template: "<!-- text-editor.component.html -->\r\n\r\n<div class=\"editor-container\" *ngIf=\"editable; else viewMode\">\r\n\r\n <!-- FLOATING TOOLBAR -->\r\n <div class=\"toolbar\" *ngIf=\"showToolbar\" [style.top.px]=\"toolbarY\" [style.left.px]=\"toolbarX\" cdkDrag>\r\n <button class=\"tool drag-handle w-auto\" cdkDragHandle>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-grip-vertical\">\r\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\r\n </svg>\r\n </button>\r\n <mat-form-field appearance=\"outline\" class=\"font-size-field\">\r\n\r\n <mat-select [value]=\"selectedFontSize\" (selectionChange)=\"changeFontSize($event.value)\" disableOptionCentering>\r\n\r\n <mat-option value=\"\">\r\n Default\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1rem)\">\r\n 14\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1.25rem)\">\r\n 16\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1rem, 3vw, 1.5rem)\">\r\n 20\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1.25rem, 4vw, 2rem)\">\r\n 24\r\n </mat-option>\r\n <mat-option value=\"clamp(2rem, 5vw, 3rem)\">\r\n 32\r\n </mat-option>\r\n <mat-option value=\"clamp(3.1rem, 7vw, 4.5rem)\">\r\n 48\r\n </mat-option>\r\n </mat-select>\r\n\r\n </mat-form-field>\r\n <!-- BOLD -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('bold')\" (click)=\"toggleBold()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-bold\">\r\n <path d=\"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ITALIC -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('italic')\" (click)=\"toggleItalic()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-italic\">\r\n <line x1=\"19\" x2=\"10\" y1=\"4\" y2=\"4\" />\r\n <line x1=\"14\" x2=\"5\" y1=\"20\" y2=\"20\" />\r\n <line x1=\"15\" x2=\"9\" y1=\"4\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- UNDERLINE -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('underline')\" (click)=\"toggleUnderline()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-underline\">\r\n <path d=\"M6 4v6a6 6 0 0 0 12 0V4\" />\r\n <line x1=\"4\" x2=\"20\" y1=\"20\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN LEFT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('left')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-left\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"17\" x2=\"3\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN CENTER -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('center')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-center\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"17\" x2=\"7\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"19\" x2=\"5\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN RIGHT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('right')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-right\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"21\" x2=\"9\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"21\" x2=\"7\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ORDERED LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleOrderedList()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list-ordered\">\r\n <line x1=\"10\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <path d=\"M4 6h1v4\" />\r\n <path d=\"M4 10h2\" />\r\n <path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\" />\r\n </svg>\r\n </button>\r\n <!-- BULLET LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleBulletList()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list\">\r\n <line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- SOLID / GRADIENT -->\r\n <!-- SOLID / GRADIENT -->\r\n <div class=\"colorType\">\r\n\r\n <button class=\"solid w-auto\" [class.solidColorSelected]=\"selectedColorType === 'SOLID'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToSolid($event)\">\r\n Solid\r\n </button>\r\n\r\n <button class=\"gradient w-auto\" [class.gradientColorSelected]=\"selectedColorType === 'GRADIENT'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToGradient($event)\">\r\n Gradient\r\n </button>\r\n\r\n </div>\r\n\r\n <!-- SOLID COLOR -->\r\n <button class=\"tool color-picker-btn w-auto\" *ngIf=\"selectedColorType === 'SOLID'\">\r\n\r\n <mat-icon>format_color_text</mat-icon>\r\n\r\n <input type=\"color\" class=\"hidden-color-picker\" [(ngModel)]=\"selectedColor\" (click)=\"openColorPicker()\"\r\n (input)=\"changeColor()\">\r\n\r\n </button>\r\n\r\n <!-- GRADIENT -->\r\n <div class=\"gradient-picker\" *ngIf=\"selectedColorType === 'GRADIENT'\">\r\n <input type=\"color\" [(ngModel)]=\"primaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n <input type=\"color\" [(ngModel)]=\"secondaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- TIPTAP EDITOR -->\r\n <div #editorContainer class=\"editable-text\">\r\n </div>\r\n\r\n</div>\r\n<ng-template #viewMode>\r\n <div class=\"read-only-text\" [innerHTML]=\"value\">\r\n </div>\r\n</ng-template>", styles: ["*{font-family:var(--website-font-family)}mat-icon{font-family:Material Icons!important}.editor-container{position:relative;width:100%}.editable-text{cursor:text;width:100%;border:1px solid lightgrey;border-radius:10px}.editable-text ::ng-deep p{margin-bottom:0!important}::ng-deep .ProseMirror ol,::ng-deep .ProseMirror ul{padding-left:2rem;margin-left:0;list-style-position:inside}::ng-deep .ProseMirror li{text-align:inherit;margin-bottom:5px}::ng-deep .ProseMirror li p{display:inline}.ProseMirror{outline:none;min-height:120px;padding:5px}.ProseMirror p{margin:0}.toolbar{position:absolute;left:0;top:0;display:flex;align-items:center;gap:5px;background:#fff;padding:8px 14px;border-radius:22px;z-index:100000;box-shadow:#00000029 0 1px 4px;max-width:calc(100vw - 20px);overflow-x:auto;box-sizing:border-box}.tool{background:none;border:none;padding:5px 8px;cursor:pointer;display:flex;align-items:center}.tool:hover{background:#eee;border-radius:5px}.selectedTool{background:var(--primary-bg-color)!important;color:#fff;border-radius:5px}.color-picker-btn{position:relative}.color-picker-btn mat-icon{font-size:22px!important}.hidden-color-picker{position:absolute;inset:0;opacity:0;cursor:pointer}.gradient-text{background:linear-gradient(to right,var(--gradient-start),var(--gradient-end));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;color:transparent;display:inline-block}.colorType{display:flex;border:1px solid #E9E9E9;border-radius:9px;overflow:hidden}.colorType button{font-size:12px!important;padding:7px 9px!important;border:none;background:#fff;cursor:pointer}.solid{border-right:1px solid #E9E9E9!important}.solidColorSelected,.gradientColorSelected{background:var(--primary-bg-color)!important;color:#fff}.gradient-picker{display:flex;gap:5px}.gradient-picker input{width:32px;height:32px;border:none;padding:0;cursor:pointer}.white-space-nowrap{white-space:nowrap}.font-size-field{width:120px;border:1px solid lightgrey;border-radius:10px}::ng-deep .font-size-field .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .font-size-field .mdc-notched-outline{display:none}::ng-deep .font-size-field .mat-mdc-text-field-wrapper{background:transparent!important;padding-left:8px!important;padding-right:8px!important;height:36px!important}::ng-deep .font-size-field .mat-mdc-select-value{font-size:14px;font-weight:600}::ng-deep .mat-mdc-select-panel{border-radius:12px!important}@media screen and (max-width: 475px){.toolbar{max-width:95%;flex-wrap:wrap;row-gap:10px}}@media screen and (max-width: 768px){.toolbar{width:max-content;max-width:calc(100vw - 20px);flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i12.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatFormFieldModule }] }); }
2156
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TextEditorComponent, isStandalone: true, selector: "simpo-text-editor", inputs: { value: "value", editable: "editable", sectionId: "sectionId", label: "label", type: "type" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "document:mousedown": "onMouseDown()" } }, viewQueries: [{ propertyName: "editorElement", first: true, predicate: ["editorContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- text-editor.component.html -->\r\n\r\n<div class=\"editor-container\" *ngIf=\"editable; else viewMode\">\r\n\r\n <!-- FLOATING TOOLBAR -->\r\n <div class=\"toolbar\" *ngIf=\"showToolbar\" [style.top.px]=\"toolbarY\" [style.left.px]=\"toolbarX\" cdkDrag>\r\n <button class=\"tool drag-handle w-auto\" cdkDragHandle>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-grip-vertical\">\r\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\r\n </svg>\r\n </button>\r\n <mat-form-field appearance=\"outline\" class=\"font-size-field\">\r\n\r\n <mat-select [value]=\"selectedFontSize\" (selectionChange)=\"changeFontSize($event.value)\" disableOptionCentering>\r\n\r\n <mat-option value=\"\">\r\n Default\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1rem)\">\r\n 14\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1.25rem)\">\r\n 16\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1rem, 3vw, 1.5rem)\">\r\n 20\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1.25rem, 4vw, 2rem)\">\r\n 24\r\n </mat-option>\r\n <mat-option value=\"clamp(2rem, 5vw, 3rem)\">\r\n 32\r\n </mat-option>\r\n <mat-option value=\"clamp(3.1rem, 7vw, 4.5rem)\">\r\n 48\r\n </mat-option>\r\n </mat-select>\r\n\r\n </mat-form-field>\r\n <!-- BOLD -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('bold')\" (click)=\"toggleBold()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-bold\">\r\n <path d=\"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ITALIC -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('italic')\" (click)=\"toggleItalic()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-italic\">\r\n <line x1=\"19\" x2=\"10\" y1=\"4\" y2=\"4\" />\r\n <line x1=\"14\" x2=\"5\" y1=\"20\" y2=\"20\" />\r\n <line x1=\"15\" x2=\"9\" y1=\"4\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- UNDERLINE -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('underline')\" (click)=\"toggleUnderline()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-underline\">\r\n <path d=\"M6 4v6a6 6 0 0 0 12 0V4\" />\r\n <line x1=\"4\" x2=\"20\" y1=\"20\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN LEFT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('left')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-left\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"17\" x2=\"3\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN CENTER -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('center')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-center\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"17\" x2=\"7\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"19\" x2=\"5\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN RIGHT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('right')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-right\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"21\" x2=\"9\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"21\" x2=\"7\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ORDERED LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleOrderedList()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list-ordered\">\r\n <line x1=\"10\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <path d=\"M4 6h1v4\" />\r\n <path d=\"M4 10h2\" />\r\n <path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\" />\r\n </svg>\r\n </button>\r\n <!-- BULLET LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleBulletList()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list\">\r\n <line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- SOLID / GRADIENT -->\r\n <!-- SOLID / GRADIENT -->\r\n <div class=\"colorType\">\r\n\r\n <button class=\"solid w-auto\" [class.solidColorSelected]=\"selectedColorType === 'SOLID'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToSolid($event)\">\r\n Solid\r\n </button>\r\n\r\n <button class=\"gradient w-auto\" [class.gradientColorSelected]=\"selectedColorType === 'GRADIENT'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToGradient($event)\">\r\n Gradient\r\n </button>\r\n\r\n </div>\r\n\r\n <!-- SOLID COLOR -->\r\n <button class=\"tool color-picker-btn w-auto\" *ngIf=\"selectedColorType === 'SOLID'\">\r\n\r\n <mat-icon>format_color_text</mat-icon>\r\n\r\n <input type=\"color\" class=\"hidden-color-picker\" [(ngModel)]=\"selectedColor\" (click)=\"openColorPicker()\"\r\n (input)=\"changeColor()\">\r\n\r\n </button>\r\n\r\n <!-- GRADIENT -->\r\n <div class=\"gradient-picker\" *ngIf=\"selectedColorType === 'GRADIENT'\">\r\n <input type=\"color\" [(ngModel)]=\"primaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n <input type=\"color\" [(ngModel)]=\"secondaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- TIPTAP EDITOR -->\r\n <div #editorContainer class=\"editable-text\">\r\n </div>\r\n\r\n</div>\r\n<ng-template #viewMode>\r\n <div class=\"read-only-text\" [innerHTML]=\"safeHtml\">\r\n </div>\r\n</ng-template>", styles: ["*{font-family:var(--website-font-family)}mat-icon{font-family:Material Icons!important}.editor-container{position:relative;width:100%}.editable-text{cursor:text;width:100%;border:1px solid lightgrey;border-radius:10px}.editable-text ::ng-deep p{margin-bottom:0!important}::ng-deep .ProseMirror ol,::ng-deep .ProseMirror ul{padding-left:2rem;margin-left:0;list-style-position:inside}::ng-deep .ProseMirror li{text-align:inherit;margin-bottom:5px}::ng-deep .ProseMirror li p{display:inline}.ProseMirror{outline:none;min-height:120px;padding:5px}.ProseMirror p{margin:0}.toolbar{position:absolute;left:0;top:0;line-height:inherit!important;display:flex;align-items:center;gap:5px;background:#fff;padding:8px 14px;border-radius:22px;z-index:100000;box-shadow:#00000029 0 1px 4px;max-width:calc(100vw - 20px);overflow-x:auto;box-sizing:border-box}.tool{background:none;border:none;padding:5px 8px;cursor:pointer;display:flex;align-items:center}.tool:hover{background:#eee;border-radius:5px}.selectedTool{background:var(--primary-bg-color)!important;color:#fff;border-radius:5px}.color-picker-btn{position:relative}.color-picker-btn mat-icon{font-size:22px!important}.hidden-color-picker{position:absolute;inset:0;opacity:0;cursor:pointer}.gradient-text{background:linear-gradient(to right,var(--gradient-start),var(--gradient-end));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;color:transparent;display:inline-block}.colorType{display:flex;border:1px solid #E9E9E9;border-radius:9px;overflow:hidden}.colorType button{font-size:12px!important;padding:7px 9px!important;border:none;background:#fff;cursor:pointer}.solid{border-right:1px solid #E9E9E9!important}.solidColorSelected,.gradientColorSelected{background:var(--primary-bg-color)!important;color:#fff}.gradient-picker{display:flex;gap:5px}.gradient-picker input{width:32px;height:32px;border:none;padding:0;cursor:pointer}.white-space-nowrap{white-space:nowrap}.font-size-field{width:120px;border:1px solid lightgrey;border-radius:10px}::ng-deep .font-size-field .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .font-size-field .mdc-notched-outline{display:none}::ng-deep .font-size-field .mat-mdc-text-field-wrapper{background:transparent!important;padding-left:8px!important;padding-right:8px!important;height:36px!important}::ng-deep .font-size-field .mat-mdc-select-value{font-size:14px;font-weight:600}::ng-deep .mat-mdc-select-panel{border-radius:12px!important}@media screen and (max-width: 475px){.toolbar{max-width:95%;flex-wrap:wrap;row-gap:10px}}@media screen and (max-width: 768px){.toolbar{width:max-content;max-width:calc(100vw - 20px);flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i12.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatFormFieldModule }] }); }
2127
2157
  }
2128
2158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextEditorComponent, decorators: [{
2129
2159
  type: Component,
@@ -2135,7 +2165,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2135
2165
  MatSelectModule,
2136
2166
  MatFormFieldModule,
2137
2167
  ContenteditableValueAccessor
2138
- ], template: "<!-- text-editor.component.html -->\r\n\r\n<div class=\"editor-container\" *ngIf=\"editable; else viewMode\">\r\n\r\n <!-- FLOATING TOOLBAR -->\r\n <div class=\"toolbar\" *ngIf=\"showToolbar\" [style.top.px]=\"toolbarY\" [style.left.px]=\"toolbarX\" cdkDrag>\r\n <button class=\"tool drag-handle w-auto\" cdkDragHandle>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-grip-vertical\">\r\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\r\n </svg>\r\n </button>\r\n <mat-form-field appearance=\"outline\" class=\"font-size-field\">\r\n\r\n <mat-select [value]=\"selectedFontSize\" (selectionChange)=\"changeFontSize($event.value)\" disableOptionCentering>\r\n\r\n <mat-option value=\"\">\r\n Default\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1rem)\">\r\n 14\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1.25rem)\">\r\n 16\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1rem, 3vw, 1.5rem)\">\r\n 20\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1.25rem, 4vw, 2rem)\">\r\n 24\r\n </mat-option>\r\n <mat-option value=\"clamp(2rem, 5vw, 3rem)\">\r\n 32\r\n </mat-option>\r\n <mat-option value=\"clamp(3.1rem, 7vw, 4.5rem)\">\r\n 48\r\n </mat-option>\r\n </mat-select>\r\n\r\n </mat-form-field>\r\n <!-- BOLD -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('bold')\" (click)=\"toggleBold()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-bold\">\r\n <path d=\"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ITALIC -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('italic')\" (click)=\"toggleItalic()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-italic\">\r\n <line x1=\"19\" x2=\"10\" y1=\"4\" y2=\"4\" />\r\n <line x1=\"14\" x2=\"5\" y1=\"20\" y2=\"20\" />\r\n <line x1=\"15\" x2=\"9\" y1=\"4\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- UNDERLINE -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('underline')\" (click)=\"toggleUnderline()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-underline\">\r\n <path d=\"M6 4v6a6 6 0 0 0 12 0V4\" />\r\n <line x1=\"4\" x2=\"20\" y1=\"20\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN LEFT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('left')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-left\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"17\" x2=\"3\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN CENTER -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('center')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-center\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"17\" x2=\"7\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"19\" x2=\"5\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN RIGHT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('right')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-right\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"21\" x2=\"9\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"21\" x2=\"7\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ORDERED LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleOrderedList()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list-ordered\">\r\n <line x1=\"10\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <path d=\"M4 6h1v4\" />\r\n <path d=\"M4 10h2\" />\r\n <path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\" />\r\n </svg>\r\n </button>\r\n <!-- BULLET LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleBulletList()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list\">\r\n <line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- SOLID / GRADIENT -->\r\n <!-- SOLID / GRADIENT -->\r\n <div class=\"colorType\">\r\n\r\n <button class=\"solid w-auto\" [class.solidColorSelected]=\"selectedColorType === 'SOLID'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToSolid($event)\">\r\n Solid\r\n </button>\r\n\r\n <button class=\"gradient w-auto\" [class.gradientColorSelected]=\"selectedColorType === 'GRADIENT'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToGradient($event)\">\r\n Gradient\r\n </button>\r\n\r\n </div>\r\n\r\n <!-- SOLID COLOR -->\r\n <button class=\"tool color-picker-btn w-auto\" *ngIf=\"selectedColorType === 'SOLID'\">\r\n\r\n <mat-icon>format_color_text</mat-icon>\r\n\r\n <input type=\"color\" class=\"hidden-color-picker\" [(ngModel)]=\"selectedColor\" (click)=\"openColorPicker()\"\r\n (input)=\"changeColor()\">\r\n\r\n </button>\r\n\r\n <!-- GRADIENT -->\r\n <div class=\"gradient-picker\" *ngIf=\"selectedColorType === 'GRADIENT'\">\r\n <input type=\"color\" [(ngModel)]=\"primaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n <input type=\"color\" [(ngModel)]=\"secondaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- TIPTAP EDITOR -->\r\n <div #editorContainer class=\"editable-text\">\r\n </div>\r\n\r\n</div>\r\n<ng-template #viewMode>\r\n <div class=\"read-only-text\" [innerHTML]=\"value\">\r\n </div>\r\n</ng-template>", styles: ["*{font-family:var(--website-font-family)}mat-icon{font-family:Material Icons!important}.editor-container{position:relative;width:100%}.editable-text{cursor:text;width:100%;border:1px solid lightgrey;border-radius:10px}.editable-text ::ng-deep p{margin-bottom:0!important}::ng-deep .ProseMirror ol,::ng-deep .ProseMirror ul{padding-left:2rem;margin-left:0;list-style-position:inside}::ng-deep .ProseMirror li{text-align:inherit;margin-bottom:5px}::ng-deep .ProseMirror li p{display:inline}.ProseMirror{outline:none;min-height:120px;padding:5px}.ProseMirror p{margin:0}.toolbar{position:absolute;left:0;top:0;display:flex;align-items:center;gap:5px;background:#fff;padding:8px 14px;border-radius:22px;z-index:100000;box-shadow:#00000029 0 1px 4px;max-width:calc(100vw - 20px);overflow-x:auto;box-sizing:border-box}.tool{background:none;border:none;padding:5px 8px;cursor:pointer;display:flex;align-items:center}.tool:hover{background:#eee;border-radius:5px}.selectedTool{background:var(--primary-bg-color)!important;color:#fff;border-radius:5px}.color-picker-btn{position:relative}.color-picker-btn mat-icon{font-size:22px!important}.hidden-color-picker{position:absolute;inset:0;opacity:0;cursor:pointer}.gradient-text{background:linear-gradient(to right,var(--gradient-start),var(--gradient-end));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;color:transparent;display:inline-block}.colorType{display:flex;border:1px solid #E9E9E9;border-radius:9px;overflow:hidden}.colorType button{font-size:12px!important;padding:7px 9px!important;border:none;background:#fff;cursor:pointer}.solid{border-right:1px solid #E9E9E9!important}.solidColorSelected,.gradientColorSelected{background:var(--primary-bg-color)!important;color:#fff}.gradient-picker{display:flex;gap:5px}.gradient-picker input{width:32px;height:32px;border:none;padding:0;cursor:pointer}.white-space-nowrap{white-space:nowrap}.font-size-field{width:120px;border:1px solid lightgrey;border-radius:10px}::ng-deep .font-size-field .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .font-size-field .mdc-notched-outline{display:none}::ng-deep .font-size-field .mat-mdc-text-field-wrapper{background:transparent!important;padding-left:8px!important;padding-right:8px!important;height:36px!important}::ng-deep .font-size-field .mat-mdc-select-value{font-size:14px;font-weight:600}::ng-deep .mat-mdc-select-panel{border-radius:12px!important}@media screen and (max-width: 475px){.toolbar{max-width:95%;flex-wrap:wrap;row-gap:10px}}@media screen and (max-width: 768px){.toolbar{width:max-content;max-width:calc(100vw - 20px);flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}}\n"] }]
2168
+ ], template: "<!-- text-editor.component.html -->\r\n\r\n<div class=\"editor-container\" *ngIf=\"editable; else viewMode\">\r\n\r\n <!-- FLOATING TOOLBAR -->\r\n <div class=\"toolbar\" *ngIf=\"showToolbar\" [style.top.px]=\"toolbarY\" [style.left.px]=\"toolbarX\" cdkDrag>\r\n <button class=\"tool drag-handle w-auto\" cdkDragHandle>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-grip-vertical\">\r\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\r\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\r\n </svg>\r\n </button>\r\n <mat-form-field appearance=\"outline\" class=\"font-size-field\">\r\n\r\n <mat-select [value]=\"selectedFontSize\" (selectionChange)=\"changeFontSize($event.value)\" disableOptionCentering>\r\n\r\n <mat-option value=\"\">\r\n Default\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1rem)\">\r\n 14\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(0.75rem, 2vw, 1.25rem)\">\r\n 16\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1rem, 3vw, 1.5rem)\">\r\n 20\r\n </mat-option>\r\n\r\n <mat-option value=\"clamp(1.25rem, 4vw, 2rem)\">\r\n 24\r\n </mat-option>\r\n <mat-option value=\"clamp(2rem, 5vw, 3rem)\">\r\n 32\r\n </mat-option>\r\n <mat-option value=\"clamp(3.1rem, 7vw, 4.5rem)\">\r\n 48\r\n </mat-option>\r\n </mat-select>\r\n\r\n </mat-form-field>\r\n <!-- BOLD -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('bold')\" (click)=\"toggleBold()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-bold\">\r\n <path d=\"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ITALIC -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('italic')\" (click)=\"toggleItalic()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-italic\">\r\n <line x1=\"19\" x2=\"10\" y1=\"4\" y2=\"4\" />\r\n <line x1=\"14\" x2=\"5\" y1=\"20\" y2=\"20\" />\r\n <line x1=\"15\" x2=\"9\" y1=\"4\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- UNDERLINE -->\r\n <button class=\"tool w-auto\" [class.selectedTool]=\"editor?.isActive('underline')\" (click)=\"toggleUnderline()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-underline\">\r\n <path d=\"M6 4v6a6 6 0 0 0 12 0V4\" />\r\n <line x1=\"4\" x2=\"20\" y1=\"20\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN LEFT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('left')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-left\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"17\" x2=\"3\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN CENTER -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('center')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-center\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"17\" x2=\"7\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"19\" x2=\"5\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ALIGN RIGHT -->\r\n <button class=\"tool w-auto\" (click)=\"setAlign('right')\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-align-right\">\r\n <line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"21\" x2=\"9\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"21\" x2=\"7\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- ORDERED LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleOrderedList()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list-ordered\">\r\n <line x1=\"10\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"10\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <path d=\"M4 6h1v4\" />\r\n <path d=\"M4 10h2\" />\r\n <path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\" />\r\n </svg>\r\n </button>\r\n <!-- BULLET LIST -->\r\n <button class=\"tool w-auto\" (click)=\"toggleBulletList()\">\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\r\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\r\n class=\"lucide lucide-list\">\r\n <line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\" />\r\n <line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n\r\n <!-- SOLID / GRADIENT -->\r\n <!-- SOLID / GRADIENT -->\r\n <div class=\"colorType\">\r\n\r\n <button class=\"solid w-auto\" [class.solidColorSelected]=\"selectedColorType === 'SOLID'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToSolid($event)\">\r\n Solid\r\n </button>\r\n\r\n <button class=\"gradient w-auto\" [class.gradientColorSelected]=\"selectedColorType === 'GRADIENT'\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"switchToGradient($event)\">\r\n Gradient\r\n </button>\r\n\r\n </div>\r\n\r\n <!-- SOLID COLOR -->\r\n <button class=\"tool color-picker-btn w-auto\" *ngIf=\"selectedColorType === 'SOLID'\">\r\n\r\n <mat-icon>format_color_text</mat-icon>\r\n\r\n <input type=\"color\" class=\"hidden-color-picker\" [(ngModel)]=\"selectedColor\" (click)=\"openColorPicker()\"\r\n (input)=\"changeColor()\">\r\n\r\n </button>\r\n\r\n <!-- GRADIENT -->\r\n <div class=\"gradient-picker\" *ngIf=\"selectedColorType === 'GRADIENT'\">\r\n <input type=\"color\" [(ngModel)]=\"primaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n <input type=\"color\" [(ngModel)]=\"secondaryColor\" (click)=\"openColorPicker()\" (input)=\"applyGradient()\" />\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- TIPTAP EDITOR -->\r\n <div #editorContainer class=\"editable-text\">\r\n </div>\r\n\r\n</div>\r\n<ng-template #viewMode>\r\n <div class=\"read-only-text\" [innerHTML]=\"safeHtml\">\r\n </div>\r\n</ng-template>", styles: ["*{font-family:var(--website-font-family)}mat-icon{font-family:Material Icons!important}.editor-container{position:relative;width:100%}.editable-text{cursor:text;width:100%;border:1px solid lightgrey;border-radius:10px}.editable-text ::ng-deep p{margin-bottom:0!important}::ng-deep .ProseMirror ol,::ng-deep .ProseMirror ul{padding-left:2rem;margin-left:0;list-style-position:inside}::ng-deep .ProseMirror li{text-align:inherit;margin-bottom:5px}::ng-deep .ProseMirror li p{display:inline}.ProseMirror{outline:none;min-height:120px;padding:5px}.ProseMirror p{margin:0}.toolbar{position:absolute;left:0;top:0;line-height:inherit!important;display:flex;align-items:center;gap:5px;background:#fff;padding:8px 14px;border-radius:22px;z-index:100000;box-shadow:#00000029 0 1px 4px;max-width:calc(100vw - 20px);overflow-x:auto;box-sizing:border-box}.tool{background:none;border:none;padding:5px 8px;cursor:pointer;display:flex;align-items:center}.tool:hover{background:#eee;border-radius:5px}.selectedTool{background:var(--primary-bg-color)!important;color:#fff;border-radius:5px}.color-picker-btn{position:relative}.color-picker-btn mat-icon{font-size:22px!important}.hidden-color-picker{position:absolute;inset:0;opacity:0;cursor:pointer}.gradient-text{background:linear-gradient(to right,var(--gradient-start),var(--gradient-end));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;color:transparent;display:inline-block}.colorType{display:flex;border:1px solid #E9E9E9;border-radius:9px;overflow:hidden}.colorType button{font-size:12px!important;padding:7px 9px!important;border:none;background:#fff;cursor:pointer}.solid{border-right:1px solid #E9E9E9!important}.solidColorSelected,.gradientColorSelected{background:var(--primary-bg-color)!important;color:#fff}.gradient-picker{display:flex;gap:5px}.gradient-picker input{width:32px;height:32px;border:none;padding:0;cursor:pointer}.white-space-nowrap{white-space:nowrap}.font-size-field{width:120px;border:1px solid lightgrey;border-radius:10px}::ng-deep .font-size-field .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .font-size-field .mdc-notched-outline{display:none}::ng-deep .font-size-field .mat-mdc-text-field-wrapper{background:transparent!important;padding-left:8px!important;padding-right:8px!important;height:36px!important}::ng-deep .font-size-field .mat-mdc-select-value{font-size:14px;font-weight:600}::ng-deep .mat-mdc-select-panel{border-radius:12px!important}@media screen and (max-width: 475px){.toolbar{max-width:95%;flex-wrap:wrap;row-gap:10px}}@media screen and (max-width: 768px){.toolbar{width:max-content;max-width:calc(100vw - 20px);flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}}\n"] }]
2139
2169
  }], propDecorators: { value: [{
2140
2170
  type: Input
2141
2171
  }], valueChange: [{
@@ -3293,9 +3323,7 @@ class checkItemAlreadyAdded {
3293
3323
  }
3294
3324
 
3295
3325
  class RestService {
3296
- constructor(http,
3297
- // private readonly eventService: EventsService,
3298
- BASE_URL, ECOMMERCE_URL, CMIS_URL, cookieService, storage, PASSBOOK_URL, APPOINTMENT_URL, RECOMMENDATION_URL) {
3326
+ constructor(http, BASE_URL, ECOMMERCE_URL, CMIS_URL, cookieService, storage, PASSBOOK_URL, APPOINTMENT_URL, RECOMMENDATION_URL) {
3299
3327
  this.http = http;
3300
3328
  this.BASE_URL = BASE_URL;
3301
3329
  this.ECOMMERCE_URL = ECOMMERCE_URL;
@@ -3313,20 +3341,6 @@ class RestService {
3313
3341
  this.environmentTypeSubscriber = null;
3314
3342
  this.isJewellery = false;
3315
3343
  this.orraBaseUrl = 'https://stageapi-orra.letsmobility.com/';
3316
- // this.environmentTypeSubscriber = this.eventService.environmentType.subscribe((response) => {
3317
- // if (response == "DEV") {
3318
- // this.BASE_URL = "https://dev-api.simpo.ai/";
3319
- // this.ECOMMERCE_URL = "https://dev-ecommerce.simpo.ai/";
3320
- // }
3321
- // else if (response == "STAGE") {
3322
- // this.ECOMMERCE_URL = "https://stage-ecommerce.simpo.ai/";
3323
- // this.BASE_URL = "https://state-api.simpo.ai/";
3324
- // }
3325
- // else {
3326
- // this.BASE_URL = "https://api-cmis.tejsoft.com/";
3327
- // this.ECOMMERCE_URL = "https://prod-ecommerce.simpo.ai/";
3328
- // }
3329
- // })
3330
3344
  }
3331
3345
  // passBookUrl: string = "https://prod-passbook.simpo.ai/";
3332
3346
  getBusinessDetails() {