app-v3-scripts-editor 1.33.0 → 1.33.1

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.
@@ -3,6 +3,7 @@ import { IOptionValue } from '../../../../services';
3
3
  type OptionVariableSelectorProps = {
4
4
  dataDefault?: IOptionValue | IOptionValue[];
5
5
  propertyId?: string;
6
+ exclusiveTabSelection?: boolean;
6
7
  } & SelectProps;
7
8
  declare const OptionVariableSelector: React.FC<OptionVariableSelectorProps>;
8
9
  export default OptionVariableSelector;
@@ -2,6 +2,7 @@ import { IProfile } from '../../../../services';
2
2
  import { VariableSuggestSelectProps } from '../../Shared/VariableSuggestSelect';
3
3
  type UserVariableSelectorProps = {
4
4
  dataDefault?: IProfile | IProfile[];
5
+ exclusiveTabSelection?: boolean;
5
6
  } & Omit<VariableSuggestSelectProps, "options" | "defaultOptions" | "onSearch" | "tagRender">;
6
7
  declare const UserVariableSelector: React.FC<UserVariableSelectorProps>;
7
8
  export default UserVariableSelector;
@@ -7,7 +7,7 @@ export interface VariableLeaf {
7
7
  objectLabel?: string;
8
8
  type: DATA_TYPE_PROPERTY;
9
9
  slug: string;
10
- name?: string;
10
+ fullname?: string[];
11
11
  fullPath: string;
12
12
  value: string;
13
13
  order?: number;
@@ -33,6 +33,7 @@ export interface UseVariableSuggestOptions {
33
33
  export interface VariableGroupOption {
34
34
  id?: string;
35
35
  label: string;
36
+ fullname?: string[];
36
37
  type: string;
37
38
  node_type?: BlockType;
38
39
  order?: number;
@@ -6,6 +6,10 @@ import { VariableSelectLabeledValue, VariableSelectValue } from './types';
6
6
  export declare const isLabeledValue: (value: unknown) => value is VariableSelectLabeledValue;
7
7
  export declare const extractValueString: (value: unknown) => string;
8
8
  export declare const readDisplayTitle: (option?: DefaultOptionType | VariableSelectLabeledValue) => string;
9
+ type VariableLabelSource = Pick<VariableLeaf, "fullname" | "fullPath" | "slug">;
10
+ export declare const readVariableLeafLabel: (data?: VariableLabelSource) => string;
11
+ export declare const readVariableDisplayLabel: (data?: VariableLabelSource, separator?: string) => string;
12
+ export declare const readVariableSearchTarget: (data: VariableLabelSource) => string;
9
13
  export declare function filterOptionsByKeyword(opt: VariableAutoCompleteOption, keyword: string): VariableAutoCompleteOption | null;
10
14
  export declare const normalizeValues: (value?: VariableSelectValue) => string[];
11
15
  export declare const buildVariableValueString: (data: VariableLeaf, mode?: OutputMode) => string;
@@ -22,10 +26,11 @@ export declare const buildDeletedVariableMeta: (value: string) => {
22
26
  object: string;
23
27
  type: DATA_TYPE_PROPERTY.singlelineproperty;
24
28
  slug: string;
25
- name: string;
29
+ fullname: string[];
26
30
  fullPath: string;
27
31
  value: string;
28
32
  mode: "ALL_MATCHES" | "FIRST_MATCH" | "SPECIFIC_FIELD" | "COUNT";
29
33
  isDeleted: true;
30
34
  };
31
35
  export declare const buildOptionMap: (options?: SelectProps["options"]) => Map<string, DefaultOptionType>;
36
+ export {};
@@ -1,4 +1,4 @@
1
1
  import { VariableSuggestSelectProps } from './types';
2
- export declare const VariableSuggestSelect: ({ defaultOptions, variableFilterTypes, tabLabels, onVariableInsert, dropdownClassName, options, open: controlledOpen, onDropdownVisibleChange, onSearch: externalOnSearch, onChange: externalOnChange, onSelect: externalOnSelect, getPopupContainer, showSearch, children, value: controlledValue, defaultValue, mode: selectMode, tagRender, className, labelInValue, onClear, ...restProps }: VariableSuggestSelectProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const VariableSuggestSelect: ({ defaultOptions, variableFilterTypes, tabLabels, onVariableInsert, exclusiveTabSelection, dropdownClassName, options, open: controlledOpen, onDropdownVisibleChange, onSearch: externalOnSearch, onChange: externalOnChange, onSelect: externalOnSelect, getPopupContainer, showSearch, children, value: controlledValue, defaultValue, mode: selectMode, tagRender, className, labelInValue, onClear, ...restProps }: VariableSuggestSelectProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default function VariableSuggestSelectWithProvider(props: VariableSuggestSelectProps): import("react/jsx-runtime").JSX.Element;
4
4
  export type { TabKey, TabLabels, VariableSuggestSelectProps } from './types';
@@ -1,7 +1,7 @@
1
1
  import { SelectProps } from 'antd';
2
2
  import { DefaultOptionType } from 'antd/es/select';
3
- import { DATA_TYPE_PROPERTY } from '../../../constants/common';
4
3
  import { ReactNode } from 'react';
4
+ import { DATA_TYPE_PROPERTY } from '../../../constants/common';
5
5
  import { VariableLeaf } from '../SuggestVariableNode/type';
6
6
  export type TabKey = "default" | "variables";
7
7
  export type TabLabels = {
@@ -24,4 +24,5 @@ export interface VariableSuggestSelectProps extends SelectProps<VariableSelectVa
24
24
  variableFilterTypes?: DATA_TYPE_PROPERTY[];
25
25
  tabLabels?: TabLabels;
26
26
  onVariableInsert?: (value: string) => void;
27
+ exclusiveTabSelection?: boolean;
27
28
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.33.0",
4
+ "version": "1.33.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"