@designcrowd/library.brand-page 5.6.2 → 5.6.3
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/lib/src/clients/user-media-client.d.ts +2 -1
- package/lib/src/clients/user-media-client.js +19 -5
- package/lib/src/css/library.brand-page-brandCrowd.min.css +32 -4
- package/lib/src/css/library.brand-page-brandPage.min.css +32 -4
- package/lib/src/css/library.brand-page-designCom.min.css +32 -4
- package/lib/src/css/library.brand-page-preview.min.css +32 -4
- package/lib/src/index.mjs +8517 -8427
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +4 -0
- package/lib/src/shared/my-uploads/MyMedia.mixin.js +24 -5
- package/lib/src/shared/my-uploads/MyUploads.mixin.js +1 -1
- package/lib/src/shared/my-uploads/models.d.ts +1 -0
- package/package.json +1 -1
- package/src/clients/user-media-client.ts +32 -15
- package/src/shared/my-uploads/MyMedia.mixin.ts +36 -8
- package/src/shared/my-uploads/MyMedia.vue +9 -10
- package/src/shared/my-uploads/MyMediaSelectionItem.vue +137 -0
- package/src/shared/my-uploads/MyUploads.mixin.ts +1 -0
- package/src/shared/my-uploads/models.ts +1 -0
|
@@ -6,11 +6,12 @@ export declare class UserMediaClient {
|
|
|
6
6
|
policyData: PolicyData | null;
|
|
7
7
|
constructor(endpoints: Endpoints);
|
|
8
8
|
getPolicyDataAsync(isPublic: boolean): Promise<PolicyData | null>;
|
|
9
|
-
insertUserMediaAsync(mediaToken: string, name: string, type: string, isPublic: boolean, relatedAssetToken: string | undefined, mediaType: string): Promise<UserMediaItem | undefined>;
|
|
9
|
+
insertUserMediaAsync(mediaToken: string, name: string, type: string, isPublic: boolean, relatedAssetToken: string | undefined, mediaType: string, hasTriggeredProcessing: boolean): Promise<UserMediaItem | undefined>;
|
|
10
10
|
uploadAndInsertMediaByUrlAsync(imageUrl: string, relatedAssetToken: string): Promise<string | undefined>;
|
|
11
11
|
addPolicyToFormDataAndFile(file: MediaFile, formData: FormData): void;
|
|
12
12
|
uploadUserMedia(file: MediaFile): Promise<void>;
|
|
13
13
|
getUserMediaAsync(extensions: string[], isPublic: boolean, mediaType: string): Promise<UserMediaItem[] | undefined>;
|
|
14
|
+
getUserMediaByTokenAsync(mediaToken: string): Promise<UserMediaItem | undefined>;
|
|
14
15
|
deleteUserMediaByUserMediaToken(userMediaToken: string): Promise<boolean>;
|
|
15
16
|
}
|
|
16
17
|
export declare const getInstance: (endpoints: Endpoints) => UserMediaClient;
|
|
@@ -12,7 +12,7 @@ export class UserMediaClient {
|
|
|
12
12
|
return this.policyData;
|
|
13
13
|
}
|
|
14
14
|
try {
|
|
15
|
-
const response = await axios.get(`${this.endpoints.userPolicyDataEndpoint}?isPublic=${isPublic}`);
|
|
15
|
+
const response = await axios.get(`${this.endpoints.userPolicyDataEndpoint}?isPublic=${isPublic}&isUpload=true`);
|
|
16
16
|
if (response.status !== 200) {
|
|
17
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
18
18
|
console.error(`getUserPolicy got response status '${response.status}'`);
|
|
@@ -29,9 +29,12 @@ export class UserMediaClient {
|
|
|
29
29
|
}
|
|
30
30
|
return this.policyData;
|
|
31
31
|
}
|
|
32
|
-
async insertUserMediaAsync(mediaToken, name, type, isPublic, relatedAssetToken, mediaType) {
|
|
32
|
+
async insertUserMediaAsync(mediaToken, name, type, isPublic, relatedAssetToken, mediaType, hasTriggeredProcessing) {
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
34
|
+
const reqUrl = hasTriggeredProcessing
|
|
35
|
+
? `${this.endpoints.createUserMediaEndpoint}/${mediaToken}?hasTriggeredProcessing=${hasTriggeredProcessing}`
|
|
36
|
+
: `${this.endpoints.createUserMediaEndpoint}/${mediaToken}`;
|
|
37
|
+
const response = await axios.put(reqUrl, {
|
|
35
38
|
mediaToken,
|
|
36
39
|
mimeType: type,
|
|
37
40
|
name,
|
|
@@ -67,7 +70,7 @@ export class UserMediaClient {
|
|
|
67
70
|
console.error(e);
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
|
-
const newMedia = await this.insertUserMediaAsync(file.mediaToken, file.name, file.type, true, relatedAssetToken, file.mediaType);
|
|
73
|
+
const newMedia = await this.insertUserMediaAsync(file.mediaToken, file.name, file.type, true, relatedAssetToken, file.mediaType, false);
|
|
71
74
|
return newMedia?.url;
|
|
72
75
|
}
|
|
73
76
|
addPolicyToFormDataAndFile(file, formData) {
|
|
@@ -76,7 +79,7 @@ export class UserMediaClient {
|
|
|
76
79
|
}
|
|
77
80
|
const mediaToken = uuidV4();
|
|
78
81
|
file.mediaToken = mediaToken;
|
|
79
|
-
const key = `${this.policyData.keyPrefix}${file.mediaToken}
|
|
82
|
+
const key = `${this.policyData.keyPrefix}${file.mediaToken}`;
|
|
80
83
|
file.key = key;
|
|
81
84
|
formData.append('key', key);
|
|
82
85
|
formData.append('acl', this.policyData.acl);
|
|
@@ -110,6 +113,17 @@ export class UserMediaClient {
|
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
}
|
|
116
|
+
async getUserMediaByTokenAsync(mediaToken) {
|
|
117
|
+
try {
|
|
118
|
+
const response = await axios.get(`${this.endpoints.getAllUserMediaEndpoint}/${mediaToken}?isPublic=true`);
|
|
119
|
+
return response.data;
|
|
120
|
+
}
|
|
121
|
+
catch (e) {
|
|
122
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
123
|
+
console.error(e);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
113
127
|
async deleteUserMediaByUserMediaToken(userMediaToken) {
|
|
114
128
|
try {
|
|
115
129
|
const result = await axios.delete(`${this.endpoints.deleteUserMediaEndpoint}/${userMediaToken}`);
|
|
@@ -7930,11 +7930,39 @@ body {
|
|
|
7930
7930
|
border-bottom: 6px solid #be2626;
|
|
7931
7931
|
}
|
|
7932
7932
|
|
|
7933
|
-
.c-media-
|
|
7933
|
+
.c-media-btn__img[data-v-144c5c39] {
|
|
7934
|
+
border-radius: 0.375rem;
|
|
7935
|
+
-o-object-fit: cover;
|
|
7936
|
+
object-fit: cover;
|
|
7937
|
+
-webkit-transition-property: -webkit-box-shadow;
|
|
7938
|
+
transition-property: -webkit-box-shadow;
|
|
7939
|
+
transition-property: box-shadow;
|
|
7940
|
+
transition-property: box-shadow, -webkit-box-shadow;
|
|
7941
|
+
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
7942
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
7943
|
+
-webkit-transition-duration: 200ms;
|
|
7944
|
+
transition-duration: 200ms;
|
|
7945
|
+
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7946
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7947
|
+
width: 100%;
|
|
7948
|
+
height: 100%;
|
|
7949
|
+
}
|
|
7950
|
+
.c-media-btn__img[data-v-144c5c39]:hover {
|
|
7951
|
+
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7952
|
+
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7953
|
+
}
|
|
7954
|
+
.tw-w-full[data-v-144c5c39] {
|
|
7955
|
+
width: 100%;
|
|
7956
|
+
}
|
|
7957
|
+
.tw-h-full[data-v-144c5c39] {
|
|
7958
|
+
height: 100%;
|
|
7959
|
+
}
|
|
7960
|
+
|
|
7961
|
+
.c-media-btn[data-v-4e32152a] {
|
|
7934
7962
|
width: 100%;
|
|
7935
7963
|
aspect-ratio: 1.2;
|
|
7936
7964
|
}
|
|
7937
|
-
.c-media-btn__img[data-v-
|
|
7965
|
+
.c-media-btn__img[data-v-4e32152a] {
|
|
7938
7966
|
height: 100%;
|
|
7939
7967
|
width: 100%;
|
|
7940
7968
|
border-radius: 0.375rem;
|
|
@@ -7951,11 +7979,11 @@ body {
|
|
|
7951
7979
|
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7952
7980
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7953
7981
|
}
|
|
7954
|
-
.c-media-btn:hover .c-media-btn__img[data-v-
|
|
7982
|
+
.c-media-btn:hover .c-media-btn__img[data-v-4e32152a] {
|
|
7955
7983
|
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7956
7984
|
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7957
7985
|
}
|
|
7958
|
-
.tw-bottom-15[data-v-
|
|
7986
|
+
.tw-bottom-15[data-v-4e32152a] {
|
|
7959
7987
|
bottom: 15px;
|
|
7960
7988
|
}
|
|
7961
7989
|
|
|
@@ -8258,11 +8258,39 @@ body {
|
|
|
8258
8258
|
border-bottom: 6px solid #be2626;
|
|
8259
8259
|
}
|
|
8260
8260
|
|
|
8261
|
-
.c-media-
|
|
8261
|
+
.c-media-btn__img[data-v-144c5c39] {
|
|
8262
|
+
border-radius: 0.375rem;
|
|
8263
|
+
-o-object-fit: cover;
|
|
8264
|
+
object-fit: cover;
|
|
8265
|
+
-webkit-transition-property: -webkit-box-shadow;
|
|
8266
|
+
transition-property: -webkit-box-shadow;
|
|
8267
|
+
transition-property: box-shadow;
|
|
8268
|
+
transition-property: box-shadow, -webkit-box-shadow;
|
|
8269
|
+
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
8270
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
8271
|
+
-webkit-transition-duration: 200ms;
|
|
8272
|
+
transition-duration: 200ms;
|
|
8273
|
+
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
8274
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
8275
|
+
width: 100%;
|
|
8276
|
+
height: 100%;
|
|
8277
|
+
}
|
|
8278
|
+
.c-media-btn__img[data-v-144c5c39]:hover {
|
|
8279
|
+
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
8280
|
+
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
8281
|
+
}
|
|
8282
|
+
.tw-w-full[data-v-144c5c39] {
|
|
8283
|
+
width: 100%;
|
|
8284
|
+
}
|
|
8285
|
+
.tw-h-full[data-v-144c5c39] {
|
|
8286
|
+
height: 100%;
|
|
8287
|
+
}
|
|
8288
|
+
|
|
8289
|
+
.c-media-btn[data-v-4e32152a] {
|
|
8262
8290
|
width: 100%;
|
|
8263
8291
|
aspect-ratio: 1.2;
|
|
8264
8292
|
}
|
|
8265
|
-
.c-media-btn__img[data-v-
|
|
8293
|
+
.c-media-btn__img[data-v-4e32152a] {
|
|
8266
8294
|
height: 100%;
|
|
8267
8295
|
width: 100%;
|
|
8268
8296
|
border-radius: 0.375rem;
|
|
@@ -8279,11 +8307,11 @@ body {
|
|
|
8279
8307
|
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
8280
8308
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
8281
8309
|
}
|
|
8282
|
-
.c-media-btn:hover .c-media-btn__img[data-v-
|
|
8310
|
+
.c-media-btn:hover .c-media-btn__img[data-v-4e32152a] {
|
|
8283
8311
|
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
8284
8312
|
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
8285
8313
|
}
|
|
8286
|
-
.tw-bottom-15[data-v-
|
|
8314
|
+
.tw-bottom-15[data-v-4e32152a] {
|
|
8287
8315
|
bottom: 15px;
|
|
8288
8316
|
}
|
|
8289
8317
|
|
|
@@ -7948,11 +7948,39 @@ body {
|
|
|
7948
7948
|
border-bottom: 6px solid #be2626;
|
|
7949
7949
|
}
|
|
7950
7950
|
|
|
7951
|
-
.c-media-
|
|
7951
|
+
.c-media-btn__img[data-v-144c5c39] {
|
|
7952
|
+
border-radius: 0.375rem;
|
|
7953
|
+
-o-object-fit: cover;
|
|
7954
|
+
object-fit: cover;
|
|
7955
|
+
-webkit-transition-property: -webkit-box-shadow;
|
|
7956
|
+
transition-property: -webkit-box-shadow;
|
|
7957
|
+
transition-property: box-shadow;
|
|
7958
|
+
transition-property: box-shadow, -webkit-box-shadow;
|
|
7959
|
+
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
7960
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
7961
|
+
-webkit-transition-duration: 200ms;
|
|
7962
|
+
transition-duration: 200ms;
|
|
7963
|
+
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7964
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7965
|
+
width: 100%;
|
|
7966
|
+
height: 100%;
|
|
7967
|
+
}
|
|
7968
|
+
.c-media-btn__img[data-v-144c5c39]:hover {
|
|
7969
|
+
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7970
|
+
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7971
|
+
}
|
|
7972
|
+
.tw-w-full[data-v-144c5c39] {
|
|
7973
|
+
width: 100%;
|
|
7974
|
+
}
|
|
7975
|
+
.tw-h-full[data-v-144c5c39] {
|
|
7976
|
+
height: 100%;
|
|
7977
|
+
}
|
|
7978
|
+
|
|
7979
|
+
.c-media-btn[data-v-4e32152a] {
|
|
7952
7980
|
width: 100%;
|
|
7953
7981
|
aspect-ratio: 1.2;
|
|
7954
7982
|
}
|
|
7955
|
-
.c-media-btn__img[data-v-
|
|
7983
|
+
.c-media-btn__img[data-v-4e32152a] {
|
|
7956
7984
|
height: 100%;
|
|
7957
7985
|
width: 100%;
|
|
7958
7986
|
border-radius: 0.375rem;
|
|
@@ -7969,11 +7997,11 @@ body {
|
|
|
7969
7997
|
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7970
7998
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7971
7999
|
}
|
|
7972
|
-
.c-media-btn:hover .c-media-btn__img[data-v-
|
|
8000
|
+
.c-media-btn:hover .c-media-btn__img[data-v-4e32152a] {
|
|
7973
8001
|
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7974
8002
|
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7975
8003
|
}
|
|
7976
|
-
.tw-bottom-15[data-v-
|
|
8004
|
+
.tw-bottom-15[data-v-4e32152a] {
|
|
7977
8005
|
bottom: 15px;
|
|
7978
8006
|
}
|
|
7979
8007
|
|
|
@@ -7694,11 +7694,39 @@ to {
|
|
|
7694
7694
|
border-bottom: 6px solid #be2626;
|
|
7695
7695
|
}
|
|
7696
7696
|
|
|
7697
|
-
.bp .c-media-
|
|
7697
|
+
.bp .c-media-btn__img[data-v-144c5c39] {
|
|
7698
|
+
border-radius: 0.375rem;
|
|
7699
|
+
-o-object-fit: cover;
|
|
7700
|
+
object-fit: cover;
|
|
7701
|
+
-webkit-transition-property: -webkit-box-shadow;
|
|
7702
|
+
transition-property: -webkit-box-shadow;
|
|
7703
|
+
transition-property: box-shadow;
|
|
7704
|
+
transition-property: box-shadow, -webkit-box-shadow;
|
|
7705
|
+
-webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
7706
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
7707
|
+
-webkit-transition-duration: 200ms;
|
|
7708
|
+
transition-duration: 200ms;
|
|
7709
|
+
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7710
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7711
|
+
width: 100%;
|
|
7712
|
+
height: 100%;
|
|
7713
|
+
}
|
|
7714
|
+
.bp .c-media-btn__img[data-v-144c5c39]:hover {
|
|
7715
|
+
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7716
|
+
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7717
|
+
}
|
|
7718
|
+
.bp .tw-w-full[data-v-144c5c39] {
|
|
7719
|
+
width: 100%;
|
|
7720
|
+
}
|
|
7721
|
+
.bp .tw-h-full[data-v-144c5c39] {
|
|
7722
|
+
height: 100%;
|
|
7723
|
+
}
|
|
7724
|
+
|
|
7725
|
+
.bp .c-media-btn[data-v-4e32152a] {
|
|
7698
7726
|
width: 100%;
|
|
7699
7727
|
aspect-ratio: 1.2;
|
|
7700
7728
|
}
|
|
7701
|
-
.bp .c-media-btn__img[data-v-
|
|
7729
|
+
.bp .c-media-btn__img[data-v-4e32152a] {
|
|
7702
7730
|
height: 100%;
|
|
7703
7731
|
width: 100%;
|
|
7704
7732
|
border-radius: 0.375rem;
|
|
@@ -7715,11 +7743,11 @@ to {
|
|
|
7715
7743
|
-webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7716
7744
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7717
7745
|
}
|
|
7718
|
-
.bp .c-media-btn:hover .c-media-btn__img[data-v-
|
|
7746
|
+
.bp .c-media-btn:hover .c-media-btn__img[data-v-4e32152a] {
|
|
7719
7747
|
-webkit-box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7720
7748
|
box-shadow: 0 0 0 3px rgb(0, 151, 215);
|
|
7721
7749
|
}
|
|
7722
|
-
.bp .tw-bottom-15[data-v-
|
|
7750
|
+
.bp .tw-bottom-15[data-v-4e32152a] {
|
|
7723
7751
|
bottom: 15px;
|
|
7724
7752
|
}
|
|
7725
7753
|
|