@conecli/cone-render 0.9.1-shop2.8 → 0.10.1-beta.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 (56) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/assets/icon_blue_info.svg +1 -0
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/environmentType.ts +1 -0
  5. package/dist/common/index.h5.ts +1 -1
  6. package/dist/common/index.jd.ts +1 -1
  7. package/dist/common/index.ts +1 -1
  8. package/dist/common/index.weapp.ts +1 -1
  9. package/dist/common/jdplayerSdk.ts +1 -0
  10. package/dist/common/sgmCustomCode.ts +1 -0
  11. package/dist/common/wxappApi.jd.ts +1 -0
  12. package/dist/components/ErrorBoundary.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  14. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  15. package/dist/components/base/CustomVideo/index.tsx +1 -1
  16. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  17. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  18. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  19. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  20. package/dist/components/debug/DebugLayout/index.module.scss +67 -0
  21. package/dist/components/debug/DebugLayout/index.tsx +1 -0
  22. package/dist/components/debug/DebugLayout/utils.ts +1 -0
  23. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  24. package/dist/components/floorItem.jd.tsx +1 -1
  25. package/dist/components/floorItem.weapp.tsx +1 -1
  26. package/dist/components/isv/Floor/index.tsx +1 -1
  27. package/dist/components/remoteFloorItem.tsx +1 -1
  28. package/dist/interface/common.ts +1 -1
  29. package/dist/interface/component.ts +1 -1
  30. package/dist/interface/jumpEventReport.ts +1 -1
  31. package/dist/interface/service.ts +1 -1
  32. package/dist/interface/utils.ts +1 -1
  33. package/dist/jumpEventReport/base.ts +1 -1
  34. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  35. package/dist/jumpEventReport/index.h5.ts +1 -1
  36. package/dist/jumpEventReport/index.jd.ts +1 -1
  37. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  38. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  39. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  40. package/dist/jumpEventReport/web.tjm.ts +1 -0
  41. package/dist/open/api/environment.ts +1 -1
  42. package/dist/open/api/index.ts +1 -1
  43. package/dist/open/api/track.ts +1 -1
  44. package/dist/sass/app.h5.scss +5 -0
  45. package/dist/service/requestServer.ts +1 -1
  46. package/dist/utils/connectNativeJsBridge.ts +1 -1
  47. package/dist/utils/draExceptionAndProfile.ts +1 -1
  48. package/dist/utils/h5Utils.ts +1 -1
  49. package/dist/utils/index.h5.ts +1 -1
  50. package/dist/utils/index.ts +1 -1
  51. package/dist/utils/index.weapp.ts +1 -1
  52. package/dist/utils/jm-common.js +1 -1
  53. package/dist/utils/sgmCodeUtils.ts +1 -0
  54. package/dist/utils/utils.ts +1 -1
  55. package/package.json +42 -39
  56. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
@@ -1 +1 @@
1
- import global from '../common'
2
1
  mdExtInfo = {}
3
2
  const getReportEntrance = isJdApp ? global.info?.openAppData?.sourceInfo?.entrance ?? entrance : entrance
4
3
  const getReportModuleId = isJdApp ? global.info?.openAppData?.sourceInfo?.moduleId ?? moduleId : moduleId
5
4
  pageCrowdId: mdExtInfo?.userGroupStr || '',
6
5
  updateRecInfo(floorData, _dataDefines) {
7
6
  const { algoId = '', userGroupStr = '' } = floorData
8
7
  const changeRecInfo =
9
8
  this.sectionTabData[this.sectionTabType]?.recInfo || {}
10
9
  return Object.assign({}, this.recInfo, changeRecInfo, {
11
10
  algoId,
12
11
  moduleCrowdId: userGroupStr
13
12
  })
14
13
  }
15
14
 
16
15
  updateMInfo(mInfo: any = [], floorData) {
17
16
  const { floorExtInfo, moduleId } = floorData
18
17
  const hasFloorInfo = floorExtInfo && moduleId
19
18
  if(Array.isArray(mInfo)){
20
19
  return mInfo.map((item: any) => {
21
20
  if(item?.jumpUrl){
22
21
  item.jumpUrl = /openApp\.jdMobile/i.test(item.jumpUrl) ? 'openApp' : encodeURIComponent(item.jumpUrl)
23
22
  }
24
23
  hasFloorInfo && (item.busid = `${floorExtInfo?.moduleFlag}@${moduleId}`)
25
24
  return item
26
25
  })
27
26
  }else {
28
27
  if(mInfo?.jumpUrl){
29
28
  mInfo.jumpUrl = /openApp\.jdMobile/i.test(mInfo.jumpUrl) ? 'openApp' : encodeURIComponent(mInfo.jumpUrl)
30
29
  }
31
30
  hasFloorInfo && (mInfo.busid = `${floorExtInfo?.moduleFlag}@${moduleId}`)
32
31
  !mInfo.hasOwnProperty('pos') && (mInfo.pos = 0)
33
32
  return Object.assign({}, this.mInfo, mInfo)
34
33
  }
35
34
  }
