@player-ui/external-state-plugin 1.0.1 → 1.1.0--canary.866.38489
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.
|
@@ -7840,8 +7840,8 @@ var ExternalStatePlugin = function() {
|
|
|
7840
7840
|
ref: Symbol("not-started"),
|
|
7841
7841
|
status: "not-started"
|
|
7842
7842
|
};
|
|
7843
|
-
var PLAYER_VERSION = true ? "1.0.
|
|
7844
|
-
var COMMIT = true ? "
|
|
7843
|
+
var PLAYER_VERSION = true ? "1.1.0--canary.866.38489" : "unknown";
|
|
7844
|
+
var COMMIT = true ? "3da792fb855f66e3747d2b873d0292ae811523a1" : "unknown";
|
|
7845
7845
|
var _Player = /*#__PURE__*/ function() {
|
|
7846
7846
|
function _Player2(config) {
|
|
7847
7847
|
var _this = this;
|
|
@@ -7863,7 +7863,8 @@ var ExternalStatePlugin = function() {
|
|
|
7863
7863
|
state: new SyncHook(),
|
|
7864
7864
|
onStart: new SyncHook(),
|
|
7865
7865
|
onEnd: new SyncHook(),
|
|
7866
|
-
resolveFlowContent: new SyncWaterfallHook()
|
|
7866
|
+
resolveFlowContent: new SyncWaterfallHook(),
|
|
7867
|
+
transformContent: new SyncWaterfallHook()
|
|
7867
7868
|
};
|
|
7868
7869
|
if (config === null || config === void 0 ? void 0 : config.logger) {
|
|
7869
7870
|
this.logger.addHandler(config.logger);
|
|
@@ -8183,14 +8184,19 @@ var ExternalStatePlugin = function() {
|
|
|
8183
8184
|
},
|
|
8184
8185
|
{
|
|
8185
8186
|
key: "start",
|
|
8186
|
-
value: function start(payload) {
|
|
8187
|
+
value: function start(payload, options) {
|
|
8187
8188
|
return _async_to_generator(function() {
|
|
8188
|
-
var _this,
|
|
8189
|
+
var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
8189
8190
|
return _ts_generator(this, function(_state) {
|
|
8190
8191
|
switch(_state.label){
|
|
8191
8192
|
case 0:
|
|
8192
8193
|
_this = this;
|
|
8193
|
-
|
|
8194
|
+
meta = {
|
|
8195
|
+
format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
|
|
8196
|
+
version: options === null || options === void 0 ? void 0 : options.version
|
|
8197
|
+
};
|
|
8198
|
+
flow = this.hooks.transformContent.call(payload, meta);
|
|
8199
|
+
ref = Symbol((_flow_id = flow === null || flow === void 0 ? void 0 : flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
|
|
8194
8200
|
maybeUpdateState = function(newState) {
|
|
8195
8201
|
if (_this.state.ref !== ref) {
|
|
8196
8202
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
@@ -8211,7 +8217,7 @@ var ExternalStatePlugin = function() {
|
|
|
8211
8217
|
,
|
|
8212
8218
|
4
|
|
8213
8219
|
]);
|
|
8214
|
-
_this_setupFlow = this.setupFlow(
|
|
8220
|
+
_this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
|
|
8215
8221
|
this.setState(_object_spread({
|
|
8216
8222
|
ref: ref
|
|
8217
8223
|
}, state));
|
|
@@ -8246,7 +8252,7 @@ var ExternalStatePlugin = function() {
|
|
|
8246
8252
|
errorState = {
|
|
8247
8253
|
status: "error",
|
|
8248
8254
|
ref: ref,
|
|
8249
|
-
flow:
|
|
8255
|
+
flow: flow,
|
|
8250
8256
|
error: error
|
|
8251
8257
|
};
|
|
8252
8258
|
maybeUpdateState(errorState);
|