forstok-ui-lib 6.2.12 → 6.3.1
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 +356 -257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +420 -321
- 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 +104 -1
- 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,108 @@ export const ListTableContainer = styled.div`
|
|
|
2978
2979
|
}
|
|
2979
2980
|
`
|
|
2980
2981
|
export const ItemTable = styled.section``
|
|
2982
|
+
|
|
2983
|
+
const overflowStyle = css`
|
|
2984
|
+
overflow: hidden;
|
|
2985
|
+
> div {
|
|
2986
|
+
overflow: auto;
|
|
2987
|
+
}
|
|
2988
|
+
@media only screen and (min-width: 1024px) {
|
|
2989
|
+
> div {
|
|
2990
|
+
margin: 0px 9px 0px 9px;
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
`
|
|
2994
|
+
const overflowItemTableStyle = css`
|
|
2995
|
+
width: 100%;
|
|
2996
|
+
display: flex;
|
|
2997
|
+
margin: 0;
|
|
2998
|
+
padding: 0;
|
|
2999
|
+
grid-gap: 0;
|
|
3000
|
+
&[role=rowheader] > div[role=group],
|
|
3001
|
+
&[role=row] > div[role=group],
|
|
3002
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup],
|
|
3003
|
+
&[role=row] > div[role=cellgroup],
|
|
3004
|
+
._refCollapse > div:not(._refCollapseContainer),
|
|
3005
|
+
._refCollapseContainer > div {
|
|
3006
|
+
display: flex;
|
|
3007
|
+
flex: 2;
|
|
3008
|
+
grid-gap: 0;
|
|
3009
|
+
}
|
|
3010
|
+
&[role=row] > div[role=cellgroup] {
|
|
3011
|
+
flex-direction: column;
|
|
3012
|
+
}
|
|
3013
|
+
&[role=rowheader] > div[role=columnheader],
|
|
3014
|
+
&[role=rowheader] > div[role=group] > div[role=cell],
|
|
3015
|
+
&[role=row] > div[role=cell],
|
|
3016
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell],
|
|
3017
|
+
._refCollapse > div:not(._refCollapseContainer) > div[role=cell],
|
|
3018
|
+
._refCollapseContainer > div > div[role=cell] {
|
|
3019
|
+
align-self: stretch;
|
|
3020
|
+
width: 100%;
|
|
3021
|
+
}
|
|
3022
|
+
&[role=rowheader] > div[role=columnheader],
|
|
3023
|
+
&[role=rowheader] > div[role=group] > div[role=cell] {
|
|
3024
|
+
padding-top: 1em;
|
|
3025
|
+
padding-bottom: 1em;
|
|
3026
|
+
border-bottom: 1px solid var(--ter-clr-ln);
|
|
3027
|
+
}
|
|
3028
|
+
&[role=row] > div[role=cell],
|
|
3029
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell],
|
|
3030
|
+
._refCollapse > div:not(._refCollapseContainer) > div[role=cell],
|
|
3031
|
+
._refCollapseContainer > div > div[role=cell] {
|
|
3032
|
+
padding-top: 1.25em;
|
|
3033
|
+
padding-bottom: 1.25em;
|
|
3034
|
+
}
|
|
3035
|
+
&[role=rowheader], &[role=row] {
|
|
3036
|
+
padding: 0;
|
|
3037
|
+
margin: 0;
|
|
3038
|
+
> div {
|
|
3039
|
+
padding-right: 12px;
|
|
3040
|
+
&:first-child {
|
|
3041
|
+
padding-left: 0;
|
|
3042
|
+
}
|
|
3043
|
+
&:last-child {
|
|
3044
|
+
padding-right: 0;
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
&[role=rowheader] > div[role=group] > div[role=cell], &[role=row] > div[role=cellgroup] > div[role=rowgroup] > div[role=cell] {
|
|
3049
|
+
padding-right: 12px;
|
|
3050
|
+
&:last-child {
|
|
3051
|
+
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
&[role=rowheader] {
|
|
3055
|
+
border: none;
|
|
3056
|
+
}
|
|
3057
|
+
&[role=row] > div[role=cellgroup] > div[role=rowgroup],
|
|
3058
|
+
._refCollapse > div, ._refCollapseContainer > div {
|
|
3059
|
+
padding-bottom: 0;
|
|
3060
|
+
padding-top: 0;
|
|
3061
|
+
&:nth-child(n+2) {
|
|
3062
|
+
padding-top: 0;
|
|
3063
|
+
}
|
|
3064
|
+
&:last-child {
|
|
3065
|
+
padding-bottom: 0;
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
&:last-child {
|
|
3069
|
+
margin-bottom: 0;
|
|
3070
|
+
}
|
|
3071
|
+
@media only screen and (min-width: 1024px) {
|
|
3072
|
+
&[role=rowheader], &[role=row] {
|
|
3073
|
+
> div {
|
|
3074
|
+
&:first-child {
|
|
3075
|
+
padding-left: 9px;
|
|
3076
|
+
}
|
|
3077
|
+
&:last-child {
|
|
3078
|
+
padding-right: 9px;
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
`
|
|
2981
3084
|
const listTableStyles = {
|
|
2982
3085
|
item: css`
|
|
2983
3086
|
${ItemTable} {
|
|
@@ -3486,7 +3589,7 @@ export const DropdownAction = styled.div`
|
|
|
3486
3589
|
export const FilterList = styled.ul`
|
|
3487
3590
|
${clearList}
|
|
3488
3591
|
`
|
|
3489
|
-
|
|
3592
|
+
export const FilterItem = styled.li`
|
|
3490
3593
|
&._refCheckbox {
|
|
3491
3594
|
display: block;
|
|
3492
3595
|
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';
|