36
35
 
37
36
  updateEtModelExposureInfo(floorData,_dataDefines,etModleArr,mInfoArr) {
38
37
  return {
39
38
  lstms: []
40
39
  }
41
40
  }
42
41
 
43
42
  updateEtModelClickInfo(floorData, _dataDefines, etModleInfo = {}, mInfo) {
44
43
  return {
45
44
  lstm: [],
46
45
  }
47
46
  }
48
47
  return mInfo === 'custom' ? etModelInfo : this.getClickEventInfo(floorData,mInfo,etModelInfo,true,true)
49
48
  return mInfo === 'custom' ? etModelInfo : this.getExposureInfo(floorData,mInfo,etModelInfo,true,true)
50
49
 
51
50
  getCustomClickEventInfo(mInfo = {},floorData = {}, etModelInfo = {}){
52
51
  return this.getClickEventInfo(floorData,mInfo,etModelInfo,false,false)
53
52
  }
54
53
 
55
54
  getCustomExposureInfo(mInfo = {}, floorData = {}, etModelInfo = {}){
56
55
  return this.getExposureInfo(floorData,mInfo,etModelInfo,false,false)
57
56
  }
58
57
 
59
58
  getCustomClickEventInfo(mInfo = {},floorData = {}, etModelInfo = {}){
60
59
  return this.getClickEventInfo(floorData,mInfo,etModelInfo,false,false)
61
60
  }
62
61
 
63
62
  getCustomExposureInfo(mInfo = {}, floorData = {}, etModelInfo = {}){
64
63
  return this.getExposureInfo(floorData,mInfo,etModelInfo,false,false)
65
64
  }
66
65
 
67
66
  getFloorPointIndexClassName(floorData, index = 0, otherTip = '') {
68
67
  return isChartH5 ? (floorData && floorData?.uid ? `J_chart_floor_${floorData.uid}_point_${otherTip ? otherTip + '_' : ''}${index}` : '') : ''
69
68
  }
69
+ import global from '../common'
70
70
  mdExtInfo = {}
71
71
  const getReportEntrance = isJdApp ? global.info?.openAppData?.sourceInfo?.entrance ?? entrance : entrance
72
72
  const getReportModuleId = isJdApp ? global.info?.openAppData?.sourceInfo?.moduleId ?? moduleId : moduleId
73
73
  pageCrowdId: mdExtInfo?.userGroupStr || '',
74
74
  updateRecInfo(floorData, _dataDefines) {
75
75
  const { algoId = '', userGroupStr = '' } = floorData
76
76
  const changeRecInfo =
77
77
  this.sectionTabData[this.sectionTabType]?.recInfo || {}
78
78
  return Object.assign({}, this.recInfo, changeRecInfo, {
79
79
  algoId,
80
80
  moduleCrowdId: userGroupStr
81
81
  })
82
82
  }
83
83
 
84
84
  updateMInfo(mInfo: any = [], floorData) {
85
85
  const { floorExtInfo, moduleId } = floorData
86
86
  const hasFloorInfo = floorExtInfo && moduleId
87
87
  if(Array.isArray(mInfo)){
88
88
  return mInfo.map((item: any) => {
89
89
  if(item?.jumpUrl){
90
90
  item.jumpUrl = /openApp\.jdMobile/i.test(item.jumpUrl) ? 'openApp' : encodeURIComponent(item.jumpUrl)
91
91
  }
92
92
  hasFloorInfo && (item.busid = `${floorExtInfo?.moduleFlag}@${moduleId}`)
93
93
  return item
94
94
  })
95
95
  }else {
96
96
  if(mInfo?.jumpUrl){
97
97
  mInfo.jumpUrl = /openApp\.jdMobile/i.test(mInfo.jumpUrl) ? 'openApp' : encodeURIComponent(mInfo.jumpUrl)
98
98
  }
99
99
  hasFloorInfo && (mInfo.busid = `${floorExtInfo?.moduleFlag}@${moduleId}`)
100
100
  !mInfo.hasOwnProperty('pos') && (mInfo.pos = 0)
101
101
  return Object.assign({}, this.mInfo, mInfo)
102
102
  }
103
103
  }
104
104
 
105
105
  updateEtModelExposureInfo(floorData,_dataDefines,etModleArr,mInfoArr) {
106
106
  return {
107
107
  lstms: []
108
108
  }
109
109
  }
110
110
 
111
111
  updateEtModelClickInfo(floorData, _dataDefines, etModleInfo = {}, mInfo) {
112
112
  return {
113
113
  lstm: [],
114
114
  }
115
115
  }
