@agilemotion/oui-react-js 1.8.56 → 1.8.58
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/ApplicationManager.js +446 -472
- package/dist/BasicApp.js +30 -0
- package/dist/BasicAppHome.js +2 -3
- package/dist/DateUtils.js +2 -2
- package/dist/DynamicJS.js +93 -101
- package/dist/InteractionPortalAppHome.js +1 -1
- package/dist/InteractionPortalApp_old.js +1 -2
- package/dist/MouseTracker.js +23 -0
- package/dist/RestService.js +13 -11
- package/dist/RestUtils.js +1 -1
- package/dist/TypedValue.js +15 -14
- package/dist/Utils.js +121 -114
- package/dist/ViewContext.js +152 -159
- package/dist/assets/jss/components/authNavbarStyle.js +34 -37
- package/dist/assets/jss/components/cardHeaderStyle.js +11 -18
- package/dist/assets/jss/components/customDropdownStyle.js +25 -27
- package/dist/assets/jss/components/customInputStyle.js +7 -3
- package/dist/assets/jss/components/dropdownStyle.js +14 -11
- package/dist/assets/jss/components/footerStyle.js +17 -12
- package/dist/assets/jss/components/headerLinksStyle.js +12 -9
- package/dist/assets/jss/components/headerStyle.js +24 -26
- package/dist/assets/jss/components/navbarLinksStyle.js +12 -9
- package/dist/assets/jss/components/navbarStyle.js +24 -26
- package/dist/assets/jss/components/sidebarStyle.js +42 -42
- package/dist/assets/jss/components/typographyStyle.js +7 -3
- package/dist/assets/jss/rootStyle.js +30 -34
- package/dist/assets/jss/views/layoutStyle.js +12 -9
- package/dist/assets/jss/views/loginStyle.js +9 -6
- package/dist/components/AlertBar.js +1 -1
- package/dist/components/Button.js +18 -11
- package/dist/components/Calendar.js +9 -6
- package/dist/components/Chart.js +1 -1
- package/dist/components/DataGrid.css +12 -3
- package/dist/components/DataGrid.js +115 -56
- package/dist/components/DataGridColumn.js +22 -4
- package/dist/components/DocumentTemplateDesigner.js +9 -5
- package/dist/components/DocumentTemplateDesignerComponent.js +49 -549
- package/dist/components/DocumentTemplatePlaceholderDialog.js +3 -4
- package/dist/components/DocumentViewer.js +19 -6
- package/dist/components/ElementResizeHandler.js +177 -174
- package/dist/components/FaceApi.js +2 -2
- package/dist/components/FileThumb.js +5 -5
- package/dist/components/Graph.js +77 -74
- package/dist/components/GraphNode.js +39 -36
- package/dist/components/HtmlPanel.js +2 -1
- package/dist/components/Icon.js +1 -2
- package/dist/components/PDFViewer.js +2 -3
- package/dist/components/PopupView.js +1 -1
- package/dist/components/Portlet.js +3 -2
- package/dist/components/RegularButton.js +17 -14
- package/dist/components/SocketManager.js +97 -94
- package/dist/components/StepperTitleBar.js +7 -6
- package/dist/components/TabPage.js +10 -7
- package/dist/components/TabPanel.js +11 -6
- package/dist/components/TableCellContent.js +13 -9
- package/dist/components/TemplateDesigner.js +2 -2
- package/dist/components/TemplateItemEventHandler.js +232 -228
- package/dist/components/TemplateTable.js +32 -29
- package/dist/components/TitleBar.js +2 -2
- package/dist/components/Toolbar.js +58 -22
- package/dist/components/Tree.js +3 -3
- package/dist/components/WordDocumentViewer.css +7 -0
- package/dist/components/WordDocumentViewer.js +329 -109
- package/dist/components/card/Card.js +18 -15
- package/dist/components/card/CardAvatar.js +11 -8
- package/dist/components/card/CardBody.js +16 -13
- package/dist/components/card/CardFooter.js +15 -12
- package/dist/components/card/CardHeader.js +16 -13
- package/dist/components/card/CardIcon.js +9 -6
- package/dist/components/card/CardText.js +9 -6
- package/dist/components/customInput/File.js +4 -5
- package/dist/components/dashboard/FoldingSideTabDashboard.bck.js +1 -1
- package/dist/components/dashboard/FoldingSideTabDashboard.js +2 -3
- package/dist/components/dashboard/components/Header.js +6 -4
- package/dist/components/dashboard/components/LeftDrawer.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +26 -28
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.bck.js +182 -188
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +27 -30
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +12 -14
- package/dist/components/drag-spec-design.json +15 -0
- package/dist/components/facialRecognition/FaceRecognitionComponent.js +10 -11
- package/dist/components/facialRecognition/service/faceApi.js +3 -3
- package/dist/components/form/AddressSearch.js +8 -5
- package/dist/components/form/AutoComplete.js +4 -4
- package/dist/components/form/BaseField.js +3 -2
- package/dist/components/form/CurrencyField.js +8 -8
- package/dist/components/form/DatePicker.js +3 -2
- package/dist/components/form/FieldSet.js +2 -1
- package/dist/components/form/Form.css +1 -1
- package/dist/components/form/Form.js +11 -8
- package/dist/components/form/GridField.js +4 -3
- package/dist/components/form/IconField.js +2 -1
- package/dist/components/form/ImageEditor.js +13 -8
- package/dist/components/form/LookupField.js +8 -7
- package/dist/components/form/MultiFileUploadField.js +14 -8
- package/dist/components/form/SelectItem.js +7 -6
- package/dist/components/form/TextField.js +6 -6
- package/dist/components/form/TimePicker.js +3 -2
- package/dist/components/form/TransferList.js +2 -2
- package/dist/components/form/UploadField.js +5 -5
- package/dist/components/grid/GridContainer.js +7 -4
- package/dist/components/grid/GridItem.js +7 -4
- package/dist/components/layout/CollapsiblePanel.js +7 -5
- package/dist/components/layout/Layout.js +5 -5
- package/dist/components/layout/View.js +6 -5
- package/dist/components/layout/ViewContainer.js +1 -2
- package/dist/components/layout/ViewPort.js +1 -1
- package/dist/components/layout/Window.js +2 -3
- package/dist/components/layout/WindowDialog.js +9 -7
- package/dist/components/layout/WindowViewPort.js +3 -3
- package/dist/components/media/Chat.js +2 -1
- package/dist/components/media/MediaSoupHelper.js +57 -53
- package/dist/components/media/SocketRequest.js +9 -7
- package/dist/components/media/SocketResponse.js +7 -5
- package/dist/components/media/Timer.js +1 -2
- package/dist/components/media/Toolbar.js +3 -3
- package/dist/components/media/ToolbarButton.js +23 -24
- package/dist/components/media/Toolbar_bck.js +3 -3
- package/dist/components/media/Tracks.js +24 -19
- package/dist/components/media/TrainingRoom.js +3 -4
- package/dist/components/media/Transports.js +21 -17
- package/dist/components/media/VCEventManager.js +25 -24
- package/dist/components/media/VCEventType.js +81 -79
- package/dist/components/media/VCParticipantList.js +1 -2
- package/dist/components/media/VCParticipantListItem.js +2 -3
- package/dist/components/media/VCRoomParticipant.js +4 -5
- package/dist/components/media/VCRoomRecorder.js +163 -160
- package/dist/components/media/VCRoomWorkspace.js +3 -4
- package/dist/components/media/Video.js +1 -2
- package/dist/components/media/VideoPlayer.js +1 -2
- package/dist/components/media/chat/ChatPoll.js +15 -15
- package/dist/components/media/chat/ChatRoom.js +15 -15
- package/dist/components/media/chat/ChatRoomItem.js +2 -3
- package/dist/components/media/chat/ChatRoomList.js +1 -2
- package/dist/components/media/chat/ChatRoomWrapper.js +1 -1
- package/dist/components/media/chat/PollContainer.js +14 -8
- package/dist/components/media/chat/PollResult.js +1 -2
- package/dist/components/menu/MenuBars.js +8 -5
- package/dist/components/menu/MenuButton.js +11 -5
- package/dist/components/menu/MenuItem.js +13 -6
- package/dist/components/menu/MenuLink.js +2 -1
- package/dist/components/navbars/HomeNavbar.js +43 -41
- package/dist/components/navbars/PortalNavbar.js +1 -2
- package/dist/components/signatures/AgilitySignaturePanel.js +39 -15
- package/dist/components/signatures/{DocumentContainer.js → HtmlSignatureDocumentContainer.js} +4 -4
- package/dist/components/signatures/ImageSignatureInput.js +27 -16
- package/dist/components/signatures/ResponsiveTable.js +1 -1
- package/dist/components/signatures/SearchView.js +1 -1
- package/dist/components/signatures/SignatureInput.js +42 -98
- package/dist/components/signatures/SignatureInputProps.js +1 -1
- package/dist/components/signatures/SignatureTemplateDesigner.js +13 -10
- package/dist/components/signatures/Toolbar.js +7 -3
- package/dist/components/signatures/ViewUtils.js +21 -16
- package/dist/event/ActionHandlers.js +10 -7
- package/dist/event/Event.js +15 -13
- package/dist/event/EventListener.js +39 -41
- package/dist/event/EventType.js +24 -19
- package/dist/event/Observable.js +120 -125
- package/dist/event/RouteActionHandler.js +4 -4
- package/dist/event/ScriptActionHandler.js +1 -1
- package/dist/event/ServiceCallActionHandler.js +1 -1
- package/dist/interaction/CursorOverlay.js +48 -0
- package/dist/interaction/DragContext.js +39 -0
- package/dist/interaction/GrabContext.js +40 -0
- package/dist/js/Addresses.js +9 -8
- package/dist/js/Calendar.js +152 -149
- package/dist/js/Docs.js +92 -87
- package/dist/js/DynamicLib.js +9 -6
- package/dist/js/Media.js +134 -131
- package/dist/js/ProcurementMeetings.js +81 -78
- package/dist/js/Validators.js +53 -50
- package/dist/js/Windows.js +35 -32
- package/dist/redux/store/ConfigureStore.js +8 -5
- package/dist/redux/store/DashboardStore.js +13 -12
- package/dist/redux/store/SecurityStore.js +9 -6
- package/dist/security/TokenManager.js +1 -1
- package/dist/view/Dashboard.js +11 -12
- package/dist/view/security/ForgotPassword.js +3 -3
- package/dist/view/security/ForgotPasswordBasic.js +1 -1
- package/dist/view/security/Login.js +4 -4
- package/dist/view/security/LoginBasic.js +2 -2
- package/dist/view/security/LoginInteractionPortal.js +2 -2
- package/dist/view/security/ResetPassword.js +1 -1
- package/dist/view/security/ResetPasswordBasic.js +1 -1
- package/dist/view/security/Security.js +4 -4
- package/package.json +10 -10
- package/dist/components/DocumentTemplateDesignerComponent2.js +0 -585
|
@@ -13,11 +13,10 @@ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"
|
|
|
13
13
|
var _ej2Base = require("@syncfusion/ej2-base");
|
|
14
14
|
var _Alert = _interopRequireDefault(require("react-bootstrap/Alert"));
|
|
15
15
|
var _LottieIcon = _interopRequireDefault(require("./LottieIcon"));
|
|
16
|
-
|
|
16
|
+
require("./WordDocumentViewer.css");
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
const KEY = exports.KEY = 'ORg4AjUWIQA/Gnt2U1hhQlJBfV5AQmBIYVp/TGpJfl96cVxMZVVBJAtUQF1hTX5adkJiWHtWdXBXT2Je';
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
+
const KEY = exports.KEY = 'Ngo9BigBOggjHTQxAR8/V1JGaF5cXGpCf1FpRmJGdld5fUVHYVZUTXxaS00DNHVRdkdlWX5ceHVRQ2BYUUdwX0NWYEs=';
|
|
21
20
|
(0, _ej2Base.registerLicense)(KEY);
|
|
22
21
|
const DOCSVC = exports.DOCSVC = "https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/";
|
|
23
22
|
_ej2ReactDocumenteditor.DocumentEditorContainerComponent.Inject(_ej2ReactDocumenteditor.Toolbar);
|
|
@@ -77,34 +76,63 @@ function applyLevel(ed) {
|
|
|
77
76
|
const WordDocumentViewer = props => {
|
|
78
77
|
const [container, setContainer] = _react.default.useState(null);
|
|
79
78
|
const [items, setItems] = _react.default.useState(null);
|
|
80
|
-
const [height, setHeight] = _react.default.useState(0);
|
|
81
|
-
const [width, setWidth] = _react.default.useState(0);
|
|
82
79
|
const [visible, setVisible] = _react.default.useState(true);
|
|
83
80
|
const [reRendering, setReRendering] = _react.default.useState(false);
|
|
84
81
|
const [json, setJson] = _react.default.useState(null);
|
|
85
82
|
const [errorMessage, setErrorMessage] = _react.default.useState(null);
|
|
83
|
+
const currentText = _react.default.useRef(null);
|
|
84
|
+
const activeAnchorRef = (0, _react.useRef)(null);
|
|
85
|
+
const anchorEnd = (0, _react.useRef)(false);
|
|
86
|
+
const deleteLockRef = (0, _react.useRef)(false);
|
|
87
|
+
const loading = (0, _react.useRef)(true);
|
|
86
88
|
const ref = useOnFullyVisible(el => {
|
|
87
|
-
//console.log('Document fully visible & rendered:', el);
|
|
88
89
|
if (!reRendering) {
|
|
89
90
|
setVisible(false);
|
|
90
91
|
setReRendering(true);
|
|
91
92
|
}
|
|
92
93
|
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
function isPointInsideElement(x, y, el) {
|
|
95
|
+
if (!el) return false;
|
|
96
|
+
const rect = el.getBoundingClientRect();
|
|
97
|
+
return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
|
|
98
|
+
}
|
|
99
|
+
function getViewerElement() {
|
|
100
|
+
return document.getElementById("".concat(props.id, "-container_editor_viewerContainer"));
|
|
101
|
+
}
|
|
102
|
+
function isNavigationKey(e) {
|
|
103
|
+
return ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(e.key);
|
|
104
|
+
}
|
|
105
|
+
function normalizeAnchor(value) {
|
|
106
|
+
if (!value) return null;
|
|
107
|
+
return value.replace(/^\[\[|\]\]$/g, '').replace(/^<<|>>$/g, '');
|
|
108
|
+
}
|
|
109
|
+
let viewerElement = getViewerElement();
|
|
110
|
+
function insertReadonlyAnchor(eventData, dropPosition) {
|
|
111
|
+
if (!(container !== null && container !== void 0 && container.documentEditor)) return;
|
|
112
|
+
if (!dropPosition) return;
|
|
113
|
+
if (!isPointInsideElement(dropPosition.x, dropPosition.y, viewerElement)) {
|
|
114
|
+
// Drop did not happen inside this document
|
|
115
|
+
//console.log("DROP NOT INSIDE THIS DOCUMENT : ", dropPosition);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const doc = container.documentEditor;
|
|
119
|
+
const ed = doc.editor;
|
|
120
|
+
const sel = doc.selection;
|
|
121
|
+
if (!ed || !sel) return;
|
|
122
|
+
const token = "[[".concat(normalizeAnchor(eventData), "]]");
|
|
123
|
+
ed.insertText(token);
|
|
124
|
+
}
|
|
125
|
+
const dropData = _react.default.useRef(null);
|
|
104
126
|
const api = () => {
|
|
105
127
|
return {
|
|
106
128
|
getValue: () => {
|
|
107
129
|
return saveAsBase64();
|
|
130
|
+
},
|
|
131
|
+
insertReadonlyAnchor: async (value, dropPosition) => {
|
|
132
|
+
dropData.current = {
|
|
133
|
+
value,
|
|
134
|
+
dropPosition
|
|
135
|
+
};
|
|
108
136
|
}
|
|
109
137
|
};
|
|
110
138
|
};
|
|
@@ -126,84 +154,6 @@ const WordDocumentViewer = props => {
|
|
|
126
154
|
id: 'clear',
|
|
127
155
|
text: 'Clear list'
|
|
128
156
|
}];
|
|
129
|
-
const onNumberingSelect = args => {
|
|
130
|
-
const ed = containerRef.current?.documentEditor?.editor;
|
|
131
|
-
if (!ed) return;
|
|
132
|
-
switch (args.item.id) {
|
|
133
|
-
case 'lvl-0':
|
|
134
|
-
applyLevel(ed, 0);
|
|
135
|
-
break;
|
|
136
|
-
case 'lvl-1':
|
|
137
|
-
applyLevel(ed, 1);
|
|
138
|
-
break;
|
|
139
|
-
case 'lvl-2':
|
|
140
|
-
applyLevel(ed, 2);
|
|
141
|
-
break;
|
|
142
|
-
case 'clear':
|
|
143
|
-
ed.clearList();
|
|
144
|
-
break;
|
|
145
|
-
default:
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const onCreated = () => {
|
|
150
|
-
const container = containerRef.current;
|
|
151
|
-
const tb = container?.toolbarModule?.toolbar; // EJ2 Toolbar instance
|
|
152
|
-
if (!tb) return;
|
|
153
|
-
|
|
154
|
-
// 1) Add a placeholder button into the toolbar at the end
|
|
155
|
-
tb.addItems([{
|
|
156
|
-
type: 'Separator'
|
|
157
|
-
}, {
|
|
158
|
-
// Use a real HTML template (string) and give it an id
|
|
159
|
-
template: '<button id="numbering-ddb" class="e-btn e-flat" type="button">Numbering</button>',
|
|
160
|
-
tooltipText: 'Numbering styles'
|
|
161
|
-
}], tb.items.length);
|
|
162
|
-
|
|
163
|
-
// 2) Turn that placeholder into a functioning DropDownButton
|
|
164
|
-
const ddb = new DropDownButton({
|
|
165
|
-
content: 'Numbering',
|
|
166
|
-
cssClass: 'e-flat',
|
|
167
|
-
items: [{
|
|
168
|
-
id: 'lvl-0',
|
|
169
|
-
text: '1.'
|
|
170
|
-
}, {
|
|
171
|
-
id: 'lvl-1',
|
|
172
|
-
text: '1.1'
|
|
173
|
-
}, {
|
|
174
|
-
id: 'lvl-2',
|
|
175
|
-
text: '1.1.1'
|
|
176
|
-
}, {
|
|
177
|
-
separator: true
|
|
178
|
-
}, {
|
|
179
|
-
id: 'clear',
|
|
180
|
-
text: 'Clear list'
|
|
181
|
-
}],
|
|
182
|
-
select: args => {
|
|
183
|
-
const ed = container.documentEditor.editor;
|
|
184
|
-
if (!ed) return;
|
|
185
|
-
switch (args.item.id) {
|
|
186
|
-
case 'lvl-0':
|
|
187
|
-
applyLevel(ed, 0);
|
|
188
|
-
break;
|
|
189
|
-
case 'lvl-1':
|
|
190
|
-
applyLevel(ed, 1);
|
|
191
|
-
break;
|
|
192
|
-
case 'lvl-2':
|
|
193
|
-
applyLevel(ed, 2);
|
|
194
|
-
break;
|
|
195
|
-
case 'clear':
|
|
196
|
-
ed.clearList();
|
|
197
|
-
break;
|
|
198
|
-
default:
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}, '#numbering-ddb');
|
|
203
|
-
|
|
204
|
-
// (optional) keep a ref if you want to dispose on unmount
|
|
205
|
-
container._numberingDDB = ddb;
|
|
206
|
-
};
|
|
207
157
|
_react.default.useEffect(() => {
|
|
208
158
|
let toolbarItems = props.commentsOnly ? ["Comments"] : ["Undo", "Redo", "Separator", {
|
|
209
159
|
id: 'bullets',
|
|
@@ -224,7 +174,8 @@ const WordDocumentViewer = props => {
|
|
|
224
174
|
setItems(toolbarItems);
|
|
225
175
|
}, []);
|
|
226
176
|
_react.default.useEffect(() => {
|
|
227
|
-
|
|
177
|
+
var _props$file;
|
|
178
|
+
if ((_props$file = props.file) !== null && _props$file !== void 0 && _props$file.base64) {
|
|
228
179
|
let base64 = props.file.base64;
|
|
229
180
|
const arrayBuffer = _Utils.default.base64ToArrayBuffer(base64);
|
|
230
181
|
const file = new Blob([arrayBuffer], {
|
|
@@ -232,7 +183,7 @@ const WordDocumentViewer = props => {
|
|
|
232
183
|
});
|
|
233
184
|
const formData = new FormData();
|
|
234
185
|
formData.append('files', file, 'document.docx');
|
|
235
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(
|
|
186
|
+
(0, _reactPromiseTracker.trackPromise)(fetch("".concat(DOCSVC, "Import"), {
|
|
236
187
|
method: 'POST',
|
|
237
188
|
body: formData
|
|
238
189
|
}).then(response => {
|
|
@@ -246,7 +197,7 @@ const WordDocumentViewer = props => {
|
|
|
246
197
|
if (reRendering) {
|
|
247
198
|
const timer = window.setTimeout(() => {
|
|
248
199
|
setVisible(true);
|
|
249
|
-
},
|
|
200
|
+
}, 1000);
|
|
250
201
|
return () => window.clearTimeout(timer);
|
|
251
202
|
}
|
|
252
203
|
}, [reRendering]);
|
|
@@ -259,33 +210,294 @@ const WordDocumentViewer = props => {
|
|
|
259
210
|
return null;
|
|
260
211
|
}
|
|
261
212
|
if (container) {
|
|
213
|
+
var _props$file2, _props$file3;
|
|
262
214
|
container.documentEditor.editor.stopProtection("password");
|
|
263
215
|
let blob = await container.documentEditor.saveAsBlob('Docx');
|
|
264
216
|
if (props.commentsOnly) {
|
|
265
217
|
container.documentEditor.editor.enforceProtection('password', 'CommentsOnly');
|
|
266
218
|
}
|
|
267
|
-
return new File([blob], props.file
|
|
268
|
-
type: props.file
|
|
219
|
+
return new File([blob], (_props$file2 = props.file) !== null && _props$file2 !== void 0 && _props$file2.name ? props.file.name : 'document.docx', {
|
|
220
|
+
type: (_props$file3 = props.file) !== null && _props$file3 !== void 0 && _props$file3.type ? props.file.type : 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
|
269
221
|
});
|
|
270
222
|
}
|
|
271
223
|
};
|
|
224
|
+
function extractDocumentText(editor) {
|
|
225
|
+
if (currentText.current) return currentText.current;
|
|
226
|
+
const originalStart = selection.startOffset;
|
|
227
|
+
const originalEnd = selection.endOffset;
|
|
228
|
+
editor.selection.selectAll();
|
|
229
|
+
const text = editor.selection.getText();
|
|
230
|
+
editor.selection.select(originalStart, originalEnd);
|
|
231
|
+
currentText.current = text;
|
|
232
|
+
return text;
|
|
233
|
+
}
|
|
234
|
+
function extractAnchorTokens(text) {
|
|
235
|
+
const regex = /\[\[[^\[\]]+?\]\]/g;
|
|
236
|
+
const tokens = new Set();
|
|
237
|
+
let match;
|
|
238
|
+
while ((match = regex.exec(text)) !== null) {
|
|
239
|
+
tokens.add(match[0]); // exact [[TEXT]]
|
|
240
|
+
}
|
|
241
|
+
return Array.from(tokens);
|
|
242
|
+
}
|
|
243
|
+
function isCaretWithinRange(caret, start, end) {
|
|
244
|
+
if (caret.paragraph !== start.paragraph) return false;
|
|
245
|
+
const x = caret.location.xIn;
|
|
246
|
+
const y = caret.location.yIn;
|
|
247
|
+
|
|
248
|
+
//console.log("CHECKING CARET WITHIN RANGE : ", x, y, start.location.xIn, start.location.yIn, end.location.xIn, end.location.yIn);
|
|
249
|
+
return y === start.location.yIn && x >= start.location.xIn && x <= end.location.xIn;
|
|
250
|
+
}
|
|
251
|
+
function deleteCurrentAnchor(container) {
|
|
252
|
+
const editor = container === null || container === void 0 ? void 0 : container.documentEditor;
|
|
253
|
+
const selection = editor === null || editor === void 0 ? void 0 : editor.selection;
|
|
254
|
+
const docEditor = editor === null || editor === void 0 ? void 0 : editor.editor;
|
|
255
|
+
const anchor = activeAnchorRef.current;
|
|
256
|
+
if (!editor || !selection || !docEditor || !anchor) return;
|
|
257
|
+
|
|
258
|
+
//console.log("END OFFSET : ", anchor.endOffset, bumpOffset(anchor.endOffset, -1))
|
|
259
|
+
//console.log("START - END : ", anchor.startOffset, bumpOffset(anchor.endOffset, -1));
|
|
260
|
+
try {
|
|
261
|
+
selection.select(anchor.startOffset, anchor.endOffset);
|
|
262
|
+
//console.log("SELECTION TEXT : " + selection.text);
|
|
263
|
+
//docEditor.delete();
|
|
264
|
+
//selection.select(anchor.startOffset, anchor.startOffset);
|
|
265
|
+
} finally {
|
|
266
|
+
activeAnchorRef.current = null;
|
|
267
|
+
updateActiveAnchor(container);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function updateActiveAnchor(container) {
|
|
271
|
+
activeAnchorRef.current = grabAnchorWithBounds(container);
|
|
272
|
+
}
|
|
273
|
+
function scanRightUntilAnchor(editor, originOffset) {
|
|
274
|
+
let maxScan = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 500;
|
|
275
|
+
const sel = editor.selection;
|
|
276
|
+
let current = originOffset;
|
|
277
|
+
for (let i = 0; i < maxScan; i++) {
|
|
278
|
+
// move right
|
|
279
|
+
current = bumpOffset(current, +1);
|
|
280
|
+
sel.select(current, current);
|
|
281
|
+
|
|
282
|
+
// select ONE character only
|
|
283
|
+
sel.select(current, bumpOffset(current, +1));
|
|
284
|
+
const ch = sel.text;
|
|
285
|
+
|
|
286
|
+
// ⛔ Bail on whitespace or paragraph break
|
|
287
|
+
if (!ch || /\s/.test(ch)) return null;
|
|
288
|
+
|
|
289
|
+
// Detect closing "]]"
|
|
290
|
+
if (ch === ']') {
|
|
291
|
+
// lookahead one char
|
|
292
|
+
const next = bumpOffset(current, +1);
|
|
293
|
+
sel.select(next, bumpOffset(next, +1));
|
|
294
|
+
if (sel.text === ']') {
|
|
295
|
+
// return position AFTER ]]
|
|
296
|
+
return bumpOffset(current, +2);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
function scanLeftUntilAnchor(editor, originOffset) {
|
|
303
|
+
let maxScan = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 500;
|
|
304
|
+
const sel = editor.selection;
|
|
305
|
+
let current = originOffset;
|
|
306
|
+
for (let i = 0; i < maxScan; i++) {
|
|
307
|
+
current = bumpOffset(current, -1);
|
|
308
|
+
|
|
309
|
+
// select one char to the left
|
|
310
|
+
sel.select(bumpOffset(current, -1), current);
|
|
311
|
+
const ch = sel.text;
|
|
312
|
+
if (!ch || /\s/.test(ch)) return null;
|
|
313
|
+
|
|
314
|
+
// detect [[
|
|
315
|
+
if (ch === '[') {
|
|
316
|
+
const prev = bumpOffset(current, -1);
|
|
317
|
+
sel.select(bumpOffset(prev, -1), prev);
|
|
318
|
+
if (sel.text === '[') {
|
|
319
|
+
// 🔑 FIX: go back TWO chars
|
|
320
|
+
return bumpOffset(current, -2);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
function getCharAt(editor, offset) {
|
|
327
|
+
const sel = editor.selection;
|
|
328
|
+
sel.select(offset, bumpOffset(offset, +1));
|
|
329
|
+
return sel.text || null;
|
|
330
|
+
}
|
|
331
|
+
function isCaretImmediatelyBeforeAnchorStart(editor, offset) {
|
|
332
|
+
const c0 = getCharAt(editor, offset);
|
|
333
|
+
const c1 = getCharAt(editor, bumpOffset(offset, +1));
|
|
334
|
+
return c0 === '[' && c1 === '['; // |[[TEXT]]
|
|
335
|
+
}
|
|
336
|
+
function isCaretImmediatelyAfterAnchor(editor, offset) {
|
|
337
|
+
return getCharAt(editor, bumpOffset(offset, -1)) === ']' && getCharAt(editor, bumpOffset(offset, -2)) === ']';
|
|
338
|
+
}
|
|
339
|
+
function grabAnchorWithBounds(container) {
|
|
340
|
+
const editor = container === null || container === void 0 ? void 0 : container.documentEditor;
|
|
341
|
+
const selection = editor === null || editor === void 0 ? void 0 : editor.selection;
|
|
342
|
+
const originalStart = selection.startOffset;
|
|
343
|
+
const originalEnd = selection.endOffset;
|
|
344
|
+
selection.selectCurrentWord();
|
|
345
|
+
selection.select(originalStart, originalEnd);
|
|
346
|
+
|
|
347
|
+
//let word = selection.text;
|
|
348
|
+
//console.log("grabAnchorWithBounds SELECTION TEXT : ", word);
|
|
349
|
+
|
|
350
|
+
let scanStart = originalStart;
|
|
351
|
+
try {
|
|
352
|
+
if (isCaretImmediatelyBeforeAnchorStart(editor, originalStart)) {
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
let isCaretAtEnd = isCaretImmediatelyAfterAnchor(editor, originalStart);
|
|
356
|
+
if (isCaretAtEnd) {
|
|
357
|
+
//console.log("CARET AT END");
|
|
358
|
+
scanStart = bumpOffset(originalStart, -3);
|
|
359
|
+
}
|
|
360
|
+
const left = scanLeftUntilAnchor(editor, scanStart);
|
|
361
|
+
const right = scanRightUntilAnchor(editor, scanStart);
|
|
362
|
+
if (left && right) {
|
|
363
|
+
selection.select(left, right);
|
|
364
|
+
const text = selection.text;
|
|
365
|
+
anchorEnd.current = isCaretAtEnd;
|
|
366
|
+
|
|
367
|
+
/*console.log("GRAB RESULT : ", {
|
|
368
|
+
token: text,
|
|
369
|
+
startOffset: left,
|
|
370
|
+
endOffset: right
|
|
371
|
+
});*/
|
|
372
|
+
|
|
373
|
+
if (/^\[\[.+?\]\]$/.test(text)) {
|
|
374
|
+
return {
|
|
375
|
+
token: text,
|
|
376
|
+
startOffset: left,
|
|
377
|
+
endOffset: right
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
} finally {
|
|
382
|
+
selection.select(originalStart, originalEnd);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function bumpOffset(offset, delta) {
|
|
386
|
+
const parts = offset.split(';');
|
|
387
|
+
const idx = parts.length - 1;
|
|
388
|
+
const value = Math.max(0, parseInt(parts[idx], 10) + delta);
|
|
389
|
+
parts[idx] = value.toString();
|
|
390
|
+
return parts.join(';');
|
|
391
|
+
}
|
|
272
392
|
_react.default.useEffect(() => {
|
|
273
393
|
if (container) {
|
|
274
394
|
setupContainer();
|
|
275
395
|
//autoSave();
|
|
396
|
+
|
|
397
|
+
const editor = container.documentEditor;
|
|
398
|
+
editor.addEventListener('keyDown', args => {
|
|
399
|
+
const e = args.event;
|
|
400
|
+
|
|
401
|
+
// 1️⃣ Navigation keys → inspect only
|
|
402
|
+
if (isNavigationKey(e)) {
|
|
403
|
+
requestAnimationFrame(() => {
|
|
404
|
+
updateActiveAnchor(container);
|
|
405
|
+
//console.log("ACTIVE ANCHOR : ", activeAnchorRef.current);
|
|
406
|
+
});
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
//console.log("DELETE LOCKED : ", deleteLockRef.current);
|
|
411
|
+
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
412
|
+
if (deleteLockRef.current) {
|
|
413
|
+
// Syncfusion already deleted → rewind safely
|
|
414
|
+
editor.editorHistory.undo();
|
|
415
|
+
e.preventDefault();
|
|
416
|
+
e.stopPropagation();
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// Acquire lock
|
|
421
|
+
deleteLockRef.current = true;
|
|
422
|
+
|
|
423
|
+
// Release lock when editor is actually stable
|
|
424
|
+
requestAnimationFrame(() => {
|
|
425
|
+
requestAnimationFrame(() => {
|
|
426
|
+
deleteLockRef.current = false;
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// 2️⃣ If we are inside a restricted anchor
|
|
432
|
+
//console.log("anchorEnd.current : ", anchorEnd.current, activeAnchorRef.current);
|
|
433
|
+
if (activeAnchorRef.current && !isNavigationKey(e) || anchorEnd.current) {
|
|
434
|
+
// Delete / Backspace = delete whole anchor
|
|
435
|
+
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
436
|
+
//editor.editorHistory.undo();
|
|
437
|
+
e.preventDefault();
|
|
438
|
+
e.stopPropagation();
|
|
439
|
+
deleteCurrentAnchor(container, activeAnchorRef.current);
|
|
440
|
+
activeAnchorRef.current = null;
|
|
441
|
+
anchorEnd.current = false;
|
|
442
|
+
deleteLockRef.current = false;
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// We do not want to block when we are at the end of an anchor. Input will never damage the anchor
|
|
447
|
+
//console.log("UNBLOCKING : ", anchorEnd.current, activeAnchorRef.current);
|
|
448
|
+
if (!anchorEnd.current) {
|
|
449
|
+
// 🔒 Block typing & paste
|
|
450
|
+
if (e.key.length === 1 ||
|
|
451
|
+
// printable char
|
|
452
|
+
e.ctrlKey || e.metaKey) {
|
|
453
|
+
e.preventDefault();
|
|
454
|
+
e.stopPropagation();
|
|
455
|
+
}
|
|
456
|
+
} else {
|
|
457
|
+
activeAnchorRef.current = null;
|
|
458
|
+
}
|
|
459
|
+
anchorEnd.current = false;
|
|
460
|
+
}
|
|
461
|
+
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
462
|
+
requestAnimationFrame(() => {
|
|
463
|
+
updateActiveAnchor(container);
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
const onMouseUp = e => {
|
|
468
|
+
if (!isPointInsideElement(e.clientX, e.clientY, viewerElement)) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
if (dropData.current) {
|
|
472
|
+
insertReadonlyAnchor(dropData.current.value, dropData.current.dropPosition);
|
|
473
|
+
dropData.current = null;
|
|
474
|
+
}
|
|
475
|
+
updateActiveAnchor(container);
|
|
476
|
+
//viewer.style.overflow = 'auto';
|
|
477
|
+
};
|
|
478
|
+
viewerElement.addEventListener('mouseup', onMouseUp);
|
|
479
|
+
return () => viewerElement.removeEventListener('mouseup', onMouseUp);
|
|
276
480
|
}
|
|
277
481
|
}, [container]);
|
|
278
482
|
_react.default.useEffect(() => {
|
|
279
483
|
if (container && json) {
|
|
280
|
-
container.documentEditor.documentChange = () => {
|
|
484
|
+
container.documentEditor.documentChange = async () => {
|
|
281
485
|
container.documentEditor.enableTrackChanges = !_Utils.default.isNull(props.trackChanges) ? props.trackChanges : true;
|
|
282
486
|
if (props.commentsOnly) {
|
|
283
487
|
container.documentEditor.editor.enforceProtection('password', 'CommentsOnly');
|
|
284
488
|
} else if (props.readOnly) {
|
|
285
489
|
container.documentEditor.isReadOnly = props.readOnly;
|
|
286
490
|
}
|
|
491
|
+
if (loading.current) {
|
|
492
|
+
let file = await saveAsBase64();
|
|
493
|
+
if (props.valueChangeHandler) {
|
|
494
|
+
props.valueChangeHandler(file);
|
|
495
|
+
}
|
|
496
|
+
loading.current = false;
|
|
497
|
+
}
|
|
498
|
+
currentText.current = extractDocumentText(container.documentEditor.editor);
|
|
287
499
|
};
|
|
288
|
-
container.documentEditor.addEventListener('contentChange', e => {
|
|
500
|
+
container.documentEditor.addEventListener('contentChange', async e => {
|
|
289
501
|
if (props.disableAcceptChanges) {
|
|
290
502
|
let acceptButtons = document.getElementsByClassName("e-de-track-accept-button");
|
|
291
503
|
for (const acceptButton of acceptButtons) {
|
|
@@ -298,9 +510,14 @@ const WordDocumentViewer = props => {
|
|
|
298
510
|
rejectButton.parentElement.removeChild(rejectButton);
|
|
299
511
|
}
|
|
300
512
|
}
|
|
301
|
-
if (
|
|
302
|
-
|
|
513
|
+
if (loading.current) {
|
|
514
|
+
let file = await saveAsBase64();
|
|
515
|
+
if (props.valueChangeHandler) {
|
|
516
|
+
props.valueChangeHandler(file);
|
|
517
|
+
}
|
|
518
|
+
loading.current = false;
|
|
303
519
|
}
|
|
520
|
+
currentText.current = extractDocumentText(container.documentEditor.editor);
|
|
304
521
|
});
|
|
305
522
|
container.documentEditor.open(json);
|
|
306
523
|
container.documentEditor.enableTrackChanges = !_Utils.default.isNull(props.trackChanges) ? props.trackChanges : true;
|
|
@@ -308,7 +525,8 @@ const WordDocumentViewer = props => {
|
|
|
308
525
|
}
|
|
309
526
|
}, [json, container]);
|
|
310
527
|
const onToolbarClick = args => {
|
|
311
|
-
|
|
528
|
+
var _container$documentEd;
|
|
529
|
+
const ed = container === null || container === void 0 || (_container$documentEd = container.documentEditor) === null || _container$documentEd === void 0 ? void 0 : _container$documentEd.editor;
|
|
312
530
|
if (!ed) return;
|
|
313
531
|
switch (args.item.id) {
|
|
314
532
|
case 'bullets':
|
|
@@ -338,7 +556,7 @@ const WordDocumentViewer = props => {
|
|
|
338
556
|
style: {
|
|
339
557
|
height: '100%'
|
|
340
558
|
},
|
|
341
|
-
id:
|
|
559
|
+
id: "parent-container",
|
|
342
560
|
ref: ref
|
|
343
561
|
}, !visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
344
562
|
style: {
|
|
@@ -369,7 +587,7 @@ const WordDocumentViewer = props => {
|
|
|
369
587
|
color: 'rgba(255, 255, 255, 0.8)'
|
|
370
588
|
}
|
|
371
589
|
}, errorMessage))), visible && items && (_Utils.default.isNull(props.trackChanges) || props.trackChanges === true) && /*#__PURE__*/_react.default.createElement(_ej2ReactDocumenteditor.DocumentEditorContainerComponent, {
|
|
372
|
-
id:
|
|
590
|
+
id: "".concat(props.id, "-container"),
|
|
373
591
|
height: props.height || '1200px',
|
|
374
592
|
ref: scope => {
|
|
375
593
|
setContainer(scope);
|
|
@@ -386,10 +604,11 @@ const WordDocumentViewer = props => {
|
|
|
386
604
|
restrictEditing: props.readOnly && !props.commentsOnly,
|
|
387
605
|
showPropertiesPane: false,
|
|
388
606
|
enableTrackChanges: true,
|
|
607
|
+
enableAutoFocus: false,
|
|
389
608
|
serviceUrl: DOCSVC,
|
|
390
609
|
enableToolbar: !props.readOnly || props.commentsOnly
|
|
391
610
|
}), visible && items && props.trackChanges === false && /*#__PURE__*/_react.default.createElement(_ej2ReactDocumenteditor.DocumentEditorContainerComponent, {
|
|
392
|
-
id:
|
|
611
|
+
id: "".concat(props.id, "-container"),
|
|
393
612
|
height: props.height || '1200px',
|
|
394
613
|
ref: scope => {
|
|
395
614
|
setContainer(scope);
|
|
@@ -405,6 +624,7 @@ const WordDocumentViewer = props => {
|
|
|
405
624
|
toolbarItems: items,
|
|
406
625
|
restrictEditing: props.readOnly && !props.commentsOnly,
|
|
407
626
|
showPropertiesPane: false,
|
|
627
|
+
enableAutoFocus: false,
|
|
408
628
|
serviceUrl: DOCSVC,
|
|
409
629
|
enableToolbar: !props.readOnly || props.commentsOnly
|
|
410
630
|
}));
|
|
@@ -9,27 +9,30 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _styles = require("@mui/styles");
|
|
11
11
|
var _cardStyle = _interopRequireDefault(require("../../assets/jss/components/cardStyle"));
|
|
12
|
+
const _excluded = ["className", "children", "plain", "profile", "blog", "raised", "background", "pricing", "color", "product", "testimonial", "chart", "login"];
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
14
17
|
const useStyles = (0, _styles.makeStyles)(_cardStyle.default);
|
|
15
18
|
function Card(props) {
|
|
16
19
|
const classes = useStyles();
|
|
17
20
|
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
plain,
|
|
24
|
+
profile,
|
|
25
|
+
blog,
|
|
26
|
+
raised,
|
|
27
|
+
background,
|
|
28
|
+
pricing,
|
|
29
|
+
color,
|
|
30
|
+
product,
|
|
31
|
+
testimonial,
|
|
32
|
+
chart,
|
|
33
|
+
login
|
|
34
|
+
} = props,
|
|
35
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
33
36
|
const cardClasses = (0, _classnames.default)({
|
|
34
37
|
[classes.card]: true,
|
|
35
38
|
[classes.cardPlain]: plain,
|
|
@@ -9,20 +9,23 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _styles = require("@mui/styles");
|
|
11
11
|
var _cardAvatarStyle = _interopRequireDefault(require("../../assets/jss/components/cardAvatarStyle"));
|
|
12
|
+
const _excluded = ["children", "className", "plain", "profile", "testimonial", "testimonialFooter"];
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
14
17
|
const useStyles = (0, _styles.makeStyles)(_cardAvatarStyle.default);
|
|
15
18
|
function CardAvatar(props) {
|
|
16
19
|
const classes = useStyles();
|
|
17
20
|
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
children,
|
|
22
|
+
className,
|
|
23
|
+
plain,
|
|
24
|
+
profile,
|
|
25
|
+
testimonial,
|
|
26
|
+
testimonialFooter
|
|
27
|
+
} = props,
|
|
28
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
26
29
|
const cardAvatarClasses = (0, _classnames.default)({
|
|
27
30
|
[classes.cardAvatar]: true,
|
|
28
31
|
[classes.cardAvatarProfile]: profile,
|