@reviewpush/rp-treeselect 0.0.6 → 0.0.8
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/dist/rp-treeselect.cjs.js +52 -33
- package/dist/rp-treeselect.cjs.js.map +1 -1
- package/dist/rp-treeselect.cjs.min.js +1 -1
- package/dist/rp-treeselect.cjs.min.js.map +1 -1
- package/dist/rp-treeselect.umd.js +52 -33
- package/dist/rp-treeselect.umd.js.map +1 -1
- package/dist/rp-treeselect.umd.min.js +1 -1
- package/dist/rp-treeselect.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/HiddenFields.vue +1 -0
- package/src/components/Input.vue +5 -5
- package/src/components/Menu.vue +6 -5
- package/src/components/MultiValue.vue +5 -5
- package/src/components/MultiValueItem.vue +5 -5
- package/src/components/Placeholder.vue +5 -4
- package/src/components/SingleValue.vue +5 -5
- package/src/components/Treeselect.vue +2 -4
|
@@ -506,29 +506,32 @@ 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
|
|
518
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
519
|
+
return {
|
|
520
|
+
instance: instance
|
|
521
|
+
};
|
|
519
522
|
},
|
|
520
|
-
|
|
521
|
-
|
|
523
|
+
render: function render() {
|
|
524
|
+
var _this = this;
|
|
522
525
|
var h = arguments[0];
|
|
523
|
-
|
|
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
|
+
console.log(this);
|
|
527
|
+
if (!this.instance.name || this.instance.disabled || !this.instance.hasValue) return null;
|
|
528
|
+
var stringifiedValues = this.instance.internalValue.map(stringifyValue);
|
|
529
|
+
if (this.instance.multiple && this.instance.joinValues) stringifiedValues = [stringifiedValues.join(this.instance.delimiter)];
|
|
527
530
|
return stringifiedValues.map(function (stringifiedValue, i) {
|
|
528
531
|
return h("input", {
|
|
529
532
|
attrs: {
|
|
530
533
|
type: "hidden",
|
|
531
|
-
name: instance.name
|
|
534
|
+
name: _this.instance.name
|
|
532
535
|
},
|
|
533
536
|
domProps: {
|
|
534
537
|
"value": stringifiedValue
|
|
@@ -669,12 +672,15 @@ var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_r
|
|
|
669
672
|
|
|
670
673
|
|
|
671
674
|
|
|
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
675
|
|
|
676
|
+
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
677
|
/* harmony default export */ var Inputvue_type_script_lang_js = ({
|
|
675
678
|
name: 'rp-treeselect--input',
|
|
676
679
|
setup: function setup() {
|
|
677
|
-
var
|
|
680
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
681
|
+
return {
|
|
682
|
+
instance: instance
|
|
683
|
+
};
|
|
678
684
|
},
|
|
679
685
|
data: function data() {
|
|
680
686
|
return {
|
|
@@ -949,7 +955,10 @@ Input_component.options.__file = "src/components/Input.vue"
|
|
|
949
955
|
/* harmony default export */ var Placeholdervue_type_script_lang_js = ({
|
|
950
956
|
name: 'rp-treeselect--placeholder',
|
|
951
957
|
setup: function setup() {
|
|
952
|
-
var
|
|
958
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
959
|
+
return {
|
|
960
|
+
instance: instance
|
|
961
|
+
};
|
|
953
962
|
},
|
|
954
963
|
render: function render() {
|
|
955
964
|
var h = arguments[0];
|
|
@@ -985,9 +994,6 @@ var Placeholder_component = normalizeComponent(
|
|
|
985
994
|
|
|
986
995
|
)
|
|
987
996
|
|
|
988
|
-
/* hot reload */
|
|
989
|
-
if (false) { var Placeholder_api; }
|
|
990
|
-
Placeholder_component.options.__file = "src/components/Placeholder.vue"
|
|
991
997
|
/* harmony default export */ var Placeholder = (Placeholder_component.exports);
|
|
992
998
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SingleValue.vue?vue&type=script&lang=js
|
|
993
999
|
|
|
@@ -996,7 +1002,10 @@ Placeholder_component.options.__file = "src/components/Placeholder.vue"
|
|
|
996
1002
|
/* harmony default export */ var SingleValuevue_type_script_lang_js = ({
|
|
997
1003
|
name: 'rp-treeselect--single-value',
|
|
998
1004
|
setup: function setup() {
|
|
999
|
-
var
|
|
1005
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
1006
|
+
return {
|
|
1007
|
+
instance: instance
|
|
1008
|
+
};
|
|
1000
1009
|
},
|
|
1001
1010
|
methods: {
|
|
1002
1011
|
renderSingleValueLabel: function renderSingleValueLabel() {
|
|
@@ -1108,7 +1117,10 @@ Delete_component.options.__file = "src/components/icons/Delete.vue"
|
|
|
1108
1117
|
/* harmony default export */ var MultiValueItemvue_type_script_lang_js = ({
|
|
1109
1118
|
name: 'rp-treeselect--multi-value-item',
|
|
1110
1119
|
setup: function setup() {
|
|
1111
|
-
var
|
|
1120
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
1121
|
+
return {
|
|
1122
|
+
instance: instance
|
|
1123
|
+
};
|
|
1112
1124
|
},
|
|
1113
1125
|
props: {
|
|
1114
1126
|
node: {
|
|
@@ -1184,7 +1196,10 @@ MultiValueItem_component.options.__file = "src/components/MultiValueItem.vue"
|
|
|
1184
1196
|
/* harmony default export */ var MultiValuevue_type_script_lang_js = ({
|
|
1185
1197
|
name: 'rp-treeselect--multi-value',
|
|
1186
1198
|
setup: function setup() {
|
|
1187
|
-
var
|
|
1199
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
1200
|
+
return {
|
|
1201
|
+
instance: instance
|
|
1202
|
+
};
|
|
1188
1203
|
},
|
|
1189
1204
|
methods: {
|
|
1190
1205
|
renderMultiValueItems: function renderMultiValueItems() {
|
|
@@ -1323,7 +1338,10 @@ Arrow_component.options.__file = "src/components/icons/Arrow.vue"
|
|
|
1323
1338
|
/* harmony default export */ var Controlvue_type_script_lang_js = ({
|
|
1324
1339
|
name: 'rp-treeselect--control',
|
|
1325
1340
|
setup: function setup() {
|
|
1326
|
-
var
|
|
1341
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
1342
|
+
return {
|
|
1343
|
+
instance: instance
|
|
1344
|
+
};
|
|
1327
1345
|
},
|
|
1328
1346
|
computed: {
|
|
1329
1347
|
shouldShowX: function shouldShowX() {
|
|
@@ -1449,7 +1467,6 @@ Control_component.options.__file = "src/components/Control.vue"
|
|
|
1449
1467
|
// 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
1468
|
/* harmony default export */ var Tipvue_type_script_lang_js = ({
|
|
1451
1469
|
name: 'rp-treeselect--tip',
|
|
1452
|
-
functional: true,
|
|
1453
1470
|
props: {
|
|
1454
1471
|
type: {
|
|
1455
1472
|
type: String,
|
|
@@ -1460,19 +1477,20 @@ Control_component.options.__file = "src/components/Control.vue"
|
|
|
1460
1477
|
required: true
|
|
1461
1478
|
}
|
|
1462
1479
|
},
|
|
1463
|
-
render: function render(
|
|
1480
|
+
render: function render() {
|
|
1464
1481
|
var h = arguments[0];
|
|
1465
|
-
var props =
|
|
1466
|
-
|
|
1482
|
+
var _this$$props = this.$props,
|
|
1483
|
+
icon = _this$$props.icon,
|
|
1484
|
+
type = _this$$props.type;
|
|
1467
1485
|
return h("div", {
|
|
1468
|
-
"class": "rp-treeselect__tip rp-treeselect__".concat(
|
|
1486
|
+
"class": "rp-treeselect__tip rp-treeselect__".concat(type, "-tip")
|
|
1469
1487
|
}, [h("div", {
|
|
1470
1488
|
"class": "rp-treeselect__icon-container"
|
|
1471
1489
|
}, [h("span", {
|
|
1472
|
-
"class": "rp-treeselect__icon-".concat(
|
|
1490
|
+
"class": "rp-treeselect__icon-".concat(icon)
|
|
1473
1491
|
})]), h("span", {
|
|
1474
|
-
"class": "rp-treeselect__tip-text rp-treeselect__".concat(
|
|
1475
|
-
}, [
|
|
1492
|
+
"class": "rp-treeselect__tip-text rp-treeselect__".concat(type, "-tip-text")
|
|
1493
|
+
}, [h("slot")])]);
|
|
1476
1494
|
}
|
|
1477
1495
|
});
|
|
1478
1496
|
// CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js
|
|
@@ -1785,17 +1803,20 @@ Option_component.options.__file = "src/components/Option.vue"
|
|
|
1785
1803
|
|
|
1786
1804
|
|
|
1787
1805
|
|
|
1806
|
+
|
|
1788
1807
|
var directionMap = {
|
|
1789
1808
|
top: 'top',
|
|
1790
1809
|
bottom: 'bottom',
|
|
1791
1810
|
above: 'top',
|
|
1792
1811
|
below: 'bottom'
|
|
1793
1812
|
};
|
|
1794
|
-
|
|
1795
1813
|
/* harmony default export */ var Menuvue_type_script_lang_js = ({
|
|
1796
1814
|
name: 'rp-treeselect--menu',
|
|
1797
1815
|
setup: function setup() {
|
|
1798
|
-
var
|
|
1816
|
+
var instance = Object(external_vue_["inject"])('instance');
|
|
1817
|
+
return {
|
|
1818
|
+
instance: instance
|
|
1819
|
+
};
|
|
1799
1820
|
},
|
|
1800
1821
|
computed: {
|
|
1801
1822
|
menuStyle: function menuStyle() {
|
|
@@ -2311,9 +2332,6 @@ function getErrorMessage(err) {
|
|
|
2311
2332
|
var instanceId = 0;
|
|
2312
2333
|
/* harmony default export */ var Treeselectvue_type_script_lang_js = ({
|
|
2313
2334
|
name: 'rp-treeselect',
|
|
2314
|
-
setup: function setup() {
|
|
2315
|
-
Object(external_vue_["provide"])('instance', this);
|
|
2316
|
-
},
|
|
2317
2335
|
props: {
|
|
2318
2336
|
allowClearingDisabled: {
|
|
2319
2337
|
type: Boolean,
|
|
@@ -2751,6 +2769,7 @@ var instanceId = 0;
|
|
|
2751
2769
|
created: function created() {
|
|
2752
2770
|
this.verifyProps();
|
|
2753
2771
|
this.resetFlags();
|
|
2772
|
+
Object(external_vue_["provide"])('instance', this);
|
|
2754
2773
|
},
|
|
2755
2774
|
mounted: function mounted() {
|
|
2756
2775
|
if (this.autoFocus) this.focusInput();
|
|
@@ -3663,7 +3682,7 @@ var style = __webpack_require__(15);
|
|
|
3663
3682
|
/* harmony default export */ var src = __webpack_exports__["default"] = (Treeselect);
|
|
3664
3683
|
|
|
3665
3684
|
|
|
3666
|
-
var VERSION = "0.0.
|
|
3685
|
+
var VERSION = "0.0.8";
|
|
3667
3686
|
|
|
3668
3687
|
/***/ })
|
|
3669
3688
|
/******/ ]);
|