@aziontech/webkit 1.1.0 → 1.2.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.
Files changed (25) hide show
  1. package/package.json +3 -2
  2. package/src/components/azion-system-status/azion-system-status.vue +123 -0
  3. package/src/components/azion-system-status/azion-system-status.vue.d.ts +4 -0
  4. package/src/components/azion-system-status/azion-system-status.vue.d.ts.map +1 -0
  5. package/src/components/azion-system-status/package.json +11 -0
  6. package/src/core/form/field-auto-complete/field-auto-complete.vue.d.ts +4 -4
  7. package/src/core/form/field-checkbox-block/field-checkbox-block.vue.d.ts +3 -3
  8. package/src/core/form/field-dropdown/field-dropdown.vue.d.ts +5 -5
  9. package/src/core/form/field-dropdown-icon/field-dropdown-icon.vue.d.ts +4 -4
  10. package/src/core/form/field-dropdown-lazy-loader/field-dropdown-lazy-loader.vue.d.ts +2 -2
  11. package/src/core/form/field-dropdown-lazy-loader-dynamic/field-dropdown-lazy-loader-dynamic.vue.d.ts +2 -2
  12. package/src/core/form/field-dropdown-lazy-loader-with-filter/field-dropdown-lazy-loader-with-filter.vue.d.ts +2 -2
  13. package/src/core/form/field-dropdown-multi-select-lazy-loader/field-dropdown-multi-select-lazy-loader.vue.d.ts +2 -2
  14. package/src/core/form/field-input-group/field-input-group.vue.d.ts +3 -3
  15. package/src/core/form/field-multi-select/field-multi-select.vue.d.ts +5 -5
  16. package/src/core/form/field-number/field-number.vue.d.ts +3 -3
  17. package/src/core/form/field-phone-number/field-phone-number.vue.d.ts +2 -2
  18. package/src/core/form/field-radio-block/field-radio-block.vue.d.ts +2 -2
  19. package/src/core/form/field-switch/field-switch.vue.d.ts +1 -1
  20. package/src/core/form/field-switch-block/field-switch-block.vue.d.ts +1 -1
  21. package/src/core/form/field-text/field-text.vue.d.ts +3 -3
  22. package/src/core/form/field-text-area/field-text-area.vue.d.ts +3 -3
  23. package/src/core/form/field-text-icon/field-text-icon.vue.d.ts +4 -4
  24. package/src/core/form/field-text-password/field-text-password.vue.d.ts +3 -3
  25. package/src/core/form/field-text-privacy/field-text-privacy.vue.d.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aziontech/webkit",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Reusable UI components and design system utilities for building Azion web interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -66,6 +66,7 @@
66
66
  "./field-text-password": "./src/core/form/field-text-password/field-text-password.vue",
67
67
  "./field-text-privacy": "./src/core/form/field-text-privacy/field-text-privacy.vue",
68
68
  "./label": "./src/core/form/label/label.vue",
69
- "./selector-block": "./src/core/selector-block/selector-block.vue"
69
+ "./selector-block": "./src/core/selector-block/selector-block.vue",
70
+ "./azion-system-status": "./src/components/azion-system-status/azion-system-status.vue"
70
71
  }
71
72
  }
@@ -0,0 +1,123 @@
1
+ <script setup>
2
+ // azion system status button
3
+ import PrimeButton from 'primevue/button'
4
+ import { ref, computed, onMounted } from 'vue'
5
+
6
+ const STATUS_PAGE = {
7
+ none: 'operational',
8
+ minor: 'minor-outage',
9
+ major: 'partial-outage',
10
+ critical: 'major-outage',
11
+ maintenance: 'maintenance'
12
+ }
13
+
14
+ const STATUS_PAGE_COLORS = {
15
+ none: '#8bc249',
16
+ minor: '#fec111',
17
+ major: '#f3652b',
18
+ critical: '#ff4141',
19
+ maintenance: '#6e7cf7'
20
+ }
21
+
22
+ const OPERATIONAL_STATUS = {
23
+ indicator: 'none',
24
+ description: 'All Systems Operational'
25
+ }
26
+
27
+ const STATUS_API_BASE_URL = 'https://status.azion.com/api/v2'
28
+
29
+ async function fetchStatusApi(endpoint) {
30
+ const response = await fetch(`${STATUS_API_BASE_URL}${endpoint}`, {
31
+ method: 'GET'
32
+ })
33
+
34
+ if (!response.ok) {
35
+ throw new Error(`HTTP error! status: ${response.status}`)
36
+ }
37
+
38
+ return response.json()
39
+ }
40
+
41
+ const error = ref(false)
42
+ const status = ref('')
43
+ const label = ref('')
44
+ const link = ref('https://status.azion.com')
45
+ const color = ref(STATUS_PAGE_COLORS.none)
46
+
47
+ const colorStatus = computed(() => ({ color: color.value }))
48
+
49
+ function redirectToLink() {
50
+ window.open(link.value, '_blank')
51
+ }
52
+
53
+ async function fetchComponentsStatus() {
54
+ return fetchStatusApi('/components.json')
55
+ }
56
+
57
+ async function fetchStatusPage() {
58
+ const data = await fetchStatusApi('/status.json')
59
+
60
+ if (data && data.status) {
61
+ return {
62
+ indicator: data.status.indicator,
63
+ description: data.status.description
64
+ }
65
+ }
66
+
67
+ return OPERATIONAL_STATUS
68
+ }
69
+
70
+ async function checkComponentStatus() {
71
+ try {
72
+ const data = await fetchComponentsStatus()
73
+ const components = data?.components || []
74
+
75
+ const checkComponents = (component) =>
76
+ component.status !== 'operational' && component.status !== 'partial_outage'
77
+ const hasImpactedComponent = components.some(checkComponents)
78
+
79
+ const statusResult = await getStatus(hasImpactedComponent)
80
+ updateSystemStatus(statusResult)
81
+ } catch (err) {
82
+ error.value = true
83
+ // eslint-disable-next-line no-console
84
+ console.error(err)
85
+ }
86
+ }
87
+
88
+ async function getStatus(checkStatusPage) {
89
+ if (checkStatusPage) {
90
+ return fetchStatusPage()
91
+ }
92
+
93
+ return OPERATIONAL_STATUS
94
+ }
95
+
96
+ function updateSystemStatus({ indicator, description }) {
97
+ status.value = STATUS_PAGE[indicator]
98
+ color.value = STATUS_PAGE_COLORS[indicator]
99
+ label.value = description
100
+ }
101
+
102
+ onMounted(() => {
103
+ checkComponentStatus()
104
+ })
105
+ </script>
106
+
107
+ <template>
108
+ <PrimeButton
109
+ outlined
110
+ class="surface-section min-w-fit hover:surface-hover whitespace-nowrap"
111
+ icon="pi pi-circle-fill"
112
+ size="small"
113
+ v-show="!error"
114
+ :label="label"
115
+ :loading="!label"
116
+ :pt="{
117
+ root: { class: 'h-8 flex-row items-center' },
118
+ label: { class: 'font-normal text-sm min-w-[9rem]' },
119
+ icon: { style: colorStatus, class: 'text-xs' }
120
+ }"
121
+ @click="redirectToLink"
122
+ />
123
+ </template>
@@ -0,0 +1,4 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
+ //# sourceMappingURL=azion-system-status.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azion-system-status.vue.d.ts","sourceRoot":"","sources":["azion-system-status.vue"],"names":[],"mappings":"wBA0SqB,OAAO,YAAY;;AAFxC,0SACG"}
@@ -0,0 +1,11 @@
1
+ {
2
+ "main": "./azion-system-status.vue",
3
+ "module": "./azion-system-status.vue",
4
+ "types": "./azion-system-status.vue.d.ts",
5
+ "browser": {
6
+ "./sfc": "./azion-system-status.vue"
7
+ },
8
+ "sideEffects": [
9
+ "*.vue"
10
+ ]
11
+ }
@@ -93,13 +93,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
93
93
  default: boolean;
94
94
  };
95
95
  }>> & Readonly<{}>, {
96
- value: string;
97
- label: string;
98
- placeholder: string;
99
96
  description: string;
97
+ label: string;
98
+ icon: string;
100
99
  disabled: boolean;
100
+ value: string;
101
+ placeholder: string;
101
102
  readonly: boolean;
102
- icon: string;
103
103
  suggestions: unknown[];
104
104
  onComplete: Function;
105
105
  completeOnFocus: boolean;
@@ -43,7 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
43
43
  required: true;
44
44
  };
45
45
  value: {
46
- type: (StringConstructor | BooleanConstructor | ObjectConstructor)[];
46
+ type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
47
47
  default: boolean;
48
48
  };
49
49
  binary: {
@@ -89,7 +89,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
89
89
  required: true;
90
90
  };
91
91
  value: {
92
- type: (StringConstructor | BooleanConstructor | ObjectConstructor)[];
92
+ type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
93
93
  default: boolean;
94
94
  };
95
95
  binary: {
@@ -97,8 +97,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
97
97
  default: boolean;
98
98
  };
