@antscorp/antsomi-ui 1.3.5-beta.765 → 1.3.5-beta.766

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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
3
2
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
4
3
  type DisplayFormatProps = {
@@ -18,7 +18,7 @@ import { parseTagString, convertInputString, emojiManufacturer, getEmojiTag } fr
18
18
  import { EMOJI, defaultCssVariables, tagifyDefaultProps } from './constants';
19
19
  const TagifyInput = forwardRef((props, ref) => {
20
20
  // Props
21
- const { value, acceptableTagPattern, mapAttributes, maxTags, mode, name, children, cssTagifyVariables, onTagClick, onChange, } = props;
21
+ const { value, placeholder, acceptableTagPattern, mapAttributes, maxTags, mode, name, children, cssTagifyVariables, onTagClick, onChange, } = props;
22
22
  // console.log('========= props ============', props);
23
23
  // console.count('------------ re-render ------------');
24
24
  // States
@@ -116,6 +116,7 @@ const TagifyInput = forwardRef((props, ref) => {
116
116
  },
117
117
  maxTags,
118
118
  mode,
119
+ placeholder,
119
120
  mixMode: {
120
121
  insertAfterTag: '', // Not insert anything after tag
121
122
  },
@@ -125,7 +126,7 @@ const TagifyInput = forwardRef((props, ref) => {
125
126
  editTags: false, // Allow tag editing
126
127
  });
127
128
  }
128
- }, [mode, maxTags, customizeTag]);
129
+ }, [mode, placeholder, maxTags, customizeTag]);
129
130
  // Initialization tagify
130
131
  useLayoutEffect(() => {
131
132
  initializeTagify();
@@ -44,6 +44,7 @@ export declare const TAG_COLOR: {
44
44
  readonly custom: "#bbefbe";
45
45
  };
46
46
  export declare const EMOJI_COLLECTIONS: {
47
+ readonly COMMON: "common";
47
48
  readonly VIBER: "viber";
48
49
  readonly LINE: "line";
49
50
  };
@@ -34,6 +34,7 @@ export const tagifyDefaultProps = {
34
34
  value: '',
35
35
  mode: 'mix',
36
36
  name: 'tagifyInput',
37
+ placeholder: undefined,
37
38
  acceptableTagPattern: DEFAULT_ACCEPT_TAGS,
38
39
  onChange: () => { },
39
40
  };
@@ -56,6 +57,7 @@ export const TAG_COLOR = {
56
57
  [CUSTOM_FN]: '#bbefbe',
57
58
  };
58
59
  export const EMOJI_COLLECTIONS = {
60
+ COMMON: 'common',
59
61
  VIBER: 'viber',
60
62
  LINE: 'line',
61
63
  };