@dative-gpi/foundation-shared-components 1.0.153 → 1.0.155
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/components/FSChip.vue
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
-
:is="$props.to ? 'FSRouterLink' : 'div'"
|
|
3
|
+
:is="$props.to && $props.clickable ? 'FSRouterLink' : 'div'"
|
|
4
|
+
class="fs-chip-container"
|
|
4
5
|
v-bind="$props.to ? { to: $props.to } : {}"
|
|
5
6
|
@click="$emit('click', $event)"
|
|
6
7
|
>
|
|
@@ -138,9 +139,9 @@ export default defineComponent({
|
|
|
138
139
|
"--fs-chip-background-color" : backgrounds.base,
|
|
139
140
|
"--fs-chip-border-color" : colors.value.base,
|
|
140
141
|
"--fs-chip-color" : colors.value.base,
|
|
141
|
-
"--fs-chip-hover-background-color" :
|
|
142
|
+
"--fs-chip-hover-background-color" : colors.value.base,
|
|
142
143
|
"--fs-chip-hover-border-color" : colors.value.base,
|
|
143
|
-
"--fs-chip-hover-color" : colors.value.
|
|
144
|
+
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
144
145
|
"--fs-chip-active-background-color": backgrounds.base,
|
|
145
146
|
"--fs-chip-active-border-color" : colors.value.dark,
|
|
146
147
|
"--fs-chip-active-color" : colors.value.dark
|
|
@@ -150,8 +151,8 @@ export default defineComponent({
|
|
|
150
151
|
"--fs-chip-background-color" : colors.value.base,
|
|
151
152
|
"--fs-chip-border-color" : colors.value.base,
|
|
152
153
|
"--fs-chip-color" : colors.value.baseContrast!,
|
|
153
|
-
"--fs-chip-hover-background-color" : colors.value.
|
|
154
|
-
"--fs-chip-hover-border-color" : colors.value.
|
|
154
|
+
"--fs-chip-hover-background-color" : colors.value.soft,
|
|
155
|
+
"--fs-chip-hover-border-color" : colors.value.soft,
|
|
155
156
|
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
156
157
|
"--fs-chip-active-background-color": colors.value.dark,
|
|
157
158
|
"--fs-chip-active-border-color" : colors.value.darkContrast!,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.155",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.155",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.155"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "1cec447dda0a3f4af92ee9e6457134a5b4cf64e1"
|
|
39
39
|
}
|
package/utils/operations.ts
CHANGED
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
const MinusOperator = "-";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Splits an expression by operators while keeping unary minus signs.
|
|
5
|
+
*/
|
|
6
|
+
const splitByOperators = (expression: string): string[] => {
|
|
7
|
+
const tokens: string[] = [];
|
|
8
|
+
let current = '';
|
|
9
|
+
let expectOperand = true;
|
|
10
|
+
|
|
11
|
+
for (let i = 0; i < expression.length; i++) {
|
|
12
|
+
const char = expression[i];
|
|
13
|
+
if ('+-*/'.includes(char)) {
|
|
14
|
+
const isUnaryMinus = char === '-' && expectOperand;
|
|
15
|
+
if (isUnaryMinus) {
|
|
16
|
+
current += char;
|
|
17
|
+
expectOperand = true;
|
|
18
|
+
} else {
|
|
19
|
+
if (expectOperand) {
|
|
20
|
+
// 2 consecutive operators or operator at the start
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
if (current !== '') {
|
|
24
|
+
tokens.push(current);
|
|
25
|
+
current = '';
|
|
26
|
+
}
|
|
27
|
+
tokens.push(char);
|
|
28
|
+
expectOperand = true;
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
current += char;
|
|
32
|
+
expectOperand = false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (current !== '') {
|
|
36
|
+
tokens.push(current);
|
|
37
|
+
}
|
|
38
|
+
return tokens;
|
|
39
|
+
};
|
|
5
40
|
|
|
6
41
|
// Matches a nested block of parenthesis
|
|
7
42
|
const parenthesisRegex = new RegExp(/\([^)(]+\)/gm);
|
|
@@ -14,7 +49,11 @@ const validateBlock = (block: string, operands: string[] = [], variables: string
|
|
|
14
49
|
block = block.replaceAll("(", "").replaceAll(")", "");
|
|
15
50
|
|
|
16
51
|
// Split block on operators (Leave negative signs)
|
|
17
|
-
const
|
|
52
|
+
const tokens = splitByOperators(block);
|
|
53
|
+
if (tokens.length === 0) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const components = tokens.filter(token => !'+-*/'.includes(token));
|
|
18
57
|
|
|
19
58
|
// Check if each bit is a valid operand
|
|
20
59
|
for (let i = 0; i < components.length; i++) {
|