@danielgindi/selectbox 1.0.67 → 1.0.70
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/css/selectbox.css +1 -1
- package/css/selectbox.css.map +1 -1
- package/dist/lib.cjs.js +94 -25
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +62 -7
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +94 -25
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/SelectBox.js +61 -6
- package/package.json +1 -1
- package/scss/selectbox.scss +5 -1
- package/vue/SelectBox.vue +25 -17
package/css/selectbox.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.selectbox{position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:4px;border:solid #aaa 1px}.selectbox.selectbox__searchable{cursor:text}.selectbox[aria-disabled=true]{border:solid #aaa 1px;background-color:#eee;cursor:default}.selectbox[aria-disabled=true] *{cursor:default}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}.selectbox.selectbox__single{padding-top:4px}.selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:17px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:0;padding-left:17px}.selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),.selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:27px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),[dir=rtl] .selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:0;padding-left:27px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:44px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:0;padding-left:44px}.selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:54px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:0;padding-left:54px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:74px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:0;padding-left:74px}.selectbox.selectbox__multi{padding-top:5px}.selectbox__focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.selectbox__list{box-sizing:border-box;list-style:none none;display:inline-block;vertical-align:top;overflow:hidden;width:100%;margin:-5px 0 0;padding:0 8px 4px;text-overflow:ellipsis;white-space:nowrap}.selectbox__list::before{float:right;display:block;content:"";width:0;height:25px}[dir=rtl] .selectbox__list::before{float:left}.selectbox__has_open_indicator .selectbox__list::before,.selectbox__has_clear .selectbox__list::before,.selectbox__has_spinner .selectbox__list::before{margin-left:-8px;margin-right:-8px}.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner) .selectbox__list::before{width:17px}.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner) .selectbox__list::before,.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear) .selectbox__list::before{width:27px}.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear) .selectbox__list::before,.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner) .selectbox__list::before{width:44px}.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator) .selectbox__list::before{width:54px}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner .selectbox__list::before{width:74px}.selectbox__open_indicator{position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.6423em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:.2em .2em 0 0;content:"";display:inline-block;height:.45em;left:.2em;position:relative;top:-0.18em;transform:rotate(135deg);vertical-align:top;width:.45em;transition:transform 150ms cubic-bezier(1, -0.115, 0.975, 0.855)}[dir=rtl] .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}[dir=rtl] .selectbox__open_indicator{right:auto;left:4px}.selectbox__clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__clear>button{box-sizing:border-box;display:block;cursor:pointer;font-weight:bold;width:26px;text-align:center;font-size:13px;line-height:1.4;margin:0;padding:0
|
|
1
|
+
.selectbox{position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:4px;border:solid #aaa 1px}.selectbox.selectbox__searchable{cursor:text}.selectbox[aria-disabled=true]{border:solid #aaa 1px;background-color:#eee;cursor:default}.selectbox[aria-disabled=true] *{cursor:default}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}.selectbox.selectbox__single{padding-top:4px}.selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:17px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:0;padding-left:17px}.selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),.selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:27px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),[dir=rtl] .selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:0;padding-left:27px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:44px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:0;padding-left:44px}.selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:54px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:0;padding-left:54px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:74px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:0;padding-left:74px}.selectbox.selectbox__multi{padding-top:5px}.selectbox__focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.selectbox__list{box-sizing:border-box;list-style:none none;display:inline-block;vertical-align:top;overflow:hidden;width:100%;margin:-5px 0 0;padding:0 8px 4px;text-overflow:ellipsis;white-space:nowrap}.selectbox__list::before{float:right;display:block;content:"";width:0;height:25px}[dir=rtl] .selectbox__list::before{float:left}.selectbox__has_open_indicator .selectbox__list::before,.selectbox__has_clear .selectbox__list::before,.selectbox__has_spinner .selectbox__list::before{margin-left:-8px;margin-right:-8px}.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner) .selectbox__list::before{width:17px}.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner) .selectbox__list::before,.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear) .selectbox__list::before{width:27px}.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear) .selectbox__list::before,.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner) .selectbox__list::before{width:44px}.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator) .selectbox__list::before{width:54px}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner .selectbox__list::before{width:74px}.selectbox__open_indicator{position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.6423em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:.2em .2em 0 0;content:"";display:inline-block;height:.45em;left:.2em;position:relative;top:-0.18em;transform:rotate(135deg);vertical-align:top;width:.45em;transition:transform 150ms cubic-bezier(1, -0.115, 0.975, 0.855)}[dir=rtl] .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}[dir=rtl] .selectbox__open_indicator{right:auto;left:4px}.selectbox__clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__clear>button{box-sizing:border-box;display:block;cursor:pointer;font-weight:bold;width:26px;text-align:center;font-size:13px;line-height:1.4;margin:0;padding:0;border:0;background:none}.selectbox__clear>button:before{content:"×"}.selectbox__clear>button:focus{outline:none;color:red}[dir=rtl] .selectbox__clear{right:auto;left:2px}.selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:14px}[dir=rtl] .selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:auto;left:14px}.selectbox[aria-disabled=true]>.selectbox__clear{display:none}.selectbox__spinner{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__spinner::before{content:"";display:block;font-size:1em;width:1em;height:1em;text-indent:-9999em;overflow:hidden;border-top:.3em solid rgba(100,100,100,.1);border-right:.3em solid rgba(100,100,100,.1);border-bottom:.3em solid rgba(100,100,100,.1);border-left:.3em solid rgba(60,60,60,.45);border-radius:50%;transform:translateZ(0);animation:selectbox__spinner_anim 1.1s infinite linear;transition:opacity .1s}[dir=rtl] .selectbox__spinner{right:auto;left:2px}.selectbox__has_spinner.selectbox__has_open_indicator .selectbox__spinner{right:22px}[dir=rtl] .selectbox__has_spinner.selectbox__has_open_indicator .selectbox__spinner{right:auto;left:22px}.selectbox__has_spinner.selectbox__has_clear .selectbox__spinner{right:36px}[dir=rtl] .selectbox__has_spinner.selectbox__has_clear .selectbox__spinner{right:auto;left:36px}.selectbox__item{box-sizing:border-box;float:left;cursor:default;background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;margin-left:0;margin-right:5px;margin-top:5px;padding:0 5px 2px}.selectbox__item span{vertical-align:middle}.selectbox__item:focus{background-color:#ccc;outline:0}[dir=rtl] .selectbox__item{float:right;margin-left:5px;margin-right:0}.selectbox__item_remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;font-size:13px}.selectbox__item_remove:before{content:"×"}[dir=rtl] .selectbox__item_remove{margin-left:2px;margin-right:0}.selectbox__single_wrapper{position:relative;min-height:1em;max-width:100%;margin:0 0 3px;padding:2px 0 1px;color:currentColor}.selectbox__single_wrapper:empty::after{content:""}.selectbox__empty_selection .selectbox__single_wrapper{width:12em}.selectbox__has_selection.selectbox__has_input .selectbox__single_wrapper{opacity:0}.selectbox__has_selection.selectbox__empty_input.has_droplist .selectbox__single_wrapper,.selectbox__has_selection.selectbox__empty_input.selectbox__focus .selectbox__single_wrapper{opacity:.5}.selectbox__search_wrapper{max-width:100%}.selectbox__multi .selectbox__search_wrapper{float:left;margin-top:5px}[dir=rtl] .selectbox__multi .selectbox__search_wrapper{float:right}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;left:0;top:4px}[dir=rtl] .selectbox__single .selectbox__search_wrapper{right:0;left:auto}input.selectbox__search_field{box-sizing:border-box;display:inline-block;height:auto;max-width:100%;cursor:inherit;color:currentColor;-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);box-shadow:none;border:none;border-radius:0;outline:0;margin:0;padding:2px 0;font-size:1em;line-height:normal}input.selectbox__search_field::-webkit-search-decoration,input.selectbox__search_field::-webkit-search-cancel-button,input.selectbox__search_field::-webkit-search-results-button,input.selectbox__search_field::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field::-ms-clear{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field:focus{outline:0 !important;border:0 !important;box-shadow:none !important}.selectbox__single_wrapper,.selectbox__single input.selectbox__search_field{padding-left:8px;padding-right:8px}@-webkit-keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
|
|
2
2
|
|
|
3
3
|
/*# sourceMappingURL=selectbox.css.map */
|
package/css/selectbox.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CAGA,WACI,kBACA,sBACA,qBACA,eACA,UAEA,iBACA,yBAEA,WACA,sBACA,kBACA,sBAEA,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,6BACI,gBAEA,mHACI,mBAEA,6HACI,gBACA,kBAIR,sOAEI,mBAEA,0PACI,gBACA,kBAIR,0NAEI,mBAEA,8OACI,gBACA,kBAIR,6GACI,mBAEA,uHACI,gBACA,kBAIR,uGACI,mBAEA,iHACI,gBACA,kBAKZ,4BACI,gBAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBACA,gBAEA,WACA,gBACA,kBAEA,uBACA,mBAEA,yBAEI,YAEA,cACA,WACA,QACA,YAEA,mCACI,WAOJ,wJACI,iBACA,kBAKJ,gHACI,WAMJ,gOACI,WAMJ,oNACI,WAKJ,0GACI,WAKJ,oGACI,WAKZ,2BACI,kBACA,UACA,QACA,2BACA,UACA,cACA,UACA,eACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,2BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,6CACI,0BAGJ,yDACI,yCAGJ,qCACI,WACA,SAIR,kBACI,kBACA,UACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CAGA,WACI,kBACA,sBACA,qBACA,eACA,UAEA,iBACA,yBAEA,WACA,sBACA,kBACA,sBAEA,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,6BACI,gBAEA,mHACI,mBAEA,6HACI,gBACA,kBAIR,sOAEI,mBAEA,0PACI,gBACA,kBAIR,0NAEI,mBAEA,8OACI,gBACA,kBAIR,6GACI,mBAEA,uHACI,gBACA,kBAIR,uGACI,mBAEA,iHACI,gBACA,kBAKZ,4BACI,gBAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBACA,gBAEA,WACA,gBACA,kBAEA,uBACA,mBAEA,yBAEI,YAEA,cACA,WACA,QACA,YAEA,mCACI,WAOJ,wJACI,iBACA,kBAKJ,gHACI,WAMJ,gOACI,WAMJ,oNACI,WAKJ,0GACI,WAKJ,oGACI,WAKZ,2BACI,kBACA,UACA,QACA,2BACA,UACA,cACA,UACA,eACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,2BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,6CACI,0BAGJ,yDACI,yCAGJ,qCACI,WACA,SAIR,kBACI,kBACA,UACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,UACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UAIR,4BACI,WACA,SAGJ,sEACI,WAEA,gFACI,WACA,UAIR,iDACI,aAIR,oBACI,kBACA,UACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBAGJ,8BACI,WACA,SAGJ,0EACI,WAEA,oFACI,WACA,UAIR,iEACI,WAEA,2EACI,WACA,UAKZ,iBAEI,sBACA,WACA,eAEA,yBACA,sBACA,kBAEA,cACA,iBACA,eACA,kBAEH,sBACC,sBAGD,uBACC,sBACA,UAGE,2BACI,YACA,gBACA,eAIR,wBACI,WACA,eACA,qBACA,iBACA,iBACH,eAEA,+BACC,YAGE,kCACI,gBACA,eAIR,2BACI,kBACA,eACA,eACA,eACA,kBACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,WACA,eAEA,uDACI,YAIR,8CACI,kBACA,UACA,OACA,QAEA,wDACI,QACA,UAKZ,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,cAEA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,4EAEI,iBACA,kBAGJ,2CACI,GACI,uBAEJ,KACI,0BAIR,mCACI,GACI,uBAEJ,KACI","file":"selectbox.css"}
|
package/dist/lib.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.70
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -8820,7 +8820,7 @@ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$2;
|
|
|
8820
8820
|
var setToStringTag = setToStringTag$4;
|
|
8821
8821
|
var inheritIfRequired = inheritIfRequired$2;
|
|
8822
8822
|
|
|
8823
|
-
var collection$
|
|
8823
|
+
var collection$2 = function (CONSTRUCTOR_NAME, wrapper, common) {
|
|
8824
8824
|
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
|
8825
8825
|
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
|
8826
8826
|
var ADDER = IS_MAP ? 'set' : 'add';
|
|
@@ -8933,7 +8933,7 @@ var InternalStateModule = internalState;
|
|
|
8933
8933
|
var setInternalState = InternalStateModule.set;
|
|
8934
8934
|
var internalStateGetterFor = InternalStateModule.getterFor;
|
|
8935
8935
|
|
|
8936
|
-
var collectionStrong$
|
|
8936
|
+
var collectionStrong$2 = {
|
|
8937
8937
|
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
|
8938
8938
|
var Constructor = wrapper(function (that, iterable) {
|
|
8939
8939
|
anInstance(that, Prototype);
|
|
@@ -9123,14 +9123,14 @@ var collectionStrong$1 = {
|
|
|
9123
9123
|
};
|
|
9124
9124
|
|
|
9125
9125
|
'use strict';
|
|
9126
|
-
var collection = collection$
|
|
9127
|
-
var collectionStrong = collectionStrong$
|
|
9126
|
+
var collection$1 = collection$2;
|
|
9127
|
+
var collectionStrong$1 = collectionStrong$2;
|
|
9128
9128
|
|
|
9129
9129
|
// `Set` constructor
|
|
9130
9130
|
// https://tc39.es/ecma262/#sec-set-objects
|
|
9131
|
-
collection('Set', function (init) {
|
|
9131
|
+
collection$1('Set', function (init) {
|
|
9132
9132
|
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
9133
|
-
}, collectionStrong);
|
|
9133
|
+
}, collectionStrong$1);
|
|
9134
9134
|
|
|
9135
9135
|
var web_domCollections_iterator = {};
|
|
9136
9136
|
|
|
@@ -9370,6 +9370,20 @@ $$2({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
|
9370
9370
|
}
|
|
9371
9371
|
});
|
|
9372
9372
|
|
|
9373
|
+
var es_map = {};
|
|
9374
|
+
|
|
9375
|
+
var es_map_constructor = {};
|
|
9376
|
+
|
|
9377
|
+
'use strict';
|
|
9378
|
+
var collection = collection$2;
|
|
9379
|
+
var collectionStrong = collectionStrong$2;
|
|
9380
|
+
|
|
9381
|
+
// `Map` constructor
|
|
9382
|
+
// https://tc39.es/ecma262/#sec-map-objects
|
|
9383
|
+
collection('Map', function (init) {
|
|
9384
|
+
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
9385
|
+
}, collectionStrong);
|
|
9386
|
+
|
|
9373
9387
|
var es_array_findIndex = {};
|
|
9374
9388
|
|
|
9375
9389
|
'use strict';
|
|
@@ -9667,6 +9681,7 @@ var inputBackbufferCssProps = [
|
|
|
9667
9681
|
* @property {boolean|'touch'} [blurOnSingleSelection='touch']
|
|
9668
9682
|
* @property {boolean} [multi=false] can multiple values be selected?
|
|
9669
9683
|
* @property {boolean} [showSelection=true] show selection? if false, the placeholder will take effect
|
|
9684
|
+
* @property {boolean} [showPlaceholderInTooltip=false] show placeholder in title attribute
|
|
9670
9685
|
* @property {function(items: DropList.ItemBase[]):string} [multiPlaceholderFormatter] formatter for placeholder for multi items mode
|
|
9671
9686
|
* @property {boolean} [searchable=false] is it searchable?
|
|
9672
9687
|
* @property {string} [noResultsText='No matching results'] text for no results (empty for none)
|
|
@@ -9710,6 +9725,7 @@ var defaultOptions = {
|
|
|
9710
9725
|
blurOnSingleSelection: 'touch',
|
|
9711
9726
|
multi: false,
|
|
9712
9727
|
showSelection: true,
|
|
9728
|
+
showPlaceholderInTooltip: false,
|
|
9713
9729
|
multiPlaceholderFormatter: null,
|
|
9714
9730
|
searchable: true,
|
|
9715
9731
|
noResultsText: 'No matching results',
|
|
@@ -9800,6 +9816,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
9800
9816
|
blurOnSingleSelection: o.blurOnSingleSelection,
|
|
9801
9817
|
multi: o.multi,
|
|
9802
9818
|
showSelection: o.showSelection,
|
|
9819
|
+
showPlaceholderInTooltip: o.showPlaceholderInTooltip,
|
|
9803
9820
|
multiPlaceholderFormatter: o.multiPlaceholderFormatter,
|
|
9804
9821
|
searchable: o.searchable,
|
|
9805
9822
|
noResultsText: o.noResultsText,
|
|
@@ -9935,6 +9952,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
9935
9952
|
}
|
|
9936
9953
|
|
|
9937
9954
|
this.setItems(o.items);
|
|
9955
|
+
delete o.items; // we do not need this in memory anymore
|
|
9938
9956
|
|
|
9939
9957
|
if (o.multi && Array.isArray(o.selectedValues)) {
|
|
9940
9958
|
this.setSelectedValues(o.selectedValues);
|
|
@@ -10086,6 +10104,8 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10086
10104
|
p.filteredItems = null;
|
|
10087
10105
|
p.itemsChanged = true;
|
|
10088
10106
|
|
|
10107
|
+
this._updateItemByValueMap();
|
|
10108
|
+
|
|
10089
10109
|
if (resetValues) {
|
|
10090
10110
|
this.setSelectedValues(this.getSelectedValues());
|
|
10091
10111
|
}
|
|
@@ -10115,9 +10135,9 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10115
10135
|
} }, { key: "updateItemByValue", value:
|
|
10116
10136
|
|
|
10117
10137
|
function updateItemByValue(value, newItem) {
|
|
10118
|
-
var p = this._p
|
|
10138
|
+
var p = this._p;
|
|
10119
10139
|
|
|
10120
|
-
var existingItem = p.
|
|
10140
|
+
var existingItem = p.itemByValueMap.get(value);
|
|
10121
10141
|
if (existingItem)
|
|
10122
10142
|
Object.assign(existingItem, newItem);
|
|
10123
10143
|
|
|
@@ -10398,7 +10418,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10398
10418
|
if (p.showSelection === showSelection)
|
|
10399
10419
|
return this;
|
|
10400
10420
|
|
|
10401
|
-
|
|
10421
|
+
p.showSelection = showSelection;
|
|
10402
10422
|
this._scheduleSync('full');
|
|
10403
10423
|
return this;
|
|
10404
10424
|
}
|
|
@@ -10410,6 +10430,28 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10410
10430
|
return this._p.showSelection;
|
|
10411
10431
|
}
|
|
10412
10432
|
|
|
10433
|
+
/**
|
|
10434
|
+
* @param {boolean} showPlaceholderInTooltip
|
|
10435
|
+
* @returns {SelectBox}
|
|
10436
|
+
*/ }, { key: "setShowPlaceholderInTooltip", value:
|
|
10437
|
+
function setShowPlaceholderInTooltip(showPlaceholderInTooltip) {
|
|
10438
|
+
var p = this._p;
|
|
10439
|
+
showPlaceholderInTooltip = !!showPlaceholderInTooltip;
|
|
10440
|
+
if (p.showPlaceholderInTooltip === showPlaceholderInTooltip)
|
|
10441
|
+
return this;
|
|
10442
|
+
|
|
10443
|
+
p.showPlaceholderInTooltip = showPlaceholderInTooltip;
|
|
10444
|
+
this._scheduleSync('full');
|
|
10445
|
+
return this;
|
|
10446
|
+
}
|
|
10447
|
+
|
|
10448
|
+
/**
|
|
10449
|
+
* @returns {boolean}
|
|
10450
|
+
*/ }, { key: "isShowPlaceholderInTooltipEnabled", value:
|
|
10451
|
+
function isShowPlaceholderInTooltipEnabled() {
|
|
10452
|
+
return this._p.showPlaceholderInTooltip;
|
|
10453
|
+
}
|
|
10454
|
+
|
|
10413
10455
|
/**
|
|
10414
10456
|
* @param {function(items: DropList.ItemBase[]):string} formatter
|
|
10415
10457
|
* @returns {SelectBox}
|
|
@@ -10420,7 +10462,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10420
10462
|
if (p.multiPlaceholderFormatter === formatter)
|
|
10421
10463
|
return this;
|
|
10422
10464
|
|
|
10423
|
-
|
|
10465
|
+
p.multiPlaceholderFormatter = formatter;
|
|
10424
10466
|
this._scheduleSync('full');
|
|
10425
10467
|
return this;
|
|
10426
10468
|
}
|
|
@@ -10434,7 +10476,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10434
10476
|
if (p.blurOnSingleSelection === value)
|
|
10435
10477
|
return this;
|
|
10436
10478
|
|
|
10437
|
-
|
|
10479
|
+
p.blurOnSingleSelection = value;
|
|
10438
10480
|
return this;
|
|
10439
10481
|
}
|
|
10440
10482
|
|
|
@@ -10639,11 +10681,17 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10639
10681
|
*/ }, { key: "setValueProp", value:
|
|
10640
10682
|
function setValueProp(prop) {
|
|
10641
10683
|
var p = this._p;
|
|
10684
|
+
|
|
10685
|
+
if (p.valueProp === prop)
|
|
10686
|
+
return this;
|
|
10687
|
+
|
|
10642
10688
|
p.valueProp = prop;
|
|
10643
10689
|
|
|
10644
10690
|
if (p.dropList)
|
|
10645
10691
|
p.dropList.setValueProp(prop);
|
|
10646
10692
|
|
|
10693
|
+
this._updateItemByValueMap();
|
|
10694
|
+
|
|
10647
10695
|
return this;
|
|
10648
10696
|
}
|
|
10649
10697
|
|
|
@@ -10788,19 +10836,19 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10788
10836
|
var selectedValues = [];
|
|
10789
10837
|
var selectedItems = [];var _iterator2 = _createForOfIteratorHelper(
|
|
10790
10838
|
|
|
10791
|
-
values),_step2;try {
|
|
10839
|
+
values),_step2;try {for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {var value = _step2.value;
|
|
10792
10840
|
if (set.has(value))
|
|
10793
|
-
|
|
10841
|
+
continue;
|
|
10794
10842
|
set.add(value);
|
|
10795
10843
|
|
|
10796
10844
|
selectedValues.push(value);
|
|
10797
10845
|
|
|
10798
|
-
var item = p.
|
|
10846
|
+
var item = p.itemByValueMap.get(value);
|
|
10799
10847
|
if (item !== undefined) {
|
|
10800
10848
|
selectedItems.push(item);
|
|
10801
10849
|
} else {
|
|
10802
10850
|
selectedItems.push(_defineProperty({}, p.valueProp, value));
|
|
10803
|
-
}
|
|
10851
|
+
}
|
|
10804
10852
|
}} catch (err) {_iterator2.e(err);} finally {_iterator2.f();}
|
|
10805
10853
|
|
|
10806
10854
|
p.selectedValues = selectedValues;
|
|
@@ -11016,6 +11064,21 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11016
11064
|
return this;
|
|
11017
11065
|
}
|
|
11018
11066
|
|
|
11067
|
+
/**
|
|
11068
|
+
* Prepare the mapping between values and items.
|
|
11069
|
+
* This reduces search time greatly (i.e when checking items), especially when Vue proxies are in place.
|
|
11070
|
+
* @private
|
|
11071
|
+
*/ }, { key: "_updateItemByValueMap", value:
|
|
11072
|
+
function _updateItemByValueMap() {
|
|
11073
|
+
var p = this._p;
|
|
11074
|
+
|
|
11075
|
+
var itemByValueMap = p.itemByValueMap = new Map();
|
|
11076
|
+
var valueProp = p.valueProp;var _iterator3 = _createForOfIteratorHelper(
|
|
11077
|
+
p.items),_step3;try {for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {var item = _step3.value;
|
|
11078
|
+
itemByValueMap.set(item[valueProp], item);
|
|
11079
|
+
}} catch (err) {_iterator3.e(err);} finally {_iterator3.f();}
|
|
11080
|
+
}
|
|
11081
|
+
|
|
11019
11082
|
/** @private */ }, { key: "_renderBase", value:
|
|
11020
11083
|
function _renderBase() {var _this4 = this;
|
|
11021
11084
|
var p = this._p;
|
|
@@ -11926,9 +11989,9 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11926
11989
|
var p = this._p;
|
|
11927
11990
|
|
|
11928
11991
|
if (this[DestroyedSymbol])
|
|
11929
|
-
return;var
|
|
11992
|
+
return;var _iterator4 = _createForOfIteratorHelper(
|
|
11930
11993
|
|
|
11931
|
-
queue),
|
|
11994
|
+
queue),_step4;try {for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {var op = _step4.value;
|
|
11932
11995
|
switch (op.mode) {
|
|
11933
11996
|
case 'full':
|
|
11934
11997
|
this._syncFull(true);
|
|
@@ -11993,7 +12056,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11993
12056
|
this._syncFull(false);
|
|
11994
12057
|
break;}
|
|
11995
12058
|
|
|
11996
|
-
}} catch (err) {
|
|
12059
|
+
}} catch (err) {_iterator4.e(err);} finally {_iterator4.f();}
|
|
11997
12060
|
} }, { key: "_cleanupSingleWrapper", value:
|
|
11998
12061
|
|
|
11999
12062
|
function _cleanupSingleWrapper() {
|
|
@@ -12174,6 +12237,12 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
12174
12237
|
|
|
12175
12238
|
// Set input placeholder
|
|
12176
12239
|
p.input.setAttribute('placeholder', placeholder);
|
|
12240
|
+
|
|
12241
|
+
if (p.showPlaceholderInTooltip) {
|
|
12242
|
+
p.input.setAttribute('title', placeholder);
|
|
12243
|
+
} else {
|
|
12244
|
+
p.input.removeAttribute('title');
|
|
12245
|
+
}
|
|
12177
12246
|
}
|
|
12178
12247
|
|
|
12179
12248
|
/** @private */ }, { key: "_syncSingleItem", value:
|
|
@@ -12368,19 +12437,19 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
12368
12437
|
if (value === RestMultiItemsSymbol) {
|
|
12369
12438
|
var items = (p.treatGroupSelectionAsItems ? p.selectedItems : p.selectedItems.filter(function (x) {return !x._group;})).
|
|
12370
12439
|
slice(p.maxMultiItems);
|
|
12371
|
-
var itemsToRemove = [];var
|
|
12440
|
+
var itemsToRemove = [];var _iterator5 = _createForOfIteratorHelper(
|
|
12372
12441
|
|
|
12373
|
-
items),
|
|
12442
|
+
items),_step5;try {for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {var _item3 = _step5.value;
|
|
12374
12443
|
var removeselEvt = { value: value, item: _item3, cancel: false };
|
|
12375
12444
|
this._trigger('removesel:before', removeselEvt);
|
|
12376
12445
|
if (!removeselEvt.cancel)
|
|
12377
12446
|
itemsToRemove.push(_item3);
|
|
12378
|
-
}} catch (err) {
|
|
12447
|
+
}} catch (err) {_iterator5.e(err);} finally {_iterator5.f();}
|
|
12379
12448
|
|
|
12380
12449
|
if (itemsToRemove.length > 0) {
|
|
12381
|
-
this._removeMultiItemElementByIndex(p.multiItemEls.length - 1);var
|
|
12450
|
+
this._removeMultiItemElementByIndex(p.multiItemEls.length - 1);var _iterator6 = _createForOfIteratorHelper(
|
|
12382
12451
|
|
|
12383
|
-
itemsToRemove),
|
|
12452
|
+
itemsToRemove),_step6;try {for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {var _item2 = _step6.value;
|
|
12384
12453
|
// sync selection
|
|
12385
12454
|
var idx = p.selectedItems.indexOf(_item2);
|
|
12386
12455
|
if (idx === -1)
|
|
@@ -12391,7 +12460,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
12391
12460
|
p.selectionChanged = true;
|
|
12392
12461
|
p.resortBySelectionNeeded = true;
|
|
12393
12462
|
}
|
|
12394
|
-
}} catch (err) {
|
|
12463
|
+
}} catch (err) {_iterator6.e(err);} finally {_iterator6.f();}
|
|
12395
12464
|
}
|
|
12396
12465
|
|
|
12397
12466
|
if (items.length > itemsToRemove.length) {
|