add dot syntax

This commit is contained in:
Clément 2018-10-17 23:04:03 +02:00
parent 78551c4579
commit ca4735d3bc
11 changed files with 130 additions and 35 deletions

View File

@ -7,7 +7,7 @@ SCRIPT_DEST := $(SCRIPT_SRC:src/%=$(DIST_DIR)/%)
default: build default: build
clean: clean:
git clean -fXd git clean -fXd -e !src/config.pug
install: node_modules copy_lib copy_samples submodules install: node_modules copy_lib copy_samples submodules
@ -37,7 +37,7 @@ node_modules:
copy_lib: copy_lib:
@node copy_lib.js @node copy_lib.js
# sample # samples
copy_samples: copy_samples:
@cp -n src/config.sample.pug src/config.pug @cp -n src/config.sample.pug src/config.pug
@ -57,11 +57,16 @@ $(DIST_DIR)/%.js: src/%.js
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
@node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@ @node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@
buildprod: buildprod: build
export SDN="https://test-paris.happy-dev.fr"; \ export SDN="https://test-paris.happy-dev.fr"; \
$(MAKE) $(DIST_DIR)/index.html -B $(MAKE) $(DIST_DIR)/index.html -B
deploy: pull install bluid
pull:
git pull
sync: sync:
rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/oidc-client-config.json rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/oidc-client-config.json
.PHONY: default install submodules copy_lib copy_samples build watch serve clean sync buildprod .PHONY: default install submodules copy_lib copy_samples build watch serve clean sync buildprod pull deploy

View File

@ -1,3 +1,5 @@
node_modules/normalize.css/normalize.css node_modules/normalize.css/normalize.css
node_modules/@webcomponents/webcomponentsjs node_modules/@webcomponents/webcomponentsjs
node_modules/@webcomponents/html-imports/src/html-imports.js node_modules/@webcomponents/html-imports/src/html-imports.js
node_modules/oidc-client/dist/oidc-client.min.js
node_modules/oidc-client/dist/oidc-client.js

81
package-lock.json generated
View File

@ -1050,11 +1050,29 @@
"is-buffer": "^1.1.5" "is-buffer": "^1.1.5"
} }
}, },
"babel-polyfill": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
"integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
"optional": true,
"requires": {
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"regenerator-runtime": "^0.10.5"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
"optional": true
}
}
},
"babel-runtime": { "babel-runtime": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": { "requires": {
"core-js": "^2.4.0", "core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0" "regenerator-runtime": "^0.11.0"
@ -1841,8 +1859,7 @@
"core-js": { "core-js": {
"version": "2.5.7", "version": "2.5.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",
"integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw=="
"dev": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -2580,7 +2597,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -2601,12 +2619,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -2621,17 +2641,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -2748,7 +2771,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -2760,6 +2784,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -2774,6 +2799,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -2781,12 +2807,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -2805,6 +2833,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -2885,7 +2914,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -2897,6 +2927,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -2982,7 +3013,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -3018,6 +3050,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -3037,6 +3070,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -3080,12 +3114,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
@ -3844,6 +3880,11 @@
"verror": "1.10.0" "verror": "1.10.0"
} }
}, },
"jsrsasign": {
"version": "8.0.12",
"resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.12.tgz",
"integrity": "sha1-Iqu5ZW00owuVMENnIINeicLlwxY="
},
"jstransformer": { "jstransformer": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
@ -4432,6 +4473,15 @@
"isobject": "^3.0.1" "isobject": "^3.0.1"
} }
}, },
"oidc-client": {
"version": "1.5.3-beta.1",
"resolved": "https://registry.npmjs.org/oidc-client/-/oidc-client-1.5.3-beta.1.tgz",
"integrity": "sha512-p4EcEuMuVV2mwcH59BSNE/0zNalksELSpOp/r7oH4vGppIwsE1cHvXhHqc4hX7jpfrxU7wYsEZ74ECNXXnZB5g==",
"requires": {
"babel-polyfill": ">=6.9.1",
"jsrsasign": "^8.0.12"
}
},
"on-finished": { "on-finished": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@ -4995,8 +5045,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.11.1", "version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
"dev": true
}, },
"regenerator-transform": { "regenerator-transform": {
"version": "0.13.3", "version": "0.13.3",

View File

@ -16,6 +16,7 @@
"@webcomponents/webcomponentsjs": "^1.2.7", "@webcomponents/webcomponentsjs": "^1.2.7",
"include-media": "^1.4.9", "include-media": "^1.4.9",
"normalize.css": "^8.0.0", "normalize.css": "^8.0.0",
"oidc-client": "^1.5.3-beta.1",
"simple-line-icons": "^2.4.1" "simple-line-icons": "^2.4.1"
} }
} }

