@concretecms/bedrock 1.3.4 → 1.3.7

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.
@@ -3,6 +3,7 @@
3
3
  <chooser-header :show-form-factor-selector="false" :title="title"/>
4
4
 
5
5
  <uploader
6
+ :dropzone-options="dropzoneOptions"
6
7
  @upload-complete="$emit('upload-complete')"
7
8
  />
8
9
  </div>
@@ -29,6 +30,10 @@ export default {
29
30
  multipleSelection: {
30
31
  type: Boolean,
31
32
  default: true
33
+ },
34
+ dropzoneOptions: {
35
+ type: Object,
36
+ default: () => ({})
32
37
  }
33
38
  },
34
39
  watch: {
@@ -37,6 +37,7 @@
37
37
  :resultsFormFactor.sync="resultsFormFactor"
38
38
  :filesReadyToUpload.sync="filesReadyToUpload"
39
39
  :filters="filters"
40
+ :dropzone-options="dropzoneOptions"
40
41
  @upload-complete="activateTabByKey('recent-uploads')"
41
42
  ref="c"
42
43
  />
@@ -133,6 +134,10 @@ export default {
133
134
  },
134
135
  filters: {
135
136
  type: Array
137
+ },
138
+ dropzoneOptions: {
139
+ type: Object,
140
+ default: () => ({})
136
141
  }
137
142
  },
