@cxbox-ui/core 2.0.0-alpha.6 → 2.0.0-alpha.8

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.
@@ -733,7 +733,8 @@ function getFilters(filters) {
733
733
  const values = item.value.map((val) => `"${val}"`);
734
734
  value = `[${values}]`;
735
735
  }
736
- result[`${item.fieldName}.${item.type}`] = value;
736
+ const separator = item.fieldName ? "." : "";
737
+ result[`${item.fieldName}${separator}${item.type}`] = value;
737
738
  }
738
739
  });
739
740
  return result;
@@ -748,22 +749,28 @@ function getSorters(sorters) {
748
749
  });
749
750
  return result;
750
751
  }
752
+ var jsonParse = (value) => {
753
+ try {
754
+ return JSON.parse(value);
755
+ }
756
+ catch (e) {
757
+ console.warn(e);
758
+ return null;
759
+ }
760
+ };
751
761
  function parseFilters(defaultFilters = "") {
752
762
  const result = [];
753
763
  const urlParams = new URLSearchParams(defaultFilters);
754
764
  const paramKeys = Object.keys(Object.fromEntries(urlParams));
755
765
  paramKeys.forEach((param) => {
766
+ var _a, _b;
756
767
  const [fieldName, type] = param.split(".");
757
- if (fieldName && type && urlParams.get(param)) {
768
+ const isStandardFilter = fieldName && type && urlParams.get(param);
769
+ if (isStandardFilter) {
758
770
  let value = urlParams.getAll(param);
759
771
  if (type === "containsOneOf" /* containsOneOf */ || type === "equalsOneOf" /* equalsOneOf */) {
760
- try {
761
- if (value.length === 1) {
762
- value = JSON.parse(value[0]);
763
- }
764
- }
765
- catch (e) {
766
- console.warn(e);
772
+ if (value.length === 1) {
773
+ value = (_a = jsonParse(value[0])) != null ? _a : value;
767
774
  }
768
775
  value = Array.isArray(value) ? value : [];
769
776
  }
@@ -776,6 +783,17 @@ function parseFilters(defaultFilters = "") {
776
783
  value
777
784
  });
778
785
  }
786
+ else if (defaultFilters) {
787
+ let value = urlParams.getAll(param);
788
+ if (value.length === 1) {
789
+ value = (_b = jsonParse(value[0])) != null ? _b : value[0];
790
+ }
791
+ result.push({
792
+ fieldName: "",
793
+ type: param,
794
+ value
795
+ });
796
+ }
779
797
  });
780
798
  return result.length ? result : null;
781
799
  }
@@ -1650,14 +1668,15 @@ var showAssocPopupEpic = (action$, state$) => action$.pipe(filter2(showViewPopup
1650
1668
  }));
1651
1669
  }));
1652
1670
  // src/epics/view/fileUploadConfirmEpic.ts
1653
- import { catchError as catchError2, concat as concat2, filter as filter3, mergeMap as mergeMap3, of as of5 } from "rxjs";
1671
+ import { catchError as catchError2, concat as concat2, EMPTY as EMPTY4, filter as filter3, mergeMap as mergeMap3, of as of5 } from "rxjs";
1654
1672
  import { OperationTypeCrud as OperationTypeCrud5 } from "@cxbox-ui/schema";
