@lingk/sync 0.0.82 → 0.0.84

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/build/lingk.js CHANGED
@@ -46,7 +46,7 @@ module.exports =
46
46
  /***/ 0:
47
47
  /***/ function(module, exports, __webpack_require__) {
48
48
 
49
- module.exports = __webpack_require__(171);
49
+ module.exports = __webpack_require__(170);
50
50
 
51
51
 
52
52
  /***/ },
@@ -82,116 +82,6 @@ module.exports =
82
82
 
83
83
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
84
84
 
85
- var BundleTable = function BundleTable(_ref) {
86
- var resourceGroups = _ref.resourceGroups,
87
- resourceGroupIndex = _ref.resourceGroupIndex,
88
- removeResourceGroup = _ref.removeResourceGroup,
89
- showConnectionModal = _ref.showConnectionModal,
90
- clickTableRow = _ref.clickTableRow,
91
- children = _ref.children;
92
-
93
-
94
- var childs;
95
- if (_react2.default.Children.count(children) > 0) {
96
- childs = _react2.default.Children.toArray(children);
97
- } else {
98
- return _react2.default.createElement('div', null);
99
- }
100
-
101
- return _react2.default.createElement(
102
- 'div',
103
- null,
104
- _react2.default.createElement('br', null),
105
- _react2.default.createElement(
106
- 'div',
107
- { style: { fontSize: '16px' } },
108
- 'Object Mappings'
109
- ),
110
- _react2.default.createElement(
111
- _reactBootstrap.Table,
112
- { className: 'lingk-wizard-bundle-table' },
113
- _react2.default.createElement(
114
- 'thead',
115
- null,
116
- _react2.default.createElement(
117
- 'tr',
118
- null,
119
- _react2.default.createElement(
120
- 'th',
121
- null,
122
- 'Source Objects'
123
- ),
124
- _react2.default.createElement(
125
- 'th',
126
- null,
127
- 'Connection'
128
- ),
129
- _react2.default.createElement(
130
- 'th',
131
- null,
132
- 'Target Object'
133
- ),
134
- _react2.default.createElement('th', null)
135
- )
136
- ),
137
- _react2.default.createElement(
138
- 'tbody',
139
- null,
140
- resourceGroups && resourceGroups.map(function (group, i) {
141
- return _react2.default.createElement(
142
- 'tr',
143
- { key: i, onClick: function onClick() {
144
- return clickTableRow(i);
145
- },
146
- style: { background: i === resourceGroupIndex ? '#f4f6f9' : 'white', cursor: 'pointer' } },
147
- _react2.default.createElement(
148
- 'td',
149
- { style: { paddingLeft: 15 } },
150
- _react2.default.Children.count(children) > 0 ? _react2.default.cloneElement(childs[0], { group: group }) : null
151
- ),
152
- _react2.default.createElement(
153
- 'td',
154
- { style: { paddingLeft: 6 } },
155
- _react2.default.Children.count(children) > 1 ? _react2.default.cloneElement(childs[1], { group: group, i: i, showConnectionModal: showConnectionModal }) : null
156
- ),
157
- _react2.default.createElement(
158
- 'td',
159
- null,
160
- _react2.default.Children.count(children) > 2 ? _react2.default.cloneElement(childs[2], { group: group, i: i }) : null
161
- ),
162
- _react2.default.createElement(
163
- 'td',
164
- null,
165
- _react2.default.Children.count(children) > 3 ? _react2.default.cloneElement(childs[3], { group: group, i: i, removeResourceGroup: removeResourceGroup, resourceGroups: resourceGroups }) : null
166
- )
167
- );
168
- })
169
- )
170
- )
171
- );
172
- };
173
-
174
- exports.default = BundleTable;
175
-
176
- /***/ },
177
-
178
- /***/ 162:
179
- /***/ function(module, exports, __webpack_require__) {
180
-
181
- 'use strict';
182
-
183
- Object.defineProperty(exports, "__esModule", {
184
- value: true
185
- });
186
-
187
- var _react = __webpack_require__(2);
188
-
189
- var _react2 = _interopRequireDefault(_react);
190
-
191
- var _reactBootstrap = __webpack_require__(7);
192
-
193
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
194
-
195
85
  var B = function B(props) {
196
86
  var style = props.style,
197
87
  onClick = props.onClick,
@@ -233,7 +123,7 @@ module.exports =
233
123
 
234
124
  /***/ },
235
125
 
236
- /***/ 163:
126
+ /***/ 162:
237
127
  /***/ function(module, exports, __webpack_require__) {
238
128
 
239
129
  'use strict';
@@ -270,7 +160,7 @@ module.exports =
270
160
 
271
161
  /***/ },
272
162
 
273
- /***/ 164:
163
+ /***/ 163:
274
164
  /***/ function(module, exports, __webpack_require__) {
275
165
 
276
166
  'use strict';
@@ -386,7 +276,7 @@ module.exports =
386
276
 
387
277
  /***/ },
388
278
 
389
- /***/ 165:
279
+ /***/ 164:
390
280
  /***/ function(module, exports, __webpack_require__) {
391
281
 
392
282
  'use strict';
@@ -462,7 +352,7 @@ module.exports =
462
352
 
463
353
  /***/ },
464
354
 
465
- /***/ 166:
355
+ /***/ 165:
466
356
  /***/ function(module, exports, __webpack_require__) {
467
357
 
468
358
  'use strict';
@@ -499,7 +389,7 @@ module.exports =
499
389
 
500
390
  /***/ },
501
391
 
502
- /***/ 167:
392
+ /***/ 166:
503
393
  /***/ function(module, exports, __webpack_require__) {
504
394
 
505
395
  'use strict';
@@ -531,7 +421,9 @@ module.exports =
531
421
  onClick = props.onClick,
532
422
  extraClass = props.extraClass,
533
423
  sectionLabels = props.sectionLabels,
534
- fieldPropLabel = props.fieldPropLabel;
424
+ fieldPropLabel = props.fieldPropLabel,
425
+ menuAlign = props.menuAlign,
426
+ type = props.type;
535
427
 
536
428
 
537
429
  var extraClassy = extraClass ? ' extra-select-button-class' : '';
@@ -552,25 +444,10 @@ module.exports =
552
444
  vals = v;
553
445
  }
554
446
 
555
- var selectOption = function selectOption(e) {
556
- if (!selectedValues || !selectedValues.find(function (sel) {
557
- return sel[fieldPropLabel] === e.target.value;
558
- })) {
559
- var vs = [].concat(_toConsumableArray(values));
560
- if (sectionLabels) {
561
- vs = vals;
562
- }
563
- var option = vs.find(function (v) {
564
- return v[fieldPropLabel] === e.target.value;
565
- });
566
- var index = vs.indexOf(option);
567
- onSelect(option[fieldPropLabel], index, option.recordTypeId ? option.recordTypeId : null, option.section);
568
- }
569
- };
570
-
571
447
  return _react2.default.createElement(
572
448
  'div',
573
- { onClick: onClick, style: { display: 'inline-block', marginRight: 12 } },
449
+ { onClick: onClick, style: { display: 'inline-block', marginRight: 12 },
450
+ className: 'lingk-dropdown-menu-wrapper' },
574
451
  title && _react2.default.createElement(
575
452
  'span',
576
453
  null,
@@ -585,34 +462,42 @@ module.exports =
585
462
  'div',
586
463
  null,
587
464
  _react2.default.createElement(
588
- _reactBootstrap.FormControl,
589
- { componentClass: 'select', placeholder: label, value: label,
465
+ _reactBootstrap.DropdownButton,
466
+ { placeholder: label, value: label,
467
+ bsStyle: type === 'brand' ? 'primary' : 'default',
590
468
  style: style, className: 'select-button' + extraClassy,
591
- onChange: selectOption
469
+ title: label, id: 'select-' + label, pullRight: menuAlign === 'right'
592
470
  },
593
- _react2.default.createElement(
594
- 'option',
595
- { disabled: true, value: label },
596
- label
597
- ),
598
471
  !sectionLabels ? values && values.map(function (val, i) {
599
472
  return _react2.default.createElement(
600
- 'option',
601
- { value: val[fieldPropLabel], key: i },
473
+ _reactBootstrap.MenuItem,
474
+ { value: val[fieldPropLabel], key: i, onClick: function onClick() {
475
+ if (!selectedValues || !selectedValues.find(function (sel) {
476
+ return sel[fieldPropLabel] === val[fieldPropLabel];
477
+ })) {
478
+ onSelect(val[fieldPropLabel], i, val.recordTypeId ? val.recordTypeId : null);
479
+ }
480
+ } },
602
481
  val[fieldPropLabel]
603
482
  );
604
483
  }) : vals && vals.map(function (val, i) {
605
484
  if (!val[fieldPropLabel]) {
606
485
  return _react2.default.createElement(
607
- 'option',
486
+ _reactBootstrap.MenuItem,
608
487
  { key: i, value: '', disabled: true, icon: 'none',
609
488
  style: { background: '#EEEEEE', color: '#AAAAAA', fontWeight: 'bold' } },
610
489
  val + ' ' + sectionLabelSuffix
611
490
  );
612
491
  } else return _react2.default.createElement(
613
- 'option',
492
+ _reactBootstrap.MenuItem,
614
493
  { value: val[fieldPropLabel], key: i,
615
- style: menuItemStyle || {} },
494
+ style: menuItemStyle || {}, onClick: function onClick() {
495
+ if (!selectedValues || !selectedValues.find(function (sel) {
496
+ return sel[fieldPropLabel] === val[fieldPropLabel];
497
+ })) {
498
+ onSelect(val[fieldPropLabel], i, val.recordTypeId ? val.recordTypeId : null, val.section);
499
+ }
500
+ } },
616
501
  val[fieldPropLabel]
617
502
  );
618
503
  })
@@ -625,7 +510,7 @@ module.exports =
625
510
 
626
511
  /***/ },
627
512
 
628
- /***/ 168:
513
+ /***/ 167:
629
514
  /***/ function(module, exports, __webpack_require__) {
630
515
 
631
516
  'use strict';
@@ -718,7 +603,7 @@ module.exports =
718
603
 
719
604
  /***/ },
720
605
 
721
- /***/ 169:
606
+ /***/ 168:
722
607
  /***/ function(module, exports, __webpack_require__) {
723
608
 
724
609
  'use strict';
@@ -750,7 +635,7 @@ module.exports =
750
635
 
751
636
  /***/ },
752
637
 
753
- /***/ 170:
638
+ /***/ 169:
754
639
  /***/ function(module, exports, __webpack_require__) {
755
640
 
756
641
  'use strict';
@@ -806,7 +691,7 @@ module.exports =
806
691
 
807
692
  /***/ },
808
693
 
809
- /***/ 171:
694
+ /***/ 170:
810
695
  /***/ function(module, exports, __webpack_require__) {
811
696
 
812
697
  'use strict';
@@ -815,7 +700,7 @@ module.exports =
815
700
  value: true
816
701
  });
817
702
 
818
- var _Button = __webpack_require__(162);
703
+ var _Button = __webpack_require__(161);
819
704
 
820
705
  Object.defineProperty(exports, 'Button', {
821
706
  enumerable: true,
@@ -824,7 +709,7 @@ module.exports =
824
709
  }
825
710
  });
826
711
 
827
- var _Radio = __webpack_require__(166);
712
+ var _Radio = __webpack_require__(165);
828
713
 
829
714
  Object.defineProperty(exports, 'Radio', {
830
715
  enumerable: true,
@@ -833,7 +718,7 @@ module.exports =
833
718
  }
834
719
  });
