@bigbinary/neeto-custom-domains-frontend 3.3.3 → 3.3.5
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/dist/.ready +1 -1
- package/dist/CustomDomain.js +1 -1
- package/dist/{application-kZuSmUKo.js → application-CK-Outm_.js} +2 -2
- package/dist/{application-kZuSmUKo.js.map → application-CK-Outm_.js.map} +1 -1
- package/dist/{application-Dwn9zjMI.js → application-DVE1-xzg.js} +2 -2
- package/dist/{application-Dwn9zjMI.js.map → application-DVE1-xzg.js.map} +1 -1
- package/dist/cjs/CustomDomain.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/v2/CustomDomain.js +44 -47
- package/dist/cjs/v2/CustomDomain.js.map +1 -1
- package/dist/cjs/v2/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/v2/CustomDomain.js +46 -49
- package/dist/v2/CustomDomain.js.map +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +7 -7
package/dist/v2/CustomDomain.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import { createElement, useState, useEffect, memo } from 'react';
|
|
3
|
-
import { isPresent, truncate, isNotEmpty
|
|
3
|
+
import { isPresent, truncate, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { withT, useQueryParams } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
5
5
|
import { Alert, Typography, Button, Tooltip, Badge, Sheet, Callout, DataTable, Toastr, Stepper, Spinner } from '@bigbinary/neeto-atoms';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
|
-
import { p as parse, u as useCreateCustomDomain, i as img, a as useValidateDomain, D as DOMAIN_QUERY_KEY, b as useFetchCustomDomain, c as useDeleteCustomDomain } from '../application-
|
|
7
|
+
import { p as parse, u as useCreateCustomDomain, i as img, a as useValidateDomain, D as DOMAIN_QUERY_KEY, b as useFetchCustomDomain, c as useDeleteCustomDomain } from '../application-CK-Outm_.js';
|
|
8
8
|
import Container from '@bigbinary/neeto-molecules/v2/Container';
|
|
9
9
|
import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
|
|
10
10
|
import Warning2 from '@bigbinary/neeto-icons/Warning2';
|
|
11
11
|
import CloseCircle from '@bigbinary/neeto-icons/CloseCircle';
|
|
12
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { SINGULAR } from '@bigbinary/neeto-commons-frontend/v2/constants';
|
|
15
15
|
import CustomDomain$1 from '@bigbinary/neeto-icons/CustomDomain';
|
|
@@ -112,14 +112,14 @@ var Domain = function Domain(_ref) {
|
|
|
112
112
|
})
|
|
113
113
|
}),
|
|
114
114
|
children: /*#__PURE__*/jsx("div", {
|
|
115
|
-
className: "flex flex-col gap-y-6 divide-y
|
|
115
|
+
className: "divide-border flex flex-col gap-y-6 divide-y",
|
|
116
116
|
children: customDomains === null || customDomains === void 0 ? void 0 : customDomains.map(function (customDomain, index) {
|
|
117
117
|
var _customDomain$redirec;
|
|
118
118
|
return /*#__PURE__*/jsxs("div", {
|
|
119
|
-
className: "flex items-
|
|
119
|
+
className: "flex items-start gap-x-3 pb-6 last:pb-0",
|
|
120
120
|
"data-testid": "custom-domain-item",
|
|
121
121
|
children: [/*#__PURE__*/jsx("div", {
|
|
122
|
-
className: classNames("
|
|
122
|
+
className: classNames("flex items-center justify-center rounded-lg p-2", {
|
|
123
123
|
"bg-success": (customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "active",
|
|
124
124
|
"bg-warning": (customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "pending",
|
|
125
125
|
"bg-error": (customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "failed"
|
|
@@ -206,8 +206,8 @@ var Domain = function Domain(_ref) {
|
|
|
206
206
|
Link: /*#__PURE__*/jsx(Button, {
|
|
207
207
|
href: helpDocUrl,
|
|
208
208
|
rel: "noreferrer",
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
target: "_blank",
|
|
210
|
+
variant: "link"
|
|
211
211
|
})
|
|
212
212
|
}
|
|
213
213
|
})
|
|
@@ -226,39 +226,38 @@ var Domain = function Domain(_ref) {
|
|
|
226
226
|
onClick: openPane
|
|
227
227
|
}),
|
|
228
228
|
children: /*#__PURE__*/jsxs("div", {
|
|
229
|
-
className: "flex h-full w-full items-
|
|
229
|
+
className: "flex h-full w-full items-start gap-x-3",
|
|
230
230
|
children: [/*#__PURE__*/jsx("div", {
|
|
231
|
-
className: "bg-muted
|
|
231
|
+
className: "bg-muted flex items-start justify-center rounded-lg p-2",
|
|
232
232
|
children: /*#__PURE__*/jsx(CustomDomain$1, {
|
|
233
233
|
className: "text-muted-foreground",
|
|
234
234
|
size: 32
|
|
235
235
|
})
|
|
236
236
|
}), /*#__PURE__*/jsxs("div", {
|
|
237
|
-
className: "flex flex-col
|
|
237
|
+
className: "flex flex-col",
|
|
238
238
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
239
|
+
className: "mb-3",
|
|
239
240
|
variant: "h4",
|
|
240
241
|
weight: "medium",
|
|
241
242
|
children: t("neetoCustomDomains.noData.title")
|
|
242
|
-
}), /*#__PURE__*/
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
})
|
|
261
|
-
})]
|
|
243
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
244
|
+
className: "text-muted-foreground",
|
|
245
|
+
variant: "body2",
|
|
246
|
+
children: disconnectedIntegrationCardDescription || t("neetoCustomDomains.noData.helpTextDefault")
|
|
247
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
248
|
+
className: "text-muted-foreground mt-2",
|
|
249
|
+
variant: "body2",
|
|
250
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
251
|
+
i18nKey: "neetoCustomDomains.noData.helpTextDisconnected",
|
|
252
|
+
components: {
|
|
253
|
+
Link: /*#__PURE__*/jsx(Button, {
|
|
254
|
+
href: helpDocUrl,
|
|
255
|
+
rel: "noreferrer",
|
|
256
|
+
target: "_blank",
|
|
257
|
+
variant: "link"
|
|
258
|
+
})
|
|
259
|
+
}
|
|
260
|
+
})
|
|
262
261
|
})]
|
|
263
262
|
})]
|
|
264
263
|
})
|
|
@@ -331,6 +330,7 @@ var Strategy = withT(function (_ref) {
|
|
|
331
330
|
setPrimaryDomain = _ref.setPrimaryDomain,
|
|
332
331
|
onClose = _ref.onClose;
|
|
333
332
|
return /*#__PURE__*/jsxs(Form, {
|
|
333
|
+
className: "flex min-h-0 grow flex-col",
|
|
334
334
|
formikProps: {
|
|
335
335
|
initialValues: STRATEGY_INITIAL_VALUES,
|
|
336
336
|
validationSchema: strategyValidationSchema,
|
|
@@ -345,8 +345,8 @@ var Strategy = withT(function (_ref) {
|
|
|
345
345
|
children: /*#__PURE__*/jsxs("div", {
|
|
346
346
|
className: "space-y-4",
|
|
347
347
|
children: [/*#__PURE__*/jsx(RadioGroup, {
|
|
348
|
-
stacked: true,
|
|
349
348
|
name: "strategy",
|
|
349
|
+
orientation: "vertical",
|
|
350
350
|
children: strategyOptions.map(function (_ref2, index) {
|
|
351
351
|
var value = _ref2.value,
|
|
352
352
|
label = _ref2.label,
|
|
@@ -381,8 +381,8 @@ var Strategy = withT(function (_ref) {
|
|
|
381
381
|
Link: /*#__PURE__*/jsx(Button, {
|
|
382
382
|
href: errorData === null || errorData === void 0 ? void 0 : errorData.pageUrl,
|
|
383
383
|
rel: "noreferrer",
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
target: "_blank",
|
|
385
|
+
variant: "link"
|
|
386
386
|
})
|
|
387
387
|
}
|
|
388
388
|
})
|
|
@@ -496,7 +496,7 @@ var DomainField = function DomainField(_ref) {
|
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
498
|
return /*#__PURE__*/jsx(Form, {
|
|
499
|
-
className: "flex-
|
|
499
|
+
className: "flex min-h-0 grow flex-col",
|
|
500
500
|
formikProps: {
|
|
501
501
|
initialValues: INITIAL_VALUES,
|
|
502
502
|
validationSchema: getCustomDomainValidationSchema(),
|
|
@@ -504,14 +504,13 @@ var DomainField = function DomainField(_ref) {
|
|
|
504
504
|
},
|
|
505
505
|
children: function children(_ref5) {
|
|
506
506
|
var dirty = _ref5.dirty;
|
|
507
|
-
return /*#__PURE__*/jsxs(
|
|
508
|
-
className: "w-full",
|
|
507
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
509
508
|
children: [/*#__PURE__*/jsx(Sheet.Body, {
|
|
510
509
|
children: /*#__PURE__*/jsxs("div", {
|
|
511
510
|
className: "w-full space-y-4",
|
|
512
511
|
children: [/*#__PURE__*/jsx(Input, {
|
|
513
512
|
required: true,
|
|
514
|
-
className: "w-full",
|
|
513
|
+
className: "w-[480px] max-w-full",
|
|
515
514
|
"data-testid": "custom-domain-input-field",
|
|
516
515
|
label: t("neetoCustomDomains.label"),
|
|
517
516
|
name: "hostname",
|
|
@@ -625,6 +624,7 @@ var columnData = function columnData(dnsProvider) {
|
|
|
625
624
|
return /*#__PURE__*/jsx("div", {
|
|
626
625
|
className: "flex items-center justify-between gap-1",
|
|
627
626
|
children: /*#__PURE__*/jsx("img", {
|
|
627
|
+
className: "max-h-[30px] w-auto",
|
|
628
628
|
src: img
|
|
629
629
|
})
|
|
630
630
|
});
|
|
@@ -1082,7 +1082,7 @@ var Validation = function Validation(_ref) {
|
|
|
1082
1082
|
Link: /*#__PURE__*/jsx(HelpUrlLink, {}),
|
|
1083
1083
|
br: /*#__PURE__*/jsx("br", {})
|
|
1084
1084
|
};
|
|
1085
|
-
return /*#__PURE__*/jsxs(
|
|
1085
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
1086
1086
|
children: [/*#__PURE__*/jsxs(Sheet.Body, {
|
|
1087
1087
|
className: "space-y-4",
|
|
1088
1088
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -1105,10 +1105,10 @@ var Validation = function Validation(_ref) {
|
|
|
1105
1105
|
})
|
|
1106
1106
|
})]
|
|
1107
1107
|
}), /*#__PURE__*/jsx("div", {
|
|
1108
|
-
className: "space-y-1",
|
|
1108
|
+
className: "w-full space-y-1",
|
|
1109
1109
|
children: /*#__PURE__*/jsx(DataTable, {
|
|
1110
1110
|
allowRowClick: false,
|
|
1111
|
-
|
|
1111
|
+
columns: columnData(dnsProvider),
|
|
1112
1112
|
data: customDomains.map(function (_ref5) {
|
|
1113
1113
|
var hostname = _ref5.hostname,
|
|
1114
1114
|
dnsTarget = _ref5.dnsTarget,
|
|
@@ -1117,6 +1117,7 @@ var Validation = function Validation(_ref) {
|
|
|
1117
1117
|
}).flat()
|
|
1118
1118
|
})
|
|
1119
1119
|
}), status === "failed" && /*#__PURE__*/jsx(Callout, {
|
|
1120
|
+
className: "w-full",
|
|
1120
1121
|
variant: STATUS_TAG_STYLES[status],
|
|
1121
1122
|
children: /*#__PURE__*/jsx(Typography, {
|
|
1122
1123
|
variant: "body2",
|
|
@@ -1135,6 +1136,7 @@ var Validation = function Validation(_ref) {
|
|
|
1135
1136
|
})
|
|
1136
1137
|
})
|
|
1137
1138
|
}), isNotEmpty(errorKey) && status === "pending" && /*#__PURE__*/jsx(Callout, {
|
|
1139
|
+
className: "w-full",
|
|
1138
1140
|
variant: STATUS_TAG_STYLES[status],
|
|
1139
1141
|
children: /*#__PURE__*/jsx(Typography, {
|
|
1140
1142
|
variant: "body2",
|
|
@@ -1201,20 +1203,15 @@ var DomainPane = function DomainPane(_ref) {
|
|
|
1201
1203
|
return /*#__PURE__*/jsxs(Sheet, {
|
|
1202
1204
|
isOpen: isOpen,
|
|
1203
1205
|
onClose: onClose,
|
|
1204
|
-
className: "flex flex-col",
|
|
1205
|
-
size: "large",
|
|
1206
|
+
className: "neeto_custom_domain_pane flex flex-col data-[side=right]:sm:max-w-[1200px]",
|
|
1206
1207
|
children: [/*#__PURE__*/jsxs(Sheet.Header, {
|
|
1207
1208
|
className: "space-y-2",
|
|
1208
1209
|
children: [/*#__PURE__*/jsx(Sheet.Title, {
|
|
1209
|
-
children:
|
|
1210
|
-
variant: "h2",
|
|
1211
|
-
children: t("neetoCustomDomains.addNew")
|
|
1212
|
-
})
|
|
1210
|
+
children: t("neetoCustomDomains.addNew")
|
|
1213
1211
|
}), /*#__PURE__*/jsx("div", {
|
|
1214
|
-
className: "neeto_custom_domain_stepper -
|
|
1212
|
+
className: "neeto_custom_domain_stepper mt-2 px-1",
|
|
1215
1213
|
children: /*#__PURE__*/jsx(Stepper, {
|
|
1216
1214
|
activeIndex: CURRENT_STEP[getCurrentStep(primaryDomain)],
|
|
1217
|
-
setActiveIndex: noop,
|
|
1218
1215
|
steps: STEPS
|
|
1219
1216
|
})
|
|
1220
1217
|
})]
|