Skip to content

Commit

Permalink
Merge pull request #13 from guillotinaweb/fix-build
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
ebrehault authored Feb 23, 2020
2 parents 48b83b0 + a04a2f2 commit 1942563
Show file tree
Hide file tree
Showing 16 changed files with 151 additions and 55 deletions.
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
language: node_js
version: 1.0
node_js:
- 12.4.0
cache:
directories:
- node_modules
dist: trusty
install:
- npm install
script:
- npm run build
notifications:
email:
- ebrehault@gmail.com
before_deploy: if [[ $TRAVIS_TAG ]]; then cd dist/grange-form; else git config --global
user.email "build@travis-ci.com" && git config --global user.name "Travis CI" &&
export PACKAGE_VERSION=$(npm run get_version | tail -n 1) && echo "TAGGING $PACKAGE_VERSION..."
&& git tag $PACKAGE_VERSION; fi
deploy:
- provider: releases
api_key:
secure: R9hi4Vb1wlV91CrGmpJ8jZdksyQ3QxlEqJpa3xPyJ3k1tWEETYZqQBsNvj1iXY9mJsecqmUobIMMGxYfHuq0/mwyHO8jIb7AQ0WA/sRixN3EOSiYrv/YlbpQukDny94Q5964GFipaR3FTlk4dnj0ss1jfODwrknEkeKXc8qvJCjxE3eS04q9LqSSE3EL/QCbtTWPGR7GnOy075xTIVaNrvDVaAIg8E3+U9fEiJ0CIubnlqYT13YqIJWW7wjWcx8aA2Rh64nMRxm/WLZ0wiuhwReZJfiU1qDaEhNdY6mgXYZsXqGtg6dnVB+G6aQY08m6OY07h8yPH5z3Ps16PB49j1Y/cg+TSLTiwbuGj/xsgoAkoNi+9T/tHeWN2vN4rPjWj8lCu31srUeWTTxUwcABo0dtx7m4uEych19hZ9s6ZYK9HCFRuF3vuFIrZa6Pe5HUIhSamXGiIj8nEl3d23Ji5XmXWz+pKWtXrxWkyZyCOXlVLA61GBmSCrpHmcOwHdlR2BDgYht2ion8zAJUWMGmdMusPMdV9FHWtaZM47X4MpjEKogHhBuCpqK+BHvv7gRA2bwFnV2EI5wa0XclsIgustkPoQAZSjzRCekvWGa4VtPXaNrnuD1aV0QLMlNeBYZUv8svGVBBtXXFYn1OzkjhDphaJwF9IfSgEhWUD4xRsPc=
name: Build $PACKAGE_VERSION
on:
repo: guillotinaweb/grange-form
branch: master
- provider: npm
edge: true
email: ebrehault@gmail.com
skip_cleanup: true
api_key:
secure: w7wqsdUrH7rQF9dtOwO/Ocdksmf1iSHF/WOxHNVGN7IlJiu9/eWJMDyoBoUQ4MuHAhduV9yFNzxqhyeMp8jDXuOP03KANbncrJWjAhkDX5wOuL44q6kges5GFrhg04p0sHJ7wFnwQUYK3jgBZyAs/IkHWtJLCDFaKBeK0YwiI6WMzWWLuJv4FAUI9FdhBRTqQJhpHC8dVGQhJpie2nidaz15Age67KWUXwH9yGnSeAkvYLk2exoOEBvxpYY42k7yWacYLmn26K7eqUqcvJWGfj2Olm2AI6EOA3ppjkrGQ0ZU8ai5NGFpfuT+brtmwP9AdBoEhI9JS5oJc3lm696WzfJPP4IxRGTvzIxE+VmCLchivyRiFpSKd2CfkAG/SK6KBn69qCW4FGDRaSbZjlO72E88dUteVm2RCQFUD7kf+DkNbTFvMRqQ+ko4lw3Lfh5eBdOj0gz9FwmwuY4CSDDJpMM3EEbvRFPAhEh772llL56KsZhNDeE3wpHnpZAj1Bpu/tetot5HYZPF9IgfuPCMP/LLmQJ5lf2ZiHXkFoyQudUX5oj6rtSsEv/KVcsqR+2Z2NMVdEoOENRpo2sgxgCivnsSyeGwA7br/8OLUTyCKLayorbEjdFsycLFER6xGm41GmElyyo0bmED45t/UMwWgJjGgNTFYcLGCvv/oj+o+io=
on:
tags: true
repo: guillotinaweb/grange-form
branch: master
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.3

- Auto-tagging and auto-publish on NPM [ebrehault]

# 1.0.2

