@limetech/lime-web-components 5.15.0 → 5.16.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.
@@ -1,3 +1,4 @@
1
+ import { LimeObject } from '../limeobject';
1
2
  /**
2
3
  * This interface defines callbacks intended to be registered to the {@link Condition} registry
3
4
  *
@@ -12,6 +13,22 @@ export type Condition<T = unknown> = {
12
13
  evaluate: (subject: T, params: any) => boolean;
13
14
  id: string;
14
15
  };
16
+ /**
17
+ * A condition to evaluate for a {@link LimeObject}
18
+ *
19
+ * @alpha
20
+ * @group Conditions
21
+ */
22
+ export type LimeObjectCondition = Condition<LimeObject> & {
23
+ type: 'limeobject';
24
+ };
25
+ /**
26
+ * Check if condition expects a lime object to be passed when it is evaluated
27
+ *
28
+ * @alpha
29
+ * @group Conditions
30
+ */
31
+ export declare function isLimeObjectCondition(condition: Condition): condition is Condition<LimeObject>;
15
32
  /**
16
33
  * Service for adding and retrieving, and checking {@link Condition}s to and from the condition registry
17
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"conditionregistry.d.ts","sourceRoot":"","sources":["../../src/conditionregistry/conditionregistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,IAAI;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAWb,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC;IAK/C,EAAE,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,OAAE;IAEnC;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,SAAS,OAAE;IAEtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;;OAIG;IACH,aAAa,IAAI,SAAS,EAAE,CAAC;IAE7B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC"}
1
+ {"version":3,"file":"conditionregistry.d.ts","sourceRoot":"","sources":["../../src/conditionregistry/conditionregistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,IAAI;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAWb,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC;IAK/C,EAAE,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG;IACtD,IAAI,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,SAAS,GACrB,SAAS,IAAI,SAAS,CAAC,UAAU,CAAC,CAEpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,OAAE;IAEnC;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,SAAS,OAAE;IAEtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;;OAIG;IACH,aAAa,IAAI,SAAS,EAAE,CAAC;IAE7B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC"}
@@ -1 +1,9 @@
1
- export {};
1
+ /**
2
+ * Check if condition expects a lime object to be passed when it is evaluated
3
+ *
4
+ * @alpha
5
+ * @group Conditions
6
+ */
7
+ export function isLimeObjectCondition(condition) {
8
+ return condition.type === 'limeobject';
9
+ }
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isLimeObjectCondition = void 0;
4
+ function isLimeObjectCondition(condition) {
5
+ return condition.type === 'limeobject';
6
+ }
7
+ exports.isLimeObjectCondition = isLimeObjectCondition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "5.15.0",
3
+ "version": "5.16.0",
4
4
  "description": "Lime Web Components",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@commitlint/config-conventional": "^16.2.4",
38
- "@microsoft/api-extractor": "^7.36.4",
38
+ "@microsoft/api-extractor": "^7.38.0",
39
39
  "@types/jest": "^27.5.0",
40
40
  "@typescript-eslint/eslint-plugin": "^5.62.0",
41
41
  "@typescript-eslint/parser": "^5.62.0",
42
42
  "commitizen": "^4.3.0",
43
43
  "cz-conventional-changelog": "^3.3.0",
44
- "eslint": "^8.49.0",
44
+ "eslint": "^8.50.0",
45
45
  "eslint-config-prettier": "^8.10.0",
46
46
  "eslint-plugin-ban": "^1.6.0",
47
47
  "eslint-plugin-prefer-arrow": "^1.2.3",