mozrest-sdk-react-dev 0.1.93 → 0.1.96
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 +209 -198
- 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
|
});
|
|
@@ -7414,7 +7413,7 @@ var withMiddleware = function(useSWR2, middleware2) {
|
|
|
7414
7413
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
7415
7414
|
args[_i] = arguments[_i];
|
|
7416
7415
|
}
|
|
7417
|
-
var
|
|
7416
|
+
var _a2 = normalize$4(args), key2 = _a2[0], fn = _a2[1], config2 = _a2[2];
|
|
7418
7417
|
var uses = (config2.use || []).concat(middleware2);
|
|
7419
7418
|
return useSWR2(key2, fn, __assign(__assign({}, config2), { use: uses }));
|
|
7420
7419
|
};
|
|
@@ -7428,7 +7427,7 @@ var infinite = function(useSWRNext) {
|
|
|
7428
7427
|
var rerender = useState({})[1];
|
|
7429
7428
|
var didMountRef = useRef(false);
|
|
7430
7429
|
var dataRef = useRef();
|
|
7431
|
-
var cache2 = config2.cache,
|
|
7430
|
+
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
7431
|
var firstPageKey = null;
|
|
7433
7432
|
try {
|
|
7434
7433
|
firstPageKey = getFirstPageKey(getKey);
|
|
@@ -7457,11 +7456,11 @@ var infinite = function(useSWRNext) {
|
|
|
7457
7456
|
var shouldRevalidateOnMount = revalidateOnMount && !didMountRef.current;
|
|
7458
7457
|
var swr = useSWRNext(firstPageKey ? INFINITE_PREFIX + firstPageKey : null, function() {
|
|
7459
7458
|
return __awaiter$1(void 0, void 0, void 0, function() {
|
|
7460
|
-
var
|
|
7459
|
+
var _a3, forceRevalidateAll, originalData, data2, pageSize, previousPageData, i, _b2, pageKey, pageArgs, pageData, shouldFetchPage;
|
|
7461
7460
|
return __generator$1(this, function(_c2) {
|
|
7462
7461
|
switch (_c2.label) {
|
|
7463
7462
|
case 0:
|
|
7464
|
-
|
|
7463
|
+
_a3 = cache2.get(contextCacheKey) || [], forceRevalidateAll = _a3[0], originalData = _a3[1];
|
|
7465
7464
|
data2 = [];
|
|
7466
7465
|
pageSize = resolvePageSize();
|
|
7467
7466
|
previousPageData = null;
|
|
@@ -7566,7 +7565,7 @@ var infinite = function(useSWRNext) {
|
|
|
7566
7565
|
};
|
|
7567
7566
|
var index$2 = withMiddleware(useSWR, infinite);
|
|
7568
7567
|
const useInfinite = (service, params, limit = 5) => {
|
|
7569
|
-
var
|
|
7568
|
+
var _a2, _b;
|
|
7570
7569
|
const { data: data2, error: error3, isValidating, mutate: mutate2, size, setSize } = index$2((page, previousPageData) => {
|
|
7571
7570
|
if (previousPageData && !previousPageData.length) {
|
|
7572
7571
|
return null;
|
|
@@ -7577,7 +7576,7 @@ const useInfinite = (service, params, limit = 5) => {
|
|
|
7577
7576
|
const issues = data2 ? [].concat(...data2) : [];
|
|
7578
7577
|
const isLoadingInitialData = !data2 && !error3;
|
|
7579
7578
|
const isLoadingMore = isLoadingInitialData || size > 0 && data2 && typeof data2[size - 1] === "undefined";
|
|
7580
|
-
const isEmpty = ((
|
|
7579
|
+
const isEmpty = ((_a2 = data2 == null ? void 0 : data2[0]) == null ? void 0 : _a2.length) === 0;
|
|
7581
7580
|
const isReachingEnd = isEmpty || data2 && ((_b = data2[data2.length - 1]) == null ? void 0 : _b.length) < limit;
|
|
7582
7581
|
const isRefreshing = isValidating && data2 && data2.length === size;
|
|
7583
7582
|
return {
|
|
@@ -9285,8 +9284,8 @@ var MapShim = function() {
|
|
|
9285
9284
|
if (ctx === void 0) {
|
|
9286
9285
|
ctx = null;
|
|
9287
9286
|
}
|
|
9288
|
-
for (var _i = 0,
|
|
9289
|
-
var entry =
|
|
9287
|
+
for (var _i = 0, _a2 = this.__entries__; _i < _a2.length; _i++) {
|
|
9288
|
+
var entry = _a2[_i];
|
|
9290
9289
|
callback.call(ctx, entry[1], entry[0]);
|
|
9291
9290
|
}
|
|
9292
9291
|
};
|
|
@@ -9428,8 +9427,8 @@ var ResizeObserverController = function() {
|
|
|
9428
9427
|
this.mutationEventsAdded_ = false;
|
|
9429
9428
|
this.connected_ = false;
|
|
9430
9429
|
};
|
|
9431
|
-
ResizeObserverController2.prototype.onTransitionEnd_ = function(
|
|
9432
|
-
var _b =
|
|
9430
|
+
ResizeObserverController2.prototype.onTransitionEnd_ = function(_a2) {
|
|
9431
|
+
var _b = _a2.propertyName, propertyName = _b === void 0 ? "" : _b;
|
|
9433
9432
|
var isReflowProperty = transitionKeys.some(function(key2) {
|
|
9434
9433
|
return !!~propertyName.indexOf(key2);
|
|
9435
9434
|
});
|
|
@@ -9447,8 +9446,8 @@ var ResizeObserverController = function() {
|
|
|
9447
9446
|
return ResizeObserverController2;
|
|
9448
9447
|
}();
|
|
9449
9448
|
var defineConfigurable = function(target, props) {
|
|
9450
|
-
for (var _i = 0,
|
|
9451
|
-
var key2 =
|
|
9449
|
+
for (var _i = 0, _a2 = Object.keys(props); _i < _a2.length; _i++) {
|
|
9450
|
+
var key2 = _a2[_i];
|
|
9452
9451
|
Object.defineProperty(target, key2, {
|
|
9453
9452
|
value: props[key2],
|
|
9454
9453
|
enumerable: false,
|
|
@@ -9542,8 +9541,8 @@ function getContentRect(target) {
|
|
|
9542
9541
|
}
|
|
9543
9542
|
return getHTMLElementContentRect(target);
|
|
9544
9543
|
}
|
|
9545
|
-
function createReadOnlyRect(
|
|
9546
|
-
var x2 =
|
|
9544
|
+
function createReadOnlyRect(_a2) {
|
|
9545
|
+
var x2 = _a2.x, y2 = _a2.y, width = _a2.width, height = _a2.height;
|
|
9547
9546
|
var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
|
|
9548
9547
|
var rect = Object.create(Constr.prototype);
|
|
9549
9548
|
defineConfigurable(rect, {
|
|
@@ -9690,8 +9689,8 @@ var ResizeObserver$1 = function() {
|
|
|
9690
9689
|
"disconnect"
|
|
9691
9690
|
].forEach(function(method4) {
|
|
9692
9691
|
ResizeObserver$1.prototype[method4] = function() {
|
|
9693
|
-
var
|
|
9694
|
-
return (
|
|
9692
|
+
var _a2;
|
|
9693
|
+
return (_a2 = observers.get(this))[method4].apply(_a2, arguments);
|
|
9695
9694
|
};
|
|
9696
9695
|
});
|
|
9697
9696
|
var index$1 = function() {
|
|
@@ -13355,9 +13354,9 @@ var LocaleReceiver = function LocaleReceiver2(props) {
|
|
|
13355
13354
|
var _props$componentName = props.componentName, componentName = _props$componentName === void 0 ? "global" : _props$componentName, defaultLocale2 = props.defaultLocale, children = props.children;
|
|
13356
13355
|
var antLocale = React.useContext(LocaleContext$1);
|
|
13357
13356
|
var getLocale2 = React.useMemo(function() {
|
|
13358
|
-
var
|
|
13357
|
+
var _a2;
|
|
13359
13358
|
var locale2 = defaultLocale2 || defaultLocale$2[componentName];
|
|
13360
|
-
var localeFromContext = (
|
|
13359
|
+
var localeFromContext = (_a2 = antLocale === null || antLocale === void 0 ? void 0 : antLocale[componentName]) !== null && _a2 !== void 0 ? _a2 : {};
|
|
13361
13360
|
return _extends$Q(_extends$Q({}, locale2 instanceof Function ? locale2() : locale2), localeFromContext || {});
|
|
13362
13361
|
}, [componentName, defaultLocale2, antLocale]);
|
|
13363
13362
|
var getLocaleCode = React.useMemo(function() {
|
|
@@ -13871,7 +13870,7 @@ var TinyColor = function() {
|
|
|
13871
13870
|
if (opts === void 0) {
|
|
13872
13871
|
opts = {};
|
|
13873
13872
|
}
|
|
13874
|
-
var
|
|
13873
|
+
var _a2;
|
|
13875
13874
|
if (color2 instanceof TinyColor2) {
|
|
13876
13875
|
return color2;
|
|
13877
13876
|
}
|
|
@@ -13886,7 +13885,7 @@ var TinyColor = function() {
|
|
|
13886
13885
|
this.b = rgb2.b;
|
|
13887
13886
|
this.a = rgb2.a;
|
|
13888
13887
|
this.roundA = Math.round(100 * this.a) / 100;
|
|
13889
|
-
this.format = (
|
|
13888
|
+
this.format = (_a2 = opts.format) !== null && _a2 !== void 0 ? _a2 : rgb2.format;
|
|
13890
13889
|
this.gradientType = opts.gradientType;
|
|
13891
13890
|
if (this.r < 1) {
|
|
13892
13891
|
this.r = Math.round(this.r);
|
|
@@ -14037,8 +14036,8 @@ var TinyColor = function() {
|
|
|
14037
14036
|
return false;
|
|
14038
14037
|
}
|
|
14039
14038
|
var hex3 = "#" + rgbToHex(this.r, this.g, this.b, false);
|
|
14040
|
-
for (var _i = 0,
|
|
14041
|
-
var _b =
|
|
14039
|
+
for (var _i = 0, _a2 = Object.entries(names); _i < _a2.length; _i++) {
|
|
14040
|
+
var _b = _a2[_i], key2 = _b[0], value2 = _b[1];
|
|
14042
14041
|
if (hex3 === value2) {
|
|
14043
14042
|
return key2;
|
|
14044
14043
|
}
|
|
@@ -15986,10 +15985,10 @@ function notice$1(args) {
|
|
|
15986
15985
|
});
|
|
15987
15986
|
});
|
|
15988
15987
|
var result = function result2() {
|
|
15989
|
-
var
|
|
15988
|
+
var _a2;
|
|
15990
15989
|
if (messageInstance) {
|
|
15991
15990
|
messageInstance.removeNotice(target);
|
|
15992
|
-
(
|
|
15991
|
+
(_a2 = args.onClose) === null || _a2 === void 0 ? void 0 : _a2.call(args);
|
|
15993
15992
|
}
|
|
15994
15993
|
};
|
|
15995
15994
|
result.then = function(filled, rejected) {
|
|
@@ -16521,7 +16520,7 @@ var globalConfig = function globalConfig2() {
|
|
|
16521
16520
|
};
|
|
16522
16521
|
};
|
|
16523
16522
|
var ProviderChildren = function ProviderChildren2(props) {
|
|
16524
|
-
var
|
|
16523
|
+
var _a2, _b;
|
|
16525
16524
|
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
16525
|
var getPrefixCls = React.useCallback(function(suffixCls, customizePrefixCls) {
|
|
16527
16526
|
var prefixCls = props.prefixCls;
|
|
@@ -16564,7 +16563,7 @@ var ProviderChildren = function ProviderChildren2(props) {
|
|
|
16564
16563
|
var childNode = children;
|
|
16565
16564
|
var validateMessages = {};
|
|
16566
16565
|
if (locale2) {
|
|
16567
|
-
validateMessages = ((
|
|
16566
|
+
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
16567
|
}
|
|
16569
16568
|
if (form2 && form2.validateMessages) {
|
|
16570
16569
|
validateMessages = _extends$Q(_extends$Q({}, validateMessages), form2.validateMessages);
|
|
@@ -19514,10 +19513,10 @@ var Tooltip$2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
19514
19513
|
return !title2 && !overlay && title2 !== 0;
|
|
19515
19514
|
};
|
|
19516
19515
|
var onOpenChange = function onOpenChange2(vis) {
|
|
19517
|
-
var
|
|
19516
|
+
var _a2, _b;
|
|
19518
19517
|
setOpen(isNoTitle() ? false : vis);
|
|
19519
19518
|
if (!isNoTitle()) {
|
|
19520
|
-
(
|
|
19519
|
+
(_a2 = props.onOpenChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, vis);
|
|
19521
19520
|
(_b = props.onVisibleChange) === null || _b === void 0 ? void 0 : _b.call(props, vis);
|
|
19522
19521
|
}
|
|
19523
19522
|
};
|
|
@@ -19531,8 +19530,8 @@ var Tooltip$2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
19531
19530
|
var onPopupAlign = function onPopupAlign2(domNode, align) {
|
|
19532
19531
|
var placements2 = getTooltipPlacements();
|
|
19533
19532
|
var placement2 = Object.keys(placements2).find(function(key2) {
|
|
19534
|
-
var
|
|
19535
|
-
return placements2[key2].points[0] === ((
|
|
19533
|
+
var _a2, _b;
|
|
19534
|
+
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
19535
|
});
|
|
19537
19536
|
if (!placement2) {
|
|
19538
19537
|
return;
|
|
@@ -19720,7 +19719,7 @@ var Wave = /* @__PURE__ */ function(_React$Component) {
|
|
|
19720
19719
|
_this.animationStart = false;
|
|
19721
19720
|
_this.destroyed = false;
|
|
19722
19721
|
_this.onClick = function(node2, waveColor) {
|
|
19723
|
-
var
|
|
19722
|
+
var _a2, _b;
|
|
19724
19723
|
var _this$props = _this.props, insertExtraNode = _this$props.insertExtraNode, disabled2 = _this$props.disabled;
|
|
19725
19724
|
if (disabled2 || !node2 || isHidden(node2) || node2.className.includes("-leave")) {
|
|
19726
19725
|
return;
|
|
@@ -19733,7 +19732,7 @@ var Wave = /* @__PURE__ */ function(_React$Component) {
|
|
|
19733
19732
|
node2.setAttribute(attributeName, "true");
|
|
19734
19733
|
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
19734
|
extraNode.style.borderColor = waveColor;
|
|
19736
|
-
var nodeRoot = ((
|
|
19735
|
+
var nodeRoot = ((_a2 = node2.getRootNode) === null || _a2 === void 0 ? void 0 : _a2.call(node2)) || node2.ownerDocument;
|
|
19737
19736
|
var nodeBody = (_b = getValidateContainer(nodeRoot)) !== null && _b !== void 0 ? _b : nodeRoot;
|
|
19738
19737
|
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
19738
|
csp: _this.csp,
|
|
@@ -27656,8 +27655,8 @@ var InternalRadio = function InternalRadio2(props, ref) {
|
|
|
27656
27655
|
var mergedRef = composeRef(ref, innerRef);
|
|
27657
27656
|
var _useContext = useContext(FormItemInputContext), isFormItemInput = _useContext.isFormItemInput;
|
|
27658
27657
|
var onChange3 = function onChange4(e3) {
|
|
27659
|
-
var
|
|
27660
|
-
(
|
|
27658
|
+
var _a2, _b;
|
|
27659
|
+
(_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, e3);
|
|
27661
27660
|
(_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e3);
|
|
27662
27661
|
};
|
|
27663
27662
|
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 +28084,9 @@ var __rest$5 = globalThis && globalThis.__rest || function(s2, e3) {
|
|
|
28085
28084
|
}
|
|
28086
28085
|
return t2;
|
|
28087
28086
|
};
|
|
28088
|
-
var CheckableTag = function CheckableTag2(
|
|
28087
|
+
var CheckableTag = function CheckableTag2(_a2) {
|
|
28089
28088
|
var _classNames;
|
|
28090
|
-
var customizePrefixCls =
|
|
28089
|
+
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
28090
|
var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls;
|
|
28092
28091
|
var handleClick = function handleClick2(e3) {
|
|
28093
28092
|
onChange3 === null || onChange3 === void 0 ? void 0 : onChange3(!checked);
|
|
@@ -28115,9 +28114,9 @@ var __rest$4 = globalThis && globalThis.__rest || function(s2, e3) {
|
|
|
28115
28114
|
};
|
|
28116
28115
|
var PresetColorRegex = new RegExp("^(".concat(PresetColorTypes.join("|"), ")(-inverse)?$"));
|
|
28117
28116
|
var PresetStatusColorRegex = new RegExp("^(".concat(PresetStatusColorTypes.join("|"), ")$"));
|
|
28118
|
-
var InternalTag = function InternalTag2(
|
|
28117
|
+
var InternalTag = function InternalTag2(_a2, ref) {
|
|
28119
28118
|
var _classNames;
|
|
28120
|
-
var customizePrefixCls =
|
|
28119
|
+
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
28120
|
var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
|
|
28122
28121
|
var _React$useState = React.useState(true), _React$useState2 = _slicedToArray$a(_React$useState, 2), visible = _React$useState2[0], setVisible = _React$useState2[1];
|
|
28123
28122
|
React.useEffect(function() {
|
|
@@ -28333,12 +28332,12 @@ function generateRangePicker(generateConfig2) {
|
|
|
28333
28332
|
useImperativeHandle(ref, function() {
|
|
28334
28333
|
return {
|
|
28335
28334
|
focus: function focus() {
|
|
28336
|
-
var
|
|
28337
|
-
return (
|
|
28335
|
+
var _a2;
|
|
28336
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
28338
28337
|
},
|
|
28339
28338
|
blur: function blur() {
|
|
28340
|
-
var
|
|
28341
|
-
return (
|
|
28339
|
+
var _a2;
|
|
28340
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.blur();
|
|
28342
28341
|
}
|
|
28343
28342
|
};
|
|
28344
28343
|
});
|
|
@@ -28411,12 +28410,12 @@ function generatePicker$1(generateConfig2) {
|
|
|
28411
28410
|
useImperativeHandle(ref, function() {
|
|
28412
28411
|
return {
|
|
28413
28412
|
focus: function focus() {
|
|
28414
|
-
var
|
|
28415
|
-
return (
|
|
28413
|
+
var _a2;
|
|
28414
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
28416
28415
|
},
|
|
28417
28416
|
blur: function blur() {
|
|
28418
|
-
var
|
|
28419
|
-
return (
|
|
28417
|
+
var _a2;
|
|
28418
|
+
return (_a2 = innerRef.current) === null || _a2 === void 0 ? void 0 : _a2.blur();
|
|
28420
28419
|
}
|
|
28421
28420
|
};
|
|
28422
28421
|
});
|
|
@@ -29086,8 +29085,8 @@ var ActionButton = function ActionButton2(props) {
|
|
|
29086
29085
|
var timeoutId = null;
|
|
29087
29086
|
if (props.autoFocus) {
|
|
29088
29087
|
timeoutId = setTimeout(function() {
|
|
29089
|
-
var
|
|
29090
|
-
(
|
|
29088
|
+
var _a2;
|
|
29089
|
+
(_a2 = ref.current) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
29091
29090
|
});
|
|
29092
29091
|
}
|
|
29093
29092
|
return function() {
|
|
@@ -29178,7 +29177,7 @@ if (canUseDocElement()) {
|
|
|
29178
29177
|
}
|
|
29179
29178
|
var Modal$2 = function Modal(props) {
|
|
29180
29179
|
var _classNames;
|
|
29181
|
-
var
|
|
29180
|
+
var _a2;
|
|
29182
29181
|
var _React$useContext = React.useContext(ConfigContext), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
|
|
29183
29182
|
var handleCancel = function handleCancel2(e3) {
|
|
29184
29183
|
var onCancel = props.onCancel;
|
|
@@ -29220,7 +29219,7 @@ var Modal$2 = function Modal(props) {
|
|
|
29220
29219
|
wrapClassName: wrapClassNameExtended,
|
|
29221
29220
|
footer: footer2 === void 0 ? defaultFooter : footer2,
|
|
29222
29221
|
visible: open || visible,
|
|
29223
|
-
mousePosition: (
|
|
29222
|
+
mousePosition: (_a2 = restProps.mousePosition) !== null && _a2 !== void 0 ? _a2 : mousePosition,
|
|
29224
29223
|
onClose: handleCancel,
|
|
29225
29224
|
closeIcon: closeIconToRender,
|
|
29226
29225
|
focusTriggerAfterClose,
|
|
@@ -29345,8 +29344,8 @@ function confirm$1(config2) {
|
|
|
29345
29344
|
}
|
|
29346
29345
|
unmount(container2);
|
|
29347
29346
|
}
|
|
29348
|
-
function render$1(
|
|
29349
|
-
var okText =
|
|
29347
|
+
function render$1(_a2) {
|
|
29348
|
+
var okText = _a2.okText, cancelText = _a2.cancelText, customizePrefixCls = _a2.prefixCls, props = __rest(_a2, ["okText", "cancelText", "prefixCls"]);
|
|
29350
29349
|
clearTimeout(timeoutId);
|
|
29351
29350
|
timeoutId = setTimeout(function() {
|
|
29352
29351
|
var runtimeLocale2 = getConfirmLocale();
|
|
@@ -29529,7 +29528,7 @@ function useModal() {
|
|
|
29529
29528
|
}, [actionQueue]);
|
|
29530
29529
|
var getConfirmFunc = React.useCallback(function(withFunc) {
|
|
29531
29530
|
return function hookConfirm(config2) {
|
|
29532
|
-
var
|
|
29531
|
+
var _a2;
|
|
29533
29532
|
uuid += 1;
|
|
29534
29533
|
var modalRef = /* @__PURE__ */ React.createRef();
|
|
29535
29534
|
var closeFunc;
|
|
@@ -29541,12 +29540,12 @@ function useModal() {
|
|
|
29541
29540
|
closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();
|
|
29542
29541
|
}
|
|
29543
29542
|
});
|
|
29544
|
-
closeFunc = (
|
|
29543
|
+
closeFunc = (_a2 = holderRef.current) === null || _a2 === void 0 ? void 0 : _a2.patchElement(modal);
|
|
29545
29544
|
return {
|
|
29546
29545
|
destroy: function destroy3() {
|
|
29547
29546
|
function destroyAction() {
|
|
29548
|
-
var
|
|
29549
|
-
(
|
|
29547
|
+
var _a3;
|
|
29548
|
+
(_a3 = modalRef.current) === null || _a3 === void 0 ? void 0 : _a3.destroy();
|
|
29550
29549
|
}
|
|
29551
29550
|
if (modalRef.current) {
|
|
29552
29551
|
destroyAction();
|
|
@@ -29558,8 +29557,8 @@ function useModal() {
|
|
|
29558
29557
|
},
|
|
29559
29558
|
update: function update(newConfig) {
|
|
29560
29559
|
function updateAction() {
|
|
29561
|
-
var
|
|
29562
|
-
(
|
|
29560
|
+
var _a3;
|
|
29561
|
+
(_a3 = modalRef.current) === null || _a3 === void 0 ? void 0 : _a3.update(newConfig);
|
|
29563
29562
|
}
|
|
29564
29563
|
if (modalRef.current) {
|
|
29565
29564
|
updateAction();
|
|
@@ -50092,12 +50091,12 @@ const Header$2 = ({ onChangeFilter, filters: filters2, multiVenue, venueId }) =>
|
|
|
50092
50091
|
}, /* @__PURE__ */ React__default.createElement(NewSelect, {
|
|
50093
50092
|
label: t2("PLATFORM"),
|
|
50094
50093
|
options: data2 && data2.data && data2.data.length ? [...[{ id: "", label: t2("ALL") }], ...data2.data.map((platform2) => {
|
|
50095
|
-
var
|
|
50096
|
-
return { id: (_b = (
|
|
50094
|
+
var _a2, _b, _c, _d;
|
|
50095
|
+
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
50096
|
})] : platforms,
|
|
50098
50097
|
defaultValue: data2 && data2.data && data2.data.length ? [...[{ id: "", label: t2("ALL") }], ...data2.data.map((platform2) => {
|
|
50099
|
-
var
|
|
50100
|
-
return { id: (_b = (
|
|
50098
|
+
var _a2, _b, _c, _d;
|
|
50099
|
+
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
50100
|
})][0] : platforms[0],
|
|
50102
50101
|
onChange: handleChangeFilter("module"),
|
|
50103
50102
|
getOptionValue: (item2) => item2.id
|
|
@@ -52180,8 +52179,8 @@ const Name = ({ children }) => {
|
|
|
52180
52179
|
}, children);
|
|
52181
52180
|
};
|
|
52182
52181
|
const Role$1 = ({ role }) => {
|
|
52183
|
-
var
|
|
52184
|
-
const label2 = ((
|
|
52182
|
+
var _a2, _b;
|
|
52183
|
+
const label2 = ((_a2 = roleObj[role]) == null ? void 0 : _a2.label) || "";
|
|
52185
52184
|
const icon2 = ((_b = roleObj[role]) == null ? void 0 : _b.icon) || /* @__PURE__ */ React__default.createElement(Edit2$1, null);
|
|
52186
52185
|
return /* @__PURE__ */ React__default.createElement("span", {
|
|
52187
52186
|
style: { display: "flex" }
|
|
@@ -55995,8 +55994,8 @@ var OBJECT_TAG = "[object Object]";
|
|
|
55995
55994
|
var SET_TAG = "[object Set]";
|
|
55996
55995
|
var STRING_TAG = "[object String]";
|
|
55997
55996
|
var toString$1 = Object.prototype.toString;
|
|
55998
|
-
function createComparator(
|
|
55999
|
-
var areArraysEqual2 =
|
|
55997
|
+
function createComparator(_a2) {
|
|
55998
|
+
var areArraysEqual2 = _a2.areArraysEqual, areDatesEqual2 = _a2.areDatesEqual, areMapsEqual2 = _a2.areMapsEqual, areObjectsEqual2 = _a2.areObjectsEqual, areRegExpsEqual2 = _a2.areRegExpsEqual, areSetsEqual2 = _a2.areSetsEqual, createIsNestedEqual = _a2.createIsNestedEqual;
|
|
56000
55999
|
var isEqual2 = createIsNestedEqual(comparator);
|
|
56001
56000
|
function comparator(a2, b2, meta) {
|
|
56002
56001
|
if (a2 === b2) {
|
|
@@ -59710,8 +59709,8 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59710
59709
|
return element instanceof Element || element instanceof HTMLDocument;
|
|
59711
59710
|
};
|
|
59712
59711
|
var createNotifier = function(onResize, setSize, handleWidth, handleHeight) {
|
|
59713
|
-
return function(
|
|
59714
|
-
var width =
|
|
59712
|
+
return function(_a2) {
|
|
59713
|
+
var width = _a2.width, height = _a2.height;
|
|
59715
59714
|
setSize(function(prev2) {
|
|
59716
59715
|
if (prev2.width === width && prev2.height === height) {
|
|
59717
59716
|
return prev2;
|
|
@@ -59737,7 +59736,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59737
59736
|
}
|
|
59738
59737
|
};
|
|
59739
59738
|
_this.attachObserver = function() {
|
|
59740
|
-
var
|
|
59739
|
+
var _a3 = _this.props, targetRef = _a3.targetRef, observerOptions = _a3.observerOptions;
|
|
59741
59740
|
if (isSSR()) {
|
|
59742
59741
|
return;
|
|
59743
59742
|
}
|
|
@@ -59755,7 +59754,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59755
59754
|
_this.resizeObserver.observe(element, observerOptions);
|
|
59756
59755
|
};
|
|
59757
59756
|
_this.getElement = function() {
|
|
59758
|
-
var
|
|
59757
|
+
var _a3 = _this.props, querySelector = _a3.querySelector, targetDomEl = _a3.targetDomEl;
|
|
59759
59758
|
if (isSSR())
|
|
59760
59759
|
return null;
|
|
59761
59760
|
if (querySelector)
|
|
@@ -59782,12 +59781,12 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59782
59781
|
}
|
|
59783
59782
|
};
|
|
59784
59783
|
_this.createResizeHandler = function(entries) {
|
|
59785
|
-
var
|
|
59784
|
+
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
59785
|
if (!handleWidth && !handleHeight)
|
|
59787
59786
|
return;
|
|
59788
59787
|
var notifyResize = createNotifier(onResize, _this.setState.bind(_this), handleWidth, handleHeight);
|
|
59789
59788
|
entries.forEach(function(entry) {
|
|
59790
|
-
var
|
|
59789
|
+
var _a4 = entry && entry.contentRect || {}, width = _a4.width, height = _a4.height;
|
|
59791
59790
|
var shouldSetSize = !_this.skipOnMount && !isSSR();
|
|
59792
59791
|
if (shouldSetSize) {
|
|
59793
59792
|
notifyResize({ width, height });
|
|
@@ -59796,7 +59795,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59796
59795
|
});
|
|
59797
59796
|
};
|
|
59798
59797
|
_this.getRenderType = function() {
|
|
59799
|
-
var
|
|
59798
|
+
var _a3 = _this.props, render2 = _a3.render, children = _a3.children;
|
|
59800
59799
|
if (isFunction3(render2)) {
|
|
59801
59800
|
return "renderProp";
|
|
59802
59801
|
}
|
|
@@ -59811,7 +59810,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59811
59810
|
}
|
|
59812
59811
|
return "parent";
|
|
59813
59812
|
};
|
|
59814
|
-
var skipOnMount = props.skipOnMount, refreshMode = props.refreshMode,
|
|
59813
|
+
var skipOnMount = props.skipOnMount, refreshMode = props.refreshMode, _a2 = props.refreshRate, refreshRate = _a2 === void 0 ? 1e3 : _a2, refreshOptions = props.refreshOptions;
|
|
59815
59814
|
_this.state = {
|
|
59816
59815
|
width: void 0,
|
|
59817
59816
|
height: void 0
|
|
@@ -59840,7 +59839,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59840
59839
|
this.cancelHandler();
|
|
59841
59840
|
};
|
|
59842
59841
|
ResizeDetector2.prototype.render = function() {
|
|
59843
|
-
var
|
|
59842
|
+
var _a2 = this.props, render2 = _a2.render, children = _a2.children, _b = _a2.nodeType, WrapperTag = _b === void 0 ? "div" : _b;
|
|
59844
59843
|
var _c = this.state, width = _c.width, height = _c.height;
|
|
59845
59844
|
var childProps = { width, height, targetRef: this.targetRef };
|
|
59846
59845
|
var renderType = this.getRenderType();
|
|
@@ -59882,7 +59881,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59882
59881
|
return _this;
|
|
59883
59882
|
}
|
|
59884
59883
|
ResizeDetectorHOC2.prototype.render = function() {
|
|
59885
|
-
var
|
|
59884
|
+
var _a2 = this.props, forwardedRef = _a2.forwardedRef, rest = __rest2(_a2, ["forwardedRef"]);
|
|
59886
59885
|
var targetRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : this.ref;
|
|
59887
59886
|
return React__namespace.createElement(ResizeDetector, __assign2({}, options2, { targetRef }), React__namespace.createElement(ComponentInner, __assign2({ targetRef }, rest)));
|
|
59888
59887
|
};
|
|
@@ -59900,7 +59899,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59900
59899
|
if (props === void 0) {
|
|
59901
59900
|
props = {};
|
|
59902
59901
|
}
|
|
59903
|
-
var
|
|
59902
|
+
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
59903
|
var skipResize = React2.useRef(skipOnMount);
|
|
59905
59904
|
var localRef = React2.useRef(null);
|
|
59906
59905
|
var ref = targetRef !== null && targetRef !== void 0 ? targetRef : localRef;
|
|
@@ -59918,7 +59917,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(ResizeObserver_es);
|
|
|
59918
59917
|
if (!handleWidth && !handleHeight)
|
|
59919
59918
|
return;
|
|
59920
59919
|
entries.forEach(function(entry) {
|
|
59921
|
-
var
|
|
59920
|
+
var _a3 = entry && entry.contentRect || {}, width = _a3.width, height = _a3.height;
|
|
59922
59921
|
var shouldSetSize = !skipResize.current && !isSSR();
|
|
59923
59922
|
if (shouldSetSize) {
|
|
59924
59923
|
notifyResize({ width, height });
|
|
@@ -77317,9 +77316,9 @@ const formatDateChart = (date4, mode) => {
|
|
|
77317
77316
|
};
|
|
77318
77317
|
const formatData$c = (data2, mode) => {
|
|
77319
77318
|
const formatedData = data2.reduce((acc, { date: _date, ...item2 }) => {
|
|
77320
|
-
var
|
|
77319
|
+
var _a2, _b, _c;
|
|
77321
77320
|
const date4 = formatDateChart(_date, mode);
|
|
77322
|
-
const positive2 = (((
|
|
77321
|
+
const positive2 = (((_a2 = acc[date4]) == null ? void 0 : _a2.positive) || 0) + item2.positive;
|
|
77323
77322
|
const negative2 = (((_b = acc[date4]) == null ? void 0 : _b.negative) || 0) + item2.negative;
|
|
77324
77323
|
const neutral2 = (((_c = acc[date4]) == null ? void 0 : _c.neutral) || 0) + item2.neutral;
|
|
77325
77324
|
return {
|
|
@@ -77946,9 +77945,9 @@ const formatParams$1 = (params) => {
|
|
|
77946
77945
|
return all2;
|
|
77947
77946
|
};
|
|
77948
77947
|
const formatStats$1 = (stat) => {
|
|
77949
|
-
var
|
|
77948
|
+
var _a2;
|
|
77950
77949
|
let sum = 0;
|
|
77951
|
-
(
|
|
77950
|
+
(_a2 = stat.timeSeries) == null ? void 0 : _a2.datedValues.map((v2) => {
|
|
77952
77951
|
if (v2.value)
|
|
77953
77952
|
sum += parseInt(v2.value);
|
|
77954
77953
|
});
|
|
@@ -78004,8 +78003,8 @@ const buildData$1 = (base, data2, type4) => {
|
|
|
78004
78003
|
return base;
|
|
78005
78004
|
};
|
|
78006
78005
|
const getViewsGraphData$1 = (dataToFormat) => {
|
|
78007
|
-
var
|
|
78008
|
-
let graphStats = buildDates$1((
|
|
78006
|
+
var _a2, _b, _c, _d, _e2;
|
|
78007
|
+
let graphStats = buildDates$1((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78009
78008
|
let builder = buildData$1(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
78010
78009
|
builder = buildData$1(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
78011
78010
|
builder = buildData$1(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
@@ -78013,8 +78012,8 @@ const getViewsGraphData$1 = (dataToFormat) => {
|
|
|
78013
78012
|
return builder;
|
|
78014
78013
|
};
|
|
78015
78014
|
const getActionsGraphData$1 = (dataToFormat) => {
|
|
78016
|
-
var
|
|
78017
|
-
let graphStats = buildDates$1((
|
|
78015
|
+
var _a2, _b, _c, _d;
|
|
78016
|
+
let graphStats = buildDates$1((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78018
78017
|
let builder = buildData$1(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
78019
78018
|
builder = buildData$1(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
78020
78019
|
builder = buildData$1(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
@@ -78312,9 +78311,9 @@ const DasboardBookingAnalytics = ({ venueListingId, venueId }) => {
|
|
|
78312
78311
|
})))))));
|
|
78313
78312
|
};
|
|
78314
78313
|
const formatStats = (stat) => {
|
|
78315
|
-
var
|
|
78314
|
+
var _a2;
|
|
78316
78315
|
let sum = 0;
|
|
78317
|
-
(
|
|
78316
|
+
(_a2 = stat.timeSeries) == null ? void 0 : _a2.datedValues.map((v2) => {
|
|
78318
78317
|
if (v2.value)
|
|
78319
78318
|
sum += parseInt(v2.value);
|
|
78320
78319
|
});
|
|
@@ -78370,8 +78369,8 @@ const buildData = (base, data2, type4) => {
|
|
|
78370
78369
|
return base;
|
|
78371
78370
|
};
|
|
78372
78371
|
const getViewsGraphData = (dataToFormat) => {
|
|
78373
|
-
var
|
|
78374
|
-
let graphStats = buildDates((
|
|
78372
|
+
var _a2, _b, _c, _d, _e2;
|
|
78373
|
+
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78375
78374
|
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
78376
78375
|
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
78377
78376
|
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
@@ -78379,8 +78378,8 @@ const getViewsGraphData = (dataToFormat) => {
|
|
|
78379
78378
|
return builder;
|
|
78380
78379
|
};
|
|
78381
78380
|
const getActionsGraphData = (dataToFormat) => {
|
|
78382
|
-
var
|
|
78383
|
-
let graphStats = buildDates((
|
|
78381
|
+
var _a2, _b, _c, _d;
|
|
78382
|
+
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
78384
78383
|
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
78385
78384
|
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
78386
78385
|
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
@@ -78810,7 +78809,7 @@ const CardDescription = ({
|
|
|
78810
78809
|
onClickEdit,
|
|
78811
78810
|
values
|
|
78812
78811
|
}) => {
|
|
78813
|
-
var
|
|
78812
|
+
var _a2, _b, _c;
|
|
78814
78813
|
const { t: t2 } = useTranslation();
|
|
78815
78814
|
return /* @__PURE__ */ React__default.createElement(Card, {
|
|
78816
78815
|
header: {
|
|
@@ -78827,7 +78826,7 @@ const CardDescription = ({
|
|
|
78827
78826
|
text: values.businessName
|
|
78828
78827
|
}), /* @__PURE__ */ React__default.createElement(Item, {
|
|
78829
78828
|
icon: "category",
|
|
78830
|
-
text: (
|
|
78829
|
+
text: (_a2 = values.mainCategory) == null ? void 0 : _a2.label
|
|
78831
78830
|
}), /* @__PURE__ */ React__default.createElement(Item, {
|
|
78832
78831
|
icon: "descriptionLong",
|
|
78833
78832
|
text: ((_b = values.descriptionLong) == null ? void 0 : _b.length) > 300 ? `${values.descriptionLong.slice(0, 300)}...` : values.descriptionLong
|
|
@@ -78940,7 +78939,7 @@ const formatAttributes$2 = (attributes2, attributesLinks = [], attrLinks = []) =
|
|
|
78940
78939
|
const formated = Object.keys(allAttributes).filter((key2) => {
|
|
78941
78940
|
return allAttributes[key2] !== void 0;
|
|
78942
78941
|
}).map((key2) => {
|
|
78943
|
-
var
|
|
78942
|
+
var _a2, _b;
|
|
78944
78943
|
const attr = allAttributes[key2];
|
|
78945
78944
|
let value2 = "";
|
|
78946
78945
|
let unset_value = "";
|
|
@@ -78948,7 +78947,7 @@ const formatAttributes$2 = (attributes2, attributesLinks = [], attrLinks = []) =
|
|
|
78948
78947
|
value2 = attr ? "true" : "false";
|
|
78949
78948
|
}
|
|
78950
78949
|
if (typeof attr === "object") {
|
|
78951
|
-
value2 = (
|
|
78950
|
+
value2 = (_a2 = attr.value) == null ? void 0 : _a2.join(",");
|
|
78952
78951
|
unset_value = (_b = attr.unset_value) == null ? void 0 : _b.join(",");
|
|
78953
78952
|
}
|
|
78954
78953
|
if (typeof attr === "string")
|
|
@@ -78963,7 +78962,7 @@ const formatAttributes$2 = (attributes2, attributesLinks = [], attrLinks = []) =
|
|
|
78963
78962
|
return formated;
|
|
78964
78963
|
};
|
|
78965
78964
|
const formatDataInfo = (values) => {
|
|
78966
|
-
var
|
|
78965
|
+
var _a2, _b, _c;
|
|
78967
78966
|
const formattedData = preprocessAttrs(values);
|
|
78968
78967
|
const {
|
|
78969
78968
|
extraLinks,
|
|
@@ -78979,7 +78978,7 @@ const formatDataInfo = (values) => {
|
|
|
78979
78978
|
} = formattedData;
|
|
78980
78979
|
return {
|
|
78981
78980
|
...rest,
|
|
78982
|
-
country: (
|
|
78981
|
+
country: (_a2 = values == null ? void 0 : values.country) == null ? void 0 : _a2.id,
|
|
78983
78982
|
mainCategory: (_b = values == null ? void 0 : values.mainCategory) == null ? void 0 : _b.id,
|
|
78984
78983
|
additionalCategories: (_c = values == null ? void 0 : values.additionalCategories) == null ? void 0 : _c.map(({ id: id22 }) => id22),
|
|
78985
78984
|
attributes: formatAttributes$2(attributes2, attributesLinks, attrLinks),
|
|
@@ -79703,12 +79702,12 @@ Geocode.setApiKey(config$1.maps_key);
|
|
|
79703
79702
|
const getLocationFromAdress = (add2) => Geocode.fromAddress(add2).then((response) => response.results.map(formarResult)).catch((error3) => {
|
|
79704
79703
|
});
|
|
79705
79704
|
const formarResult = (result) => {
|
|
79706
|
-
var
|
|
79705
|
+
var _a2, _b, _c, _d, _e2, _f;
|
|
79707
79706
|
const id2 = result.place_id;
|
|
79708
79707
|
const address = result.formatted_address;
|
|
79709
79708
|
const components2 = result.address_components;
|
|
79710
79709
|
const location2 = result.geometry.location;
|
|
79711
|
-
const city = ((
|
|
79710
|
+
const city = ((_a2 = components2.find(({ types: types2 }) => types2.includes("locality"))) == null ? void 0 : _a2.long_name) || "";
|
|
79712
79711
|
const street_number = ((_b = components2.find(({ types: types2 }) => types2.includes("street_number"))) == null ? void 0 : _b.long_name) || "";
|
|
79713
79712
|
const route = ((_c = components2.find(({ types: types2 }) => types2.includes("route"))) == null ? void 0 : _c.long_name) || "";
|
|
79714
79713
|
const state = ((_d = components2.find(({ types: types2 }) => types2.includes("administrative_area_level_1"))) == null ? void 0 : _d.long_name) || "";
|
|
@@ -79740,7 +79739,7 @@ const GetVenueListing = async ({
|
|
|
79740
79739
|
return formatData$8(data2);
|
|
79741
79740
|
};
|
|
79742
79741
|
const formatData$8 = async (values = {}) => {
|
|
79743
|
-
var
|
|
79742
|
+
var _a2;
|
|
79744
79743
|
const {
|
|
79745
79744
|
country,
|
|
79746
79745
|
mainCategory,
|
|
@@ -79764,7 +79763,7 @@ const formatData$8 = async (values = {}) => {
|
|
|
79764
79763
|
return {
|
|
79765
79764
|
...rest,
|
|
79766
79765
|
mainCategory: _mainCategory,
|
|
79767
|
-
additionalCategories: ((
|
|
79766
|
+
additionalCategories: ((_a2 = values == null ? void 0 : values.additionalCategories) == null ? void 0 : _a2.map(({ id: id2, name }) => ({
|
|
79768
79767
|
id: id2,
|
|
79769
79768
|
label: name
|
|
79770
79769
|
}))) || [],
|
|
@@ -80114,14 +80113,14 @@ function useLoadGsiScript(options2 = {}) {
|
|
|
80114
80113
|
scriptTag2.async = true;
|
|
80115
80114
|
scriptTag2.defer = true;
|
|
80116
80115
|
scriptTag2.onload = () => {
|
|
80117
|
-
var
|
|
80116
|
+
var _a2;
|
|
80118
80117
|
setScriptLoadedSuccessfully(true);
|
|
80119
|
-
(
|
|
80118
|
+
(_a2 = onScriptLoadSuccessRef.current) === null || _a2 === void 0 ? void 0 : _a2.call(onScriptLoadSuccessRef);
|
|
80120
80119
|
};
|
|
80121
80120
|
scriptTag2.onerror = () => {
|
|
80122
|
-
var
|
|
80121
|
+
var _a2;
|
|
80123
80122
|
setScriptLoadedSuccessfully(false);
|
|
80124
|
-
(
|
|
80123
|
+
(_a2 = onScriptLoadErrorRef.current) === null || _a2 === void 0 ? void 0 : _a2.call(onScriptLoadErrorRef);
|
|
80125
80124
|
};
|
|
80126
80125
|
document.body.appendChild(scriptTag2);
|
|
80127
80126
|
return () => {
|
|
@@ -80157,17 +80156,17 @@ function useGoogleLogin({ flow = "implicit", scope = "", onSuccess, onError, ...
|
|
|
80157
80156
|
const onErrorRef = useRef(onError);
|
|
80158
80157
|
onErrorRef.current = onError;
|
|
80159
80158
|
useEffect(() => {
|
|
80160
|
-
var
|
|
80159
|
+
var _a2;
|
|
80161
80160
|
if (!scriptLoadedSuccessfully)
|
|
80162
80161
|
return;
|
|
80163
80162
|
const clientMethod = flow === "implicit" ? "initTokenClient" : "initCodeClient";
|
|
80164
|
-
const client = (
|
|
80163
|
+
const client = (_a2 = window.google) === null || _a2 === void 0 ? void 0 : _a2.accounts.oauth2[clientMethod]({
|
|
80165
80164
|
client_id: clientId,
|
|
80166
80165
|
scope: `openid profile email ${scope}`,
|
|
80167
80166
|
callback: (response) => {
|
|
80168
|
-
var
|
|
80167
|
+
var _a3, _b;
|
|
80169
80168
|
if (response.error)
|
|
80170
|
-
return (
|
|
80169
|
+
return (_a3 = onErrorRef.current) === null || _a3 === void 0 ? void 0 : _a3.call(onErrorRef, response);
|
|
80171
80170
|
(_b = onSuccessRef.current) === null || _b === void 0 ? void 0 : _b.call(onSuccessRef, response);
|
|
80172
80171
|
},
|
|
80173
80172
|
...props
|
|
@@ -84954,12 +84953,12 @@ const BingButton$1 = ({
|
|
|
84954
84953
|
}, t2("CONNECT")));
|
|
84955
84954
|
};
|
|
84956
84955
|
const useConnect = ({ venueId }) => {
|
|
84957
|
-
var
|
|
84956
|
+
var _a2;
|
|
84958
84957
|
const { data: data2, isLoading, reload } = useFetch(GetVenueListingModule, {
|
|
84959
84958
|
cacheId: `module-${venueId}`,
|
|
84960
84959
|
venueId
|
|
84961
84960
|
});
|
|
84962
|
-
const activeModules = (
|
|
84961
|
+
const activeModules = (_a2 = data2 == null ? void 0 : data2.data.map(({ module: module2 }) => module2.name)) != null ? _a2 : [];
|
|
84963
84962
|
const FacebookConnected = activeModules.includes("Facebook");
|
|
84964
84963
|
const GoogleConnected = activeModules.includes("Google");
|
|
84965
84964
|
const BingConnected = activeModules.includes("Bing");
|
|
@@ -91269,8 +91268,8 @@ const AddressAutoComplete = () => {
|
|
|
91269
91268
|
const handelLoadSuggestions = (e3) => {
|
|
91270
91269
|
e3.persist();
|
|
91271
91270
|
setTimeout(() => {
|
|
91272
|
-
var
|
|
91273
|
-
void handelChandeAddress((
|
|
91271
|
+
var _a2;
|
|
91272
|
+
void handelChandeAddress((_a2 = e3.target) == null ? void 0 : _a2.value);
|
|
91274
91273
|
}, 700);
|
|
91275
91274
|
};
|
|
91276
91275
|
const onSelectSuggestion = ({ value: value2 }) => {
|
|
@@ -91432,8 +91431,8 @@ const CardOpeningHours$1 = ({
|
|
|
91432
91431
|
}, /* @__PURE__ */ React__default.createElement(UIList, {
|
|
91433
91432
|
mode: "vertical"
|
|
91434
91433
|
}, weekdays.map((weekday2) => {
|
|
91435
|
-
var
|
|
91436
|
-
const day2 = (
|
|
91434
|
+
var _a2;
|
|
91435
|
+
const day2 = (_a2 = values == null ? void 0 : values.regularHours) == null ? void 0 : _a2[weekday2 == null ? void 0 : weekday2.id];
|
|
91437
91436
|
if (!day2) {
|
|
91438
91437
|
return null;
|
|
91439
91438
|
}
|
|
@@ -92180,11 +92179,11 @@ const SelectAttribute = ({
|
|
|
92180
92179
|
}, position2 === "bottom" && renderSelectedItems()));
|
|
92181
92180
|
};
|
|
92182
92181
|
const AttributesExtra = ({ attributes: attributes2 }) => {
|
|
92183
|
-
var
|
|
92182
|
+
var _a2;
|
|
92184
92183
|
if (attributes2.length === 0) {
|
|
92185
92184
|
return null;
|
|
92186
92185
|
}
|
|
92187
|
-
const name = (
|
|
92186
|
+
const name = (_a2 = attributes2[0]) == null ? void 0 : _a2.typeName;
|
|
92188
92187
|
return /* @__PURE__ */ React__default.createElement(SelectAttribute, {
|
|
92189
92188
|
options: attributes2,
|
|
92190
92189
|
label: `Extra ${name} attributes`,
|
|
@@ -92706,7 +92705,7 @@ var FILES_TO_IGNORE = [
|
|
|
92706
92705
|
];
|
|
92707
92706
|
function fromEvent(evt) {
|
|
92708
92707
|
return __awaiter(this, void 0, void 0, function() {
|
|
92709
|
-
return __generator(this, function(
|
|
92708
|
+
return __generator(this, function(_a2) {
|
|
92710
92709
|
if (isObject2(evt) && isDataTransfer(evt.dataTransfer)) {
|
|
92711
92710
|
return [2, getDataTransferFiles(evt.dataTransfer, evt.type)];
|
|
92712
92711
|
} else if (isChangeEvt(evt)) {
|
|
@@ -92737,14 +92736,14 @@ function getInputFiles(evt) {
|
|
|
92737
92736
|
function getFsHandleFiles(handles) {
|
|
92738
92737
|
return __awaiter(this, void 0, void 0, function() {
|
|
92739
92738
|
var files;
|
|
92740
|
-
return __generator(this, function(
|
|
92741
|
-
switch (
|
|
92739
|
+
return __generator(this, function(_a2) {
|
|
92740
|
+
switch (_a2.label) {
|
|
92742
92741
|
case 0:
|
|
92743
92742
|
return [4, Promise.all(handles.map(function(h2) {
|
|
92744
92743
|
return h2.getFile();
|
|
92745
92744
|
}))];
|
|
92746
92745
|
case 1:
|
|
92747
|
-
files =
|
|
92746
|
+
files = _a2.sent();
|
|
92748
92747
|
return [2, files.map(function(file2) {
|
|
92749
92748
|
return toFileWithPath(file2);
|
|
92750
92749
|
})];
|
|
@@ -92755,8 +92754,8 @@ function getFsHandleFiles(handles) {
|
|
|
92755
92754
|
function getDataTransferFiles(dt, type4) {
|
|
92756
92755
|
return __awaiter(this, void 0, void 0, function() {
|
|
92757
92756
|
var items, files;
|
|
92758
|
-
return __generator(this, function(
|
|
92759
|
-
switch (
|
|
92757
|
+
return __generator(this, function(_a2) {
|
|
92758
|
+
switch (_a2.label) {
|
|
92760
92759
|
case 0:
|
|
92761
92760
|
if (!dt.items)
|
|
92762
92761
|
return [3, 2];
|
|
@@ -92768,7 +92767,7 @@ function getDataTransferFiles(dt, type4) {
|
|
|
92768
92767
|
}
|
|
92769
92768
|
return [4, Promise.all(items.map(toFilePromises))];
|
|
92770
92769
|
case 1:
|
|
92771
|
-
files =
|
|
92770
|
+
files = _a2.sent();
|
|
92772
92771
|
return [2, noIgnoredFiles(flatten(files))];
|
|
92773
92772
|
case 2:
|
|
92774
92773
|
return [2, noIgnoredFiles(fromList(dt.files).map(function(file2) {
|
|
@@ -92819,7 +92818,7 @@ function fromDataTransferItem(item2) {
|
|
|
92819
92818
|
}
|
|
92820
92819
|
function fromEntry(entry) {
|
|
92821
92820
|
return __awaiter(this, void 0, void 0, function() {
|
|
92822
|
-
return __generator(this, function(
|
|
92821
|
+
return __generator(this, function(_a2) {
|
|
92823
92822
|
return [2, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];
|
|
92824
92823
|
});
|
|
92825
92824
|
});
|
|
@@ -92833,21 +92832,21 @@ function fromDirEntry(entry) {
|
|
|
92833
92832
|
reader.readEntries(function(batch) {
|
|
92834
92833
|
return __awaiter(_this, void 0, void 0, function() {
|
|
92835
92834
|
var files, err_1, items;
|
|
92836
|
-
return __generator(this, function(
|
|
92837
|
-
switch (
|
|
92835
|
+
return __generator(this, function(_a2) {
|
|
92836
|
+
switch (_a2.label) {
|
|
92838
92837
|
case 0:
|
|
92839
92838
|
if (!!batch.length)
|
|
92840
92839
|
return [3, 5];
|
|
92841
|
-
|
|
92840
|
+
_a2.label = 1;
|
|
92842
92841
|
case 1:
|
|
92843
|
-
|
|
92842
|
+
_a2.trys.push([1, 3, , 4]);
|
|
92844
92843
|
return [4, Promise.all(entries)];
|
|
92845
92844
|
case 2:
|
|
92846
|
-
files =
|
|
92845
|
+
files = _a2.sent();
|
|
92847
92846
|
resolve(files);
|
|
92848
92847
|
return [3, 4];
|
|
92849
92848
|
case 3:
|
|
92850
|
-
err_1 =
|
|
92849
|
+
err_1 = _a2.sent();
|
|
92851
92850
|
reject(err_1);
|
|
92852
92851
|
return [3, 4];
|
|
92853
92852
|
case 4:
|
|
@@ -92856,7 +92855,7 @@ function fromDirEntry(entry) {
|
|
|
92856
92855
|
items = Promise.all(batch.map(fromEntry));
|
|
92857
92856
|
entries.push(items);
|
|
92858
92857
|
readEntries();
|
|
92859
|
-
|
|
92858
|
+
_a2.label = 6;
|
|
92860
92859
|
case 6:
|
|
92861
92860
|
return [2];
|
|
92862
92861
|
}
|
|
@@ -92871,7 +92870,7 @@ function fromDirEntry(entry) {
|
|
|
92871
92870
|
}
|
|
92872
92871
|
function fromFileEntry(entry) {
|
|
92873
92872
|
return __awaiter(this, void 0, void 0, function() {
|
|
92874
|
-
return __generator(this, function(
|
|
92873
|
+
return __generator(this, function(_a2) {
|
|
92875
92874
|
return [2, new Promise(function(resolve, reject) {
|
|
92876
92875
|
entry.file(function(file2) {
|
|
92877
92876
|
var fwp = toFileWithPath(file2, entry.fullPath);
|
|
@@ -93813,7 +93812,7 @@ const MediaPage = () => {
|
|
|
93813
93812
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
93814
93813
|
className: styles$G["container__files"]
|
|
93815
93814
|
}, filesToShow.map((file2, index2) => {
|
|
93816
|
-
var
|
|
93815
|
+
var _a2, _b, _c;
|
|
93817
93816
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
93818
93817
|
key: file2.index,
|
|
93819
93818
|
className: styles$G.file
|
|
@@ -93835,7 +93834,7 @@ const MediaPage = () => {
|
|
|
93835
93834
|
id: "syncChannel.google",
|
|
93836
93835
|
name: "google",
|
|
93837
93836
|
value: "google",
|
|
93838
|
-
checked: (
|
|
93837
|
+
checked: (_a2 = file2.syncChannels) == null ? void 0 : _a2.includes("google"),
|
|
93839
93838
|
onChange: (event) => updateSyncChannels(event, file2.index)
|
|
93840
93839
|
}), /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("img", {
|
|
93841
93840
|
src: google$1,
|
|
@@ -93882,7 +93881,7 @@ const UploadPhoto = async ({
|
|
|
93882
93881
|
venueListingId,
|
|
93883
93882
|
media
|
|
93884
93883
|
}) => {
|
|
93885
|
-
var
|
|
93884
|
+
var _a2;
|
|
93886
93885
|
const formData = new FormData();
|
|
93887
93886
|
if (media.file) {
|
|
93888
93887
|
formData.append("file", media.file);
|
|
@@ -93890,7 +93889,7 @@ const UploadPhoto = async ({
|
|
|
93890
93889
|
formData.append("type", "photo");
|
|
93891
93890
|
formData.append("category", media.category);
|
|
93892
93891
|
formData.append("description", media.description || "");
|
|
93893
|
-
(
|
|
93892
|
+
(_a2 = media.syncChannels) == null ? void 0 : _a2.map((c2) => {
|
|
93894
93893
|
formData.append("syncChannels[]", c2);
|
|
93895
93894
|
});
|
|
93896
93895
|
if (media.id) {
|
|
@@ -93986,7 +93985,7 @@ const Form$5 = ({
|
|
|
93986
93985
|
}, t2("SYNC"))))));
|
|
93987
93986
|
};
|
|
93988
93987
|
const MediaCard = ({ values, onClickEdit }) => {
|
|
93989
|
-
var
|
|
93988
|
+
var _a2;
|
|
93990
93989
|
const { t: t2 } = useTranslation();
|
|
93991
93990
|
return /* @__PURE__ */ React__default.createElement(Card, {
|
|
93992
93991
|
header: {
|
|
@@ -94004,7 +94003,7 @@ const MediaCard = ({ values, onClickEdit }) => {
|
|
|
94004
94003
|
maxHeight: 400,
|
|
94005
94004
|
overflow: "scroll"
|
|
94006
94005
|
}
|
|
94007
|
-
}, (
|
|
94006
|
+
}, (_a2 = values.media) == null ? void 0 : _a2.map(({ id: id2, url: url2 }) => /* @__PURE__ */ React__default.createElement("img", {
|
|
94008
94007
|
src: url2,
|
|
94009
94008
|
key: id2,
|
|
94010
94009
|
style: {
|
|
@@ -94037,7 +94036,7 @@ var styles$F = {
|
|
|
94037
94036
|
link
|
|
94038
94037
|
};
|
|
94039
94038
|
const CardLinks = ({ onClickEdit, values }) => {
|
|
94040
|
-
var
|
|
94039
|
+
var _a2;
|
|
94041
94040
|
const { t: t2 } = useTranslation();
|
|
94042
94041
|
return /* @__PURE__ */ React__default.createElement(Card, {
|
|
94043
94042
|
header: {
|
|
@@ -94057,7 +94056,7 @@ const CardLinks = ({ onClickEdit, values }) => {
|
|
|
94057
94056
|
}, /* @__PURE__ */ React__default.createElement(Item, {
|
|
94058
94057
|
label: "Website",
|
|
94059
94058
|
text: values.urlWebsite
|
|
94060
|
-
})), (
|
|
94059
|
+
})), (_a2 = values.attributesLinks) == null ? void 0 : _a2.map(({ displayName, value: value2 }, key2) => /* @__PURE__ */ React__default.createElement("a", {
|
|
94061
94060
|
href: value2,
|
|
94062
94061
|
key: `a-${key2}`,
|
|
94063
94062
|
target: "_blank",
|
|
@@ -94104,12 +94103,12 @@ const Form$4 = ({
|
|
|
94104
94103
|
reload,
|
|
94105
94104
|
venueListingId
|
|
94106
94105
|
}) => {
|
|
94107
|
-
var
|
|
94106
|
+
var _a2;
|
|
94108
94107
|
const { t: t2 } = useTranslation();
|
|
94109
94108
|
const { data: attributes2 = [], isLoading } = useFetch(formatData$7, {
|
|
94110
94109
|
cacheId: "listingAttributes"
|
|
94111
94110
|
});
|
|
94112
|
-
const attrLinks = (attributes2 == null ? void 0 : attributes2.length) > 0 ? (
|
|
94111
|
+
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
94112
|
const { isExecuting, execute } = useService(UpdateVenueListing, {
|
|
94114
94113
|
onSuccess: async () => {
|
|
94115
94114
|
onCloseForm();
|
|
@@ -94136,8 +94135,8 @@ const Form$4 = ({
|
|
|
94136
94135
|
}), /* @__PURE__ */ React__default.createElement("div", null), /* @__PURE__ */ React__default.createElement("h4", {
|
|
94137
94136
|
style: { marginBottom: 0, marginTop: "10px" }
|
|
94138
94137
|
}, "GOOGLE MY BUSINESS LINKS"), /* @__PURE__ */ React__default.createElement("hr", null), attrLinks == null ? void 0 : attrLinks.map((a2, key2) => {
|
|
94139
|
-
var
|
|
94140
|
-
const value2 = (
|
|
94138
|
+
var _a3;
|
|
94139
|
+
const value2 = (_a3 = initialValues == null ? void 0 : initialValues.attributesLinks) == null ? void 0 : _a3.find((v2, key22) => v2.id === a2.id);
|
|
94141
94140
|
return /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
94142
94141
|
key: key2,
|
|
94143
94142
|
id: `attrLinks[${a2.id}]`,
|
|
@@ -94621,9 +94620,9 @@ const FbButton = ({
|
|
|
94621
94620
|
onSuccess({ id: values.id, accounts: values.accounts.data });
|
|
94622
94621
|
};
|
|
94623
94622
|
useEffect(() => {
|
|
94624
|
-
var
|
|
94623
|
+
var _a2;
|
|
94625
94624
|
if (autoLoad) {
|
|
94626
|
-
(
|
|
94625
|
+
(_a2 = ref.current) == null ? void 0 : _a2.click();
|
|
94627
94626
|
}
|
|
94628
94627
|
}, [autoLoad]);
|
|
94629
94628
|
if (isConnected) {
|
|
@@ -95129,9 +95128,9 @@ const VenueListingDetail = ({
|
|
|
95129
95128
|
});
|
|
95130
95129
|
};
|
|
95131
95130
|
const handleOnPublish = async () => {
|
|
95132
|
-
var
|
|
95131
|
+
var _a2;
|
|
95133
95132
|
setOpenPublishModal(true);
|
|
95134
|
-
if (!((
|
|
95133
|
+
if (!((_a2 = data2 == null ? void 0 : data2.mainCategory) == null ? void 0 : _a2.id)) {
|
|
95135
95134
|
showMessageError("Main category is required");
|
|
95136
95135
|
return;
|
|
95137
95136
|
}
|
|
@@ -95854,7 +95853,7 @@ const UpdateResbook = async ({
|
|
|
95854
95853
|
table_id,
|
|
95855
95854
|
module: module2 = "table"
|
|
95856
95855
|
}) => {
|
|
95857
|
-
var
|
|
95856
|
+
var _a2, _b;
|
|
95858
95857
|
switch (module2) {
|
|
95859
95858
|
case "table":
|
|
95860
95859
|
await instance$1.put(`${BASE_URL}${venue_id}/tables/${table_id}`, formarTableRules(data2));
|
|
@@ -95870,7 +95869,7 @@ const UpdateResbook = async ({
|
|
|
95870
95869
|
return { data: "updated" };
|
|
95871
95870
|
case "specialDate":
|
|
95872
95871
|
if (table_id) {
|
|
95873
|
-
instance$1.put(`${BASE_URL}${venue_id}/special-dates/${table_id}`, formarSpecialHours((
|
|
95872
|
+
instance$1.put(`${BASE_URL}${venue_id}/special-dates/${table_id}`, formarSpecialHours((_a2 = Object.values(data2)[0]) != null ? _a2 : {}));
|
|
95874
95873
|
return { data: "updated" };
|
|
95875
95874
|
} else {
|
|
95876
95875
|
instance$1.post(`${BASE_URL}${venue_id}/special-dates`, formarSpecialHours((_b = Object.values(data2)[0]) != null ? _b : {}));
|
|
@@ -96900,10 +96899,10 @@ var styles$h = {
|
|
|
96900
96899
|
date: date3
|
|
96901
96900
|
};
|
|
96902
96901
|
const SpecificHour = ({ id: id2 }) => {
|
|
96903
|
-
var
|
|
96902
|
+
var _a2;
|
|
96904
96903
|
const [field2, meta, helpers] = useField("");
|
|
96905
96904
|
useTranslation();
|
|
96906
|
-
const { closed = true, timeslots = 1, date: date4 } = (
|
|
96905
|
+
const { closed = true, timeslots = 1, date: date4 } = (_a2 = field2.value[`${id2}`]) != null ? _a2 : {};
|
|
96907
96906
|
const {
|
|
96908
96907
|
setFieldValue
|
|
96909
96908
|
} = useFormikContext();
|
|
@@ -96943,14 +96942,14 @@ const SpecificHours = ({ value: value2, reload, id: id2, venue_id, onDeleteSpeci
|
|
|
96943
96942
|
const [isEditing, setIsEditing] = useState(false);
|
|
96944
96943
|
const { isExecuting, execute } = useService(UpdateResbook, {});
|
|
96945
96944
|
const removeSpecialHour = async () => {
|
|
96946
|
-
var
|
|
96947
|
-
await execute({ venue_id, module: "deleteSpecialDate", table_id: (_b = (
|
|
96945
|
+
var _a2, _b, _c, _d;
|
|
96946
|
+
await execute({ venue_id, module: "deleteSpecialDate", table_id: (_b = (_a2 = Object.values(value2)[0]) == null ? void 0 : _a2.id) != null ? _b : null });
|
|
96948
96947
|
onDeleteSpecialHour((_d = (_c = Object.values(value2)[0]) == null ? void 0 : _c.id) != null ? _d : null);
|
|
96949
96948
|
await reload();
|
|
96950
96949
|
};
|
|
96951
96950
|
const handleSubmit = async (data2) => {
|
|
96952
|
-
var
|
|
96953
|
-
await execute({ venue_id, data: data2, module: "specialDate", table_id: (
|
|
96951
|
+
var _a2;
|
|
96952
|
+
await execute({ venue_id, data: data2, module: "specialDate", table_id: (_a2 = data2[`${id2}`].id) != null ? _a2 : null });
|
|
96954
96953
|
setIsEditing(false);
|
|
96955
96954
|
await reload();
|
|
96956
96955
|
};
|
|
@@ -97059,7 +97058,7 @@ const SpecialDates = ({ venue_id }) => {
|
|
|
97059
97058
|
const formatFormValues = () => {
|
|
97060
97059
|
const result = [];
|
|
97061
97060
|
data2.map((item2, index2) => {
|
|
97062
|
-
var
|
|
97061
|
+
var _a2, _b, _c;
|
|
97063
97062
|
const { startDate, endDate, closed, timeSlots } = item2;
|
|
97064
97063
|
if (timeSlots && timeSlots.length && timeSlots.length > 0) {
|
|
97065
97064
|
result.push({
|
|
@@ -97070,7 +97069,7 @@ const SpecialDates = ({ venue_id }) => {
|
|
|
97070
97069
|
start: formatDate2(startDate),
|
|
97071
97070
|
end: formatDate2(endDate)
|
|
97072
97071
|
},
|
|
97073
|
-
id: (
|
|
97072
|
+
id: (_a2 = item2.id) != null ? _a2 : null,
|
|
97074
97073
|
index: index2
|
|
97075
97074
|
});
|
|
97076
97075
|
} else {
|
|
@@ -97150,9 +97149,9 @@ const GetBookings = async ({
|
|
|
97150
97149
|
};
|
|
97151
97150
|
const formatData = (data2) => {
|
|
97152
97151
|
return data2.map((item2) => {
|
|
97153
|
-
var
|
|
97152
|
+
var _a2, _b, _c;
|
|
97154
97153
|
return {
|
|
97155
|
-
firstName: (
|
|
97154
|
+
firstName: (_a2 = item2.contact.firstname) != null ? _a2 : "",
|
|
97156
97155
|
name: `${(_b = item2.contact.firstname) != null ? _b : ""} ${(_c = item2.contact.lastname) != null ? _c : ""}`,
|
|
97157
97156
|
tableName: item2.table.name,
|
|
97158
97157
|
notes: item2.notes,
|
|
@@ -97306,8 +97305,8 @@ const CustomDatePicker = ({
|
|
|
97306
97305
|
}, [selectedDate]);
|
|
97307
97306
|
useEffect(() => {
|
|
97308
97307
|
function handleDocumentClick(event) {
|
|
97309
|
-
var
|
|
97310
|
-
if (datePickerRef.current && typeof ((
|
|
97308
|
+
var _a2, _b;
|
|
97309
|
+
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
97310
|
setDatePickerOpen(false);
|
|
97312
97311
|
}
|
|
97313
97312
|
}
|
|
@@ -99297,7 +99296,7 @@ const TableFilters$1 = ({ venueId, params, setParams, reload, setBookingValues,
|
|
|
99297
99296
|
})));
|
|
99298
99297
|
};
|
|
99299
99298
|
const TableRow$1 = ({ row: row2, setSelectedTable }) => {
|
|
99300
|
-
var
|
|
99299
|
+
var _a2, _b;
|
|
99301
99300
|
return /* @__PURE__ */ React__default.createElement("tr", {
|
|
99302
99301
|
className: styles$d.item,
|
|
99303
99302
|
onClick: () => setSelectedTable(row2)
|
|
@@ -99305,7 +99304,7 @@ const TableRow$1 = ({ row: row2, setSelectedTable }) => {
|
|
|
99305
99304
|
style: { textAlign: "left", paddingTop: 10, paddingBottom: 10 }
|
|
99306
99305
|
}, `${row2.name} ${row2.area ? "(" + row2.area + ")" : ""}`), /* @__PURE__ */ React__default.createElement("td", {
|
|
99307
99306
|
style: { textAlign: "center" }
|
|
99308
|
-
}, `${(
|
|
99307
|
+
}, `${(_a2 = row2.minCapacity) != null ? _a2 : "?"} - ${(_b = row2.maxCapacity) != null ? _b : "?"}`), /* @__PURE__ */ React__default.createElement("td", {
|
|
99309
99308
|
style: { textAlign: "center" }
|
|
99310
99309
|
}, " ", row2.nextBookingIn ? /* @__PURE__ */ React__default.createElement(TimeFormatter, {
|
|
99311
99310
|
seconds: row2.nextBookingIn,
|
|
@@ -99466,7 +99465,7 @@ const ContactDetailsForm = ({ venueId, selectedTable, setSelectedTable, setCreat
|
|
|
99466
99465
|
});
|
|
99467
99466
|
const { execute, data: data2, isExecuting } = useService(AddBooking);
|
|
99468
99467
|
const handleOnSubmit = async (values) => {
|
|
99469
|
-
var
|
|
99468
|
+
var _a2, _b;
|
|
99470
99469
|
const toSend = {
|
|
99471
99470
|
partySize: bookingValues.partySize.id ? bookingValues.partySize.id : selectedTable.maxCapacity,
|
|
99472
99471
|
table: selectedTable.id,
|
|
@@ -99489,7 +99488,7 @@ const ContactDetailsForm = ({ venueId, selectedTable, setSelectedTable, setCreat
|
|
|
99489
99488
|
setCreated(true);
|
|
99490
99489
|
}
|
|
99491
99490
|
setSelectedTable(null);
|
|
99492
|
-
setCreated({ ...toSend, time: bookingValues.time.id, area: (
|
|
99491
|
+
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
99492
|
reloadMainTable();
|
|
99494
99493
|
};
|
|
99495
99494
|
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("h4", null, t2("CONTACTDETAILS")), /* @__PURE__ */ React__default.createElement(Formik, {
|
|
@@ -99501,7 +99500,7 @@ const ContactDetailsForm = ({ venueId, selectedTable, setSelectedTable, setCreat
|
|
|
99501
99500
|
})));
|
|
99502
99501
|
};
|
|
99503
99502
|
const ContactDetails = ({ setSelectedTable, selectedTable, venueId, setCreated, bookingValues, reloadMainTable, currentTimeZone }) => {
|
|
99504
|
-
var
|
|
99503
|
+
var _a2, _b, _c;
|
|
99505
99504
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
99506
99505
|
className: ""
|
|
99507
99506
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -99520,7 +99519,7 @@ const ContactDetails = ({ setSelectedTable, selectedTable, venueId, setCreated,
|
|
|
99520
99519
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99521
99520
|
icon: "clock",
|
|
99522
99521
|
className: "mr-2"
|
|
99523
|
-
}), (
|
|
99522
|
+
}), (_a2 = bookingValues == null ? void 0 : bookingValues.time.id) != null ? _a2 : "---"), /* @__PURE__ */ React__default.createElement("div", {
|
|
99524
99523
|
style: { display: "flex" }
|
|
99525
99524
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99526
99525
|
icon: "people",
|
|
@@ -99541,7 +99540,7 @@ const ContactDetails = ({ setSelectedTable, selectedTable, venueId, setCreated,
|
|
|
99541
99540
|
}));
|
|
99542
99541
|
};
|
|
99543
99542
|
const BookingConfirmation = ({ bookingDetails }) => {
|
|
99544
|
-
var
|
|
99543
|
+
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
99545
99544
|
const { t: t2 } = useTranslation();
|
|
99546
99545
|
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("h1", {
|
|
99547
99546
|
style: { textAlign: "center" }
|
|
@@ -99552,7 +99551,7 @@ const BookingConfirmation = ({ bookingDetails }) => {
|
|
|
99552
99551
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99553
99552
|
icon: "calendar",
|
|
99554
99553
|
className: "mr-2"
|
|
99555
|
-
}), (
|
|
99554
|
+
}), (_a2 = bookingDetails == null ? void 0 : bookingDetails.dateString) != null ? _a2 : "?"), /* @__PURE__ */ React__default.createElement("div", {
|
|
99556
99555
|
style: { display: "flex" }
|
|
99557
99556
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
99558
99557
|
icon: "clock",
|
|
@@ -99728,7 +99727,7 @@ const CancelReservationModal = ({ onAccept, isLoading, message: message2, title:
|
|
|
99728
99727
|
}, t2("ACCEPT")))))));
|
|
99729
99728
|
};
|
|
99730
99729
|
const ReservationDetail = ({ open, onClose: onClose2, venueId, reloadMainTable, selectedRow, currentTimeZone, setSelectedRow }) => {
|
|
99731
|
-
var
|
|
99730
|
+
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
99732
99731
|
const { t: t2 } = useTranslation();
|
|
99733
99732
|
const [openCancelReservationModal, setOpenCancelReservationModal] = useState(false);
|
|
99734
99733
|
const onOpenCancelRevModal = () => setOpenCancelReservationModal(true);
|
|
@@ -99777,7 +99776,7 @@ const ReservationDetail = ({ open, onClose: onClose2, venueId, reloadMainTable,
|
|
|
99777
99776
|
}, t2("CHANNEL"), ":"), selectedRow.bookingChannelLogo && /* @__PURE__ */ React__default.createElement("img", {
|
|
99778
99777
|
src: selectedRow.bookingChannelLogo,
|
|
99779
99778
|
style: { width: 25, height: 25 }
|
|
99780
|
-
}), /* @__PURE__ */ React__default.createElement("div", null, (
|
|
99779
|
+
}), /* @__PURE__ */ React__default.createElement("div", null, (_a2 = selectedRow.bookingChannelName) != null ? _a2 : "---")), /* @__PURE__ */ React__default.createElement("div", {
|
|
99781
99780
|
style: { display: "flex", justifyContent: "start", flexDirection: "row", gap: 10 }
|
|
99782
99781
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
99783
99782
|
style: { fontWeight: "bold" }
|
|
@@ -100323,7 +100322,7 @@ const CustomTable = ({
|
|
|
100323
100322
|
classNameContent,
|
|
100324
100323
|
...paginationProps
|
|
100325
100324
|
}) => {
|
|
100326
|
-
var
|
|
100325
|
+
var _a2;
|
|
100327
100326
|
const { t: t2 } = useTranslation();
|
|
100328
100327
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
100329
100328
|
className: classNames$2(styles$a.tableContainer, classNameConatiner)
|
|
@@ -100339,7 +100338,7 @@ const CustomTable = ({
|
|
|
100339
100338
|
className: styles$a.th,
|
|
100340
100339
|
key: h2.id
|
|
100341
100340
|
}, h2.label)))), isLoading && /* @__PURE__ */ React__default.createElement(LoadingBody, {
|
|
100342
|
-
rows: (
|
|
100341
|
+
rows: (_a2 = paginationProps == null ? void 0 : paginationProps.rows) != null ? _a2 : 1,
|
|
100343
100342
|
items: header2.length
|
|
100344
100343
|
}), !isLoading && data2.length > 0 && /* @__PURE__ */ React__default.createElement("tbody", {
|
|
100345
100344
|
className: styles$a.tbody
|
|
@@ -100445,8 +100444,8 @@ const LoadingBody = ({
|
|
|
100445
100444
|
}))));
|
|
100446
100445
|
}));
|
|
100447
100446
|
const renderCountry = (country) => {
|
|
100448
|
-
var
|
|
100449
|
-
return (_b = (
|
|
100447
|
+
var _a2, _b;
|
|
100448
|
+
return (_b = (_a2 = _23.find(countries$1, (c2) => c2.id === country)) == null ? void 0 : _a2.label) != null ? _b : "";
|
|
100450
100449
|
};
|
|
100451
100450
|
const ConnectRestaurants = ({ open, onClose: onClose2, bookingChannel }) => {
|
|
100452
100451
|
const { t: t2 } = useTranslation();
|
|
@@ -100784,7 +100783,8 @@ const CommercialFeeTypes = {
|
|
|
100784
100783
|
subscription: "month",
|
|
100785
100784
|
na: "Free"
|
|
100786
100785
|
};
|
|
100787
|
-
const
|
|
100786
|
+
const sessionData = sessionStorage.getItem("sdk_user");
|
|
100787
|
+
const userData = sessionData ? JSON.parse(sessionData) : {};
|
|
100788
100788
|
const conditionsContainer$2 = "_conditionsContainer_1yf4e_1";
|
|
100789
100789
|
const conditionsCardContainer$2 = "_conditionsCardContainer_1yf4e_7";
|
|
100790
100790
|
var styles$9 = {
|
|
@@ -100792,12 +100792,12 @@ var styles$9 = {
|
|
|
100792
100792
|
conditionsCardContainer: conditionsCardContainer$2
|
|
100793
100793
|
};
|
|
100794
100794
|
const ChannelPayment = ({ venueListingId, venueId }) => {
|
|
100795
|
-
var
|
|
100795
|
+
var _a2, _b;
|
|
100796
100796
|
const { t: t2 } = useTranslation();
|
|
100797
100797
|
const navigate = useNavigate();
|
|
100798
100798
|
const location2 = useLocation();
|
|
100799
100799
|
const { bookingChannel } = location2.state;
|
|
100800
|
-
const rms = userData.partner;
|
|
100800
|
+
const rms = userData == null ? void 0 : userData.partner;
|
|
100801
100801
|
const { data: data2, isLoading, error: error3 } = useFetch(getCommercialConditionsFinder, {
|
|
100802
100802
|
cacheId: "comercial-conditions",
|
|
100803
100803
|
params: {
|
|
@@ -100826,7 +100826,7 @@ const ChannelPayment = ({ venueListingId, venueId }) => {
|
|
|
100826
100826
|
alt: bookingChannel.name
|
|
100827
100827
|
})), /* @__PURE__ */ React__default.createElement("h3", null, "Subscribe to ", bookingChannel && bookingChannel.name)), /* @__PURE__ */ React__default.createElement("div", {
|
|
100828
100828
|
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, ((
|
|
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, ((_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
100830
|
style: { display: "flex", justifyContent: "center", marginTop: 20 }
|
|
100831
100831
|
}, /* @__PURE__ */ React__default.createElement(Button$3, {
|
|
100832
100832
|
onClick: () => handleOnAgree()
|
|
@@ -100904,9 +100904,9 @@ const ChannelSubscription = ({ venueListingId, venueId }) => {
|
|
|
100904
100904
|
setSubscriptionCompleted(true);
|
|
100905
100905
|
};
|
|
100906
100906
|
const openCheckout = async () => {
|
|
100907
|
-
var
|
|
100907
|
+
var _a2;
|
|
100908
100908
|
const venues = await getVenues({});
|
|
100909
|
-
paddleEmbed(opportunityId, venues && ((
|
|
100909
|
+
paddleEmbed(opportunityId, venues && ((_a2 = venues.data[0]) == null ? void 0 : _a2.id), checkoutComplete);
|
|
100910
100910
|
};
|
|
100911
100911
|
useEffect(() => {
|
|
100912
100912
|
}, []);
|
|
@@ -100995,6 +100995,17 @@ const ChannelManagement = ({
|
|
|
100995
100995
|
venueId,
|
|
100996
100996
|
venueListingId
|
|
100997
100997
|
}) => {
|
|
100998
|
+
useEffect(() => {
|
|
100999
|
+
const script = document.createElement("script");
|
|
101000
|
+
script.src = "https://cdn.paddle.com/paddle/paddle.js";
|
|
101001
|
+
script.async = true;
|
|
101002
|
+
script.onload = () => {
|
|
101003
|
+
};
|
|
101004
|
+
document.body.appendChild(script);
|
|
101005
|
+
return () => {
|
|
101006
|
+
document.body.removeChild(script);
|
|
101007
|
+
};
|
|
101008
|
+
}, []);
|
|
100998
101009
|
return /* @__PURE__ */ React__default.createElement(MemoryRouter, {
|
|
100999
101010
|
initialEntries: ["/channels"]
|
|
101000
101011
|
}, /* @__PURE__ */ React__default.createElement(Routes, null, /* @__PURE__ */ React__default.createElement(Route, {
|
|
@@ -101580,7 +101591,7 @@ const ToolBar = ({ filters: filters2, setFilters, setTotalDays }) => {
|
|
|
101580
101591
|
till: hooks().endOf("week").format("YYYY-MM-DD")
|
|
101581
101592
|
};
|
|
101582
101593
|
const handleOnFilter = (values) => {
|
|
101583
|
-
var
|
|
101594
|
+
var _a2, _b;
|
|
101584
101595
|
const toSend = {
|
|
101585
101596
|
...values.from ? {
|
|
101586
101597
|
["filters[from]"]: values.from
|
|
@@ -101602,7 +101613,7 @@ const ToolBar = ({ filters: filters2, setFilters, setTotalDays }) => {
|
|
|
101602
101613
|
"filters[venues]": values.selectedRestaurants.map((sr) => sr.id)
|
|
101603
101614
|
} : {}
|
|
101604
101615
|
};
|
|
101605
|
-
setTotalDays(hooks((
|
|
101616
|
+
setTotalDays(hooks((_a2 = values.till) != null ? _a2 : null).diff(hooks((_b = values.from) != null ? _b : null), "day") + 1);
|
|
101606
101617
|
setFilters(toSend);
|
|
101607
101618
|
};
|
|
101608
101619
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Row$1, {
|
|
@@ -101794,8 +101805,8 @@ var styles = {
|
|
|
101794
101805
|
"sidebar--navbar--open": "_sidebar--navbar--open_12zss_18"
|
|
101795
101806
|
};
|
|
101796
101807
|
const hasChildren = (route) => {
|
|
101797
|
-
var
|
|
101798
|
-
return !!((
|
|
101808
|
+
var _a2;
|
|
101809
|
+
return !!((_a2 = route == null ? void 0 : route.children) == null ? void 0 : _a2.length);
|
|
101799
101810
|
};
|
|
101800
101811
|
const SideBar = ({ open, onClose: onClose2 }) => {
|
|
101801
101812
|
const [hasCahnges, setContext] = useContext(FormContext$1);
|