@antscorp/antsomi-ui 1.3.5-beta.925 → 1.3.5-beta.927
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.
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +0 -1
- package/es/components/molecules/TagifyInput/TagifyInput.js +9 -2
- package/es/components/molecules/TagifyInput/types.d.ts +1 -0
- package/es/components/organism/LeftMenu/utils/index.js +3 -2
- package/es/components/template/TemplateListing/Loadable.d.ts +0 -1
- package/package.json +2 -1
|
@@ -26,6 +26,7 @@ const TagifyInput = forwardRef((props, ref) => {
|
|
|
26
26
|
// States
|
|
27
27
|
const [isLineBreak, setIsLineBreak] = useState(hasLineBreak(initialValue));
|
|
28
28
|
const [tooltipRefresher, setTooltipRefresher] = useState(1);
|
|
29
|
+
const [labelTagRefreshness, setLabelTagRefreshness] = useState(1);
|
|
29
30
|
// Refs
|
|
30
31
|
const inputRef = useRef(null);
|
|
31
32
|
const tagifyRef = useRef(null);
|
|
@@ -426,6 +427,12 @@ const TagifyInput = forwardRef((props, ref) => {
|
|
|
426
427
|
tagifyRef.current.loadOriginalValues(newContent);
|
|
427
428
|
}
|
|
428
429
|
},
|
|
430
|
+
onLabelTagRefreshness() {
|
|
431
|
+
if (!tagifyRef.current) {
|
|
432
|
+
throw new Error('Tagify instance is not initialized');
|
|
433
|
+
}
|
|
434
|
+
setLabelTagRefreshness(prev => prev + 1);
|
|
435
|
+
},
|
|
429
436
|
}), [acceptableTagPattern, escapeHTML, onInjectTagAtCaret, placeCaretAfterNode]);
|
|
430
437
|
const onTagItemClick = useCallback((event) => {
|
|
431
438
|
event.stopPropagation();
|
|
@@ -518,7 +525,7 @@ const TagifyInput = forwardRef((props, ref) => {
|
|
|
518
525
|
* Any map attribute change will sync label of the tags
|
|
519
526
|
*/
|
|
520
527
|
const makeValidLabelTags = useCallback((attributes, errorAttributes) => {
|
|
521
|
-
if (tagifyRef.current) {
|
|
528
|
+
if (tagifyRef.current && labelTagRefreshness) {
|
|
522
529
|
const tagElements = tagifyRef.current.getTagElms();
|
|
523
530
|
const { pattern, name: cachePatternName, acceptablePattern: acceptableType, } = patternHandlers[PERSONALIZE_PTN];
|
|
524
531
|
tagElements.forEach(tagElement => {
|
|
@@ -633,7 +640,7 @@ const TagifyInput = forwardRef((props, ref) => {
|
|
|
633
640
|
});
|
|
634
641
|
setTooltipRefresher(prev => prev + 1);
|
|
635
642
|
}
|
|
636
|
-
}, [acceptableTagPattern]);
|
|
643
|
+
}, [acceptableTagPattern, labelTagRefreshness]);
|
|
637
644
|
const initializeTagify = useCallback(() => {
|
|
638
645
|
if (inputRef.current && !tagifyRef.current) {
|
|
639
646
|
tagifyRef.current = new Tagify(inputRef.current, {
|
|
@@ -130,6 +130,7 @@ export interface TagifyInputRef {
|
|
|
130
130
|
onAddNewTag: (newTag: TagDataCustomize | string) => void;
|
|
131
131
|
onReplaceTag: (currentTagEle: HTMLElement, newTag: TagDataCustomize) => void;
|
|
132
132
|
onReload: (newValue: string) => void;
|
|
133
|
+
onLabelTagRefreshness: () => void;
|
|
133
134
|
}
|
|
134
135
|
export type EmojiCollection = (typeof EMOJI_COLLECTIONS)[keyof typeof EMOJI_COLLECTIONS];
|
|
135
136
|
export type TagType = (typeof TAG_TYPE)[keyof typeof TAG_TYPE];
|
|
@@ -97,9 +97,10 @@ export const recursivePermissionMenu = (menuItems, menuPermissions) => {
|
|
|
97
97
|
*/
|
|
98
98
|
export const getGeneratePath = (path, params) => {
|
|
99
99
|
try {
|
|
100
|
-
const { portalId, userId, dashboardId, channelId } = params || {};
|
|
100
|
+
const { portalId, userId, accountId, dashboardId, channelId } = params || {};
|
|
101
101
|
const paramsObjects = {
|
|
102
|
-
|
|
102
|
+
// NOTE: Hot fix for account_id (login account)
|
|
103
|
+
user_id: accountId ?? userId ?? '-1',
|
|
103
104
|
networkId: portalId ?? -1,
|
|
104
105
|
portalId: portalId ?? -1,
|
|
105
106
|
dashboardId: dashboardId ?? '-1',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antscorp/antsomi-ui",
|
|
3
|
-
"version": "1.3.5-beta.
|
|
3
|
+
"version": "1.3.5-beta.927",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"dist/*",
|
|
@@ -256,3 +256,4 @@
|
|
|
256
256
|
"react-router-dom": ">= 5.1.0"
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
+
|