@antscorp/antsomi-ui 1.3.3-beta.92 → 1.3.3-beta.93

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.
@@ -307,7 +307,7 @@ export const AdvancedPicker = props => {
307
307
  };
308
308
  return (React.createElement("div", { style: contentStyle, ref: ref },
309
309
  React.createElement(DropdownHeader, { className: "dropdown-header" },
310
- React.createElement(DropdownLabel, { valueType: valueType, date: date, format: format, type: type, showTime: showTime, operatorKey: operatorKey, formatInputDisplay: formatInputDisplay, dateType: option.dateType.value })),
310
+ React.createElement(DropdownLabel, { valueType: valueType, date: date, format: format, type: type, showTime: showTime, operatorKey: operatorKey, formatInputDisplay: formatInputDisplay })),
311
311
  React.createElement(DropdownContent, { className: "dropdown-content" },
312
312
  renderDateTypeOptions(),
313
313
  option.dateType.value === 'fixed' ? (React.createElement(React.Fragment, null,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TAdvancedType, TDateType, TOperatorKey, ValueTypes } from '../AdvancedPicker/types';
2
+ import { TAdvancedType, TOperatorKey, ValueTypes } from '../AdvancedPicker/types';
3
3
  interface DropdownLabelProps {
4
4
  valueType?: ValueTypes;
5
5
  date?: string;
@@ -8,7 +8,6 @@ interface DropdownLabelProps {
8
8
  showTime?: boolean;
9
9
  operatorKey?: TOperatorKey;
10
10
  formatInputDisplay?: string;
11
- dateType?: TDateType;
12
11
  }
13
12
  export declare const DropdownLabel: React.FC<DropdownLabelProps>;
14
13
  export {};
@@ -8,7 +8,7 @@ import { ADVANCED_PICKER_TYPE, DEFAULT_DATE_FORMAT, HIDE_TIME_LABEL_ARR, QUARTER
8
8
  // Instance
9
9
  import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
10
10
  import { getFormatDisplay, getLabelQuarterRange } from '../AdvancedPicker/utils';
11
- export const DropdownLabel = React.memo(({ valueType, date, format, type, showTime, operatorKey, formatInputDisplay, dateType }) => {
11
+ export const DropdownLabel = React.memo(({ valueType, date, format, type, showTime, operatorKey, formatInputDisplay }) => {
12
12
  var _a;
13
13
  const { t } = i18nInstance;
14
14
  const title = (_a = Object.values(ADVANCED_PICKER_TYPE).find(({ value }) => value === type)) === null || _a === void 0 ? void 0 : _a.label;
@@ -31,11 +31,14 @@ export const DropdownLabel = React.memo(({ valueType, date, format, type, showTi
31
31
  const dayObj = dayjs(date || new Date(), format).locale('en');
32
32
  // const dayObj = dayjs(date || new Date(), format).locale(locale || 'en');
33
33
  formatLabel = `${WEEK_PLACEHOLDER}W, YYYY`;
34
- subLabel = `${dayjs(dayObj)
35
- .day(['today', 'first_day_of_week_mon_sun'].includes(dateType || '') ? 1 : 0)
36
- .format('MMMM DD, YYYY')} - ${dayjs(dayObj)
37
- .day(['today', 'first_day_of_week_mon_sun'].includes(dateType || '') ? 7 : 6)
34
+ subLabel = `${dayjs(dayObj).day(0).format('MMMM DD, YYYY')} - ${dayjs(dayObj)
35
+ .day(6)
38
36
  .format('MMMM DD, YYYY')}`;
37
+ // subLabel = `${dayjs(dayObj)
38
+ // .day(['today', 'first_day_of_week_mon_sun'].includes(dateType || '') ? 1 : 0)
39
+ // .format('MMMM DD, YYYY')} - ${dayjs(dayObj)
40
+ // .day(['today', 'first_day_of_week_mon_sun'].includes(dateType || '') ? 7 : 6)
41
+ // .format('MMMM DD, YYYY')}`;
39
42
  break;
40
43
  }
41
44
  case 'YEAR_MONTH_DAY_HOUR':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.3-beta.92",
3
+ "version": "1.3.3-beta.93",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",