@ekzo-dev/bootstrap-addons 5.2.20 → 5.2.22

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ekzo-dev/bootstrap-addons",
3
3
  "description": "Aurelia Bootstrap additional component",
4
- "version": "5.2.20",
4
+ "version": "5.2.22",
5
5
  "homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,6 +17,10 @@ interface IDuration {
17
17
  seconds?: string;
18
18
  }
19
19
 
20
+ /**
21
+ * https://github.com/whatwg/html/issues/5488
22
+ * https://github.com/tc39/proposal-intl-duration-format
23
+ */
20
24
  @customElement({
21
25
  name: 'bs-duration-input',
22
26
  template,
@@ -190,9 +190,17 @@ export class BsJsonInput {
190
190
  }
191
191
 
192
192
  #initAjv($schema: string, ajvOptions: Options): Ajv {
193
+ // use 'u' flag when editing JsonSchema itself, as 2020-12 meta-schema has incompatible with 'v' flag regexp's
194
+ const regExp = (pattern: string) => new RegExp(pattern, this.jsonSchema === true ? 'u' : 'v');
195
+
196
+ regExp.code = 'regexp';
197
+
193
198
  const options: Options = {
194
199
  strict: false,
195
200
  multipleOfPrecision: 2,
201
+ code: {
202
+ regExp,
203
+ },
196
204
  ...ajvOptions,
197
205
  };
198
206
  let ajv: Ajv;