@open-condo/ui 1.28.0 → 1.28.1
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type AnalyticsEvent = 'click' | 'check' | '
|
|
2
|
+
declare type AnalyticsEvent = 'click' | 'check' | 'change';
|
|
3
3
|
declare type CommonComponentProps = {
|
|
4
4
|
id?: string;
|
|
5
5
|
};
|
|
@@ -31,8 +31,6 @@ declare type ComponentSpecificChangeEventProps = {
|
|
|
31
31
|
Steps: {
|
|
32
32
|
activeStep: number;
|
|
33
33
|
};
|
|
34
|
-
};
|
|
35
|
-
declare type ComponentSpecificSelectEventProps = {
|
|
36
34
|
Select: {
|
|
37
35
|
value: string;
|
|
38
36
|
label: string | Array<string>;
|
|
@@ -42,7 +40,6 @@ declare type ComponentNames = {
|
|
|
42
40
|
click: keyof ComponentSpecificClickEventProps;
|
|
43
41
|
check: keyof ComponentSpecificCheckEventProps;
|
|
44
42
|
change: keyof ComponentSpecificChangeEventProps;
|
|
45
|
-
select: keyof ComponentSpecificSelectEventProps;
|
|
46
43
|
};
|
|
47
44
|
declare type AnyComponentName = ComponentNames[AnalyticsEvent];
|
|
48
45
|
declare type CommonAnalyticsProps<Event extends AnalyticsEvent, Component extends AnyComponentName> = {
|
|
@@ -52,13 +49,11 @@ declare type CommonAnalyticsProps<Event extends AnalyticsEvent, Component extend
|
|
|
52
49
|
} & CommonComponentProps;
|
|
53
50
|
declare type AnalyticsClickEventParams<Component extends ComponentNames['click']> = CommonAnalyticsProps<'click', Component> & ComponentSpecificClickEventProps[Component];
|
|
54
51
|
declare type AnalyticsCheckEventParams<Component extends ComponentNames['check']> = CommonAnalyticsProps<'check', Component> & ComponentSpecificCheckEventProps[Component];
|
|
55
|
-
declare type AnalyticsSelectEventParams<Component extends ComponentNames['select']> = CommonAnalyticsProps<'select', Component> & ComponentSpecificSelectEventProps[Component];
|
|
56
52
|
declare type AnalyticsChangeEventParams<Component extends ComponentNames['change']> = CommonAnalyticsProps<'change', Component> & ComponentSpecificChangeEventProps[Component];
|
|
57
|
-
export declare type AnalyticsParams = AnalyticsClickEventParams<ComponentNames['click']> | AnalyticsCheckEventParams<ComponentNames['check']> |
|
|
53
|
+
export declare type AnalyticsParams = AnalyticsClickEventParams<ComponentNames['click']> | AnalyticsCheckEventParams<ComponentNames['check']> | AnalyticsChangeEventParams<ComponentNames['change']>;
|
|
58
54
|
export declare function extractChildrenContent(children: React.ReactNode): string | null;
|
|
59
55
|
export declare function sendAnalyticsClickEvent<Component extends ComponentNames['click']>(component: Component, data: ComponentSpecificClickEventProps[Component] & CommonComponentProps): void;
|
|
60
56
|
export declare function sendAnalyticsCheckEvent<Component extends ComponentNames['check']>(component: Component, data: ComponentSpecificCheckEventProps[Component] & CommonComponentProps): void;
|
|
61
|
-
export declare function sendAnalyticsSelectEvent<Component extends ComponentNames['select']>(component: Component, data: ComponentSpecificSelectEventProps[Component] & CommonComponentProps): void;
|
|
62
57
|
export declare function sendAnalyticsChangeEvent<Component extends ComponentNames['change']>(component: Component, data: ComponentSpecificChangeEventProps[Component] & CommonComponentProps): void;
|
|
63
58
|
export {};
|
|
64
59
|
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/components/_utils/analytics.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,aAAK,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/components/_utils/analytics.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,aAAK,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAElD,aAAK,oBAAoB,GAAG;IACxB,EAAE,CAAC,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
|
}, '*');
|
|
47586
47586
|
}
|
|
47587
47587
|
}
|
|
47588
|
-
function sendAnalyticsSelectEvent(component, data) {
|
|
47589
|
-
if (typeof window !== 'undefined') {
|
|
47590
|
-
var location = window.location.href;
|
|
47591
|
-
|
|
47592
|
-
var params = _objectSpread({
|
|
47593
|
-
event: 'select',
|
|
47594
|
-
location: location,
|
|
47595
|
-
component: component
|
|
47596
|
-
}, data);
|
|
47597
|
-
|
|
47598
|
-
parent.postMessage({
|
|
47599
|
-
handler: ANALYTICS_HANDLER_NAME,
|
|
47600
|
-
params: params,
|
|
47601
|
-
type: 'condo-ui',
|
|
47602
|
-
version: package_namespaceObject.i8
|
|
47603
|
-
}, '*');
|
|
47604
|
-
}
|
|
47605
|
-
}
|
|
47606
47588
|
function sendAnalyticsChangeEvent(component, data) {
|
|
47607
47589
|
if (typeof window !== 'undefined') {
|
|
47608
47590
|
var location = window.location.href;
|
|
@@ -69689,8 +69671,8 @@ var Select_select_Select = function Select(props) {
|
|
|
69689
69671
|
}
|
|
69690
69672
|
|
|
69691
69673
|
if (title) {
|
|
69692
|
-
// TODO(DOMA-5597):
|
|
69693
|
-
|
|
69674
|
+
// TODO(DOMA-5597): Key prop should be used here
|
|
69675
|
+
sendAnalyticsChangeEvent('Select', {
|
|
69694
69676
|
label: title,
|
|
69695
69677
|
value: String(value),
|
|
69696
69678
|
id: id
|