@croquiscom/pds 4.5.0 → 4.7.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 +12 -0
- package/dist/components/column-view-controller/ColumnViewController.d.ts +41 -0
- package/dist/components/column-view-controller/ColumnViewController.stories.d.ts +8 -0
- package/dist/components/column-view-controller/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/list/List.d.ts +5 -5
- package/dist/components/list/List.stories.d.ts +2 -2
- package/dist/components/list-item/ListItem.d.ts +2 -2
- package/dist/components/list-item/ListItem.stories.d.ts +2 -3
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/en.d.ts +7 -0
- package/dist/locales/ja.d.ts +7 -0
- package/dist/locales/ko.d.ts +7 -0
- package/locales/en.esm.js +7 -0
- package/locales/en.esm.js.map +1 -1
- package/locales/en.js +7 -0
- package/locales/en.js.map +1 -1
- package/locales/ja.esm.js +7 -0
- package/locales/ja.esm.js.map +1 -1
- package/locales/ja.js +7 -0
- package/locales/ja.js.map +1 -1
- package/locales/ko.esm.js +7 -0
- package/locales/ko.esm.js.map +1 -1
- package/locales/ko.js +7 -0
- package/locales/ko.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { TableColumnType } from '../table';
|
|
3
|
+
export interface TableColumnViewType<DataType> extends TableColumnType<DataType> {
|
|
4
|
+
isOn?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ColumnViewControllerProps<DataType> {
|
|
7
|
+
/**
|
|
8
|
+
* columns의 모든 width가 필수값이어야 함
|
|
9
|
+
*/
|
|
10
|
+
columns: Array<TableColumnViewType<DataType>>;
|
|
11
|
+
onChange: (columns: Array<TableColumnViewType<DataType>>) => void;
|
|
12
|
+
width?: number;
|
|
13
|
+
/**
|
|
14
|
+
* 고정 column 변경 기능 사용 여부
|
|
15
|
+
* @default true
|
|
16
|
+
* @see maxFixedCount
|
|
17
|
+
* @see pullsFixed
|
|
18
|
+
*/
|
|
19
|
+
canFixed?: boolean;
|
|
20
|
+
maxFixedCount?: number;
|
|
21
|
+
/**
|
|
22
|
+
* 고정 column을 별도로 끌어서 사용할 지 여부
|
|
23
|
+
* @default false
|
|
24
|
+
* @see noFixedItemsText
|
|
25
|
+
* @see fixedSectionTitle
|
|
26
|
+
*/
|
|
27
|
+
pullsFixed?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* @default '고정 정보가 없습니다.'
|
|
30
|
+
*/
|
|
31
|
+
noFixedItemsText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @default '고정 정보'
|
|
34
|
+
*/
|
|
35
|
+
fixedSectionTitle?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @default '목록 정보'
|
|
38
|
+
*/
|
|
39
|
+
listSectionTitle?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const ColumnViewController: <T>({ children, columns, onChange, width, canFixed, pullsFixed, maxFixedCount, noFixedItemsText, fixedSectionTitle, listSectionTitle, }: React.PropsWithChildren<ColumnViewControllerProps<T>>) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentMeta } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const _default: ComponentMeta<(<T>({ children, columns, onChange, width, canFixed, pullsFixed, maxFixedCount, noFixedItemsText, fixedSectionTitle, listSectionTitle, }: React.PropsWithChildren<import("./ColumnViewController").ColumnViewControllerProps<T>>) => JSX.Element)>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Base: any;
|
|
6
|
+
export declare const PullsFixed: any;
|
|
7
|
+
export declare const MaxFixedCount: any;
|
|
8
|
+
export declare const NoFixed: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ColumnViewController';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { ListItemProps } from '../list-item';
|
|
3
|
-
export interface ListProps {
|
|
4
|
-
items: Array<
|
|
3
|
+
export interface ListProps<T = string> {
|
|
4
|
+
items: Array<ListItemProps<T>>;
|
|
5
5
|
/**
|
|
6
6
|
* 항목을 드래그해서 순서를 바꿀 수 있는 기능 확장 여부
|
|
7
7
|
* @default false
|
|
@@ -11,7 +11,7 @@ export interface ListProps {
|
|
|
11
11
|
* 드래그될 경우 변경된 items값을 파라미터로 넘겨준다
|
|
12
12
|
* @see draggable
|
|
13
13
|
*/
|
|
14
|
-
onChange?: (items: Array<
|
|
14
|
+
onChange?: (items: Array<ListItemProps<T>>) => void;
|
|
15
15
|
width?: number;
|
|
16
16
|
}
|
|
17
|
-
export declare const List:
|
|
17
|
+
export declare const List: <T extends string>({ items, draggable, onChange, width }: ListProps<T>) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: ComponentMeta<React.FC<import("./List").ListProps>>;
|
|
3
|
+
declare const _default: ComponentMeta<(<T extends string>({ items, draggable, onChange, width }: import("./List").ListProps<T>) => JSX.Element)>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Base: any;
|
|
6
6
|
export declare const Draggable: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface ListItemProps<T = string> {
|
|
3
3
|
id: T;
|
|
4
4
|
text: ReactNode;
|
|
@@ -32,4 +32,4 @@ export interface ListItemProps<T = string> {
|
|
|
32
32
|
*/
|
|
33
33
|
onPin?: (fixed: boolean, index?: number) => void;
|
|
34
34
|
}
|
|
35
|
-
export declare const ListItem:
|
|
35
|
+
export declare const ListItem: <T extends string>({ id, isOn, fixed, disabled, text, draggable, index, onToggle, onPin, }: ListItemProps<T>) => JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import
|
|
3
|
-
import { ListItemProps } from './ListItem';
|
|
4
|
-
declare const _default: ComponentMeta<React.FC<ListItemProps<string>>>;
|
|
3
|
+
declare const _default: ComponentMeta<(<T extends string>({ id, isOn, fixed, disabled, text, draggable, index, onToggle, onPin, }: import("./ListItem").ListItemProps<T>) => JSX.Element)>;
|
|
5
4
|
export default _default;
|
|
6
5
|
export declare const Base: any;
|
|
7
6
|
export declare const Draggable: any;
|