@atlaskit/smart-card 26.5.3 → 26.5.5
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/CHANGELOG.md +13 -0
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +2 -2
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +3 -4
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +4 -25
- package/dist/cjs/utils/analytics/analytics.js +134 -147
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +4 -30
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -6
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +28 -7
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +9 -3
- package/dist/cjs/view/HoverCard/utils.js +2 -33
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +1 -4
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +4 -6
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +3 -24
- package/dist/es2019/utils/analytics/analytics.js +0 -13
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +3 -20
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +28 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +14 -0
- package/dist/es2019/view/HoverCard/utils.js +0 -20
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +2 -2
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +4 -5
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -26
- package/dist/esm/utils/analytics/analytics.js +130 -142
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +4 -27
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +3 -7
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +29 -8
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +6 -2
- package/dist/esm/view/HoverCard/utils.js +0 -29
- package/dist/types/model/invoke-opts.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -1
- package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +1 -5
- package/dist/types/utils/analytics/analytics.d.ts +0 -3
- package/dist/types/view/BlockCard/components/Action.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/types.d.ts +0 -5
- package/dist/types/view/HoverCard/components/views/resolving/styled.d.ts +5 -2
- package/dist/types/view/HoverCard/utils.d.ts +0 -3
- package/dist/types-ts4.5/model/invoke-opts.d.ts +1 -1
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +2 -1
- package/dist/types-ts4.5/state/hooks-external/useSmartLinkActions.d.ts +1 -5
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -3
- package/dist/types-ts4.5/view/BlockCard/components/Action.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/types.d.ts +0 -5
- package/dist/types-ts4.5/view/HoverCard/components/views/resolving/styled.d.ts +5 -2
- package/dist/types-ts4.5/view/HoverCard/utils.d.ts +0 -3
- package/package.json +3 -3
- package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +0 -16
- package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +0 -10
- package/dist/esm/extractors/common/lozenge/extractLozengeText.js +0 -9
- package/dist/types/extractors/common/lozenge/extractLozengeText.d.ts +0 -2
- package/dist/types-ts4.5/extractors/common/lozenge/extractLozengeText.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8f456366d7b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f456366d7b) - Clean up actionable element experiment
|
|
8
|
+
|
|
9
|
+
## 26.5.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`2660603c726`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2660603c726) - [ux] A hover card loading state improvement is implemented: all elements except for actions would have a loading skeleton
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 26.5.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -93,8 +93,8 @@ var extractPreviewAction = function extractPreviewAction(_ref) {
|
|
|
93
93
|
// - Promise invoked by the action invocation handler; open preview.
|
|
94
94
|
previewActionProps.action.promise = previewAction.promise;
|
|
95
95
|
// - Promise invoked on click of `Preview` on block card; trigger above promise.
|
|
96
|
-
previewAction.promise = function (
|
|
97
|
-
return handleInvoke(
|
|
96
|
+
previewAction.promise = function () {
|
|
97
|
+
return handleInvoke(previewActionProps);
|
|
98
98
|
};
|
|
99
99
|
return previewAction;
|
|
100
100
|
}
|
|
@@ -753,11 +753,10 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatchAnalyti
|
|
|
753
753
|
})), commonAttributes));
|
|
754
754
|
},
|
|
755
755
|
/**
|
|
756
|
-
*
|
|
756
|
+
* Removed in EDM-5153: This is an even from an experiment.
|
|
757
|
+
* @deprecated
|
|
757
758
|
*/
|
|
758
|
-
linkUpdated: function linkUpdated(props) {
|
|
759
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackLinkUpdated)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
|
|
760
|
-
},
|
|
759
|
+
linkUpdated: function linkUpdated(props) {},
|
|
761
760
|
/**
|
|
762
761
|
* This fires a tracking event before an action invoke api call is made
|
|
763
762
|
*/
|
|
@@ -13,7 +13,6 @@ var _actions = require("../actions");
|
|
|
13
13
|
var _analytics = require("../analytics");
|
|
14
14
|
var _store = require("../store");
|
|
15
15
|
var _helpers = require("../helpers");
|
|
16
|
-
var _linkProvider = require("@atlaskit/link-provider");
|
|
17
16
|
function useSmartLinkActions(_ref) {
|
|
18
17
|
var url = _ref.url,
|
|
19
18
|
appearance = _ref.appearance,
|
|
@@ -31,34 +30,14 @@ function useSmartLinkActions(_ref) {
|
|
|
31
30
|
var linkState = (0, _store.useSmartCardState)(url);
|
|
32
31
|
var linkAnalytics = (0, _analytics.useSmartLinkAnalytics)(url, analyticsHandler, id);
|
|
33
32
|
var linkActions = (0, _actions.useSmartCardActions)(id, url, linkAnalytics);
|
|
34
|
-
|
|
35
|
-
// Start: Smart ink Actions experiment
|
|
36
|
-
var enableActionableElement = (0, _linkProvider.useFeatureFlag)('enableActionableElement');
|
|
37
|
-
var reload = (0, _react.useCallback)(function () {
|
|
38
|
-
return linkActions.reload();
|
|
39
|
-
}, [linkActions]);
|
|
40
|
-
var handleInvoke = (0, _react.useCallback)(function (opts) {
|
|
41
|
-
var _opts$action;
|
|
42
|
-
if (enableActionableElement && opts.type === 'client' && opts.isReloadRequired && ((_opts$action = opts.action) === null || _opts$action === void 0 ? void 0 : _opts$action.type) === 'PreviewAction') {
|
|
43
|
-
// Reload when embed preview modal close
|
|
44
|
-
var promise = opts.action.promise;
|
|
45
|
-
opts.action.type = 'StatusAction';
|
|
46
|
-
opts.action.promise = function () {
|
|
47
|
-
return promise({
|
|
48
|
-
onClose: reload
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return linkActions.invoke(opts, appearance);
|
|
53
|
-
}, [appearance, enableActionableElement, linkActions, reload]);
|
|
54
|
-
// End: Smart ink Actions experiment
|
|
55
|
-
|
|
56
33
|
(0, _react.useEffect)(function () {
|
|
57
34
|
if (!linkState.details) {
|
|
58
35
|
return;
|
|
59
36
|
}
|
|
60
37
|
var cardProperties = (0, _block.extractBlockProps)(linkState.details.data, linkState.details.meta, {
|
|
61
|
-
handleInvoke: handleInvoke
|
|
38
|
+
handleInvoke: function handleInvoke(opts) {
|
|
39
|
+
return linkActions.invoke(opts, appearance);
|
|
40
|
+
},
|
|
62
41
|
analytics: linkAnalytics,
|
|
63
42
|
origin: origin,
|
|
64
43
|
extensionKey: (0, _helpers.getExtensionKey)(linkState.details),
|
|
@@ -75,6 +54,6 @@ function useSmartLinkActions(_ref) {
|
|
|
75
54
|
};
|
|
76
55
|
});
|
|
77
56
|
setActions(cardActions);
|
|
78
|
-
}, [linkState, linkActions, linkAnalytics, appearance, platform, origin
|
|
57
|
+
}, [linkState, linkActions, linkAnalytics, appearance, platform, origin]);
|
|
79
58
|
return actions;
|
|
80
59
|
}
|
|
@@ -4,17 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiIframeFocusedEvent = exports.uiIframeDwelledEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackSmartLinkQuickActionSuccess = exports.trackSmartLinkQuickActionStarted = exports.trackSmartLinkQuickActionFailed = exports.
|
|
7
|
+
exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiIframeFocusedEvent = exports.uiIframeDwelledEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackSmartLinkQuickActionSuccess = exports.trackSmartLinkQuickActionStarted = exports.trackSmartLinkQuickActionFailed = exports.trackAppAccountConnected = exports.trackAppAccountAuthStarted = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
12
|
var _version = require("../../version.json");
|
|
13
13
|
var _performance = require("../performance");
|
|
14
|
-
var _excluded = ["
|
|
14
|
+
var _excluded = ["smartLinkActionType"],
|
|
15
15
|
_excluded2 = ["smartLinkActionType"],
|
|
16
|
-
_excluded3 = ["smartLinkActionType"]
|
|
17
|
-
_excluded4 = ["smartLinkActionType"];
|
|
16
|
+
_excluded3 = ["smartLinkActionType"];
|
|
18
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
19
|
var ANALYTICS_CHANNEL = 'media';
|
|
@@ -259,21 +258,9 @@ var trackAppAccountAuthStarted = function trackAppAccountAuthStarted(_ref7) {
|
|
|
259
258
|
};
|
|
260
259
|
};
|
|
261
260
|
exports.trackAppAccountAuthStarted = trackAppAccountAuthStarted;
|
|
262
|
-
var
|
|
263
|
-
var
|
|
261
|
+
var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref8) {
|
|
262
|
+
var smartLinkActionType = _ref8.smartLinkActionType,
|
|
264
263
|
attributes = (0, _objectWithoutProperties2.default)(_ref8, _excluded);
|
|
265
|
-
return {
|
|
266
|
-
action: 'updated',
|
|
267
|
-
actionSubject: 'link',
|
|
268
|
-
actionSubjectId: actionSubjectId,
|
|
269
|
-
eventType: 'track',
|
|
270
|
-
attributes: _objectSpread(_objectSpread({}, context), attributes)
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
exports.trackLinkUpdated = trackLinkUpdated;
|
|
274
|
-
var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted(_ref9) {
|
|
275
|
-
var smartLinkActionType = _ref9.smartLinkActionType,
|
|
276
|
-
attributes = (0, _objectWithoutProperties2.default)(_ref9, _excluded2);
|
|
277
264
|
return {
|
|
278
265
|
action: 'started',
|
|
279
266
|
actionSubject: 'smartLinkQuickAction',
|
|
@@ -284,9 +271,9 @@ var trackSmartLinkQuickActionStarted = function trackSmartLinkQuickActionStarted
|
|
|
284
271
|
};
|
|
285
272
|
};
|
|
286
273
|
exports.trackSmartLinkQuickActionStarted = trackSmartLinkQuickActionStarted;
|
|
287
|
-
var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(
|
|
288
|
-
var smartLinkActionType =
|
|
289
|
-
attributes = (0, _objectWithoutProperties2.default)(
|
|
274
|
+
var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess(_ref9) {
|
|
275
|
+
var smartLinkActionType = _ref9.smartLinkActionType,
|
|
276
|
+
attributes = (0, _objectWithoutProperties2.default)(_ref9, _excluded2);
|
|
290
277
|
return {
|
|
291
278
|
action: 'success',
|
|
292
279
|
actionSubject: 'smartLinkQuickAction',
|
|
@@ -297,9 +284,9 @@ var trackSmartLinkQuickActionSuccess = function trackSmartLinkQuickActionSuccess
|
|
|
297
284
|
};
|
|
298
285
|
};
|
|
299
286
|
exports.trackSmartLinkQuickActionSuccess = trackSmartLinkQuickActionSuccess;
|
|
300
|
-
var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(
|
|
301
|
-
var smartLinkActionType =
|
|
302
|
-
attributes = (0, _objectWithoutProperties2.default)(
|
|
287
|
+
var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_ref10) {
|
|
288
|
+
var smartLinkActionType = _ref10.smartLinkActionType,
|
|
289
|
+
attributes = (0, _objectWithoutProperties2.default)(_ref10, _excluded3);
|
|
303
290
|
return {
|
|
304
291
|
action: 'failed',
|
|
305
292
|
actionSubject: 'smartLinkQuickAction',
|
|
@@ -310,13 +297,13 @@ var trackSmartLinkQuickActionFailed = function trackSmartLinkQuickActionFailed(_
|
|
|
310
297
|
};
|
|
311
298
|
};
|
|
312
299
|
exports.trackSmartLinkQuickActionFailed = trackSmartLinkQuickActionFailed;
|
|
313
|
-
var uiAuthEvent = function uiAuthEvent(
|
|
314
|
-
var definitionId =
|
|
315
|
-
extensionKey =
|
|
316
|
-
destinationProduct =
|
|
317
|
-
destinationSubproduct =
|
|
318
|
-
location =
|
|
319
|
-
display =
|
|
300
|
+
var uiAuthEvent = function uiAuthEvent(_ref11) {
|
|
301
|
+
var definitionId = _ref11.definitionId,
|
|
302
|
+
extensionKey = _ref11.extensionKey,
|
|
303
|
+
destinationProduct = _ref11.destinationProduct,
|
|
304
|
+
destinationSubproduct = _ref11.destinationSubproduct,
|
|
305
|
+
location = _ref11.location,
|
|
306
|
+
display = _ref11.display;
|
|
320
307
|
return {
|
|
321
308
|
action: 'clicked',
|
|
322
309
|
actionSubject: 'button',
|
|
@@ -333,13 +320,13 @@ var uiAuthEvent = function uiAuthEvent(_ref12) {
|
|
|
333
320
|
};
|
|
334
321
|
};
|
|
335
322
|
exports.uiAuthEvent = uiAuthEvent;
|
|
336
|
-
var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(
|
|
337
|
-
var definitionId =
|
|
338
|
-
extensionKey =
|
|
339
|
-
destinationProduct =
|
|
340
|
-
destinationSubproduct =
|
|
341
|
-
location =
|
|
342
|
-
display =
|
|
323
|
+
var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref12) {
|
|
324
|
+
var definitionId = _ref12.definitionId,
|
|
325
|
+
extensionKey = _ref12.extensionKey,
|
|
326
|
+
destinationProduct = _ref12.destinationProduct,
|
|
327
|
+
destinationSubproduct = _ref12.destinationSubproduct,
|
|
328
|
+
location = _ref12.location,
|
|
329
|
+
display = _ref12.display;
|
|
343
330
|
return {
|
|
344
331
|
action: 'clicked',
|
|
345
332
|
actionSubject: 'smartLink',
|
|
@@ -356,17 +343,17 @@ var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref13) {
|
|
|
356
343
|
};
|
|
357
344
|
};
|
|
358
345
|
exports.uiAuthAlternateAccountEvent = uiAuthAlternateAccountEvent;
|
|
359
|
-
var uiCardClickedEvent = function uiCardClickedEvent(
|
|
360
|
-
var id =
|
|
361
|
-
display =
|
|
362
|
-
status =
|
|
363
|
-
definitionId =
|
|
364
|
-
extensionKey =
|
|
365
|
-
isModifierKeyPressed =
|
|
366
|
-
location =
|
|
367
|
-
destinationProduct =
|
|
368
|
-
destinationSubproduct =
|
|
369
|
-
actionSubjectId =
|
|
346
|
+
var uiCardClickedEvent = function uiCardClickedEvent(_ref13) {
|
|
347
|
+
var id = _ref13.id,
|
|
348
|
+
display = _ref13.display,
|
|
349
|
+
status = _ref13.status,
|
|
350
|
+
definitionId = _ref13.definitionId,
|
|
351
|
+
extensionKey = _ref13.extensionKey,
|
|
352
|
+
isModifierKeyPressed = _ref13.isModifierKeyPressed,
|
|
353
|
+
location = _ref13.location,
|
|
354
|
+
destinationProduct = _ref13.destinationProduct,
|
|
355
|
+
destinationSubproduct = _ref13.destinationSubproduct,
|
|
356
|
+
actionSubjectId = _ref13.actionSubjectId;
|
|
370
357
|
return {
|
|
371
358
|
action: 'clicked',
|
|
372
359
|
actionSubject: 'smartLink',
|
|
@@ -386,17 +373,17 @@ var uiCardClickedEvent = function uiCardClickedEvent(_ref14) {
|
|
|
386
373
|
};
|
|
387
374
|
};
|
|
388
375
|
exports.uiCardClickedEvent = uiCardClickedEvent;
|
|
389
|
-
var uiIframeDwelledEvent = function uiIframeDwelledEvent(
|
|
390
|
-
var id =
|
|
391
|
-
display =
|
|
392
|
-
status =
|
|
393
|
-
definitionId =
|
|
394
|
-
extensionKey =
|
|
395
|
-
location =
|
|
396
|
-
destinationProduct =
|
|
397
|
-
destinationSubproduct =
|
|
398
|
-
dwellTime =
|
|
399
|
-
dwellPercentVisible =
|
|
376
|
+
var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref14) {
|
|
377
|
+
var id = _ref14.id,
|
|
378
|
+
display = _ref14.display,
|
|
379
|
+
status = _ref14.status,
|
|
380
|
+
definitionId = _ref14.definitionId,
|
|
381
|
+
extensionKey = _ref14.extensionKey,
|
|
382
|
+
location = _ref14.location,
|
|
383
|
+
destinationProduct = _ref14.destinationProduct,
|
|
384
|
+
destinationSubproduct = _ref14.destinationSubproduct,
|
|
385
|
+
dwellTime = _ref14.dwellTime,
|
|
386
|
+
dwellPercentVisible = _ref14.dwellPercentVisible;
|
|
400
387
|
return {
|
|
401
388
|
action: 'dwelled',
|
|
402
389
|
actionSubject: 'smartLinkIframe',
|
|
@@ -416,15 +403,15 @@ var uiIframeDwelledEvent = function uiIframeDwelledEvent(_ref15) {
|
|
|
416
403
|
};
|
|
417
404
|
};
|
|
418
405
|
exports.uiIframeDwelledEvent = uiIframeDwelledEvent;
|
|
419
|
-
var uiIframeFocusedEvent = function uiIframeFocusedEvent(
|
|
420
|
-
var id =
|
|
421
|
-
display =
|
|
422
|
-
status =
|
|
423
|
-
definitionId =
|
|
424
|
-
extensionKey =
|
|
425
|
-
location =
|
|
426
|
-
destinationProduct =
|
|
427
|
-
destinationSubproduct =
|
|
406
|
+
var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref15) {
|
|
407
|
+
var id = _ref15.id,
|
|
408
|
+
display = _ref15.display,
|
|
409
|
+
status = _ref15.status,
|
|
410
|
+
definitionId = _ref15.definitionId,
|
|
411
|
+
extensionKey = _ref15.extensionKey,
|
|
412
|
+
location = _ref15.location,
|
|
413
|
+
destinationProduct = _ref15.destinationProduct,
|
|
414
|
+
destinationSubproduct = _ref15.destinationSubproduct;
|
|
428
415
|
return {
|
|
429
416
|
action: 'focused',
|
|
430
417
|
actionSubject: 'smartLinkIframe',
|
|
@@ -442,15 +429,15 @@ var uiIframeFocusedEvent = function uiIframeFocusedEvent(_ref16) {
|
|
|
442
429
|
};
|
|
443
430
|
};
|
|
444
431
|
exports.uiIframeFocusedEvent = uiIframeFocusedEvent;
|
|
445
|
-
var uiActionClickedEvent = function uiActionClickedEvent(
|
|
446
|
-
var id =
|
|
447
|
-
actionType =
|
|
448
|
-
extensionKey =
|
|
449
|
-
display =
|
|
450
|
-
definitionId =
|
|
451
|
-
destinationProduct =
|
|
452
|
-
destinationSubproduct =
|
|
453
|
-
location =
|
|
432
|
+
var uiActionClickedEvent = function uiActionClickedEvent(_ref16) {
|
|
433
|
+
var id = _ref16.id,
|
|
434
|
+
actionType = _ref16.actionType,
|
|
435
|
+
extensionKey = _ref16.extensionKey,
|
|
436
|
+
display = _ref16.display,
|
|
437
|
+
definitionId = _ref16.definitionId,
|
|
438
|
+
destinationProduct = _ref16.destinationProduct,
|
|
439
|
+
destinationSubproduct = _ref16.destinationSubproduct,
|
|
440
|
+
location = _ref16.location;
|
|
454
441
|
return {
|
|
455
442
|
action: 'clicked',
|
|
456
443
|
actionSubject: 'button',
|
|
@@ -469,13 +456,13 @@ var uiActionClickedEvent = function uiActionClickedEvent(_ref17) {
|
|
|
469
456
|
};
|
|
470
457
|
};
|
|
471
458
|
exports.uiActionClickedEvent = uiActionClickedEvent;
|
|
472
|
-
var uiClosedAuthEvent = function uiClosedAuthEvent(
|
|
473
|
-
var display =
|
|
474
|
-
extensionKey =
|
|
475
|
-
definitionId =
|
|
476
|
-
destinationProduct =
|
|
477
|
-
destinationSubproduct =
|
|
478
|
-
location =
|
|
459
|
+
var uiClosedAuthEvent = function uiClosedAuthEvent(_ref17) {
|
|
460
|
+
var display = _ref17.display,
|
|
461
|
+
extensionKey = _ref17.extensionKey,
|
|
462
|
+
definitionId = _ref17.definitionId,
|
|
463
|
+
destinationProduct = _ref17.destinationProduct,
|
|
464
|
+
destinationSubproduct = _ref17.destinationSubproduct,
|
|
465
|
+
location = _ref17.location;
|
|
479
466
|
return {
|
|
480
467
|
action: 'closed',
|
|
481
468
|
actionSubject: 'consentModal',
|
|
@@ -491,12 +478,12 @@ var uiClosedAuthEvent = function uiClosedAuthEvent(_ref18) {
|
|
|
491
478
|
};
|
|
492
479
|
};
|
|
493
480
|
exports.uiClosedAuthEvent = uiClosedAuthEvent;
|
|
494
|
-
var screenAuthPopupEvent = function screenAuthPopupEvent(
|
|
495
|
-
var extensionKey =
|
|
496
|
-
definitionId =
|
|
497
|
-
destinationProduct =
|
|
498
|
-
destinationSubproduct =
|
|
499
|
-
location =
|
|
481
|
+
var screenAuthPopupEvent = function screenAuthPopupEvent(_ref18) {
|
|
482
|
+
var extensionKey = _ref18.extensionKey,
|
|
483
|
+
definitionId = _ref18.definitionId,
|
|
484
|
+
destinationProduct = _ref18.destinationProduct,
|
|
485
|
+
destinationSubproduct = _ref18.destinationSubproduct,
|
|
486
|
+
location = _ref18.location;
|
|
500
487
|
return {
|
|
501
488
|
actionSubject: 'consentModal',
|
|
502
489
|
eventType: 'screen',
|
|
@@ -510,14 +497,14 @@ var screenAuthPopupEvent = function screenAuthPopupEvent(_ref19) {
|
|
|
510
497
|
};
|
|
511
498
|
};
|
|
512
499
|
exports.screenAuthPopupEvent = screenAuthPopupEvent;
|
|
513
|
-
var uiRenderSuccessEvent = function uiRenderSuccessEvent(
|
|
514
|
-
var display =
|
|
515
|
-
status =
|
|
516
|
-
extensionKey =
|
|
517
|
-
definitionId =
|
|
518
|
-
destinationProduct =
|
|
519
|
-
destinationSubproduct =
|
|
520
|
-
location =
|
|
500
|
+
var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref19) {
|
|
501
|
+
var display = _ref19.display,
|
|
502
|
+
status = _ref19.status,
|
|
503
|
+
extensionKey = _ref19.extensionKey,
|
|
504
|
+
definitionId = _ref19.definitionId,
|
|
505
|
+
destinationProduct = _ref19.destinationProduct,
|
|
506
|
+
destinationSubproduct = _ref19.destinationSubproduct,
|
|
507
|
+
location = _ref19.location;
|
|
521
508
|
return {
|
|
522
509
|
action: 'renderSuccess',
|
|
523
510
|
actionSubject: 'smartLink',
|
|
@@ -534,15 +521,15 @@ var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref20) {
|
|
|
534
521
|
};
|
|
535
522
|
};
|
|
536
523
|
exports.uiRenderSuccessEvent = uiRenderSuccessEvent;
|
|
537
|
-
var uiRenderFailedEvent = function uiRenderFailedEvent(
|
|
538
|
-
var display =
|
|
539
|
-
error =
|
|
540
|
-
errorInfo =
|
|
541
|
-
extensionKey =
|
|
542
|
-
definitionId =
|
|
543
|
-
destinationProduct =
|
|
544
|
-
destinationSubproduct =
|
|
545
|
-
location =
|
|
524
|
+
var uiRenderFailedEvent = function uiRenderFailedEvent(_ref20) {
|
|
525
|
+
var display = _ref20.display,
|
|
526
|
+
error = _ref20.error,
|
|
527
|
+
errorInfo = _ref20.errorInfo,
|
|
528
|
+
extensionKey = _ref20.extensionKey,
|
|
529
|
+
definitionId = _ref20.definitionId,
|
|
530
|
+
destinationProduct = _ref20.destinationProduct,
|
|
531
|
+
destinationSubproduct = _ref20.destinationSubproduct,
|
|
532
|
+
location = _ref20.location;
|
|
546
533
|
return {
|
|
547
534
|
actionSubject: 'smartLink',
|
|
548
535
|
action: 'renderFailed',
|
|
@@ -560,16 +547,16 @@ var uiRenderFailedEvent = function uiRenderFailedEvent(_ref21) {
|
|
|
560
547
|
};
|
|
561
548
|
};
|
|
562
549
|
exports.uiRenderFailedEvent = uiRenderFailedEvent;
|
|
563
|
-
var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(
|
|
564
|
-
var id =
|
|
565
|
-
previewDisplay =
|
|
566
|
-
extensionKey =
|
|
567
|
-
definitionId =
|
|
568
|
-
destinationProduct =
|
|
569
|
-
destinationSubproduct =
|
|
570
|
-
location =
|
|
571
|
-
previewInvokeMethod =
|
|
572
|
-
status =
|
|
550
|
+
var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref21) {
|
|
551
|
+
var id = _ref21.id,
|
|
552
|
+
previewDisplay = _ref21.previewDisplay,
|
|
553
|
+
extensionKey = _ref21.extensionKey,
|
|
554
|
+
definitionId = _ref21.definitionId,
|
|
555
|
+
destinationProduct = _ref21.destinationProduct,
|
|
556
|
+
destinationSubproduct = _ref21.destinationSubproduct,
|
|
557
|
+
location = _ref21.location,
|
|
558
|
+
previewInvokeMethod = _ref21.previewInvokeMethod,
|
|
559
|
+
status = _ref21.status;
|
|
573
560
|
return {
|
|
574
561
|
action: 'viewed',
|
|
575
562
|
actionSubject: 'hoverCard',
|
|
@@ -588,17 +575,17 @@ var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref22) {
|
|
|
588
575
|
};
|
|
589
576
|
};
|
|
590
577
|
exports.uiHoverCardViewedEvent = uiHoverCardViewedEvent;
|
|
591
|
-
var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(
|
|
592
|
-
var id =
|
|
593
|
-
previewDisplay =
|
|
594
|
-
hoverTime =
|
|
595
|
-
extensionKey =
|
|
596
|
-
definitionId =
|
|
597
|
-
destinationProduct =
|
|
598
|
-
destinationSubproduct =
|
|
599
|
-
location =
|
|
600
|
-
previewInvokeMethod =
|
|
601
|
-
status =
|
|
578
|
+
var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref22) {
|
|
579
|
+
var id = _ref22.id,
|
|
580
|
+
previewDisplay = _ref22.previewDisplay,
|
|
581
|
+
hoverTime = _ref22.hoverTime,
|
|
582
|
+
extensionKey = _ref22.extensionKey,
|
|
583
|
+
definitionId = _ref22.definitionId,
|
|
584
|
+
destinationProduct = _ref22.destinationProduct,
|
|
585
|
+
destinationSubproduct = _ref22.destinationSubproduct,
|
|
586
|
+
location = _ref22.location,
|
|
587
|
+
previewInvokeMethod = _ref22.previewInvokeMethod,
|
|
588
|
+
status = _ref22.status;
|
|
602
589
|
return {
|
|
603
590
|
action: 'dismissed',
|
|
604
591
|
actionSubject: 'hoverCard',
|
|
@@ -618,15 +605,15 @@ var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref23) {
|
|
|
618
605
|
};
|
|
619
606
|
};
|
|
620
607
|
exports.uiHoverCardDismissedEvent = uiHoverCardDismissedEvent;
|
|
621
|
-
var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(
|
|
622
|
-
var id =
|
|
623
|
-
previewDisplay =
|
|
624
|
-
extensionKey =
|
|
625
|
-
definitionId =
|
|
626
|
-
destinationProduct =
|
|
627
|
-
destinationSubproduct =
|
|
628
|
-
location =
|
|
629
|
-
previewInvokeMethod =
|
|
608
|
+
var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref23) {
|
|
609
|
+
var id = _ref23.id,
|
|
610
|
+
previewDisplay = _ref23.previewDisplay,
|
|
611
|
+
extensionKey = _ref23.extensionKey,
|
|
612
|
+
definitionId = _ref23.definitionId,
|
|
613
|
+
destinationProduct = _ref23.destinationProduct,
|
|
614
|
+
destinationSubproduct = _ref23.destinationSubproduct,
|
|
615
|
+
location = _ref23.location,
|
|
616
|
+
previewInvokeMethod = _ref23.previewInvokeMethod;
|
|
630
617
|
return {
|
|
631
618
|
action: 'clicked',
|
|
632
619
|
actionSubject: 'button',
|
|
@@ -655,15 +642,15 @@ var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent() {
|
|
|
655
642
|
};
|
|
656
643
|
};
|
|
657
644
|
exports.uiLearnMoreLinkClickedEvent = uiLearnMoreLinkClickedEvent;
|
|
658
|
-
var chunkloadFailedEvent = function chunkloadFailedEvent(
|
|
659
|
-
var display =
|
|
660
|
-
error =
|
|
661
|
-
errorInfo =
|
|
662
|
-
extensionKey =
|
|
663
|
-
definitionId =
|
|
664
|
-
destinationProduct =
|
|
665
|
-
destinationSubproduct =
|
|
666
|
-
location =
|
|
645
|
+
var chunkloadFailedEvent = function chunkloadFailedEvent(_ref24) {
|
|
646
|
+
var display = _ref24.display,
|
|
647
|
+
error = _ref24.error,
|
|
648
|
+
errorInfo = _ref24.errorInfo,
|
|
649
|
+
extensionKey = _ref24.extensionKey,
|
|
650
|
+
definitionId = _ref24.definitionId,
|
|
651
|
+
destinationProduct = _ref24.destinationProduct,
|
|
652
|
+
destinationSubproduct = _ref24.destinationSubproduct,
|
|
653
|
+
location = _ref24.location;
|
|
667
654
|
return {
|
|
668
655
|
action: 'chunkLoadFailed',
|
|
669
656
|
actionSubject: 'smartLink',
|
package/dist/cjs/version.json
CHANGED
|
@@ -88,14 +88,14 @@ var _default = function _default(_ref2) {
|
|
|
88
88
|
return {
|
|
89
89
|
id: 'preview-content',
|
|
90
90
|
text: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, previewText),
|
|
91
|
-
promise: function promise(
|
|
92
|
-
return previewFunction(_objectSpread(
|
|
91
|
+
promise: function promise() {
|
|
92
|
+
return previewFunction(_objectSpread({
|
|
93
93
|
popupMountPointId: 'twp-editor-preview-iframe',
|
|
94
94
|
providerName: 'Preview',
|
|
95
95
|
showModal: true,
|
|
96
96
|
iframeName: 'twp-editor-preview-iframe',
|
|
97
97
|
onClose: function onClose() {}
|
|
98
|
-
},
|
|
98
|
+
}, rest));
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
};
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
10
|
var _react2 = require("@emotion/react");
|
|
13
11
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
14
12
|
var _lozengeAction = _interopRequireDefault(require("../../common/lozenge-action"));
|
|
15
13
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
16
|
-
var _templateObject
|
|
14
|
+
var _templateObject;
|
|
17
15
|
/** @jsx jsx */
|
|
18
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
16
|
var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n line-height: inherit;\n"])));
|
|
21
|
-
var actionStyles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n overflow: visible;\n"])));
|
|
22
17
|
|
|
23
18
|
/**
|
|
24
19
|
* A base element that displays a Lozenge.
|
|
@@ -31,27 +26,11 @@ var Lozenge = function Lozenge(_ref) {
|
|
|
31
26
|
_ref$appearance = _ref.appearance,
|
|
32
27
|
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
33
28
|
name = _ref.name,
|
|
34
|
-
onClick = _ref.onClick,
|
|
35
29
|
overrideCss = _ref.overrideCss,
|
|
36
30
|
text = _ref.text,
|
|
37
31
|
_ref$testId = _ref.testId,
|
|
38
32
|
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId;
|
|
39
33
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
40
|
-
var _useState = (0, _react.useState)(false),
|
|
41
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
|
-
isBold = _useState2[0],
|
|
43
|
-
setIsBold = _useState2[1];
|
|
44
|
-
var onHover = (0, _react.useCallback)(function (isHover) {
|
|
45
|
-
if (onClick) {
|
|
46
|
-
setIsBold(isHover);
|
|
47
|
-
}
|
|
48
|
-
}, [onClick]);
|
|
49
|
-
var onMouseEnter = (0, _react.useCallback)(function () {
|
|
50
|
-
return onHover(true);
|
|
51
|
-
}, [onHover]);
|
|
52
|
-
var onMouseLeave = (0, _react.useCallback)(function () {
|
|
53
|
-
return onHover(false);
|
|
54
|
-
}, [onHover]);
|
|
55
34
|
if (!text) {
|
|
56
35
|
return null;
|
|
57
36
|
}
|
|
@@ -63,19 +42,14 @@ var Lozenge = function Lozenge(_ref) {
|
|
|
63
42
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex
|
|
64
43
|
}) : (0, _react2.jsx)(_lozenge.default, {
|
|
65
44
|
appearance: appearance,
|
|
66
|
-
isBold: isBold,
|
|
67
45
|
testId: "".concat(testId, "-lozenge")
|
|
68
46
|
}, text);
|
|
69
47
|
return (0, _react2.jsx)("span", {
|
|
70
|
-
css: [styles,
|
|
48
|
+
css: [styles, overrideCss],
|
|
71
49
|
"data-fit-to-content": true,
|
|
72
50
|
"data-smart-element": name,
|
|
73
51
|
"data-smart-element-lozenge": true,
|
|
74
|
-
"data-testid": testId
|
|
75
|
-
onClick: onClick,
|
|
76
|
-
onMouseEnter: onMouseEnter,
|
|
77
|
-
onMouseLeave: onMouseLeave,
|
|
78
|
-
tabIndex: onClick ? 0 : -1
|
|
52
|
+
"data-testid": testId
|
|
79
53
|
}, lozenge);
|
|
80
54
|
};
|
|
81
55
|
var _default = Lozenge;
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
13
|
-
var _extractors = require("@atlaskit/linking-common/extractors");
|
|
14
13
|
var _constants = require("../../../../../constants");
|
|
15
14
|
var _blocks = require("../../../../FlexibleCard/components/blocks");
|
|
16
15
|
var _styled = require("./styled");
|
|
@@ -70,7 +69,6 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
70
69
|
cardActions = _ref$cardActions === void 0 ? [] : _ref$cardActions,
|
|
71
70
|
onActionClick = _ref.onActionClick,
|
|
72
71
|
extensionKey = _ref.extensionKey;
|
|
73
|
-
var showActionableElement = (0, _linkProvider.useFeatureFlag)('enableActionableElement');
|
|
74
72
|
var enableImprovedPreviewAction = (0, _linkProvider.useFeatureFlag)('enableImprovedPreviewAction');
|
|
75
73
|
(0, _react.useEffect)(function () {
|
|
76
74
|
// Since this hover view is only rendered on resolved status,
|
|
@@ -85,16 +83,14 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
85
83
|
}, [cardActions, onActionClick, enableImprovedPreviewAction]);
|
|
86
84
|
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
87
85
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
88
|
-
var types = data ? (0, _extractors.extractType)(data) : undefined;
|
|
89
86
|
//TODO: EDM-3224 deleted simulated and use real JsonLd
|
|
90
87
|
var metadata = (0, _extractMetadata.extractMetadata)((0, _utils.getSimulatedMetadata)(extensionKey, data));
|
|
91
|
-
var primary = showActionableElement ? (0, _utils.toActionableMetadata)(onActionClick, extensionKey, types, cardActions, metadata.primary) : metadata.primary;
|
|
92
88
|
return {
|
|
93
|
-
primary: primary,
|
|
89
|
+
primary: metadata.primary,
|
|
94
90
|
secondary: metadata.secondary,
|
|
95
91
|
subtitle: metadata.subtitle
|
|
96
92
|
};
|
|
97
|
-
}, [
|
|
93
|
+
}, [data, extensionKey]),
|
|
98
94
|
primary = _useMemo.primary,
|
|
99
95
|
secondary = _useMemo.secondary;
|
|
100
96
|
var snippetHeight = _react.default.useRef(0);
|