@majoo-ui/react 1.59.6-rc.2 → 1.59.6-rc.4
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/components/form/components/InputSelect/InputSelect.d.ts +6 -1
- package/index.esm.js +308 -248
- package/index.umd.js +327 -261
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -11123,6 +11123,181 @@
|
|
|
11123
11123
|
};
|
|
11124
11124
|
InputSearchbox.displayName = 'InputSearchbox';
|
|
11125
11125
|
|
|
11126
|
+
var tryToString$2 = tryToString$5;
|
|
11127
|
+
|
|
11128
|
+
var $TypeError$5 = TypeError;
|
|
11129
|
+
|
|
11130
|
+
var deletePropertyOrThrow$1 = function (O, P) {
|
|
11131
|
+
if (!delete O[P]) throw $TypeError$5('Cannot delete property ' + tryToString$2(P) + ' of ' + tryToString$2(O));
|
|
11132
|
+
};
|
|
11133
|
+
|
|
11134
|
+
var arraySlice$3 = arraySliceSimple;
|
|
11135
|
+
|
|
11136
|
+
var floor$2 = Math.floor;
|
|
11137
|
+
|
|
11138
|
+
var mergeSort = function (array, comparefn) {
|
|
11139
|
+
var length = array.length;
|
|
11140
|
+
var middle = floor$2(length / 2);
|
|
11141
|
+
return length < 8 ? insertionSort(array, comparefn) : merge(
|
|
11142
|
+
array,
|
|
11143
|
+
mergeSort(arraySlice$3(array, 0, middle), comparefn),
|
|
11144
|
+
mergeSort(arraySlice$3(array, middle), comparefn),
|
|
11145
|
+
comparefn
|
|
11146
|
+
);
|
|
11147
|
+
};
|
|
11148
|
+
|
|
11149
|
+
var insertionSort = function (array, comparefn) {
|
|
11150
|
+
var length = array.length;
|
|
11151
|
+
var i = 1;
|
|
11152
|
+
var element, j;
|
|
11153
|
+
|
|
11154
|
+
while (i < length) {
|
|
11155
|
+
j = i;
|
|
11156
|
+
element = array[i];
|
|
11157
|
+
while (j && comparefn(array[j - 1], element) > 0) {
|
|
11158
|
+
array[j] = array[--j];
|
|
11159
|
+
}
|
|
11160
|
+
if (j !== i++) array[j] = element;
|
|
11161
|
+
} return array;
|
|
11162
|
+
};
|
|
11163
|
+
|
|
11164
|
+
var merge = function (array, left, right, comparefn) {
|
|
11165
|
+
var llength = left.length;
|
|
11166
|
+
var rlength = right.length;
|
|
11167
|
+
var lindex = 0;
|
|
11168
|
+
var rindex = 0;
|
|
11169
|
+
|
|
11170
|
+
while (lindex < llength || rindex < rlength) {
|
|
11171
|
+
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
|
11172
|
+
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
|
11173
|
+
: lindex < llength ? left[lindex++] : right[rindex++];
|
|
11174
|
+
} return array;
|
|
11175
|
+
};
|
|
11176
|
+
|
|
11177
|
+
var arraySort$1 = mergeSort;
|
|
11178
|
+
|
|
11179
|
+
var userAgent$4 = engineUserAgent;
|
|
11180
|
+
|
|
11181
|
+
var firefox = userAgent$4.match(/firefox\/(\d+)/i);
|
|
11182
|
+
|
|
11183
|
+
var engineFfVersion = !!firefox && +firefox[1];
|
|
11184
|
+
|
|
11185
|
+
var UA = engineUserAgent;
|
|
11186
|
+
|
|
11187
|
+
var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
|
|
11188
|
+
|
|
11189
|
+
var userAgent$3 = engineUserAgent;
|
|
11190
|
+
|
|
11191
|
+
var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./);
|
|
11192
|
+
|
|
11193
|
+
var engineWebkitVersion = !!webkit && +webkit[1];
|
|
11194
|
+
|
|
11195
|
+
var $$c = _export;
|
|
11196
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
11197
|
+
var aCallable$6 = aCallable$a;
|
|
11198
|
+
var toObject$1 = toObject$7;
|
|
11199
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$6;
|
|
11200
|
+
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
11201
|
+
var toString$4 = toString$j;
|
|
11202
|
+
var fails$4 = fails$t;
|
|
11203
|
+
var internalSort = arraySort$1;
|
|
11204
|
+
var arrayMethodIsStrict = arrayMethodIsStrict$2;
|
|
11205
|
+
var FF = engineFfVersion;
|
|
11206
|
+
var IE_OR_EDGE = engineIsIeOrEdge;
|
|
11207
|
+
var V8 = engineV8Version;
|
|
11208
|
+
var WEBKIT = engineWebkitVersion;
|
|
11209
|
+
|
|
11210
|
+
var test = [];
|
|
11211
|
+
var nativeSort = uncurryThis$6(test.sort);
|
|
11212
|
+
var push$3 = uncurryThis$6(test.push);
|
|
11213
|
+
|
|
11214
|
+
// IE8-
|
|
11215
|
+
var FAILS_ON_UNDEFINED = fails$4(function () {
|
|
11216
|
+
test.sort(undefined);
|
|
11217
|
+
});
|
|
11218
|
+
// V8 bug
|
|
11219
|
+
var FAILS_ON_NULL = fails$4(function () {
|
|
11220
|
+
test.sort(null);
|
|
11221
|
+
});
|
|
11222
|
+
// Old WebKit
|
|
11223
|
+
var STRICT_METHOD = arrayMethodIsStrict('sort');
|
|
11224
|
+
|
|
11225
|
+
var STABLE_SORT = !fails$4(function () {
|
|
11226
|
+
// feature detection can be too slow, so check engines versions
|
|
11227
|
+
if (V8) return V8 < 70;
|
|
11228
|
+
if (FF && FF > 3) return;
|
|
11229
|
+
if (IE_OR_EDGE) return true;
|
|
11230
|
+
if (WEBKIT) return WEBKIT < 603;
|
|
11231
|
+
|
|
11232
|
+
var result = '';
|
|
11233
|
+
var code, chr, value, index;
|
|
11234
|
+
|
|
11235
|
+
// generate an array with more 512 elements (Chakra and old V8 fails only in this case)
|
|
11236
|
+
for (code = 65; code < 76; code++) {
|
|
11237
|
+
chr = String.fromCharCode(code);
|
|
11238
|
+
|
|
11239
|
+
switch (code) {
|
|
11240
|
+
case 66: case 69: case 70: case 72: value = 3; break;
|
|
11241
|
+
case 68: case 71: value = 4; break;
|
|
11242
|
+
default: value = 2;
|
|
11243
|
+
}
|
|
11244
|
+
|
|
11245
|
+
for (index = 0; index < 47; index++) {
|
|
11246
|
+
test.push({ k: chr + index, v: value });
|
|
11247
|
+
}
|
|
11248
|
+
}
|
|
11249
|
+
|
|
11250
|
+
test.sort(function (a, b) { return b.v - a.v; });
|
|
11251
|
+
|
|
11252
|
+
for (index = 0; index < test.length; index++) {
|
|
11253
|
+
chr = test[index].k.charAt(0);
|
|
11254
|
+
if (result.charAt(result.length - 1) !== chr) result += chr;
|
|
11255
|
+
}
|
|
11256
|
+
|
|
11257
|
+
return result !== 'DGBEFHACIJK';
|
|
11258
|
+
});
|
|
11259
|
+
|
|
11260
|
+
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
|
|
11261
|
+
|
|
11262
|
+
var getSortCompare = function (comparefn) {
|
|
11263
|
+
return function (x, y) {
|
|
11264
|
+
if (y === undefined) return -1;
|
|
11265
|
+
if (x === undefined) return 1;
|
|
11266
|
+
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
|
11267
|
+
return toString$4(x) > toString$4(y) ? 1 : -1;
|
|
11268
|
+
};
|
|
11269
|
+
};
|
|
11270
|
+
|
|
11271
|
+
// `Array.prototype.sort` method
|
|
11272
|
+
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
11273
|
+
$$c({ target: 'Array', proto: true, forced: FORCED$1 }, {
|
|
11274
|
+
sort: function sort(comparefn) {
|
|
11275
|
+
if (comparefn !== undefined) aCallable$6(comparefn);
|
|
11276
|
+
|
|
11277
|
+
var array = toObject$1(this);
|
|
11278
|
+
|
|
11279
|
+
if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
|
|
11280
|
+
|
|
11281
|
+
var items = [];
|
|
11282
|
+
var arrayLength = lengthOfArrayLike$2(array);
|
|
11283
|
+
var itemsLength, index;
|
|
11284
|
+
|
|
11285
|
+
for (index = 0; index < arrayLength; index++) {
|
|
11286
|
+
if (index in array) push$3(items, array[index]);
|
|
11287
|
+
}
|
|
11288
|
+
|
|
11289
|
+
internalSort(items, getSortCompare(comparefn));
|
|
11290
|
+
|
|
11291
|
+
itemsLength = lengthOfArrayLike$2(items);
|
|
11292
|
+
index = 0;
|
|
11293
|
+
|
|
11294
|
+
while (index < itemsLength) array[index] = items[index++];
|
|
11295
|
+
while (index < arrayLength) deletePropertyOrThrow(array, index++);
|
|
11296
|
+
|
|
11297
|
+
return array;
|
|
11298
|
+
}
|
|
11299
|
+
});
|
|
11300
|
+
|
|
11126
11301
|
const _excluded$d = ["children"];
|
|
11127
11302
|
var _jsxFileName$z = "/home/alfiantryp/Projects/majoo-ui/packages/react/src/components/popover/Popover.js";
|
|
11128
11303
|
const {
|
|
@@ -11516,6 +11691,19 @@
|
|
|
11516
11691
|
lineHeight: '20px',
|
|
11517
11692
|
'&:not(:last-child)': {
|
|
11518
11693
|
borderBottom: '1px solid $bgBorder'
|
|
11694
|
+
},
|
|
11695
|
+
variants: {
|
|
11696
|
+
hasGroup: {
|
|
11697
|
+
true: {
|
|
11698
|
+
paddingLeft: '$spacing-06'
|
|
11699
|
+
}
|
|
11700
|
+
},
|
|
11701
|
+
isGroup: {
|
|
11702
|
+
true: {
|
|
11703
|
+
padding: '$spacing-03 0',
|
|
11704
|
+
borderBottom: 'none !important'
|
|
11705
|
+
}
|
|
11706
|
+
}
|
|
11519
11707
|
}
|
|
11520
11708
|
});
|
|
11521
11709
|
var StyledFooter = styled('div', {
|
|
@@ -11649,23 +11837,20 @@
|
|
|
11649
11837
|
var _t = React.useState([]),
|
|
11650
11838
|
item = _t[0],
|
|
11651
11839
|
setItem = _t[1];
|
|
11652
|
-
var _u = React.useState(
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
var _v = React.useState(),
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
var _w = React.useState(
|
|
11659
|
-
|
|
11660
|
-
|
|
11840
|
+
var _u = React.useState([]),
|
|
11841
|
+
groupedItems = _u[0],
|
|
11842
|
+
setGroupedItems = _u[1];
|
|
11843
|
+
var _v = React.useState(value),
|
|
11844
|
+
selectedValue = _v[0],
|
|
11845
|
+
setSelectedValue = _v[1];
|
|
11846
|
+
var _w = React.useState(),
|
|
11847
|
+
query = _w[0],
|
|
11848
|
+
setQuery = _w[1];
|
|
11849
|
+
var _x = React.useState(false),
|
|
11850
|
+
openOptions = _x[0],
|
|
11851
|
+
setOpenOptions = _x[1];
|
|
11661
11852
|
var selectBoxRef = React.useRef(null);
|
|
11662
11853
|
var scrollerRef = React.useRef(null);
|
|
11663
|
-
React.useEffect(function () {
|
|
11664
|
-
var _a;
|
|
11665
|
-
(_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
|
|
11666
|
-
top: 0
|
|
11667
|
-
});
|
|
11668
|
-
}, [query]);
|
|
11669
11854
|
var handleInputValue = function handleInputValue(value, isReset) {
|
|
11670
11855
|
if (isReset === void 0) {
|
|
11671
11856
|
isReset = false;
|
|
@@ -11694,26 +11879,20 @@
|
|
|
11694
11879
|
return {
|
|
11695
11880
|
name: name_1,
|
|
11696
11881
|
value: value_1,
|
|
11882
|
+
isDisabled: option.isDisabled === undefined && disabledOptions && disabledOptions.length > 0 ? disabledOptions.includes(value_1) : option.isDisabled,
|
|
11697
11883
|
render: option.render,
|
|
11698
|
-
|
|
11884
|
+
group: option.group
|
|
11699
11885
|
};
|
|
11700
11886
|
}
|
|
11701
11887
|
return {
|
|
11702
11888
|
name: option,
|
|
11703
11889
|
value: option,
|
|
11890
|
+
isDisabled: disabledOptions && disabledOptions.includes(option),
|
|
11704
11891
|
render: option.render,
|
|
11705
|
-
|
|
11892
|
+
group: option.group
|
|
11706
11893
|
};
|
|
11707
11894
|
});
|
|
11708
11895
|
};
|
|
11709
|
-
React.useEffect(function () {
|
|
11710
|
-
setSelectedValue(value);
|
|
11711
|
-
}, [value]);
|
|
11712
|
-
React.useEffect(function () {
|
|
11713
|
-
var generatedOption = generateOptions(option, valueSelector, textSelector);
|
|
11714
|
-
setItem(generatedOption);
|
|
11715
|
-
setOptions(generatedOption);
|
|
11716
|
-
}, [option, disabledOptions, valueSelector, textSelector]);
|
|
11717
11896
|
var debouncedSearch = React__namespace.useRef(debounce__default["default"](function (query) {
|
|
11718
11897
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
11719
11898
|
return __generator(this, function (_a) {
|
|
@@ -11723,11 +11902,62 @@
|
|
|
11723
11902
|
});
|
|
11724
11903
|
});
|
|
11725
11904
|
}, 1000)).current;
|
|
11726
|
-
|
|
11905
|
+
React.useEffect(function () {
|
|
11906
|
+
var _a;
|
|
11907
|
+
(_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
|
|
11908
|
+
top: 0
|
|
11909
|
+
});
|
|
11910
|
+
}, [query]);
|
|
11911
|
+
React.useEffect(function () {
|
|
11912
|
+
setSelectedValue(value);
|
|
11913
|
+
}, [value]);
|
|
11914
|
+
React.useEffect(function () {
|
|
11915
|
+
var generatedOption = generateOptions(option, valueSelector, textSelector);
|
|
11916
|
+
setItem(generatedOption);
|
|
11917
|
+
setOptions(generatedOption);
|
|
11918
|
+
}, [option, disabledOptions, valueSelector, textSelector]);
|
|
11919
|
+
React.useEffect(function () {
|
|
11727
11920
|
return function () {
|
|
11728
11921
|
debouncedSearch.cancel();
|
|
11729
11922
|
};
|
|
11730
11923
|
}, [debouncedSearch]);
|
|
11924
|
+
React.useEffect(function () {
|
|
11925
|
+
setGroupedItems(item.sort(function (a, b) {
|
|
11926
|
+
var nameA = (typeof a.group === 'string' ? a.group.toUpperCase() : a.group) || ''; // ignore upper and lowercase
|
|
11927
|
+
var nameB = (typeof b.group === 'string' ? b.group.toUpperCase() : b.group) || ''; // ignore upper and lowercase
|
|
11928
|
+
if (!a.group) return 1;
|
|
11929
|
+
if (!b.group) return -1;
|
|
11930
|
+
if (nameA < nameB) {
|
|
11931
|
+
return -1;
|
|
11932
|
+
}
|
|
11933
|
+
if (nameA > nameB) {
|
|
11934
|
+
return 1;
|
|
11935
|
+
}
|
|
11936
|
+
return 0;
|
|
11937
|
+
}).reduce(function (prev, current) {
|
|
11938
|
+
var addedGroupItems = [];
|
|
11939
|
+
if (prev) addedGroupItems = __spreadArray([], prev, true);
|
|
11940
|
+
var group = current.group;
|
|
11941
|
+
if ((!prev || !prev.find(function (val) {
|
|
11942
|
+
return val.value === "#group#".concat(group, "#");
|
|
11943
|
+
})) && group) {
|
|
11944
|
+
addedGroupItems.push({
|
|
11945
|
+
name: group,
|
|
11946
|
+
value: "#group#".concat(group, "#"),
|
|
11947
|
+
isGroup: true,
|
|
11948
|
+
render: function () {
|
|
11949
|
+
return jsxRuntime.jsx(Paragraph, __assign({
|
|
11950
|
+
paragraph: "shortContentBold"
|
|
11951
|
+
}, {
|
|
11952
|
+
children: group
|
|
11953
|
+
}), void 0);
|
|
11954
|
+
}
|
|
11955
|
+
});
|
|
11956
|
+
}
|
|
11957
|
+
addedGroupItems.push(current);
|
|
11958
|
+
return addedGroupItems;
|
|
11959
|
+
}, []));
|
|
11960
|
+
}, [item]);
|
|
11731
11961
|
return jsxRuntime.jsx(Downshift__default["default"], __assign({}, props, {
|
|
11732
11962
|
onChange: onChange,
|
|
11733
11963
|
itemToString: function (item) {
|
|
@@ -11957,14 +12187,16 @@
|
|
|
11957
12187
|
}
|
|
11958
12188
|
}, {
|
|
11959
12189
|
children: jsxRuntime.jsx(SelectOption, {
|
|
11960
|
-
children: item.map(function (item, index) {
|
|
12190
|
+
children: (groupedItems.length > 0 ? groupedItems : item).map(function (item, index) {
|
|
11961
12191
|
var _a;
|
|
11962
12192
|
return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
|
|
11963
12193
|
item: item,
|
|
11964
|
-
disabled: item.isDisabled
|
|
12194
|
+
disabled: item.isDisabled || item.isGroup
|
|
11965
12195
|
}), {
|
|
11966
12196
|
key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
|
|
11967
|
-
|
|
12197
|
+
hasGroup: !!item.group,
|
|
12198
|
+
isGroup: item.isGroup,
|
|
12199
|
+
css: __assign({}, !item.isGroup ? item.isDisabled ? {
|
|
11968
12200
|
backgroundColor: 'unset',
|
|
11969
12201
|
cursor: 'not-allowed',
|
|
11970
12202
|
color: '$textDisable'
|
|
@@ -11972,7 +12204,10 @@
|
|
|
11972
12204
|
backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
|
|
11973
12205
|
fontWeight: 'normal',
|
|
11974
12206
|
color: selectedItem && selectedItem.value === item.value ? '$textGreen' : '$textPrimary'
|
|
11975
|
-
}
|
|
12207
|
+
} : {
|
|
12208
|
+
backgroundColor: 'unset',
|
|
12209
|
+
cursor: 'default'
|
|
12210
|
+
})
|
|
11976
12211
|
}), item.render ? item.render(selectedItem) : item.name);
|
|
11977
12212
|
})
|
|
11978
12213
|
}, void 0)
|
|
@@ -12005,181 +12240,6 @@
|
|
|
12005
12240
|
}), void 0);
|
|
12006
12241
|
});
|
|
12007
12242
|
|
|
12008
|
-
var tryToString$2 = tryToString$5;
|
|
12009
|
-
|
|
12010
|
-
var $TypeError$5 = TypeError;
|
|
12011
|
-
|
|
12012
|
-
var deletePropertyOrThrow$1 = function (O, P) {
|
|
12013
|
-
if (!delete O[P]) throw $TypeError$5('Cannot delete property ' + tryToString$2(P) + ' of ' + tryToString$2(O));
|
|
12014
|
-
};
|
|
12015
|
-
|
|
12016
|
-
var arraySlice$3 = arraySliceSimple;
|
|
12017
|
-
|
|
12018
|
-
var floor$2 = Math.floor;
|
|
12019
|
-
|
|
12020
|
-
var mergeSort = function (array, comparefn) {
|
|
12021
|
-
var length = array.length;
|
|
12022
|
-
var middle = floor$2(length / 2);
|
|
12023
|
-
return length < 8 ? insertionSort(array, comparefn) : merge(
|
|
12024
|
-
array,
|
|
12025
|
-
mergeSort(arraySlice$3(array, 0, middle), comparefn),
|
|
12026
|
-
mergeSort(arraySlice$3(array, middle), comparefn),
|
|
12027
|
-
comparefn
|
|
12028
|
-
);
|
|
12029
|
-
};
|
|
12030
|
-
|
|
12031
|
-
var insertionSort = function (array, comparefn) {
|
|
12032
|
-
var length = array.length;
|
|
12033
|
-
var i = 1;
|
|
12034
|
-
var element, j;
|
|
12035
|
-
|
|
12036
|
-
while (i < length) {
|
|
12037
|
-
j = i;
|
|
12038
|
-
element = array[i];
|
|
12039
|
-
while (j && comparefn(array[j - 1], element) > 0) {
|
|
12040
|
-
array[j] = array[--j];
|
|
12041
|
-
}
|
|
12042
|
-
if (j !== i++) array[j] = element;
|
|
12043
|
-
} return array;
|
|
12044
|
-
};
|
|
12045
|
-
|
|
12046
|
-
var merge = function (array, left, right, comparefn) {
|
|
12047
|
-
var llength = left.length;
|
|
12048
|
-
var rlength = right.length;
|
|
12049
|
-
var lindex = 0;
|
|
12050
|
-
var rindex = 0;
|
|
12051
|
-
|
|
12052
|
-
while (lindex < llength || rindex < rlength) {
|
|
12053
|
-
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
|
12054
|
-
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
|
12055
|
-
: lindex < llength ? left[lindex++] : right[rindex++];
|
|
12056
|
-
} return array;
|
|
12057
|
-
};
|
|
12058
|
-
|
|
12059
|
-
var arraySort$1 = mergeSort;
|
|
12060
|
-
|
|
12061
|
-
var userAgent$4 = engineUserAgent;
|
|
12062
|
-
|
|
12063
|
-
var firefox = userAgent$4.match(/firefox\/(\d+)/i);
|
|
12064
|
-
|
|
12065
|
-
var engineFfVersion = !!firefox && +firefox[1];
|
|
12066
|
-
|
|
12067
|
-
var UA = engineUserAgent;
|
|
12068
|
-
|
|
12069
|
-
var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
|
|
12070
|
-
|
|
12071
|
-
var userAgent$3 = engineUserAgent;
|
|
12072
|
-
|
|
12073
|
-
var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./);
|
|
12074
|
-
|
|
12075
|
-
var engineWebkitVersion = !!webkit && +webkit[1];
|
|
12076
|
-
|
|
12077
|
-
var $$c = _export;
|
|
12078
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
12079
|
-
var aCallable$6 = aCallable$a;
|
|
12080
|
-
var toObject$1 = toObject$7;
|
|
12081
|
-
var lengthOfArrayLike$2 = lengthOfArrayLike$6;
|
|
12082
|
-
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
12083
|
-
var toString$4 = toString$j;
|
|
12084
|
-
var fails$4 = fails$t;
|
|
12085
|
-
var internalSort = arraySort$1;
|
|
12086
|
-
var arrayMethodIsStrict = arrayMethodIsStrict$2;
|
|
12087
|
-
var FF = engineFfVersion;
|
|
12088
|
-
var IE_OR_EDGE = engineIsIeOrEdge;
|
|
12089
|
-
var V8 = engineV8Version;
|
|
12090
|
-
var WEBKIT = engineWebkitVersion;
|
|
12091
|
-
|
|
12092
|
-
var test = [];
|
|
12093
|
-
var nativeSort = uncurryThis$6(test.sort);
|
|
12094
|
-
var push$3 = uncurryThis$6(test.push);
|
|
12095
|
-
|
|
12096
|
-
// IE8-
|
|
12097
|
-
var FAILS_ON_UNDEFINED = fails$4(function () {
|
|
12098
|
-
test.sort(undefined);
|
|
12099
|
-
});
|
|
12100
|
-
// V8 bug
|
|
12101
|
-
var FAILS_ON_NULL = fails$4(function () {
|
|
12102
|
-
test.sort(null);
|
|
12103
|
-
});
|
|
12104
|
-
// Old WebKit
|
|
12105
|
-
var STRICT_METHOD = arrayMethodIsStrict('sort');
|
|
12106
|
-
|
|
12107
|
-
var STABLE_SORT = !fails$4(function () {
|
|
12108
|
-
// feature detection can be too slow, so check engines versions
|
|
12109
|
-
if (V8) return V8 < 70;
|
|
12110
|
-
if (FF && FF > 3) return;
|
|
12111
|
-
if (IE_OR_EDGE) return true;
|
|
12112
|
-
if (WEBKIT) return WEBKIT < 603;
|
|
12113
|
-
|
|
12114
|
-
var result = '';
|
|
12115
|
-
var code, chr, value, index;
|
|
12116
|
-
|
|
12117
|
-
// generate an array with more 512 elements (Chakra and old V8 fails only in this case)
|
|
12118
|
-
for (code = 65; code < 76; code++) {
|
|
12119
|
-
chr = String.fromCharCode(code);
|
|
12120
|
-
|
|
12121
|
-
switch (code) {
|
|
12122
|
-
case 66: case 69: case 70: case 72: value = 3; break;
|
|
12123
|
-
case 68: case 71: value = 4; break;
|
|
12124
|
-
default: value = 2;
|
|
12125
|
-
}
|
|
12126
|
-
|
|
12127
|
-
for (index = 0; index < 47; index++) {
|
|
12128
|
-
test.push({ k: chr + index, v: value });
|
|
12129
|
-
}
|
|
12130
|
-
}
|
|
12131
|
-
|
|
12132
|
-
test.sort(function (a, b) { return b.v - a.v; });
|
|
12133
|
-
|
|
12134
|
-
for (index = 0; index < test.length; index++) {
|
|
12135
|
-
chr = test[index].k.charAt(0);
|
|
12136
|
-
if (result.charAt(result.length - 1) !== chr) result += chr;
|
|
12137
|
-
}
|
|
12138
|
-
|
|
12139
|
-
return result !== 'DGBEFHACIJK';
|
|
12140
|
-
});
|
|
12141
|
-
|
|
12142
|
-
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
|
|
12143
|
-
|
|
12144
|
-
var getSortCompare = function (comparefn) {
|
|
12145
|
-
return function (x, y) {
|
|
12146
|
-
if (y === undefined) return -1;
|
|
12147
|
-
if (x === undefined) return 1;
|
|
12148
|
-
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
|
12149
|
-
return toString$4(x) > toString$4(y) ? 1 : -1;
|
|
12150
|
-
};
|
|
12151
|
-
};
|
|
12152
|
-
|
|
12153
|
-
// `Array.prototype.sort` method
|
|
12154
|
-
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
12155
|
-
$$c({ target: 'Array', proto: true, forced: FORCED$1 }, {
|
|
12156
|
-
sort: function sort(comparefn) {
|
|
12157
|
-
if (comparefn !== undefined) aCallable$6(comparefn);
|
|
12158
|
-
|
|
12159
|
-
var array = toObject$1(this);
|
|
12160
|
-
|
|
12161
|
-
if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
|
|
12162
|
-
|
|
12163
|
-
var items = [];
|
|
12164
|
-
var arrayLength = lengthOfArrayLike$2(array);
|
|
12165
|
-
var itemsLength, index;
|
|
12166
|
-
|
|
12167
|
-
for (index = 0; index < arrayLength; index++) {
|
|
12168
|
-
if (index in array) push$3(items, array[index]);
|
|
12169
|
-
}
|
|
12170
|
-
|
|
12171
|
-
internalSort(items, getSortCompare(comparefn));
|
|
12172
|
-
|
|
12173
|
-
itemsLength = lengthOfArrayLike$2(items);
|
|
12174
|
-
index = 0;
|
|
12175
|
-
|
|
12176
|
-
while (index < itemsLength) array[index] = items[index++];
|
|
12177
|
-
while (index < arrayLength) deletePropertyOrThrow(array, index++);
|
|
12178
|
-
|
|
12179
|
-
return array;
|
|
12180
|
-
}
|
|
12181
|
-
});
|
|
12182
|
-
|
|
12183
12243
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
12184
12244
|
|
|
12185
12245
|
var $TypeError$4 = TypeError;
|
|
@@ -13230,7 +13290,7 @@
|
|
|
13230
13290
|
}), void 0);
|
|
13231
13291
|
}
|
|
13232
13292
|
|
|
13233
|
-
const _excluded$c = ["placeholder", "option", "value", "defaultValue", "size", "disabled", "onChange", "search", "readOnly", "placement", "disabledOptions", "textEmptyItem", "onRemoveItem", "isInvalid", "sortBy", "showSelectAll", "showTagSelectAll", "selectAllLabel", "showSelectedTag", "unremovableTags", "helperText", "css", "showCounter", "labelCounter", "collapsible", "toggleInput", "fetchData", "onSearch", "isLoading", "maxSelectedItem", "mobileOnly", "desktopOnly", "label", "tagCss", "checkBoxCss", "optionListCss"];
|
|
13293
|
+
const _excluded$c = ["placeholder", "option", "value", "defaultValue", "size", "disabled", "onChange", "search", "readOnly", "placement", "disabledOptions", "textEmptyItem", "onRemoveItem", "isInvalid", "sortBy", "showSelectAll", "showTagSelectAll", "selectAllLabel", "showSelectedTag", "unremovableTags", "helperText", "css", "showCounter", "labelCounter", "collapsible", "toggleInput", "fetchData", "onSearch", "isLoading", "maxSelectedItem", "mobileOnly", "desktopOnly", "label", "tagCss", "checkBoxCss", "optionListCss", "showCollapsibleCounter", "collapsibleLimit"];
|
|
13234
13294
|
var _jsxFileName$x = "/home/alfiantryp/Projects/majoo-ui/packages/react/src/components/form/components/InputSelectCheck/InputSelectCheck.js";
|
|
13235
13295
|
function _await(value, then, direct) {
|
|
13236
13296
|
if (direct) {
|
|
@@ -13542,7 +13602,9 @@
|
|
|
13542
13602
|
label,
|
|
13543
13603
|
tagCss,
|
|
13544
13604
|
checkBoxCss,
|
|
13545
|
-
optionListCss
|
|
13605
|
+
optionListCss,
|
|
13606
|
+
showCollapsibleCounter,
|
|
13607
|
+
collapsibleLimit
|
|
13546
13608
|
} = _ref,
|
|
13547
13609
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
13548
13610
|
const {
|
|
@@ -13575,8 +13637,8 @@
|
|
|
13575
13637
|
const sortItems = React__default["default"].useCallback(() => {
|
|
13576
13638
|
if (sortBy === 'id') {
|
|
13577
13639
|
option.sort(function (a, b) {
|
|
13578
|
-
const idA = a.id.toUpperCase(); // ignore upper and lowercase
|
|
13579
|
-
const idB = b.id.toUpperCase(); // ignore upper and lowercase
|
|
13640
|
+
const idA = typeof a.id === 'string' ? a.id.toUpperCase() : a.id; // ignore upper and lowercase
|
|
13641
|
+
const idB = typeof b.id === 'string' ? b.id.toUpperCase() : b.id; // ignore upper and lowercase
|
|
13580
13642
|
if (a.id === '!all') return -1;
|
|
13581
13643
|
if (b.id === '!all') return 1;
|
|
13582
13644
|
if (idA < idB) {
|
|
@@ -13589,8 +13651,8 @@
|
|
|
13589
13651
|
});
|
|
13590
13652
|
} else if (sortBy === 'name') {
|
|
13591
13653
|
option.sort(function (a, b) {
|
|
13592
|
-
const nameA = a.name.toUpperCase(); // ignore upper and lowercase
|
|
13593
|
-
const nameB = b.name.toUpperCase(); // ignore upper and lowercase
|
|
13654
|
+
const nameA = typeof a.name === 'string' ? a.name.toUpperCase() : a.name; // ignore upper and lowercase
|
|
13655
|
+
const nameB = typeof b.name === 'string' ? b.name.toUpperCase() : b.name; // ignore upper and lowercase
|
|
13594
13656
|
if (a.id === '!all') return -1;
|
|
13595
13657
|
if (b.id === '!all') return 1;
|
|
13596
13658
|
if (nameA < nameB) {
|
|
@@ -13934,7 +13996,7 @@
|
|
|
13934
13996
|
__self: undefined,
|
|
13935
13997
|
__source: {
|
|
13936
13998
|
fileName: _jsxFileName$x,
|
|
13937
|
-
lineNumber:
|
|
13999
|
+
lineNumber: 731,
|
|
13938
14000
|
columnNumber: 9
|
|
13939
14001
|
}
|
|
13940
14002
|
}), /*#__PURE__*/React__default["default"].createElement(IconWrapper, {
|
|
@@ -13947,7 +14009,7 @@
|
|
|
13947
14009
|
__self: undefined,
|
|
13948
14010
|
__source: {
|
|
13949
14011
|
fileName: _jsxFileName$x,
|
|
13950
|
-
lineNumber:
|
|
14012
|
+
lineNumber: 745,
|
|
13951
14013
|
columnNumber: 11
|
|
13952
14014
|
}
|
|
13953
14015
|
}, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
@@ -13955,7 +14017,7 @@
|
|
|
13955
14017
|
__self: undefined,
|
|
13956
14018
|
__source: {
|
|
13957
14019
|
fileName: _jsxFileName$x,
|
|
13958
|
-
lineNumber:
|
|
14020
|
+
lineNumber: 756,
|
|
13959
14021
|
columnNumber: 17
|
|
13960
14022
|
}
|
|
13961
14023
|
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
@@ -13963,21 +14025,21 @@
|
|
|
13963
14025
|
__self: undefined,
|
|
13964
14026
|
__source: {
|
|
13965
14027
|
fileName: _jsxFileName$x,
|
|
13966
|
-
lineNumber:
|
|
14028
|
+
lineNumber: 760,
|
|
13967
14029
|
columnNumber: 19
|
|
13968
14030
|
}
|
|
13969
14031
|
})), isShowSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < itemsLength ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
|
|
13970
14032
|
__self: undefined,
|
|
13971
14033
|
__source: {
|
|
13972
14034
|
fileName: _jsxFileName$x,
|
|
13973
|
-
lineNumber:
|
|
14035
|
+
lineNumber: 764,
|
|
13974
14036
|
columnNumber: 15
|
|
13975
14037
|
}
|
|
13976
14038
|
}, "-") : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
13977
14039
|
__self: undefined,
|
|
13978
14040
|
__source: {
|
|
13979
14041
|
fileName: _jsxFileName$x,
|
|
13980
|
-
lineNumber:
|
|
14042
|
+
lineNumber: 766,
|
|
13981
14043
|
columnNumber: 15
|
|
13982
14044
|
}
|
|
13983
14045
|
})), /*#__PURE__*/React__default["default"].createElement(Item$3, {
|
|
@@ -13988,7 +14050,7 @@
|
|
|
13988
14050
|
__self: undefined,
|
|
13989
14051
|
__source: {
|
|
13990
14052
|
fileName: _jsxFileName$x,
|
|
13991
|
-
lineNumber:
|
|
14053
|
+
lineNumber: 769,
|
|
13992
14054
|
columnNumber: 11
|
|
13993
14055
|
}
|
|
13994
14056
|
}, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
|
|
@@ -14016,7 +14078,7 @@
|
|
|
14016
14078
|
__self: undefined,
|
|
14017
14079
|
__source: {
|
|
14018
14080
|
fileName: _jsxFileName$x,
|
|
14019
|
-
lineNumber:
|
|
14081
|
+
lineNumber: 786,
|
|
14020
14082
|
columnNumber: 13
|
|
14021
14083
|
}
|
|
14022
14084
|
}), /*#__PURE__*/React__default["default"].createElement(IconWrapper, {
|
|
@@ -14029,7 +14091,7 @@
|
|
|
14029
14091
|
__self: undefined,
|
|
14030
14092
|
__source: {
|
|
14031
14093
|
fileName: _jsxFileName$x,
|
|
14032
|
-
lineNumber:
|
|
14094
|
+
lineNumber: 799,
|
|
14033
14095
|
columnNumber: 15
|
|
14034
14096
|
}
|
|
14035
14097
|
}, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
@@ -14037,7 +14099,7 @@
|
|
|
14037
14099
|
__self: undefined,
|
|
14038
14100
|
__source: {
|
|
14039
14101
|
fileName: _jsxFileName$x,
|
|
14040
|
-
lineNumber:
|
|
14102
|
+
lineNumber: 809,
|
|
14041
14103
|
columnNumber: 19
|
|
14042
14104
|
}
|
|
14043
14105
|
}) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) === (item == null ? void 0 : (_item$children7 = item.children) == null ? void 0 : (_item$children7$filte = _item$children7.filter(e => !e.isDisabled)) == null ? void 0 : _item$children7$filte.length) ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
@@ -14045,14 +14107,14 @@
|
|
|
14045
14107
|
__self: undefined,
|
|
14046
14108
|
__source: {
|
|
14047
14109
|
fileName: _jsxFileName$x,
|
|
14048
|
-
lineNumber:
|
|
14110
|
+
lineNumber: 811,
|
|
14049
14111
|
columnNumber: 19
|
|
14050
14112
|
}
|
|
14051
14113
|
}) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
|
|
14052
14114
|
__self: undefined,
|
|
14053
14115
|
__source: {
|
|
14054
14116
|
fileName: _jsxFileName$x,
|
|
14055
|
-
lineNumber:
|
|
14117
|
+
lineNumber: 813,
|
|
14056
14118
|
columnNumber: 19
|
|
14057
14119
|
}
|
|
14058
14120
|
}, "-") : null), /*#__PURE__*/React__default["default"].createElement(Item$3, {
|
|
@@ -14063,14 +14125,14 @@
|
|
|
14063
14125
|
__self: undefined,
|
|
14064
14126
|
__source: {
|
|
14065
14127
|
fileName: _jsxFileName$x,
|
|
14066
|
-
lineNumber:
|
|
14128
|
+
lineNumber: 816,
|
|
14067
14129
|
columnNumber: 15
|
|
14068
14130
|
}
|
|
14069
14131
|
}, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
|
|
14070
14132
|
__self: undefined,
|
|
14071
14133
|
__source: {
|
|
14072
14134
|
fileName: _jsxFileName$x,
|
|
14073
|
-
lineNumber:
|
|
14135
|
+
lineNumber: 784,
|
|
14074
14136
|
columnNumber: 9
|
|
14075
14137
|
}
|
|
14076
14138
|
}, item == null ? void 0 : (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
|
|
@@ -14083,7 +14145,7 @@
|
|
|
14083
14145
|
__self: undefined,
|
|
14084
14146
|
__source: {
|
|
14085
14147
|
fileName: _jsxFileName$x,
|
|
14086
|
-
lineNumber:
|
|
14148
|
+
lineNumber: 828,
|
|
14087
14149
|
columnNumber: 7
|
|
14088
14150
|
}
|
|
14089
14151
|
}), /*#__PURE__*/React__default["default"].createElement(Select, {
|
|
@@ -14093,7 +14155,7 @@
|
|
|
14093
14155
|
__self: undefined,
|
|
14094
14156
|
__source: {
|
|
14095
14157
|
fileName: _jsxFileName$x,
|
|
14096
|
-
lineNumber:
|
|
14158
|
+
lineNumber: 829,
|
|
14097
14159
|
columnNumber: 9
|
|
14098
14160
|
}
|
|
14099
14161
|
}, /*#__PURE__*/React__default["default"].createElement(InputWrapper$1, _extends({}, getComboboxProps(getDropdownProps({
|
|
@@ -14108,7 +14170,7 @@
|
|
|
14108
14170
|
__self: undefined,
|
|
14109
14171
|
__source: {
|
|
14110
14172
|
fileName: _jsxFileName$x,
|
|
14111
|
-
lineNumber:
|
|
14173
|
+
lineNumber: 830,
|
|
14112
14174
|
columnNumber: 11
|
|
14113
14175
|
}
|
|
14114
14176
|
}), /*#__PURE__*/React__default["default"].createElement(Input$6, _extends({}, getInputProps({
|
|
@@ -14126,7 +14188,7 @@
|
|
|
14126
14188
|
__self: undefined,
|
|
14127
14189
|
__source: {
|
|
14128
14190
|
fileName: _jsxFileName$x,
|
|
14129
|
-
lineNumber:
|
|
14191
|
+
lineNumber: 840,
|
|
14130
14192
|
columnNumber: 13
|
|
14131
14193
|
}
|
|
14132
14194
|
})), /*#__PURE__*/React__default["default"].createElement(Button$2, _extends({}, getToggleButtonProps({
|
|
@@ -14140,7 +14202,7 @@
|
|
|
14140
14202
|
__self: undefined,
|
|
14141
14203
|
__source: {
|
|
14142
14204
|
fileName: _jsxFileName$x,
|
|
14143
|
-
lineNumber:
|
|
14205
|
+
lineNumber: 847,
|
|
14144
14206
|
columnNumber: 13
|
|
14145
14207
|
}
|
|
14146
14208
|
}), (_ref2 = label != null ? label : placeholder) != null ? _ref2 : t('placeholder', 'Pilih Item'))), /*#__PURE__*/React__default["default"].createElement(IconWrapper, _extends({}, getToggleButtonProps({
|
|
@@ -14151,7 +14213,7 @@
|
|
|
14151
14213
|
__self: undefined,
|
|
14152
14214
|
__source: {
|
|
14153
14215
|
fileName: _jsxFileName$x,
|
|
14154
|
-
lineNumber:
|
|
14216
|
+
lineNumber: 858,
|
|
14155
14217
|
columnNumber: 11
|
|
14156
14218
|
}
|
|
14157
14219
|
}), /*#__PURE__*/React__default["default"].createElement(IconCaretDown, {
|
|
@@ -14159,7 +14221,7 @@
|
|
|
14159
14221
|
__self: undefined,
|
|
14160
14222
|
__source: {
|
|
14161
14223
|
fileName: _jsxFileName$x,
|
|
14162
|
-
lineNumber:
|
|
14224
|
+
lineNumber: 863,
|
|
14163
14225
|
columnNumber: 13
|
|
14164
14226
|
}
|
|
14165
14227
|
}))), helperText && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
@@ -14172,7 +14234,7 @@
|
|
|
14172
14234
|
__self: undefined,
|
|
14173
14235
|
__source: {
|
|
14174
14236
|
fileName: _jsxFileName$x,
|
|
14175
|
-
lineNumber:
|
|
14237
|
+
lineNumber: 867,
|
|
14176
14238
|
columnNumber: 11
|
|
14177
14239
|
}
|
|
14178
14240
|
}, helperText), showSelectedTag && !showCounter && selectedItems.length !== 0 && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(TagWrapper$2, {
|
|
@@ -14180,7 +14242,7 @@
|
|
|
14180
14242
|
__self: undefined,
|
|
14181
14243
|
__source: {
|
|
14182
14244
|
fileName: _jsxFileName$x,
|
|
14183
|
-
lineNumber:
|
|
14245
|
+
lineNumber: 873,
|
|
14184
14246
|
columnNumber: 13
|
|
14185
14247
|
}
|
|
14186
14248
|
}, isShowTagSelectAll ? /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
|
|
@@ -14201,7 +14263,7 @@
|
|
|
14201
14263
|
__self: undefined,
|
|
14202
14264
|
__source: {
|
|
14203
14265
|
fileName: _jsxFileName$x,
|
|
14204
|
-
lineNumber:
|
|
14266
|
+
lineNumber: 875,
|
|
14205
14267
|
columnNumber: 17
|
|
14206
14268
|
}
|
|
14207
14269
|
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems == null ? void 0 : (_selectedItems$filter = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : (_selectedItems$filter2 = _selectedItems$filter.filter((_, idx) => {
|
|
@@ -14232,16 +14294,16 @@
|
|
|
14232
14294
|
__self: undefined,
|
|
14233
14295
|
__source: {
|
|
14234
14296
|
fileName: _jsxFileName$x,
|
|
14235
|
-
lineNumber:
|
|
14297
|
+
lineNumber: 904,
|
|
14236
14298
|
columnNumber: 21
|
|
14237
14299
|
}
|
|
14238
|
-
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) >
|
|
14300
|
+
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
14239
14301
|
direction: "column",
|
|
14240
14302
|
gap: 4,
|
|
14241
14303
|
__self: undefined,
|
|
14242
14304
|
__source: {
|
|
14243
14305
|
fileName: _jsxFileName$x,
|
|
14244
|
-
lineNumber:
|
|
14306
|
+
lineNumber: 927,
|
|
14245
14307
|
columnNumber: 15
|
|
14246
14308
|
}
|
|
14247
14309
|
}, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
@@ -14251,14 +14313,14 @@
|
|
|
14251
14313
|
__self: undefined,
|
|
14252
14314
|
__source: {
|
|
14253
14315
|
fileName: _jsxFileName$x,
|
|
14254
|
-
lineNumber:
|
|
14316
|
+
lineNumber: 928,
|
|
14255
14317
|
columnNumber: 17
|
|
14256
14318
|
}
|
|
14257
14319
|
}, /*#__PURE__*/React__default["default"].createElement(Separator$2, {
|
|
14258
14320
|
__self: undefined,
|
|
14259
14321
|
__source: {
|
|
14260
14322
|
fileName: _jsxFileName$x,
|
|
14261
|
-
lineNumber:
|
|
14323
|
+
lineNumber: 929,
|
|
14262
14324
|
columnNumber: 19
|
|
14263
14325
|
}
|
|
14264
14326
|
}), /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
@@ -14272,7 +14334,7 @@
|
|
|
14272
14334
|
__self: undefined,
|
|
14273
14335
|
__source: {
|
|
14274
14336
|
fileName: _jsxFileName$x,
|
|
14275
|
-
lineNumber:
|
|
14337
|
+
lineNumber: 930,
|
|
14276
14338
|
columnNumber: 19
|
|
14277
14339
|
}
|
|
14278
14340
|
}, showAllTags ? /*#__PURE__*/React__default["default"].createElement(icons.ChevronUpOutline, {
|
|
@@ -14280,7 +14342,7 @@
|
|
|
14280
14342
|
__self: undefined,
|
|
14281
14343
|
__source: {
|
|
14282
14344
|
fileName: _jsxFileName$x,
|
|
14283
|
-
lineNumber:
|
|
14345
|
+
lineNumber: 936,
|
|
14284
14346
|
columnNumber: 23
|
|
14285
14347
|
}
|
|
14286
14348
|
}) : /*#__PURE__*/React__default["default"].createElement(icons.ChevronDownOutline, {
|
|
@@ -14288,7 +14350,7 @@
|
|
|
14288
14350
|
__self: undefined,
|
|
14289
14351
|
__source: {
|
|
14290
14352
|
fileName: _jsxFileName$x,
|
|
14291
|
-
lineNumber:
|
|
14353
|
+
lineNumber: 938,
|
|
14292
14354
|
columnNumber: 23
|
|
14293
14355
|
}
|
|
14294
14356
|
}), /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
@@ -14300,17 +14362,17 @@
|
|
|
14300
14362
|
__self: undefined,
|
|
14301
14363
|
__source: {
|
|
14302
14364
|
fileName: _jsxFileName$x,
|
|
14303
|
-
lineNumber:
|
|
14365
|
+
lineNumber: 940,
|
|
14304
14366
|
columnNumber: 21
|
|
14305
14367
|
}
|
|
14306
14368
|
}, showAllTags ? t('showSomeText', 'Tampilkan Sebagian') : t('showAllText', 'Tampilkan Semua'))), /*#__PURE__*/React__default["default"].createElement(Separator$2, {
|
|
14307
14369
|
__self: undefined,
|
|
14308
14370
|
__source: {
|
|
14309
14371
|
fileName: _jsxFileName$x,
|
|
14310
|
-
lineNumber:
|
|
14372
|
+
lineNumber: 944,
|
|
14311
14373
|
columnNumber: 19
|
|
14312
14374
|
}
|
|
14313
|
-
})), /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
14375
|
+
})), showCollapsibleCounter && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
14314
14376
|
css: {
|
|
14315
14377
|
fontSize: '$label'
|
|
14316
14378
|
},
|
|
@@ -14318,8 +14380,8 @@
|
|
|
14318
14380
|
__self: undefined,
|
|
14319
14381
|
__source: {
|
|
14320
14382
|
fileName: _jsxFileName$x,
|
|
14321
|
-
lineNumber:
|
|
14322
|
-
columnNumber:
|
|
14383
|
+
lineNumber: 947,
|
|
14384
|
+
columnNumber: 19
|
|
14323
14385
|
}
|
|
14324
14386
|
}, `${selectedItems == null ? void 0 : (_selectedItems$filter3 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
14325
14387
|
css: {
|
|
@@ -14330,7 +14392,7 @@
|
|
|
14330
14392
|
__self: undefined,
|
|
14331
14393
|
__source: {
|
|
14332
14394
|
fileName: _jsxFileName$x,
|
|
14333
|
-
lineNumber:
|
|
14395
|
+
lineNumber: 957,
|
|
14334
14396
|
columnNumber: 11
|
|
14335
14397
|
}
|
|
14336
14398
|
}, `${selectedItems == null ? void 0 : (_selectedItems$filter4 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter4.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default["default"].createElement(OptionWrapper$1, {
|
|
@@ -14343,7 +14405,7 @@
|
|
|
14343
14405
|
__self: undefined,
|
|
14344
14406
|
__source: {
|
|
14345
14407
|
fileName: _jsxFileName$x,
|
|
14346
|
-
lineNumber:
|
|
14408
|
+
lineNumber: 963,
|
|
14347
14409
|
columnNumber: 9
|
|
14348
14410
|
}
|
|
14349
14411
|
}, isLoading && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
@@ -14365,7 +14427,7 @@
|
|
|
14365
14427
|
__self: undefined,
|
|
14366
14428
|
__source: {
|
|
14367
14429
|
fileName: _jsxFileName$x,
|
|
14368
|
-
lineNumber:
|
|
14430
|
+
lineNumber: 973,
|
|
14369
14431
|
columnNumber: 13
|
|
14370
14432
|
}
|
|
14371
14433
|
}, /*#__PURE__*/React__default["default"].createElement(Text$1, {
|
|
@@ -14373,7 +14435,7 @@
|
|
|
14373
14435
|
__self: undefined,
|
|
14374
14436
|
__source: {
|
|
14375
14437
|
fileName: _jsxFileName$x,
|
|
14376
|
-
lineNumber:
|
|
14438
|
+
lineNumber: 990,
|
|
14377
14439
|
columnNumber: 15
|
|
14378
14440
|
}
|
|
14379
14441
|
}, "Loading....")), items.length > 0 || isLoading ? /*#__PURE__*/React__default["default"].createElement(Option, _extends({}, getMenuProps({
|
|
@@ -14385,7 +14447,7 @@
|
|
|
14385
14447
|
__self: undefined,
|
|
14386
14448
|
__source: {
|
|
14387
14449
|
fileName: _jsxFileName$x,
|
|
14388
|
-
lineNumber:
|
|
14450
|
+
lineNumber: 996,
|
|
14389
14451
|
columnNumber: 13
|
|
14390
14452
|
}
|
|
14391
14453
|
}), /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
@@ -14400,14 +14462,14 @@
|
|
|
14400
14462
|
__self: undefined,
|
|
14401
14463
|
__source: {
|
|
14402
14464
|
fileName: _jsxFileName$x,
|
|
14403
|
-
lineNumber:
|
|
14465
|
+
lineNumber: 1000,
|
|
14404
14466
|
columnNumber: 19
|
|
14405
14467
|
}
|
|
14406
14468
|
}, child),
|
|
14407
14469
|
__self: undefined,
|
|
14408
14470
|
__source: {
|
|
14409
14471
|
fileName: _jsxFileName$x,
|
|
14410
|
-
lineNumber:
|
|
14472
|
+
lineNumber: 997,
|
|
14411
14473
|
columnNumber: 15
|
|
14412
14474
|
}
|
|
14413
14475
|
}, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
|
|
@@ -14420,14 +14482,14 @@
|
|
|
14420
14482
|
__self: undefined,
|
|
14421
14483
|
__source: {
|
|
14422
14484
|
fileName: _jsxFileName$x,
|
|
14423
|
-
lineNumber:
|
|
14485
|
+
lineNumber: 1017,
|
|
14424
14486
|
columnNumber: 13
|
|
14425
14487
|
}
|
|
14426
14488
|
}), /*#__PURE__*/React__default["default"].createElement(StyledDiv, {
|
|
14427
14489
|
__self: undefined,
|
|
14428
14490
|
__source: {
|
|
14429
14491
|
fileName: _jsxFileName$x,
|
|
14430
|
-
lineNumber:
|
|
14492
|
+
lineNumber: 1018,
|
|
14431
14493
|
columnNumber: 15
|
|
14432
14494
|
}
|
|
14433
14495
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -14437,7 +14499,7 @@
|
|
|
14437
14499
|
__self: undefined,
|
|
14438
14500
|
__source: {
|
|
14439
14501
|
fileName: _jsxFileName$x,
|
|
14440
|
-
lineNumber:
|
|
14502
|
+
lineNumber: 1019,
|
|
14441
14503
|
columnNumber: 17
|
|
14442
14504
|
}
|
|
14443
14505
|
}, /*#__PURE__*/React__default["default"].createElement(icons.CircleInfoOutline, {
|
|
@@ -14449,7 +14511,7 @@
|
|
|
14449
14511
|
__self: undefined,
|
|
14450
14512
|
__source: {
|
|
14451
14513
|
fileName: _jsxFileName$x,
|
|
14452
|
-
lineNumber:
|
|
14514
|
+
lineNumber: 1020,
|
|
14453
14515
|
columnNumber: 19
|
|
14454
14516
|
}
|
|
14455
14517
|
})), textEmptyItem != null ? textEmptyItem : t('emptyItemText', 'Item tidak ditemukan')))));
|
|
@@ -14490,7 +14552,9 @@
|
|
|
14490
14552
|
label: PropTypes__default["default"].string,
|
|
14491
14553
|
tagCss: PropTypes__default["default"].object,
|
|
14492
14554
|
checkBoxCss: PropTypes__default["default"].object,
|
|
14493
|
-
optionListCss: PropTypes__default["default"].object
|
|
14555
|
+
optionListCss: PropTypes__default["default"].object,
|
|
14556
|
+
showCollapsibleCounter: PropTypes__default["default"].bool,
|
|
14557
|
+
collapsibleLimit: PropTypes__default["default"].number
|
|
14494
14558
|
};
|
|
14495
14559
|
InputSelectCheck.defaultProps = {
|
|
14496
14560
|
size: 'lg',
|
|
@@ -14511,7 +14575,9 @@
|
|
|
14511
14575
|
label: undefined,
|
|
14512
14576
|
tagCss: {},
|
|
14513
14577
|
checkBoxCss: {},
|
|
14514
|
-
optionListCss: {}
|
|
14578
|
+
optionListCss: {},
|
|
14579
|
+
showCollapsibleCounter: true,
|
|
14580
|
+
collapsibleLimit: 5
|
|
14515
14581
|
};
|
|
14516
14582
|
|
|
14517
14583
|
var _jsxFileName$w = "/home/alfiantryp/Projects/majoo-ui/packages/react/src/components/form/components/InputSelectTag/InputSelectTag.js";
|