835
720
 
836
- var _Input = __webpack_require__(163);
721
+ var _Input = __webpack_require__(162);
837
722
 
838
723
  Object.defineProperty(exports, 'Input', {
839
724
  enumerable: true,
@@ -842,7 +727,7 @@ module.exports =
842
727
  }
843
728
  });
844
729
 
845
- var _Select = __webpack_require__(167);
730
+ var _Select = __webpack_require__(166);
846
731
 
847
732
  Object.defineProperty(exports, 'Select', {
848
733
  enumerable: true,
@@ -851,7 +736,7 @@ module.exports =
851
736
  }
852
737
  });
853
738
 
854
- var _Tooltip = __webpack_require__(170);
739
+ var _Tooltip = __webpack_require__(169);
855
740
 
856
741
  Object.defineProperty(exports, 'Tooltip', {
857
742
  enumerable: true,
@@ -860,7 +745,7 @@ module.exports =
860
745
  }
861
746
  });
862
747
 
863
- var _Spinner = __webpack_require__(169);
748
+ var _Spinner = __webpack_require__(168);
864
749
 
865
750
  Object.defineProperty(exports, 'Spinner', {
866
751
  enumerable: true,
@@ -869,7 +754,7 @@ module.exports =
869
754
  }
870
755
  });
871
756
 
