@pingux/astro 2.27.0-alpha.0 → 2.27.0-alpha.2
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/lib/cjs/components/Badge/Badge.styles.js +12 -21
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -8
- package/lib/components/Badge/Badge.styles.js +12 -21
- package/lib/index.js +1 -4
- package/package.json +1 -1
- package/lib/cjs/recipes/PanelContent.stories.js +0 -441
- package/lib/cjs/utils/devUtils/assets/UserImage.png +0 -0
- package/lib/recipes/PanelContent.stories.js +0 -422
- package/lib/utils/devUtils/assets/UserImage.png +0 -0
@@ -42,14 +42,6 @@ var baseBadge = {
|
|
42
42
|
}
|
43
43
|
};
|
44
44
|
exports.baseBadge = baseBadge;
|
45
|
-
var defaultBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
46
|
-
backgroundColor: 'white !important',
|
47
|
-
border: 'solid 1px',
|
48
|
-
borderColor: 'neutral.80',
|
49
|
-
'& span': {
|
50
|
-
color: 'text.primary'
|
51
|
-
}
|
52
|
-
});
|
53
45
|
var multivaluesBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
54
46
|
alignSelf: 'center',
|
55
47
|
cursor: 'default',
|
@@ -196,25 +188,24 @@ var activeStatusBadge = _objectSpread(_objectSpread({}, statusBadge), {}, {
|
|
196
188
|
backgroundColor: '#F7F8FD !important'
|
197
189
|
});
|
198
190
|
var _default = {
|
199
|
-
activeStatusBadge: activeStatusBadge,
|
200
|
-
badgeDeleteButton: badgeDeleteButton,
|
201
191
|
baseBadge: baseBadge,
|
202
|
-
convenienceDefault: convenienceDefault,
|
203
|
-
countBadge: countBadge,
|
204
|
-
countNeutral: countNeutral,
|
205
|
-
criticalStatusBadge: criticalStatusBadge,
|
206
|
-
defaultBadge: defaultBadge,
|
207
|
-
deleteButton: deleteButton,
|
208
192
|
environmentBadge: environmentBadge,
|
209
|
-
errorCalloutBadge: errorCalloutBadge,
|
210
|
-
healthyStatusBadge: healthyStatusBadge,
|
211
|
-
infoCalloutBadge: infoCalloutBadge,
|
212
193
|
itemBadgeWithSlot: itemBadgeWithSlot,
|
213
194
|
multivaluesBadge: multivaluesBadge,
|
214
195
|
readOnlyBadge: readOnlyBadge,
|
215
196
|
selectedItemBadge: selectedItemBadge,
|
216
|
-
|
197
|
+
deleteButton: deleteButton,
|
198
|
+
countBadge: countBadge,
|
199
|
+
countNeutral: countNeutral,
|
200
|
+
badgeDeleteButton: badgeDeleteButton,
|
201
|
+
convenienceDefault: convenienceDefault,
|
202
|
+
errorCalloutBadge: errorCalloutBadge,
|
217
203
|
warningCalloutBadge: warningCalloutBadge,
|
218
|
-
|
204
|
+
successCalloutBadge: successCalloutBadge,
|
205
|
+
infoCalloutBadge: infoCalloutBadge,
|
206
|
+
criticalStatusBadge: criticalStatusBadge,
|
207
|
+
warningStatusBadge: warningStatusBadge,
|
208
|
+
healthyStatusBadge: healthyStatusBadge,
|
209
|
+
activeStatusBadge: activeStatusBadge
|
219
210
|
};
|
220
211
|
exports["default"] = _default;
|
package/lib/cjs/index.d.ts
CHANGED
@@ -65,7 +65,6 @@ export { default as HelpHint } from './components/HelpHint';
|
|
65
65
|
export * from './components/HelpHint';
|
66
66
|
export { default as Icon } from './components/Icon';
|
67
67
|
export * from './components/Icon';
|
68
|
-
export { NoticeIcon } from './components/Icon/NoticeIcon';
|
69
68
|
export { default as IconBadge } from './components/IconBadge';
|
70
69
|
export * from './components/IconBadge';
|
71
70
|
export { default as IconButton } from './components/IconButton';
|
package/lib/cjs/index.js
CHANGED
@@ -54,7 +54,6 @@ var _exportNames = {
|
|
54
54
|
FileInputField: true,
|
55
55
|
HelpHint: true,
|
56
56
|
Icon: true,
|
57
|
-
NoticeIcon: true,
|
58
57
|
IconBadge: true,
|
59
58
|
IconButton: true,
|
60
59
|
IconButtonToggle: true,
|
@@ -551,12 +550,6 @@ _Object$defineProperty(exports, "NavBarSection", {
|
|
551
550
|
return _NavBarSection["default"];
|
552
551
|
}
|
553
552
|
});
|
554
|
-
_Object$defineProperty(exports, "NoticeIcon", {
|
555
|
-
enumerable: true,
|
556
|
-
get: function get() {
|
557
|
-
return _NoticeIcon.NoticeIcon;
|
558
|
-
}
|
559
|
-
});
|
560
553
|
_Object$defineProperty(exports, "NumberField", {
|
561
554
|
enumerable: true,
|
562
555
|
get: function get() {
|
@@ -1154,7 +1147,6 @@ _forEachInstanceProperty(_context25 = _Object$keys(_Icon)).call(_context25, func
|
|
1154
1147
|
}
|
1155
1148
|
});
|
1156
1149
|
});
|
1157
|
-
var _NoticeIcon = require("./components/Icon/NoticeIcon");
|
1158
1150
|
var _IconBadge = _interopRequireWildcard(require("./components/IconBadge"));
|
1159
1151
|
_forEachInstanceProperty(_context26 = _Object$keys(_IconBadge)).call(_context26, function (key) {
|
1160
1152
|
if (key === "default" || key === "__esModule") return;
|
@@ -34,14 +34,6 @@ export var baseBadge = {
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
};
|
37
|
-
var defaultBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
38
|
-
backgroundColor: 'white !important',
|
39
|
-
border: 'solid 1px',
|
40
|
-
borderColor: 'neutral.80',
|
41
|
-
'& span': {
|
42
|
-
color: 'text.primary'
|
43
|
-
}
|
44
|
-
});
|
45
37
|
var multivaluesBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
46
38
|
alignSelf: 'center',
|
47
39
|
cursor: 'default',
|
@@ -186,24 +178,23 @@ var activeStatusBadge = _objectSpread(_objectSpread({}, statusBadge), {}, {
|
|
186
178
|
backgroundColor: '#F7F8FD !important'
|
187
179
|
});
|
188
180
|
export default {
|
189
|
-
activeStatusBadge: activeStatusBadge,
|
190
|
-
badgeDeleteButton: badgeDeleteButton,
|
191
181
|
baseBadge: baseBadge,
|
192
|
-
convenienceDefault: convenienceDefault,
|
193
|
-
countBadge: countBadge,
|
194
|
-
countNeutral: countNeutral,
|
195
|
-
criticalStatusBadge: criticalStatusBadge,
|
196
|
-
defaultBadge: defaultBadge,
|
197
|
-
deleteButton: deleteButton,
|
198
182
|
environmentBadge: environmentBadge,
|
199
|
-
errorCalloutBadge: errorCalloutBadge,
|
200
|
-
healthyStatusBadge: healthyStatusBadge,
|
201
|
-
infoCalloutBadge: infoCalloutBadge,
|
202
183
|
itemBadgeWithSlot: itemBadgeWithSlot,
|
203
184
|
multivaluesBadge: multivaluesBadge,
|
204
185
|
readOnlyBadge: readOnlyBadge,
|
205
186
|
selectedItemBadge: selectedItemBadge,
|
206
|
-
|
187
|
+
deleteButton: deleteButton,
|
188
|
+
countBadge: countBadge,
|
189
|
+
countNeutral: countNeutral,
|
190
|
+
badgeDeleteButton: badgeDeleteButton,
|
191
|
+
convenienceDefault: convenienceDefault,
|
192
|
+
errorCalloutBadge: errorCalloutBadge,
|
207
193
|
warningCalloutBadge: warningCalloutBadge,
|
208
|
-
|
194
|
+
successCalloutBadge: successCalloutBadge,
|
195
|
+
infoCalloutBadge: infoCalloutBadge,
|
196
|
+
criticalStatusBadge: criticalStatusBadge,
|
197
|
+
warningStatusBadge: warningStatusBadge,
|
198
|
+
healthyStatusBadge: healthyStatusBadge,
|
199
|
+
activeStatusBadge: activeStatusBadge
|
209
200
|
};
|
package/lib/index.js
CHANGED
@@ -69,7 +69,6 @@ export { default as HelpHint } from './components/HelpHint';
|
|
69
69
|
export * from './components/HelpHint';
|
70
70
|
export { default as Icon } from './components/Icon';
|
71
71
|
export * from './components/Icon';
|
72
|
-
export { NoticeIcon } from './components/Icon/NoticeIcon';
|
73
72
|
export { default as IconBadge } from './components/IconBadge';
|
74
73
|
export * from './components/IconBadge';
|
75
74
|
export { default as IconButton } from './components/IconButton';
|
@@ -186,6 +185,4 @@ export * from './components/DataTable';
|
|
186
185
|
export * from './types';
|
187
186
|
export { OverlayProvider, useOverlayPosition, useOverlayTrigger } from 'react-aria';
|
188
187
|
export { Item, Section, useOverlayTriggerState, useTreeData } from 'react-stately';
|
189
|
-
export { TableBody as DataTableBody, Cell as DataTableCell, Column as DataTableColumn, TableHeader as DataTableHeader, Row as DataTableRow } from 'react-stately';
|
190
|
-
|
191
|
-
// Experimental
|
188
|
+
export { TableBody as DataTableBody, Cell as DataTableCell, Column as DataTableColumn, TableHeader as DataTableHeader, Row as DataTableRow } from 'react-stately';
|
package/package.json
CHANGED
@@ -1,441 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
4
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
5
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
8
|
-
_Object$defineProperty(exports, "__esModule", {
|
9
|
-
value: true
|
10
|
-
});
|
11
|
-
exports["default"] = exports.LabelValuePairs = exports.EditPanel = exports.DisplayPanel = exports.ColorBlockButton = exports.AddAttributeButton = void 0;
|
12
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
13
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
14
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
15
|
-
var _react = _interopRequireWildcard(require("react"));
|
16
|
-
var _reactStately = require("react-stately");
|
17
|
-
var _PencilIcon = _interopRequireDefault(require("@pingux/mdi-react/PencilIcon"));
|
18
|
-
var _PlusIcon = _interopRequireDefault(require("@pingux/mdi-react/PlusIcon"));
|
19
|
-
var _hooks = require("../hooks");
|
20
|
-
var _index = require("../index");
|
21
|
-
var _UserImage = _interopRequireDefault(require("../utils/devUtils/assets/UserImage.png"));
|
22
|
-
var _statuses = _interopRequireDefault(require("../utils/devUtils/constants/statuses"));
|
23
|
-
var _react2 = require("@emotion/react");
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
26
|
-
var _default = {
|
27
|
-
title: 'Experimental/PanelContent',
|
28
|
-
parameters: {
|
29
|
-
docs: {
|
30
|
-
source: {
|
31
|
-
type: 'code'
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
};
|
36
|
-
exports["default"] = _default;
|
37
|
-
var colorBlockButtons = [{
|
38
|
-
text: 'Groups',
|
39
|
-
subtext: '21',
|
40
|
-
isConfigured: true
|
41
|
-
}, {
|
42
|
-
text: 'Population',
|
43
|
-
subtext: 'Denver',
|
44
|
-
isConfigured: true
|
45
|
-
}, {
|
46
|
-
text: 'MFA',
|
47
|
-
subtext: 'Enabled',
|
48
|
-
isConfigured: true
|
49
|
-
}, {
|
50
|
-
text: 'Roles',
|
51
|
-
subtext: '0'
|
52
|
-
}];
|
53
|
-
var data = {
|
54
|
-
contactInfo: {
|
55
|
-
label: 'Contact Info',
|
56
|
-
key: 'contactInfoKey',
|
57
|
-
fields: [{
|
58
|
-
label: 'Email',
|
59
|
-
value: 'ednepomuceno@pingidentity.com',
|
60
|
-
isVerified: true
|
61
|
-
}, {
|
62
|
-
label: 'Primary',
|
63
|
-
value: '+1 767-777-3333'
|
64
|
-
}, {
|
65
|
-
label: 'Address',
|
66
|
-
value: '1234 W California St, Denver CO 80101'
|
67
|
-
}]
|
68
|
-
},
|
69
|
-
personalInfo: {
|
70
|
-
label: 'Personal Info',
|
71
|
-
key: 'personalInfoKey',
|
72
|
-
image: _UserImage["default"],
|
73
|
-
fields: [{
|
74
|
-
label: 'Given Name',
|
75
|
-
value: 'Ed'
|
76
|
-
}, {
|
77
|
-
label: 'Famile Name',
|
78
|
-
value: 'Nepomuceno'
|
79
|
-
}]
|
80
|
-
},
|
81
|
-
companyInfo: {
|
82
|
-
label: 'Company Info',
|
83
|
-
key: 'companyInfoKey',
|
84
|
-
fields: [{
|
85
|
-
label: 'Tile',
|
86
|
-
value: 'Interaction Designer'
|
87
|
-
}]
|
88
|
-
},
|
89
|
-
customAttributes: {
|
90
|
-
label: 'Custom Attributes',
|
91
|
-
key: 'customAttributesKey',
|
92
|
-
fields: [{
|
93
|
-
label: 'T-Shirt Size',
|
94
|
-
value: 'Large'
|
95
|
-
}, {
|
96
|
-
label: 'Example Multi-Value Attribute',
|
97
|
-
value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
|
98
|
-
}]
|
99
|
-
},
|
100
|
-
jsonAttributes: {
|
101
|
-
label: 'JSON Attributes',
|
102
|
-
key: 'jsonAttributesKey',
|
103
|
-
badges: ['Address', 'Contact', 'Another Json'],
|
104
|
-
fields: []
|
105
|
-
}
|
106
|
-
};
|
107
|
-
var OverlayWrapper = function OverlayWrapper(_ref) {
|
108
|
-
var children = _ref.children;
|
109
|
-
var _useOverlayPanelState = (0, _hooks.useOverlayPanelState)({
|
110
|
-
isDefaultOpen: true
|
111
|
-
}),
|
112
|
-
state = _useOverlayPanelState.state,
|
113
|
-
onClose = _useOverlayPanelState.onClose;
|
114
|
-
var triggerRef = (0, _react.useRef)();
|
115
|
-
return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
|
116
|
-
ref: triggerRef,
|
117
|
-
onPress: state.open
|
118
|
-
}, "Open Panel"), (0, _react2.jsx)(_index.OverlayPanel, {
|
119
|
-
isOpen: state.isOpen,
|
120
|
-
isTransitioning: state.isTransitioning,
|
121
|
-
size: "large",
|
122
|
-
p: "0"
|
123
|
-
}, (0, _react2.jsx)(_index.PanelHeader, {
|
124
|
-
data: {
|
125
|
-
image: {
|
126
|
-
src: _UserImage["default"],
|
127
|
-
alt: 'user image'
|
128
|
-
},
|
129
|
-
text: data.personalInfo.fields[0].value,
|
130
|
-
subtext: data.personalInfo.fields[1].value
|
131
|
-
}
|
132
|
-
}, (0, _react2.jsx)(_index.PanelHeaderSwitchField, null), (0, _react2.jsx)(_index.PanelHeaderMenu, null), (0, _react2.jsx)(_index.PanelHeaderCloseButton, {
|
133
|
-
onPress: onClose
|
134
|
-
})), children));
|
135
|
-
};
|
136
|
-
var DisplayPanel = function DisplayPanel() {
|
137
|
-
var _context, _context2;
|
138
|
-
return (0, _react2.jsx)(OverlayWrapper, null, (0, _react2.jsx)(_index.Box, {
|
139
|
-
p: "lg",
|
140
|
-
pt: "xs"
|
141
|
-
}, (0, _react2.jsx)(_index.Tabs, {
|
142
|
-
tabListProps: {
|
143
|
-
justifyContent: 'center',
|
144
|
-
mb: 'lg'
|
145
|
-
}
|
146
|
-
}, (0, _react2.jsx)(_index.Tab, {
|
147
|
-
title: "Profile"
|
148
|
-
}, (0, _react2.jsx)(_index.Box, {
|
149
|
-
isRow: true,
|
150
|
-
gap: "md",
|
151
|
-
mb: "20px"
|
152
|
-
}, (0, _map["default"])(colorBlockButtons).call(colorBlockButtons, function (tileData) {
|
153
|
-
return (0, _react2.jsx)(ColorBlockButton, {
|
154
|
-
buttonData: tileData,
|
155
|
-
key: "".concat(tileData.text, "-key")
|
156
|
-
});
|
157
|
-
})), (0, _react2.jsx)(_index.Box, {
|
158
|
-
isRow: true
|
159
|
-
}, (0, _react2.jsx)(_index.AccordionGroup, {
|
160
|
-
defaultExpandedKeys: (0, _map["default"])(_context = (0, _keys["default"])(data)).call(_context, function (item) {
|
161
|
-
return data[item].key;
|
162
|
-
}),
|
163
|
-
labelHeadingTag: "h2"
|
164
|
-
}, (0, _map["default"])(_context2 = (0, _keys["default"])(data)).call(_context2, function (item) {
|
165
|
-
var _context3;
|
166
|
-
return (0, _react2.jsx)(_reactStately.Item, {
|
167
|
-
"data-id": data[item].label,
|
168
|
-
key: data[item].key,
|
169
|
-
label: data[item].label,
|
170
|
-
textValue: data[item].label
|
171
|
-
}, data[item].image ? (0, _react2.jsx)(_index.Box, {
|
172
|
-
isRow: true,
|
173
|
-
gap: "md"
|
174
|
-
}, (0, _react2.jsx)(_index.Image, {
|
175
|
-
src: _UserImage["default"],
|
176
|
-
alt: "user"
|
177
|
-
}), (0, _react2.jsx)(LabelValuePairs, {
|
178
|
-
fields: data[item].fields
|
179
|
-
})) : (0, _react2.jsx)(LabelValuePairs, {
|
180
|
-
fields: data[item].fields
|
181
|
-
}), data[item].badges && (0, _react2.jsx)(_index.Box, {
|
182
|
-
isRow: true,
|
183
|
-
gap: "sm"
|
184
|
-
}, (0, _map["default"])(_context3 = data[item].badges).call(_context3, function (badge) {
|
185
|
-
return (0, _react2.jsx)(_index.Badge, {
|
186
|
-
label: badge,
|
187
|
-
variant: "defaultBadge",
|
188
|
-
key: "".concat(badge, "-key")
|
189
|
-
});
|
190
|
-
})));
|
191
|
-
})), (0, _react2.jsx)(_index.EditButton, {
|
192
|
-
size: "lg"
|
193
|
-
}))), (0, _react2.jsx)(_index.Tab, {
|
194
|
-
title: "Groups"
|
195
|
-
}, "Groups"), (0, _react2.jsx)(_index.Tab, {
|
196
|
-
title: "Roles"
|
197
|
-
}, "Roles"), (0, _react2.jsx)(_index.Tab, {
|
198
|
-
title: "Services"
|
199
|
-
}, "Services"), (0, _react2.jsx)(_index.Tab, {
|
200
|
-
title: "API"
|
201
|
-
}, "API"))));
|
202
|
-
};
|
203
|
-
exports.DisplayPanel = DisplayPanel;
|
204
|
-
var ColorBlockButton = function ColorBlockButton(_ref2) {
|
205
|
-
var _ref2$buttonData = _ref2.buttonData,
|
206
|
-
buttonData = _ref2$buttonData === void 0 ? colorBlockButtons[0] : _ref2$buttonData;
|
207
|
-
return (0, _react2.jsx)(_index.Button, {
|
208
|
-
variant: "colorBlock",
|
209
|
-
className: buttonData.isConfigured ? 'is-configured' : ''
|
210
|
-
}, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
211
|
-
variant: "buttonTitle"
|
212
|
-
}, buttonData.text), (0, _react2.jsx)(_index.Text, {
|
213
|
-
variant: "buttonSubtitle"
|
214
|
-
}, buttonData.subtext)), (0, _react2.jsx)(_index.Icon, {
|
215
|
-
icon: _PencilIcon["default"],
|
216
|
-
title: {
|
217
|
-
name: 'Create Icon'
|
218
|
-
}
|
219
|
-
}));
|
220
|
-
};
|
221
|
-
exports.ColorBlockButton = ColorBlockButton;
|
222
|
-
var LabelValuePairs = function LabelValuePairs(_ref3) {
|
223
|
-
var _ref3$fields = _ref3.fields,
|
224
|
-
fields = _ref3$fields === void 0 ? data.contactInfo.fields : _ref3$fields;
|
225
|
-
return (0, _react2.jsx)(_index.Box, {
|
226
|
-
gap: "md"
|
227
|
-
}, (0, _map["default"])(fields).call(fields, function (_ref4) {
|
228
|
-
var label = _ref4.label,
|
229
|
-
value = _ref4.value,
|
230
|
-
isVerified = _ref4.isVerified;
|
231
|
-
return (0, _react2.jsx)(_index.Box, {
|
232
|
-
gap: "xs",
|
233
|
-
key: "".concat(label, "-key")
|
234
|
-
}, (0, _react2.jsx)(_index.Text, {
|
235
|
-
variant: "h4"
|
236
|
-
}, label), (0, _react2.jsx)(_index.Box, {
|
237
|
-
isRow: true,
|
238
|
-
gap: "md"
|
239
|
-
}, (0, _react2.jsx)(_index.Text, null, value), isVerified && (0, _react2.jsx)(_index.Box, {
|
240
|
-
isRow: true,
|
241
|
-
gap: "xs"
|
242
|
-
}, (0, _react2.jsx)(_index.NoticeIcon, {
|
243
|
-
color: "success.dark",
|
244
|
-
status: _statuses["default"].SUCCESS,
|
245
|
-
"aria-label": "".concat(_statuses["default"].SUCCESS, "-icon"),
|
246
|
-
size: "xs"
|
247
|
-
}), (0, _react2.jsx)(_index.Text, {
|
248
|
-
variant: "listSubtitle",
|
249
|
-
color: "success.dark"
|
250
|
-
}, "Verified"))));
|
251
|
-
}));
|
252
|
-
};
|
253
|
-
exports.LabelValuePairs = LabelValuePairs;
|
254
|
-
var editData = {
|
255
|
-
personalInfo: {
|
256
|
-
label: 'Personal Info',
|
257
|
-
key: 'personalInfoKey',
|
258
|
-
image: _UserImage["default"],
|
259
|
-
fields: [{
|
260
|
-
label: 'Prefix',
|
261
|
-
value: ''
|
262
|
-
}, {
|
263
|
-
label: 'Given Name',
|
264
|
-
value: 'Ed'
|
265
|
-
}, {
|
266
|
-
label: 'Middle Name',
|
267
|
-
value: ''
|
268
|
-
}, {
|
269
|
-
label: 'Family Name',
|
270
|
-
value: 'Nepomuceno'
|
271
|
-
}, {
|
272
|
-
label: 'Suffix',
|
273
|
-
value: ''
|
274
|
-
}, {
|
275
|
-
label: 'Formatted',
|
276
|
-
value: ''
|
277
|
-
}, {
|
278
|
-
label: 'Nickname',
|
279
|
-
value: ''
|
280
|
-
}]
|
281
|
-
},
|
282
|
-
contactInfo: {
|
283
|
-
label: 'Contact Info',
|
284
|
-
key: 'contactInfoKey',
|
285
|
-
fields: [{
|
286
|
-
label: 'Email',
|
287
|
-
value: 'ednepomuceno@pingidentity.com',
|
288
|
-
slot: (0, _react2.jsx)(_index.CheckboxField, {
|
289
|
-
mt: "xs",
|
290
|
-
label: "Require Email to be Verified"
|
291
|
-
})
|
292
|
-
}, {
|
293
|
-
label: 'Phone Number',
|
294
|
-
value: '123-456-7890'
|
295
|
-
}, {
|
296
|
-
label: 'Street Address',
|
297
|
-
value: '123 Example St'
|
298
|
-
}, {
|
299
|
-
label: 'Country Code',
|
300
|
-
value: ''
|
301
|
-
}, {
|
302
|
-
label: 'Loality',
|
303
|
-
value: ''
|
304
|
-
}, {
|
305
|
-
label: 'Region',
|
306
|
-
value: ''
|
307
|
-
}, {
|
308
|
-
label: 'Zip Code',
|
309
|
-
value: '12345'
|
310
|
-
}]
|
311
|
-
},
|
312
|
-
companyInfo: {
|
313
|
-
label: 'Company Info',
|
314
|
-
key: 'companyInfoKey',
|
315
|
-
fields: [{
|
316
|
-
label: 'Account ID',
|
317
|
-
value: ''
|
318
|
-
}, {
|
319
|
-
label: 'Type',
|
320
|
-
value: ''
|
321
|
-
}, {
|
322
|
-
label: 'Title',
|
323
|
-
value: ''
|
324
|
-
}]
|
325
|
-
}
|
326
|
-
};
|
327
|
-
var EditPanel = function EditPanel() {
|
328
|
-
var _context4, _context5, _context6;
|
329
|
-
return (0, _react2.jsx)(OverlayWrapper, null, (0, _react2.jsx)(_index.Box, {
|
330
|
-
p: "lg",
|
331
|
-
pb: "0"
|
332
|
-
}, (0, _react2.jsx)(_index.Box, {
|
333
|
-
gap: "md",
|
334
|
-
mb: "20px",
|
335
|
-
width: "500px"
|
336
|
-
}, (0, _react2.jsx)(_index.TextField, {
|
337
|
-
defaultValue: "ednepomuceno",
|
338
|
-
isRequired: true,
|
339
|
-
label: "Username"
|
340
|
-
}), (0, _react2.jsx)(_index.SelectField, {
|
341
|
-
label: "Population",
|
342
|
-
isRequired: true,
|
343
|
-
defaultSelectedKey: "population"
|
344
|
-
}, (0, _react2.jsx)(_reactStately.Item, {
|
345
|
-
key: "population"
|
346
|
-
}, "Denver"))), (0, _react2.jsx)(_index.AccordionGroup, {
|
347
|
-
defaultExpandedKeys: (0, _concat["default"])(_context4 = []).call(_context4, (0, _map["default"])(_context5 = (0, _keys["default"])(editData)).call(_context5, function (item) {
|
348
|
-
return editData[item].key;
|
349
|
-
}), ['preferencesKey', 'customAttributesKey', 'jsonAttributesKey']),
|
350
|
-
labelHeadingTag: "h2"
|
351
|
-
}, (0, _map["default"])(_context6 = (0, _keys["default"])(editData)).call(_context6, function (item) {
|
352
|
-
var _context7;
|
353
|
-
return (0, _react2.jsx)(_reactStately.Item, {
|
354
|
-
"data-id": editData[item].label,
|
355
|
-
key: editData[item].key,
|
356
|
-
label: editData[item].label,
|
357
|
-
textValue: editData[item].label
|
358
|
-
}, (0, _react2.jsx)(_index.Box, {
|
359
|
-
gap: "md",
|
360
|
-
width: "500px"
|
361
|
-
}, editData[item].image && (0, _react2.jsx)(_index.ImageUploadField, {
|
362
|
-
label: "Photo",
|
363
|
-
previewHeight: 40,
|
364
|
-
previewWidth: 40,
|
365
|
-
previewImage: _UserImage["default"]
|
366
|
-
}), (0, _map["default"])(_context7 = editData[item].fields).call(_context7, function (_ref5) {
|
367
|
-
var label = _ref5.label,
|
368
|
-
value = _ref5.value,
|
369
|
-
slot = _ref5.slot;
|
370
|
-
return (0, _react2.jsx)(_index.Box, {
|
371
|
-
key: "".concat(label, "-key")
|
372
|
-
}, (0, _react2.jsx)(_index.TextField, {
|
373
|
-
label: label,
|
374
|
-
defaultValue: value
|
375
|
-
}), slot);
|
376
|
-
})));
|
377
|
-
}), (0, _react2.jsx)(_reactStately.Item, {
|
378
|
-
"data-id": "preferences",
|
379
|
-
key: "preferencesKey",
|
380
|
-
label: "Preferences",
|
381
|
-
textValue: "Preferences"
|
382
|
-
}, (0, _react2.jsx)(_index.Box, {
|
383
|
-
gap: "md",
|
384
|
-
width: "500px"
|
385
|
-
}, (0, _react2.jsx)(_index.SelectField, {
|
386
|
-
label: "Preferred Language",
|
387
|
-
defaultSelectedKey: "language"
|
388
|
-
}, (0, _react2.jsx)(_reactStately.Item, {
|
389
|
-
key: "language"
|
390
|
-
}, "Select a Language")), (0, _react2.jsx)(_index.SelectField, {
|
391
|
-
label: "Locale",
|
392
|
-
defaultSelectedKey: "language"
|
393
|
-
}, (0, _react2.jsx)(_reactStately.Item, {
|
394
|
-
key: "language"
|
395
|
-
}, "Select a locale")), (0, _react2.jsx)(_index.SelectField, {
|
396
|
-
label: "Timezone",
|
397
|
-
defaultSelectedKey: "language"
|
398
|
-
}, (0, _react2.jsx)(_reactStately.Item, {
|
399
|
-
key: "language"
|
400
|
-
}, "Select a timezone")))), (0, _react2.jsx)(_reactStately.Item, {
|
401
|
-
"data-id": "customAttributes",
|
402
|
-
key: "customAttributesKey",
|
403
|
-
label: "Custom Attributes",
|
404
|
-
textValue: "Custom Attributes"
|
405
|
-
}, (0, _react2.jsx)(AddAttributeButton, null), (0, _react2.jsx)(_index.Text, {
|
406
|
-
fontWeight: "-1",
|
407
|
-
fontSize: "md",
|
408
|
-
textAlign: "center"
|
409
|
-
}, "Click + Add to select a custom attribute")), (0, _react2.jsx)(_reactStately.Item, {
|
410
|
-
"data-id": "jsonAttributes",
|
411
|
-
key: "jsonAttributesKey",
|
412
|
-
label: "JSON Attributes",
|
413
|
-
textValue: "JSON Attributes"
|
414
|
-
}, (0, _react2.jsx)(AddAttributeButton, null), (0, _react2.jsx)(_index.Text, {
|
415
|
-
fontWeight: "-1",
|
416
|
-
fontSize: "md",
|
417
|
-
textAlign: "center"
|
418
|
-
}, "Click + Add to select a JSON attribute")))), (0, _react2.jsx)(_index.ButtonBar, null, (0, _react2.jsx)(_index.Button, {
|
419
|
-
variant: "primary"
|
420
|
-
}, "Save"), (0, _react2.jsx)(_index.Button, {
|
421
|
-
variant: "link"
|
422
|
-
}, "Cancel")));
|
423
|
-
};
|
424
|
-
exports.EditPanel = EditPanel;
|
425
|
-
var AddAttributeButton = function AddAttributeButton() {
|
426
|
-
return (0, _react2.jsx)(_index.Box, {
|
427
|
-
sx: {
|
428
|
-
position: 'relative',
|
429
|
-
left: '700px',
|
430
|
-
top: '-35px',
|
431
|
-
width: 0,
|
432
|
-
height: 0
|
433
|
-
}
|
434
|
-
}, (0, _react2.jsx)(_index.Button, {
|
435
|
-
variant: "inlineWithIcon"
|
436
|
-
}, (0, _react2.jsx)(_index.Icon, {
|
437
|
-
icon: _PlusIcon["default"],
|
438
|
-
size: "xs"
|
439
|
-
}), "Add"));
|
440
|
-
};
|
441
|
-
exports.AddAttributeButton = AddAttributeButton;
|
Binary file
|
@@ -1,422 +0,0 @@
|
|
1
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
2
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
3
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
4
|
-
import React, { useRef } from 'react';
|
5
|
-
import { Item } from 'react-stately';
|
6
|
-
import PencilIcon from '@pingux/mdi-react/PencilIcon';
|
7
|
-
import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
8
|
-
import { useOverlayPanelState } from '../hooks';
|
9
|
-
import { AccordionGroup, Badge, Box, Button, ButtonBar, CheckboxField, EditButton, Icon, Image, ImageUploadField, NoticeIcon, OverlayPanel, OverlayProvider, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SelectField, Tab, Tabs, Text, TextField } from '../index';
|
10
|
-
import UserImage from '../utils/devUtils/assets/UserImage.png';
|
11
|
-
import statuses from '../utils/devUtils/constants/statuses';
|
12
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
13
|
-
export default {
|
14
|
-
title: 'Experimental/PanelContent',
|
15
|
-
parameters: {
|
16
|
-
docs: {
|
17
|
-
source: {
|
18
|
-
type: 'code'
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
};
|
23
|
-
var colorBlockButtons = [{
|
24
|
-
text: 'Groups',
|
25
|
-
subtext: '21',
|
26
|
-
isConfigured: true
|
27
|
-
}, {
|
28
|
-
text: 'Population',
|
29
|
-
subtext: 'Denver',
|
30
|
-
isConfigured: true
|
31
|
-
}, {
|
32
|
-
text: 'MFA',
|
33
|
-
subtext: 'Enabled',
|
34
|
-
isConfigured: true
|
35
|
-
}, {
|
36
|
-
text: 'Roles',
|
37
|
-
subtext: '0'
|
38
|
-
}];
|
39
|
-
var data = {
|
40
|
-
contactInfo: {
|
41
|
-
label: 'Contact Info',
|
42
|
-
key: 'contactInfoKey',
|
43
|
-
fields: [{
|
44
|
-
label: 'Email',
|
45
|
-
value: 'ednepomuceno@pingidentity.com',
|
46
|
-
isVerified: true
|
47
|
-
}, {
|
48
|
-
label: 'Primary',
|
49
|
-
value: '+1 767-777-3333'
|
50
|
-
}, {
|
51
|
-
label: 'Address',
|
52
|
-
value: '1234 W California St, Denver CO 80101'
|
53
|
-
}]
|
54
|
-
},
|
55
|
-
personalInfo: {
|
56
|
-
label: 'Personal Info',
|
57
|
-
key: 'personalInfoKey',
|
58
|
-
image: UserImage,
|
59
|
-
fields: [{
|
60
|
-
label: 'Given Name',
|
61
|
-
value: 'Ed'
|
62
|
-
}, {
|
63
|
-
label: 'Famile Name',
|
64
|
-
value: 'Nepomuceno'
|
65
|
-
}]
|
66
|
-
},
|
67
|
-
companyInfo: {
|
68
|
-
label: 'Company Info',
|
69
|
-
key: 'companyInfoKey',
|
70
|
-
fields: [{
|
71
|
-
label: 'Tile',
|
72
|
-
value: 'Interaction Designer'
|
73
|
-
}]
|
74
|
-
},
|
75
|
-
customAttributes: {
|
76
|
-
label: 'Custom Attributes',
|
77
|
-
key: 'customAttributesKey',
|
78
|
-
fields: [{
|
79
|
-
label: 'T-Shirt Size',
|
80
|
-
value: 'Large'
|
81
|
-
}, {
|
82
|
-
label: 'Example Multi-Value Attribute',
|
83
|
-
value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
|
84
|
-
}]
|
85
|
-
},
|
86
|
-
jsonAttributes: {
|
87
|
-
label: 'JSON Attributes',
|
88
|
-
key: 'jsonAttributesKey',
|
89
|
-
badges: ['Address', 'Contact', 'Another Json'],
|
90
|
-
fields: []
|
91
|
-
}
|
92
|
-
};
|
93
|
-
var OverlayWrapper = function OverlayWrapper(_ref) {
|
94
|
-
var children = _ref.children;
|
95
|
-
var _useOverlayPanelState = useOverlayPanelState({
|
96
|
-
isDefaultOpen: true
|
97
|
-
}),
|
98
|
-
state = _useOverlayPanelState.state,
|
99
|
-
onClose = _useOverlayPanelState.onClose;
|
100
|
-
var triggerRef = useRef();
|
101
|
-
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
102
|
-
ref: triggerRef,
|
103
|
-
onPress: state.open
|
104
|
-
}, "Open Panel"), ___EmotionJSX(OverlayPanel, {
|
105
|
-
isOpen: state.isOpen,
|
106
|
-
isTransitioning: state.isTransitioning,
|
107
|
-
size: "large",
|
108
|
-
p: "0"
|
109
|
-
}, ___EmotionJSX(PanelHeader, {
|
110
|
-
data: {
|
111
|
-
image: {
|
112
|
-
src: UserImage,
|
113
|
-
alt: 'user image'
|
114
|
-
},
|
115
|
-
text: data.personalInfo.fields[0].value,
|
116
|
-
subtext: data.personalInfo.fields[1].value
|
117
|
-
}
|
118
|
-
}, ___EmotionJSX(PanelHeaderSwitchField, null), ___EmotionJSX(PanelHeaderMenu, null), ___EmotionJSX(PanelHeaderCloseButton, {
|
119
|
-
onPress: onClose
|
120
|
-
})), children));
|
121
|
-
};
|
122
|
-
export var DisplayPanel = function DisplayPanel() {
|
123
|
-
var _context, _context2;
|
124
|
-
return ___EmotionJSX(OverlayWrapper, null, ___EmotionJSX(Box, {
|
125
|
-
p: "lg",
|
126
|
-
pt: "xs"
|
127
|
-
}, ___EmotionJSX(Tabs, {
|
128
|
-
tabListProps: {
|
129
|
-
justifyContent: 'center',
|
130
|
-
mb: 'lg'
|
131
|
-
}
|
132
|
-
}, ___EmotionJSX(Tab, {
|
133
|
-
title: "Profile"
|
134
|
-
}, ___EmotionJSX(Box, {
|
135
|
-
isRow: true,
|
136
|
-
gap: "md",
|
137
|
-
mb: "20px"
|
138
|
-
}, _mapInstanceProperty(colorBlockButtons).call(colorBlockButtons, function (tileData) {
|
139
|
-
return ___EmotionJSX(ColorBlockButton, {
|
140
|
-
buttonData: tileData,
|
141
|
-
key: "".concat(tileData.text, "-key")
|
142
|
-
});
|
143
|
-
})), ___EmotionJSX(Box, {
|
144
|
-
isRow: true
|
145
|
-
}, ___EmotionJSX(AccordionGroup, {
|
146
|
-
defaultExpandedKeys: _mapInstanceProperty(_context = _Object$keys(data)).call(_context, function (item) {
|
147
|
-
return data[item].key;
|
148
|
-
}),
|
149
|
-
labelHeadingTag: "h2"
|
150
|
-
}, _mapInstanceProperty(_context2 = _Object$keys(data)).call(_context2, function (item) {
|
151
|
-
var _context3;
|
152
|
-
return ___EmotionJSX(Item, {
|
153
|
-
"data-id": data[item].label,
|
154
|
-
key: data[item].key,
|
155
|
-
label: data[item].label,
|
156
|
-
textValue: data[item].label
|
157
|
-
}, data[item].image ? ___EmotionJSX(Box, {
|
158
|
-
isRow: true,
|
159
|
-
gap: "md"
|
160
|
-
}, ___EmotionJSX(Image, {
|
161
|
-
src: UserImage,
|
162
|
-
alt: "user"
|
163
|
-
}), ___EmotionJSX(LabelValuePairs, {
|
164
|
-
fields: data[item].fields
|
165
|
-
})) : ___EmotionJSX(LabelValuePairs, {
|
166
|
-
fields: data[item].fields
|
167
|
-
}), data[item].badges && ___EmotionJSX(Box, {
|
168
|
-
isRow: true,
|
169
|
-
gap: "sm"
|
170
|
-
}, _mapInstanceProperty(_context3 = data[item].badges).call(_context3, function (badge) {
|
171
|
-
return ___EmotionJSX(Badge, {
|
172
|
-
label: badge,
|
173
|
-
variant: "defaultBadge",
|
174
|
-
key: "".concat(badge, "-key")
|
175
|
-
});
|
176
|
-
})));
|
177
|
-
})), ___EmotionJSX(EditButton, {
|
178
|
-
size: "lg"
|
179
|
-
}))), ___EmotionJSX(Tab, {
|
180
|
-
title: "Groups"
|
181
|
-
}, "Groups"), ___EmotionJSX(Tab, {
|
182
|
-
title: "Roles"
|
183
|
-
}, "Roles"), ___EmotionJSX(Tab, {
|
184
|
-
title: "Services"
|
185
|
-
}, "Services"), ___EmotionJSX(Tab, {
|
186
|
-
title: "API"
|
187
|
-
}, "API"))));
|
188
|
-
};
|
189
|
-
export var ColorBlockButton = function ColorBlockButton(_ref2) {
|
190
|
-
var _ref2$buttonData = _ref2.buttonData,
|
191
|
-
buttonData = _ref2$buttonData === void 0 ? colorBlockButtons[0] : _ref2$buttonData;
|
192
|
-
return ___EmotionJSX(Button, {
|
193
|
-
variant: "colorBlock",
|
194
|
-
className: buttonData.isConfigured ? 'is-configured' : ''
|
195
|
-
}, ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
|
196
|
-
variant: "buttonTitle"
|
197
|
-
}, buttonData.text), ___EmotionJSX(Text, {
|
198
|
-
variant: "buttonSubtitle"
|
199
|
-
}, buttonData.subtext)), ___EmotionJSX(Icon, {
|
200
|
-
icon: PencilIcon,
|
201
|
-
title: {
|
202
|
-
name: 'Create Icon'
|
203
|
-
}
|
204
|
-
}));
|
205
|
-
};
|
206
|
-
export var LabelValuePairs = function LabelValuePairs(_ref3) {
|
207
|
-
var _ref3$fields = _ref3.fields,
|
208
|
-
fields = _ref3$fields === void 0 ? data.contactInfo.fields : _ref3$fields;
|
209
|
-
return ___EmotionJSX(Box, {
|
210
|
-
gap: "md"
|
211
|
-
}, _mapInstanceProperty(fields).call(fields, function (_ref4) {
|
212
|
-
var label = _ref4.label,
|
213
|
-
value = _ref4.value,
|
214
|
-
isVerified = _ref4.isVerified;
|
215
|
-
return ___EmotionJSX(Box, {
|
216
|
-
gap: "xs",
|
217
|
-
key: "".concat(label, "-key")
|
218
|
-
}, ___EmotionJSX(Text, {
|
219
|
-
variant: "h4"
|
220
|
-
}, label), ___EmotionJSX(Box, {
|
221
|
-
isRow: true,
|
222
|
-
gap: "md"
|
223
|
-
}, ___EmotionJSX(Text, null, value), isVerified && ___EmotionJSX(Box, {
|
224
|
-
isRow: true,
|
225
|
-
gap: "xs"
|
226
|
-
}, ___EmotionJSX(NoticeIcon, {
|
227
|
-
color: "success.dark",
|
228
|
-
status: statuses.SUCCESS,
|
229
|
-
"aria-label": "".concat(statuses.SUCCESS, "-icon"),
|
230
|
-
size: "xs"
|
231
|
-
}), ___EmotionJSX(Text, {
|
232
|
-
variant: "listSubtitle",
|
233
|
-
color: "success.dark"
|
234
|
-
}, "Verified"))));
|
235
|
-
}));
|
236
|
-
};
|
237
|
-
var editData = {
|
238
|
-
personalInfo: {
|
239
|
-
label: 'Personal Info',
|
240
|
-
key: 'personalInfoKey',
|
241
|
-
image: UserImage,
|
242
|
-
fields: [{
|
243
|
-
label: 'Prefix',
|
244
|
-
value: ''
|
245
|
-
}, {
|
246
|
-
label: 'Given Name',
|
247
|
-
value: 'Ed'
|
248
|
-
}, {
|
249
|
-
label: 'Middle Name',
|
250
|
-
value: ''
|
251
|
-
}, {
|
252
|
-
label: 'Family Name',
|
253
|
-
value: 'Nepomuceno'
|
254
|
-
}, {
|
255
|
-
label: 'Suffix',
|
256
|
-
value: ''
|
257
|
-
}, {
|
258
|
-
label: 'Formatted',
|
259
|
-
value: ''
|
260
|
-
}, {
|
261
|
-
label: 'Nickname',
|
262
|
-
value: ''
|
263
|
-
}]
|
264
|
-
},
|
265
|
-
contactInfo: {
|
266
|
-
label: 'Contact Info',
|
267
|
-
key: 'contactInfoKey',
|
268
|
-
fields: [{
|
269
|
-
label: 'Email',
|
270
|
-
value: 'ednepomuceno@pingidentity.com',
|
271
|
-
slot: ___EmotionJSX(CheckboxField, {
|
272
|
-
mt: "xs",
|
273
|
-
label: "Require Email to be Verified"
|
274
|
-
})
|
275
|
-
}, {
|
276
|
-
label: 'Phone Number',
|
277
|
-
value: '123-456-7890'
|
278
|
-
}, {
|
279
|
-
label: 'Street Address',
|
280
|
-
value: '123 Example St'
|
281
|
-
}, {
|
282
|
-
label: 'Country Code',
|
283
|
-
value: ''
|
284
|
-
}, {
|
285
|
-
label: 'Loality',
|
286
|
-
value: ''
|
287
|
-
}, {
|
288
|
-
label: 'Region',
|
289
|
-
value: ''
|
290
|
-
}, {
|
291
|
-
label: 'Zip Code',
|
292
|
-
value: '12345'
|
293
|
-
}]
|
294
|
-
},
|
295
|
-
companyInfo: {
|
296
|
-
label: 'Company Info',
|
297
|
-
key: 'companyInfoKey',
|
298
|
-
fields: [{
|
299
|
-
label: 'Account ID',
|
300
|
-
value: ''
|
301
|
-
}, {
|
302
|
-
label: 'Type',
|
303
|
-
value: ''
|
304
|
-
}, {
|
305
|
-
label: 'Title',
|
306
|
-
value: ''
|
307
|
-
}]
|
308
|
-
}
|
309
|
-
};
|
310
|
-
export var EditPanel = function EditPanel() {
|
311
|
-
var _context4, _context5, _context6;
|
312
|
-
return ___EmotionJSX(OverlayWrapper, null, ___EmotionJSX(Box, {
|
313
|
-
p: "lg",
|
314
|
-
pb: "0"
|
315
|
-
}, ___EmotionJSX(Box, {
|
316
|
-
gap: "md",
|
317
|
-
mb: "20px",
|
318
|
-
width: "500px"
|
319
|
-
}, ___EmotionJSX(TextField, {
|
320
|
-
defaultValue: "ednepomuceno",
|
321
|
-
isRequired: true,
|
322
|
-
label: "Username"
|
323
|
-
}), ___EmotionJSX(SelectField, {
|
324
|
-
label: "Population",
|
325
|
-
isRequired: true,
|
326
|
-
defaultSelectedKey: "population"
|
327
|
-
}, ___EmotionJSX(Item, {
|
328
|
-
key: "population"
|
329
|
-
}, "Denver"))), ___EmotionJSX(AccordionGroup, {
|
330
|
-
defaultExpandedKeys: _concatInstanceProperty(_context4 = []).call(_context4, _mapInstanceProperty(_context5 = _Object$keys(editData)).call(_context5, function (item) {
|
331
|
-
return editData[item].key;
|
332
|
-
}), ['preferencesKey', 'customAttributesKey', 'jsonAttributesKey']),
|
333
|
-
labelHeadingTag: "h2"
|
334
|
-
}, _mapInstanceProperty(_context6 = _Object$keys(editData)).call(_context6, function (item) {
|
335
|
-
var _context7;
|
336
|
-
return ___EmotionJSX(Item, {
|
337
|
-
"data-id": editData[item].label,
|
338
|
-
key: editData[item].key,
|
339
|
-
label: editData[item].label,
|
340
|
-
textValue: editData[item].label
|
341
|
-
}, ___EmotionJSX(Box, {
|
342
|
-
gap: "md",
|
343
|
-
width: "500px"
|
344
|
-
}, editData[item].image && ___EmotionJSX(ImageUploadField, {
|
345
|
-
label: "Photo",
|
346
|
-
previewHeight: 40,
|
347
|
-
previewWidth: 40,
|
348
|
-
previewImage: UserImage
|
349
|
-
}), _mapInstanceProperty(_context7 = editData[item].fields).call(_context7, function (_ref5) {
|
350
|
-
var label = _ref5.label,
|
351
|
-
value = _ref5.value,
|
352
|
-
slot = _ref5.slot;
|
353
|
-
return ___EmotionJSX(Box, {
|
354
|
-
key: "".concat(label, "-key")
|
355
|
-
}, ___EmotionJSX(TextField, {
|
356
|
-
label: label,
|
357
|
-
defaultValue: value
|
358
|
-
}), slot);
|
359
|
-
})));
|
360
|
-
}), ___EmotionJSX(Item, {
|
361
|
-
"data-id": "preferences",
|
362
|
-
key: "preferencesKey",
|
363
|
-
label: "Preferences",
|
364
|
-
textValue: "Preferences"
|
365
|
-
}, ___EmotionJSX(Box, {
|
366
|
-
gap: "md",
|
367
|
-
width: "500px"
|
368
|
-
}, ___EmotionJSX(SelectField, {
|
369
|
-
label: "Preferred Language",
|
370
|
-
defaultSelectedKey: "language"
|
371
|
-
}, ___EmotionJSX(Item, {
|
372
|
-
key: "language"
|
373
|
-
}, "Select a Language")), ___EmotionJSX(SelectField, {
|
374
|
-
label: "Locale",
|
375
|
-
defaultSelectedKey: "language"
|
376
|
-
}, ___EmotionJSX(Item, {
|
377
|
-
key: "language"
|
378
|
-
}, "Select a locale")), ___EmotionJSX(SelectField, {
|
379
|
-
label: "Timezone",
|
380
|
-
defaultSelectedKey: "language"
|
381
|
-
}, ___EmotionJSX(Item, {
|
382
|
-
key: "language"
|
383
|
-
}, "Select a timezone")))), ___EmotionJSX(Item, {
|
384
|
-
"data-id": "customAttributes",
|
385
|
-
key: "customAttributesKey",
|
386
|
-
label: "Custom Attributes",
|
387
|
-
textValue: "Custom Attributes"
|
388
|
-
}, ___EmotionJSX(AddAttributeButton, null), ___EmotionJSX(Text, {
|
389
|
-
fontWeight: "-1",
|
390
|
-
fontSize: "md",
|
391
|
-
textAlign: "center"
|
392
|
-
}, "Click + Add to select a custom attribute")), ___EmotionJSX(Item, {
|
393
|
-
"data-id": "jsonAttributes",
|
394
|
-
key: "jsonAttributesKey",
|
395
|
-
label: "JSON Attributes",
|
396
|
-
textValue: "JSON Attributes"
|
397
|
-
}, ___EmotionJSX(AddAttributeButton, null), ___EmotionJSX(Text, {
|
398
|
-
fontWeight: "-1",
|
399
|
-
fontSize: "md",
|
400
|
-
textAlign: "center"
|
401
|
-
}, "Click + Add to select a JSON attribute")))), ___EmotionJSX(ButtonBar, null, ___EmotionJSX(Button, {
|
402
|
-
variant: "primary"
|
403
|
-
}, "Save"), ___EmotionJSX(Button, {
|
404
|
-
variant: "link"
|
405
|
-
}, "Cancel")));
|
406
|
-
};
|
407
|
-
export var AddAttributeButton = function AddAttributeButton() {
|
408
|
-
return ___EmotionJSX(Box, {
|
409
|
-
sx: {
|
410
|
-
position: 'relative',
|
411
|
-
left: '700px',
|
412
|
-
top: '-35px',
|
413
|
-
width: 0,
|
414
|
-
height: 0
|
415
|
-
}
|
416
|
-
}, ___EmotionJSX(Button, {
|
417
|
-
variant: "inlineWithIcon"
|
418
|
-
}, ___EmotionJSX(Icon, {
|
419
|
-
icon: PlusIcon,
|
420
|
-
size: "xs"
|
421
|
-
}), "Add"));
|
422
|
-
};
|
Binary file
|