99
99
  }>> & Readonly<{}>, {
100
- value: string | boolean | Record<string, any>;
101
100
  disabled: boolean;
101
+ value: string | boolean | Record<string, any>;
102
102
  auto: boolean;
103
103
  isCard: boolean;
104
104
  hideSelector: boolean;
@@ -175,18 +175,18 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
175
175
  onOnChange?: ((...args: any[]) => any) | undefined;
176
176
  onOnSelectOption?: ((...args: any[]) => any) | undefined;
177
177
  }>, {
178
- value: string | number;
179
- label: string;
180
- placeholder: string;
181
178
  description: string;
179
+ label: string;
180
+ loading: boolean;
181
+ pt: Record<string, any>;
182
182
  disabled: boolean;
183
+ value: string | number;
184
+ placeholder: string;
183
185
  filter: boolean;
184
186
  optionLabel: string;
185
187
  optionDisabled: string | Function;
186
188
  optionGroupLabel: string;
187
189
  optionGroupChildren: string;
188
- loading: boolean;
189
- pt: Record<string, any>;
190
190
  optionValue: string;
191
191
  options: unknown[];
192
192
  enableWorkaroundLabelToDisabledOptions: boolean;
@@ -97,13 +97,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
97
97
  }>> & Readonly<{
98
98
  onOnChange?: ((...args: any[]) => any) | undefined;
99
99
  }>, {
100
- value: string;
101
- label: string;
102
- placeholder: string;
103
100
  description: string;
101
+ label: string;
102
+ icon: string;
104
103
  disabled: boolean;
104
+ value: string;
105
+ placeholder: string;
105
106
  readonly: boolean;
106
- icon: string;
107
107
  suggestions: unknown[];
108
108
  onComplete: Function;
109
109
  completeOnFocus: boolean;
@@ -173,10 +173,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
173
173
  onOnAccessDenied?: ((...args: any[]) => any) | undefined;
174
174
  onOnLoaded?: ((...args: any[]) => any) | undefined;
175
175
  }>, {
176
- value: string | number;
176
+ description: string;
177
177
  label: string;
178
+ value: string | number;
178
179
  placeholder: string;
179
- description: string;
180
180
  optionLabel: string;
181
181
  optionDisabled: string | Function;
182
182
  optionGroupLabel: string;
@@ -137,10 +137,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
137
137
  onOnChange?: ((...args: any[]) => any) | undefined;
138
138
  onOnSelectOption?: ((...args: any[]) => any) | undefined;
139
139
  }>, {
140
- value: string | number;
140
+ description: string;
141
141
  label: string;
142
+ value: string | number;
142
143
  placeholder: string;
143
- description: string;
144
144
  optionLabel: string;
145
145
  optionDisabled: string | Function;
146
146
  optionValue: string;
@@ -177,10 +177,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
177
177
  onOnSelectOption?: ((...args: any[]) => any) | undefined;
178
178
  onOnAccessDenied?: ((...args: any[]) => any) | undefined;
179
179
  }>, {
180
- value: string | number;
180
+ description: string;
181
181
  label: string;
182
+ value: string | number;
182
183
  placeholder: string;
183
- description: string;
184
184
  optionLabel: string;
185
185
  optionDisabled: string | Function;
186
186
  optionGroupLabel: string;
@@ -143,10 +143,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
143
143
  onOnLoaded?: ((...args: any[]) => any) | undefined;
144
144
  onOnClear?: ((...args: any[]) => any) | undefined;
145
145
  }>, {
146
- value: unknown[];
146
+ description: string;
147
147
  label: string;
148
+ value: unknown[];
148
149
  placeholder: string;
149
- description: string;
150
150
  optionLabel: string;
151
151
  optionDisabled: string | Function;
152
152
  optionValue: string;
@@ -71,11 +71,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
71
71
  default: string;
72
72
  };
73
73
  }>> & Readonly<{}>, {
74
- value: string;
75
- label: string;
76
- placeholder: string;
77
74
  description: string;
75
+ label: string;
78
76
  disabled: boolean;
77
+ value: string;
78
+ placeholder: string;
79
79
  readonly: boolean;
80
80
  inputClass: string;
81
81
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -117,16 +117,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
117
117
  onOnBlur?: ((...args: any[]) => any) | undefined;
118
118
  onOnChange?: ((...args: any[]) => any) | undefined;
119
119
  }>, {
120
- value: unknown[];
121
- label: string;
122
- placeholder: string;
123
120
  description: string;
121
+ label: string;
122
+ loading: boolean;
123
+ pt: Record<string, any>;
124
124
  disabled: boolean;
125
+ value: unknown[];
126
+ placeholder: string;
125
127
  filter: boolean;
126
128
  optionLabel: string;
127
129
  optionDisabled: string | Function;
128
- loading: boolean;
129
- pt: Record<string, any>;
130
130
  optionValue: string;
131
131
  options: unknown[];
132
132
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -117,11 +117,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
117
117
  onInput?: ((...args: any[]) => any) | undefined;
118
118
  onBlur?: ((...args: any[]) => any) | undefined;
119
119
  }>, {
120
- value: string;
121
- label: string;
122
- placeholder: string;
123
120
  description: string;
121
+ label: string;
124
122
  disabled: boolean;
123
+ value: string;
124
+ placeholder: string;
125
125
  readonly: boolean;
126
126
  inputClass: string;
127
127
  aditionalError: string;
@@ -65,10 +65,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
65
65
  "onChange:countryCode"?: ((...args: any[]) => any) | undefined;
66
66
  "onChange:mobile"?: ((...args: any[]) => any) | undefined;
67
67
  }>, {
68
- label: string;
69
68
  description: string;
70
- disabled: boolean;
69
+ label: string;
71
70
  loading: boolean;
71
+ disabled: boolean;
72
72
  options: unknown[];
73
73
  countryCodeName: string;
74
74
  mobileName: string;
@@ -43,7 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
43
43
  required: true;
44
44
  };
