linweizeng пре 2 година
родитељ
комит
a31332b867

+ 41 - 40
src/components/ibps-query-builder/constants/index.js

@@ -10,14 +10,14 @@ const QueryBuilder = {
  * @private
  */
 QueryBuilder.TYPES = {
-  'string': 'string',
-  'integer': 'number',
-  'double': 'number',
-  'number': 'number',
-  'date': 'datetime',
-  'time': 'datetime',
-  'datetime': 'datetime',
-  'boolean': 'boolean'
+    'string': 'string',
+    'integer': 'number',
+    'double': 'number',
+    'number': 'number',
+    'date': 'datetime',
+    'time': 'datetime',
+    'datetime': 'datetime',
+    'boolean': 'boolean'
 }
 
 /**
@@ -28,15 +28,15 @@ QueryBuilder.TYPES = {
  * @private
  */
 QueryBuilder.INPUTS = [
-  'text',
-  'number',
-  'textarea',
-  'radio',
-  'checkbox',
-  'select',
-  'date',
-  'datetime',
-  'custom'
+    'text',
+    'number',
+    'textarea',
+    'radio',
+    'checkbox',
+    'select',
+    'date',
+    'datetime',
+    'custom'
 ]
 
 /**
@@ -47,31 +47,32 @@ QueryBuilder.INPUTS = [
  *  apply_to :应用
  */
 QueryBuilder.OPERATORS = {
-  equal: { type: 'equal', nb_inputs: 1, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
-  not_equal: { type: 'not_equal', nb_inputs: 1, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
-  in: { type: 'in', nb_inputs: 1, multiple: true, apply_to: ['string', 'number', 'datetime'] },
-  not_in: { type: 'not_in', nb_inputs: 1, multiple: true, apply_to: ['string', 'number', 'datetime'] },
-  less: { type: 'less', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
-  less_or_equal: { type: 'less_or_equal', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
-  greater: { type: 'greater', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
-  greater_or_equal: { type: 'greater_or_equal', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
-  between: { type: 'between', nb_inputs: 2, multiple: false, apply_to: ['number', 'datetime'] },
-  not_between: { type: 'not_between', nb_inputs: 2, multiple: false, apply_to: ['number', 'datetime'] },
-  begins_with: { type: 'begins_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
-  not_begins_with: { type: 'not_begins_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
-  contains: { type: 'contains', nb_inputs: 1, multiple: false, apply_to: ['string'] },
-  not_contains: { type: 'not_contains', nb_inputs: 1, multiple: false, apply_to: ['string'] },
-  ends_with: { type: 'ends_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
-  not_ends_with: { type: 'not_ends_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
-  is_empty: { type: 'is_empty', nb_inputs: 0, multiple: false, apply_to: ['string'] },
-  is_not_empty: { type: 'is_not_empty', nb_inputs: 0, multiple: false, apply_to: ['string'] },
-  is_null: { type: 'is_null', nb_inputs: 0, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
-  is_not_null: { type: 'is_not_null', nb_inputs: 0, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] }
+    equal: { type: 'equal', nb_inputs: 1, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
+    not_equal: { type: 'not_equal', nb_inputs: 1, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
+    in: { type: 'in', nb_inputs: 1, multiple: true, apply_to: ['string', 'number', 'datetime'] },
+    not_in: { type: 'not_in', nb_inputs: 1, multiple: true, apply_to: ['string', 'number', 'datetime'] },
+    less: { type: 'less', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
+    less_or_equal: { type: 'less_or_equal', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
+    greater: { type: 'greater', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
+    greater_or_equal: { type: 'greater_or_equal', nb_inputs: 1, multiple: false, apply_to: ['number', 'datetime'] },
+    between: { type: 'between', nb_inputs: 2, multiple: false, apply_to: ['number', 'datetime'] },
+    not_between: { type: 'not_between', nb_inputs: 2, multiple: false, apply_to: ['number', 'datetime'] },
+    begins_with: { type: 'begins_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
+    not_begins_with: { type: 'not_begins_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
+    contains: { type: 'contains', nb_inputs: 1, multiple: false, apply_to: ['string'] },
+    not_contains: { type: 'not_contains', nb_inputs: 1, multiple: false, apply_to: ['string'] },
+    ends_with: { type: 'ends_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
+    not_ends_with: { type: 'not_ends_with', nb_inputs: 1, multiple: false, apply_to: ['string'] },
+    is_empty: { type: 'is_empty', nb_inputs: 0, multiple: false, apply_to: ['string'] },
+    is_not_empty: { type: 'is_not_empty', nb_inputs: 0, multiple: false, apply_to: ['string'] },
+    is_null: { type: 'is_null', nb_inputs: 0, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
+    is_not_null: { type: 'is_not_null', nb_inputs: 0, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] },
+    is_like: { type: 'is_like', nb_inputs: 1, multiple: false, apply_to: ['string', 'number', 'datetime', 'boolean'] }
 }
 QueryBuilder.SOURCES = {
-  'fixed': 'fixed',
-  'script': 'script',
-  'dynamic': 'dynamic'
+    'fixed': 'fixed',
+    'script': 'script',
+    'dynamic': 'dynamic'
 }
 
 export default QueryBuilder

+ 4 - 3
src/locales/en.json

@@ -28,7 +28,7 @@
 			"removeAllToken": "Delete all tokens",
 			"removeToken": "Delete token",
 			"resetSearch": "Reset",
-			"delete":"Delete",
+			"delete": "Delete",
 			"save": "Save",
 			"search": "Search",
 			"toBottom": "Move last",
@@ -179,7 +179,8 @@
 				"not_contains": "Does not contain the following",
 				"not_ends_with": "Do not end with",
 				"not_equal": "Not equal to",
-				"not_in": "Not In"
+				"not_in": "Not In",
+				"is_like": "In it"
 			},
 			"remove_group": "Delete Group",
 			"remove_rule": "Delete",
@@ -862,4 +863,4 @@
 		"zip": "Please enter the correct postal code."
 	},
 	"welcome": "Welcome to the IBPS platform"
-}
+}

+ 4 - 3
src/locales/ja.json

@@ -28,7 +28,7 @@
 			"removeAllToken": "すべてのトークンを削除",
 			"removeToken": "トークンを削除",
 			"resetSearch": "リセットする",
-			"delete":"削除",
+			"delete": "削除",
 			"save": "保存する",
 			"search": "検索する",
 			"toBottom": "最後の壱条に移る",
@@ -179,7 +179,8 @@
 				"not_contains": "以下を含まない",
 				"not_ends_with": "で終わらないでください",
 				"not_equal": "等しくない",
-				"not_in": "ではない"
+				"not_in": "ではない",
+				"is_like": "その中で"
 			},
 			"remove_group": "グループを削除",
 			"remove_rule": "削除する",
@@ -862,4 +863,4 @@
 		"zip": "正しい郵便番号を入力してください。"
 	},
 	"welcome": "IBPSプラットフォームへようこそ"
-}
+}

+ 4 - 3
src/locales/zh-CN.json

@@ -28,7 +28,7 @@
 			"removeAllToken": "删除全部令牌",
 			"removeToken": "删除令牌",
 			"resetSearch": "重置",
-			"delete":"删除",
+			"delete": "删除",
 			"save": "保存",
 			"search": "查询",
 			"toBottom": "移至最后一条",
@@ -179,7 +179,8 @@
 				"not_contains": "不包含以下内容",
 				"not_ends_with": "不以...结束",
 				"not_equal": "不等于",
-				"not_in": "不在...之內"
+				"not_in": "不在...之內",
+				"is_like": "在其中"
 			},
 			"remove_group": "删除组",
 			"remove_rule": "删除",
@@ -875,4 +876,4 @@
 		"zip": "请输入正确邮政编码."
 	},
 	"welcome": "欢迎使用 IBPS 平台"
-}
+}

+ 4 - 3
src/locales/zh-TW.json

@@ -28,7 +28,7 @@
 			"removeAllToken": "刪除全部令牌",
 			"removeToken": "刪除令牌",
 			"resetSearch": "重置",
-			"delete":"删除",
+			"delete": "删除",
 			"save": "保存",
 			"search": "查询",
 			"toBottom": "移至最後壹條",
@@ -179,7 +179,8 @@
 				"not_contains": "不包含以下內容",
 				"not_ends_with": "不以...結束",
 				"not_equal": "不等於",
-				"not_in": "不在...之內"
+				"not_in": "不在...之內",
+				"is_like": "在其中"
 			},
 			"remove_group": "刪除組",
 			"remove_rule": "刪除",
@@ -862,4 +863,4 @@
 		"zip": "請輸入正確郵政編碼."
 	},
 	"welcome": "歡迎使用 IBPS 平台"
-}
+}