@reviewpush/rp-treeselect 0.0.5 → 0.0.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.
@@ -506,29 +506,31 @@ var MIN_INPUT_WIDTH = 5;
506
506
  var MENU_BUFFER = 40;
507
507
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HiddenFields.vue?vue&type=script&lang=js
508
508
 
509
+
509
510
  function stringifyValue(value) {
510
511
  if (typeof value === 'string') return value;
511
512
  if (value != null && !isNaN_isNaN(value)) return JSON.stringify(value);
512
513
  return '';
513
514
  }
514
-
515
515
  /* harmony default export */ var HiddenFieldsvue_type_script_lang_js = ({
516
516
  name: 'rp-treeselect--hidden-fields',
517
517
  setup: function setup() {
518
- var count = Object(external_vue_["inject"])('instance');
518
+ var instance = Object(external_vue_["inject"])('instance');
519
+ return {
520
+ instance: instance
521
+ };
519
522
  },
520
- functional: true,
521
- render: function render(_, context) {
523
+ render: function render() {
524
+ var _this = this;
522
525
  var h = arguments[0];
523
- var instance = context.injections.instance;
524
- if (!instance.name || instance.disabled || !instance.hasValue) return null;
525
- var stringifiedValues = instance.internalValue.map(stringifyValue);
526
- if (instance.multiple && instance.joinValues) stringifiedValues = [stringifiedValues.join(instance.delimiter)];
526
+ if (!this.instance.name || this.instance.disabled || !this.instance.hasValue) return null;
527
+ var stringifiedValues = this.instance.internalValue.map(stringifyValue);
528
+ if (this.instance.multiple && this.instance.joinValues) stringifiedValues = [stringifiedValues.join(this.instance.delimiter)];
527
529
  return stringifiedValues.map(function (stringifiedValue, i) {
528
530
  return h("input", {
529
531
  attrs: {
530
532
  type: "hidden",
531
- name: instance.name
533
+ name: _this.instance.name
532
534
  },
533
535
  domProps: {
534
536
  "value": stringifiedValue
@@ -669,12 +671,15 @@ var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_r
669
671
 
670
672
 
671
673
 
672
- var keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN];
673
674
 
675
+ var keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN];
674
676
  /* harmony default export */ var Inputvue_type_script_lang_js = ({
675
677
  name: 'rp-treeselect--input',
676
678
  setup: function setup() {
677
- var count = Object(external_vue_["inject"])('instance');
679
+ var instance = Object(external_vue_["inject"])('instance');
680
+ return {
681
+ instance: instance
682
+ };
678
683
  },
679
684
  data: function data() {
680
685
  return {
@@ -949,7 +954,10 @@ Input_component.options.__file = "src/components/Input.vue"
949
954
  /* harmony default export */ var Placeholdervue_type_script_lang_js = ({
950
955
  name: 'rp-treeselect--placeholder',
951
956
  setup: function setup() {
952
- var count = Object(external_vue_["inject"])('instance');
957
+ var instance = Object(external_vue_["inject"])('instance');
958
+ return {
959
+ instance: instance
960
+ };
953
961
  },
954
962
  render: function render() {
955
963
  var h = arguments[0];
@@ -996,7 +1004,10 @@ Placeholder_component.options.__file = "src/components/Placeholder.vue"
996
1004
  /* harmony default export */ var SingleValuevue_type_script_lang_js = ({
997
1005
  name: 'rp-treeselect--single-value',
998
1006
  setup: function setup() {
999
- var count = Object(external_vue_["inject"])('instance');
1007
+ var instance = Object(external_vue_["inject"])('instance');
1008
+ return {
1009
+ instance: instance
1010
+ };
1000
1011
  },
1001
1012
  methods: {
1002
1013
  renderSingleValueLabel: function renderSingleValueLabel() {
@@ -1108,7 +1119,10 @@ Delete_component.options.__file = "src/components/icons/Delete.vue"
1108
1119
  /* harmony default export */ var MultiValueItemvue_type_script_lang_js = ({
1109
1120
  name: 'rp-treeselect--multi-value-item',
1110
1121
  setup: function setup() {
1111
- var count = Object(external_vue_["inject"])('instance');
1122
+ var instance = Object(external_vue_["inject"])('instance');
1123
+ return {
1124
+ instance: instance
1125
+ };
1112
1126
  },
1113
1127
  props: {
1114
1128
  node: {
@@ -1184,7 +1198,10 @@ MultiValueItem_component.options.__file = "src/components/MultiValueItem.vue"
1184
1198
  /* harmony default export */ var MultiValuevue_type_script_lang_js = ({
1185
1199
  name: 'rp-treeselect--multi-value',
1186
1200
  setup: function setup() {
1187
- var count = Object(external_vue_["inject"])('instance');
1201
+ var instance = Object(external_vue_["inject"])('instance');
1202
+ return {
1203
+ instance: instance
1204
+ };
1188
1205
  },
1189
1206
  methods: {
1190
1207
  renderMultiValueItems: function renderMultiValueItems() {
@@ -1323,7 +1340,10 @@ Arrow_component.options.__file = "src/components/icons/Arrow.vue"
1323
1340
  /* harmony default export */ var Controlvue_type_script_lang_js = ({
1324
1341
  name: 'rp-treeselect--control',
1325
1342
  setup: function setup() {
1326
- var count = Object(external_vue_["inject"])('instance');
1343
+ var instance = Object(external_vue_["inject"])('instance');
1344
+ return {
1345
+ instance: instance
1346
+ };
1327
1347
  },
1328
1348
  computed: {
1329
1349
  shouldShowX: function shouldShowX() {
@@ -1449,7 +1469,6 @@ Control_component.options.__file = "src/components/Control.vue"
1449
1469
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Tip.vue?vue&type=script&lang=js
1450
1470
  /* harmony default export */ var Tipvue_type_script_lang_js = ({
1451
1471
  name: 'rp-treeselect--tip',
1452
- functional: true,
1453
1472
  props: {
1454
1473
  type: {
1455
1474
  type: String,
@@ -1460,19 +1479,20 @@ Control_component.options.__file = "src/components/Control.vue"
1460
1479
  required: true
1461
1480
  }
1462
1481
  },
1463
- render: function render(_, context) {
1482
+ render: function render() {
1464
1483
  var h = arguments[0];
1465
- var props = context.props,
1466
- children = context.children;
1484
+ var _this$$props = this.$props,
1485
+ icon = _this$$props.icon,
1486
+ type = _this$$props.type;
1467
1487
  return h("div", {
1468
- "class": "rp-treeselect__tip rp-treeselect__".concat(props.type, "-tip")
1488
+ "class": "rp-treeselect__tip rp-treeselect__".concat(type, "-tip")
1469
1489
  }, [h("div", {
1470
1490
  "class": "rp-treeselect__icon-container"
1471
1491
  }, [h("span", {
1472
- "class": "rp-treeselect__icon-".concat(props.icon)
1492
+ "class": "rp-treeselect__icon-".concat(icon)
1473
1493
  })]), h("span", {
1474
- "class": "rp-treeselect__tip-text rp-treeselect__".concat(props.type, "-tip-text")
1475
- }, [children])]);
1494
+ "class": "rp-treeselect__tip-text rp-treeselect__".concat(type, "-tip-text")
1495
+ }, [h("slot")])]);
1476
1496
  }
1477
1497
  });
1478
1498
  // CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js
@@ -1785,17 +1805,20 @@ Option_component.options.__file = "src/components/Option.vue"
1785
1805
 
1786
1806
 
1787
1807
 
1808
+
1788
1809
  var directionMap = {
1789
1810
  top: 'top',
1790
1811
  bottom: 'bottom',
1791
1812
  above: 'top',
1792
1813
  below: 'bottom'
1793
1814
  };
1794
-
1795
1815
  /* harmony default export */ var Menuvue_type_script_lang_js = ({
1796
1816
  name: 'rp-treeselect--menu',
1797
1817
  setup: function setup() {
1798
- var count = Object(external_vue_["inject"])('instance');
1818
+ var instance = Object(external_vue_["inject"])('instance');
1819
+ return {
1820
+ instance: instance
1821
+ };
1799
1822
  },
1800
1823
  computed: {
1801
1824
  menuStyle: function menuStyle() {
@@ -3663,7 +3686,7 @@ var style = __webpack_require__(15);
3663
3686
  /* harmony default export */ var src = __webpack_exports__["default"] = (Treeselect);
3664
3687
 
3665
3688
 
3666
- var VERSION = "0.0.5";
3689
+ var VERSION = "0.0.7";
3667
3690
 
3668
3691
  /***/ })
3669
3692
  /******/ ]);