1655
1673
  var fileUploadConfirmEpic = (action$, state$, { api }) => action$.pipe(filter3(bulkUploadFiles.match), mergeMap3((action) => {
1656
- var _a, _b;
1674
+ var _a, _b, _c, _d;
1657
1675
  const state = state$.value;
1658
- const bcName = (_a = state.view.popupData) == null ? void 0 : _a.bcName;
1676
+ const isPopup = (_a = action.payload.isPopup) != null ? _a : true;
1677
+ const bcName = (_c = action.payload.bcName) != null ? _c : (_b = state.view.popupData) == null ? void 0 : _b.bcName;
1659
1678
  const bcUrl = buildBcUrl(bcName, true, state);
1660
- const widgetName = (_b = state.view.widgets.find((item) => item.bcName === bcName)) == null ? void 0 : _b.name;
1679
+ const widgetName = (_d = state.view.widgets.find((item) => item.bcName === bcName)) == null ? void 0 : _d.name;
1661
1680
  const data = action.payload.fileIds.map((id) => ({
1662
1681
  id,
1663
1682
  _associate: true,
@@ -1667,7 +1686,7 @@ var fileUploadConfirmEpic = (action$, state$, { api }) => action$.pipe(filter3(b
1667
1686
  var _a2;
1668
1687
  const postInvoke = (_a2 = response.postActions) == null ? void 0 : _a2[0];
1669
1688
  const preInvoke = response.preInvoke;
1670
- return concat2(of5(sendOperationSuccess({ bcName, cursor: null })), of5(bcForceUpdate({ bcName })), of5(closeViewPopup(null)), ...postOperationRoutine(widgetName, postInvoke, preInvoke, OperationTypeCrud5.save, bcName));
1689
+ return concat2(of5(sendOperationSuccess({ bcName, cursor: null })), of5(bcForceUpdate({ bcName })), isPopup ? of5(closeViewPopup(null)) : EMPTY4, ...postOperationRoutine(widgetName, postInvoke, preInvoke, OperationTypeCrud5.save, bcName));
1671
1690
  }), catchError2((error) => {
1672
1691
  console.error(error);
1673
1692
  return createApiErrorObservable(error);
@@ -1721,7 +1740,7 @@ var sendOperationAssociateEpic = (action$, state$) => action$.pipe(filter6(sendO
1721
1740
  });
1722
1741
  }));
1723
1742
  // src/epics/view/getRowMetaByForceActiveEpic.ts
1724
- import { EMPTY as EMPTY4, concat as concat5, filter as filter7, mergeMap as mergeMap6, of as of8, catchError as catchError3 } from "rxjs";
1743
+ import { EMPTY as EMPTY5, concat as concat5, filter as filter7, mergeMap as mergeMap6, of as of8, catchError as catchError3 } from "rxjs";
1725
1744
  import { WidgetTypes as WidgetTypes4 } from "@cxbox-ui/schema";
1726
1745
  import { nanoid } from "@reduxjs/toolkit";
1727
1746
  var getRowMetaByForceActiveEpic = (action$, state$, { api }) => action$.pipe(filter7(changeDataItem.match), mergeMap6((action) => {
@@ -1734,7 +1753,7 @@ var getRowMetaByForceActiveEpic = (action$, state$, { api }) => action$.pipe(fil
1734
1753
  return widget.bcName === bcName && widget.type === WidgetTypes4.AssocListPopup && (((_a2 = widget.options) == null ? void 0 : _a2.hierarchySameBc) || ((_b2 = widget.options) == null ? void 0 : _b2.hierarchyFull));
1735
1754
  });
1736
1755
  if (isBcHierarchy) {
1737
- return EMPTY4;
1756
+ return EMPTY5;
1738
1757
  }
1739
1758
  const isPickListPopup = state.view.widgets.find((item) => {
1740
1759
  var _a2;
@@ -1787,10 +1806,10 @@ var getRowMetaByForceActiveEpic = (action$, state$, { api }) => action$.pipe(fil
1787
1806
  cursor,
1788
1807
  dataItem: { [changedFiledKey]: currentRecordData == null ? void 0 : currentRecordData[changedFiledKey] },
1789
1808
  disableRetry: true
1790
- })), of8(forceActiveChangeFail({ bcName, bcUrl, viewError, entityError }))) : EMPTY4, createApiErrorObservable(e));
1809
+ })), of8(forceActiveChangeFail({ bcName, bcUrl, viewError, entityError }))) : EMPTY5, createApiErrorObservable(e));
1791
1810
  })));
1792
1811
  }
1793
- return isPickListPopup ? closePopup : EMPTY4;
1812
+ return isPickListPopup ? closePopup : EMPTY5;
1794
1813
  }));
1795
1814
  // src/epics/view/showAllTableRecordsInitEpic.ts
1796
1815
  import { concat as concat6, filter as filter8, mergeMap as mergeMap7, of as of9 } from "rxjs";
@@ -1807,7 +1826,7 @@ var showAllTableRecordsInitEpic = (action$, state$) => action$.pipe(filter8(show
1807
1826
  return concat6(...resultObservables);
1808
1827
  }));
1809
1828
  // src/epics/view/clearPendingDataChangesAfterCursorChangeEpic.ts
1810
- import { EMPTY as EMPTY5, filter as filter9, mergeMap as mergeMap8, of as of10 } from "rxjs";
1829
+ import { EMPTY as EMPTY6, filter as filter9, mergeMap as mergeMap8, of as of10 } from "rxjs";
1811
1830
  var clearPendingDataChangesAfterCursorChangeEpic = (action$, state$) => action$.pipe(filter9(bcChangeCursors.match), mergeMap8((action) => {
1812
1831
  const state = state$.value;
1813
1832
  const nextCursors = parseBcCursors(state.router.bcPath) || {};
@@ -1822,10 +1841,10 @@ var clearPendingDataChangesAfterCursorChangeEpic = (action$, state$) => action$.
1822
1841
  if (Object.keys(cursorsDiffMap).length) {
1823
1842
  return of10(bcChangeCursors({ cursorsMap: cursorsDiffMap }));
1824
1843
  }
1825
- return EMPTY5;
1844
+ return EMPTY6;
1826
1845
  }));
1827
1846
  // src/epics/router/drilldownEpic.ts
1828
- import { concat as concat7, EMPTY as EMPTY6, filter as filter10, switchMap } from "rxjs";
1847
+ import { concat as concat7, EMPTY as EMPTY7, filter as filter10, switchMap } from "rxjs";
1829
1848
  var drillDownEpic = (action$, state$) => action$.pipe(filter10(drillDown.match), switchMap((action) => {
1830
1849
  var _a, _b;
1831
1850
  const state = state$.value;
@@ -1903,7 +1922,7 @@ var drillDownEpic = (action$, state$) => action$.pipe(filter10(drillDown.match),
1903
1922
  }));
1904
1923
  break;
1905
1924
  }
1906
- return result.length ? concat7(result) : EMPTY6;
1925
+ return result.length ? concat7(result) : EMPTY7;
1907
1926
  }));
1908
1927
  function shallowCompare(prevProps, nextProps, ignore = []) {
1909
1928
  const diffProps = [];
@@ -1942,7 +1961,7 @@ var loginDoneEpic = (action$, state$) => action$.pipe(filter11(loginDone.match),
1942
1961
  }));
1943
1962
  }));
