@bigbinary/neeto-custom-domains-frontend 3.2.2 → 3.3.0
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/README.md +65 -8
- package/app/javascript/src/translations/en.json +7 -5
- package/dist/.ready +1 -0
- package/dist/CustomDomain.js +77 -46
- package/dist/CustomDomain.js.map +1 -1
- package/dist/cjs/CustomDomain.js +74 -43
- package/dist/cjs/CustomDomain.js.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +27 -27
package/README.md
CHANGED
|
@@ -68,30 +68,87 @@ end
|
|
|
68
68
|
All common controller logic is extracted to the engine. However, we still need
|
|
69
69
|
to load some records from the host app controller.
|
|
70
70
|
|
|
71
|
+
If the custom domain is associated with `Organization`, add a
|
|
72
|
+
`Api::V1::CustomDomainable` concern in the host app and include it in the
|
|
73
|
+
controller. This keeps the loader reusable across controllers that need it.
|
|
74
|
+
|
|
71
75
|
```ruby
|
|
72
|
-
|
|
76
|
+
# app/controllers/concerns/api/v1/custom_domainable.rb
|
|
77
|
+
module Api::V1::CustomDomainable
|
|
78
|
+
extend ActiveSupport::Concern
|
|
79
|
+
|
|
73
80
|
private
|
|
74
81
|
|
|
75
|
-
# If custom_domain is associated to Organization
|
|
76
82
|
def load_custom_domainable!
|
|
77
83
|
@custom_domainable = organization
|
|
78
84
|
end
|
|
85
|
+
end
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```ruby
|
|
89
|
+
class Api::V1::Admin::CustomDomainsController < NeetoCustomDomainsEngine::DomainsController
|
|
90
|
+
include Api::V1::CustomDomainable
|
|
91
|
+
end
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If the custom domain is associated with another resource (eg. `Site`), define
|
|
95
|
+
`load_custom_domainable!` directly in the controller instead:
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
class Api::V1::Admin::CustomDomainsController < NeetoCustomDomainsEngine::DomainsController
|
|
99
|
+
private
|
|
79
100
|
|
|
80
|
-
# If custom_domain is associated to other resources (eg: site)
|
|
81
101
|
def load_custom_domainable!
|
|
82
102
|
@custom_domainable = organization.sites.find(params[:site_id])
|
|
83
103
|
end
|
|
84
104
|
end
|
|
85
105
|
```
|
|
86
106
|
|
|
87
|
-
3.
|
|
107
|
+
3. Add a `CustomDomainConcern` model concern
|
|
108
|
+
|
|
109
|
+
The engine's `NeetoCustomDomainsEngine::Domain` model needs `custom_domain_url`
|
|
110
|
+
and `organization` to be available on the domain record — they are used, for
|
|
111
|
+
example, when generating links in notification emails and when pushing the
|
|
112
|
+
domain to NeetoTower.
|
|
113
|
+
|
|
114
|
+
Define the concern in the host app at the exact path below. The engine
|
|
115
|
+
auto-includes it via `include CustomDomainConcern if defined?(CustomDomainConcern)`,
|
|
116
|
+
so no initializer or manual patching is needed — Rails autoloading handles it.
|
|
117
|
+
|
|
118
|
+
The path returned by `custom_domain_url` is product-specific. Point it at
|
|
119
|
+
wherever the custom domain settings page is mounted in your product's admin
|
|
120
|
+
panel (the example below uses NeetoQuiz's path; replace it for your product).
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
# app/models/concerns/custom_domain_concern.rb
|
|
124
|
+
module CustomDomainConcern
|
|
125
|
+
extend ActiveSupport::Concern
|
|
126
|
+
|
|
127
|
+
def custom_domain_url
|
|
128
|
+
root_url = organization.root_url
|
|
129
|
+
# Replace this path with the route to the custom domain settings page
|
|
130
|
+
# in your product's admin panel.
|
|
131
|
+
"#{root_url}/admin/admin-panel/custom-domain"
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def organization
|
|
135
|
+
custom_domainable
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
If the `custom_domainable` is not the `Organization` itself (eg. `Site`),
|
|
141
|
+
update `organization` to traverse to the owning organization (eg.
|
|
142
|
+
`custom_domainable.organization`).
|
|
143
|
+
|
|
144
|
+
4. Include the following module to your application's `config/routes.rb` file:
|
|
88
145
|
|
|
89
146
|
```ruby
|
|
90
147
|
include NeetoCustomDomainsEngine::Routes::Draw
|
|
91
148
|
|
|
92
149
|
```
|
|
93
150
|
|
|
94
|
-
|
|
151
|
+
5. Define required routes.
|
|
95
152
|
|
|
96
153
|
```ruby
|
|
97
154
|
# config/routes.rb
|
|
@@ -101,7 +158,7 @@ custom_domains_routes :acme
|
|
|
101
158
|
custom_domains_routes :domain
|
|
102
159
|
```
|
|
103
160
|
|
|
104
|
-
|
|
161
|
+
6. Add frontend component. `url` should be the api to the custom domains
|
|
105
162
|
controller.
|
|
106
163
|
|
|
107
164
|
```js
|
|
@@ -193,7 +250,7 @@ const CustomDomain = () => {
|
|
|
193
250
|
export default CustomDomain;
|
|
194
251
|
```
|
|
195
252
|
|
|
196
|
-
|
|
253
|
+
7. Mount the `CustomDomain` component at the desired path.
|
|
197
254
|
|
|
198
255
|
##### ENV variables
|
|
199
256
|
|
|
@@ -230,4 +287,4 @@ guide for details on how to publish.
|
|
|
230
287
|
- NeetoInvoice
|
|
231
288
|
- NeetoChat
|
|
232
289
|
- NeetoRunner
|
|
233
|
-
|
|
290
|
+
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"notFound": "There are no custom domains to show.",
|
|
33
33
|
"tooltipContent": "Delete currently added custom domain to add a new one.",
|
|
34
34
|
"placeholder": "{{subdomainPlaceholder,anyCase}}.yourbusiness.com",
|
|
35
|
-
"activeTooltipDescription": "Your custom domain is active.",
|
|
36
|
-
"pendingTooltipDescription": "Your custom domain
|
|
35
|
+
"activeTooltipDescription": "Your custom domain is verified and active.",
|
|
36
|
+
"pendingTooltipDescription": "Your custom domain has pending validation. DNS changes can take up to 48 hours to propagate.",
|
|
37
37
|
"failedTooltipDescription": "Your custom domain is failed to validate. Please try again later.",
|
|
38
|
-
"redirectionTooltipDescription": "Your custom domain is active. Visiting <b>{{fromDomain}}</b> will redirect you to <b>{{toDomain}}</b>.",
|
|
38
|
+
"redirectionTooltipDescription": "Your custom domain is verified and active. Visiting <b>{{fromDomain}}</b> will redirect you to <b>{{toDomain}}</b>.",
|
|
39
39
|
"cname": "CNAME",
|
|
40
40
|
"label": "Domain name",
|
|
41
41
|
"domainValidation": "Domain validation",
|
|
@@ -95,8 +95,10 @@
|
|
|
95
95
|
"customDomain": "Add domain of your choice in case you do not prefer to use the default Neeto domain."
|
|
96
96
|
},
|
|
97
97
|
"noData": {
|
|
98
|
-
"title": "
|
|
99
|
-
"
|
|
98
|
+
"title": "Setup your custom domain",
|
|
99
|
+
"helpTextDefault": "Add your custom domain to have a personalized URL.",
|
|
100
|
+
"helpTextDisconnected": "To learn how to set up a custom domain, visit this <Link>help article</Link>.",
|
|
101
|
+
"helpTextConnected": "To learn more about custom domains, visit this <Link>help article</Link>."
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
}
|
package/dist/.ready
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Built at 2026-05-28T19:41:52.619Z
|
package/dist/CustomDomain.js
CHANGED
|
@@ -2,12 +2,12 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
2
2
|
import { createElement, useState, useEffect, memo } from 'react';
|
|
3
3
|
import { isPresent, truncate, isNotEmpty, noop } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { withT, useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
|
-
import Container from '@bigbinary/neeto-molecules/Container';
|
|
6
5
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
7
6
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
8
7
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
9
8
|
import useMutationWithInvalidation from '@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation';
|
|
10
9
|
import axios from 'axios';
|
|
10
|
+
import Container from '@bigbinary/neeto-molecules/Container';
|
|
11
11
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
12
12
|
import { Trans, useTranslation } from 'react-i18next';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -15,11 +15,11 @@ import classNames from 'classnames';
|
|
|
15
15
|
import { SINGULAR } from '@bigbinary/neeto-commons-frontend/constants';
|
|
16
16
|
import CustomDomain$1 from '@bigbinary/neeto-icons/CustomDomain';
|
|
17
17
|
import ExternalLink from '@bigbinary/neeto-icons/ExternalLink';
|
|
18
|
-
import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
|
|
19
|
-
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
20
18
|
import Button from '@bigbinary/neetoui/Button';
|
|
21
19
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
22
20
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
21
|
+
import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
|
|
22
|
+
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
23
23
|
import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
|
|
24
24
|
import Warning2 from '@bigbinary/neeto-icons/Warning2';
|
|
25
25
|
import CloseCircle from '@bigbinary/neeto-icons/CloseCircle';
|
|
@@ -73,7 +73,7 @@ var domainsApi = {
|
|
|
73
73
|
var DOMAIN_QUERY_KEY = "custom-domain";
|
|
74
74
|
|
|
75
75
|
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
76
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t),
|
|
76
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
77
77
|
var useCreateCustomDomain = function useCreateCustomDomain(url) {
|
|
78
78
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
79
79
|
return useMutationWithInvalidation(function (payload) {
|
|
@@ -161,9 +161,12 @@ var DNS_TARGETS = {
|
|
|
161
161
|
|
|
162
162
|
var Domain = function Domain(_ref) {
|
|
163
163
|
var isCustomDomainAdded = _ref.isCustomDomainAdded,
|
|
164
|
+
disconnectedIntegrationCardDescription = _ref.disconnectedIntegrationCardDescription,
|
|
165
|
+
connectedIntegrationCardDescription = _ref.connectedIntegrationCardDescription,
|
|
164
166
|
openPane = _ref.openPane,
|
|
165
167
|
customDomains = _ref.customDomains,
|
|
166
168
|
openDeleteAlert = _ref.openDeleteAlert,
|
|
169
|
+
helpDocUrl = _ref.helpDocUrl,
|
|
167
170
|
setSelectedCustomDomain = _ref.setSelectedCustomDomain;
|
|
168
171
|
var _useTranslation = useTranslation(),
|
|
169
172
|
t = _useTranslation.t;
|
|
@@ -259,19 +262,39 @@ var Domain = function Domain(_ref) {
|
|
|
259
262
|
"data-testid": "delete-custom-domain-button"
|
|
260
263
|
}]
|
|
261
264
|
})]
|
|
262
|
-
}), /*#__PURE__*/jsxs(
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
265
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
266
|
+
children: [/*#__PURE__*/jsxs(Typography, {
|
|
267
|
+
className: "neeto-ui-text-gray-600",
|
|
268
|
+
style: "body2",
|
|
269
|
+
children: [(customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "active" && (customDomain === null || customDomain === void 0 ? void 0 : customDomain.redirection) && /*#__PURE__*/jsxs("span", {
|
|
270
|
+
children: [/*#__PURE__*/jsx(Trans, {
|
|
271
|
+
components: {
|
|
272
|
+
b: /*#__PURE__*/jsx("b", {})
|
|
273
|
+
},
|
|
274
|
+
i18nKey: "neetoCustomDomains.redirectionTooltipDescription",
|
|
275
|
+
values: {
|
|
276
|
+
fromDomain: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
|
|
277
|
+
toDomain: customDomain === null || customDomain === void 0 || (_customDomain$redirec = customDomain.redirection) === null || _customDomain$redirec === void 0 ? void 0 : _customDomain$redirec.toHostname
|
|
278
|
+
}
|
|
279
|
+
}), " ", connectedIntegrationCardDescription || ""]
|
|
280
|
+
}), (customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "active" && !(customDomain !== null && customDomain !== void 0 && customDomain.redirection) && /*#__PURE__*/jsxs("span", {
|
|
281
|
+
children: [t("neetoCustomDomains.activeTooltipDescription"), " ", connectedIntegrationCardDescription || ""]
|
|
282
|
+
}), (customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "pending" && t("neetoCustomDomains.pendingTooltipDescription"), (customDomain === null || customDomain === void 0 ? void 0 : customDomain.status) === "failed" && t("neetoCustomDomains.failedTooltipDescription")]
|
|
283
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
284
|
+
className: "neeto-ui-text-gray-600 mt-2",
|
|
285
|
+
style: "body2",
|
|
286
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
287
|
+
i18nKey: "neetoCustomDomains.noData.helpTextConnected",
|
|
288
|
+
components: {
|
|
289
|
+
Link: /*#__PURE__*/jsx(Button, {
|
|
290
|
+
href: helpDocUrl,
|
|
291
|
+
rel: "noreferrer",
|
|
292
|
+
style: "link",
|
|
293
|
+
target: "_blank"
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
})
|
|
297
|
+
})]
|
|
275
298
|
})]
|
|
276
299
|
})]
|
|
277
300
|
}, index);
|
|
@@ -298,10 +321,26 @@ var Domain = function Domain(_ref) {
|
|
|
298
321
|
style: "h4",
|
|
299
322
|
weight: "medium",
|
|
300
323
|
children: t("neetoCustomDomains.noData.title")
|
|
301
|
-
}), /*#__PURE__*/
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
324
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
325
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
326
|
+
className: "neeto-ui-text-gray-600",
|
|
327
|
+
style: "body2",
|
|
328
|
+
children: disconnectedIntegrationCardDescription || t("neetoCustomDomains.noData.helpTextDefault")
|
|
329
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
330
|
+
className: "neeto-ui-text-gray-600 mt-2",
|
|
331
|
+
style: "body2",
|
|
332
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
333
|
+
i18nKey: "neetoCustomDomains.noData.helpTextDisconnected",
|
|
334
|
+
components: {
|
|
335
|
+
Link: /*#__PURE__*/jsx(Button, {
|
|
336
|
+
href: helpDocUrl,
|
|
337
|
+
rel: "noreferrer",
|
|
338
|
+
style: "link",
|
|
339
|
+
target: "_blank"
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
})
|
|
343
|
+
})]
|
|
305
344
|
})]
|
|
306
345
|
})]
|
|
307
346
|
})
|
|
@@ -983,7 +1022,7 @@ var strategyOptions = [{
|
|
|
983
1022
|
}];
|
|
984
1023
|
|
|
985
1024
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
986
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t),
|
|
1025
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
987
1026
|
var Strategy = withT(function (_ref) {
|
|
988
1027
|
var t = _ref.t,
|
|
989
1028
|
hostname = _ref.hostname,
|
|
@@ -1069,7 +1108,7 @@ var Strategy = withT(function (_ref) {
|
|
|
1069
1108
|
});
|
|
1070
1109
|
|
|
1071
1110
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1072
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
1111
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1073
1112
|
var DomainField = function DomainField(_ref) {
|
|
1074
1113
|
var onCreate = _ref.onCreate,
|
|
1075
1114
|
url = _ref.url,
|
|
@@ -1836,7 +1875,7 @@ var Validation = function Validation(_ref) {
|
|
|
1836
1875
|
});
|
|
1837
1876
|
};
|
|
1838
1877
|
|
|
1839
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s
|
|
1878
|
+
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=true===r.prepend?"prepend":"append",d=true===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1840
1879
|
|
|
1841
1880
|
var css = ".neeto_custom_domain_stepper button{cursor:default!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2RvbWFpbnMvX292ZXJyaWRlcy5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRSxvQ0FDRSx3QkNBSiIsInNvdXJjZXNDb250ZW50IjpbIi5uZWV0b19jdXN0b21fZG9tYWluX3N0ZXBwZXIge1xuICBidXR0b24ge1xuICAgIGN1cnNvcjogZGVmYXVsdCAhaW1wb3J0YW50O1xuICB9XG59XG4iLCIubmVldG9fY3VzdG9tX2RvbWFpbl9zdGVwcGVyIGJ1dHRvbiB7XG4gIGN1cnNvcjogZGVmYXVsdCAhaW1wb3J0YW50O1xufSJdfQ== */";
|
|
1842
1881
|
n(css,{});
|
|
@@ -1930,33 +1969,21 @@ var DomainPane = function DomainPane(_ref) {
|
|
|
1930
1969
|
});
|
|
1931
1970
|
};
|
|
1932
1971
|
|
|
1933
|
-
var Header = function Header(_ref) {
|
|
1934
|
-
|
|
1935
|
-
breadcrumbs = _ref.breadcrumbs
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
helpDocUrl = _ref.helpDocUrl,
|
|
1972
|
+
var Header$1 = function Header(_ref) {
|
|
1973
|
+
_ref.openPane;
|
|
1974
|
+
var breadcrumbs = _ref.breadcrumbs;
|
|
1975
|
+
_ref.isCustomDomainAdded;
|
|
1976
|
+
_ref.setSelectedCustomDomain;
|
|
1977
|
+
var helpDocUrl = _ref.helpDocUrl,
|
|
1939
1978
|
_ref$size = _ref.size,
|
|
1940
1979
|
size = _ref$size === void 0 ? "large" : _ref$size;
|
|
1941
1980
|
var _useTranslation = useTranslation(),
|
|
1942
1981
|
t = _useTranslation.t;
|
|
1943
|
-
var handleClick = function handleClick() {
|
|
1944
|
-
setSelectedCustomDomain({});
|
|
1945
|
-
openPane();
|
|
1946
|
-
};
|
|
1947
1982
|
return /*#__PURE__*/jsx(NeetoHeader, {
|
|
1948
1983
|
breadcrumbs: breadcrumbs,
|
|
1949
1984
|
size: size,
|
|
1950
1985
|
"data-testid": "custom-domain-header",
|
|
1951
1986
|
title: t("neetoCustomDomains.customDomain", SINGULAR),
|
|
1952
|
-
actionBlock: /*#__PURE__*/jsx(Button, {
|
|
1953
|
-
"data-testid": "add-new-custom-domain-button",
|
|
1954
|
-
disabled: isCustomDomainAdded,
|
|
1955
|
-
label: t("neetoCustomDomains.actions.add", {
|
|
1956
|
-
what: t("neetoCustomDomains.customDomain", SINGULAR)
|
|
1957
|
-
}),
|
|
1958
|
-
onClick: handleClick
|
|
1959
|
-
}),
|
|
1960
1987
|
titleHelpPopoverProps: {
|
|
1961
1988
|
title: t("neetoCustomDomains.customDomain", SINGULAR),
|
|
1962
1989
|
description: t("neetoCustomDomains.toolTips.customDomain"),
|
|
@@ -1966,7 +1993,7 @@ var Header = function Header(_ref) {
|
|
|
1966
1993
|
}
|
|
1967
1994
|
});
|
|
1968
1995
|
};
|
|
1969
|
-
var Header
|
|
1996
|
+
var Header = /*#__PURE__*/memo(Header$1);
|
|
1970
1997
|
|
|
1971
1998
|
var CustomDomain = function CustomDomain(_ref) {
|
|
1972
1999
|
var breadcrumbs = _ref.breadcrumbs,
|
|
@@ -1976,6 +2003,8 @@ var CustomDomain = function CustomDomain(_ref) {
|
|
|
1976
2003
|
headerSize = _ref.headerSize,
|
|
1977
2004
|
dnsHelpDocs = _ref.dnsHelpDocs,
|
|
1978
2005
|
subdomainPlaceholder = _ref.subdomainPlaceholder,
|
|
2006
|
+
disconnectedIntegrationCardDescription = _ref.disconnectedIntegrationCardDescription,
|
|
2007
|
+
connectedIntegrationCardDescription = _ref.connectedIntegrationCardDescription,
|
|
1979
2008
|
appName = _ref.appName,
|
|
1980
2009
|
_ref$environment = _ref.environment,
|
|
1981
2010
|
environment = _ref$environment === void 0 ? "production" : _ref$environment;
|
|
@@ -2018,13 +2047,13 @@ var CustomDomain = function CustomDomain(_ref) {
|
|
|
2018
2047
|
var isCustomDomainAdded = isNotEmpty(customDomains);
|
|
2019
2048
|
if (isLoading) {
|
|
2020
2049
|
return /*#__PURE__*/jsx("div", {
|
|
2021
|
-
className: "flex
|
|
2050
|
+
className: "flex h-screen w-full items-center justify-center",
|
|
2022
2051
|
children: /*#__PURE__*/jsx(Spinner, {})
|
|
2023
2052
|
});
|
|
2024
2053
|
}
|
|
2025
2054
|
return /*#__PURE__*/jsxs("div", {
|
|
2026
2055
|
children: [/*#__PURE__*/jsxs(Container, {
|
|
2027
|
-
children: [/*#__PURE__*/jsx(Header
|
|
2056
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
2028
2057
|
breadcrumbs: breadcrumbs,
|
|
2029
2058
|
helpDocUrl: helpDocUrl,
|
|
2030
2059
|
isCustomDomainAdded: isCustomDomainAdded,
|
|
@@ -2032,9 +2061,11 @@ var CustomDomain = function CustomDomain(_ref) {
|
|
|
2032
2061
|
setSelectedCustomDomain: setSelectedCustomDomain,
|
|
2033
2062
|
size: headerSize
|
|
2034
2063
|
}), /*#__PURE__*/jsx("div", {
|
|
2035
|
-
className: "flex w-full justify-center
|
|
2064
|
+
className: "flex h-full w-full justify-center",
|
|
2036
2065
|
children: /*#__PURE__*/jsx(Domain, {
|
|
2066
|
+
connectedIntegrationCardDescription: connectedIntegrationCardDescription,
|
|
2037
2067
|
customDomains: customDomains,
|
|
2068
|
+
disconnectedIntegrationCardDescription: disconnectedIntegrationCardDescription,
|
|
2038
2069
|
helpDocUrl: helpDocUrl,
|
|
2039
2070
|
isCustomDomainAdded: isCustomDomainAdded,
|
|
2040
2071
|
openDeleteAlert: openDeleteAlert,
|