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