@infomaximum/widget-sdk 4.13.0 → 5.0.0-beta10

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.esm.js CHANGED
@@ -40,48 +40,6 @@ var EDrawerPlacement;
40
40
  EDrawerPlacement["LEFT"] = "LEFT";
41
41
  EDrawerPlacement["RIGHT"] = "RIGHT";
42
42
  })(EDrawerPlacement || (EDrawerPlacement = {}));
43
- /**
44
- * @deprecated Функция может работать некорректно и будет удалена в будущих версиях.
45
- * Необходимо использовать {@link IWidgetProps.actionValidator }.
46
- */
47
- var isExecuteScriptActionValid = function (action, _a) {
48
- var _b;
49
- var scripts = _a.scripts, tables = _a.tables, variables = _a.variables, systemVariables = _a.systemVariables;
50
- var currentScript = scripts.get((_b = action.scriptKey) !== null && _b !== void 0 ? _b : "");
51
- if (!currentScript) {
52
- return false;
53
- }
54
- var actionInputsMap = new Map(action.parameters.map(function (parameter) { return [parameter.name, parameter]; }));
55
- if (actionInputsMap.size < currentScript.fields.length) {
56
- return false;
57
- }
58
- return currentScript.fields.every(function (_a) {
59
- var name = _a.name, isRequired = _a.isRequired;
60
- var actionInput = actionInputsMap.get(name !== null && name !== void 0 ? name : "");
61
- if (!actionInput) {
62
- return false;
63
- }
64
- if (!isRequired) {
65
- return true;
66
- }
67
- if (actionInput.inputMethod === EWidgetActionInputMethod.VARIABLE &&
68
- !variables.has(actionInput.sourceVariable) &&
69
- !systemVariables.has(actionInput.sourceVariable)) {
70
- return false;
71
- }
72
- if (actionInput.inputMethod === EWidgetActionInputMethod.FORMULA && !actionInput.formula) {
73
- return false;
74
- }
75
- if (actionInput.inputMethod === EWidgetActionInputMethod.DYNAMIC_LIST && !actionInput.options) {
76
- return false;
77
- }
78
- if (actionInput.inputMethod === EWidgetActionInputMethod.COLUMN &&
79
- !tables.has(actionInput.tableName)) {
80
- return false;
81
- }
82
- return true;
83
- });
84
- };
85
43
  var EActionButtonsTypes;
86
44
  (function (EActionButtonsTypes) {
87
45
  EActionButtonsTypes["LINK"] = "link";
@@ -101,10 +59,10 @@ var ESimpleDataType;
101
59
  ESimpleDataType["BOOLEAN"] = "BOOLEAN";
102
60
  })(ESimpleDataType || (ESimpleDataType = {}));
103
61
 
