@aerogel/core 0.0.0-next.bb9dcdbb118a15d146d3a1c4cf861ca2f4f1eebd → 0.0.0-next.c4825c5cbe0fe3257e478c2a7ec8df27d5a72305
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/aerogel-core.cjs.js +1 -1
- package/dist/aerogel-core.cjs.js.map +1 -1
- package/dist/aerogel-core.d.ts +24 -3
- package/dist/aerogel-core.esm.js +1 -1
- package/dist/aerogel-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/lib/AGProgressBar.vue +2 -2
- package/src/components/modals/AGConfirmModal.ts +2 -1
- package/src/components/modals/AGConfirmModal.vue +1 -1
- package/src/services/App.state.ts +6 -1
- package/src/ui/UI.ts +5 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aerogel/core",
|
|
3
3
|
"description": "The Lightest Solid",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.c4825c5cbe0fe3257e478c2a7ec8df27d5a72305",
|
|
5
5
|
"main": "dist/aerogel-core.cjs.js",
|
|
6
6
|
"module": "dist/aerogel-core.esm.js",
|
|
7
7
|
"types": "dist/aerogel-core.d.ts",
|
|
@@ -18,10 +18,10 @@ import { requiredNumberProp, stringProp } from '@/utils/vue';
|
|
|
18
18
|
|
|
19
19
|
const props = defineProps({
|
|
20
20
|
progress: requiredNumberProp(),
|
|
21
|
-
|
|
21
|
+
barClass: stringProp(''),
|
|
22
22
|
});
|
|
23
23
|
const barClasses = computed(() => {
|
|
24
|
-
const classes = props.
|
|
24
|
+
const classes = props.barClass ?? '';
|
|
25
25
|
|
|
26
26
|
return `h-full w-full transition-transform duration-500 ease-linear ${
|
|
27
27
|
classes.includes('bg-') ? classes : `${classes} bg-gray-700`
|
|
@@ -3,7 +3,7 @@ import type { ExtractPropTypes } from 'vue';
|
|
|
3
3
|
import type { ObjectWithout, Pretty, SubPartial } from '@noeldemartin/utils';
|
|
4
4
|
|
|
5
5
|
import { Colors } from '@/components/constants';
|
|
6
|
-
import { enumProp, objectProp, requiredStringProp, stringProp } from '@/utils';
|
|
6
|
+
import { booleanProp, enumProp, objectProp, requiredStringProp, stringProp } from '@/utils';
|
|
7
7
|
import { translateWithDefault } from '@/lang';
|
|
8
8
|
import type { AcceptRefs } from '@/utils';
|
|
9
9
|
import type { ConfirmCheckboxes } from '@/ui';
|
|
@@ -17,6 +17,7 @@ export const confirmModalProps = {
|
|
|
17
17
|
cancelColor: enumProp(Colors, Colors.Clear),
|
|
18
18
|
checkboxes: objectProp<ConfirmCheckboxes>(),
|
|
19
19
|
actions: objectProp<Record<string, () => unknown>>(),
|
|
20
|
+
required: booleanProp(false),
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export type AGConfirmModalProps = Pretty<
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<AGButton :color="acceptColor" @click="close(true)">
|
|
7
7
|
{{ renderedAcceptText }}
|
|
8
8
|
</AGButton>
|
|
9
|
-
<AGButton :color="cancelColor" @click="close()">
|
|
9
|
+
<AGButton v-if="!required" :color="cancelColor" @click="close()">
|
|
10
10
|
{{ renderedCancelText }}
|
|
11
11
|
</AGButton>
|
|
12
12
|
</div>
|
|
@@ -16,18 +16,23 @@ export default defineServiceState({
|
|
|
16
16
|
},
|
|
17
17
|
computed: {
|
|
18
18
|
development: (state) => state.environment === 'development',
|
|
19
|
+
staging: (state) => state.environment === 'staging',
|
|
19
20
|
testing: (state) => state.environment === 'test' || state.environment === 'testing',
|
|
20
21
|
versionName(state): string {
|
|
21
22
|
if (this.development) {
|
|
22
23
|
return 'dev.' + Aerogel.sourceHash.toString().substring(0, 7);
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
if (this.staging) {
|
|
27
|
+
return 'staging.' + Aerogel.sourceHash.toString().substring(0, 7);
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
return `v${state.version}`;
|
|
26
31
|
},
|
|
27
32
|
versionUrl(state): string {
|
|
28
33
|
return (
|
|
29
34
|
state.sourceUrl +
|
|
30
|
-
(this.development ? `/tree/${Aerogel.sourceHash}` : `/releases/tag/${this.versionName}`)
|
|
35
|
+
(this.development || this.staging ? `/tree/${Aerogel.sourceHash}` : `/releases/tag/${this.versionName}`)
|
|
31
36
|
);
|
|
32
37
|
},
|
|
33
38
|
},
|
package/src/ui/UI.ts
CHANGED
|
@@ -44,6 +44,7 @@ export type ConfirmOptions = AcceptRefs<{
|
|
|
44
44
|
cancelText?: string;
|
|
45
45
|
cancelColor?: Color;
|
|
46
46
|
actions?: Record<string, () => unknown>;
|
|
47
|
+
required?: boolean;
|
|
47
48
|
}>;
|
|
48
49
|
|
|
49
50
|
export type LoadingOptions = AcceptRefs<{
|
|
@@ -114,15 +115,17 @@ export class UIService extends Service {
|
|
|
114
115
|
const getProperties = (): AGConfirmModalProps => {
|
|
115
116
|
if (typeof messageOrOptions !== 'string') {
|
|
116
117
|
return {
|
|
117
|
-
message: messageOrTitle,
|
|
118
118
|
...(messageOrOptions ?? {}),
|
|
119
|
+
message: messageOrTitle,
|
|
120
|
+
required: !!messageOrOptions?.required,
|
|
119
121
|
};
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
return {
|
|
125
|
+
...(options ?? {}),
|
|
123
126
|
title: messageOrTitle,
|
|
124
127
|
message: messageOrOptions,
|
|
125
|
-
|
|
128
|
+
required: !!options?.required,
|
|
126
129
|
};
|
|
127
130
|
};
|
|
128
131
|
const properties = getProperties();
|