@ekzo-dev/bootstrap-addons 5.2.22 → 5.2.24

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.22",
4
+ "version": "5.2.24",
5
5
  "homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
6
6
  "repository": {
7
7
  "type": "git",
@@ -15,7 +15,7 @@ const Overview: Story = (args): StoryFnAureliaReturnType => ({
15
15
 
16
16
  Overview.args = {
17
17
  jsonSchema: {
18
- $schema: 'http://json-schema.org/draft-07/schema#',
18
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
19
19
  type: 'object',
20
20
  properties: {
21
21
  enum: {
@@ -27,6 +27,11 @@ import addFormats from 'ajv-formats';
27
27
  import { bindable, BindingMode, customElement } from 'aurelia';
28
28
  import { JSONValue, parsePath } from 'immutable-json-patch';
29
29
 
30
+ const patternMap: Record<string, string> = {
31
+ '^[A-Za-z_][-A-Za-z0-9._]*$': '^[A-Za-z_][\\-A-Za-z0-9._]*$',
32
+ '^[A-Za-z][-A-Za-z0-9.:_]*$': '^[A-Za-z][\\-A-Za-z0-9.:_]*$',
33
+ };
34
+
30
35
  @customElement({
31
36
  name: 'bs-json-input',
32
37
  template,
@@ -190,8 +195,8 @@ export class BsJsonInput {
190
195
  }
191
196
 
192
197
  #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');
198
+ // some regexp's in 2019-09/2020-12 meta-schemas are not compatible with 'v' flag, so update them
199
+ const regExp = (pattern: string) => new RegExp(patternMap[pattern] ?? pattern, 'v');
195
200
 
196
201
  regExp.code = 'regexp';
197
202
 
@@ -36,6 +36,7 @@
36
36
  title.bind="title & attr"
37
37
  autocomplete="off"
38
38
  keydown.trigger="$event.preventDefault()"
39
+ ref="control"
39
40
  />
40
41
  <bs-dropdown-menu>
41
42
  <div bs-dropdown-item="text" if.bind="optionsCount > 10">
@@ -64,6 +64,15 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
64
64
 
65
65
  selectOption(option: ISelectOption) {
66
66
  this.value = option.value;
67
+ this.#dispatchEvents();
68
+ }
69
+
70
+ #dispatchEvents() {
71
+ const change = new Event('change', { bubbles: true });
72
+ const input = new Event('input', { bubbles: true });
73
+
74
+ this.control.dispatchEvent(input);
75
+ this.control.dispatchEvent(change);
67
76
  }
68
77
 
69
78
  #setHeight(): void {