architwin 1.19.1 → 1.19.3
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.
|
@@ -300,7 +300,7 @@ function selectOption(option, elementId, skipToggle = false) {
|
|
|
300
300
|
const tags = getMpTags();
|
|
301
301
|
const filteredTags = filterTagList(tags);
|
|
302
302
|
const sortedTags = sortTags(filteredTags, { by: 'label', order: 'asc' });
|
|
303
|
-
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && tag.tag_type === TAG_TYPE.MP);
|
|
303
|
+
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && (!tag.tag_type || tag.tag_type === TAG_TYPE.MP));
|
|
304
304
|
// remove tags that is not part in the sorted Tags
|
|
305
305
|
yield hideTagsFromSpace(removeTags);
|
|
306
306
|
// show filtered tags only
|
|
@@ -325,7 +325,7 @@ function selectOption(option, elementId, skipToggle = false) {
|
|
|
325
325
|
const tags = getMpTags();
|
|
326
326
|
const filteredTags = filterTagList(tags);
|
|
327
327
|
const sortedTags = sortTags(filteredTags, { by: 'label', order: 'asc' });
|
|
328
|
-
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && tag.tag_type === TAG_TYPE.MP);
|
|
328
|
+
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && (!tag.tag_type || tag.tag_type === TAG_TYPE.MP));
|
|
329
329
|
// remove tags that is not part in the sorted Tags
|
|
330
330
|
yield hideTagsFromSpace(removeTags);
|
|
331
331
|
// show filtered tags only
|
|
@@ -380,7 +380,7 @@ function selectOption(option, elementId, skipToggle = false) {
|
|
|
380
380
|
let tags = getMpTags().filter(tag => !tag.tag_type || tag.tag_type !== TAG_TYPE.IOT);
|
|
381
381
|
const filteredTags = (_a = filterTagList(tags)) !== null && _a !== void 0 ? _a : [];
|
|
382
382
|
const sortedTags = sortTags(filteredTags.length ? filteredTags : tags, selectedTagSortOption);
|
|
383
|
-
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && tag.tag_type === TAG_TYPE.MP);
|
|
383
|
+
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && (!tag.tag_type || tag.tag_type === TAG_TYPE.MP));
|
|
384
384
|
if (filteredTags.length > 0) {
|
|
385
385
|
// remove tags that is not part in the sorted Tags
|
|
386
386
|
yield hideTagsFromSpace(removeTags);
|
|
@@ -277,7 +277,7 @@ export function renderTags(tags, showOwnTagsOnly = false) {
|
|
|
277
277
|
const payload = { tag: targetTag };
|
|
278
278
|
dispatchSpaceEvent(SPACE_EVENTS.TAG_DISPOSED, payload);
|
|
279
279
|
toggleModal(false);
|
|
280
|
-
notify.success(i18n.t('
|
|
280
|
+
notify.success(i18n.t('SuccessDeleteTag'));
|
|
281
281
|
}
|
|
282
282
|
else {
|
|
283
283
|
toggleModal(false);
|
|
@@ -489,7 +489,7 @@ export function addClickEventToTagRow(tag) {
|
|
|
489
489
|
yield disposeTag({ tagId: tagId });
|
|
490
490
|
const tagRow = document.getElementById(`at-tag-row-${tagId}`);
|
|
491
491
|
tagRow.remove();
|
|
492
|
-
notify.success(i18n.t('
|
|
492
|
+
notify.success(i18n.t('SuccessDeleteTag'));
|
|
493
493
|
}
|
|
494
494
|
else {
|
|
495
495
|
notify.error("Tag id not found!");
|
package/lib/atwinui/events.js
CHANGED
|
@@ -1077,6 +1077,7 @@ function handleSaveTag() {
|
|
|
1077
1077
|
currentTag.media_url = tagFormPayload.tagEmbed;
|
|
1078
1078
|
currentTag.json_data.label = tagFormPayload.tagName;
|
|
1079
1079
|
currentTag.json_data.description = tagFormPayload.tagDescription;
|
|
1080
|
+
currentTag.tag_type = TAG_TYPE.MP;
|
|
1080
1081
|
// Add tag icon data
|
|
1081
1082
|
const targetCategory = _tagCategories.find(cat => cat.uuid === tagFormPayload.tagCategoryId);
|
|
1082
1083
|
if (targetCategory) {
|
|
@@ -3335,13 +3336,13 @@ function handleClearSearchTagName() {
|
|
|
3335
3336
|
// const tags = getMpTags()
|
|
3336
3337
|
const tags = [..._tags];
|
|
3337
3338
|
if (selectedCategoryFilterId || selectedSubCategoryFilterId && isTagPaneActive) {
|
|
3338
|
-
const filteredTags = filterTagList(tags).filter(tag => tag.tag_type === TAG_TYPE.MP);
|
|
3339
|
+
const filteredTags = filterTagList(tags).filter(tag => !tag.tag_type || tag.tag_type === TAG_TYPE.MP);
|
|
3339
3340
|
// show filtered tags only
|
|
3340
3341
|
yield renderTagsInSpace(filteredTags, true);
|
|
3341
3342
|
renderTags(filteredTags);
|
|
3342
3343
|
}
|
|
3343
3344
|
else if (tags.length > 0 && isTagPaneActive) {
|
|
3344
|
-
const filteredMPTags = tags.filter(tag => tag.tag_type === TAG_TYPE.MP);
|
|
3345
|
+
const filteredMPTags = tags.filter(tag => !tag.tag_type || tag.tag_type === TAG_TYPE.MP);
|
|
3345
3346
|
yield renderTagsInSpace(filteredMPTags, true);
|
|
3346
3347
|
renderTags(filteredMPTags, true);
|
|
3347
3348
|
}
|
|
@@ -3367,7 +3368,7 @@ function handleSearchFromTagListButton() {
|
|
|
3367
3368
|
if (foundTag) {
|
|
3368
3369
|
if (selectedCategoryFilterId || selectedSubCategoryFilterId && isTagPaneActive) {
|
|
3369
3370
|
const filteredTags = filterTagList(foundTag);
|
|
3370
|
-
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && tag.tag_type === TAG_TYPE.MP);
|
|
3371
|
+
const removeTags = tags.filter(tag => !filteredTags.some(ft => ft.id === tag.id) && (!tag.tag_type || tag.tag_type === TAG_TYPE.MP));
|
|
3371
3372
|
log.info("removeTags", removeTags);
|
|
3372
3373
|
// remove tags that is not part in the sorted Tags
|
|
3373
3374
|
yield hideTagsFromSpace(removeTags);
|
|
@@ -3376,7 +3377,7 @@ function handleSearchFromTagListButton() {
|
|
|
3376
3377
|
renderTags(filteredTags);
|
|
3377
3378
|
}
|
|
3378
3379
|
else if (foundTag.length > 0 && isTagPaneActive) {
|
|
3379
|
-
const removeTags = tags.filter(tag => !foundTag.some(ft => ft.id === tag.id) && tag.tag_type === TAG_TYPE.MP);
|
|
3380
|
+
const removeTags = tags.filter(tag => !foundTag.some(ft => ft.id === tag.id) && (!tag.tag_type || tag.tag_type === TAG_TYPE.MP));
|
|
3380
3381
|
log.info("removeTags", removeTags);
|
|
3381
3382
|
// remove tags that is not part in the sorted Tags
|
|
3382
3383
|
yield hideTagsFromSpace(removeTags);
|