@cloud-ru/ds-list 2.0.5-preview-12daa8f6.0 → 2.0.5-preview-2eb4a9ee.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/dist/cjs/helperComponents/MobileDroplist/MobileDroplist.js +1 -1
- package/dist/cjs/helperComponents/MobileDroplist/utils.d.ts +2 -2
- package/dist/esm/helperComponents/MobileDroplist/MobileDroplist.js +1 -1
- package/dist/esm/helperComponents/MobileDroplist/utils.d.ts +2 -2
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/helperComponents/MobileDroplist/MobileDroplist.tsx +2 -2
- package/src/helperComponents/MobileDroplist/utils.tsx +8 -5
|
@@ -95,7 +95,7 @@ footer, onItemsReorder, ...rest }) {
|
|
|
95
95
|
// поверх предыдущего (свой backdrop), а не заменяет его содержимое. Назад — закрывает верхний.
|
|
96
96
|
const sheets = [{ source: items, title: label, item: undefined }].concat(path.map(indexPath => {
|
|
97
97
|
const item = (0, utils_2.resolveItemByPath)(items, indexPath);
|
|
98
|
-
return { source:
|
|
98
|
+
return { source: item?.items ?? [], title: (0, utils_2.nextListOption)(item), item };
|
|
99
99
|
}));
|
|
100
100
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [trigger, sheets.map(({ source, title, item }, levelIndex) => {
|
|
101
101
|
const isRoot = levelIndex === 0;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Item, NextListItem } from '../../components/Items';
|
|
1
|
+
import { Item, NextListItem, ReorderItem } from '../../components/Items';
|
|
2
2
|
/**
|
|
3
3
|
* Айтем уровня по индексному пути от корня. Путь разрешается на каждом рендере по актуальным
|
|
4
4
|
* `items`: иначе открытый sheet сохранял бы копию айтема, полученную при заходе во вложенный
|
|
5
5
|
* список, и не отражал бы её последующие изменения (например, смену выбранной строки).
|
|
6
6
|
*/
|
|
7
|
-
export declare function resolveItemByPath(items:
|
|
7
|
+
export declare function resolveItemByPath<T extends Item | ReorderItem>(items: T[], indexPath: number[]): NextListItem | undefined;
|
|
8
8
|
/** Текст `label` next-list-айтема — заголовок шапки sheet'а при заходе во вложенный список. */
|
|
9
9
|
export declare function nextListOption(item?: NextListItem): string | undefined;
|
|
10
10
|
/**
|
|
@@ -89,7 +89,7 @@ footer, onItemsReorder, ...rest }) {
|
|
|
89
89
|
// поверх предыдущего (свой backdrop), а не заменяет его содержимое. Назад — закрывает верхний.
|
|
90
90
|
const sheets = [{ source: items, title: label, item: undefined }].concat(path.map(indexPath => {
|
|
91
91
|
const item = resolveItemByPath(items, indexPath);
|
|
92
|
-
return { source:
|
|
92
|
+
return { source: item?.items ?? [], title: nextListOption(item), item };
|
|
93
93
|
}));
|
|
94
94
|
return (_jsxs(_Fragment, { children: [trigger, sheets.map(({ source, title, item }, levelIndex) => {
|
|
95
95
|
const isRoot = levelIndex === 0;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Item, NextListItem } from '../../components/Items/index.js';
|
|
1
|
+
import { Item, NextListItem, ReorderItem } from '../../components/Items/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Айтем уровня по индексному пути от корня. Путь разрешается на каждом рендере по актуальным
|
|
4
4
|
* `items`: иначе открытый sheet сохранял бы копию айтема, полученную при заходе во вложенный
|
|
5
5
|
* список, и не отражал бы её последующие изменения (например, смену выбранной строки).
|
|
6
6
|
*/
|
|
7
|
-
export declare function resolveItemByPath(items:
|
|
7
|
+
export declare function resolveItemByPath<T extends Item | ReorderItem>(items: T[], indexPath: number[]): NextListItem | undefined;
|
|
8
8
|
/** Текст `label` next-list-айтема — заголовок шапки sheet'а при заходе во вложенный список. */
|
|
9
9
|
export declare function nextListOption(item?: NextListItem): string | undefined;
|
|
10
10
|
/**
|