@limetech/lime-web-components 5.3.0 → 5.5.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,4 +1,15 @@
1
1
  import { DateTimeType } from './types';
2
+ /**
3
+ * The hour cycle to use.
4
+ * - `h11` is 12 hour clock where midnight and midday are 0:00.
5
+ * - `h12` is 12 hour clock where midnight and midday are 12:00.
6
+ * - `h23` is 24 hour clock where midnight is 0:00.
7
+ * - `h24` is 24 hour clock where midnight is 24:00.
8
+ *
9
+ * @alpha
10
+ * @group Localization
11
+ */
12
+ export type HourCycle = 'h11' | 'h12' | 'h23' | 'h24';
2
13
  /**
3
14
  * Options for `DateTimeFormatter.format()`.
4
15
  *
@@ -21,6 +32,10 @@ export interface DateTimeFormatterOptions {
21
32
  * property, and instead allow the service to use its own default value.
22
33
  */
23
34
  locale?: string;
35
+ /**
36
+ * The hour cycle to use.
37
+ */
38
+ hourCycle?: HourCycle;
24
39
  }
25
40
  /**
26
41
  * Service for formatting date and time values.
@@ -1 +1 @@
1
- {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../src/datetimeformatter/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IAEnB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACF,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,OAAO,EAAE,YAAY,GAAG,wBAAwB,GACjD,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../src/datetimeformatter/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IAEnB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACF,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,OAAO,EAAE,YAAY,GAAG,wBAAwB,GACjD,MAAM,CAAC;CACb"}
@@ -4,6 +4,7 @@ exports.limeobjects = exports.limetypes = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./component-testing"), exports);
6
6
  tslib_1.__exportStar(require("./platform"), exports);
7
+ tslib_1.__exportStar(require("./services"), exports);
7
8
  var limetypes_1 = require("./limetypes");
8
9
  Object.defineProperty(exports, "limetypes", { enumerable: true, get: function () { return limetypes_1.limetypes; } });
9
10
  var limeobjects_1 = require("./limeobjects");
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDateTimeFormatter = void 0;
4
+ var getDateTimeFormatter = function () {
5
+ return {
6
+ format: jest.fn(function (date, type) {
7
+ return "".concat(typeof date === 'object' ? JSON.stringify(date) : date, " - ").concat(typeof type === 'object' ? JSON.stringify(type) : type);
8
+ }),
9
+ };
10
+ };
11
+ exports.getDateTimeFormatter = getDateTimeFormatter;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./datetimeformatter"), exports);
5
+ tslib_1.__exportStar(require("./translator"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTranslator = void 0;
4
+ var getTranslator = function () {
5
+ return {
6
+ get: jest.fn(function (id, params) { return id; }),
7
+ };
8
+ };
9
+ exports.getTranslator = getTranslator;
@@ -33,6 +33,14 @@ export interface Option {
33
33
  id?: number;
34
34
  }
35
35
  /**
36
+ * The subset of `PropertyType`s that represent a date or time of some kind.
37
+ *
38
+ * **NOTE**<br>
39
+ * For legacy reasons:
40
+ * - the type `time` represents a value with date _and_ time
41
+ * - the type `timeofday` represents a value with _only_ time
42
+ * - there is no type for "week"; instead week properties use the type `time` and are configured as "week" in the applicable view config
43
+ *
36
44
  * @public
37
45
  * @group Lime types
38
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../src/limetype/property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,GAAG,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE;QACP,WAAW,EAAE,MAAM,QAAQ,CAAC;QAC5B,gBAAgB,EAAE,MAAM,YAAY,CAAC;KACxC,CAAC;CACL;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACnB,GAAG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1,6 @@
1
1
  export * from './component-testing';
2
2
  export * from './platform';
3
+ export * from './services';
3
4
  export { limetypes } from './limetypes';
4
5
  export { limeobjects } from './limeobjects';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './component-testing';
2
2
  export * from './platform';
3
+ export * from './services';
3
4
  export { limetypes } from './limetypes';
4
5
  export { limeobjects } from './limeobjects';
@@ -0,0 +1,3 @@
1
+ import { DateTimeFormatter } from '../../datetimeformatter';
2
+ export declare const getDateTimeFormatter: () => DateTimeFormatter;
3
+ //# sourceMappingURL=datetimeformatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../../src/testing/services/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAGpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,oBAAoB,yBAYhC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const getDateTimeFormatter = () => {
2
+ return {
3
+ format: jest.fn((date, type) => `${typeof date === 'object' ? JSON.stringify(date) : date} - ${typeof type === 'object' ? JSON.stringify(type) : type}`),
4
+ };
5
+ };
@@ -0,0 +1,3 @@
1
+ export * from './datetimeformatter';
2
+ export * from './translator';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './datetimeformatter';
2
+ export * from './translator';
@@ -0,0 +1,3 @@
1
+ import { Translator } from '../../translator';
2
+ export declare const getTranslator: () => Translator;
3
+ //# sourceMappingURL=translator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../../src/testing/services/translator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,aAAa,kBASzB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const getTranslator = () => {
2
+ return {
3
+ get: jest.fn((id, params) => id),
4
+ };
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "5.3.0",
3
+ "version": "5.5.0",
4
4
  "description": "Lime Web Components",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -29,19 +29,19 @@
29
29
  "postpublish:dry-run": "npm run docs:publish -- --v=current --dryRun"
30
30
  },
31
31
  "dependencies": {
32
- "@stencil/core": "^2.22.1",
32
+ "@stencil/core": "^2.22.2",
33
33
  "rxjs": "^7.8.0",
34
34
  "tslib": "^2.5.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@commitlint/config-conventional": "^16.2.4",
38
- "@microsoft/api-extractor": "^7.34.1",
38
+ "@microsoft/api-extractor": "^7.34.4",
39
39
  "@types/jest": "^27.5.0",
40
- "@typescript-eslint/eslint-plugin": "^5.49.0",
41
- "@typescript-eslint/parser": "^5.49.0",
40
+ "@typescript-eslint/eslint-plugin": "^5.52.0",
41
+ "@typescript-eslint/parser": "^5.52.0",
42
42
  "commitizen": "^4.3.0",
43
43
  "cz-conventional-changelog": "^3.3.0",
44
- "eslint": "^8.32.0",
44
+ "eslint": "^8.34.0",
45
45
  "eslint-config-prettier": "^8.6.0",
46
46
  "eslint-plugin-ban": "^1.6.0",
47
47
  "eslint-plugin-prefer-arrow": "^1.2.3",
@@ -51,13 +51,13 @@
51
51
  "eslint-plugin-tsdoc": "^0.2.17",
52
52
  "jest": "^27.5.1",
53
53
  "jest-cli": "^27.5.1",
54
- "prettier": "^2.8.3",
54
+ "prettier": "^2.8.4",
55
55
  "replace-in-file": "^6.3.5",
56
56
  "shelljs": "0.8.5",
57
57
  "typedoc": "^0.23.24",
58
58
  "typedoc-plugin-markdown": "~2.4.2",
59
59
  "typescript": "^4.9.5",
60
- "yargs": "^17.6.2"
60
+ "yargs": "^17.7.0"
61
61
  },
62
62
  "keywords": [
63
63
  "lime web components",