1944
1963
  // src/epics/router/selectViewEpic.ts
1945
- import { EMPTY as EMPTY7, filter as filter12, of as of12, switchMap as switchMap3 } from "rxjs";
1964
+ import { EMPTY as EMPTY8, filter as filter12, of as of12, switchMap as switchMap3 } from "rxjs";
1946
1965
  var changeViewEpic = (action$, state$) => action$.pipe(filter12(selectView.match), switchMap3((action) => {
1947
1966
  const state = state$.value;
1948
1967
  const nextCursors = parseBcCursors(state.router.bcPath) || {};
@@ -1957,15 +1976,15 @@ var changeViewEpic = (action$, state$) => action$.pipe(filter12(selectView.match
1957
1976
  if (Object.keys(cursorsDiffMap).length) {
1958
1977
  return of12(bcChangeCursors({ cursorsMap: cursorsDiffMap }));
1959
1978
  }
1960
- return EMPTY7;
1979
+ return EMPTY8;
1961
1980
  }));
1962
1981
  // src/epics/router/handleRouterEpic.ts
1963
- import { catchError as catchError4, EMPTY as EMPTY8, filter as filter13, mergeMap as mergeMap9, switchMap as switchMap4 } from "rxjs";
1982
+ import { catchError as catchError4, EMPTY as EMPTY9, filter as filter13, mergeMap as mergeMap9, switchMap as switchMap4 } from "rxjs";
1964
1983
  var handleRouterEpic = (action$, state$, { api }) => action$.pipe(filter13(handleRouter.match), switchMap4((action) => {
1965
1984
  const path = action.payload.path;
1966
1985
  const params = action.payload.params;
1967
1986
  return api.routerRequest(path, params).pipe(mergeMap9(() => {
1968
- return EMPTY8;
1987
+ return EMPTY9;
1969
1988
  }), catchError4((error) => {
1970
1989
  console.error(error);
1971
1990
  return createApiErrorObservable(error);
@@ -1982,7 +2001,7 @@ var changeScreen = (action$, state$) => action$.pipe(filter14(selectScreen.match
1982
2001
  return nextView ? of13(selectView(nextView)) : of13(selectViewFail({ viewName: nextViewName }));
1983
2002
  }));
1984
2003
  // src/epics/router/userDrillDownEpic.ts
1985
- import { catchError as catchError5, concat as concat8, EMPTY as EMPTY9, filter as filter15, mergeMap as mergeMap10, of as of14, switchMap as switchMap6 } from "rxjs";
2004
+ import { catchError as catchError5, concat as concat8, EMPTY as EMPTY10, filter as filter15, mergeMap as mergeMap10, of as of14, switchMap as switchMap6 } from "rxjs";
1986
2005
  var userDrillDownEpic = (action$, state$, { api }) => action$.pipe(filter15(userDrillDown.match), switchMap6((action) => {
1987
2006
  const state = state$.value;
1988
2007
  const { bcName, fieldKey, cursor } = action.payload;
@@ -1993,23 +2012,23 @@ var userDrillDownEpic = (action$, state$, { api }) => action$.pipe(filter15(user
1993
2012
  const route = state.router;
1994
2013
  const drillDownKey = (_b = (_a = state.view.widgets.find((widget) => widget.bcName === bcName)) == null ? void 0 : _a.fields.find((field) => field.key === fieldKey)) == null ? void 0 : _b.drillDownKey;
1995
2014
  const customDrillDownUrl = (_d = (_c = state.data[bcName]) == null ? void 0 : _c.find((record) => record.id === cursor)) == null ? void 0 : _d[drillDownKey];
1996
- return customDrillDownUrl || (drillDownField == null ? void 0 : drillDownField.drillDown) || (drillDownField == null ? void 0 : drillDownField.drillDown) !== route.path ? concat8((drillDownField == null ? void 0 : drillDownField.drillDownType) !== DrillDownType.inner ? of14(bcFetchRowMetaSuccess({ bcName, rowMeta, bcUrl, cursor })) : EMPTY9, of14(userDrillDownSuccess({ bcName, bcUrl, cursor })), of14(drillDown({
2015
+ return customDrillDownUrl || (drillDownField == null ? void 0 : drillDownField.drillDown) || (drillDownField == null ? void 0 : drillDownField.drillDown) !== route.path ? concat8((drillDownField == null ? void 0 : drillDownField.drillDownType) !== DrillDownType.inner ? of14(bcFetchRowMetaSuccess({ bcName, rowMeta, bcUrl, cursor })) : EMPTY10, of14(userDrillDownSuccess({ bcName, bcUrl, cursor })), of14(drillDown({
1997
2016
  url: customDrillDownUrl || drillDownField.drillDown,
1998
2017
  drillDownType: drillDownField.drillDownType,
1999
2018
  route
2000
- }))) : EMPTY9;
2019
+ }))) : EMPTY10;
2001
2020
  }), catchError5((error) => {
2002
2021
  console.error(error);
2003
2022
  return createApiErrorObservable(error);
2004
2023
  }));
2005
2024
  }));
2006
2025
  // src/epics/router/changeLocationEpic.ts
2007
- import { concat as concat9, EMPTY as EMPTY10, filter as filter16, mergeMap as mergeMap11, of as of15 } from "rxjs";
2026
+ import { concat as concat9, EMPTY as EMPTY11, filter as filter16, mergeMap as mergeMap11, of as of15 } from "rxjs";
2008
2027
  var changeLocationEpic = (action$, state$) => action$.pipe(filter16(changeLocation.match), mergeMap11((action) => {
2009
2028
  var _a, _b;
2010
2029
  const state = state$.value;
2011
2030
  if (!state.session.active) {
2012
- return EMPTY10;
2031
+ return EMPTY11;
2013
2032
  }
2014
2033
  if (state.router.type === "router" /* router */) {
2015
2034
  return of15(handleRouter(state.router));
@@ -2092,7 +2111,7 @@ var userDrillDownChangeCursorsEpic = (action$, state$) => action$.pipe(filter19(
2092
2111
  }));
2093
2112
  // src/epics/screen/apiErrorEpic.ts
2094
2113
  import axios from "axios";
2095
- import { EMPTY as EMPTY11, filter as filter20, mergeMap as mergeMap12, of as of16 } from "rxjs";
2114
+ import { EMPTY as EMPTY12, filter as filter20, mergeMap as mergeMap12, of as of16 } from "rxjs";
2096
2115
  var apiErrorEpic = (action$) => action$.pipe(filter20(apiError.match), mergeMap12((action) => {
2097
2116
  const { error, callContext } = action.payload;
2098
2117
  if (error.response) {
@@ -2109,10 +2128,10 @@ var apiErrorEpic = (action$) => action$.pipe(filter20(apiError.match), mergeMap1
2109
2128
  }
2110
2129
  }));
2111
2130
  }
2112
- return EMPTY11;
2131
+ return EMPTY12;
2113
2132
  }));
2114
2133
  // src/epics/screen/downloadFileEpic.ts
2115
- import { EMPTY as EMPTY12, filter as filter21, mergeMap as mergeMap13, tap } from "rxjs";
2134
+ import { EMPTY as EMPTY13, filter as filter21, mergeMap as mergeMap13, tap } from "rxjs";
2116
2135
  var downloadFileEpic = (action$, state$, { api }) => action$.pipe(filter21(downloadFile.match), tap((action) => {
2117
2136
  const { fileId } = action.payload;
2118
2137
  const anchor = document.createElement("a");
@@ -2123,7 +2142,7 @@ var downloadFileEpic = (action$, state$, { api }) => action$.pipe(filter21(downl
2123
2142
  anchor.click();
2124
2143
  document.body.removeChild(anchor);
2125
2144
  }, 100);
2126
- }), mergeMap13(() => EMPTY12));
2145
+ }), mergeMap13(() => EMPTY13));
2127
2146
  // src/epics/screen/httpError401Epic.ts
2128
2147
  import { filter as filter22, map as map5 } from "rxjs";
2129
2148
  var httpError401Epic = (action$) => action$.pipe(filter22(httpError.match), filter22((action) => action.payload.statusCode === 401), map5((action) => {
@@ -2147,14 +2166,14 @@ var httpError409Epic = (action$, state$) => action$.pipe(filter23(httpError.matc
2147
2166
  });
2148
2167
  }));
2149
2168
  // src/epics/screen/httpError418Epic.ts
2150
- import { concat as concat10, EMPTY as EMPTY13, filter as filter24, mergeMap as mergeMap14, of as of17 } from "rxjs";
2169
+ import { concat as concat10, EMPTY as EMPTY14, filter as filter24, mergeMap as mergeMap14, of as of17 } from "rxjs";
2151
2170
  var httpError418Epic = (action$, state$) => action$.pipe(filter24(httpError.match), filter24((action) => action.payload.statusCode === 418), mergeMap14((action) => {
2152
2171
  var _a, _b;
2153
2172
  const { error, callContext } = action.payload;
2154
2173
  const result = [];
2155
2174
  const typedError = (_a = error.response) == null ? void 0 : _a.data;
2156
2175
  if (!typedError.error.popup) {
2157
- return EMPTY13;
2176
+ return EMPTY14;
2158
2177
  }
2159
2178
  const businessError = {
2160
2179
  type: 0 /* BusinessError */,
@@ -2196,7 +2215,7 @@ var httpErrorDefaultEpic = (action$, state$) => action$.pipe(filter26(httpError.
2196
2215
  return showViewError({ error: businessError });
2197
2216
  }));
2198
2217
  // src/epics/screen/downloadFileByUrlEpic.ts
2199
- import { EMPTY as EMPTY14, filter as filter27, mergeMap as mergeMap15, tap as tap2 } from "rxjs";
2218
+ import { EMPTY as EMPTY15, filter as filter27, mergeMap as mergeMap15, tap as tap2 } from "rxjs";
2200
2219
  var downloadFileByUrlEpic = (action$, state$) => action$.pipe(filter27(downloadFileByUrl.match), tap2((action) => {
2201
2220
  const { url } = action.payload;
2202
2221
  const anchor = document.createElement("a");
@@ -2207,9 +2226,9 @@ var downloadFileByUrlEpic = (action$, state$) => action$.pipe(filter27(downloadF
2207
2226
  anchor.click();
2208
2227
  document.body.removeChild(anchor);
2209
2228
  }, 100);
2210
- }), mergeMap15(() => EMPTY14));
2229
+ }), mergeMap15(() => EMPTY15));
2211
2230
  // src/epics/screen/processPostInvokeEpic.ts
2212
- import { EMPTY as EMPTY15, filter as filter28, mergeMap as mergeMap16, of as of18 } from "rxjs";
2231
+ import { EMPTY as EMPTY16, filter as filter28, mergeMap as mergeMap16, of as of18 } from "rxjs";
2213
2232
  var processPostInvokeEpic = (action$, state$) => action$.pipe(filter28(processPostInvoke.match), mergeMap16((action) => {
2214
2233
  var _a;
2215
2234
  const state = state$.value;
@@ -2266,11 +2285,11 @@ var processPostInvokeEpic = (action$, state$) => action$.pipe(filter28(processPo
2266
2285
  return of18(downloadFileByUrl({ url: postInvoke.url }));
2267
2286
  }
2268
2287
  default:
2269
- return EMPTY15;
2288
+ return EMPTY16;
2270
2289
  }
2271
2290
  }));
2272
2291
  // src/epics/screen/processPostInvokeConfirmEpic.ts
2273
- import { EMPTY as EMPTY16, filter as filter29, mergeMap as mergeMap17, of as of19 } from "rxjs";
2292
+ import { EMPTY as EMPTY17, filter as filter29, mergeMap as mergeMap17, of as of19 } from "rxjs";
2274
2293
  import { isAnyOf } from "@reduxjs/toolkit";
2275
2294
  var processPostInvokeConfirmEpic = (action$, state$) => action$.pipe(filter29(isAnyOf(processPostInvokeConfirm, processPreInvoke)), mergeMap17((action) => {
2276
2295
  const { bcName, operationType, widgetName } = action.payload;
@@ -2290,7 +2309,7 @@ var processPostInvokeConfirmEpic = (action$, state$) => action$.pipe(filter29(is
2290
2309
  }));
2291
2310
  }
2292
2311
  default:
2293
- return EMPTY16;
2312
+ return EMPTY17;
2294
2313
  }
2295
2314
  }));
