rsuite 5.38.0 → 5.39.0
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/CHANGELOG.md +14 -0
- package/Nav/styles/index.less +10 -11
- package/SelectPicker/styles/index.less +8 -4
- package/cjs/SelectPicker/Listbox.d.ts +34 -0
- package/cjs/SelectPicker/Listbox.js +263 -0
- package/cjs/SelectPicker/ListboxOption.d.ts +11 -0
- package/cjs/SelectPicker/ListboxOption.js +50 -0
- package/cjs/SelectPicker/ListboxOptionGroup.d.ts +9 -0
- package/cjs/SelectPicker/ListboxOptionGroup.js +69 -0
- package/cjs/SelectPicker/SelectPicker.js +33 -36
- package/cjs/Windowing/List.d.ts +2 -2
- package/cjs/locales/index.d.ts +1 -0
- package/cjs/locales/index.js +6 -2
- package/cjs/locales/ne_NP.d.ts +117 -0
- package/cjs/locales/ne_NP.js +89 -0
- package/cjs/utils/getDataGroupBy.d.ts +23 -0
- package/cjs/utils/getDataGroupBy.js +33 -0
- package/dist/rsuite-no-reset-rtl.css +22 -11
- package/dist/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
- package/dist/rsuite-no-reset.css +22 -11
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +22 -11
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +22 -11
- package/dist/rsuite.js +36 -3
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/SelectPicker/Listbox.d.ts +34 -0
- package/esm/SelectPicker/Listbox.js +240 -0
- package/esm/SelectPicker/ListboxOption.d.ts +11 -0
- package/esm/SelectPicker/ListboxOption.js +37 -0
- package/esm/SelectPicker/ListboxOptionGroup.d.ts +9 -0
- package/esm/SelectPicker/ListboxOptionGroup.js +53 -0
- package/esm/SelectPicker/SelectPicker.js +33 -36
- package/esm/Windowing/List.d.ts +2 -2
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +2 -1
- package/esm/locales/ne_NP.d.ts +117 -0
- package/esm/locales/ne_NP.js +79 -0
- package/esm/utils/getDataGroupBy.d.ts +23 -0
- package/esm/utils/getDataGroupBy.js +32 -0
- package/locales/ne_NP/package.json +7 -0
- package/package.json +1 -1
- package/styles/mixins/listbox.less +2 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import enGB from 'date-fns/locale/en-GB';
|
|
3
|
+
var Calendar = {
|
|
4
|
+
sunday: 'आ',
|
|
5
|
+
monday: 'सो',
|
|
6
|
+
tuesday: 'म',
|
|
7
|
+
wednesday: 'बु',
|
|
8
|
+
thursday: 'बि',
|
|
9
|
+
friday: 'शु',
|
|
10
|
+
saturday: 'श',
|
|
11
|
+
ok: 'हुन्छ',
|
|
12
|
+
today: 'आज',
|
|
13
|
+
yesterday: 'हिजो',
|
|
14
|
+
hours: 'घण्टा',
|
|
15
|
+
minutes: 'मिनेट',
|
|
16
|
+
seconds: 'सेकेन्ड',
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
20
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
21
|
+
**/
|
|
22
|
+
formattedMonthPattern: 'MMM yyyy',
|
|
23
|
+
formattedDayPattern: 'dd MMM yyyy',
|
|
24
|
+
dateLocale: enGB
|
|
25
|
+
};
|
|
26
|
+
export default {
|
|
27
|
+
common: {
|
|
28
|
+
loading: 'लोड हुँदैछ...',
|
|
29
|
+
emptyMessage: 'कुनै डाटा छैन'
|
|
30
|
+
},
|
|
31
|
+
Plaintext: {
|
|
32
|
+
unfilled: 'भरिएको छैन',
|
|
33
|
+
notSelected: 'चयन गरिएको छैन',
|
|
34
|
+
notUploaded: 'अपलोड गरिएको छैन'
|
|
35
|
+
},
|
|
36
|
+
Pagination: {
|
|
37
|
+
more: 'थप',
|
|
38
|
+
prev: 'अघिल्लो',
|
|
39
|
+
next: 'अर्को',
|
|
40
|
+
first: 'पहिलो',
|
|
41
|
+
last: 'अन्तिम',
|
|
42
|
+
limit: '{0} / पृष्ठ',
|
|
43
|
+
total: 'कुल पङ्क्तिहरू: {0}',
|
|
44
|
+
skip: '{0} पृष्ठमा जानुहोस्'
|
|
45
|
+
},
|
|
46
|
+
Calendar: Calendar,
|
|
47
|
+
DatePicker: _extends({}, Calendar),
|
|
48
|
+
DateRangePicker: _extends({}, Calendar, {
|
|
49
|
+
last7Days: 'पछिल्लो ७ दिन'
|
|
50
|
+
}),
|
|
51
|
+
Picker: {
|
|
52
|
+
noResultsText: 'कुनै परिणाम फेला परेन',
|
|
53
|
+
placeholder: 'चयन गर्नुहोस्',
|
|
54
|
+
searchPlaceholder: 'खोजी गर्नुहोस्',
|
|
55
|
+
checkAll: 'सबै'
|
|
56
|
+
},
|
|
57
|
+
InputPicker: {
|
|
58
|
+
newItem: 'नयाँ थप्नुहोस्',
|
|
59
|
+
createOption: 'विकल्प सिर्जना गर्नुहोस् "{0}"'
|
|
60
|
+
},
|
|
61
|
+
Uploader: {
|
|
62
|
+
inited: 'प्रारम्भिक',
|
|
63
|
+
progress: 'अपलोड गर्दै',
|
|
64
|
+
error: 'त्रुटि भयो',
|
|
65
|
+
complete: 'समाप्त',
|
|
66
|
+
emptyFile: 'खाली',
|
|
67
|
+
upload: 'अपलोड गर्नुहोस्'
|
|
68
|
+
},
|
|
69
|
+
CloseButton: {
|
|
70
|
+
closeLabel: 'बन्द गर्नुहोस्'
|
|
71
|
+
},
|
|
72
|
+
Breadcrumb: {
|
|
73
|
+
expandText: 'स्थान देखाउनुहोस्'
|
|
74
|
+
},
|
|
75
|
+
Toggle: {
|
|
76
|
+
on: 'खोल्नुहोस्',
|
|
77
|
+
off: 'बन्द गर्नुहोस्'
|
|
78
|
+
}
|
|
79
|
+
};
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
export declare const KEY_GROUP: string | symbol;
|
|
2
2
|
export declare const KEY_GROUP_TITLE = "groupTitle";
|
|
3
|
+
/**
|
|
4
|
+
* Chunk data into groups
|
|
5
|
+
* @returns [group, child, child, group, child, child]
|
|
6
|
+
*/
|
|
3
7
|
export declare function getDataGroupBy<T>(data: readonly T[], key: string, sort?: (isGroup: boolean) => <T>(a: T, b: T) => number): (T | {
|
|
4
8
|
groupTitle: string;
|
|
5
9
|
children: T[];
|
|
6
10
|
})[];
|
|
11
|
+
/**
|
|
12
|
+
* Chunk options into groups
|
|
13
|
+
* @returns [
|
|
14
|
+
* group {
|
|
15
|
+
* key
|
|
16
|
+
* options
|
|
17
|
+
* }
|
|
18
|
+
* group {
|
|
19
|
+
* key
|
|
20
|
+
* options
|
|
21
|
+
* }
|
|
22
|
+
* ]
|
|
23
|
+
*/
|
|
24
|
+
export declare type Group<T> = {
|
|
25
|
+
key: string;
|
|
26
|
+
options: T[];
|
|
27
|
+
};
|
|
28
|
+
export declare type CompareFn<T> = (a: T, b: T) => number;
|
|
29
|
+
export declare function groupOptions<T>(options: readonly T[], groupKey: string, compareOptions?: CompareFn<T>, compareGroups?: CompareFn<Group<T>>): Group<T>[];
|
|
@@ -3,6 +3,11 @@ import { WalkTreeStrategy, flattenTree } from '../utils/treeUtils';
|
|
|
3
3
|
var hasSymbol = typeof Symbol === 'function';
|
|
4
4
|
export var KEY_GROUP = hasSymbol ? Symbol('_$grouped') : '_$grouped';
|
|
5
5
|
export var KEY_GROUP_TITLE = 'groupTitle';
|
|
6
|
+
/**
|
|
7
|
+
* Chunk data into groups
|
|
8
|
+
* @returns [group, child, child, group, child, child]
|
|
9
|
+
*/
|
|
10
|
+
|
|
6
11
|
export function getDataGroupBy(data, key, sort) {
|
|
7
12
|
var groupMap = _groupBy(data, key);
|
|
8
13
|
|
|
@@ -27,4 +32,31 @@ export function getDataGroupBy(data, key, sort) {
|
|
|
27
32
|
return flattenTree(groups, function (group) {
|
|
28
33
|
return group.children;
|
|
29
34
|
}, WalkTreeStrategy.DFS);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Chunk options into groups
|
|
38
|
+
* @returns [
|
|
39
|
+
* group {
|
|
40
|
+
* key
|
|
41
|
+
* options
|
|
42
|
+
* }
|
|
43
|
+
* group {
|
|
44
|
+
* key
|
|
45
|
+
* options
|
|
46
|
+
* }
|
|
47
|
+
* ]
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
export function groupOptions(options, groupKey, compareOptions, compareGroups) {
|
|
51
|
+
var groupMap = _groupBy(options, groupKey);
|
|
52
|
+
|
|
53
|
+
var groups = Object.entries(groupMap).map(function (_ref3) {
|
|
54
|
+
var key = _ref3[0],
|
|
55
|
+
options = _ref3[1];
|
|
56
|
+
return {
|
|
57
|
+
key: key,
|
|
58
|
+
options: typeof compareOptions === 'function' ? options.sort(compareOptions) : options
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
return typeof compareGroups === 'function' ? groups.sort(compareGroups) : groups;
|
|
30
62
|
}
|
package/package.json
CHANGED