116
116
  return mInfo === 'custom' ? etModelInfo : this.getClickEventInfo(floorData,mInfo,etModelInfo,true,true)
117
117
  return mInfo === 'custom' ? etModelInfo : this.getExposureInfo(floorData,mInfo,etModelInfo,true,true)
118
118
 
119
119
  getCustomClickEventInfo(mInfo = {},floorData = {}, etModelInfo = {}){
120
120
  return this.getClickEventInfo(floorData,mInfo,etModelInfo,false,false)
121
121
  }
122
122
 
123
123
  getCustomExposureInfo(mInfo = {}, floorData = {}, etModelInfo = {}){
124
124
  return this.getExposureInfo(floorData,mInfo,etModelInfo,false,false)
125
125
  }
126
126
 
127
127
  getFloorPointIndexClassName(floorData, index = 0, otherTip = '') {
128
128
  return isChartH5 ? (floorData && floorData?.uid ? `J_chart_floor_${floorData.uid}_point_${otherTip ? otherTip + '_' : ''}${index}` : '') : ''
129
129
  }
@@ -1 +1 @@
1
- import { isApp, getUrlQuery } from '../utils/jm-common'
2
1
  console.log('h5', isReflexToH5, getUrlQuery(window.location.href, 'reflex'))
3
2
  return new Promise((resolve, reject) => {
4
3
  if (isReflexToH5) {
5
4
  import('./web.base')
6
5
  .then(({ JumpEventWebReport }) => {
7
6
  if (JumpEventWebReport) {
8
7
  console.log('加载普通浏览器h5相关跳转事件js')
9
8
  JumpEventReport = new JumpEventWebReport({})
10
9
  resolve(JumpEventReport)
11
10
  }
12
11
  })
13
12
  .catch((err) => {
14
13
  reject(err)
15
14
  })
16
15
  } else {
17
16
  if (isApp('wx') && isApp('mp')) {
18
17
  import('./web.wxapp')
19
18
  .then(({ JdJumpWebToWxapp }) => {
20
19
  if (JdJumpWebToWxapp) {
21
20
  JumpEventReport = new JdJumpWebToWxapp({})
22
21
  resolve(JumpEventReport)
23
22
  }
24
23
  })
25
24
  .catch((err) => {
26
25
  reject(err)
27
26
  })
28
27
  } else if (isApp('jd') && !isApp('jdharmony')) {
29
28
  import('./web.jd')
30
29
  .then(({ JdJumpWebToJdApp }) => {
31
30
  if (JdJumpWebToJdApp) {
32
31
  JumpEventReport = new JdJumpWebToJdApp({})
33
32
  resolve(JumpEventReport)
34
33
  }
35
34
  })
36
35
  .catch((err) => {
37
36
  reject(err)
38
37
  })
39
38
  } else if (isApp('jdb')) {
40
39
  import('./web.jdb')
41
40
  .then(({ JdbJumpWebToJdbApp }) => {
42
41
  if (JdbJumpWebToJdbApp) {
43
42
  JumpEventReport = new JdbJumpWebToJdbApp({})
44
43
  resolve(JumpEventReport)
45
44
  }
46
45
  })
47
46
  .catch((err) => {
48
47
  reject(err)
49
48
  })
50
49
  } else if (isApp('jdjch')) {
51
50
  import('./web.jdjch')
52
51
  .then(({ JdbJumpWebToJdbApp }) => {
53
52
  if (JdbJumpWebToJdbApp) {
54
53
  JumpEventReport = new JdbJumpWebToJdbApp({})
55
54
  resolve(JumpEventReport)
56
55
  }
57
56
  })
58
57
  .catch((err) => {
59
58
  reject(err)
60
59
  })
61
60
  } else if (isPc) {
62
61
  import('./web.pc')
63
62
  .then(({ JumpEventWebReport }) => {
64
63
  if (JumpEventWebReport) {
65
64
  JumpEventReport = new JumpEventWebReport({})
66
65
  resolve(JumpEventReport)
67
66
  }
68
67
  })
69
68
  .catch((err) => {
70
69
  reject(err)
71
70
  })
72
71
  } else {
73
72
  import('./web.base')
74
73
  .then(({ JumpEventWebReport }) => {
75
74
  if (JumpEventWebReport) {
76
75
  JumpEventReport = new JumpEventWebReport({})
77
76
  resolve(JumpEventReport)
78
77
  }
79
78
  })
80
79
  .catch((err) => {
81
80
  reject(err)
82
81
  })
83
82
  }
84
83
  }
85
84
  })
85
+ import { isApp, getUrlQuery } from '../utils/jm-common'
86
86
  console.log('h5', isReflexToH5, getUrlQuery(window.location.href, 'reflex'))