2296
2315
  // src/epics/session/switchRoleEpic.ts
@@ -2306,8 +2325,8 @@ var refreshMetaEpic = (action$, state$, { api }) => action$.pipe(filter31(refres
2306
2325
  return api.refreshMeta().pipe(switchMap8(() => concat12([refreshMetaDone(), logoutDone(null), login({ login: "", password: "", role: activeRole })])), catchError6((error) => concat12([loginFail(error), refreshMetaFail(), createApiError(error)])));
2307
2326
  }));
2308
2327
  // src/epics/session/loginDoneEpic.ts
2309
- import { EMPTY as EMPTY17, filter as filter32, switchMap as switchMap9 } from "rxjs";
2310
- var loginDoneSessionEpic = (action$, store) => action$.pipe(filter32(login.match), switchMap9((action) => EMPTY17));
2328
+ import { EMPTY as EMPTY18, filter as filter32, switchMap as switchMap9 } from "rxjs";
2329
+ var loginDoneSessionEpic = (action$, store) => action$.pipe(filter32(login.match), switchMap9((action) => EMPTY18));
2311
2330
  // src/epics/session/loginByAnotherRoleEpic.ts
2312
2331
  import { catchError as catchError7, concat as concat13, filter as filter33, mergeMap as mergeMap19, of as of20, switchMap as switchMap10 } from "rxjs";
