@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
58 lines (55 loc) • 1.93 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.EXPERIENCE_ID = exports.EXPERIENCE_FAILURE_REASON = exports.EXPERIENCE_ABORT_REASON = exports.DEFAULT_EXPERIENCE_SAMPLE_RATE = void 0;
/**
* Built-in failure reasons for experience checks
*
* These are used by the various ExperienceCheck implementations to
* provide consistent, well-known failure reasons for analytics and debugging.
*/
var EXPERIENCE_FAILURE_REASON = exports.EXPERIENCE_FAILURE_REASON = {
/**
* Experience timed out before completion
*/
TIMEOUT: 'timeout',
/**
* Target element could not be found when starting DOM mutation observation
*/
DOM_MUTATION_TARGET_NOT_FOUND: 'domMutationTargetNotFound',
/**
* Error occurred during DOM mutation check execution
*/
DOM_MUTATION_CHECK_ERROR: 'domMutationCheckError'
};
/**
* Built-in abort reasons for experiences.
*
* These may be used by various ExperienceCheck implementations to
* provide consistent, well-known abort reasons for analytics and debugging.
*/
var EXPERIENCE_ABORT_REASON = exports.EXPERIENCE_ABORT_REASON = {
/**
* Experience was aborted because it was restarted while already in progress
*/
RESTARTED: 'restarted'
};
/**
* Default sample rate for experienceSampled events.
* Set to 1 in 1000 (0.001) to balance data collection with event volume.
*
* Newly defined experiences should use this default unless they have data
* to justify a different rate.
*
* The expectation is that measurements will be gathered after initial
* instrumentation, then the sample rate can be tuned up to a safe threshold.
*/
var DEFAULT_EXPERIENCE_SAMPLE_RATE = exports.DEFAULT_EXPERIENCE_SAMPLE_RATE = 0.001;
var EXPERIENCE_ID = exports.EXPERIENCE_ID = {
ASYNC_OPERATION: 'asyncOperation',
MENU_ACTION: 'menuAction',
MENU_OPEN: 'menuOpen',
TOOLBAR_ACTION: 'toolbarAction',
TOOLBAR_OPEN: 'toolbarOpen'
};