fluency-v8-components 1.3.4 → 1.3.6
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/fluency-v8-components.es.js +1 -1
- package/dist/fluency-v8-components.umd.js +31 -31
- package/dist/{index-Dxs_Gn5T.mjs → index-BBxccHNP.mjs} +53 -47
- package/dist/index.css +1 -1
- package/dist/{index.es-YeMpD96e.mjs → index.es-D_XhLSeH.mjs} +1 -1
- package/package.json +3 -2
- package/src/assets/images/ai.svg +1 -0
- package/src/assets/images/github-dark.svg +1 -0
- package/src/assets/images/github.svg +1 -0
- package/src/assets/images/high-priority.svg +1 -0
- package/src/assets/images/power-off.svg +1 -0
- package/src/assets/images/save.svg +1 -0
- package/src/assets/index.ts +15 -0
- package/src/assets/main.css +505 -0
- package/src/assets/prism-theme.css +290 -0
- package/src/components/buttons/ActionButtons.vue +374 -0
- package/src/components/buttons/DropdownButton.vue +104 -0
- package/src/components/buttons/IconButton.vue +63 -0
- package/src/components/buttons/ImageButton.vue +16 -0
- package/src/components/buttons/MenuButton.vue +138 -0
- package/src/components/buttons/SubmitButtons.vue +51 -0
- package/src/components/buttons/TextButton.vue +40 -0
- package/src/components/charts/AlertChart.vue +376 -0
- package/src/components/charts/BarChart.vue +212 -0
- package/src/components/charts/BarChartHorizontal.vue +243 -0
- package/src/components/charts/CronChart.vue +146 -0
- package/src/components/charts/EmptyChart.vue +76 -0
- package/src/components/charts/GradientChart.vue +310 -0
- package/src/components/charts/LineChart.test.js +59 -0
- package/src/components/charts/LineChart.vue +434 -0
- package/src/components/charts/PieChart.vue +293 -0
- package/src/components/charts/ProgressChart.vue +106 -0
- package/src/components/charts/StackedChart.vue +364 -0
- package/src/components/charts/StackedChartClustered.vue +395 -0
- package/src/components/charts/TimelineChart.vue +215 -0
- package/src/components/charts/WorkflowChart.vue +520 -0
- package/src/components/common/AutoCompleteSearchBar.vue +100 -0
- package/src/components/common/AutoRefreshButton.vue +53 -0
- package/src/components/common/Breadcrumb.vue +45 -0
- package/src/components/common/ButtonToggle.vue +24 -0
- package/src/components/common/Card.vue +116 -0
- package/src/components/common/Carousel.vue +66 -0
- package/src/components/common/CategoryCard.vue +28 -0
- package/src/components/common/CodeEditor.vue +59 -0
- package/src/components/common/DatePicker.vue +21 -0
- package/src/components/common/DatePickerInput.vue +109 -0
- package/src/components/common/Dialog.vue +103 -0
- package/src/components/common/EditorHeading.vue +10 -0
- package/src/components/common/EventList.vue +41 -0
- package/src/components/common/Facet.vue +206 -0
- package/src/components/common/Feed.vue +58 -0
- package/src/components/common/Flag.vue +27 -0
- package/src/components/common/HomeCard.vue +20 -0
- package/src/components/common/ItemBox.vue +49 -0
- package/src/components/common/Loading.vue +19 -0
- package/src/components/common/LoadingDots.vue +12 -0
- package/src/components/common/PageHeading.vue +30 -0
- package/src/components/common/Pagination.vue +105 -0
- package/src/components/common/Popover.vue +24 -0
- package/src/components/common/PowerToggle.vue +130 -0
- package/src/components/common/ProgressBar.vue +33 -0
- package/src/components/common/RadioButtons.vue +52 -0
- package/src/components/common/Schedule.vue +79 -0
- package/src/components/common/SearchBar.vue +30 -0
- package/src/components/common/Separator.vue +3 -0
- package/src/components/common/Slideout.vue +95 -0
- package/src/components/common/Sort.vue +83 -0
- package/src/components/common/Table.vue +48 -0
- package/src/components/common/Tabs.vue +129 -0
- package/src/components/common/Tag.vue +53 -0
- package/src/components/common/Tooltip.vue +49 -0
- package/src/components/common/VerticalTabs.vue +34 -0
- package/src/components/common/card/CardItem.vue +27 -0
- package/src/components/common/card/CardItemGroup.vue +45 -0
- package/src/components/common/facet/Leaf.vue +97 -0
- package/src/components/common/facet/TriState.vue +37 -0
- package/src/components/common/table/TableData.vue +48 -0
- package/src/components/common/table/TableHeader.vue +21 -0
- package/src/components/dialogs/ChooseValueDialog.vue +97 -0
- package/src/components/dialogs/ConfirmDialog.vue +73 -0
- package/src/components/dialogs/CopyDialog.vue +51 -0
- package/src/components/dialogs/DownloadDialog.vue +48 -0
- package/src/components/dialogs/NameDescDialog.vue +74 -0
- package/src/components/dialogs/NameDialog.vue +56 -0
- package/src/components/dialogs/PopupEditor.vue +113 -0
- package/src/components/dialogs/ProgressDialog.vue +58 -0
- package/src/components/dialogs/ResetPasswordDialog.vue +58 -0
- package/src/components/dialogs/Wizard.vue +99 -0
- package/src/components/dialogs/wizard/Stepper.vue +31 -0
- package/src/components/form/CheckBox.vue +26 -0
- package/src/components/form/Editor.vue +93 -0
- package/src/components/form/FormCol.vue +19 -0
- package/src/components/form/FormRow.vue +19 -0
- package/src/components/form/FormSection.vue +21 -0
- package/src/components/form/GreyForm.vue +7 -0
- package/src/components/form/GreyInput.vue +51 -0
- package/src/components/form/GreyInputAutocomplete.vue +100 -0
- package/src/components/form/GreyInputCopy.vue +66 -0
- package/src/components/form/GreyInputGrow.vue +42 -0
- package/src/components/form/GreyInputToken.vue +78 -0
- package/src/components/form/GreyPassword.vue +36 -0
- package/src/components/form/GreySelect.vue +154 -0
- package/src/components/form/GreySelectInput.vue +123 -0
- package/src/components/form/GreySelectInputMultiple.vue +218 -0
- package/src/components/form/GreyTel.vue +58 -0
- package/src/components/form/HamburgerItem.vue +95 -0
- package/src/components/form/KeyValueEntry.vue +74 -0
- package/src/components/form/RadioInput.vue +38 -0
- package/src/components/form/UploadFile.vue +99 -0
- package/src/components/icons/AiIcon.vue +6 -0
- package/src/components/icons/GithubIcon.vue +18 -0
- package/src/components/icons/HighPriorityIcon.vue +6 -0
- package/src/components/icons/PowerOffIcon.vue +6 -0
- package/src/components/icons/SaveIcon.vue +6 -0
- package/src/components/index.js +134 -0
- package/src/components/menu/DialogMenu.vue +142 -0
- package/src/components/menu/GrandChild.vue +39 -0
- package/src/components/menu/GridMenu.vue +88 -0
- package/src/components/menu/MenuAvatar.vue +66 -0
- package/src/components/menu/MenuDesktop.vue +90 -0
- package/src/components/notifications/Notify.vue +123 -0
- package/src/components/notifications/NotifyList.vue +130 -0
- package/src/components/page-structure/FacetPage.vue +77 -0
- package/src/components/query/Child.vue +63 -0
- package/src/components/query/LVDBQuery.vue +38 -0
- package/src/components/status/Active.vue +44 -0
- package/src/components/status/ScoreLevel.vue +43 -0
- package/src/components/status/Status.vue +51 -0
- package/src/components/status/TaskDot.vue +25 -0
- package/src/components/status/TaskStatus.vue +26 -0
- package/src/components/status/TicketStatus.vue +201 -0
- package/src/components/status/Trend.vue +20 -0
- package/src/components/tables/ArgumentRunTable.vue +96 -0
- package/src/components/tables/ArgumentTable.vue +67 -0
- package/src/components/tables/CloudFormationParameters.vue +25 -0
- package/src/constants/colors.js +248 -0
- package/src/constants/font-map.js +128 -0
- package/src/constants/fpl2.js +162 -0
- package/src/constants/icon-svg.js +405 -0
- package/src/constants/schedule.js +52 -0
- package/src/fpl/AddPanel.vue +237 -0
- package/src/fpl/Configs/Alert.vue +16 -0
- package/src/fpl/Configs/AlertSprite.vue +2 -0
- package/src/fpl/Configs/Chart.vue +63 -0
- package/src/fpl/Configs/Config.js +154 -0
- package/src/fpl/Configs/Counter.vue +35 -0
- package/src/fpl/Configs/Histogram.vue +70 -0
- package/src/fpl/Configs/IPMap.vue +37 -0
- package/src/fpl/Configs/Image.vue +163 -0
- package/src/fpl/Configs/MetricChart.vue +20 -0
- package/src/fpl/Configs/PieChart.vue +37 -0
- package/src/fpl/Configs/SparkChart.vue +41 -0
- package/src/fpl/Configs/StackedBarChart.vue +49 -0
- package/src/fpl/Configs/Table.vue +211 -0
- package/src/fpl/Configs/Text.vue +14 -0
- package/src/fpl/Configs/TopNChart.vue +37 -0
- package/src/fpl/Outputs/FPLAlert.vue +64 -0
- package/src/fpl/Outputs/FPLStream.vue +41 -0
- package/src/fpl/Outputs/FPLTable.vue +77 -0
- package/src/fpl/Panel.vue +202 -0
- package/src/fpl/Panels/Alert.vue +85 -0
- package/src/fpl/Panels/AlertSprite.vue +9 -0
- package/src/fpl/Panels/Chart.vue +98 -0
- package/src/fpl/Panels/Counter.vue +43 -0
- package/src/fpl/Panels/Histogram.vue +138 -0
- package/src/fpl/Panels/IPMap.vue +48 -0
- package/src/fpl/Panels/Image.vue +35 -0
- package/src/fpl/Panels/MetricChart.vue +97 -0
- package/src/fpl/Panels/PieChart.vue +54 -0
- package/src/fpl/Panels/SparkChart.vue +166 -0
- package/src/fpl/Panels/StackedBarChart.vue +74 -0
- package/src/fpl/Panels/Table.vue +103 -0
- package/src/fpl/Panels/Text.vue +24 -0
- package/src/fpl/Panels/TopNChart.vue +69 -0
- package/src/fpl/index.js +39 -0
- package/src/utils/download.js +220 -0
- package/src/utils/formatOutput.js +156 -0
- package/src/utils/random.js +32 -0
- package/src/utils/timeUtils.js +138 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const letterMapSingle = new Map([
|
|
2
|
+
[" ", 25],
|
|
3
|
+
["!", 33.313],
|
|
4
|
+
["'", 40.828],
|
|
5
|
+
["#", 50],
|
|
6
|
+
["$", 50],
|
|
7
|
+
["%", 83.313],
|
|
8
|
+
["&", 77.797],
|
|
9
|
+
["'", 18.031],
|
|
10
|
+
["(", 33.313],
|
|
11
|
+
[")", 33.313],
|
|
12
|
+
["*", 50],
|
|
13
|
+
["+", 56.406],
|
|
14
|
+
[",", 25],
|
|
15
|
+
["-", 33.313],
|
|
16
|
+
[".", 25],
|
|
17
|
+
["/", 27.797],
|
|
18
|
+
["0", 50],
|
|
19
|
+
["1", 50],
|
|
20
|
+
["2", 50],
|
|
21
|
+
["3", 50],
|
|
22
|
+
["4", 50],
|
|
23
|
+
["5", 50],
|
|
24
|
+
["6", 50],
|
|
25
|
+
["7", 50],
|
|
26
|
+
["8", 50],
|
|
27
|
+
["9", 50],
|
|
28
|
+
[":", 27.797],
|
|
29
|
+
[";", 27.797],
|
|
30
|
+
["<", 56.406],
|
|
31
|
+
["=", 56.406],
|
|
32
|
+
[">", 56.406],
|
|
33
|
+
["?", 44.391],
|
|
34
|
+
["@", 92.094],
|
|
35
|
+
["A", 72.219],
|
|
36
|
+
["B", 66.703],
|
|
37
|
+
["C", 66.703],
|
|
38
|
+
["D", 72.219],
|
|
39
|
+
["E", 61.094],
|
|
40
|
+
["F", 55.625],
|
|
41
|
+
["G", 72.219],
|
|
42
|
+
["H", 72.219],
|
|
43
|
+
["I", 33.313],
|
|
44
|
+
["J", 38.922],
|
|
45
|
+
["K", 72.219],
|
|
46
|
+
["L", 61.094],
|
|
47
|
+
["M", 88.922],
|
|
48
|
+
["N", 72.219],
|
|
49
|
+
["O", 72.219],
|
|
50
|
+
["P", 55.625],
|
|
51
|
+
["Q", 72.219],
|
|
52
|
+
["R", 66.703],
|
|
53
|
+
["S", 55.625],
|
|
54
|
+
["T", 61.094],
|
|
55
|
+
["U", 72.219],
|
|
56
|
+
["V", 72.219],
|
|
57
|
+
["W", 94.391],
|
|
58
|
+
["X", 72.219],
|
|
59
|
+
["Y", 72.219],
|
|
60
|
+
["Z", 61.094],
|
|
61
|
+
["[", 33.313],
|
|
62
|
+
["\\", 27.797],
|
|
63
|
+
["]", 33.313],
|
|
64
|
+
["^", 46.938],
|
|
65
|
+
["_", 50],
|
|
66
|
+
["`", 33.313],
|
|
67
|
+
["a", 44.391],
|
|
68
|
+
["b", 50],
|
|
69
|
+
["c", 44.391],
|
|
70
|
+
["d", 50],
|
|
71
|
+
["e", 44.391],
|
|
72
|
+
["f", 33.313],
|
|
73
|
+
["g", 50],
|
|
74
|
+
["h", 50],
|
|
75
|
+
["i", 27.797],
|
|
76
|
+
["j", 27.797],
|
|
77
|
+
["k", 50],
|
|
78
|
+
["l", 27.797],
|
|
79
|
+
["m", 77.797],
|
|
80
|
+
["n", 50],
|
|
81
|
+
["o", 50],
|
|
82
|
+
["p", 50],
|
|
83
|
+
["q", 50],
|
|
84
|
+
["r", 33.313],
|
|
85
|
+
["s", 38.922],
|
|
86
|
+
["t", 27.797],
|
|
87
|
+
["u", 50],
|
|
88
|
+
["v", 50],
|
|
89
|
+
["w", 72.219],
|
|
90
|
+
["x", 50],
|
|
91
|
+
["y", 50],
|
|
92
|
+
["z", 44.391],
|
|
93
|
+
["{", 48],
|
|
94
|
+
["|", 20.031],
|
|
95
|
+
["}", 48],
|
|
96
|
+
["~", 54.109],
|
|
97
|
+
["_median", 50],
|
|
98
|
+
]);
|
|
99
|
+
// const letterMapKern = new Map([[' A', -5.469], [' T', -1.766], [' V', -1.75], [' W', -1.75], [' Y', -3.656], ['11', -3.656], ['A ', -5.469], ['AT', -11.094], ['AV', -12.891], ['AW', -7.954], ['AY', -9.172], ['Av', -7.375], ['Aw', -9.172], ['Ay', -9.172], ['F,', -7.969], ['F.', -7.969], ['FA', -7.375], ['L ', -3.672], ['LT', -9.188], ['LV', -9.188], ['LW', -7.376], ['LY', -9.969], ['Ly', -5.469], ['P ', -3.672], ['P,', -11.094], ['P.', -11.094], ['PA', -9.188], ['RT', -5.969], ['RV', -7.953], ['RW', -5.469], ['RY', -5.469], ['Ry', -3.953], ['T ', -1.766], ['T,', -7.375], ['T-', -9.188], ['T.', -7.375], ['T:', -5], ['T;', -5.485], ['TA', -7.969], ['TO', -1.766], ['Ta', -6.985], ['Tc', -6.985], ['Te', -6.985], ['Ti', -3.485], ['To', -6.985], ['Tr', -3.485], ['Ts', -6.985], ['Tu', -3.469], ['Tw', -6.985], ['Ty', -6.985], ['V ', -1.75], ['V,', -12.891], ['V-', -9.188], ['V.', -12.891], ['V:', -7.375], ['V;', -7.375], ['VA', -12.891], ['Va', -11.079], ['Ve', -11.079], ['Vi', -5.969], ['Vo', -12.891], ['Vr', -5.969], ['Vu', -5.953], ['Vy', -11.078], ['W ', -1.75], ['W,', -9.172], ['W-', -5.485], ['W.', -9.172], ['W:', -3.672], ['W;', -3.672], ['WA', -11.079], ['Wa', -7.97], ['We', -7.97], ['Wi', -3.969], ['Wo', -7.954], ['Wr', -3.97], ['Wu', -3.954], ['Wy', -5.954], ['Y ', -3.656], ['Y,', -12.891], ['Y-', -11.094], ['Y.', -12.891], ['Y:', -9.188], ['Y;', -9.188], ['YA', -11.079], ['Ya', -9.969], ['Ye', -9.969], ['Yi', -5.485], ['Yo', -9.953], ['Yp', -9.172], ['Yq', -11.078], ['Yu', -11.078], ['Yv', -9.953], ['ff', -1.782], ['fi', -5.485], ['fl', -5.485], ['r,', -3.954], ['r-', -1.97], ['r.', -5.469], ['rg', -1.766], ['v,', -6.484], ['v.', -6.484], ['w,', -6.485], ['w.', -6.485], ['y,', -6.484], ['y.', -6.484]])
|
|
100
|
+
|
|
101
|
+
function adjustText(t, maxWidth) {
|
|
102
|
+
let text = String(t);
|
|
103
|
+
let letterWidth = 0;
|
|
104
|
+
let substring = text;
|
|
105
|
+
const letters = text.split("");
|
|
106
|
+
for (const [key, letter] of letters.entries()) {
|
|
107
|
+
// add on the width of this letter to the sum
|
|
108
|
+
letterWidth +=
|
|
109
|
+
letterMapSingle.get(letter) || letterMapSingle.get("_median");
|
|
110
|
+
if (letterWidth > maxWidth) {
|
|
111
|
+
substring = text.substring(0, key) + "...";
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return substring;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getTextWidth(text) {
|
|
119
|
+
let letterWidth = 0;
|
|
120
|
+
const letters = text ? text.toString().split("") : [];
|
|
121
|
+
for (const letter of letters) {
|
|
122
|
+
letterWidth +=
|
|
123
|
+
letterMapSingle.get(letter) || letterMapSingle.get("_median");
|
|
124
|
+
}
|
|
125
|
+
return letterWidth;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export { letterMapSingle, adjustText, getTextWidth };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import Prism from "prismjs";
|
|
2
|
+
|
|
3
|
+
const builtinfunction =
|
|
4
|
+
/#?(?!\s)\b(?:Add|After|Aggregate|alert|anomaly|append|Append|AWS_AccountRegionLambda|AWS_AccountLambda|AWS_GetCostUsage|AWS_GetMetric|AWS_GetPrice|AWS_LoadAsset|base64Encode|base64Decode|Before|Clone|coalesce|ColumnAggregate|concat|contains|content|Cylance_AddGlobalList|Cylance_GetDevice|Cylance_GetThreatDevices|Cylance_GetThreatDownload|Cylance_GetThreatInfo|Cylance_LoadDevice|Cylance_LoadThreat|decoder_CEF|decoder_CSV|decoder_MixedKeyValue|decoder_QuotedKeyValue|DimensionTable|Each|Emit|endsWith|Error|Find|Filter|Fluency_BehaviorSearch|Fluency_Device_Add|Fluency_Device_Delete|Fluency_DeviceSearch|Fluency_Device_Lookup|Fluency_Device_LookupName|Fluency_Device_Update|Fluency_EntityinfoLookup|Fluency_FusionEvent|fluencyLavadbFpl|Fluency_LavadbQuery|Fluency_LavaLakeFpl|Fluency_ResourceLoad|Fluency_SummarySearch|Fluency_Tenant_Device_Add|Fluency_Tenant_Device_Delete|Fluency_Tenant_Device_Lookup|Fluency_Tenant_Device_LookupName|Fluency_Tenant_Device_Update|Format|geoip|GetColumnValues|GetEnv|GetKeys|GetRow|gzipCompress|gzipDecompress|htmlTemplate|indexOf|isEmpty|IsEmpty|isIPv4|isIPv6|ipNormalize|isNull|isNumber|isString|isUndef|isValidIP|Join|JoinStream|jsonClone|jsonTable|len|Limit|main|Map|match|mergeTable|NewColumns|NewColumnLambda|parseBool|parseFloat|parseInt|parseJson|Platform_Action|Platform_Action_Endpoint|Platform_Asset_Lookup|Platform_Asset_Refresh|Platform_Asset_Register|Platform_Cache_Check|Platform_Cache_Delete|Platform_Cache_DeRegister|Platform_Cache_Get|Platform_Cache_Register|Platform_Cache_Replace|Platform_Cache_Set|Platform_Cache_SetMultiple|Platform_Channel|Platform_DataObject_Delete|Platform_DataObject_Get|Platform_DataObject_Save|Platform_DataObject_Search|Platform_EntityinfoCheck|Platform_EntityinfoLookup|Platform_EntityProvider_Lookup|Platform_EntityProvider_Refresh|Platform_Grok_Add_Pattern|Platform_Grok_Check|Platform_Grok_Parse|Platform_Grok_Register|Platform_LoadComponent|Platform_Metric_Alert_Counter_Stop|Platform_Metric_Counter|Platform_Metric_Query|Platform_Metric_QueryBuild|Platform_Metric_QueryRange|Platform_Metric_Sort|Platform_Metric_Sort_Histogram|Platform_Notification_Email|Platform_Notification_PagerDuty|Platform_Notification_Slack|Platform_Notification_ServiceNow|Platform_PluginLambda|Platform_REST_Call|Platform_Sink|Platform_Site_GetInfo|Platform_Site_GetTenants|Platform_Site_LoadTenantComponent|pluginLambda|Plugin_Bitdefender_LoadEndpoint|Plugin_Falcon_GetHost|Plugin_Falcon_GetIncident|Plugin_Falcon_LoadHost|Plugin_Falcon_LoadIncident|Plugin_InControl_LoadClient|Plugin_InControl_LoadDevice|printf|Prom_Push_Counter|Prom_Push_Gauge|regexp|replace|replaceAll|ReplaceKey|RenameColumn|RemoveColumn|Round|run|RxFPL_GetMetric|setEnv|split|Some|Sort|sprintf|startsWith|SetColumnUnit|SetDimensions|SetTags|SetUnit|sleep|SummaryTable|subString|template|TimeTable|toLower|timezoneOffset|toUpper|transform|trim|trimPrefix|trimSuffix|typeof|Unix|UnixMilli|window)\b(?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/g;
|
|
5
|
+
|
|
6
|
+
const fpl2 = {
|
|
7
|
+
regex: Prism.languages.javascript.regex,
|
|
8
|
+
boolean: /\b(?:false|true)\b/,
|
|
9
|
+
comment: [
|
|
10
|
+
{
|
|
11
|
+
greedy: true,
|
|
12
|
+
lookbehind: true,
|
|
13
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
greedy: true,
|
|
17
|
+
lookbehind: true,
|
|
18
|
+
pattern: /(^|[^\\:])\/\/.*/,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
"class-name": [
|
|
22
|
+
Prism.languages.clike["class-name"],
|
|
23
|
+
{
|
|
24
|
+
lookbehind: true,
|
|
25
|
+
pattern:
|
|
26
|
+
/(^|[^.]|\.\.\.\s*)\b(?:Array|Error|JSON|Math|Object|Table|Time|String)\b/g,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
keyword: [
|
|
30
|
+
{
|
|
31
|
+
lookbehind: true,
|
|
32
|
+
pattern: /((?:^|\})\s*)catch\b/,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
lookbehind: true,
|
|
36
|
+
pattern:
|
|
37
|
+
/(^|[^.]|\.\.\.\s*)\b(?:as|break|case|continue|const|default|delete|do|else|elseif|finally|for|function|if|in|let|new|null|of|range|return|switch|throw|try|typeof|var|while|with|undefined)\b/g,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
builtinfunction: builtinfunction,
|
|
41
|
+
"function-variable": Prism.languages.javascript["function-variable"],
|
|
42
|
+
parameter: Prism.languages.javascript.parameter,
|
|
43
|
+
function:
|
|
44
|
+
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
45
|
+
"literal-property": {
|
|
46
|
+
alias: "property",
|
|
47
|
+
lookbehind: true,
|
|
48
|
+
pattern:
|
|
49
|
+
/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
|
50
|
+
},
|
|
51
|
+
"template-string": {
|
|
52
|
+
pattern:
|
|
53
|
+
/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
54
|
+
inside: {
|
|
55
|
+
interpolation: {
|
|
56
|
+
pattern:
|
|
57
|
+
/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
58
|
+
lookbehind: true,
|
|
59
|
+
inside: {
|
|
60
|
+
"interpolation-punctuation": {
|
|
61
|
+
pattern: /^\$\{|\}$/,
|
|
62
|
+
alias: "punctuation",
|
|
63
|
+
},
|
|
64
|
+
rest: null,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
"template-punctuation": {
|
|
68
|
+
pattern: /^`|`$/,
|
|
69
|
+
alias: "punctuation",
|
|
70
|
+
},
|
|
71
|
+
string: /[\s\S]+/,
|
|
72
|
+
},
|
|
73
|
+
greedy: true,
|
|
74
|
+
},
|
|
75
|
+
"string-property": {
|
|
76
|
+
alias: "property",
|
|
77
|
+
greedy: true,
|
|
78
|
+
lookbehind: true,
|
|
79
|
+
pattern:
|
|
80
|
+
/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
81
|
+
},
|
|
82
|
+
string: {
|
|
83
|
+
greedy: true,
|
|
84
|
+
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
85
|
+
},
|
|
86
|
+
number: {
|
|
87
|
+
pattern:
|
|
88
|
+
/(^|[^\w$])(?:0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?|\d+(?:_\d+)*n|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?)(?![\w$])/,
|
|
89
|
+
lookbehind: true,
|
|
90
|
+
},
|
|
91
|
+
operator:
|
|
92
|
+
/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
|
|
93
|
+
punctuation: /[;,.:()]/,
|
|
94
|
+
curlybraces: /[{}]/,
|
|
95
|
+
brackets: /[[\]]/,
|
|
96
|
+
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const fpl2Traces = {
|
|
100
|
+
errors:
|
|
101
|
+
/\b(?:RangeError|InternalError|ReferenceError|ServiceError|SyntaxError|TypeError)\b/,
|
|
102
|
+
builtinfunction: builtinfunction,
|
|
103
|
+
function:
|
|
104
|
+
/#?(?!\s)\b(?!if|elseif|for|case|catch|return)\b(?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/g,
|
|
105
|
+
"function-variable": {
|
|
106
|
+
alias: "function",
|
|
107
|
+
pattern:
|
|
108
|
+
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
|
|
109
|
+
},
|
|
110
|
+
keyword: [
|
|
111
|
+
{
|
|
112
|
+
lookbehind: true,
|
|
113
|
+
pattern: /((?:^|\})\s*)catch\b/,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
lookbehind: true,
|
|
117
|
+
pattern:
|
|
118
|
+
/(^|[^.]|\.\.\.\s*)\b(?:break|case|continue|else|elseif|finally|for|function|if|let|new|null|range|return|throw|try|undefined|true|false|exception)\b/g,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
timestamp: /(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.[a-zA-Z0-9+:.]+)/g,
|
|
122
|
+
"template-string": {
|
|
123
|
+
pattern:
|
|
124
|
+
/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
125
|
+
inside: {
|
|
126
|
+
interpolation: {
|
|
127
|
+
pattern:
|
|
128
|
+
/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
129
|
+
lookbehind: true,
|
|
130
|
+
inside: {
|
|
131
|
+
"interpolation-punctuation": {
|
|
132
|
+
pattern: /^\$\{|\}$/,
|
|
133
|
+
alias: "punctuation",
|
|
134
|
+
},
|
|
135
|
+
rest: null,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
"template-punctuation": {
|
|
139
|
+
pattern: /^`|`$/,
|
|
140
|
+
alias: "punctuation",
|
|
141
|
+
},
|
|
142
|
+
string: /[\s\S]+/,
|
|
143
|
+
},
|
|
144
|
+
greedy: true,
|
|
145
|
+
},
|
|
146
|
+
"string-property": {
|
|
147
|
+
alias: "property",
|
|
148
|
+
greedy: true,
|
|
149
|
+
lookbehind: true,
|
|
150
|
+
pattern:
|
|
151
|
+
/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
152
|
+
},
|
|
153
|
+
string: {
|
|
154
|
+
greedy: true,
|
|
155
|
+
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
156
|
+
},
|
|
157
|
+
punctuation: /[{}[\];(),.:]/,
|
|
158
|
+
number:
|
|
159
|
+
/(^|[^\w$])(?:0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?|\d+(?:_\d+)*n|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?)(?![\w$])/,
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export { fpl2, fpl2Traces };
|