@emailmaker/filemanager 0.10.94 → 0.10.95

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/file-manager.css CHANGED
@@ -1,145 +1,3 @@
1
- @charset "UTF-8";
2
- .em-filemanager .root {
3
- padding: 16px 20px 24px;
4
- max-width: 520px;
5
- }
6
-
7
- .em-filemanager .controls {
8
- display: flex;
9
- flex-direction: column;
10
- gap: 20px;
11
- }
12
-
13
- .em-filemanager .segmentedControl {
14
- background-color: var(--ant-color-fill-secondary, rgba(0, 0, 0, 0.06));
15
- padding: 4px;
16
- }
17
-
18
- .em-filemanager .sizeRow {
19
- display: grid;
20
- grid-template-columns: 1fr 1fr;
21
- gap: 16px 24px;
22
- align-items: center;
23
- width: 100%;
24
- }
25
-
26
- .em-filemanager .sizeRowLabel {
27
- margin: 0;
28
- }
29
-
30
- /** InputNumber с prefix / suffix — ширина блока значения */
31
- .em-filemanager .sizeInputNumber {
32
- width: 100%;
33
- }
34
-
35
- .em-filemanager .sizeSuffix {
36
- color: var(--ant-color-text-tertiary, rgba(0, 0, 0, 0.45));
37
- font-size: 13px;
38
- line-height: 1;
39
- -webkit-user-select: none;
40
- user-select: none;
41
- }
42
-
43
- .em-filemanager .colorGrid {
44
- display: grid;
45
- grid-template-columns: 1fr 1fr;
46
- gap: 16px 24px;
47
- }
48
-
49
- .em-filemanager .colorCell {
50
- display: flex;
51
- flex-direction: column;
52
- align-items: stretch;
53
- gap: 8px;
54
- min-width: 0;
55
- }
56
-
57
- .em-filemanager .colorCellLabel {
58
- margin: 0 !important;
59
- white-space: nowrap;
60
- }
61
-
62
- .em-filemanager .colorPickerFull {
63
- width: 100%;
64
- justify-content: flex-start;
65
- }
66
-
67
- .em-filemanager .bgExtras {
68
- grid-column: 1/-1;
69
- margin-top: -8px;
70
- display: flex;
71
- flex-direction: column;
72
- gap: 12px;
73
- }
74
-
75
- .em-filemanager .bgWarning {
76
- margin: 0;
77
- }
78
-
79
- .em-filemanager .previewSection {
80
- display: flex;
81
- flex-direction: column;
82
- gap: 12px;
83
- }
84
-
85
- .em-filemanager .previewTitle {
86
- font-size: 14px;
87
- font-weight: 600;
88
- }
89
-
90
- .em-filemanager .previewWrap {
91
- display: flex;
92
- justify-content: center;
93
- align-items: center;
94
- min-height: 220px;
95
- padding: 16px;
96
- border: 1px solid var(--ant-color-border-secondary, #f0f0f0);
97
- border-radius: 8px;
98
- background-color: var(--ant-color-fill-quaternary, #fafafa);
99
- background-image: linear-gradient(45deg, #e8e8e8 25%, transparent 25%), linear-gradient(-45deg, #e8e8e8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8e8e8 75%), linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
100
- background-size: 16px 16px;
101
- background-position: 0 0, 0 8px, 8px -8px, -8px 0;
102
- position: relative;
103
- overflow: hidden;
104
- }
105
-
106
- .em-filemanager .scanLine {
107
- position: absolute;
108
- top: 50%;
109
- left: 20%;
110
- right: 20%;
111
- height: 2px;
112
- background-color: #ff4d4f;
113
- box-shadow: 0 0 6px #ff4d4f;
114
- z-index: 10;
115
- pointer-events: none;
116
- }
117
-
118
- .em-filemanager .scanLineBarcode {
119
- left: 10%;
120
- right: 10%;
121
- }
122
-
123
- .em-filemanager .previewWrapBarcode {
124
- min-height: 104px;
125
- padding: 12px 16px;
126
- }
127
-
128
- .em-filemanager .previewCanvas {
129
- display: block;
130
- max-width: 100%;
131
- height: auto;
132
- background: transparent;
133
- }
134
-
135
- .em-filemanager .previewCanvasBarcode {
136
- max-height: 120px;
137
- width: auto;
138
- }
139
-
140
- .em-filemanager .actions {
141
- margin-top: 8px;
142
- }
143
1
  .em-filemanager .iconsTab {
144
2
  display: flex;
145
3
  flex-direction: column;
@@ -576,6 +434,148 @@
576
434
  background: rgba(255, 255, 255, 0.6);
577
435
  pointer-events: all;
578
436
  }
437
+ @charset "UTF-8";
438
+ .em-filemanager .root {
439
+ padding: 16px 20px 24px;
440
+ max-width: 520px;
441
+ }
442
+
443
+ .em-filemanager .controls {
444
+ display: flex;
445
+ flex-direction: column;
446
+ gap: 20px;
447
+ }
448
+
449
+ .em-filemanager .segmentedControl {
450
+ background-color: var(--ant-color-fill-secondary, rgba(0, 0, 0, 0.06));
451
+ padding: 4px;
452
+ }
453
+
454
+ .em-filemanager .sizeRow {
455
+ display: grid;
456
+ grid-template-columns: 1fr 1fr;
457
+ gap: 16px 24px;
458
+ align-items: center;
459
+ width: 100%;
460
+ }
461
+
462
+ .em-filemanager .sizeRowLabel {
463
+ margin: 0;
464
+ }
465
+
466
+ /** InputNumber с prefix / suffix — ширина блока значения */
467
+ .em-filemanager .sizeInputNumber {
468
+ width: 100%;
469
+ }
470
+
471
+ .em-filemanager .sizeSuffix {
472
+ color: var(--ant-color-text-tertiary, rgba(0, 0, 0, 0.45));
473
+ font-size: 13px;
474
+ line-height: 1;
475
+ -webkit-user-select: none;
476
+ user-select: none;
477
+ }
478
+
479
+ .em-filemanager .colorGrid {
480
+ display: grid;
481
+ grid-template-columns: 1fr 1fr;
482
+ gap: 16px 24px;
483
+ }
484
+
485
+ .em-filemanager .colorCell {
486
+ display: flex;
487
+ flex-direction: column;
488
+ align-items: stretch;
489
+ gap: 8px;
490
+ min-width: 0;
491
+ }
492
+
493
+ .em-filemanager .colorCellLabel {
494
+ margin: 0 !important;
495
+ white-space: nowrap;
496
+ }
497
+
498
+ .em-filemanager .colorPickerFull {
499
+ width: 100%;
500
+ justify-content: flex-start;
501
+ }
502
+
503
+ .em-filemanager .bgExtras {
504
+ grid-column: 1/-1;
505
+ margin-top: -8px;
506
+ display: flex;
507
+ flex-direction: column;
508
+ gap: 12px;
509
+ }
510
+
511
+ .em-filemanager .bgWarning {
512
+ margin: 0;
513
+ }
514
+
515
+ .em-filemanager .previewSection {
516
+ display: flex;
517
+ flex-direction: column;
518
+ gap: 12px;
519
+ }
520
+
521
+ .em-filemanager .previewTitle {
522
+ font-size: 14px;
523
+ font-weight: 600;
524
+ }
525
+
526
+ .em-filemanager .previewWrap {
527
+ display: flex;
528
+ justify-content: center;
529
+ align-items: center;
530
+ min-height: 220px;
531
+ padding: 16px;
532
+ border: 1px solid var(--ant-color-border-secondary, #f0f0f0);
533
+ border-radius: 8px;
534
+ background-color: var(--ant-color-fill-quaternary, #fafafa);
535
+ background-image: linear-gradient(45deg, #e8e8e8 25%, transparent 25%), linear-gradient(-45deg, #e8e8e8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8e8e8 75%), linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
536
+ background-size: 16px 16px;
537
+ background-position: 0 0, 0 8px, 8px -8px, -8px 0;
538
+ position: relative;
539
+ overflow: hidden;
540
+ }
541
+
542
+ .em-filemanager .scanLine {
543
+ position: absolute;
544
+ top: 50%;
545
+ left: 20%;
546
+ right: 20%;
547
+ height: 2px;
548
+ background-color: #ff4d4f;
549
+ box-shadow: 0 0 6px #ff4d4f;
550
+ z-index: 10;
551
+ pointer-events: none;
552
+ }
553
+
554
+ .em-filemanager .scanLineBarcode {
555
+ left: 10%;
556
+ right: 10%;
557
+ }
558
+
559
+ .em-filemanager .previewWrapBarcode {
560
+ min-height: 104px;
561
+ padding: 12px 16px;
562
+ }
563
+
564
+ .em-filemanager .previewCanvas {
565
+ display: block;
566
+ max-width: 100%;
567
+ height: auto;
568
+ background: transparent;
569
+ }
570
+
571
+ .em-filemanager .previewCanvasBarcode {
572
+ max-height: 120px;
573
+ width: auto;
574
+ }
575
+
576
+ .em-filemanager .actions {
577
+ margin-top: 8px;
578
+ }
579
579
  .em-filemanager .noFilesContainer {
580
580
  text-align: center;
581
581
  }
@@ -1,2 +1,2 @@
1
- export{$ as DEFAULT_FILE_MANAGER_CACHE_TTL_MS,a1 as DataSourceProxyBase,L as FailedRequestCache,A as FileContent,G as FileManagerApiError,z as FileManagerApp,t as FileManagerAppWithContext,B as FileModals,C as FolderSidebar,M as MutationRegistry,a2 as PathAwareStorageAdapter,P as PixieOnlyApp,V as TRASH_FOLDER_ID,Z as TreeCache,_ as ViewCacheManager,I as buildAssetsPath,O as compareFileSystemItems,W as createSystemFolderByPathResolver,y as default,Q as defaultChildrenViewFilterMatch,R as defaultFileSystemItemComparator,a0 as defaultIsFolderNotFoundError,a3 as fetchRemoteImageBlobByUrl,K as getAssetsBase,X as getTrashFolderLookupCandidates,q as init,x as initFileManager,v as initPixieEditor,D as installResizeObserverErrorHandler,J as joinUrls,H as mapHttpStatusToErrorCode,S as matchesChildrenViewFilter,Y as normalizeSystemFolderPath,T as resolveSortParams,U as resolveViewStrategyOptions,E as uninstallResizeObserverErrorHandler,s as unmount,w as unmountPixieEditor}from"./file-manager-index-CkVS948A.js";import"react/jsx-runtime";import"react";import"react-dom/client";import"antd";import"@ant-design/icons";import"@ant-design/cssinjs";import"react-dom";import"@untitledui/icons";import"browser-image-compression";import"pixie";
1
+ export{$ as DEFAULT_FILE_MANAGER_CACHE_TTL_MS,a1 as DataSourceProxyBase,L as FailedRequestCache,A as FileContent,G as FileManagerApiError,z as FileManagerApp,t as FileManagerAppWithContext,B as FileModals,C as FolderSidebar,M as MutationRegistry,a2 as PathAwareStorageAdapter,P as PixieOnlyApp,V as TRASH_FOLDER_ID,Z as TreeCache,_ as ViewCacheManager,I as buildAssetsPath,O as compareFileSystemItems,W as createSystemFolderByPathResolver,y as default,Q as defaultChildrenViewFilterMatch,R as defaultFileSystemItemComparator,a0 as defaultIsFolderNotFoundError,a3 as fetchRemoteImageBlobByUrl,K as getAssetsBase,X as getTrashFolderLookupCandidates,q as init,x as initFileManager,v as initPixieEditor,D as installResizeObserverErrorHandler,J as joinUrls,H as mapHttpStatusToErrorCode,S as matchesChildrenViewFilter,Y as normalizeSystemFolderPath,T as resolveSortParams,U as resolveViewStrategyOptions,E as uninstallResizeObserverErrorHandler,s as unmount,w as unmountPixieEditor}from"./file-manager-index-Bi21dmKL.js";import"react/jsx-runtime";import"react";import"react-dom/client";import"antd";import"@ant-design/icons";import"@ant-design/cssinjs";import"react-dom";import"@untitledui/icons";import"browser-image-compression";import"pixie";
2
2
  //# sourceMappingURL=file-manager.esm.js.map
package/file-manager.js CHANGED
@@ -41491,6 +41491,10 @@ class TreeCache_TreeCache {
41491
41491
  this.invalidateChildrenCountCache(folderId);
41492
41492
  }
41493
41493
  }
41494
+ /** Сбрасывает закэшированные листинги папки, даже если entity папки ещё нет в графе. */
41495
+ invalidateListingViews(folderId) {
41496
+ this.views.forceInvalidateChildrenViews(folderId !== null && folderId !== void 0 ? folderId : null);
41497
+ }
41494
41498
  getChildrenIds(parentId) {
41495
41499
  return this.entities.getChildrenIds(parentId);
41496
41500
  }
@@ -41829,9 +41833,6 @@ class DataSourceProxyBase {
41829
41833
  return this._cache.getEntity(itemId);
41830
41834
  },
41831
41835
  });
41832
- if (typeof this._dataProvider.clearCache !== 'function') {
41833
- this.clearCache = undefined;
41834
- }
41835
41836
  // Bind all prototype methods to this instance (replaces @BindMethods decorator)
41836
41837
  const proto = Object.getPrototypeOf(this);
41837
41838
  for (const name of Object.getOwnPropertyNames(proto)) {
@@ -41848,11 +41849,13 @@ class DataSourceProxyBase {
41848
41849
  }
41849
41850
  }
41850
41851
  async clearCache(pathFolder) {
41851
- if (typeof this._dataProvider.clearCache !== 'function') {
41852
- throw new FileManagerApiError('Clear cache is not supported by data provider', 'UnsupportedOperation');
41852
+ const folderId = pathFolder !== null && pathFolder !== void 0 ? pathFolder : this._rootId;
41853
+ this._cache.forceInvalidate(folderId);
41854
+ // Корневой листинг может жить в views без entity в графе (пустой ответ при indexing).
41855
+ this._cache.invalidateListingViews(folderId);
41856
+ if (typeof this._dataProvider.clearCache === 'function') {
41857
+ await this._dataProvider.clearCache(pathFolder);
41853
41858
  }
41854
- this._cache.forceInvalidate(this._rootId);
41855
- await this._dataProvider.clearCache(pathFolder);
41856
41859
  }
41857
41860
  /**
41858
41861
  * After save/overwrite, the next `getFileData` for this file id will use `forceReload` (HTTP no-store).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.94",
3
+ "version": "0.10.95",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",