@concretecms/bedrock 1.2.9 → 1.3.2

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.
@@ -31,6 +31,7 @@
31
31
  </template>
32
32
 
33
33
  <script>
34
+ /* global CCM_DISPATCHER_FILENAME, CCM_SERVER_EVENTS_URL, CCM_SECURITY_TOKEN */
34
35
  /* eslint-disable no-new */
35
36
  /* eslint eqeqeq: 0 */
36
37
  import Icon from './Icon'
@@ -117,36 +118,45 @@ export default {
117
118
  }
118
119
  })
119
120
 
120
- ConcreteEvent.subscribe('ConcreteServerEventProcessOutput', function(e, data) {
121
- if (data.processId) {
122
- my.processes.forEach(function (thisProcess) {
123
- if (thisProcess.id === data.processId) {
124
- thisProcess.details.push(data.message)
125
- }
126
- })
127
- }
128
- })
129
- ConcreteEvent.subscribe('ConcreteServerEventBatchUpdated', function(e, data) {
130
- var total = data.batch.totalJobs
131
- var progress = total - data.batch.pendingJobs
132
- var percent = Math.round(progress / total * 100)
133
-
134
- my.processes.forEach(function (thisProcess) {
135
- if (thisProcess.batch && thisProcess.batch.id == data.batch.id) {
136
- thisProcess.progress = percent
137
- thisProcess.batch = data.batch
138
- }
121
+ if (typeof (CCM_SERVER_EVENTS_URL) !== 'undefined') {
122
+ const eventSourceUrl = new URL(CCM_SERVER_EVENTS_URL)
123
+ eventSourceUrl.searchParams.append('topic', '{+siteUrl}/concrete/events/processes/{+eventName}')
124
+ const eventSource = new EventSource(eventSourceUrl, {
125
+ withCredentials: true
139
126
  })
140
- })
141
- ConcreteEvent.subscribe('ConcreteServerEventCloseProcess', function(e, data) {
142
- my.processes.forEach(function (thisProcess) {
143
- if (thisProcess.id == data.process.id) {
144
- thisProcess.dateCompleted = data.process.dateCompleted
145
- thisProcess.dateCompletedString = data.process.dateCompletedString
146
- my.completeProcess(thisProcess)
127
+
128
+ eventSource.onmessage = event => {
129
+ var data = JSON.parse(event.data)
130
+ if (Object.prototype.hasOwnProperty.call(data, 'batch')) {
131
+ // Batch Updated
132
+ var total = data.batch.totalJobs
133
+ var progress = total - data.batch.pendingJobs
134
+ var percent = Math.round(progress / total * 100)
135
+
136
+ my.processes.forEach(function (thisProcess) {
137
+ if (thisProcess.batch && thisProcess.batch.id == data.batch.id) {
138
+ thisProcess.progress = percent
139
+ thisProcess.batch = data.batch
140
+ }
141
+ })
142
+ } else if (Object.prototype.hasOwnProperty.call(data, 'exitCode')) {
143
+ // Close process
144
+ my.processes.forEach(function (thisProcess) {
145
+ if (thisProcess.id == data.process.id) {
146
+ thisProcess.dateCompleted = data.process.dateCompleted
147
+ thisProcess.dateCompletedString = data.process.dateCompletedString
148
+ my.completeProcess(thisProcess)
149
+ }
150
+ })
151
+ } else if (Object.prototype.hasOwnProperty.call(data, 'processId')) {
152
+ my.processes.forEach(function (thisProcess) {
153
+ if (thisProcess.id === data.processId) {
154
+ thisProcess.details.push(data.message)
155
+ }
156
+ })
147
157
  }
148
- })
149
- })
158
+ }
159
+ }
150
160
  },
151
161
  watch: {
152
162
  processes: {
@@ -11,8 +11,7 @@ import { icons } from '../iconlist'
11
11
  export default {
12
12
  data() {
13
13
  return {
14
- selectedOption: this.selected,
15
- emptyOptionLabel: this.emptyOptionLabel
14
+ selectedOption: this.selected
16
15
  }
17
16
  },
18
17
  props: {
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <div class="input-group">
3
+ <input
4
+ class="form-control"
5
+ autocomplete="off"
6
+ value=""
7
+ :name="name"
8
+ :id="name"
9
+ :type="inputType"
10
+ />
11
+ <button v-if="toggler" type="button" class="input-group-icon" @click="toggle()">
12
+ <i :class="`fas fa-${iconName}`" aria-hidden="true"></i>
13
+ </button>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ data() {
20
+ return {
21
+ passwordVisible: false,
22
+ inputType: 'password',
23
+ iconName: 'eye'
24
+ }
25
+ },
26
+ props: {
27
+ name: {
28
+ type: String
29
+ },
30
+ toggler: {
31
+ type: Boolean,
32
+ default: true
33
+ }
34
+ },
35
+ methods: {
36
+ toggle() {
37
+ this.passwordVisible = !this.passwordVisible
38
+
39
+ if (this.passwordVisible === true) {
40
+ this.inputType = 'text'
41
+ this.iconName = 'eye-slash'
42
+ } else {
43
+ this.inputType = 'password'
44
+ this.iconName = 'eye'
45
+ }
46
+ }
47
+ }
48
+ }
49
+ </script>
@@ -33,6 +33,7 @@ import ColorPageCustomizerWidget from './customizer/ColorPageCustomizerWidget'
33
33
  import ThemeCustomizerPreview from './customizer/ThemeCustomizerPreview'
34
34
  import ToolbarSliderWidget from './customizer/block/ToolbarSliderWidget'
35
35
  import ToolbarSectionWidget from './customizer/block/ToolbarSectionWidget'
36
+ import PasswordInput from './form/PasswordInput'
36
37
 
37
38
  // Export our component library
38
39
  export default {
@@ -70,5 +71,6 @@ export default {
70
71
  ThemeCustomizerPreview,
71
72
  ToolbarSliderWidget,
72
73
  ToolbarSectionWidget,
73
- ColorPageCustomizerWidget
74
+ ColorPageCustomizerWidget,
75
+ PasswordInput
74
76
  }
@@ -13,9 +13,6 @@ import 'ajax-bootstrap-select'
13
13
  import './modifiable-ajax-bootstrap-select'
14
14
  import 'dropzone/dist/dropzone'
15
15
 
16
- // Server events
17
- import './server-events'
18
-
19
16
  // jQuery UI components
20
17
  import 'jquery-ui/ui/widgets/button'
21
18
  import 'jquery-ui/ui/widgets/dialog'
@@ -14,7 +14,7 @@
14
14
  })
15
15
 
16
16
  function onDialogCreate($dialog) {
17
- $dialog.parent().addClass('animated fadeIn')
17
+ // $dialog.parent().addClass('animated fadeIn')
18
18
  }
19
19
 
20
20
  function onDialogOpen($dialog) {
@@ -33,7 +33,11 @@
33
33
  var overlays = $('.ui-widget-overlay').length
34
34
 
35
35
  if (overlays == 1) {
36
- $('.ui-widget-overlay').addClass('ui-widget-overlay-active')
36
+ var overlayFunction = function() {
37
+ var overlay = $('.ui-widget-overlay').get(0)
38
+ overlay.classList.add('ui-widget-overlay-active')
39
+ }
40
+ requestAnimationFrame(overlayFunction)
37
41
  }
38
42
 
39
43
  var $close = $dialog.parent().find('.ui-dialog-titlebar-close')
@@ -514,3 +514,11 @@ div.ccm-block-edit[data-block-type-handle=core_container] {
514
514
  }
515
515
  }
516
516
  }
517
+
518
+ /**
519
+ * Dragging performance. We have to change this because BS5 sets it to to smooth which botches drag operations. See
520
+ * issue https://github.com/concretecms/concretecms/issues/10701
521
+ */
522
+ html.ccm-edit-mode {
523
+ scroll-behavior: auto;
524
+ }
@@ -120,7 +120,8 @@ html.ccm-toolbar-visible {
120
120
 
121
121
  .ui-widget-overlay {
122
122
  opacity: 0;
123
- transition: $transition-fade;
123
+ transition: opacity 0.2s linear;
124
+ will-change: opacity;
124
125
 
125
126
  &.ui-widget-overlay-active {
126
127
  background: $modal-backdrop-bg;
@@ -242,11 +242,7 @@ a.ui-button:active,
242
242
  }
243
243
 
244
244
  /* Overlays */
245
- .ui-widget-overlay {
246
- background: #aaa;
247
- filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */
248
- opacity: 0.3;
249
- }
245
+ /* Removed because it's screwing up CSS animation performance due to our CSS overrides of the property elsewhere */
250
246
 
251
247
  .ui-widget-shadow {
252
248
  -webkit-box-shadow: 0 0 5px #666#666;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concretecms/bedrock",
3
- "version": "1.2.9",
3
+ "version": "1.3.2",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",
@@ -1,17 +0,0 @@
1
- /* eslint-disable no-new, no-unused-vars, camelcase, eqeqeq */
2
-
3
- class ConcreteServerEvents {
4
- static listen(url, topicUrl) {
5
- const eventSourceUrl = new URL(url)
6
- eventSourceUrl.searchParams.append('topic', topicUrl + '/{+anything}')
7
- const eventSource = new EventSource(eventSourceUrl)
8
- eventSource.onmessage = event => {
9
- // Will be called every time an update is published by the server
10
- var data = JSON.parse(event.data)
11
- var eventName = 'ConcreteServerEvent' + data.event
12
- ConcreteEvent.publish(eventName, data.data)
13
- }
14
- }
15
- }
16
-
17
- global.ConcreteServerEvents = ConcreteServerEvents