@steedos/webapp 3.0.0-beta.71 → 3.0.0-beta.73

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.
@@ -21241,7 +21241,7 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
21241
21241
  currentListeners = null;
21242
21242
  };
21243
21243
  }
21244
- function dispatch(action) {
21244
+ function dispatch2(action) {
21245
21245
  if (!isPlainObject$1(action)) {
21246
21246
  throw new Error(formatProdErrorMessage(7));
21247
21247
  }
@@ -21269,7 +21269,7 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
21269
21269
  throw new Error(formatProdErrorMessage(10));
21270
21270
  }
21271
21271
  currentReducer = nextReducer;
21272
- dispatch({
21272
+ dispatch2({
21273
21273
  type: ActionTypes.REPLACE
21274
21274
  });
21275
21275
  }
@@ -21304,11 +21304,11 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
21304
21304
  return this;
21305
21305
  }, _ref3;
21306
21306
  }
21307
- dispatch({
21307
+ dispatch2({
21308
21308
  type: ActionTypes.INIT
21309
21309
  });
21310
21310
  return _ref22 = {
21311
- dispatch,
21311
+ dispatch: dispatch2,
21312
21312
  subscribe,
21313
21313
  getState,
21314
21314
  replaceReducer
@@ -21371,14 +21371,14 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
21371
21371
  return hasChanged ? nextState : state;
21372
21372
  };
21373
21373
  }
21374
- function bindActionCreator(actionCreator, dispatch) {
21374
+ function bindActionCreator(actionCreator, dispatch2) {
21375
21375
  return function() {
21376
- return dispatch(actionCreator.apply(this, arguments));
21376
+ return dispatch2(actionCreator.apply(this, arguments));
21377
21377
  };
21378
21378
  }
21379
- function bindActionCreators$1(actionCreators, dispatch) {
21379
+ function bindActionCreators$1(actionCreators, dispatch2) {
21380
21380
  if (typeof actionCreators === "function") {
21381
- return bindActionCreator(actionCreators, dispatch);
21381
+ return bindActionCreator(actionCreators, dispatch2);
21382
21382
  }
21383
21383
  if (typeof actionCreators !== "object" || actionCreators === null) {
21384
21384
  throw new Error(formatProdErrorMessage(16));
@@ -21387,7 +21387,7 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
21387
21387
  for (var key2 in actionCreators) {
21388
21388
  var actionCreator = actionCreators[key2];
21389
21389
  if (typeof actionCreator === "function") {
21390
- boundActionCreators[key2] = bindActionCreator(actionCreator, dispatch);
21390
+ boundActionCreators[key2] = bindActionCreator(actionCreator, dispatch2);
21391
21391
  }
21392
21392
  }
21393
21393
  return boundActionCreators;
@@ -21417,12 +21417,12 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
21417
21417
  return function(createStore2) {
21418
21418
  return function() {
21419
21419
  var store2 = createStore2.apply(void 0, arguments);
21420
- var _dispatch = function dispatch() {
21420
+ var _dispatch = function dispatch2() {
21421
21421
  throw new Error(formatProdErrorMessage(15));
21422
21422
  };
21423
21423
  var middlewareAPI = {
21424
21424
  getState: store2.getState,
21425
- dispatch: function dispatch() {
21425
+ dispatch: function dispatch2() {
21426
21426
  return _dispatch.apply(void 0, arguments);
21427
21427
  }
21428
21428
  };
@@ -22212,13 +22212,13 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22212
22212
  }
22213
22213
  return true;
22214
22214
  }
22215
- function bindActionCreators(actionCreators, dispatch) {
22215
+ function bindActionCreators(actionCreators, dispatch2) {
22216
22216
  var boundActionCreators = {};
22217
22217
  var _loop = function _loop2(key3) {
22218
22218
  var actionCreator = actionCreators[key3];
22219
22219
  if (typeof actionCreator === "function") {
22220
22220
  boundActionCreators[key3] = function() {
22221
- return dispatch(actionCreator.apply(void 0, arguments));
22221
+ return dispatch2(actionCreator.apply(void 0, arguments));
22222
22222
  };
22223
22223
  }
22224
22224
  };
@@ -22228,8 +22228,8 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22228
22228
  return boundActionCreators;
22229
22229
  }
22230
22230
  function wrapMapToPropsConstant(getConstant) {
22231
- return function initConstantSelector(dispatch, options) {
22232
- var constant = getConstant(dispatch, options);
22231
+ return function initConstantSelector(dispatch2, options) {
22232
+ var constant = getConstant(dispatch2, options);
22233
22233
  function constantSelector() {
22234
22234
  return constant;
22235
22235
  }
@@ -22241,7 +22241,7 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22241
22241
  return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== void 0 ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
22242
22242
  }
22243
22243
  function wrapMapToPropsFunc(mapToProps, methodName) {
22244
- return function initProxySelector(dispatch, _ref3) {
22244
+ return function initProxySelector(dispatch2, _ref3) {
22245
22245
  _ref3.displayName;
22246
22246
  var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
22247
22247
  return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
@@ -22265,15 +22265,15 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22265
22265
  return typeof mapDispatchToProps2 === "function" ? wrapMapToPropsFunc(mapDispatchToProps2) : void 0;
22266
22266
  }
22267
22267
  function whenMapDispatchToPropsIsMissing(mapDispatchToProps2) {
22268
- return !mapDispatchToProps2 ? wrapMapToPropsConstant(function(dispatch) {
22268
+ return !mapDispatchToProps2 ? wrapMapToPropsConstant(function(dispatch2) {
22269
22269
  return {
22270
- dispatch
22270
+ dispatch: dispatch2
22271
22271
  };
22272
22272
  }) : void 0;
22273
22273
  }
22274
22274
  function whenMapDispatchToPropsIsObject(mapDispatchToProps2) {
22275
- return mapDispatchToProps2 && typeof mapDispatchToProps2 === "object" ? wrapMapToPropsConstant(function(dispatch) {
22276
- return bindActionCreators(mapDispatchToProps2, dispatch);
22275
+ return mapDispatchToProps2 && typeof mapDispatchToProps2 === "object" ? wrapMapToPropsConstant(function(dispatch2) {
22276
+ return bindActionCreators(mapDispatchToProps2, dispatch2);
22277
22277
  }) : void 0;
22278
22278
  }
22279
22279
  const defaultMapDispatchToPropsFactories = [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];
@@ -22290,7 +22290,7 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22290
22290
  return _extends({}, ownProps, stateProps, dispatchProps);
22291
22291
  }
22292
22292
  function wrapMergePropsFunc(mergeProps) {
22293
- return function initMergePropsProxy(dispatch, _ref3) {
22293
+ return function initMergePropsProxy(dispatch2, _ref3) {
22294
22294
  _ref3.displayName;
22295
22295
  var pure = _ref3.pure, areMergedPropsEqual = _ref3.areMergedPropsEqual;
22296
22296
  var hasRunOnce = false;
@@ -22317,12 +22317,12 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22317
22317
  }
22318
22318
  const defaultMergePropsFactories = [whenMergePropsIsFunction, whenMergePropsIsOmitted];
22319
22319
  var _excluded$1 = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"];
22320
- function impureFinalPropsSelectorFactory(mapStateToProps2, mapDispatchToProps2, mergeProps, dispatch) {
22320
+ function impureFinalPropsSelectorFactory(mapStateToProps2, mapDispatchToProps2, mergeProps, dispatch2) {
22321
22321
  return function impureFinalPropsSelector(state, ownProps) {
22322
- return mergeProps(mapStateToProps2(state, ownProps), mapDispatchToProps2(dispatch, ownProps), ownProps);
22322
+ return mergeProps(mapStateToProps2(state, ownProps), mapDispatchToProps2(dispatch2, ownProps), ownProps);
22323
22323
  };
22324
22324
  }
22325
- function pureFinalPropsSelectorFactory(mapStateToProps2, mapDispatchToProps2, mergeProps, dispatch, _ref3) {
22325
+ function pureFinalPropsSelectorFactory(mapStateToProps2, mapDispatchToProps2, mergeProps, dispatch2, _ref3) {
22326
22326
  var areStatesEqual = _ref3.areStatesEqual, areOwnPropsEqual = _ref3.areOwnPropsEqual, areStatePropsEqual = _ref3.areStatePropsEqual;
22327
22327
  var hasRunAtLeastOnce = false;
22328
22328
  var state;
@@ -22334,20 +22334,20 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22334
22334
  state = firstState;
22335
22335
  ownProps = firstOwnProps;
22336
22336
  stateProps = mapStateToProps2(state, ownProps);
22337
- dispatchProps = mapDispatchToProps2(dispatch, ownProps);
22337
+ dispatchProps = mapDispatchToProps2(dispatch2, ownProps);
22338
22338
  mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
22339
22339
  hasRunAtLeastOnce = true;
22340
22340
  return mergedProps;
22341
22341
  }
22342
22342
  function handleNewPropsAndNewState() {
22343
22343
  stateProps = mapStateToProps2(state, ownProps);
22344
- if (mapDispatchToProps2.dependsOnOwnProps) dispatchProps = mapDispatchToProps2(dispatch, ownProps);
22344
+ if (mapDispatchToProps2.dependsOnOwnProps) dispatchProps = mapDispatchToProps2(dispatch2, ownProps);
22345
22345
  mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
22346
22346
  return mergedProps;
22347
22347
  }
22348
22348
  function handleNewProps() {
22349
22349
  if (mapStateToProps2.dependsOnOwnProps) stateProps = mapStateToProps2(state, ownProps);
22350
- if (mapDispatchToProps2.dependsOnOwnProps) dispatchProps = mapDispatchToProps2(dispatch, ownProps);
22350
+ if (mapDispatchToProps2.dependsOnOwnProps) dispatchProps = mapDispatchToProps2(dispatch2, ownProps);
22351
22351
  mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
22352
22352
  return mergedProps;
22353
22353
  }
@@ -22372,13 +22372,13 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22372
22372
  return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
22373
22373
  };
22374
22374
  }
22375
- function finalPropsSelectorFactory(dispatch, _ref22) {
22375
+ function finalPropsSelectorFactory(dispatch2, _ref22) {
22376
22376
  var initMapStateToProps = _ref22.initMapStateToProps, initMapDispatchToProps = _ref22.initMapDispatchToProps, initMergeProps = _ref22.initMergeProps, options = _objectWithoutPropertiesLoose$1(_ref22, _excluded$1);
22377
- var mapStateToProps2 = initMapStateToProps(dispatch, options);
22378
- var mapDispatchToProps2 = initMapDispatchToProps(dispatch, options);
22379
- var mergeProps = initMergeProps(dispatch, options);
22377
+ var mapStateToProps2 = initMapStateToProps(dispatch2, options);
22378
+ var mapDispatchToProps2 = initMapDispatchToProps(dispatch2, options);
22379
+ var mergeProps = initMergeProps(dispatch2, options);
22380
22380
  var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
22381
- return selectorFactory(mapStateToProps2, mapDispatchToProps2, mergeProps, dispatch, options);
22381
+ return selectorFactory(mapStateToProps2, mapDispatchToProps2, mergeProps, dispatch2, options);
22382
22382
  }
22383
22383
  var _excluded = ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"];
22384
22384
  function match$1(arg, factories, name) {
@@ -22386,7 +22386,7 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22386
22386
  var result = factories[i](arg);
22387
22387
  if (result) return result;
22388
22388
  }
22389
- return function(dispatch, options) {
22389
+ return function(dispatch2, options) {
22390
22390
  throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
22391
22391
  };
22392
22392
  }
@@ -22585,11 +22585,11 @@ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !==
22585
22585
  }
22586
22586
  function createThunkMiddleware(extraArgument) {
22587
22587
  var middleware = function middleware2(_ref3) {
22588
- var dispatch = _ref3.dispatch, getState = _ref3.getState;
22588
+ var dispatch2 = _ref3.dispatch, getState = _ref3.getState;
22589
22589
  return function(next) {
22590
22590
  return function(action) {
22591
22591
  if (typeof action === "function") {
22592
- return action(dispatch, getState, extraArgument);
22592
+ return action(dispatch2, getState, extraArgument);
22593
22593
  }
22594
22594
  return next(action);
22595
22595
  };
@@ -40149,23 +40149,23 @@ Try polyfilling it using "@formatjs/intl-displaynames"
40149
40149
  if (typeof window !== "undefined")
40150
40150
  window["Client4"] = Client4;
40151
40151
  function logError(error, displayable = false) {
40152
- return async (dispatch) => {
40152
+ return async (dispatch2) => {
40153
40153
  return { data: true };
40154
40154
  };
40155
40155
  }
40156
40156
  const HTTP_UNAUTHORIZED = 401;
40157
- function forceLogoutIfNecessary(err, dispatch, getState) {
40157
+ function forceLogoutIfNecessary(err, dispatch2, getState) {
40158
40158
  const { currentUserId: currentUserId2 } = getState().entities.users;
40159
40159
  if ("status_code" in err && err.status_code === HTTP_UNAUTHORIZED && err.url && err.url.indexOf("/login") === -1 && currentUserId2) {
40160
40160
  Client4.setToken("");
40161
- dispatch({ type: UserTypes.LOGOUT_SUCCESS, data: {} });
40161
+ dispatch2({ type: UserTypes.LOGOUT_SUCCESS, data: {} });
40162
40162
  }
40163
40163
  }
40164
- function dispatcher(type, data2, dispatch) {
40164
+ function dispatcher(type, data2, dispatch2) {
40165
40165
  if (type.indexOf("SUCCESS") === -1) {
40166
- dispatch(requestSuccess(type, data2));
40166
+ dispatch2(requestSuccess(type, data2));
40167
40167
  } else {
40168
- dispatch(requestData(type));
40168
+ dispatch2(requestData(type));
40169
40169
  }
40170
40170
  }
40171
40171
  function requestData(type) {
@@ -40194,20 +40194,20 @@ Try polyfilling it using "@formatjs/intl-displaynames"
40194
40194
  params = [],
40195
40195
  onSuccessFunction
40196
40196
  }) {
40197
- return async (dispatch, getState) => {
40197
+ return async (dispatch2, getState) => {
40198
40198
  if (onRequest) {
40199
- dispatch(requestData(onRequest));
40199
+ dispatch2(requestData(onRequest));
40200
40200
  }
40201
40201
  let data2 = null;
40202
40202
  try {
40203
40203
  data2 = await clientFunc(...params);
40204
40204
  } catch (error) {
40205
- forceLogoutIfNecessary(error, dispatch, getState);
40205
+ forceLogoutIfNecessary(error, dispatch2, getState);
40206
40206
  const actions = [logError()];
40207
40207
  if (onFailure) {
40208
40208
  actions.push(requestFailure(onFailure, error));
40209
40209
  }
40210
- dispatch(batchActions(actions));
40210
+ dispatch2(batchActions(actions));
40211
40211
  return { error };
40212
40212
  }
40213
40213
  if (onSuccessFunction) {
@@ -40215,10 +40215,10 @@ Try polyfilling it using "@formatjs/intl-displaynames"
40215
40215
  }
40216
40216
  if (Array.isArray(onSuccess)) {
40217
40217
  onSuccess.forEach((s) => {
40218
- dispatcher(s, data2, dispatch);
40218
+ dispatcher(s, data2, dispatch2);
40219
40219
  });
40220
40220
  } else if (onSuccess) {
40221
- dispatcher(onSuccess, data2, dispatch);
40221
+ dispatcher(onSuccess, data2, dispatch2);
40222
40222
  }
40223
40223
  return { data: data2 };
40224
40224
  };
@@ -45955,7 +45955,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
45955
45955
  }
45956
45956
  const hashHistory = typeof window !== "undefined" ? createHashHistory() : null;
45957
45957
  function selectSpace(spaceId) {
45958
- return async (dispatch, getState) => {
45958
+ return async (dispatch2, getState) => {
45959
45959
  let selectedSpaceId = spaceId || LocalStorageStore.getItem("spaceId");
45960
45960
  if (!selectedSpaceId) {
45961
45961
  return { data: false };
@@ -45964,7 +45964,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
45964
45964
  const space = getSpace(getState(), selectedSpaceId);
45965
45965
  if (!space)
45966
45966
  return { data: false };
45967
- dispatch({
45967
+ dispatch2({
45968
45968
  type: SpaceTypes.SELECT_SPACE,
45969
45969
  data: selectedSpaceId
45970
45970
  });
@@ -45974,24 +45974,24 @@ Try polyfilling it using "@formatjs/intl-displaynames"
45974
45974
  };
45975
45975
  }
45976
45976
  function acceptInvitation(spaceId, email) {
45977
- return async (dispatch, getState) => {
45977
+ return async (dispatch2, getState) => {
45978
45978
  try {
45979
45979
  const result = await Client4.acceptInvitation(spaceId, email);
45980
45980
  } catch (error) {
45981
- forceLogoutIfNecessary(error, dispatch, getState);
45982
- dispatch(logError());
45981
+ forceLogoutIfNecessary(error, dispatch2, getState);
45982
+ dispatch2(logError());
45983
45983
  return { error };
45984
45984
  }
45985
45985
  return { data: spaceId };
45986
45986
  };
45987
45987
  }
45988
45988
  function declineInvitation(spaceId, email) {
45989
- return async (dispatch, getState) => {
45989
+ return async (dispatch2, getState) => {
45990
45990
  try {
45991
45991
  const result = await Client4.declineInvitation(spaceId, email);
45992
45992
  } catch (error) {
45993
- forceLogoutIfNecessary(error, dispatch, getState);
45994
- dispatch(logError());
45993
+ forceLogoutIfNecessary(error, dispatch2, getState);
45994
+ dispatch2(logError());
45995
45995
  return { error };
45996
45996
  }
45997
45997
  return { data: spaceId };
@@ -46009,19 +46009,19 @@ Try polyfilling it using "@formatjs/intl-displaynames"
46009
46009
  });
46010
46010
  }
46011
46011
  function createSpace(name) {
46012
- return async (dispatch, getState) => {
46012
+ return async (dispatch2, getState) => {
46013
46013
  let space = null;
46014
46014
  try {
46015
46015
  space = await Client4.createSpace(name);
46016
46016
  } catch (error) {
46017
- forceLogoutIfNecessary(error, dispatch, getState);
46018
- dispatch(logError());
46017
+ forceLogoutIfNecessary(error, dispatch2, getState);
46018
+ dispatch2(logError());
46019
46019
  return { error };
46020
46020
  }
46021
46021
  if (space && space._id) {
46022
46022
  const promises = [
46023
- dispatch(getMySpaces()),
46024
- dispatch(selectSpace(space._id))
46023
+ dispatch2(getMySpaces()),
46024
+ dispatch2(selectSpace(space._id))
46025
46025
  // dispatch(getClientConfig()),
46026
46026
  ];
46027
46027
  try {
@@ -52170,22 +52170,22 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52170
52170
  }
52171
52171
  Builder$1.registerComponent(PersonalizationContainer, { name: "PersonalizationContainer", noWrap: true, friendlyName: "Dynamic Container", image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a", canHaveChildren: true, inputs: [{ name: "variants", defaultValue: [], behavior: "personalizationVariantList", type: "list", subFields: [{ name: "name", type: "text", localized: false }, { name: "query", friendlyName: "Targeting rules", type: "BuilderQuery", defaultValue: [], localized: false }, { name: "startDate", type: "date", localized: false }, { name: "endDate", type: "date", localized: false }, { name: "blocks", type: "UiBlocks", hideFromUI: true, defaultValue: [] }] }] }), Builder$1.isReact = true, Builder$1.sdkInfo = { name: "react", version: SDK_VERSION };
52172
52172
  function createUser(user, token, inviteId, redirect2) {
52173
- return async (dispatch, getState) => {
52173
+ return async (dispatch2, getState) => {
52174
52174
  let created;
52175
52175
  try {
52176
52176
  created = await Client4.createUser(user, token, inviteId, redirect2);
52177
52177
  } catch (error) {
52178
- forceLogoutIfNecessary(error, dispatch, getState);
52179
- dispatch(logError());
52178
+ forceLogoutIfNecessary(error, dispatch2, getState);
52179
+ dispatch2(logError());
52180
52180
  return { error };
52181
52181
  }
52182
- dispatch({ type: UserTypes.RECEIVED_ME, data: created.user });
52183
- return completeLogin(created)(dispatch, getState);
52182
+ dispatch2({ type: UserTypes.RECEIVED_ME, data: created.user });
52183
+ return completeLogin(created)(dispatch2, getState);
52184
52184
  };
52185
52185
  }
52186
52186
  function login(loginId, password, mfaToken = "") {
52187
- return async (dispatch, getState) => {
52188
- dispatch({ type: UserTypes.LOGIN_REQUEST, data: null });
52187
+ return async (dispatch2, getState) => {
52188
+ dispatch2({ type: UserTypes.LOGIN_REQUEST, data: null });
52189
52189
  const deviceId = getState().entities.general.deviceToken;
52190
52190
  let data2;
52191
52191
  try {
@@ -52194,7 +52194,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52194
52194
  return { error: data2._next, ...data2 };
52195
52195
  }
52196
52196
  } catch (error) {
52197
- dispatch(
52197
+ dispatch2(
52198
52198
  batchActions([
52199
52199
  {
52200
52200
  type: UserTypes.LOGIN_FAILURE,
@@ -52205,12 +52205,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52205
52205
  );
52206
52206
  return { error };
52207
52207
  }
52208
- return completeLogin(data2)(dispatch, getState);
52208
+ return completeLogin(data2)(dispatch2, getState);
52209
52209
  };
52210
52210
  }
52211
52211
  function completeLogin(data2) {
52212
- return async (dispatch, getState) => {
52213
- dispatch({
52212
+ return async (dispatch2, getState) => {
52213
+ dispatch2({
52214
52214
  type: UserTypes.RECEIVED_ME,
52215
52215
  data: data2.user
52216
52216
  });
@@ -52220,10 +52220,10 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52220
52220
  LocalStorageStore.setUserId(data2.user._id, data2.token);
52221
52221
  }
52222
52222
  try {
52223
- await dispatch(getMySpaces());
52224
- await dispatch(selectSpace());
52223
+ await dispatch2(getMySpaces());
52224
+ await dispatch2(selectSpace());
52225
52225
  } catch (error) {
52226
- dispatch(
52226
+ dispatch2(
52227
52227
  batchActions([
52228
52228
  { type: UserTypes.LOGIN_FAILURE, error },
52229
52229
  logError()
@@ -52231,7 +52231,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52231
52231
  );
52232
52232
  return { error };
52233
52233
  }
52234
- dispatch(
52234
+ dispatch2(
52235
52235
  batchActions([
52236
52236
  {
52237
52237
  type: UserTypes.LOGIN_SUCCESS
@@ -52242,14 +52242,14 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52242
52242
  };
52243
52243
  }
52244
52244
  function loadMe() {
52245
- return async (dispatch, getState) => {
52246
- await dispatch(getMySpaces());
52247
- await dispatch(selectSpace());
52245
+ return async (dispatch2, getState) => {
52246
+ await dispatch2(getMySpaces());
52247
+ await dispatch2(selectSpace());
52248
52248
  const { currentSpaceId: currentSpaceId2 } = getState().entities.spaces;
52249
52249
  if (currentSpaceId2) {
52250
- await dispatch(validate());
52250
+ await dispatch2(validate());
52251
52251
  } else {
52252
- await dispatch(getMe());
52252
+ await dispatch2(getMe());
52253
52253
  }
52254
52254
  const { currentUserId: currentUserId2 } = getState().entities.users;
52255
52255
  const user = getState().entities.users.users[currentUserId2];
@@ -52267,26 +52267,26 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52267
52267
  };
52268
52268
  }
52269
52269
  function logout() {
52270
- return async (dispatch) => {
52271
- dispatch({ type: UserTypes.LOGOUT_REQUEST, data: null });
52270
+ return async (dispatch2) => {
52271
+ dispatch2({ type: UserTypes.LOGOUT_REQUEST, data: null });
52272
52272
  try {
52273
52273
  await Client4.logout();
52274
52274
  } catch (error) {
52275
52275
  }
52276
52276
  LocalStorageStore.setUserId(null);
52277
- dispatch({ type: UserTypes.LOGOUT_SUCCESS, data: null });
52277
+ dispatch2({ type: UserTypes.LOGOUT_SUCCESS, data: null });
52278
52278
  return { data: true };
52279
52279
  };
52280
52280
  }
52281
52281
  function getMe() {
52282
- return async (dispatch, getState) => {
52282
+ return async (dispatch2, getState) => {
52283
52283
  if (!LocalStorageStore.getItem("userId"))
52284
52284
  return { error: "user not found." };
52285
52285
  const getMeFunc = bindClientFunc({
52286
52286
  clientFunc: Client4.getMe,
52287
52287
  onSuccess: UserTypes.RECEIVED_ME
52288
52288
  });
52289
- const me = await getMeFunc(dispatch, getState);
52289
+ const me = await getMeFunc(dispatch2, getState);
52290
52290
  if ("error" in me) {
52291
52291
  LocalStorageStore.removeItem("userId");
52292
52292
  return me;
@@ -52295,7 +52295,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52295
52295
  };
52296
52296
  }
52297
52297
  function validate() {
52298
- return async (dispatch, getState) => {
52298
+ return async (dispatch2, getState) => {
52299
52299
  if (!LocalStorageStore.getItem("userId"))
52300
52300
  return { error: "userId not found." };
52301
52301
  if (!LocalStorageStore.getItem("spaceId"))
@@ -52305,7 +52305,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52305
52305
  onSuccess: UserTypes.RECEIVED_VALIDATE,
52306
52306
  params: [LocalStorageStore.getItem("spaceId")]
52307
52307
  });
52308
- const me = await validateFunc(dispatch, getState);
52308
+ const me = await validateFunc(dispatch2, getState);
52309
52309
  if ("error" in me) {
52310
52310
  LocalStorageStore.removeItem("userId");
52311
52311
  return me;
@@ -52314,13 +52314,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52314
52314
  };
52315
52315
  }
52316
52316
  function sendVerificationToken(loginId, geetest) {
52317
- return async (dispatch, getState) => {
52317
+ return async (dispatch2, getState) => {
52318
52318
  getState().entities.general.deviceToken;
52319
52319
  let data2;
52320
52320
  try {
52321
52321
  data2 = await Client4.sendVerificationToken(loginId, geetest);
52322
52322
  } catch (error) {
52323
- dispatch(
52323
+ dispatch2(
52324
52324
  batchActions([
52325
52325
  {
52326
52326
  type: UserTypes.VERIFICATION_TOKEN_RECIEVED,
@@ -52335,8 +52335,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52335
52335
  };
52336
52336
  }
52337
52337
  function changePassword(oldPassword, newPassword) {
52338
- return async (dispatch, getState) => {
52339
- dispatch({ type: UserTypes.CHANGEPASSWORD_REQUEST, data: null });
52338
+ return async (dispatch2, getState) => {
52339
+ dispatch2({ type: UserTypes.CHANGEPASSWORD_REQUEST, data: null });
52340
52340
  let data2;
52341
52341
  try {
52342
52342
  const getChangePasswordFunc = bindClientFunc({
@@ -52344,9 +52344,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52344
52344
  onSuccess: UserTypes.CHANGEPASSWORD_RECEIVED,
52345
52345
  params: [oldPassword, newPassword]
52346
52346
  });
52347
- data2 = await getChangePasswordFunc(dispatch, getState);
52347
+ data2 = await getChangePasswordFunc(dispatch2, getState);
52348
52348
  } catch (error) {
52349
- dispatch(
52349
+ dispatch2(
52350
52350
  batchActions([
52351
52351
  {
52352
52352
  type: UserTypes.CHANGEPASSWORD_FAILURE,
@@ -52361,8 +52361,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52361
52361
  };
52362
52362
  }
52363
52363
  function verifyEmail(email, code) {
52364
- return async (dispatch, getState) => {
52365
- dispatch({ type: UserTypes.VERIFYEMAIL_REQUEST, data: null });
52364
+ return async (dispatch2, getState) => {
52365
+ dispatch2({ type: UserTypes.VERIFYEMAIL_REQUEST, data: null });
52366
52366
  let data2;
52367
52367
  try {
52368
52368
  const getVerifyEmailFunc = bindClientFunc({
@@ -52370,9 +52370,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52370
52370
  onSuccess: UserTypes.VERIFYEMAIL_RECEIVED,
52371
52371
  params: [email, code]
52372
52372
  });
52373
- data2 = await getVerifyEmailFunc(dispatch, getState);
52373
+ data2 = await getVerifyEmailFunc(dispatch2, getState);
52374
52374
  } catch (error) {
52375
- dispatch(
52375
+ dispatch2(
52376
52376
  batchActions([
52377
52377
  {
52378
52378
  type: UserTypes.VERIFYEMAIL_FAILURE,
@@ -52387,8 +52387,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52387
52387
  };
52388
52388
  }
52389
52389
  function verifyMobile(mobile, code) {
52390
- return async (dispatch, getState) => {
52391
- dispatch({ type: UserTypes.VERIFYMOBILE_REQUEST, data: null });
52390
+ return async (dispatch2, getState) => {
52391
+ dispatch2({ type: UserTypes.VERIFYMOBILE_REQUEST, data: null });
52392
52392
  let data2;
52393
52393
  try {
52394
52394
  const getVerifyMobileFunc = bindClientFunc({
@@ -52396,9 +52396,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52396
52396
  onSuccess: UserTypes.VERIFYMOBILE_RECEIVED,
52397
52397
  params: [mobile, code]
52398
52398
  });
52399
- data2 = await getVerifyMobileFunc(dispatch, getState);
52399
+ data2 = await getVerifyMobileFunc(dispatch2, getState);
52400
52400
  } catch (error) {
52401
- dispatch(
52401
+ dispatch2(
52402
52402
  batchActions([
52403
52403
  {
52404
52404
  type: UserTypes.VERIFYMOBILE_FAILURE,
@@ -52412,8 +52412,16 @@ Try polyfilling it using "@formatjs/intl-displaynames"
52412
52412
  return data2;
52413
52413
  };
52414
52414
  }
52415
- store.dispatch;
52415
+ const dispatch = store.dispatch;
52416
52416
  store.getState;
52417
+ function emitUserLoggedOutEvent(redirectToPath, shouldSignalLogout = true, userAction = true) {
52418
+ dispatch(logout()).then(() => {
52419
+ redirect(redirectToPath);
52420
+ }).catch((e) => {
52421
+ console.log(e);
52422
+ redirect(redirectToPath);
52423
+ });
52424
+ }
52417
52425
  function finishSignin(currentUser, tenant, location2, navigate) {
52418
52426
  let password_expired = currentUser.password_expired;
52419
52427
  if (password_expired) {
@@ -53026,12 +53034,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53026
53034
  settingsTenantId: getSettingsTenantId(state)
53027
53035
  };
53028
53036
  }
53029
- function mapDispatchToProps$9(dispatch) {
53037
+ function mapDispatchToProps$9(dispatch2) {
53030
53038
  return {
53031
53039
  actions: bindActionCreators$1({
53032
53040
  createUser,
53033
53041
  sendVerificationToken
53034
- }, dispatch)
53042
+ }, dispatch2)
53035
53043
  };
53036
53044
  }
53037
53045
  const withRouter$5 = (props) => {
@@ -53540,12 +53548,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53540
53548
  settingsTenantId: getSettingsTenantId(state)
53541
53549
  };
53542
53550
  }
53543
- function mapDispatchToProps$8(dispatch) {
53551
+ function mapDispatchToProps$8(dispatch2) {
53544
53552
  return {
53545
53553
  actions: bindActionCreators$1({
53546
53554
  login,
53547
53555
  sendVerificationToken
53548
- }, dispatch)
53556
+ }, dispatch2)
53549
53557
  };
53550
53558
  }
53551
53559
  const withRouter$4 = (props) => {
@@ -53584,9 +53592,22 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53584
53592
  logout
53585
53593
  };
53586
53594
  const Logout$1 = connect(mapStateToProps$8, mapDispatchToProps$7)(Logout);
53595
+ const getRedirectUrl = () => {
53596
+ const redirect2 = location.href.replace("/steedos/sign-in", "").replace("/accounts/a/#/logout", "");
53597
+ const u = new URL(redirect2);
53598
+ u.searchParams.delete("no_redirect");
53599
+ u.searchParams.delete("X-Space-Id");
53600
+ u.searchParams.delete("X-Auth-Token");
53601
+ u.searchParams.delete("X-User-Id");
53602
+ return u.toString();
53603
+ };
53604
+ const goResetPassword = (navigate) => {
53605
+ const redirect2 = getRedirectUrl();
53606
+ navigate("/update-password?redirect_uri=" + redirect2);
53607
+ };
53587
53608
  const Home = () => {
53588
53609
  const navigate = useNavigate();
53589
- const dispatch = useDispatch();
53610
+ const dispatch2 = useDispatch();
53590
53611
  const currentUser = useSelector(getCurrentUser);
53591
53612
  const currentSpace = useSelector(getCurrentSpace);
53592
53613
  document.title = `Steedos`;
@@ -53599,9 +53620,14 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53599
53620
  navigate("/select-space");
53600
53621
  return;
53601
53622
  }
53602
- dispatch(validate()).then((me) => {
53623
+ dispatch2(validate()).then((me) => {
53624
+ var _a2;
53603
53625
  Builder.settings.context.user = me.data;
53604
- window.location.href = "/app";
53626
+ if ((_a2 = me.data) == null ? void 0 : _a2.password_expired) {
53627
+ goResetPassword(navigate);
53628
+ } else {
53629
+ window.location.href = "/app";
53630
+ }
53605
53631
  });
53606
53632
  }, []);
53607
53633
  return null;
@@ -53682,7 +53708,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53682
53708
  });
53683
53709
  return;
53684
53710
  } else {
53685
- redirect("/logout");
53711
+ emitUserLoggedOutEvent("/login");
53686
53712
  }
53687
53713
  });
53688
53714
  });
@@ -53772,11 +53798,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53772
53798
  settingsTenantId: getSettingsTenantId(state)
53773
53799
  };
53774
53800
  }
53775
- function mapDispatchToProps$6(dispatch) {
53801
+ function mapDispatchToProps$6(dispatch2) {
53776
53802
  return {
53777
53803
  actions: bindActionCreators$1({
53778
53804
  changePassword
53779
- }, dispatch)
53805
+ }, dispatch2)
53780
53806
  };
53781
53807
  }
53782
53808
  const UpdatePassword$1 = connect(mapStateToProps$7, mapDispatchToProps$6)(UpdatePassword);
@@ -53857,12 +53883,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
53857
53883
  tenant: getTenant(state)
53858
53884
  };
53859
53885
  }
53860
- function mapDispatchToProps$5(dispatch) {
53886
+ function mapDispatchToProps$5(dispatch2) {
53861
53887
  return {
53862
53888
  actions: bindActionCreators$1({
53863
53889
  createSpace,
53864
53890
  selectSpace
53865
- }, dispatch)
53891
+ }, dispatch2)
53866
53892
  };
53867
53893
  }
53868
53894
  const withRouter$3 = (props) => {
@@ -54425,13 +54451,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
54425
54451
  tenant: getTenant(state)
54426
54452
  };
54427
54453
  }
54428
- function mapDispatchToProps$4(dispatch) {
54454
+ function mapDispatchToProps$4(dispatch2) {
54429
54455
  return {
54430
54456
  actions: bindActionCreators$1({
54431
54457
  selectSpace,
54432
54458
  acceptInvitation,
54433
54459
  declineInvitation
54434
- }, dispatch)
54460
+ }, dispatch2)
54435
54461
  };
54436
54462
  }
54437
54463
  const withRouter$2 = (props) => {
@@ -54710,13 +54736,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
54710
54736
  settingsTenantId: getSettingsTenantId(state)
54711
54737
  };
54712
54738
  }
54713
- function mapDispatchToProps$3(dispatch) {
54739
+ function mapDispatchToProps$3(dispatch2) {
54714
54740
  return {
54715
54741
  actions: bindActionCreators$1({
54716
54742
  verifyEmail,
54717
54743
  verifyMobile,
54718
54744
  sendVerificationToken
54719
- }, dispatch)
54745
+ }, dispatch2)
54720
54746
  };
54721
54747
  }
54722
54748
  const withRouter$1 = (props) => {
@@ -55046,13 +55072,13 @@ Try polyfilling it using "@formatjs/intl-displaynames"
55046
55072
  settingsTenantId: getSettingsTenantId(state)
55047
55073
  };
55048
55074
  }
55049
- function mapDispatchToProps$2(dispatch) {
55075
+ function mapDispatchToProps$2(dispatch2) {
55050
55076
  return {
55051
55077
  actions: bindActionCreators$1({
55052
55078
  verifyEmail,
55053
55079
  verifyMobile,
55054
55080
  sendVerificationToken
55055
- }, dispatch)
55081
+ }, dispatch2)
55056
55082
  };
55057
55083
  }
55058
55084
  const withRouter = (props) => {
@@ -57302,12 +57328,12 @@ Try polyfilling it using "@formatjs/intl-displaynames"
57302
57328
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(RouterProvider2, { router }) });
57303
57329
  };
57304
57330
  function loadSettings() {
57305
- return async (dispatch, getState) => {
57331
+ return async (dispatch2, getState) => {
57306
57332
  let data2;
57307
57333
  try {
57308
57334
  data2 = await Client4.getSettings();
57309
57335
  } catch (error) {
57310
- forceLogoutIfNecessary(error, dispatch, getState);
57336
+ forceLogoutIfNecessary(error, dispatch2, getState);
57311
57337
  return { error };
57312
57338
  }
57313
57339
  Client4.setEnableLogging(data2.EnableDeveloper === "true");
@@ -57315,7 +57341,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
57315
57341
  Steedos.settings = {
57316
57342
  public: data2.public
57317
57343
  };
57318
- dispatch({
57344
+ dispatch2({
57319
57345
  type: GeneralTypes.RECEIVED_SETTINGS,
57320
57346
  data: data2
57321
57347
  });
@@ -63786,8 +63812,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
63786
63812
  currentUser: getCurrentUser(state),
63787
63813
  currentSpaceId: getCurrentSpaceId(state)
63788
63814
  });
63789
- const mapDispatchToProps$1 = (dispatch) => ({
63790
- actions: bindActionCreators$1({ loadSettings, loadMe }, dispatch)
63815
+ const mapDispatchToProps$1 = (dispatch2) => ({
63816
+ actions: bindActionCreators$1({ loadSettings, loadMe }, dispatch2)
63791
63817
  });
63792
63818
  const Router = connect(mapStateToProps$1, mapDispatchToProps$1)(Root);
63793
63819
  function loadTranslations(locale, url2) {
@@ -63803,9 +63829,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
63803
63829
  }
63804
63830
  };
63805
63831
  }
63806
- return (dispatch) => {
63832
+ return (dispatch2) => {
63807
63833
  Client4.doFetch(url2).then((translations3) => {
63808
- dispatch({
63834
+ dispatch2({
63809
63835
  type: "RECEIVED_TRANSLATIONS",
63810
63836
  data: {
63811
63837
  locale,
@@ -63931,11 +63957,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
63931
63957
  translations: getTranslations(state, locale)
63932
63958
  };
63933
63959
  }
63934
- function mapDispatchToProps(dispatch) {
63960
+ function mapDispatchToProps(dispatch2) {
63935
63961
  return {
63936
63962
  actions: bindActionCreators$1({
63937
63963
  loadTranslations
63938
- }, dispatch)
63964
+ }, dispatch2)
63939
63965
  };
63940
63966
  }
63941
63967
  const IntlProvider = connect(mapStateToProps, mapDispatchToProps)(IntlProvider$1);
package/dist/index.html CHANGED
@@ -60,7 +60,7 @@
60
60
  window.loadCss = loadCss;
61
61
 
62
62
  </script>
63
- <script type="module" crossorigin src="/assets/index-BOo1amFD.js"></script>
63
+ <script type="module" crossorigin src="/assets/index-Cyw7f1Ml.js"></script>
64
64
  </head>
65
65
  <body class="skin-blue-light fixed steedos sidebar-mini three-columns" >
66
66
  <div id="root" class="steedos skin-blue-light creator h-full flex flex-col relative overflow-hidden sm:bg-gray-50"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/webapp",
3
- "version": "3.0.0-beta.71",
3
+ "version": "3.0.0-beta.73",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -69,5 +69,5 @@
69
69
  "access": "public"
70
70
  },
71
71
  "repository": "https://github.com/steedos/app-builder/tree/master/apps/accounts",
72
- "gitHead": "32cf4e8cafda54a3e30a46a6506eaa021fa25fb7"
72
+ "gitHead": "81878e4fe273d18ca345b0781f8a67b504722e8b"
73
73
  }