onekijs-ui 0.19.12 → 0.19.14
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/components/select/SelectService.d.ts +3 -3
- package/dist/index.js +26 -7
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +26 -7
- package/dist/index.module.js.map +1 -1
- package/dist/styles/border.d.ts +1 -1
- package/dist/styles/size.d.ts +6 -6
- package/dist/styles/typography.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/checkbox/FormCheckbox.tsx +9 -1
- package/src/components/grid/style.ts +2 -2
- package/src/components/table/components/filters/TableTextFilterComponent.tsx +2 -2
- package/src/components/textarea/components/TextareaComponent.tsx +18 -2
|
@@ -5,15 +5,15 @@ declare class SelectService<T = any, I extends SelectItem<T> = SelectItem<T>, S
|
|
|
5
5
|
protected lastCheckQuery: Query | undefined;
|
|
6
6
|
get defaultValue(): T | T[] | null | undefined;
|
|
7
7
|
get defaultValueLoading(): boolean | undefined;
|
|
8
|
-
check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
8
|
+
check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>;
|
|
9
9
|
setData(data: T[], query?: Query): void;
|
|
10
|
-
setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
10
|
+
setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>, void, unknown>;
|
|
11
11
|
setDefaultValueLoading(loading: boolean): void;
|
|
12
12
|
setItemWidth(_item: I, value: number): void;
|
|
13
13
|
setValue(value: null | T | T[]): void;
|
|
14
14
|
setUrl(url: string, query?: Query): void;
|
|
15
15
|
_buildItem(data: T | null | undefined, adaptee: unknown, context?: AnonymousObject): I;
|
|
16
|
-
_filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").
|
|
16
|
+
_filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>;
|
|
17
17
|
_compareItem(a: I | undefined, b: I | undefined): boolean;
|
|
18
18
|
_setDefaultValue(value: T | T[] | null | undefined): void;
|
|
19
19
|
_setValidDefaultValue(value: T | T[] | null): void;
|
package/dist/index.js
CHANGED
|
@@ -1858,10 +1858,10 @@ const getColWidths = (gap, theme) => {
|
|
|
1858
1858
|
const content = `{ flex: 0 0 calc((100% / 12) * ${size} - ${gap}); max-width: calc((100% / 12) * ${size} - ${gap}); }`;
|
|
1859
1859
|
if (variant) {
|
|
1860
1860
|
const breakpoint = theme.breakpoints[variant];
|
|
1861
|
-
return `@media (min-width: ${breakpoint}) { .o-col-${variant}-${size} ${content} }`;
|
|
1861
|
+
return `@media (min-width: ${breakpoint}) { & > .o-col-${variant}-${size} ${content} }`;
|
|
1862
1862
|
}
|
|
1863
1863
|
else {
|
|
1864
|
-
return
|
|
1864
|
+
return `& > .o-col-${size} ${content}`;
|
|
1865
1865
|
}
|
|
1866
1866
|
};
|
|
1867
1867
|
const colWidths = [];
|
|
@@ -2388,7 +2388,14 @@ var SuccessIcon = styled(SuccessIconComponent) `
|
|
|
2388
2388
|
`;
|
|
2389
2389
|
|
|
2390
2390
|
const FormCheckboxValueDisplayer = ({ value }) => {
|
|
2391
|
-
|
|
2391
|
+
if (value) {
|
|
2392
|
+
return (React.createElement("div", { style: { display: 'flex', alignItems: 'center', marginTop: value ? '2px' : '4px' } },
|
|
2393
|
+
React.createElement(SuccessIcon, null),
|
|
2394
|
+
React.createElement("span", { style: { marginLeft: '5px' } }, "Yes")));
|
|
2395
|
+
}
|
|
2396
|
+
return (React.createElement("div", { style: { display: 'flex', alignItems: 'center', marginTop: value ? '2px' : '4px' } },
|
|
2397
|
+
React.createElement(RemoveIcon$1, { color: "red", width: "14px", height: "14px" }),
|
|
2398
|
+
React.createElement("span", { style: { marginLeft: '5px' } }, "No")));
|
|
2392
2399
|
};
|
|
2393
2400
|
const FormCheckbox = React.memo((props) => {
|
|
2394
2401
|
const [fieldLayoutProps, fieldComponentProps] = useFieldLayout(Object.assign({}, props, {
|
|
@@ -9999,11 +10006,11 @@ const TableInputFilterComponent = ({ column, operators, }) => {
|
|
|
9999
10006
|
TableInputFilterComponent.displayName = 'TableInputFilterComponent';
|
|
10000
10007
|
|
|
10001
10008
|
const operators$2 = [
|
|
10002
|
-
{ text: 'contains', operator: '
|
|
10009
|
+
{ text: 'contains', operator: 'i_like', not: false },
|
|
10003
10010
|
{ text: 'ends with', operator: 'ew', not: false },
|
|
10004
10011
|
{ text: 'equals', operator: 'eq', not: false },
|
|
10005
10012
|
{ text: 'starts with', operator: 'sw', not: false },
|
|
10006
|
-
{ text: 'does not contain', operator: '
|
|
10013
|
+
{ text: 'does not contain', operator: 'i_like', not: true },
|
|
10007
10014
|
{ text: 'does not end with', operator: 'ew', not: true },
|
|
10008
10015
|
{ text: 'is not equal', operator: 'eq', not: true },
|
|
10009
10016
|
{ text: 'does not start with', operator: 'sw', not: true },
|
|
@@ -10636,7 +10643,7 @@ const selectColumn = (id, options) => {
|
|
|
10636
10643
|
};
|
|
10637
10644
|
|
|
10638
10645
|
const TextareaComponent = (props) => {
|
|
10639
|
-
const { className, size = 'medium', status, onFocus: forwardFocus, onBlur: forwardBlur, ...textareaProps } = props;
|
|
10646
|
+
const { className, size = 'medium', status, onFocus: forwardFocus, onBlur: forwardBlur, onChange: forwardChange, value, ...textareaProps } = props;
|
|
10640
10647
|
const [focus, setFocus] = React.useState(false);
|
|
10641
10648
|
const classNames = addClassname(`o-textarea o-textarea-size-${size}${focus ? ' o-textarea-focus' : ''}${status ? ' o-textarea-status-' + status.toLowerCase() : ''}`, className);
|
|
10642
10649
|
const onFocus = (e) => {
|
|
@@ -10647,8 +10654,20 @@ const TextareaComponent = (props) => {
|
|
|
10647
10654
|
setFocus(false);
|
|
10648
10655
|
forwardBlur && forwardBlur(e);
|
|
10649
10656
|
};
|
|
10657
|
+
const ref = React.useRef(null);
|
|
10658
|
+
const selectorRef = React.useRef();
|
|
10659
|
+
const onChange = (e) => {
|
|
10660
|
+
selectorRef.current = e.target.selectionStart;
|
|
10661
|
+
forwardChange && forwardChange(e);
|
|
10662
|
+
};
|
|
10663
|
+
React.useEffect(() => {
|
|
10664
|
+
if (selectorRef.current !== undefined && selectorRef.current !== null && ref.current) {
|
|
10665
|
+
ref.current.setSelectionRange(selectorRef.current, selectorRef.current);
|
|
10666
|
+
selectorRef.current = undefined;
|
|
10667
|
+
}
|
|
10668
|
+
}, [value]);
|
|
10650
10669
|
return (React.createElement("div", { className: classNames },
|
|
10651
|
-
React.createElement("textarea", { className: "o-textarea-field", ...textareaProps, onFocus: onFocus, onBlur: onBlur })));
|
|
10670
|
+
React.createElement("textarea", { className: "o-textarea-field", ...textareaProps, ref: ref, onFocus: onFocus, onBlur: onBlur, onChange: value === undefined ? undefined : onChange, value: value })));
|
|
10652
10671
|
};
|
|
10653
10672
|
TextareaComponent.displayName = 'TextareaComponent';
|
|
10654
10673
|
|