872
- var _Modal = __webpack_require__(165);
757
+ var _Modal = __webpack_require__(164);
873
758
 
874
759
  Object.defineProperty(exports, 'Modal', {
875
760
  enumerable: true,
@@ -878,7 +763,7 @@ module.exports =
878
763
  }
879
764
  });
880
765
 
881
- var _Sidebar = __webpack_require__(168);
766
+ var _Sidebar = __webpack_require__(167);
882
767
 
883
768
  Object.defineProperty(exports, 'Sidebar', {
884
769
  enumerable: true,
@@ -887,7 +772,7 @@ module.exports =
887
772
  }
888
773
  });
889
774
 
890
- var _MapTable = __webpack_require__(164);
775
+ var _MapTable = __webpack_require__(163);
891
776
 
892
777
  Object.defineProperty(exports, 'MapTable', {
893
778
  enumerable: true,
@@ -896,16 +781,7 @@ module.exports =
896
781
  }
897
782
  });
898
783
 
899
- var _BundleTable = __webpack_require__(161);
900
-
901
- Object.defineProperty(exports, 'BundleTable', {
902
- enumerable: true,
903
- get: function get() {
904
- return _interopRequireDefault(_BundleTable).default;
905
- }
906
- });
907
-
908
- var _rfInput = __webpack_require__(172);
784
+ var _rfInput = __webpack_require__(171);
909
785
 
