@headless-adminapp/app 1.4.47 → 1.4.49
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.
|
@@ -8,7 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const clsx_1 = __importDefault(require("clsx"));
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const react_custom_scrollbars_2_1 = require("react-custom-scrollbars-2");
|
|
11
|
-
const ScrollView = ({ children, className, rtl, autoHide, onScroll, shadowEffect = false, }) => {
|
|
11
|
+
const ScrollView = ({ children, className, rtl, autoHide, onScroll, shadowEffect = false, flexColumn = false, }) => {
|
|
12
12
|
const [isTop, setIsTop] = (0, react_1.useState)(true);
|
|
13
13
|
const [isBottom, setIsBottom] = (0, react_1.useState)(false);
|
|
14
14
|
const handleScroll = (event) => {
|
|
@@ -27,6 +27,6 @@ const ScrollView = ({ children, className, rtl, autoHide, onScroll, shadowEffect
|
|
|
27
27
|
setIsBottom(_isBottom);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(react_custom_scrollbars_2_1.Scrollbars, { autoHide: autoHide, className: (0, clsx_1.default)(className, 'hdl-scrollbar', rtl && 'rtl', shadowEffect && !isTop && 'hdl-scrollbar-shadow-top', shadowEffect && !isBottom && 'hdl-scrollbar-shadow-bottom'), onScroll: handleScroll, onUpdate: handleOnUpdate, children: children }));
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(react_custom_scrollbars_2_1.Scrollbars, { autoHide: autoHide, className: (0, clsx_1.default)(className, 'hdl-scrollbar', rtl && 'rtl', shadowEffect && !isTop && 'hdl-scrollbar-shadow-top', shadowEffect && !isBottom && 'hdl-scrollbar-shadow-bottom', flexColumn && 'hdl-scrollbar-column'), onScroll: handleScroll, onUpdate: handleOnUpdate, children: children }));
|
|
31
31
|
};
|
|
32
32
|
exports.ScrollView = ScrollView;
|
package/index.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/app",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.49",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"uuid": "11.0.3",
|
|
39
39
|
"yup": "^1.4.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "bb4bc9454aebb0910a9e74be20c4342bb9b06afc"
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Attribute, BooleanAttribute, DateAttribute, InferredAttributeType } from '@headless-adminapp/core/attributes';
|
|
1
|
+
import { Attribute, BooleanAttribute, ChoiceAttribute, DateAttribute, InferredAttributeType } from '@headless-adminapp/core/attributes';
|
|
2
2
|
import { ChoicesAttribute } from '@headless-adminapp/core/attributes/ChoiceAttribute';
|
|
3
3
|
import { Locale } from '@headless-adminapp/core/experience/locale/types';
|
|
4
4
|
interface AttributeFormattedValueStringsSet {
|
|
@@ -14,6 +14,7 @@ export declare function getAttributeDateRangeFormattedValue(value: unknown, loca
|
|
|
14
14
|
export declare function getAttributeBooleanFormattedValue(attribute: BooleanAttribute, value: unknown, options?: {
|
|
15
15
|
strings?: AttributeFormattedValueStringsSet;
|
|
16
16
|
}): string;
|
|
17
|
+
export declare function getAttributeChoiceFormattedValue(attribute: ChoiceAttribute<string | number>, value: unknown): string;
|
|
17
18
|
export declare function getAttributeChoicesFormattedValue(attribute: ChoicesAttribute<string | number>, value: unknown): string;
|
|
18
19
|
export declare function getAttributeLookupFormattedValue(value: unknown): string;
|
|
19
20
|
export declare function getAttributeRegardingFormattedValue(value: unknown): string;
|
|
@@ -8,6 +8,7 @@ exports.getAttributeAttachmentFormattedValue = getAttributeAttachmentFormattedVa
|
|
|
8
8
|
exports.getAttributeDateFormattedValue = getAttributeDateFormattedValue;
|
|
9
9
|
exports.getAttributeDateRangeFormattedValue = getAttributeDateRangeFormattedValue;
|
|
10
10
|
exports.getAttributeBooleanFormattedValue = getAttributeBooleanFormattedValue;
|
|
11
|
+
exports.getAttributeChoiceFormattedValue = getAttributeChoiceFormattedValue;
|
|
11
12
|
exports.getAttributeChoicesFormattedValue = getAttributeChoicesFormattedValue;
|
|
12
13
|
exports.getAttributeLookupFormattedValue = getAttributeLookupFormattedValue;
|
|
13
14
|
exports.getAttributeRegardingFormattedValue = getAttributeRegardingFormattedValue;
|
|
@@ -93,8 +94,8 @@ function getAttributeDateRangeFormattedValue(value, locale) {
|
|
|
93
94
|
function getAttributeBooleanFormattedValue(attribute, value, options) {
|
|
94
95
|
const strings = options?.strings ?? defaultAttributeFormattedValueStrings;
|
|
95
96
|
return value
|
|
96
|
-
? attribute.trueLabel ?? strings.yes
|
|
97
|
-
: attribute.falseLabel ?? strings.no;
|
|
97
|
+
? (attribute.trueLabel ?? strings.yes)
|
|
98
|
+
: (attribute.falseLabel ?? strings.no);
|
|
98
99
|
}
|
|
99
100
|
function getAttributeChoiceFormattedValue(attribute, value) {
|
|
100
101
|
return (attribute.options.find((option) => option.value === value) ?? {
|