87
87
  return new Promise((resolve, reject) => {
88
88
  if (isReflexToH5) {
89
89
  import('./web.base')
90
90
  .then(({ JumpEventWebReport }) => {
91
91
  if (JumpEventWebReport) {
92
92
  console.log('加载普通浏览器h5相关跳转事件js')
93
93
  JumpEventReport = new JumpEventWebReport({})
94
94
  resolve(JumpEventReport)
95
95
  }
96
96
  })
97
97
  .catch((err) => {
98
98
  reject(err)
99
99
  })
100
100
  } else {
101
101
  if (isApp('wx') && isApp('mp') && isH5AdnJxMini) {
102
102
  import('./web.jxwxapp')
103
103
  .then(({ JdJumpWebToJxWxapp }) => {
104
104
  if (JdJumpWebToJxWxapp) {
105
105
  JumpEventReport = new JdJumpWebToJxWxapp({})
106
106
  resolve(JumpEventReport)
107
107
  }
108
108
  })
109
109
  .catch((err) => {
110
110
  reject(err)
111
111
  })
112
112
  } else if (isApp('wx') && isApp('mp')) {
113
113
  import('./web.wxapp')
114
114
  .then(({ JdJumpWebToWxapp }) => {
115
115
  if (JdJumpWebToWxapp) {
116
116
  JumpEventReport = new JdJumpWebToWxapp({})
117
117
  resolve(JumpEventReport)
118
118
  }
119
119
  })
120
120
  .catch((err) => {
121
121
  reject(err)
122
122
  })
123
123
  } else if (isApp('jd') && !isApp('jdharmony')) {
124
124
  import('./web.jd')
125
125
  .then(({ JdJumpWebToJdApp }) => {
126
126
  if (JdJumpWebToJdApp) {
127
127
  JumpEventReport = new JdJumpWebToJdApp({})
128
128
  resolve(JumpEventReport)
129
129
  }
130
130
  })
131
131
  .catch((err) => {
132
132
  reject(err)
133
133
  })
134
134
  } else if (isApp('jdb')) {
135
135
  import('./web.jdb')
136
136
  .then(({ JdbJumpWebToJdbApp }) => {
137
137
  if (JdbJumpWebToJdbApp) {
138
138
  JumpEventReport = new JdbJumpWebToJdbApp({})
139
139
  resolve(JumpEventReport)
140
140
  }
141
141
  })
142
142
  .catch((err) => {
143
143
  reject(err)
144
144
  })
145
145
  } else if (isApp('jdjch')) {
146
146
  import('./web.jdjch')
147
147
  .then(({ JdbJumpWebToJdbApp }) => {
148
148
  if (JdbJumpWebToJdbApp) {
149
149
  JumpEventReport = new JdbJumpWebToJdbApp({})
150
150
  resolve(JumpEventReport)
151
151
  }
152
152
  })
153
153
  .catch((err) => {
154
154
  reject(err)
155
155
  })
156
156
  } else if (isApp('tjapp')) {
157
157
  import('./web.tjapp')
158
158
  .then(({ tjJumpWebTotjApp }) => {
159
159
  if (tjJumpWebTotjApp) {
160
160
  console.log('加载特价app内h5相关跳转事件js')
161
161
  JumpEventReport = new tjJumpWebTotjApp({})
162
162
  resolve(JumpEventReport)
163
163
  }
164
164
  })
165
165
  .catch((err) => {
166
166
  reject(err)
167
167
  })
168
168
  } else if (isPc) {
169
169
  import('./web.pc')
170
170
  .then(({ JumpEventWebReport }) => {
171
171
  if (JumpEventWebReport) {
172
172
  JumpEventReport = new JumpEventWebReport({})
173
173
  resolve(JumpEventReport)
174
174
  }
175
175
  })
176
176
  .catch((err) => {
177
177
  reject(err)
178
178
  })
179
179
  } else if (isTjJxM || isTjM) {
180
180
  import('./web.tjm')
181
181
  .then(({ JumpEventTJWebReport }) => {
182
182
  if (JumpEventTJWebReport) {
183
183
  JumpEventReport = new JumpEventTJWebReport({})
184
184
  resolve(JumpEventReport)
185
185
  }
186
186
  })
187
187
  .catch((err) => {
188
188
  reject(err)
189
189
  })
190
190
  } else {
191
191
  import('./web.base')
192
192
  .then(({ JumpEventWebReport }) => {
193
193
  if (JumpEventWebReport) {
194
194
  JumpEventReport = new JumpEventWebReport({})
195
195
  resolve(JumpEventReport)
196
196
  }
197
197
  })
198
198
  .catch((err) => {
199
199
  reject(err)
200
200
  })
201
201
  }
202
202
  }
203
203
  })