@elementor/editor-global-classes 4.2.0-917 → 4.2.0-918

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/dist/index.d.mts CHANGED
@@ -23,4 +23,90 @@ declare function addDocumentClasses(documentId: number): Promise<void>;
23
23
 
24
24
  declare function createLabelsForClasses(entries: Array<GlobalClassIndexEntry | StyleDefinition>): Record<StyleDefinitionID, string>;
25
25
 
26
- export { ClassManagerPanelEmbedded, type ClassManagerPanelEmbeddedProps, GLOBAL_CLASSES_URI, type GlobalClassIndexEntry, addDocumentClasses, createLabelsForClasses, init, loadExistingClasses };
26
+ type FilterKey = 'empty' | 'onThisPage' | 'unused';
27
+
28
+ type EventMap = {
29
+ classCreated: {
30
+ source?: 'created' | 'converted' | 'duplicated';
31
+ classId: StyleDefinitionID;
32
+ classTitle?: string;
33
+ };
34
+ classDeleted: {
35
+ classId: StyleDefinitionID;
36
+ runAction?: () => void;
37
+ };
38
+ classRenamed: {
39
+ classId: StyleDefinitionID;
40
+ oldValue: string;
41
+ newValue: string;
42
+ source: 'class-manager' | 'style-tab';
43
+ };
44
+ classApplied: {
45
+ classId: StyleDefinitionID;
46
+ classTitle: string;
47
+ totalInstancesAfterApply: number;
48
+ };
49
+ classRemoved: {
50
+ classId: StyleDefinitionID;
51
+ classTitle: string;
52
+ };
53
+ classStyled: {
54
+ classId: StyleDefinitionID;
55
+ classTitle: string;
56
+ classType: 'global' | 'local';
57
+ };
58
+ classManagerOpened: {
59
+ source: 'style-panel' | 'system-panel';
60
+ };
61
+ classManagerSearched: Record<string, never>;
62
+ classManagerFiltersOpened: Record<string, never>;
63
+ classManagerFilterUsed: {
64
+ action: 'apply' | 'remove';
65
+ type: FilterKey;
66
+ trigger: 'menu' | 'header';
67
+ };
68
+ classManagerFilterCleared: {
69
+ trigger: 'menu' | 'header';
70
+ };
71
+ classManagerReorder: {
72
+ classId: StyleDefinitionID;
73
+ classTitle: string;
74
+ };
75
+ classPublishConflict: {
76
+ numOfConflicts: number;
77
+ };
78
+ classUsageHovered: {
79
+ classId: string;
80
+ usage: number;
81
+ };
82
+ classUsageClicked: {
83
+ classId: StyleDefinitionID;
84
+ };
85
+ classUsageLocate: {
86
+ classId: StyleDefinitionID;
87
+ };
88
+ classStateClicked: {
89
+ classId: StyleDefinitionID | null;
90
+ type: string;
91
+ source: 'global' | 'local';
92
+ };
93
+ classSyncToV3PopupShown: {
94
+ classId: StyleDefinitionID;
95
+ };
96
+ classSyncToV3: {
97
+ classId: StyleDefinitionID;
98
+ action: 'sync' | 'unsync';
99
+ };
100
+ classSyncToV3PopupClick: {
101
+ classId: StyleDefinitionID;
102
+ action: 'sync' | 'cancel';
103
+ };
104
+ };
105
+ type TrackingEvent = {
106
+ [K in keyof EventMap]: {
107
+ event: K;
108
+ } & EventMap[K];
109
+ }[keyof EventMap];
110
+ declare const trackGlobalClasses: (payload: TrackingEvent) => Promise<void>;
111
+
112
+ export { ClassManagerPanelEmbedded, type ClassManagerPanelEmbeddedProps, GLOBAL_CLASSES_URI, type GlobalClassIndexEntry, addDocumentClasses, createLabelsForClasses, init, loadExistingClasses, trackGlobalClasses };
package/dist/index.d.ts CHANGED
@@ -23,4 +23,90 @@ declare function addDocumentClasses(documentId: number): Promise<void>;
23
23
 
24
24
  declare function createLabelsForClasses(entries: Array<GlobalClassIndexEntry | StyleDefinition>): Record<StyleDefinitionID, string>;
25
25
 
