@antscorp/antsomi-ui 1.2.1-beta.2 → 1.2.1-beta.4

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.
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { TAdvancedType, TCalculationType, TOperatorKey, TOption } from './types';
2
+ import { TAdvancedType, TCalculationType, TOperatorKey, TOption, TShowCalculationTypeCondition } from './types';
3
3
  export interface AdvancedPickerProps {
4
4
  label?: string;
5
5
  dateTypeKeysShow?: string[];
6
+ showCalculationTypeCondition?: TShowCalculationTypeCondition;
6
7
  calculationTypeKeysShow?: TCalculationType[];
7
8
  defaultDateTypeKey?: string;
8
9
  valueType?: string;
@@ -4,6 +4,9 @@ export type TOption = {
4
4
  calculationDate: TCalculationDate;
5
5
  value: number;
6
6
  };
7
+ export type TShowCalculationTypeCondition = {
8
+ dateType: Partial<Record<TDateType, TCalculationType[]>>;
9
+ };
7
10
  export type TDateType = 'today' | 'first_day_of_week_mon_sun' | 'first_day_of_week_sun_sat' | 'first_day_of_month' | 'first_day_of_quarter' | 'first_day_of_year' | 'last_day_of_week_mon_sun' | 'last_day_of_week_sun_sat' | 'last_day_of_month' | 'last_day_of_quarter' | 'last_day_of_year' | 'fixed';
8
11
  export type TCalculationType = 'minus' | 'plus' | '';
9
12
  export type TCalculationDate = 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years' | '';
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
+ import { TShowCalculationTypeCondition } from '../AdvancedPicker/types';
2
3
  import { TDateConfig, TOnChangePayload, TTimeRange } from './types';
3
4
  export interface AdvancedRangePickerProps {
5
+ showCalculationTypeCondition?: TShowCalculationTypeCondition;
4
6
  startDateConfig?: TDateConfig;
5
7
  endDateConfig?: TDateConfig;
6
8
  timeRange: TTimeRange;
@@ -6,3 +6,4 @@ export default _default;
6
6
  export declare const Template: ComponentStory<typeof AdvancedRangePicker>;
7
7
  export declare const Basic: ComponentStory<typeof AdvancedRangePicker>;
8
8
  export declare const HideTimeLabel: ComponentStory<typeof AdvancedRangePicker>;
9
+ export declare const ShowCalculationTypeCondition: ComponentStory<typeof AdvancedRangePicker>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.2.1-beta.2",
3
+ "version": "1.2.1-beta.4",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "main": "dist/index.js",
6
6
  "files": [