@gisce/react-ooui 1.4.15 → 1.4.16
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/package.json
CHANGED
|
@@ -287,89 +287,84 @@ function TreeActionBar(props: Props) {
|
|
|
287
287
|
}}
|
|
288
288
|
/>
|
|
289
289
|
|
|
290
|
-
{
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
<
|
|
294
|
-
|
|
295
|
-
<
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
if (itemClicked.id === "print_screen") {
|
|
330
|
-
let idsToExport =
|
|
331
|
-
selectedRowItems?.map((item) => item.id) || [];
|
|
290
|
+
{separator()}
|
|
291
|
+
<DropdownButton
|
|
292
|
+
icon={
|
|
293
|
+
<Icon
|
|
294
|
+
component={() => (
|
|
295
|
+
<svg
|
|
296
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
297
|
+
className="icon icon-tabler icon-tabler-database-export"
|
|
298
|
+
width="1em"
|
|
299
|
+
height="1em"
|
|
300
|
+
viewBox="0 0 24 24"
|
|
301
|
+
strokeWidth="1.5"
|
|
302
|
+
fill="none"
|
|
303
|
+
stroke="currentColor"
|
|
304
|
+
strokeLinecap="round"
|
|
305
|
+
strokeLinejoin="round"
|
|
306
|
+
>
|
|
307
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
308
|
+
<ellipse cx="12" cy="6" rx="8" ry="3" />
|
|
309
|
+
<path d="M4 6v6c0 1.657 3.582 3 8 3a19.84 19.84 0 0 0 3.302 -.267m4.698 -2.733v-6" />
|
|
310
|
+
<path d="M4 12v6c0 1.599 3.335 2.905 7.538 2.995m8.462 -6.995v-2m-6 7h7m-3 -3l3 3l-3 3" />
|
|
311
|
+
</svg>
|
|
312
|
+
)}
|
|
313
|
+
/>
|
|
314
|
+
}
|
|
315
|
+
tooltip={t("export")}
|
|
316
|
+
items={[
|
|
317
|
+
{
|
|
318
|
+
id: "print_screen",
|
|
319
|
+
name: t("printScreen"),
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: "export",
|
|
323
|
+
name: t("advancedExport"),
|
|
324
|
+
},
|
|
325
|
+
]}
|
|
326
|
+
onItemClick={(itemClicked: any) => {
|
|
327
|
+
if (itemClicked.id === "print_screen") {
|
|
328
|
+
let idsToExport = selectedRowItems?.map((item) => item.id) || [];
|
|
332
329
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
330
|
+
if (idsToExport.length === 0) {
|
|
331
|
+
idsToExport = results?.map((item) => item.id) || [];
|
|
332
|
+
}
|
|
336
333
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
334
|
+
runAction({
|
|
335
|
+
id: -1,
|
|
336
|
+
model: currentModel,
|
|
337
|
+
report_name: "printscreen.list",
|
|
338
|
+
type: "ir.actions.report.xml",
|
|
339
|
+
datas: {
|
|
340
|
+
model: currentModel,
|
|
341
|
+
ids: idsToExport,
|
|
342
|
+
},
|
|
343
|
+
});
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
349
346
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
</>
|
|
372
|
-
)}
|
|
347
|
+
setExportModalVisible(true);
|
|
348
|
+
}}
|
|
349
|
+
disabled={
|
|
350
|
+
duplicatingItem || removingItem || treeIsLoading || hasNameSearch
|
|
351
|
+
}
|
|
352
|
+
/>
|
|
353
|
+
<ExportModal
|
|
354
|
+
visible={exportModalVisible}
|
|
355
|
+
locale={lang}
|
|
356
|
+
onClose={() => setExportModalVisible(false)}
|
|
357
|
+
model={currentModel!}
|
|
358
|
+
domain={mergeParams(
|
|
359
|
+
searchTreeRef?.current?.getDomain() || [],
|
|
360
|
+
searchParams || []
|
|
361
|
+
)}
|
|
362
|
+
limit={limit}
|
|
363
|
+
totalRegisters={totalItems || 0}
|
|
364
|
+
selectedRegistersToExport={selectedRowItems}
|
|
365
|
+
visibleRegisters={results?.length || 0}
|
|
366
|
+
context={parentContext}
|
|
367
|
+
/>
|
|
373
368
|
</Space>
|
|
374
369
|
);
|
|
375
370
|
}
|