@neovici/cosmoz-queue 2.4.2 → 2.5.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/queue/render.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { nothing, TemplateResult } from 'lit-html';
|
|
2
1
|
import { RenderTabs } from '@neovici/cosmoz-tabs/next/index.js';
|
|
3
|
-
import
|
|
2
|
+
import { nothing, TemplateResult } from 'lit-html';
|
|
4
3
|
import type { Pagination } from './types';
|
|
4
|
+
import type { Tab } from './use-tabs';
|
|
5
5
|
export declare const renderNav: ({ next, prev, }: {
|
|
6
6
|
next?: () => void;
|
|
7
7
|
prev?: () => void;
|
|
8
8
|
}) => TemplateResult<1>;
|
|
9
9
|
export declare const renderPagination: (pagination?: Pagination) => TemplateResult<1> | typeof nothing;
|
|
10
|
-
export declare const renderStats: <I>({ pagination, index, items, totalAvailable, nav, }: {
|
|
10
|
+
export declare const renderStats: <I>({ pagination, index, items, totalAvailable, nav, activeTab, }: {
|
|
11
11
|
pagination?: Pagination;
|
|
12
12
|
totalAvailable?: number;
|
|
13
13
|
index?: number;
|
|
@@ -16,6 +16,7 @@ export declare const renderStats: <I>({ pagination, index, items, totalAvailable
|
|
|
16
16
|
items?: I[];
|
|
17
17
|
index: number;
|
|
18
18
|
};
|
|
19
|
+
activeTab?: string;
|
|
19
20
|
}) => TemplateResult<1> | typeof nothing;
|
|
20
21
|
interface RenderView<I, D> {
|
|
21
22
|
animationEnd$: Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/queue/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/queue/render.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAG5E,OAAO,EAAQ,OAAO,EAAE,cAAc,EAAE,M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S,CAAC,GACtE,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,CAAC,EAAE,iJAc/B,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,sBAgCnB,CAAC"}
|
package/dist/queue/render.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { slideInLeft, slideInRight } from '@neovici/cosmoz-slider';
|
|
2
|
+
import { renderTabs } from '@neovici/cosmoz-tabs/next/index.js';
|
|
3
3
|
import { lazyUntil } from '@neovici/cosmoz-utils/directives/lazy-until';
|
|
4
4
|
import { t } from 'i18next';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import renderStyles from './style';
|
|
5
|
+
import { html, nothing } from 'lit-html';
|
|
6
|
+
import { guard } from 'lit-html/directives/guard.js';
|
|
8
7
|
import { arrow } from './icon';
|
|
8
|
+
import renderStyles from './style';
|
|
9
9
|
const _emptySlide = {
|
|
10
10
|
id: 'empty',
|
|
11
11
|
content: nothing,
|
|
@@ -55,7 +55,7 @@ export const renderPagination = (pagination) => {
|
|
|
55
55
|
</button>
|
|
56
56
|
</div>`;
|
|
57
57
|
};
|
|
58
|
-
export const renderStats = ({ pagination, index, items, totalAvailable, nav, }) => {
|
|
58
|
+
export const renderStats = ({ pagination, index, items, totalAvailable, nav, activeTab, }) => {
|
|
59
59
|
if (items.length < 1) {
|
|
60
60
|
return nothing;
|
|
61
61
|
}
|
|
@@ -73,7 +73,7 @@ export const renderStats = ({ pagination, index, items, totalAvailable, nav, })
|
|
|
73
73
|
const qidx = nav.index;
|
|
74
74
|
const qlen = nav.items?.length;
|
|
75
75
|
return [
|
|
76
|
-
qlen !== items.length
|
|
76
|
+
qlen !== items.length && ['queue', 'split'].includes(activeTab || '')
|
|
77
77
|
? [qidx < 0 ? '?' : qidx + 1, qlen].join('/')
|
|
78
78
|
: [index + 1, items.length].join('-'),
|
|
79
79
|
];
|
|
@@ -119,6 +119,7 @@ export const renderQueue = ({ heading, afterHeading, index, mobile, tabnav, item
|
|
|
119
119
|
index,
|
|
120
120
|
items,
|
|
121
121
|
nav,
|
|
122
|
+
activeTab,
|
|
122
123
|
})}
|
|
123
124
|
${renderPagination(pagination)}
|
|
124
125
|
</cosmoz-tabs-next>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-queue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "A reusable queue component for master-detail views with list, split, and queue modes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"./list/more/render": "./dist/list/more/render-more.js"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@neovici/cosmoz-form": "^1.0.1 || ^2.0.0",
|
|
77
|
+
"@neovici/cosmoz-form": "^1.0.1 || ^2.0.0 || ^3.0.0",
|
|
78
78
|
"@neovici/cosmoz-i18next": "^3.5.1",
|
|
79
79
|
"@neovici/cosmoz-omnitable": "^16.0.3 || ^17.0.0 || ^18.0.0",
|
|
80
80
|
"@neovici/cosmoz-router": "^11.2.8",
|