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