@kestra-io/ui-libs 0.0.77 → 0.0.79

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/package.json CHANGED
@@ -1,29 +1,14 @@
1
1
  {
2
2
  "name": "@kestra-io/ui-libs",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "type": "module",
5
5
  "files": [
6
- "dist",
7
6
  "src",
8
7
  "package.json",
9
8
  "stub-mdc-imports.js"
10
9
  ],
11
- "main": "./dist/kestra-ui.umd.cjs",
12
- "module": "./dist/kestra-ui.js",
13
- "exports": {
14
- ".": {
15
- "import": {
16
- "development": "./src/index.js",
17
- "production": "./dist/kestra-ui.js"
18
- },
19
- "require": {
20
- "development": "./src/index.js",
21
- "production": "./dist/kestra-ui.umd.cjs"
22
- }
23
- },
24
- "./style.css": "./dist/style.css",
25
- "./src/*": "./src/*"
26
- },
10
+ "main": "./src/index.js",
11
+ "module": "./src/index.js",
27
12
  "scripts": {
28
13
  "dev": "vite",
29
14
  "debug": "vite --debug",
@@ -26,9 +26,9 @@
26
26
  </h2>
27
27
  <template v-if="key !== 'definitions'">
28
28
  <template v-for="(property, propertyKey) in sortSchemaByRequired(pageBlock)" :key="propertyKey">
29
- <h3 :id="property.name ?? propertyKey">
30
- <a :href="`#${property.name ?? propertyKey}`">
31
- <code>{{ property.name ?? propertyKey }}</code>
29
+ <h3 :id="property.name || propertyKey">
30
+ <a :href="`#${property.name || propertyKey}`">
31
+ <code>{{ property.name || propertyKey }}</code>
32
32
  </a>
33
33
  </h3>
34
34
  <div
@@ -41,18 +41,11 @@
41
41
  <ul>
42
42
  <li>
43
43
  <strong>Type: </strong>
44
- <a
45
- aria-current="page"
46
- v-if="property['$ref']"
47
- :href="generateTaskHref(property['$ref'])"
48
- class="router-link-active router-link-exact-active"
44
+ <mark
45
+ class="type-mark type-mark-default"
46
+ v-if="property.type || property['$ref']"
49
47
  >
50
- <mark class="type-mark type-mark-default">
51
- {{ property['$ref']?.split('.').reverse()[0] }}
52
- </mark>
53
- </a>
54
- <mark v-else-if="property.type" class="type-mark type-mark-default">
55
- {{ property.type }}
48
+ {{ property.type || property['$ref']?.split('.').reverse()[0] }}
56
49
  </mark>
57
50
  <ul v-else-if="property.anyOf">
58
51
  <li v-for="(anyOf, index) in property.anyOf" :key="index">
@@ -60,38 +53,30 @@
60
53
  </li>
61
54
  </ul>
62
55
  </li>
63
- <li v-if="property.items ?? property.additionalProperties">
56
+ <li v-if="property.items">
64
57
  <strong>SubType: </strong>
65
- <template v-if="property.items">
66
- <a
67
- aria-current="page"
68
- v-if="property.items['$ref']"
69
- :href="generateTaskHref(property.items['$ref'])"
70
- class="router-link-active router-link-exact-active"
71
- >
72
- <mark class="type-mark type-mark-default">
73
- {{ property.items['$ref'].split('.').reverse()[0] }}
74
- </mark>
75
- </a>
76
- <mark v-else class="type-mark type-mark-default">
77
- {{ property.items.type ?? 'string' }}
58
+ <a
59
+ aria-current="page"
60
+ v-if="property.items['$ref']"
61
+ :href="generateTaskHref(property.items['$ref'])"
62
+ class="router-link-active router-link-exact-active"
63
+ >
64
+ <mark class="type-mark type-mark-default">
65
+ {{ property.items['$ref']?.split('.').reverse()[0] ||
66
+ property.items.type ||'String' }}
78
67
  </mark>
79
- </template>
80
- <mark v-else-if="property.additionalProperties.type" class="type-mark type-mark-default">
81
- <template v-if="property.additionalProperties.items">
82
- {{ property.additionalProperties.items.type ?? 'string' }}
83
- </template>
84
- <template v-else-if="property.additionalProperties.type">
85
- {{ property.additionalProperties.type }}
86
- </template>
68
+ </a>
69
+ <mark v-else class="type-mark type-mark-default">
70
+ {{ property.items['$ref']?.split('.').reverse()[0] ||
71
+ property.items.type ||'String' }}
87
72
  </mark>
88
73
  </li>
89
- <li>
74
+ <li v-if="property['$dynamic'] !== undefined">
90
75
  <strong>Dynamic: </strong>{{
91
76
  property['$dynamic'] === true ? "✔️" :
92
77
  (property['$dynamic'] === false ? "❌" : "❓") }}
93
78
  </li>
94
- <li>
79
+ <li v-if="property['$required'] !== undefined">
95
80
  <strong>Required: </strong> {{
96
81
  property['$required'] === true ? "✔️" :
97
82
  (property['$required'] === false ? "❌" : "❓") }}
@@ -116,21 +101,15 @@
116
101
  <strong>Possible Values:</strong>
117
102
  <ul>
118
103
  <li v-for="(possibleValue, index) in property.enum" :key="index">
119
- <code>{{ possibleValue }}</code>
104
+ <code data-v-c4861ad0="" class="">{{ possibleValue }}</code>
120
105
  </li>
121
106
  </ul>
122
107
  </li>
123
108
  </ul>
124
109
 
125
- <div class="nested-fw-bolder">
126
- <slot v-if="property.title" :content="property.title" name="markdown">
127
- <template v-html="replaceText(property.title)" />
128
- </slot>
129
- </div>
130
- <blockquote v-if="property.description" class="blockquote">
131
- <slot :content="property.description" name="markdown">
132
- <template v-html="replaceText(property.description)" />
133
- </slot>
110
+ <slot v-if="property.title" :content="property.title" name="markdown" />
111
+ <blockquote class="blockquote">
112
+ <slot v-if="property.description" :content="property.description" name="markdown" />
134
113
  </blockquote>
135
114
  </template>
136
115
  </template>
@@ -154,65 +133,41 @@
154
133
  v-for="(definition, propertyKey) in item.properties ?? []"
155
134
  :key="propertyKey"
156
135
  >
157
- <h5 :id="definition.name ?? propertyKey">
158
- <a :href="`#${definition.name ?? propertyKey}`">
159
- <code>{{ definition.name ?? propertyKey }}</code>
136
+ <h5 :id="definition.name || propertyKey">
137
+ <a :href="`#${definition.name || propertyKey}`">
138
+ <code>{{ definition.name || propertyKey }}</code>
160
139
  </a>
161
140
  </h5>
162
141
  <ul>
163
142
  <li>
164
143
  <strong>Type: </strong>
144
+ <mark class="type-mark type-mark-default">
145
+ {{ definition.type ||
146
+ definition['$ref']?.split('.').reverse()[0] }}
147
+ </mark>
148
+ </li>
149
+ <li v-if="definition.items">
150
+ <strong>SubType: </strong>
165
151
  <a
166
152
  aria-current="page"
167
- v-if="definition['$ref']"
168
- :href="generateTaskHref(definition['$ref'])"
153
+ v-if="definition.items['$ref']"
154
+ :href="generateTaskHref(definition.items['$ref'])"
169
155
  class="router-link-active router-link-exact-active"
170
156
  >
171
157
  <mark class="type-mark type-mark-default">
172
- {{ definition['$ref']?.split('.').reverse()[0] }}
158
+ {{ definition.items?.type || 'Task' }}
173
159
  </mark>
174
160
  </a>
175
- <mark v-else-if="definition.type" class="type-mark type-mark-default">
176
- {{ definition.type }}
177
- </mark>
178
- <ul v-else-if="definition.anyOf">
179
- <li v-for="(anyOf, index) in definition.anyOf" :key="index">
180
- <mark class="type-mark type-mark-default">{{ anyOf.type }}</mark>
181
- </li>
182
- </ul>
183
- </li>
184
- <li v-if="definition.items">
185
- <strong>SubType: </strong>
186
- <template v-if="definition.items">
187
- <a
188
- aria-current="page"
189
- v-if="definition.items['$ref']"
190
- :href="generateTaskHref(definition.items['$ref'])"
191
- class="router-link-active router-link-exact-active"
192
- >
193
- <mark class="type-mark type-mark-default">
194
- {{ definition.items['$ref'].split('.').reverse()[0] }}
195
- </mark>
196
- </a>
197
- <mark v-else class="type-mark type-mark-default">
198
- {{ definition.items.type ?? 'string' }}
199
- </mark>
200
- </template>
201
- <mark v-else-if="definition.additionalProperties.type" class="type-mark type-mark-default">
202
- <template v-if="definition.additionalProperties.items">
203
- {{ definition.additionalProperties.items.type ?? 'string' }}
204
- </template>
205
- <template v-else-if="definition.additionalProperties.type">
206
- {{ definition.additionalProperties.type }}
207
- </template>
161
+ <mark v-else class="type-mark type-mark-default">
162
+ {{ definition.items?.type || 'Task' }}
208
163
  </mark>
209
164
  </li>
210
- <li>
165
+ <li v-if="definition['$dynamic'] !== undefined">
211
166
  <strong>Dynamic: </strong>
212
167
  {{ definition['$dynamic'] === true ? "✔️" :
213
168
  (definition['$dynamic'] === false ? "❌" : "❓") }}
214
169
  </li>
215
- <li>
170
+ <li v-if="definition['$required'] !== undefined">
216
171
  <strong>Required: </strong>
217
172
  {{
218
173
  definition['$required'] === true ? "✔️" :
@@ -224,34 +179,18 @@
224
179
  </li>
225
180
  <li v-if="definition.format">
226
181
  <strong>Format: </strong>
227
- <code> {{ definition.format }} </code>
182
+ <code>{{ definition.format }}</code>
228
183
  </li>
229
184
  <li v-if="definition.minItems">
230
185
  <strong>Min items: </strong>
231
- <code> {{ definition.minItems }} </code>
232
- </li>
233
- <li v-if="definition.minLength">
234
- <strong>Min length: </strong>
235
- <code>{{ definition.minLength }}</code>
236
- </li>
237
- <li v-if="definition.enum">
238
- <strong>Possible Values:</strong>
239
- <ul>
240
- <li v-for="(possibleValue, index) in definition.enum" :key="index">
241
- <code>{{ possibleValue }}</code>
242
- </li>
243
- </ul>
186
+ <code>{{ definition.minItems }}</code>
244
187
  </li>
245
188
  </ul>
246
- <div class="nested-fw-bolder">
247
- <slot v-if="definition.title" :content="definition.title" name="markdown">
248
- <template v-html="replaceText(definition.title)" />
249
- </slot>
250
- </div>
189
+ <p>
190
+ <strong v-html="replaceText(definition.title)" />
191
+ </p>
251
192
  <blockquote class="blockquote">
252
- <slot v-if="definition.description" :content="definition.description" name="markdown">
253
- <template v-html="replaceText(definition.description)" />
254
- </slot>
193
+ <p v-html="replaceText(definition.description)" />
255
194
  </blockquote>
256
195
  </template>
257
196
  </template>
@@ -299,7 +238,7 @@
299
238
  const generateTaskHref = (href) => {
300
239
  if (href) {
301
240
  const taskHref = href?.split("/");
302
- return `#${taskHref[taskHref?.length - 1]}`;
241
+ return `#${taskHref[taskHref?.length - 1].toLowerCase()}`;
303
242
  }
304
243
  };
305
244
  computed(() => {
@@ -345,7 +284,7 @@
345
284
  }
346
285
  }
347
286
 
348
- const sortedKeys = [...requiredKeys.sort(), ...nonRequiredKeys.sort()];
287
+ const sortedKeys = [...requiredKeys, ...nonRequiredKeys];
349
288
 
350
289
  const sortedSchema = {};
351
290
  sortedKeys.forEach(key => {
@@ -379,14 +318,16 @@
379
318
  </script>
380
319
 
381
320
  <style lang="scss" scoped>
382
- .bd-markdown {
321
+ :deep(.bd-markdown) {
383
322
  p {
384
- code{
385
- background: #161617;
386
- border: 1px solid #252526;
387
- border-radius: var(--bs-border-radius);
388
- color: #b9b9ba;
389
- padding: 0 .25rem;
323
+ strong {
324
+ code{
325
+ background: #161617;
326
+ border: 1px solid #252526;
327
+ border-radius: var(--bs-border-radius);
328
+ color: #b9b9ba;
329
+ padding: 0 .25rem;
330
+ }
390
331
  }
391
332
  }
392
333
  }
@@ -54,7 +54,3 @@ $theme-colors: $custom-colors;
54
54
  --bs-tooltip-bg: var(--bs-gray-100);
55
55
  }
56
56
  }
57
-
58
- .nested-fw-bolder * {
59
- font-weight: bolder !important;
60
- }
@@ -1,20 +0,0 @@
1
- // gray
2
- $gray-900: #CAC5DA;
3
- $gray-800: #A69FC1;
4
- $gray-700: #918BA9;
5
- $gray-600: #404559;
6
- $gray-500: #2F3342;
7
- $gray-400: #2C303F;
8
- $gray-300: #202435;
9
- $gray-200: #21242E;
10
- $gray-100: #1C1E27;
11
-
12
- $light: $gray-200;
13
- $dark: $gray-100;
14
-
15
- // body
16
- $body-color: $gray-900;
17
- $border-color: $gray-600;
18
- $body-bg: $gray-200;
19
- $card-bg: $gray-500;
20
- $input-bg: $gray-100;
@@ -1,119 +0,0 @@
1
- // primary color
2
- $primary: #8405FF !default;
3
- $secondary: #C182FF !default;
4
- $tertiary: #2F3342 !default;
5
-
6
- // color system
7
- $blue: #1761FD !default;
8
- $indigo: #8405FF !default;
9
- $purple: #9F9DFF !default;
10
- $purple-36: #9CA1DE;
11
- $pink: #FD3C97 !default;
12
- $red: #E36065 !default;
13
- $red-light: #FF9D9D !default;
14
- $orange: #FCB37C !default;
15
- $yellow: #FCE07C !default;
16
- $green: #03DABA !default;
17
- $teal: #03D87F !default;
18
- $cyan: #60C5FE !default;
19
-
20
- // gray
21
- $white: #FFF !default;
22
- $gray-100: #F5F5FF !default;
23
- $gray-200: #f1f5fa !default;
24
- $gray-300: #E5E4F7 !default;
25
- $gray-400: #b6c2e4 !default;
26
- $gray-500: #8997bd !default;
27
- $gray-600: #7081b9 !default;
28
- $gray-700: #303e67 !default;
29
- $gray-800: #2c3652 !default;
30
- $gray-900: #1d2c48 !default;
31
- $black: #26282D !default;
32
-
33
- $light: $gray-200 !default;
34
- $dark: $gray-900 !default;
35
-
36
- $white-3: #B9B9BA;
37
-
38
- $black-2 : #161617;
39
- $black-3 : #252526;
40
-
41
- // fonts
42
- $font-size-base: 1rem !default;
43
- $font-family-sans-serif: "Public Sans", sans-serif;
44
- $font-family-monospace: "Source Code Pro", monospace;
45
- $font-size-xs: $font-size-base * 0.75 !default;
46
- $font-size-md : $font-size-base * 1;
47
- $font-size-xl: $font-size-base * 1.375;
48
-
49
- // border
50
- $block-border: 1px solid $black-3;
51
-
52
- // border radius
53
- $border-radius: 0.25rem !default;
54
- $border-radius-lg: 0.5rem !default;
55
- $border-radius-sm: 0.15rem !default;
56
-
57
- // layout
58
- $menu-width: 268px !default;
59
- $spacer: 1rem !default;
60
-
61
- // body
62
- $body-color: $gray-800 !default;
63
- $body-tertiary-color: #FFFFFF;
64
- $body-tertiary-bg: #785EEA;
65
- $border-color: $gray-300 !default;
66
- $body-bg: $gray-100 !default;
67
- $card-bg: $white !default;
68
- $input-bg: $white !default;
69
-
70
- // link
71
- $link-color: $primary !default;
72
- $link-decoration: none;
73
-
74
- // border radius
75
- $border-radius: .25rem !default;
76
- $border-radius-sm: .15rem !default;
77
-
78
- // shadow
79
- $box-shadow-sm: 0 .125rem .25rem rgba($black, .075);
80
- $box-shadow: 0 .5rem 1rem rgba($black, .15);
81
- $box-shadow-lg: 0 1rem 3rem rgba($black, .175);
82
-
83
- // boostrap flags
84
- $enable-reduced-motion: false;
85
-
86
- // element-plus
87
- $types: primary, success, warning, danger, error, info !default;
88
- $element-colors: (
89
- 'white': $white,
90
- 'black': $black,
91
- 'primary': (
92
- 'base': $primary,
93
- ),
94
- 'success': (
95
- 'base': $green,
96
- ),
97
- 'warning': (
98
- 'base': $orange,
99
- ),
100
- 'danger': (
101
- 'base': $red,
102
- ),
103
- 'error': (
104
- 'base': $red,
105
- ),
106
- 'info': (
107
- 'base': $cyan,
108
- ),
109
- );
110
-
111
- $popper-margin: .2rem;
112
-
113
- $baseline-max-width: 730px;
114
-
115
- // bootstrap
116
- @import "bootstrap/scss/functions";
117
- @import "bootstrap/scss/mixins";
118
- @import "bootstrap/scss/vendor/rfs";
119
- @import 'bootstrap/scss/variables';