@orangelogic/design-system 2.127.0 → 2.128.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/library/chunks/{color-swatch-group.CQlKsT07.js → color-swatch-group.DPaKBfvX.js} +1 -1
  2. package/library/chunks/{folder-select.CDFQfcrG.js → folder-select.DMpO7oQF.js} +203 -185
  3. package/library/chunks/{list-editor.CyHNKjuZ.js → list-editor.C8SaStOE.js} +1 -1
  4. package/library/chunks/{table.CipCH4U5.js → table.Cf3C72Lv.js} +713 -661
  5. package/library/components/atoms.js +1 -1
  6. package/library/components/color-swatch-group.js +2 -2
  7. package/library/components/divider.js +14 -14
  8. package/library/components/drawer.js +25 -23
  9. package/library/components/folder-select.js +1 -1
  10. package/library/components/list-editor.js +2 -2
  11. package/library/components/molecules.js +2 -2
  12. package/library/components/organisms.js +1 -1
  13. package/library/components/table.js +1 -1
  14. package/library/components/types.js +42420 -41562
  15. package/library/components/video.js +2304 -2291
  16. package/library/package.json +1 -1
  17. package/library/packages/atoms/src/components/drawer/drawer.d.ts +1 -0
  18. package/library/packages/atoms/src/components/video/video.d.ts +6 -0
  19. package/library/packages/events/src/cx-table-switch-change.d.ts +10 -0
  20. package/library/packages/events/src/events.d.ts +1 -0
  21. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/switch.d.ts +3 -0
  22. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/toggle.d.ts +12 -0
  23. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters.d.ts +2 -0
  24. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +2 -0
  25. package/library/packages/molecules/src/folder-select/folder-select.d.ts +1 -0
  26. package/library/packages/organisms/src/annotator-comment/annotator-comment.constants.d.ts +6 -0
  27. package/library/packages/organisms/src/annotator-comment/annotator-comment.d.ts +82 -0
  28. package/library/packages/organisms/src/annotator-comment/annotator-comment.styles.d.ts +2 -0
  29. package/library/packages/organisms/src/annotator-comment/components/annotator-comment-menu.d.ts +69 -0
  30. package/library/packages/organisms/src/annotator-comment/components/annotator-comment-menu.styles.d.ts +2 -0
  31. package/library/packages/organisms/src/annotator-comment/extensions/history.d.ts +45 -0
  32. package/library/packages/organisms/src/annotator-comment/extensions/keyboard.d.ts +7 -0
  33. package/library/packages/organisms/src/annotator-comment/extensions/prosemirror-history.d.ts +19 -0
  34. package/library/packages/organisms/src/annotator-comment/extensions/time.d.ts +63 -0
  35. package/library/packages/organisms/src/annotator-comment/marker-controller.d.ts +45 -0
  36. package/library/packages/organisms/src/index.d.ts +1 -0
  37. package/library/packages/types/src/folder-select.d.ts +1 -1
  38. package/library/packages/types/src/table.d.ts +8 -2
  39. package/library/react-web-component.d.ts +228 -98
  40. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.127.0",
4
+ "version": "2.128.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -119,6 +119,7 @@ export default class CxDrawer extends CortexElement {
119
119
  private removeOpenListeners;
120
120
  private resetMultipleMenus;
121
121
  private handleDocumentKeyDown;
122
+ private handleDocumentPointerDown;
122
123
  handleOpenChange(): Promise<void>;
123
124
  handleNoModalChange(): void;
124
125
  /** Shows the drawer. */
@@ -87,6 +87,10 @@ export default class CxVideo extends ResizableElement {
87
87
  * Determines if the volume panel should be disabled.
88
88
  */
89
89
  disableVolumePanel: boolean;
90
+ /**
91
+ * Determines if the big play button overlay should be hidden.
92
+ */
93
+ hideBigPlayButton: boolean;
90
94
  isLoaded: boolean;
91
95
  isPlaying: boolean;
92
96
  isError: boolean;
@@ -131,6 +135,7 @@ export default class CxVideo extends ResizableElement {
131
135
  protected addVideoEventListeners(): void;
132
136
  protected removeVideoEventListeners(): void;
133
137
  attachSeekbar(): void;
138
+ private applyBigPlayButtonVisibility;
134
139
  protected setupVideoJsPlayer(src?: string): Promise<void>;
135
140
  handleLoopChange(): Promise<void>;
136
141
  handleMutedChange(): Promise<void>;
@@ -138,6 +143,7 @@ export default class CxVideo extends ResizableElement {
138
143
  handleDisablePictureInPictureChange(): Promise<void>;
139
144
  handleDisableRemotePlaybackChange(): Promise<void>;
140
145
  handleDisableVolumePanelChange(): Promise<void>;
146
+ handleHideBigPlayButtonChange(): Promise<void>;
141
147
  handlePosterChange(): Promise<void>;
142
148
  handleFormattedPosterChange(): Promise<void>;
143
149
  handleSrcChange(): Promise<void>;
@@ -0,0 +1,10 @@
1
+ export type CxTableSwitchChangeEvent = CustomEvent<{
2
+ checked: boolean;
3
+ data: Record<string, unknown>;
4
+ field: string;
5
+ }>;
6
+ declare global {
7
+ interface GlobalEventHandlersEventMap {
8
+ 'cx-table-switch-change': CxTableSwitchChangeEvent;
9
+ }
10
+ }
@@ -182,6 +182,7 @@ export * from './cx-table-dropdown-filter-change';
182
182
  export * from './cx-table-export';
183
183
  export * from './cx-table-row-action-click';
184
184
  export * from './cx-table-save-search-select';
185
+ export * from './cx-table-switch-change';
185
186
  export * from './cx-time-based-change';
186
187
  export * from './cx-timeline-data-resolved';
187
188
  export * from './cx-time-update';
@@ -0,0 +1,3 @@
1
+ import { ICellComponent, SwitchFormatterParams } from '../../../../../../../../types/src/table';
2
+
3
+ export default function (cell: ICellComponent, formatterParams: SwitchFormatterParams): HTMLElement;
@@ -1 +1,13 @@
1
+ /**
2
+ * @deprecated Prefer the `switch` formatter over `toggle`.
3
+ *
4
+ * This is a legacy pill-style toggle built from plain `<div>`s and ad-hoc CSS.
5
+ * For new columns use `formatter: 'switch'`, which renders the design-system
6
+ * `cx-switch` atom (consistent focus/disabled/size states) and emits the typed
7
+ * `cx-table-switch-change` event.
8
+ *
9
+ * To adjust switch behavior/appearance, edit the switch formatter at
10
+ * `../formatters/switch.ts` (and the `cx-switch` atom under
11
+ * `packages/atoms/src/components/switch/`), NOT this file.
12
+ */
1
13
  export default function (this: any, cell: any, formatterParams: any, _onRendered: (callback: () => void) => void): HTMLElement;
@@ -20,6 +20,7 @@ import { default as plaintext } from './formatters/plaintext';
20
20
  import { default as progress } from './formatters/progress';
21
21
  import { default as rownum } from './formatters/rownum';
22
22
  import { default as star } from './formatters/star';
23
+ import { default as switchFormatter } from './formatters/switch';
23
24
  import { default as tag } from './formatters/tag';
24
25
  import { default as textarea } from './formatters/textarea';
25
26
  import { default as tickCross } from './formatters/tickCross';
@@ -51,6 +52,7 @@ declare const defaultFormatters: {
51
52
  progress: typeof progress;
52
53
  rownum: typeof rownum;
53
54
  star: typeof star;
55
+ switch: typeof switchFormatter;
54
56
  tag: typeof tag;
55
57
  textarea: typeof textarea;
56
58
  tickCross: typeof tickCross;
@@ -30,6 +30,7 @@ export default class CxFolderSelectTree extends CortexElement {
30
30
  api?: FolderSelectApi;
31
31
  excludeVirtualFolders: boolean;
32
32
  firstFetchCallback: ((data: Folder[]) => void) | null;
33
+ autoPageSize: boolean;
33
34
  data: Folder[];
34
35
  hasMore: boolean;
35
36
  loading: boolean;
@@ -56,6 +57,7 @@ export default class CxFolderSelectTree extends CortexElement {
56
57
  * This is used to render the cx-tree inside the cx-folder-select without the shadow root so that the cx-folder-select can query select the cx-tree inside
57
58
  */
58
59
  createRenderRoot(): this;
60
+ private computeInitialLimit;
59
61
  runFirstUpdated(): void;
60
62
  handleExtraFolderIdChange(): Promise<void>;
61
63
  /**
@@ -39,6 +39,7 @@ export default class CxFolderSelect extends CortexElement {
39
39
  extraFolderId: string;
40
40
  extraFolderTitle: string;
41
41
  extraFolderIcon: string;
42
+ autoPageSize: boolean;
42
43
  firstFetchCallback: ((data: Folder[]) => void) | null;
43
44
  searchTerm: string;
44
45
  constructor();
@@ -0,0 +1,6 @@
1
+ export declare const defaultAnnotationState: {
2
+ height: number;
3
+ markers: never[];
4
+ version: number;
5
+ width: number;
6
+ };
@@ -0,0 +1,82 @@
1
+ import { AnnotationState } from '@markerjs/markerjs3';
2
+ import { CxTimeBasedChangeEvent } from '../../../events/src/cx-time-based-change';
3
+ import { default as CxComment } from '../comment/comment.ts';
4
+ import { TimecodeMode } from '../../../types/src/video-editor';
5
+ import { default as CxAnnotatorCommentMenu } from './components/annotator-comment-menu';
6
+
7
+ export type CxCommentSubmitEvent = CustomEvent<Record<string, never>>;
8
+ declare global {
9
+ interface GlobalEventHandlersEventMap {
10
+ 'cx-comment-submit': CxCommentSubmitEvent;
11
+ }
12
+ }
13
+ /**
14
+ * @summary CxAnnotatorComment - An extension of the CxComment component that allows users to annotate a specific element.
15
+ */
16
+ export default class CxAnnotatorComment extends CxComment {
17
+ static readonly styles: import('lit').CSSResult[];
18
+ static readonly dependencies: {
19
+ 'cx-annotator-comment-menu': typeof CxAnnotatorCommentMenu;
20
+ 'cx-comment-menu': typeof import('../comment/components/comment-menu/comment-menu').default;
21
+ 'cx-dialog': typeof import('../../../atoms/src/index.ts').CxDialog;
22
+ 'cx-mentions': typeof import('../../../molecules/src/index.ts').CxMentions;
23
+ 'cx-popup': typeof import('../../../atoms/src/index.ts').CxPopup;
24
+ 'cx-space': typeof import('../../../atoms/src/index.ts').CxSpace;
25
+ 'cx-timecode': typeof import('../../../atoms/src/index.ts').CxTimecode;
26
+ };
27
+ private readonly markerController;
28
+ commentMenu: CxAnnotatorCommentMenu;
29
+ /**
30
+ * The element to annotate. The marker are component `mjs-marker-area` will be
31
+ * instantiated inside the element and also matches its dimensions.
32
+ */
33
+ annotationEl: HTMLElement;
34
+ /**
35
+ * The annotation state data to be displayed in the annotator.
36
+ */
37
+ set annotationState(value: AnnotationState | null);
38
+ get annotationState(): AnnotationState;
39
+ /**
40
+ * Whether the time based button should be shown in the comment menu.
41
+ */
42
+ canUseTimeBased: boolean;
43
+ /**
44
+ * When true, hides the time based icon button in the comment menu while
45
+ * still allowing the time based feature to function (e.g. `timeBased`
46
+ * state is still respected). Useful when the parent wants to enable the
47
+ * feature without exposing the toggle button to end users.
48
+ */
49
+ hideTimeBasedIcon: boolean;
50
+ /**
51
+ * Whether the annotation (draw) tool is available in the comment menu.
52
+ */
53
+ canAnnotate: boolean;
54
+ /**
55
+ * Whether the time based feature is enabled.
56
+ */
57
+ timeBased: boolean;
58
+ /**
59
+ * The time values for the time based feature.
60
+ */
61
+ time: number[];
62
+ /**
63
+ * The timecode mode for the time based feature.
64
+ */
65
+ timecodeMode: TimecodeMode;
66
+ /**
67
+ * The frame rate for the time based feature.
68
+ */
69
+ frameRate: number;
70
+ runFirstUpdated(): void;
71
+ handleTimeChange(): void;
72
+ handleTimeBasedChange(event: CxTimeBasedChangeEvent): void;
73
+ private get timecodeExtension();
74
+ private handleUndoRequest;
75
+ private handleRedoRequest;
76
+ protected renderMenu(): import('lit').TemplateResult<1>;
77
+ }
78
+ declare global {
79
+ interface HTMLElementTagNameMap {
80
+ 'cx-annotator-comment': CxAnnotatorComment;
81
+ }
82
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('lit').CSSResult;
2
+ export default _default;
@@ -0,0 +1,69 @@
1
+ import { AnnotationState } from '@markerjs/markerjs3';
2
+ import { default as CxAnnotator } from '../../../../molecules/src/annotator/annotator.ts';
3
+ import { default as CxCommentMenu } from '../../comment/components/comment-menu/comment-menu';
4
+
5
+ /**
6
+ * @summary CxAnnotatorCommentMenu - An extension of the CxCommentMenu component that adds annotation tools alongside text formatting.
7
+ */
8
+ export default class CxAnnotatorCommentMenu extends CxCommentMenu {
9
+ static readonly styles: import('lit').CSSResult[];
10
+ static readonly dependencies: {
11
+ 'cx-annotator': typeof CxAnnotator;
12
+ 'cx-button': typeof import('../../../../atoms/src/index.ts').CxButton;
13
+ 'cx-card': typeof import('../../../../atoms/src/index.ts').CxCard;
14
+ 'cx-icon-button': typeof import('../../../../atoms/src/index.ts').CxIconButton;
15
+ 'cx-input': typeof import('../../../../atoms/src/index.ts').CxInput;
16
+ 'cx-popup': typeof import('../../../../atoms/src/index.ts').CxPopup;
17
+ 'cx-space': typeof import('../../../../atoms/src/index.ts').CxSpace;
18
+ 'cx-tooltip': typeof import('../../../../atoms/src/index.ts').CxTooltip;
19
+ };
20
+ annotator: CxAnnotator;
21
+ /**
22
+ * The element to annotate. The marker are component `mjs-marker-area` will be
23
+ * instantiated inside the element and also matches its dimensions.
24
+ */
25
+ annotationEl: HTMLElement;
26
+ /**
27
+ * Whether the time based button should be shown in the comment menu.
28
+ */
29
+ canUseTimeBased: boolean;
30
+ /**
31
+ * When true, hides the time based icon button in the menu while still
32
+ * allowing the time based feature to function (e.g. `timeBased` state
33
+ * is still respected and `cx-time-based-change` events can still be
34
+ * emitted programmatically). Set this when the host component wants to
35
+ * expose the time based feature without showing the toggle button.
36
+ */
37
+ hideTimeBasedIcon: boolean;
38
+ /**
39
+ * Whether the annotation (draw) toggle is shown in the menu.
40
+ */
41
+ canAnnotate: boolean;
42
+ /**
43
+ * Whether the time based feature is enabled.
44
+ */
45
+ timeBased: boolean;
46
+ /**
47
+ * The annotation state data to be displayed in the annotator.
48
+ */
49
+ set annotationState(value: AnnotationState | null);
50
+ get annotationState(): AnnotationState;
51
+ private _annotationState;
52
+ connectedCallback(): void;
53
+ disconnectedCallback(): void;
54
+ private handleAnnotationButtonClick;
55
+ private handleBackButtonClick;
56
+ private handleMarkerAreaStateChange;
57
+ private syncAnnotatorState;
58
+ protected handleTimeBasedClick(): void;
59
+ protected renderLeftMenu(): import('lit').TemplateResult<1>;
60
+ private renderBackButton;
61
+ renderRightActions(): import('lit').TemplateResult<1>;
62
+ renderRightMenu(): import('lit').TemplateResult<1>;
63
+ private renderAnnotationMenu;
64
+ }
65
+ declare global {
66
+ interface HTMLElementTagNameMap {
67
+ 'cx-annotator-comment-menu': CxAnnotatorCommentMenu;
68
+ }
69
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('lit').CSSResult;
2
+ export default _default;
@@ -0,0 +1,45 @@
1
+ import { Extension } from '@tiptap/core';
2
+
3
+ export interface HistoryOptions {
4
+ /**
5
+ * The amount of history events that are collected before the oldest events are discarded.
6
+ * @default 100
7
+ * @example 50
8
+ */
9
+ depth: number;
10
+ /**
11
+ * The delay (in milliseconds) between changes after which a new group should be started.
12
+ * @default 500
13
+ * @example 1000
14
+ */
15
+ newGroupDelay: number;
16
+ onEventRedo?: () => void;
17
+ onEventStart?: () => void;
18
+ onEventUndo?: () => void;
19
+ }
20
+ declare module '@tiptap/core' {
21
+ interface Commands<ReturnType> {
22
+ history: {
23
+ /**
24
+ * Reapply reverted changes
25
+ * @example editor.commands.redo()
26
+ */
27
+ redo: () => ReturnType;
28
+ /**
29
+ * Undo recent changes
30
+ * @example editor.commands.undo()
31
+ */
32
+ undo: () => ReturnType;
33
+ };
34
+ }
35
+ }
36
+ /**
37
+ * This extension allows you to undo and redo recent changes.
38
+ * @see https://www.tiptap.dev/api/extensions/history
39
+ *
40
+ * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove
41
+ * the `history` extension, as it is not compatible with the `collaboration` extension.
42
+ *
43
+ * `@tiptap/extension-collaboration` uses its own history implementation.
44
+ */
45
+ export declare const History: Extension<HistoryOptions, any>;
@@ -0,0 +1,7 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { default as CxAnnotatorComment } from '../annotator-comment';
3
+
4
+ export interface AnnotatorKeyboardOptions {
5
+ host: CxAnnotatorComment;
6
+ }
7
+ export declare const AnnotatorKeyboard: Extension<AnnotatorKeyboardOptions, any>;
@@ -0,0 +1,19 @@
1
+ import { Command, EditorState, Plugin, Transaction } from 'prosemirror-state';
2
+
3
+ export declare function closeHistory(tr: Transaction): Transaction;
4
+ interface HistoryOptions {
5
+ depth?: number;
6
+ newGroupDelay?: number;
7
+ onEventRedo?: () => void;
8
+ onEventStart?: () => void;
9
+ onEventUndo?: () => void;
10
+ }
11
+ export declare function history(config?: HistoryOptions): Plugin;
12
+ export declare const undo: Command;
13
+ export declare const redo: Command;
14
+ export declare const undoNoScroll: Command;
15
+ export declare const redoNoScroll: Command;
16
+ export declare function undoDepth(state: EditorState): any;
17
+ export declare function redoDepth(state: EditorState): any;
18
+ export declare function isHistoryTransaction(tr: Transaction): boolean;
19
+ export {};
@@ -0,0 +1,63 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { PluginKey } from '@tiptap/pm/state';
3
+ import { TimecodeMode } from '../../../../types/src/video-editor';
4
+
5
+ export interface TimeOptions {
6
+ /**
7
+ * The HTML attributes for the time widget.
8
+ * @default {}
9
+ */
10
+ HTMLAttributes: Record<string, string>;
11
+ /**
12
+ * The frame rate for the time based feature.
13
+ * @default 24
14
+ */
15
+ frameRate: number;
16
+ /**
17
+ * The placeholder text for the time based feature.
18
+ * @default 'Enter a message...'
19
+ */
20
+ placeholder: string;
21
+ /**
22
+ * The time values (in seconds) for the time based feature.
23
+ * Can be a single value or a range [start, end].
24
+ * @default []
25
+ */
26
+ time: number[];
27
+ /**
28
+ * The timecode mode for the time based feature.
29
+ * @default TimecodeMode.Standard
30
+ */
31
+ timecodeMode: TimecodeMode;
32
+ }
33
+ export interface TimeStorage {
34
+ frameRate: number;
35
+ placeholder: string;
36
+ time: number[];
37
+ timecodeMode: TimecodeMode;
38
+ }
39
+ declare module '@tiptap/core' {
40
+ interface Commands<ReturnType> {
41
+ time: {
42
+ /**
43
+ * Update the time decoration with new values.
44
+ */
45
+ setTime: (options: {
46
+ frameRate?: number;
47
+ placeholder?: string;
48
+ time?: number[];
49
+ timecodeMode?: TimecodeMode;
50
+ }) => ReturnType;
51
+ };
52
+ }
53
+ }
54
+ /**
55
+ * The plugin key for the time decoration plugin.
56
+ */
57
+ export declare const TimePluginKey: PluginKey<any>;
58
+ /**
59
+ * This extension adds a node decoration widget at the start of the document
60
+ * displaying the time using cx-timecode component.
61
+ */
62
+ export declare const Time: Extension<TimeOptions, TimeStorage>;
63
+ export default Time;
@@ -0,0 +1,45 @@
1
+ import { AnnotationState } from '@markerjs/markerjs3';
2
+ import { ReactiveController, ReactiveControllerHost } from 'lit';
3
+ import { default as CxAnnotatorComment } from './annotator-comment';
4
+
5
+ /**
6
+ * A reactive controller to manage marker state synchronization and event handling
7
+ * for the annotator-comment component.
8
+ */
9
+ export declare class MarkerController implements ReactiveController {
10
+ private readonly host;
11
+ _annotationState: AnnotationState;
12
+ canUndo: boolean;
13
+ canRedo: boolean;
14
+ private readonly undoStack;
15
+ private redoStack;
16
+ private pendingTiptapHistory;
17
+ private isUndoRedoInProgress;
18
+ constructor(host: ReactiveControllerHost & CxAnnotatorComment);
19
+ get annotationState(): AnnotationState;
20
+ setAnnotationState(value: AnnotationState | null): void;
21
+ hostUpdated(): void;
22
+ private handleMarkerAreaStateChange;
23
+ pushHistory(source: 'marker' | 'tiptap'): void;
24
+ undo(): boolean;
25
+ redo(): boolean;
26
+ private undoMarker;
27
+ private redoMarker;
28
+ private handleMarkerChange;
29
+ private handleMarkerCreate;
30
+ private handleMarkerDelete;
31
+ /**
32
+ * Get event handlers for marker-related events
33
+ */
34
+ getMarkerEventHandlers(): {
35
+ 'cx-marker-area-state-change': () => void;
36
+ 'cx-marker-change': () => void;
37
+ 'cx-marker-create': () => void;
38
+ 'cx-marker-delete': () => void;
39
+ };
40
+ /**
41
+ * Get the history extension for Tiptap that handles unified undo/redo
42
+ * for both Tiptap and Marker history
43
+ */
44
+ get historyExtension(): import('@tiptap/core').Extension<import('./extensions/history').HistoryOptions, any>;
45
+ }
@@ -1,3 +1,4 @@
1
+ export { default as CxAnnotatorComment } from './annotator-comment/annotator-comment';
1
2
  export { default as CxAssetLinkFormat } from './asset-link-format/asset-link-format';
2
3
  export { default as CxAssetTransformationDialog } from './asset-transformation-dialog/asset-transformation-dialog';
3
4
  export { default as CxDashboardFilter } from './dashboard-filter/dashboard-filter';
@@ -4,7 +4,7 @@ export declare enum FolderSelectVariant {
4
4
  }
5
5
  export type Folder = {
6
6
  docType: string;
7
- fullPath: string;
7
+ fullPath?: string;
8
8
  hasChildren: boolean;
9
9
  id: string;
10
10
  isShared?: boolean;
@@ -2307,8 +2307,8 @@ export type ColumnCalc = 'avg' | 'max' | 'min' | 'sum' | 'concat' | 'count' | 'u
2307
2307
  export type ColumnCalcParams = {
2308
2308
  precision: number;
2309
2309
  } | ((values: any, data: any) => any);
2310
- export type Formatter = 'plaintext' | 'textarea' | 'html' | 'money' | 'image' | 'datetime' | 'datetimediff' | 'link' | 'tickCross' | 'color' | 'star' | 'traffic' | 'progress' | 'lookup' | 'buttonTick' | 'buttonCross' | 'rownum' | 'handle' | 'rowSelection' | 'responsiveCollapse' | 'toggle' | 'time' | 'diff' | ((cell: ICellComponent, formatterParams: Record<string, unknown>, onRendered: EmptyCallback) => string | HTMLElement);
2311
- export type FormatterParams = MoneyParams | ImageParams | LinkParams | DateTimeParams | DateTimeDifferenceParams | TickCrossParams | TrafficParams | ProgressBarParams | StarRatingParams | RowSelectionParams | JSONRecord | ToggleSwitchParams | TimeFormatterParams | ((cell: ICellComponent) => Record<string, unknown>);
2310
+ export type Formatter = 'plaintext' | 'textarea' | 'html' | 'money' | 'image' | 'datetime' | 'datetimediff' | 'link' | 'tickCross' | 'color' | 'star' | 'traffic' | 'progress' | 'lookup' | 'buttonTick' | 'buttonCross' | 'rownum' | 'handle' | 'rowSelection' | 'responsiveCollapse' | 'toggle' | 'switch' | 'time' | 'diff' | ((cell: ICellComponent, formatterParams: Record<string, unknown>, onRendered: EmptyCallback) => string | HTMLElement);
2311
+ export type FormatterParams = MoneyParams | ImageParams | LinkParams | DateTimeParams | DateTimeDifferenceParams | TickCrossParams | TrafficParams | ProgressBarParams | StarRatingParams | RowSelectionParams | JSONRecord | ToggleSwitchParams | SwitchFormatterParams | TimeFormatterParams | ((cell: ICellComponent) => Record<string, unknown>);
2312
2312
  export type TextFormatParams = {
2313
2313
  getColor?: (cell: any) => string;
2314
2314
  colorMap?: Record<any, string>;
@@ -2387,6 +2387,12 @@ export interface ToggleSwitchParams {
2387
2387
  offColor?: string;
2388
2388
  clickable?: boolean;
2389
2389
  }
2390
+ export interface SwitchFormatterParams {
2391
+ size?: 'small' | 'medium' | 'large';
2392
+ onValue?: string | number | boolean;
2393
+ offValue?: string | number | boolean;
2394
+ disabled?: (cell: ICellComponent) => boolean;
2395
+ }
2390
2396
  export interface SharedEditorParams {
2391
2397
  elementAttributes?: JSONRecord;
2392
2398
  /**