104
- var prepareValuesForSql = function (dataType, values) {
105
- return dataType === ESimpleDataType.INTEGER ||
106
- dataType === ESimpleDataType.FLOAT ||
107
- dataType === ESimpleDataType.BOOLEAN
62
+ var prepareValuesForSql = function (simpleType, values) {
63
+ return simpleType === ESimpleDataType.INTEGER ||
64
+ simpleType === ESimpleDataType.FLOAT ||
65
+ simpleType === ESimpleDataType.BOOLEAN
108
66
  ? values
109
67
  : values.map(function (value) {
110
68
  return value === null ? null : "'".concat(escapeSingularQuotes(escapeReverseSlash(value)), "'");
@@ -217,6 +175,128 @@ var compactMap = function (items, f) {
217
175
  var isNil = function (value) {
218
176
  return value === null || value === undefined;
219
177
  };
178
+ function memoize(fn) {
179
+ var cache = new Map();
180
+ return function (arg) {
181
+ if (cache.has(arg)) {
182
+ return cache.get(arg);
183
+ }
184
+ var result = fn(arg);
185
+ cache.set(arg, result);
186
+ return result;
187
+ };
188
+ }
189
+
190
+ var EClickHouseBaseTypes;
191
+ (function (EClickHouseBaseTypes) {
192
+ // DATE
193
+ EClickHouseBaseTypes["Date"] = "Date";
194
+ EClickHouseBaseTypes["Date32"] = "Date32";
195
+ // DATETIME
196
+ EClickHouseBaseTypes["DateTime"] = "DateTime";
197
+ EClickHouseBaseTypes["DateTime32"] = "DateTime32";
198
+ // DATETIME64
199
+ EClickHouseBaseTypes["DateTime64"] = "DateTime64";
200
+ // STRING
201
+ EClickHouseBaseTypes["FixedString"] = "FixedString";
202
+ EClickHouseBaseTypes["String"] = "String";
203
+ // FLOAT
204
+ EClickHouseBaseTypes["Decimal"] = "Decimal";
205
+ EClickHouseBaseTypes["Decimal32"] = "Decimal32";
206
+ EClickHouseBaseTypes["Decimal64"] = "Decimal64";
207
+ EClickHouseBaseTypes["Decimal128"] = "Decimal128";
208
+ EClickHouseBaseTypes["Decimal256"] = "Decimal256";
209
+ EClickHouseBaseTypes["Float32"] = "Float32";
210
+ EClickHouseBaseTypes["Float64"] = "Float64";
211
+ // INTEGER
212
+ EClickHouseBaseTypes["Int8"] = "Int8";
213
+ EClickHouseBaseTypes["Int16"] = "Int16";
214
+ EClickHouseBaseTypes["Int32"] = "Int32";
215
+ EClickHouseBaseTypes["Int64"] = "Int64";
216
+ EClickHouseBaseTypes["Int128"] = "Int128";
217
+ EClickHouseBaseTypes["Int256"] = "Int256";
218
+ EClickHouseBaseTypes["UInt8"] = "UInt8";
219
+ EClickHouseBaseTypes["UInt16"] = "UInt16";
220
+ EClickHouseBaseTypes["UInt32"] = "UInt32";
221
+ EClickHouseBaseTypes["UInt64"] = "UInt64";
222
+ EClickHouseBaseTypes["UInt128"] = "UInt128";
223
+ EClickHouseBaseTypes["UInt256"] = "UInt256";
224
+ // BOOLEAN
225
+ EClickHouseBaseTypes["Bool"] = "Bool";
226
+ })(EClickHouseBaseTypes || (EClickHouseBaseTypes = {}));
227
+ var stringTypes = ["String", "FixedString"];
228
+ var parseClickHouseType = memoize(function (type) {
229
+ if (isNil(type)) {
230
+ return {
231
+ simpleBaseType: ESimpleDataType.OTHER,
232
+ dbBaseDataType: undefined,
233
+ containers: [],
234
+ simpleType: ESimpleDataType.OTHER,
235
+ };
236
+ }
237
+ var _a = extractInnerType(type), containers = _a.containers, dbBaseDataType = _a.dbBaseDataType;
238
+ if (!dbBaseDataType) {
239
+ throw new Error("Invalid ClickHouse type: ".concat(type));
240
+ }
241
+ return {
242
+ dbBaseDataType: dbBaseDataType,
243
+ simpleBaseType: simplifyBaseType(dbBaseDataType),
244
+ containers: containers,
245
+ get simpleType() {
246
+ return containers.includes("Array") ? ESimpleDataType.OTHER : this.simpleBaseType;
247
+ },
248
+ };
249
+ });
250
+ /** 'A(B(C))' -> ['A', 'B', 'C'] */
251
+ var splitByBrackets = function (input) { return input.split(/[\(\)]/).filter(Boolean); };
252
+ /**
253
+ * Отделить внутренний тип от оберток.
254
+ * Не поддерживаются обертки Tuple и LowCardinality.
255
+ */
256
+ var extractInnerType = function (type) {
257
+ var tokens = splitByBrackets(type);
258
+ // Удаление параметров типа.
259
+ if (tokens.length > 0 && isTypeParameters(tokens.at(-1))) {
260
+ tokens.pop();
261
+ }
262
+ var dbBaseDataType = tokens.pop();
263
+ return { containers: tokens, dbBaseDataType: dbBaseDataType };
264
+ };
265
+ var simplifyBaseType = function (dbBaseType) {
266
+ var isSourceTypeStartsWith = function (prefix) { return dbBaseType.startsWith(prefix); };
267
+ if (isSourceTypeStartsWith("Int") || isSourceTypeStartsWith("UInt")) {
268
+ return ESimpleDataType.INTEGER;
269
+ }
270
+ if (isSourceTypeStartsWith("Decimal") || isSourceTypeStartsWith("Float")) {
271
+ return ESimpleDataType.FLOAT;
272
+ }
273
+ if (stringTypes.some(isSourceTypeStartsWith)) {
274
+ return ESimpleDataType.STRING;
275
+ }
276
+ if (isSourceTypeStartsWith("DateTime64")) {
277
+ return ESimpleDataType.DATETIME64;
278
+ }
279
+ if (isSourceTypeStartsWith("DateTime")) {
280
+ return ESimpleDataType.DATETIME;
281
+ }
282
+ if (isSourceTypeStartsWith("Date")) {
283
+ return ESimpleDataType.DATE;
284
+ }
285
+ if (isSourceTypeStartsWith("Bool")) {
286
+ return ESimpleDataType.BOOLEAN;
287
+ }
288
+ return ESimpleDataType.OTHER;
289
+ };
290
+ /**
291
+ * - `3` -> true
292
+ * - `3, 'Europe/Moscow'` -> true
293
+ * - `3, Europe/Moscow` -> false
294
+ *
295
+ * Пример типа с параметрами: `DateTime64(3, 'Europe/Moscow')`
296
+ */
297
+ var isTypeParameters = function (stringifiedParameters) {
298
+ return stringifiedParameters.split(", ").some(function (p) { return !Number.isNaN(Number(p)) || p.startsWith("'"); });
299
+ };
220
300
 
221
301
  var EFormatTypes;
222
302
  (function (EFormatTypes) {
@@ -351,7 +431,7 @@ var EFormattingPresets;
351
431
  EFormattingPresets["R[-]YY"] = "R[-]YY";
352
432
  })(EFormattingPresets || (EFormattingPresets = {}));
353
433
  var formattingConfig = {
354
- get availableFormatsByDataType() {
434
+ get availableFormatsBySimpleType() {
355
435
  var _a;
356
436
  return _a = {},
357
437
  _a[ESimpleDataType.OTHER] = [EFormatTypes.STRING],
@@ -627,17 +707,17 @@ var mapFormulaFilterToCalculatorInput = function (filterValue) {
627
707
  }
628
708
  if (!isFormulaFilterValue(filterValue)) {
629
709
  return {
630
- dataType: ESimpleDataType.OTHER,
710
+ dbDataType: EClickHouseBaseTypes.Bool,
631
711
  formula: filterValue.formula,
632
712
  values: ["1"],
633
713
  filteringMethod: formulaFilterMethods.EQUAL_TO,
634
714
  };
635
715
  }
636
- var formula = filterValue.formula, filteringMethod = filterValue.filteringMethod, dataType = filterValue.dataType;
716
+ var formula = filterValue.formula, filteringMethod = filterValue.filteringMethod, dbDataType = filterValue.dbDataType;
637
717
  return {
638
718
  formula: formula,
639
719
  filteringMethod: filteringMethod,
640
- dataType: dataType,
720
+ dbDataType: dbDataType,
641
721
  values: getFormulaFilterValues(filterValue),
642
722
  };
643
723
  };
@@ -717,11 +797,6 @@ var EWidgetIndicatorType;
717
797
  EWidgetIndicatorType["DIMENSION"] = "DIMENSION";
718
798
  EWidgetIndicatorType["SORTING"] = "SORTING";
719
799
  })(EWidgetIndicatorType || (EWidgetIndicatorType = {}));
720
- var EDbType;
721
- (function (EDbType) {
722
- EDbType["CH"] = "CH";
723
- EDbType["HADOOP"] = "HADOOP";
724
- })(EDbType || (EDbType = {}));
725
800
  /** Режимы значения показателя (на основе чего генерируется формула) */
726
801
  var EWidgetIndicatorValueModes;
727
802
  (function (EWidgetIndicatorValueModes) {
@@ -743,12 +818,14 @@ var EIndicatorType;
743
818
  (function (EIndicatorType) {
744
819
  /** Показатели процесса */
745
820
  EIndicatorType["PROCESS_MEASURE"] = "PROCESS_MEASURE";
746
- /** Статичное значение */
821
+ /** Вводимое значение */
747
822
  EIndicatorType["STATIC"] = "STATIC";
748
823
  /** Статический список */
749
824
  EIndicatorType["STATIC_LIST"] = "STATIC_LIST";
750
825
  /** Динамический список */
751
826
  EIndicatorType["DYNAMIC_LIST"] = "DYNAMIC_LIST";
827
+ /** Список колонок */
828
+ EIndicatorType["COLUMN_LIST"] = "COLUMN_LIST";
752
829
  /** Разрез */
753
830
  EIndicatorType["DIMENSION"] = "DIMENSION";
754
831
  /** Мера */
@@ -758,6 +835,20 @@ var EIndicatorType;
758
835
  /** Пользовательская сортировка */
759
836
  EIndicatorType["USER_SORTING"] = "USER_SORTING";
760
837
  })(EIndicatorType || (EIndicatorType = {}));
838
+ /** Обобщенные типы значений переменных */
839
+ var ESimpleInputType;
840
+ (function (ESimpleInputType) {
841
+ /** Число (точность Float64) */
842
+ ESimpleInputType["NUMBER"] = "FLOAT";
843
+ /** Целое число (точность Int64) */
844
+ ESimpleInputType["INTEGER_NUMBER"] = "INTEGER";
845
+ /** Текст */
846
+ ESimpleInputType["TEXT"] = "STRING";
847
+ /** Дата (точность Date) */
848
+ ESimpleInputType["DATE"] = "DATE";
849
+ /** Дата и время (точность DateTime64) */
850
+ ESimpleInputType["DATE_AND_TIME"] = "DATETIME";
851
+ })(ESimpleInputType || (ESimpleInputType = {}));
761
852
  function isDimensionsHierarchy(indicator) {
762
853
  return "hierarchyDimensions" in indicator;
763
854
  }
@@ -791,17 +882,18 @@ var dimensionTemplateFormulas = (_a$3 = {},
791
882
  _a$3[EDimensionTemplateNames.hour] = "if(defaultValueOfArgumentType({columnFormula}) = {columnFormula}, 0, toHour({columnFormula}))",
792
883
  _a$3);
793
884
  function getDimensionFormula(_a) {
885
+ var _b;
794
886
  var value = _a.value;
795
887
  if (!value) {
796
888
  return "";
797
889
  }
798
890
  if (value.mode === EWidgetIndicatorValueModes.FORMULA) {
799
- return value.formula;
891
+ return (_b = value.formula) !== null && _b !== void 0 ? _b : "";
800
892
  }
801
893
  if (value.mode === EWidgetIndicatorValueModes.TEMPLATE) {
802
894
  var templateName = value.templateName, tableName = value.tableName, columnName = value.columnName;
803
895
  var templateFormula = dimensionTemplateFormulas[templateName];
804
- if (!templateFormula) {
896
+ if (!templateFormula || !tableName || !columnName) {
805
897
  return "";
806
898
  }
807
899
  return fillTemplateString(templateFormula, {
@@ -832,17 +924,18 @@ var measureTemplateFormulas = (_a$2 = {},
832
924
  _a$2[EMeasureTemplateNames.sum] = "sum({columnFormula})",
833
925
  _a$2);
834
926
  function getMeasureFormula(_a) {
927
+ var _b;
835
928
  var value = _a.value;
836
929
  if (!value) {
837
930
  return "";
838
931
  }
839
932
  if (value.mode === EWidgetIndicatorValueModes.FORMULA) {
840
- return value.formula;
933
+ return (_b = value.formula) !== null && _b !== void 0 ? _b : "";
841
934
  }
842
935
  if (value.mode === EWidgetIndicatorValueModes.TEMPLATE) {
843
936
  var templateName = value.templateName, tableName = value.tableName, columnName = value.columnName;
844
937
  var templateFormula = measureTemplateFormulas[templateName];
845
- if (!templateFormula) {
938
+ if (!templateFormula || !tableName || !columnName) {
846
939
  return "";
847
940
  }
848
941
  return fillTemplateString(templateFormula, {
@@ -948,7 +1041,7 @@ function mapMeasureToInput(measure, variables, addFormulas) {
948
1041
  return {
949
1042
  alias: String(measure.id),
950
1043
  mainFormula: mainFormula,
951
- dataType: measure.dataType,
1044
+ dbDataType: measure.dbDataType,
952
1045
  displayConditionFormula: getDisplayConditionFormula(measure.displayCondition),
953
1046
  additionalFormulas: addFormulas(measure),
954
1047
  };
@@ -969,7 +1062,7 @@ function mapDimensionToInput(dimension, variables) {
969
1062
  return {
970
1063
  alias: String(dimension.id),
971
1064
  formula: formula,
972
- dataType: dimension.dataType,
1065
+ dbDataType: dimension.dbDataType,
973
1066
  hideEmpty: dimension.hideEmptyValues,
974
1067
  displayConditionFormula: getDisplayConditionFormula(dimension.displayCondition),
975
1068
  };
@@ -991,7 +1084,7 @@ function mapTransitionMeasureToInput(indicator, process, variables, addFormulas)
991
1084
  return {
992
1085
  alias: String(indicator.id),
993
1086
  mainFormula: mainFormula,
994
- dataType: indicator.dataType,
1087
+ dbDataType: indicator.dbDataType,
995
1088
  displayConditionFormula: getDisplayConditionFormula(indicator.displayCondition),
996
1089
  additionalFormulas: addFormulas(indicator),
997
1090
  };
@@ -1015,7 +1108,7 @@ function mapEventMeasureToInput(indicator, process, variables, addFormulas) {
1015
1108
  return {
1016
1109
  alias: String(indicator.id),
1017
1110
  mainFormula: mainFormula,
1018
- dataType: indicator.dataType,
1111
+ dbDataType: indicator.dbDataType,
1019
1112
  displayConditionFormula: getDisplayConditionFormula(indicator.displayCondition),
1020
1113
  additionalFormulas: addFormulas(indicator),
1021
1114
  };
@@ -1096,7 +1189,7 @@ var getDefaultSortOrders = function (_a) {
1096
1189
  return [
1097
1190
  {
1098
1191
  formula: getDimensionFormula(timeDimension),
1099
- dataType: timeDimension.dataType,
1192
+ dbDataType: timeDimension.dbDataType,
1100
1193
  direction: ESortDirection.ascend,
1101
1194
  },
1102
1195
  ];
@@ -1108,7 +1201,7 @@ var getDefaultSortOrders = function (_a) {
1108
1201
  {
1109
1202
  direction: ESortDirection.descend,
1110
1203
  formula: getMeasureFormula(firstMeasure),
1111
- dataType: firstMeasure.dataType,
1204
+ dbDataType: firstMeasure.dbDataType,
1112
1205
  },
1113
1206
  ];
1114
1207
  }
@@ -1123,7 +1216,7 @@ function mapSortingToInputs(_a) {
1123
1216
  var direction = _a.direction, value = _a.value;
1124
1217
  if (value.mode === ESortingValueModes.FORMULA) {
1125
1218
  return value.formula
1126
- ? { formula: value.formula, direction: direction, dataType: value.dataType }
1219
+ ? { formula: value.formula, direction: direction, dbDataType: value.dbDataType }
1127
1220
  : undefined;
1128
1221
  }
1129
1222
  var indicatorsGroup = settings[value.group];
@@ -1142,7 +1235,7 @@ function mapSortingToInputs(_a) {
1142
1235
  return {
1143
1236
  formula: formula,
1144
1237
  direction: direction,
1145
- dataType: activeDimensions.dataType,
1238
+ dbDataType: activeDimensions.dbDataType,
1146
1239
  displayCondition: ((_b = indicator.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === EDisplayConditionMode.FORMULA
1147
1240
  ? indicator.displayCondition.formula
1148
1241
  : undefined,
@@ -1151,7 +1244,7 @@ function mapSortingToInputs(_a) {
1151
1244
  return {
1152
1245
  formula: getMeasureFormula(indicator),
1153
1246
  direction: direction,
1154
- dataType: indicator.dataType,
1247
+ dbDataType: indicator.dbDataType,
1155
1248
  };
1156
1249
  });
1157
1250
  return sortOrder;
@@ -1413,4 +1506,4 @@ var getColorByIndex = function (index) {
1413
1506
  return color;
1414
1507
  };
1415
1508
 
1416
- export { EActionButtonsTypes, EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, colors, dashboardLinkRegExp, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isExecuteScriptActionValid, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
1509
+ export { EActionButtonsTypes, EActionTypes, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, colors, dashboardLinkRegExp, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };