@ckeditor/ckeditor5-autosave 43.3.0-alpha.5 → 43.3.0-alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js","../src/autosave.ts"],"names":["Autosave","Plugin","_action","pluginName","isOfficialPlugin","requires","PendingActions","constructor","editor","config","get","waitingTime","set","_debouncedSave","debounce","_save","bind","_lastDocumentVersion","model","document","version","_savePromise","_domEmitter","DomEmitterMixin","_config","_pendingActions","plugins","_makeImmediateSave","doc","listenTo","evt","batch","_saveCallbacks","length","isLocal","state","_setPendingAction","_flush","priority","window","evtInfo","domEvt","hasAny","returnValue","first","message","stopListening","destroy","cancel","flush","Promise","resolve","then","all","map","cb","finally","remove","catch","err","t","add","saveCallbacks","adapter","save","push"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/E,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACzE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;ACsBpC,CAAA,CAAA,CAAA,OAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;ADnBA,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CA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from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { debounce } from 'lodash-es';\n\n/* globals window */ /**\n * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)\n * when needed (when the user changed the content).\n *\n * It listens to the {@link module:engine/model/document~Document#event:change:data `editor.model.document#change:data`}\n * and `window#beforeunload` events and calls the\n * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tplugins: [ ArticlePluginSet, Autosave ],\n * \t\ttoolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],\n * \t\timage: {\n * \t\t\ttoolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],\n * \t\t},\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * ```\n *\n * Read more about this feature in the {@glink features/autosave Autosave} feature guide.\n */ class Autosave extends Plugin {\n /**\n\t * The adapter is an object with a `save()` method. That method will be called whenever\n\t * the data changes. It might be called some time after the change,\n\t * since the event is throttled for performance reasons.\n\t */ adapter;\n /**\n\t * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */ _debouncedSave;\n /**\n\t * The last saved document version.\n\t */ _lastDocumentVersion;\n /**\n\t * Promise used for asynchronous save calls.\n\t *\n\t * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if\n\t * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.\n\t */ _savePromise;\n /**\n\t * DOM emitter.\n\t */ _domEmitter;\n /**\n\t * The configuration of this plugins.\n\t */ _config;\n /**\n\t * Editor's pending actions manager.\n\t */ _pendingActions;\n /**\n\t * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.\n\t *\n\t * This is set to `true` when there is a save request while autosave callback is already being processed\n\t * and the model has changed since the last save.\n\t */ _makeImmediateSave;\n /**\n\t * An action that will be added to the pending action manager for actions happening in that plugin.\n\t */ _action = null;\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'Autosave';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n PendingActions\n ];\n }\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n const config = editor.config.get('autosave') || {};\n // A minimum amount of time that needs to pass after the last action.\n // After that time the provided save callbacks are being called.\n const waitingTime = config.waitingTime || 1000;\n this.set('state', 'synchronized');\n this._debouncedSave = debounce(this._save.bind(this), waitingTime);\n this._lastDocumentVersion = editor.model.document.version;\n this._savePromise = null;\n this._domEmitter = new (DomEmitterMixin())();\n this._config = config;\n this._pendingActions = editor.plugins.get(PendingActions);\n this._makeImmediateSave = false;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n const doc = editor.model.document;\n // Add the listener only after the editor is initialized to prevent firing save callback on data init.\n this.listenTo(editor, 'ready', ()=>{\n this.listenTo(doc, 'change:data', (evt, batch)=>{\n if (!this._saveCallbacks.length) {\n return;\n }\n if (!batch.isLocal) {\n return;\n }\n if (this.state === 'synchronized') {\n this.state = 'waiting';\n // Set pending action already when we are waiting for the autosave callback.\n this._setPendingAction();\n }\n if (this.state === 'waiting') {\n this._debouncedSave();\n }\n // If the plugin is in `saving` state, it will change its state later basing on the `document.version`.\n // If the `document.version` will be higher than stored `#_lastDocumentVersion`, then it means, that some `change:data`\n // event has fired in the meantime.\n });\n });\n // Flush on the editor's destroy listener with the highest priority to ensure that\n // `editor.getData()` will be called before plugins are destroyed.\n this.listenTo(editor, 'destroy', ()=>this._flush(), {\n priority: 'highest'\n });\n // It's not possible to easy test it because karma uses `beforeunload` event\n // to warn before full page reload and this event cannot be dispatched manually.\n /* istanbul ignore next -- @preserve */ this._domEmitter.listenTo(window, 'beforeunload', (evtInfo, domEvt)=>{\n if (this._pendingActions.hasAny) {\n domEvt.returnValue = this._pendingActions.first.message;\n }\n });\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n // There's no need for canceling or flushing the throttled save, as\n // it's done on the editor's destroy event with the highest priority.\n this._domEmitter.stopListening();\n super.destroy();\n }\n /**\n\t * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave\n\t * callback in progress, then the requested save will be performed immediately after the current callback finishes.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */ save() {\n this._debouncedSave.cancel();\n return this._save();\n }\n /**\n\t * Invokes the remaining `_save()` method call.\n\t */ _flush() {\n this._debouncedSave.flush();\n }\n /**\n\t * If the adapter is set and a new document version exists,\n\t * the `_save()` method creates a pending action and calls the `adapter.save()` method.\n\t * It waits for the result and then removes the created pending action.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */ _save() {\n if (this._savePromise) {\n this._makeImmediateSave = this.editor.model.document.version > this._lastDocumentVersion;\n return this._savePromise;\n }\n // Make sure there is a pending action (in case if `_save()` was called through manual `save()` call).\n this._setPendingAction();\n this.state = 'saving';\n this._lastDocumentVersion = this.editor.model.document.version;\n // Wait one promise cycle to be sure that save callbacks are not called inside a conversion or when the editor's state changes.\n this._savePromise = Promise.resolve()// Make autosave callback.\n .then(()=>Promise.all(this._saveCallbacks.map((cb)=>cb(this.editor))))// When the autosave callback is finished, always clear `this._savePromise`, no matter if it was successful or not.\n .finally(()=>{\n this._savePromise = null;\n })// If the save was successful, we have three scenarios:\n //\n // 1. If a save was requested when an autosave callback was already processed, we need to immediately call\n // another autosave callback. In this case, `this._savePromise` will not be resolved until the next callback is done.\n // 2. Otherwise, if changes happened to the model, make a delayed autosave callback (like the change just happened).\n // 3. If no changes happened to the model, return to the `synchronized` state.\n .then(()=>{\n if (this._makeImmediateSave) {\n this._makeImmediateSave = false;\n // Start another autosave callback. Return a promise that will be resolved after the new autosave callback.\n // This way promises returned by `_save()` will not be resolved until all changes are saved.\n //\n // If `save()` was called when another (most often automatic) autosave callback was already processed,\n // the promise returned by `save()` call will be resolved only after new changes have been saved.\n //\n // Note that it would not work correctly if `this._savePromise` is not cleared.\n return this._save();\n } else {\n if (this.editor.model.document.version > this._lastDocumentVersion) {\n this.state = 'waiting';\n this._debouncedSave();\n } else {\n this.state = 'synchronized';\n this._pendingActions.remove(this._action);\n this._action = null;\n }\n }\n })// In case of an error, retry the autosave callback after a delay (and also throw the original error).\n .catch((err)=>{\n // Change state to `error` so that listeners handling autosave error can be called.\n this.state = 'error';\n // Then, immediately change to the `saving` state as described above.\n // Being in the `saving` state ensures that the autosave callback won't be delayed further by the `change:data` listener.\n this.state = 'saving';\n this._debouncedSave();\n throw err;\n });\n return this._savePromise;\n }\n /**\n\t * Creates a pending action if it is not set already.\n\t */ _setPendingAction() {\n const t = this.editor.t;\n if (!this._action) {\n this._action = this._pendingActions.add(t('Saving changes'));\n }\n }\n /**\n\t * Saves callbacks.\n\t */ get _saveCallbacks() {\n const saveCallbacks = [];\n if (this.adapter && this.adapter.save) {\n saveCallbacks.push(this.adapter.save);\n }\n if (this._config.save) {\n saveCallbacks.push(this._config.save);\n }\n return saveCallbacks;\n }\n}\n\nexport { Autosave };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module autosave/autosave\n */\n\nimport {\n\tPlugin,\n\tPendingActions,\n\ttype Editor,\n\ttype PendingAction,\n\ttype EditorDestroyEvent,\n\ttype EditorReadyEvent\n} from 'ckeditor5/src/core.js';\n\nimport { DomEmitterMixin, type DomEmitter } from 'ckeditor5/src/utils.js';\n\nimport type { DocumentChangeEvent } from 'ckeditor5/src/engine.js';\n\nimport { debounce, type DebouncedFunc } from 'lodash-es';\n\n/* globals window */\n\n/**\n * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)\n * when needed (when the user changed the content).\n *\n * It listens to the {@link module:engine/model/document~Document#event:change:data `editor.model.document#change:data`}\n * and `window#beforeunload` events and calls the\n * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tplugins: [ ArticlePluginSet, Autosave ],\n * \t\ttoolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],\n * \t\timage: {\n * \t\t\ttoolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],\n * \t\t},\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * ```\n *\n * Read more about this feature in the {@glink features/autosave Autosave} feature guide.\n */\nexport default class Autosave extends Plugin {\n\t/**\n\t * The adapter is an object with a `save()` method. That method will be called whenever\n\t * the data changes. It might be called some time after the change,\n\t * since the event is throttled for performance reasons.\n\t */\n\n\tpublic adapter?: AutosaveAdapter;\n\n\t/**\n\t * The state of this plugin.\n\t *\n\t * The plugin can be in the following states:\n\t *\n\t * * synchronized – When all changes are saved.\n\t * * waiting – When the plugin is waiting for other changes before calling `adapter#save()` and `config.autosave.save()`.\n\t * * saving – When the provided save method is called and the plugin waits for the response.\n\t * * error &ndash When the provided save method will throw an error. This state immediately changes to the `saving` state and\n\t * the save method will be called again in the short period of time.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public state: 'synchronized' | 'waiting' | 'saving' | 'error';\n\n\t/**\n\t * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */\n\tprivate _debouncedSave: DebouncedFunc<( () => void )>;\n\n\t/**\n\t * The last saved document version.\n\t */\n\tprivate _lastDocumentVersion: number;\n\n\t/**\n\t * Promise used for asynchronous save calls.\n\t *\n\t * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if\n\t * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.\n\t */\n\tprivate _savePromise: Promise<void> | null;\n\n\t/**\n\t * DOM emitter.\n\t */\n\tprivate _domEmitter: DomEmitter;\n\n\t/**\n\t * The configuration of this plugins.\n\t */\n\tprivate _config: AutosaveConfig;\n\n\t/**\n\t * Editor's pending actions manager.\n\t */\n\tprivate _pendingActions: PendingActions;\n\n\t/**\n\t * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.\n\t *\n\t * This is set to `true` when there is a save request while autosave callback is already being processed\n\t * and the model has changed since the last save.\n\t */\n\tprivate _makeImmediateSave: boolean;\n\n\t/**\n\t * An action that will be added to the pending action manager for actions happening in that plugin.\n\t */\n\tprivate _action: PendingAction | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Autosave' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ PendingActions ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tconst config: AutosaveConfig = editor.config.get( 'autosave' ) || {};\n\n\t\t// A minimum amount of time that needs to pass after the last action.\n\t\t// After that time the provided save callbacks are being called.\n\t\tconst waitingTime = config.waitingTime || 1000;\n\n\t\tthis.set( 'state', 'synchronized' );\n\n\t\tthis._debouncedSave = debounce( this._save.bind( this ), waitingTime );\n\t\tthis._lastDocumentVersion = editor.model.document.version;\n\t\tthis._savePromise = null;\n\t\tthis._domEmitter = new ( DomEmitterMixin() )();\n\t\tthis._config = config;\n\t\tthis._pendingActions = editor.plugins.get( PendingActions );\n\t\tthis._makeImmediateSave = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst doc = editor.model.document;\n\n\t\t// Add the listener only after the editor is initialized to prevent firing save callback on data init.\n\t\tthis.listenTo<EditorReadyEvent>( editor, 'ready', () => {\n\t\t\tthis.listenTo<DocumentChangeEvent>( doc, 'change:data', ( evt, batch ) => {\n\t\t\t\tif ( !this._saveCallbacks.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( !batch.isLocal ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( this.state === 'synchronized' ) {\n\t\t\t\t\tthis.state = 'waiting';\n\t\t\t\t\t// Set pending action already when we are waiting for the autosave callback.\n\t\t\t\t\tthis._setPendingAction();\n\t\t\t\t}\n\n\t\t\t\tif ( this.state === 'waiting' ) {\n\t\t\t\t\tthis._debouncedSave();\n\t\t\t\t}\n\n\t\t\t\t// If the plugin is in `saving` state, it will change its state later basing on the `document.version`.\n\t\t\t\t// If the `document.version` will be higher than stored `#_lastDocumentVersion`, then it means, that some `change:data`\n\t\t\t\t// event has fired in the meantime.\n\t\t\t} );\n\t\t} );\n\n\t\t// Flush on the editor's destroy listener with the highest priority to ensure that\n\t\t// `editor.getData()` will be called before plugins are destroyed.\n\t\tthis.listenTo<EditorDestroyEvent>( editor, 'destroy', () => this._flush(), { priority: 'highest' } );\n\n\t\t// It's not possible to easy test it because karma uses `beforeunload` event\n\t\t// to warn before full page reload and this event cannot be dispatched manually.\n\t\t/* istanbul ignore next -- @preserve */\n\t\tthis._domEmitter.listenTo( window, 'beforeunload', ( evtInfo, domEvt ) => {\n\t\t\tif ( this._pendingActions.hasAny ) {\n\t\t\t\tdomEvt.returnValue = this._pendingActions.first!.message;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\t// There's no need for canceling or flushing the throttled save, as\n\t\t// it's done on the editor's destroy event with the highest priority.\n\n\t\tthis._domEmitter.stopListening();\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave\n\t * callback in progress, then the requested save will be performed immediately after the current callback finishes.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */\n\tpublic save(): Promise<void> {\n\t\tthis._debouncedSave.cancel();\n\n\t\treturn this._save();\n\t}\n\n\t/**\n\t * Invokes the remaining `_save()` method call.\n\t */\n\tprivate _flush(): void {\n\t\tthis._debouncedSave.flush();\n\t}\n\n\t/**\n\t * If the adapter is set and a new document version exists,\n\t * the `_save()` method creates a pending action and calls the `adapter.save()` method.\n\t * It waits for the result and then removes the created pending action.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */\n\tprivate _save(): Promise<void> {\n\t\tif ( this._savePromise ) {\n\t\t\tthis._makeImmediateSave = this.editor.model.document.version > this._lastDocumentVersion;\n\n\t\t\treturn this._savePromise;\n\t\t}\n\n\t\t// Make sure there is a pending action (in case if `_save()` was called through manual `save()` call).\n\t\tthis._setPendingAction();\n\n\t\tthis.state = 'saving';\n\t\tthis._lastDocumentVersion = this.editor.model.document.version;\n\n\t\t// Wait one promise cycle to be sure that save callbacks are not called inside a conversion or when the editor's state changes.\n\t\tthis._savePromise = Promise.resolve()\n\t\t\t// Make autosave callback.\n\t\t\t.then( () => Promise.all(\n\t\t\t\tthis._saveCallbacks.map( cb => cb( this.editor ) )\n\t\t\t) )\n\t\t\t// When the autosave callback is finished, always clear `this._savePromise`, no matter if it was successful or not.\n\t\t\t.finally( () => {\n\t\t\t\tthis._savePromise = null;\n\t\t\t} )\n\t\t\t// If the save was successful, we have three scenarios:\n\t\t\t//\n\t\t\t// 1. If a save was requested when an autosave callback was already processed, we need to immediately call\n\t\t\t// another autosave callback. In this case, `this._savePromise` will not be resolved until the next callback is done.\n\t\t\t// 2. Otherwise, if changes happened to the model, make a delayed autosave callback (like the change just happened).\n\t\t\t// 3. If no changes happened to the model, return to the `synchronized` state.\n\t\t\t.then( () => {\n\t\t\t\tif ( this._makeImmediateSave ) {\n\t\t\t\t\tthis._makeImmediateSave = false;\n\n\t\t\t\t\t// Start another autosave callback. Return a promise that will be resolved after the new autosave callback.\n\t\t\t\t\t// This way promises returned by `_save()` will not be resolved until all changes are saved.\n\t\t\t\t\t//\n\t\t\t\t\t// If `save()` was called when another (most often automatic) autosave callback was already processed,\n\t\t\t\t\t// the promise returned by `save()` call will be resolved only after new changes have been saved.\n\t\t\t\t\t//\n\t\t\t\t\t// Note that it would not work correctly if `this._savePromise` is not cleared.\n\t\t\t\t\treturn this._save();\n\t\t\t\t} else {\n\t\t\t\t\tif ( this.editor.model.document.version > this._lastDocumentVersion ) {\n\t\t\t\t\t\tthis.state = 'waiting';\n\t\t\t\t\t\tthis._debouncedSave();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.state = 'synchronized';\n\t\t\t\t\t\tthis._pendingActions.remove( this._action! );\n\t\t\t\t\t\tthis._action = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// In case of an error, retry the autosave callback after a delay (and also throw the original error).\n\t\t\t.catch( err => {\n\t\t\t\t// Change state to `error` so that listeners handling autosave error can be called.\n\t\t\t\tthis.state = 'error';\n\t\t\t\t// Then, immediately change to the `saving` state as described above.\n\t\t\t\t// Being in the `saving` state ensures that the autosave callback won't be delayed further by the `change:data` listener.\n\t\t\t\tthis.state = 'saving';\n\n\t\t\t\tthis._debouncedSave();\n\n\t\t\t\tthrow err;\n\t\t\t} );\n\n\t\treturn this._savePromise;\n\t}\n\n\t/**\n\t * Creates a pending action if it is not set already.\n\t */\n\tprivate _setPendingAction(): void {\n\t\tconst t = this.editor.t;\n\n\t\tif ( !this._action ) {\n\t\t\tthis._action = this._pendingActions.add( t( 'Saving changes' ) );\n\t\t}\n\t}\n\n\t/**\n\t * Saves callbacks.\n\t */\n\tprivate get _saveCallbacks(): Array<( editor: Editor ) => Promise<unknown>> {\n\t\tconst saveCallbacks: Array<( editor: Editor ) => Promise<unknown>> = [];\n\n\t\tif ( this.adapter && this.adapter.save ) {\n\t\t\tsaveCallbacks.push( this.adapter.save );\n\t\t}\n\n\t\tif ( this._config.save ) {\n\t\t\tsaveCallbacks.push( this._config.save );\n\t\t}\n\n\t\treturn saveCallbacks;\n\t}\n}\n\n/**\n * An interface that requires the `save()` method.\n *\n * Used by {@link module:autosave/autosave~Autosave#adapter}.\n */\nexport interface AutosaveAdapter {\n\n\t/**\n\t * The method that will be called when the data changes. It should return a promise (e.g. in case of saving content to the database),\n\t * so the autosave plugin will wait for that action before removing it from pending actions.\n\t */\n\tsave( editor: Editor ): Promise<unknown>;\n}\n\n/**\n * The configuration of the {@link module:autosave/autosave~Autosave autosave feature}.\n *\n * ```ts\n * ClassicEditor\n * \t.create( editorElement, {\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * \t.then( ... )\n * \t.catch( ... );\n * ```\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.\n *\n * See also the demo of the {@glink features/autosave autosave feature}.\n */\nexport interface AutosaveConfig {\n\n\t/**\n\t * The callback to be executed when the data needs to be saved.\n\t *\n\t * This function must return a promise which should be resolved when the data is successfully saved.\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( editorElement, {\n\t * \t\tautosave: {\n\t * \t\t\tsave( editor: Editor ) {\n\t * \t\t\t\treturn saveData( editor.getData() );\n\t * \t\t\t}\n\t * \t\t}\n\t * \t} );\n\t * \t.then( ... )\n\t * \t.catch( ... );\n\t * ```\n\t */\n\tsave?: ( editor: Editor ) => Promise<unknown>;\n\n\t/**\n\t * The minimum amount of time that needs to pass after the last action to call the provided callback.\n\t * By default it is 1000 ms.\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( editorElement, {\n\t * \t\tautosave: {\n\t * \t\t\tsave( editor: Editor ) {\n\t * \t\t\t\treturn saveData( editor.getData() );\n\t * \t\t\t},\n\t * \t\t\twaitingTime: 2000\n\t * \t\t}\n\t * \t} );\n\t * \t.then( ... )\n\t * \t.catch( ... );\n\t * ```\n\t */\n\twaitingTime?: number;\n}\n"]}
|
1
|
+
{"version":3,"sources":["index.js","../src/autosave.ts"],"names":["Autosave","Plugin","_action","pluginName","isOfficialPlugin","requires","PendingActions","constructor","editor","config","get","waitingTime","set","_debouncedSave","debounce","_save","bind","_lastDocumentVersion","model","document","version","_savePromise","_domEmitter","DomEmitterMixin","_config","_pendingActions","plugins","_makeImmediateSave","doc","listenTo","evt","batch","_saveCallbacks","length","isLocal","state","_setPendingAction","_flush","priority","window","evtInfo","domEvt","hasAny","returnValue","first","message","stopListening","destroy","cancel","flush","Promise","resolve","then","all","map","cb","finally","remove","catch","err","t","add","saveCallbacks","adapter","save","push"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/E,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACzE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;ACsBpC,CAAA,CAAA,CAAA,OAAA,CAAA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AA,CAAA,CAAA;AACD;;ADzGA,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin, PendingActions } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { DomEmitterMixin } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { debounce } from 'lodash-es';\n\n/* globals window */ /**\n * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)\n * when needed (when the user changed the content).\n *\n * It listens to the {@link module:engine/model/document~Document#event:change:data `editor.model.document#change:data`}\n * and `window#beforeunload` events and calls the\n * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tplugins: [ ArticlePluginSet, Autosave ],\n * \t\ttoolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],\n * \t\timage: {\n * \t\t\ttoolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],\n * \t\t},\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * ```\n *\n * Read more about this feature in the {@glink features/autosave Autosave} feature guide.\n */ class Autosave extends Plugin {\n /**\n\t * The adapter is an object with a `save()` method. That method will be called whenever\n\t * the data changes. It might be called some time after the change,\n\t * since the event is throttled for performance reasons.\n\t */ adapter;\n /**\n\t * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */ _debouncedSave;\n /**\n\t * The last saved document version.\n\t */ _lastDocumentVersion;\n /**\n\t * Promise used for asynchronous save calls.\n\t *\n\t * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if\n\t * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.\n\t */ _savePromise;\n /**\n\t * DOM emitter.\n\t */ _domEmitter;\n /**\n\t * The configuration of this plugins.\n\t */ _config;\n /**\n\t * Editor's pending actions manager.\n\t */ _pendingActions;\n /**\n\t * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.\n\t *\n\t * This is set to `true` when there is a save request while autosave callback is already being processed\n\t * and the model has changed since the last save.\n\t */ _makeImmediateSave;\n /**\n\t * An action that will be added to the pending action manager for actions happening in that plugin.\n\t */ _action = null;\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'Autosave';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n PendingActions\n ];\n }\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n const config = editor.config.get('autosave') || {};\n // A minimum amount of time that needs to pass after the last action.\n // After that time the provided save callbacks are being called.\n const waitingTime = config.waitingTime || 1000;\n this.set('state', 'synchronized');\n this._debouncedSave = debounce(this._save.bind(this), waitingTime);\n this._lastDocumentVersion = editor.model.document.version;\n this._savePromise = null;\n this._domEmitter = new (DomEmitterMixin())();\n this._config = config;\n this._pendingActions = editor.plugins.get(PendingActions);\n this._makeImmediateSave = false;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n const doc = editor.model.document;\n // Add the listener only after the editor is initialized to prevent firing save callback on data init.\n this.listenTo(editor, 'ready', ()=>{\n this.listenTo(doc, 'change:data', (evt, batch)=>{\n if (!this._saveCallbacks.length) {\n return;\n }\n if (!batch.isLocal) {\n return;\n }\n if (this.state === 'synchronized') {\n this.state = 'waiting';\n // Set pending action already when we are waiting for the autosave callback.\n this._setPendingAction();\n }\n if (this.state === 'waiting') {\n this._debouncedSave();\n }\n // If the plugin is in `saving` state, it will change its state later basing on the `document.version`.\n // If the `document.version` will be higher than stored `#_lastDocumentVersion`, then it means, that some `change:data`\n // event has fired in the meantime.\n });\n });\n // Flush on the editor's destroy listener with the highest priority to ensure that\n // `editor.getData()` will be called before plugins are destroyed.\n this.listenTo(editor, 'destroy', ()=>this._flush(), {\n priority: 'highest'\n });\n // It's not possible to easy test it because karma uses `beforeunload` event\n // to warn before full page reload and this event cannot be dispatched manually.\n /* istanbul ignore next -- @preserve */ this._domEmitter.listenTo(window, 'beforeunload', (evtInfo, domEvt)=>{\n if (this._pendingActions.hasAny) {\n domEvt.returnValue = this._pendingActions.first.message;\n }\n });\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n // There's no need for canceling or flushing the throttled save, as\n // it's done on the editor's destroy event with the highest priority.\n this._domEmitter.stopListening();\n super.destroy();\n }\n /**\n\t * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave\n\t * callback in progress, then the requested save will be performed immediately after the current callback finishes.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */ save() {\n this._debouncedSave.cancel();\n return this._save();\n }\n /**\n\t * Invokes the remaining `_save()` method call.\n\t */ _flush() {\n this._debouncedSave.flush();\n }\n /**\n\t * If the adapter is set and a new document version exists,\n\t * the `_save()` method creates a pending action and calls the `adapter.save()` method.\n\t * It waits for the result and then removes the created pending action.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */ _save() {\n if (this._savePromise) {\n this._makeImmediateSave = this.editor.model.document.version > this._lastDocumentVersion;\n return this._savePromise;\n }\n // Make sure there is a pending action (in case if `_save()` was called through manual `save()` call).\n this._setPendingAction();\n this.state = 'saving';\n this._lastDocumentVersion = this.editor.model.document.version;\n // Wait one promise cycle to be sure that save callbacks are not called inside a conversion or when the editor's state changes.\n this._savePromise = Promise.resolve()// Make autosave callback.\n .then(()=>Promise.all(this._saveCallbacks.map((cb)=>cb(this.editor))))// When the autosave callback is finished, always clear `this._savePromise`, no matter if it was successful or not.\n .finally(()=>{\n this._savePromise = null;\n })// If the save was successful, we have three scenarios:\n //\n // 1. If a save was requested when an autosave callback was already processed, we need to immediately call\n // another autosave callback. In this case, `this._savePromise` will not be resolved until the next callback is done.\n // 2. Otherwise, if changes happened to the model, make a delayed autosave callback (like the change just happened).\n // 3. If no changes happened to the model, return to the `synchronized` state.\n .then(()=>{\n if (this._makeImmediateSave) {\n this._makeImmediateSave = false;\n // Start another autosave callback. Return a promise that will be resolved after the new autosave callback.\n // This way promises returned by `_save()` will not be resolved until all changes are saved.\n //\n // If `save()` was called when another (most often automatic) autosave callback was already processed,\n // the promise returned by `save()` call will be resolved only after new changes have been saved.\n //\n // Note that it would not work correctly if `this._savePromise` is not cleared.\n return this._save();\n } else {\n if (this.editor.model.document.version > this._lastDocumentVersion) {\n this.state = 'waiting';\n this._debouncedSave();\n } else {\n this.state = 'synchronized';\n this._pendingActions.remove(this._action);\n this._action = null;\n }\n }\n })// In case of an error, retry the autosave callback after a delay (and also throw the original error).\n .catch((err)=>{\n // Change state to `error` so that listeners handling autosave error can be called.\n this.state = 'error';\n // Then, immediately change to the `saving` state as described above.\n // Being in the `saving` state ensures that the autosave callback won't be delayed further by the `change:data` listener.\n this.state = 'saving';\n this._debouncedSave();\n throw err;\n });\n return this._savePromise;\n }\n /**\n\t * Creates a pending action if it is not set already.\n\t */ _setPendingAction() {\n const t = this.editor.t;\n if (!this._action) {\n this._action = this._pendingActions.add(t('Saving changes'));\n }\n }\n /**\n\t * Saves callbacks.\n\t */ get _saveCallbacks() {\n const saveCallbacks = [];\n if (this.adapter && this.adapter.save) {\n saveCallbacks.push(this.adapter.save);\n }\n if (this._config.save) {\n saveCallbacks.push(this._config.save);\n }\n return saveCallbacks;\n }\n}\n\nexport { Autosave };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module autosave/autosave\n */\n\nimport {\n\tPlugin,\n\tPendingActions,\n\ttype Editor,\n\ttype PendingAction,\n\ttype EditorDestroyEvent,\n\ttype EditorReadyEvent\n} from 'ckeditor5/src/core.js';\n\nimport { DomEmitterMixin, type DomEmitter } from 'ckeditor5/src/utils.js';\n\nimport type { DocumentChangeEvent } from 'ckeditor5/src/engine.js';\n\nimport { debounce, type DebouncedFunc } from 'lodash-es';\n\n/* globals window */\n\n/**\n * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)\n * when needed (when the user changed the content).\n *\n * It listens to the {@link module:engine/model/document~Document#event:change:data `editor.model.document#change:data`}\n * and `window#beforeunload` events and calls the\n * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tplugins: [ ArticlePluginSet, Autosave ],\n * \t\ttoolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],\n * \t\timage: {\n * \t\t\ttoolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],\n * \t\t},\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * ```\n *\n * Read more about this feature in the {@glink features/autosave Autosave} feature guide.\n */\nexport default class Autosave extends Plugin {\n\t/**\n\t * The adapter is an object with a `save()` method. That method will be called whenever\n\t * the data changes. It might be called some time after the change,\n\t * since the event is throttled for performance reasons.\n\t */\n\n\tpublic adapter?: AutosaveAdapter;\n\n\t/**\n\t * The state of this plugin.\n\t *\n\t * The plugin can be in the following states:\n\t *\n\t * * synchronized – When all changes are saved.\n\t * * waiting – When the plugin is waiting for other changes before calling `adapter#save()` and `config.autosave.save()`.\n\t * * saving – When the provided save method is called and the plugin waits for the response.\n\t * * error &ndash When the provided save method will throw an error. This state immediately changes to the `saving` state and\n\t * the save method will be called again in the short period of time.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public state: 'synchronized' | 'waiting' | 'saving' | 'error';\n\n\t/**\n\t * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */\n\tprivate _debouncedSave: DebouncedFunc<( () => void )>;\n\n\t/**\n\t * The last saved document version.\n\t */\n\tprivate _lastDocumentVersion: number;\n\n\t/**\n\t * Promise used for asynchronous save calls.\n\t *\n\t * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if\n\t * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.\n\t */\n\tprivate _savePromise: Promise<void> | null;\n\n\t/**\n\t * DOM emitter.\n\t */\n\tprivate _domEmitter: DomEmitter;\n\n\t/**\n\t * The configuration of this plugins.\n\t */\n\tprivate _config: AutosaveConfig;\n\n\t/**\n\t * Editor's pending actions manager.\n\t */\n\tprivate _pendingActions: PendingActions;\n\n\t/**\n\t * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.\n\t *\n\t * This is set to `true` when there is a save request while autosave callback is already being processed\n\t * and the model has changed since the last save.\n\t */\n\tprivate _makeImmediateSave: boolean;\n\n\t/**\n\t * An action that will be added to the pending action manager for actions happening in that plugin.\n\t */\n\tprivate _action: PendingAction | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Autosave' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ PendingActions ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tconst config: AutosaveConfig = editor.config.get( 'autosave' ) || {};\n\n\t\t// A minimum amount of time that needs to pass after the last action.\n\t\t// After that time the provided save callbacks are being called.\n\t\tconst waitingTime = config.waitingTime || 1000;\n\n\t\tthis.set( 'state', 'synchronized' );\n\n\t\tthis._debouncedSave = debounce( this._save.bind( this ), waitingTime );\n\t\tthis._lastDocumentVersion = editor.model.document.version;\n\t\tthis._savePromise = null;\n\t\tthis._domEmitter = new ( DomEmitterMixin() )();\n\t\tthis._config = config;\n\t\tthis._pendingActions = editor.plugins.get( PendingActions );\n\t\tthis._makeImmediateSave = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst doc = editor.model.document;\n\n\t\t// Add the listener only after the editor is initialized to prevent firing save callback on data init.\n\t\tthis.listenTo<EditorReadyEvent>( editor, 'ready', () => {\n\t\t\tthis.listenTo<DocumentChangeEvent>( doc, 'change:data', ( evt, batch ) => {\n\t\t\t\tif ( !this._saveCallbacks.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( !batch.isLocal ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( this.state === 'synchronized' ) {\n\t\t\t\t\tthis.state = 'waiting';\n\t\t\t\t\t// Set pending action already when we are waiting for the autosave callback.\n\t\t\t\t\tthis._setPendingAction();\n\t\t\t\t}\n\n\t\t\t\tif ( this.state === 'waiting' ) {\n\t\t\t\t\tthis._debouncedSave();\n\t\t\t\t}\n\n\t\t\t\t// If the plugin is in `saving` state, it will change its state later basing on the `document.version`.\n\t\t\t\t// If the `document.version` will be higher than stored `#_lastDocumentVersion`, then it means, that some `change:data`\n\t\t\t\t// event has fired in the meantime.\n\t\t\t} );\n\t\t} );\n\n\t\t// Flush on the editor's destroy listener with the highest priority to ensure that\n\t\t// `editor.getData()` will be called before plugins are destroyed.\n\t\tthis.listenTo<EditorDestroyEvent>( editor, 'destroy', () => this._flush(), { priority: 'highest' } );\n\n\t\t// It's not possible to easy test it because karma uses `beforeunload` event\n\t\t// to warn before full page reload and this event cannot be dispatched manually.\n\t\t/* istanbul ignore next -- @preserve */\n\t\tthis._domEmitter.listenTo( window, 'beforeunload', ( evtInfo, domEvt ) => {\n\t\t\tif ( this._pendingActions.hasAny ) {\n\t\t\t\tdomEvt.returnValue = this._pendingActions.first!.message;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\t// There's no need for canceling or flushing the throttled save, as\n\t\t// it's done on the editor's destroy event with the highest priority.\n\n\t\tthis._domEmitter.stopListening();\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave\n\t * callback in progress, then the requested save will be performed immediately after the current callback finishes.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */\n\tpublic save(): Promise<void> {\n\t\tthis._debouncedSave.cancel();\n\n\t\treturn this._save();\n\t}\n\n\t/**\n\t * Invokes the remaining `_save()` method call.\n\t */\n\tprivate _flush(): void {\n\t\tthis._debouncedSave.flush();\n\t}\n\n\t/**\n\t * If the adapter is set and a new document version exists,\n\t * the `_save()` method creates a pending action and calls the `adapter.save()` method.\n\t * It waits for the result and then removes the created pending action.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */\n\tprivate _save(): Promise<void> {\n\t\tif ( this._savePromise ) {\n\t\t\tthis._makeImmediateSave = this.editor.model.document.version > this._lastDocumentVersion;\n\n\t\t\treturn this._savePromise;\n\t\t}\n\n\t\t// Make sure there is a pending action (in case if `_save()` was called through manual `save()` call).\n\t\tthis._setPendingAction();\n\n\t\tthis.state = 'saving';\n\t\tthis._lastDocumentVersion = this.editor.model.document.version;\n\n\t\t// Wait one promise cycle to be sure that save callbacks are not called inside a conversion or when the editor's state changes.\n\t\tthis._savePromise = Promise.resolve()\n\t\t\t// Make autosave callback.\n\t\t\t.then( () => Promise.all(\n\t\t\t\tthis._saveCallbacks.map( cb => cb( this.editor ) )\n\t\t\t) )\n\t\t\t// When the autosave callback is finished, always clear `this._savePromise`, no matter if it was successful or not.\n\t\t\t.finally( () => {\n\t\t\t\tthis._savePromise = null;\n\t\t\t} )\n\t\t\t// If the save was successful, we have three scenarios:\n\t\t\t//\n\t\t\t// 1. If a save was requested when an autosave callback was already processed, we need to immediately call\n\t\t\t// another autosave callback. In this case, `this._savePromise` will not be resolved until the next callback is done.\n\t\t\t// 2. Otherwise, if changes happened to the model, make a delayed autosave callback (like the change just happened).\n\t\t\t// 3. If no changes happened to the model, return to the `synchronized` state.\n\t\t\t.then( () => {\n\t\t\t\tif ( this._makeImmediateSave ) {\n\t\t\t\t\tthis._makeImmediateSave = false;\n\n\t\t\t\t\t// Start another autosave callback. Return a promise that will be resolved after the new autosave callback.\n\t\t\t\t\t// This way promises returned by `_save()` will not be resolved until all changes are saved.\n\t\t\t\t\t//\n\t\t\t\t\t// If `save()` was called when another (most often automatic) autosave callback was already processed,\n\t\t\t\t\t// the promise returned by `save()` call will be resolved only after new changes have been saved.\n\t\t\t\t\t//\n\t\t\t\t\t// Note that it would not work correctly if `this._savePromise` is not cleared.\n\t\t\t\t\treturn this._save();\n\t\t\t\t} else {\n\t\t\t\t\tif ( this.editor.model.document.version > this._lastDocumentVersion ) {\n\t\t\t\t\t\tthis.state = 'waiting';\n\t\t\t\t\t\tthis._debouncedSave();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.state = 'synchronized';\n\t\t\t\t\t\tthis._pendingActions.remove( this._action! );\n\t\t\t\t\t\tthis._action = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// In case of an error, retry the autosave callback after a delay (and also throw the original error).\n\t\t\t.catch( err => {\n\t\t\t\t// Change state to `error` so that listeners handling autosave error can be called.\n\t\t\t\tthis.state = 'error';\n\t\t\t\t// Then, immediately change to the `saving` state as described above.\n\t\t\t\t// Being in the `saving` state ensures that the autosave callback won't be delayed further by the `change:data` listener.\n\t\t\t\tthis.state = 'saving';\n\n\t\t\t\tthis._debouncedSave();\n\n\t\t\t\tthrow err;\n\t\t\t} );\n\n\t\treturn this._savePromise;\n\t}\n\n\t/**\n\t * Creates a pending action if it is not set already.\n\t */\n\tprivate _setPendingAction(): void {\n\t\tconst t = this.editor.t;\n\n\t\tif ( !this._action ) {\n\t\t\tthis._action = this._pendingActions.add( t( 'Saving changes' ) );\n\t\t}\n\t}\n\n\t/**\n\t * Saves callbacks.\n\t */\n\tprivate get _saveCallbacks(): Array<( editor: Editor ) => Promise<unknown>> {\n\t\tconst saveCallbacks: Array<( editor: Editor ) => Promise<unknown>> = [];\n\n\t\tif ( this.adapter && this.adapter.save ) {\n\t\t\tsaveCallbacks.push( this.adapter.save );\n\t\t}\n\n\t\tif ( this._config.save ) {\n\t\t\tsaveCallbacks.push( this._config.save );\n\t\t}\n\n\t\treturn saveCallbacks;\n\t}\n}\n\n/**\n * An interface that requires the `save()` method.\n *\n * Used by {@link module:autosave/autosave~Autosave#adapter}.\n */\nexport interface AutosaveAdapter {\n\n\t/**\n\t * The method that will be called when the data changes. It should return a promise (e.g. in case of saving content to the database),\n\t * so the autosave plugin will wait for that action before removing it from pending actions.\n\t */\n\tsave( editor: Editor ): Promise<unknown>;\n}\n\n/**\n * The configuration of the {@link module:autosave/autosave~Autosave autosave feature}.\n *\n * ```ts\n * ClassicEditor\n * \t.create( editorElement, {\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * \t.then( ... )\n * \t.catch( ... );\n * ```\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.\n *\n * See also the demo of the {@glink features/autosave autosave feature}.\n */\nexport interface AutosaveConfig {\n\n\t/**\n\t * The callback to be executed when the data needs to be saved.\n\t *\n\t * This function must return a promise which should be resolved when the data is successfully saved.\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( editorElement, {\n\t * \t\tautosave: {\n\t * \t\t\tsave( editor: Editor ) {\n\t * \t\t\t\treturn saveData( editor.getData() );\n\t * \t\t\t}\n\t * \t\t}\n\t * \t} );\n\t * \t.then( ... )\n\t * \t.catch( ... );\n\t * ```\n\t */\n\tsave?: ( editor: Editor ) => Promise<unknown>;\n\n\t/**\n\t * The minimum amount of time that needs to pass after the last action to call the provided callback.\n\t * By default it is 1000 ms.\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( editorElement, {\n\t * \t\tautosave: {\n\t * \t\t\tsave( editor: Editor ) {\n\t * \t\t\t\treturn saveData( editor.getData() );\n\t * \t\t\t},\n\t * \t\t\twaitingTime: 2000\n\t * \t\t}\n\t * \t} );\n\t * \t.then( ... )\n\t * \t.catch( ... );\n\t * ```\n\t */\n\twaitingTime?: number;\n}\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-autosave",
|
3
|
-
"version": "43.3.0-alpha.
|
3
|
+
"version": "43.3.0-alpha.6",
|
4
4
|
"description": "Autosave feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -13,9 +13,9 @@
|
|
13
13
|
"type": "module",
|
14
14
|
"main": "src/index.js",
|
15
15
|
"dependencies": {
|
16
|
-
"@ckeditor/ckeditor5-core": "43.3.0-alpha.
|
17
|
-
"@ckeditor/ckeditor5-utils": "43.3.0-alpha.
|
18
|
-
"ckeditor5": "43.3.0-alpha.
|
16
|
+
"@ckeditor/ckeditor5-core": "43.3.0-alpha.6",
|
17
|
+
"@ckeditor/ckeditor5-utils": "43.3.0-alpha.6",
|
18
|
+
"ckeditor5": "43.3.0-alpha.6",
|
19
19
|
"lodash-es": "4.17.21"
|
20
20
|
},
|
21
21
|
"author": "CKSource (http://cksource.com/)",
|