@procore/text-editor 0.5.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/.jest/ckeditorMock.js +47 -23
  2. package/CHANGELOG.md +30 -0
  3. package/README.md +96 -7
  4. package/dist/TextEditor/CKTextEditor.d.ts +3 -0
  5. package/dist/TextEditor/CKTextEditor.js +312 -0
  6. package/dist/TextEditor/CKTextEditor.js.map +1 -0
  7. package/dist/TextEditor/Providers/FeatureFlagProvider.d.ts +5 -0
  8. package/dist/TextEditor/Providers/FeatureFlagProvider.js +34 -0
  9. package/dist/TextEditor/Providers/FeatureFlagProvider.js.map +1 -0
  10. package/dist/TextEditor/TextEditor.d.ts +1 -1
  11. package/dist/TextEditor/TextEditor.js +16 -232
  12. package/dist/TextEditor/TextEditor.js.map +1 -1
  13. package/dist/TextEditor/TextEditor.styles.d.ts +14 -1
  14. package/dist/TextEditor/TextEditor.styles.js +18 -5
  15. package/dist/TextEditor/TextEditor.styles.js.map +1 -1
  16. package/dist/TextEditor/TextEditor.types.d.ts +82 -1
  17. package/dist/TextEditor/TextEditor.types.js.map +1 -1
  18. package/dist/TextEditor/TextEditorI18nProvider.d.ts +2 -0
  19. package/dist/TextEditor/TextEditorI18nProvider.js +27 -0
  20. package/dist/TextEditor/TextEditorI18nProvider.js.map +1 -0
  21. package/dist/TextEditor/TinyMCETextEditor.d.ts +3 -0
  22. package/dist/TextEditor/TinyMCETextEditor.js +63 -0
  23. package/dist/TextEditor/TinyMCETextEditor.js.map +1 -0
  24. package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/NormalizeTableWidthPlugin.d.ts +15 -0
  25. package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/NormalizeTableWidthPlugin.js +72 -0
  26. package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/NormalizeTableWidthPlugin.js.map +1 -0
  27. package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/index.d.ts +1 -0
  28. package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/index.js +2 -0
  29. package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/index.js.map +1 -0
  30. package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.d.ts +48 -0
  31. package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.js +441 -0
  32. package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.js.map +1 -0
  33. package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/index.d.ts +1 -0
  34. package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/index.js +2 -0
  35. package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/index.js.map +1 -0
  36. package/dist/TextEditor/utils/config.d.ts +6 -1
  37. package/dist/TextEditor/utils/config.js +25 -10
  38. package/dist/TextEditor/utils/config.js.map +1 -1
  39. package/dist/TextEditor/utils/imageAttributes.d.ts +6 -0
  40. package/dist/TextEditor/utils/imageAttributes.js +17 -0
  41. package/dist/TextEditor/utils/imageAttributes.js.map +1 -0
  42. package/dist/TextEditor/utils/imageUrls.d.ts +2 -0
  43. package/dist/TextEditor/utils/imageUrls.js +36 -0
  44. package/dist/TextEditor/utils/imageUrls.js.map +1 -0
  45. package/dist/TextEditor/utils/richTextEditorHandlers.d.ts +9 -0
  46. package/dist/TextEditor/utils/richTextEditorHandlers.js +234 -0
  47. package/dist/TextEditor/utils/richTextEditorHandlers.js.map +1 -0
  48. package/dist/TextEditorOutput/TextEditorOutput.styles.js +2 -2
  49. package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -1
  50. package/dist/TextEditorOutput/TextEditorOutput.utils.d.ts +1 -1
  51. package/dist/TextEditorOutput/TextEditorOutput.utils.js +150 -6
  52. package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +1 -1
  53. package/dist/_typedoc/TextEditor/TextEditor.types.json +215 -17
  54. package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
  55. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
  56. package/dist/ckeditor5-premium-features.d.js +2 -0
  57. package/dist/ckeditor5-premium-features.d.js.map +1 -0
  58. package/dist/locales/en.json +17 -0
  59. package/dist/locales/pseudo.json +17 -0
  60. package/dist/utils/debounce.js +4 -4
  61. package/dist/utils/debounce.js.map +1 -1
  62. package/package.json +8 -3
@@ -1,4 +1,132 @@
1
1
  {
2
+ "TextEditorImageUploadHandlers": {
3
+ "name": "TextEditorImageUploadHandlers",
4
+ "properties": [
5
+ {
6
+ "name": "i18n",
7
+ "required": true,
8
+ "type": "<span class=\"tsd-signature-type\">Pick</span><span class=\"tsd-signature-symbol\">&lt;</span><span class=\"tsd-signature-type\">I18njs</span><span class=\"tsd-signature-symbol\">, </span><span class=\"tsd-signature-type\">&quot;t&quot;</span><span class=\"tsd-signature-symbol\">&gt;</span>",
9
+ "typeDetail": "<span class=\"tsd-signature-type\">Pick</span><span class=\"tsd-signature-symbol\">&lt;</span><span class=\"tsd-signature-type\">I18njs</span><span class=\"tsd-signature-symbol\">, </span><span class=\"tsd-signature-type\">&quot;t&quot;</span><span class=\"tsd-signature-symbol\">&gt;</span>",
10
+ "description": "",
11
+ "descriptionHtml": "",
12
+ "sourceFile": "TextEditor/TextEditor.types.ts",
13
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
14
+ },
15
+ {
16
+ "name": "onError",
17
+ "required": false,
18
+ "type": "Function",
19
+ "typeDetail": "on<wbr/>Error<span class=\"tsd-signature-symbol\">(</span>message<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
20
+ "description": "",
21
+ "descriptionHtml": "",
22
+ "sourceFile": "TextEditor/TextEditor.types.ts",
23
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L35"
24
+ },
25
+ {
26
+ "name": "onWarning",
27
+ "required": false,
28
+ "type": "Function",
29
+ "typeDetail": "on<wbr/>Warning<span class=\"tsd-signature-symbol\">(</span>message<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
30
+ "description": "",
31
+ "descriptionHtml": "",
32
+ "sourceFile": "TextEditor/TextEditor.types.ts",
33
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L36"
34
+ },
35
+ {
36
+ "name": "upload",
37
+ "required": true,
38
+ "type": "Function",
39
+ "typeDetail": "upload<span class=\"tsd-signature-symbol\">(</span>file<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">File</span>, context<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-symbol\">{ </span>signal<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">AbortSignal</span><span class=\"tsd-signature-symbol\"> }</span>, callbacks<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-symbol\">{ </span>onProgress<span class=\"tsd-signature-symbol\">?: </span><span class=\"tsd-signature-type\">any</span><span class=\"tsd-signature-symbol\"> }</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">Promise</span><span class=\"tsd-signature-symbol\">&lt;</span><a class=\"tsd-signature-type\" data-tsd-kind=\"Interface\">TextEditorImageUploadResult</a><span class=\"tsd-signature-symbol\">&gt;</span>",
40
+ "description": "Uploads the selected image and returns durable backend-approved image URLs.",
41
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Uploads the selected image and returns durable backend-approved image URLs.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.4.2</p>\n</dd></dl></div>",
42
+ "sourceFile": "TextEditor/TextEditor.types.ts",
43
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L29"
44
+ }
45
+ ],
46
+ "description": ""
47
+ },
48
+ "TextEditorImageUploadOptions": {
49
+ "name": "TextEditorImageUploadOptions",
50
+ "properties": [
51
+ {
52
+ "name": "companyId",
53
+ "required": false,
54
+ "type": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
55
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
56
+ "description": "Required to enable image uploads. When omitted, the editor renders without\nthe Procore image-upload plugin.",
57
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Required to enable image uploads. When omitted, the editor renders without\nthe Procore image-upload plugin.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.5.0</p>\n</dd></dl></div>",
58
+ "sourceFile": "TextEditor/TextEditor.types.ts",
59
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L46"
60
+ },
61
+ {
62
+ "name": "projectId",
63
+ "required": false,
64
+ "type": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
65
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
66
+ "description": "",
67
+ "descriptionHtml": "",
68
+ "sourceFile": "TextEditor/TextEditor.types.ts",
69
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L47"
70
+ },
71
+ {
72
+ "name": "toolName",
73
+ "required": false,
74
+ "type": "<span class=\"tsd-signature-type\">string</span>",
75
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
76
+ "description": "Identifier of the tool hosting the editor (e.g. `rfis`, `submittal_log`).\nRequired to enable image uploads: it is sent with each upload for\nattribution/audit and is validated by the backend against known tools.\nWhen omitted, the editor renders without the Procore image-upload plugin.",
77
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Identifier of the tool hosting the editor (e.g. <code>rfis</code>, <code>submittal_log</code>).\nRequired to enable image uploads: it is sent with each upload for\nattribution/audit and is validated by the backend against known tools.\nWhen omitted, the editor renders without the Procore image-upload plugin.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.7.0</p>\n</dd></dl></div>",
78
+ "sourceFile": "TextEditor/TextEditor.types.ts",
79
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L56"
80
+ }
81
+ ],
82
+ "description": ""
83
+ },
84
+ "TextEditorImageUploadResult": {
85
+ "name": "TextEditorImageUploadResult",
86
+ "properties": [
87
+ {
88
+ "name": "height",
89
+ "required": false,
90
+ "type": "<span class=\"tsd-signature-type\">number</span>",
91
+ "typeDetail": "<span class=\"tsd-signature-type\">number</span>",
92
+ "description": "",
93
+ "descriptionHtml": "",
94
+ "sourceFile": "TextEditor/TextEditor.types.ts",
95
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
96
+ },
97
+ {
98
+ "name": "prostoreFileId",
99
+ "required": true,
100
+ "type": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
101
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
102
+ "description": "Durable ProstoreFile id. The text editor embeds this ID in saved markup to\nmark the image as a first-party upload (backend email/PDF sanitizers rely on\nit). The persisted URL is a permanent, publicly fetchable Prostore URL, so\nit renders as-is in the app, emails, and exports.",
103
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Durable ProstoreFile id. The text editor embeds this ID in saved markup to\nmark the image as a first-party upload (backend email/PDF sanitizers rely on\nit). The persisted URL is a permanent, publicly fetchable Prostore URL, so\nit renders as-is in the app, emails, and exports.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.6.0</p>\n</dd></dl></div>",
104
+ "sourceFile": "TextEditor/TextEditor.types.ts",
105
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L18"
106
+ },
107
+ {
108
+ "name": "urls",
109
+ "required": true,
110
+ "type": "<span class=\"tsd-signature-symbol\">{ </span>default<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> }</span>",
111
+ "typeDetail": "<span class=\"tsd-signature-symbol\">{ </span>default<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> }</span>",
112
+ "description": "",
113
+ "descriptionHtml": "",
114
+ "sourceFile": "TextEditor/TextEditor.types.ts",
115
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L7"
116
+ },
117
+ {
118
+ "name": "width",
119
+ "required": false,
120
+ "type": "<span class=\"tsd-signature-type\">number</span>",
121
+ "typeDetail": "<span class=\"tsd-signature-type\">number</span>",
122
+ "description": "",
123
+ "descriptionHtml": "",
124
+ "sourceFile": "TextEditor/TextEditor.types.ts",
125
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L19"
126
+ }
127
+ ],
128
+ "description": ""
129
+ },
2
130
  "TextEditorProps": {
3
131
  "name": "TextEditorProps",
4
132
  "properties": [
@@ -10,7 +138,7 @@
10
138
  "description": "Accessible description for the editor's editable area.\nThis text provides additional context to screen reader users. It will be\nannounced after the label when the user focuses the editor.",
11
139
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Accessible description for the editor&#39;s editable area.\nThis text provides additional context to screen reader users. It will be\nannounced after the label when the user focuses the editor.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.1.0</p>\n</dd></dl></div>",
12
140
  "sourceFile": "TextEditor/TextEditor.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L68"
141
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L123"
14
142
  },
15
143
  {
16
144
  "name": "aria-label",
@@ -20,7 +148,17 @@
20
148
  "description": "Accessible label for the editor's editable area. This text will be\nannounced by screen readers when the user focuses the editor. It should\nmatch or include the visible label associated with this editor field.\nIf not provided, screen readers will announce a generic \"Rich Text Editor\" message.",
21
149
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Accessible label for the editor&#39;s editable area. This text will be\nannounced by screen readers when the user focuses the editor. It should\nmatch or include the visible label associated with this editor field.\nIf not provided, screen readers will announce a generic &quot;Rich Text Editor&quot; message.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.1.0</p>\n</dd></dl></div>",
22
150
  "sourceFile": "TextEditor/TextEditor.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L59"
151
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L114"
152
+ },
153
+ {
154
+ "name": "companyId",
155
+ "required": false,
156
+ "type": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
157
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
158
+ "description": "Required to enable image uploads. When omitted, the editor renders without\nthe Procore image-upload plugin.",
159
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Required to enable image uploads. When omitted, the editor renders without\nthe Procore image-upload plugin.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.5.0</p>\n</dd></dl></div>",
160
+ "sourceFile": "TextEditor/TextEditor.types.ts",
161
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L46"
24
162
  },
25
163
  {
26
164
  "name": "disabled",
@@ -30,7 +168,17 @@
30
168
  "description": "Indicates if the editor is disabled",
31
169
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is disabled</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
32
170
  "sourceFile": "TextEditor/TextEditor.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
171
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L89"
172
+ },
173
+ {
174
+ "name": "enforceCKEditor",
175
+ "required": false,
176
+ "type": "<span class=\"tsd-signature-type\">true</span>",
177
+ "typeDetail": "<span class=\"tsd-signature-type\">true</span>",
178
+ "description": "Opt in to CKEditor immediately, bypassing the gradual feature flag rollout.\nUse this only when you explicitly want to ignore the rollout schedule.\nWhen enabled, the LaunchDarkly flag is bypassed and CKEditor is rendered directly.",
179
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Opt in to CKEditor immediately, bypassing the gradual feature flag rollout.\nUse this only when you explicitly want to ignore the rollout schedule.\nWhen enabled, the LaunchDarkly flag is bypassed and CKEditor is rendered directly.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>1.0.0</p>\n</dd></dl></div>",
180
+ "sourceFile": "TextEditor/TextEditor.types.ts",
181
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L229"
34
182
  },
35
183
  {
36
184
  "name": "error",
@@ -40,7 +188,7 @@
40
188
  "description": "Indicates if the editor is in an error state",
41
189
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is in an error state</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
42
190
  "sourceFile": "TextEditor/TextEditor.types.ts",
43
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L41"
191
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L96"
44
192
  },
45
193
  {
46
194
  "name": "id",
@@ -50,7 +198,17 @@
50
198
  "description": "Unique identifier for the editor",
51
199
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Unique identifier for the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
52
200
  "sourceFile": "TextEditor/TextEditor.types.ts",
53
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L10"
201
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L65"
202
+ },
203
+ {
204
+ "name": "init",
205
+ "required": false,
206
+ "type": "<span class=\"tsd-signature-type\">InitOptions</span>",
207
+ "typeDetail": "<span class=\"tsd-signature-type\">InitOptions</span>",
208
+ "description": "TinyMCE init configuration. Merged with internal defaults; use this to\npass custom content_style, paste hooks, or other TinyMCE-specific options.\nHas no effect when CKEditor is active.",
209
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>TinyMCE init configuration. Merged with internal defaults; use this to\npass custom content_style, paste hooks, or other TinyMCE-specific options.\nHas no effect when CKEditor is active.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>1.0.0</p>\n</dd></dl></div>",
210
+ "sourceFile": "TextEditor/TextEditor.types.ts",
211
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L212"
54
212
  },
55
213
  {
56
214
  "name": "initialValue",
@@ -62,7 +220,7 @@
62
220
  "deprecated": "`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead",
63
221
  "deprecatedSince": "0.0.1",
64
222
  "sourceFile": "TextEditor/TextEditor.types.ts",
65
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
223
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L75"
66
224
  },
67
225
  {
68
226
  "name": "locale",
@@ -72,7 +230,27 @@
72
230
  "description": "Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.",
73
231
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
74
232
  "sourceFile": "TextEditor/TextEditor.types.ts",
75
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L75"
233
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L130"
234
+ },
235
+ {
236
+ "name": "placeholder",
237
+ "required": false,
238
+ "type": "<span class=\"tsd-signature-type\">string</span>",
239
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
240
+ "description": "Placeholder text shown when the editor is empty",
241
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Placeholder text shown when the editor is empty</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>1.0.0</p>\n</dd></dl></div>",
242
+ "sourceFile": "TextEditor/TextEditor.types.ts",
243
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L203"
244
+ },
245
+ {
246
+ "name": "projectId",
247
+ "required": false,
248
+ "type": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
249
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">number</span>",
250
+ "description": "",
251
+ "descriptionHtml": "",
252
+ "sourceFile": "TextEditor/TextEditor.types.ts",
253
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L47"
76
254
  },
77
255
  {
78
256
  "name": "readonly",
@@ -82,7 +260,27 @@
82
260
  "description": "Indicates if the editor is in readonly mode.\nWhen true, renders the content using TextEditorOutput instead of the editable editor.",
83
261
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is in readonly mode.\nWhen true, renders the content using TextEditorOutput instead of the editable editor.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.2.0</p>\n</dd></dl></div>",
84
262
  "sourceFile": "TextEditor/TextEditor.types.ts",
85
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L49"
263
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L104"
264
+ },
265
+ {
266
+ "name": "rows",
267
+ "required": false,
268
+ "type": "<span class=\"tsd-signature-type\">number</span>",
269
+ "typeDetail": "<span class=\"tsd-signature-type\">number</span>",
270
+ "description": "Number of rows to control the editor height. When set, the editor height\nis fixed. When omitted, the editor grows with content.",
271
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Number of rows to control the editor height. When set, the editor height\nis fixed. When omitted, the editor grows with content.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>1.0.0</p>\n</dd></dl></div>",
272
+ "sourceFile": "TextEditor/TextEditor.types.ts",
273
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L220"
274
+ },
275
+ {
276
+ "name": "toolName",
277
+ "required": false,
278
+ "type": "<span class=\"tsd-signature-type\">string</span>",
279
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
280
+ "description": "Identifier of the tool hosting the editor (e.g. `rfis`, `submittal_log`).\nRequired to enable image uploads: it is sent with each upload for\nattribution/audit and is validated by the backend against known tools.\nWhen omitted, the editor renders without the Procore image-upload plugin.",
281
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Identifier of the tool hosting the editor (e.g. <code>rfis</code>, <code>submittal_log</code>).\nRequired to enable image uploads: it is sent with each upload for\nattribution/audit and is validated by the backend against known tools.\nWhen omitted, the editor renders without the Procore image-upload plugin.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.7.0</p>\n</dd></dl></div>",
282
+ "sourceFile": "TextEditor/TextEditor.types.ts",
283
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L56"
86
284
  },
87
285
  {
88
286
  "name": "value",
@@ -92,7 +290,7 @@
92
290
  "description": "The current value of the editor",
93
291
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The current value of the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
94
292
  "sourceFile": "TextEditor/TextEditor.types.ts",
95
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L27"
293
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L82"
96
294
  },
97
295
  {
98
296
  "name": "onAfterDestroy",
@@ -102,7 +300,7 @@
102
300
  "description": "Callback fired after the editor instance is destroyed",
103
301
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired after the editor instance is destroyed</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
104
302
  "sourceFile": "TextEditor/TextEditor.types.ts",
105
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L125"
303
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L180"
106
304
  },
107
305
  {
108
306
  "name": "onBlur",
@@ -112,7 +310,7 @@
112
310
  "description": "Callback fired when the editor loses focus",
113
311
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor loses focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
114
312
  "sourceFile": "TextEditor/TextEditor.types.ts",
115
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L98"
313
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L153"
116
314
  },
117
315
  {
118
316
  "name": "onChange",
@@ -122,7 +320,7 @@
122
320
  "description": "Callback fired when the editor content changes",
123
321
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor content changes</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
124
322
  "sourceFile": "TextEditor/TextEditor.types.ts",
125
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L84"
323
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L139"
126
324
  },
127
325
  {
128
326
  "name": "onDirty",
@@ -132,7 +330,7 @@
132
330
  "description": "Callback fired when the editor becomes dirty (content differs from initial value)",
133
331
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor becomes dirty (content differs from initial value)</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
134
332
  "sourceFile": "TextEditor/TextEditor.types.ts",
135
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L132"
333
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L187"
136
334
  },
137
335
  {
138
336
  "name": "onError",
@@ -142,7 +340,7 @@
142
340
  "description": "Callback fired when an error occurs in the editor",
143
341
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when an error occurs in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
144
342
  "sourceFile": "TextEditor/TextEditor.types.ts",
145
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L105"
343
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L160"
146
344
  },
147
345
  {
148
346
  "name": "onFocus",
@@ -152,7 +350,7 @@
152
350
  "description": "Callback fired when the editor gains focus",
153
351
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor gains focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
154
352
  "sourceFile": "TextEditor/TextEditor.types.ts",
155
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L91"
353
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L146"
156
354
  },
157
355
  {
158
356
  "name": "onInit",
@@ -162,7 +360,7 @@
162
360
  "description": "Callback fired when the editor is ready",
163
361
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor is ready</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
164
362
  "sourceFile": "TextEditor/TextEditor.types.ts",
165
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L118"
363
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L173"
166
364
  },
167
365
  {
168
366
  "name": "onKeyDown",
@@ -172,7 +370,7 @@
172
370
  "description": "Callback fired when a key is pressed in the editor",
173
371
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when a key is pressed in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
174
372
  "sourceFile": "TextEditor/TextEditor.types.ts",
175
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L141"
373
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditor.types.ts#L196"
176
374
  }
177
375
  ],
178
376
  "description": ""
@@ -10,7 +10,7 @@
10
10
  "description": "",
11
11
  "descriptionHtml": "",
12
12
  "sourceFile": "TextEditor/TextEditorProvider.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L9"
13
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L9"
14
14
  },
15
15
  {
16
16
  "name": "features",
@@ -20,7 +20,7 @@
20
20
  "description": "- `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.\n- `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.",
21
21
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<ul>\n<li><code>stickyToolbar</code> - Have the editor toolbar stick to the top when content is longer than the page length.</li>\n<li><code>tabAsNavigation</code> - Have <code>Tab</code> key exit the editor. Support <code>Alt</code>/<code>Opt</code> + <code>Tab</code> as triple space indent.</li>\n</ul>\n</div></div>",
22
22
  "sourceFile": "TextEditor/TextEditorProvider.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L14"
23
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L14"
24
24
  }
25
25
  ],
26
26
  "description": ""
@@ -10,7 +10,7 @@
10
10
  "description": "Additional classNames",
11
11
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
12
12
  "sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
13
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
14
14
  },
15
15
  {
16
16
  "name": "style",
@@ -20,7 +20,7 @@
20
20
  "description": "Additional CSS styles",
21
21
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
22
22
  "sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
23
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
24
24
  },
25
25
  {
26
26
  "name": "value",
@@ -30,7 +30,7 @@
30
30
  "description": "Formatted text from `TextEditor`",
31
31
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Formatted text from <code>TextEditor</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
32
32
  "sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
33
+ "sourceUrl": "https://github.com/procore/core/blob/bb2ee27/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
34
34
  }
