@castlabs/ui 7.9.4 → 7.11.0
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/castlabs-ui.common.js +3 -3
- package/dist/castlabs-ui.common.js.map +1 -1
- package/dist/castlabs-ui.core.js +530 -152
- package/dist/castlabs-ui.css +1 -1
- package/dist/castlabs-ui.module.d.ts +2 -3
- package/dist/castlabs-ui.module.js +519 -17
- package/dist/castlabs-ui.umd.js +4 -4
- package/dist/castlabs-ui.umd.js.map +1 -1
- package/package.json +16 -16
- package/src/components/ClBadge/style.variables.scss +14 -4
- package/src/components/form/ClFieldGroup/style.scss +24 -0
- package/src/components/form/ClFieldSet/style.scss +10 -26
- package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +77 -2
- package/src/styles/assets/logo.scss +2 -2
- package/src/styles/layout/color.scss +29 -29
- package/src/styles/layout/meta.scss +1 -1
- package/types/castlabs-ui.module.d.ts +2 -3
- package/types/index.d.ts +93 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@castlabs/ui",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.11.0",
|
|
4
4
|
"repository": "https://github.com/castlabs/ui-styleguide",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "A vanilla HTML/CS/JS & Vue.js component library for Castlabs.",
|
|
@@ -42,41 +42,41 @@
|
|
|
42
42
|
"simplebar": "6.3.3"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@rollup/rollup-linux-x64-gnu": "4.
|
|
45
|
+
"@rollup/rollup-linux-x64-gnu": "4.57.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@castlabs/ui-editor": "file:../castlabs-ui-editor",
|
|
49
49
|
"@tsconfig/node22": "22.0.5",
|
|
50
50
|
"@types/jsdom": "27.0.0",
|
|
51
51
|
"@types/node": "24.10.1",
|
|
52
|
-
"@vitejs/plugin-vue": "6.0.
|
|
53
|
-
"@vitest/eslint-plugin": "1.
|
|
52
|
+
"@vitejs/plugin-vue": "6.0.3",
|
|
53
|
+
"@vitest/eslint-plugin": "1.6.6",
|
|
54
54
|
"@vue/eslint-config-prettier": "10.2.0",
|
|
55
55
|
"@vue/eslint-config-typescript": "14.6.0",
|
|
56
56
|
"@vue/test-utils": "2.4.6",
|
|
57
57
|
"@vue/tsconfig": "0.8.1",
|
|
58
|
-
"core-js": "3.
|
|
58
|
+
"core-js": "3.48.0",
|
|
59
59
|
"dree": "5.1.5",
|
|
60
60
|
"eslint-plugin-import": "2.32.0",
|
|
61
|
-
"eslint-plugin-n": "17.23.
|
|
61
|
+
"eslint-plugin-n": "17.23.2",
|
|
62
62
|
"eslint-plugin-promise": "7.2.1",
|
|
63
|
-
"eslint-plugin-vue": "10.
|
|
64
|
-
"eslint": "9.39.
|
|
63
|
+
"eslint-plugin-vue": "10.7.0",
|
|
64
|
+
"eslint": "9.39.2",
|
|
65
65
|
"gulp-concat": "2.6.1",
|
|
66
66
|
"gulp-replace": "1.1.4",
|
|
67
67
|
"gulp": "5.0.1",
|
|
68
|
-
"jsdom": "27.
|
|
68
|
+
"jsdom": "27.4.0",
|
|
69
69
|
"npm-run-all": "4.1.5",
|
|
70
|
-
"sass": "1.
|
|
70
|
+
"sass": "1.97.3",
|
|
71
71
|
"stylelint-config-sass-guidelines": "12.1.0",
|
|
72
72
|
"stylelint-config-standard-vue": "1.0.0",
|
|
73
73
|
"stylelint-config-standard": "39.0.1",
|
|
74
|
-
"stylelint-order": "7.0.
|
|
75
|
-
"stylelint-scss": "
|
|
74
|
+
"stylelint-order": "7.0.1",
|
|
75
|
+
"stylelint-scss": "7.0.0",
|
|
76
76
|
"typescript": "5.9.3",
|
|
77
|
-
"vite": "7.
|
|
78
|
-
"vitest": "4.0.
|
|
79
|
-
"vue-tsc": "3.
|
|
80
|
-
"vue": "3.5.
|
|
77
|
+
"vite": "7.3.1",
|
|
78
|
+
"vitest": "4.0.18",
|
|
79
|
+
"vue-tsc": "3.2.4",
|
|
80
|
+
"vue": "3.5.27"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -14,10 +14,6 @@ $badge-min-height: 1.642857143em; // 23px @ 14pt
|
|
|
14
14
|
@include cl-colors-admin;
|
|
15
15
|
@extend %cl-p-tag;
|
|
16
16
|
|
|
17
|
-
#{'--cl-color-background'}: $color-ci-steel;
|
|
18
|
-
#{'--cl-color-border'}: $color-ci-steel;
|
|
19
|
-
#{'--cl-color-text'}: $color-ci-eggshell;
|
|
20
|
-
#{'--cl-color-accent'}: $color-ci-eggshell;
|
|
21
17
|
background-color: var(--cl-color-background);
|
|
22
18
|
border: $brand-line-width solid var(--cl-color-border);
|
|
23
19
|
border-radius: $brand-border-radius;
|
|
@@ -37,6 +33,20 @@ $badge-min-height: 1.642857143em; // 23px @ 14pt
|
|
|
37
33
|
line-height: 0.75;
|
|
38
34
|
margin-right: $spacing-micro;
|
|
39
35
|
}
|
|
36
|
+
|
|
37
|
+
&.cl-color-transparent {
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
border-color: var(--cl-color-text);
|
|
40
|
+
color: var(--cl-color-text);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:not([class*='cl-color-']) {
|
|
44
|
+
// default badge color
|
|
45
|
+
#{'--cl-color-background'}: $color-ci-steel;
|
|
46
|
+
#{'--cl-color-border'}: $color-ci-steel;
|
|
47
|
+
#{'--cl-color-text'}: $color-ci-eggshell;
|
|
48
|
+
#{'--cl-color-accent'}: $color-ci-eggshell;
|
|
49
|
+
}
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
%cl-badge-derived {
|
|
@@ -62,6 +62,30 @@
|
|
|
62
62
|
width: auto;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
&:disabled,
|
|
66
|
+
&.disabled {
|
|
67
|
+
#{'--cl-color-text'}: $color-disabled;
|
|
68
|
+
#{'--cl-color-input-border'}: $color-disabled;
|
|
69
|
+
color: $color-disabled;
|
|
70
|
+
|
|
71
|
+
.form-label,
|
|
72
|
+
.valid-feedback,
|
|
73
|
+
+ .valid-feedback,
|
|
74
|
+
+ * + .valid-feedback,
|
|
75
|
+
.invalid-feedback,
|
|
76
|
+
+ .invalid-feedback,
|
|
77
|
+
+ * + .invalid-feedback {
|
|
78
|
+
color: $color-disabled;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
textarea,
|
|
82
|
+
input,
|
|
83
|
+
select {
|
|
84
|
+
color: $color-disabled;
|
|
85
|
+
cursor: not-allowed;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
65
89
|
@include media-breakpoint-down(sm) {
|
|
66
90
|
flex-direction: column;
|
|
67
91
|
|
|
@@ -17,37 +17,21 @@
|
|
|
17
17
|
|
|
18
18
|
&:disabled,
|
|
19
19
|
&.disabled {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[type='text'],
|
|
24
|
-
[type='password'],
|
|
25
|
-
[type='url'],
|
|
26
|
-
[type='date'],
|
|
27
|
-
[type='email'],
|
|
28
|
-
[type='number'],
|
|
29
|
-
[type='date'],
|
|
30
|
-
[type='time'],
|
|
31
|
-
[type='datetime-local'],
|
|
32
|
-
textarea,
|
|
33
|
-
select {
|
|
34
|
-
@extend %form-field-box;
|
|
35
|
-
@extend %form-field-typography-sans;
|
|
36
|
-
|
|
37
|
-
cursor: not-allowed;
|
|
38
|
-
}
|
|
20
|
+
#{'--cl-color-input-border'}: $color-disabled;
|
|
21
|
+
#{'--cl-color-text'}: $color-disabled;
|
|
22
|
+
color: $color-disabled;
|
|
39
23
|
|
|
40
24
|
.form-label,
|
|
41
25
|
.valid-feedback,
|
|
42
|
-
.
|
|
43
|
-
color: $color-
|
|
26
|
+
.invalid-feedback {
|
|
27
|
+
color: $color-disabled;
|
|
44
28
|
}
|
|
45
29
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
textarea,
|
|
31
|
+
input,
|
|
32
|
+
select {
|
|
33
|
+
color: $color-disabled;
|
|
34
|
+
cursor: not-allowed;
|
|
51
35
|
}
|
|
52
36
|
}
|
|
53
37
|
}
|
|
@@ -68,7 +68,80 @@ $sidenav-color-text-minor: $color-ci-ash;
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
.cl-nav-account {
|
|
72
|
+
#{'--cl-color-background'}: $color-ci-night;
|
|
73
|
+
#{'--cl-color-text'}: $color-ci-eggshell;
|
|
74
|
+
#{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
|
|
75
|
+
background-color: var(--cl-color-background);
|
|
76
|
+
color: var(--cl-color-text);
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
font-size: px(16);
|
|
80
|
+
justify-content: center;
|
|
81
|
+
line-height: 1;
|
|
82
|
+
min-height: $header-nav-height;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
padding: $spacing-micro 0 $spacing-micro $spacing-small + $spacing-medium + $spacing-micro;
|
|
85
|
+
position: relative;
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
|
|
89
|
+
&::after {
|
|
90
|
+
// fade-out gradient
|
|
91
|
+
$bg: var(--cl-color-background);
|
|
92
|
+
|
|
93
|
+
background-image: linear-gradient(to right, transparent, $bg, $bg);
|
|
94
|
+
content: '';
|
|
95
|
+
display: block;
|
|
96
|
+
height: 100%;
|
|
97
|
+
position: absolute;
|
|
98
|
+
right: 0;
|
|
99
|
+
top: 0;
|
|
100
|
+
width: 1rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&::before {
|
|
104
|
+
@include cl-fontawesome('\f2bd');
|
|
105
|
+
|
|
106
|
+
color: var(--cl-color-text);
|
|
107
|
+
font-size: px(22);
|
|
108
|
+
left: $spacing-small;
|
|
109
|
+
line-height: 1;
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: px(12);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
p {
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
margin-top: 0.1em;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.cl-p-small {
|
|
120
|
+
color: $color-ci-clay;
|
|
121
|
+
letter-spacing: 0;
|
|
122
|
+
margin-top: -0.05em;
|
|
123
|
+
overflow-wrap: normal;
|
|
124
|
+
padding-left: 0.025em;
|
|
125
|
+
transform: scaleX(0.85);
|
|
126
|
+
transform-origin: left;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
i {
|
|
130
|
+
#{'--cl-color-text'}: $color-ci-clay;
|
|
131
|
+
background-color: var(--cl-color-background);
|
|
132
|
+
box-shadow: 0 0 2px 6px var(--cl-color-background);
|
|
133
|
+
color: var(--cl-color-text);
|
|
134
|
+
font-size: 22px;
|
|
135
|
+
padding-right: $spacing-tiny;
|
|
136
|
+
position: absolute;
|
|
137
|
+
right: $spacing-tiny;
|
|
138
|
+
z-index: 1;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
71
142
|
.cl-nav-user {
|
|
143
|
+
// DEPRECATED
|
|
144
|
+
|
|
72
145
|
// ------------------------------------------------------------
|
|
73
146
|
@extend %cl-p-nav;
|
|
74
147
|
|
|
@@ -404,7 +477,8 @@ $sidenav-color-text-minor: $color-ci-ash;
|
|
|
404
477
|
}
|
|
405
478
|
|
|
406
479
|
.cl-nav-item-lock,
|
|
407
|
-
.cl-nav-item-locked
|
|
480
|
+
.cl-nav-item-locked,
|
|
481
|
+
.cl-nav-item-disabled {
|
|
408
482
|
span:first-of-type::after {
|
|
409
483
|
@include cl-fontawesome('\f023');
|
|
410
484
|
|
|
@@ -414,7 +488,8 @@ $sidenav-color-text-minor: $color-ci-ash;
|
|
|
414
488
|
}
|
|
415
489
|
}
|
|
416
490
|
|
|
417
|
-
.cl-nav-item-locked
|
|
491
|
+
.cl-nav-item-locked, // legacy class
|
|
492
|
+
.cl-nav-item-disabled {
|
|
418
493
|
opacity: 0.5;
|
|
419
494
|
|
|
420
495
|
&:hover {
|
|
@@ -18,7 +18,7 @@ $cl-url-postfix: '' !default;
|
|
|
18
18
|
height: 1em * 2;
|
|
19
19
|
margin-bottom: -1em;
|
|
20
20
|
position: relative;
|
|
21
|
-
top: -0.
|
|
21
|
+
top: -0.4em;
|
|
22
22
|
width: 2.95em * 2;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -31,7 +31,7 @@ $cl-url-postfix: '' !default;
|
|
|
31
31
|
height: 1em * 2;
|
|
32
32
|
margin-bottom: -1em;
|
|
33
33
|
position: relative;
|
|
34
|
-
top: -0.
|
|
34
|
+
top: -0.4em;
|
|
35
35
|
width: 2.95em * 2;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -131,75 +131,75 @@ div {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.cl-color-text-red {
|
|
134
|
-
#{'--cl-color-text'}: $color-ci-red;
|
|
135
|
-
#{'--cl-color-link'}: $color-ci-red;
|
|
134
|
+
#{'--cl-color-text'}: $color-ci-red !important;
|
|
135
|
+
#{'--cl-color-link'}: $color-ci-red !important;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
.cl-color-text-sky {
|
|
139
|
-
#{'--cl-color-text'}: $color-ci-sky;
|
|
140
|
-
#{'--cl-color-link'}: $color-ci-sky;
|
|
139
|
+
#{'--cl-color-text'}: $color-ci-sky !important;
|
|
140
|
+
#{'--cl-color-link'}: $color-ci-sky !important;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.cl-color-text-night {
|
|
144
|
-
#{'--cl-color-text'}: $color-ci-night;
|
|
145
|
-
#{'--cl-color-link'}: $color-ci-night;
|
|
144
|
+
#{'--cl-color-text'}: $color-ci-night !important;
|
|
145
|
+
#{'--cl-color-link'}: $color-ci-night !important;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.cl-color-text-eggshell {
|
|
149
|
-
#{'--cl-color-text'}: $color-ci-eggshell;
|
|
150
|
-
#{'--cl-color-link'}: $color-ci-eggshell;
|
|
149
|
+
#{'--cl-color-text'}: $color-ci-eggshell !important;
|
|
150
|
+
#{'--cl-color-link'}: $color-ci-eggshell !important;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.cl-color-text-clay {
|
|
154
|
-
#{'--cl-color-text'}: $color-ci-clay;
|
|
154
|
+
#{'--cl-color-text'}: $color-ci-clay !important;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.cl-color-text-ash {
|
|
158
|
-
#{'--cl-color-text'}: $color-ci-ash;
|
|
159
|
-
#{'--cl-color-link'}: $color-ci-ash;
|
|
158
|
+
#{'--cl-color-text'}: $color-ci-ash !important;
|
|
159
|
+
#{'--cl-color-link'}: $color-ci-ash !important;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.cl-color-text-petrol {
|
|
163
|
-
#{'--cl-color-text'}: $color-ci-petrol;
|
|
164
|
-
#{'--cl-color-link'}: $color-ci-petrol;
|
|
163
|
+
#{'--cl-color-text'}: $color-ci-petrol !important;
|
|
164
|
+
#{'--cl-color-link'}: $color-ci-petrol !important;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
.cl-color-text-berry {
|
|
168
|
-
#{'--cl-color-text'}: $color-ci-berry;
|
|
169
|
-
#{'--cl-color-link'}: $color-ci-berry;
|
|
168
|
+
#{'--cl-color-text'}: $color-ci-berry !important;
|
|
169
|
+
#{'--cl-color-link'}: $color-ci-berry !important;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
.cl-color-text-none {
|
|
173
|
-
#{'--cl-color-text'}: transparent;
|
|
174
|
-
#{'--cl-color-link'}: transparent;
|
|
173
|
+
#{'--cl-color-text'}: transparent !important;
|
|
174
|
+
#{'--cl-color-link'}: transparent !important;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
.cl-color-text-brick {
|
|
178
|
-
#{'--cl-color-text'}: $color-ci-brick;
|
|
179
|
-
#{'--cl-color-link'}: $color-ci-brick;
|
|
178
|
+
#{'--cl-color-text'}: $color-ci-brick !important;
|
|
179
|
+
#{'--cl-color-link'}: $color-ci-brick !important;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
.cl-color-text-honey {
|
|
183
|
-
#{'--cl-color-text'}: $color-ci-honey;
|
|
184
|
-
#{'--cl-color-link'}: $color-ci-honey;
|
|
183
|
+
#{'--cl-color-text'}: $color-ci-honey !important;
|
|
184
|
+
#{'--cl-color-link'}: $color-ci-honey !important;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
.cl-color-text-leaf {
|
|
188
|
-
#{'--cl-color-text'}: $color-ci-leaf;
|
|
189
|
-
#{'--cl-color-link'}: $color-ci-leaf;
|
|
188
|
+
#{'--cl-color-text'}: $color-ci-leaf !important;
|
|
189
|
+
#{'--cl-color-link'}: $color-ci-leaf !important;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.cl-color-text-sea {
|
|
193
|
-
#{'--cl-color-text'}: $color-ci-sea;
|
|
194
|
-
#{'--cl-color-link'}: $color-ci-sea;
|
|
193
|
+
#{'--cl-color-text'}: $color-ci-sea !important;
|
|
194
|
+
#{'--cl-color-link'}: $color-ci-sea !important;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
.cl-color-text-orchid {
|
|
198
|
-
#{'--cl-color-text'}: $color-ci-orchid;
|
|
199
|
-
#{'--cl-color-link'}: $color-ci-orchid;
|
|
198
|
+
#{'--cl-color-text'}: $color-ci-orchid !important;
|
|
199
|
+
#{'--cl-color-link'}: $color-ci-orchid !important;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
.cl-color-text-steel {
|
|
203
|
-
#{'--cl-color-text'}: $color-ci-steel;
|
|
204
|
-
#{'--cl-color-link'}: $color-ci-steel;
|
|
203
|
+
#{'--cl-color-text'}: $color-ci-steel !important;
|
|
204
|
+
#{'--cl-color-link'}: $color-ci-steel !important;
|
|
205
205
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
|
|
3
|
+
// this contains general non-vue types
|
|
4
|
+
|
|
3
5
|
declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
|
|
4
6
|
export function clScrollToId (id: string, smooth?: boolean): void
|
|
5
7
|
|
|
@@ -18,9 +20,6 @@ declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
|
|
|
18
20
|
export function clFormIsValidAsync (id: string): Promise<boolean>
|
|
19
21
|
export function clFormFieldFocusFirstInvalid (id: string): void
|
|
20
22
|
export function clFormAutofocus (id: string): void
|
|
21
|
-
export function clRefClField (ref: unknown): any
|
|
22
|
-
export function clRefClFieldGroup (ref: unknown): any
|
|
23
|
-
export function clRefHTMLElement (ref: unknown): HTMLElement
|
|
24
23
|
|
|
25
24
|
export function clFormatFilesize (bytes: number): string
|
|
26
25
|
export function clFormatDate (date: Date): string
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { App, DefineComponent } from 'vue'
|
|
2
2
|
|
|
3
|
+
import * as CONST from '../src/utils/const'
|
|
4
|
+
import * as CS from '../src/utils/cs'
|
|
5
|
+
|
|
3
6
|
declare function install (Vue: App): void
|
|
4
7
|
export default install
|
|
5
8
|
|
|
@@ -77,9 +80,6 @@ export function clFormIsValid (id: string): boolean
|
|
|
77
80
|
export function clFormIsValidAsync (id: string): Promise<boolean>
|
|
78
81
|
export function clFormFieldFocusFirstInvalid (id: string): void
|
|
79
82
|
export function clFormAutofocus (id: string): void
|
|
80
|
-
export function clRefClField (ref: unknown): typeof ClField
|
|
81
|
-
export function clRefClFieldGroup (ref: unknown): typeof ClFieldGroup
|
|
82
|
-
export function clRefHTMLElement (ref: unknown): HTMLElement
|
|
83
83
|
|
|
84
84
|
export function clFormatFilesize (bytes: number): string
|
|
85
85
|
export function clFormatDate (date: Date): string
|
|
@@ -135,6 +135,13 @@ export function clReloadStore (component: any, forced?: any[], optional?: any[],
|
|
|
135
135
|
|
|
136
136
|
export function clMatch (string: string, expression?: string, caseSensitive?: boolean): boolean
|
|
137
137
|
|
|
138
|
+
// --- utils/vue ---------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
export function clRefClField (ref: unknown): typeof ClField
|
|
141
|
+
export function clRefClFieldGroup (ref: unknown): typeof ClFieldGroup
|
|
142
|
+
export function clRefFocus (ref: unknown): void
|
|
143
|
+
export function clRefHTMLElement (ref: unknown): HTMLElement
|
|
144
|
+
|
|
138
145
|
// --- utils/vitest ------------------------------------------------------------
|
|
139
146
|
|
|
140
147
|
export const FLECTIONS: RegExp[]
|
|
@@ -150,6 +157,7 @@ export type ClService = {
|
|
|
150
157
|
subtitle: string
|
|
151
158
|
title: string
|
|
152
159
|
urlManage: (env?: string, oid?: string) => string
|
|
160
|
+
urlPlan: (env?: string, oid?: string) => string
|
|
153
161
|
sidenav: boolean
|
|
154
162
|
}
|
|
155
163
|
export function clGetServices (): ClService[]
|
|
@@ -165,9 +173,87 @@ export const NAV: {
|
|
|
165
173
|
VTK: ClService
|
|
166
174
|
}
|
|
167
175
|
|
|
168
|
-
// ---
|
|
176
|
+
// --- Central Services -----------------------------------------------------------
|
|
177
|
+
|
|
178
|
+
export type CsLicense = {
|
|
179
|
+
approval_date: string | null
|
|
180
|
+
created: string // ISO date
|
|
181
|
+
display_name: string
|
|
182
|
+
expires: string | null // ISO date
|
|
183
|
+
license_urn: string
|
|
184
|
+
plan: number | null
|
|
185
|
+
service: string
|
|
186
|
+
status: number
|
|
187
|
+
updated: string // ISO date
|
|
188
|
+
// attachments: object // not typed yet
|
|
189
|
+
}
|
|
169
190
|
|
|
170
|
-
export
|
|
171
|
-
|
|
172
|
-
|
|
191
|
+
export type CsRole = {
|
|
192
|
+
display_name: string
|
|
193
|
+
role_urn: string
|
|
194
|
+
// attachments: object // not typed yet
|
|
195
|
+
// organization: not typed yet
|
|
173
196
|
}
|
|
197
|
+
|
|
198
|
+
export type CsOrganization = {
|
|
199
|
+
display_name: string
|
|
200
|
+
legacy_name?: string
|
|
201
|
+
licenses: CsLicense[]
|
|
202
|
+
members_count?: number
|
|
203
|
+
organization_urn: string
|
|
204
|
+
parent: string | null // urn
|
|
205
|
+
parent_display_name: string | null
|
|
206
|
+
suborgs_count?: number
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export type CsMembership = {
|
|
210
|
+
display_name: string
|
|
211
|
+
membership_urn: string
|
|
212
|
+
organization: CsOrganization
|
|
213
|
+
roles: CsRole[]
|
|
214
|
+
status: number
|
|
215
|
+
// user_urn: string // not typed/used as duplicate
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type CsUserDetail = {
|
|
219
|
+
company: string
|
|
220
|
+
email: string
|
|
221
|
+
hubspot_contact_id?: string
|
|
222
|
+
machine_account?: boolean
|
|
223
|
+
name: string
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export type CsUserinfo = {
|
|
227
|
+
active: boolean
|
|
228
|
+
email_verified: boolean
|
|
229
|
+
groups: string[]
|
|
230
|
+
memberships: CsMembership[]
|
|
231
|
+
mfa_enabled: boolean | null
|
|
232
|
+
profile: CsUserDetail
|
|
233
|
+
user_urn: string
|
|
234
|
+
// user_data: object | null // not typed yet
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
type ClSidenavEntry = {
|
|
238
|
+
id: string
|
|
239
|
+
title: string
|
|
240
|
+
subtitle: string | undefined
|
|
241
|
+
badge: string | undefined
|
|
242
|
+
url: string | undefined
|
|
243
|
+
locked: boolean
|
|
244
|
+
disabled: boolean
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function csGetNav (
|
|
248
|
+
memberships: CsMembership[],
|
|
249
|
+
oid: string,
|
|
250
|
+
env: string
|
|
251
|
+
): ClSidenavEntry[]
|
|
252
|
+
|
|
253
|
+
export function csFilterMemberships (memberships: CsMembership[], rid?: string, sid?: string): CsMembership[]
|
|
254
|
+
export function csGetAccountUrl(env: string): string
|
|
255
|
+
|
|
256
|
+
// --- consts ----------------------------------------------------------------
|
|
257
|
+
|
|
258
|
+
export const CONST
|
|
259
|
+
export const CS
|