vhx-quartz 0.10.9 → 0.10.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04e8482d94002fad4035bfdc2e3f52bbe0309e5c
4
- data.tar.gz: 3eaeb3a158fb10ec1636a99473191f004e772b42
3
+ metadata.gz: 4faab22368fed39b84fece9c514e0a30681e1b68
4
+ data.tar.gz: 0f2d82b14aba47f39f1906abe35965abaad65380
5
5
  SHA512:
6
- metadata.gz: 5d854f57111af1fa90d9d609340544f64c4a124297fb0d3872c8cac8a4405f6481ff891a246f436f312613bfb26f32d24bb842beca1dd82a36f7511024db4a6e
7
- data.tar.gz: 98e78c044acff404ff63724fe93c7c0562d3f63ebed00d1226daa05e43dffe99797b5c8b6a34dad0f161e2af27ab0060f9be4fb55a5d17e93dd62eee0aceb3ec
6
+ metadata.gz: ea3629fd218a71d3a0f0c2d2c6d67b2422d586c966651b4b4f53ee131190df399696f8fa01f889066b6032d96f6b8e67db0798ecd5823bc479e8cb1775ec1433
7
+ data.tar.gz: bbd28c20c5081d0fe136dfd59ce827e35eadcb35da333f0f9f1882e63384ce3d636ad9e480e18cd37cc223ee1c8bcf3e50fc2c04b40330572dc5458d2289b1e6
@@ -1,5 +1,5 @@
1
1
  module Vhx
2
2
  module Quartz
3
- VERSION = "0.10.9"
3
+ VERSION = "0.10.10"
4
4
  end
5
5
  end
@@ -20,16 +20,20 @@ vhxm.components.shared.select.controller = function (opts) {
20
20
  });
21
21
  }
22
22
 
23
+ self.state.focusInput(opts.focusOnOpen || true);
24
+
23
25
  if (opts.isProcessing) {
24
26
  self.state.isProcessing = opts.isProcessing;
25
27
  }
26
28
  if (opts.onSelect) {
27
29
  self.state.onSelect = opts.onSelect;
28
30
  }
29
-
30
31
  if (opts.onAction) {
31
32
  self.state.onAction = opts.onAction;
32
33
  }
34
+ if (opts.onClose) {
35
+ self.state.onClose = opts.onClose;
36
+ }
33
37
 
34
38
  $(document).on('click', function (event) {
35
39
  var is_dropdown = $(event.target).closest('.c-select--container').length;
@@ -37,6 +41,7 @@ vhxm.components.shared.select.controller = function (opts) {
37
41
  if (!is_dropdown && self.state.isDropdownOpen()) {
38
42
  m.startComputation();
39
43
  self.state.isDropdownOpen(false);
44
+ self.state.onClose();
40
45
  m.endComputation();
41
46
  }
42
47
  });
@@ -90,6 +95,9 @@ vhxm.components.shared.select.controller = function (opts) {
90
95
  }
91
96
 
92
97
  self.state.isDropdownOpen(!self.state.isDropdownOpen());
98
+ if (!self.state.isDropdownOpen()) {
99
+ self.state.onClose();
100
+ }
93
101
  self.scrollOptionsList(container);
94
102
  };
95
103
 
@@ -124,6 +132,9 @@ vhxm.components.shared.select.controller = function (opts) {
124
132
 
125
133
  if (!isInit) {
126
134
  self.state.isDropdownOpen(self.multiselect ? true : false);
135
+ if (!self.multiselect) {
136
+ self.state.onClose();
137
+ }
127
138
  }
128
139
 
129
140
  if (self.multiselect) {
@@ -142,6 +153,7 @@ vhxm.components.shared.select.controller = function (opts) {
142
153
  self.state.searchInputValue('');
143
154
  self.state.footerLoading(false);
144
155
  self.state.isDropdownOpen(false);
156
+ self.state.onClose();
145
157
  m.endComputation();
146
158
  });
147
159
  };
@@ -198,6 +210,7 @@ vhxm.components.shared.select.state = function () {
198
210
  this.focusInput = m.prop(true);
199
211
  this.isProcessing = m.prop([]);
200
212
  this.onSelect = function () {};
213
+ this.onClose = function () {};
201
214
  this.onAction = function (done) {
202
215
  done();
203
216
  };
@@ -242,7 +255,6 @@ vhxm.components.shared.select.ui.container = {
242
255
  // if search is enabled
243
256
  m('.c-select--input-container.padding-medium.absolute.bg-white.fill-width.radius', [m.component(vhxm.components.shared.search_input.ui.container, {
244
257
  config: function config(el, init) {
245
- el.value = ctrl.state.searchInputValue();
246
258
  if (ctrl.state.focusInput()) {
247
259
  setTimeout(function () {
248
260
  el.focus();
@@ -288,7 +300,7 @@ vhxm.components.shared.select.ui.item_media = {
288
300
  ctrl.handleItemClick(event, item);
289
301
  }
290
302
  }, [m('.c-media-item--image-container.left', [m('img.c-media-item--image.radius.margin-right-medium', {
291
- src: item[opts.prop_map.img],
303
+ src: item[opts.prop_map.image],
292
304
  width: 70,
293
305
  height: 40
294
306
  })]), m('.c-media-item--content.clearfix.left', [m('p.text--navy', item[opts.prop_map.label]), m('p.text--gray', item[opts.prop_map.descriptor])]), ctrl.parent.multiselect ? m('.c-media-item--action.clearfix.right', [ctrl.state.isProcessing().indexOf(item[opts.prop_map.value]) >= 0 ? m('.c-item-toggle.loader-white.loader--small') : m('.c-item-toggle.icon--xsmall.icon-check-navy.border' + (ctrl.state.selected() && ctrl.state.selected()[item[opts.prop_map.key]] ? '.is-selected.icon-check-navy' : '.icon-plus-thin-white'))]) : '']);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vhx-quartz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.9
4
+ version: 0.10.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Robertson, Courtney Burton, Steven Bone, David Gonzalez