@owp/core 2.2.3 → 2.2.5
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/_virtual/index11.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -5
- package/dist/_virtual/index15.js.map +1 -1
- package/dist/_virtual/index16.js +2 -2
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js +68 -149
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +186 -162
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js +52 -38
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
- package/dist/components/OwpPageTitle/OwpPageTitle.js +74 -18
- package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js +232 -0
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js.map +1 -0
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js +44 -29
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +102 -41
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +381 -0
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -0
- package/dist/components/OwpSelectorBase/OwpSelectorBase.js +14 -0
- package/dist/components/OwpSelectorBase/OwpSelectorBase.js.map +1 -0
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +152 -0
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -0
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js +120 -0
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js.map +1 -0
- package/dist/components/OwpSelectorBase/utils/querySelectorUtils.js +24 -0
- package/dist/components/OwpSelectorBase/utils/querySelectorUtils.js.map +1 -0
- package/dist/hooks/useHeaderWrapState.js +48 -0
- package/dist/hooks/useHeaderWrapState.js.map +1 -0
- package/dist/hooks.js +40 -38
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +39 -37
- package/dist/index.js.map +1 -1
- package/dist/layout/components/navigation/vertical/NavVerticalLayout.js +63 -27
- package/dist/layout/components/navigation/vertical/NavVerticalLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropDown.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropDown.js.map +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +10 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpCommonCode/OwpCommonCodeSelector.d.ts +16 -6
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +9 -8
- package/dist/types/components/OwpQuerySelector/OwpQuerySelector.d.ts +6 -0
- package/dist/types/components/OwpQuerySelector/index.d.ts +2 -0
- package/dist/types/components/OwpQuerySelector/types/index.d.ts +1 -0
- package/dist/types/components/OwpQuerySelector/types/types.d.ts +42 -0
- package/dist/types/components/OwpSection/OwpSection.d.ts +3 -1
- package/dist/types/components/OwpSelectorBase/OwpSelectorAutocomplete.d.ts +11 -0
- package/dist/types/components/OwpSelectorBase/OwpSelectorBase.d.ts +6 -0
- package/dist/types/components/OwpSelectorBase/OwpSelectorSelect.d.ts +11 -0
- package/dist/types/components/OwpSelectorBase/hooks/useOwpSelectorBase.d.ts +6 -0
- package/dist/types/components/OwpSelectorBase/types/index.d.ts +1 -0
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +59 -0
- package/dist/types/components/OwpSelectorBase/utils/index.d.ts +1 -0
- package/dist/types/components/OwpSelectorBase/utils/querySelectorUtils.d.ts +31 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useHeaderWrapState.d.ts +14 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { OwpSelectorBaseChangeEvent, OwpSelectorBaseProps } from '@/components/OwpSelectorBase/types';
|
|
2
|
+
type OwpQuerySelectorItem = Record<string, unknown>;
|
|
3
|
+
export interface OwpQuerySelectorAsyncSearch {
|
|
4
|
+
buildAllQuery?: () => Record<string, unknown>;
|
|
5
|
+
buildKeywordQuery: (keyword: string) => Record<string, unknown>;
|
|
6
|
+
buildSelectedQuery?: (selectedIds: string[]) => Record<string, unknown>;
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
minLength?: number;
|
|
9
|
+
}
|
|
10
|
+
type OwpQuerySelectorValueConfig = {
|
|
11
|
+
valueKey: string;
|
|
12
|
+
valueResolver?: (item: OwpQuerySelectorItem) => string;
|
|
13
|
+
} | {
|
|
14
|
+
valueKey?: undefined;
|
|
15
|
+
valueResolver: (item: OwpQuerySelectorItem) => string;
|
|
16
|
+
};
|
|
17
|
+
type OwpQuerySelectorLabelConfig = {
|
|
18
|
+
labelKey: string;
|
|
19
|
+
labelResolver?: (item: OwpQuerySelectorItem) => string;
|
|
20
|
+
} | {
|
|
21
|
+
labelKey?: undefined;
|
|
22
|
+
labelResolver: (item: OwpQuerySelectorItem) => string;
|
|
23
|
+
};
|
|
24
|
+
type OwpQuerySelectorSharedProps = Omit<OwpSelectorBaseProps, 'allOptions' | 'allValueMode' | 'disableClientFilter' | 'loading' | 'onChange' | 'options'> & {
|
|
25
|
+
apiUrl: string;
|
|
26
|
+
buildRequestQuery?: (query: Record<string, unknown>) => Record<string, unknown>;
|
|
27
|
+
filterOptions?: (items: OwpQuerySelectorItem[]) => OwpQuerySelectorItem[];
|
|
28
|
+
onChange?: (event: OwpSelectorBaseChangeEvent) => void;
|
|
29
|
+
query: Record<string, unknown>;
|
|
30
|
+
responseListKey?: string;
|
|
31
|
+
};
|
|
32
|
+
export type OwpQuerySelectorBaseProps = OwpQuerySelectorSharedProps & OwpQuerySelectorValueConfig & OwpQuerySelectorLabelConfig;
|
|
33
|
+
export type OwpAutocompleteQuerySelectorProps = OwpQuerySelectorBaseProps & {
|
|
34
|
+
asyncSearch?: OwpQuerySelectorAsyncSearch;
|
|
35
|
+
selectorType: 'autocomplete';
|
|
36
|
+
};
|
|
37
|
+
export type OwpSelectQuerySelectorProps = OwpQuerySelectorBaseProps & {
|
|
38
|
+
asyncSearch?: never;
|
|
39
|
+
selectorType?: 'select';
|
|
40
|
+
};
|
|
41
|
+
export type OwpQuerySelectorProps = OwpAutocompleteQuerySelectorProps | OwpSelectQuerySelectorProps;
|
|
42
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconProps } from '@mui/material';
|
|
1
|
+
import { type IconProps } from '@mui/material';
|
|
2
2
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
interface OwpSectionProps {
|
|
4
4
|
className?: string;
|
|
@@ -19,6 +19,8 @@ interface OwpSectionProps {
|
|
|
19
19
|
* @param disableTitleIcon disableTitleIcon 값
|
|
20
20
|
* @param headerProps headerProps props
|
|
21
21
|
* @param usePageTitle usePageTitle 값
|
|
22
|
+
* @param leftSlot leftSlot 값
|
|
23
|
+
* @param centerSlot centerSlot 값
|
|
22
24
|
* @param actions 액션 영역
|
|
23
25
|
*/
|
|
24
26
|
declare const OwpSection: ({ className, title, disableTitleIcon, headerProps, usePageTitle, actions, leftSlot, centerSlot, children, iconSize, }: OwpSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OwpSelectorBaseHookResult, OwpSelectorBaseProps } from './types';
|
|
2
|
+
interface OwpSelectorAutocompleteProps {
|
|
3
|
+
hookResult: OwpSelectorBaseHookResult;
|
|
4
|
+
props: OwpSelectorBaseProps;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Autocomplete 기반 공통 선택기
|
|
8
|
+
* @param props Autocomplete 렌더링 props
|
|
9
|
+
*/
|
|
10
|
+
export declare const OwpSelectorAutocomplete: ({ hookResult, props }: OwpSelectorAutocompleteProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OwpSelectorBaseHookResult, OwpSelectorBaseProps } from './types';
|
|
2
|
+
interface OwpSelectorSelectProps {
|
|
3
|
+
hookResult: OwpSelectorBaseHookResult;
|
|
4
|
+
props: OwpSelectorBaseProps;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Select 기반 공통 선택기
|
|
8
|
+
* @param props Select 렌더링 props
|
|
9
|
+
*/
|
|
10
|
+
export declare const OwpSelectorSelect: ({ hookResult, props }: OwpSelectorSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type OwpSelectorBaseHookResult, type OwpSelectorBaseProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 공통 선택기 상태 훅
|
|
4
|
+
* @param props 공통 선택기 props
|
|
5
|
+
*/
|
|
6
|
+
export declare const useOwpSelectorBase: ({ allOptions, allValueMode, defaultValue, disableAllValueItem, multiple, name, onChange, options, value, }: OwpSelectorBaseProps) => OwpSelectorBaseHookResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { OwpSelectorAllValueMode, OwpSelectorBaseChangeEvent, OwpSelectorBaseHookResult, OwpSelectorBaseOption, OwpSelectorBaseProps, OwpSelectorEmptyValueMode, OwpSelectorType, } from './types';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SelectProps, TextFieldProps } from '@mui/material';
|
|
3
|
+
export type OwpSelectorType = 'select' | 'autocomplete';
|
|
4
|
+
export type OwpSelectorAllValueMode = 'empty' | 'joined';
|
|
5
|
+
export type OwpSelectorEmptyValueMode = 'all' | 'none';
|
|
6
|
+
export interface OwpSelectorBaseOption<T = unknown> {
|
|
7
|
+
value: string;
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
raw?: T;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface OwpSelectorBaseChangeEvent {
|
|
13
|
+
target: {
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface OwpSelectorBaseProps {
|
|
19
|
+
options: OwpSelectorBaseOption[];
|
|
20
|
+
allOptions?: OwpSelectorBaseOption[];
|
|
21
|
+
selectorType?: OwpSelectorType;
|
|
22
|
+
allValueMode?: OwpSelectorAllValueMode;
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
disableAllValueItem?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
disableClientFilter?: boolean;
|
|
27
|
+
error?: boolean;
|
|
28
|
+
fullWidth?: boolean;
|
|
29
|
+
helperText?: ReactNode;
|
|
30
|
+
label?: ReactNode;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
loadingText?: ReactNode;
|
|
33
|
+
multiple?: boolean;
|
|
34
|
+
name?: string;
|
|
35
|
+
noOptionsText?: ReactNode;
|
|
36
|
+
onChange?: (event: OwpSelectorBaseChangeEvent) => void;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
required?: boolean;
|
|
39
|
+
value?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
textFieldProps?: Omit<TextFieldProps, 'defaultValue' | 'error' | 'fullWidth' | 'helperText' | 'label' | 'onChange' | 'required' | 'value'>;
|
|
42
|
+
selectProps?: Omit<SelectProps<string>, 'defaultValue' | 'displayEmpty' | 'error' | 'fullWidth' | 'label' | 'multiple' | 'onChange' | 'required' | 'value'>;
|
|
43
|
+
autocompleteInputValue?: string;
|
|
44
|
+
onAutocompleteInputChange?: (nextInputValue: string, reason: string) => void;
|
|
45
|
+
}
|
|
46
|
+
export interface OwpSelectorBaseHookResult {
|
|
47
|
+
allOption: OwpSelectorBaseOption<null>;
|
|
48
|
+
allValue: string;
|
|
49
|
+
isAllSelected: boolean;
|
|
50
|
+
resolvedOptions: OwpSelectorBaseOption[];
|
|
51
|
+
selectedOption: OwpSelectorBaseOption | null;
|
|
52
|
+
selectedOptions: OwpSelectorBaseOption[];
|
|
53
|
+
selectedValueList: string[];
|
|
54
|
+
clearSelection: () => void;
|
|
55
|
+
restoreAllSelection: () => void;
|
|
56
|
+
selectAll: () => void;
|
|
57
|
+
selectMultipleValues: (nextSelectedValueList: string[]) => void;
|
|
58
|
+
selectSingleValue: (nextValue: string) => void;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createSelectorChangeEvent, getSelectorAllToken, isSelectorAllOption, joinSelectorValue, mergeSelectorOptions, splitSelectorValue, } from './querySelectorUtils';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { OwpSelectorBaseChangeEvent, OwpSelectorBaseOption } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 전체 선택 토큰 반환
|
|
4
|
+
*/
|
|
5
|
+
export declare const getSelectorAllToken: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* 선택 값 문자열 분리
|
|
8
|
+
* @param value 원본 선택 값
|
|
9
|
+
*/
|
|
10
|
+
export declare const splitSelectorValue: (value?: string) => string[];
|
|
11
|
+
/**
|
|
12
|
+
* 선택 값 문자열 결합
|
|
13
|
+
* @param valueList 선택 값 목록
|
|
14
|
+
*/
|
|
15
|
+
export declare const joinSelectorValue: (valueList: string[]) => string;
|
|
16
|
+
/**
|
|
17
|
+
* 선택 변경 이벤트 생성
|
|
18
|
+
* @param name 필드 이름
|
|
19
|
+
* @param value 선택 값
|
|
20
|
+
*/
|
|
21
|
+
export declare const createSelectorChangeEvent: (name: string | undefined, value: string) => OwpSelectorBaseChangeEvent;
|
|
22
|
+
/**
|
|
23
|
+
* 선택 옵션 목록 병합
|
|
24
|
+
* @param optionGroups 옵션 그룹 목록
|
|
25
|
+
*/
|
|
26
|
+
export declare const mergeSelectorOptions: <T = unknown>(...optionGroups: Array<OwpSelectorBaseOption<T>[] | undefined>) => OwpSelectorBaseOption<T>[];
|
|
27
|
+
/**
|
|
28
|
+
* 선택 옵션 값 포함 여부 확인
|
|
29
|
+
* @param option 선택 옵션
|
|
30
|
+
*/
|
|
31
|
+
export declare const isSelectorAllOption: (option: OwpSelectorBaseOption) => boolean;
|
|
@@ -8,6 +8,7 @@ export * from './useCurrentUser';
|
|
|
8
8
|
export * from './useCurrentUserId';
|
|
9
9
|
export * from './useDebounce';
|
|
10
10
|
export * from './useDeepCompareEffect';
|
|
11
|
+
export * from './useHeaderWrapState';
|
|
11
12
|
export * from './useInitApp';
|
|
12
13
|
export * from './useInitCommonCodes';
|
|
13
14
|
export * from './useNavigation';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
type HeaderWrapState = {
|
|
3
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
4
|
+
titleRef: RefObject<HTMLDivElement | null>;
|
|
5
|
+
slotsRef: RefObject<HTMLDivElement | null>;
|
|
6
|
+
actionsRef: RefObject<HTMLDivElement | null>;
|
|
7
|
+
isWrapped: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 헤더 한 줄 배치 가능 여부 계산 훅
|
|
11
|
+
* @param deps 측정 재실행 의존성
|
|
12
|
+
*/
|
|
13
|
+
declare const useHeaderWrapState: (deps?: unknown[]) => HeaderWrapState;
|
|
14
|
+
export { useHeaderWrapState };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './components/OwpPageBreadcrumb';
|
|
|
25
25
|
export * from './components/OwpPageContent';
|
|
26
26
|
export * from './components/OwpPageLockLoading';
|
|
27
27
|
export * from './components/OwpPageTitle';
|
|
28
|
+
export * from './components/OwpQuerySelector';
|
|
28
29
|
export * from './components/OwpPicker/OwpDatePicker';
|
|
29
30
|
export * from './components/OwpPicker/OwpDateRangePicker';
|
|
30
31
|
export * from './components/OwpPicker/OwpTimePicker';
|