@knotx/plugins-selection 0.4.14 → 0.4.15

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/dist/index.cjs CHANGED
@@ -124,6 +124,7 @@ class Selection extends (_a = core.BasePlugin, _selected_dec = [decorators.regis
124
124
  __publicField(this, "selectionAreaClassName");
125
125
  __publicField(this, "ruleMap", /* @__PURE__ */ new Map());
126
126
  __publicField(this, "enableDrag", true);
127
+ __publicField(this, "enableRangeSelect", true);
127
128
  __publicField(this, "isDragging", false);
128
129
  __publicField(this, "scrollingPosition", { x: 0, y: 0 });
129
130
  __publicField(this, "updateFrameId");
@@ -294,6 +295,9 @@ class Selection extends (_a = core.BasePlugin, _selected_dec = [decorators.regis
294
295
  if (config.enableDrag !== void 0) {
295
296
  this.enableDrag = config.enableDrag;
296
297
  }
298
+ if (config.enableRangeSelect !== void 0) {
299
+ this.enableRangeSelect = config.enableRangeSelect;
300
+ }
297
301
  }
298
302
  createSelection() {
299
303
  var _a2;
@@ -310,6 +314,9 @@ class Selection extends (_a = core.BasePlugin, _selected_dec = [decorators.regis
310
314
  startScrollMargins: { x: 24, y: 24 }
311
315
  }
312
316
  },
317
+ features: {
318
+ range: this.enableRangeSelect
319
+ },
313
320
  scrollController: {
314
321
  getScrollPosition: () => {
315
322
  return this.scrollingPosition;
package/dist/index.d.cts CHANGED
@@ -85,6 +85,11 @@ interface SelectionConfig {
85
85
  * default: true
86
86
  */
87
87
  enableDrag?: boolean;
88
+ /**
89
+ * enable range select with shift key
90
+ * default: true
91
+ */
92
+ enableRangeSelect?: boolean;
88
93
  rules?: SelectionRule[];
89
94
  /**
90
95
  * default:
@@ -103,6 +108,7 @@ declare class Selection extends BasePlugin<'selection', SelectionConfig> {
103
108
  private selectionAreaClassName;
104
109
  private ruleMap;
105
110
  private enableDrag;
111
+ private enableRangeSelect;
106
112
  private isDragging;
107
113
  private scrollingPosition;
108
114
  private updateFrameId;
package/dist/index.d.mts CHANGED
@@ -85,6 +85,11 @@ interface SelectionConfig {
85
85
  * default: true
86
86
  */
87
87
  enableDrag?: boolean;
88
+ /**
89
+ * enable range select with shift key
90
+ * default: true
91
+ */
92
+ enableRangeSelect?: boolean;
88
93
  rules?: SelectionRule[];
89
94
  /**
90
95
  * default:
@@ -103,6 +108,7 @@ declare class Selection extends BasePlugin<'selection', SelectionConfig> {
103
108
  private selectionAreaClassName;
104
109
  private ruleMap;
105
110
  private enableDrag;
111
+ private enableRangeSelect;
106
112
  private isDragging;
107
113
  private scrollingPosition;
108
114
  private updateFrameId;
package/dist/index.d.ts CHANGED
@@ -85,6 +85,11 @@ interface SelectionConfig {
85
85
  * default: true
86
86
  */
87
87
  enableDrag?: boolean;
88
+ /**
89
+ * enable range select with shift key
90
+ * default: true
91
+ */
92
+ enableRangeSelect?: boolean;
88
93
  rules?: SelectionRule[];
89
94
  /**
90
95
  * default:
@@ -103,6 +108,7 @@ declare class Selection extends BasePlugin<'selection', SelectionConfig> {
103
108
  private selectionAreaClassName;
104
109
  private ruleMap;
105
110
  private enableDrag;
111
+ private enableRangeSelect;
106
112
  private isDragging;
107
113
  private scrollingPosition;
108
114
  private updateFrameId;
package/dist/index.js CHANGED
@@ -118,6 +118,7 @@ class Selection extends (_a = BasePlugin, _selected_dec = [register("selected")]
118
118
  __publicField(this, "selectionAreaClassName");
119
119
  __publicField(this, "ruleMap", /* @__PURE__ */ new Map());
120
120
  __publicField(this, "enableDrag", true);
121
+ __publicField(this, "enableRangeSelect", true);
121
122
  __publicField(this, "isDragging", false);
122
123
  __publicField(this, "scrollingPosition", { x: 0, y: 0 });
123
124
  __publicField(this, "updateFrameId");
@@ -288,6 +289,9 @@ class Selection extends (_a = BasePlugin, _selected_dec = [register("selected")]
288
289
  if (config.enableDrag !== void 0) {
289
290
  this.enableDrag = config.enableDrag;
290
291
  }
292
+ if (config.enableRangeSelect !== void 0) {
293
+ this.enableRangeSelect = config.enableRangeSelect;
294
+ }
291
295
  }
292
296
  createSelection() {
293
297
  var _a2;
@@ -304,6 +308,9 @@ class Selection extends (_a = BasePlugin, _selected_dec = [register("selected")]
304
308
  startScrollMargins: { x: 24, y: 24 }
305
309
  }
306
310
  },
311
+ features: {
312
+ range: this.enableRangeSelect
313
+ },
307
314
  scrollController: {
308
315
  getScrollPosition: () => {
309
316
  return this.scrollingPosition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knotx/plugins-selection",
3
- "version": "0.4.14",
3
+ "version": "0.4.15",
4
4
  "description": "Selection Plugin for Knotx",
5
5
  "author": "boenfu",
6
6
  "license": "MIT",
@@ -28,19 +28,19 @@
28
28
  "dist"
29
29
  ],
30
30
  "peerDependencies": {
31
- "@knotx/plugins-canvas": "0.4.14"
31
+ "@knotx/plugins-canvas": "0.4.15"
32
32
  },
33
33
  "dependencies": {
34
34
  "@knotx/viselect": "^3.9.0",
35
35
  "rxjs": "^7.8.1",
36
- "@knotx/core": "0.4.14",
37
- "@knotx/decorators": "0.4.14"
36
+ "@knotx/core": "0.4.15",
37
+ "@knotx/decorators": "0.4.15"
38
38
  },
39
39
  "devDependencies": {
40
- "@knotx/build-config": "0.4.14",
41
- "@knotx/eslint-config": "0.4.14",
42
- "@knotx/plugins-canvas": "0.4.14",
43
- "@knotx/typescript-config": "0.4.14"
40
+ "@knotx/build-config": "0.4.15",
41
+ "@knotx/eslint-config": "0.4.15",
42
+ "@knotx/plugins-canvas": "0.4.15",
43
+ "@knotx/typescript-config": "0.4.15"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "unbuild",