910
786
  Object.defineProperty(exports, 'rfInput', {
911
787
  enumerable: true,
@@ -914,7 +790,7 @@ module.exports =
914
790
  }
915
791
  });
916
792
 
917
- var _rfRadioGroup = __webpack_require__(173);
793
+ var _rfRadioGroup = __webpack_require__(172);
918
794
 
919
795
  Object.defineProperty(exports, 'rfRadioGroup', {
920
796
  enumerable: true,
@@ -923,7 +799,7 @@ module.exports =
923
799
  }
924
800
  });
925
801
 
926
- var _rfSelect = __webpack_require__(174);
802
+ var _rfSelect = __webpack_require__(173);
927
803
 
928
804
  Object.defineProperty(exports, 'rfSelect', {
929
805
  enumerable: true,
@@ -932,7 +808,7 @@ module.exports =
932
808
  }
933
809
  });
934
810
 
935
- var _theme = __webpack_require__(239);
811
+ var _theme = __webpack_require__(238);
936
812
 
937
813
  Object.defineProperty(exports, 'styles', {
938
814
  enumerable: true,
@@ -945,7 +821,7 @@ module.exports =
945
821
 
946
822
  /***/ },
947
823
 
948
- /***/ 172:
824
+ /***/ 171:
949
825
  /***/ function(module, exports, __webpack_require__) {
950
826
 
951
827
  'use strict';
@@ -998,7 +874,7 @@ module.exports =
998
874
 
999
875
  /***/ },
1000
876
 
1001
- /***/ 173:
877
+ /***/ 172:
1002
878
  /***/ function(module, exports, __webpack_require__) {
1003
879
 
1004
880
  'use strict';
@@ -1053,7 +929,7 @@ module.exports =
1053
929
 
1054
930
  /***/ },
1055
931
 
1056
- /***/ 174:
932
+ /***/ 173:
1057
933
  /***/ function(module, exports, __webpack_require__) {
1058
934
 
1059
935
  'use strict';
@@ -1080,12 +956,10 @@ module.exports =
1080
956
  menuAlign = _ref.menuAlign,
1081
957
  input = _ref.input,
1082
958
  onClick = _ref.onClick,
1083
- colorType = _ref.colorType;
959
+ colorType = _ref.colorType,
960
+ type = _ref.type;
1084
961
 
1085
962
 
1086
- var selectOption = function selectOption(e) {
1087
- input.onChange(e.target.value);
1088
- };
1089
963
  return _react2.default.createElement(
1090
964
  'div',
1091
965
  { onClick: onClick },
@@ -1096,21 +970,26 @@ module.exports =
1096
970
  ),
1097
971
  _react2.default.createElement(
1098
972
  'div',
1099
- { style: { marginLeft: '-.25rem' } },
973
+ { style: { marginLeft: '-.25rem' },
974
+ className: 'lingk-dropdown-menu-wrapper' },
1100
975
  _react2.default.createElement(
1101
- _reactBootstrap.FormControl,
1102
- { componentClass: 'select', value: selectedValue || "choose", onChange: selectOption,
1103
- className: 'rf-select' + (selectedValue ? "" : " rf-select-unselected")
976
+ _reactBootstrap.DropdownButton,
977
+ { value: selectedValue || "choose", id: 'rf-select-' + defaultLabel,
978
+ className: 'rf-select' + (selectedValue ? "" : " rf-select-unselected"),
979
+ bsStyle: type === 'brand' ? 'primary' : 'default',
980
+ title: selectedValue ? selectedValue : buttonLabel || defaultLabel
1104
981
  },
1105
982
  _react2.default.createElement(
1106
- 'option',
1107
- { disabled: true, style: { height: 20, padding: '1px 8px', color: '#AAAAAA', fontWeight: 'bold', marginBottom: 4 }, value: 'choose' },
1108
- defaultLabel
983
+ _reactBootstrap.MenuItem,
984
+ { disabled: true, style: { background: 'rgb(238, 238, 238)', color: 'rgb(170, 170, 170)' }, value: 'choose' },
985
+ 'Choose ' + defaultLabel
1109
986
  ),
1110
987
  values && values.map(function (val, i) {
1111
988
  return _react2.default.createElement(
1112
- 'option',
1113
- { value: val.label, key: i,
989
+ _reactBootstrap.MenuItem,
990
+ { value: val.label, key: i, onClick: function onClick() {
991
+ return input.onChange(val.label);
992
+ },
1114
993
  style: { height: 20, padding: '1px 8px' } },
1115
994
  val.label
1116
995
  );
@@ -1124,7 +1003,7 @@ module.exports =
1124
1003
 
1125
1004
  /***/ },
1126
1005
 
1127
- /***/ 239:
1006
+ /***/ 238:
1128
1007
  /***/ function(module, exports) {
1129
1008
 
1130
1009
  // removed by extract-text-webpack-plugin