forstok-ui-lib 6.2.12 → 6.3.2
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/index.d.ts +20 -18
- package/dist/index.js +252 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +317 -127
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/javascripts/function.ts +2 -2
- package/src/assets/stylesheets/shares.styles.ts +197 -5
- package/src/typeds/shares.typed.ts +29 -1
package/package.json
CHANGED
|
@@ -649,8 +649,8 @@ export const isMobile = () => {
|
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
export const evCloseDropdown = (currentTarget: EventTarget & HTMLElement) => {
|
|
652
|
-
const containerEl = currentTarget.closest('._refContainer') as HTMLElement
|
|
653
|
-
const isOpen = containerEl ? containerEl.classList.contains('is-shown') : false
|
|
652
|
+
const containerEl = currentTarget.closest('._refContainer') as HTMLElement;
|
|
653
|
+
const isOpen = containerEl ? containerEl.classList.contains('is-shown') : false;
|
|
654
654
|
if (isOpen) {
|
|
655
655
|
const containerRefs = document.getElementsByClassName('_refContainer is-shown') as HTMLCollectionOf<HTMLElement>
|
|
656
656
|
if (containerRefs?.length) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { responseWidth, formLabel, elipsis, multiElipsis, headTable, clearList, dropBase, buttonStyle, buttonActiveStyle, buttonHoverStyle } from './bases.styles';
|
|
3
|
+
import { ModeListTableColumn } from '../../typeds';
|
|
3
4
|
|
|
4
5
|
const initialStyles = css `
|
|
5
6
|
width: 32px;
|
|
@@ -2978,6 +2979,7 @@ export const ListTableContainer = styled.div`
|
|
|
2978
2979
|
}
|
|
2979
2980
|
`
|
|
2980
2981
|
export const ItemTable = styled.section``
|
|
2982
|
+
|
|
2981
2983
|
const listTableStyles = {
|
|
2982
2984
|
item: css`
|
|
2983
2985
|
${ItemTable} {
|
|
@@ -3012,9 +3014,104 @@ const listTableStyles = {
|
|
|
3012
3014
|
}
|
|
3013
3015
|
`,
|
|
3014
3016
|
quantity: css`
|
|
3015
|
-
|
|
3017
|
+
overflow: hidden;
|
|
3018
|
+
> div {
|
|
3019
|
+
overflow: auto;
|
|
3020
|
+
}
|
|
3021
|
+
@media only screen and (min-width: 1024px) {
|
|
3022
|
+
> div {
|
|
3023
|
+
margin: 0px 9px 0px 9px;
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3016
3026
|
${ItemTable} {
|
|
3017
|
-
|
|
3027
|
+
width: 100%;
|
|
3028
|
+
display: flex;
|
|
3029
|
+
margin: 0;
|
|
3030
|
+
padding: 0;
|
|
3031
|
+
grid-gap: 0;
|
|
3032
|
+
&[role=rowheader] > div[role=group],
|
|
3033
|
+
&[role=row] > div[role=group],
|
|
3034
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup],
|
|
3035
|
+
&[role=row] > div[role=cellgroup],
|
|
3036
|
+
._refCollapse > div:not(._refCollapseContainer),
|
|
3037
|
+
._refCollapseContainer > div {
|
|
3038
|
+
display: flex;
|
|
3039
|
+
flex: 2;
|
|
3040
|
+
grid-gap: 0;
|
|
3041
|
+
}
|
|
3042
|
+
&[role=row] > div[role=cellgroup] {
|
|
3043
|
+
flex-direction: column;
|
|
3044
|
+
}
|
|
3045
|
+
&[role=rowheader] > div[role=columnheader],
|
|
3046
|
+
&[role=rowheader] > div[role=group] > div[role=cell],
|
|
3047
|
+
&[role=row] > div[role=cell],
|
|
3048
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell],
|
|
3049
|
+
._refCollapse > div:not(._refCollapseContainer) > div[role=cell],
|
|
3050
|
+
._refCollapseContainer > div > div[role=cell] {
|
|
3051
|
+
align-self: stretch;
|
|
3052
|
+
width: 100%;
|
|
3053
|
+
}
|
|
3054
|
+
&[role=rowheader] > div[role=columnheader],
|
|
3055
|
+
&[role=rowheader] > div[role=group] > div[role=cell] {
|
|
3056
|
+
padding-top: 1em;
|
|
3057
|
+
padding-bottom: 1em;
|
|
3058
|
+
border-bottom: 1px solid var(--ter-clr-ln);
|
|
3059
|
+
}
|
|
3060
|
+
&[role=row] > div[role=cell],
|
|
3061
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell],
|
|
3062
|
+
._refCollapse > div:not(._refCollapseContainer) > div[role=cell],
|
|
3063
|
+
._refCollapseContainer > div > div[role=cell] {
|
|
3064
|
+
padding-top: 1.25em;
|
|
3065
|
+
padding-bottom: 1.25em;
|
|
3066
|
+
}
|
|
3067
|
+
&[role=rowheader], &[role=row] {
|
|
3068
|
+
padding: 0;
|
|
3069
|
+
margin: 0;
|
|
3070
|
+
> div {
|
|
3071
|
+
padding-right: 12px;
|
|
3072
|
+
&:first-child {
|
|
3073
|
+
padding-left: 0;
|
|
3074
|
+
}
|
|
3075
|
+
&:last-child {
|
|
3076
|
+
padding-right: 0;
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
&[role=rowheader] > div[role=group] > div[role=cell], &[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell] {
|
|
3081
|
+
padding-right: 12px;
|
|
3082
|
+
&:last-child {
|
|
3083
|
+
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
&[role=rowheader] {
|
|
3087
|
+
border: none;
|
|
3088
|
+
}
|
|
3089
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup],
|
|
3090
|
+
._refCollapse > div, ._refCollapseContainer > div {
|
|
3091
|
+
padding-bottom: 0;
|
|
3092
|
+
padding-top: 0;
|
|
3093
|
+
&:nth-child(n+2) {
|
|
3094
|
+
padding-top: 0;
|
|
3095
|
+
}
|
|
3096
|
+
&:last-child {
|
|
3097
|
+
padding-bottom: 0;
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
&:last-child {
|
|
3101
|
+
margin-bottom: 0;
|
|
3102
|
+
}
|
|
3103
|
+
@media only screen and (min-width: 1024px) {
|
|
3104
|
+
&[role=rowheader], &[role=row] {
|
|
3105
|
+
> div {
|
|
3106
|
+
&:first-child {
|
|
3107
|
+
padding-left: 9px;
|
|
3108
|
+
}
|
|
3109
|
+
&:last-child {
|
|
3110
|
+
padding-right: 9px;
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3018
3115
|
.column-product {
|
|
3019
3116
|
min-width: calc(var(--item-min) + 25px);
|
|
3020
3117
|
max-width: calc(var(--item-max) + 25px);
|
|
@@ -3321,9 +3418,104 @@ const listTableStyles = {
|
|
|
3321
3418
|
}
|
|
3322
3419
|
`,
|
|
3323
3420
|
'table-customheader': css`
|
|
3324
|
-
|
|
3421
|
+
overflow: hidden;
|
|
3422
|
+
> div {
|
|
3423
|
+
overflow: auto;
|
|
3424
|
+
}
|
|
3425
|
+
@media only screen and (min-width: 1024px) {
|
|
3426
|
+
> div {
|
|
3427
|
+
margin: 0px 9px 0px 9px;
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3325
3430
|
${ItemTable} {
|
|
3326
|
-
|
|
3431
|
+
width: 100%;
|
|
3432
|
+
display: flex;
|
|
3433
|
+
margin: 0;
|
|
3434
|
+
padding: 0;
|
|
3435
|
+
grid-gap: 0;
|
|
3436
|
+
&[role=rowheader] > div[role=group],
|
|
3437
|
+
&[role=row] > div[role=group],
|
|
3438
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup],
|
|
3439
|
+
&[role=row] > div[role=cellgroup],
|
|
3440
|
+
._refCollapse > div:not(._refCollapseContainer),
|
|
3441
|
+
._refCollapseContainer > div {
|
|
3442
|
+
display: flex;
|
|
3443
|
+
flex: 2;
|
|
3444
|
+
grid-gap: 0;
|
|
3445
|
+
}
|
|
3446
|
+
&[role=row] > div[role=cellgroup] {
|
|
3447
|
+
flex-direction: column;
|
|
3448
|
+
}
|
|
3449
|
+
&[role=rowheader] > div[role=columnheader],
|
|
3450
|
+
&[role=rowheader] > div[role=group] > div[role=cell],
|
|
3451
|
+
&[role=row] > div[role=cell],
|
|
3452
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell],
|
|
3453
|
+
._refCollapse > div:not(._refCollapseContainer) > div[role=cell],
|
|
3454
|
+
._refCollapseContainer > div > div[role=cell] {
|
|
3455
|
+
align-self: stretch;
|
|
3456
|
+
width: 100%;
|
|
3457
|
+
}
|
|
3458
|
+
&[role=rowheader] > div[role=columnheader],
|
|
3459
|
+
&[role=rowheader] > div[role=group] > div[role=cell] {
|
|
3460
|
+
padding-top: 1em;
|
|
3461
|
+
padding-bottom: 1em;
|
|
3462
|
+
border-bottom: 1px solid var(--ter-clr-ln);
|
|
3463
|
+
}
|
|
3464
|
+
&[role=row] > div[role=cell],
|
|
3465
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell],
|
|
3466
|
+
._refCollapse > div:not(._refCollapseContainer) > div[role=cell],
|
|
3467
|
+
._refCollapseContainer > div > div[role=cell] {
|
|
3468
|
+
padding-top: 1.25em;
|
|
3469
|
+
padding-bottom: 1.25em;
|
|
3470
|
+
}
|
|
3471
|
+
&[role=rowheader], &[role=row] {
|
|
3472
|
+
padding: 0;
|
|
3473
|
+
margin: 0;
|
|
3474
|
+
> div {
|
|
3475
|
+
padding-right: 12px;
|
|
3476
|
+
&:first-child {
|
|
3477
|
+
padding-left: 0;
|
|
3478
|
+
}
|
|
3479
|
+
&:last-child {
|
|
3480
|
+
padding-right: 0;
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
&[role=rowheader] > div[role=group] > div[role=cell], &[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell] {
|
|
3485
|
+
padding-right: 12px;
|
|
3486
|
+
&:last-child {
|
|
3487
|
+
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3490
|
+
&[role=rowheader] {
|
|
3491
|
+
border: none;
|
|
3492
|
+
}
|
|
3493
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup],
|
|
3494
|
+
._refCollapse > div, ._refCollapseContainer > div {
|
|
3495
|
+
padding-bottom: 0;
|
|
3496
|
+
padding-top: 0;
|
|
3497
|
+
&:nth-child(n+2) {
|
|
3498
|
+
padding-top: 0;
|
|
3499
|
+
}
|
|
3500
|
+
&:last-child {
|
|
3501
|
+
padding-bottom: 0;
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
&:last-child {
|
|
3505
|
+
margin-bottom: 0;
|
|
3506
|
+
}
|
|
3507
|
+
@media only screen and (min-width: 1024px) {
|
|
3508
|
+
&[role=rowheader], &[role=row] {
|
|
3509
|
+
> div {
|
|
3510
|
+
&:first-child {
|
|
3511
|
+
padding-left: 9px;
|
|
3512
|
+
}
|
|
3513
|
+
&:last-child {
|
|
3514
|
+
padding-right: 9px;
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3327
3519
|
> *:last-child {
|
|
3328
3520
|
display: block;
|
|
3329
3521
|
justify-content: inherit;
|
|
@@ -3486,7 +3678,7 @@ export const DropdownAction = styled.div`
|
|
|
3486
3678
|
export const FilterList = styled.ul`
|
|
3487
3679
|
${clearList}
|
|
3488
3680
|
`
|
|
3489
|
-
|
|
3681
|
+
export const FilterItem = styled.li`
|
|
3490
3682
|
&._refCheckbox {
|
|
3491
3683
|
display: block;
|
|
3492
3684
|
float: left;
|
|
@@ -263,4 +263,32 @@ type DispatchWithCallback<A, S> = (
|
|
|
263
263
|
callback: Callback<S>,
|
|
264
264
|
) => void;
|
|
265
265
|
|
|
266
|
-
export type TStateCallback<TData> = DispatchWithCallback<React.SetStateAction<TData>, TData>
|
|
266
|
+
export type TStateCallback<TData> = DispatchWithCallback<React.SetStateAction<TData>, TData>
|
|
267
|
+
|
|
268
|
+
export type ModeListTableColumn =
|
|
269
|
+
| 'item'
|
|
270
|
+
| 'listing'
|
|
271
|
+
| 'quantity'
|
|
272
|
+
| 'picklist'
|
|
273
|
+
| 'package'
|
|
274
|
+
| 'shipment'
|
|
275
|
+
| 'invoice'
|
|
276
|
+
| 'payment-receive'
|
|
277
|
+
| 'sales-return'
|
|
278
|
+
| 'activity'
|
|
279
|
+
| 'putaway'
|
|
280
|
+
| 'inbound'
|
|
281
|
+
| 'lowstock'
|
|
282
|
+
| 'price'
|
|
283
|
+
| 'stock-adjustment'
|
|
284
|
+
| 'stock-outbound'
|
|
285
|
+
| 'stock-transfer'
|
|
286
|
+
| 'promotion'
|
|
287
|
+
| 'stock-history'
|
|
288
|
+
| 'price-history'
|
|
289
|
+
| 'turnover'
|
|
290
|
+
| 'days-outofstock'
|
|
291
|
+
| 'warehouses'
|
|
292
|
+
| 'archived'
|
|
293
|
+
| 'order'
|
|
294
|
+
| 'table-customheader';
|