@cloudtower/eagle 0.33.53 → 0.33.55
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/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +6 -2
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +44 -16
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3276 -3266
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +6 -2
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +44 -16
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +4077 -4066
- package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.type.d.ts +4 -0
- package/dist/src/coreX/Dialogs/RejectDialog/RejectDialog.type.d.ts +9 -0
- package/dist/stories/docs/coreX/Dialogs/DeleteDialog.stories.d.ts +6 -0
- package/dist/stories/docs/coreX/Dialogs/RejectDialog.stories.d.ts +10 -0
- package/dist/style.css +3276 -3266
- package/package.json +4 -4
|
@@ -19,7 +19,9 @@ const DeleteDialog = props => {
|
|
|
19
19
|
onOk,
|
|
20
20
|
onCancel,
|
|
21
21
|
className,
|
|
22
|
-
confirmLoading
|
|
22
|
+
confirmLoading,
|
|
23
|
+
error,
|
|
24
|
+
showFooterErrorIcon
|
|
23
25
|
} = props;
|
|
24
26
|
return /* @__PURE__ */React__default.createElement(SmallDialog, {
|
|
25
27
|
title,
|
|
@@ -32,7 +34,9 @@ const DeleteDialog = props => {
|
|
|
32
34
|
okButtonProps: {
|
|
33
35
|
danger: true
|
|
34
36
|
},
|
|
35
|
-
confirmLoading
|
|
37
|
+
confirmLoading,
|
|
38
|
+
error,
|
|
39
|
+
showFooterErrorIcon
|
|
36
40
|
}, description && /* @__PURE__ */React__default.createElement("div", {
|
|
37
41
|
className: cx(ContentStyle, Typo.Label.l2_regular)
|
|
38
42
|
}, description), secondaryDesc && /* @__PURE__ */React__default.createElement("div", {
|
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
import { cx } from '@linaria/core';
|
|
2
|
+
import { SmallDialog } from '../../../core/SmallDialog/SmallDialog.js';
|
|
2
3
|
import { Typo } from '../../../core/Typo/index.js';
|
|
3
4
|
import React__default from 'react';
|
|
4
|
-
import { SmallDialog } from '../../../core/SmallDialog/SmallDialog.js';
|
|
5
5
|
import { RejectDialogType } from './RejectDialog.type.js';
|
|
6
|
+
import useParrotTranslation from '../../../hooks/useParrotTranslation.js';
|
|
6
7
|
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value
|
|
17
|
+
}) : obj[key] = value;
|
|
18
|
+
var __spreadValues = (a, b) => {
|
|
19
|
+
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
20
|
+
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
7
25
|
const ContentList = "E_c1ss4prm";
|
|
8
26
|
const MultiRejectContentList = "E_ms3tlei";
|
|
9
27
|
const Description = "E_du44iy7";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
28
|
+
const PartialDescription = "E_p1qmhanr";
|
|
29
|
+
const SecondaryDesc = "E_srje1h0";
|
|
30
|
+
const Divider = "E_di3zi7v";
|
|
12
31
|
const SingleRejectContent = ({
|
|
13
32
|
content
|
|
14
33
|
}) => {
|
|
@@ -25,20 +44,28 @@ const SingleRejectContent = ({
|
|
|
25
44
|
}, content);
|
|
26
45
|
};
|
|
27
46
|
const MultiRejectContent = ({
|
|
28
|
-
content
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
47
|
+
content,
|
|
48
|
+
resourceIcon
|
|
49
|
+
}) => {
|
|
50
|
+
const {
|
|
51
|
+
t
|
|
52
|
+
} = useParrotTranslation();
|
|
53
|
+
return /* @__PURE__ */React__default.createElement("div", {
|
|
54
|
+
className: cx(MultiRejectContentList)
|
|
55
|
+
}, Object.entries(content).map(([name, reasons], index) => /* @__PURE__ */React__default.createElement("li", {
|
|
56
|
+
className: Typo.Label.l4_regular,
|
|
57
|
+
key: index
|
|
58
|
+
}, resourceIcon, /* @__PURE__ */React__default.createElement("span", null, name + t("common.colon_with_space") + reasons.join(t("common.semicolon_with_space"))))));
|
|
59
|
+
};
|
|
35
60
|
const RejectDialog = props => {
|
|
36
61
|
const {
|
|
37
62
|
title,
|
|
38
63
|
cancelText,
|
|
64
|
+
beforeDescription,
|
|
39
65
|
description,
|
|
40
66
|
className,
|
|
41
|
-
footerClassName
|
|
67
|
+
footerClassName,
|
|
68
|
+
okButtonProps
|
|
42
69
|
} = props;
|
|
43
70
|
const renderContent = () => {
|
|
44
71
|
switch (props.type) {
|
|
@@ -53,9 +80,10 @@ const RejectDialog = props => {
|
|
|
53
80
|
}, props.secondaryDesc), props.type === RejectDialogType.Part && /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement("div", {
|
|
54
81
|
className: Divider
|
|
55
82
|
}), /* @__PURE__ */React__default.createElement("div", {
|
|
56
|
-
className: cx(
|
|
83
|
+
className: cx(PartialDescription, Typo.Label.l3_regular)
|
|
57
84
|
}, props.partialDescription)), /* @__PURE__ */React__default.createElement(MultiRejectContent, {
|
|
58
|
-
content: props.content
|
|
85
|
+
content: props.content,
|
|
86
|
+
resourceIcon: props.resourceIcon
|
|
59
87
|
}));
|
|
60
88
|
case RejectDialogType.Custom:
|
|
61
89
|
return props.customContent;
|
|
@@ -67,13 +95,13 @@ const RejectDialog = props => {
|
|
|
67
95
|
showOk: props.type === RejectDialogType.Part,
|
|
68
96
|
okText: props.type === RejectDialogType.Part ? props.okText : void 0,
|
|
69
97
|
onOk: props.type === RejectDialogType.Part ? props.onOk : void 0,
|
|
70
|
-
okButtonProps: {
|
|
98
|
+
okButtonProps: __spreadValues({
|
|
71
99
|
danger: props.type === RejectDialogType.Part
|
|
72
|
-
},
|
|
100
|
+
}, okButtonProps),
|
|
73
101
|
onCancel: props.onCancel,
|
|
74
102
|
className,
|
|
75
103
|
footerClassName
|
|
76
|
-
}, description && /* @__PURE__ */React__default.createElement("div", {
|
|
104
|
+
}, beforeDescription, description && /* @__PURE__ */React__default.createElement("div", {
|
|
77
105
|
className: cx(Description, Typo.Label.l3_regular)
|
|
78
106
|
}, description), renderContent());
|
|
79
107
|
};
|