- Fixing PA dependency [bloodbare]
Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"src/assets",
{
"glob": "**/*",
"input": "./src/develop/pastanaga-angular/projects/pastanaga/src/assets",
"input": "./node_modules/@guillotinaweb/pastanaga-angular/lib/assets",
"output": "assets"
}
],
Expand Down
3 changes: 2 additions & 1 deletion mrs.developer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"pastanaga-angular": {
"package": "@guillotinaweb/pastanaga-angular",
"path": "/projects/pastanaga/src",
"url": "git@github.com:plone/pastanaga-angular.git",
"branch": "master"
},
"ngx-schema-form": {
"path": "/projects/schema-form/src/lib",
"url": "git@github.com:guillotinaweb/ngx-schema-form.git",
"branch": "issue-circular-dep"
"branch": "master"
}
}
64 changes: 44 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "grange-form",
"version": "1.0.0",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build grange-form --prod && cp ./README.md ./dist/grange-form",
"build": "ng build grange-form-lib --prod && cp ./README.md ./dist/grange-form",
"build_demo": "ng build --prod --base-href /grange-form/dist/grange-form/",
"test": "ng test",
"get_version": "cat ./projects/grange-form/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]'",
Expand All @@ -21,10 +21,13 @@
"@angular/platform-browser": "^8.0.3",
"@angular/platform-browser-dynamic": "^8.0.3",
"@angular/router": "^8.0.3",
"@guillotinaweb/pastanaga-angular": "^1.11.0",
"angular-svg-icon": "^7.2.1",
"angular-traversal": "^1.3.1",
"core-js": "^2.5.4",
"date-fns": "^2.9.0",
"jexl": "^2.1.1",
"medium-editor": "5.23.3",
"ngx-schema-form": "^2.4.3",
"rxjs": "^6.5.2",
"rxjs-compat": "^6.3.3",
"z-schema": "^3.24.1",
Expand Down
14 changes: 11 additions & 3 deletions projects/grange-form/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{
"name": "grange-form",
"version": "1.0.1",
"name": "@guillotinaweb/grange-form",
"version": "1.0.3",
"license": "MIT",
"peerDependencies": {
"@angular/common": "^7.0.3",
"@angular/core": "^7.0.3"
"@angular/core": "^7.0.3",
"@guillotinaweb/pastanaga-angular": "^1.11.0",
"angular-traversal": "^1.2.7",
"date-fns": "^2.9.0",
"ngx-schema-form": "^2.4.3"
},
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion projects/grange-form/src/lib/checkbox.widget.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<pa-checkbox-tree ngDefaultControl [formControl]="control"
[checkboxes]="checkboxes">{{ schema.title }}</pa-checkbox-tree>
[checkboxes]="checkboxes" (selection)="onSelection($event)">{{ schema.title }}</pa-checkbox-tree>
15 changes: 13 additions & 2 deletions projects/grange-form/src/lib/grange-form.components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import {
RadioWidget,
CheckboxWidget,
ButtonWidget,
ControlWidget,
ArrayWidget,
} from 'ngx-schema-form';
import { ControlModel } from 'pastanaga-angular';
import { ControlModel } from '@guillotinaweb/pastanaga-angular';

@Component({
selector: 'gf-string-widget',
Expand Down Expand Up @@ -55,6 +54,10 @@ export class GrangeFormRadioWidget extends RadioWidget implements OnInit {
label: option.description,
}));
}

onSelection(selection: string[]) {
this.formProperty.setValue(selection, false);
}
}

@Component({
Expand All @@ -70,6 +73,14 @@ export class GrangeFormCheckboxWidget extends CheckboxWidget implements OnInit {
label: option.description,
}));
}

onSelection(selection: string[]) {
this.checked = selection.reduce((all, value) => {
all[value] = true;
return all;
}, {});
this.formProperty.setValue(Object.keys(this.checked), false);
}
}

@Component({
Expand Down
2 changes: 1 addition & 1 deletion projects/grange-form/src/lib/grange-form.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TextFieldModule,
ButtonModule,
SvgModule,
} from 'pastanaga-angular';
} from '@guillotinaweb/pastanaga-angular';

import {
GrangeFormStringWidget,
Expand Down
8 changes: 5 additions & 3 deletions projects/grange-form/src/lib/radio.widget.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<pa-checkbox-tree ngDefaultControl [formControl]="control"
type="radio"
[checkboxes]="checkboxes">{{ schema.title }}</pa-checkbox-tree>
<pa-checkbox-tree ngDefaultControl
[formControl]="control"
type="radio"
[checkboxes]="checkboxes"
(selection)="onSelection($event)">{{ schema.title }}</pa-checkbox-tree>
Loading

0 comments on commit 1942563

Please sign in to comment.