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