mozrest-sdk-react-dev 0.1.94 → 0.1.97
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/mozrest-sdk.es.js +249 -202
- package/package.json +1 -2
package/mozrest-sdk.es.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _a2;
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import React__default, { createContext, useContext, useRef, useCallback, useDebugValue, useEffect, useLayoutEffect as useLayoutEffect$1, useState, useMemo as useMemo$1, createElement as createElement$1, Component, forwardRef, useImperativeHandle, Children, useReducer, Fragment, isValidElement as isValidElement$1, PureComponent, cloneElement as cloneElement$1 } from "react";
|
|
4
3
|
import * as ReactDOM from "react-dom";
|
|
@@ -277,7 +276,7 @@ var broadcastState = function(cache2, key2, data2, error3, isValidating, revalid
|
|
|
277
276
|
if (broadcast === void 0) {
|
|
278
277
|
broadcast = true;
|
|
279
278
|
}
|
|
280
|
-
var
|
|
279
|
+
var _a2 = SWRGlobalState.get(cache2), EVENT_REVALIDATORS = _a2[0], STATE_UPDATERS = _a2[1], FETCH = _a2[3];
|
|
281
280
|
var revalidators = EVENT_REVALIDATORS[key2];
|
|
282
281
|
var updaters = STATE_UPDATERS[key2];
|
|
283
282
|
if (broadcast && updaters) {
|
|
@@ -305,7 +304,7 @@ var internalMutate = function() {
|
|
|
305
304
|
args[_i] = arguments[_i];
|
|
306
305
|
}
|
|
307
306
|
return __awaiter$2(void 0, void 0, void 0, function() {
|
|
308
|
-
var cache2, _key, _data, _opts, options2, populateCache, revalidate, rollbackOnError, customOptimisticData,
|
|
307
|
+
var cache2, _key, _data, _opts, options2, populateCache, revalidate, rollbackOnError, customOptimisticData, _a2, key2, keyInfo, _b, MUTATION, data2, error3, beforeMutationTs, hasCustomOptimisticData, rollbackData, optimisticData, res;
|
|
309
308
|
return __generator$2(this, function(_c) {
|
|
310
309
|
switch (_c.label) {
|
|
311
310
|
case 0:
|
|
@@ -315,7 +314,7 @@ var internalMutate = function() {
|
|
|
315
314
|
revalidate = options2.revalidate !== false;
|
|
316
315
|
rollbackOnError = options2.rollbackOnError !== false;
|
|
317
316
|
customOptimisticData = options2.optimisticData;
|
|
318
|
-
|
|
317
|
+
_a2 = serialize$2(_key), key2 = _a2[0], keyInfo = _a2[2];
|
|
319
318
|
if (!key2)
|
|
320
319
|
return [2];
|
|
321
320
|
_b = SWRGlobalState.get(cache2), MUTATION = _b[2];
|
|
@@ -500,7 +499,7 @@ var withArgs = function(hook) {
|
|
|
500
499
|
args[_i] = arguments[_i];
|
|
501
500
|
}
|
|
502
501
|
var fallbackConfig = useSWRConfig();
|
|
503
|
-
var
|
|
502
|
+
var _a2 = normalize$5(args), key2 = _a2[0], fn = _a2[1], _config = _a2[2];
|
|
504
503
|
var config2 = mergeConfigs$1(fallbackConfig, _config);
|
|
505
504
|
var next2 = hook;
|
|
506
505
|
var use2 = config2.use;
|
|
@@ -526,7 +525,7 @@ var subscribeCallback = function(key2, callbacks, callback) {
|
|
|
526
525
|
var WITH_DEDUPE = { dedupe: true };
|
|
527
526
|
var useSWRHandler = function(_key, fetcher, config2) {
|
|
528
527
|
var cache2 = config2.cache, compare2 = config2.compare, fallbackData = config2.fallbackData, suspense = config2.suspense, revalidateOnMount = config2.revalidateOnMount, refreshInterval = config2.refreshInterval, refreshWhenHidden = config2.refreshWhenHidden, refreshWhenOffline = config2.refreshWhenOffline;
|
|
529
|
-
var
|
|
528
|
+
var _a2 = SWRGlobalState.get(cache2), EVENT_REVALIDATORS = _a2[0], STATE_UPDATERS = _a2[1], MUTATION = _a2[2], FETCH = _a2[3];
|
|
530
529
|
var _b = serialize$2(_key), key2 = _b[0], fnArgs = _b[1], keyInfo = _b[2];
|
|
531
530
|
var initialMountedRef = useRef(false);
|
|
532
531
|
var unmountedRef = useRef(false);
|
|
@@ -573,7 +572,7 @@ var useSWRHandler = function(_key, fetcher, config2) {
|
|
|
573
572
|
var revalidate = useCallback(function(revalidateOpts) {
|
|
574
573
|
return __awaiter$2(void 0, void 0, void 0, function() {
|
|
575
574
|
var currentFetcher, newData, startAt, loading, opts, shouldStartNewRequest, isCurrentKeyMounted, cleanupState, newState, finishRequestAndUpdateState, mutationInfo, err_1;
|
|
576
|
-
var
|
|
575
|
+
var _a3;
|
|
577
576
|
return __generator$2(this, function(_b2) {
|
|
578
577
|
switch (_b2.label) {
|
|
579
578
|
case 0:
|
|
@@ -618,7 +617,7 @@ var useSWRHandler = function(_key, fetcher, config2) {
|
|
|
618
617
|
}
|
|
619
618
|
FETCH[key2] = [currentFetcher.apply(void 0, fnArgs), getTimestamp()];
|
|
620
619
|
}
|
|
621
|
-
|
|
620
|
+
_a3 = FETCH[key2], newData = _a3[0], startAt = _a3[1];
|
|
622
621
|
return [4, newData];
|
|
623
622
|
case 2:
|
|
624
623
|
newData = _b2.sent();
|
|
@@ -2092,7 +2091,7 @@ instance$1.interceptors.request.use((config2) => {
|
|
|
2092
2091
|
instance$1.interceptors.response.use(function(response) {
|
|
2093
2092
|
return response.data;
|
|
2094
2093
|
}, async function(error3) {
|
|
2095
|
-
var
|
|
2094
|
+
var _a2;
|
|
2096
2095
|
const originalRequest = error3.config;
|
|
2097
2096
|
if (error3.response.status === 401 && !originalRequest._retry && sessionStorage.getItem("sdk_refreshToken")) {
|
|
2098
2097
|
originalRequest._retry = true;
|
|
@@ -2101,7 +2100,7 @@ instance$1.interceptors.response.use(function(response) {
|
|
|
2101
2100
|
return instance$1(originalRequest);
|
|
2102
2101
|
}
|
|
2103
2102
|
return Promise.reject({
|
|
2104
|
-
message: ((
|
|
2103
|
+
message: ((_a2 = error3.response.data) == null ? void 0 : _a2.message) || "Oops an error occurred!",
|
|
2105
2104
|
status: error3.response.status
|
|
2106
2105
|
});
|
|
2107
2106
|
});
|
|
@@ -6348,6 +6347,9 @@ const EXPORTDATA = "Export data";
|
|
|
6348
6347
|
const SELECTYOURRESTAURANTS = "Select your restaurants";
|
|
6349
6348
|
const SelectXResturant = "Select {{value}} restaurant";
|
|
6350
6349
|
const ComparedPeriod = "Compared period";
|
|
6350
|
+
const CLOSE = "Close";
|
|
6351
|
+
const NoChannelsConnected = "No channels connected";
|
|
6352
|
+
const NoChannelsConnectedDesc = "You do not have channels connected, as soon as you connect them the changes will be reflected in the channels.";
|
|
6351
6353
|
var en = {
|
|
6352
6354
|
errors,
|
|
6353
6355
|
SPECIALCLOSINGDATES,
|
|
@@ -6652,7 +6654,10 @@ var en = {
|
|
|
6652
6654
|
EXPORTDATA,
|
|
6653
6655
|
SELECTYOURRESTAURANTS,
|
|
6654
6656
|
SelectXResturant,
|
|
6655
|
-
ComparedPeriod
|
|
6657
|
+
ComparedPeriod,
|
|
6658
|
+
CLOSE,
|
|
6659
|
+
NoChannelsConnected,
|
|
6660
|
+
NoChannelsConnectedDesc
|
|
6656
6661
|
};
|
|
6657
6662
|
instance.use(initReactI18next).init({
|
|
6658
6663
|
resources: {
|
|
@@ -7414,7 +7419,7 @@ var withMiddleware = function(useSWR2, middleware2) {
|
|
|
7414
7419
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
7415
7420
|
args[_i] = arguments[_i];
|
|
7416
7421
|
}
|
|
7417
|
-
var
|
|
7422
|
+
var _a2 = normalize$4(args), key2 = _a2[0], fn = _a2[1], config2 = _a2[2];
|
|
7418
7423
|
var uses = (config2.use || []).concat(middleware2);
|
|
7419
7424
|
return useSWR2(key2, fn, __assign(__assign({}, config2), { use: uses }));
|
|
7420
7425
|
};
|
|
@@ -7428,7 +7433,7 @@ var infinite = function(useSWRNext) {
|
|
|
7428
7433
|
var rerender = useState({})[1];
|
|
7429
7434
|
var didMountRef = useRef(false);
|
|
7430
7435
|
var dataRef = useRef();
|
|
7431
|
-
var cache2 = config2.cache,
|
|
7436
|
+
var cache2 = config2.cache, _a2 = config2.initialSize, initialSize = _a2 === void 0 ? 1 : _a2, _b = config2.revalidateAll, revalidateAll = _b === void 0 ? false : _b, _c = config2.persistSize, persistSize = _c === void 0 ? false : _c, _d = config2.revalidateFirstPage, revalidateFirstPage = _d === void 0 ? true : _d, _e2 = config2.revalidateOnMount, revalidateOnMount = _e2 === void 0 ? false : _e2;
|
|
7432
7437
|
var firstPageKey = null;
|
|
7433
7438
|
try {
|
|
7434
7439
|
firstPageKey = getFirstPageKey(getKey);
|
|
@@ -7457,11 +7462,11 @@ var infinite = function(useSWRNext) {
|
|
|
7457
7462
|
var shouldRevalidateOnMount = revalidateOnMount && !didMountRef.current;
|
|
7458
7463
|
var swr = useSWRNext(firstPageKey ? INFINITE_PREFIX + firstPageKey : null, function() {
|
|
7459
7464
|
return __awaiter$1(void 0, void 0, void 0, function() {
|
|
7460
|
-
var
|
|
7465
|
+
var _a3, forceRevalidateAll, originalData, data2, pageSize, previousPageData, i, _b2, pageKey, pageArgs, pageData, shouldFetchPage;
|
|
7461
7466
|
return __generator$1(this, function(_c2) {
|
|
7462
7467
|
switch (_c2.label) {
|
|
7463
7468
|
case 0:
|
|
7464
|
-
|
|
7469
|
+
_a3 = cache2.get(contextCacheKey) || [], forceRevalidateAll = _a3[0], originalData = _a3[1];
|
|
7465
7470
|
data2 = [];
|
|
7466
7471
|
pageSize = resolvePageSize();
|
|
7467
7472
|
previousPageData = null;
|
|
@@ -7566,7 +7571,7 @@ var infinite = function(useSWRNext) {
|
|
|
7566
7571
|
};
|
|
7567
7572
|
var index$2 = withMiddleware(useSWR, infinite);
|
|
7568
7573
|
const useInfinite = (service, params, limit = 5) => {
|
|
7569
|
-
var
|
|
7574
|
+
var _a2, _b;
|
|
7570
7575
|
const { data: data2, error: error3, isValidating, mutate: mutate2, size, setSize } = index$2((page, previousPageData) => {
|
|
7571
7576
|
if (previousPageData && !previousPageData.length) {
|
|
7572
7577
|
return null;
|
|
@@ -7577,7 +7582,7 @@ const useInfinite = (service, params, limit = 5) => {
|
|
|
7577
7582
|
const issues = data2 ? [].concat(...data2) : [];
|
|
7578
7583
|
const isLoadingInitialData = !data2 && !error3;
|
|
7579
7584
|
const isLoadingMore = isLoadingInitialData || size > 0 && data2 && typeof data2[size - 1] === "undefined";
|
|
7580
|
-
const isEmpty = ((
|
|
7585
|
+
const isEmpty = ((_a2 = data2 == null ? void 0 : data2[0]) == null ? void 0 : _a2.length) === 0;
|
|
7581
7586
|
const isReachingEnd = isEmpty || data2 && ((_b = data2[data2.length - 1]) == null ? void 0 : _b.length) < limit;
|
|
7582
7587
|
const isRefreshing = isValidating && data2 && data2.length === size;
|
|
7583
7588
|
return {
|
|
@@ -7613,6 +7618,17 @@ const roundTable = () => /* @__PURE__ */ React__default.createElement("svg", {
|
|
|
7613
7618
|
fill: "currentColor",
|
|
7614
7619
|
transform: "translate(27,0)"
|
|
7615
7620
|
}));
|
|
7621
|
+
const link$1 = () => /* @__PURE__ */ React__default.createElement("svg", {
|
|
7622
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7623
|
+
width: "16",
|
|
7624
|
+
height: "16",
|
|
7625
|
+
fill: "currentColor",
|
|
7626
|
+
viewBox: "0 0 16 16"
|
|
7627
|
+
}, /* @__PURE__ */ React__default.createElement("path", {
|
|
7628
|
+
d: "M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z"
|
|
7629
|
+
}), /* @__PURE__ */ React__default.createElement("path", {
|
|
7630
|
+
d: "M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z"
|
|
7631
|
+
}));
|
|
7616
7632
|
const linkedin = () => /* @__PURE__ */ React__default.createElement("svg", {
|
|
7617
7633
|
viewBox: "0 0 24 24",
|
|
7618
7634
|
fill: "none",
|
|
@@ -8803,6 +8819,7 @@ const clock = () => {
|
|
|
8803
8819
|
var icons$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8804
8820
|
__proto__: null,
|
|
8805
8821
|
roundTable,
|
|
8822
|
+
link: link$1,
|
|
8806
8823
|
linkedin,
|
|
8807
8824
|
menu,
|
|
8808
8825
|
close: close$4,
|
|
@@ -9285,8 +9302,8 @@ var MapShim = function() {
|
|
|
9285
9302
|
if (ctx === void 0) {
|
|
9286
9303
|
ctx = null;
|
|
9287
9304
|
}
|
|
9288
|
-
for (var _i = 0,
|
|
9289
|
-
var entry =
|
|
9305
|
+
for (var _i = 0, _a2 = this.__entries__; _i < _a2.length; _i++) {
|
|
9306
|
+
var entry = _a2[_i];
|
|
9290
9307
|
callback.call(ctx, entry[1], entry[0]);
|
|
9291
9308
|
}
|
|
9292
9309
|
};
|
|
@@ -9428,8 +9445,8 @@ var ResizeObserverController = function() {
|
|
|
9428
9445
|
this.mutationEventsAdded_ = false;
|
|
9429
9446
|
this.connected_ = false;
|
|
9430
9447
|
};
|
|
9431
|
-
ResizeObserverController2.prototype.onTransitionEnd_ = function(
|
|
9432
|
-
var _b =
|
|
9448
|
+
ResizeObserverController2.prototype.onTransitionEnd_ = function(_a2) {
|
|
9449
|
+
var _b = _a2.propertyName, propertyName = _b === void 0 ? "" : _b;
|
|
9433
9450
|
var isReflowProperty = transitionKeys.some(function(key2) {
|
|
9434
9451
|
return !!~propertyName.indexOf(key2);
|
|
9435
9452
|
});
|
|
@@ -9447,8 +9464,8 @@ var ResizeObserverController = function() {
|
|
|
9447
9464
|
return ResizeObserverController2;
|
|
9448
9465
|
}();
|
|
9449
9466
|
var defineConfigurable = function(target, props) {
|
|
9450
|
-
for (var _i = 0,
|
|
9451
|
-
var key2 =
|
|
9467
|
+
for (var _i = 0, _a2 = Object.keys(props); _i < _a2.length; _i++) {
|
|
9468
|
+
var key2 = _a2[_i];
|
|
9452
9469
|
Object.defineProperty(target, key2, {
|
|
9453
9470
|
value: props[key2],
|
|
9454
9471
|
enumerable: false,
|
|
@@ -9542,8 +9559,8 @@ function getContentRect(target) {
|
|
|
9542
9559
|
}
|
|
9543
9560
|
return getHTMLElementContentRect(target);
|
|
9544
9561
|
}
|
|
9545
|
-
function createReadOnlyRect(
|
|
9546
|
-
var x2 =
|
|
9562
|
+
function createReadOnlyRect(_a2) {
|
|
9563
|
+
var x2 = _a2.x, y2 = _a2.y, width = _a2.width, height = _a2.height;
|
|
9547
9564
|
var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
|
|
9548
9565
|
var rect = Object.create(Constr.prototype);
|
|
9549
9566
|
defineConfigurable(rect, {
|
|
@@ -9690,8 +9707,8 @@ var ResizeObserver$1 = function() {
|
|
|
9690
9707
|
"disconnect"
|
|
9691
9708
|
].forEach(function(method4) {
|
|
9692
9709
|
ResizeObserver$1.prototype[method4] = function() {
|
|
9693
|
-
var
|
|
9694
|
-
return (
|
|
9710
|
+
var _a2;
|
|
9711
|
+
return (_a2 = observers.get(this))[method4].apply(_a2, arguments);
|
|
9695
9712
|
};
|
|
9696
9713
|
});
|
|
9697
9714
|
var index$1 = function() {
|
|
@@ -13355,9 +13372,9 @@ var LocaleReceiver = function LocaleReceiver2(props) {
|
|
|
13355
13372
|
var _props$componentName = props.componentName, componentName = _props$componentName === void 0 ? "global" : _props$componentName, defaultLocale2 = props.defaultLocale, children = props.children;
|
|
13356
13373
|
var antLocale = React.useContext(LocaleContext$1);
|
|
13357
13374
|
var getLocale2 = React.useMemo(function() {
|
|
13358
|
-
var
|
|
13375
|
+
var _a2;
|
|
13359
13376
|
var locale2 = defaultLocale2 || defaultLocale$2[componentName];
|
|
13360
|
-
var localeFromContext = (
|
|
13377
|
+
var localeFromContext = (_a2 = antLocale === null || antLocale === void 0 ? void 0 : antLocale[componentName]) !== null && _a2 !== void 0 ? _a2 : {};
|
|
13361
13378
|
return _extends$Q(_extends$Q({}, locale2 instanceof Function ? locale2() : locale2), localeFromContext || {});
|
|
13362
13379
|
}, [componentName, defaultLocale2, antLocale]);
|
|
13363
13380
|
var getLocaleCode = React.useMemo(function() {
|
|
@@ -13871,7 +13888,7 @@ var TinyColor = function() {
|
|
|
13871
13888
|
if (opts === void 0) {
|
|
13872
13889
|
opts = {};
|
|
13873
13890
|
}
|
|
13874
|
-
var
|
|
13891
|
+
var _a2;
|
|
13875
13892
|
if (color2 instanceof TinyColor2) {
|
|
13876
13893
|
return color2;
|
|
13877
13894
|
}
|
|
@@ -13886,7 +13903,7 @@ var TinyColor = function() {
|
|
|
13886
13903
|
this.b = rgb2.b;
|
|
13887
13904
|
this.a = rgb2.a;
|
|
13888
13905
|
this.roundA = Math.round(100 * this.a) / 100;
|
|
13889
|
-
this.format = (
|
|
13906
|
+
this.format = (_a2 = opts.format) !== null && _a2 !== void 0 ? _a2 : rgb2.format;
|
|
13890
13907
|
this.gradientType = opts.gradientType;
|
|
13891
13908
|
if (this.r < 1) {
|
|
13892
13909
|
this.r = Math.round(this.r);
|
|
@@ -14037,8 +14054,8 @@ var TinyColor = function() {
|
|
|
14037
14054
|
return false;
|
|
14038
14055
|
}
|
|
14039
14056
|
var hex3 = "#" + rgbToHex(this.r, this.g, this.b, false);
|
|
14040
|
-
for (var _i = 0,
|
|
14041
|
-
var _b =
|
|
14057
|
+
for (var _i = 0, _a2 = Object.entries(names); _i < _a2.length; _i++) {
|
|
14058
|
+
var _b = _a2[_i], key2 = _b[0], value2 = _b[1];
|
|
14042
14059
|
if (hex3 === value2) {
|
|
14043
14060
|
return key2;
|
|
14044
14061
|
}
|
|
@@ -15986,10 +16003,10 @@ function notice$1(args) {
|
|
|
15986
16003
|
});
|
|
15987
16004
|
});
|
|
15988
16005
|
var result = function result2() {
|
|
15989
|
-
var
|
|
16006
|
+
var _a2;
|
|
15990
16007
|
if (messageInstance) {
|
|
15991
16008
|
messageInstance.removeNotice(target);
|
|
15992
|
-
(
|
|
16009
|
+
(_a2 = args.onClose) === null || _a2 === void 0 ? void 0 : _a2.call(args);
|
|
15993
16010
|
}
|
|
15994
16011
|
};
|
|
15995
16012
|
result.then = function(filled, rejected) {
|
|
@@ -16521,7 +16538,7 @@ var globalConfig = function globalConfig2() {
|
|
|
16521
16538
|
};
|
|
16522
16539
|
};
|
|
16523
16540
|
var ProviderChildren = function ProviderChildren2(props) {
|
|
16524
|
-
var
|
|
16541
|
+
var _a2, _b;
|
|
16525
16542
|
var children = props.children, csp = props.csp, autoInsertSpaceInButton = props.autoInsertSpaceInButton, form2 = props.form, locale2 = props.locale, componentSize = props.componentSize, direction = props.direction, space = props.space, virtual = props.virtual, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth, legacyLocale = props.legacyLocale, parentContext = props.parentContext, iconPrefixCls = props.iconPrefixCls, componentDisabled = props.componentDisabled;
|
|
16526
16543
|
var getPrefixCls = React.useCallback(function(suffixCls, customizePrefixCls) {
|
|
16527
16544
|
var prefixCls = props.prefixCls;
|
|
@@ -16564,7 +16581,7 @@ var ProviderChildren = function ProviderChildren2(props) {
|
|
|
16564
16581
|
var childNode = children;
|
|
16565
16582
|
var validateMessages = {};
|
|
16566
16583
|
if (locale2) {
|
|
16567
|
-
validateMessages = ((
|
|
16584
|
+
validateMessages = ((_a2 = locale2.Form) === null || _a2 === void 0 ? void 0 : _a2.defaultValidateMessages) || ((_b = defaultLocale$2.Form) === null || _b === void 0 ? void 0 : _b.defaultValidateMessages) || {};
|
|
16568
16585
|
}
|
|
16569
16586
|
if (form2 && form2.validateMessages) {
|
|
16570
16587
|
validateMessages = _extends$Q(_extends$Q({}, validateMessages), form2.validateMessages);
|
|
@@ -19514,10 +19531,10 @@ var Tooltip$2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
19514
19531
|
return !title2 && !overlay && title2 !== 0;
|
|
19515
19532
|
};
|
|
19516
19533
|
var onOpenChange = function onOpenChange2(vis) {
|
|
19517
|
-
var
|
|
19534
|
+
var _a2, _b;
|
|
19518
19535
|
setOpen(isNoTitle() ? false : vis);
|
|
19519
19536
|
if (!isNoTitle()) {
|
|
19520
|
-
(
|
|
19537
|
+
(_a2 = props.onOpenChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, vis);
|
|
19521
19538
|
(_b = props.onVisibleChange) === null || _b === void 0 ? void 0 : _b.call(props, vis);
|
|
19522
19539
|
}
|
|
19523
19540
|
};
|
|
@@ -19531,8 +19548,8 @@ var Tooltip$2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
19531
19548
|
var onPopupAlign = function onPopupAlign2(domNode, align) {
|
|
19532
19549
|
var placements2 = getTooltipPlacements();
|
|
19533
19550
|
var placement2 = Object.keys(placements2).find(function(key2) {
|
|
19534
|
-
var
|
|
19535
|
-
return placements2[key2].points[0] === ((
|
|
19551
|
+
var _a2, _b;
|
|
19552
|
+
return placements2[key2].points[0] === ((_a2 = align.points) === null || _a2 === void 0 ? void 0 : _a2[0]) && placements2[key2].points[1] === ((_b = align.points) === null || _b === void 0 ? void 0 : _b[1]);
|
|
19536
19553
|
});
|
|
19537
19554
|
if (!placement2) {
|
|
19538
19555
|
return;
|
|
@@ -19720,7 +19737,7 @@ var Wave = /* @__PURE__ */ function(_React$Component) {
|
|
|
19720
19737
|
_this.animationStart = false;
|
|
19721
19738
|
_this.destroyed = false;
|
|
19722
19739
|
_this.onClick = function(node2, waveColor) {
|
|
19723
|
-
var
|
|
19740
|
+
var _a2, _b;
|
|
19724
19741
|
var _this$props = _this.props, insertExtraNode = _this$props.insertExtraNode, disabled2 = _this$props.disabled;
|
|
19725
19742
|
if (disabled2 || !node2 || isHidden(node2) || node2.className.includes("-leave")) {
|
|
19726
19743
|
return;
|
|
@@ -19733,7 +19750,7 @@ var Wave = /* @__PURE__ */ function(_React$Component) {
|
|
|
19733
19750
|
node2.setAttribute(attributeName, "true");
|
|
19734
19751
|
if (waveColor && waveColor !== "#fff" && waveColor !== "#ffffff" && waveColor !== "rgb(255, 255, 255)" && waveColor !== "rgba(255, 255, 255, 1)" && isNotGrey(waveColor) && !/rgba\((?:\d*, ){3}0\)/.test(waveColor) && waveColor !== "transparent") {
|
|
19735
19752
|
extraNode.style.borderColor = waveColor;
|
|
19736
|
-
var nodeRoot = ((
|
|
19753
|
+
var nodeRoot = ((_a2 = node2.getRootNode) === null || _a2 === void 0 ? void 0 : _a2.call(node2)) || node2.ownerDocument;
|
|
19737
19754
|
var nodeBody = (_b = getValidateContainer(nodeRoot)) !== null && _b !== void 0 ? _b : nodeRoot;
|
|
19738
19755
|
styleForPseudo = updateCSS("\n [".concat(getPrefixCls(""), "-click-animating-without-extra-node='true']::after, .").concat(getPrefixCls(""), "-click-animating-node {\n --antd-wave-shadow-color: ").concat(waveColor, ";\n }"), "antd-wave", {
|
|
19739
19756
|
csp: _this.csp,
|
|
@@ -27656,8 +27673,8 @@ var InternalRadio = function InternalRadio2(props, ref) {
|
|
|
27656
27673
|
var mergedRef = composeRef(ref, innerRef);
|
|
27657
27674
|
var _useContext = useContext(FormItemInputContext), isFormItemInput = _useContext.isFormItemInput;
|
|
27658
27675
|
var onChange3 = function onChange4(e3) {
|
|
27659
|
-
var
|
|
27660
|
-
(
|
|
27676
|
+
var _a2, _b;
|
|
27677
|
+
(_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, e3);
|
|
27661
27678
|
(_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e3);
|
|
27662
27679
|
};
|
|
27663
27680
|
var customizePrefixCls = props.prefixCls, className = props.className, children = props.children, style2 = props.style, customDisabled = props.disabled, restProps = __rest$9(props, ["prefixCls", "className", "children", "style", "disabled"]);
|
|
@@ -28085,9 +28102,9 @@ var __rest$5 = globalThis && globalThis.__rest || function(s2, e3) {
|
|
|
28085
28102
|
}
|
|
28086
28103
|
return t2;
|
|
28087
28104
|
};
|
|
28088
|
-
var CheckableTag = function CheckableTag2(
|
|
28105
|
+
var CheckableTag = function CheckableTag2(_a2) {
|
|
28089
28106
|
var _classNames;
|
|
28090
|
-
var customizePrefixCls =
|
|
28107
|
+
var customizePrefixCls = _a2.prefixCls, className = _a2.className, checked = _a2.checked, onChange3 = _a2.onChange, onClick = _a2.onClick, restProps = __rest$5(_a2, ["prefixCls", "className", "checked", "onChange", "onClick"]);
|
|
28091
28108
|
var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls;
|
|
28092
28109
|
var handleClick = function handleClick2(e3) {
|
|
28093
28110
|
onChange3 === null || onChange3 === void 0 ? void 0 : onChange3(!checked);
|
|
@@ -28115,9 +28132,9 @@ var __rest$4 = globalThis && globalThis.__rest || function(s2, e3) {
|
|
|
28115
28132
|
};
|
|
28116
28133
|
var PresetColorRegex = new RegExp("^(".concat(PresetColorTypes.join("|"), ")(-inverse)?$"));
|
|
28117
28134
|
var PresetStatusColorRegex = new RegExp("^(".concat(PresetStatusColorTypes.join("|"), ")$"));
|
|
28118
|
-
var InternalTag = function InternalTag2(
|
|
28135
|
+
var InternalTag = function InternalTag2(_a2, ref) {
|
|
28119
28136
|
var _classNames;
|
|
28120
|
-
var customizePrefixCls =
|
|
28137
|
+
var customizePrefixCls = _a2.prefixCls, className = _a2.className, style2 = _a2.style, children = _a2.children, icon2 = _a2.icon, color2 = _a2.color, onClose2 = _a2.onClose, closeIcon = _a2.closeIcon, _a$closable = _a2.closable, closable = _a$closable === void 0 ? false : _a$closable, props = __rest$4(_a2, ["prefixCls", "className", "style", "children", "icon", "color", "onClose", "closeIcon", "closable"]);
|
|
28121
28138
|
var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
|
|
28122
28139
|
var _React$useState = React.useState(true), _React$useState2 = _slicedToArray$a(_React$useState, 2), visible = _React$useState2[0], setVisible = _React$useState2[1];
|
|
28123
28140
|
React.useEffect(function() {
|
|
@@ -28333,12 +28350,12 @@ function generateRangePicker(generateConfig2) {
|
|
|
28333
28350
|
useImperativeHandle(ref, function() {
|
|
28334
28351
|
return {
|
|
28335
28352
|
focus: function focus() {
|
|
28336
|
-
var
|
|
28337
|
-
return (
|
|
28353
|
+
var _a2;
|
|
28354
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
28338
28355
|
},
|
|
28339
28356
|
blur: function blur() {
|
|
28340
|
-
var
|
|
28341
|
-
return (
|
|
28357
|
+
var _a2;
|
|
28358
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.blur();
|
|
28342
28359
|
}
|
|
28343
28360
|
};
|
|
28344
28361
|
});
|
|
@@ -28411,12 +28428,12 @@ function generatePicker$1(generateConfig2) {
|
|
|
28411
28428
|
useImperativeHandle(ref, function() {
|
|
28412
28429
|
return {
|
|
28413
28430
|
focus: function focus() {
|
|
28414
|
-
var
|
|
28415
|
-
return (
|
|
28431
|
+
var _a2;
|
|
28432
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
28416
28433
|
},
|
|
28417
28434
|
blur: function blur() {
|
|
28418
|
-
var
|
|
28419
|
-
return (
|
|
28435
|
+
var _a2;
|
|
28436
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.blur();
|
|
28420
28437
|
}
|
|
28421
28438
|
};
|
|
28422
28439
|
});
|
|
@@ -29086,8 +29103,8 @@ var ActionButton = function ActionButton2(props) {
|
|
|
29086
29103
|
var timeoutId = null;
|
|
29087
29104
|
if (props.autoFocus) {
|
|
29088
29105
|
timeoutId = setTimeout(function() {
|
|
29089
|
-
var
|
|
29090
|
-
(
|
|
29106
|
+
var _a2;
|
|
29107
|
+
(_a2 = ref.current) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
29091
29108
|
});
|
|
29092
29109
|
}
|
|
29093
29110
|
return function() {
|
|
@@ -29178,7 +29195,7 @@ if (canUseDocElement()) {
|
|
|
29178
29195
|
}
|
|
29179
29196
|
var Modal$2 = function Modal(props) {
|
|
29180
29197
|
var _classNames;
|
|
29181
|
-
var
|
|
29198
|
+
var _a2;
|
|
29182
29199
|
var _React$useContext = React.useContext(ConfigContext), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
|
|
29183
29200
|
var handleCancel = function handleCancel2(e3) {
|
|
29184
29201
|
var onCancel = props.onCancel;
|
|
@@ -29220,7 +29237,7 @@ var Modal$2 = function Modal(props) {
|
|
|
29220
29237
|
wrapClassName: wrapClassNameExtended,
|
|
29221
29238
|
footer: footer2 === void 0 ? defaultFooter : footer2,
|
|
29222
29239
|
visible: open || visible,
|
|
29223
|
-
mousePosition: (
|
|
29240
|
+
mousePosition: (_a2 = restProps.mousePosition) !== null && _a2 !== void 0 ? _a2 : mousePosition,
|
|
29224
29241
|
onClose: handleCancel,
|
|
29225
29242
|
closeIcon: closeIconToRender,
|
|
29226
29243
|
focusTriggerAfterClose,
|
|
@@ -29345,8 +29362,8 @@ function confirm$1(config2) {
|
|
|
29345
29362
|
}
|
|
29346
29363
|
unmount(container2);
|
|
29347
29364
|
}
|
|
29348
|
-
function render$1(
|
|
29349
|
-
var okText =
|
|
29365
|
+
function render$1(_a2) {
|
|
29366
|
+
var okText = _a2.okText, cancelText = _a2.cancelText, customizePrefixCls = _a2.prefixCls, props = __rest(_a2, ["okText", "cancelText", "prefixCls"]);
|
|
29350
29367
|
clearTimeout(timeoutId);
|
|
29351
29368
|
timeoutId = setTimeout(function() {
|
|
29352
29369
|
var runtimeLocale2 = getConfirmLocale();
|
|
@@ -29529,7 +29546,7 @@ function useModal() {
|
|
|
29529
29546
|
}, [actionQueue]);
|
|
29530
29547
|
var getConfirmFunc = React.useCallback(function(withFunc) {
|
|
29531
29548
|
return function hookConfirm(config2) {
|
|
29532
|
-
var
|
|
29549
|
+
var _a2;
|
|
29533
29550
|
uuid += 1;
|
|
29534
29551
|
var modalRef = /* @__PURE__ */ React.createRef();
|
|
29535
29552
|
var closeFunc;
|
|
@@ -29541,12 +29558,12 @@ function useModal() {
|
|
|
29541
29558
|
closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();
|
|
29542
29559
|
}
|
|
29543
29560
|
});
|
|
29544
|
-
closeFunc = (
|
|
29561
|
+
closeFunc = (_a2 = holderRef.current) === null || _a2 === void 0 ? void 0 : _a2.patchElement(modal);
|
|
29545
29562
|
return {
|
|
29546
29563
|
destroy: function destroy3() {
|
|
29547
29564
|
function destroyAction() {
|
|
29548
|
-
var
|
|
29549
|
-
(
|
|
29565
|
+
var _a3;
|
|
29566
|
+
(_a3 = modalRef.current) === null || _a3 === void 0 ? void 0 : _a3.destroy();
|
|
29550
29567
|
}
|
|
29551
29568
|
if (modalRef.current) {
|
|
29552
29569
|
destroyAction();
|
|
@@ -29558,8 +29575,8 @@ function useModal() {
|
|
|
29558
29575
|
},
|
|
29559
29576
|
update: function update(newConfig) {
|
|
29560
29577
|
function updateAction() {
|
|
29561
|
-
var
|
|
29562
|
-
(
|
|
29578
|
+
var _a3;
|
|
29579
|
+
(_a3 = modalRef.current) === null || _a3 === void 0 ? void 0 : _a3.update(newConfig);
|
|
29563
29580
|
}
|
|
29564
29581
|
if (modalRef.current) {
|
|
29565
29582
|
updateAction();
|
|
@@ -50092,12 +50109,12 @@ const Header$2 = ({ onChangeFilter, filters: filters2, multiVenue, venueId }) =>
|
|
|
50092
50109
|
}, /* @__PURE__ */ React__default.createElement(NewSelect, {
|
|
50093
50110
|
label: t2("PLATFORM"),
|
|
50094
50111
|
options: data2 && data2.data && data2.data.length ? [...[{ id: "", label: t2("ALL") }], ...data2.data.map((platform2) => {
|
|
50095
|
-
var
|
|
50096
|
-
return { id: (_b = (
|
|
50112
|
+
var _a2, _b, _c, _d;
|
|
50113
|
+
return { id: (_b = (_a2 = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _a2.id) != null ? _b : "", label: (_d = (_c = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _c.name) != null ? _d : "" };
|
|
50097
50114
|
})] : platforms,
|
|
50098
50115
|
defaultValue: data2 && data2.data && data2.data.length ? [...[{ id: "", label: t2("ALL") }], ...data2.data.map((platform2) => {
|
|
50099
|
-
var
|
|
50100
|
-
return { id: (_b = (
|
|
50116
|
+
var _a2, _b, _c, _d;
|
|
50117
|
+
return { id: (_b = (_a2 = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _a2.id) != null ? _b : "", label: (_d = (_c = platform2 == null ? void 0 : platform2.module) == null ? void 0 : _c.name) != null ? _d : "" };
|
|
50101
50118
|
})][0] : platforms[0],
|
|
50102
50119
|
onChange: handleChangeFilter("module"),
|
|
50103
50120
|
getOptionValue: (item2) => item2.id
|
|
@@ -52180,8 +52197,8 @@ const Name = ({ children }) => {
|
|
|
52180
52197
|
}, children);
|
|
52181
52198
|
};
|
|
52182
52199
|
const Role$1 = ({ role }) => {
|
|
52183
|
-
var
|
|
52184
|
-
const label2 = ((
|
|
52200
|
+
var _a2, _b;
|
|
52201
|
+
const label2 = ((_a2 = roleObj[role]) == null ? void 0 : _a2.label) || "";
|
|
52185
52202
|
const icon2 = ((_b = roleObj[role]) == null ? void 0 : _b.icon) || /* @__PURE__ */ React__default.createElement(Edit2$1, null);
|
|
52186
52203
|
return /* @__PURE__ */ React__default.createElement("span", {
|
|
52187
52204
|
style: { display: "flex" }
|
|
@@ -53329,6 +53346,9 @@ const ModalConfirmation = ({
|
|
|
53329
53346
|
message: message2,
|
|
53330
53347
|
title: title2,
|
|
53331
53348
|
icon: icon2,
|
|
53349
|
+
showSubmitButton = true,
|
|
53350
|
+
submitButtonText = "ACCEPT",
|
|
53351
|
+
cancelButtonText = "CANCEL",
|
|
53332
53352
|
...props
|
|
53333
53353
|
}) => {
|
|
53334
53354
|
const { t: t2 } = useTranslation();
|
|
@@ -53349,11 +53369,11 @@ const ModalConfirmation = ({
|
|
|
53349
53369
|
mode: "tertiary",
|
|
53350
53370
|
onClick: props.onClose,
|
|
53351
53371
|
disabled: isLoading
|
|
53352
|
-
}, t2(
|
|
53372
|
+
}, t2(cancelButtonText)), showSubmitButton && /* @__PURE__ */ React__default.createElement(Button$3, {
|
|
53353
53373
|
size: "small",
|
|
53354
53374
|
onClick: onAccept,
|
|
53355
53375
|
isLoading
|
|
53356
|
-
}, t2(
|
|
53376
|
+
}, t2(submitButtonText))));
|
|
53357
53377
|
};
|
|
53358
53378
|
const ReplyTemplates = ({
|
|
53359
53379
|
venueId,
|
|
@@ -55995,8 +56015,8 @@ var OBJECT_TAG = "[object Object]";
|
|
|
55995
56015
|
var SET_TAG = "[object Set]";
|
|
55996
56016
|
var STRING_TAG = "[object String]";
|
|
55997
56017
|
var toString$1 = Object.prototype.toString;
|
|
55998
|
-
function createComparator(
|
|
55999
|
-
var areArraysEqual2 =
|
|
56018
|
+
function createComparator(_a2) {
|
|
56019
|
+
var areArraysEqual2 = _a2.areArraysEqual, areDatesEqual2 = _a2.areDatesEqual, areMapsEqual2 = _a2.areMapsEqual, areObjectsEqual2 = _a2.areObjectsEqual, areRegExpsEqual2 = _a2.areRegExpsEqual, areSetsEqual2 = _a2.areSetsEqual, createIsNestedEqual = _a2.createIsNestedEqual;
|
|
56000
56020
|
var isEqual2 = createIsNestedEqual(comparator);
|
|
56001
56021
|
function comparator(a2, b2, meta) {
|
|
56002
56022
|
if (a2 === b2) {
|
|
@@ -59710,8 +59730,8 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59710
59730
|
return element instanceof Element || element instanceof HTMLDocument;
|
|
59711
59731
|
};
|
|
59712
59732
|
var createNotifier = function(onResize, setSize, handleWidth, handleHeight) {
|
|
59713
|
-
return function(
|
|
59714
|
-
var width =
|
|
59733
|
+
return function(_a2) {
|
|
59734
|
+
var width = _a2.width, height = _a2.height;
|
|
59715
59735
|
setSize(function(prev2) {
|
|
59716
59736
|
if (prev2.width === width && prev2.height === height) {
|
|
59717
59737
|
return prev2;
|
|
@@ -59737,7 +59757,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59737
59757
|
}
|
|
59738
59758
|
};
|
|
59739
59759
|
_this.attachObserver = function() {
|
|
59740
|
-
var
|
|
59760
|
+
var _a3 = _this.props, targetRef = _a3.targetRef, observerOptions = _a3.observerOptions;
|
|
59741
59761
|
if (isSSR()) {
|
|
59742
59762
|
return;
|
|
59743
59763
|
}
|
|
@@ -59755,7 +59775,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59755
59775
|
_this.resizeObserver.observe(element, observerOptions);
|
|
59756
59776
|
};
|
|
59757
59777
|
_this.getElement = function() {
|
|
59758
|
-
var
|
|
59778
|
+
var _a3 = _this.props, querySelector = _a3.querySelector, targetDomEl = _a3.targetDomEl;
|
|
59759
59779
|
if (isSSR())
|
|
59760
59780
|
return null;
|
|
59761
59781
|
if (querySelector)
|
|
@@ -59782,12 +59802,12 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59782
59802
|
}
|
|
59783
59803
|
};
|
|
59784
59804
|
_this.createResizeHandler = function(entries) {
|
|
59785
|
-
var
|
|
59805
|
+
var _a3 = _this.props, _b = _a3.handleWidth, handleWidth = _b === void 0 ? true : _b, _c = _a3.handleHeight, handleHeight = _c === void 0 ? true : _c, onResize = _a3.onResize;
|
|
59786
59806
|
if (!handleWidth && !handleHeight)
|
|
59787
59807
|
return;
|
|
59788
59808
|
var notifyResize = createNotifier(onResize, _this.setState.bind(_this), handleWidth, handleHeight);
|
|
59789
59809
|
entries.forEach(function(entry) {
|
|
59790
|
-
var
|
|
59810
|
+
var _a4 = entry && entry.contentRect || {}, width = _a4.width, height = _a4.height;
|
|
59791
59811
|
var shouldSetSize = !_this.skipOnMount && !isSSR();
|
|
59792
59812
|
if (shouldSetSize) {
|
|
59793
59813
|
notifyResize({ width, height });
|
|
@@ -59796,7 +59816,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59796
59816
|
});
|
|
59797
59817
|
};
|
|
59798
59818
|
_this.getRenderType = function() {
|
|
59799
|
-
var
|
|
59819
|
+
var _a3 = _this.props, render2 = _a3.render, children = _a3.children;
|
|
59800
59820
|
if (isFunction3(render2)) {
|
|
59801
59821
|
return "renderProp";
|
|
59802
59822
|
}
|
|
@@ -59811,7 +59831,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59811
59831
|
}
|
|
59812
59832
|
return "parent";
|
|
59813
59833
|
};
|
|
59814
|
-
var skipOnMount = props.skipOnMount, refreshMode = props.refreshMode,
|
|
59834
|
+
var skipOnMount = props.skipOnMount, refreshMode = props.refreshMode, _a2 = props.refreshRate, refreshRate = _a2 === void 0 ? 1e3 : _a2, refreshOptions = props.refreshOptions;
|
|
59815
59835
|
_this.state = {
|
|
59816
59836
|
width: void 0,
|
|
59817
59837
|
height: void 0
|
|
@@ -59840,7 +59860,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59840
59860
|
this.cancelHandler();
|
|
59841
59861
|
};
|
|
59842
59862
|
ResizeDetector2.prototype.render = function() {
|
|
59843
|
-
var
|
|
59863
|
+
var _a2 = this.props, render2 = _a2.render, children = _a2.children, _b = _a2.nodeType, WrapperTag = _b === void 0 ? "div" : _b;
|
|
59844
59864
|
var _c = this.state, width = _c.width, height = _c.height;
|
|
59845
59865
|
var childProps = { width, height, targetRef: this.targetRef };
|
|
59846
59866
|
var renderType = this.getRenderType();
|
|
@@ -59882,7 +59902,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59882
59902
|
return _this;
|
|
59883
59903
|
}
|
|
59884
59904
|
ResizeDetectorHOC2.prototype.render = function() {
|
|
59885
|
-
var
|
|
59905
|
+
var _a2 = this.props, forwardedRef = _a2.forwardedRef, rest = __rest2(_a2, ["forwardedRef"]);
|
|
59886
59906
|
var targetRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : this.ref;
|
|
59887
59907
|
return React__namespace.createElement(ResizeDetector, __assign2({}, options2, { targetRef }), React__namespace.createElement(ComponentInner, __assign2({ targetRef }, rest)));
|
|
59888
59908
|
};
|
|
@@ -59900,7 +59920,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59900
59920
|
if (props === void 0) {
|
|
59901
59921
|
props = {};
|
|
59902
59922
|
}
|
|
59903
|
-
var
|
|
59923
|
+
var _a2 = props.skipOnMount, skipOnMount = _a2 === void 0 ? false : _a2, refreshMode = props.refreshMode, _b = props.refreshRate, refreshRate = _b === void 0 ? 1e3 : _b, refreshOptions = props.refreshOptions, _c = props.handleWidth, handleWidth = _c === void 0 ? true : _c, _d = props.handleHeight, handleHeight = _d === void 0 ? true : _d, targetRef = props.targetRef, observerOptions = props.observerOptions, onResize = props.onResize;
|
|
59904
59924
|
var skipResize = React2.useRef(skipOnMount);
|
|
59905
59925
|
var localRef = React2.useRef(null);
|
|
59906
59926
|
var ref = targetRef !== null && targetRef !== void 0 ? targetRef : localRef;
|
|
@@ -59918,7 +59938,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59918
59938
|
if (!handleWidth && !handleHeight)
|
|
59919
59939
|
return;
|
|
59920
59940
|
entries.forEach(function(entry) {
|
|
59921
|
-
var
|
|
59941
|
+
var _a3 = entry && entry.contentRect || {}, width = _a3.width, height = _a3.height;
|
|
59922
59942
|
var shouldSetSize = !skipResize.current && !isSSR();
|
|
59923
59943
|
if (shouldSetSize) {
|
|
59924
59944
|
notifyResize({ width, height });
|
|
@@ -77317,9 +77337,9 @@ const formatDateChart = (date4, mode) => {
|
|
|
77317
77337
|
};
|
|
77318
77338
|
const formatData$c = (data2, mode) => {
|
|
77319
77339
|
const formatedData = data2.reduce((acc, { date: _date, ...item2 }) => {
|
|
77320
|
-
var
|
|
77340
|
+
var _a2, _b, _c;
|
|
77321
77341
|
const date4 = formatDateChart(_date, mode);
|
|
77322
|
-
const positive2 = (((
|
|
77342
|
+
const positive2 = (((_a2 = acc[date4]) == null ? void 0 : _a2.positive) || 0) + item2.positive;
|
|
77323
77343
|
const negative2 = (((_b = acc[date4]) == null ? void 0 : _b.negative) || 0) + item2.negative;
|
|
77324
77344
|
const neutral2 = (((_c = acc[date4]) == null ? void 0 : _c.neutral) || 0) + item2.neutral;
|
|
77325
77345
|
return {
|
|
@@ -77946,9 +77966,9 @@ const formatParams$1 = (params) => {
|
|
|
77946
77966
|
return all2;
|
|
77947
77967
|
};
|
|
77948
77968
|
const formatStats$1 = (stat) => {
|
|
77949
|
-
var
|
|
77969
|
+
var _a2;
|
|
77950
77970
|
let sum = 0;
|
|
77951
|
-
(
|
|
77971
|
+
(_a2 = stat.timeSeries) == null ? void 0 : _a2.datedValues.map((v2) => {
|
|
77952
77972
|
if (v2.value)
|
|
77953
77973
|
sum += parseInt(v2.value);
|
|
77954
77974
|
});
|
|
@@ -78004,8 +78024,8 @@ const buildData$1 = (base, data2, type4) => {
|
|
|
78004
78024
|
return base;
|
|
78005
78025
|
};
|
|
78006
78026
|
const getViewsGraphData$1 = (dataToFormat) => {
|
|
78007
|
-
var
|
|
78008
|
-
let graphStats = buildDates$1((
|
|
78027
|
+
var _a2, _b, _c, _d, _e2;
|
|
78028
|
+
let graphStats = buildDates$1((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78009
78029
|
let builder = buildData$1(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
78010
78030
|
builder = buildData$1(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
78011
78031
|
builder = buildData$1(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
@@ -78013,8 +78033,8 @@ const getViewsGraphData$1 = (dataToFormat) => {
|
|
|
78013
78033
|
return builder;
|
|
78014
78034
|
};
|
|
78015
78035
|
const getActionsGraphData$1 = (dataToFormat) => {
|
|
78016
|
-
var
|
|
78017
|
-
let graphStats = buildDates$1((
|
|
78036
|
+
var _a2, _b, _c, _d;
|
|
78037
|
+
let graphStats = buildDates$1((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78018
78038
|
let builder = buildData$1(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
78019
78039
|
builder = buildData$1(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
78020
78040
|
builder = buildData$1(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
@@ -78312,9 +78332,9 @@ const DasboardBookingAnalytics = ({ venueListingId, venueId }) => {
|
|
|
78312
78332
|
})))))));
|
|
78313
78333
|
};
|
|
78314
78334
|
const formatStats = (stat) => {
|
|
78315
|
-
var
|
|
78335
|
+
var _a2;
|
|
78316
78336
|
let sum = 0;
|
|
78317
|
-
(
|
|
78337
|
+
(_a2 = stat.timeSeries) == null ? void 0 : _a2.datedValues.map((v2) => {
|
|
78318
78338
|
if (v2.value)
|
|
78319
78339
|
sum += parseInt(v2.value);
|
|
78320
78340
|
});
|
|
@@ -78370,8 +78390,8 @@ const buildData = (base, data2, type4) => {
|
|
|
78370
78390
|
return base;
|
|
78371
78391
|
};
|
|
78372
78392
|
const getViewsGraphData = (dataToFormat) => {
|
|
78373
|
-
var
|
|
78374
|
-
let graphStats = buildDates((
|
|
78393
|
+
var _a2, _b, _c, _d, _e2;
|
|
78394
|
+
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78375
78395
|
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
78376
78396
|
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
78377
78397
|
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
@@ -78379,8 +78399,8 @@ const getViewsGraphData = (dataToFormat) => {
|
|
|
78379
78399
|
return builder;
|
|
78380
78400
|
};
|
|
78381
78401
|
const getActionsGraphData = (dataToFormat) => {
|
|
78382
|
-
var
|
|
78383
|
-
let graphStats = buildDates((
|
|
78402
|
+
var _a2, _b, _c, _d;
|
|
78403
|
+
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78384
78404
|
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
78385
78405
|
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
78386
78406
|
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
@@ -78810,7 +78830,7 @@ const CardDescription = ({
|
|
|
78810
78830
|
onClickEdit,
|
|
78811
78831
|
values
|
|
78812
78832
|
}) => {
|
|
78813
|
-
var
|
|
78833
|
+
var _a2, _b, _c;
|
|
78814
78834
|
const { t: t2 } = useTranslation();
|
|
78815
78835
|
return /* @__PURE__ */ React__default.createElement(Card, {
|
|
78816
78836
|
header: {
|
|
@@ -78827,7 +78847,7 @@ const CardDescription = ({
|
|
|
78827
78847
|
text: values.businessName
|
|
78828
78848
|
}), /* @__PURE__ */ React__default.createElement(Item, {
|
|
78829
78849
|
icon: "category",
|
|
78830
|
-
text: (
|
|
78850
|
+
text: (_a2 = values.mainCategory) == null ? void 0 : _a2.label
|
|
78831
78851
|
}), /* @__PURE__ */ React__default.createElement(Item, {
|
|
78832
78852
|
icon: "descriptionLong",
|
|
78833
78853
|
text: ((_b = values.descriptionLong) == null ? void 0 : _b.length) > 300 ? `${values.descriptionLong.slice(0, 300)}...` : values.descriptionLong
|
|
@@ -78940,7 +78960,7 @@ const formatAttributes$2 = (attributes2, attributesLinks = [], attrLinks = []) =
|
|
|
78940
78960
|
const formated = Object.keys(allAttributes).filter((key2) => {
|
|
78941
78961
|
return allAttributes[key2] !== void 0;
|
|
78942
78962
|
}).map((key2) => {
|
|
78943
|
-
var
|
|
78963
|
+
var _a2, _b;
|
|
78944
78964
|
const attr = allAttributes[key2];
|
|
78945
78965
|
let value2 = "";
|
|
78946
78966
|
let unset_value = "";
|
|
@@ -78948,7 +78968,7 @@ const formatAttributes$2 = (attributes2, attributesLinks = [], attrLinks = []) =
|
|
|
78948
78968
|
value2 = attr ? "true" : "false";
|
|
78949
78969
|
}
|
|
78950
78970
|
if (typeof attr === "object") {
|
|
78951
|
-
value2 = (
|
|
78971
|
+
value2 = (_a2 = attr.value) == null ? void 0 : _a2.join(",");
|
|
78952
78972
|
unset_value = (_b = attr.unset_value) == null ? void 0 : _b.join(",");
|
|
78953
78973
|
}
|
|
78954
78974
|
if (typeof attr === "string")
|
|
@@ -78963,7 +78983,7 @@ const formatAttributes$2 = (attributes2, attributesLinks = [], attrLinks = []) =
|
|
|
78963
78983
|
return formated;
|
|
78964
78984
|
};
|
|
78965
78985
|
const formatDataInfo = (values) => {
|
|
78966
|
-
var
|
|
78986
|
+
var _a2, _b, _c;
|
|
78967
78987
|
const formattedData = preprocessAttrs(values);
|
|
78968
78988
|
const {
|
|
78969
78989
|
extraLinks,
|
|
@@ -78979,7 +78999,7 @@ const formatDataInfo = (values) => {
|
|
|
78979
78999
|
} = formattedData;
|
|
78980
79000
|
return {
|
|
78981
79001
|
...rest,
|
|
78982
|
-
country: (
|
|
79002
|
+
country: (_a2 = values == null ? void 0 : values.country) == null ? void 0 : _a2.id,
|
|
78983
79003
|
mainCategory: (_b = values == null ? void 0 : values.mainCategory) == null ? void 0 : _b.id,
|
|
78984
79004
|
additionalCategories: (_c = values == null ? void 0 : values.additionalCategories) == null ? void 0 : _c.map(({ id: id22 }) => id22),
|
|
78985
79005
|
attributes: formatAttributes$2(attributes2, attributesLinks, attrLinks),
|
|
@@ -79703,12 +79723,12 @@ Geocode.setApiKey(config$1.maps_key);
|
|
|
79703
79723
|
const getLocationFromAdress = (add2) => Geocode.fromAddress(add2).then((response) => response.results.map(formarResult)).catch((error3) => {
|
|
79704
79724
|
});
|
|
79705
79725
|
const formarResult = (result) => {
|
|
79706
|
-
var
|
|
79726
|
+
var _a2, _b, _c, _d, _e2, _f;
|
|
79707
79727
|
const id2 = result.place_id;
|
|
79708
79728
|
const address = result.formatted_address;
|
|
79709
79729
|
const components2 = result.address_components;
|
|
79710
79730
|
const location2 = result.geometry.location;
|
|
79711
|
-
const city = ((
|
|
79731
|
+
const city = ((_a2 = components2.find(({ types: types2 }) => types2.includes("locality"))) == null ? void 0 : _a2.long_name) || "";
|
|
79712
79732
|
const street_number = ((_b = components2.find(({ types: types2 }) => types2.includes("street_number"))) == null ? void 0 : _b.long_name) || "";
|
|
79713
79733
|
const route = ((_c = components2.find(({ types: types2 }) => types2.includes("route"))) == null ? void 0 : _c.long_name) || "";
|
|
79714
79734
|
const state = ((_d = components2.find(({ types: types2 }) => types2.includes("administrative_area_level_1"))) == null ? void 0 : _d.long_name) || "";
|
|
@@ -79740,7 +79760,7 @@ const GetVenueListing = async ({
|
|
|
79740
79760
|
return formatData$8(data2);
|
|
79741
79761
|
};
|
|
79742
79762
|
const formatData$8 = async (values = {}) => {
|
|
79743
|
-
var
|
|
79763
|
+
var _a2;
|
|
79744
79764
|
const {
|
|
79745
79765
|
country,
|
|
79746
79766
|
mainCategory,
|
|
@@ -79764,7 +79784,7 @@ const formatData$8 = async (values = {}) => {
|
|
|
79764
79784
|
return {
|
|
79765
79785
|
...rest,
|
|
79766
79786
|
mainCategory: _mainCategory,
|
|
79767
|
-
additionalCategories: ((
|
|
79787
|
+
additionalCategories: ((_a2 = values == null ? void 0 : values.additionalCategories) == null ? void 0 : _a2.map(({ id: id2, name }) => ({
|
|
79768
79788
|
id: id2,
|
|
79769
79789
|
label: name
|
|
79770
79790
|
}))) || [],
|
|
@@ -80114,14 +80134,14 @@ function useLoadGsiScript(options2 = {}) {
|
|
|
80114
80134
|
scriptTag2.async = true;
|
|
80115
80135
|
scriptTag2.defer = true;
|
|
80116
80136
|
scriptTag2.onload = () => {
|
|
80117
|
-
var
|
|
80137
|
+
var _a2;
|
|
80118
80138
|
setScriptLoadedSuccessfully(true);
|
|
80119
|
-
(
|
|
80139
|
+
(_a2 = onScriptLoadSuccessRef.current) === null || _a2 === void 0 ? void 0 : _a2.call(onScriptLoadSuccessRef);
|
|
80120
80140
|
};
|
|
80121
80141
|
scriptTag2.onerror = () => {
|
|
80122
|
-
var
|
|
80142
|
+
var _a2;
|
|
80123
80143
|
setScriptLoadedSuccessfully(false);
|
|
80124
|
-
(
|
|
80144
|
+
(_a2 = onScriptLoadErrorRef.current) === null || _a2 === void 0 ? void 0 : _a2.call(onScriptLoadErrorRef);
|
|
80125
80145
|
};
|
|
80126
80146
|
document.body.appendChild(scriptTag2);
|
|
80127
80147
|
return () => {
|
|
@@ -80157,17 +80177,17 @@ function useGoogleLogin({ flow = "implicit", scope = "", onSuccess, onError, ...
|
|
|
80157
80177
|
const onErrorRef = useRef(onError);
|
|
80158
80178
|
onErrorRef.current = onError;
|
|
80159
80179
|
useEffect(() => {
|
|
80160
|
-
var
|
|
80180
|
+
var _a2;
|
|
80161
80181
|
if (!scriptLoadedSuccessfully)
|
|
80162
80182
|
return;
|
|
80163
80183
|
const clientMethod = flow === "implicit" ? "initTokenClient" : "initCodeClient";
|
|
80164
|
-
const client = (
|
|
80184
|
+
const client = (_a2 = window.google) === null || _a2 === void 0 ? void 0 : _a2.accounts.oauth2[clientMethod]({
|
|
80165
80185
|
client_id: clientId,
|
|
80166
80186
|
scope: `openid profile email ${scope}`,
|
|
80167
80187
|
callback: (response) => {
|
|
80168
|
-
var
|
|
80188
|
+
var _a3, _b;
|
|
80169
80189
|
if (response.error)
|
|
80170
|
-
return (
|
|
80190
|
+
return (_a3 = onErrorRef.current) === null || _a3 === void 0 ? void 0 : _a3.call(onErrorRef, response);
|
|
80171
80191
|
(_b = onSuccessRef.current) === null || _b === void 0 ? void 0 : _b.call(onSuccessRef, response);
|
|
80172
80192
|
},
|
|
80173
80193
|
...props
|
|
@@ -84954,12 +84974,12 @@ const BingButton$1 = ({
|
|
|
84954
84974
|
}, t2("CONNECT")));
|
|
84955
84975
|
};
|
|
84956
84976
|
const useConnect = ({ venueId }) => {
|
|
84957
|
-
var
|
|
84977
|
+
var _a2;
|
|
84958
84978
|
const { data: data2, isLoading, reload } = useFetch(GetVenueListingModule, {
|
|
84959
84979
|
cacheId: `module-${venueId}`,
|
|
84960
84980
|
venueId
|
|
84961
84981
|
});
|
|
84962
|
-
const activeModules = (
|
|
84982
|
+
const activeModules = (_a2 = data2 == null ? void 0 : data2.data.map(({ module: module2 }) => module2.name)) != null ? _a2 : [];
|
|
84963
84983
|
const FacebookConnected = activeModules.includes("Facebook");
|
|
84964
84984
|
const GoogleConnected = activeModules.includes("Google");
|
|
84965
84985
|
const BingConnected = activeModules.includes("Bing");
|
|
@@ -91269,8 +91289,8 @@ const AddressAutoComplete = () => {
|
|
|
91269
91289
|
const handelLoadSuggestions = (e3) => {
|
|
91270
91290
|
e3.persist();
|
|
91271
91291
|
setTimeout(() => {
|
|
91272
|
-
var
|
|
91273
|
-
void handelChandeAddress((
|
|
91292
|
+
var _a2;
|
|
91293
|
+
void handelChandeAddress((_a2 = e3.target) == null ? void 0 : _a2.value);
|
|
91274
91294
|
}, 700);
|
|
91275
91295
|
};
|
|
91276
91296
|
const onSelectSuggestion = ({ value: value2 }) => {
|
|
@@ -91432,8 +91452,8 @@ const CardOpeningHours$1 = ({
|
|
|
91432
91452
|
}, /* @__PURE__ */ React__default.createElement(UIList, {
|
|
91433
91453
|
mode: "vertical"
|
|
91434
91454
|
}, weekdays.map((weekday2) => {
|
|
91435
|
-
var
|
|
91436
|
-
const day2 = (
|
|
91455
|
+
var _a2;
|
|
91456
|
+
const day2 = (_a2 = values == null ? void 0 : values.regularHours) == null ? void 0 : _a2[weekday2 == null ? void 0 : weekday2.id];
|
|
91437
91457
|
if (!day2) {
|
|
91438
91458
|
return null;
|
|
91439
91459
|
}
|
|
@@ -92180,11 +92200,11 @@ const SelectAttribute = ({
|
|
|
92180
92200
|
}, position2 === "bottom" && renderSelectedItems()));
|
|
92181
92201
|
};
|
|
92182
92202
|
const AttributesExtra = ({ attributes: attributes2 }) => {
|
|
92183
|
-
var
|
|
92203
|
+
var _a2;
|
|
92184
92204
|
if (attributes2.length === 0) {
|
|
92185
92205
|
return null;
|
|
92186
92206
|
}
|
|
92187
|
-
const name = (
|
|
92207
|
+
const name = (_a2 = attributes2[0]) == null ? void 0 : _a2.typeName;
|
|
92188
92208
|
return /* @__PURE__ */ React__default.createElement(SelectAttribute, {
|
|
92189
92209
|
options: attributes2,
|
|
92190
92210
|
label: `Extra ${name} attributes`,
|
|
@@ -92706,7 +92726,7 @@ var FILES_TO_IGNORE = [
|
|
|
92706
92726
|
];
|
|
92707
92727
|
function fromEvent(evt) {
|
|
92708
92728
|
return __awaiter(this, void 0, void 0, function() {
|
|
92709
|
-
return __generator(this, function(
|
|
92729
|
+
return __generator(this, function(_a2) {
|
|
92710
92730
|
if (isObject2(evt) && isDataTransfer(evt.dataTransfer)) {
|
|
92711
92731
|
return [2, getDataTransferFiles(evt.dataTransfer, evt.type)];
|
|
92712
92732
|
} else if (isChangeEvt(evt)) {
|
|
@@ -92737,14 +92757,14 @@ function getInputFiles(evt) {
|
|
|
92737
92757
|
function getFsHandleFiles(handles) {
|
|
92738
92758
|
return __awaiter(this, void 0, void 0, function() {
|
|
92739
92759
|
var files;
|
|
92740
|
-
return __generator(this, function(
|
|
92741
|
-
switch (
|
|
92760
|
+
return __generator(this, function(_a2) {
|
|
92761
|
+
switch (_a2.label) {
|
|
92742
92762
|
case 0:
|
|
92743
92763
|
return [4, Promise.all(handles.map(function(h2) {
|
|
92744
92764
|
return h2.getFile();
|
|
92745
92765
|
}))];
|
|
92746
92766
|
case 1:
|
|
92747
|
-
files =
|
|
92767
|
+
files = _a2.sent();
|
|
92748
92768
|
return [2, files.map(function(file2) {
|
|
92749
92769
|
return toFileWithPath(file2);
|
|
92750
92770
|
})];
|
|
@@ -92755,8 +92775,8 @@ function getFsHandleFiles(handles) {
|
|
|
92755
92775
|
function getDataTransferFiles(dt, type4) {
|
|
92756
92776
|
return __awaiter(this, void 0, void 0, function() {
|
|
92757
92777
|
var items, files;
|
|
92758
|
-
return __generator(this, function(
|
|
92759
|
-
switch (
|
|
92778
|
+
return __generator(this, function(_a2) {
|
|
92779
|
+
switch (_a2.label) {
|
|
92760
92780
|
case 0:
|
|
92761
92781
|
if (!dt.items)
|
|
92762
92782
|
return [3, 2];
|
|
@@ -92768,7 +92788,7 @@ function getDataTransferFiles(dt, type4) {
|
|
|
92768
92788
|
}
|
|
92769
92789
|
return [4, Promise.all(items.map(toFilePromises))];
|
|
92770
92790
|
case 1:
|
|
92771
|
-
files =
|
|
92791
|
+
files = _a2.sent();
|
|
92772
92792
|
return [2, noIgnoredFiles(flatten(files))];
|
|
92773
92793
|
case 2:
|
|
92774
92794
|
return [2, noIgnoredFiles(fromList(dt.files).map(function(file2) {
|
|
@@ -92819,7 +92839,7 @@ function fromDataTransferItem(item2) {
|
|
|
92819
92839
|
}
|
|
92820
92840
|
function fromEntry(entry) {
|
|
92821
92841
|
return __awaiter(this, void 0, void 0, function() {
|
|
92822
|
-
return __generator(this, function(
|
|
92842
|
+
return __generator(this, function(_a2) {
|
|
92823
92843
|
return [2, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];
|
|
92824
92844
|
});
|
|
92825
92845
|
});
|
|
@@ -92833,21 +92853,21 @@ function fromDirEntry(entry) {
|
|
|
92833
92853
|
reader.readEntries(function(batch) {
|
|
92834
92854
|
return __awaiter(_this, void 0, void 0, function() {
|
|
92835
92855
|
var files, err_1, items;
|
|
92836
|
-
return __generator(this, function(
|
|
92837
|
-
switch (
|
|
92856
|
+
return __generator(this, function(_a2) {
|
|
92857
|
+
switch (_a2.label) {
|
|
92838
92858
|
case 0:
|
|
92839
92859
|
if (!!batch.length)
|
|
92840
92860
|
return [3, 5];
|
|
92841
|
-
|
|
92861
|
+
_a2.label = 1;
|
|
92842
92862
|
case 1:
|
|
92843
|
-
|
|
92863
|
+
_a2.trys.push([1, 3, , 4]);
|
|
92844
92864
|
return [4, Promise.all(entries)];
|
|
92845
92865
|
case 2:
|
|
92846
|
-
files =
|
|
92866
|
+
files = _a2.sent();
|
|
92847
92867
|
resolve(files);
|
|
92848
92868
|
return [3, 4];
|
|
92849
92869
|
case 3:
|
|
92850
|
-
err_1 =
|
|
92870
|
+
err_1 = _a2.sent();
|
|
92851
92871
|
reject(err_1);
|
|
92852
92872
|
return [3, 4];
|
|
92853
92873
|
case 4:
|
|
@@ -92856,7 +92876,7 @@ function fromDirEntry(entry) {
|
|
|
92856
92876
|
items = Promise.all(batch.map(fromEntry));
|
|
92857
92877
|
entries.push(items);
|
|
92858
92878
|
readEntries();
|
|
92859
|
-
|
|
92879
|
+
_a2.label = 6;
|
|
92860
92880
|
case 6:
|
|
92861
92881
|
return [2];
|
|
92862
92882
|
}
|
|
@@ -92871,7 +92891,7 @@ function fromDirEntry(entry) {
|
|
|
92871
92891
|
}
|
|
92872
92892
|
function fromFileEntry(entry) {
|
|
92873
92893
|
return __awaiter(this, void 0, void 0, function() {
|
|
92874
|
-
return __generator(this, function(
|
|
92894
|
+
return __generator(this, function(_a2) {
|
|
92875
92895
|
return [2, new Promise(function(resolve, reject) {
|
|
92876
92896
|
entry.file(function(file2) {
|
|
92877
92897
|
var fwp = toFileWithPath(file2, entry.fullPath);
|
|
@@ -93813,7 +93833,7 @@ const MediaPage = () => {
|
|
|
93813
93833
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
93814
93834
|
className: styles$G["container__files"]
|
|
93815
93835
|
}, filesToShow.map((file2, index2) => {
|
|
93816
|
-
var
|
|
93836
|
+
var _a2, _b, _c;
|
|
93817
93837
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
93818
93838
|
key: file2.index,
|
|
93819
93839
|
className: styles$G.file
|
|
@@ -93835,7 +93855,7 @@ const MediaPage = () => {
|
|
|
93835
93855
|
id: "syncChannel.google",
|
|
93836
93856
|
name: "google",
|
|
93837
93857
|
value: "google",
|
|
93838
|
-
checked: (
|
|
93858
|
+
checked: (_a2 = file2.syncChannels) == null ? void 0 : _a2.includes("google"),
|
|
93839
93859
|
onChange: (event) => updateSyncChannels(event, file2.index)
|
|
93840
93860
|
}), /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("img", {
|
|
93841
93861
|
src: google$1,
|
|
@@ -93882,7 +93902,7 @@ const UploadPhoto = async ({
|
|
|
93882
93902
|
venueListingId,
|
|
93883
93903
|
media
|
|
93884
93904
|
}) => {
|
|
93885
|
-
var
|
|
93905
|
+
var _a2;
|
|
93886
93906
|
const formData = new FormData();
|
|
93887
93907
|
if (media.file) {
|
|
93888
93908
|
formData.append("file", media.file);
|
|
@@ -93890,7 +93910,7 @@ const UploadPhoto = async ({
|
|
|
93890
93910
|
formData.append("type", "photo");
|
|
93891
93911
|
formData.append("category", media.category);
|
|
93892
93912
|
formData.append("description", media.description || "");
|
|
93893
|
-
(
|
|
93913
|
+
(_a2 = media.syncChannels) == null ? void 0 : _a2.map((c2) => {
|
|
93894
93914
|
formData.append("syncChannels[]", c2);
|
|
93895
93915
|
});
|
|
93896
93916
|
if (media.id) {
|
|
@@ -93986,7 +94006,7 @@ const Form$5 = ({
|
|
|
93986
94006
|
}, t2("SYNC"))))));
|
|
93987
94007
|
};
|
|
93988
94008
|
const MediaCard = ({ values, onClickEdit }) => {
|
|
93989
|
-
var
|
|
94009
|
+
var _a2;
|
|
93990
94010
|
const { t: t2 } = useTranslation();
|
|
93991
94011
|
return /* @__PURE__ */ React__default.createElement(Card, {
|
|
93992
94012
|
header: {
|
|
@@ -94004,7 +94024,7 @@ const MediaCard = ({ values, onClickEdit }) => {
|
|
|
94004
94024
|
maxHeight: 400,
|
|
94005
94025
|
overflow: "scroll"
|
|
94006
94026
|
}
|
|
94007
|
-
}, (
|
|
94027
|
+
}, (_a2 = values.media) == null ? void 0 : _a2.map(({ id: id2, url: url2 }) => /* @__PURE__ */ React__default.createElement("img", {
|
|
94008
94028
|
src: url2,
|
|
94009
94029
|
key: id2,
|
|
94010
94030
|
style: {
|
|
@@ -94037,7 +94057,7 @@ var styles$F = {
|
|
|
94037
94057
|
link
|
|
94038
94058
|
};
|
|
94039
94059
|
const CardLinks = ({ onClickEdit, values }) => {
|
|
94040
|
-
var
|
|
94060
|
+
var _a2;
|
|
94041
94061
|
const { t: t2 } = useTranslation();
|
|
94042
94062
|
return /* @__PURE__ */ React__default.createElement(Card, {
|
|
94043
94063
|
header: {
|
|
@@ -94057,7 +94077,7 @@ const CardLinks = ({ onClickEdit, values }) => {
|
|
|
94057
94077
|
}, /* @__PURE__ */ React__default.createElement(Item, {
|
|
94058
94078
|
label: "Website",
|
|
94059
94079
|
text: values.urlWebsite
|
|
94060
|
-
})), (
|
|
94080
|
+
})), (_a2 = values.attributesLinks) == null ? void 0 : _a2.map(({ displayName, value: value2 }, key2) => /* @__PURE__ */ React__default.createElement("a", {
|
|
94061
94081
|
href: value2,
|
|
94062
94082
|
key: `a-${key2}`,
|
|
94063
94083
|
target: "_blank",
|
|
@@ -94104,12 +94124,12 @@ const Form$4 = ({
|
|
|
94104
94124
|
reload,
|
|
94105
94125
|
venueListingId
|
|
94106
94126
|
}) => {
|
|
94107
|
-
var
|
|
94127
|
+
var _a2;
|
|
94108
94128
|
const { t: t2 } = useTranslation();
|
|
94109
94129
|
const { data: attributes2 = [], isLoading } = useFetch(formatData$7, {
|
|
94110
94130
|
cacheId: "listingAttributes"
|
|
94111
94131
|
});
|
|
94112
|
-
const attrLinks = (attributes2 == null ? void 0 : attributes2.length) > 0 ? (
|
|
94132
|
+
const attrLinks = (attributes2 == null ? void 0 : attributes2.length) > 0 ? (_a2 = attributes2.find((a2) => a2.title === "Place page URLs")) == null ? void 0 : _a2.openDefault : null;
|
|
94113
94133
|
const { isExecuting, execute } = useService(UpdateVenueListing, {
|
|
94114
94134
|
onSuccess: async () => {
|
|
94115
94135
|
onCloseForm();
|
|
@@ -94136,8 +94156,8 @@ const Form$4 = ({
|
|
|
94136
94156
|
}), /* @__PURE__ */ React__default.createElement("div", null), /* @__PURE__ */ React__default.createElement("h4", {
|
|
94137
94157
|
style: { marginBottom: 0, marginTop: "10px" }
|
|
94138
94158
|
}, "GOOGLE MY BUSINESS LINKS"), /* @__PURE__ */ React__default.createElement("hr", null), attrLinks == null ? void 0 : attrLinks.map((a2, key2) => {
|
|
94139
|
-
var
|
|
94140
|
-
const value2 = (
|
|
94159
|
+
var _a3;
|
|
94160
|
+
const value2 = (_a3 = initialValues == null ? void 0 : initialValues.attributesLinks) == null ? void 0 : _a3.find((v2, key22) => v2.id === a2.id);
|
|
94141
94161
|
return /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
94142
94162
|
key: key2,
|
|
94143
94163
|
id: `attrLinks[${a2.id}]`,
|
|
@@ -94621,9 +94641,9 @@ const FbButton = ({
|
|
|
94621
94641
|
onSuccess({ id: values.id, accounts: values.accounts.data });
|
|
94622
94642
|
};
|
|
94623
94643
|
useEffect(() => {
|
|
94624
|
-
var
|
|
94644
|
+
var _a2;
|
|
94625
94645
|
if (autoLoad) {
|
|
94626
|
-
(
|
|
94646
|
+
(_a2 = ref.current) == null ? void 0 : _a2.click();
|
|
94627
94647
|
}
|
|
94628
94648
|
}, [autoLoad]);
|
|
94629
94649
|
if (isConnected) {
|
|
@@ -95070,6 +95090,9 @@ const VenueListingDetail = ({
|
|
|
95070
95090
|
const clearModuleToDisconnect = () => setModuleToDisconnect(void 0);
|
|
95071
95091
|
const clearModuleToConnect = () => setModuleToConnect(void 0);
|
|
95072
95092
|
const [showAppleConnectModal, setShowAppleConnectModal] = useState(false);
|
|
95093
|
+
const [showNotConnectedChannelsModal, setShowNotConnectedChannelsModal] = useState(false);
|
|
95094
|
+
const onOpenNotConnectedChannelsModal = () => setShowNotConnectedChannelsModal(true);
|
|
95095
|
+
const onCloseNotConnectedChannelsModal = () => setShowNotConnectedChannelsModal(false);
|
|
95073
95096
|
const [googlePublishing, setGooglePublishing] = useState();
|
|
95074
95097
|
const [facebookPublishing, setFacebookPublishing] = useState();
|
|
95075
95098
|
const [googleErrors, setGoogleErrors] = useState();
|
|
@@ -95080,7 +95103,7 @@ const VenueListingDetail = ({
|
|
|
95080
95103
|
venueListingId
|
|
95081
95104
|
});
|
|
95082
95105
|
const venueId = data2 == null ? void 0 : data2.venueId;
|
|
95083
|
-
const { reload: _reloadConnect } = useConnect({ venueId });
|
|
95106
|
+
const { FacebookConnected, GoogleConnected, BingConnected, AppleConnected, reload: _reloadConnect } = useConnect({ venueId });
|
|
95084
95107
|
const { execute: publishGoogle, isExecuting: isPublishingGoogle, error: errorGoogle, data: rGoogle } = useService(PublishVenueListing);
|
|
95085
95108
|
const { execute: publishFacebook, isExecuting: isPublishingFacebook, error: errorFacebook, data: responseFacebook } = useService(PublishVenueListing);
|
|
95086
95109
|
const reloadConnect = () => {
|
|
@@ -95129,9 +95152,9 @@ const VenueListingDetail = ({
|
|
|
95129
95152
|
});
|
|
95130
95153
|
};
|
|
95131
95154
|
const handleOnPublish = async () => {
|
|
95132
|
-
var
|
|
95155
|
+
var _a2;
|
|
95133
95156
|
setOpenPublishModal(true);
|
|
95134
|
-
if (!((
|
|
95157
|
+
if (!((_a2 = data2 == null ? void 0 : data2.mainCategory) == null ? void 0 : _a2.id)) {
|
|
95135
95158
|
showMessageError("Main category is required");
|
|
95136
95159
|
return;
|
|
95137
95160
|
}
|
|
@@ -95152,6 +95175,9 @@ const VenueListingDetail = ({
|
|
|
95152
95175
|
} else {
|
|
95153
95176
|
setFacebookPublishing("success");
|
|
95154
95177
|
}
|
|
95178
|
+
if (!FacebookConnected && !GoogleConnected && !BingConnected && !AppleConnected) {
|
|
95179
|
+
onOpenNotConnectedChannelsModal();
|
|
95180
|
+
}
|
|
95155
95181
|
await reload();
|
|
95156
95182
|
};
|
|
95157
95183
|
if (isLoading) {
|
|
@@ -95250,6 +95276,15 @@ const VenueListingDetail = ({
|
|
|
95250
95276
|
onClose: clearTemporaryClosed,
|
|
95251
95277
|
isLoading: isUpdating,
|
|
95252
95278
|
width: 500
|
|
95279
|
+
}), /* @__PURE__ */ React__default.createElement(ModalConfirmation, {
|
|
95280
|
+
title: t$3("NoChannelsConnected"),
|
|
95281
|
+
message: t$3("NoChannelsConnectedDesc"),
|
|
95282
|
+
showSubmitButton: false,
|
|
95283
|
+
open: showNotConnectedChannelsModal,
|
|
95284
|
+
onClose: onCloseNotConnectedChannelsModal,
|
|
95285
|
+
cancelButtonText: "CLOSE",
|
|
95286
|
+
icon: "link",
|
|
95287
|
+
width: 500
|
|
95253
95288
|
}), /* @__PURE__ */ React__default.createElement(ModalOnboarding, {
|
|
95254
95289
|
onClose: () => setOpenOnboarding(false),
|
|
95255
95290
|
venue: data2 && (data2 == null ? void 0 : data2.businessName),
|
|
@@ -95854,7 +95889,7 @@ const UpdateResbook = async ({
|
|
|
95854
95889
|
table_id,
|
|
95855
95890
|
module: module2 = "table"
|
|
95856
95891
|
}) => {
|
|
95857
|
-
var
|
|
95892
|
+
var _a2, _b;
|
|
95858
95893
|
switch (module2) {
|
|
95859
95894
|
case "table":
|
|
95860
95895
|
await instance$1.put(`${BASE_URL}${venue_id}/tables/${table_id}`, formarTableRules(data2));
|
|
@@ -95870,7 +95905,7 @@ const UpdateResbook = async ({
|
|
|
95870
95905
|
return { data: "updated" };
|
|
95871
95906
|
case "specialDate":
|
|
95872
95907
|
if (table_id) {
|
|
95873
|
-
instance$1.put(`${BASE_URL}${venue_id}/special-dates/${table_id}`, formarSpecialHours((
|
|
95908
|
+
instance$1.put(`${BASE_URL}${venue_id}/special-dates/${table_id}`, formarSpecialHours((_a2 = Object.values(data2)[0]) != null ? _a2 : {}));
|
|
95874
95909
|
return { data: "updated" };
|
|
95875
95910
|
} else {
|
|
95876
95911
|
instance$1.post(`${BASE_URL}${venue_id}/special-dates`, formarSpecialHours((_b = Object.values(data2)[0]) != null ? _b : {}));
|
|
@@ -96900,10 +96935,10 @@ var styles$h = {
|
|
|
96900
96935
|
date: date3
|
|
96901
96936
|
};
|
|
96902
96937
|
const SpecificHour = ({ id: id2 }) => {
|
|
96903
|
-
var
|
|
96938
|
+
var _a2;
|
|
96904
96939
|
const [field2, meta, helpers] = useField("");
|
|
96905
96940
|
useTranslation();
|
|
96906
|
-
const { closed = true, timeslots = 1, date: date4 } = (
|
|
96941
|
+
const { closed = true, timeslots = 1, date: date4 } = (_a2 = field2.value[`${id2}`]) != null ? _a2 : {};
|
|
96907
96942
|
const {
|
|
96908
96943
|
setFieldValue
|
|
96909
96944
|
} = useFormikContext();
|
|
@@ -96943,14 +96978,14 @@ const SpecificHours = ({ value: value2, reload, id: id2, venue_id, onDeleteSpeci
|
|
|
96943
96978
|
const [isEditing, setIsEditing] = useState(false);
|
|
96944
96979
|
const { isExecuting, execute } = useService(UpdateResbook, {});
|
|
96945
96980
|
const removeSpecialHour = async () => {
|
|
96946
|
-
var
|
|
96947
|
-
await execute({ venue_id, module: "deleteSpecialDate", table_id: (_b = (
|
|
96981
|
+
var _a2, _b, _c, _d;
|
|
96982
|
+
await execute({ venue_id, module: "deleteSpecialDate", table_id: (_b = (_a2 = Object.values(value2)[0]) == null ? void 0 : _a2.id) != null ? _b : null });
|
|
96948
96983
|
onDeleteSpecialHour((_d = (_c = Object.values(value2)[0]) == null ? void 0 : _c.id) != null ? _d : null);
|
|
96949
96984
|
await reload();
|
|
96950
96985
|
};
|
|
96951
96986
|
const handleSubmit = async (data2) => {
|
|
96952
|
-
var
|
|
96953
|
-
await execute({ venue_id, data: data2, module: "specialDate", table_id: (
|
|
96987
|
+
var _a2;
|
|
96988
|
+
await execute({ venue_id, data: data2, module: "specialDate", table_id: (_a2 = data2[`${id2}`].id) != null ? _a2 : null });
|
|
96954
96989
|
setIsEditing(false);
|
|
96955
96990
|
await reload();
|
|
96956
96991
|
};
|
|
@@ -97059,7 +97094,7 @@ const SpecialDates = ({ venue_id }) => {
|
|
|
97059
97094
|
const formatFormValues = () => {
|
|
97060
97095
|
const result = [];
|
|
97061
97096
|
data2.map((item2, index2) => {
|
|
97062
|
-
var
|
|
97097
|
+
var _a2, _b, _c;
|
|
97063
97098
|
const { startDate, endDate, closed, timeSlots } = item2;
|
|
97064
97099
|
if (timeSlots && timeSlots.length && timeSlots.length > 0) {
|
|
97065
97100
|
result.push({
|
|
@@ -97070,7 +97105,7 @@ const SpecialDates = ({ venue_id }) => {
|
|
|
97070
97105
|
start: formatDate2(startDate),
|
|
97071
97106
|
end: formatDate2(endDate)
|
|
97072
97107
|
},
|
|
97073
|
-
id: (
|
|
97108
|
+
id: (_a2 = item2.id) != null ? _a2 : null,
|
|
97074
97109
|
index: index2
|
|
97075
97110
|
});
|
|
97076
97111
|
} else {
|
|
@@ -97150,9 +97185,9 @@ const GetBookings = async ({
|
|
|
97150
97185
|
};
|
|
97151
97186
|
const formatData = (data2) => {
|
|
97152
97187
|
return data2.map((item2) => {
|
|
97153
|
-
var
|
|
97188
|
+
var _a2, _b, _c;
|
|
97154
97189
|
return {
|
|
97155
|
-
firstName: (
|
|
97190
|
+
firstName: (_a2 = item2.contact.firstname) != null ? _a2 : "",
|
|
97156
97191
|
name: `${(_b = item2.contact.firstname) != null ? _b : ""} ${(_c = item2.contact.lastname) != null ? _c : ""}`,
|
|
97157
97192
|
tableName: item2.table.name,
|
|
97158
97193
|
notes: item2.notes,
|
|
@@ -97306,8 +97341,8 @@ const CustomDatePicker = ({
|
|
|
97306
97341
|
}, [selectedDate]);
|
|
97307
97342
|
useEffect(() => {
|
|
97308
97343
|
function handleDocumentClick(event) {
|
|
97309
|
-
var
|
|
97310
|
-
if (datePickerRef.current && typeof ((
|
|
97344
|
+
var _a2, _b;
|
|
97345
|
+
if (datePickerRef.current && typeof ((_a2 = event == null ? void 0 : event.target) == null ? void 0 : _a2.className) === "string" && !((_b = event == null ? void 0 : event.target) == null ? void 0 : _b.className.includes("ant"))) {
|
|
97311
97346
|
setDatePickerOpen(false);
|
|
97312
97347
|
}
|
|
97313
97348
|
}
|
|
@@ -99297,7 +99332,7 @@ const TableFilters$1 = ({ venueId, params, setParams, reload, setBookingValues,
|
|
|
99297
99332
|
})));
|
|
99298
99333
|
};
|
|
99299
99334
|
const TableRow$1 = ({ row: row2, setSelectedTable }) => {
|
|
99300
|
-
var
|
|
99335
|
+
var _a2, _b;
|
|
99301
99336
|
return /* @__PURE__ */ React__default.createElement("tr", {
|
|
99302
99337
|
className: styles$d.item,
|
|
99303
99338
|
onClick: () => setSelectedTable(row2)
|
|
@@ -99305,7 +99340,7 @@ const TableRow$1 = ({ row: row2, setSelectedTable }) => {
|
|
|
99305
99340
|
style: { textAlign: "left", paddingTop: 10, paddingBottom: 10 }
|
|
99306
99341
|
}, `${row2.name} ${row2.area ? "(" + row2.area + ")" : ""}`), /* @__PURE__ */ React__default.createElement("td", {
|
|
99307
99342
|
style: { textAlign: "center" }
|
|
99308
|
-
}, `${(
|
|
99343
|
+
}, `${(_a2 = row2.minCapacity) != null ? _a2 : "?"} - ${(_b = row2.maxCapacity) != null ? _b : "?"}`), /* @__PURE__ */ React__default.createElement("td", {
|
|
99309
99344
|
style: { textAlign: "center" }
|
|
99310
99345
|
}, " ", row2.nextBookingIn ? /* @__PURE__ */ React__default.createElement(TimeFormatter, {
|
|
99311
99346
|
seconds: row2.nextBookingIn,
|
|
@@ -99466,7 +99501,7 @@ const ContactDetailsForm = ({ venueId, selectedTable, setSelectedTable, setCreat
|
|
|
99466
99501
|
});
|
|
99467
99502
|
const { execute, data: data2, isExecuting } = useService(AddBooking);
|
|
99468
99503
|
const handleOnSubmit = async (values) => {
|
|
99469
|
-
var
|
|
99504
|
+
var _a2, _b;
|
|
99470
99505
|
const toSend = {
|
|
99471
99506
|
partySize: bookingValues.partySize.id ? bookingValues.partySize.id : selectedTable.maxCapacity,
|
|
99472
99507
|
table: selectedTable.id,
|
|
@@ -99489,7 +99524,7 @@ const ContactDetailsForm = ({ venueId, selectedTable, setSelectedTable, setCreat
|
|
|
99489
99524
|
setCreated(true);
|
|
99490
99525
|
}
|
|
99491
99526
|
setSelectedTable(null);
|
|
99492
|
-
setCreated({ ...toSend, time: bookingValues.time.id, area: (
|
|
99527
|
+
setCreated({ ...toSend, time: bookingValues.time.id, area: (_a2 = bookingValues.area.id) != null ? _a2 : null, dateString: (_b = new Date(`${bookingValues.date} ${bookingValues.time.id}`).toDateString()) != null ? _b : "?" });
|
|
99493
99528
|
reloadMainTable();
|
|
99494
99529
|
};
|
|
99495
99530
|
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("h4", null, t2("CONTACTDETAILS")), /* @__PURE__ */ React__default.createElement(Formik, {
|
|
@@ -99501,7 +99536,7 @@ const ContactDetailsForm = ({ venueId, selectedTable, setSelectedTable, setCreat
|
|
|
99501
99536
|
})));
|
|
99502
99537
|
};
|
|
99503
99538
|
const ContactDetails = ({ setSelectedTable, selectedTable, venueId, setCreated, bookingValues, reloadMainTable, currentTimeZone }) => {
|
|
99504
|
-
var
|
|
99539
|
+
var _a2, _b, _c;
|
|
99505
99540
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
99506
99541
|
className: ""
|
|
99507
99542
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -99520,7 +99555,7 @@ const ContactDetails = ({ setSelectedTable, selectedTable, venueId, setCreated,
|
|
|
99520
99555
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99521
99556
|
icon: "clock",
|
|
99522
99557
|
className: "mr-2"
|
|
99523
|
-
}), (
|
|
99558
|
+
}), (_a2 = bookingValues == null ? void 0 : bookingValues.time.id) != null ? _a2 : "---"), /* @__PURE__ */ React__default.createElement("div", {
|
|
99524
99559
|
style: { display: "flex" }
|
|
99525
99560
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99526
99561
|
icon: "people",
|
|
@@ -99541,7 +99576,7 @@ const ContactDetails = ({ setSelectedTable, selectedTable, venueId, setCreated,
|
|
|
99541
99576
|
}));
|
|
99542
99577
|
};
|
|
99543
99578
|
const BookingConfirmation = ({ bookingDetails }) => {
|
|
99544
|
-
var
|
|
99579
|
+
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
99545
99580
|
const { t: t2 } = useTranslation();
|
|
99546
99581
|
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("h1", {
|
|
99547
99582
|
style: { textAlign: "center" }
|
|
@@ -99552,7 +99587,7 @@ const BookingConfirmation = ({ bookingDetails }) => {
|
|
|
99552
99587
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99553
99588
|
icon: "calendar",
|
|
99554
99589
|
className: "mr-2"
|
|
99555
|
-
}), (
|
|
99590
|
+
}), (_a2 = bookingDetails == null ? void 0 : bookingDetails.dateString) != null ? _a2 : "?"), /* @__PURE__ */ React__default.createElement("div", {
|
|
99556
99591
|
style: { display: "flex" }
|
|
99557
99592
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99558
99593
|
icon: "clock",
|
|
@@ -99728,7 +99763,7 @@ const CancelReservationModal = ({ onAccept, isLoading, message: message2, title:
|
|
|
99728
99763
|
}, t2("ACCEPT")))))));
|
|
99729
99764
|
};
|
|
99730
99765
|
const ReservationDetail = ({ open, onClose: onClose2, venueId, reloadMainTable, selectedRow, currentTimeZone, setSelectedRow }) => {
|
|
99731
|
-
var
|
|
99766
|
+
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
99732
99767
|
const { t: t2 } = useTranslation();
|
|
99733
99768
|
const [openCancelReservationModal, setOpenCancelReservationModal] = useState(false);
|
|
99734
99769
|
const onOpenCancelRevModal = () => setOpenCancelReservationModal(true);
|
|
@@ -99777,7 +99812,7 @@ const ReservationDetail = ({ open, onClose: onClose2, venueId, reloadMainTable,
|
|
|
99777
99812
|
}, t2("CHANNEL"), ":"), selectedRow.bookingChannelLogo && /* @__PURE__ */ React__default.createElement("img", {
|
|
99778
99813
|
src: selectedRow.bookingChannelLogo,
|
|
99779
99814
|
style: { width: 25, height: 25 }
|
|
99780
|
-
}), /* @__PURE__ */ React__default.createElement("div", null, (
|
|
99815
|
+
}), /* @__PURE__ */ React__default.createElement("div", null, (_a2 = selectedRow.bookingChannelName) != null ? _a2 : "---")), /* @__PURE__ */ React__default.createElement("div", {
|
|
99781
99816
|
style: { display: "flex", justifyContent: "start", flexDirection: "row", gap: 10 }
|
|
99782
99817
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
99783
99818
|
style: { fontWeight: "bold" }
|
|
@@ -100323,7 +100358,7 @@ const CustomTable = ({
|
|
|
100323
100358
|
classNameContent,
|
|
100324
100359
|
...paginationProps
|
|
100325
100360
|
}) => {
|
|
100326
|
-
var
|
|
100361
|
+
var _a2;
|
|
100327
100362
|
const { t: t2 } = useTranslation();
|
|
100328
100363
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
100329
100364
|
className: classNames$2(styles$a.tableContainer, classNameConatiner)
|
|
@@ -100339,7 +100374,7 @@ const CustomTable = ({
|
|
|
100339
100374
|
className: styles$a.th,
|
|
100340
100375
|
key: h2.id
|
|
100341
100376
|
}, h2.label)))), isLoading && /* @__PURE__ */ React__default.createElement(LoadingBody, {
|
|
100342
|
-
rows: (
|
|
100377
|
+
rows: (_a2 = paginationProps == null ? void 0 : paginationProps.rows) != null ? _a2 : 1,
|
|
100343
100378
|
items: header2.length
|
|
100344
100379
|
}), !isLoading && data2.length > 0 && /* @__PURE__ */ React__default.createElement("tbody", {
|
|
100345
100380
|
className: styles$a.tbody
|
|
@@ -100445,8 +100480,8 @@ const LoadingBody = ({
|
|
|
100445
100480
|
}))));
|
|
100446
100481
|
}));
|
|
100447
100482
|
const renderCountry = (country) => {
|
|
100448
|
-
var
|
|
100449
|
-
return (_b = (
|
|
100483
|
+
var _a2, _b;
|
|
100484
|
+
return (_b = (_a2 = _23.find(countries$1, (c2) => c2.id === country)) == null ? void 0 : _a2.label) != null ? _b : "";
|
|
100450
100485
|
};
|
|
100451
100486
|
const ConnectRestaurants = ({ open, onClose: onClose2, bookingChannel }) => {
|
|
100452
100487
|
const { t: t2 } = useTranslation();
|
|
@@ -100784,7 +100819,8 @@ const CommercialFeeTypes = {
|
|
|
100784
100819
|
subscription: "month",
|
|
100785
100820
|
na: "Free"
|
|
100786
100821
|
};
|
|
100787
|
-
const
|
|
100822
|
+
const sessionData = sessionStorage.getItem("sdk_user");
|
|
100823
|
+
const userData = sessionData ? JSON.parse(sessionData) : {};
|
|
100788
100824
|
const conditionsContainer$2 = "_conditionsContainer_1yf4e_1";
|
|
100789
100825
|
const conditionsCardContainer$2 = "_conditionsCardContainer_1yf4e_7";
|
|
100790
100826
|
var styles$9 = {
|
|
@@ -100792,12 +100828,12 @@ var styles$9 = {
|
|
|
100792
100828
|
conditionsCardContainer: conditionsCardContainer$2
|
|
100793
100829
|
};
|
|
100794
100830
|
const ChannelPayment = ({ venueListingId, venueId }) => {
|
|
100795
|
-
var
|
|
100831
|
+
var _a2, _b;
|
|
100796
100832
|
const { t: t2 } = useTranslation();
|
|
100797
100833
|
const navigate = useNavigate();
|
|
100798
100834
|
const location2 = useLocation();
|
|
100799
100835
|
const { bookingChannel } = location2.state;
|
|
100800
|
-
const rms = userData.partner;
|
|
100836
|
+
const rms = userData == null ? void 0 : userData.partner;
|
|
100801
100837
|
const { data: data2, isLoading, error: error3 } = useFetch(getCommercialConditionsFinder, {
|
|
100802
100838
|
cacheId: "comercial-conditions",
|
|
100803
100839
|
params: {
|
|
@@ -100826,7 +100862,7 @@ const ChannelPayment = ({ venueListingId, venueId }) => {
|
|
|
100826
100862
|
alt: bookingChannel.name
|
|
100827
100863
|
})), /* @__PURE__ */ React__default.createElement("h3", null, "Subscribe to ", bookingChannel && bookingChannel.name)), /* @__PURE__ */ React__default.createElement("div", {
|
|
100828
100864
|
style: { display: "flex", flexDirection: "column", justifyContent: "start", gap: 20, marginTop: 20 }
|
|
100829
|
-
}, /* @__PURE__ */ React__default.createElement("h5", null, "Commercial conditions & Fees"), /* @__PURE__ */ React__default.createElement("p", null, "Increase your bookings by receiving online reservations directly from your restaurant page on the MICHELIN Guide apps and website."), /* @__PURE__ */ React__default.createElement("p", null, "You will be charged monthly on the total bookings of the month, subject to the following conditions:"), /* @__PURE__ */ React__default.createElement("ul", null, /* @__PURE__ */ React__default.createElement("li", null, ((
|
|
100865
|
+
}, /* @__PURE__ */ React__default.createElement("h5", null, "Commercial conditions & Fees"), /* @__PURE__ */ React__default.createElement("p", null, "Increase your bookings by receiving online reservations directly from your restaurant page on the MICHELIN Guide apps and website."), /* @__PURE__ */ React__default.createElement("p", null, "You will be charged monthly on the total bookings of the month, subject to the following conditions:"), /* @__PURE__ */ React__default.createElement("ul", null, /* @__PURE__ */ React__default.createElement("li", null, ((_a2 = data2.commercialConditions) == null ? void 0 : _a2.fullPrice) / 100, " ", (_b = data2.commercialConditions) == null ? void 0 : _b.currency, " per confirmed ", CommercialFeeTypes[data2.type], " (depending on the country of your restaurant);"), /* @__PURE__ */ React__default.createElement("li", null, "Confirmed covers are defined by the number of people in reservations taken through ", bookingChannel && bookingChannel.name, " that materialised (it does not include no-shows and cancellations reported through ", rms.name, ");"), /* @__PURE__ */ React__default.createElement("li", null, "Invoices will be processed on the 10th of the following month for all the confirmed covers of the previous month.")), /* @__PURE__ */ React__default.createElement("p", null, "Click 'I Agree' to continue to payment.")), /* @__PURE__ */ React__default.createElement("div", {
|
|
100830
100866
|
style: { display: "flex", justifyContent: "center", marginTop: 20 }
|
|
100831
100867
|
}, /* @__PURE__ */ React__default.createElement(Button$3, {
|
|
100832
100868
|
onClick: () => handleOnAgree()
|
|
@@ -100904,9 +100940,9 @@ const ChannelSubscription = ({ venueListingId, venueId }) => {
|
|
|
100904
100940
|
setSubscriptionCompleted(true);
|
|
100905
100941
|
};
|
|
100906
100942
|
const openCheckout = async () => {
|
|
100907
|
-
var
|
|
100943
|
+
var _a2;
|
|
100908
100944
|
const venues = await getVenues({});
|
|
100909
|
-
paddleEmbed(opportunityId, venues && ((
|
|
100945
|
+
paddleEmbed(opportunityId, venues && ((_a2 = venues.data[0]) == null ? void 0 : _a2.id), checkoutComplete);
|
|
100910
100946
|
};
|
|
100911
100947
|
useEffect(() => {
|
|
100912
100948
|
}, []);
|
|
@@ -100995,6 +101031,17 @@ const ChannelManagement = ({
|
|
|
100995
101031
|
venueId,
|
|
100996
101032
|
venueListingId
|
|
100997
101033
|
}) => {
|
|
101034
|
+
useEffect(() => {
|
|
101035
|
+
const script = document.createElement("script");
|
|
101036
|
+
script.src = "https://cdn.paddle.com/paddle/paddle.js";
|
|
101037
|
+
script.async = true;
|
|
101038
|
+
script.onload = () => {
|
|
101039
|
+
};
|
|
101040
|
+
document.body.appendChild(script);
|
|
101041
|
+
return () => {
|
|
101042
|
+
document.body.removeChild(script);
|
|
101043
|
+
};
|
|
101044
|
+
}, []);
|
|
100998
101045
|
return /* @__PURE__ */ React__default.createElement(MemoryRouter, {
|
|
100999
101046
|
initialEntries: ["/channels"]
|
|
101000
101047
|
}, /* @__PURE__ */ React__default.createElement(Routes, null, /* @__PURE__ */ React__default.createElement(Route, {
|
|
@@ -101580,7 +101627,7 @@ const ToolBar = ({ filters: filters2, setFilters, setTotalDays }) => {
|
|
|
101580
101627
|
till: hooks().endOf("week").format("YYYY-MM-DD")
|
|
101581
101628
|
};
|
|
101582
101629
|
const handleOnFilter = (values) => {
|
|
101583
|
-
var
|
|
101630
|
+
var _a2, _b;
|
|
101584
101631
|
const toSend = {
|
|
101585
101632
|
...values.from ? {
|
|
101586
101633
|
["filters[from]"]: values.from
|
|
@@ -101602,7 +101649,7 @@ const ToolBar = ({ filters: filters2, setFilters, setTotalDays }) => {
|
|
|
101602
101649
|
"filters[venues]": values.selectedRestaurants.map((sr) => sr.id)
|
|
101603
101650
|
} : {}
|
|
101604
101651
|
};
|
|
101605
|
-
setTotalDays(hooks((
|
|
101652
|
+
setTotalDays(hooks((_a2 = values.till) != null ? _a2 : null).diff(hooks((_b = values.from) != null ? _b : null), "day") + 1);
|
|
101606
101653
|
setFilters(toSend);
|
|
101607
101654
|
};
|
|
101608
101655
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Row$1, {
|
|
@@ -101794,8 +101841,8 @@ var styles = {
|
|
|
101794
101841
|
"sidebar--navbar--open": "_sidebar--navbar--open_12zss_18"
|
|
101795
101842
|
};
|
|
101796
101843
|
const hasChildren = (route) => {
|
|
101797
|
-
var
|
|
101798
|
-
return !!((
|
|
101844
|
+
var _a2;
|
|
101845
|
+
return !!((_a2 = route == null ? void 0 : route.children) == null ? void 0 : _a2.length);
|
|
101799
101846
|
};
|
|
101800
101847
|
const SideBar = ({ open, onClose: onClose2 }) => {
|
|
101801
101848
|
const [hasCahnges, setContext] = useContext(FormContext$1);
|