@bindu-dashing/dam-solution-v2 5.9.228 → 5.9.230

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.
@@ -26,11 +26,13 @@ import dayjs from "dayjs";
26
26
  import { DATE_FORMAT, DATE_WITH_TIME_FORMAT } from "../hocs/appConstants";
27
27
  import { showNotification } from "../common/notifications";
28
28
  import { UPDATE_SUCCESS } from "../utilities/constants/messages";
29
+ const EMPTY_ARRAY = [];
29
30
  export default function AddFieldProperties({ field, setCurrentFieldIndex, onUpdateField, currentInputType, index, allFields, onCancel, }) {
30
31
  const { styles, brand, teams } = useDamConfig();
31
32
  const queryClient = useQueryClient();
32
33
  const brandId = get(brand, "_id");
33
- const brandUsers = getCurrentBrandUsers(queryClient, brandId);
34
+ const rawBrandUsers = getCurrentBrandUsers(queryClient, brandId);
35
+ const brandUsers = Array.isArray(rawBrandUsers) && rawBrandUsers.length > 0 ? rawBrandUsers : EMPTY_ARRAY;
34
36
  const userOptions = useMemo(() => map(brandUsers, (user) => getUserAvatar(user)), [brandUsers, brandId]);
35
37
  const teamOptions = useMemo(() => {
36
38
  const externalTeams = (teams || []).filter((team) => get(team, "id") != null || get(team, "_id") != null);
@@ -5,7 +5,8 @@ import { MdDragIndicator } from "react-icons/md";
5
5
  import { MdOutlineEdit } from "react-icons/md";
6
6
  import { IoMdClose } from "react-icons/io";
7
7
  import { get } from "lodash";
8
- import { InputTypes, } from "../utilities/constants/interface";
8
+ import { InputSupportedTypes, InputTypes, } from "../utilities/constants/interface";
9
+ import { DATE_FORMAT, DATE_WITH_TIME_FORMAT } from "../hocs/appConstants";
9
10
  import { getWidgetIcon } from "./FieldsSection";
10
11
  const { RangePicker } = DatePicker;
11
12
  const MdDragIndicatorIcon = MdDragIndicator;
@@ -47,7 +48,15 @@ export default function DraggedField({ provided, field, onAddLabel, onDeleteFiel
47
48
  const maxValue = get(charLimitSettings, "maxValue");
48
49
  const maxLength = charLimitEnabled && maxValue ? maxValue : 255; // Default to 255
49
50
  return (_jsx(Input.TextArea, { rows: 2, placeholder: get(field, "placeholder", ""), style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none", maxLength: maxLength, showCount: true }));
50
- })(), defaultName === InputTypes.NUMBERS && (_jsx(InputNumber, { placeholder: get(field, "placeholder", ""), style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none" })), defaultName === InputTypes.DATE && (_jsx(DatePicker, { style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none" })), defaultName === InputTypes.DATE_RANGE && (_jsx(RangePicker, { placeholder: ["Start", "End"], style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none" })), (defaultName === InputTypes.SELECT ||
51
+ })(), defaultName === InputTypes.NUMBERS && (_jsx(InputNumber, { placeholder: get(field, "placeholder", ""), style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none" })), defaultName === InputTypes.DATE && (() => {
52
+ const settings = get(field, "inputTypeSettings", {});
53
+ const allowTime = !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`);
54
+ return (_jsx(DatePicker, { showTime: allowTime, format: allowTime ? DATE_WITH_TIME_FORMAT : DATE_FORMAT, style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none" }));
55
+ })(), defaultName === InputTypes.DATE_RANGE && (() => {
56
+ const settings = get(field, "inputTypeSettings", {});
57
+ const allowTime = !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`);
58
+ return (_jsx(RangePicker, { showTime: allowTime, format: allowTime ? DATE_WITH_TIME_FORMAT : DATE_FORMAT, placeholder: ["Start", "End"], style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none" }));
59
+ })(), (defaultName === InputTypes.SELECT ||
51
60
  defaultName === InputTypes.TEAM) && (_jsx(Select, { placeholder: get(field, "placeholder", ""), style: { width: "100%" }, size: "large", className: "md-lib-pointer-events-none", disabled: true })), defaultName === InputTypes.LINK && (() => {
52
61
  const charLimitSettings = get(field, "inputTypeSettings.CHARACTER_LIMIT", {});
53
62
  const charLimitEnabled = get(charLimitSettings, "allow", false);
@@ -139,6 +139,8 @@ const ActionsBar = ({ fileIds, folderIds, onCloseSelection, selectedFilesData =
139
139
  const url = get(response, "data");
140
140
  if (url) {
141
141
  window.open(url, "_blank");
142
+ // Invalidate folder list to refresh download count
143
+ invalidateData(queryClient, generateFoldersQueryKey(type), folderId ? folderId : rootFolderId);
142
144
  }
143
145
  else {
144
146
  onFailure(INVALID_URL);
@@ -235,6 +235,8 @@ function FileMenuOptions({ file, folderIds = [], fileIds = [], folder, onCloseSe
235
235
  const url = get(response, "data");
236
236
  if (url) {
237
237
  window.open(url, "_blank");
238
+ // Invalidate folder list to refresh download count
239
+ invalidateData(queryClient, generateFoldersQueryKey(type), folderId ? folderId : rootFolderId);
238
240
  }
239
241
  else {
240
242
  onFailure(INVALID_URL);
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { LIST_VIEW_DATE_FORMAT, LOCAL_TIMEZONE, UPLOAD_FILE_IN_PROGRESS_WHITE_IMAGE, } from "../hocs/appConstants";
3
- import { DriveModes, EntityType, InputTypes, SortByKeys, SortOrders, ThumbnailStatus, } from "../utilities/constants/interface";
2
+ import { APP_DATE_TIME_FORMAT, LIST_VIEW_DATE_FORMAT, LOCAL_TIMEZONE, UPLOAD_FILE_IN_PROGRESS_WHITE_IMAGE, } from "../hocs/appConstants";
3
+ import { DriveModes, EntityType, InputSupportedTypes, InputTypes, SortByKeys, SortOrders, ThumbnailStatus, } from "../utilities/constants/interface";
4
4
  import moment from "moment-timezone";
5
5
  import { filter, get, groupBy, includes, isArray, map, reverse, sortBy, toLower, } from "lodash";
6
6
  import LoadMoreItems from "../common/LoadMoreItems";
@@ -25,6 +25,7 @@ import { FaSort } from "react-icons/fa";
25
25
  import { LuFilterX } from "react-icons/lu";
26
26
  import SearchFilter from "./SearchFilter";
27
27
  import { useTheme } from "../hocs/ThemeContext";
28
+ import { useDamConfig } from "../hocs/DamConfigContext";
28
29
  dayjs.extend(isToday);
29
30
  dayjs.extend(isYesterday);
30
31
  const ClearFilterIcon = LuFilterX;
@@ -38,16 +39,58 @@ const formatGroupDate = (date) => {
38
39
  return "Yesterday";
39
40
  return d.format(LIST_VIEW_DATE_FORMAT);
40
41
  };
41
- const formatMetadataDisplayValue = (value, field) => {
42
+ const formatTeamDisplayValue = (teamIds, teams) => {
43
+ const ids = isArray(teamIds) ? teamIds : [teamIds];
44
+ const externalTeams = (teams || []).filter((team) => get(team, "id") != null || get(team, "_id") != null);
45
+ const formatted = ids.map((id) => {
46
+ const team = externalTeams.find((t) => String(get(t, "id") || get(t, "_id")) === String(id));
47
+ const teamId = get(team, "id") || get(team, "_id");
48
+ const teamName = get(team, "name", "");
49
+ const teamType = get(team, "type", "");
50
+ if (team) {
51
+ return `${teamId} ${teamName} ${teamType}`.trim();
52
+ }
53
+ return String(id);
54
+ });
55
+ return formatted.join(", ");
56
+ };
57
+ const formatDateValue = (val, dateFormat) => {
58
+ if (val == null || val === "")
59
+ return "";
60
+ const d = dayjs(val);
61
+ return d.isValid() ? d.format(dateFormat) : String(val);
62
+ };
63
+ const formatMetadataDisplayValue = (value, field, teams) => {
42
64
  if (value === undefined || value === null || value === "")
43
65
  return null;
44
- const defaultName = get(field, "defaultName");
66
+ const defaultName = get(field, "defaultName") || get(field, "inputType.defaultName");
67
+ const settings = get(field, "inputTypeSettings", {}) || get(field, "inputType.inputTypeSettings", {});
68
+ const allowTime = !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`);
69
+ const dateFormat = allowTime ? APP_DATE_TIME_FORMAT : LIST_VIEW_DATE_FORMAT;
45
70
  if (defaultName === InputTypes.DATE) {
46
- return dayjs(value).format(LIST_VIEW_DATE_FORMAT);
71
+ return formatDateValue(value, dateFormat);
72
+ }
73
+ if (defaultName === InputTypes.DATE_RANGE) {
74
+ let start;
75
+ let end;
76
+ if (isArray(value) && value.length >= 2) {
77
+ [start, end] = value;
78
+ }
79
+ else if (value && typeof value === "object" && ("start" in value || "end" in value)) {
80
+ start = get(value, "start");
81
+ end = get(value, "end");
82
+ }
83
+ else {
84
+ return String(value);
85
+ }
86
+ const startStr = formatDateValue(start, dateFormat);
87
+ const endStr = formatDateValue(end, dateFormat);
88
+ if (!startStr && !endStr)
89
+ return null;
90
+ return startStr && endStr ? `${startStr} - ${endStr}` : startStr || endStr;
47
91
  }
48
- if (defaultName === InputTypes.DATE_RANGE && isArray(value) && value.length === 2) {
49
- const [start, end] = value;
50
- return `${dayjs(start).format(LIST_VIEW_DATE_FORMAT)} - ${dayjs(end).format(LIST_VIEW_DATE_FORMAT)}`;
92
+ if (defaultName === InputTypes.TEAM && teams) {
93
+ return formatTeamDisplayValue(value, teams);
51
94
  }
52
95
  if (defaultName === InputTypes.CHECKBOX || (defaultName === InputTypes.SELECT && isArray(value))) {
53
96
  return isArray(value) ? value.join(", ") : value;
@@ -56,6 +99,8 @@ const formatMetadataDisplayValue = (value, field) => {
56
99
  };
57
100
  const FolderListView = ({ folders, foldersFetching, hasNextPage, fetchNextPage, selectedFileIds, selectedFolderIds, setSelectedItems, isImagePicker, setSelectedFile, setParentFolderId, selectedPickerFile, location, assets, sortByKey, sortOrder, setSortOrders, onSearch, searchKey, searchValue, metadataKey, metadataValue, setSelectedKeys, }) => {
58
101
  const navigate = useAppNavigate();
102
+ const damConfig = useDamConfig();
103
+ const teams = get(damConfig, "teams", []);
59
104
  const [state, setState] = useState({
60
105
  selectedFile: {},
61
106
  showPreviewModal: false,
@@ -225,7 +270,8 @@ const FolderListView = ({ folders, foldersFetching, hasNextPage, fetchNextPage,
225
270
  : "-", children: get(folder, "type") === EntityType.FILE
226
271
  ? currentAsset === null || currentAsset === void 0 ? void 0 : currentAsset.name
227
272
  : "-" }), metaFields.map((field) => {
228
- const value = get(folder, `metadata.${field._id}`);
273
+ var _a;
274
+ const value = (_a = get(folder, `metadata.${field._id}`)) !== null && _a !== void 0 ? _a : get(folder, `metadata.${get(field, "mapId")}`);
229
275
  const isFile = get(folder, "type") === EntityType.FILE;
230
276
  const fieldFromAsset = isFile && currentAsset
231
277
  ? get(currentAsset, "metadataFields", []).find((f) => get(f, "_id") === field._id || get(f, "mapId") === field._id)
@@ -233,7 +279,7 @@ const FolderListView = ({ folders, foldersFetching, hasNextPage, fetchNextPage,
233
279
  const defaultValue = isFile && fieldFromAsset ? get(fieldFromAsset, "defaultValue") : get(field, "defaultValue");
234
280
  const rawDisplay = value !== null && value !== void 0 ? value : (isFile ? defaultValue : undefined);
235
281
  const displayValue = rawDisplay != null && rawDisplay !== ""
236
- ? formatMetadataDisplayValue(rawDisplay, fieldFromAsset || field)
282
+ ? formatMetadataDisplayValue(rawDisplay, fieldFromAsset || field, teams)
237
283
  : null;
238
284
  return (_jsx("div", { title: displayValue || "-", className: "md-lib-text-secondaryTextColor dark:md-lib-text-darkTextColor md-lib-block md-lib-truncate md-lib-text-sm md-lib-w-[120px] md-lib-gap-2", children: displayValue || "-" }, get(field, "_id")));
239
285
  }), !metaFields.some((f) => toLower(String(get(f, "name", ""))).includes("download") &&
@@ -205,6 +205,8 @@ function FolderMenuOptions({ folder }) {
205
205
  const url = get(response, "data");
206
206
  if (url) {
207
207
  window.open(url, "_blank");
208
+ // Invalidate folder list to refresh download count
209
+ invalidateData(queryClient, generateFoldersQueryKey(type), folderId ? folderId : rootFolderId);
208
210
  }
209
211
  else {
210
212
  onFailure(INVALID_URL);
@@ -24,7 +24,7 @@ export default function SearchFilter({ type, onSearch, name, isMetadata, isSelec
24
24
  switch (type) {
25
25
  case InputTypes.DATE_RANGE:
26
26
  case InputTypes.DATE:
27
- return (_jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-gap-2", children: [_jsxs(Radio.Group, { value: withTime ? "withTime" : "dateOnly", onChange: (e) => setWithTime(e.target.value === "withTime"), children: [_jsx(Radio, { value: "dateOnly", children: "Date only" }), _jsx(Radio, { value: "withTime", children: "With time" })] }), _jsx(DatePicker, { style: { width: "100%" }, onChange: (val) => setValue(val), value: value, placeholder: withTime ? "Select date & time" : "Select date", showTime: withTime })] }));
27
+ return (_jsxs("div", { className: "md-lib-flex md-lib-flex-col md-lib-gap-2", children: [_jsxs(Radio.Group, { value: withTime ? "withTime" : "dateOnly", onChange: (e) => setWithTime(e.target.value === "withTime"), children: [_jsx(Radio, { value: "dateOnly", children: "Date only" }), _jsx(Radio, { value: "withTime", children: "With time" })] }), _jsx(DatePicker, { style: { width: "100%" }, onChange: (val) => setValue(val), value: value, placeholder: withTime ? "Select date & time" : "Select date", showTime: withTime, format: withTime ? DATE_WITH_TIME_FORMAT : DATE_FORMAT })] }));
28
28
  default:
29
29
  return (_jsx(Input, { value: value, onChange: (e) => setValue(e.target.value), placeholder: "Search (min. 2 characters required)" }));
30
30
  }
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
2
3
  import { Button } from "antd";
3
4
  import { IoIosClose } from "react-icons/io";
4
5
  import { BsDownload } from "react-icons/bs";
@@ -8,18 +9,47 @@ import { showNotification } from "../../common/notifications";
8
9
  import { INVALID_URL } from "../../utilities/constants/messages";
9
10
  import FileMenuOptions from "../FileMenuOptions";
10
11
  import { useDamConfig } from "../../hocs/DamConfigContext";
12
+ import { useMutation, useQueryClient } from "react-query";
13
+ import { downloadFiles } from "../../react-query/services/file-services";
14
+ import { generateFoldersQueryKey, invalidateData } from "../../utilities/constants/queryKeys";
15
+ import useAppParams from "../../utilities/useAppParams";
16
+ import { createApiClient } from "../../hocs/configureAxios";
11
17
  const IoIosCloseIcon = IoIosClose;
12
18
  const BsDownloadIcon = BsDownload;
13
19
  const FileDetailsHeader = ({ handleClose, file, onCloseSelection, }) => {
14
20
  const damConfig = useDamConfig();
15
- const { isAdmin } = damConfig;
16
- return (_jsxs("div", { className: "md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-py-3 md-lib-px-5 md-lib-border-b md-lib-border-borderColor dark:md-lib-border-darkBorderColor md-lib-flex md-lib-justify-between md-lib-items-center", children: [_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-5", children: [_jsx(IoIosCloseIcon, { className: "md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-cursor-pointer", size: 24, onClick: () => handleClose === null || handleClose === void 0 ? void 0 : handleClose(), "aria-label": "Close" }), !!file && (_jsx("h4", { className: "md-lib-font-semibold md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-text-base md-lib-truncate md-lib-max-w-[calc(100vw-180px)]", title: get(file, "name", "N/A"), children: get(file, "name", "N/A") }))] }), !!file && (_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-4", children: [_jsx(FileMenuOptions, { file: file, fileIds: get(file, "_id") ? [get(file, "_id")] : [], onCloseSelection: onCloseSelection, fileModal: true }), _jsx(Button, { size: "large", className: "md-lib-bg-secondaryColor dark:md-lib-bg-darkSecondaryColor hover:md-lib-bg-secondaryHoverColor dark:hover:md-lib-bg-darkSecondaryColor md-lib-border-none", onClick: () => {
17
- const url = get(file, "downloadUrl") || get(file, "s3Url") || get(file, "thumbnailUrl");
18
- if (!url) {
19
- showNotification(INVALID_URL, NotificationStatus.ERROR);
20
- return;
21
- }
22
- window.open(url, "_blank");
23
- }, children: _jsx(BsDownloadIcon, { className: "md-lib-text-textColor dark:md-lib-text-darkTextColor", size: 24 }) })] }))] }));
21
+ const { isAdmin, rootFolderId } = damConfig;
22
+ const { folderId, type } = useAppParams();
23
+ const queryClient = useQueryClient();
24
+ const api = React.useMemo(() => createApiClient(damConfig), [damConfig]);
25
+ const downloadFileMutation = useMutation({
26
+ mutationFn: downloadFiles,
27
+ onSuccess: (response) => {
28
+ const url = get(response, "data");
29
+ if (url) {
30
+ window.open(url, "_blank");
31
+ invalidateData(queryClient, generateFoldersQueryKey(type), folderId ? folderId : rootFolderId);
32
+ }
33
+ else {
34
+ showNotification(INVALID_URL, NotificationStatus.ERROR);
35
+ }
36
+ },
37
+ onError: () => {
38
+ showNotification(INVALID_URL, NotificationStatus.ERROR);
39
+ },
40
+ });
41
+ const onDownloadClick = () => {
42
+ const fileId = get(file, "_id");
43
+ if (!fileId) {
44
+ showNotification(INVALID_URL, NotificationStatus.ERROR);
45
+ return;
46
+ }
47
+ downloadFileMutation.mutate({
48
+ fileIds: [fileId],
49
+ folderIds: [],
50
+ api,
51
+ });
52
+ };
53
+ return (_jsxs("div", { className: "md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-py-3 md-lib-px-5 md-lib-border-b md-lib-border-borderColor dark:md-lib-border-darkBorderColor md-lib-flex md-lib-justify-between md-lib-items-center", children: [_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-5", children: [_jsx(IoIosCloseIcon, { className: "md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-cursor-pointer", size: 24, onClick: () => handleClose === null || handleClose === void 0 ? void 0 : handleClose(), "aria-label": "Close" }), !!file && (_jsx("h4", { className: "md-lib-font-semibold md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-text-base md-lib-truncate md-lib-max-w-[calc(100vw-180px)]", title: get(file, "name", "N/A"), children: get(file, "name", "N/A") }))] }), !!file && (_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-4", children: [_jsx(FileMenuOptions, { file: file, fileIds: get(file, "_id") ? [get(file, "_id")] : [], onCloseSelection: onCloseSelection, fileModal: true }), _jsx(Button, { size: "large", className: "md-lib-bg-secondaryColor dark:md-lib-bg-darkSecondaryColor hover:md-lib-bg-secondaryHoverColor dark:hover:md-lib-bg-darkSecondaryColor md-lib-border-none", onClick: onDownloadClick, loading: downloadFileMutation.isLoading, children: _jsx(BsDownloadIcon, { className: "md-lib-text-textColor dark:md-lib-text-darkTextColor", size: 24 }) })] }))] }));
24
54
  };
25
55
  export default FileDetailsHeader;
@@ -4,6 +4,7 @@ import { Form, Input, InputNumber, DatePicker, Select, Checkbox, Radio, Typograp
4
4
  import { first, get, includes, isArray, isNumber, map, nth, } from "lodash";
5
5
  import dayjs from "dayjs";
6
6
  import { InputSupportedTypes, InputTypes, } from "../../utilities/constants/interface";
7
+ import { DATE_FORMAT, DATE_WITH_TIME_FORMAT } from "../../hocs/appConstants";
7
8
  import { INVALID_URL } from "../../utilities/constants/messages";
8
9
  import { useQueryClient } from "react-query";
9
10
  import { getCurrentBrandUsers } from "../../react-query/hooks/brand-hooks";
@@ -48,10 +49,6 @@ export const buildInitialValues = (formData, metaFields, isEditMode) => {
48
49
  return;
49
50
  const formValue = formData[id];
50
51
  const templateDefault = get(field, "defaultValue");
51
- // In edit mode: use file's value if present (from existing metadata), else template default
52
- // In create mode: use template default
53
- // When assigning NEW template to existing file, formData has old template's keys,
54
- // so formValue is undefined for new template's fields - use template default
55
52
  const hasExistingValue = formValue !== undefined && formValue !== null;
56
53
  const rawValue = isEditMode && hasExistingValue ? formValue : templateDefault;
57
54
  result[id] = transformValueForField(rawValue, field);
@@ -169,7 +166,9 @@ export const getFormItem = (item, fromDefaultValue, userOptions, teamOptions) =>
169
166
  case InputTypes.PARAGRAPH:
170
167
  return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(Input.TextArea, { rows: 4, placeholder: placeholder, maxLength: maxLength, showCount: true }) }, name));
171
168
  case InputTypes.DATE_RANGE:
172
- return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(RangePicker, { showTime: !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`), style: { width: "100%" }, placeholder: ["Start", "End"], placement: "bottomLeft" }) }, name));
169
+ return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(RangePicker, { showTime: !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`), format: get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`)
170
+ ? DATE_WITH_TIME_FORMAT
171
+ : DATE_FORMAT, style: { width: "100%" }, placeholder: ["Start", "End"], placement: "bottomLeft" }) }, name));
173
172
  case InputTypes.LINK:
174
173
  rules.push({
175
174
  type: "url",
@@ -184,7 +183,9 @@ export const getFormItem = (item, fromDefaultValue, userOptions, teamOptions) =>
184
183
  case InputTypes.NUMBERS:
185
184
  return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(InputNumber, { style: { width: "100%" }, placeholder: placeholder }) }, name));
186
185
  case InputTypes.DATE:
187
- return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(DatePicker, { showTime: !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`), style: { width: "100%" }, placeholder: placeholder }) }, name));
186
+ return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(DatePicker, { showTime: !!get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`), format: get(settings, `${InputSupportedTypes.ALLOW_TIME}.allow`)
187
+ ? DATE_WITH_TIME_FORMAT
188
+ : DATE_FORMAT, style: { width: "100%" }, placeholder: placeholder }) }, name));
188
189
  case InputTypes.PERSON:
189
190
  return (_jsx(Form.Item, { name: itemName, label: label, rules: rules, children: _jsx(Select, { mode: get(settings, InputSupportedTypes.ALLOW_MULTIPLE)
190
191
  ? "multiple"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.9.228",
3
+ "version": "5.9.230",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",