View File

@ -3,9 +3,9 @@
script(src="/lib/webcomponentsjs/webcomponents-loader.js") script(src="/lib/webcomponentsjs/webcomponents-loader.js")
//- script(src="lib/html-imports.js") //- script(src="lib/html-imports.js")
script(src="https://cdn.happy-dev.fr/oidc-client/oidc-client.min.js") script(src="/lib/oidc-client.js")
script( script(
src="lib/sib-oidc/sib-oidc.js" src="/lib/sib-oidc/sib-oidc.js"
data-authority='https://test-paris.happy-dev.fr/openid/', data-authority='https://test-paris.happy-dev.fr/openid/',
data-client_id='833925', data-client_id='833925',
data-response_type='id_token token', data-response_type='id_token token',
@ -30,7 +30,7 @@ link(href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,6
//- local //- local
link(rel='import', href='/lib/sib-core/sib-display.html') link(rel='import', href='/lib/sib-core/sib-display.html')
link(rel='import', href='/lib/sib-router/sib-router.html') link(rel='import', href='/lib/sib-router/sib-router.html')
link(rel='import', href='/lib/sib-chat/sib-chat.html') //- link(rel='import', href='/lib/sib-chat/sib-chat.html')
//- cdn //- cdn
link(rel='import', href="https://cdn.happy-dev.fr/sib-core/sib-display.html") link(rel='import', href="https://cdn.happy-dev.fr/sib-core/sib-display.html")

View File

@ -45,7 +45,7 @@ script.
else this.value = []; else this.value = [];
return ''; return '';
} }
return `<span>${city} ${country}</span>`; return `<span>${city} - ${country}</span>`;
} }
} }
customElements.define("hdapp-usercell", HDAppCell); customElements.define("hdapp-usercell", HDAppCell);
@ -55,13 +55,15 @@ div
h1 Members h1 Members
sib-display#profiles-list( sib-display#profiles-list(
data-src=`${sdn}/members/`, data-src=`${sdn}/members/`,
data-fields='header, cell, skills', data-fields='header, footer'
set-header='avatar, user, pseudonym, bio', set-header='avatar, user, pseudonym, bio',
set-footer='cell, roles, skills',
set-pseudonym='before-pseudo, pseudo', set-pseudonym='before-pseudo, pseudo',
value-before-pseudo='@', value-before-pseudo='@',
widget-avatar='sib-display-img', widget-avatar='sib-display-img',
widget-user='hdapp-userinfo', widget-user='hdapp-userinfo',
widget-cell='hdapp-usercell', widget-cell='hdapp-usercell',
widget-roles='sib-display-lookuplist',
widget-skills='sib-display-lookuplist', widget-skills='sib-display-lookuplist',
set-searchset='user.first_name, user.last_name', set-searchset='user.first_name, user.last_name',
search-fields='searchset', search-fields='searchset',

View File

