@prokodo/ui 0.0.52 → 0.0.54
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/README.md +81 -81
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/common.js +7 -0
- package/dist/components/accordion/Accordion.client.js +3 -1
- package/dist/components/accordion/Accordion.view.js +100 -81
- package/dist/components/animated/Animated.server.js +3 -1
- package/dist/components/animatedText/AnimatedText.client.js +1 -7
- package/dist/components/animatedText/AnimatedText.view.js +4 -1
- package/dist/components/avatar/Avatar.view.js +2 -2
- package/dist/components/base-link/BaseLink.view.js +1 -1
- package/dist/components/button/Button.server.js +1 -8
- package/dist/components/calendly/Calendly.client.js +63 -54
- package/dist/components/calendly/Calendly.server.js +3 -1
- package/dist/components/card/Card.client.js +2 -1
- package/dist/components/card/Card.effects.client.js +5 -1
- package/dist/components/card/Card.view.js +19 -2
- package/dist/components/carousel/Carousel.client.js +36 -12
- package/dist/components/chip/Chip.view.js +10 -6
- package/dist/components/datePicker/DatePicker.client.js +53 -37
- package/dist/components/datePicker/DatePicker.view.js +3 -1
- package/dist/components/dialog/Dialog.client.js +22 -14
- package/dist/components/dialog/Dialog.view.js +10 -2
- package/dist/components/drawer/Drawer.client.js +10 -2
- package/dist/components/drawer/Drawer.effects.client.js +7 -2
- package/dist/components/dynamic-list/DynamicList.client.js +8 -7
- package/dist/components/dynamic-list/DynamicList.server.js +10 -4
- package/dist/components/dynamic-list/DynamicList.view.js +1 -1
- package/dist/components/form/Form.client.js +16 -13
- package/dist/components/form/Form.view.js +8 -4
- package/dist/components/form/FormField.client.js +5 -5
- package/dist/components/form/FormField.server.js +3 -23
- package/dist/components/form/FormResponse.js +5 -1
- package/dist/components/grid/Grid.js +7 -2
- package/dist/components/grid/GridRow.js +12 -2
- package/dist/components/headline/Headline.js +3 -1
- package/dist/components/icon/Icon.js +8 -4
- package/dist/components/image-text/ImageText.js +5 -1
- package/dist/components/input/Input.client.js +52 -28
- package/dist/components/input/Input.view.js +92 -68
- package/dist/components/inputOTP/InputOTP.js +107 -90
- package/dist/components/label/Label.js +1 -8
- package/dist/components/link/Link.view.js +3 -1
- package/dist/components/list/List.js +94 -42
- package/dist/components/loading/Loading.client.js +15 -2
- package/dist/components/loading/Loading.server.js +8 -1
- package/dist/components/loading/Loading.view.js +30 -7
- package/dist/components/post-item/PostItem.client.js +17 -0
- package/dist/components/post-item/PostItem.js +7 -136
- package/dist/components/post-item/PostItem.lazy.js +14 -0
- package/dist/components/post-item/PostItem.module.scss.js +3 -1
- package/dist/components/post-item/PostItem.server.js +14 -0
- package/dist/components/post-item/PostItem.view.js +238 -0
- package/dist/components/post-item/PostItemAuthor.js +28 -22
- package/dist/components/post-teaser/PostTeaser.client.js +30 -0
- package/dist/components/post-teaser/PostTeaser.js +9 -169
- package/dist/components/post-teaser/PostTeaser.lazy.js +13 -0
- package/dist/components/post-teaser/PostTeaser.module.scss.js +3 -0
- package/dist/components/post-teaser/PostTeaser.server.js +22 -0
- package/dist/components/post-teaser/PostTeaser.view.js +252 -0
- package/dist/components/post-widget/PostWidget.client.js +9 -0
- package/dist/components/post-widget/PostWidget.js +11 -156
- package/dist/components/post-widget/PostWidget.lazy.js +13 -0
- package/dist/components/post-widget/PostWidget.module.scss.js +1 -0
- package/dist/components/post-widget/PostWidget.server.js +11 -0
- package/dist/components/post-widget/PostWidget.view.js +263 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.client.js +9 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.js +9 -160
- package/dist/components/post-widget-carousel/PostWidgetCarousel.lazy.js +13 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +3 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.server.js +11 -0
- package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +244 -0
- package/dist/components/rich-text/RichText.client.js +182 -12
- package/dist/components/rich-text/RichText.module.scss.js +1 -1
- package/dist/components/select/Select.view.js +132 -116
- package/dist/components/sidenav/SideNav.client.js +19 -18
- package/dist/components/sidenav/SideNav.server.js +8 -1
- package/dist/components/sidenav/SideNav.view.js +21 -3
- package/dist/components/skeleton/Skeleton.effects.client.js +3 -1
- package/dist/components/slider/Slider.client.js +56 -38
- package/dist/components/slider/Slider.view.js +1 -7
- package/dist/components/snackbar/SnackbarProvider.client.js +21 -22
- package/dist/components/stepper/Stepper.client.js +1 -8
- package/dist/components/switch/Switch.client.js +1 -6
- package/dist/components/switch/Switch.server.js +1 -3
- package/dist/components/table/Table.js +3 -1
- package/dist/components/table/TableCell.js +13 -1
- package/dist/components/teaser/Teaser.js +1 -5
- package/dist/constants/project.js +1 -1
- package/dist/helpers/createIsland.js +3 -1
- package/dist/helpers/createLazyWrapper.js +3 -1
- package/dist/helpers/date.js +21 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/common.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/common.js +90 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1629 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/bash.js +407 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/c.js +307 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/cpp.js +556 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/csharp.js +413 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/css.js +950 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/diff.js +66 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/go.js +167 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/graphql.js +83 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ini.js +129 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/java.js +268 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/javascript.js +715 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/json.js +53 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/kotlin.js +268 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/less.js +1031 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/lua.js +74 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/makefile.js +84 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/markdown.js +245 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/objectivec.js +256 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/perl.js +498 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php-template.js +59 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php.js +614 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/plaintext.js +25 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python-repl.js +38 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python.js +428 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/r.js +223 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ruby.js +426 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/rust.js +326 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/scss.js +935 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/shell.js +37 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.js +658 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/swift.js +893 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/typescript.js +829 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/vbnet.js +146 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.js +134 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.js +239 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.js +214 -0
- package/dist/node_modules/.pnpm/marked-highlight@2.2.2_marked@15.0.12/node_modules/marked-highlight/src/index.js +93 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/accordion/Accordion.model.d.ts +1 -1
- package/dist/types/components/animated/Animated.client.d.ts +2 -2
- package/dist/types/components/animated/Animated.model.d.ts +1 -1
- package/dist/types/components/button/Button.client.d.ts +1 -1
- package/dist/types/components/button/Button.d.ts +1 -1
- package/dist/types/components/button/Button.lazy.d.ts +1 -1
- package/dist/types/components/button/Button.server.d.ts +1 -1
- package/dist/types/components/button/Button.view.d.ts +1 -1
- package/dist/types/components/card/Card.effects.client.d.ts +1 -1
- package/dist/types/components/card/index.d.ts +1 -1
- package/dist/types/components/carousel/Carousel.d.ts +3 -0
- package/dist/types/components/carousel/Carousel.lazy.d.ts +3 -0
- package/dist/types/components/carousel/Carousel.model.d.ts +4 -0
- package/dist/types/components/dialog/Dialog.client.d.ts +1 -1
- package/dist/types/components/dialog/Dialog.model.d.ts +4 -4
- package/dist/types/components/dialog/Dialog.view.d.ts +2 -2
- package/dist/types/components/drawer/Drawer.client.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.effects.client.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.lazy.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.model.d.ts +6 -6
- package/dist/types/components/drawer/Drawer.server.d.ts +1 -1
- package/dist/types/components/drawer/Drawer.view.d.ts +2 -2
- package/dist/types/components/drawer/index.d.ts +1 -1
- package/dist/types/components/icon/IconList.d.ts +1 -1
- package/dist/types/components/icon/index.d.ts +1 -1
- package/dist/types/components/image/Image.model.d.ts +2 -2
- package/dist/types/components/link/Link.d.ts +1 -1
- package/dist/types/components/link/Link.model.d.ts +1 -1
- package/dist/types/components/link/Link.server.d.ts +1 -1
- package/dist/types/components/loading/index.d.ts +1 -1
- package/dist/types/components/post-item/PostItem.client.d.ts +4 -0
- package/dist/types/components/post-item/PostItem.d.ts +3 -2
- package/dist/types/components/post-item/PostItem.lazy.d.ts +5 -0
- package/dist/types/components/post-item/PostItem.model.d.ts +46 -6
- package/dist/types/components/post-item/PostItem.server.d.ts +3 -0
- package/dist/types/components/post-item/PostItem.view.d.ts +3 -0
- package/dist/types/components/post-item/PostItemAuthor.model.d.ts +5 -8
- package/dist/types/components/post-item/index.d.ts +2 -2
- package/dist/types/components/post-teaser/PostTeaser.client.d.ts +4 -0
- package/dist/types/components/post-teaser/PostTeaser.d.ts +3 -2
- package/dist/types/components/post-teaser/PostTeaser.lazy.d.ts +5 -0
- package/dist/types/components/post-teaser/PostTeaser.model.d.ts +49 -3
- package/dist/types/components/post-teaser/PostTeaser.server.d.ts +3 -0
- package/dist/types/components/post-teaser/PostTeaser.view.d.ts +3 -0
- package/dist/types/components/post-teaser/index.d.ts +1 -1
- package/dist/types/components/post-widget/PostWidget.client.d.ts +4 -0
- package/dist/types/components/post-widget/PostWidget.d.ts +13 -3
- package/dist/types/components/post-widget/PostWidget.lazy.d.ts +14 -0
- package/dist/types/components/post-widget/PostWidget.model.d.ts +53 -3
- package/dist/types/components/post-widget/PostWidget.server.d.ts +3 -0
- package/dist/types/components/post-widget/PostWidget.view.d.ts +3 -0
- package/dist/types/components/post-widget/index.d.ts +1 -1
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.client.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.d.ts +11 -3
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.lazy.d.ts +12 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.model.d.ts +39 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.server.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/PostWidgetCarousel.view.d.ts +3 -0
- package/dist/types/components/post-widget-carousel/index.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.client.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.d.ts +5 -0
- package/dist/types/components/rich-text/RichText.lazy.d.ts +5 -0
- package/dist/types/components/rich-text/RichText.model.d.ts +5 -0
- package/dist/types/components/sidenav/index.d.ts +1 -1
- package/dist/types/components/skeleton/Skeleton.effects.client.d.ts +2 -2
- package/dist/types/helpers/createIsland.d.ts +1 -1
- package/dist/types/helpers/createLazyWrapper.d.ts +1 -1
- package/dist/types/helpers/date.d.ts +5 -0
- package/dist/ui.css +154 -65
- package/package.json +5 -2
- package/dist/helpers/calculation.js +0 -6
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
var shell_1;
|
|
4
|
+
var hasRequiredShell;
|
|
5
|
+
function requireShell() {
|
|
6
|
+
if (hasRequiredShell) return shell_1;
|
|
7
|
+
hasRequiredShell = 1;
|
|
8
|
+
function shell(hljs) {
|
|
9
|
+
return {
|
|
10
|
+
name: "Shell Session",
|
|
11
|
+
aliases: [
|
|
12
|
+
"console",
|
|
13
|
+
"shellsession"
|
|
14
|
+
],
|
|
15
|
+
contains: [
|
|
16
|
+
{
|
|
17
|
+
className: "meta.prompt",
|
|
18
|
+
// We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result.
|
|
19
|
+
// For instance, in the following example, it would match "echo /path/to/home >" as a prompt:
|
|
20
|
+
// echo /path/to/home > t.exe
|
|
21
|
+
begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,
|
|
22
|
+
starts: {
|
|
23
|
+
end: /[^\\](?=\s*$)/,
|
|
24
|
+
subLanguage: "bash"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
__name(shell, "shell");
|
|
31
|
+
shell_1 = shell;
|
|
32
|
+
return shell_1;
|
|
33
|
+
}
|
|
34
|
+
__name(requireShell, "requireShell");
|
|
35
|
+
export {
|
|
36
|
+
requireShell as __require
|
|
37
|
+
};
|
package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.js
ADDED
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
var sql_1;
|
|
4
|
+
var hasRequiredSql;
|
|
5
|
+
function requireSql() {
|
|
6
|
+
if (hasRequiredSql) return sql_1;
|
|
7
|
+
hasRequiredSql = 1;
|
|
8
|
+
function sql(hljs) {
|
|
9
|
+
const regex = hljs.regex;
|
|
10
|
+
const COMMENT_MODE = hljs.COMMENT("--", "$");
|
|
11
|
+
const STRING = {
|
|
12
|
+
scope: "string",
|
|
13
|
+
variants: [
|
|
14
|
+
{
|
|
15
|
+
begin: /'/,
|
|
16
|
+
end: /'/,
|
|
17
|
+
contains: [{ match: /''/ }]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
const QUOTED_IDENTIFIER = {
|
|
22
|
+
begin: /"/,
|
|
23
|
+
end: /"/,
|
|
24
|
+
contains: [{ match: /""/ }]
|
|
25
|
+
};
|
|
26
|
+
const LITERALS = [
|
|
27
|
+
"true",
|
|
28
|
+
"false",
|
|
29
|
+
// Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
|
|
30
|
+
// "null",
|
|
31
|
+
"unknown"
|
|
32
|
+
];
|
|
33
|
+
const MULTI_WORD_TYPES = [
|
|
34
|
+
"double precision",
|
|
35
|
+
"large object",
|
|
36
|
+
"with timezone",
|
|
37
|
+
"without timezone"
|
|
38
|
+
];
|
|
39
|
+
const TYPES = [
|
|
40
|
+
"bigint",
|
|
41
|
+
"binary",
|
|
42
|
+
"blob",
|
|
43
|
+
"boolean",
|
|
44
|
+
"char",
|
|
45
|
+
"character",
|
|
46
|
+
"clob",
|
|
47
|
+
"date",
|
|
48
|
+
"dec",
|
|
49
|
+
"decfloat",
|
|
50
|
+
"decimal",
|
|
51
|
+
"float",
|
|
52
|
+
"int",
|
|
53
|
+
"integer",
|
|
54
|
+
"interval",
|
|
55
|
+
"nchar",
|
|
56
|
+
"nclob",
|
|
57
|
+
"national",
|
|
58
|
+
"numeric",
|
|
59
|
+
"real",
|
|
60
|
+
"row",
|
|
61
|
+
"smallint",
|
|
62
|
+
"time",
|
|
63
|
+
"timestamp",
|
|
64
|
+
"varchar",
|
|
65
|
+
"varying",
|
|
66
|
+
// modifier (character varying)
|
|
67
|
+
"varbinary"
|
|
68
|
+
];
|
|
69
|
+
const NON_RESERVED_WORDS = [
|
|
70
|
+
"add",
|
|
71
|
+
"asc",
|
|
72
|
+
"collation",
|
|
73
|
+
"desc",
|
|
74
|
+
"final",
|
|
75
|
+
"first",
|
|
76
|
+
"last",
|
|
77
|
+
"view"
|
|
78
|
+
];
|
|
79
|
+
const RESERVED_WORDS = [
|
|
80
|
+
"abs",
|
|
81
|
+
"acos",
|
|
82
|
+
"all",
|
|
83
|
+
"allocate",
|
|
84
|
+
"alter",
|
|
85
|
+
"and",
|
|
86
|
+
"any",
|
|
87
|
+
"are",
|
|
88
|
+
"array",
|
|
89
|
+
"array_agg",
|
|
90
|
+
"array_max_cardinality",
|
|
91
|
+
"as",
|
|
92
|
+
"asensitive",
|
|
93
|
+
"asin",
|
|
94
|
+
"asymmetric",
|
|
95
|
+
"at",
|
|
96
|
+
"atan",
|
|
97
|
+
"atomic",
|
|
98
|
+
"authorization",
|
|
99
|
+
"avg",
|
|
100
|
+
"begin",
|
|
101
|
+
"begin_frame",
|
|
102
|
+
"begin_partition",
|
|
103
|
+
"between",
|
|
104
|
+
"bigint",
|
|
105
|
+
"binary",
|
|
106
|
+
"blob",
|
|
107
|
+
"boolean",
|
|
108
|
+
"both",
|
|
109
|
+
"by",
|
|
110
|
+
"call",
|
|
111
|
+
"called",
|
|
112
|
+
"cardinality",
|
|
113
|
+
"cascaded",
|
|
114
|
+
"case",
|
|
115
|
+
"cast",
|
|
116
|
+
"ceil",
|
|
117
|
+
"ceiling",
|
|
118
|
+
"char",
|
|
119
|
+
"char_length",
|
|
120
|
+
"character",
|
|
121
|
+
"character_length",
|
|
122
|
+
"check",
|
|
123
|
+
"classifier",
|
|
124
|
+
"clob",
|
|
125
|
+
"close",
|
|
126
|
+
"coalesce",
|
|
127
|
+
"collate",
|
|
128
|
+
"collect",
|
|
129
|
+
"column",
|
|
130
|
+
"commit",
|
|
131
|
+
"condition",
|
|
132
|
+
"connect",
|
|
133
|
+
"constraint",
|
|
134
|
+
"contains",
|
|
135
|
+
"convert",
|
|
136
|
+
"copy",
|
|
137
|
+
"corr",
|
|
138
|
+
"corresponding",
|
|
139
|
+
"cos",
|
|
140
|
+
"cosh",
|
|
141
|
+
"count",
|
|
142
|
+
"covar_pop",
|
|
143
|
+
"covar_samp",
|
|
144
|
+
"create",
|
|
145
|
+
"cross",
|
|
146
|
+
"cube",
|
|
147
|
+
"cume_dist",
|
|
148
|
+
"current",
|
|
149
|
+
"current_catalog",
|
|
150
|
+
"current_date",
|
|
151
|
+
"current_default_transform_group",
|
|
152
|
+
"current_path",
|
|
153
|
+
"current_role",
|
|
154
|
+
"current_row",
|
|
155
|
+
"current_schema",
|
|
156
|
+
"current_time",
|
|
157
|
+
"current_timestamp",
|
|
158
|
+
"current_path",
|
|
159
|
+
"current_role",
|
|
160
|
+
"current_transform_group_for_type",
|
|
161
|
+
"current_user",
|
|
162
|
+
"cursor",
|
|
163
|
+
"cycle",
|
|
164
|
+
"date",
|
|
165
|
+
"day",
|
|
166
|
+
"deallocate",
|
|
167
|
+
"dec",
|
|
168
|
+
"decimal",
|
|
169
|
+
"decfloat",
|
|
170
|
+
"declare",
|
|
171
|
+
"default",
|
|
172
|
+
"define",
|
|
173
|
+
"delete",
|
|
174
|
+
"dense_rank",
|
|
175
|
+
"deref",
|
|
176
|
+
"describe",
|
|
177
|
+
"deterministic",
|
|
178
|
+
"disconnect",
|
|
179
|
+
"distinct",
|
|
180
|
+
"double",
|
|
181
|
+
"drop",
|
|
182
|
+
"dynamic",
|
|
183
|
+
"each",
|
|
184
|
+
"element",
|
|
185
|
+
"else",
|
|
186
|
+
"empty",
|
|
187
|
+
"end",
|
|
188
|
+
"end_frame",
|
|
189
|
+
"end_partition",
|
|
190
|
+
"end-exec",
|
|
191
|
+
"equals",
|
|
192
|
+
"escape",
|
|
193
|
+
"every",
|
|
194
|
+
"except",
|
|
195
|
+
"exec",
|
|
196
|
+
"execute",
|
|
197
|
+
"exists",
|
|
198
|
+
"exp",
|
|
199
|
+
"external",
|
|
200
|
+
"extract",
|
|
201
|
+
"false",
|
|
202
|
+
"fetch",
|
|
203
|
+
"filter",
|
|
204
|
+
"first_value",
|
|
205
|
+
"float",
|
|
206
|
+
"floor",
|
|
207
|
+
"for",
|
|
208
|
+
"foreign",
|
|
209
|
+
"frame_row",
|
|
210
|
+
"free",
|
|
211
|
+
"from",
|
|
212
|
+
"full",
|
|
213
|
+
"function",
|
|
214
|
+
"fusion",
|
|
215
|
+
"get",
|
|
216
|
+
"global",
|
|
217
|
+
"grant",
|
|
218
|
+
"group",
|
|
219
|
+
"grouping",
|
|
220
|
+
"groups",
|
|
221
|
+
"having",
|
|
222
|
+
"hold",
|
|
223
|
+
"hour",
|
|
224
|
+
"identity",
|
|
225
|
+
"in",
|
|
226
|
+
"indicator",
|
|
227
|
+
"initial",
|
|
228
|
+
"inner",
|
|
229
|
+
"inout",
|
|
230
|
+
"insensitive",
|
|
231
|
+
"insert",
|
|
232
|
+
"int",
|
|
233
|
+
"integer",
|
|
234
|
+
"intersect",
|
|
235
|
+
"intersection",
|
|
236
|
+
"interval",
|
|
237
|
+
"into",
|
|
238
|
+
"is",
|
|
239
|
+
"join",
|
|
240
|
+
"json_array",
|
|
241
|
+
"json_arrayagg",
|
|
242
|
+
"json_exists",
|
|
243
|
+
"json_object",
|
|
244
|
+
"json_objectagg",
|
|
245
|
+
"json_query",
|
|
246
|
+
"json_table",
|
|
247
|
+
"json_table_primitive",
|
|
248
|
+
"json_value",
|
|
249
|
+
"lag",
|
|
250
|
+
"language",
|
|
251
|
+
"large",
|
|
252
|
+
"last_value",
|
|
253
|
+
"lateral",
|
|
254
|
+
"lead",
|
|
255
|
+
"leading",
|
|
256
|
+
"left",
|
|
257
|
+
"like",
|
|
258
|
+
"like_regex",
|
|
259
|
+
"listagg",
|
|
260
|
+
"ln",
|
|
261
|
+
"local",
|
|
262
|
+
"localtime",
|
|
263
|
+
"localtimestamp",
|
|
264
|
+
"log",
|
|
265
|
+
"log10",
|
|
266
|
+
"lower",
|
|
267
|
+
"match",
|
|
268
|
+
"match_number",
|
|
269
|
+
"match_recognize",
|
|
270
|
+
"matches",
|
|
271
|
+
"max",
|
|
272
|
+
"member",
|
|
273
|
+
"merge",
|
|
274
|
+
"method",
|
|
275
|
+
"min",
|
|
276
|
+
"minute",
|
|
277
|
+
"mod",
|
|
278
|
+
"modifies",
|
|
279
|
+
"module",
|
|
280
|
+
"month",
|
|
281
|
+
"multiset",
|
|
282
|
+
"national",
|
|
283
|
+
"natural",
|
|
284
|
+
"nchar",
|
|
285
|
+
"nclob",
|
|
286
|
+
"new",
|
|
287
|
+
"no",
|
|
288
|
+
"none",
|
|
289
|
+
"normalize",
|
|
290
|
+
"not",
|
|
291
|
+
"nth_value",
|
|
292
|
+
"ntile",
|
|
293
|
+
"null",
|
|
294
|
+
"nullif",
|
|
295
|
+
"numeric",
|
|
296
|
+
"octet_length",
|
|
297
|
+
"occurrences_regex",
|
|
298
|
+
"of",
|
|
299
|
+
"offset",
|
|
300
|
+
"old",
|
|
301
|
+
"omit",
|
|
302
|
+
"on",
|
|
303
|
+
"one",
|
|
304
|
+
"only",
|
|
305
|
+
"open",
|
|
306
|
+
"or",
|
|
307
|
+
"order",
|
|
308
|
+
"out",
|
|
309
|
+
"outer",
|
|
310
|
+
"over",
|
|
311
|
+
"overlaps",
|
|
312
|
+
"overlay",
|
|
313
|
+
"parameter",
|
|
314
|
+
"partition",
|
|
315
|
+
"pattern",
|
|
316
|
+
"per",
|
|
317
|
+
"percent",
|
|
318
|
+
"percent_rank",
|
|
319
|
+
"percentile_cont",
|
|
320
|
+
"percentile_disc",
|
|
321
|
+
"period",
|
|
322
|
+
"portion",
|
|
323
|
+
"position",
|
|
324
|
+
"position_regex",
|
|
325
|
+
"power",
|
|
326
|
+
"precedes",
|
|
327
|
+
"precision",
|
|
328
|
+
"prepare",
|
|
329
|
+
"primary",
|
|
330
|
+
"procedure",
|
|
331
|
+
"ptf",
|
|
332
|
+
"range",
|
|
333
|
+
"rank",
|
|
334
|
+
"reads",
|
|
335
|
+
"real",
|
|
336
|
+
"recursive",
|
|
337
|
+
"ref",
|
|
338
|
+
"references",
|
|
339
|
+
"referencing",
|
|
340
|
+
"regr_avgx",
|
|
341
|
+
"regr_avgy",
|
|
342
|
+
"regr_count",
|
|
343
|
+
"regr_intercept",
|
|
344
|
+
"regr_r2",
|
|
345
|
+
"regr_slope",
|
|
346
|
+
"regr_sxx",
|
|
347
|
+
"regr_sxy",
|
|
348
|
+
"regr_syy",
|
|
349
|
+
"release",
|
|
350
|
+
"result",
|
|
351
|
+
"return",
|
|
352
|
+
"returns",
|
|
353
|
+
"revoke",
|
|
354
|
+
"right",
|
|
355
|
+
"rollback",
|
|
356
|
+
"rollup",
|
|
357
|
+
"row",
|
|
358
|
+
"row_number",
|
|
359
|
+
"rows",
|
|
360
|
+
"running",
|
|
361
|
+
"savepoint",
|
|
362
|
+
"scope",
|
|
363
|
+
"scroll",
|
|
364
|
+
"search",
|
|
365
|
+
"second",
|
|
366
|
+
"seek",
|
|
367
|
+
"select",
|
|
368
|
+
"sensitive",
|
|
369
|
+
"session_user",
|
|
370
|
+
"set",
|
|
371
|
+
"show",
|
|
372
|
+
"similar",
|
|
373
|
+
"sin",
|
|
374
|
+
"sinh",
|
|
375
|
+
"skip",
|
|
376
|
+
"smallint",
|
|
377
|
+
"some",
|
|
378
|
+
"specific",
|
|
379
|
+
"specifictype",
|
|
380
|
+
"sql",
|
|
381
|
+
"sqlexception",
|
|
382
|
+
"sqlstate",
|
|
383
|
+
"sqlwarning",
|
|
384
|
+
"sqrt",
|
|
385
|
+
"start",
|
|
386
|
+
"static",
|
|
387
|
+
"stddev_pop",
|
|
388
|
+
"stddev_samp",
|
|
389
|
+
"submultiset",
|
|
390
|
+
"subset",
|
|
391
|
+
"substring",
|
|
392
|
+
"substring_regex",
|
|
393
|
+
"succeeds",
|
|
394
|
+
"sum",
|
|
395
|
+
"symmetric",
|
|
396
|
+
"system",
|
|
397
|
+
"system_time",
|
|
398
|
+
"system_user",
|
|
399
|
+
"table",
|
|
400
|
+
"tablesample",
|
|
401
|
+
"tan",
|
|
402
|
+
"tanh",
|
|
403
|
+
"then",
|
|
404
|
+
"time",
|
|
405
|
+
"timestamp",
|
|
406
|
+
"timezone_hour",
|
|
407
|
+
"timezone_minute",
|
|
408
|
+
"to",
|
|
409
|
+
"trailing",
|
|
410
|
+
"translate",
|
|
411
|
+
"translate_regex",
|
|
412
|
+
"translation",
|
|
413
|
+
"treat",
|
|
414
|
+
"trigger",
|
|
415
|
+
"trim",
|
|
416
|
+
"trim_array",
|
|
417
|
+
"true",
|
|
418
|
+
"truncate",
|
|
419
|
+
"uescape",
|
|
420
|
+
"union",
|
|
421
|
+
"unique",
|
|
422
|
+
"unknown",
|
|
423
|
+
"unnest",
|
|
424
|
+
"update",
|
|
425
|
+
"upper",
|
|
426
|
+
"user",
|
|
427
|
+
"using",
|
|
428
|
+
"value",
|
|
429
|
+
"values",
|
|
430
|
+
"value_of",
|
|
431
|
+
"var_pop",
|
|
432
|
+
"var_samp",
|
|
433
|
+
"varbinary",
|
|
434
|
+
"varchar",
|
|
435
|
+
"varying",
|
|
436
|
+
"versioning",
|
|
437
|
+
"when",
|
|
438
|
+
"whenever",
|
|
439
|
+
"where",
|
|
440
|
+
"width_bucket",
|
|
441
|
+
"window",
|
|
442
|
+
"with",
|
|
443
|
+
"within",
|
|
444
|
+
"without",
|
|
445
|
+
"year"
|
|
446
|
+
];
|
|
447
|
+
const RESERVED_FUNCTIONS = [
|
|
448
|
+
"abs",
|
|
449
|
+
"acos",
|
|
450
|
+
"array_agg",
|
|
451
|
+
"asin",
|
|
452
|
+
"atan",
|
|
453
|
+
"avg",
|
|
454
|
+
"cast",
|
|
455
|
+
"ceil",
|
|
456
|
+
"ceiling",
|
|
457
|
+
"coalesce",
|
|
458
|
+
"corr",
|
|
459
|
+
"cos",
|
|
460
|
+
"cosh",
|
|
461
|
+
"count",
|
|
462
|
+
"covar_pop",
|
|
463
|
+
"covar_samp",
|
|
464
|
+
"cume_dist",
|
|
465
|
+
"dense_rank",
|
|
466
|
+
"deref",
|
|
467
|
+
"element",
|
|
468
|
+
"exp",
|
|
469
|
+
"extract",
|
|
470
|
+
"first_value",
|
|
471
|
+
"floor",
|
|
472
|
+
"json_array",
|
|
473
|
+
"json_arrayagg",
|
|
474
|
+
"json_exists",
|
|
475
|
+
"json_object",
|
|
476
|
+
"json_objectagg",
|
|
477
|
+
"json_query",
|
|
478
|
+
"json_table",
|
|
479
|
+
"json_table_primitive",
|
|
480
|
+
"json_value",
|
|
481
|
+
"lag",
|
|
482
|
+
"last_value",
|
|
483
|
+
"lead",
|
|
484
|
+
"listagg",
|
|
485
|
+
"ln",
|
|
486
|
+
"log",
|
|
487
|
+
"log10",
|
|
488
|
+
"lower",
|
|
489
|
+
"max",
|
|
490
|
+
"min",
|
|
491
|
+
"mod",
|
|
492
|
+
"nth_value",
|
|
493
|
+
"ntile",
|
|
494
|
+
"nullif",
|
|
495
|
+
"percent_rank",
|
|
496
|
+
"percentile_cont",
|
|
497
|
+
"percentile_disc",
|
|
498
|
+
"position",
|
|
499
|
+
"position_regex",
|
|
500
|
+
"power",
|
|
501
|
+
"rank",
|
|
502
|
+
"regr_avgx",
|
|
503
|
+
"regr_avgy",
|
|
504
|
+
"regr_count",
|
|
505
|
+
"regr_intercept",
|
|
506
|
+
"regr_r2",
|
|
507
|
+
"regr_slope",
|
|
508
|
+
"regr_sxx",
|
|
509
|
+
"regr_sxy",
|
|
510
|
+
"regr_syy",
|
|
511
|
+
"row_number",
|
|
512
|
+
"sin",
|
|
513
|
+
"sinh",
|
|
514
|
+
"sqrt",
|
|
515
|
+
"stddev_pop",
|
|
516
|
+
"stddev_samp",
|
|
517
|
+
"substring",
|
|
518
|
+
"substring_regex",
|
|
519
|
+
"sum",
|
|
520
|
+
"tan",
|
|
521
|
+
"tanh",
|
|
522
|
+
"translate",
|
|
523
|
+
"translate_regex",
|
|
524
|
+
"treat",
|
|
525
|
+
"trim",
|
|
526
|
+
"trim_array",
|
|
527
|
+
"unnest",
|
|
528
|
+
"upper",
|
|
529
|
+
"value_of",
|
|
530
|
+
"var_pop",
|
|
531
|
+
"var_samp",
|
|
532
|
+
"width_bucket"
|
|
533
|
+
];
|
|
534
|
+
const POSSIBLE_WITHOUT_PARENS = [
|
|
535
|
+
"current_catalog",
|
|
536
|
+
"current_date",
|
|
537
|
+
"current_default_transform_group",
|
|
538
|
+
"current_path",
|
|
539
|
+
"current_role",
|
|
540
|
+
"current_schema",
|
|
541
|
+
"current_transform_group_for_type",
|
|
542
|
+
"current_user",
|
|
543
|
+
"session_user",
|
|
544
|
+
"system_time",
|
|
545
|
+
"system_user",
|
|
546
|
+
"current_time",
|
|
547
|
+
"localtime",
|
|
548
|
+
"current_timestamp",
|
|
549
|
+
"localtimestamp"
|
|
550
|
+
];
|
|
551
|
+
const COMBOS = [
|
|
552
|
+
"create table",
|
|
553
|
+
"insert into",
|
|
554
|
+
"primary key",
|
|
555
|
+
"foreign key",
|
|
556
|
+
"not null",
|
|
557
|
+
"alter table",
|
|
558
|
+
"add constraint",
|
|
559
|
+
"grouping sets",
|
|
560
|
+
"on overflow",
|
|
561
|
+
"character set",
|
|
562
|
+
"respect nulls",
|
|
563
|
+
"ignore nulls",
|
|
564
|
+
"nulls first",
|
|
565
|
+
"nulls last",
|
|
566
|
+
"depth first",
|
|
567
|
+
"breadth first"
|
|
568
|
+
];
|
|
569
|
+
const FUNCTIONS = RESERVED_FUNCTIONS;
|
|
570
|
+
const KEYWORDS = [
|
|
571
|
+
...RESERVED_WORDS,
|
|
572
|
+
...NON_RESERVED_WORDS
|
|
573
|
+
].filter((keyword) => {
|
|
574
|
+
return !RESERVED_FUNCTIONS.includes(keyword);
|
|
575
|
+
});
|
|
576
|
+
const VARIABLE = {
|
|
577
|
+
scope: "variable",
|
|
578
|
+
match: /@[a-z0-9][a-z0-9_]*/
|
|
579
|
+
};
|
|
580
|
+
const OPERATOR = {
|
|
581
|
+
scope: "operator",
|
|
582
|
+
match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
583
|
+
relevance: 0
|
|
584
|
+
};
|
|
585
|
+
const FUNCTION_CALL = {
|
|
586
|
+
match: regex.concat(/\b/, regex.either(...FUNCTIONS), /\s*\(/),
|
|
587
|
+
relevance: 0,
|
|
588
|
+
keywords: { built_in: FUNCTIONS }
|
|
589
|
+
};
|
|
590
|
+
function kws_to_regex(list) {
|
|
591
|
+
return regex.concat(
|
|
592
|
+
/\b/,
|
|
593
|
+
regex.either(...list.map((kw) => {
|
|
594
|
+
return kw.replace(/\s+/, "\\s+");
|
|
595
|
+
})),
|
|
596
|
+
/\b/
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
__name(kws_to_regex, "kws_to_regex");
|
|
600
|
+
const MULTI_WORD_KEYWORDS = {
|
|
601
|
+
scope: "keyword",
|
|
602
|
+
match: kws_to_regex(COMBOS),
|
|
603
|
+
relevance: 0
|
|
604
|
+
};
|
|
605
|
+
function reduceRelevancy(list, {
|
|
606
|
+
exceptions,
|
|
607
|
+
when
|
|
608
|
+
} = {}) {
|
|
609
|
+
const qualifyFn = when;
|
|
610
|
+
exceptions = exceptions || [];
|
|
611
|
+
return list.map((item) => {
|
|
612
|
+
if (item.match(/\|\d+$/) || exceptions.includes(item)) {
|
|
613
|
+
return item;
|
|
614
|
+
} else if (qualifyFn(item)) {
|
|
615
|
+
return `${item}|0`;
|
|
616
|
+
} else {
|
|
617
|
+
return item;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
__name(reduceRelevancy, "reduceRelevancy");
|
|
622
|
+
return {
|
|
623
|
+
name: "SQL",
|
|
624
|
+
case_insensitive: true,
|
|
625
|
+
// does not include {} or HTML tags `</`
|
|
626
|
+
illegal: /[{}]|<\//,
|
|
627
|
+
keywords: {
|
|
628
|
+
$pattern: /\b[\w\.]+/,
|
|
629
|
+
keyword: reduceRelevancy(KEYWORDS, { when: /* @__PURE__ */ __name((x) => x.length < 3, "when") }),
|
|
630
|
+
literal: LITERALS,
|
|
631
|
+
type: TYPES,
|
|
632
|
+
built_in: POSSIBLE_WITHOUT_PARENS
|
|
633
|
+
},
|
|
634
|
+
contains: [
|
|
635
|
+
{
|
|
636
|
+
scope: "type",
|
|
637
|
+
match: kws_to_regex(MULTI_WORD_TYPES)
|
|
638
|
+
},
|
|
639
|
+
MULTI_WORD_KEYWORDS,
|
|
640
|
+
FUNCTION_CALL,
|
|
641
|
+
VARIABLE,
|
|
642
|
+
STRING,
|
|
643
|
+
QUOTED_IDENTIFIER,
|
|
644
|
+
hljs.C_NUMBER_MODE,
|
|
645
|
+
hljs.C_BLOCK_COMMENT_MODE,
|
|
646
|
+
COMMENT_MODE,
|
|
647
|
+
OPERATOR
|
|
648
|
+
]
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
__name(sql, "sql");
|
|
652
|
+
sql_1 = sql;
|
|
653
|
+
return sql_1;
|
|
654
|
+
}
|
|
655
|
+
__name(requireSql, "requireSql");
|
|
656
|
+
export {
|
|
657
|
+
requireSql as __require
|
|
658
|
+
};
|