35
35
  ],
36
36
  "description": ""
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ckeditor5-premium-features.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ckeditor5-premium-features.d.js","names":[],"sources":["../src/ckeditor5-premium-features.d.ts"],"sourcesContent":["declare module 'ckeditor5-premium-features' {\n import type { Editor, PluginConstructor } from 'ckeditor5'\n\n export const MultiLevelList: PluginConstructor<Editor>\n}\n"],"mappings":""}
@@ -0,0 +1,17 @@
1
+ {
2
+ "textEditor": {
3
+ "imageUpload": {
4
+ "noFile": "We couldn't find an image to upload. Choose a file and try again.",
5
+ "aborted": "Image upload was canceled before it finished. Try uploading it again.",
6
+ "unsupportedType": "%{type}files aren't supported.",
7
+ "pdfUnsupportedType": "%{type}images won't appear in PDF exports.",
8
+ "dismissWarning": "Dismiss warning",
9
+ "fileTooLarge": "Images must be 10 MB or smaller.",
10
+ "imageLimit": "You've reached the limit of %{count} images. Remove one before adding another.",
11
+ "unreadable": "This file couldn't be read as an image. Choose a different image and try again.",
12
+ "failed": "We couldn't upload this image. Check your connection and try again.",
13
+ "invalidProstoreFileId": "Something went wrong uploading this image. Please try again.",
14
+ "invalidImageUrl": "Something went wrong uploading this image. Please try again."
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "textEditor": {
3
+ "imageUpload": {
4
+ "noFile": "[ŴŴḗ · ƈǿŭŀḓƞ'ŧ · ƒīƞḓ · ȧƞ · īḿȧɠḗ · ŧǿ · ŭƥŀǿȧḓ · Ƈħǿǿşḗ · ȧ · ƒīŀḗ · ȧƞḓ · ŧřẏ · ȧɠȧīƞƞƞƞ]",
5
+ "aborted": "[ĪĪḿȧɠḗ · ŭƥŀǿȧḓ · ẇȧş · ƈȧƞƈḗŀḗḓ · ƀḗƒǿřḗ · īŧ · ƒīƞīşħḗḓ · Ŧřẏ · ŭƥŀǿȧḓīƞɠ · īŧ · ȧɠȧīƞƞƞƞ]",
6
+ "unsupportedType": "[%{type}ƒīŀḗş · ȧřḗƞ'ŧ · şŭƥƥǿřŧḗḓḓḓ]",
7
+ "pdfUnsupportedType": "[%{type}īḿȧɠḗş · ẇǿƞ'ŧ · ȧƥƥḗȧř · īƞ · ƤḒƑ · ḗẋƥǿřŧşşşş]",
8
+ "dismissWarning": "[ḒḒīşḿīşş · ẇȧřƞīƞɠɠɠɠ]",
9
+ "fileTooLarge": "[ŦŦħīş · īḿȧɠḗ · īş · ŧǿǿ · ŀȧřɠḗ · Ƈħǿǿşḗ · ȧƞ · īḿȧɠḗ · ŧħȧŧ'ş · 10 · ḾƁ · ǿř · şḿȧŀŀḗřřřř]",
10
+ "imageLimit": "[ẎẎǿŭ'ṽḗ · řḗȧƈħḗḓ · ŧħḗ · ŀīḿīŧ · ǿƒ · %{count} · īḿȧɠḗş · Řḗḿǿṽḗ · ǿƞḗ · ƀḗƒǿřḗ · ȧḓḓīƞɠ · ȧƞǿŧħḗřřřř]",
11
+ "unreadable": "[ŦŦħīş · ƒīŀḗ · ƈǿŭŀḓƞ'ŧ · ƀḗ · řḗȧḓ · ȧş · ȧƞ · īḿȧɠḗ · Ƈħǿǿşḗ · ȧ · ḓīƒƒḗřḗƞŧ · īḿȧɠḗ · ȧƞḓ · ŧřẏ · ȧɠȧīƞƞƞƞ]",
12
+ "failed": "[ŴŴḗ · ƈǿŭŀḓƞ'ŧ · ŭƥŀǿȧḓ · ŧħīş · īḿȧɠḗ · Ƈħḗƈķ · ẏǿŭř · ƈǿƞƞḗƈŧīǿƞ · ȧƞḓ · ŧřẏ · ȧɠȧīƞƞƞƞ]",
13
+ "invalidProstoreFileId": "[ŴŴḗ · ƈǿŭŀḓƞ'ŧ · ƒīƞīşħ · ŭƥŀǿȧḓīƞɠ · ŧħīş · īḿȧɠḗ · Ŧřẏ · ȧɠȧīƞ · ǿř · ƈǿƞŧȧƈŧ · şŭƥƥǿřŧ · īƒ · īŧ · ķḗḗƥş · ħȧƥƥḗƞīƞɠɠɠɠ]",
14
+ "invalidImageUrl": "[ŴŴḗ · ƈǿŭŀḓƞ'ŧ · ƒīƞīşħ · ŭƥŀǿȧḓīƞɠ · ŧħīş · īḿȧɠḗ · Ŧřẏ · ȧɠȧīƞ · ǿř · ƈǿƞŧȧƈŧ · şŭƥƥǿřŧ · īƒ · īŧ · ķḗḗƥş · ħȧƥƥḗƞīƞɠɠɠɠ]"
15
+ }
16
+ }
17
+ }
@@ -3,12 +3,12 @@ export function debounce(func, wait) {
3
3
  var timeout = null;
4
4
  var pending = null;
5
5
  var debounced = function debounced() {
6
+ var _this = this;
6
7
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7
8
  args[_key] = arguments[_key];
8
9
  }
9
- var context = this;
10
10
  pending = function pending() {
11
- return func.apply(context, args);
11
+ return func.apply(_this, args);
12
12
  };
13
13
  var callNow = immediate && timeout === null;
14
14
  if (timeout !== null) {
@@ -17,11 +17,11 @@ export function debounce(func, wait) {
17
17
  timeout = setTimeout(function () {
18
18
  timeout = null;
19
19
  if (!immediate) {
20
- func.apply(context, args);
20
+ func.apply(_this, args);
21
21
  }
22
22
  }, wait);
23
23
  if (callNow) {
24
- func.apply(context, args);
24
+ func.apply(this, args);
25
25
  }
26
26
  };
27
27
  debounced.flush = function () {
@@ -1 +1 @@
1
- {"version":3,"file":"debounce.js","names":["debounce","func","wait","immediate","arguments","length","undefined","timeout","pending","debounced","_len","args","Array","_key","context","apply","callNow","clearTimeout","setTimeout","flush","_pending"],"sources":["../../src/utils/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => void>(\n func: T,\n wait: number,\n immediate: boolean = false\n) {\n let timeout: ReturnType<typeof setTimeout> | null = null\n let pending: (() => void) | null = null\n\n const debounced = function (\n this: ThisParameterType<T>,\n ...args: Parameters<T>\n ): void {\n const context = this\n pending = () => func.apply(context, args)\n\n const callNow = immediate && timeout === null\n\n if (timeout !== null) {\n clearTimeout(timeout)\n }\n\n timeout = setTimeout(() => {\n timeout = null\n if (!immediate) {\n func.apply(context, args)\n }\n }, wait)\n\n if (callNow) {\n func.apply(context, args)\n }\n }\n\n debounced.flush = () => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n pending?.()\n }\n }\n\n return debounced\n}\n"],"mappings":"AAAA,OAAO,SAASA,QAAQA,CACtBC,IAAO,EACPC,IAAY,EAEZ;EAAA,IADAC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE1B,IAAIG,OAA6C,GAAG,IAAI;EACxD,IAAIC,OAA4B,GAAG,IAAI;EAEvC,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAGP;IAAA,SAAAC,IAAA,GAAAN,SAAA,CAAAC,MAAA,EADHM,IAAI,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAT,SAAA,CAAAS,IAAA;IAAA;IAEP,IAAMC,OAAO,GAAG,IAAI;IACpBN,OAAO,GAAG,SAAVA,OAAOA,CAAA;MAAA,OAASP,IAAI,CAACc,KAAK,CAACD,OAAO,EAAEH,IAAI,CAAC;IAAA;IAEzC,IAAMK,OAAO,GAAGb,SAAS,IAAII,OAAO,KAAK,IAAI;IAE7C,IAAIA,OAAO,KAAK,IAAI,EAAE;MACpBU,YAAY,CAACV,OAAO,CAAC;IACvB;IAEAA,OAAO,GAAGW,UAAU,CAAC,YAAM;MACzBX,OAAO,GAAG,IAAI;MACd,IAAI,CAACJ,SAAS,EAAE;QACdF,IAAI,CAACc,KAAK,CAACD,OAAO,EAAEH,IAAI,CAAC;MAC3B;IACF,CAAC,EAAET,IAAI,CAAC;IAER,IAAIc,OAAO,EAAE;MACXf,IAAI,CAACc,KAAK,CAACD,OAAO,EAAEH,IAAI,CAAC;IAC3B;EACF,CAAC;EAEDF,SAAS,CAACU,KAAK,GAAG,YAAM;IACtB,IAAIZ,OAAO,KAAK,IAAI,EAAE;MAAA,IAAAa,QAAA;MACpBH,YAAY,CAACV,OAAO,CAAC;MACrBA,OAAO,GAAG,IAAI;MACd,CAAAa,QAAA,GAAAZ,OAAO,cAAAY,QAAA,uBAAPA,QAAA,CAAU,CAAC;IACb;EACF,CAAC;EAED,OAAOX,SAAS;AAClB"}
1
+ {"version":3,"file":"debounce.js","names":["debounce","func","wait","immediate","arguments","length","undefined","timeout","pending","debounced","_this","_len","args","Array","_key","apply","callNow","clearTimeout","setTimeout","flush","_pending"],"sources":["../../src/utils/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => void>(\n func: T,\n wait: number,\n immediate: boolean = false\n) {\n let timeout: ReturnType<typeof setTimeout> | null = null\n let pending: (() => void) | null = null\n\n const debounced = function (\n this: ThisParameterType<T>,\n ...args: Parameters<T>\n ): void {\n pending = () => func.apply(this, args)\n\n const callNow = immediate && timeout === null\n\n if (timeout !== null) {\n clearTimeout(timeout)\n }\n\n timeout = setTimeout(() => {\n timeout = null\n if (!immediate) {\n func.apply(this, args)\n }\n }, wait)\n\n if (callNow) {\n func.apply(this, args)\n }\n }\n\n debounced.flush = () => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n pending?.()\n }\n }\n\n return debounced\n}\n"],"mappings":"AAAA,OAAO,SAASA,QAAQA,CACtBC,IAAO,EACPC,IAAY,EAEZ;EAAA,IADAC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE1B,IAAIG,OAA6C,GAAG,IAAI;EACxD,IAAIC,OAA4B,GAAG,IAAI;EAEvC,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAGP;IAAA,IAAAC,KAAA;IAAA,SAAAC,IAAA,GAAAP,SAAA,CAAAC,MAAA,EADHO,IAAI,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAV,SAAA,CAAAU,IAAA;IAAA;IAEPN,OAAO,GAAG,SAAVA,OAAOA,CAAA;MAAA,OAASP,IAAI,CAACc,KAAK,CAACL,KAAI,EAAEE,IAAI,CAAC;IAAA;IAEtC,IAAMI,OAAO,GAAGb,SAAS,IAAII,OAAO,KAAK,IAAI;IAE7C,IAAIA,OAAO,KAAK,IAAI,EAAE;MACpBU,YAAY,CAACV,OAAO,CAAC;IACvB;IAEAA,OAAO,GAAGW,UAAU,CAAC,YAAM;MACzBX,OAAO,GAAG,IAAI;MACd,IAAI,CAACJ,SAAS,EAAE;QACdF,IAAI,CAACc,KAAK,CAACL,KAAI,EAAEE,IAAI,CAAC;MACxB;IACF,CAAC,EAAEV,IAAI,CAAC;IAER,IAAIc,OAAO,EAAE;MACXf,IAAI,CAACc,KAAK,CAAC,IAAI,EAAEH,IAAI,CAAC;IACxB;EACF,CAAC;EAEDH,SAAS,CAACU,KAAK,GAAG,YAAM;IACtB,IAAIZ,OAAO,KAAK,IAAI,EAAE;MAAA,IAAAa,QAAA;MACpBH,YAAY,CAACV,OAAO,CAAC;MACrBA,OAAO,GAAG,IAAI;MACd,CAAAa,QAAA,GAAAZ,OAAO,cAAAY,QAAA,uBAAPA,QAAA,CAAU,CAAC;IACb;EACF,CAAC;EAED,OAAOX,SAAS;AAClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/text-editor",
3
- "version": "0.5.0",
3
+ "version": "1.0.0",
4
4
  "description": "Rich text editor component based on CKEditor 5",
5
5
  "author": "Procore Technologies",
6
6
  "homepage": "https://github.com/procore/core/tree/main/packages/text-editor",
@@ -69,7 +69,7 @@
69
69
  "test:watch": "yarn run test --watch"
70
70
  },
71
71
  "peerDependencies": {
72
- "@procore/core-react": "^12.49.1",
72
+ "@procore/core-react": "^12.52.0",
73
73
  "@procore/globalization-toolkit": ">= 3 < 4",
74
74
  "ckeditor5": ">= 47 < 49",
75
75
  "ckeditor5-premium-features": ">= 47 < 49",
@@ -79,8 +79,13 @@
79
79
  },
80
80
  "dependencies": {
81
81
  "@ckeditor/ckeditor5-react": "^11.1.2",
82
+ "@procore/cdn-translations": "^1.0.0",
83
+ "@procore/core-http": "^13.1.0",
82
84
  "@procore/core-i18n-js": "^10.30.0",
83
85
  "@procore/core-icons": "^12.18.0",
86
+ "@procore/toast-alert": "^5.2.0",
87
+ "@procore/web-sdk-env-utils": "^0.1.0",
88
+ "@procore/web-sdk-feature-toggle": "^2.7.0",
84
89
  "@react-aria/focus": "3.16.2",
85
90
  "@react-aria/utils": "3.23.2",
86
91
  "sanitize-html": "^2.17.0"
@@ -94,7 +99,7 @@
94
99
  "@babel/preset-react": "7.18.6",
95
100
  "@babel/preset-typescript": "7.18.6",
96
101
  "@babel/register": "7.18.9",
97
- "@procore/core-react": "^12.49.1",
102
+ "@procore/core-react": "^12.52.0",
98
103
  "@procore/globalization-toolkit": "3.0.0",
99
104
  "@storybook/addon-webpack5-compiler-swc": "^4.0.2",
100
105
  "@storybook/jest": "^0.2.3",