@emuanalytics/flow-rdf-ui 4.1.0-preview.17 → 4.1.0-preview.19

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.
@@ -20,6 +20,7 @@ class FlowUiBadge extends FlowRdfElement {
20
20
  constructor() {
21
21
  super(...arguments);
22
22
  this.variant = "primary";
23
+ this.size = "medium";
23
24
  this.pill = false;
24
25
  this.pulse = false;
25
26
  }
@@ -52,6 +53,9 @@ FlowUiBadge.styles = styles;
52
53
  __decorateClass([
53
54
  property({ reflect: true })
54
55
  ], FlowUiBadge.prototype, "variant", 2);
56
+ __decorateClass([
57
+ property({ reflect: true })
58
+ ], FlowUiBadge.prototype, "size", 2);
55
59
  __decorateClass([
56
60
  property({ type: Boolean, reflect: true })
57
61
  ], FlowUiBadge.prototype, "pill", 2);
@@ -60,6 +60,19 @@ const styles = css`
60
60
  --background-color: var(--flow-ui-color-danger-500);
61
61
  }
62
62
 
63
+ /* Size modifiers */
64
+ :host([size='small']) .badge {
65
+ font-size: var(--flow-ui-font-size-x-small);
66
+ }
67
+
68
+ :host([size='medium']) .badge {
69
+ font-size: var(--flow-ui-font-size-small);
70
+ }
71
+
72
+ :host([size='large']) .badge {
73
+ font-size: var(--flow-ui-font-size-medium);
74
+ }
75
+
63
76
  /* Pill modifier */
64
77
  .badge--pill {
65
78
  border-radius: var(--flow-ui-border-radius-pill);
@@ -8,7 +8,7 @@ function isStringType(field) {
8
8
  }
9
9
  function whereClausesFromRuleSet(rule, config, options) {
10
10
  if (isRule(rule)) {
11
- if (!rule.enabled) {
11
+ if (!rule.enabled || !rule.field) {
12
12
  return void 0;
13
13
  }
14
14
  if (isNil(rule.field) || isNil(rule.operator)) {
@@ -16,10 +16,6 @@ function whereClausesFromRuleSet(rule, config, options) {
16
16
  return void 0;
17
17
  }
18
18
  const field = config.fields[rule.field];
19
- if (!field) {
20
- console.warn(`flowQueryConverter: Skipping unknown field '${rule.field}' in rule`, rule);
21
- return void 0;
22
- }
23
19
  if (isNil(rule.value) && field.nullable !== true) {
24
20
  console.warn(`flowQueryConverter: Skipping nil field '${rule.field}' in rule (non-nullable)`, rule);
25
21
  return void 0;
@@ -29,7 +29,7 @@ function convertDateTime(value, field) {
29
29
  }
30
30
  function rulesetToJavascript(rule, config, options) {
31
31
  if (isRule(rule)) {
32
- if (!rule.enabled) {
32
+ if (!rule.enabled || !rule.field) {
33
33
  return void 0;
34
34
  }
35
35
  if (isNil(rule.field) || isNil(rule.operator)) {
@@ -37,10 +37,6 @@ function rulesetToJavascript(rule, config, options) {
37
37
  return void 0;
38
38
  }
39
39
  const field = config.fields[rule.field];
40
- if (!field) {
41
- console.warn(`JavascriptFilterConverter: Skipping unknown field '${rule.field}' in rule`, rule);
42
- return void 0;
43
- }
44
40
  if (isNil(rule.value) && field.nullable !== true) {
45
41
  console.warn(`JavascriptFilterConverter: Skipping nil field '${rule.field}' in rule (non-nullable)`, rule);
46
42
  return void 0;
@@ -8,7 +8,7 @@ function isStringType(field) {
8
8
  }
9
9
  function mapLayerFilterFromRuleSet(rule, config, options) {
10
10
  if (isRule(rule)) {
11
- if (!rule.enabled) {
11
+ if (!rule.enabled || !rule.field) {
12
12
  return void 0;
13
13
  }
14
14
  if (isNil(rule.field) || isNil(rule.operator)) {
@@ -16,10 +16,6 @@ function mapLayerFilterFromRuleSet(rule, config, options) {
16
16
  return void 0;
17
17
  }
18
18
  const field = config.fields[rule.field];
19
- if (!field) {
20
- console.warn(`mapLayerFilterConverter: Skipping unknown field '${rule.field}' in rule`, rule);
21
- return void 0;
22
- }
23
19
  if (isNil(rule.value) && field.nullable !== true) {
24
20
  console.warn(`mapLayerFilterConverter: Skipping nil field '${rule.field}' in rule (non-nullable)`, rule);
25
21
  return void 0;