@ -91,7 +91,7 @@ sib-display#member-info,
cursor: pointer; cursor: pointer;
label { label {
// display: none; display: none;
} }
sib-display-img { sib-display-img {
$width: 55%; $width: 55%;
@ -111,6 +111,29 @@ sib-display#member-info,
object-position: center; object-position: center;
} }
} }
div[name='header'] {
border-top: 2em solid $color-grey-light;
border-bottom: 1px solid $color-grey-light;
padding-bottom: 1em;
margin: -0.5em;
padding: 0.5em;
margin-bottom: 1em;
text-align: center;
}
hdapp-userinfo {
@extend h1;
}
div[name='pseudonym'] {
div {
display: inline;
}
}
ul{
@include list-reset();
}
} }
#profiles-list { #profiles-list {

View File

@ -9,5 +9,5 @@
@import 'form'; @import 'form';
@import 'content'; @import 'content';
@import 'members'; // @import 'members';
@import 'menu'; @import 'menu';

@ -1 +1 @@
Subproject commit ef607e3aecf6f7091b2fee1fd327e181b376b24d Subproject commit e34a92abb9529af222b952302b8b25f4b1884905

@ -1 +1 @@
Subproject commit 2d4c97a40e02041b6001fdf51b0490d211144c75 Subproject commit bed0a4d7b743d3e35ec016c880101e8496bc224f

View File

@ -8,7 +8,8 @@
<!-- Scripts--> <!-- Scripts-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.7/webcomponents-loader.js" integrity="sha256-fz7VMnmo2h7TlM7CBea8/vpbWpdQnbp20TnwmRwi/KU=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.7/webcomponents-loader.js" integrity="sha256-fz7VMnmo2h7TlM7CBea8/vpbWpdQnbp20TnwmRwi/KU=" crossorigin="anonymous"></script>
<!-- Web components--> <!-- Web components-->
<link rel="import" href="https://cdn.happy-dev.fr/sib-core/sib-display.html"/> <!-- <link rel="import" href="https://cdn.happy-dev.fr/sib-core/sib-display.html"/> -->
<link rel="import" href="lib/sib-core/sib-display.html"/>
<style> <style>
body.debug *:not(script):not(button){ body.debug *:not(script):not(button){
@ -17,24 +18,36 @@
margin: 3px; margin: 3px;
border: 1px solid #f006; border: 1px solid #f006;
} }
sib-display,
sib-display-div{
display: block;
background-color: #0002;
margin: .5em 0;
min-height: 1em;
}
</style> </style>
</head> </head>
<body> <body>
<button onclick="document.body.classList.toggle('debug')">debug</button> <button onclick="document.body.classList.toggle('debug')">debug</button>
<div id="job-offers"> <!-- <div id="job-offers">
<h1>Job offers</h1> <h1>Job offers</h1>
<sib-display id="offers-list" <sib-display id="offers-list"
data-src="https://test-paris.happy-dev.fr/job-offers/" data-src="https://test-paris.happy-dev.fr/job-offers/"
data-fields="title, description, skills" data-fields="title, description, skills"
widget-skills="sib-display-lookuplist" widget-skills="sib-display-lookuplist"
></sib-display> ></sib-display>
</div> </div> -->
<div id="members"> <div id="members">
<h1>Members</h1> <h1>Members</h1>
<sib-display id="profiles-list" <sib-display id="profiles-list"
data-src="https://test-paris.happy-dev.fr/members/" data-src="https://test-paris.happy-dev.fr/members/"
data-fields="pseudo, bio" data-fields="pseudo, user.member.user.member.user.member.bio, a.b"
set-a.b="user.first_name, user.last_name"
></sib-display> ></sib-display>
</div> </div>
<!-- <div>
<h1>sib-form</h1>
<sib-form class="block" range-client="https://test-paris.happy-dev.fr/clients/" widget-team="sib-form-multiple-dropdown" range-team="https://test-paris.happy-dev.fr/members/" data-src="https://test-paris.happy-dev.fr/projects/1/"></sib-form>
</div> -->
</body> </body>
</html> </html>