26
- export { ClassManagerPanelEmbedded, type ClassManagerPanelEmbeddedProps, GLOBAL_CLASSES_URI, type GlobalClassIndexEntry, addDocumentClasses, createLabelsForClasses, init, loadExistingClasses };
26
+ type FilterKey = 'empty' | 'onThisPage' | 'unused';
27
+
28
+ type EventMap = {
29
+ classCreated: {
30
+ source?: 'created' | 'converted' | 'duplicated';
31
+ classId: StyleDefinitionID;
32
+ classTitle?: string;
33
+ };
34
+ classDeleted: {
35
+ classId: StyleDefinitionID;
36
+ runAction?: () => void;
37
+ };
38
+ classRenamed: {
39
+ classId: StyleDefinitionID;
40
+ oldValue: string;
41
+ newValue: string;
42
+ source: 'class-manager' | 'style-tab';
43
+ };
44
+ classApplied: {
45
+ classId: StyleDefinitionID;
46
+ classTitle: string;
47
+ totalInstancesAfterApply: number;
48
+ };
49
+ classRemoved: {
50
+ classId: StyleDefinitionID;
51
+ classTitle: string;
52
+ };
53
+ classStyled: {
54
+ classId: StyleDefinitionID;
55
+ classTitle: string;
56
+ classType: 'global' | 'local';
57
+ };
58
+ classManagerOpened: {
59
+ source: 'style-panel' | 'system-panel';
60
+ };
61
+ classManagerSearched: Record<string, never>;
62
+ classManagerFiltersOpened: Record<string, never>;
63
+ classManagerFilterUsed: {
64
+ action: 'apply' | 'remove';
65
+ type: FilterKey;
66
+ trigger: 'menu' | 'header';
67
+ };
68
+ classManagerFilterCleared: {
69
+ trigger: 'menu' | 'header';
70
+ };
71
+ classManagerReorder: {
72
+ classId: StyleDefinitionID;
73
+ classTitle: string;
74
+ };
75
+ classPublishConflict: {
76
+ numOfConflicts: number;
77
+ };
78
+ classUsageHovered: {
79
+ classId: string;
80
+ usage: number;
81
+ };
82
+ classUsageClicked: {
83
+ classId: StyleDefinitionID;
84
+ };
85
+ classUsageLocate: {
86
+ classId: StyleDefinitionID;
87
+ };
88
+ classStateClicked: {
89
+ classId: StyleDefinitionID | null;
90
+ type: string;
91
+ source: 'global' | 'local';
92
+ };
93
+ classSyncToV3PopupShown: {
94
+ classId: StyleDefinitionID;
95
+ };
96
+ classSyncToV3: {
97
+ classId: StyleDefinitionID;
98
+ action: 'sync' | 'unsync';
99
+ };
100
+ classSyncToV3PopupClick: {
101
+ classId: StyleDefinitionID;
102
+ action: 'sync' | 'cancel';
103
+ };
104
+ };
105
+ type TrackingEvent = {
106
+ [K in keyof EventMap]: {
107
+ event: K;
108
+ } & EventMap[K];
109
+ }[keyof EventMap];
110
+ declare const trackGlobalClasses: (payload: TrackingEvent) => Promise<void>;
111
+
112
+ export { ClassManagerPanelEmbedded, type ClassManagerPanelEmbeddedProps, GLOBAL_CLASSES_URI, type GlobalClassIndexEntry, addDocumentClasses, createLabelsForClasses, init, loadExistingClasses, trackGlobalClasses };
package/dist/index.js CHANGED
@@ -35,7 +35,8 @@ __export(index_exports, {
35
35
  addDocumentClasses: () => addDocumentClasses,
36
36
  createLabelsForClasses: () => createLabelsForClasses,
37
37
  init: () => init,
38
- loadExistingClasses: () => loadExistingClasses
38
+ loadExistingClasses: () => loadExistingClasses,
39
+ trackGlobalClasses: () => trackGlobalClasses
39
40
  });
40
41
  module.exports = __toCommonJS(index_exports);
41
42
 
@@ -3369,6 +3370,7 @@ function init() {
3369
3370
  addDocumentClasses,
3370
3371
  createLabelsForClasses,
3371
3372
  init,
3372
- loadExistingClasses
3373
+ loadExistingClasses,
3374
+ trackGlobalClasses
3373
3375
  });
3374
3376
  //# sourceMappingURL=index.js.map