2313
2332
  var responseStatusMessages = {
@@ -2350,10 +2369,10 @@ var loginByAnotherRoleEpic = (action$, state$, { api }) => action$.pipe(filter33
2350
2369
  }));
2351
2370
  }));
2352
2371
  // src/epics/session/refreshMetaAndReloadPageEpic.ts
2353
- import { concat as concat14, EMPTY as EMPTY18, filter as filter34, of as of21, switchMap as switchMap11, take, tap as tap3 } from "rxjs";
2354
- var refreshMetaAndReloadPageEpic = (action$, state$) => action$.pipe(filter34(refreshMetaAndReloadPage.match), switchMap11(() => concat14(of21(refreshMeta()), action$.pipe(filter34(loginDone.match), take(1), tap3(() => location.reload()), switchMap11(() => EMPTY18)))));
2372
+ import { concat as concat14, EMPTY as EMPTY19, filter as filter34, of as of21, switchMap as switchMap11, take, tap as tap3 } from "rxjs";
2373
+ var refreshMetaAndReloadPageEpic = (action$, state$) => action$.pipe(filter34(refreshMetaAndReloadPage.match), switchMap11(() => concat14(of21(refreshMeta()), action$.pipe(filter34(loginDone.match), take(1), tap3(() => location.reload()), switchMap11(() => EMPTY19)))));
2355
2374
  // src/epics/data/bcNewDataEpic.ts
2356
- import { catchError as catchError8, concat as concat15, EMPTY as EMPTY19, filter as filter35, mergeMap as mergeMap20, of as of22 } from "rxjs";
2375
+ import { catchError as catchError8, concat as concat15, EMPTY as EMPTY20, filter as filter35, mergeMap as mergeMap20, of as of22 } from "rxjs";
2357
2376
  import { OperationTypeCrud as OperationTypeCrud8 } from "@cxbox-ui/schema";
