@anji-dashing/dam-solution-v2 5.8.179 → 5.8.180
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.
|
@@ -239,14 +239,14 @@ export default function EditAssetTemplate({ assetTemplate, inputTypes, }) {
|
|
|
239
239
|
if (navigate) {
|
|
240
240
|
navigate(ASSETS_SCREEN);
|
|
241
241
|
}
|
|
242
|
-
}, className: "md-lib-cursor-pointer" }), _jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-border-l md-lib-pl-4 md-lib-ml-4", children: [_jsx(Paragraph, { className: "md-lib-text-xl md-lib-asset-template-title", style: { marginBottom: "0px !important" }, editable: {
|
|
242
|
+
}, className: "md-lib-cursor-pointer" }), _jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-border-l md-lib-pl-4 md-lib-ml-4", children: [_jsx(Paragraph, { className: "md-lib-text-xl md-lib-asset-template-title", style: { marginBottom: "0px !important", maxWidth: "400px" }, editable: {
|
|
243
243
|
onChange: (val) => setState((prevState) => (Object.assign(Object.assign({}, prevState), { name: val }))),
|
|
244
244
|
icon: _jsx(FiEdit2Icon, { size: 15, className: "md-lib-ml-2" }),
|
|
245
|
-
}, children:
|
|
245
|
+
}, children: name }), _jsx(Paragraph, { className: " md-lib-text-gray-500 dark:md-lib-text-gray-400 md-lib-mt-1 md-lib-text-ellipsis", style: { marginBottom: "0px !important", maxWidth: "400px" }, editable: {
|
|
246
246
|
onChange: (val) => setState((prevState) => (Object.assign(Object.assign({}, prevState), { description: val }))),
|
|
247
247
|
icon: _jsx(FiEdit2Icon, { size: 15, className: "md-lib-ml-2" }),
|
|
248
|
-
}, children:
|
|
249
|
-
right: (_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-2 md-lib-ml-auto", children: [imagePickerOutputFormatError && (_jsx("p", { className: "md-lib-text-sm md-lib-text-red-500", children: "Please ensure that all required fields (except the last one) have separators configured" })), _jsx(CustomButton, { label: "Cancel", onClick: () => {
|
|
248
|
+
}, children: description || "Add description" })] })] })),
|
|
249
|
+
right: (_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-2 md-lib-ml-auto md-lib-mr-2", children: [imagePickerOutputFormatError && (_jsx("p", { className: "md-lib-text-sm md-lib-text-red-500", children: "Please ensure that all required fields (except the last one) have separators configured" })), _jsx(CustomButton, { label: "Cancel", onClick: () => {
|
|
250
250
|
if (navigate) {
|
|
251
251
|
navigate(ASSETS_SCREEN);
|
|
252
252
|
}
|
|
@@ -234,7 +234,7 @@ export default function FieldsSection({ name, inputTypes, transformInputTypePayl
|
|
|
234
234
|
showNotification(INPUT_SETTINGS_VALIDATION_ERROR, NotificationStatus.WARN);
|
|
235
235
|
}, children: _jsxs("div", { className: `md-lib-grid ${showOutputFormat ? "md-lib-grid-cols-1" : "md-lib-grid-cols-4"} ${showOutputFormat ? "md-lib-h-screen" : ""}`, children: [showOutputFormat && (_jsxs("div", { className: "md-lib-p-8", children: [_jsx("p", { className: "md-lib-text-sm md-lib-text-orange-500", children: "Note: Please ensure that all required fields has separators" }), _jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-2", children: [_jsx("p", { className: "md-lib-text-sm md-lib-font-semibold", children: "Sample File Format: " }), _jsx("pre", { children: getFormattedValue(imagePickerOutputFormat) })] })] })), !showOutputFormat && (_jsx(Droppable, { droppableId: "droppable1", children: (provided) => (_jsxs("div", Object.assign({}, provided.droppableProps, { ref: provided.innerRef, children: [_jsxs("div", { className: "md-lib-p-3 md-lib-col-span-1 md-lib-border-r dark:md-lib-border-darkBorderColor dark:md-lib-bg-darkPrimary", children: [_jsx(Typography.Title, { level: 4, children: "Form Widgets" }), _jsx("p", { className: "md-lib-text-sm md-lib-description md-lib-mb-3", children: "Drag and drop form elements in additional section" }), map(inputTypes, (type, index) => {
|
|
236
236
|
const IconComponent = getWidgetIcon(get(type, "defaultName"));
|
|
237
|
-
return (_jsx(Draggable, { draggableId: get(type, "_id"), index: index, children: (provided) => (_jsxs("div", Object.assign({ className: "md-lib-flex md-lib-items-center md-lib-gap-2 md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-p-3 md-lib-mb-2 md-lib-rounded", ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { children: [IconComponent && (_jsx("div", { className: "md-lib-flex md-lib-items-center md-lib-flex-shrink-0", children: _jsx(IconComponent, { size: ICON_SIZE }) })), _jsx("span", { className: "md-lib-leading-normal
|
|
237
|
+
return (_jsx(Draggable, { draggableId: get(type, "_id"), index: index, children: (provided) => (_jsxs("div", Object.assign({ className: "md-lib-flex md-lib-items-center md-lib-gap-2 md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-p-3 md-lib-mb-2 md-lib-rounded", ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { children: [IconComponent && (_jsx("div", { className: "md-lib-flex md-lib-items-center md-lib-flex-shrink-0", children: _jsx(IconComponent, { size: ICON_SIZE }) })), _jsx("span", { className: "md-lib-leading-normal", children: get(type, "name") })] }))) }, get(type, "_id")));
|
|
238
238
|
})] }), provided.placeholder] }))) })), _jsx("div", { className: `${!!currentField && !showOutputFormat ? "md-lib-col-span-2" : "md-lib-col-span-3"} dark:md-lib-bg-darkPrimary`, children: _jsx(Droppable, { droppableId: "droppable2", children: (provided) => (_jsxs("div", Object.assign({}, provided.droppableProps, { ref: provided.innerRef, className: "md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-rounded-[20px] md-lib-my-4 md-lib-mx-8", children: [_jsx("p", { className: "md-lib-text-xl md-lib-border-b md-lib-p-3 md-lib-asset-template-title md-lib-truncate", children: name }), _jsx("div", { className: "md-lib-p-4", children: get(fields, "length") === 0 ? (_jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-items-center md-lib-justify-center", children: [_jsx("img", { src: EMPTY_ASSET_TEMPLATE_WIDGETS_URL, alt: "Empty Asset Template Widgets", width: 250, height: 250 }), _jsx("p", { className: "md-lib-text-sm md-lib-description md-lib-mt-2", children: "Drag fields to create form" })] })) : (map(showOutputFormat ? imagePickerOutputFormat : fields, (field, index) => (_jsx(Draggable, { draggableId: `${(field === null || field === void 0 ? void 0 : field._id)
|
|
239
239
|
? `selected-${get(field, "_id")}`
|
|
240
240
|
: `selected-${index}`}`, index: index, children: (provided) => (_jsx("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, { children: _jsx(DraggedField, { provided: provided, field: field, outputFormatField: imagePickerOutputFormat === null || imagePickerOutputFormat === void 0 ? void 0 : imagePickerOutputFormat[index], onAddLabel: onAddLabel, onDeleteField: onDeleteField, onUpdateOutputFormat: onUpdateOutputFormat, setCurrentFieldIndex: (val) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -32,7 +32,7 @@ export const RenderTableFilterFooter = ({ onClick, onClear, }) => {
|
|
|
32
32
|
return (_jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(CustomButton, { type: "primary", onClick: onClick, label: "Search" }), _jsx(CustomButton, { onClick: onClear, label: "Reset" })] }));
|
|
33
33
|
};
|
|
34
34
|
export const RenderTableSelectFilters = ({ selectedKeys, placeholder, onChange, onClick, onClear, options, }) => {
|
|
35
|
-
return (_jsxs("div", { className: "
|
|
35
|
+
return (_jsxs("div", { className: "md-lib-m-2 md-lib-flex md-lib-flex-col md-lib-bg-white dark:md-lib-bg-darkPrimary md-lib-gap-2", children: [_jsxs("div", { children: [" ", _jsx(RenderCustomSelect, { placeholder: placeholder, value: selectedKeys, onChange: onChange, className: "mb-2 w-full mr-2", options: options || ACTIVE_INACTIVE_OPTIONS, allowClear: true })] }), _jsx(RenderTableFilterFooter, { onClear: onClear, onClick: onClick })] }));
|
|
36
36
|
};
|
|
37
37
|
export function RenderCustomSelect({ onChange, value, mode, options, showSearch, allowClear, style, placeholder, className, placement, showArrow, bordered, loading, disabled, }) {
|
|
38
38
|
return (_jsx(Select, { mode: mode || undefined, placeholder: placeholder, onChange: onChange, value: value, style: style, options: options, disabled: disabled, filterOption: (input, option) => { var _a; return ((_a = option === null || option === void 0 ? void 0 : option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().indexOf(input.toLowerCase())) >= 0; }, showSearch: showSearch, allowClear: allowClear, className: className, placement: placement, loading: loading, showArrow: showArrow, bordered: bordered }));
|