├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── bower.json ├── demo ├── .bowerrc ├── .gitignore ├── .jshintrc ├── app │ ├── 404.html │ ├── README.md │ ├── bundle.js │ ├── components │ │ ├── _components.js │ │ ├── animation │ │ │ ├── pageTransitions.scss │ │ │ └── progressSpinner.js │ │ ├── data │ │ │ ├── formData.html │ │ │ └── formData.js │ │ ├── docsModal │ │ │ ├── docsModal.html │ │ │ ├── docsModal.js │ │ │ └── docsModal.scss │ │ ├── jsonFields │ │ │ ├── jsonFields.html │ │ │ ├── jsonFields.js │ │ │ ├── jsonFields.scss │ │ │ ├── prettify.filter.js │ │ │ └── prettify.scss │ │ ├── markdown │ │ │ ├── contents.html │ │ │ ├── contents.js │ │ │ └── contents.scss │ │ ├── mdi │ │ │ ├── .bower.json │ │ │ ├── bower.json │ │ │ ├── css │ │ │ │ ├── materialdesignicons.css │ │ │ │ ├── materialdesignicons.css.map │ │ │ │ ├── materialdesignicons.min.css │ │ │ │ └── materialdesignicons.min.css.map │ │ │ ├── fonts │ │ │ │ ├── materialdesignicons-webfont.eot │ │ │ │ ├── materialdesignicons-webfont.svg │ │ │ │ ├── materialdesignicons-webfont.ttf │ │ │ │ ├── materialdesignicons-webfont.woff │ │ │ │ └── materialdesignicons-webfont.woff2 │ │ │ ├── license.txt │ │ │ ├── package.json │ │ │ ├── preview.html │ │ │ └── scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── materialdesignicons.scss │ │ └── pageStyles │ │ │ ├── container.html │ │ │ ├── container.js │ │ │ ├── divider.js │ │ │ └── divider.scss │ ├── core │ │ ├── layout.js │ │ ├── nav │ │ │ ├── nav.ctrl.js │ │ │ ├── nav.html │ │ │ ├── nav.js │ │ │ └── nav.scss │ │ ├── navMenu.json │ │ ├── sidebar │ │ │ ├── sidebar.html │ │ │ ├── sidebar.js │ │ │ └── sidebar.service.js │ │ └── sidebarMenu.json │ ├── docs │ │ ├── checkbox.md │ │ ├── datePicker.md │ │ ├── error.md │ │ ├── flex.md │ │ ├── inline.md │ │ ├── input.md │ │ ├── notes │ │ │ ├── errorDescription.md │ │ │ ├── flexDescription.md │ │ │ ├── flexNotes.md │ │ │ ├── modelOptionsDescription.md │ │ │ ├── ngModelAttrsDescription.md │ │ │ ├── selectNotes.md │ │ │ └── themeDescription.md │ │ ├── radio.md │ │ ├── select.md │ │ ├── switch.md │ │ ├── textarea.md │ │ └── themes.md │ ├── favicon.ico │ ├── fields │ │ ├── _fields.module.js │ │ ├── advanced │ │ │ ├── _advanced.js │ │ │ ├── file-input.html │ │ │ ├── fileInput.js │ │ │ └── googlePlaces.js │ │ ├── checkbox.js │ │ ├── controllerLink.js │ │ ├── datePicker.js │ │ ├── dropdown.js │ │ ├── error.js │ │ ├── expression.js │ │ ├── flex.js │ │ ├── inline.js │ │ ├── input.js │ │ ├── modelOptions.js │ │ ├── ngModelAttrs.js │ │ ├── radio.js │ │ ├── select.js │ │ ├── switch.js │ │ ├── test.js │ │ ├── themes.js │ │ ├── validators.js │ │ └── watcher.js │ ├── images │ │ └── angular-formly.png │ ├── index.html │ ├── index.js │ ├── index.scss │ ├── main │ │ ├── main.ctrl.js │ │ ├── main.html │ │ ├── main.js │ │ └── main.scss │ ├── res │ │ └── materialdesignicons-webfont.eot │ └── vendor.js ├── bower.json ├── package.json └── webpack.config.js ├── dist ├── formlyLumx.css └── formlyLumx.js ├── docs ├── checkbox.md ├── datePicker.md ├── error.md ├── flex.md ├── inline.md ├── input.md ├── radio.md ├── select.md ├── switch.md ├── textarea.md └── themes.md ├── package.json ├── src ├── fields │ ├── lx-checkbox.html │ ├── lx-date-picker.html │ ├── lx-dropdown.html │ ├── lx-flex.html │ ├── lx-input.html │ ├── lx-radio.html │ ├── lx-select.html │ ├── lx-switch.html │ └── lx-textarea.html ├── index.js └── wrappers │ ├── lx-wrapper-div.html │ ├── lx-wrapper-errors.html │ ├── lx-wrapper-flex.html │ └── lx-wrapper-inline.html └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | npm-debug.log 4 | bower_components/ 5 | node_modules/ 6 | demoOld/ 7 | edits/ 8 | gulpfile.js 9 | demo/node_modules 10 | demo/e2e 11 | demo/app/bower_components 12 | demo/Procfile 13 | demo/server 14 | demo/.editorconfig 15 | demo/.idea 16 | demo2/ 17 | projectFilesBackup/ 18 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #2.0.4 2 | - working version with new ApiCheck 3 | 4 | #2.0.3 5 | - updated to work with latest version of Angular-Formly (7.1.2) 6 | 7 | #1.5.2 8 | - inline radio buttons 9 | 10 | #1.5.1 11 | - formlyLumx.js re-written in webpack 12 | - you can now more easily edit and customize your own templates. Compile them by running "webpack" in the console. 13 | 14 | #1.4.0 15 | - demo re-written using ES6 & Webpack 16 | - updated advanced form layouts 17 | - new: `lx-wrapper-inline` for inline styles. 18 | 19 | ## Breaking Changes 20 | - rewritten `lx-flex` to handle previous functionality. 21 | - `lx-wrapper-flex` no longer necessary for most cases. Just set the default flex in the `lx-flex` parent 22 | 23 | #1.3.3 24 | - less strict bower dependencies 25 | 26 | #1.3.2 27 | - allow simpler `lx-select` templates. For example: `options: ['a', 'b']` 28 | - files in `dist` folder. Shortened titles to `formlyLumx`. 29 | - removed `lx-title`. Use `template:
Sorry, but the page you were trying to view does not exist.
146 |It looks like this was the result of either:
147 |[3 | 4 | 5 | 6 | 8 | 9 |
]10 | 11 |
<i class="mdi mdi-name"></i>
125 |
126 | Special thanks to SagiMedina@Gmail.com for this example!
' 25 | }]; 26 | }; 27 | } 28 | 29 | // add lx-file-input custom template by SagiMedina@Gmail.com 30 | function fileInputConfig(formlyConfigProvider) { 31 | formlyConfigProvider.setType({ 32 | name: 'lx-file-input', 33 | template: require('./file-input.html') 34 | }); 35 | } 36 | // fileUpload directive by SagiMedina@Gmail.com 37 | function fileInput($compile) { 38 | 39 | function link(scope, element, attrs) { 40 | directive.controller = attrs.controller; 41 | directive.controllerAs = attrs.controllerAs; 42 | var htmlText = 'Long lists may load slow and cause lag.
' 379 | }]; 380 | }; 381 | } 382 | 383 | function stateRoutes($stateProvider) { 384 | $stateProvider 385 | .state(`${name}`, { 386 | url: `/${name}`, 387 | views: { 388 | 'form@': { 389 | template: require('main/main.html'), 390 | controller: 'MainCtrl as vm', 391 | resolve: { 392 | formFields: function(selectFF) { 393 | return selectFF.fields; 394 | }, 395 | contents: function(selectFF) { 396 | return selectFF.contents; 397 | }, 398 | formData: function(selectFF) { 399 | return selectFF.formData; 400 | } 401 | } 402 | } 403 | } 404 | }); 405 | } 406 | export default angular.module(`shmck.formFields.${name}`, []) 407 | .service(`${name}FF`, fields) 408 | .config(stateRoutes); 409 | -------------------------------------------------------------------------------- /demo/app/fields/switch.js: -------------------------------------------------------------------------------- 1 | const name = 'switch'; 2 | 3 | function fields() { 4 | this.contents = { 5 | title: 'Switch', 6 | docFile: 'docs/switch.md' 7 | }; 8 | 9 | this.formData = { 10 | regularSwitch: '', 11 | hiddenSwitch: '', 12 | checkedSwitch: true, 13 | helperSwitch: '', 14 | disabledSwitch: '', 15 | disabledCheckedSwitch: true 16 | }; 17 | 18 | this.fields = function() { 19 | return [{ 20 | key: 'regularSwitch', 21 | type: 'lx-switch', 22 | templateOptions: { 23 | label: 'Regular switch' 24 | } 25 | }, { 26 | key: 'checkedSwitch', 27 | type: 'lx-switch', 28 | templateOptions: { 29 | label: 'Switched Switch', 30 | checked: true 31 | } 32 | }, { 33 | key: 'helperSwitch', 34 | type: 'lx-switch', 35 | templateOptions: { 36 | label: 'Switch with Helper', 37 | description: 'Explaining a little more' 38 | } 39 | }, { 40 | key: 'disabledSwitch', 41 | type: 'lx-switch', 42 | templateOptions: { 43 | label: 'Disabled Switch', 44 | disabled: true 45 | } 46 | }, { 47 | key: 'disabledCheckedSwitch', 48 | type: 'lx-switch', 49 | templateOptions: { 50 | label: 'Disabled & Checked Switch', 51 | disabled: true, 52 | checked: true 53 | } 54 | }]; 55 | }; 56 | } 57 | 58 | function stateRoutes($stateProvider) { 59 | $stateProvider 60 | .state(`${name}`, { 61 | url: `/${name}`, 62 | views: { 63 | 'form@': { 64 | template: require('main/main.html'), 65 | controller: 'MainCtrl as vm', 66 | resolve: { 67 | formFields: function(switchFF) { 68 | return switchFF.fields; 69 | }, 70 | contents: function(switchFF) { 71 | return switchFF.contents; 72 | }, 73 | formData: function(switchFF) { 74 | return switchFF.formData; 75 | } 76 | } 77 | } 78 | } 79 | }); 80 | } 81 | export default angular.module(`shmck.formFields.${name}`, []) 82 | .service(`${name}FF`, fields) 83 | .config(stateRoutes); 84 | -------------------------------------------------------------------------------- /demo/app/fields/test.js: -------------------------------------------------------------------------------- 1 | // for testing purposes 2 | const name = 'test'; 3 | 4 | function fields() { 5 | this.contents = { 6 | title: 'test' 7 | }; 8 | 9 | this.formData = {}; 10 | 11 | this.fields = function () { 12 | return [{ 13 | "key": "row", 14 | "type": "lx-flex", 15 | "templateOptions": { 16 | "flex": { 17 | "container": "row", 18 | "item": 6 19 | }, 20 | "fields": [ 21 | { 22 | key: 'text', 23 | type: 'lx-input', 24 | templateOptions: { 25 | type: 'number', 26 | label: 'Text' 27 | }, 28 | "watcher": { 29 | "listener": function(field, newValue, oldValue, scope, stopWatching) { 30 | console.log("watcher"); 31 | if (newValue) { 32 | console.log(newValue); 33 | } 34 | } 35 | } 36 | } 37 | ] 38 | } 39 | }]; 40 | }; 41 | } 42 | 43 | function stateRoutes($stateProvider) { 44 | $stateProvider 45 | .state(`${name}`, { 46 | url: `/${name}`, 47 | views: { 48 | 'form@': { 49 | template: require('main/main.html'), 50 | controller: 'MainCtrl as vm', 51 | resolve: { 52 | formFields: function (testFF) { 53 | return testFF.fields; 54 | }, 55 | contents: function (testFF) { 56 | return testFF.contents; 57 | }, 58 | formData: function (testFF) { 59 | return testFF.formData; 60 | } 61 | } 62 | } 63 | } 64 | }); 65 | } 66 | export default angular.module(`shmck.formFields.${name}`, []) 67 | .service(`${name}FF`, fields) 68 | .config(stateRoutes); 69 | -------------------------------------------------------------------------------- /demo/app/fields/themes.js: -------------------------------------------------------------------------------- 1 | const name = 'themes'; 2 | 3 | function fields() { 4 | this.contents = { 5 | title: 'Themes', 6 | subhead: 'backgrounds + dark/light font themes', 7 | docFile: 'docs/themes.md', 8 | description: 'docs/notes/themeDescription.md', 9 | formFieldsClass: 'bgc-blue-grey-500 addPadding' 10 | }; 11 | 12 | this.formData = { 13 | dark1: '', 14 | dark2: '', 15 | light1: '', 16 | light2: '' 17 | }; 18 | 19 | this.fields = function() { 20 | return [{ 21 | template: '