utopia-ui 3.0.0-alpha.57 → 3.0.0-alpha.58
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/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -921,7 +921,7 @@ function useTagsManager(initialTags) {
|
|
921
921
|
var getItemTags = useCallback(function (item) {
|
922
922
|
var _a, _b;
|
923
923
|
var text = ((_a = item === null || item === void 0 ? void 0 : item.layer) === null || _a === void 0 ? void 0 : _a.itemTextField) && item ? getValue(item, (_b = item.layer) === null || _b === void 0 ? void 0 : _b.itemTextField) : undefined;
|
924
|
-
var itemTagStrings = text.toLocaleLowerCase().match(hashTagRegex);
|
924
|
+
var itemTagStrings = text === null || text === void 0 ? void 0 : text.toLocaleLowerCase().match(hashTagRegex);
|
925
925
|
var itemTags = [];
|
926
926
|
itemTagStrings === null || itemTagStrings === void 0 ? void 0 : itemTagStrings.map(function (tag) {
|
927
927
|
if (tags.find(function (t) { return t.id === tag.slice(1); })) {
|
@@ -3135,13 +3135,15 @@ var Layer = function (_a) {
|
|
3135
3135
|
return (React.createElement(React.Fragment, null,
|
3136
3136
|
items &&
|
3137
3137
|
((_c = (_b = items.
|
3138
|
-
filter(function (item) { return item[itemTextField]; }).
|
3139
3138
|
filter(function (item) { var _a; return ((_a = item.layer) === null || _a === void 0 ? void 0 : _a.name) === name; })) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
|
3140
3139
|
return filterTags.length == 0 ? item : filterTags.every(function (tag) { return getItemTags(item).some(function (filterTag) { return filterTag.id.toLocaleLowerCase() === tag.id.toLocaleLowerCase(); }); });
|
3141
3140
|
})) === null || _c === void 0 ? void 0 : _c.filter(function (item) { return item.layer && isLayerVisible(item.layer); }).map(function (item) {
|
3142
3141
|
var _a;
|
3143
3142
|
if (getValue(item, itemLongitudeField) && getValue(item, itemLatitudeField)) {
|
3144
|
-
item[itemTextField]
|
3143
|
+
if (item[itemTextField])
|
3144
|
+
item[itemTextField] = getValue(item, itemTextField);
|
3145
|
+
else
|
3146
|
+
item[itemTextField] = "";
|
3145
3147
|
if (item === null || item === void 0 ? void 0 : item.tags) {
|
3146
3148
|
item[itemTextField] = item[itemTextField] + '\n\n';
|
3147
3149
|
item.tags.map(function (tag) {
|