├── .gitignore ├── .npmignore ├── .vscode ├── launch.json └── tasks.json ├── LICENSE ├── README.md ├── aurelia-bootstrap-datetimepicker ├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── build │ ├── args.js │ ├── babel-options.js │ ├── paths.js │ └── tasks │ │ ├── build.js │ │ ├── clean.js │ │ ├── dev.js │ │ ├── doc.js │ │ ├── lint.js │ │ ├── prepare-release.js │ │ └── test.js ├── config.js ├── dist │ ├── amd │ │ ├── abp-datetime-picker.html │ │ ├── abp-datetime-picker.js │ │ ├── bootstrap-datetimepicker-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js │ ├── commonjs │ │ ├── abp-datetime-picker.html │ │ ├── abp-datetime-picker.js │ │ ├── bootstrap-datetimepicker-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js │ ├── es2015 │ │ ├── abp-datetime-picker.html │ │ ├── abp-datetime-picker.js │ │ ├── bootstrap-datetimepicker-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js │ └── system │ │ ├── abp-datetime-picker.html │ │ ├── abp-datetime-picker.js │ │ ├── bootstrap-datetimepicker-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js ├── doc │ ├── CHANGELOG.md │ └── api.json ├── gulpfile.js ├── karma.conf.js ├── package.json ├── printscreen │ └── abp-datetimepicker.jpg ├── src │ ├── abp-datetime-picker.html │ ├── abp-datetime-picker.js │ ├── bootstrap-datetimepicker-bs4.css │ ├── index.js │ ├── jsconfig.json │ ├── picker-config.js │ └── picker-global-options.js └── test │ ├── setup.js │ └── unit │ └── configure.spec.js ├── aurelia-bootstrap-select ├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── build │ ├── args.js │ ├── babel-options.js │ ├── paths.js │ └── tasks │ │ ├── build.js │ │ ├── clean.js │ │ ├── dev.js │ │ ├── doc.js │ │ ├── lint.js │ │ ├── prepare-release.js │ │ └── test.js ├── config.js ├── dist │ ├── amd │ │ ├── abp-select.html │ │ ├── abp-select.js │ │ ├── bootstrap-select-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ ├── picker-global-options.js │ │ └── util-service.js │ ├── commonjs │ │ ├── abp-select.html │ │ ├── abp-select.js │ │ ├── bootstrap-select-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ ├── picker-global-options.js │ │ └── util-service.js │ ├── es2015 │ │ ├── abp-select.html │ │ ├── abp-select.js │ │ ├── bootstrap-select-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ ├── picker-global-options.js │ │ └── util-service.js │ └── system │ │ ├── abp-select.html │ │ ├── abp-select.js │ │ ├── bootstrap-select-bs4.css │ │ ├── index.js │ │ ├── picker-config.js │ │ ├── picker-global-options.js │ │ └── util-service.js ├── doc │ ├── CHANGELOG.md │ └── api.json ├── gulpfile.js ├── karma.conf.js ├── package.json ├── printscreen │ └── abp-select.jpg ├── src │ ├── abp-select.html │ ├── abp-select.js │ ├── bootstrap-select-bs4.css │ ├── index.js │ ├── jsconfig.json │ ├── picker-config.js │ ├── picker-global-options.js │ └── util-service.js └── test │ ├── setup.js │ └── unit │ └── configure.spec.js ├── aurelia-bootstrap-tagsinput ├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── build │ ├── args.js │ ├── babel-options.js │ ├── paths.js │ └── tasks │ │ ├── build.js │ │ ├── clean.js │ │ ├── dev.js │ │ ├── doc.js │ │ ├── lint.js │ │ ├── prepare-release.js │ │ └── test.js ├── config.js ├── dist │ ├── amd │ │ ├── abp-tags-input.html │ │ ├── abp-tags-input.js │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js │ ├── commonjs │ │ ├── abp-tags-input.html │ │ ├── abp-tags-input.js │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js │ ├── es2015 │ │ ├── abp-tags-input.html │ │ ├── abp-tags-input.js │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js │ └── system │ │ ├── abp-tags-input.html │ │ ├── abp-tags-input.js │ │ ├── index.js │ │ ├── picker-config.js │ │ └── picker-global-options.js ├── doc │ ├── CHANGELOG.md │ └── api.json ├── gulpfile.js ├── karma.conf.js ├── package.json ├── printscreen │ └── abp-tagsinput.jpg ├── src │ ├── abp-tags-input.html │ ├── abp-tags-input.js │ ├── index.js │ ├── jsconfig.json │ ├── picker-config.js │ └── picker-global-options.js └── test │ ├── setup.js │ └── unit │ └── configure.spec.js ├── client-aspnetcore-ts ├── .vscode │ ├── launch.json │ └── tasks.json ├── App │ ├── app.html │ ├── app.ts │ ├── bootstrap-form-renderer.ts │ ├── bootstrap-plugins.html │ ├── bootstrap-plugins.ts │ ├── favicon.ico │ ├── main.ts │ ├── nav-bar.html │ ├── resources │ │ ├── index.ts │ │ └── value-converters │ │ │ └── stringify.ts │ ├── style.css │ ├── validation-form.html │ └── validation-form.ts ├── AureliaDemo.csproj ├── Controllers │ ├── HomeController.cs │ └── TimeController.cs ├── Program.cs ├── README.md ├── Startup.cs ├── Views │ └── Home │ │ └── Index.cshtml ├── package.json ├── tsconfig.json ├── typings.json ├── typings │ ├── index.d.ts │ └── modules │ │ ├── aurelia-validation │ │ ├── index.d.ts │ │ └── typings.json │ │ └── moment │ │ ├── index.d.ts │ │ └── typings.json ├── webpack.config.js └── wwwroot │ └── dist │ ├── 448c34a56d699c29117adc64c43affeb.woff2 │ ├── 674f50d287a8c48dc19ba404d20fe713.eot │ ├── 89889688147bd7575d6327160d64e760.svg │ ├── 912ec66d7572ff821749319396470bde.svg │ ├── af7ae505a9eed503f8b8e6982036873e.woff2 │ ├── app.js │ ├── b06871f281fee6b241d60582ae9369b9.ttf │ ├── e18bbf611f2a2e43afc071aa2f4e1512.ttf │ ├── f4769f9bdb7466be65088239c12046d1.eot │ ├── fa2772327f55d8198301fdb8bcfc8158.woff │ └── fee66e712a8a08eef5805a46892932ad.woff ├── client-cli ├── .babelrc ├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── LICENSE ├── README.md ├── aurelia_project │ ├── aurelia.json │ ├── environments │ │ ├── dev.js │ │ ├── prod.js │ │ └── stage.js │ ├── generators │ │ ├── attribute.js │ │ ├── attribute.json │ │ ├── binding-behavior.js │ │ ├── binding-behavior.json │ │ ├── element.js │ │ ├── element.json │ │ ├── generator.js │ │ ├── generator.json │ │ ├── task.js │ │ ├── task.json │ │ ├── value-converter.js │ │ └── value-converter.json │ └── tasks │ │ ├── build.js │ │ ├── build.json │ │ ├── copy-files.js │ │ ├── prepare-font-awesome.js │ │ ├── process-css.js │ │ ├── process-markup.js │ │ ├── run.js │ │ ├── run.json │ │ ├── test.js │ │ ├── test.json │ │ └── transpile.js ├── bootstrap │ └── fonts │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 ├── favicon.ico ├── index.html ├── jsconfig.json ├── karma.conf.js ├── package.json ├── scripts │ ├── css │ │ └── font-awesome.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── require.js │ ├── text.js │ └── vendor-bundle.js.map ├── src │ ├── app.html │ ├── app.js │ ├── bootstrap-form-renderer.js │ ├── bootstrap-plugins.html │ ├── bootstrap-plugins.js │ ├── environment.js │ ├── jsconfig.json │ ├── main.js │ ├── nav-bar.html │ ├── resources │ │ ├── index.js │ │ └── value-converters │ │ │ └── stringify.js │ ├── styles.css │ ├── validation-form.html │ └── validation-form.js └── test │ ├── aurelia-karma.js │ └── unit │ └── setup.js ├── doc ├── .editorconfig ├── .gitignore ├── aurelia_project │ ├── aurelia.json │ ├── environments │ │ ├── dev.ts │ │ ├── prod.ts │ │ └── stage.ts │ ├── generators │ │ ├── attribute.json │ │ ├── attribute.ts │ │ ├── binding-behavior.json │ │ ├── binding-behavior.ts │ │ ├── component.json │ │ ├── component.ts │ │ ├── element.json │ │ ├── element.ts │ │ ├── generator.json │ │ ├── generator.ts │ │ ├── task.json │ │ ├── task.ts │ │ ├── value-converter.json │ │ └── value-converter.ts │ └── tasks │ │ ├── build.json │ │ ├── build.ts │ │ ├── environment.ts │ │ ├── run.json │ │ └── run.ts ├── custom_typings │ ├── fetch.d.ts │ └── system.d.ts ├── favicon.ico ├── index.ejs ├── package-scripts.js ├── package.json ├── src │ ├── app.html │ ├── app.ts │ ├── bootstrap-plugins │ │ ├── bootstrap-form-renderer.ts │ │ ├── bootstrap-select.html │ │ ├── bootstrap-select.ts │ │ ├── datetime-picker.html │ │ ├── datetime-picker.ts │ │ ├── intro.html │ │ ├── intro.ts │ │ ├── tags-input.html │ │ ├── tags-input.ts │ │ ├── validation-form.html │ │ └── validation-form.ts │ ├── environment.ts │ ├── main.ts │ ├── nav-bar.html │ ├── resources │ │ ├── elements │ │ │ ├── bootstrap-tooltip.ts │ │ │ └── loading-indicator.ts │ │ ├── index.ts │ │ └── value-converters │ │ │ ├── date-format.ts │ │ │ └── stringify.ts │ └── styles.scss ├── static │ └── favicon.ico ├── tsconfig.json └── webpack.config.js ├── jsconfig.json ├── package.json └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | .chrome 2 | .idea 3 | .DS_STORE 4 | 5 | # Dependency directories 6 | bower_components 7 | jspm_packages 8 | node_modules 9 | 10 | # Build / ASP.Net Core 11 | *.suo 12 | *.user 13 | _ReSharper.* 14 | bin 15 | obj 16 | config 17 | packages 18 | 19 | # Logs 20 | logs 21 | *.log 22 | npm-debug.log* 23 | yarn-error.log 24 | package-lock.json 25 | yarn.lock -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | bin 2 | jspm_packages 3 | bower_components 4 | .idea 5 | screenshots 6 | client-cli 7 | client-wp 8 | npm-debug.log 9 | yarn-error.log 10 | yarn.lock 11 | package-lock.json 12 | 13 | # Build / ASP.Net Core 14 | bin 15 | obj 16 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible Node.js debug attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "chrome", 9 | "request": "launch", 10 | "name": "Launch Chrome", 11 | "url": "http://localhost:9000", 12 | "webRoot": "${workspaceRoot}" 13 | }, 14 | { 15 | "type": "node", 16 | "request": "launch", 17 | "name": "Launch Program", 18 | "program": "${file}" 19 | }, 20 | { 21 | "type": "node", 22 | "request": "attach", 23 | "name": "Attach to Port", 24 | "address": "localhost", 25 | "port": 5858 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Build Demo (doc folder)", 6 | "command": "yarn", 7 | "type": "shell", 8 | "args": [ 9 | "build:doc" 10 | ], 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "label": "Run Demo (doc folder)", 15 | "command": "yarn", 16 | "type": "shell", 17 | "args": [ 18 | "run:doc" 19 | ], 20 | "problemMatcher": [] 21 | }, 22 | { 23 | "label": "Build ABP-DateTimePicker Plugin", 24 | "command": "yarn", 25 | "type": "shell", 26 | "args": [ 27 | "build:abp-datetime" 28 | ], 29 | "problemMatcher": [] 30 | }, 31 | { 32 | "label": "Build ABP-Select Plugin", 33 | "command": "yarn", 34 | "type": "shell", 35 | "args": [ 36 | "build:abp-select" 37 | ], 38 | "problemMatcher": [] 39 | }, 40 | { 41 | "label": "Build ABP-Tagsinput Plugin", 42 | "command": "yarn", 43 | "type": "shell", 44 | "args": [ 45 | "build:abp-tagsinput" 46 | ], 47 | "problemMatcher": [] 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-2022, https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/aurelia-tools/.eslintrc.json" 3 | } 4 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/.gitignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea 4 | build 5 | doc 6 | node_modules 7 | printscreen 8 | screenshots 9 | test 10 | client-cli 11 | client-wp 12 | npm-debug.log 13 | karma.conf.js 14 | gulpfile.js 15 | yarn.lock 16 | npm-debug.log 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/.npmignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea 4 | build 5 | doc 6 | node_modules 7 | printscreen 8 | screenshots 9 | test 10 | client-cli 11 | client-wp 12 | npm-debug.log 13 | karma.conf.js 14 | gulpfile.js 15 | yarn.lock 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/args.js: -------------------------------------------------------------------------------- 1 | var yargs = require('yargs'); 2 | 3 | var argv = yargs.argv; 4 | var validBumpTypes = 'major|minor|patch|prerelease'.split('|'); 5 | var bump = (argv.bump || 'patch').toLowerCase(); 6 | 7 | if (validBumpTypes.indexOf(bump) === -1) { 8 | throw new Error('Unrecognized bump "' + bump + '".'); 9 | } 10 | 11 | module.exports = { 12 | bump: bump, 13 | depth: parseInt(argv.depth || '0') 14 | }; 15 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/babel-options.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var paths = require('./paths'); 3 | 4 | exports.base = function() { 5 | return { 6 | filename: '', 7 | filenameRelative: '', 8 | sourceMap: true, 9 | sourceRoot: '', 10 | moduleRoot: path.resolve('src').replace(/\\/g, '/'), 11 | moduleIds: false, 12 | comments: false, 13 | compact: false, 14 | code:true, 15 | presets: [ 'es2015-loose', 'stage-1'], 16 | plugins: [ 17 | 'syntax-flow', 18 | 'transform-decorators-legacy', 19 | 'transform-flow-strip-types' 20 | ] 21 | }; 22 | } 23 | 24 | exports.commonjs = function() { 25 | var options = exports.base(); 26 | options.plugins.push('transform-es2015-modules-commonjs'); 27 | return options; 28 | }; 29 | 30 | exports.amd = function() { 31 | var options = exports.base(); 32 | options.plugins.push('transform-es2015-modules-amd'); 33 | return options; 34 | }; 35 | 36 | exports.system = function() { 37 | var options = exports.base(); 38 | options.plugins.push('transform-es2015-modules-systemjs'); 39 | return options; 40 | }; 41 | 42 | exports.es2015 = function() { 43 | var options = exports.base(); 44 | options.presets = ['stage-1'] 45 | return options; 46 | }; 47 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/paths.js: -------------------------------------------------------------------------------- 1 | var appRoot = 'src/'; 2 | var outputRoot = 'dist/'; 3 | 4 | module.exports = { 5 | root: appRoot, 6 | source: appRoot + '**/*.js', 7 | html: appRoot + '**/*.html', 8 | css: appRoot + '**/*.css', 9 | scss: appRoot + 'styles/**/*.scss', 10 | scssRoot: appRoot + '**/*.scss', 11 | style: 'styles/**/*.css', 12 | output: outputRoot, 13 | doc: './doc', 14 | e2eSpecsSrc: 'test/e2e/src/*.js', 15 | e2eSpecsDist: 'test/e2e/dist/' 16 | }; 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/tasks/clean.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var del = require('del'); 4 | var vinylPaths = require('vinyl-paths'); 5 | 6 | // deletes all files in the output path 7 | gulp.task('clean', function() { 8 | return gulp.src([paths.output]) 9 | .pipe(vinylPaths(del)); 10 | }); 11 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/tasks/dev.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var args = require('../args'); 4 | 5 | // source code for the tasks called in this file 6 | // is located at: https://github.com/aurelia/tools/blob/master/src/dev.js 7 | 8 | // updates dependencies in this folder 9 | // from folders in the parent directory 10 | gulp.task('update-own-deps', function() { 11 | tools.updateOwnDependenciesFromLocalRepositories(args.depth); 12 | }); 13 | 14 | // quickly pulls in all of the aurelia 15 | // github repos, placing them up one directory 16 | // from where the command is executed, 17 | // then runs `npm install` 18 | // and `gulp build` for each repo 19 | gulp.task('build-dev-env', function() { 20 | tools.buildDevEnv(); 21 | }); 22 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/tasks/doc.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var paths = require('../paths'); 4 | var yuidoc = require('gulp-yuidoc'); 5 | 6 | gulp.task('doc-generate', function(){ 7 | return gulp.src(paths.source) 8 | .pipe(yuidoc.parser(null, 'api.json')) 9 | .pipe(gulp.dest(paths.doc)); 10 | }); 11 | 12 | gulp.task('doc', ['doc-generate'], function(){ 13 | tools.transformAPIModel(paths.doc); 14 | }); 15 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/tasks/lint.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var eslint = require('gulp-eslint'); 4 | 5 | // runs eslint on all .js files 6 | gulp.task('lint', function() { 7 | return gulp.src(paths.source) 8 | .pipe(eslint()) 9 | .pipe(eslint.format()) 10 | .pipe(eslint.failOnError()); 11 | }); 12 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/tasks/prepare-release.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var runSequence = require('run-sequence'); 3 | var paths = require('../paths'); 4 | var changelog = require('conventional-changelog'); 5 | var fs = require('fs'); 6 | var bump = require('gulp-bump'); 7 | var args = require('../args'); 8 | 9 | // utilizes the bump plugin to bump the 10 | // semver for the repo 11 | gulp.task('bump-version', function() { 12 | return gulp.src(['./package.json']) 13 | .pipe(bump({type: args.bump})) //major|minor|patch|prerelease 14 | .pipe(gulp.dest('./')); 15 | }); 16 | 17 | // generates the CHANGELOG.md file based on commit 18 | // from git commit messages 19 | gulp.task('changelog', function(callback) { 20 | var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); 21 | 22 | return changelog({ 23 | repository: pkg.repository.url, 24 | version: pkg.version, 25 | file: paths.doc + '/CHANGELOG.md' 26 | }, function(err, log) { 27 | fs.writeFileSync(paths.doc + '/CHANGELOG.md', log); 28 | }); 29 | }); 30 | 31 | // calls the listed sequence of tasks in order 32 | gulp.task('prepare-release', function(callback) { 33 | return runSequence( 34 | 'build', 35 | //'lint', 36 | 'bump-version', 37 | 'changelog', 38 | callback 39 | ); 40 | }); 41 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/build/tasks/test.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var Karma = require('karma').Server; 3 | 4 | /** 5 | * Run test once and exit 6 | */ 7 | gulp.task('test', function(done) { 8 | new Karma({ 9 | configFile: __dirname + '/../../karma.conf.js', 10 | singleRun: true 11 | }, done).start(); 12 | }); 13 | 14 | /** 15 | * Watch for file changes and re-run tests on each change 16 | */ 17 | gulp.task('tdd', function(done) { 18 | new Karma({ 19 | configFile: __dirname + '/../../karma.conf.js' 20 | }, done).start(); 21 | }); 22 | 23 | /** 24 | * Run test once with code coverage and exit 25 | */ 26 | gulp.task('cover', function(done) { 27 | new Karma({ 28 | configFile: __dirname + '/../../karma.conf.js', 29 | singleRun: true, 30 | reporters: ['coverage'], 31 | preprocessors: { 32 | 'test/**/*.js': ['babel'], 33 | 'src/**/*.js': ['babel', 'coverage'] 34 | }, 35 | coverageReporter: { 36 | includeAllSources: true, 37 | instrumenters: { 38 | isparta: require('isparta') 39 | }, 40 | instrumenter: { 41 | 'src/**/*.js': 'isparta' 42 | }, 43 | reporters: [ 44 | { type: 'html', dir: 'coverage' }, 45 | { type: 'text' } 46 | ] 47 | } 48 | }, done).start(); 49 | }); 50 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | defaultJSExtensions: true, 3 | transpiler: false, 4 | paths: { 5 | "github:*": "jspm_packages/github/*", 6 | "npm:*": "jspm_packages/npm/*" 7 | }, 8 | 9 | map: { 10 | "aurelia-polyfills": "npm:aurelia-polyfills@1.0.0", 11 | "npm:aurelia-polyfills@1.0.0": { 12 | "aurelia-pal": "npm:aurelia-pal@1.0.0" 13 | } 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/amd/abp-datetime-picker.html: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/amd/bootstrap-datetimepicker-bs4.css: -------------------------------------------------------------------------------- 1 | /* bootstrap-datetimepicker adjustment for BS4 */ 2 | .bootstrap-datetimepicker-widget .collapse.in { 3 | display: block; 4 | visibility: visible; 5 | } 6 | .bootstrap-datetimepicker-widget.dropdown-menu { 7 | width: 266px; 8 | height: 289px; 9 | } 10 | .bootstrap-datetimepicker-widget table td.day { 11 | height: 20px; 12 | line-height: 20px; 13 | width: 20px; 14 | } 15 | .bootstrap-datetimepicker-widget .picker-switch td span { 16 | height: 35px; 17 | } 18 | .table-condensed>thead>tr>th, 19 | .table-condensed>tbody>tr>th, 20 | .table-condensed>tfoot>tr>th, 21 | .table-condensed>thead>tr>td, 22 | .table-condensed>tbody>tr>td, 23 | .table-condensed>tfoot>tr>td { 24 | padding: 5px; 25 | } 26 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/amd/index.js: -------------------------------------------------------------------------------- 1 | define(['exports', './abp-datetime-picker', './picker-config'], function (exports, _abpDatetimePicker, _pickerConfig) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.PickerConfig = exports.AbpDatetimePickerCustomElement = undefined; 8 | exports.configure = configure; 9 | function configure(aurelia, callback) { 10 | aurelia.globalResources('./abp-datetime-picker'); 11 | 12 | var config = new _pickerConfig.PickerConfig(); 13 | 14 | if (typeof callback === 'function') { 15 | callback(config); 16 | } 17 | } 18 | 19 | exports.AbpDatetimePickerCustomElement = _abpDatetimePicker.AbpDatetimePickerCustomElement; 20 | exports.PickerConfig = _pickerConfig.PickerConfig; 21 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/amd/picker-config.js: -------------------------------------------------------------------------------- 1 | define(['exports', './picker-global-options'], function (exports, _pickerGlobalOptions) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.PickerConfig = undefined; 8 | 9 | function _classCallCheck(instance, Constructor) { 10 | if (!(instance instanceof Constructor)) { 11 | throw new TypeError("Cannot call a class as a function"); 12 | } 13 | } 14 | 15 | var PickerConfig = exports.PickerConfig = function PickerConfig() { 16 | _classCallCheck(this, PickerConfig); 17 | 18 | this.extra = _pickerGlobalOptions.globalExtraOptions; 19 | this.options = _pickerGlobalOptions.globalPickerOptions; 20 | }; 21 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/amd/picker-global-options.js: -------------------------------------------------------------------------------- 1 | define(['exports'], function (exports) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | var globalExtraOptions = exports.globalExtraOptions = { 8 | buttonClass: 'btn btn-outline-secondary', 9 | bootstrapVersion: 3, 10 | iconBase: 'glyphicon', 11 | withDateIcon: true 12 | }; 13 | 14 | var globalPickerOptions = exports.globalPickerOptions = { 15 | allowInputToggle: true 16 | }; 17 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/commonjs/abp-datetime-picker.html: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/commonjs/bootstrap-datetimepicker-bs4.css: -------------------------------------------------------------------------------- 1 | /* bootstrap-datetimepicker adjustment for BS4 */ 2 | .bootstrap-datetimepicker-widget .collapse.in { 3 | display: block; 4 | visibility: visible; 5 | } 6 | .bootstrap-datetimepicker-widget.dropdown-menu { 7 | width: 266px; 8 | height: 289px; 9 | } 10 | .bootstrap-datetimepicker-widget table td.day { 11 | height: 20px; 12 | line-height: 20px; 13 | width: 20px; 14 | } 15 | .bootstrap-datetimepicker-widget .picker-switch td span { 16 | height: 35px; 17 | } 18 | .table-condensed>thead>tr>th, 19 | .table-condensed>tbody>tr>th, 20 | .table-condensed>tfoot>tr>th, 21 | .table-condensed>thead>tr>td, 22 | .table-condensed>tbody>tr>td, 23 | .table-condensed>tfoot>tr>td { 24 | padding: 5px; 25 | } 26 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/commonjs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.PickerConfig = exports.AbpDatetimePickerCustomElement = undefined; 7 | exports.configure = configure; 8 | 9 | var _abpDatetimePicker = require('./abp-datetime-picker'); 10 | 11 | var _pickerConfig = require('./picker-config'); 12 | 13 | function configure(aurelia, callback) { 14 | aurelia.globalResources('./abp-datetime-picker'); 15 | 16 | var config = new _pickerConfig.PickerConfig(); 17 | 18 | if (typeof callback === 'function') { 19 | callback(config); 20 | } 21 | } 22 | 23 | exports.AbpDatetimePickerCustomElement = _abpDatetimePicker.AbpDatetimePickerCustomElement; 24 | exports.PickerConfig = _pickerConfig.PickerConfig; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/commonjs/picker-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.PickerConfig = undefined; 7 | 8 | var _pickerGlobalOptions = require('./picker-global-options'); 9 | 10 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11 | 12 | var PickerConfig = exports.PickerConfig = function PickerConfig() { 13 | _classCallCheck(this, PickerConfig); 14 | 15 | this.extra = _pickerGlobalOptions.globalExtraOptions; 16 | this.options = _pickerGlobalOptions.globalPickerOptions; 17 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/commonjs/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | var globalExtraOptions = exports.globalExtraOptions = { 7 | buttonClass: 'btn btn-outline-secondary', 8 | bootstrapVersion: 3, 9 | iconBase: 'glyphicon', 10 | withDateIcon: true 11 | }; 12 | 13 | var globalPickerOptions = exports.globalPickerOptions = { 14 | allowInputToggle: true 15 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/es2015/abp-datetime-picker.html: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/es2015/bootstrap-datetimepicker-bs4.css: -------------------------------------------------------------------------------- 1 | /* bootstrap-datetimepicker adjustment for BS4 */ 2 | .bootstrap-datetimepicker-widget .collapse.in { 3 | display: block; 4 | visibility: visible; 5 | } 6 | .bootstrap-datetimepicker-widget.dropdown-menu { 7 | width: 266px; 8 | height: 289px; 9 | } 10 | .bootstrap-datetimepicker-widget table td.day { 11 | height: 20px; 12 | line-height: 20px; 13 | width: 20px; 14 | } 15 | .bootstrap-datetimepicker-widget .picker-switch td span { 16 | height: 35px; 17 | } 18 | .table-condensed>thead>tr>th, 19 | .table-condensed>tbody>tr>th, 20 | .table-condensed>tfoot>tr>th, 21 | .table-condensed>thead>tr>td, 22 | .table-condensed>tbody>tr>td, 23 | .table-condensed>tfoot>tr>td { 24 | padding: 5px; 25 | } 26 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/es2015/index.js: -------------------------------------------------------------------------------- 1 | import { AbpDatetimePickerCustomElement } from './abp-datetime-picker'; 2 | import { PickerConfig } from './picker-config'; 3 | 4 | export function configure(aurelia, callback) { 5 | aurelia.globalResources('./abp-datetime-picker'); 6 | 7 | let config = new PickerConfig(); 8 | 9 | if (typeof callback === 'function') { 10 | callback(config); 11 | } 12 | } 13 | 14 | export { AbpDatetimePickerCustomElement, PickerConfig }; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/es2015/picker-config.js: -------------------------------------------------------------------------------- 1 | import { globalExtraOptions, globalPickerOptions } from './picker-global-options'; 2 | 3 | export let PickerConfig = class PickerConfig { 4 | constructor() { 5 | this.extra = globalExtraOptions; 6 | this.options = globalPickerOptions; 7 | } 8 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/es2015/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 2 | export let globalExtraOptions = { 3 | buttonClass: 'btn btn-outline-secondary', 4 | bootstrapVersion: 3, 5 | iconBase: 'glyphicon', 6 | withDateIcon: true 7 | }; 8 | 9 | export let globalPickerOptions = { 10 | allowInputToggle: true 11 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/system/abp-datetime-picker.html: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/system/bootstrap-datetimepicker-bs4.css: -------------------------------------------------------------------------------- 1 | /* bootstrap-datetimepicker adjustment for BS4 */ 2 | .bootstrap-datetimepicker-widget .collapse.in { 3 | display: block; 4 | visibility: visible; 5 | } 6 | .bootstrap-datetimepicker-widget.dropdown-menu { 7 | width: 266px; 8 | height: 289px; 9 | } 10 | .bootstrap-datetimepicker-widget table td.day { 11 | height: 20px; 12 | line-height: 20px; 13 | width: 20px; 14 | } 15 | .bootstrap-datetimepicker-widget .picker-switch td span { 16 | height: 35px; 17 | } 18 | .table-condensed>thead>tr>th, 19 | .table-condensed>tbody>tr>th, 20 | .table-condensed>tfoot>tr>th, 21 | .table-condensed>thead>tr>td, 22 | .table-condensed>tbody>tr>td, 23 | .table-condensed>tfoot>tr>td { 24 | padding: 5px; 25 | } 26 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/system/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register(['./abp-datetime-picker', './picker-config'], function (_export, _context) { 4 | "use strict"; 5 | 6 | var AbpDatetimePickerCustomElement, PickerConfig; 7 | function configure(aurelia, callback) { 8 | aurelia.globalResources('./abp-datetime-picker'); 9 | 10 | var config = new PickerConfig(); 11 | 12 | if (typeof callback === 'function') { 13 | callback(config); 14 | } 15 | } 16 | 17 | _export('configure', configure); 18 | 19 | return { 20 | setters: [function (_abpDatetimePicker) { 21 | AbpDatetimePickerCustomElement = _abpDatetimePicker.AbpDatetimePickerCustomElement; 22 | }, function (_pickerConfig) { 23 | PickerConfig = _pickerConfig.PickerConfig; 24 | }], 25 | execute: function () { 26 | _export('AbpDatetimePickerCustomElement', AbpDatetimePickerCustomElement); 27 | 28 | _export('PickerConfig', PickerConfig); 29 | } 30 | }; 31 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/system/picker-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register(['./picker-global-options'], function (_export, _context) { 4 | "use strict"; 5 | 6 | var globalExtraOptions, globalPickerOptions, PickerConfig; 7 | 8 | function _classCallCheck(instance, Constructor) { 9 | if (!(instance instanceof Constructor)) { 10 | throw new TypeError("Cannot call a class as a function"); 11 | } 12 | } 13 | 14 | return { 15 | setters: [function (_pickerGlobalOptions) { 16 | globalExtraOptions = _pickerGlobalOptions.globalExtraOptions; 17 | globalPickerOptions = _pickerGlobalOptions.globalPickerOptions; 18 | }], 19 | execute: function () { 20 | _export('PickerConfig', PickerConfig = function PickerConfig() { 21 | _classCallCheck(this, PickerConfig); 22 | 23 | this.extra = globalExtraOptions; 24 | this.options = globalPickerOptions; 25 | }); 26 | 27 | _export('PickerConfig', PickerConfig); 28 | } 29 | }; 30 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/dist/system/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register([], function (_export, _context) { 4 | "use strict"; 5 | 6 | var globalExtraOptions, globalPickerOptions; 7 | return { 8 | setters: [], 9 | execute: function () { 10 | _export('globalExtraOptions', globalExtraOptions = { 11 | buttonClass: 'btn btn-outline-secondary', 12 | bootstrapVersion: 3, 13 | iconBase: 'glyphicon', 14 | withDateIcon: true 15 | }); 16 | 17 | _export('globalExtraOptions', globalExtraOptions); 18 | 19 | _export('globalPickerOptions', globalPickerOptions = { 20 | allowInputToggle: true 21 | }); 22 | 23 | _export('globalPickerOptions', globalPickerOptions); 24 | } 25 | }; 26 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/doc/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### 0.3.0 (2017-01-11) 2 | 3 | * Breaking Change: renamed `createDatagrid()` to simply `createGrid()` 4 | * Add missing `Plugins` directly in `aurelia-slickgrid` until `slickgrid-es6` resolve it's own bundle issue with the `Plugins`. 5 | * Add `Aurelia-Webpack` sample available in `client-wp` folder 6 | 7 | 8 | ### 0.2.0 (2017-01-11) 9 | 10 | * First official working `Aurelia-Slickgrid` version 11 | 12 | 13 | ### 0.1.0 (2017-01-08) 14 | 15 | * Initial `Aurelia-Slickgrid` commit 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/doc/api.json: -------------------------------------------------------------------------------- 1 | {"classes":[],"methods":[],"properties":[],"events":[]} -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/gulpfile.js: -------------------------------------------------------------------------------- 1 | // all gulp tasks are located in the ./build/tasks directory 2 | // gulp configuration is in files in ./build directory 3 | require('require-dir')('build/tasks'); 4 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/printscreen/abp-datetimepicker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/aurelia-bootstrap-datetimepicker/printscreen/abp-datetimepicker.jpg -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/src/abp-datetime-picker.html: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/src/bootstrap-datetimepicker-bs4.css: -------------------------------------------------------------------------------- 1 | /* bootstrap-datetimepicker adjustment for BS4 */ 2 | .bootstrap-datetimepicker-widget .collapse.in { 3 | display: block; 4 | visibility: visible; 5 | } 6 | .bootstrap-datetimepicker-widget.dropdown-menu { 7 | width: 266px; 8 | height: 289px; 9 | } 10 | .bootstrap-datetimepicker-widget table td.day { 11 | height: 20px; 12 | line-height: 20px; 13 | width: 20px; 14 | } 15 | .bootstrap-datetimepicker-widget .picker-switch td span { 16 | height: 35px; 17 | } 18 | .table-condensed>thead>tr>th, 19 | .table-condensed>tbody>tr>th, 20 | .table-condensed>tfoot>tr>th, 21 | .table-condensed>thead>tr>td, 22 | .table-condensed>tbody>tr>td, 23 | .table-condensed>tfoot>tr>td { 24 | padding: 5px; 25 | } 26 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/src/index.js: -------------------------------------------------------------------------------- 1 | import {AbpDatetimePickerCustomElement} from './abp-datetime-picker'; 2 | import {PickerConfig} from './picker-config'; 3 | 4 | export function configure(aurelia, callback) { 5 | aurelia.globalResources('./abp-datetime-picker'); 6 | 7 | let config = new PickerConfig(); 8 | 9 | if (typeof callback === 'function') { 10 | callback(config); 11 | } 12 | } 13 | 14 | export { 15 | AbpDatetimePickerCustomElement, 16 | PickerConfig 17 | }; 18 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/src/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "experimentalDecorators" : true 6 | } 7 | } -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/src/picker-config.js: -------------------------------------------------------------------------------- 1 | import {globalExtraOptions, globalPickerOptions} from './picker-global-options'; 2 | 3 | export class PickerConfig { 4 | constructor() { 5 | this.extra = globalExtraOptions; 6 | this.options = globalPickerOptions; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/src/picker-global-options.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Extra options that can be passed to the Custom Element 3 | */ 4 | export let globalExtraOptions = { 5 | buttonClass: 'btn btn-outline-secondary', 6 | bootstrapVersion: 3, 7 | iconBase: 'glyphicon', 8 | withDateIcon: true 9 | }; 10 | 11 | /** 12 | * Options that can be passed to the Bootstrap-Datetimepicker directly 13 | */ 14 | export let globalPickerOptions = { 15 | allowInputToggle: true 16 | }; 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/test/setup.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; -------------------------------------------------------------------------------- /aurelia-bootstrap-datetimepicker/test/unit/configure.spec.js: -------------------------------------------------------------------------------- 1 | import {configure} from '../../src/index'; 2 | 3 | class ConfigStub { 4 | globalResources(...resources) { 5 | this.resources = resources; 6 | } 7 | } 8 | 9 | describe('the Aurelia configuration', () => { 10 | var mockedConfiguration; 11 | 12 | beforeEach(() => { 13 | mockedConfiguration = new ConfigStub(); 14 | configure(mockedConfiguration); 15 | }); 16 | 17 | it('should register a global resource', () => { 18 | expect(mockedConfiguration.resources).toContain('./hello-world'); 19 | }); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /aurelia-bootstrap-select/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/aurelia-tools/.eslintrc.json" 3 | } 4 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/.gitignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea 4 | build 5 | doc 6 | node_modules 7 | printscreen 8 | screenshots 9 | test 10 | client-cli 11 | client-wp 12 | npm-debug.log 13 | karma.conf.js 14 | gulpfile.js 15 | yarn.lock 16 | npm-debug.log 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/.npmignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea 4 | build 5 | doc 6 | node_modules 7 | printscreen 8 | screenshots 9 | test 10 | client-cli 11 | client-wp 12 | npm-debug.log 13 | karma.conf.js 14 | gulpfile.js 15 | yarn.lock 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/args.js: -------------------------------------------------------------------------------- 1 | var yargs = require('yargs'); 2 | 3 | var argv = yargs.argv; 4 | var validBumpTypes = 'major|minor|patch|prerelease'.split('|'); 5 | var bump = (argv.bump || 'patch').toLowerCase(); 6 | 7 | if (validBumpTypes.indexOf(bump) === -1) { 8 | throw new Error('Unrecognized bump "' + bump + '".'); 9 | } 10 | 11 | module.exports = { 12 | bump: bump, 13 | depth: parseInt(argv.depth || '0') 14 | }; 15 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/babel-options.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var paths = require('./paths'); 3 | 4 | exports.base = function() { 5 | return { 6 | filename: '', 7 | filenameRelative: '', 8 | sourceMap: true, 9 | sourceRoot: '', 10 | moduleRoot: path.resolve('src').replace(/\\/g, '/'), 11 | moduleIds: false, 12 | comments: false, 13 | compact: false, 14 | code:true, 15 | presets: [ 'es2015-loose', 'stage-1'], 16 | plugins: [ 17 | 'syntax-flow', 18 | 'transform-decorators-legacy', 19 | 'transform-flow-strip-types' 20 | ] 21 | }; 22 | } 23 | 24 | exports.commonjs = function() { 25 | var options = exports.base(); 26 | options.plugins.push('transform-es2015-modules-commonjs'); 27 | return options; 28 | }; 29 | 30 | exports.amd = function() { 31 | var options = exports.base(); 32 | options.plugins.push('transform-es2015-modules-amd'); 33 | return options; 34 | }; 35 | 36 | exports.system = function() { 37 | var options = exports.base(); 38 | options.plugins.push('transform-es2015-modules-systemjs'); 39 | return options; 40 | }; 41 | 42 | exports.es2015 = function() { 43 | var options = exports.base(); 44 | options.presets = ['stage-1'] 45 | return options; 46 | }; 47 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/paths.js: -------------------------------------------------------------------------------- 1 | var appRoot = 'src/'; 2 | var outputRoot = 'dist/'; 3 | 4 | module.exports = { 5 | root: appRoot, 6 | source: appRoot + '**/*.js', 7 | html: appRoot + '**/*.html', 8 | css: appRoot + '**/*.css', 9 | scss: appRoot + 'styles/**/*.scss', 10 | scssRoot: appRoot + '**/*.scss', 11 | style: 'styles/**/*.css', 12 | output: outputRoot, 13 | doc: './doc', 14 | e2eSpecsSrc: 'test/e2e/src/*.js', 15 | e2eSpecsDist: 'test/e2e/dist/' 16 | }; 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/tasks/clean.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var del = require('del'); 4 | var vinylPaths = require('vinyl-paths'); 5 | 6 | // deletes all files in the output path 7 | gulp.task('clean', function() { 8 | return gulp.src([paths.output]) 9 | .pipe(vinylPaths(del)); 10 | }); 11 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/tasks/dev.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var args = require('../args'); 4 | 5 | // source code for the tasks called in this file 6 | // is located at: https://github.com/aurelia/tools/blob/master/src/dev.js 7 | 8 | // updates dependencies in this folder 9 | // from folders in the parent directory 10 | gulp.task('update-own-deps', function() { 11 | tools.updateOwnDependenciesFromLocalRepositories(args.depth); 12 | }); 13 | 14 | // quickly pulls in all of the aurelia 15 | // github repos, placing them up one directory 16 | // from where the command is executed, 17 | // then runs `npm install` 18 | // and `gulp build` for each repo 19 | gulp.task('build-dev-env', function() { 20 | tools.buildDevEnv(); 21 | }); 22 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/tasks/doc.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var paths = require('../paths'); 4 | var yuidoc = require('gulp-yuidoc'); 5 | 6 | gulp.task('doc-generate', function(){ 7 | return gulp.src(paths.source) 8 | .pipe(yuidoc.parser(null, 'api.json')) 9 | .pipe(gulp.dest(paths.doc)); 10 | }); 11 | 12 | gulp.task('doc', ['doc-generate'], function(){ 13 | tools.transformAPIModel(paths.doc); 14 | }); 15 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/tasks/lint.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var eslint = require('gulp-eslint'); 4 | 5 | // runs eslint on all .js files 6 | gulp.task('lint', function() { 7 | return gulp.src(paths.source) 8 | .pipe(eslint()) 9 | .pipe(eslint.format()) 10 | .pipe(eslint.failOnError()); 11 | }); 12 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/tasks/prepare-release.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var runSequence = require('run-sequence'); 3 | var paths = require('../paths'); 4 | var changelog = require('conventional-changelog'); 5 | var fs = require('fs'); 6 | var bump = require('gulp-bump'); 7 | var args = require('../args'); 8 | 9 | // utilizes the bump plugin to bump the 10 | // semver for the repo 11 | gulp.task('bump-version', function() { 12 | return gulp.src(['./package.json']) 13 | .pipe(bump({type: args.bump})) //major|minor|patch|prerelease 14 | .pipe(gulp.dest('./')); 15 | }); 16 | 17 | // generates the CHANGELOG.md file based on commit 18 | // from git commit messages 19 | gulp.task('changelog', function(callback) { 20 | var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); 21 | 22 | return changelog({ 23 | repository: pkg.repository.url, 24 | version: pkg.version, 25 | file: paths.doc + '/CHANGELOG.md' 26 | }, function(err, log) { 27 | fs.writeFileSync(paths.doc + '/CHANGELOG.md', log); 28 | }); 29 | }); 30 | 31 | // calls the listed sequence of tasks in order 32 | gulp.task('prepare-release', function(callback) { 33 | return runSequence( 34 | 'build', 35 | //'lint', 36 | 'bump-version', 37 | 'changelog', 38 | callback 39 | ); 40 | }); 41 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/build/tasks/test.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var Karma = require('karma').Server; 3 | 4 | /** 5 | * Run test once and exit 6 | */ 7 | gulp.task('test', function(done) { 8 | new Karma({ 9 | configFile: __dirname + '/../../karma.conf.js', 10 | singleRun: true 11 | }, done).start(); 12 | }); 13 | 14 | /** 15 | * Watch for file changes and re-run tests on each change 16 | */ 17 | gulp.task('tdd', function(done) { 18 | new Karma({ 19 | configFile: __dirname + '/../../karma.conf.js' 20 | }, done).start(); 21 | }); 22 | 23 | /** 24 | * Run test once with code coverage and exit 25 | */ 26 | gulp.task('cover', function(done) { 27 | new Karma({ 28 | configFile: __dirname + '/../../karma.conf.js', 29 | singleRun: true, 30 | reporters: ['coverage'], 31 | preprocessors: { 32 | 'test/**/*.js': ['babel'], 33 | 'src/**/*.js': ['babel', 'coverage'] 34 | }, 35 | coverageReporter: { 36 | includeAllSources: true, 37 | instrumenters: { 38 | isparta: require('isparta') 39 | }, 40 | instrumenter: { 41 | 'src/**/*.js': 'isparta' 42 | }, 43 | reporters: [ 44 | { type: 'html', dir: 'coverage' }, 45 | { type: 'text' } 46 | ] 47 | } 48 | }, done).start(); 49 | }); 50 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | defaultJSExtensions: true, 3 | transpiler: false, 4 | paths: { 5 | "github:*": "jspm_packages/github/*", 6 | "npm:*": "jspm_packages/npm/*" 7 | }, 8 | 9 | map: { 10 | "aurelia-polyfills": "npm:aurelia-polyfills@1.0.0", 11 | "npm:aurelia-polyfills@1.0.0": { 12 | "aurelia-pal": "npm:aurelia-pal@1.0.0" 13 | } 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/amd/bootstrap-select-bs4.css: -------------------------------------------------------------------------------- 1 | /* 2 | Make bootstrap-select work with bootstrap 4 see: 3 | https://github.com/silviomoreto/bootstrap-select/issues/1135 4 | */ 5 | .dropdown-toggle.btn-default { 6 | color: #292b2c; 7 | background-color: #fff; 8 | border-color: #ccc; 9 | } 10 | .bootstrap-select { 11 | width: 100% !important; 12 | .btn-light { 13 | background-color: #fff; 14 | border: 1px solid rgb(206, 212, 218); 15 | } 16 | .bs-ok-default { 17 | border-style: inline-block !important; 18 | } 19 | } 20 | .bootstrap-select.show > .dropdown-menu > .dropdown-menu, 21 | .bootstrap-select > .dropdown-menu > .dropdown-menu li.hidden { 22 | display: block; 23 | } 24 | 25 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a { 26 | display: block; 27 | padding: 3px 1.5rem; 28 | clear: both; 29 | font-weight: 400; 30 | color: #292b2c; 31 | text-align: inherit; 32 | white-space: nowrap; 33 | background: 0 0; 34 | border: 0; 35 | text-decoration: none; 36 | } 37 | 38 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover { 39 | background-color: #f4f4f4; 40 | } 41 | 42 | .bootstrap-select > .dropdown-toggle { 43 | width: 100%; 44 | } 45 | 46 | .dropdown-menu > li.active > a { 47 | color: #fff !important; 48 | background-color: #337ab7 !important; 49 | } 50 | 51 | .bootstrap-select .check-mark { 52 | line-height: 14px; 53 | } 54 | .bootstrap-select .check-mark::after { 55 | font-family: "FontAwesome"; 56 | content: ""; 57 | } 58 | 59 | .bootstrap-select button { 60 | overflow: hidden; 61 | text-overflow: ellipsis; 62 | } 63 | 64 | /* Make filled out selects be the same size as empty selects */ 65 | .bootstrap-select.btn-group .dropdown-toggle .filter-option { 66 | display: inline !important; 67 | } 68 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/amd/index.js: -------------------------------------------------------------------------------- 1 | define(['exports', './abp-select', './picker-config'], function (exports, _abpSelect, _pickerConfig) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.PickerConfig = exports.AbpSelectCustomElement = undefined; 8 | exports.configure = configure; 9 | function configure(aurelia, callback) { 10 | aurelia.globalResources('./abp-select'); 11 | 12 | var config = new _pickerConfig.PickerConfig(); 13 | 14 | if (typeof callback === 'function') { 15 | callback(config); 16 | } 17 | } 18 | 19 | exports.AbpSelectCustomElement = _abpSelect.AbpSelectCustomElement; 20 | exports.PickerConfig = _pickerConfig.PickerConfig; 21 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/amd/picker-config.js: -------------------------------------------------------------------------------- 1 | define(['exports', './picker-global-options'], function (exports, _pickerGlobalOptions) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.PickerConfig = undefined; 8 | 9 | function _classCallCheck(instance, Constructor) { 10 | if (!(instance instanceof Constructor)) { 11 | throw new TypeError("Cannot call a class as a function"); 12 | } 13 | } 14 | 15 | var PickerConfig = exports.PickerConfig = function PickerConfig() { 16 | _classCallCheck(this, PickerConfig); 17 | 18 | this.extra = _pickerGlobalOptions.globalExtraOptions; 19 | this.options = _pickerGlobalOptions.globalPickerOptions; 20 | }; 21 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/amd/picker-global-options.js: -------------------------------------------------------------------------------- 1 | define(['exports'], function (exports) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | var globalExtraOptions = exports.globalExtraOptions = { 8 | mappingDataStructure: { 9 | class: 'class', 10 | content: 'content', 11 | disabled: 'disabled', 12 | divider: 'divider', 13 | groupLabel: 'group', 14 | groupDisabled: 'disabled', 15 | icon: 'icon', 16 | maxOptions: 'maxOptions', 17 | option: 'option', 18 | subtext: 'subtext', 19 | style: 'style', 20 | title: 'title', 21 | tokens: 'tokens' 22 | } 23 | }; 24 | 25 | var globalPickerOptions = exports.globalPickerOptions = { 26 | dropupAuto: true, 27 | showTick: true, 28 | width: 'auto' 29 | }; 30 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/commonjs/bootstrap-select-bs4.css: -------------------------------------------------------------------------------- 1 | /* 2 | Make bootstrap-select work with bootstrap 4 see: 3 | https://github.com/silviomoreto/bootstrap-select/issues/1135 4 | */ 5 | .dropdown-toggle.btn-default { 6 | color: #292b2c; 7 | background-color: #fff; 8 | border-color: #ccc; 9 | } 10 | .bootstrap-select { 11 | width: 100% !important; 12 | .btn-light { 13 | background-color: #fff; 14 | border: 1px solid rgb(206, 212, 218); 15 | } 16 | .bs-ok-default { 17 | border-style: inline-block !important; 18 | } 19 | } 20 | .bootstrap-select.show > .dropdown-menu > .dropdown-menu, 21 | .bootstrap-select > .dropdown-menu > .dropdown-menu li.hidden { 22 | display: block; 23 | } 24 | 25 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a { 26 | display: block; 27 | padding: 3px 1.5rem; 28 | clear: both; 29 | font-weight: 400; 30 | color: #292b2c; 31 | text-align: inherit; 32 | white-space: nowrap; 33 | background: 0 0; 34 | border: 0; 35 | text-decoration: none; 36 | } 37 | 38 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover { 39 | background-color: #f4f4f4; 40 | } 41 | 42 | .bootstrap-select > .dropdown-toggle { 43 | width: 100%; 44 | } 45 | 46 | .dropdown-menu > li.active > a { 47 | color: #fff !important; 48 | background-color: #337ab7 !important; 49 | } 50 | 51 | .bootstrap-select .check-mark { 52 | line-height: 14px; 53 | } 54 | .bootstrap-select .check-mark::after { 55 | font-family: "FontAwesome"; 56 | content: ""; 57 | } 58 | 59 | .bootstrap-select button { 60 | overflow: hidden; 61 | text-overflow: ellipsis; 62 | } 63 | 64 | /* Make filled out selects be the same size as empty selects */ 65 | .bootstrap-select.btn-group .dropdown-toggle .filter-option { 66 | display: inline !important; 67 | } 68 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/commonjs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.PickerConfig = exports.AbpSelectCustomElement = undefined; 7 | exports.configure = configure; 8 | 9 | var _abpSelect = require('./abp-select'); 10 | 11 | var _pickerConfig = require('./picker-config'); 12 | 13 | function configure(aurelia, callback) { 14 | aurelia.globalResources('./abp-select'); 15 | 16 | var config = new _pickerConfig.PickerConfig(); 17 | 18 | if (typeof callback === 'function') { 19 | callback(config); 20 | } 21 | } 22 | 23 | exports.AbpSelectCustomElement = _abpSelect.AbpSelectCustomElement; 24 | exports.PickerConfig = _pickerConfig.PickerConfig; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/commonjs/picker-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.PickerConfig = undefined; 7 | 8 | var _pickerGlobalOptions = require('./picker-global-options'); 9 | 10 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11 | 12 | var PickerConfig = exports.PickerConfig = function PickerConfig() { 13 | _classCallCheck(this, PickerConfig); 14 | 15 | this.extra = _pickerGlobalOptions.globalExtraOptions; 16 | this.options = _pickerGlobalOptions.globalPickerOptions; 17 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/commonjs/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | var globalExtraOptions = exports.globalExtraOptions = { 7 | mappingDataStructure: { 8 | class: 'class', 9 | content: 'content', 10 | disabled: 'disabled', 11 | divider: 'divider', 12 | groupLabel: 'group', 13 | groupDisabled: 'disabled', 14 | icon: 'icon', 15 | maxOptions: 'maxOptions', 16 | option: 'option', 17 | subtext: 'subtext', 18 | style: 'style', 19 | title: 'title', 20 | tokens: 'tokens' 21 | } 22 | }; 23 | 24 | var globalPickerOptions = exports.globalPickerOptions = { 25 | dropupAuto: true, 26 | showTick: true, 27 | width: 'auto' 28 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/es2015/bootstrap-select-bs4.css: -------------------------------------------------------------------------------- 1 | /* 2 | Make bootstrap-select work with bootstrap 4 see: 3 | https://github.com/silviomoreto/bootstrap-select/issues/1135 4 | */ 5 | .dropdown-toggle.btn-default { 6 | color: #292b2c; 7 | background-color: #fff; 8 | border-color: #ccc; 9 | } 10 | .bootstrap-select { 11 | width: 100% !important; 12 | .btn-light { 13 | background-color: #fff; 14 | border: 1px solid rgb(206, 212, 218); 15 | } 16 | .bs-ok-default { 17 | border-style: inline-block !important; 18 | } 19 | } 20 | .bootstrap-select.show > .dropdown-menu > .dropdown-menu, 21 | .bootstrap-select > .dropdown-menu > .dropdown-menu li.hidden { 22 | display: block; 23 | } 24 | 25 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a { 26 | display: block; 27 | padding: 3px 1.5rem; 28 | clear: both; 29 | font-weight: 400; 30 | color: #292b2c; 31 | text-align: inherit; 32 | white-space: nowrap; 33 | background: 0 0; 34 | border: 0; 35 | text-decoration: none; 36 | } 37 | 38 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover { 39 | background-color: #f4f4f4; 40 | } 41 | 42 | .bootstrap-select > .dropdown-toggle { 43 | width: 100%; 44 | } 45 | 46 | .dropdown-menu > li.active > a { 47 | color: #fff !important; 48 | background-color: #337ab7 !important; 49 | } 50 | 51 | .bootstrap-select .check-mark { 52 | line-height: 14px; 53 | } 54 | .bootstrap-select .check-mark::after { 55 | font-family: "FontAwesome"; 56 | content: ""; 57 | } 58 | 59 | .bootstrap-select button { 60 | overflow: hidden; 61 | text-overflow: ellipsis; 62 | } 63 | 64 | /* Make filled out selects be the same size as empty selects */ 65 | .bootstrap-select.btn-group .dropdown-toggle .filter-option { 66 | display: inline !important; 67 | } 68 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/es2015/index.js: -------------------------------------------------------------------------------- 1 | import { AbpSelectCustomElement } from './abp-select'; 2 | import { PickerConfig } from './picker-config'; 3 | 4 | export function configure(aurelia, callback) { 5 | aurelia.globalResources('./abp-select'); 6 | 7 | let config = new PickerConfig(); 8 | 9 | if (typeof callback === 'function') { 10 | callback(config); 11 | } 12 | } 13 | 14 | export { AbpSelectCustomElement, PickerConfig }; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/es2015/picker-config.js: -------------------------------------------------------------------------------- 1 | import { globalExtraOptions, globalPickerOptions } from './picker-global-options'; 2 | 3 | export let PickerConfig = class PickerConfig { 4 | constructor() { 5 | this.extra = globalExtraOptions; 6 | this.options = globalPickerOptions; 7 | } 8 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/es2015/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 2 | export let globalExtraOptions = { 3 | mappingDataStructure: { 4 | class: 'class', 5 | content: 'content', 6 | disabled: 'disabled', 7 | divider: 'divider', 8 | groupLabel: 'group', 9 | groupDisabled: 'disabled', 10 | icon: 'icon', 11 | maxOptions: 'maxOptions', 12 | option: 'option', 13 | subtext: 'subtext', 14 | style: 'style', 15 | title: 'title', 16 | tokens: 'tokens' 17 | } 18 | }; 19 | 20 | export let globalPickerOptions = { 21 | dropupAuto: true, 22 | showTick: true, 23 | width: 'auto' 24 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/es2015/util-service.js: -------------------------------------------------------------------------------- 1 | export let UtilService = class UtilService { 2 | isArrayEqual(a, b) { 3 | if (a === b) return true; 4 | if (a === null || b === null) return false; 5 | if (a.length !== b.length) return false; 6 | 7 | for (let i = 0; i < a.length; i++) { 8 | let aExistsInb = false; 9 | for (let j = 0; j < b.length && !aExistsInb; j++) { 10 | if (a[i] === b[j]) { 11 | aExistsInb = true; 12 | } 13 | } 14 | if (!aExistsInb) { 15 | return false; 16 | } 17 | } 18 | return true; 19 | } 20 | 21 | isEqual(a, b) { 22 | if (Array.isArray(a) && Array.isArray(b)) { 23 | return this.isArrayEqual(a.sort(), b.sort()); 24 | } 25 | return a === b; 26 | } 27 | 28 | isObjectArray(inputArrray) { 29 | return Array.isArray(inputArrray) && inputArrray.length > 0 && typeof inputArrray[0] === 'object'; 30 | } 31 | 32 | isObject(arg) { 33 | return typeof arg === 'object'; 34 | } 35 | 36 | isString(arg) { 37 | return typeof arg === 'string' || arg instanceof String; 38 | } 39 | 40 | isStringArray(inputArrray) { 41 | return Array.isArray(inputArrray) && inputArrray.length > 0 && typeof inputArrray[0] === 'string'; 42 | } 43 | 44 | parseBool(value) { 45 | return (/^(true|1)$/i.test(value) 46 | ); 47 | } 48 | 49 | parseBoolOrTrueOnEmpty(value) { 50 | return value === undefined || value === '' ? true : this.parseBool(value); 51 | } 52 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/system/bootstrap-select-bs4.css: -------------------------------------------------------------------------------- 1 | /* 2 | Make bootstrap-select work with bootstrap 4 see: 3 | https://github.com/silviomoreto/bootstrap-select/issues/1135 4 | */ 5 | .dropdown-toggle.btn-default { 6 | color: #292b2c; 7 | background-color: #fff; 8 | border-color: #ccc; 9 | } 10 | .bootstrap-select { 11 | width: 100% !important; 12 | .btn-light { 13 | background-color: #fff; 14 | border: 1px solid rgb(206, 212, 218); 15 | } 16 | .bs-ok-default { 17 | border-style: inline-block !important; 18 | } 19 | } 20 | .bootstrap-select.show > .dropdown-menu > .dropdown-menu, 21 | .bootstrap-select > .dropdown-menu > .dropdown-menu li.hidden { 22 | display: block; 23 | } 24 | 25 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a { 26 | display: block; 27 | padding: 3px 1.5rem; 28 | clear: both; 29 | font-weight: 400; 30 | color: #292b2c; 31 | text-align: inherit; 32 | white-space: nowrap; 33 | background: 0 0; 34 | border: 0; 35 | text-decoration: none; 36 | } 37 | 38 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover { 39 | background-color: #f4f4f4; 40 | } 41 | 42 | .bootstrap-select > .dropdown-toggle { 43 | width: 100%; 44 | } 45 | 46 | .dropdown-menu > li.active > a { 47 | color: #fff !important; 48 | background-color: #337ab7 !important; 49 | } 50 | 51 | .bootstrap-select .check-mark { 52 | line-height: 14px; 53 | } 54 | .bootstrap-select .check-mark::after { 55 | font-family: "FontAwesome"; 56 | content: ""; 57 | } 58 | 59 | .bootstrap-select button { 60 | overflow: hidden; 61 | text-overflow: ellipsis; 62 | } 63 | 64 | /* Make filled out selects be the same size as empty selects */ 65 | .bootstrap-select.btn-group .dropdown-toggle .filter-option { 66 | display: inline !important; 67 | } 68 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/system/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register(['./abp-select', './picker-config'], function (_export, _context) { 4 | "use strict"; 5 | 6 | var AbpSelectCustomElement, PickerConfig; 7 | function configure(aurelia, callback) { 8 | aurelia.globalResources('./abp-select'); 9 | 10 | var config = new PickerConfig(); 11 | 12 | if (typeof callback === 'function') { 13 | callback(config); 14 | } 15 | } 16 | 17 | _export('configure', configure); 18 | 19 | return { 20 | setters: [function (_abpSelect) { 21 | AbpSelectCustomElement = _abpSelect.AbpSelectCustomElement; 22 | }, function (_pickerConfig) { 23 | PickerConfig = _pickerConfig.PickerConfig; 24 | }], 25 | execute: function () { 26 | _export('AbpSelectCustomElement', AbpSelectCustomElement); 27 | 28 | _export('PickerConfig', PickerConfig); 29 | } 30 | }; 31 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/system/picker-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register(['./picker-global-options'], function (_export, _context) { 4 | "use strict"; 5 | 6 | var globalExtraOptions, globalPickerOptions, PickerConfig; 7 | 8 | function _classCallCheck(instance, Constructor) { 9 | if (!(instance instanceof Constructor)) { 10 | throw new TypeError("Cannot call a class as a function"); 11 | } 12 | } 13 | 14 | return { 15 | setters: [function (_pickerGlobalOptions) { 16 | globalExtraOptions = _pickerGlobalOptions.globalExtraOptions; 17 | globalPickerOptions = _pickerGlobalOptions.globalPickerOptions; 18 | }], 19 | execute: function () { 20 | _export('PickerConfig', PickerConfig = function PickerConfig() { 21 | _classCallCheck(this, PickerConfig); 22 | 23 | this.extra = globalExtraOptions; 24 | this.options = globalPickerOptions; 25 | }); 26 | 27 | _export('PickerConfig', PickerConfig); 28 | } 29 | }; 30 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-select/dist/system/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register([], function (_export, _context) { 4 | "use strict"; 5 | 6 | var globalExtraOptions, globalPickerOptions; 7 | return { 8 | setters: [], 9 | execute: function () { 10 | _export('globalExtraOptions', globalExtraOptions = { 11 | mappingDataStructure: { 12 | class: 'class', 13 | content: 'content', 14 | disabled: 'disabled', 15 | divider: 'divider', 16 | groupLabel: 'group', 17 | groupDisabled: 'disabled', 18 | icon: 'icon', 19 | maxOptions: 'maxOptions', 20 | option: 'option', 21 | subtext: 'subtext', 22 | style: 'style', 23 | title: 'title', 24 | tokens: 'tokens' 25 | } 26 | }); 27 | 28 | _export('globalExtraOptions', globalExtraOptions); 29 | 30 | _export('globalPickerOptions', globalPickerOptions = { 31 | dropupAuto: true, 32 | showTick: true, 33 | width: 'auto' 34 | }); 35 | 36 | _export('globalPickerOptions', globalPickerOptions); 37 | } 38 | }; 39 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-select/doc/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### 0.3.0 (2017-01-11) 2 | 3 | * Breaking Change: renamed `createDatagrid()` to simply `createGrid()` 4 | * Add missing `Plugins` directly in `aurelia-slickgrid` until `slickgrid-es6` resolve it's own bundle issue with the `Plugins`. 5 | * Add `Aurelia-Webpack` sample available in `client-wp` folder 6 | 7 | 8 | ### 0.2.0 (2017-01-11) 9 | 10 | * First official working `Aurelia-Slickgrid` version 11 | 12 | 13 | ### 0.1.0 (2017-01-08) 14 | 15 | * Initial `Aurelia-Slickgrid` commit 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/doc/api.json: -------------------------------------------------------------------------------- 1 | {"classes":[],"methods":[],"properties":[],"events":[]} -------------------------------------------------------------------------------- /aurelia-bootstrap-select/gulpfile.js: -------------------------------------------------------------------------------- 1 | // all gulp tasks are located in the ./build/tasks directory 2 | // gulp configuration is in files in ./build directory 3 | require('require-dir')('build/tasks'); 4 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/printscreen/abp-select.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/aurelia-bootstrap-select/printscreen/abp-select.jpg -------------------------------------------------------------------------------- /aurelia-bootstrap-select/src/bootstrap-select-bs4.css: -------------------------------------------------------------------------------- 1 | /* 2 | Make bootstrap-select work with bootstrap 4 see: 3 | https://github.com/silviomoreto/bootstrap-select/issues/1135 4 | */ 5 | .dropdown-toggle.btn-default { 6 | color: #292b2c; 7 | background-color: #fff; 8 | border-color: #ccc; 9 | } 10 | .bootstrap-select { 11 | width: 100% !important; 12 | .btn-light { 13 | background-color: #fff; 14 | border: 1px solid rgb(206, 212, 218); 15 | } 16 | .bs-ok-default { 17 | border-style: inline-block !important; 18 | } 19 | } 20 | .bootstrap-select.show > .dropdown-menu > .dropdown-menu, 21 | .bootstrap-select > .dropdown-menu > .dropdown-menu li.hidden { 22 | display: block; 23 | } 24 | 25 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a { 26 | display: block; 27 | padding: 3px 1.5rem; 28 | clear: both; 29 | font-weight: 400; 30 | color: #292b2c; 31 | text-align: inherit; 32 | white-space: nowrap; 33 | background: 0 0; 34 | border: 0; 35 | text-decoration: none; 36 | } 37 | 38 | .bootstrap-select > .dropdown-menu > .dropdown-menu li a:hover { 39 | background-color: #f4f4f4; 40 | } 41 | 42 | .bootstrap-select > .dropdown-toggle { 43 | width: 100%; 44 | } 45 | 46 | .dropdown-menu > li.active > a { 47 | color: #fff !important; 48 | background-color: #337ab7 !important; 49 | } 50 | 51 | .bootstrap-select .check-mark { 52 | line-height: 14px; 53 | } 54 | .bootstrap-select .check-mark::after { 55 | font-family: "FontAwesome"; 56 | content: ""; 57 | } 58 | 59 | .bootstrap-select button { 60 | overflow: hidden; 61 | text-overflow: ellipsis; 62 | } 63 | 64 | /* Make filled out selects be the same size as empty selects */ 65 | .bootstrap-select.btn-group .dropdown-toggle .filter-option { 66 | display: inline !important; 67 | } 68 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/src/index.js: -------------------------------------------------------------------------------- 1 | import {AbpSelectCustomElement} from './abp-select'; 2 | import {PickerConfig} from './picker-config'; 3 | 4 | export function configure(aurelia, callback) { 5 | aurelia.globalResources('./abp-select'); 6 | 7 | let config = new PickerConfig(); 8 | 9 | if (typeof callback === 'function') { 10 | callback(config); 11 | } 12 | } 13 | 14 | export { 15 | AbpSelectCustomElement, 16 | PickerConfig 17 | }; 18 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/src/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "experimentalDecorators" : true 6 | } 7 | } -------------------------------------------------------------------------------- /aurelia-bootstrap-select/src/picker-config.js: -------------------------------------------------------------------------------- 1 | import {globalExtraOptions, globalPickerOptions} from './picker-global-options'; 2 | 3 | export class PickerConfig { 4 | constructor() { 5 | this.extra = globalExtraOptions; 6 | this.options = globalPickerOptions; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/src/picker-global-options.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Extra options that can be passed to the Custom Element 3 | */ 4 | export let globalExtraOptions = { 5 | mappingDataStructure: { 6 | class: 'class', 7 | content: 'content', 8 | disabled: 'disabled', 9 | divider: 'divider', 10 | groupLabel: 'group', 11 | groupDisabled: 'disabled', 12 | icon: 'icon', 13 | maxOptions: 'maxOptions', 14 | option: 'option', 15 | subtext: 'subtext', 16 | style: 'style', 17 | title: 'title', 18 | tokens: 'tokens' 19 | } 20 | }; 21 | 22 | /** 23 | * Options that can be passed to the Bootstrap-Select directly 24 | */ 25 | export let globalPickerOptions = { 26 | dropupAuto: true, 27 | showTick: true, 28 | width: 'auto' 29 | }; 30 | -------------------------------------------------------------------------------- /aurelia-bootstrap-select/test/setup.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; -------------------------------------------------------------------------------- /aurelia-bootstrap-select/test/unit/configure.spec.js: -------------------------------------------------------------------------------- 1 | import {configure} from '../../src/index'; 2 | 3 | class ConfigStub { 4 | globalResources(...resources) { 5 | this.resources = resources; 6 | } 7 | } 8 | 9 | describe('the Aurelia configuration', () => { 10 | var mockedConfiguration; 11 | 12 | beforeEach(() => { 13 | mockedConfiguration = new ConfigStub(); 14 | configure(mockedConfiguration); 15 | }); 16 | 17 | it('should register a global resource', () => { 18 | expect(mockedConfiguration.resources).toContain('./hello-world'); 19 | }); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/aurelia-tools/.eslintrc.json" 3 | } 4 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/.gitignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea 4 | build 5 | doc 6 | node_modules 7 | printscreen 8 | screenshots 9 | test 10 | client-cli 11 | client-wp 12 | npm-debug.log 13 | karma.conf.js 14 | gulpfile.js 15 | yarn.lock 16 | npm-debug.log 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/.npmignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | .idea 4 | build 5 | doc 6 | node_modules 7 | printscreen 8 | screenshots 9 | test 10 | client-cli 11 | client-wp 12 | npm-debug.log 13 | karma.conf.js 14 | gulpfile.js 15 | yarn.lock 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/args.js: -------------------------------------------------------------------------------- 1 | var yargs = require('yargs'); 2 | 3 | var argv = yargs.argv; 4 | var validBumpTypes = 'major|minor|patch|prerelease'.split('|'); 5 | var bump = (argv.bump || 'patch').toLowerCase(); 6 | 7 | if (validBumpTypes.indexOf(bump) === -1) { 8 | throw new Error('Unrecognized bump "' + bump + '".'); 9 | } 10 | 11 | module.exports = { 12 | bump: bump, 13 | depth: parseInt(argv.depth || '0') 14 | }; 15 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/babel-options.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var paths = require('./paths'); 3 | 4 | exports.base = function() { 5 | return { 6 | filename: '', 7 | filenameRelative: '', 8 | sourceMap: true, 9 | sourceRoot: '', 10 | moduleRoot: path.resolve('src').replace(/\\/g, '/'), 11 | moduleIds: false, 12 | comments: false, 13 | compact: false, 14 | code:true, 15 | presets: [ 'es2015-loose', 'stage-1'], 16 | plugins: [ 17 | 'syntax-flow', 18 | 'transform-decorators-legacy', 19 | 'transform-flow-strip-types' 20 | ] 21 | }; 22 | } 23 | 24 | exports.commonjs = function() { 25 | var options = exports.base(); 26 | options.plugins.push('transform-es2015-modules-commonjs'); 27 | return options; 28 | }; 29 | 30 | exports.amd = function() { 31 | var options = exports.base(); 32 | options.plugins.push('transform-es2015-modules-amd'); 33 | return options; 34 | }; 35 | 36 | exports.system = function() { 37 | var options = exports.base(); 38 | options.plugins.push('transform-es2015-modules-systemjs'); 39 | return options; 40 | }; 41 | 42 | exports.es2015 = function() { 43 | var options = exports.base(); 44 | options.presets = ['stage-1'] 45 | return options; 46 | }; 47 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/paths.js: -------------------------------------------------------------------------------- 1 | var appRoot = 'src/'; 2 | var outputRoot = 'dist/'; 3 | 4 | module.exports = { 5 | root: appRoot, 6 | source: appRoot + '**/*.js', 7 | html: appRoot + '**/*.html', 8 | css: appRoot + '**/*.css', 9 | scss: appRoot + 'styles/**/*.scss', 10 | scssRoot: appRoot + '**/*.scss', 11 | style: 'styles/**/*.css', 12 | output: outputRoot, 13 | doc: './doc', 14 | e2eSpecsSrc: 'test/e2e/src/*.js', 15 | e2eSpecsDist: 'test/e2e/dist/' 16 | }; 17 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/tasks/clean.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var del = require('del'); 4 | var vinylPaths = require('vinyl-paths'); 5 | 6 | // deletes all files in the output path 7 | gulp.task('clean', function() { 8 | return gulp.src([paths.output]) 9 | .pipe(vinylPaths(del)); 10 | }); 11 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/tasks/dev.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var args = require('../args'); 4 | 5 | // source code for the tasks called in this file 6 | // is located at: https://github.com/aurelia/tools/blob/master/src/dev.js 7 | 8 | // updates dependencies in this folder 9 | // from folders in the parent directory 10 | gulp.task('update-own-deps', function() { 11 | tools.updateOwnDependenciesFromLocalRepositories(args.depth); 12 | }); 13 | 14 | // quickly pulls in all of the aurelia 15 | // github repos, placing them up one directory 16 | // from where the command is executed, 17 | // then runs `npm install` 18 | // and `gulp build` for each repo 19 | gulp.task('build-dev-env', function() { 20 | tools.buildDevEnv(); 21 | }); 22 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/tasks/doc.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tools = require('aurelia-tools'); 3 | var paths = require('../paths'); 4 | var yuidoc = require('gulp-yuidoc'); 5 | 6 | gulp.task('doc-generate', function(){ 7 | return gulp.src(paths.source) 8 | .pipe(yuidoc.parser(null, 'api.json')) 9 | .pipe(gulp.dest(paths.doc)); 10 | }); 11 | 12 | gulp.task('doc', ['doc-generate'], function(){ 13 | tools.transformAPIModel(paths.doc); 14 | }); 15 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/tasks/lint.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var paths = require('../paths'); 3 | var eslint = require('gulp-eslint'); 4 | 5 | // runs eslint on all .js files 6 | gulp.task('lint', function() { 7 | return gulp.src(paths.source) 8 | .pipe(eslint()) 9 | .pipe(eslint.format()) 10 | .pipe(eslint.failOnError()); 11 | }); 12 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/tasks/prepare-release.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var runSequence = require('run-sequence'); 3 | var paths = require('../paths'); 4 | var changelog = require('conventional-changelog'); 5 | var fs = require('fs'); 6 | var bump = require('gulp-bump'); 7 | var args = require('../args'); 8 | 9 | // utilizes the bump plugin to bump the 10 | // semver for the repo 11 | gulp.task('bump-version', function() { 12 | return gulp.src(['./package.json']) 13 | .pipe(bump({type: args.bump})) //major|minor|patch|prerelease 14 | .pipe(gulp.dest('./')); 15 | }); 16 | 17 | // generates the CHANGELOG.md file based on commit 18 | // from git commit messages 19 | gulp.task('changelog', function(callback) { 20 | var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); 21 | 22 | return changelog({ 23 | repository: pkg.repository.url, 24 | version: pkg.version, 25 | file: paths.doc + '/CHANGELOG.md' 26 | }, function(err, log) { 27 | fs.writeFileSync(paths.doc + '/CHANGELOG.md', log); 28 | }); 29 | }); 30 | 31 | // calls the listed sequence of tasks in order 32 | gulp.task('prepare-release', function(callback) { 33 | return runSequence( 34 | 'build', 35 | 'lint', 36 | 'bump-version', 37 | 'changelog', 38 | callback 39 | ); 40 | }); 41 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/build/tasks/test.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var Karma = require('karma').Server; 3 | 4 | /** 5 | * Run test once and exit 6 | */ 7 | gulp.task('test', function(done) { 8 | new Karma({ 9 | configFile: __dirname + '/../../karma.conf.js', 10 | singleRun: true 11 | }, done).start(); 12 | }); 13 | 14 | /** 15 | * Watch for file changes and re-run tests on each change 16 | */ 17 | gulp.task('tdd', function(done) { 18 | new Karma({ 19 | configFile: __dirname + '/../../karma.conf.js' 20 | }, done).start(); 21 | }); 22 | 23 | /** 24 | * Run test once with code coverage and exit 25 | */ 26 | gulp.task('cover', function(done) { 27 | new Karma({ 28 | configFile: __dirname + '/../../karma.conf.js', 29 | singleRun: true, 30 | reporters: ['coverage'], 31 | preprocessors: { 32 | 'test/**/*.js': ['babel'], 33 | 'src/**/*.js': ['babel', 'coverage'] 34 | }, 35 | coverageReporter: { 36 | includeAllSources: true, 37 | instrumenters: { 38 | isparta: require('isparta') 39 | }, 40 | instrumenter: { 41 | 'src/**/*.js': 'isparta' 42 | }, 43 | reporters: [ 44 | { type: 'html', dir: 'coverage' }, 45 | { type: 'text' } 46 | ] 47 | } 48 | }, done).start(); 49 | }); 50 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | defaultJSExtensions: true, 3 | transpiler: false, 4 | paths: { 5 | "github:*": "jspm_packages/github/*", 6 | "npm:*": "jspm_packages/npm/*" 7 | }, 8 | 9 | map: { 10 | "aurelia-polyfills": "npm:aurelia-polyfills@1.0.0", 11 | "npm:aurelia-polyfills@1.0.0": { 12 | "aurelia-pal": "npm:aurelia-pal@1.0.0" 13 | } 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/amd/abp-tags-input.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/amd/index.js: -------------------------------------------------------------------------------- 1 | define(['exports', './abp-tags-input', './picker-config'], function (exports, _abpTagsInput, _pickerConfig) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.PickerConfig = exports.AbpTagsInputCustomElement = undefined; 8 | exports.configure = configure; 9 | function configure(aurelia, callback) { 10 | aurelia.globalResources('./abp-tags-input'); 11 | 12 | var config = new _pickerConfig.PickerConfig(); 13 | 14 | if (typeof callback === 'function') { 15 | callback(config); 16 | } 17 | } 18 | 19 | exports.AbpTagsInputCustomElement = _abpTagsInput.AbpTagsInputCustomElement; 20 | exports.PickerConfig = _pickerConfig.PickerConfig; 21 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/amd/picker-config.js: -------------------------------------------------------------------------------- 1 | define(['exports', './picker-global-options'], function (exports, _pickerGlobalOptions) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.PickerConfig = undefined; 8 | 9 | function _classCallCheck(instance, Constructor) { 10 | if (!(instance instanceof Constructor)) { 11 | throw new TypeError("Cannot call a class as a function"); 12 | } 13 | } 14 | 15 | var PickerConfig = exports.PickerConfig = function PickerConfig() { 16 | _classCallCheck(this, PickerConfig); 17 | 18 | this.extra = _pickerGlobalOptions.globalExtraOptions; 19 | this.options = _pickerGlobalOptions.globalPickerOptions; 20 | }; 21 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/amd/picker-global-options.js: -------------------------------------------------------------------------------- 1 | define(['exports'], function (exports) { 2 | 'use strict'; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | var globalExtraOptions = exports.globalExtraOptions = { 8 | bootstrapVersion: 3 9 | }; 10 | 11 | var globalPickerOptions = exports.globalPickerOptions = { 12 | tagClass: 'badge badge-info' 13 | }; 14 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/commonjs/abp-tags-input.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/commonjs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.PickerConfig = exports.AbpTagsInputCustomElement = undefined; 7 | exports.configure = configure; 8 | 9 | var _abpTagsInput = require('./abp-tags-input'); 10 | 11 | var _pickerConfig = require('./picker-config'); 12 | 13 | function configure(aurelia, callback) { 14 | aurelia.globalResources('./abp-tags-input'); 15 | 16 | var config = new _pickerConfig.PickerConfig(); 17 | 18 | if (typeof callback === 'function') { 19 | callback(config); 20 | } 21 | } 22 | 23 | exports.AbpTagsInputCustomElement = _abpTagsInput.AbpTagsInputCustomElement; 24 | exports.PickerConfig = _pickerConfig.PickerConfig; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/commonjs/picker-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.PickerConfig = undefined; 7 | 8 | var _pickerGlobalOptions = require('./picker-global-options'); 9 | 10 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11 | 12 | var PickerConfig = exports.PickerConfig = function PickerConfig() { 13 | _classCallCheck(this, PickerConfig); 14 | 15 | this.extra = _pickerGlobalOptions.globalExtraOptions; 16 | this.options = _pickerGlobalOptions.globalPickerOptions; 17 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/commonjs/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | var globalExtraOptions = exports.globalExtraOptions = { 7 | bootstrapVersion: 3 8 | }; 9 | 10 | var globalPickerOptions = exports.globalPickerOptions = { 11 | tagClass: 'badge badge-info' 12 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/es2015/abp-tags-input.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/es2015/index.js: -------------------------------------------------------------------------------- 1 | import { AbpTagsInputCustomElement } from './abp-tags-input'; 2 | import { PickerConfig } from './picker-config'; 3 | 4 | export function configure(aurelia, callback) { 5 | aurelia.globalResources('./abp-tags-input'); 6 | 7 | let config = new PickerConfig(); 8 | 9 | if (typeof callback === 'function') { 10 | callback(config); 11 | } 12 | } 13 | 14 | export { AbpTagsInputCustomElement, PickerConfig }; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/es2015/picker-config.js: -------------------------------------------------------------------------------- 1 | import { globalExtraOptions, globalPickerOptions } from './picker-global-options'; 2 | 3 | export let PickerConfig = class PickerConfig { 4 | constructor() { 5 | this.extra = globalExtraOptions; 6 | this.options = globalPickerOptions; 7 | } 8 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/es2015/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 2 | export let globalExtraOptions = { 3 | bootstrapVersion: 3 4 | }; 5 | 6 | export let globalPickerOptions = { 7 | tagClass: 'badge badge-info' 8 | }; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/system/abp-tags-input.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/system/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register(['./abp-tags-input', './picker-config'], function (_export, _context) { 4 | "use strict"; 5 | 6 | var AbpTagsInputCustomElement, PickerConfig; 7 | function configure(aurelia, callback) { 8 | aurelia.globalResources('./abp-tags-input'); 9 | 10 | var config = new PickerConfig(); 11 | 12 | if (typeof callback === 'function') { 13 | callback(config); 14 | } 15 | } 16 | 17 | _export('configure', configure); 18 | 19 | return { 20 | setters: [function (_abpTagsInput) { 21 | AbpTagsInputCustomElement = _abpTagsInput.AbpTagsInputCustomElement; 22 | }, function (_pickerConfig) { 23 | PickerConfig = _pickerConfig.PickerConfig; 24 | }], 25 | execute: function () { 26 | _export('AbpTagsInputCustomElement', AbpTagsInputCustomElement); 27 | 28 | _export('PickerConfig', PickerConfig); 29 | } 30 | }; 31 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/system/picker-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register(['./picker-global-options'], function (_export, _context) { 4 | "use strict"; 5 | 6 | var globalExtraOptions, globalPickerOptions, PickerConfig; 7 | 8 | function _classCallCheck(instance, Constructor) { 9 | if (!(instance instanceof Constructor)) { 10 | throw new TypeError("Cannot call a class as a function"); 11 | } 12 | } 13 | 14 | return { 15 | setters: [function (_pickerGlobalOptions) { 16 | globalExtraOptions = _pickerGlobalOptions.globalExtraOptions; 17 | globalPickerOptions = _pickerGlobalOptions.globalPickerOptions; 18 | }], 19 | execute: function () { 20 | _export('PickerConfig', PickerConfig = function PickerConfig() { 21 | _classCallCheck(this, PickerConfig); 22 | 23 | this.extra = globalExtraOptions; 24 | this.options = globalPickerOptions; 25 | }); 26 | 27 | _export('PickerConfig', PickerConfig); 28 | } 29 | }; 30 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/dist/system/picker-global-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | System.register([], function (_export, _context) { 4 | "use strict"; 5 | 6 | var globalExtraOptions, globalPickerOptions; 7 | return { 8 | setters: [], 9 | execute: function () { 10 | _export('globalExtraOptions', globalExtraOptions = { 11 | bootstrapVersion: 3 12 | }); 13 | 14 | _export('globalExtraOptions', globalExtraOptions); 15 | 16 | _export('globalPickerOptions', globalPickerOptions = { 17 | tagClass: 'badge badge-info' 18 | }); 19 | 20 | _export('globalPickerOptions', globalPickerOptions); 21 | } 22 | }; 23 | }); -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/doc/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### 0.3.0 (2017-01-11) 2 | 3 | * Breaking Change: renamed `createDatagrid()` to simply `createGrid()` 4 | * Add missing `Plugins` directly in `aurelia-slickgrid` until `slickgrid-es6` resolve it's own bundle issue with the `Plugins`. 5 | * Add `Aurelia-Webpack` sample available in `client-wp` folder 6 | 7 | 8 | ### 0.2.0 (2017-01-11) 9 | 10 | * First official working `Aurelia-Slickgrid` version 11 | 12 | 13 | ### 0.1.0 (2017-01-08) 14 | 15 | * Initial `Aurelia-Slickgrid` commit 16 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/doc/api.json: -------------------------------------------------------------------------------- 1 | {"classes":[],"methods":[],"properties":[],"events":[]} -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/gulpfile.js: -------------------------------------------------------------------------------- 1 | // all gulp tasks are located in the ./build/tasks directory 2 | // gulp configuration is in files in ./build directory 3 | require('require-dir')('build/tasks'); 4 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/printscreen/abp-tagsinput.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/aurelia-bootstrap-tagsinput/printscreen/abp-tagsinput.jpg -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/src/abp-tags-input.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/src/index.js: -------------------------------------------------------------------------------- 1 | import {AbpTagsInputCustomElement} from './abp-tags-input'; 2 | import {PickerConfig} from './picker-config'; 3 | 4 | export function configure(aurelia, callback) { 5 | aurelia.globalResources('./abp-tags-input'); 6 | 7 | let config = new PickerConfig(); 8 | 9 | if (typeof callback === 'function') { 10 | callback(config); 11 | } 12 | } 13 | 14 | export { 15 | AbpTagsInputCustomElement, 16 | PickerConfig 17 | }; 18 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/src/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "experimentalDecorators" : true 6 | } 7 | } -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/src/picker-config.js: -------------------------------------------------------------------------------- 1 | import {globalExtraOptions, globalPickerOptions} from './picker-global-options'; 2 | 3 | export class PickerConfig { 4 | constructor() { 5 | this.extra = globalExtraOptions; 6 | this.options = globalPickerOptions; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/src/picker-global-options.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Extra options that can be passed to the Custom Element 3 | */ 4 | export let globalExtraOptions = { 5 | bootstrapVersion: 3 6 | }; 7 | 8 | /** 9 | * Options that can be passed to the Bootstrap-Datetimepicker directly 10 | */ 11 | export let globalPickerOptions = { 12 | tagClass: 'badge badge-info' 13 | }; 14 | -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/test/setup.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; -------------------------------------------------------------------------------- /aurelia-bootstrap-tagsinput/test/unit/configure.spec.js: -------------------------------------------------------------------------------- 1 | import {configure} from '../../src/index'; 2 | 3 | class ConfigStub { 4 | globalResources(...resources) { 5 | this.resources = resources; 6 | } 7 | } 8 | 9 | describe('the Aurelia configuration', () => { 10 | var mockedConfiguration; 11 | 12 | beforeEach(() => { 13 | mockedConfiguration = new ConfigStub(); 14 | configure(mockedConfiguration); 15 | }); 16 | 17 | it('should register a global resource', () => { 18 | expect(mockedConfiguration.resources).toContain('./hello-world'); 19 | }); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": ".NET Core Launch (web)", 6 | "type": "coreclr", 7 | "request": "launch", 8 | "preLaunchTask": "build", 9 | "program": "${workspaceRoot}\\bin\\Debug\\netcoreapp1.0\\AureliaDemo.dll", 10 | "args": [], 11 | "cwd": "${workspaceRoot}", 12 | "stopAtEntry": false, 13 | "internalConsoleOptions": "openOnSessionStart", 14 | "launchBrowser": { 15 | "enabled": true, 16 | "args": "${auto-detect-url}", 17 | "windows": { 18 | "command": "cmd.exe", 19 | "args": "/C start ${auto-detect-url}" 20 | }, 21 | "osx": { 22 | "command": "open" 23 | }, 24 | "linux": { 25 | "command": "xdg-open" 26 | } 27 | }, 28 | "env": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | }, 31 | "sourceFileMap": { 32 | "/Views": "${workspaceRoot}/Views" 33 | } 34 | }, 35 | { 36 | "name": ".NET Core Attach", 37 | "type": "coreclr", 38 | "request": "attach", 39 | "processId": "${command.pickProcess}" 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "command": "dotnet", 4 | "isShellCommand": true, 5 | "args": [], 6 | "tasks": [ 7 | { 8 | "taskName": "build", 9 | "args": [ 10 | "${workspaceRoot}\\AureliaDemo.csproj" 11 | ], 12 | "isBuildCommand": true, 13 | "problemMatcher": "$msCompile" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/app.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/app.ts: -------------------------------------------------------------------------------- 1 | import {Router, RouterConfiguration} from 'aurelia-router'; 2 | import {PLATFORM} from 'aurelia-pal'; 3 | 4 | export class App { 5 | router: Router; 6 | 7 | configureRouter(config: RouterConfiguration, router: Router) { 8 | config.title = 'Aurelia'; 9 | config.map([ 10 | { route: 'bootstrap-plugins', name: 'bootstrap-plugins', moduleId: PLATFORM.moduleName('./bootstrap-plugins'), nav: true, title: 'Bootstrap Plugins' }, 11 | { route: 'validation-form', name: 'validation-form', moduleId: PLATFORM.moduleName('./validation-form'), nav: true, title: 'Validation Form' }, 12 | { route: '', redirect: 'validation-form' } 13 | ]); 14 | 15 | this.router = router; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/bootstrap-form-renderer.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ValidationRenderer, 3 | RenderInstruction, 4 | ValidateResult 5 | } from 'aurelia-validation'; 6 | 7 | export class BootstrapFormRenderer { 8 | render(instruction: RenderInstruction) { 9 | for (let { result, elements } of instruction.unrender) { 10 | for (let element of elements) { 11 | this.remove(element, result); 12 | } 13 | } 14 | 15 | for (let { result, elements } of instruction.render) { 16 | for (let element of elements) { 17 | this.add(element, result); 18 | } 19 | } 20 | } 21 | 22 | add(element: Element, result: ValidateResult) { 23 | const formGroup = element.closest('.form-group'); 24 | if (!formGroup) { 25 | return; 26 | } 27 | 28 | if (result.valid) { 29 | if (!formGroup.classList.contains('has-error')) { 30 | formGroup.classList.add('has-success'); 31 | } 32 | } else { 33 | // add the has-error class to the enclosing form-group div 34 | formGroup.classList.remove('has-success'); 35 | formGroup.classList.add('has-error'); 36 | 37 | // add help-block 38 | const message = document.createElement('span'); 39 | message.className = 'help-block validation-message'; 40 | message.textContent = result.message; 41 | message.id = `validation-message-${result.id}`; 42 | formGroup.appendChild(message); 43 | } 44 | } 45 | 46 | remove(element: Element, result: ValidateResult) { 47 | const formGroup = element.closest('.form-group'); 48 | if (!formGroup) { 49 | return; 50 | } 51 | 52 | if (result.valid) { 53 | if (formGroup.classList.contains('has-success')) { 54 | formGroup.classList.remove('has-success'); 55 | } 56 | } else { 57 | // remove help-block 58 | const message = formGroup.querySelector(`#validation-message-${result.id}`); 59 | if (message) { 60 | formGroup.removeChild(message); 61 | 62 | // remove the has-error class from the enclosing form-group div 63 | if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) { 64 | formGroup.classList.remove('has-error'); 65 | } 66 | } 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/App/favicon.ico -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/main.ts: -------------------------------------------------------------------------------- 1 | // we want font-awesome to load as soon as possible to show the fa-spinner 2 | import './style.css'; 3 | import 'font-awesome/css/font-awesome.css'; 4 | import 'bootstrap/dist/css/bootstrap.css'; 5 | import 'bootstrap-select/dist/css/bootstrap-select.min.css'; 6 | import 'bootstrap-tagsinput/dist/bootstrap-tagsinput.css'; 7 | import 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css'; 8 | import 'bootstrap'; 9 | import {Aurelia, PLATFORM} from "aurelia-framework"; 10 | import * as Bluebird from 'bluebird'; 11 | 12 | // remove out if you don't want a Promise polyfill (remove also from webpack.config.js) 13 | Bluebird.config({ warnings: { wForgottenReturn: false } }); 14 | 15 | export function configure(aurelia: Aurelia) { 16 | aurelia.use.standardConfiguration().developmentLogging(); 17 | 18 | aurelia.use.feature(PLATFORM.moduleName("resources/index")); 19 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-datetimepicker'), config => { 20 | // extra attributes, with config.extra 21 | config.extra.iconBase = 'font-awesome'; 22 | config.extra.withDateIcon = true; 23 | 24 | // or even any picker options, with config.options 25 | config.options.format = 'YYYY-MM-DD'; 26 | config.options.showTodayButton = true; 27 | }); 28 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-select')); 29 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-tagsinput')); 30 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-validation')); 31 | aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app'))); 32 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/nav-bar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/resources/index.ts: -------------------------------------------------------------------------------- 1 | import {PLATFORM} from 'aurelia-pal'; 2 | 3 | export function configure(config) { 4 | config.globalResources([ 5 | PLATFORM.moduleName('./value-converters/stringify') 6 | ]); 7 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/resources/value-converters/stringify.ts: -------------------------------------------------------------------------------- 1 | export class StringifyValueConverter { 2 | public toView( value: any ): string { 3 | return JSON.stringify(value, null, 4 ); 4 | } 5 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/validation-form.html: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/App/validation-form.ts: -------------------------------------------------------------------------------- 1 | import {bindable, inject} from 'aurelia-framework'; 2 | import {ValidationController, ValidationControllerFactory, ValidationRules} from 'aurelia-validation'; 3 | import {BootstrapFormRenderer} from './bootstrap-form-renderer'; 4 | 5 | @inject(ValidationControllerFactory) 6 | export class ValidationForm { 7 | firstName: string = ''; 8 | lastName: string = ''; 9 | email: string = ''; 10 | controller: ValidationController = null; 11 | campingCollection = ['Tent', 'Flashlight', 'Sleeping Bag']; 12 | 13 | constructor(private controllerFactory: ValidationControllerFactory) { 14 | this.controller = controllerFactory.createForCurrentScope(); 15 | this.controller.addRenderer(new BootstrapFormRenderer()); 16 | } 17 | 18 | submit() { 19 | this.controller.validate(); 20 | } 21 | } 22 | 23 | ValidationRules 24 | .ensure('firstName').required() 25 | .ensure('lastName').required() 26 | .ensure('email').required().email() 27 | .ensure('categories').required() 28 | .ensure('dateEntered').required() 29 | .ensure('camping').minItems(1) 30 | .on(ValidationForm); 31 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/AureliaDemo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp1.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace AureliaDemo.Controllers 4 | { 5 | public class HomeController : Controller 6 | { 7 | public IActionResult Index() => View(); 8 | } 9 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/Controllers/TimeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AureliaDemo.Controllers { 4 | public class TimeController { 5 | public object Index() 6 | { 7 | return new { 8 | Time = DateTime.Now.ToString("T") 9 | }; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/Program.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace AureliaDemo 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | var host = new WebHostBuilder() 11 | .UseKestrel() 12 | .UseUrls("http://localhost:9000") 13 | .UseContentRoot(Directory.GetCurrentDirectory()) 14 | .UseIISIntegration() 15 | .UseStartup() 16 | .Build(); 17 | 18 | host.Run(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/README.md: -------------------------------------------------------------------------------- 1 | # Aurelia ASP.Net Core - WebPack (typescript) 2 | This is based on the new [Jods Aurelia-WebPack 2.x base](https://github.com/jods4/aurelia-webpack-build/tree/master/demos/06-ASPNET), please make sure to read his [Wiki - Getting Started](https://github.com/jods4/aurelia-webpack-build/wiki/Getting-started) 3 | 4 | ```bash 5 | git clone https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins 6 | cd client-aspnetcore-ts 7 | npm install # or: yarn install 8 | set ASPNETCORE_ENVIRONMENT=Development 9 | dotnet restore 10 | dotnet watch run 11 | ``` 12 | 13 | 14 | ## Plugin examples 15 | 16 | ### Aurelia-Bootstrap-Tagsinput 17 | 18 | #### Usage 19 | A quick example of the code in action. Note that the value is available under the `value.bind`. 20 | ```html 21 | 22 | ``` 23 | 24 | ### Aurelia-Bootstrap-Datetimepicker 25 | 26 | #### Usage 27 | A quick example of the code in action. Note that the value is available under the `value.bind`. 28 | ```html 29 | 30 | ``` 31 | 32 | ### Aurelia-Bootstrap-Select 33 | 34 | #### Usage 35 | A quick example of the code in action. 36 | 37 | **Note**: We use the `collection.bind` attribute to pass the collection of all select options and the selection is available from `selected-value` (value) and `selected-item` (string/object) 38 | 39 | ```html 40 | 41 | ``` -------------------------------------------------------------------------------- /client-aspnetcore-ts/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.SpaServices.Webpack; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace AureliaDemo 8 | { 9 | public class Startup 10 | { 11 | public void ConfigureServices(IServiceCollection services) 12 | { 13 | services.AddMvc(); 14 | } 15 | 16 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) 17 | { 18 | loggerFactory.AddConsole(); 19 | 20 | if (env.IsDevelopment()) 21 | { 22 | app.UseDeveloperExceptionPage(); 23 | app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions 24 | { 25 | HotModuleReplacement = true 26 | }); 27 | } 28 | 29 | app.UseStaticFiles(); 30 | 31 | app.UseMvc(routes => 32 | { 33 | routes.MapRoute("api", "api/{controller}/{action=Index}"); 34 | routes.MapSpaFallbackRoute("spa-fallback", new { controller = "Home", action = "Index" }); 35 | }); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aurelia-bootstrap-plugin", 3 | "version": "1.0.0", 4 | "description": "Aurelia samples for Aurelia-Bootstrap-Plugins", 5 | "keywords": [ 6 | "aurelia", 7 | "bootstrap", 8 | "datetimepicker", 9 | "tagsinput" 10 | ], 11 | "main": "wwwroot/dist/app.js", 12 | "repository": { 13 | "url": "https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins", 14 | "type": "git" 15 | }, 16 | "author": "Ghislain B.", 17 | "license": "MIT", 18 | "engines": { 19 | "node": ">= 6.0.0" 20 | }, 21 | "devDependencies": { 22 | "aspnet-webpack": "^1.0.29", 23 | "aurelia-loader-nodejs": "1.0.1", 24 | "aurelia-webpack-plugin": "^2.0.0-rc.2", 25 | "css-loader": "^0.28.4", 26 | "expose-loader": "^0.7.3", 27 | "file-loader": "^0.11.2", 28 | "style-loader": "^0.18.2", 29 | "ts-loader": "^2.2.2", 30 | "tslib": "^1.7.1", 31 | "typescript": "^2.4.1", 32 | "url-loader": "^0.5.9", 33 | "webpack": "^3.0.0", 34 | "webpack-hot-middleware": "^2.18.1" 35 | }, 36 | "dependencies": { 37 | "aurelia-bootstrap-datetimepicker": "^1.0.11", 38 | "aurelia-bootstrap-select": "^1.0.2", 39 | "aurelia-bootstrap-tagsinput": "^1.1.1", 40 | "aurelia-bootstrapper": "^2.1.1", 41 | "aurelia-loader-webpack": "2.1.0", 42 | "aurelia-validation": "^1.1.1", 43 | "bluebird": "^3.5.0", 44 | "bootstrap": "^3.4.0", 45 | "bootstrap-select": "^1.12.2", 46 | "bootstrap-tagsinput": "^0.7.1", 47 | "eonasdan-bootstrap-datetimepicker": "^4.17.47", 48 | "font-awesome": "^4.7.0", 49 | "jquery": "^3.2.1", 50 | "moment": "^2.18.1" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "es6", 5 | "moduleResolution": "node", 6 | "lib": [ "es6", "dom" ], 7 | "importHelpers": true, 8 | 9 | "experimentalDecorators": true 10 | } 11 | } -------------------------------------------------------------------------------- /client-aspnetcore-ts/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "aurelia-validation": "github:aurelia/validation", 4 | "moment": "registry:npm/moment#2.10.5+20160211003958" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/typings/modules/aurelia-validation/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolution": "main", 3 | "tree": { 4 | "src": "https://raw.githubusercontent.com/aurelia/validation/master/typings.json", 5 | "raw": "github:aurelia/validation", 6 | "main": "dist/amd/aurelia-validation.d.ts", 7 | "name": "aurelia-validation" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/typings/modules/moment/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolution": "main", 3 | "tree": { 4 | "src": "https://raw.githubusercontent.com/typed-typings/npm-moment/a4075cd50e63efbedd850f654594f293ab81a385/typings.json", 5 | "raw": "registry:npm/moment#2.10.5+20160211003958", 6 | "main": "moment.d.ts", 7 | "name": "moment" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const { AureliaPlugin } = require('aurelia-webpack-plugin'); 3 | const ProvidePlugin = require('webpack/lib/ProvidePlugin'); 4 | const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin'); 5 | 6 | module.exports = { 7 | entry: { main: 'aurelia-bootstrapper' }, 8 | 9 | output: { 10 | path: path.join(__dirname, 'wwwroot', 'dist'), 11 | filename: 'app.js', 12 | publicPath: '/dist/', 13 | }, 14 | 15 | resolve: { 16 | alias: { 17 | // Force all modules to use the same jquery version. 18 | 'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery') 19 | }, 20 | extensions: ['.ts', '.js'], 21 | modules: ['App', 'node_modules'], 22 | }, 23 | 24 | module: { 25 | rules: [ 26 | { 27 | test: /\.css$/i, 28 | loader: 'css-loader', 29 | issuer: /\.html?$/i 30 | }, 31 | { 32 | test: /\.css$/i, 33 | loader: ['style-loader', 'css-loader'], 34 | issuer: /\.[tj]s$/i 35 | }, 36 | { test: /\.html$/i, loaders: 'html-loader' }, 37 | { test: /\.ts$/i, loaders: 'ts-loader' }, 38 | // use Bluebird as the global Promise implementation: 39 | { test: /[\/\\]node_modules[\/\\]bluebird[\/\\].+\.js$/, loader: 'expose-loader?Promise' }, 40 | // exposes jQuery globally as $ and as jQuery: 41 | { test: require.resolve('jquery'), loader: 'expose-loader?$!expose-loader?jQuery' }, 42 | { 43 | test: /\.png$/, 44 | loader: 'url-loader?limit=100000' 45 | }, 46 | { 47 | test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, 48 | loader: 'url-loader?limit=10000&mimetype=application/font-woff' 49 | }, 50 | { 51 | test: /\.(ttf|otf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?|(jpg|gif)$/, 52 | loader: 'file-loader' 53 | }, 54 | ] 55 | }, 56 | 57 | plugins: [ 58 | new AureliaPlugin(), 59 | new ContextReplacementPlugin(/moment[\/\\]locale$/, /en|fr/), 60 | new ProvidePlugin({ 61 | 'Promise': 'bluebird', 62 | '$': 'jquery', 63 | 'jQuery': 'jquery', 64 | 'window.jQuery': 'jquery', 65 | }) 66 | ] 67 | }; 68 | -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/448c34a56d699c29117adc64c43affeb.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/448c34a56d699c29117adc64c43affeb.woff2 -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/674f50d287a8c48dc19ba404d20fe713.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/674f50d287a8c48dc19ba404d20fe713.eot -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/af7ae505a9eed503f8b8e6982036873e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/af7ae505a9eed503f8b8e6982036873e.woff2 -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/b06871f281fee6b241d60582ae9369b9.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/b06871f281fee6b241d60582ae9369b9.ttf -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/e18bbf611f2a2e43afc071aa2f4e1512.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/e18bbf611f2a2e43afc071aa2f4e1512.ttf -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/f4769f9bdb7466be65088239c12046d1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/f4769f9bdb7466be65088239c12046d1.eot -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/fa2772327f55d8198301fdb8bcfc8158.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/fa2772327f55d8198301fdb8bcfc8158.woff -------------------------------------------------------------------------------- /client-aspnetcore-ts/wwwroot/dist/fee66e712a8a08eef5805a46892932ad.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-aspnetcore-ts/wwwroot/dist/fee66e712a8a08eef5805a46892932ad.woff -------------------------------------------------------------------------------- /client-cli/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "sourceMap": true, 3 | "moduleIds": false, 4 | "comments": false, 5 | "compact": false, 6 | "code": true, 7 | "presets": [ "es2015-loose", "stage-1"], 8 | "plugins": [ 9 | "syntax-flow", 10 | "transform-decorators-legacy", 11 | "transform-flow-strip-types" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /client-cli/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /client-cli/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/aurelia-tools/.eslintrc.json" 3 | } 4 | -------------------------------------------------------------------------------- /client-cli/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .idea 3 | .DS_STORE 4 | 5 | scripts/app-bundle.js 6 | scripts/app-bundle.js.map 7 | scripts/vendor-bundle.js 8 | -------------------------------------------------------------------------------- /client-cli/README.md: -------------------------------------------------------------------------------- 1 | # Aurelia-CLI 2 | ```bash 3 | git clone https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins 4 | cd client-cli 5 | npm install # or: yarn install 6 | au run --watch 7 | ``` 8 | 9 | 10 | ## Plugin examples 11 | 12 | ### Aurelia-Bootstrap-Tagsinput 13 | 14 | #### Usage 15 | A quick example of the code in action. Note that the value is available under the `value.bind`. 16 | ```html 17 | 18 | ``` 19 | 20 | ### Aurelia-Bootstrap-Datetimepicker 21 | 22 | #### Usage 23 | A quick example of the code in action. Note that the value is available under the `value.bind`. 24 | ```html 25 | 26 | ``` 27 | 28 | ### Aurelia-Bootstrap-Select 29 | 30 | #### Usage 31 | A quick example of the code in action. 32 | 33 | **Note**: We use the `collection.bind` attribute to pass the collection of all select options and the selection is available from `selected-value` (value) and `selected-item` (string/object) 34 | 35 | ```html 36 | 37 | ``` -------------------------------------------------------------------------------- /client-cli/aurelia_project/environments/dev.js: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: true, 3 | testing: true 4 | }; 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/environments/prod.js: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: false, 3 | testing: false 4 | }; 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/environments/stage.js: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: true, 3 | testing: false 4 | }; 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/attribute.js: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class AttributeGenerator { 6 | constructor(project, options, ui) { 7 | this.project = project; 8 | this.options = options; 9 | this.ui = ui; 10 | } 11 | 12 | execute() { 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the custom attribute?') 15 | .then(name => { 16 | let fileName = this.project.makeFileName(name); 17 | let className = this.project.makeClassName(name); 18 | 19 | this.project.attributes.add( 20 | ProjectItem.text(`${fileName}.js`, this.generateSource(className)) 21 | ); 22 | 23 | return this.project.commitChanges() 24 | .then(() => this.ui.log(`Created ${fileName}.`)); 25 | }); 26 | } 27 | 28 | generateSource(className) { 29 | return `import {inject} from 'aurelia-framework'; 30 | 31 | @inject(Element) 32 | export class ${className}CustomAttribute { 33 | constructor(element) { 34 | this.element = element; 35 | } 36 | 37 | valueChanged(newValue, oldValue) { 38 | 39 | } 40 | } 41 | 42 | ` 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/attribute.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "attribute", 3 | "description": "Creates a custom attribute class and places it in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/binding-behavior.js: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class BindingBehaviorGenerator { 6 | constructor(project, options, ui) { 7 | this.project = project; 8 | this.options = options; 9 | this.ui = ui; 10 | } 11 | 12 | execute() { 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the binding behavior?') 15 | .then(name => { 16 | let fileName = this.project.makeFileName(name); 17 | let className = this.project.makeClassName(name); 18 | 19 | this.project.bindingBehaviors.add( 20 | ProjectItem.text(`${fileName}.js`, this.generateSource(className)) 21 | ); 22 | 23 | return this.project.commitChanges() 24 | .then(() => this.ui.log(`Created ${fileName}.`)); 25 | }); 26 | } 27 | 28 | generateSource(className) { 29 | return `export class ${className}BindingBehavior { 30 | bind(binding, source) { 31 | 32 | } 33 | 34 | unbind(binding, source) { 35 | 36 | } 37 | } 38 | 39 | ` 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/binding-behavior.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "binding-behavior", 3 | "description": "Creates a binding behavior class and places it in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/element.js: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class ElementGenerator { 6 | constructor(project, options, ui) { 7 | this.project = project; 8 | this.options = options; 9 | this.ui = ui; 10 | } 11 | 12 | execute() { 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the custom element?') 15 | .then(name => { 16 | let fileName = this.project.makeFileName(name); 17 | let className = this.project.makeClassName(name); 18 | 19 | this.project.elements.add( 20 | ProjectItem.text(`${fileName}.js`, this.generateJSSource(className)), 21 | ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className)) 22 | ); 23 | 24 | return this.project.commitChanges() 25 | .then(() => this.ui.log(`Created ${fileName}.`)); 26 | }); 27 | } 28 | 29 | generateJSSource(className) { 30 | return `import {bindable} from 'aurelia-framework'; 31 | 32 | export class ${className} { 33 | @bindable value; 34 | 35 | valueChanged(newValue, oldValue) { 36 | 37 | } 38 | } 39 | 40 | ` 41 | } 42 | 43 | generateHTMLSource(className) { 44 | return `` 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/element.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "element", 3 | "description": "Creates a custom element class and template, placing them in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/generator.js: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class GeneratorGenerator { 6 | constructor(project, options, ui) { 7 | this.project = project; 8 | this.options = options; 9 | this.ui = ui; 10 | } 11 | 12 | execute() { 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the generator?') 15 | .then(name => { 16 | let fileName = this.project.makeFileName(name); 17 | let className = this.project.makeClassName(name); 18 | 19 | this.project.generators.add( 20 | ProjectItem.text(`${fileName}.js`, this.generateSource(className)) 21 | ); 22 | 23 | return this.project.commitChanges() 24 | .then(() => this.ui.log(`Created ${fileName}.`)); 25 | }); 26 | } 27 | 28 | generateSource(className) { 29 | return `import {inject} from 'aurelia-dependency-injection'; 30 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 31 | 32 | @inject(Project, CLIOptions, UI) 33 | export default class ${className}Generator { 34 | constructor(project, options, ui) { 35 | this.project = project; 36 | this.options = options; 37 | this.ui = ui; 38 | } 39 | 40 | execute() { 41 | return this.ui 42 | .ensureAnswer(this.options.args[0], 'What would you like to call the new item?') 43 | .then(name => { 44 | let fileName = this.project.makeFileName(name); 45 | let className = this.project.makeClassName(name); 46 | 47 | this.project.elements.add( 48 | ProjectItem.text(\`\${fileName}.js\`, this.generateSource(className)) 49 | ); 50 | 51 | return this.project.commitChanges() 52 | .then(() => this.ui.log(\`Created \${fileName}.\`)); 53 | }); 54 | } 55 | 56 | generateSource(className) { 57 | return \`import {bindable} from 'aurelia-framework'; 58 | 59 | export class \${className} { 60 | @bindable value; 61 | 62 | valueChanged(newValue, oldValue) { 63 | 64 | } 65 | } 66 | 67 | \` 68 | } 69 | } 70 | 71 | ` 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator", 3 | "description": "Creates a generator class and places it in the project generators folder." 4 | } 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/task.js: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class TaskGenerator { 6 | constructor(project, options, ui) { 7 | this.project = project; 8 | this.options = options; 9 | this.ui = ui; 10 | } 11 | 12 | execute() { 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the task?') 15 | .then(name => { 16 | let fileName = this.project.makeFileName(name); 17 | let functionName = this.project.makeFunctionName(name); 18 | 19 | this.project.tasks.add( 20 | ProjectItem.text(`${fileName}.js`, this.generateSource(functionName)) 21 | ); 22 | 23 | return this.project.commitChanges() 24 | .then(() => this.ui.log(`Created ${fileName}.`)); 25 | }); 26 | } 27 | 28 | generateSource(functionName) { 29 | return `import gulp from 'gulp'; 30 | import changed from 'gulp-changed'; 31 | import project from '../aurelia.json'; 32 | 33 | export default function ${functionName}() { 34 | return gulp.src(project.paths.???) 35 | .pipe(changed(project.paths.output, {extension: '.???'})) 36 | .pipe(gulp.dest(project.paths.output)); 37 | } 38 | 39 | ` 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/task.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "task", 3 | "description": "Creates a task and places it in the project tasks folder." 4 | } 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/value-converter.js: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class ValueConverterGenerator { 6 | constructor(project, options, ui) { 7 | this.project = project; 8 | this.options = options; 9 | this.ui = ui; 10 | } 11 | 12 | execute() { 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the value converter?') 15 | .then(name => { 16 | let fileName = this.project.makeFileName(name); 17 | let className = this.project.makeClassName(name); 18 | 19 | this.project.valueConverters.add( 20 | ProjectItem.text(`${fileName}.js`, this.generateSource(className)) 21 | ); 22 | 23 | return this.project.commitChanges() 24 | .then(() => this.ui.log(`Created ${fileName}.`)); 25 | }); 26 | } 27 | 28 | generateSource(className) { 29 | return `export class ${className}ValueConverter { 30 | toView(value) { 31 | 32 | } 33 | 34 | fromView(value) { 35 | 36 | } 37 | } 38 | 39 | ` 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/generators/value-converter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "value-converter", 3 | "description": "Creates a value converter class and places it in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/build.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import transpile from './transpile'; 3 | import processMarkup from './process-markup'; 4 | import processCSS from './process-css'; 5 | import copyFiles from './copy-files'; 6 | import {build} from 'aurelia-cli'; 7 | import project from '../aurelia.json'; 8 | import prepareFontAwesome from './prepare-font-awesome'; 9 | 10 | export default gulp.series( 11 | readProjectConfiguration, 12 | gulp.parallel( 13 | transpile, 14 | processMarkup, 15 | processCSS, 16 | copyFiles, 17 | prepareFontAwesome 18 | ), 19 | writeBundles 20 | ); 21 | 22 | function readProjectConfiguration() { 23 | return build.src(project); 24 | } 25 | 26 | function writeBundles() { 27 | return build.dest(); 28 | } 29 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "build", 3 | "description": "Builds and processes all application assets.", 4 | "flags": [ 5 | { 6 | "name": "env", 7 | "description": "Sets the build environment.", 8 | "type": "string" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/copy-files.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import path from 'path'; 3 | import minimatch from 'minimatch'; 4 | import changedInPlace from 'gulp-changed-in-place'; 5 | import project from '../aurelia.json'; 6 | 7 | export default function copyFiles(done) { 8 | if (typeof project.build.copyFiles !== 'object') { 9 | done(); 10 | return; 11 | } 12 | 13 | const instruction = getNormalizedInstruction(); 14 | const files = Object.keys(instruction); 15 | 16 | return gulp.src(files) 17 | .pipe(changedInPlace({ firstPass: true })) 18 | .pipe(gulp.dest(x => { 19 | const filePath = prepareFilePath(x.path); 20 | const key = files.find(f => minimatch(filePath, f)); 21 | return instruction[key]; 22 | })); 23 | } 24 | 25 | function getNormalizedInstruction() { 26 | const files = project.build.copyFiles; 27 | let normalizedInstruction = {}; 28 | 29 | for (let key in files) { 30 | normalizedInstruction[path.posix.normalize(key)] = files[key]; 31 | } 32 | 33 | return normalizedInstruction; 34 | } 35 | 36 | function prepareFilePath(filePath) { 37 | let preparedPath = filePath.replace(process.cwd(), '').substring(1); 38 | 39 | //if we are running on windows we have to fix the path 40 | if (/^win/.test(process.platform)) { 41 | preparedPath = preparedPath.replace(/\\/g, '/'); 42 | } 43 | 44 | return preparedPath; 45 | } -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/prepare-font-awesome.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import merge from 'merge-stream'; 3 | import changedInPlace from 'gulp-changed-in-place'; 4 | import project from '../aurelia.json'; 5 | 6 | export default function prepareFontAwesome() { 7 | const source = 'node_modules/font-awesome'; 8 | 9 | const taskCss = gulp.src(`${source}/css/font-awesome.min.css`) 10 | .pipe(changedInPlace({ firstPass: true })) 11 | .pipe(gulp.dest(`${project.platform.output}/css`)); 12 | 13 | const taskFonts = gulp.src(`${source}/fonts/*`) 14 | .pipe(changedInPlace({ firstPass: true })) 15 | .pipe(gulp.dest(`${project.platform.output}/fonts`)); 16 | 17 | return merge(taskCss, taskFonts); 18 | } -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/process-css.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import changedInPlace from 'gulp-changed-in-place'; 3 | import project from '../aurelia.json'; 4 | import {build} from 'aurelia-cli'; 5 | 6 | export default function processCSS() { 7 | return gulp.src(project.cssProcessor.source) 8 | .pipe(changedInPlace({firstPass:true})) 9 | .pipe(build.bundle()); 10 | }; 11 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/process-markup.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import changedInPlace from 'gulp-changed-in-place'; 3 | import project from '../aurelia.json'; 4 | import {build} from 'aurelia-cli'; 5 | 6 | export default function processMarkup() { 7 | return gulp.src(project.markupProcessor.source) 8 | .pipe(changedInPlace({firstPass:true})) 9 | .pipe(build.bundle()); 10 | } 11 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/run.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import browserSync from 'browser-sync' 3 | import historyApiFallback from 'connect-history-api-fallback/lib';; 4 | import project from '../aurelia.json'; 5 | import build from './build'; 6 | import {CLIOptions} from 'aurelia-cli'; 7 | 8 | function onChange(path) { 9 | console.log(`File Changed: ${path}`); 10 | } 11 | 12 | function reload(done) { 13 | browserSync.reload(); 14 | done(); 15 | } 16 | 17 | let serve = gulp.series( 18 | build, 19 | done => { 20 | browserSync({ 21 | online: false, 22 | open: false, 23 | port: 9000, 24 | logLevel: 'silent', 25 | server: { 26 | baseDir: ['.'], 27 | middleware: [historyApiFallback(), function(req, res, next) { 28 | res.setHeader('Access-Control-Allow-Origin', '*'); 29 | next(); 30 | }] 31 | } 32 | }, function (err, bs) { 33 | let urls = bs.options.get('urls').toJS(); 34 | console.log(`Application Available At: ${urls.local}`); 35 | console.log(`BrowserSync Available At: ${urls.ui}`); 36 | done(); 37 | }); 38 | } 39 | ); 40 | 41 | let refresh = gulp.series( 42 | build, 43 | reload 44 | ); 45 | 46 | let watch = function() { 47 | gulp.watch(project.transpiler.source, refresh).on('change', onChange); 48 | gulp.watch(project.markupProcessor.source, refresh).on('change', onChange); 49 | gulp.watch(project.cssProcessor.source, refresh).on('change', onChange) 50 | } 51 | 52 | let run; 53 | 54 | if (CLIOptions.hasFlag('watch')) { 55 | run = gulp.series( 56 | serve, 57 | watch 58 | ); 59 | } else { 60 | run = serve; 61 | } 62 | 63 | export default run; 64 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/run.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "run", 3 | "description": "Builds the application and serves up the assets via a local web server, watching files for changes as you work.", 4 | "flags": [ 5 | { 6 | "name": "env", 7 | "description": "Sets the build environment.", 8 | "type": "string" 9 | }, 10 | { 11 | "name": "watch", 12 | "description": "Watches source files for changes and refreshes the app automatically.", 13 | "type": "boolean" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/test.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import {Server as Karma} from 'karma'; 3 | import {CLIOptions} from 'aurelia-cli'; 4 | 5 | export function unit(done) { 6 | new Karma({ 7 | configFile: __dirname + '/../../karma.conf.js', 8 | singleRun: !CLIOptions.hasFlag('watch') 9 | }, done).start(); 10 | } 11 | 12 | export default unit; 13 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "description": "Runs all unit tests and reports the results.", 4 | "flags": [ 5 | { 6 | "name": "env", 7 | "description": "Sets the build environment.", 8 | "type": "string" 9 | }, 10 | { 11 | "name": "watch", 12 | "description": "Watches test files for changes and re-runs the tests automatically.", 13 | "type": "boolean" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /client-cli/aurelia_project/tasks/transpile.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import changedInPlace from 'gulp-changed-in-place'; 3 | import plumber from 'gulp-plumber'; 4 | import babel from 'gulp-babel'; 5 | import sourcemaps from 'gulp-sourcemaps'; 6 | import notify from 'gulp-notify'; 7 | import rename from 'gulp-rename'; 8 | import project from '../aurelia.json'; 9 | import {CLIOptions, build} from 'aurelia-cli'; 10 | 11 | function configureEnvironment() { 12 | let env = CLIOptions.getEnvironment(); 13 | 14 | return gulp.src(`aurelia_project/environments/${env}.js`) 15 | .pipe(changedInPlace({firstPass:true})) 16 | .pipe(rename('environment.js')) 17 | .pipe(gulp.dest(project.paths.root)); 18 | } 19 | 20 | function buildJavaScript() { 21 | return gulp.src(project.transpiler.source) 22 | .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')})) 23 | .pipe(changedInPlace({firstPass:true})) 24 | .pipe(sourcemaps.init()) 25 | .pipe(babel(project.transpiler.options)) 26 | .pipe(build.bundle()); 27 | } 28 | 29 | export default gulp.series( 30 | configureEnvironment, 31 | buildJavaScript 32 | ); 33 | -------------------------------------------------------------------------------- /client-cli/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /client-cli/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /client-cli/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /client-cli/favicon.ico: -------------------------------------------------------------------------------- 1 | �PNG 2 |  3 | IHDR szz�bKGD�C� pHYs  �� vpAg ����TIDATXå�y�W��?���[�u�Pk��K�4�օ��AVqXZ6Q���Z�*��-BEaA�"��*�� mSMm�Xm�E�����03�w��?���Y=�ͽ����~��{ν�]T����f������*�p�1k��xd���}��n��x��M\��MT�x�g�����{��H�]g j: 8b���v�uޠ+�,��v�;fm��fm�#��G�;�x�ƈ�i!,i��t�ڳ\��>�1!�+��ܐ�M`{� �US7WBP�yM��w�Zu� ���x��������qk�8���5�\0��IS���žZJ7������&j��������Vwv��;b��2f[���;Pۢ�ϝQY�9j��X9�bǔO�R`v� 4 | p�=�7�^�y���O=�BsZ�M�c���Eg���|��P��k+�}�~�;V�e(@D ���̮Zq �cvՊ^��"�\F���Ӏor�vS�5I.�i����rͤ��O��r���;ܿ2��-���[� �4\���Y��������]k��AZrh�P�h�h�>��C��;�=�~������e���W�VN�.�O�aA��i��1�]s��Y�N`:pЧ�Y�džo��j��>�]֧��1�1�p.���n���*��|p�"�B�r(eu�V�e~D N�U��'=�o*��C�[�ՎX���%�����oN�}�4@b7�rvh�5|TY��})�X��@$BN�ȭ y� ��ƚ�m�ޱ�{M��e��.x_,&�׎�d{����)}>��&��/z��-U1�bL�59���������U����և\�����Y���5��؈�9�w��������Qa̠�S����祇��ݪ�R� y��=������-o�pH>;�,Ag�� r�ܵ#�9f n���r�� �Z?-��Z5���'� �3�0q��ò�RcI��Y��(|�X�'����,�o�w�[����O 2 | 3 | 4 | Aurelia 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /client-cli/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "amd", 5 | "experimentalDecorators": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /client-cli/karma.conf.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const path = require('path'); 3 | const project = require('./aurelia_project/aurelia.json'); 4 | 5 | let testSrc = [ 6 | { pattern: project.unitTestRunner.source, included: false }, 7 | 'test/aurelia-karma.js' 8 | ]; 9 | 10 | let output = project.platform.output; 11 | let appSrc = project.build.bundles.map(x => path.join(output, x.name)); 12 | let entryIndex = appSrc.indexOf(path.join(output, project.build.loader.configTarget)); 13 | let entryBundle = appSrc.splice(entryIndex, 1)[0]; 14 | let files = [entryBundle].concat(testSrc).concat(appSrc); 15 | 16 | module.exports = function(config) { 17 | config.set({ 18 | basePath: '', 19 | frameworks: [project.testFramework.id], 20 | files: files, 21 | exclude: [], 22 | preprocessors: { 23 | [project.unitTestRunner.source]: [project.transpiler.id] 24 | }, 25 | 'babelPreprocessor': { options: project.transpiler.options }, 26 | reporters: ['progress'], 27 | port: 9876, 28 | colors: true, 29 | logLevel: config.LOG_INFO, 30 | autoWatch: true, 31 | browsers: ['Chrome'], 32 | singleRun: false 33 | }); 34 | }; 35 | -------------------------------------------------------------------------------- /client-cli/scripts/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/scripts/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /client-cli/scripts/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/scripts/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /client-cli/scripts/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/scripts/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /client-cli/scripts/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/scripts/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /client-cli/scripts/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghiscoding/Aurelia-Bootstrap-Plugins/ab79886df4ec48899ca07de3148b03055b1e8305/client-cli/scripts/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /client-cli/src/app.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /client-cli/src/app.js: -------------------------------------------------------------------------------- 1 | export class App { 2 | configureRouter(config, router) { 3 | config.title = 'Aurelia'; 4 | config.map([ 5 | { route: 'bootstrap-plugins', name: 'bootstrap-plugins', moduleId: './bootstrap-plugins', nav: true, title: 'Bootstrap Plugins' }, 6 | { route: 'validation-form', name: 'validation-form', moduleId: './validation-form', nav: true, title: 'Validation Form' }, 7 | { route: '', redirect: 'bootstrap-plugins' } 8 | ]); 9 | 10 | this.router = router; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /client-cli/src/bootstrap-form-renderer.js: -------------------------------------------------------------------------------- 1 | import { 2 | ValidationRenderer, 3 | RenderInstruction, 4 | ValidateResult 5 | } from 'aurelia-validation'; 6 | 7 | export class BootstrapFormRenderer { 8 | render(instruction) { 9 | for (let { result, elements } of instruction.unrender) { 10 | for (let element of elements) { 11 | this.remove(element, result); 12 | } 13 | } 14 | 15 | for (let { result, elements } of instruction.render) { 16 | for (let element of elements) { 17 | this.add(element, result); 18 | } 19 | } 20 | } 21 | 22 | add(element, result) { 23 | if (result.valid) { 24 | return; 25 | } 26 | 27 | const formGroup = element.closest('.form-group'); 28 | if (!formGroup) { 29 | return; 30 | } 31 | 32 | // add the has-error class to the enclosing form-group div 33 | formGroup.classList.add('has-error'); 34 | 35 | // add help-block 36 | const message = document.createElement('span'); 37 | message.className = 'help-block validation-message'; 38 | message.textContent = result.message; 39 | message.id = `validation-message-${result.id}`; 40 | formGroup.appendChild(message); 41 | } 42 | 43 | remove(element, result) { 44 | if (result.valid) { 45 | return; 46 | } 47 | 48 | const formGroup = element.closest('.form-group'); 49 | if (!formGroup) { 50 | return; 51 | } 52 | 53 | // remove help-block 54 | const message = formGroup.querySelector(`#validation-message-${result.id}`); 55 | if (message) { 56 | formGroup.removeChild(message); 57 | 58 | // remove the has-error class from the enclosing form-group div 59 | if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) { 60 | formGroup.classList.remove('has-error'); 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /client-cli/src/environment.js: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: true, 3 | testing: true 4 | }; 5 | -------------------------------------------------------------------------------- /client-cli/src/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "experimentalDecorators" : true 6 | } 7 | } -------------------------------------------------------------------------------- /client-cli/src/main.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap'; 2 | import environment from './environment'; 3 | 4 | 5 | //Configure Bluebird Promises. 6 | //Note: You may want to use environment-specific configuration. 7 | Promise.config({ 8 | warnings: { 9 | wForgottenReturn: false 10 | } 11 | }); 12 | 13 | export function configure(aurelia) { 14 | aurelia.use 15 | .standardConfiguration() 16 | .feature('resources') 17 | .plugin('aurelia-bootstrap-datetimepicker', config => { 18 | // extra attributes, with config.extra 19 | config.extra.iconBase = 'font-awesome'; 20 | config.extra.withDateIcon = true; 21 | 22 | // or even any picker options, with config.options 23 | config.options.format = 'YYYY-MM-DD'; 24 | config.options.showTodayButton = true; 25 | }) 26 | .plugin('aurelia-bootstrap-select') 27 | .plugin('aurelia-bootstrap-tagsinput') 28 | .plugin('aurelia-validation'); 29 | 30 | if (environment.debug) { 31 | aurelia.use.developmentLogging(); 32 | } 33 | 34 | if (environment.testing) { 35 | aurelia.use.plugin('aurelia-testing'); 36 | } 37 | 38 | aurelia.start().then(() => aurelia.setRoot()); 39 | } 40 | -------------------------------------------------------------------------------- /client-cli/src/nav-bar.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /client-cli/src/resources/index.js: -------------------------------------------------------------------------------- 1 | export function configure(config) { 2 | config.globalResources([ 3 | './value-converters/stringify' 4 | ]); 5 | } -------------------------------------------------------------------------------- /client-cli/src/resources/value-converters/stringify.js: -------------------------------------------------------------------------------- 1 | export class StringifyValueConverter { 2 | toView(value) { 3 | return JSON.stringify(value, null, 4 ); 4 | } 5 | } -------------------------------------------------------------------------------- /client-cli/src/styles.css: -------------------------------------------------------------------------------- 1 | body { padding-top: 70px; } 2 | 3 | section { 4 | margin: 0 20px; 5 | } 6 | 7 | a:focus { 8 | outline: none; 9 | } 10 | 11 | .navbar-nav li.loader { 12 | margin: 12px 24px 0 6px; 13 | } 14 | 15 | .no-selection { 16 | margin: 20px; 17 | } 18 | 19 | .contact-list { 20 | overflow-y: auto; 21 | border: 1px solid #ddd; 22 | padding: 10px; 23 | } 24 | 25 | .panel { 26 | margin: 20px; 27 | } 28 | 29 | .button-bar { 30 | right: 0; 31 | left: 0; 32 | bottom: 0; 33 | border-top: 1px solid #ddd; 34 | background: white; 35 | } 36 | 37 | .button-bar > button { 38 | float: right; 39 | margin: 20px; 40 | } 41 | 42 | li.list-group-item { 43 | list-style: none; 44 | } 45 | 46 | li.list-group-item > a { 47 | text-decoration: none; 48 | } 49 | 50 | li.list-group-item.active > a { 51 | color: white; 52 | } 53 | -------------------------------------------------------------------------------- /client-cli/src/validation-form.html: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /client-cli/src/validation-form.js: -------------------------------------------------------------------------------- 1 | import {bindable, inject} from 'aurelia-framework'; 2 | import {ValidationControllerFactory, ValidationRules} from 'aurelia-validation'; 3 | import {BootstrapFormRenderer} from './bootstrap-form-renderer'; 4 | 5 | @inject(ValidationControllerFactory) 6 | export class ValidationForm { 7 | firstName = ''; 8 | lastName = ''; 9 | email = ''; 10 | controller = null; 11 | campingCollection = ['Tent', 'Flashlight', 'Sleeping Bag']; 12 | 13 | constructor(controllerFactory) { 14 | this.controller = controllerFactory.createForCurrentScope(); 15 | this.controller.addRenderer(new BootstrapFormRenderer()); 16 | } 17 | 18 | submit() { 19 | this.controller.validate(); 20 | } 21 | } 22 | 23 | ValidationRules 24 | .ensure('firstName').required() 25 | .ensure('lastName').required() 26 | .ensure('email').required().email() 27 | .ensure('categories').required() 28 | .ensure('dateEntered').required() 29 | .ensure('camping').minItems(1) 30 | .on(ValidationForm); 31 | -------------------------------------------------------------------------------- /client-cli/test/aurelia-karma.js: -------------------------------------------------------------------------------- 1 | (function(global) { 2 | var karma = global.__karma__; 3 | var requirejs = global.requirejs 4 | var locationPathname = global.location.pathname; 5 | 6 | if (!karma || !requirejs) { 7 | return; 8 | } 9 | 10 | function normalizePath(path) { 11 | var normalized = [] 12 | var parts = path 13 | .split('?')[0] // cut off GET params, used by noext requirejs plugin 14 | .split('/') 15 | 16 | for (var i = 0; i < parts.length; i++) { 17 | if (parts[i] === '.') { 18 | continue 19 | } 20 | 21 | if (parts[i] === '..' && normalized.length && normalized[normalized.length - 1] !== '..') { 22 | normalized.pop() 23 | continue 24 | } 25 | 26 | normalized.push(parts[i]) 27 | } 28 | 29 | return normalized.join('/') 30 | } 31 | 32 | function patchRequireJS(files, originalLoadFn, locationPathname) { 33 | var IS_DEBUG = /debug\.html$/.test(locationPathname) 34 | 35 | requirejs.load = function (context, moduleName, url) { 36 | url = normalizePath(url) 37 | 38 | if (files.hasOwnProperty(url) && !IS_DEBUG) { 39 | url = url + '?' + files[url] 40 | } 41 | 42 | if (url.indexOf('/base') !== 0) { 43 | url = '/base/' + url; 44 | } 45 | 46 | return originalLoadFn.call(this, context, moduleName, url) 47 | } 48 | 49 | let originalDefine = global.define; 50 | global.define = function(name, deps, m) { 51 | if (typeof name === 'string') { 52 | originalDefine('/base/src/' + name, [name], function (result) { return result; }); 53 | } 54 | 55 | return originalDefine(name, deps, m); 56 | } 57 | } 58 | 59 | function requireTests() { 60 | var TEST_REGEXP = /(spec)\.js$/i; 61 | var allTestFiles = ['/base/test/unit/setup.js']; 62 | 63 | Object.keys(window.__karma__.files).forEach(function(file) { 64 | if (TEST_REGEXP.test(file)) { 65 | allTestFiles.push(file); 66 | } 67 | }); 68 | 69 | require(allTestFiles, window.__karma__.start); 70 | } 71 | 72 | karma.loaded = function() {}; // make it async 73 | patchRequireJS(karma.files, requirejs.load, locationPathname); 74 | requireTests(); 75 | })(window); 76 | -------------------------------------------------------------------------------- /client-cli/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; 2 | import {initialize} from 'aurelia-pal-browser'; 3 | initialize(); 4 | -------------------------------------------------------------------------------- /doc/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | # 2 space indentation 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | # You may want to customise this file depending on your Operating System 2 | # and the editor that you use. 3 | # 4 | # We recommend that you use a Global Gitignore for files that are not related 5 | # to the project. (https://help.github.com/articles/ignoring-files/#create-a-global-gitignore) 6 | 7 | # OS 8 | # 9 | # Ref: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore 10 | # Ref: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore 11 | # Ref: https://github.com/github/gitignore/blob/master/Global/Linux.gitignore 12 | .DS_STORE 13 | Thumbs.db 14 | dist 15 | 16 | # Editors 17 | # 18 | # Ref: https://github.com/github/gitignore/blob/master/Global 19 | # Ref: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore 20 | # Ref: https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore 21 | .idea 22 | .vscode 23 | 24 | # Dependencies 25 | node_modules 26 | 27 | # Compiled files 28 | scripts 29 | -------------------------------------------------------------------------------- /doc/aurelia_project/aurelia.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "doc", 3 | "type": "project:application", 4 | "bundler": { 5 | "id": "webpack", 6 | "displayName": "Webpack" 7 | }, 8 | "build": { 9 | "options": { 10 | "server": "dev", 11 | "extractCss": "prod", 12 | "coverage": false 13 | } 14 | }, 15 | "platform": { 16 | "id": "web", 17 | "displayName": "Web", 18 | "port": 8080, 19 | "hmr": false, 20 | "open": false, 21 | "output": "dist" 22 | }, 23 | "loader": { 24 | "id": "none", 25 | "displayName": "None" 26 | }, 27 | "transpiler": { 28 | "id": "typescript", 29 | "displayName": "TypeScript", 30 | "fileExtension": ".ts" 31 | }, 32 | "markupProcessor": { 33 | "id": "maximum", 34 | "displayName": "Maximum Minification", 35 | "fileExtension": ".html" 36 | }, 37 | "cssProcessor": { 38 | "id": "sass", 39 | "displayName": "Sass", 40 | "fileExtension": ".scss" 41 | }, 42 | "editor": { 43 | "id": "vscode", 44 | "displayName": "Visual Studio Code" 45 | }, 46 | "unitTestRunner": [ 47 | { 48 | "id": "none", 49 | "displayName": "None" 50 | } 51 | ], 52 | "integrationTestRunner": { 53 | "id": "none", 54 | "displayName": "None" 55 | }, 56 | "paths": { 57 | "root": "src", 58 | "resources": "resources", 59 | "elements": "resources/elements", 60 | "attributes": "resources/attributes", 61 | "valueConverters": "resources/value-converters", 62 | "bindingBehaviors": "resources/binding-behaviors" 63 | } 64 | } -------------------------------------------------------------------------------- /doc/aurelia_project/environments/dev.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: true, 3 | testing: true 4 | }; 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/environments/prod.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: false, 3 | testing: false 4 | }; 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/environments/stage.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: true, 3 | testing: false 4 | }; 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/attribute.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "attribute", 3 | "description": "Creates a custom attribute class and places it in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/attribute.ts: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class AttributeGenerator { 6 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 7 | 8 | execute() { 9 | return this.ui 10 | .ensureAnswer(this.options.args[0], 'What would you like to call the custom attribute?') 11 | .then(name => { 12 | let fileName = this.project.makeFileName(name); 13 | let className = this.project.makeClassName(name); 14 | 15 | this.project.attributes.add( 16 | ProjectItem.text(`${fileName}.ts`, this.generateSource(className)) 17 | ); 18 | 19 | return this.project.commitChanges() 20 | .then(() => this.ui.log(`Created ${fileName}.`)); 21 | }); 22 | } 23 | 24 | generateSource(className) { 25 | return `import {autoinject} from 'aurelia-framework'; 26 | 27 | @autoinject() 28 | export class ${className}CustomAttribute { 29 | constructor(private element: Element) { } 30 | 31 | valueChanged(newValue, oldValue) { 32 | 33 | } 34 | } 35 | 36 | ` 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/binding-behavior.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "binding-behavior", 3 | "description": "Creates a binding behavior class and places it in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/binding-behavior.ts: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class BindingBehaviorGenerator { 6 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 7 | 8 | execute() { 9 | return this.ui 10 | .ensureAnswer(this.options.args[0], 'What would you like to call the binding behavior?') 11 | .then(name => { 12 | let fileName = this.project.makeFileName(name); 13 | let className = this.project.makeClassName(name); 14 | 15 | this.project.bindingBehaviors.add( 16 | ProjectItem.text(`${fileName}.ts`, this.generateSource(className)) 17 | ); 18 | 19 | return this.project.commitChanges() 20 | .then(() => this.ui.log(`Created ${fileName}.`)); 21 | }); 22 | } 23 | 24 | generateSource(className) { 25 | return `export class ${className}BindingBehavior { 26 | bind(binding, source) { 27 | 28 | } 29 | 30 | unbind(binding, source) { 31 | 32 | } 33 | } 34 | 35 | ` 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "component", 3 | "description": "Creates a custom component class and template (view model and view), placing them in the project source folder (or optionally in sub folders)." 4 | } -------------------------------------------------------------------------------- /doc/aurelia_project/generators/component.ts: -------------------------------------------------------------------------------- 1 | import { inject } from 'aurelia-dependency-injection'; 2 | import { Project, ProjectItem, CLIOptions, UI } from 'aurelia-cli'; 3 | 4 | var path = require('path'); 5 | 6 | @inject(Project, CLIOptions, UI) 7 | export default class ElementGenerator { 8 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 9 | 10 | execute() { 11 | let self = this; 12 | 13 | return this.ui 14 | .ensureAnswer(this.options.args[0], 'What would you like to call the component?') 15 | .then(name => { 16 | 17 | return self.ui.ensureAnswer(this.options.args[1], 'What sub-folder would you like to add it to?\nIf it doesn\'t exist it will be created for you.\n\nDefault folder is the source folder (src).', ".") 18 | .then(subFolders => { 19 | 20 | let fileName = this.project.makeFileName(name); 21 | let className = this.project.makeClassName(name); 22 | 23 | self.project.root.add( 24 | ProjectItem.text(path.join(subFolders, fileName + ".ts"), this.generateJSSource(className)), 25 | ProjectItem.text(path.join(subFolders, fileName + ".html"), this.generateHTMLSource(className)) 26 | ); 27 | 28 | return this.project.commitChanges() 29 | .then(() => this.ui.log(`Created ${name} in the '${path.join(self.project.root.name, subFolders)}' folder`)); 30 | }); 31 | }); 32 | } 33 | 34 | generateJSSource(className) { 35 | return `export class ${className} { 36 | message: string; 37 | 38 | constructor() { 39 | this.message = 'Hello world'; 40 | } 41 | }` 42 | } 43 | 44 | generateHTMLSource(className) { 45 | return `` 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/element.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "element", 3 | "description": "Creates a custom element class and template, placing them in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/element.ts: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class ElementGenerator { 6 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 7 | 8 | execute() { 9 | return this.ui 10 | .ensureAnswer(this.options.args[0], 'What would you like to call the custom element?') 11 | .then(name => { 12 | let fileName = this.project.makeFileName(name); 13 | let className = this.project.makeClassName(name); 14 | 15 | this.project.elements.add( 16 | ProjectItem.text(`${fileName}.ts`, this.generateJSSource(className)), 17 | ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className)) 18 | ); 19 | 20 | return this.project.commitChanges() 21 | .then(() => this.ui.log(`Created ${fileName}.`)); 22 | }); 23 | } 24 | 25 | generateJSSource(className) { 26 | return `import {bindable} from 'aurelia-framework'; 27 | 28 | export class ${className} { 29 | @bindable value; 30 | 31 | valueChanged(newValue, oldValue) { 32 | 33 | } 34 | } 35 | 36 | ` 37 | } 38 | 39 | generateHTMLSource(className) { 40 | return `` 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator", 3 | "description": "Creates a generator class and places it in the project generators folder." 4 | } 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/generator.ts: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class GeneratorGenerator { 6 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 7 | 8 | execute() { 9 | return this.ui 10 | .ensureAnswer(this.options.args[0], 'What would you like to call the generator?') 11 | .then(name => { 12 | let fileName = this.project.makeFileName(name); 13 | let className = this.project.makeClassName(name); 14 | 15 | this.project.generators.add( 16 | ProjectItem.text(`${fileName}.ts`, this.generateSource(className)) 17 | ); 18 | 19 | return this.project.commitChanges() 20 | .then(() => this.ui.log(`Created ${fileName}.`)); 21 | }); 22 | } 23 | 24 | generateSource(className) { 25 | return `import {autoinject} from 'aurelia-dependency-injection'; 26 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 27 | 28 | @autoinject() 29 | export default class ${className}Generator { 30 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 31 | 32 | execute() { 33 | return this.ui 34 | .ensureAnswer(this.options.args[0], 'What would you like to call the new item?') 35 | .then(name => { 36 | let fileName = this.project.makeFileName(name); 37 | let className = this.project.makeClassName(name); 38 | 39 | this.project.elements.add( 40 | ProjectItem.text(\`\${fileName}.js\`, this.generateSource(className)) 41 | ); 42 | 43 | return this.project.commitChanges() 44 | .then(() => this.ui.log(\`Created \${fileName}.\`)); 45 | }); 46 | } 47 | 48 | generateSource(className) { 49 | return \`import {bindable} from 'aurelia-framework'; 50 | 51 | export class \${className} { 52 | @bindable value; 53 | 54 | valueChanged(newValue, oldValue) { 55 | 56 | } 57 | } 58 | 59 | \` 60 | } 61 | } 62 | 63 | ` 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/task.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "task", 3 | "description": "Creates a task and places it in the project tasks folder." 4 | } 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/task.ts: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class TaskGenerator { 6 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 7 | 8 | execute() { 9 | return this.ui 10 | .ensureAnswer(this.options.args[0], 'What would you like to call the task?') 11 | .then(name => { 12 | let fileName = this.project.makeFileName(name); 13 | let functionName = this.project.makeFunctionName(name); 14 | 15 | this.project.tasks.add( 16 | ProjectItem.text(`${fileName}.ts`, this.generateSource(functionName)) 17 | ); 18 | 19 | return this.project.commitChanges() 20 | .then(() => this.ui.log(`Created ${fileName}.`)); 21 | }); 22 | } 23 | 24 | generateSource(functionName) { 25 | return `import * as gulp from 'gulp'; 26 | import * as changed from 'gulp-changed'; 27 | import * as project from '../aurelia.json'; 28 | 29 | export default function ${functionName}() { 30 | return gulp.src(project.paths.???) 31 | .pipe(changed(project.paths.output, {extension: '.???'})) 32 | .pipe(gulp.dest(project.paths.output)); 33 | } 34 | 35 | ` 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/value-converter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "value-converter", 3 | "description": "Creates a value converter class and places it in the project resources." 4 | } 5 | -------------------------------------------------------------------------------- /doc/aurelia_project/generators/value-converter.ts: -------------------------------------------------------------------------------- 1 | import {inject} from 'aurelia-dependency-injection'; 2 | import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli'; 3 | 4 | @inject(Project, CLIOptions, UI) 5 | export default class ValueConverterGenerator { 6 | constructor(private project: Project, private options: CLIOptions, private ui: UI) { } 7 | 8 | execute() { 9 | return this.ui 10 | .ensureAnswer(this.options.args[0], 'What would you like to call the value converter?') 11 | .then(name => { 12 | let fileName = this.project.makeFileName(name); 13 | let className = this.project.makeClassName(name); 14 | 15 | this.project.valueConverters.add( 16 | ProjectItem.text(`${fileName}.ts`, this.generateSource(className)) 17 | ); 18 | 19 | return this.project.commitChanges() 20 | .then(() => this.ui.log(`Created ${fileName}.`)); 21 | }); 22 | } 23 | 24 | generateSource(className) { 25 | return `export class ${className}ValueConverter { 26 | toView(value) { 27 | 28 | } 29 | 30 | fromView(value) { 31 | 32 | } 33 | } 34 | 35 | ` 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /doc/aurelia_project/tasks/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "build", 3 | "description": "Builds and processes all application assets.", 4 | "flags": [ 5 | { 6 | "name": "env", 7 | "description": "Sets the build environment.", 8 | "type": "string" 9 | }, 10 | { 11 | "name": "watch", 12 | "description": "Watches source files for changes and refreshes the bundles automatically.", 13 | "type": "boolean" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /doc/aurelia_project/tasks/build.ts: -------------------------------------------------------------------------------- 1 | import * as webpackConfig from '../../webpack.config'; 2 | import * as webpack from 'webpack'; 3 | import * as project from '../aurelia.json'; 4 | import {CLIOptions, Configuration} from 'aurelia-cli'; 5 | import * as gulp from 'gulp'; 6 | import configureEnvironment from './environment'; 7 | import * as del from 'del'; 8 | 9 | const buildOptions = new Configuration(project.build.options); 10 | const production = CLIOptions.getEnvironment() === 'prod'; 11 | const server = buildOptions.isApplicable('server'); 12 | const extractCss = buildOptions.isApplicable('extractCss'); 13 | const coverage = buildOptions.isApplicable('coverage'); 14 | 15 | const config = webpackConfig({ 16 | production, server, extractCss, coverage 17 | }); 18 | const compiler = webpack(config); 19 | 20 | function buildWebpack(done) { 21 | if (CLIOptions.hasFlag('watch')) { 22 | compiler.watch({}, onBuild); 23 | } else { 24 | compiler.run(onBuild); 25 | compiler.plugin('done', () => done()); 26 | } 27 | } 28 | 29 | function onBuild(err, stats) { 30 | if (err) { 31 | console.error(err.stack || err); 32 | if (err.details) console.error(err.details); 33 | process.exit(1); 34 | } else { 35 | process.stdout.write(stats.toString({ colors: require('supports-color') }) + '\n'); 36 | } 37 | } 38 | 39 | function clearDist() { 40 | return del([config.output.path]); 41 | } 42 | 43 | const build = gulp.series( 44 | clearDist, 45 | configureEnvironment, 46 | buildWebpack 47 | ); 48 | 49 | export { 50 | config, 51 | buildWebpack, 52 | build as default 53 | }; 54 | -------------------------------------------------------------------------------- /doc/aurelia_project/tasks/environment.ts: -------------------------------------------------------------------------------- 1 | import * as project from '../aurelia.json'; 2 | import * as rename from 'gulp-rename'; 3 | import {CLIOptions} from 'aurelia-cli'; 4 | import * as gulp from 'gulp'; 5 | import * as fs from 'fs'; 6 | import path from 'path'; 7 | import * as through from 'through2'; 8 | 9 | function configureEnvironment() { 10 | let env = CLIOptions.getEnvironment(); 11 | 12 | return gulp.src(`aurelia_project/environments/${env}${project.transpiler.fileExtension}`) 13 | .pipe(rename(`environment${project.transpiler.fileExtension}`)) 14 | .pipe(gulp.dest(project.paths.root)) 15 | .pipe(through.obj(function (file, enc, cb) { 16 | // https://github.com/webpack/watchpack/issues/25#issuecomment-287789288 17 | var now = Date.now() / 1000; 18 | var then = now - 10; 19 | fs.utimes(file.path, then, then, function (err) { if (err) throw err }); 20 | cb(null, file); 21 | })); 22 | } 23 | 24 | export default configureEnvironment; -------------------------------------------------------------------------------- /doc/aurelia_project/tasks/run.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "run", 3 | "description": "Builds the application and serves up the assets via a local web server, watching files for changes as you work.", 4 | "flags": [ 5 | { 6 | "name": "env", 7 | "description": "Sets the build environment.", 8 | "type": "string" 9 | }, 10 | { 11 | "name": "watch", 12 | "description": "Watches source files for changes and refreshes the app automatically.", 13 | "type": "boolean" 14 | }, 15 | { 16 | "name": "hmr", 17 | "description": "Enable Hot Module Reload", 18 | "type": "boolean" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /doc/aurelia_project/tasks/run.ts: -------------------------------------------------------------------------------- 1 | import {config} from './build'; 2 | import configureEnvironment from './environment'; 3 | import * as webpack from 'webpack'; 4 | import * as Server from 'webpack-dev-server'; 5 | import * as project from '../aurelia.json'; 6 | import {CLIOptions, reportWebpackReadiness} from 'aurelia-cli'; 7 | import * as gulp from 'gulp'; 8 | import {buildWebpack} from './build'; 9 | 10 | function runWebpack(done) { 11 | // https://webpack.github.io/docs/webpack-dev-server.html 12 | let opts = { 13 | host: 'localhost', 14 | publicPath: config.output.publicPath, 15 | filename: config.output.filename, 16 | hot: project.platform.hmr || CLIOptions.hasFlag('hmr'), 17 | port: project.platform.port, 18 | contentBase: config.output.path, 19 | historyApiFallback: true, 20 | open: project.platform.open, 21 | stats: { 22 | colors: require('supports-color') 23 | } 24 | } as any; 25 | 26 | if (!CLIOptions.hasFlag('watch')) { 27 | opts.lazy = true; 28 | } 29 | 30 | if (project.platform.hmr || CLIOptions.hasFlag('hmr')) { 31 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 32 | config.entry.app.unshift(`webpack-dev-server/client?http://${opts.host}:${opts.port}/`, 'webpack/hot/dev-server'); 33 | } 34 | 35 | const compiler = webpack(config); 36 | let server = new Server(compiler, opts); 37 | 38 | server.listen(opts.port, opts.host, function(err) { 39 | if (err) throw err; 40 | 41 | if (opts.lazy) { 42 | buildWebpack(() => { 43 | reportWebpackReadiness(opts); 44 | done(); 45 | }); 46 | } else { 47 | reportWebpackReadiness(opts); 48 | done(); 49 | } 50 | }); 51 | } 52 | 53 | const run = gulp.series( 54 | configureEnvironment, 55 | runWebpack 56 | ); 57 | 58 | export { run as default }; 59 | -------------------------------------------------------------------------------- /doc/custom_typings/fetch.d.ts: -------------------------------------------------------------------------------- 1 | declare module "isomorphic-fetch" { 2 | export = fetch; 3 | } 4 | -------------------------------------------------------------------------------- /doc/custom_typings/system.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'system' { 2 | import fetch = require('isomorphic-fetch'); 3 | import * as Aurelia from 'aurelia-framework'; 4 | 5 | /* 6 | * List your dynamically imported modules to get typing support 7 | */ 8 | interface System { 9 | import(name: string): Promise; 10 | import(name: 'aurelia-framework'): Promise; 11 | import(name: 'isomorphic-fetch'): Promise; 12 | } 13 | 14 | global { 15 | var System: System; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /doc/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- htmlWebpackPlugin.options.metadata.title %> 6 | 7 | 8 | 9 | 10 | 11 | <% if (htmlWebpackPlugin.options.metadata.server) { %> 12 | 13 | 14 | <% } %> 15 | 16 | 17 | -------------------------------------------------------------------------------- /doc/package-scripts.js: -------------------------------------------------------------------------------- 1 | const {series, crossEnv, concurrent, rimraf} = require('nps-utils') 2 | 3 | module.exports = { 4 | scripts: { 5 | default: 'nps webpack', 6 | test: { 7 | 8 | 9 | lint: { 10 | default: 'eslint src', 11 | fix: 'eslint --fix' 12 | }, 13 | all: concurrent({ 14 | lint: 'nps test.lint' 15 | }) 16 | }, 17 | build: 'nps webpack.build', 18 | webpack: { 19 | default: 'nps webpack.server', 20 | build: { 21 | before: rimraf('dist'), 22 | default: 'nps webpack.build.production', 23 | development: { 24 | default: series( 25 | 'nps webpack.build.before', 26 | 'webpack --progress -d' 27 | ), 28 | extractCss: series( 29 | 'nps webpack.build.before', 30 | 'webpack --progress -d --env.extractCss' 31 | ), 32 | serve: series.nps( 33 | 'webpack.build.development', 34 | 'serve' 35 | ), 36 | }, 37 | production: { 38 | inlineCss: series( 39 | 'nps webpack.build.before', 40 | crossEnv('NODE_ENV=production webpack --progress -p --env.production') 41 | ), 42 | default: series( 43 | 'nps webpack.build.before', 44 | crossEnv('NODE_ENV=production webpack --progress -p --env.production --env.extractCss') 45 | ), 46 | serve: series.nps( 47 | 'webpack.build.production', 48 | 'serve' 49 | ), 50 | } 51 | }, 52 | server: { 53 | default: `webpack-dev-server -d --devtool '#source-map' --inline --env.server`, 54 | extractCss: `webpack-dev-server -d --devtool '#source-map' --inline --env.server --env.extractCss`, 55 | hmr: `webpack-dev-server -d --devtool '#source-map' --inline --hot --env.server` 56 | }, 57 | }, 58 | serve: 'http-server dist --cors', 59 | }, 60 | } -------------------------------------------------------------------------------- /doc/src/app.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /doc/src/app.ts: -------------------------------------------------------------------------------- 1 | import {PLATFORM} from 'aurelia-pal'; 2 | import {Router, RouterConfiguration} from 'aurelia-router'; 3 | 4 | export class App { 5 | router: Router; 6 | 7 | configureRouter(config, router) { 8 | config.title = 'Aurelia-Bootstrap-Plugins'; 9 | config.map([ 10 | { route: ['', 'bootstrap-plugins/intro'], name: 'bootstrap-plugins/intro', title: 'Aurelia-Bootstrap-Plugins Intro', moduleId: PLATFORM.moduleName('./bootstrap-plugins/intro')}, 11 | { route: 'bootstrap-plugins/bootstrap-select', name: 'bootstrap-plugins/bootstrap-select', title: 'Bootstrap-Select', moduleId: PLATFORM.moduleName('./bootstrap-plugins/bootstrap-select'), nav: true, settings: { childOf: 'bootstrap-plugins' }}, 12 | { route: 'bootstrap-plugins/datetime-picker', name: 'bootstrap-plugins/datetime-picker', title: 'DateTime Picker', moduleId: PLATFORM.moduleName('./bootstrap-plugins/datetime-picker'), nav: true, settings: { childOf: 'bootstrap-plugins' }}, 13 | { route: 'bootstrap-plugins/tags-input', name: 'bootstrap-plugins/tags-input', title: 'Tags-Input', moduleId: PLATFORM.moduleName('./bootstrap-plugins/tags-input'), nav: true, settings: { childOf: 'bootstrap-plugins' }}, 14 | { route: 'validation-form', name: 'validation-form', title: 'Validation Form', moduleId: PLATFORM.moduleName('./bootstrap-plugins/validation-form'), nav: false } 15 | ]); 16 | // config.options.pushState = true; 17 | config.fallbackRoute('bootstrap-plugins/intro'); 18 | 19 | this.router = router; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /doc/src/bootstrap-plugins/bootstrap-form-renderer.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ValidationRenderer, 3 | RenderInstruction, 4 | ValidateResult 5 | } from 'aurelia-validation'; 6 | 7 | export class BootstrapFormRenderer { 8 | render(instruction: RenderInstruction) { 9 | for (let { result, elements } of instruction.unrender) { 10 | for (let element of elements) { 11 | this.remove(element, result); 12 | } 13 | } 14 | 15 | for (let { result, elements } of instruction.render) { 16 | for (let element of elements) { 17 | this.add(element, result); 18 | } 19 | } 20 | } 21 | 22 | add(element: Element, result: ValidateResult) { 23 | const formGroup = element.closest('.form-group'); 24 | if (!formGroup) { 25 | return; 26 | } 27 | 28 | if (result.valid) { 29 | if (!formGroup.classList.contains('has-error')) { 30 | formGroup.classList.add('has-success'); 31 | } 32 | } else { 33 | // add the has-error class to the enclosing form-group div 34 | formGroup.classList.remove('has-success'); 35 | formGroup.classList.add('has-error'); 36 | 37 | // add help-block 38 | const message = document.createElement('span'); 39 | message.className = 'help-block validation-message'; 40 | message.textContent = result.message; 41 | message.id = `validation-message-${result.id}`; 42 | formGroup.appendChild(message); 43 | } 44 | } 45 | 46 | remove(element: Element, result: ValidateResult) { 47 | const formGroup = element.closest('.form-group'); 48 | if (!formGroup) { 49 | return; 50 | } 51 | 52 | if (result.valid) { 53 | if (formGroup.classList.contains('has-success')) { 54 | formGroup.classList.remove('has-success'); 55 | } 56 | } else { 57 | // remove help-block 58 | const message = formGroup.querySelector(`#validation-message-${result.id}`); 59 | if (message) { 60 | formGroup.removeChild(message); 61 | 62 | // remove the has-error class from the enclosing form-group div 63 | if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) { 64 | formGroup.classList.remove('has-error'); 65 | } 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /doc/src/bootstrap-plugins/datetime-picker.ts: -------------------------------------------------------------------------------- 1 | import {bindable, inject} from 'aurelia-framework'; 2 | import * as Moment from 'moment'; 3 | 4 | export interface Task { 5 | dueDate: Date; 6 | } 7 | 8 | @inject() 9 | export class DateTimeEdit { 10 | @bindable picker; 11 | activeDate: Date; 12 | awesomeDate: Moment.Moment; 13 | editableDate: Moment.Moment; 14 | editableDateMinDate: Moment.Moment; 15 | format: string = 'MM/DD/YYYY'; 16 | dueDate: string = '30.06.2017'; 17 | myDateObject: Date; 18 | myDateObject2: Moment.Moment; 19 | post: { 20 | dateEntered: Date 21 | }; 22 | multipleDateValues = [ 23 | { 24 | id: 1, 25 | date: "2018-01-11T00:00:00", 26 | timeStart: "2018-01-11T07:30:00", 27 | timEnd: "2018-01-11T22:00:00" 28 | }, 29 | { 30 | id: 2, 31 | date: "2018-01-11T00:00:00", 32 | timeStart: "2018-01-24T08:30:00", 33 | timEnd: "2018-01-24T22:00:00" 34 | } 35 | ]; 36 | 37 | constructor() { 38 | this.myDateObject = new Date(2017, 1, 1, 2, 30); 39 | this.myDateObject2 = Moment(); 40 | this.activeDate = null; 41 | this.awesomeDate = Moment(); 42 | this.editableDate = Moment(); 43 | this.editableDateMinDate = Moment(); 44 | } 45 | 46 | pickerChanged() { 47 | this.picker.events.onChange = (e) => console.log('onChange'); 48 | this.picker.events.onUpdate = (e) => console.log('onUpdate'); 49 | this.picker.methods.daysOfWeekDisabled([0, 6]); // disable Sunday & Saturday 50 | } 51 | 52 | changePostDateValue(dateStr) { 53 | this.post.dateEntered = dateStr; 54 | } 55 | 56 | changePostDateObject(dateStr) { 57 | this.myDateObject = new Date(dateStr); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /doc/src/bootstrap-plugins/intro.ts: -------------------------------------------------------------------------------- 1 | export class Intro { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /doc/src/bootstrap-plugins/tags-input.ts: -------------------------------------------------------------------------------- 1 | import {bindable, inject} from 'aurelia-framework'; 2 | 3 | @inject() 4 | export class TagEdit { 5 | @bindable tag; 6 | post: any = {}; 7 | 8 | constructor() { 9 | this.post = { 10 | categories: ['Javascript' , 'C#'] 11 | }; 12 | } 13 | 14 | tagChanged() { 15 | this.tag.events.onBeforeItemAdd = (e) => console.log('onBeforeItemAdd'); 16 | this.tag.events.onBeforeItemRemove = (e) => console.log('onBeforeItemRemove'); 17 | this.tag.events.onItemAdded = (e) => console.log('onItemAdded'); 18 | this.tag.events.onItemAddedOnInit = (e) => console.log('onItemAddedOnInit'); 19 | this.tag.events.onItemRemoved = (e) => console.log('onItemRemoved'); 20 | } 21 | 22 | addTag() { 23 | this.tag.methods.add('Tag1'); 24 | } 25 | 26 | removeAllTag() { 27 | setTimeout(() => this.tag.methods.removeAll(), 1000); 28 | } 29 | 30 | removeTag(tagName) { 31 | this.tag.methods.remove(tagName); 32 | } 33 | 34 | replaceAllTags() { 35 | this.post.categories = ['Erlang', 'Python']; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /doc/src/bootstrap-plugins/validation-form.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /doc/src/bootstrap-plugins/validation-form.ts: -------------------------------------------------------------------------------- 1 | import {bindable, inject} from 'aurelia-framework'; 2 | import {ValidationController, ValidationControllerFactory, ValidationRules} from 'aurelia-validation'; 3 | import {BootstrapFormRenderer} from './bootstrap-form-renderer'; 4 | 5 | @inject(ValidationControllerFactory) 6 | export class ValidationForm { 7 | controller: ValidationController = null; 8 | campingCollection = ['Tent', 'Flashlight', 'Sleeping Bag']; 9 | 10 | constructor(private controllerFactory: ValidationControllerFactory) { 11 | this.controller = controllerFactory.createForCurrentScope(); 12 | this.controller.addRenderer(new BootstrapFormRenderer()); 13 | } 14 | 15 | submit() { 16 | this.controller.validate(); 17 | } 18 | } 19 | 20 | ValidationRules 21 | .ensure('categories').required() 22 | .ensure('dateEntered').required() 23 | .ensure('camping').minItems(1) 24 | .on(ValidationForm); 25 | -------------------------------------------------------------------------------- /doc/src/environment.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | debug: true, 3 | testing: true 4 | }; 5 | -------------------------------------------------------------------------------- /doc/src/main.ts: -------------------------------------------------------------------------------- 1 | /// 2 | // we want font-awesome to load as soon as possible to show the fa-spinner 3 | 4 | import './styles.scss'; 5 | import 'font-awesome/css/font-awesome.css'; 6 | import 'bootstrap/dist/css/bootstrap.css'; 7 | import 'bootstrap-select/dist/css/bootstrap-select.min.css'; 8 | import 'bootstrap-tagsinput/dist/bootstrap-tagsinput.css'; 9 | import 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css'; 10 | import {Aurelia} from 'aurelia-framework' 11 | import environment from './environment'; 12 | import {PLATFORM} from 'aurelia-pal'; 13 | import * as Bluebird from 'bluebird'; 14 | import 'bootstrap'; // importing bootstrap.js 15 | 16 | // remove out if you don't want a Promise polyfill (remove also from webpack.config.js) 17 | Bluebird.config({ warnings: { wForgottenReturn: false } }); 18 | 19 | export function configure(aurelia: Aurelia) { 20 | aurelia.use 21 | .standardConfiguration() 22 | .feature(PLATFORM.moduleName('resources/index')); 23 | 24 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-datetimepicker'), config => { 25 | // extra attributes, with config.extra 26 | config.extra.iconBase = 'glyphicon'; 27 | 28 | // or even any picker options, with config.options 29 | config.options.format = 'YYYY-MM-DD'; 30 | }); 31 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-select')); 32 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-bootstrap-tagsinput')); 33 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-validation')); 34 | // Uncomment the line below to enable animation. 35 | // aurelia.use.plugin(PLATFORM.moduleName('aurelia-animator-css')); 36 | // if the css animator is enabled, add swap-order="after" to all router-view elements 37 | 38 | // Anyone wanting to use HTMLImports to load views, will need to install the following plugin. 39 | // aurelia.use.plugin(PLATFORM.moduleName('aurelia-html-import-template-loader')); 40 | 41 | if (environment.debug) { 42 | aurelia.use.developmentLogging(); 43 | } 44 | 45 | if (environment.testing) { 46 | aurelia.use.plugin(PLATFORM.moduleName('aurelia-testing')); 47 | } 48 | 49 | aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app'))); 50 | } 51 | -------------------------------------------------------------------------------- /doc/src/resources/elements/bootstrap-tooltip.ts: -------------------------------------------------------------------------------- 1 | import {inject, customAttribute} from 'aurelia-framework'; 2 | import * as $ from 'jquery'; 3 | 4 | @customAttribute('bootstrap-tooltip') 5 | @inject(Element) 6 | export class BootstrapTooltip { 7 | element: HTMLElement; 8 | 9 | constructor(element: HTMLElement) { 10 | this.element = element; 11 | } 12 | 13 | bind() { 14 | $(this.element).tooltip(); 15 | } 16 | 17 | unbind() { 18 | $(this.element).tooltip('dispose'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /doc/src/resources/elements/loading-indicator.ts: -------------------------------------------------------------------------------- 1 | import * as nprogress from 'nprogress'; 2 | import {bindable, noView} from 'aurelia-framework'; 3 | 4 | @noView() 5 | export class LoadingIndicator { 6 | @bindable loading: boolean = false; 7 | 8 | loadingChanged(newValue: boolean) { 9 | if(newValue) { 10 | nprogress.start(); 11 | }else { 12 | nprogress.done(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /doc/src/resources/index.ts: -------------------------------------------------------------------------------- 1 | import {FrameworkConfiguration, PLATFORM} from 'aurelia-framework'; 2 | 3 | export function configure(config: FrameworkConfiguration) { 4 | config.globalResources([ 5 | PLATFORM.moduleName('./elements/bootstrap-tooltip'), 6 | PLATFORM.moduleName('./elements/loading-indicator'), 7 | PLATFORM.moduleName('./value-converters/date-format'), 8 | PLATFORM.moduleName('./value-converters/stringify') 9 | ]); 10 | } 11 | -------------------------------------------------------------------------------- /doc/src/resources/value-converters/date-format.ts: -------------------------------------------------------------------------------- 1 | import * as moment from 'moment'; 2 | 3 | export class DateFormatValueConverter { 4 | toView(value: any, format: string): string { 5 | return moment(value).format(format); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /doc/src/resources/value-converters/stringify.ts: -------------------------------------------------------------------------------- 1 | export class StringifyValueConverter { 2 | public toView( value: any ): string { 3 | return JSON.stringify(value, null, 4 ); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /doc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "target": "es5", 5 | "module": "esnext", 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "moduleResolution": "node", 9 | "sourceRoot": "src", 10 | "allowJs": true, 11 | "baseUrl": "src", 12 | "skipLibCheck": true, 13 | "lib": [ 14 | "es2017", "dom" 15 | ] 16 | }, 17 | "exclude": [ 18 | "node_modules", 19 | "aurelia_project" 20 | ], 21 | "filesGlob": [ 22 | "./src/**/*.ts", 23 | "./test/**/*.ts", 24 | "./custom_typings/**/*.d.ts" 25 | ], 26 | "atom": { 27 | "rewriteTsconfig": false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "emitDecoratorMetadata": true, 4 | "experimentalDecorators": true, 5 | "module": "amd", 6 | "target": "ES6" 7 | }, 8 | "exclude": [ 9 | "node_modules" 10 | ] 11 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aurelia-bootstrap-plugins", 3 | "version": "1.2.0", 4 | "description": "A library that bridge with a set of commonly used 3rd party Bootstrap addons", 5 | "keywords": [ 6 | "aurelia", 7 | "plugin", 8 | "bootstrap", 9 | "bootstrap-datetimepicker", 10 | "bootstrap-select", 11 | "bootstrap-tagsinput", 12 | "datepicker", 13 | "datetimepicker", 14 | "select", 15 | "tagsinput" 16 | ], 17 | "homepage": "https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins", 18 | "bugs": { 19 | "url": "https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins/issues" 20 | }, 21 | "license": "MIT", 22 | "author": "Ghislain B.", 23 | "repository": { 24 | "type": "git", 25 | "url": "https://github.com/ghiscoding/Aurelia-Bootstrap-Plugins" 26 | }, 27 | "scripts": { 28 | "build:abp-datetime": "cd aurelia-bootstrap-datetimepicker && gulp build", 29 | "build:abp-select": "cd aurelia-bootstrap-select && gulp build", 30 | "build:abp-tagsinput": "cd aurelia-bootstrap-tagsinput && gulp build", 31 | "build:doc": "cd doc && yarn start build", 32 | "run:doc": "cd doc && yarn start" 33 | }, 34 | "dependencies": { 35 | "gulp": "^3.9.1", 36 | "yarn": "^1.3.2" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "emitDecoratorMetadata": true, 4 | "experimentalDecorators": true, 5 | "module": "amd", 6 | "target": "ES6" 7 | }, 8 | "exclude": [ 9 | "node_modules" 10 | ] 11 | } --------------------------------------------------------------------------------