@procore/text-editor 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @procore/text-editor
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ffcbad8: chore: don't assign `this` to a variable sonar lint failure
8
+ - bee0d43: Fix tables pasted from spreadsheets (Excel / Google Sheets) rendering collapsed by normalizing invalid zero/NaN figure widths during the clipboard paste pipeline.
9
+ - Updated dependencies [f0bb16b]
10
+ - Updated dependencies [195f0ba]
11
+ - Updated dependencies [0b792e4]
12
+ - @procore/core-react@12.50.1
13
+
3
14
  ## 0.5.0
4
15
 
5
16
  ### Minor Changes
@@ -30,7 +30,7 @@ export var GlobalEditorStyles = /*#__PURE__*/createGlobalStyle([":root{--ck-z-de
30
30
  });
31
31
  export var StyledTextEditor = /*#__PURE__*/styled.div.withConfig({
32
32
  displayName: "StyledTextEditor",
33
- componentId: "text-editor-0_5_0__sc-iim79x-0"
33
+ componentId: "text-editor-0_5_1__sc-iim79x-0"
34
34
  })([".ck.ck-editor{opacity:", ";}", ""], function (_ref0) {
35
35
  var ready = _ref0.ready;
36
36
  return ready ? 1 : 0;
@@ -0,0 +1,15 @@
1
+ import { Plugin } from 'ckeditor5';
2
+ /**
3
+ * Fixes broken table widths injected when pasting from a spreadsheet
4
+ * (Excel / Google Sheets). Such content arrives with `width:0px` on the table
5
+ * figure/table and can produce `width:NaN%` columns, collapsing the table.
6
+ *
7
+ * We intercept the clipboard `inputTransformation` (runs on the pasted view
8
+ * fragment, before it becomes editor content) and normalize widths at the
9
+ * source, so the bogus values never enter the model — keeping both the editing
10
+ * view and the saved data correct.
11
+ */
12
+ export declare class NormalizeTableWidthPlugin extends Plugin {
13
+ static get pluginName(): string;
14
+ init(): void;
15
+ }
@@ -0,0 +1,72 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
3
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
+ import { Plugin, UpcastWriter } from 'ckeditor5';
15
+ var isInvalidWidth = function isInvalidWidth(width) {
16
+ if (!width) return false;
17
+ if (/nan/i.test(width)) return true;
18
+ var numeric = Number.parseFloat(width);
19
+ return Number.isNaN(numeric) || numeric === 0;
20
+ };
21
+
22
+ /**
23
+ * Fixes broken table widths injected when pasting from a spreadsheet
24
+ * (Excel / Google Sheets). Such content arrives with `width:0px` on the table
25
+ * figure/table and can produce `width:NaN%` columns, collapsing the table.
26
+ *
27
+ * We intercept the clipboard `inputTransformation` (runs on the pasted view
28
+ * fragment, before it becomes editor content) and normalize widths at the
29
+ * source, so the bogus values never enter the model — keeping both the editing
30
+ * view and the saved data correct.
31
+ */
32
+ export var NormalizeTableWidthPlugin = /*#__PURE__*/function (_Plugin) {
33
+ function NormalizeTableWidthPlugin() {
34
+ _classCallCheck(this, NormalizeTableWidthPlugin);
35
+ return _callSuper(this, NormalizeTableWidthPlugin, arguments);
36
+ }
37
+ _inherits(NormalizeTableWidthPlugin, _Plugin);
38
+ return _createClass(NormalizeTableWidthPlugin, [{
39
+ key: "init",
40
+ value: function init() {
41
+ var editor = this.editor;
42
+ var clipboardPipeline = editor.plugins.get('ClipboardPipeline');
43
+ clipboardPipeline.on('inputTransformation', function (_evt, data) {
44
+ var writer = new UpcastWriter(editor.editing.view.document);
45
+ normalizeNode(data.content, writer);
46
+ });
47
+ }
48
+ }], [{
49
+ key: "pluginName",
50
+ get: function get() {
51
+ return 'NormalizeTableWidth';
52
+ }
53
+ }]);
54
+ }(Plugin);
55
+ function normalizeNode(node, writer) {
56
+ var _element$getChildren;
57
+ var element = node;
58
+ if (element.is('element', 'figure') || element.is('element', 'table')) {
59
+ if (isInvalidWidth(element.getStyle('width'))) {
60
+ writer.removeStyle('width', element);
61
+ writer.setStyle('width', '100%', element);
62
+ }
63
+ }
64
+ var children = (_element$getChildren = element.getChildren) === null || _element$getChildren === void 0 ? void 0 : _element$getChildren.call(element);
65
+ if (children) {
66
+ for (var _i = 0, _Array$from = Array.from(children); _i < _Array$from.length; _i++) {
67
+ var child = _Array$from[_i];
68
+ normalizeNode(child, writer);
69
+ }
70
+ }
71
+ }
72
+ //# sourceMappingURL=NormalizeTableWidthPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NormalizeTableWidthPlugin.js","names":["Plugin","UpcastWriter","isInvalidWidth","width","test","numeric","Number","parseFloat","isNaN","NormalizeTableWidthPlugin","_Plugin","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","init","editor","clipboardPipeline","plugins","get","on","_evt","data","writer","editing","view","document","normalizeNode","content","node","_element$getChildren","element","is","getStyle","removeStyle","setStyle","children","getChildren","call","_i","_Array$from","Array","from","length","child"],"sources":["../../../../src/TextEditor/plugins/NormalizeTableWidthPlugin/NormalizeTableWidthPlugin.ts"],"sourcesContent":["import type { ViewDocumentFragment, ViewElement, ViewNode } from 'ckeditor5'\nimport { Plugin, UpcastWriter } from 'ckeditor5'\n\nconst isInvalidWidth = (width: string | undefined): boolean => {\n if (!width) return false\n if (/nan/i.test(width)) return true\n const numeric = Number.parseFloat(width)\n return Number.isNaN(numeric) || numeric === 0\n}\n\n/**\n * Fixes broken table widths injected when pasting from a spreadsheet\n * (Excel / Google Sheets). Such content arrives with `width:0px` on the table\n * figure/table and can produce `width:NaN%` columns, collapsing the table.\n *\n * We intercept the clipboard `inputTransformation` (runs on the pasted view\n * fragment, before it becomes editor content) and normalize widths at the\n * source, so the bogus values never enter the model — keeping both the editing\n * view and the saved data correct.\n */\nexport class NormalizeTableWidthPlugin extends Plugin {\n static get pluginName() {\n return 'NormalizeTableWidth'\n }\n\n init() {\n const editor = this.editor\n const clipboardPipeline = editor.plugins.get('ClipboardPipeline')\n clipboardPipeline.on('inputTransformation', (_evt, data) => {\n const writer = new UpcastWriter(editor.editing.view.document)\n normalizeNode(data.content, writer)\n })\n }\n}\n\nfunction normalizeNode(\n node: ViewNode | ViewDocumentFragment,\n writer: UpcastWriter\n): void {\n const element = node as ViewElement\n\n if (element.is('element', 'figure') || element.is('element', 'table')) {\n if (isInvalidWidth(element.getStyle('width'))) {\n writer.removeStyle('width', element)\n writer.setStyle('width', '100%', element)\n }\n }\n\n const children = element.getChildren?.()\n if (children) {\n for (const child of Array.from(children)) {\n normalizeNode(child, writer)\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AACA,SAASA,MAAM,EAAEC,YAAY,QAAQ,WAAW;AAEhD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAyB,EAAc;EAC7D,IAAI,CAACA,KAAK,EAAE,OAAO,KAAK;EACxB,IAAI,MAAM,CAACC,IAAI,CAACD,KAAK,CAAC,EAAE,OAAO,IAAI;EACnC,IAAME,OAAO,GAAGC,MAAM,CAACC,UAAU,CAACJ,KAAK,CAAC;EACxC,OAAOG,MAAM,CAACE,KAAK,CAACH,OAAO,CAAC,IAAIA,OAAO,KAAK,CAAC;AAC/C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAaI,yBAAyB,0BAAAC,OAAA;EAAA,SAAAD,0BAAA;IAAAE,eAAA,OAAAF,yBAAA;IAAA,OAAAG,UAAA,OAAAH,yBAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,yBAAA,EAAAC,OAAA;EAAA,OAAAK,YAAA,CAAAN,yBAAA;IAAAO,GAAA;IAAAC,KAAA,EAKpC,SAAAC,IAAIA,CAAA,EAAG;MACL,IAAMC,MAAM,GAA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AK,GAAAJ,WAAA,CAAAD,EAAA;MACdZ,aAAa,CAACiB,KAAK,EAAErB,MAAM,CAAC;IAC9B;EACF;AACF"}
@@ -0,0 +1 @@
1
+ export * from './NormalizeTableWidthPlugin';
@@ -0,0 +1,2 @@
1
+ export * from './NormalizeTableWidthPlugin';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/TextEditor/plugins/NormalizeTableWidthPlugin/index.ts"],"sourcesContent":["export * from './NormalizeTableWidthPlugin'\n"],"mappings":"AAAA,cAAc,6BAA6B"}
@@ -3,6 +3,7 @@ import { MultiLevelList } from 'ckeditor5-premium-features';
3
3
  import { CK_EDITOR_LICENSE_KEY } from '../license_key';
4
4
  import { CutPlugin } from '../plugins/CutPlugin';
5
5
  import { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin';
6
+ import { NormalizeTableWidthPlugin } from '../plugins/NormalizeTableWidthPlugin';
6
7
  import { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin';
7
8
  import { PastePlugin } from '../plugins/PastePlugin';
8
9
  import { TabSpacesPlugin } from '../plugins/TabSpacesPlugin';
@@ -58,7 +59,7 @@ export var getDefaultConfig = function getDefaultConfig() {
58
59
  licenseKey: CK_EDITOR_LICENSE_KEY,
59
60
  language: getValidEditorLocale(locale),
60
61
  translations: [getEditorTranslation(locale)],
61
- plugins: [Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Indent, IndentBlock, Italic, Link, List, ListProperties, MultiLevelList, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline, CutPlugin, PastePlugin, PasteAsTextPlugin, IndentPaddingToMarginPlugin, BlockQuote, Heading, Autoformat, SpecialCharacters, SpecialCharactersEssentials, Subscript, Superscript, HorizontalLine, RemoveFormat, CodeBlock, TabSpacesPlugin // TODO - delete
62
+ plugins: [Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Indent, IndentBlock, Italic, Link, List, ListProperties, MultiLevelList, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline, CutPlugin, PastePlugin, PasteAsTextPlugin, IndentPaddingToMarginPlugin, NormalizeTableWidthPlugin, BlockQuote, Heading, Autoformat, SpecialCharacters, SpecialCharactersEssentials, Subscript, Superscript, HorizontalLine, RemoveFormat, CodeBlock, TabSpacesPlugin // TODO - delete
62
63
  ],
63
64
 
64
65
  toolbar: ['bold', 'italic', 'underline', 'strikethrough', '|', 'alignment:left', 'alignment:center', 'alignment:right', '|', 'bulletedList', 'numberedList', 'multiLevelList', '|', 'outdent', 'indent', '|', 'cut', 'paste', 'pasteAsText', '|', 'fontSize', '|', 'fontColor', 'fontBackgroundColor', '|', 'insertTable', 'link', '|', 'blockquote', 'heading', '|', 'horizontalLine', 'removeFormat', 'specialCharacters', 'subscript', 'superscript', 'codeblock', '|', 'undo', 'redo'],
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["Alignment","Autoformat","AutoLink","BlockQuote","Bold","Clipboard","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontSize","GeneralHtmlSupport","Heading","HorizontalLine","Indent","IndentBlock","Italic","Link","List","ListProperties","Paragraph","RemoveFormat","SpecialCharacters","SpecialCharactersEssentials","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","MultiLevelList","CK_EDITOR_LICENSE_KEY","CutPlugin","IndentPaddingToMarginPlugin","PasteAsTextPlugin","PastePlugin","TabSpacesPlugin","getEditorTranslation","getValidEditorLocale","TEXT_COLOR_PALETTE","color","getDefaultConfig","locale","arguments","length","undefined","licenseKey","language","translations","plugins","toolbar","fontSize","options","title","model","supportAllValues","fontColor","colors","fontBackgroundColor","indentBlock","offset","unit","htmlSupport","allow","name","styles","list","properties","useAttribute","startIndex","reversed","image","insert","integrations","table","contentToolbar","tableProperties","borderColors","backgroundColors","tableCellProperties","addButtonDataAttributes","editor","applyAttributes","toolbarElement","ui","view","element","toolbarChildren","Array","from","querySelectorAll","moreDropdownButtons","allToolbarElements","concat","toolbarItems","config","get","elementIndex","forEach","itemName","classList","contains","setAttribute","observer","MutationObserver","observe","childList","subtree","on","disconnect"],"sources":["../../../src/TextEditor/utils/config.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport {\n Alignment,\n Autoformat,\n AutoLink,\n BlockQuote,\n Bold,\n Clipboard,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Heading,\n HorizontalLine,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n RemoveFormat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n} from 'ckeditor5'\nimport { MultiLevelList } from 'ckeditor5-premium-features'\n\nimport { CK_EDITOR_LICENSE_KEY } from '../license_key'\nimport { CutPlugin } from '../plugins/CutPlugin'\nimport { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin'\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\nimport { TabSpacesPlugin } from '../plugins/TabSpacesPlugin'\nimport { getEditorTranslation, getValidEditorLocale } from './locale'\n\nconst TEXT_COLOR_PALETTE = [\n { color: '#BFEDD2' },\n { color: '#FBEEB8' },\n { color: '#F8CAC6' },\n { color: '#ECCAFA' },\n { color: '#C2E0F4' },\n { color: '#2DC26B' },\n { color: '#F1C40F' },\n { color: '#E03E2D' },\n { color: '#B96AD9' },\n { color: '#3598DB' },\n { color: '#169179' },\n { color: '#E67E23' },\n { color: '#BA372A' },\n { color: '#843FA1' },\n { color: '#236FA1' },\n { color: '#ECF0F1' },\n { color: '#CED4D9' },\n { color: '#95A5A6' },\n { color: '#7E8C8D' },\n { color: '#34495E' },\n { color: '#000000' },\n { color: '#FFFFFF' },\n]\n\nexport const getDefaultConfig = (locale: string = 'en'): EditorConfig => ({\n licenseKey: CK_EDITOR_LICENSE_KEY,\n language: getValidEditorLocale(locale),\n translations: [getEditorTranslation(locale)],\n plugins: [\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n MultiLevelList,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n CutPlugin,\n PastePlugin,\n PasteAsTextPlugin,\n IndentPaddingToMarginPlugin,\n BlockQuote,\n Heading,\n Autoformat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Subscript,\n Superscript,\n HorizontalLine,\n RemoveFormat,\n CodeBlock,\n TabSpacesPlugin, // TODO - delete\n ],\n toolbar: [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n '|',\n 'alignment:left',\n 'alignment:center',\n 'alignment:right',\n '|',\n 'bulletedList',\n 'numberedList',\n 'multiLevelList',\n '|',\n 'outdent',\n 'indent',\n '|',\n 'cut',\n 'paste',\n 'pasteAsText',\n '|',\n 'fontSize',\n '|',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'insertTable',\n 'link',\n '|',\n 'blockquote',\n 'heading',\n '|',\n 'horizontalLine',\n 'removeFormat',\n 'specialCharacters',\n 'subscript',\n 'superscript',\n 'codeblock',\n '|',\n 'undo',\n 'redo',\n ],\n fontSize: {\n options: [\n { title: '8pt', model: '8px' },\n { title: '10pt', model: '10px' },\n { title: '12pt', model: '12px' },\n { title: '14pt', model: '14px' },\n { title: '18pt', model: '18px' },\n { title: '24pt', model: '24px' },\n { title: '36pt', model: '36px' },\n ],\n supportAllValues: true,\n },\n fontColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n fontBackgroundColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n indentBlock: {\n offset: 40,\n unit: 'px',\n },\n htmlSupport: {\n allow: [\n {\n name: 'p',\n styles: {\n 'margin-left': true,\n },\n },\n ],\n },\n list: {\n properties: {\n styles: {\n useAttribute: false,\n },\n startIndex: true,\n reversed: true,\n },\n },\n image: {\n insert: {\n integrations: ['insertImageViaUrl'],\n },\n toolbar: ['imageTextAlternative'],\n },\n table: {\n contentToolbar: [\n 'tableColumn',\n 'tableRow',\n 'mergeTableCells',\n 'tableProperties',\n 'tableCellProperties',\n ],\n tableProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n tableCellProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n },\n})\n\n// Add stable data attributes to toolbar buttons for the styling (or testing) purposes\nexport const addButtonDataAttributes = (editor: ClassicEditor) => {\n const applyAttributes = () => {\n const toolbarElement = editor.ui.view.toolbar.element\n if (!toolbarElement) {\n return\n }\n\n // Get buttons in the main toolbar\n const toolbarChildren = Array.from(\n toolbarElement.querySelectorAll('.ck-toolbar__items > *')\n )\n\n // Get buttons hidden in \"more\" dropdown\n const moreDropdownButtons = Array.from(\n toolbarElement.querySelectorAll('.ck-dropdown__panel .ck-list .ck-button')\n )\n\n const allToolbarElements = [...toolbarChildren, ...moreDropdownButtons]\n\n // Create mapping based on toolbar configuration order\n const toolbarItems = (editor.config.get('toolbar') || []) as string[]\n let elementIndex = 0\n\n toolbarItems.forEach((itemName) => {\n const element = allToolbarElements[elementIndex]\n if (\n itemName !== '|' &&\n element &&\n !element.classList.contains('ck-toolbar__separator')\n ) {\n // Use the toolbar item name as the stable identifier\n element.setAttribute('data-cke-command', itemName)\n }\n elementIndex++\n })\n }\n\n // Apply attributes initially\n applyAttributes()\n\n // Re-apply when dropdown menus are opened (buttons get created dynamically)\n const toolbarElement = editor.ui.view.toolbar.element\n if (toolbarElement) {\n const observer = new MutationObserver(() => {\n applyAttributes()\n })\n observer.observe(toolbarElement, {\n childList: true,\n subtree: true,\n })\n editor.on('destroy', () => {\n observer.disconnect()\n })\n }\n}\n"],"mappings":"AACA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC,kBAAkB,EAClBC,OAAO,EACPC,cAAc,EACdC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,cAAc,EACdC,SAAS,EACTC,YAAY,EACZC,iBAAiB,EACjBC,2BAA2B,EAC3BC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,KAAK,EACLC,YAAY,EACZC,mBAAmB,EACnBC,iBAAiB,EACjBC,eAAe,EACfC,YAAY,EACZC,SAAS,QACJ,WAAW;AAClB,SAASC,cAAc,QAAQ,4BAA4B;AAE3D,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,UAAU;AAErE,IAAMC,kBAAkB,GAAG,CACzB;EAAEC,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EA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,IAAMC,mBAAmB,GAAGH,KAAK,CAACC,IAAI,CACpCN,cAAc,CAACO,gBAAgB,CAAC,yCAAyC,CAC3E,CAAC;IAED,IAAME,kBAAkB,MAAAC,MAAA,CAAON,eAAe,EAAKI,mBAAmB,CAAC;;IAEvE;IACA,IAAMG,YAAY,GAAIb,MAAM,CAACc,MAAM,CAACC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAe;IACrE,IAAIC,YAAY,GAAG,CAAC;IAEpBH,YAAY,CAACI,OAAO,CAAC,UAACC,QAAQ,EAAK;MACjC,IAAMb,OAAO,GAAGM,kBAAkB,CAACK,YAAY,CAAC;MAChD,IACEE,QAAQ,KAAK,GAAG,IAChBb,OAAO,IACP,CAACA,OAAO,CAACc,SAAS,CAACC,QAAQ,CAAC,uBAAuB,CAAC,EACpD;QACA;QACAf,OAAO,CAACgB,YAAY,CAAC,kBAAkB,EAAEH,QAAQ,CAAC;MACpD;MACAF,YAAY,EAAE;IAChB,CAAC,CAAC;EACJ,CAAC;;EAED;EACAf,eAAe,CAAC,CAAC;;EAEjB;EACA,IAAMC,cAAc,GAAGF,MAAM,CAACG,EAAE,CAACC,IAAI,CAACnC,OAAO,CAACoC,OAAO;EACrD,IAAIH,cAAc,EAAE;IAClB,IAAMoB,QAAQ,GAAG,IAAIC,gBAAgB,CAAC,YAAM;MAC1CtB,eAAe,CAAC,CAAC;IACnB,CAAC,CAAC;IACFqB,QAAQ,CAACE,OAAO,CAACtB,cAAc,EAAE;MAC/BuB,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IACF1B,MAAM,CAAC2B,EAAE,CAAC,SAAS,EAAE,YAAM;MACzBL,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ;AACF,CAAC"}
1
+ {"version":3,"file":"config.js","names":["Alignment","Autoformat","AutoLink","BlockQuote","Bold","Clipboard","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontSize","GeneralHtmlSupport","Heading","HorizontalLine","Indent","IndentBlock","Italic","Link","List","ListProperties","Paragraph","RemoveFormat","SpecialCharacters","SpecialCharactersEssentials","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","MultiLevelList","CK_EDITOR_LICENSE_KEY","CutPlugin","IndentPaddingToMarginPlugin","NormalizeTableWidthPlugin","PasteAsTextPlugin","PastePlugin","TabSpacesPlugin","getEditorTranslation","getValidEditorLocale","TEXT_COLOR_PALETTE","color","getDefaultConfig","locale","arguments","length","undefined","licenseKey","language","translations","plugins","toolbar","fontSize","options","title","model","supportAllValues","fontColor","colors","fontBackgroundColor","indentBlock","offset","unit","htmlSupport","allow","name","styles","list","properties","useAttribute","startIndex","reversed","image","insert","integrations","table","contentToolbar","tableProperties","borderColors","backgroundColors","tableCellProperties","addButtonDataAttributes","editor","applyAttributes","toolbarElement","ui","view","element","toolbarChildren","Array","from","querySelectorAll","moreDropdownButtons","allToolbarElements","concat","toolbarItems","config","get","elementIndex","forEach","itemName","classList","contains","setAttribute","observer","MutationObserver","observe","childList","subtree","on","disconnect"],"sources":["../../../src/TextEditor/utils/config.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport {\n Alignment,\n Autoformat,\n AutoLink,\n BlockQuote,\n Bold,\n Clipboard,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Heading,\n HorizontalLine,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n RemoveFormat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n} from 'ckeditor5'\nimport { MultiLevelList } from 'ckeditor5-premium-features'\n\nimport { CK_EDITOR_LICENSE_KEY } from '../license_key'\nimport { CutPlugin } from '../plugins/CutPlugin'\nimport { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin'\nimport { NormalizeTableWidthPlugin } from '../plugins/NormalizeTableWidthPlugin'\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\nimport { TabSpacesPlugin } from '../plugins/TabSpacesPlugin'\nimport { getEditorTranslation, getValidEditorLocale } from './locale'\n\nconst TEXT_COLOR_PALETTE = [\n { color: '#BFEDD2' },\n { color: '#FBEEB8' },\n { color: '#F8CAC6' },\n { color: '#ECCAFA' },\n { color: '#C2E0F4' },\n { color: '#2DC26B' },\n { color: '#F1C40F' },\n { color: '#E03E2D' },\n { color: '#B96AD9' },\n { color: '#3598DB' },\n { color: '#169179' },\n { color: '#E67E23' },\n { color: '#BA372A' },\n { color: '#843FA1' },\n { color: '#236FA1' },\n { color: '#ECF0F1' },\n { color: '#CED4D9' },\n { color: '#95A5A6' },\n { color: '#7E8C8D' },\n { color: '#34495E' },\n { color: '#000000' },\n { color: '#FFFFFF' },\n]\n\nexport const getDefaultConfig = (locale: string = 'en'): EditorConfig => ({\n licenseKey: CK_EDITOR_LICENSE_KEY,\n language: getValidEditorLocale(locale),\n translations: [getEditorTranslation(locale)],\n plugins: [\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n MultiLevelList,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n CutPlugin,\n PastePlugin,\n PasteAsTextPlugin,\n IndentPaddingToMarginPlugin,\n NormalizeTableWidthPlugin,\n BlockQuote,\n Heading,\n Autoformat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Subscript,\n Superscript,\n HorizontalLine,\n RemoveFormat,\n CodeBlock,\n TabSpacesPlugin, // TODO - delete\n ],\n toolbar: [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n '|',\n 'alignment:left',\n 'alignment:center',\n 'alignment:right',\n '|',\n 'bulletedList',\n 'numberedList',\n 'multiLevelList',\n '|',\n 'outdent',\n 'indent',\n '|',\n 'cut',\n 'paste',\n 'pasteAsText',\n '|',\n 'fontSize',\n '|',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'insertTable',\n 'link',\n '|',\n 'blockquote',\n 'heading',\n '|',\n 'horizontalLine',\n 'removeFormat',\n 'specialCharacters',\n 'subscript',\n 'superscript',\n 'codeblock',\n '|',\n 'undo',\n 'redo',\n ],\n fontSize: {\n options: [\n { title: '8pt', model: '8px' },\n { title: '10pt', model: '10px' },\n { title: '12pt', model: '12px' },\n { title: '14pt', model: '14px' },\n { title: '18pt', model: '18px' },\n { title: '24pt', model: '24px' },\n { title: '36pt', model: '36px' },\n ],\n supportAllValues: true,\n },\n fontColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n fontBackgroundColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n indentBlock: {\n offset: 40,\n unit: 'px',\n },\n htmlSupport: {\n allow: [\n {\n name: 'p',\n styles: {\n 'margin-left': true,\n },\n },\n ],\n },\n list: {\n properties: {\n styles: {\n useAttribute: false,\n },\n startIndex: true,\n reversed: true,\n },\n },\n image: {\n insert: {\n integrations: ['insertImageViaUrl'],\n },\n toolbar: ['imageTextAlternative'],\n },\n table: {\n contentToolbar: [\n 'tableColumn',\n 'tableRow',\n 'mergeTableCells',\n 'tableProperties',\n 'tableCellProperties',\n ],\n tableProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n tableCellProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n },\n})\n\n// Add stable data attributes to toolbar buttons for the styling (or testing) purposes\nexport const addButtonDataAttributes = (editor: ClassicEditor) => {\n const applyAttributes = () => {\n const toolbarElement = editor.ui.view.toolbar.element\n if (!toolbarElement) {\n return\n }\n\n // Get buttons in the main toolbar\n const toolbarChildren = Array.from(\n toolbarElement.querySelectorAll('.ck-toolbar__items > *')\n )\n\n // Get buttons hidden in \"more\" dropdown\n const moreDropdownButtons = Array.from(\n toolbarElement.querySelectorAll('.ck-dropdown__panel .ck-list .ck-button')\n )\n\n const allToolbarElements = [...toolbarChildren, ...moreDropdownButtons]\n\n // Create mapping based on toolbar configuration order\n const toolbarItems = (editor.config.get('toolbar') || []) as string[]\n let elementIndex = 0\n\n toolbarItems.forEach((itemName) => {\n const element = allToolbarElements[elementIndex]\n if (\n itemName !== '|' &&\n element &&\n !element.classList.contains('ck-toolbar__separator')\n ) {\n // Use the toolbar item name as the stable identifier\n element.setAttribute('data-cke-command', itemName)\n }\n elementIndex++\n })\n }\n\n // Apply attributes initially\n applyAttributes()\n\n // Re-apply when dropdown menus are opened (buttons get created dynamically)\n const toolbarElement = editor.ui.view.toolbar.element\n if (toolbarElement) {\n const observer = new MutationObserver(() => {\n applyAttributes()\n })\n observer.observe(toolbarElement, {\n childList: true,\n subtree: true,\n })\n editor.on('destroy', () => {\n observer.disconnect()\n })\n }\n}\n"],"mappings":"AACA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC,kBAAkB,EAClBC,OAAO,EACPC,cAAc,EACdC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,cAAc,EACdC,SAAS,EACTC,YAAY,EACZC,iBAAiB,EACjBC,2BAA2B,EAC3BC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,KAAK,EACLC,YAAY,EACZC,mBAAmB,EACnBC,iBAAiB,EACjBC,eAAe,EACfC,YAAY,EACZC,SAAS,QACJ,WAAW;AAClB,SAASC,cAAc,QAAQ,4BAA4B;AAE3D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EACA,IAAMC,cAAc,GAAGF,MAAM,CAACG,EAAE,CAACC,IAAI,CAACnC,OAAO,CAACoC,OAAO;EACrD,IAAIH,cAAc,EAAE;IAClB,IAAMoB,QAAQ,GAAG,IAAIC,gBAAgB,CAAC,YAAM;MAC1CtB,eAAe,CAAC,CAAC;IACnB,CAAC,CAAC;IACFqB,QAAQ,CAACE,OAAO,CAACtB,cAAc,EAAE;MAC/BuB,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IACF1B,MAAM,CAAC2B,EAAE,CAAC,SAAS,EAAE,YAAM;MACzBL,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
3
3
  displayName: "StyledEditor",
4
- componentId: "text-editor-0_5_0__sc-1oujb2g-0"
4
+ componentId: "text-editor-0_5_1__sc-1oujb2g-0"
5
5
  })([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;--ck-content-font-family:Inter,'Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC',sans-serif;--ck-content-font-size:14px;--ck-content-word-break:break-word;--ck-content-overflow-wrap:break-word;--ck-content-line-height:1.4;p{margin:0;}img{margin-left:auto;margin-right:auto;}figure.table{display:table;margin-top:0.9em;margin-bottom:0.9em;}figure.table table,table{width:100%;border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;th{text-align:left;}& > thead,& > tbody{& > tr > td,& > tr > th{border:1px solid #bfbfbf;min-width:2em;padding:0.4em;}& > tr > th{background:rgba(0,0,0,0.05);font-weight:700;}}}}"]);
6
6
  //# sourceMappingURL=TextEditorOutput.styles.js.map
@@ -10,7 +10,7 @@
10
10
  "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
11
  "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
12
  "sourceFile": "TextEditor/TextEditor.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L68"
13
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L68"
14
14
  },
15
15
  {
16
16
  "name": "aria-label",
@@ -20,7 +20,7 @@
20
20
  "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
21
  "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
22
  "sourceFile": "TextEditor/TextEditor.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L59"
23
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L59"
24
24
  },
25
25
  {
26
26
  "name": "disabled",
@@ -30,7 +30,7 @@
30
30
  "description": "Indicates if the editor is disabled",
31
31
  "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
32
  "sourceFile": "TextEditor/TextEditor.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
33
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
34
34
  },
35
35
  {
36
36
  "name": "error",
@@ -40,7 +40,7 @@
40
40
  "description": "Indicates if the editor is in an error state",
41
41
  "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
42
  "sourceFile": "TextEditor/TextEditor.types.ts",
43
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L41"
43
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L41"
44
44
  },
45
45
  {
46
46
  "name": "id",
@@ -50,7 +50,7 @@
50
50
  "description": "Unique identifier for the editor",
51
51
  "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
52
  "sourceFile": "TextEditor/TextEditor.types.ts",
53
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L10"
53
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L10"
54
54
  },
55
55
  {
56
56
  "name": "initialValue",
@@ -62,7 +62,7 @@
62
62
  "deprecated": "`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead",
63
63
  "deprecatedSince": "0.0.1",
64
64
  "sourceFile": "TextEditor/TextEditor.types.ts",
65
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
65
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
66
66
  },
67
67
  {
68
68
  "name": "locale",
@@ -72,7 +72,7 @@
72
72
  "description": "Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.",
73
73
  "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
74
  "sourceFile": "TextEditor/TextEditor.types.ts",
75
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L75"
75
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L75"
76
76
  },
77
77
  {
78
78
  "name": "readonly",
@@ -82,7 +82,7 @@
82
82
  "description": "Indicates if the editor is in readonly mode.\nWhen true, renders the content using TextEditorOutput instead of the editable editor.",
83
83
  "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
84
  "sourceFile": "TextEditor/TextEditor.types.ts",
85
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L49"
85
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L49"
86
86
  },
87
87
  {
88
88
  "name": "value",
@@ -92,7 +92,7 @@
92
92
  "description": "The current value of the editor",
93
93
  "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
94
  "sourceFile": "TextEditor/TextEditor.types.ts",
95
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L27"
95
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L27"
96
96
  },
97
97
  {
98
98
  "name": "onAfterDestroy",
@@ -102,7 +102,7 @@
102
102
  "description": "Callback fired after the editor instance is destroyed",
103
103
  "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
104
  "sourceFile": "TextEditor/TextEditor.types.ts",
105
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L125"
105
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L125"
106
106
  },
107
107
  {
108
108
  "name": "onBlur",
@@ -112,7 +112,7 @@
112
112
  "description": "Callback fired when the editor loses focus",
113
113
  "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
114
  "sourceFile": "TextEditor/TextEditor.types.ts",
115
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L98"
115
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L98"
116
116
  },
117
117
  {
118
118
  "name": "onChange",
@@ -122,7 +122,7 @@
122
122
  "description": "Callback fired when the editor content changes",
123
123
  "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
124
  "sourceFile": "TextEditor/TextEditor.types.ts",
125
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L84"
125
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L84"
126
126
  },
127
127
  {
128
128
  "name": "onDirty",
@@ -132,7 +132,7 @@
132
132
  "description": "Callback fired when the editor becomes dirty (content differs from initial value)",
133
133
  "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
134
  "sourceFile": "TextEditor/TextEditor.types.ts",
135
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L132"
135
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L132"
136
136
  },
137
137
  {
138
138
  "name": "onError",
@@ -142,7 +142,7 @@
142
142
  "description": "Callback fired when an error occurs in the editor",
143
143
  "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
144
  "sourceFile": "TextEditor/TextEditor.types.ts",
145
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L105"
145
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L105"
146
146
  },
147
147
  {
148
148
  "name": "onFocus",
@@ -152,7 +152,7 @@
152
152
  "description": "Callback fired when the editor gains focus",
153
153
  "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
154
  "sourceFile": "TextEditor/TextEditor.types.ts",
155
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L91"
155
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L91"
156
156
  },
157
157
  {
158
158
  "name": "onInit",
@@ -162,7 +162,7 @@
162
162
  "description": "Callback fired when the editor is ready",
163
163
  "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
164
  "sourceFile": "TextEditor/TextEditor.types.ts",
165
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L118"
165
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L118"
166
166
  },
167
167
  {
168
168
  "name": "onKeyDown",
@@ -172,7 +172,7 @@
172
172
  "description": "Callback fired when a key is pressed in the editor",
173
173
  "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
174
  "sourceFile": "TextEditor/TextEditor.types.ts",
175
- "sourceUrl": "https://github.com/procore/core/blob/b6d942e/packages/text-editor/src/TextEditor/TextEditor.types.ts#L141"
175
+ "sourceUrl": "https://github.com/procore/core/blob/372d16f/packages/text-editor/src/TextEditor/TextEditor.types.ts#L141"
176
176
  }
177
177
  ],
178
178
  "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/372d16f/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/372d16f/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/372d16f/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/372d16f/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/372d16f/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
34
34
  }
35
35
  ],
36
36
  "description": ""
@@ -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": "0.5.1",
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.50.1",
73
73
  "@procore/globalization-toolkit": ">= 3 < 4",
74
74
  "ckeditor5": ">= 47 < 49",
75
75
  "ckeditor5-premium-features": ">= 47 < 49",
@@ -94,7 +94,7 @@
94
94
  "@babel/preset-react": "7.18.6",
95
95
  "@babel/preset-typescript": "7.18.6",
96
96
  "@babel/register": "7.18.9",
97
- "@procore/core-react": "^12.49.1",
97
+ "@procore/core-react": "^12.50.1",
98
98
  "@procore/globalization-toolkit": "3.0.0",
99
99
  "@storybook/addon-webpack5-compiler-swc": "^4.0.2",
100
100
  "@storybook/jest": "^0.2.3",