rerobe-js-orm 3.9.5 → 3.9.6
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.
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const FormState_1 = require("../FormState");
|
|
4
4
|
const ProductCollection_1 = require("../../models/ProductCollection");
|
|
5
5
|
const ProductCollectionFromFormState_1 = require("../../factories/ProductCollection/ProductCollectionFromFormState");
|
|
6
|
-
|
|
7
|
-
const lodash_1 = require("lodash");
|
|
6
|
+
const slug = require("slug");
|
|
8
7
|
class ProductCollectionFormState extends FormState_1.default {
|
|
9
8
|
constructor(props, opts) {
|
|
10
9
|
super();
|
|
@@ -43,7 +42,7 @@ class ProductCollectionFormState extends FormState_1.default {
|
|
|
43
42
|
const valid = !!this.props[fieldKey];
|
|
44
43
|
let onChangeHandler = (val) => this.textInputChangeHandler(fieldKey, String(val));
|
|
45
44
|
if (fieldKey === 'collectionId') {
|
|
46
|
-
onChangeHandler = (val) => this.textInputChangeHandler(fieldKey, (
|
|
45
|
+
onChangeHandler = (val) => this.textInputChangeHandler(fieldKey, slug(String(val)));
|
|
47
46
|
}
|
|
48
47
|
return {
|
|
49
48
|
inputValue,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rerobe-js-orm",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.6",
|
|
4
4
|
"description": "ReRobe's Javascript ORM Framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"homepage": "https://github.com/ReRobe/rerobe-product#readme",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^26.0.23",
|
|
32
|
+
"@types/slug": "^5.0.9",
|
|
32
33
|
"jest": "^26.6.3",
|
|
33
34
|
"prettier": "^2.3.0",
|
|
34
35
|
"ts-jest": "^26.5.6",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
],
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"js-base64": "^3.3.3",
|
|
44
|
-
"lodash": "^4.17.21"
|
|
45
|
+
"lodash": "^4.17.21",
|
|
46
|
+
"slug": "^9.1.0"
|
|
45
47
|
}
|
|
46
48
|
}
|