Add JSDoc documentation and file headers to all source files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 18:55:36 +08:00
parent 3b7b6ae859
commit 7fec6cb63f
199 changed files with 2764 additions and 503 deletions

View File

@@ -1,18 +1,40 @@
// The Lucia project.
// Copyright 2023-2026 DSP, inc. All rights reserved.
// Authors:
// chiayin.kuo@dsp.im (chiayin), 2023/1/31
// imacat.yang@dsp.im (imacat), 2023/9/23
// cindy.chang@dsp.im (Cindy Chang), 2024/5/30
/** @module constants Application-wide constants and chart configuration. */
/** @constant {number} Maximum number of ticks on PrimeVue chart axes. */
export const PRIME_VUE_TICKS_LIMIT = 6;
/** @constant {number} Number of data items to render per batch. */
export const ONCE_RENDER_NUM_OF_DATA = 9;
/** @constant {number} Minimum valid password length. */
export const PWD_VALID_LENGTH = 6;
/** @constant {string} Default grid line color (Tailwind slate-500). */
export const GRID_COLOR = '#64748b';
/** @constant {string} Modal type for creating a new account. */
export const MODAL_CREATE_NEW = 'MODAL_CREATE_NEW';
/** @constant {string} Modal type for editing an account. */
export const MODAL_ACCT_EDIT = 'MODAL_ACCT_EDIT';
/** @constant {string} Modal type for viewing account info. */
export const MODAL_ACCT_INFO = 'MODAL_ACCT_INFO';
/** @constant {string} Modal type for deleting an account. */
export const MODAL_DELETE = 'MODAL_DELETE';
/** @constant {string} LocalStorage key for saved Cytoscape node positions. */
export const SAVE_KEY_NAME = 'CYTOSCAPE_NODE_POSITION';
/** @constant {number} Duration (minutes) to highlight newly created accounts. */
export const JUST_CREATE_ACCOUNT_HOT_DURATION_MINS = 2;
/**
* @constant {Array<[string, string]>} Field keys and display labels for
* process insights (self-loops, short-loops, traces).
*/
export const INSIGHTS_FIELDS_AND_LABELS = [
['self_loops', 'Self-Loop'],
['short_loops', 'Short-Loop'],
@@ -21,6 +43,7 @@ export const INSIGHTS_FIELDS_AND_LABELS = [
['most_freq_traces', 'Most Frequent Trace'],
];
/** @constant {Object} Default Chart.js layout padding options. */
export const knownLayoutChartOption = {
padding: {
top: 16,
@@ -29,6 +52,7 @@ export const knownLayoutChartOption = {
}
};
/** @constant {Object} Default Chart.js scale options for line charts. */
export const knownScaleLineChartOptions = {
x: {
type: 'time',
@@ -84,6 +108,7 @@ y: {
},
},
};
/** @constant {Object} Default Chart.js scale options for horizontal charts. */
export const knownScaleHorizontalChartOptions = {
x: {
title: {
@@ -131,6 +156,7 @@ y: {
},
},
};
/** @constant {Object} Default Chart.js scale options for bar charts. */
export const knownScaleBarChartOptions = {
x: {
title: {