45
45
  inputValue: {
46
- type: (StringConstructor | BooleanConstructor | ObjectConstructor)[];
46
+ type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
47
47
  default: boolean;
48
48
  };
49
49
  binary: {
@@ -91,7 +91,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
91
91
  required: true;
92
92
  };
93
93
  inputValue: {
94
- type: (StringConstructor | BooleanConstructor | ObjectConstructor)[];
94
+ type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
95
95
  default: boolean;
96
96
  };
97
97
  binary: {
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
27
27
  default: string;
28
28
  };
29
29
  }>> & Readonly<{}>, {
30
- label: string;
31
30
  description: string;
31
+ label: string;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
33
  //# sourceMappingURL=field-switch.vue.d.ts.map
@@ -109,8 +109,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
109
109
  }>> & Readonly<{
110
110
  onOnSwitchChange?: ((...args: any[]) => any) | undefined;
111
111
  }>, {
112
- value: boolean;
113
112
  disabled: boolean;
113
+ value: boolean;
114
114
  readonly: boolean;
115
115
  auto: boolean;
116
116
  isCard: boolean;
@@ -93,11 +93,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
93
93
  onInput?: ((...args: any[]) => any) | undefined;
94
94
  onBlur?: ((...args: any[]) => any) | undefined;
95
95
  }>, {
96
- value: string;
97
- label: string;
98
- placeholder: string;
99
96
  description: string;
97
+ label: string;
100
98
  disabled: boolean;
99
+ value: string;
100
+ placeholder: string;
101
101
  readonly: boolean;
102
102
  aditionalError: string;
103
103
  sensitive: boolean;
@@ -123,12 +123,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
123
123
  onInput?: ((...args: any[]) => any) | undefined;
124
124
  onBlur?: ((...args: any[]) => any) | undefined;
125
125
  }>, {
126
- value: string;
127
- placeholder: string;
128
126
  description: string;
129
- disabled: boolean;
130
127
  icon: string;
131
128
  loading: boolean;
129
+ disabled: boolean;
130
+ value: string;
131
+ placeholder: string;
132
132
  aditionalError: string;
133
133
  sensitive: boolean;
134
134
  rows: string | number;
@@ -87,13 +87,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
87
87
  }>> & Readonly<{
88
88
  "onClick-icon"?: ((...args: any[]) => any) | undefined;
89
89
  }>, {
90
- value: string;
91
- label: string;
92
- placeholder: string;
93
90
  description: string;
91
+ label: string;
92
+ icon: string;
94
93
  disabled: boolean;
94
+ value: string;
95
+ placeholder: string;
95
96
  readonly: boolean;
96
- icon: string;
97
97
  required: boolean;
98
98
  iconPosition: string;
99
99
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -93,11 +93,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
93
93
  onInput?: ((...args: any[]) => any) | undefined;
94
94
  onBlur?: ((...args: any[]) => any) | undefined;
95
95
  }>, {
96
- value: string;
97
- label: string;
98
- placeholder: string;
99
96
  description: string;
97
+ label: string;
100
98
  disabled: boolean;
99
+ value: string;
100
+ placeholder: string;
101
101
  readonly: boolean;
102
102
  aditionalError: string;
103
103
  sensitive: boolean;
@@ -103,11 +103,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
103
103
  onBlur?: ((...args: any[]) => any) | undefined;
104
104
  "onUpdate:isPublic"?: ((...args: any[]) => any) | undefined;
105
105
  }>, {
106
- value: string;
107
- label: string;
108
- placeholder: string;
109
106
  description: string;
107
+ label: string;
110
108
  disabled: boolean;
109
+ value: string;
110
+ placeholder: string;
111
111
  readonly: boolean;
112
112
  aditionalError: string;
113
113
  sensitive: boolean;