@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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 4.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a51ef34: 버튼 children으로 분리
8
+
9
+ ## 4.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 439e2eb: add ColumnViewController
14
+
3
15
  ## 4.5.0
4
16
 
5
17
  ### Minor Changes
@@ -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';
@@ -30,3 +30,4 @@ export * from './table';
30
30
  export * from './drawer';
31
31
  export * from './list';
32
32
  export * from './list-item';
33
+ export * from './column-view-controller';
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { ListItemProps } from '../list-item';
3
- export interface ListProps {
4
- items: Array<Omit<ListItemProps, 'draggable' | 'index'>>;
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<Omit<ListItemProps, 'draggable' | 'index'>>) => void;
14
+ onChange?: (items: Array<ListItemProps<T>>) => void;
15
15
  width?: number;
16
16
  }
17
- export declare const List: React.FC<ListProps>;
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 React from 'react';
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 React, { ReactNode } from 'react';
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: React.FC<ListItemProps>;
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 React from 'react';
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;