|
@@ -222,6 +222,7 @@ BlazeComponent.extendComponent({
|
|
'operator-created': 'createdAt',
|
|
'operator-created': 'createdAt',
|
|
'operator-modified': 'modifiedAt',
|
|
'operator-modified': 'modifiedAt',
|
|
'operator-comment': 'comments',
|
|
'operator-comment': 'comments',
|
|
|
|
+ 'operator-has': 'has',
|
|
};
|
|
};
|
|
|
|
|
|
const predicates = {
|
|
const predicates = {
|
|
@@ -238,12 +239,19 @@ BlazeComponent.extendComponent({
|
|
'predicate-archived': 'archived',
|
|
'predicate-archived': 'archived',
|
|
'predicate-all': 'all',
|
|
'predicate-all': 'all',
|
|
'predicate-ended': 'ended',
|
|
'predicate-ended': 'ended',
|
|
|
|
+ 'predicate-public': 'public',
|
|
|
|
+ 'predicate-private': 'private',
|
|
},
|
|
},
|
|
sorts: {
|
|
sorts: {
|
|
'predicate-due': 'dueAt',
|
|
'predicate-due': 'dueAt',
|
|
'predicate-created': 'createdAt',
|
|
'predicate-created': 'createdAt',
|
|
'predicate-modified': 'modifiedAt',
|
|
'predicate-modified': 'modifiedAt',
|
|
},
|
|
},
|
|
|
|
+ has: {
|
|
|
|
+ 'predicate-description': 'description',
|
|
|
|
+ 'predicate-checklist': 'checklist',
|
|
|
|
+ 'predicate-attachment': 'attachment',
|
|
|
|
+ },
|
|
};
|
|
};
|
|
const predicateTranslations = {};
|
|
const predicateTranslations = {};
|
|
Object.entries(predicates).forEach(([category, catPreds]) => {
|
|
Object.entries(predicates).forEach(([category, catPreds]) => {
|
|
@@ -276,6 +284,7 @@ BlazeComponent.extendComponent({
|
|
createdAt: null,
|
|
createdAt: null,
|
|
modifiedAt: null,
|
|
modifiedAt: null,
|
|
comments: [],
|
|
comments: [],
|
|
|
|
+ has: [],
|
|
};
|
|
};
|
|
|
|
|
|
let text = '';
|
|
let text = '';
|
|
@@ -296,6 +305,7 @@ BlazeComponent.extendComponent({
|
|
} else {
|
|
} else {
|
|
op = m.groups.abbrev.toLowerCase();
|
|
op = m.groups.abbrev.toLowerCase();
|
|
}
|
|
}
|
|
|
|
+ // eslint-disable-next-line no-prototype-builtins
|
|
if (operatorMap.hasOwnProperty(op)) {
|
|
if (operatorMap.hasOwnProperty(op)) {
|
|
let value = m.groups.value;
|
|
let value = m.groups.value;
|
|
if (operatorMap[op] === 'labels') {
|
|
if (operatorMap[op] === 'labels') {
|
|
@@ -353,6 +363,15 @@ BlazeComponent.extendComponent({
|
|
} else {
|
|
} else {
|
|
value = predicateTranslations.status[value];
|
|
value = predicateTranslations.status[value];
|
|
}
|
|
}
|
|
|
|
+ } else if (operatorMap[op] === 'has') {
|
|
|
|
+ if (!predicateTranslations.has[value]) {
|
|
|
|
+ this.parsingErrors.push({
|
|
|
|
+ tag: 'operator-has-invalid',
|
|
|
|
+ value,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ value = predicateTranslations.has[value];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (Array.isArray(params[operatorMap[op]])) {
|
|
if (Array.isArray(params[operatorMap[op]])) {
|
|
params[operatorMap[op]].push(value);
|
|
params[operatorMap[op]].push(value);
|
|
@@ -511,6 +530,7 @@ BlazeComponent.extendComponent({
|
|
operator_created: TAPi18n.__('operator-created'),
|
|
operator_created: TAPi18n.__('operator-created'),
|
|
operator_modified: TAPi18n.__('operator-modified'),
|
|
operator_modified: TAPi18n.__('operator-modified'),
|
|
operator_status: TAPi18n.__('operator-status'),
|
|
operator_status: TAPi18n.__('operator-status'),
|
|
|
|
+ operator_has: TAPi18n.__('operator-has'),
|
|
predicate_overdue: TAPi18n.__('predicate-overdue'),
|
|
predicate_overdue: TAPi18n.__('predicate-overdue'),
|
|
predicate_archived: TAPi18n.__('predicate-archived'),
|
|
predicate_archived: TAPi18n.__('predicate-archived'),
|
|
predicate_all: TAPi18n.__('predicate-all'),
|
|
predicate_all: TAPi18n.__('predicate-all'),
|
|
@@ -519,6 +539,11 @@ BlazeComponent.extendComponent({
|
|
predicate_month: TAPi18n.__('predicate-month'),
|
|
predicate_month: TAPi18n.__('predicate-month'),
|
|
predicate_quarter: TAPi18n.__('predicate-quarter'),
|
|
predicate_quarter: TAPi18n.__('predicate-quarter'),
|
|
predicate_year: TAPi18n.__('predicate-year'),
|
|
predicate_year: TAPi18n.__('predicate-year'),
|
|
|
|
+ predicate_attachment: TAPi18n.__('predicate-attachment'),
|
|
|
|
+ predicate_description: TAPi18n.__('predicate-description'),
|
|
|
|
+ predicate_checklist: TAPi18n.__('predicate-checklist'),
|
|
|
|
+ predicate_public: TAPi18n.__('predicate-public'),
|
|
|
|
+ predicate_private: TAPi18n.__('predicate-private'),
|
|
};
|
|
};
|
|
|
|
|
|
text = `# ${TAPi18n.__('globalSearch-instructions-heading')}`;
|
|
text = `# ${TAPi18n.__('globalSearch-instructions-heading')}`;
|
|
@@ -574,9 +599,19 @@ BlazeComponent.extendComponent({
|
|
'globalSearch-instructions-status-archived',
|
|
'globalSearch-instructions-status-archived',
|
|
tags,
|
|
tags,
|
|
)}`;
|
|
)}`;
|
|
|
|
+ text += `\n* ${TAPi18n.__(
|
|
|
|
+ 'globalSearch-instructions-status-public',
|
|
|
|
+ tags,
|
|
|
|
+ )}`;
|
|
|
|
+ text += `\n* ${TAPi18n.__(
|
|
|
|
+ 'globalSearch-instructions-status-private',
|
|
|
|
+ tags,
|
|
|
|
+ )}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-status-all', tags)}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-status-all', tags)}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-status-ended', tags)}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-status-ended', tags)}`;
|
|
|
|
|
|
|
|
+ text += `\n* ${TAPi18n.__('globalSearch-instructions-operator-has', tags)}`;
|
|
|
|
+
|
|
text += `\n## ${TAPi18n.__('heading-notes')}`;
|
|
text += `\n## ${TAPi18n.__('heading-notes')}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-1', tags)}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-1', tags)}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-2', tags)}`;
|
|
text += `\n* ${TAPi18n.__('globalSearch-instructions-notes-2', tags)}`;
|