2358
2377
  var bcNewDataEpic = (action$, state$, { api }) => action$.pipe(filter35(sendOperation.match), filter35((action) => matchOperationRole(OperationTypeCrud8.create, action.payload, state$.value)), mergeMap20((action) => {
2359
2378
  var _a;
@@ -2378,7 +2397,7 @@ var bcNewDataEpic = (action$, state$, { api }) => action$.pipe(filter35(sendOper
2378
2397
  dataItem: {
2379
2398
  id: cursor
2380
2399
  }
2381
- })), postInvoke ? of22(processPostInvoke({ bcName, postInvoke, cursor, widgetName: action.payload.widgetName })) : EMPTY19);
2400
+ })), postInvoke ? of22(processPostInvoke({ bcName, postInvoke, cursor, widgetName: action.payload.widgetName })) : EMPTY20);
2382
2401
  }), catchError8((error) => {
2383
2402
  console.error(error);
2384
2403
  return concat15(of22(bcNewDataFail({ bcName })), createApiErrorObservable(error, context));
@@ -2433,7 +2452,7 @@ var bcLoadMoreEpic = (action$, state$, { api }) => action$.pipe(filter37(bcLoadM
2433
2452
  return race(cancelFlow, normalFlow);
2434
2453
  }));
2435
2454
  // src/epics/data/bcSaveDataEpic.ts
2436
- import { catchError as catchError10, concat as concat17, EMPTY as EMPTY20, filter as filter38, mergeMap as mergeMap23, of as of25 } from "rxjs";
2455
+ import { catchError as catchError10, concat as concat17, EMPTY as EMPTY21, filter as filter38, mergeMap as mergeMap23, of as of25 } from "rxjs";
2437
2456
  var bcSaveDataEpic = (action$, state$, { api }) => action$.pipe(filter38(sendOperation.match), filter38((action) => matchOperationRole(OperationTypeCrud.save, action.payload, state$.value)), mergeMap23((action) => {
2438
2457
  var _a, _b, _c, _d;
2439
2458
  const state = state$.value;
@@ -2467,11 +2486,11 @@ var bcSaveDataEpic = (action$, state$, { api }) => action$.pipe(filter38(sendOpe
2467
2486
  widgetName,
2468
2487
  postInvoke,
2469
2488
  cursor: responseDataItem.id
2470
- })) : EMPTY20, action.payload.onSuccessAction ? of25(action.payload.onSuccessAction) : EMPTY20);
2489
+ })) : EMPTY21, action.payload.onSuccessAction ? of25(action.payload.onSuccessAction) : EMPTY21);
2471
2490
  }), catchError10((e) => {
2472
2491
  var _a2, _b2, _c2, _d2, _e, _f, _g, _h;
2473
2492
  console.error(e);
2474
- let notification$ = EMPTY20;
2493
+ let notification$ = EMPTY21;
2475
2494
  if (action.payload.onSuccessAction && !(options == null ? void 0 : options.disableNotification)) {
2476
2495
  notification$ = of25(addNotification({
2477
2496
  key: "data_autosave_undo",
@@ -2497,7 +2516,7 @@ var bcSaveDataEpic = (action$, state$, { api }) => action$.pipe(filter38(sendOpe
2497
2516
  }));
2498
2517
  }));
2499
2518
  // src/epics/data/selectViewEpic.ts
2500
- import { EMPTY as EMPTY21, filter as filter39, mergeMap as mergeMap24 } from "rxjs";
2519
+ import { EMPTY as EMPTY22, filter as filter39, mergeMap as mergeMap24 } from "rxjs";
2501
2520
  var selectViewEpic = (action$, state$) => action$.pipe(filter39(selectView.match), mergeMap24((action) => {
2502
2521
  try {
2503
2522
  const state = state$.value;
@@ -2522,11 +2541,11 @@ var selectViewEpic = (action$, state$) => action$.pipe(filter39(selectView.match
2522
2541
  }
2523
2542
  catch (e) {
2524
2543
  console.error(`selectView Epic:: ${e}`);
2525
- return EMPTY21;
2544
+ return EMPTY22;
2526
2545
  }
2527
2546
  }));
2528
2547
  // src/epics/data/bcFetchDataEpic.ts
2529
- import { catchError as catchError11, concat as concat18, EMPTY as EMPTY22, filter as filter40, mergeMap as mergeMap25, of as of26, race as race2 } from "rxjs";
2548
+ import { catchError as catchError11, concat as concat18, EMPTY as EMPTY23, filter as filter40, mergeMap as mergeMap25, of as of26, race as race2 } from "rxjs";
2530
2549
  import { WidgetTypes as WidgetTypes5 } from "@cxbox-ui/schema";
2531
2550
  import { isAnyOf as isAnyOf3 } from "@reduxjs/toolkit";
2532
2551
  var bcFetchDataEpic = (action$, state$, { api }) => action$.pipe(filter40(isAnyOf3(bcFetchDataRequest, bcFetchDataPages, showViewPopup, bcForceUpdate, bcChangePage)), mergeMap25((action) => {
@@ -2573,7 +2592,7 @@ var bcFetchDataEpic = (action$, state$, { api }) => action$.pipe(filter40(isAnyO
2573
2592
  const { widgets, infiniteWidgets } = state.view;
2574
2593
  const widget = (_a = widgets == null ? void 0 : widgets.find((item) => item.name === widgetName)) != null ? _a : widgets == null ? void 0 : widgets.find((item) => item.bcName === action.payload.bcName);
2575
2594
  if (!widget) {
2576
- return [EMPTY22];
2595
+ return [EMPTY23];
2577
2596
  }
2578
2597
  const bcName = action.payload.bcName;
2579
2598
  const bc = state.screen.bo.bc[bcName];
@@ -2581,7 +2600,7 @@ var bcFetchDataEpic = (action$, state$, { api }) => action$.pipe(filter40(isAnyO
2581
2600
  const limit = (_c = ((_b = widgets == null ? void 0 : widgets.find((i) => i.bcName === bcName)) == null ? void 0 : _b.limit) || bc.limit) != null ? _c : 5;
2582
2601
  const sorters = state.screen.sorters[bcName];
2583
2602
  if (showViewPopup.match(action) && bcName === action.payload.calleeBCName) {
2584
- return [EMPTY22];
2603
+ return [EMPTY23];
2585
2604
  }
2586
2605
  const anyHierarchyWidget = widgets == null ? void 0 : widgets.find((item) => {
2587
2606
  return item.bcName === widget.bcName && item.type === WidgetTypes5.AssocListPopup && isHierarchyWidget(item);
@@ -2642,9 +2661,9 @@ var bcFetchDataEpic = (action$, state$, { api }) => action$.pipe(filter40(isAnyO
2642
2661
  const lazyWidget = (!isWidgetVisible(widget) || PopupWidgetTypes.includes(widget.type)) && !parentOfNotLazyWidget;
2643
2662
  const skipLazy = ((_a2 = state.view.popupData) == null ? void 0 : _a2.bcName) !== widget.bcName;
2644
2663
  if (lazyWidget && skipLazy) {
2645
- return EMPTY22;
2664
+ return EMPTY23;
2646
2665
  }
2647
- const fetchChildren = ((_b2 = response.data) == null ? void 0 : _b2.length) ? getChildrenData(widgets, state.screen.bo.bc, !!anyHierarchyWidget, isWidgetVisible) : EMPTY22;
2666
+ const fetchChildren = ((_b2 = response.data) == null ? void 0 : _b2.length) ? getChildrenData(widgets, state.screen.bo.bc, !!anyHierarchyWidget, isWidgetVisible) : EMPTY23;
2648
2667
  const fetchRowMeta = of26(bcFetchRowMeta({ widgetName, bcName }));
2649
2668
  return concat18(cursorChange, of26(bcFetchDataSuccess({
2650
2669
  bcName,
@@ -2665,7 +2684,7 @@ function isHierarchyWidget(widget) {
2665
2684
  return ((_a = widget.options) == null ? void 0 : _a.hierarchy) || ((_b = widget.options) == null ? void 0 : _b.hierarchyFull);
2666
2685
  }
2667
2686
  // src/epics/data/bcDeleteDataEpic.ts
2668
- import { catchError as catchError12, concat as concat19, EMPTY as EMPTY23, filter as filter41, mergeMap as mergeMap26, of as of27 } from "rxjs";
2687
+ import { catchError as catchError12, concat as concat19, EMPTY as EMPTY24, filter as filter41, mergeMap as mergeMap26, of as of27 } from "rxjs";
2669
2688
  import { OperationTypeCrud as OperationTypeCrud9 } from "@cxbox-ui/schema";
2670
2689
  var bcDeleteDataEpic = (action$, store$, { api }) => action$.pipe(filter41(sendOperation.match), filter41((action) => matchOperationRole(OperationTypeCrud9.delete, action.payload, store$.value)), mergeMap26((action) => {
2671
2690
  const widgetName = action.payload.widgetName;
@@ -2678,7 +2697,7 @@ var bcDeleteDataEpic = (action$, store$, { api }) => action$.pipe(filter41(sendO
2678
2697
  return api.deleteBcData(state.screen.screenName, bcUrl, context).pipe(mergeMap26((data) => {
2679
2698
  var _a;
2680
2699
  const postInvoke = (_a = data.postActions) == null ? void 0 : _a[0];
2681
- return concat19(isTargetFormatPVF ? of27(bcCancelPendingChanges({ bcNames: [bcName] })) : EMPTY23, of27(bcFetchDataRequest({ bcName, widgetName })), postInvoke ? of27(processPostInvoke({ bcName, postInvoke, cursor, widgetName })) : EMPTY23);
2700
+ return concat19(isTargetFormatPVF ? of27(bcCancelPendingChanges({ bcNames: [bcName] })) : EMPTY24, of27(bcFetchDataRequest({ bcName, widgetName })), postInvoke ? of27(processPostInvoke({ bcName, postInvoke, cursor, widgetName })) : EMPTY24);
2682
2701
  }), catchError12((error) => {
2683
2702
  console.error(error);
2684
2703
  return concat19(of27(bcDeleteDataFail({ bcName })), createApiErrorObservable(error, context));
@@ -2775,7 +2794,7 @@ var changeAssociationEpic = (action$, state$) => action$.pipe(filter43(changeAss
2775
2794
  return concat21(...result);
2776
2795
  }));
2777
2796
  // src/epics/data/bcCancelCreateDataEpic.ts
2778
- import { catchError as catchError13, concat as concat22, EMPTY as EMPTY24, filter as filter44, mergeMap as mergeMap29, of as of30 } from "rxjs";
2797
+ import { catchError as catchError13, concat as concat22, EMPTY as EMPTY25, filter as filter44, mergeMap as mergeMap29, of as of30 } from "rxjs";
2779
2798
  import { OperationTypeCrud as OperationTypeCrud10 } from "@cxbox-ui/schema";
2780
2799
  import { isAnyOf as isAnyOf4 } from "@reduxjs/toolkit";
2781
2800
  var actionTypesMatcher = isAnyOf4(sendOperation);
@@ -2796,7 +2815,7 @@ var bcCancelCreateDataEpic = (action$, state$, { api }) => action$.pipe(filter44
2796
2815
  return api.customAction(screenName, bcUrl, data, context, params).pipe(mergeMap29((response) => {
2797
2816
  var _a2;
2798
2817
  const postInvoke = (_a2 = response.postActions) == null ? void 0 : _a2[0];
2799
- return concat22(of30(sendOperationSuccess({ bcName, cursor })), of30(bcChangeCursors({ cursorsMap })), postInvoke ? of30(processPostInvoke({ bcName, postInvoke, cursor, widgetName: context.widgetName })) : EMPTY24);
2818
+ return concat22(of30(sendOperationSuccess({ bcName, cursor })), of30(bcChangeCursors({ cursorsMap })), postInvoke ? of30(processPostInvoke({ bcName, postInvoke, cursor, widgetName: context.widgetName })) : EMPTY25);
2800
2819
  }), catchError13((error) => {
2801
2820
  console.error(error);
2802
2821
  return concat22(of30(bcDeleteDataFail({ bcName })), createApiErrorObservable(error, context));
@@ -3014,7 +3033,7 @@ var changeAssociationFullEpic = (action$, state$) => action$.pipe(filter48(chang
3014
3033
  return concat26(...result);
3015
3034
  }));
3016
3035
  // src/epics/data/saveAssociationsActiveEpic.ts
3017
- import { catchError as catchError15, concat as concat27, EMPTY as EMPTY25, filter as filter49, mergeMap as mergeMap34, of as of35, switchMap as switchMap12 } from "rxjs";
3036
+ import { catchError as catchError15, concat as concat27, EMPTY as EMPTY26, filter as filter49, mergeMap as mergeMap34, of as of35, switchMap as switchMap12 } from "rxjs";
3018
3037
  var saveAssociationsActiveEpic = (action$, state$, { api }) => action$.pipe(filter49(saveAssociations.match), filter49((action) => {
3019
3038
  var _a;
3020
3039
  return (_a = state$.value.view.popupData) == null ? void 0 : _a.active;
@@ -3030,10 +3049,10 @@ var saveAssociationsActiveEpic = (action$, state$, { api }) => action$.pipe(filt
3030
3049
  return api.associate(state.screen.screenName, bcUrl, Object.values(pendingChanges).filter((i) => i._associate), params).pipe(mergeMap34((response) => {
3031
3050
  const postInvoke = response.postActions[0];
3032
3051
  const calleeWidget = state.view.widgets.find((widgetItem) => widgetItem.bcName === calleeBCName);
3033
- return concat27(postInvoke ? of35(processPostInvoke({ bcName: calleeBCName, postInvoke, widgetName: calleeWidget == null ? void 0 : calleeWidget.name })) : EMPTY25, of35(bcCancelPendingChanges({ bcNames })), of35(bcForceUpdate({ bcName: calleeBCName, widgetName: calleeWidgetName })));
3052
+ return concat27(postInvoke ? of35(processPostInvoke({ bcName: calleeBCName, postInvoke, widgetName: calleeWidget == null ? void 0 : calleeWidget.name })) : EMPTY26, of35(bcCancelPendingChanges({ bcNames })), of35(bcForceUpdate({ bcName: calleeBCName, widgetName: calleeWidgetName })));
3034
3053
  }), catchError15((err) => {
3035
3054
  console.error(err);
3036
- return EMPTY25;
3055
+ return EMPTY26;
3037
3056
  }));
3038
3057
  }));
3039
3058
  // src/epics/data/changeAssociationSameBcEpic.ts
@@ -3239,7 +3258,7 @@ var ObservableApiWrapper = class {
3239
3258
  };
3240
3259
  // src/api/ObservableApi.ts
3241
3260
  import axios3 from "axios";
3242
- import { EMPTY as EMPTY26, expand, map as map11, reduce } from "rxjs";
3261
+ import { EMPTY as EMPTY27, expand, map as map11, reduce } from "rxjs";
3243
3262
  var Api = class {
3244
3263
  constructor(instance) {
3245
3264
  __publicField(this, "api$");
@@ -3260,7 +3279,7 @@ var Api = class {
3260
3279
  fetchBcDataAll(screenName, bcUrl, params = {}) {
3261
3280
  let currentPage = 1;
3262
3281
  return this.fetchBcData(screenName, bcUrl, __spreadProps(__spreadValues({}, params), { _page: currentPage })).pipe(expand((response) => {
3263
- return response.hasNext ? this.fetchBcData(screenName, bcUrl, __spreadProps(__spreadValues({}, params), { _page: ++currentPage })) : EMPTY26;
3282
+ return response.hasNext ? this.fetchBcData(screenName, bcUrl, __spreadProps(__spreadValues({}, params), { _page: ++currentPage })) : EMPTY27;
3264
3283
  }), reduce((items, nextResponse) => {
3265
3284
  return [...items, ...nextResponse.data];
3266
3285
  }, []));