Skip to content

Commit 81f8f50

Browse files
committed
'[CHECKPOINT]' updated package to conform with @windmillcode/wml-components-base version 19.1.3111
1 parent a7591e5 commit 81f8f50

File tree

26 files changed

+138
-102
lines changed

26 files changed

+138
-102
lines changed

MISC.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

projects/wml-accordion/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.1.3",
1111
"@angular/core": "^19.1.3",
12-
"@windmillcode/angular-wml-components-base": "^19.1.3100",
13-
"@windmillcode/wml-components-base": "^19.1.3100"
12+
"@windmillcode/angular-wml-components-base": "^19.1.3111",
13+
"@windmillcode/wml-components-base": "^19.1.3111"
1414
},
1515
"private": false,
1616
"repository": {
@@ -20,5 +20,5 @@
2020
"scripts": {
2121
"build": "npx ng build"
2222
},
23-
"version": "19.1.3100"
23+
"version": "19.1.3111"
2424
}

projects/wml-angular-components-base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.1.3",
1111
"@angular/core": "^19.1.3",
12-
"@windmillcode/wml-components-base": "^19.1.3100"
12+
"@windmillcode/wml-components-base": "^19.1.3111"
1313
},
1414
"private": false,
1515
"repository": {
@@ -19,5 +19,5 @@
1919
"scripts": {
2020
"build": "npx ng build"
2121
},
22-
"version": "19.1.3100"
22+
"version": "19.1.3111"
2323
}

projects/wml-button/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.1.3",
1111
"@angular/core": "^19.1.3",
12-
"@windmillcode/angular-wml-components-base": "^19.1.3100",
13-
"@windmillcode/wml-components-base": "^19.1.3100"
12+
"@windmillcode/angular-wml-components-base": "^19.1.3111",
13+
"@windmillcode/wml-components-base": "^19.1.3111"
1414
},
1515
"private": false,
1616
"repository": {
@@ -20,5 +20,5 @@
2020
"scripts": {
2121
"build": "npx ng build"
2222
},
23-
"version": "19.1.3100"
23+
"version": "19.1.3111"
2424
}

projects/wml-carousel/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.1.3",
1111
"@angular/core": "^19.1.3",
12-
"@windmillcode/angular-wml-components-base": "^19.1.3100",
13-
"@windmillcode/wml-components-base": "^19.1.3100"
12+
"@windmillcode/angular-wml-components-base": "^19.1.3111",
13+
"@windmillcode/wml-components-base": "^19.1.3111"
1414
},
1515
"private": false,
1616
"repository": {
@@ -20,5 +20,5 @@
2020
"scripts": {
2121
"build": "npx ng build"
2222
},
23-
"version": "19.1.3100"
23+
"version": "19.1.3111"
2424
}

projects/wml-chips/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"@angular/cdk": "^19.1.3",
1212
"@angular/common": "^19.1.3",
1313
"@angular/core": "^19.1.3",
14-
"@windmillcode/angular-wml-button": "^19.1.3100",
15-
"@windmillcode/angular-wml-components-base": "^19.1.3100",
16-
"@windmillcode/wml-components-base": "^19.1.3100"
14+
"@windmillcode/angular-wml-button": "^19.1.3111",
15+
"@windmillcode/angular-wml-components-base": "^19.1.3111",
16+
"@windmillcode/wml-components-base": "^19.1.3111"
1717
},
1818
"private": false,
1919
"repository": {
@@ -24,5 +24,5 @@
2424
"build": "npx ng build",
2525
"test": "npx ng test wml-chips --code-coverage"
2626
},
27-
"version": "19.1.3100"
27+
"version": "19.1.3111"
2828
}

projects/wml-components-base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"scripts": {
1414
"build": "npx ng build"
1515
},
16-
"version": "19.1.3100"
16+
"version": "19.1.3111"
1717
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { WMLConstructorDecorator } from "./models";
2+
3+
4+
// TODO find a library that is framework and agnosticfriendly
5+
@WMLConstructorDecorator
6+
export class WMLStringObject {
7+
constructor(props = {}) {
8+
Object.assign(this, props);
9+
}
10+
11+
orig = "myString";
12+
entitySuffix = "";
13+
14+
get prefix() {
15+
return this.orig.split(this.entitySuffix)[0];
16+
}
17+
18+
camelCase = (stripSuffix = true, suffix = "") => {
19+
const str = stripSuffix ? this.prefix : this.orig;
20+
return str
21+
.replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
22+
.replace(/^(.)/, (_, c) => c.toLowerCase()) + suffix;
23+
};
24+
25+
classify = (stripSuffix = true, suffix = "") => {
26+
const str = stripSuffix ? this.prefix : this.orig;
27+
return str
28+
.replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
29+
.replace(/^(.)/, (_, c) => c.toUpperCase()) + suffix;
30+
};
31+
32+
capitalize = (stripSuffix = true, suffix = "") => {
33+
const str = stripSuffix ? this.prefix : this.orig;
34+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase() + suffix;
35+
};
36+
37+
dasherize = (stripSuffix = true, suffix = "") => {
38+
const str = stripSuffix ? this.prefix : this.orig;
39+
return str.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/[_\s]+/g, "-") + suffix;
40+
};
41+
42+
lowerCase = (stripSuffix = true, suffix = "") => {
43+
return (stripSuffix ? this.prefix : this.orig).toLowerCase() + suffix;
44+
};
45+
46+
pascalCase = (stripSuffix = true, suffix = "") => {
47+
const str = stripSuffix ? this.prefix : this.orig;
48+
return str
49+
.replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
50+
.replace(/^(.)/, (_, c) => c.toUpperCase()) + suffix;
51+
};
52+
53+
upperCase = (stripSuffix = true, suffix = "") => {
54+
return (stripSuffix ? this.prefix : this.orig).toUpperCase() + suffix;
55+
};
56+
57+
titleCase = (stripSuffix = true, suffix = "") => {
58+
const str = stripSuffix ? this.prefix : this.orig;
59+
return str
60+
.replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""))
61+
.replace(/^(.)/, (_, c) => c.toUpperCase()) + suffix;
62+
};
63+
}
64+
65+
66+
67+

projects/wml-components-base/src/public-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ export * from './lib/models';
77

88
export * from './lib/error-utils';
99
export * from './lib/data-source-utils';
10+
export * from './lib/string-utils';

projects/wml-field/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.1.3",
1111
"@angular/core": "^19.1.3",
12-
"@windmillcode/angular-wml-components-base": "^19.1.3100",
13-
"@windmillcode/wml-components-base": "^19.1.3100"
12+
"@windmillcode/angular-wml-components-base": "^19.1.3111",
13+
"@windmillcode/wml-components-base": "^19.1.3111"
1414
},
1515
"private": false,
1616
"repository": {
@@ -20,5 +20,5 @@
2020
"scripts": {
2121
"build": "npx ng build"
2222
},
23-
"version": "19.1.3100"
23+
"version": "19.1.3111"
2424
}

0 commit comments

Comments
 (0)