138
143
  created() {
@@ -4,7 +4,7 @@
4
4
  <div class="dz-default dz-message">
5
5
  <button type="button" class="dz-button">
6
6
  <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjEuMiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJ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TExLjNsMTAuOS0xLjRMNzQsNzAuOHogTTMuMiw4My43CgkJCQljLTEuOCwwLTMuMiwxLjQtMy4yLDMuMXYxMi43YzAsMC4xLDAsMC4xLDAsMC4yYzAsMCwwLDAsMCwwLjFjMCwwLDAsMC4xLDAsMC4xYzAsMC4xLDAsMC4xLDAsMC4yYzAsMC4xLDAuMSwwLjIsMC4xLDAuMwoJCQkJYzAuMSwwLjMsMC4xLDAuNSwwLjIsMC44YzAuMSwwLjIsMC4yLDAuMywwLjMsMC41YzAuMSwwLjIsMC4yLDAuNCwwLjQsMC41YzAuMSwwLjEsMC4zLDAuMiwwLjQsMC4zYzAuMiwwLjEsMC40LDAuMywwLjcsMC40CgkJCQljMC4xLDAuMSwwLjMsMC4xLDAuNSwwLjFjMC4yLDAsMC40LDAuMSwwLjYsMC4xaDE2LjNjMS43LDAsMy4xLTEuNCwzLjEtMy4ycy0xLjQtMy4yLTMuMS0zLjJoLTEzdi05LjhDNi40LDg1LjEsNSw4My43LDMuMiw4My43CgkJCQl6Ii8+CgkJPC9nPgoJCTxyZWN0IGlkPSJSZWN0YW5nbGUtQ29weS00IiB4PSI0IiB5PSIxNzciIGNsYXNzPSJzdDIiIHdpZHRoPSIxNDMyIiBoZWlnaHQ9IjgyOSIvPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=" alt="Drop files here or click to upload">
7
- <span>Drop files here or click to upload</span>
7
+ <span>{{ this.dropzoneOptions && this.dropzoneOptions.dictDefaultMessage ? this.dropzoneOptions.dictDefaultMessage : 'Drop files here or click to upload' }}</span>
8
8
  </button>
9
9
  </div>
10
10
  <input type="file" class="ccm-file-uploader-container-dropzone-file-element d-none" multiple="multiple">
@@ -57,6 +57,10 @@ export default {
57
57
  type: Object,
58
58
  default: () => ({})
59
59
  },
60
+ dropzoneOptions: {
61
+ type: Object,
62
+ default: () => ({})
63
+ },
60
64
  replaceFileId: {
61
65
  type: Number,
62
66
  required: false,
@@ -72,7 +76,7 @@ export default {
72
76
  },
73
77
  dropzoneSettings() {
74
78
  const me = this
75
- return {
79
+ const dropzoneOptions = {
76
80
  url: `${CCM_DISPATCHER_FILENAME}/ccm/system/file/upload`,
77
81
  previewTemplate: this.itemTemplate,
78
82
  autoProcessQueue: false,
@@ -126,8 +130,8 @@ export default {
126
130
 
127
131
  queuecomplete: function () {
128
132
  if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) {
133
+ const fileIds = []
129
134
  if (me.uploadedFiles.length !== 0) {
130
- const fileIds = []
131
135
  me.uploadedFiles.forEach(function(file) {
132
136
  fileIds.push(file.fID)
133
137
  })
@@ -135,7 +139,7 @@ export default {
135
139
  // ConcreteEvent.publish('FileManagerSelectFile', { fID: fileIds })
136
140
  me.uploadedFiles = []
137
141
  }
138
- me.uploadComplete()
142
+ me.uploadComplete(fileIds)
139
143
  }
140
144
  me.refresh()
141
145
  },
@@ -161,6 +165,38 @@ export default {
161
165
  $fileElement.addClass('in-progress')
162
166
  }
163
167
  }
168
+ if (this.dropzoneOptions) {
169
+ for (const key in this.dropzoneOptions) {
170
+ let skipMimeTypes
171
+ switch (key) {
172
+ case '_dontResizeMimeTypes':
173
+ skipMimeTypes = this.dropzoneOptions._dontResizeMimeTypes
174
+ if (skipMimeTypes && skipMimeTypes.length) {
175
+ dropzoneOptions.transformFile = function(file, done) {
176
+ if (
177
+ (this.options.resizeWidth || this.options.resizeHeight) &&
178
+ file && file.type && file.type.match(/image.*/) &&
179
+ skipMimeTypes.indexOf(file.type) < 0
180
+ ) {
181
+ return this.resizeImage(
182
+ file,
183
+ this.options.resizeWidth,
184
+ this.options.resizeHeight,
185
+ this.options.resizeMethod,
186
+ done
187
+ )
188
+ }
189
+ return done(file)
190
+ }
191
+ }
192
+ break
193
+ default:
194
+ dropzoneOptions[key] = this.dropzoneOptions[key]
195
+ break
196
+ }
197
+ }
198
+ }
199
+ return dropzoneOptions
164
200
  }
165
201
  },
166
202
  mounted() {
@@ -170,14 +206,14 @@ export default {
170
206
  $(me.$refs.dropzoneElement).dropzone(settings)
171
207
  $(window).on('resize', _.throttle(me.refresh, 100))
172
208
 
173
- ConcreteEvent.subscribe('FileUploaderUploadSelectedFiles', function(e) {
174
- me.dropzone.options.autoProcessQueue = true
175
- me.dropzone.processQueue()
209
+ ConcreteEvent.subscribe('FileUploaderUploadSelectedFiles', () => {
210
+ this.startUploading()
176
211
  })
177
212
  },
178
213
  watch: {
179
214
  filesInQueue() {
180
215
  const filesInQueue = this.filesInQueue
216
+ this.$emit('files-ready-to-upload', filesInQueue)
181
217
  ConcreteEvent.publish('FileUploaderFilesReadyToUpload', filesInQueue)
182
218
  },
183
219
  isUploadInProgress(val, oldVal) {
@@ -222,8 +258,12 @@ export default {
222
258
 
223
259
  this.dropzone.removeAllFiles(true)
224
260
  },
225
- uploadComplete() {
226
- this.$emit('upload-complete')
261
+ startUploading() {
262
+ this.dropzone.options.autoProcessQueue = true
263
+ this.dropzone.processQueue()
264
+ },
265
+ uploadComplete(fileIds) {
266
+ this.$emit('upload-complete', fileIds)
227
267
 
228
268
  ConcreteAlert.notify({
229
269
  title: 'Complete',
@@ -2,6 +2,7 @@
2
2
  <div>
3
3
  <upload-from-computer
4
4
  :upload-directory-id="uploadDirectoryId"
5
+ :dropzone-options="dropzoneOptions"
5
6
  @upload-complete="$emit('upload-complete')"
6
7
  @uploadProgressStateChange="isUploadInProgress = $event"/>
7
8
 
@@ -23,6 +24,12 @@ export default {
23
24
  UploadFromComputer,
24
25
  ConcreteFileDirectoryInput
25
26
  },
27
+ props: {
28
+ dropzoneOptions: {
29
+ type: Object,
30
+ default: () => ({})
31
+ }
32
+ },
26
33
  data: () => ({
27
34
  uploadDirectoryId: 0,
28
35
  isUploadInProgress: false
@@ -1,29 +1,29 @@
1
1
  <template>
2
2
  <div class="ccm-item-selector-group">
3
- <input type="hidden" :name="inputName" :value="selectedUserID" />
4
-
5
- <div class="ccm-item-selector-choose" v-if="!selectedUser && !isLoading">
6
- <button type="button" @click="openChooser" class="btn btn-secondary">
7
- {{chooseText}}
8
- </button>
9
- </div>
3
+ <input type="hidden" :name="inputName" :value="selectedUserID" v-if="inputName !== ''" />
10
4
 
11
5
  <div v-if="isLoading">
12
6
  <div class="btn-group">
13
7
  <div class="btn btn-secondary"><svg class="ccm-loader-dots"><use xlink:href="#icon-loader-circles" /></svg></div>
14
- <button type="button" @click="reset" class="ccm-item-selector-reset btn btn-secondary">
8
+ <button type="button" @click="reset" :disabled="readonly" class="ccm-item-selector-reset btn btn-secondary">
15
9
  <i class="fa fa-times-circle"></i>
16
10
  </button>
17
11
  </div>
18
12
  </div>
19
13
 
20
- <div class="ccm-item-selector-loaded" v-if="selectedUser !== null">
14
+ <div class="ccm-item-selector-choose" v-else-if="!selectedUser">
15
+ <button type="button" @click="openChooser" :disabled="readonly" class="btn btn-secondary">
16
+ {{chooseText}}
17
+ </button>
18
+ </div>
19
+
20
+ <div class="ccm-item-selector-loaded" v-else="selectedUser !== null">
21
21
  <div class="btn-group">
22
- <div class="btn btn-secondary">
22
+ <div class="btn btn-secondary" :class="{disabled: readonly}">
23
23
  <span v-html="selectedUser.avatar"></span>
24
24
  <span class="ccm-item-selector-title">{{selectedUser.displayName}}</span>
25
25
  </div>
26
- <button type="button" @click="reset" class="ccm-item-selector-reset btn btn-secondary">
26
+ <button type="button" @click="reset" :disabled="readonly" class="ccm-item-selector-reset btn btn-secondary">
27
27
  <i class="fa fa-times-circle"></i>
28
28
  </button>
29
29
  </div>
@@ -35,21 +35,32 @@
35
35
  export default {
36
36
  data() {
37
37
  return {
38
- isLoading: false,
38
+ isLoadingUserID: 0 /* integer */,
39
39
  selectedUser: null /* json object */,
40
40
  selectedUserID: 0 /* integer */
41
41
  }
42
42
  },
43
+ computed: {
44
+ isLoading() {
45
+ return this.isLoadingUserID > 0
46
+ }
47
+ },
43
48
  props: {
44
49
  inputName: {
45
50
  type: String,
46
- required: true
51
+ default: ''
47
52
  },
48
53
  userId: {
49
- type: Number
54
+ type: Number,
55
+ default: 0
50
56
  },
51
57
  chooseText: {
52
- type: String
58
+ type: String,
59
+ default: 'Choose a User'
60
+ },
61
+ readonly: {
62
+ type: Boolean,
63
+ default: false
53
64
  }
54
65
  },
55
66
  watch: {
@@ -75,22 +86,31 @@ export default {
75
86
  this.selectedUserID = selectedUsers[0]
76
87
  },
77
88
  openChooser: function() {
78
- var my = this
79
- window.ConcreteUserManager.launchDialog(function(r) {
80
- my.loadUser(r.id)
89
+ window.ConcreteUserManager.launchDialog((r) => {
90
+ this.loadUser(r.id)
81
91
  })
82
92
  },
83
93
  loadUser(userId) {
84
- var my = this
85
- my.isLoading = true
86
- window.ConcreteUserManager.getUserDetails(userId, function(r) {
87
- my.isLoading = false
88
- my.selectedUser = r.users[0]
89
- my.selectedUserID = userId
94
+ userId = parseInt(userId)
95
+ if (this.isLoadingUserID === userId) {
96
+ return
97
+ }
98
+ this.isLoadingUserID = userId
99
+ window.ConcreteUserManager.getUserDetails(userId, (r) => {
100
+ if (this.isLoadingUserID !== userId) {
101
+ return
102
+ }
103
+ this.selectedUserID = userId
104
+ this.selectedUser = r.users[0]
105
+ this.$nextTick(() => {
106
+ if (this.isLoadingUserID === userId) {
107
+ this.isLoadingUserID = 0
108
+ }
109
+ })
90
110
  })
91
111
  },
92
112
  reset() {
93
- this.isLoading = false
113
+ this.isLoadingUserID = 0
94
114
  this.selectedUserID = null
95
115
  }
96
116
  }
@@ -974,8 +974,7 @@
974
974
 
975
975
  initYourComputerTab: function () {
976
976
  fileUploader.uploadedFiles = []
977
-
978
- $dialogEl.find('.ccm-file-upload-container').dropzone({
977
+ const dropzoneOptions = {
979
978
  url: CCM_DISPATCHER_FILENAME + '/ccm/system/file/upload',
980
979
  previewTemplate: fileUploader.templates.getPreviewItem().html(),
981
980
  autoProcessQueue: false,
@@ -1096,7 +1095,39 @@
1096
1095
  $dialogEl.find('.ccm-directory-selector').attr('disabled', 'disabled').selectpicker('refresh')
1097
1096
  $dialogEl.find('.ccm-file-uploader-create-new-directory-button').addClass('disabled')
1098
1097
  }
1099
- })
1098
+ }
1099
+ if (this.options && this.options.dropzone) {
1100
+ for (const key in this.options.dropzone) {
1101
+ let skipMimeTypes
1102
+ switch (key) {
1103
+ case '_dontResizeMimeTypes':
1104
+ skipMimeTypes = this.options.dropzone._dontResizeMimeTypes
1105
+ if (skipMimeTypes && skipMimeTypes.length) {
1106
+ dropzoneOptions.transformFile = function(file, done) {
1107
+ if (
1108
+ (this.options.resizeWidth || this.options.resizeHeight) &&
1109
+ file && file.type && file.type.match(/image.*/) &&
1110
+ skipMimeTypes.indexOf(file.type) < 0
1111
+ ) {
1112
+ return this.resizeImage(
1113
+ file,
1114
+ this.options.resizeWidth,
1115
+ this.options.resizeHeight,
1116
+ this.options.resizeMethod,
1117
+ done
1118
+ )
1119
+ }
1120
+ return done(file)
1121
+ }
1122
+ }
1123
+ break
1124
+ default:
1125
+ dropzoneOptions[key] = this.options.dropzone[key]
1126
+ break
1127
+ }
1128
+ }
1129
+ }
1130
+ $dialogEl.find('.ccm-file-upload-container').dropzone(dropzoneOptions)
1100
1131
  },
1101
1132
 
1102
1133
  uploadComplete: function () {
@@ -100,3 +100,4 @@
100
100
  @import './utilities';
101
101
  @import './popover';
102
102
  @import './nav';
103
+ @import './nav-sidebar';
@@ -0,0 +1,43 @@
1
+ div.ccm-ui {
2
+ .nav {
3
+ &.nav-sidebar {
4
+ @include border-radius($list-group-border-radius);
5
+
6
+ .nav-item {
7
+ border: $list-group-border-width solid $list-group-border-color;
8
+
9
+ &:first-child {
10
+ @include border-top-radius(inherit);
11
+ }
12
+
13
+ &:last-child {
14
+ @include border-bottom-radius(inherit);
15
+ }
16
+
17
+ + .nav-item {
18
+ border-top-width: 0;
19
+ }
20
+
21
+ a {
22
+ &:hover {
23
+ background-color: $gray-100;
24
+ }
25
+
26
+ &.active {
27
+ position: relative;
28
+
29
+ &::before {
30
+ background-color: $blue;
31
+ bottom: 0;
32
+ content: '';
33
+ left: 0;
34
+ position: absolute;
35
+ top: 0;
36
+ width: 2px;
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
@@ -1,25 +1,40 @@
1
- div.ccm-ui {
2
- h1 {
1
+ // Note - ideally these font families should be handled by Bootstrap but when using with
2
+ // A bootstrap theme the font family from the theme can sometimes take precedence. So let's
3
+ // redeclare it here as well.
4
+ body div.ccm-ui {
5
+ h1,
6
+ .h1 {
7
+ font-family: $headings-font-family;
3
8
  font-weight: bold;
4
9
  }
5
10
 
6
- h2 {
11
+ h2,
12
+ .h2 {
13
+ font-family: $headings-font-family;
7
14
  font-weight: bold;
8
15
  }
9
16
 
10
- h3 {
17
+ h3,
18
+ .h3 {
19
+ font-family: $headings-font-family;
11
20
  font-weight: 300;
12
21
  }
13
22
 
14
- h4 {
23
+ h4,
24
+ .h4 {
25
+ font-family: $headings-font-family;
15
26
  font-weight: 700;
16
27
  }
17
28
 
18
- h5 {
29
+ h5,
30
+ .h5 {
31
+ font-family: $headings-font-family;
19
32
  font-weight: 600;
20
33
  }
21
34
 
22
- h6 {
35
+ h6,
36
+ .h6 {
37
+ font-family: $headings-font-family;
23
38
  font-weight: normal;
24
39
  text-transform: uppercase;
25
40
  }
@@ -27,6 +27,14 @@ $primary: #4a90e2;
27
27
  $body-color: $gray-700;
28
28
  $small-font-size: 0.9rem;
29
29
  $text-muted: $gray-500;
30
+ // Note, this is the same as $font-family-sans-serif, but we need to explicitly declare it, and since this
31
+ // file is parsed before the bootstrap variables file we don't have access to that variable yet. We have to
32
+ // explicitly define headings-font-family because when the CMS css file is used with Bedrock themes that
33
+ // variable will probably be defined and we will have theme h1, h2 styles bleeding through into our styles.
34
+ // So in order to do that, let's set our own sans serif variable here:
35
+ $font-family-sans-serif: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
36
+ // That variable will be used in Bootstrap. And then we can reference it here.
37
+ $headings-font-family: $font-family-sans-serif;
30
38
 
31
39
  /* horizontal rules */
32
40
  $hr-color: $gray-200;
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
 
23
- .ccm-ui {
23
+ body div.ccm-ui { // Added body for extra specificity
24
24
  margin: 0; // 1
25
25
  font-family: $font-family-base;
26
26
  @include font-size($font-size-base);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concretecms/bedrock",
3
- "version": "1.3.4",
3
+ "version": "1.3.7",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",