@scaleflex/widget-provider-views 0.0.1

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +8103 -0
  2. package/LICENSE +21 -0
  3. package/README.md +44 -0
  4. package/dist/style.css +671 -0
  5. package/dist/style.min.css +1 -0
  6. package/lib/ProviderViews.Styled.js +22 -0
  7. package/lib/components/AuthView.js +35 -0
  8. package/lib/components/AuthView.styled.js +21 -0
  9. package/lib/components/Browser.js +58 -0
  10. package/lib/components/Items/AssetsSection/AssetsSectionTableHeader.js +41 -0
  11. package/lib/components/Items/AssetsSection/AssetsSectionTableRow.js +147 -0
  12. package/lib/components/Items/AssetsSection/index.js +65 -0
  13. package/lib/components/Items/FoldersSection/FoldersSectionTableHeader.js +41 -0
  14. package/lib/components/Items/FoldersSection/FoldersSectionTableRow.js +102 -0
  15. package/lib/components/Items/FoldersSection/index.js +64 -0
  16. package/lib/components/Items/Items.styled.js +156 -0
  17. package/lib/components/Items/List.js +96 -0
  18. package/lib/components/Items/index.js +172 -0
  19. package/lib/components/SearchProviderView/FooterActions.js +25 -0
  20. package/lib/components/SearchProviderView/SearchFilterInput.js +76 -0
  21. package/lib/components/SearchProviderView/SearchProviderBrowser.js +74 -0
  22. package/lib/components/SearchProviderView/SearchProviderBrowser.styled.js +65 -0
  23. package/lib/components/SearchProviderView/SearchProviderView.js +248 -0
  24. package/lib/components/SearchProviderView/index.js +1 -0
  25. package/lib/context/index.js +2 -0
  26. package/lib/hooks/useBrowserContext.js +5 -0
  27. package/lib/index.js +850 -0
  28. package/lib/style/filerobot-ProviderBrowser-layoutType--grid.scss +233 -0
  29. package/lib/style/filerobot-ProviderBrowser-layoutType--list.scss +190 -0
  30. package/lib/style/filerobot-ProviderBrowserItem-details.scss +207 -0
  31. package/lib/style.scss +309 -0
  32. package/lib/utils/View.js +219 -0
  33. package/lib/utils/remoteFileObjToLocal.js +13 -0
  34. package/package.json +36 -0
  35. package/types/index.d.ts +28 -0
