@atlaskit/smart-card 33.2.0 → 33.3.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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/state/actions/index.js +2 -4
- package/dist/cjs/state/analytics/index.js +1 -8
- package/dist/cjs/state/flexible-ui-context/index.js +1 -10
- package/dist/cjs/state/hooks/useSmartLink.js +1 -4
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +1 -3
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/cjs/state/index.js +1 -8
- package/dist/cjs/utils/analytics/analytics.js +2 -144
- package/dist/cjs/utils/analytics/index.js +0 -30
- package/dist/cjs/utils/analytics/types.js +1 -5
- package/dist/cjs/utils/mocks.js +1 -23
- package/dist/cjs/view/BlockCard/index.js +1 -3
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +2 -4
- package/dist/cjs/view/CardWithUrl/component.js +1 -8
- package/dist/cjs/view/EmbedCard/index.js +0 -4
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +3 -5
- package/dist/cjs/view/EmbedModal/index.js +1 -3
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/index.js +3 -17
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -3
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +3 -5
- package/dist/cjs/view/InlineCard/index.js +1 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/actions/index.js +2 -4
- package/dist/es2019/state/analytics/index.js +1 -2
- package/dist/es2019/state/flexible-ui-context/index.js +0 -7
- package/dist/es2019/state/hooks/useSmartLink.js +1 -4
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +1 -3
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/es2019/state/index.js +1 -2
- package/dist/es2019/utils/analytics/analytics.js +2 -145
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/utils/analytics/types.js +0 -1
- package/dist/es2019/utils/mocks.js +1 -23
- package/dist/es2019/view/BlockCard/index.js +1 -3
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -3
- package/dist/es2019/view/CardWithUrl/component.js +1 -8
- package/dist/es2019/view/EmbedCard/index.js +0 -4
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -3
- package/dist/es2019/view/EmbedModal/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/index.js +3 -15
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -3
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -4
- package/dist/es2019/view/InlineCard/index.js +0 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/actions/index.js +2 -4
- package/dist/esm/state/analytics/index.js +1 -2
- package/dist/esm/state/flexible-ui-context/index.js +0 -9
- package/dist/esm/state/hooks/useSmartLink.js +1 -4
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +1 -3
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/esm/state/index.js +1 -2
- package/dist/esm/utils/analytics/analytics.js +1 -143
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/utils/analytics/types.js +0 -1
- package/dist/esm/utils/mocks.js +0 -22
- package/dist/esm/view/BlockCard/index.js +1 -3
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +2 -4
- package/dist/esm/view/CardWithUrl/component.js +1 -8
- package/dist/esm/view/EmbedCard/index.js +0 -4
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +3 -5
- package/dist/esm/view/EmbedModal/index.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +2 -5
- package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +2 -5
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -5
- package/dist/esm/view/FlexibleCard/index.js +4 -18
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -3
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -5
- package/dist/esm/view/InlineCard/index.js +1 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/actions/types.d.ts +0 -2
- package/dist/types/state/actions/index.d.ts +1 -2
- package/dist/types/state/analytics/index.d.ts +0 -2
- package/dist/types/state/flexible-ui-context/index.d.ts +1 -7
- package/dist/types/state/flexible-ui-context/types.d.ts +0 -6
- package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +0 -6
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -7
- package/dist/types/state/index.d.ts +0 -1
- package/dist/types/utils/analytics/analytics.d.ts +0 -6
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -42
- package/dist/types/utils/mocks.d.ts +0 -7
- package/dist/types/view/BlockCard/index.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +0 -2
- package/dist/types/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +0 -2
- package/dist/types/view/EmbedCard/types.d.ts +0 -2
- package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
- package/dist/types/view/EmbedModal/components/analytics/types.d.ts +0 -2
- package/dist/types/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
- package/dist/types/view/HoverCard/types.d.ts +0 -3
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
- package/dist/types/view/InlineCard/index.d.ts +1 -1
- package/dist/types/view/InlineCard/types.d.ts +0 -2
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +0 -6
- package/dist/types-ts4.5/extractors/common/actions/types.d.ts +0 -2
- package/dist/types-ts4.5/state/actions/index.d.ts +1 -2
- package/dist/types-ts4.5/state/analytics/index.d.ts +0 -2
- package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +1 -7
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -7
- package/dist/types-ts4.5/state/index.d.ts +0 -1
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -6
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -42
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -7
- package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedModal/components/analytics/types.d.ts +0 -2
- package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardContent.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +0 -3
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +0 -6
- package/package.json +1 -1
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +0 -139
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +0 -126
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +0 -132
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +0 -33
- package/dist/types/utils/analytics/__mocks__/analytics.d.ts +0 -2
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +0 -33
- package/dist/types-ts4.5/utils/analytics/__mocks__/analytics.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 33.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#99194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99194)
|
|
8
|
+
[`b41887bf73e9a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b41887bf73e9a) -
|
|
9
|
+
Remove unused analytics code
|
|
10
|
+
|
|
3
11
|
## 33.2.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -17,11 +17,9 @@ var _analytics = require("../analytics");
|
|
|
17
17
|
var _helpers = require("../helpers");
|
|
18
18
|
var _useInvokeClientAction = _interopRequireDefault(require("../hooks/use-invoke-client-action"));
|
|
19
19
|
var _useResolve = _interopRequireDefault(require("../hooks/use-resolve"));
|
|
20
|
-
var useSmartCardActions = exports.useSmartCardActions = function useSmartCardActions(id, url
|
|
20
|
+
var useSmartCardActions = exports.useSmartCardActions = function useSmartCardActions(id, url) {
|
|
21
21
|
var resolveUrl = (0, _useResolve.default)();
|
|
22
|
-
var invokeClientAction = (0, _useInvokeClientAction.default)({
|
|
23
|
-
analytics: analytics
|
|
24
|
-
});
|
|
22
|
+
var invokeClientAction = (0, _useInvokeClientAction.default)({});
|
|
25
23
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
26
24
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
27
25
|
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
@@ -27,11 +27,4 @@ Object.defineProperty(exports, "succeedUfoExperience", {
|
|
|
27
27
|
return _ufoExperiences.succeedUfoExperience;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _useSmartLinkAnalytics.useSmartLinkAnalytics;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var _ufoExperiences = require("./ufoExperiences");
|
|
37
|
-
var _useSmartLinkAnalytics = require("./useSmartLinkAnalytics");
|
|
30
|
+
var _ufoExperiences = require("./ufoExperiences");
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useFlexibleUiOptionContext = exports.useFlexibleUiContext = exports.
|
|
6
|
+
exports.useFlexibleUiOptionContext = exports.useFlexibleUiContext = exports.FlexibleUiOptionContext = exports.FlexibleUiContext = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
/**
|
|
9
9
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
@@ -14,15 +14,6 @@ var useFlexibleUiContext = exports.useFlexibleUiContext = function useFlexibleUi
|
|
|
14
14
|
return (0, _react.useContext)(FlexibleUiContext);
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
19
|
-
* underlying elements.
|
|
20
|
-
*/
|
|
21
|
-
var FlexibleUiAnalyticsContext = exports.FlexibleUiAnalyticsContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
22
|
-
var useFlexibleUiAnalyticsContext = exports.useFlexibleUiAnalyticsContext = function useFlexibleUiAnalyticsContext() {
|
|
23
|
-
return (0, _react.useContext)(FlexibleUiAnalyticsContext);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
17
|
/**
|
|
27
18
|
* This provides the ui options that will be used by Smart Links Flexible UI
|
|
28
19
|
* to render its underlying elements.
|
|
@@ -9,7 +9,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
11
11
|
var _actions = require("../actions");
|
|
12
|
-
var _analytics = require("../analytics");
|
|
13
12
|
var _config = require("../config");
|
|
14
13
|
var _renderers = require("../renderers");
|
|
15
14
|
var _store = require("../store");
|
|
@@ -17,8 +16,7 @@ function useSmartLink(id, url) {
|
|
|
17
16
|
var state = (0, _store.useSmartCardState)(url);
|
|
18
17
|
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
19
18
|
store = _useSmartLinkContext.store;
|
|
20
|
-
var
|
|
21
|
-
var actions = (0, _actions.useSmartCardActions)(id, url, analytics);
|
|
19
|
+
var actions = (0, _actions.useSmartCardActions)(id, url);
|
|
22
20
|
var config = (0, _config.useSmartLinkConfig)();
|
|
23
21
|
var renderers = (0, _renderers.useSmartLinkRenderers)();
|
|
24
22
|
|
|
@@ -42,7 +40,6 @@ function useSmartLink(id, url) {
|
|
|
42
40
|
state: state,
|
|
43
41
|
actions: actions,
|
|
44
42
|
config: config,
|
|
45
|
-
analytics: analytics,
|
|
46
43
|
renderers: renderers,
|
|
47
44
|
error: error
|
|
48
45
|
};
|
|
@@ -14,7 +14,6 @@ var _extractInvokePreviewAction = require("../../extractors/action/extract-invok
|
|
|
14
14
|
var _extractInvokeViewAction = require("../../extractors/action/extract-invoke-view-action");
|
|
15
15
|
var _messages = require("../../messages");
|
|
16
16
|
var _toAction = require("../../utils/actions/to-action");
|
|
17
|
-
var _analytics = require("../analytics");
|
|
18
17
|
var _useInvokeClientAction = _interopRequireDefault(require("../hooks/use-invoke-client-action"));
|
|
19
18
|
var _store = require("../store");
|
|
20
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -28,11 +27,10 @@ function useSmartLinkActions(_ref) {
|
|
|
28
27
|
return (0, _uuid.default)();
|
|
29
28
|
}, []);
|
|
30
29
|
var linkState = (0, _store.useSmartCardState)(url);
|
|
31
|
-
var linkAnalytics = (0, _analytics.useSmartLinkAnalytics)(url, id);
|
|
32
30
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
33
31
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
34
32
|
var invokeClientAction = (0, _useInvokeClientAction.default)({
|
|
35
|
-
|
|
33
|
+
fireEvent: fireEvent
|
|
36
34
|
});
|
|
37
35
|
if (linkState.details && !(actionOptions !== null && actionOptions !== void 0 && actionOptions.hide)) {
|
|
38
36
|
var actions = [];
|
|
@@ -8,7 +8,6 @@ exports.useSmartLinkReload = useSmartLinkReload;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
10
10
|
var _actions = require("../actions");
|
|
11
|
-
var _analytics = require("../analytics");
|
|
12
11
|
/**
|
|
13
12
|
* Exposes a programmatic way to reload the data being used to render a Smart Link.
|
|
14
13
|
* @param
|
|
@@ -19,7 +18,6 @@ function useSmartLinkReload(_ref) {
|
|
|
19
18
|
var id = (0, _react.useMemo)(function () {
|
|
20
19
|
return (0, _uuid.default)();
|
|
21
20
|
}, []);
|
|
22
|
-
var
|
|
23
|
-
var linkActions = (0, _actions.useSmartCardActions)(id, url, linkAnalytics);
|
|
21
|
+
var linkActions = (0, _actions.useSmartCardActions)(id, url);
|
|
24
22
|
return linkActions.reload;
|
|
25
23
|
}
|
package/dist/cjs/state/index.js
CHANGED
|
@@ -27,12 +27,6 @@ Object.defineProperty(exports, "useSmartLink", {
|
|
|
27
27
|
return _hooks.useSmartLink;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "useSmartLinkAnalytics", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _analytics.useSmartLinkAnalytics;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
30
|
Object.defineProperty(exports, "useSmartLinkContext", {
|
|
37
31
|
enumerable: true,
|
|
38
32
|
get: function get() {
|
|
@@ -40,5 +34,4 @@ Object.defineProperty(exports, "useSmartLinkContext", {
|
|
|
40
34
|
}
|
|
41
35
|
});
|
|
42
36
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
43
|
-
var _hooks = require("./hooks");
|
|
44
|
-
var _analytics = require("./analytics");
|
|
37
|
+
var _hooks = require("./hooks");
|
|
@@ -4,18 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
exports.fireSmartLinkEvent = exports.context = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
9
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _performance = require("../performance");
|
|
12
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
10
|
var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
15
11
|
var context = exports.context = {
|
|
16
12
|
componentName: 'smart-cards',
|
|
17
13
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "33.
|
|
14
|
+
packageVersion: "33.3.0"
|
|
19
15
|
};
|
|
20
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -27,12 +23,6 @@ var TrackQuickActionFailureReason = exports.TrackQuickActionFailureReason = /*#_
|
|
|
27
23
|
TrackQuickActionFailureReason["UnknownError"] = "UnknownError";
|
|
28
24
|
return TrackQuickActionFailureReason;
|
|
29
25
|
}({});
|
|
30
|
-
var uiActionSubjectIds = {
|
|
31
|
-
DownloadAction: 'downloadDocument',
|
|
32
|
-
PreviewAction: 'invokePreviewScreen',
|
|
33
|
-
ViewAction: 'shortcutGoToLink',
|
|
34
|
-
StatusAction: 'issueStatusUpdate'
|
|
35
|
-
};
|
|
36
26
|
var SmartLinkEvents = exports.SmartLinkEvents = /*#__PURE__*/function () {
|
|
37
27
|
function SmartLinkEvents() {
|
|
38
28
|
(0, _classCallCheck2.default)(this, SmartLinkEvents);
|
|
@@ -58,136 +48,4 @@ var fireSmartLinkEvent = exports.fireSmartLinkEvent = function fireSmartLinkEven
|
|
|
58
48
|
if (createAnalyticsEvent) {
|
|
59
49
|
createAnalyticsEvent(payload).fire(ANALYTICS_CHANNEL);
|
|
60
50
|
}
|
|
61
|
-
};
|
|
62
|
-
var invokeSucceededEvent = exports.invokeSucceededEvent = function invokeSucceededEvent(_ref) {
|
|
63
|
-
var id = _ref.id,
|
|
64
|
-
actionType = _ref.actionType,
|
|
65
|
-
display = _ref.display,
|
|
66
|
-
extensionKey = _ref.extensionKey,
|
|
67
|
-
definitionId = _ref.definitionId,
|
|
68
|
-
destinationProduct = _ref.destinationProduct,
|
|
69
|
-
destinationSubproduct = _ref.destinationSubproduct,
|
|
70
|
-
location = _ref.location;
|
|
71
|
-
var measure = id ? (0, _performance.getMeasure)(id, 'resolved') : undefined;
|
|
72
|
-
return {
|
|
73
|
-
action: 'resolved',
|
|
74
|
-
actionSubject: 'smartLinkAction',
|
|
75
|
-
eventType: 'operational',
|
|
76
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
77
|
-
id: id,
|
|
78
|
-
actionType: actionType,
|
|
79
|
-
display: display,
|
|
80
|
-
definitionId: definitionId,
|
|
81
|
-
destinationProduct: destinationProduct,
|
|
82
|
-
destinationSubproduct: destinationSubproduct,
|
|
83
|
-
location: location,
|
|
84
|
-
extensionKey: extensionKey,
|
|
85
|
-
duration: measure === null || measure === void 0 ? void 0 : measure.duration
|
|
86
|
-
})
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
var invokeFailedEvent = exports.invokeFailedEvent = function invokeFailedEvent(_ref2) {
|
|
90
|
-
var id = _ref2.id,
|
|
91
|
-
actionType = _ref2.actionType,
|
|
92
|
-
display = _ref2.display,
|
|
93
|
-
reason = _ref2.reason,
|
|
94
|
-
extensionKey = _ref2.extensionKey,
|
|
95
|
-
definitionId = _ref2.definitionId,
|
|
96
|
-
destinationProduct = _ref2.destinationProduct,
|
|
97
|
-
destinationSubproduct = _ref2.destinationSubproduct,
|
|
98
|
-
location = _ref2.location;
|
|
99
|
-
var measure = id ? (0, _performance.getMeasure)(id, 'errored') : undefined;
|
|
100
|
-
return {
|
|
101
|
-
action: 'unresolved',
|
|
102
|
-
actionSubject: 'smartLinkAction',
|
|
103
|
-
eventType: 'operational',
|
|
104
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
105
|
-
id: id,
|
|
106
|
-
actionType: actionType,
|
|
107
|
-
display: display,
|
|
108
|
-
extensionKey: extensionKey,
|
|
109
|
-
definitionId: definitionId,
|
|
110
|
-
destinationProduct: destinationProduct,
|
|
111
|
-
destinationSubproduct: destinationSubproduct,
|
|
112
|
-
location: location,
|
|
113
|
-
duration: measure === null || measure === void 0 ? void 0 : measure.duration,
|
|
114
|
-
reason: reason
|
|
115
|
-
})
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref3) {
|
|
119
|
-
var id = _ref3.id,
|
|
120
|
-
actionType = _ref3.actionType,
|
|
121
|
-
extensionKey = _ref3.extensionKey,
|
|
122
|
-
display = _ref3.display,
|
|
123
|
-
definitionId = _ref3.definitionId,
|
|
124
|
-
destinationProduct = _ref3.destinationProduct,
|
|
125
|
-
destinationSubproduct = _ref3.destinationSubproduct,
|
|
126
|
-
location = _ref3.location;
|
|
127
|
-
return {
|
|
128
|
-
action: 'clicked',
|
|
129
|
-
actionSubject: 'button',
|
|
130
|
-
actionSubjectId: uiActionSubjectIds[actionType],
|
|
131
|
-
eventType: 'ui',
|
|
132
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
133
|
-
id: id,
|
|
134
|
-
display: display,
|
|
135
|
-
actionType: actionType,
|
|
136
|
-
extensionKey: extensionKey,
|
|
137
|
-
definitionId: definitionId,
|
|
138
|
-
destinationProduct: destinationProduct,
|
|
139
|
-
destinationSubproduct: destinationSubproduct,
|
|
140
|
-
location: location
|
|
141
|
-
})
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref4) {
|
|
145
|
-
var display = _ref4.display,
|
|
146
|
-
status = _ref4.status,
|
|
147
|
-
extensionKey = _ref4.extensionKey,
|
|
148
|
-
definitionId = _ref4.definitionId,
|
|
149
|
-
destinationProduct = _ref4.destinationProduct,
|
|
150
|
-
destinationSubproduct = _ref4.destinationSubproduct,
|
|
151
|
-
location = _ref4.location,
|
|
152
|
-
canBeDatasource = _ref4.canBeDatasource;
|
|
153
|
-
return {
|
|
154
|
-
action: 'renderSuccess',
|
|
155
|
-
actionSubject: 'smartLink',
|
|
156
|
-
eventType: 'ui',
|
|
157
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
158
|
-
status: status,
|
|
159
|
-
extensionKey: extensionKey,
|
|
160
|
-
definitionId: definitionId,
|
|
161
|
-
destinationProduct: destinationProduct,
|
|
162
|
-
destinationSubproduct: destinationSubproduct,
|
|
163
|
-
location: location,
|
|
164
|
-
display: display,
|
|
165
|
-
canBeDatasource: canBeDatasource
|
|
166
|
-
})
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref5) {
|
|
170
|
-
var display = _ref5.display,
|
|
171
|
-
error = _ref5.error,
|
|
172
|
-
errorInfo = _ref5.errorInfo,
|
|
173
|
-
extensionKey = _ref5.extensionKey,
|
|
174
|
-
definitionId = _ref5.definitionId,
|
|
175
|
-
destinationProduct = _ref5.destinationProduct,
|
|
176
|
-
destinationSubproduct = _ref5.destinationSubproduct,
|
|
177
|
-
location = _ref5.location;
|
|
178
|
-
return {
|
|
179
|
-
actionSubject: 'smartLink',
|
|
180
|
-
action: 'renderFailed',
|
|
181
|
-
eventType: 'ui',
|
|
182
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
183
|
-
error: error,
|
|
184
|
-
errorInfo: errorInfo,
|
|
185
|
-
display: display,
|
|
186
|
-
extensionKey: extensionKey,
|
|
187
|
-
definitionId: definitionId,
|
|
188
|
-
destinationProduct: destinationProduct,
|
|
189
|
-
destinationSubproduct: destinationSubproduct,
|
|
190
|
-
location: location
|
|
191
|
-
})
|
|
192
|
-
};
|
|
193
51
|
};
|
|
@@ -21,34 +21,4 @@ Object.defineProperty(exports, "fireSmartLinkEvent", {
|
|
|
21
21
|
return _analytics.fireSmartLinkEvent;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "invokeFailedEvent", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _analytics.invokeFailedEvent;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "invokeSucceededEvent", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _analytics.invokeSucceededEvent;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "uiActionClickedEvent", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _analytics.uiActionClickedEvent;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "uiRenderFailedEvent", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _analytics.uiRenderFailedEvent;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "uiRenderSuccessEvent", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _analytics.uiRenderSuccessEvent;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
24
|
var _analytics = require("./analytics");
|
package/dist/cjs/utils/mocks.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.waitFor = exports.mocks = exports.mockGenerator = exports.mockContext = exports.mockByUrl = exports.
|
|
7
|
+
exports.waitFor = exports.mocks = exports.mockGenerator = exports.mockContext = exports.mockByUrl = exports.fakeResponse = exports.fakeFactory = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -310,26 +310,4 @@ var waitFor = exports.waitFor = function waitFor() {
|
|
|
310
310
|
return new Promise(function (res) {
|
|
311
311
|
return setTimeout(res, time);
|
|
312
312
|
});
|
|
313
|
-
};
|
|
314
|
-
var mockAnalytics = exports.mockAnalytics = {
|
|
315
|
-
ui: {
|
|
316
|
-
actionClickedEvent: function actionClickedEvent() {},
|
|
317
|
-
buttonClickedEvent: function buttonClickedEvent() {},
|
|
318
|
-
modalClosedEvent: function modalClosedEvent() {},
|
|
319
|
-
renderSuccessEvent: function renderSuccessEvent() {},
|
|
320
|
-
renderFailedEvent: function renderFailedEvent() {},
|
|
321
|
-
smartLinkServerActionClickedEvent: function smartLinkServerActionClickedEvent() {}
|
|
322
|
-
},
|
|
323
|
-
operational: {
|
|
324
|
-
invokeSucceededEvent: function invokeSucceededEvent() {},
|
|
325
|
-
invokeFailedEvent: function invokeFailedEvent() {}
|
|
326
|
-
},
|
|
327
|
-
track: {
|
|
328
|
-
smartLinkQuickActionFailed: function smartLinkQuickActionFailed() {},
|
|
329
|
-
smartLinkQuickActionStarted: function smartLinkQuickActionStarted() {},
|
|
330
|
-
smartLinkQuickActionSuccess: function smartLinkQuickActionSuccess() {}
|
|
331
|
-
},
|
|
332
|
-
screen: {
|
|
333
|
-
modalViewedEvent: function modalViewedEvent() {}
|
|
334
|
-
}
|
|
335
313
|
};
|
|
@@ -26,7 +26,6 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
|
|
|
26
26
|
onResolve = _ref.onResolve,
|
|
27
27
|
onError = _ref.onError,
|
|
28
28
|
testId = _ref.testId,
|
|
29
|
-
analytics = _ref.analytics,
|
|
30
29
|
actionOptions = _ref.actionOptions;
|
|
31
30
|
var status = cardState.status;
|
|
32
31
|
var blockCardProps = {
|
|
@@ -40,8 +39,7 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
|
|
|
40
39
|
onError: onError,
|
|
41
40
|
onResolve: onResolve,
|
|
42
41
|
renderers: renderers,
|
|
43
|
-
actionOptions: actionOptions
|
|
44
|
-
analytics: analytics
|
|
42
|
+
actionOptions: actionOptions
|
|
45
43
|
};
|
|
46
44
|
switch (status) {
|
|
47
45
|
case 'pending':
|
|
@@ -30,8 +30,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
30
30
|
actionOptions = _ref.actionOptions,
|
|
31
31
|
_ref$testId = _ref.testId,
|
|
32
32
|
testId = _ref$testId === void 0 ? 'smart-block-resolved-view' : _ref$testId,
|
|
33
|
-
url = _ref.url
|
|
34
|
-
analytics = _ref.analytics;
|
|
33
|
+
url = _ref.url;
|
|
35
34
|
var _useState = (0, _react.useState)(false),
|
|
36
35
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
37
36
|
isPreviewBlockErrored = _useState2[0],
|
|
@@ -56,7 +55,6 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
56
55
|
}];
|
|
57
56
|
}, []);
|
|
58
57
|
return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, {
|
|
59
|
-
analytics: analytics,
|
|
60
58
|
appearance: "block",
|
|
61
59
|
cardState: cardState,
|
|
62
60
|
onClick: onClick,
|
|
@@ -42,8 +42,7 @@ var UnauthorisedView = function UnauthorisedView(_ref) {
|
|
|
42
42
|
var _ref$testId = _ref.testId,
|
|
43
43
|
testId = _ref$testId === void 0 ? 'smart-block-unauthorized-view' : _ref$testId,
|
|
44
44
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
45
|
-
var
|
|
46
|
-
cardState = props.cardState,
|
|
45
|
+
var cardState = props.cardState,
|
|
47
46
|
onAuthorize = props.onAuthorize;
|
|
48
47
|
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
49
48
|
var providerName = (_extractProvider = (0, _linkExtractors.extractProvider)(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
|
|
@@ -60,14 +59,13 @@ var UnauthorisedView = function UnauthorisedView(_ref) {
|
|
|
60
59
|
return onAuthorize ? (0, _react2.jsx)(_UnauthorisedViewContent.default, {
|
|
61
60
|
providerName: providerName,
|
|
62
61
|
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
63
|
-
analytics: analytics,
|
|
64
62
|
testId: testId
|
|
65
63
|
}) : (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[providerName ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider'], {
|
|
66
64
|
values: {
|
|
67
65
|
context: providerName
|
|
68
66
|
}
|
|
69
67
|
}));
|
|
70
|
-
}, [
|
|
68
|
+
}, [isProductIntegrationSupported, onAuthorize, providerName, testId]);
|
|
71
69
|
var actions = (0, _react.useMemo)(function () {
|
|
72
70
|
return onAuthorize ? [(0, _AuthorizeAction.AuthorizeAction)(handleAuthorize, providerName)] : [];
|
|
73
71
|
}, [handleAuthorize, onAuthorize, providerName]);
|
|
@@ -47,7 +47,6 @@ function Component(_ref) {
|
|
|
47
47
|
children = _ref.children,
|
|
48
48
|
showHoverPreview = _ref.showHoverPreview,
|
|
49
49
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
50
|
-
analyticsEvents = _ref.analyticsEvents,
|
|
51
50
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
52
51
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
53
52
|
truncateInline = _ref.truncateInline;
|
|
@@ -60,11 +59,9 @@ function Component(_ref) {
|
|
|
60
59
|
var _useSmartLink = (0, _state.useSmartLink)(id, url),
|
|
61
60
|
state = _useSmartLink.state,
|
|
62
61
|
actions = _useSmartLink.actions,
|
|
63
|
-
defaultAnalytics = _useSmartLink.analytics,
|
|
64
62
|
config = _useSmartLink.config,
|
|
65
63
|
renderers = _useSmartLink.renderers,
|
|
66
64
|
error = _useSmartLink.error;
|
|
67
|
-
var analytics = analyticsEvents || defaultAnalytics;
|
|
68
65
|
var definitionId = (0, _helpers.getDefinitionId)(state.details);
|
|
69
66
|
var extensionKey = (0, _helpers.getExtensionKey)(state.details);
|
|
70
67
|
var resourceType = (0, _helpers.getResourceType)(state.details);
|
|
@@ -204,8 +201,7 @@ function Component(_ref) {
|
|
|
204
201
|
url: url,
|
|
205
202
|
testId: testId,
|
|
206
203
|
onResolve: onResolve,
|
|
207
|
-
onError: onError
|
|
208
|
-
analytics: analytics
|
|
204
|
+
onError: onError
|
|
209
205
|
}, children);
|
|
210
206
|
}
|
|
211
207
|
|
|
@@ -216,7 +212,6 @@ function Component(_ref) {
|
|
|
216
212
|
switch (appearance) {
|
|
217
213
|
case 'inline':
|
|
218
214
|
return /*#__PURE__*/_react.default.createElement(_InlineCard.InlineCard, {
|
|
219
|
-
analytics: analytics,
|
|
220
215
|
id: id,
|
|
221
216
|
url: url,
|
|
222
217
|
renderers: renderers,
|
|
@@ -245,7 +240,6 @@ function Component(_ref) {
|
|
|
245
240
|
cardState: state,
|
|
246
241
|
handleAuthorize: services.length && handleAuthorize || undefined,
|
|
247
242
|
handleFrameClick: handleClickWrapper,
|
|
248
|
-
analytics: analytics,
|
|
249
243
|
isSelected: isSelected,
|
|
250
244
|
onResolve: onResolve,
|
|
251
245
|
onError: onError,
|
|
@@ -263,7 +257,6 @@ function Component(_ref) {
|
|
|
263
257
|
handleErrorRetry: handleRetry,
|
|
264
258
|
handleFrameClick: handleClickWrapper,
|
|
265
259
|
handleInvoke: handleInvoke,
|
|
266
|
-
analytics: analytics,
|
|
267
260
|
isSelected: isSelected,
|
|
268
261
|
frameStyle: frameStyle,
|
|
269
262
|
platform: platform,
|
|
@@ -27,7 +27,6 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
27
27
|
handleAuthorize = _ref.handleAuthorize,
|
|
28
28
|
handleErrorRetry = _ref.handleErrorRetry,
|
|
29
29
|
handleFrameClick = _ref.handleFrameClick,
|
|
30
|
-
analytics = _ref.analytics,
|
|
31
30
|
isSelected = _ref.isSelected,
|
|
32
31
|
frameStyle = _ref.frameStyle,
|
|
33
32
|
platform = _ref.platform,
|
|
@@ -59,7 +58,6 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
59
58
|
onResolve: onResolve,
|
|
60
59
|
renderers: renderers,
|
|
61
60
|
actionOptions: actionOptions,
|
|
62
|
-
analytics: analytics,
|
|
63
61
|
testId: testId ? "".concat(testId, "-resolving-view") : 'embed-card-resolving-view'
|
|
64
62
|
});
|
|
65
63
|
case 'resolved':
|
|
@@ -100,7 +98,6 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
100
98
|
onResolve: onResolve,
|
|
101
99
|
renderers: renderers,
|
|
102
100
|
actionOptions: actionOptions,
|
|
103
|
-
analytics: analytics,
|
|
104
101
|
testId: testId
|
|
105
102
|
});
|
|
106
103
|
}
|
|
@@ -113,7 +110,6 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
113
110
|
}
|
|
114
111
|
var unauthorisedViewProps = (0, _embed.extractEmbedProps)(data, meta, platform);
|
|
115
112
|
return /*#__PURE__*/_react.default.createElement(_unauthorizedView.default, {
|
|
116
|
-
analytics: analytics,
|
|
117
113
|
context: unauthorisedViewProps.context,
|
|
118
114
|
extensionKey: extensionKey,
|
|
119
115
|
frameStyle: frameStyle,
|
|
@@ -16,13 +16,12 @@ var _messages = require("../../../../messages");
|
|
|
16
16
|
var _UnauthorisedViewContent = _interopRequireDefault(require("../../../common/UnauthorisedViewContent"));
|
|
17
17
|
var _unresolvedView = _interopRequireDefault(require("../unresolved-view"));
|
|
18
18
|
var _unauthorizedSvg = require("./unauthorized-svg");
|
|
19
|
-
var _excluded = ["
|
|
19
|
+
var _excluded = ["context", "extensionKey", "isProductIntegrationSupported", "onAuthorize", "testId"];
|
|
20
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
22
|
var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
23
23
|
var _context$image;
|
|
24
|
-
var
|
|
25
|
-
context = _ref.context,
|
|
24
|
+
var context = _ref.context,
|
|
26
25
|
extensionKey = _ref.extensionKey,
|
|
27
26
|
isProductIntegrationSupported = _ref.isProductIntegrationSupported,
|
|
28
27
|
onAuthorize = _ref.onAuthorize,
|
|
@@ -54,7 +53,6 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
54
53
|
values: _values
|
|
55
54
|
})),
|
|
56
55
|
description: /*#__PURE__*/_react.default.createElement(_UnauthorisedViewContent.default, {
|
|
57
|
-
analytics: analytics,
|
|
58
56
|
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
59
57
|
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
60
58
|
testId: testId
|
|
@@ -91,7 +89,7 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
91
89
|
title: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.unauthorised_account_name_no_provider),
|
|
92
90
|
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.unauthorised_account_description_no_provider)
|
|
93
91
|
};
|
|
94
|
-
}, [
|
|
92
|
+
}, [context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorize, testId]);
|
|
95
93
|
return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, unresolvedViewProps, content, {
|
|
96
94
|
icon: context === null || context === void 0 ? void 0 : context.icon,
|
|
97
95
|
image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : /*#__PURE__*/_react.default.createElement(_unauthorizedSvg.UnauthorizedSVG, null),
|
|
@@ -30,8 +30,7 @@ var toWidth = function toWidth(size) {
|
|
|
30
30
|
return size === _types.EmbedModalSize.Large ? _constants2.MAX_MODAL_SIZE : _constants2.MIN_MODAL_SIZE;
|
|
31
31
|
};
|
|
32
32
|
var EmbedModal = function EmbedModal(_ref) {
|
|
33
|
-
var
|
|
34
|
-
invokeDownloadAction = _ref.invokeDownloadAction,
|
|
33
|
+
var invokeDownloadAction = _ref.invokeDownloadAction,
|
|
35
34
|
fireEvent = _ref.fireEvent,
|
|
36
35
|
iframeName = _ref.iframeName,
|
|
37
36
|
isSupportTheming = _ref.isSupportTheming,
|
|
@@ -61,7 +60,6 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
61
60
|
setWidth = _useState4[1];
|
|
62
61
|
var openAt = (0, _react.useRef)();
|
|
63
62
|
var invoke = (0, _useInvokeClientAction.default)({
|
|
64
|
-
analytics: analytics,
|
|
65
63
|
fireEvent: fireEvent
|
|
66
64
|
});
|
|
67
65
|
var handleOnOpenComplete = (0, _react.useCallback)(function () {
|
|
@@ -30,10 +30,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
30
30
|
var onClickCallback = _ref.onClick,
|
|
31
31
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
32
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
33
|
-
var
|
|
34
|
-
var invoke = (0, _useInvokeClientAction.default)({
|
|
35
|
-
analytics: analytics
|
|
36
|
-
});
|
|
33
|
+
var invoke = (0, _useInvokeClientAction.default)({});
|
|
37
34
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.CopyLinkAction];
|
|
38
35
|
var _useState = (0, _react.useState)(_messages.messages.copy_url_to_clipboard),
|
|
39
36
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -24,10 +24,7 @@ var DownloadAction = function DownloadAction(_ref) {
|
|
|
24
24
|
var onClickCallback = _ref.onClick,
|
|
25
25
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
26
26
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
27
|
-
var
|
|
28
|
-
var invoke = (0, _useInvokeClientAction.default)({
|
|
29
|
-
analytics: analytics
|
|
30
|
-
});
|
|
27
|
+
var invoke = (0, _useInvokeClientAction.default)({});
|
|
31
28
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.DownloadAction];
|
|
32
29
|
var onClick = (0, _react.useCallback)(function () {
|
|
33
30
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
@@ -24,10 +24,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
24
24
|
var onClickCallback = _ref.onClick,
|
|
25
25
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
26
26
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
27
|
-
var
|
|
28
|
-
var invoke = (0, _useInvokeClientAction.default)({
|
|
29
|
-
analytics: analytics
|
|
30
|
-
});
|
|
27
|
+
var invoke = (0, _useInvokeClientAction.default)({});
|
|
31
28
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.PreviewAction];
|
|
32
29
|
var onClick = (0, _react.useCallback)(function () {
|
|
33
30
|
if (data !== null && data !== void 0 && data.invokeAction) {
|