@@ -0,0 +1,233 @@
1
+ // ***
2
+ // View type: grid
3
+ // ***
4
+ .filerobot-ProviderBrowser-layoutType--grid {
5
+ ul.filerobot-ProviderBrowser-list {
6
+ &::after {
7
+ content: '';
8
+ flex: auto;
9
+ }
10
+
11
+ &:focus {
12
+ outline: none;
13
+ }
14
+ }
15
+
16
+ .filerobot-Provider-ItemCategory {
17
+ &-header {
18
+ display: flex;
19
+ align-items: center;
20
+ font-weight: 400;
21
+ width: 100%;
22
+ max-width: 130px;
23
+ padding: 0 12px;
24
+ margin-top: 12px;
25
+ cursor: pointer;
26
+ font-size: 12px;
27
+ }
28
+
29
+ &-wrapper {
30
+ padding: 8px 24px 12px;
31
+
32
+ &-list {
33
+ list-style: none;
34
+ padding: 0;
35
+ width: 100%;
36
+ display: grid;
37
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
38
+ }
39
+ }
40
+ }
41
+
42
+ li.filerobot-ProviderBrowserItem {
43
+ min-width: 200px;
44
+ position: relative;
45
+ margin: 0;
46
+
47
+ &::before {
48
+ content: '';
49
+ padding-top: 88%;
50
+ display: block;
51
+ }
52
+
53
+ &--selected.item-folder,
54
+ &.item-folder:hover {
55
+ .filerobot-ProviderBrowserItem-folderSelectBox {
56
+ display: flex;
57
+ }
58
+ }
59
+
60
+ &:not(.filerobot-ProviderBrowserItem--beingRenamed):hover {
61
+ .filerobot-Explorer-dots-menu-icon {
62
+ display: block;
63
+ }
64
+ }
65
+
66
+ &:not(.item-folder) {
67
+ outline: none;
68
+ border: 4px solid transparent;
69
+
70
+ [data-filerobot-theme="dark"] & {
71
+ border: 4px solid $black;
72
+ background-color: $primary;
73
+
74
+ &:hover *,
75
+ &:focus * {
76
+ color: $black;
77
+ }
78
+ }
79
+
80
+ &.no-selection {
81
+ .filerobot-ProviderBrowserItem-inner {
82
+ cursor: auto;
83
+ }
84
+ }
85
+
86
+ &:not(.no-selection) {
87
+ .filerobot-ProviderBrowserItem-inner:hover {
88
+ background-color: $hover;
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ .filerobot-ProviderBrowserItem-videoDuration {
95
+ position: absolute;
96
+ bottom: 33%;
97
+ z-index: 2;
98
+ background: rgba(79, 98, 118, 0.7);
99
+ border-radius: 2px;
100
+ left: 16px;
101
+ padding: 2px 4px;
102
+ text-align: center;
103
+ font-weight: 500;
104
+ line-height: 12px;
105
+ font-size: 11px;
106
+ box-shadow: 0px 1px 2px 0px rgba(77, 78, 78, 0.15);
107
+ color: #fff !important;
108
+ }
109
+
110
+ li.filerobot-ProviderBrowserItem--selected {
111
+ .filerobot-ProviderBrowserItem-inner {
112
+ background-color: $active !important;
113
+
114
+ * {
115
+ fill: $white;
116
+ color: $white;
117
+ }
118
+ }
119
+
120
+ // As with-meta is related to the explorer only so that the styles would be applied to the explorer cards only.
121
+ &.with-meta {
122
+ input {
123
+ text-align: center;
124
+ color: #000 !important;
125
+ margin-top: 4px;
126
+ margin-bottom: -1px;
127
+ }
128
+
129
+ button.filerobot-ProviderBrowserItem-inner {
130
+ &:focus {
131
+ box-shadow: none !important;
132
+ }
133
+ }
134
+ }
135
+
136
+ .filerobot-Explorer-Item-fileInfoAndButtons {
137
+ background-color: inherit;
138
+ }
139
+ }
140
+
141
+ li.filerobot-ProviderBrowserItem--noPreview {
142
+ .filerobot-ProviderBrowserItem-inner {
143
+ background-color: rgba($gray-500, 0.2);
144
+
145
+ [data-filerobot-theme="dark"] & {
146
+ background-color: rgba($gray-200, 0.2);
147
+ }
148
+ }
149
+
150
+ svg {
151
+ fill: rgba($black, 0.7);
152
+ width: 30%;
153
+ height: 30%;
154
+
155
+ [data-filerobot-theme="dark"] & {
156
+ fill: rgba($white, 0.8);
157
+ }
158
+ }
159
+ }
160
+
161
+ // button with a large picture
162
+ button.filerobot-ProviderBrowserItem-inner {
163
+ overflow: hidden;
164
+ position: absolute;
165
+ text-align: center;
166
+ top: 0;
167
+ left: 0;
168
+ width: 100%;
169
+ height: 100%;
170
+ border-radius: 2px;
171
+ box-shadow: 0px 1px 2px 0px rgba(77, 78, 78, 0.15);
172
+ background-color: $hover;
173
+
174
+ &:focus {
175
+ outline: none;
176
+ }
177
+
178
+ &.with-meta {
179
+ display: flex;
180
+ flex-direction: column-reverse;
181
+ align-items: center;
182
+ justify-content: flex-end;
183
+
184
+ &:focus {
185
+ box-shadow: none;
186
+ }
187
+
188
+ img {
189
+ object-fit: contain;
190
+ width: 100%;
191
+ height: 100%;
192
+ max-width: 100%;
193
+ max-height: 100%;
194
+ }
195
+ }
196
+ }
197
+
198
+ // Checkbox
199
+ .filerobot-ProviderBrowserItem-fakeCheckbox {
200
+ display: none;
201
+ position: absolute;
202
+ z-index: 3;
203
+ top: 8px;
204
+ left: 8px;
205
+ }
206
+
207
+ .filerobot-ProviderBrowserItem-folderSelectBox {
208
+ top: 26px;
209
+ left: 14px;
210
+ position: absolute;
211
+ display: none;
212
+ }
213
+ }
214
+
215
+ .filerobot-ProviderBrowserItem--selected {
216
+ .filerobot-ProviderBrowserItem-fakeCheckbox {
217
+ display: block;
218
+ }
219
+ }
220
+
221
+ .filerobot-ProviderBrowserItem-fakeCheckbox {
222
+ *:hover>& {
223
+ display: block;
224
+ }
225
+ }
226
+
227
+
228
+ .filerobot-Dragging-folders,
229
+ .filerobot-Dragging-files {
230
+ &>* {
231
+ pointer-events: none;
232
+ }
233
+ }
@@ -0,0 +1,190 @@
1
+ // ***
2
+ // View type: list
3
+ // ***
4
+
5
+ .filerobot-ProviderBrowser-layoutType--list,
6
+ .filerobot-ProviderBrowser-layoutType--tiles {
7
+ background-color: $white;
8
+
9
+ [data-filerobot-theme="dark"] & {
10
+ background-color: $gray-900;
11
+ }
12
+
13
+ .filerobot-Provider-list-cell {
14
+ text-overflow: ellipsis;
15
+ white-space: nowrap;
16
+ overflow: hidden;
17
+ white-space: nowrap;
18
+ text-align: left;
19
+ cursor: pointer;
20
+ font-size: 14px;
21
+ flex: 0.5 0;
22
+
23
+ &-cursor-default {
24
+ cursor: default !important;
25
+ }
26
+ }
27
+
28
+ .filerobot-Provider-list-cell-icon {
29
+ max-width: 24px;
30
+ min-width: 20px;
31
+ }
32
+
33
+ .filerobot-Provider-list-firstColumn {
34
+ display: flex;
35
+ align-items: center;
36
+ flex: 1 0;
37
+
38
+ input, label {
39
+ width: 80%;
40
+ }
41
+
42
+ label {
43
+ text-overflow: ellipsis;
44
+ white-space: nowrap;
45
+ overflow: hidden;
46
+ }
47
+ }
48
+ .filerobot-ProviderBrowser-list { outline: none; }
49
+
50
+ li.filerobot-ProviderBrowserItem {
51
+ outline: none;
52
+ display: flex;
53
+ align-items: center;
54
+ padding: 11px 12px;
55
+ margin: 0;
56
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
57
+
58
+ [data-filerobot-theme="dark"] & {
59
+ color: $gray-200;
60
+ }
61
+ }
62
+
63
+ .filerobot-ProviderBrowser-body {
64
+ width: 100%;
65
+ overflow-x: auto;
66
+ }
67
+
68
+ .filerobot-Provider-ItemCategory {
69
+ &-header {
70
+ text-overflow: ellipsis;
71
+ white-space: nowrap;
72
+ overflow: hidden;
73
+ display: flex;
74
+ align-items: center;
75
+ text-align: left;
76
+ padding: 12px;
77
+ font-weight: 400;
78
+ font-size: 14px;
79
+ line-height: 16px;
80
+ border-bottom: 1.5px solid rgba(0, 0, 0, 0.07);
81
+ position: sticky;
82
+ top: -1px;
83
+ background-color: #fff;
84
+ z-index: 11;
85
+
86
+ &:last-child {
87
+ margin-right: 0;
88
+ }
89
+
90
+ .filerobot-c-icon {
91
+ vertical-align: middle;
92
+ }
93
+ }
94
+
95
+ &-wrapper-list {
96
+ padding: 0;
97
+ }
98
+ }
99
+
100
+
101
+ // Checkbox
102
+ .filerobot-ProviderBrowserItem-fakeCheckbox {
103
+ margin-right: 8px;
104
+ vertical-align: middle;
105
+ }
106
+
107
+ // Either a <label/> for a file,
108
+ // or a <button/> we can click on for a folder
109
+ .filerobot-ProviderBrowserItem {
110
+ &-inner {
111
+ text-overflow: ellipsis;
112
+ white-space: nowrap;
113
+ overflow: hidden;
114
+ display: flex;
115
+ align-items: center;
116
+ width: 100%;
117
+ line-height: 1.3;
118
+ outline: none;
119
+
120
+ input {
121
+ height: 17px;
122
+ }
123
+
124
+ img, svg {
125
+ max-width: 20px;
126
+ // min-width: 20px;
127
+ max-height: 20px;
128
+ }
129
+ }
130
+
131
+ color: $primary;
132
+
133
+ &--selected {
134
+ background: $active;
135
+ color: $white;
136
+ border-bottom: 1px solid $border!important;
137
+
138
+ svg path {
139
+ fill: $border;
140
+ }
141
+ }
142
+
143
+ }
144
+
145
+ .filerobot-Provider-listHead-checkbox {
146
+ min-width: 16px;
147
+ }
148
+ }
149
+
150
+ .filerobot-ProviderBrowser-layoutType--list {
151
+ .filerobot-common-Checkbox {
152
+ margin-right: 8px;
153
+ }
154
+
155
+ .filerobot-Provider-ItemCategory-header {
156
+
157
+ .filerobot-Provider-list-cell-icon {
158
+ display: flex;
159
+ padding-left: 2px;
160
+ }
161
+ }
162
+ }
163
+
164
+ .filerobot-ProviderBrowser-layoutType--tiles {
165
+ .filerobot-Provider-ItemCategory-header {
166
+ padding: 11px 12px;
167
+
168
+ .filerobot-Provider-list-cell-icon {
169
+ display: flex;
170
+ padding-left: 4px;
171
+ margin-left: 4px;
172
+ }
173
+ }
174
+
175
+ li.filerobot-ProviderBrowserItem {
176
+ padding: 11px 12px;
177
+ }
178
+
179
+ .filerobot-Provider-list-cell-icon {
180
+ max-width: 36px;
181
+ min-width: 36px;
182
+ margin-right: 8px;
183
+
184
+ svg:not(.context-menu-icon), img {
185
+ width: 36px;
186
+ max-width: 36px;
187
+ max-height: 36px;
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,207 @@
1
+ // packages/@scaleflex/widget-provider-views/src/components/Details/ProductItem.jsx
2
+ .filerobot-Explorer-Details {
3
+ &-header{
4
+ display: flex;
5
+ align-items: center;
6
+ margin-left: 30px;
7
+ font-size: 12px;
8
+
9
+ &-icon {
10
+ margin-left: 6px;
11
+ }
12
+
13
+ &-title {
14
+ margin-top: 12px;
15
+ display: flex;
16
+ align-items: center;
17
+ max-width: 90%;
18
+
19
+ & label{
20
+ text-overflow: ellipsis;
21
+ white-space: nowrap;
22
+ overflow: hidden;
23
+ }
24
+
25
+ }
26
+ }
27
+ &-tabs{
28
+ display: flex;
29
+ padding: 0 8px;
30
+ margin-top: 8px;
31
+ font-size: 12px;
32
+ cursor: pointer;
33
+
34
+ &-details,
35
+ &-comments {
36
+ display: flex;
37
+ justify-content: center;
38
+ align-items: center;
39
+ width: 50%;
40
+ height: 30px;
41
+ color: $primary;
42
+ border: 1px solid transparent;
43
+ border-top-left-radius: .10rem;
44
+ border-top-right-radius: .10rem;
45
+
46
+ // font-weight: 600;
47
+ & label {
48
+ width: 100%;
49
+ height: 100%;
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ cursor: pointer;
54
+ &:hover {
55
+ // color: $blue;
56
+ margin-bottom: -1px;
57
+ border-bottom: 2px solid #6879EB;
58
+ background-color: $background-primary;
59
+ color:#6879EB;
60
+ }
61
+ }
62
+
63
+ & > input[type="radio"] {
64
+ position: absolute;
65
+ left: -200vw;
66
+ }
67
+ & > input:checked + label {
68
+ // color: $blue;
69
+ margin-bottom: -1px;
70
+ border-bottom: 2px solid #6879EB;
71
+ background-color: $background-primary;
72
+ color:#6879EB;
73
+ }
74
+ }
75
+
76
+ }
77
+ &-icon-preview {
78
+ display: flex;
79
+ justify-content: center;
80
+ margin-top: 8px;
81
+ margin-bottom: 21px;
82
+ }
83
+ &-file-preview {
84
+ margin: 8px 5px 12px 8px;
85
+ height: 146px;
86
+ position: relative;
87
+
88
+ &:hover {
89
+ .filerobot-Explorer-Details-thumbnailZoomOverlay {
90
+ display: flex;
91
+ }
92
+ }
93
+ }
94
+ &-thumbnail {
95
+ position: relative;
96
+ z-index: 1;
97
+ width: 100%;
98
+ height: 100%;
99
+ max-width: 100%;
100
+ max-height: 100%;
101
+ object-fit: contain;
102
+ }
103
+ &-info {
104
+ font-size: 12px;
105
+ margin: 0;
106
+ padding: 0;
107
+ margin-top: 12px;
108
+ padding-left: 12px;
109
+
110
+ &-list {
111
+ display: flex;
112
+ list-style: none;
113
+ margin-bottom: 8px;
114
+
115
+ &-name {
116
+ display: flex;
117
+ font-weight: 400;
118
+ width: 68px;
119
+ padding-right: 2px;
120
+ color: #768184;
121
+
122
+ & > span{
123
+ text-overflow: ellipsis;
124
+ white-space: nowrap;
125
+ overflow: hidden;
126
+ }
127
+ }
128
+
129
+ &-value {
130
+ display: inline-block;
131
+ color: #4D4E4E;
132
+ font-weight: 400;
133
+ width: calc(100% - 68px);
134
+ }
135
+ }
136
+ }
137
+ &-section {
138
+ margin-top: 8px;
139
+ padding-top: 12px;
140
+ margin-right: 12px;
141
+ margin-left: 12px;
142
+ font-size: 12px;
143
+ border-top: 1px solid #DFE7ED;
144
+ &-header {
145
+ display: flex;
146
+ justify-content: space-between;
147
+ align-items: center;
148
+ margin-bottom: 9px;
149
+ padding-right: 5px;
150
+ &-title {
151
+ color: $secondary;
152
+ }
153
+ }
154
+ &-content {
155
+ &-list {
156
+ display: inline-flex;
157
+ -ms-flex-wrap: wrap;
158
+ flex-wrap: wrap;
159
+ margin: 0;
160
+ padding: 0;
161
+ width: 100%;
162
+ list-style: none;
163
+ & li {
164
+ position: relative;
165
+ display: flex;
166
+ align-items: center;
167
+ margin: 0 5px 5px 0;
168
+ padding: 4px 6px;
169
+ border-radius: 2px;
170
+ color: #4D4E4E;
171
+ background: $background-primary;
172
+ font-family: 'Roboto';
173
+ font-weight: 400;
174
+
175
+
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+ .filerobot-Explorer-Details-thumbnailZoomOverlay {
183
+ position: absolute;
184
+ display: none;
185
+ align-items: center;
186
+ justify-content: center;
187
+ width: 100%;
188
+ height: 100%;
189
+ background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.25) 100%);
190
+ user-select: none;
191
+ z-index: 111;
192
+ }
193
+
194
+ .filerobot-Explorer-Details-thumbnailZoomOverlayButton {
195
+ width: 100%;
196
+ height: 100%;
197
+
198
+ &:hover {
199
+ background: transparent !important;
200
+ }
201
+
202
+ &:active {
203
+ &:before {
204
+ opacity: 0.5 !important;
205
+ }
206
+ }
207
+ }