Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
31fb108
Project setup
Stanley-Okwii Jul 18, 2018
4d0dc34
Add WM configuration
Stanley-Okwii Jul 18, 2018
0bc4339
Add custom style: overdrive react-select default styles
Stanley-Okwii Jul 19, 2018
18d6c35
Add overlay on open mendix form
Stanley-Okwii Jul 20, 2018
735e548
Add onchange nanoflow and micrflow
Stanley-Okwii Jul 23, 2018
e355dac
Rename widget from ReferenceSelector to DropdownTypeaheadReference
Stanley-Okwii Jul 23, 2018
70b998c
Add editable configuration
Stanley-Okwii Jul 24, 2018
2a8a3ac
Fetch attribute value associated with mendix object
Stanley-Okwii Jul 24, 2018
147df23
Add styles when editable is disabled
Stanley-Okwii Jul 25, 2018
2139279
Add error handling
Stanley-Okwii Jul 26, 2018
daeccb4
Write up 'README' content
Stanley-Okwii Jul 27, 2018
806689b
Add clearable feature to dropdown
Stanley-Okwii Jul 31, 2018
ed78b11
Fix broken widget on listen to grid
Stanley-Okwii Aug 2, 2018
c03deb4
Fix popup issue: set overflow to visible
Stanley-Okwii Aug 7, 2018
993bc67
Setup functional tests
jseremba Aug 8, 2018
2ffbb46
Fix bug: clear input with backspace key
Stanley-Okwii Aug 9, 2018
23e6fe0
Fix bug: clear input with backspace key
Stanley-Okwii Aug 9, 2018
2aebbb6
Merge branch 'feature/initial' of https://github.com/FlockOfBirds/dro…
jseremba Aug 9, 2018
43fa051
Merge branch 'feature/initial' of https://github.com/FlockOfBirds/dro…
jseremba Aug 9, 2018
b30fc55
Fix web modeler
Stanley-Okwii Aug 9, 2018
1ecaa50
Fix bug: display selected option when fetching data is done
Stanley-Okwii Aug 10, 2018
d23433d
Merge changes from initial branch
jseremba Aug 10, 2018
e6008e1
Add label component
Stanley-Okwii Aug 13, 2018
37d4d70
Fix webmodeler padding
Stanley-Okwii Aug 13, 2018
94491e2
Add custom input component
jseremba Aug 14, 2018
6a5fcd1
Fix merge conflict
jseremba Aug 14, 2018
410c7eb
Remove input component
Stanley-Okwii Aug 14, 2018
d1bb7de
Add dropdown clear component
Stanley-Okwii Aug 14, 2018
f8332e8
Add control component
Stanley-Okwii Aug 14, 2018
0f5a98d
Add dropdown indicator component
Stanley-Okwii Aug 14, 2018
d4b12f5
Add indicator container component
Stanley-Okwii Aug 14, 2018
cf68f12
Style with custom class names
Stanley-Okwii Aug 14, 2018
3c739cb
Fix clearing bug
djkwagala Aug 15, 2018
534e11f
Add code re-format by Andries
Stanley-Okwii Aug 15, 2018
a9676dd
Fix render of alert messages
Stanley-Okwii Aug 16, 2018
fd48a29
Down grade to react-select@1.3.0
Stanley-Okwii Aug 23, 2018
595a8c8
Remove unused custom components
Stanley-Okwii Aug 27, 2018
e64bd6c
Update ts lint configurations
Stanley-Okwii Aug 27, 2018
f31ec0e
Merge async-loading feature
Stanley-Okwii Aug 28, 2018
500efbf
Add async loading to web modeler
Stanley-Okwii Aug 28, 2018
792db06
Fix widget breaking with configuration: read-only style set to text
Stanley-Okwii Aug 30, 2018
4e7df14
Update tslint rules- use strict: true
Stanley-Okwii Aug 30, 2018
cf32e6b
Add license
Stanley-Okwii Aug 30, 2018
7e99e33
Remove unused files
Stanley-Okwii Aug 30, 2018
0ae9495
Update widget.xsd to latest
Stanley-Okwii Aug 31, 2018
45b8d9b
Update readme
Stanley-Okwii Aug 31, 2018
35f2a0d
Add boolean and enumeration support
Stanley-Okwii Sep 3, 2018
712fd6c
Fix enumeration and boolean support with mx.parser
Stanley-Okwii Sep 4, 2018
b86a3c6
Fix e2e tests basing on react-selectv1.3.0
Stanley-Okwii Sep 6, 2018
ab86264
Merge branch 'tests/end-to-end2' into feature/initial
Stanley-Okwii Sep 6, 2018
20960f3
Fix onchange microflow: change selected value
Stanley-Okwii Sep 14, 2018
5532fff
Change widget name to DropdownTypeahead
Stanley-Okwii Sep 16, 2018
76f6dc8
Add margin style for alert message
Stanley-Okwii Sep 17, 2018
e38f3f4
Add unit tests
Stanley-Okwii Sep 18, 2018
3895bba
Process feedback from PM
Stanley-Okwii Sep 20, 2018
fc804a9
Update Readme documentation
Stanley-Okwii Sep 21, 2018
d2c8c1a
Add badges to documentation
Stanley-Okwii Sep 21, 2018
bfe06f9
Web Modeler: Add selectType configuration
Stanley-Okwii Sep 21, 2018
36a1729
Create dropdown typeahead reference set
Stanley-Okwii Sep 26, 2018
bdcc184
Fix broken onchange Event
Stanley-Okwii Sep 27, 2018
df579ae
Fix readonly style
Stanley-Okwii Oct 1, 2018
c319275
Load async data when user starts typing
Stanley-Okwii Oct 5, 2018
f0b420f
Avoid xpath when searching using microflow
Stanley-Okwii Oct 8, 2018
b58301e
Use inherited props in container component
Stanley-Okwii Oct 11, 2018
6e78d12
Add e2e tests for drop down reference set
Stanley-Okwii Oct 12, 2018
2d9df0d
Code clean up
Stanley-Okwii Oct 15, 2018
6569f1d
Add lazy loading for database, microflow and nanoflow
Stanley-Okwii Oct 18, 2018
f6c9629
Merge shared code
Stanley-Okwii Oct 18, 2018
9f0c3a3
Change widget id to dropdownReference / dropdownReferenceSet
Stanley-Okwii Oct 21, 2018
fbc7ed8
Show error in microflow/nanoflow runtime
Stanley-Okwii Oct 22, 2018
c83419c
Use data source attribute as default sort attribute
Stanley-Okwii Oct 24, 2018
2c104e1
Add search after a given number of characters is input
Stanley-Okwii Oct 25, 2018
7d1f8f9
Add height style to web-modeler preview
Stanley-Okwii Oct 26, 2018
bf7738e
Add subscriptions to changes of selected Object
Stanley-Okwii Oct 26, 2018
d173047
Remove !important from styles
Stanley-Okwii Oct 26, 2018
01616f0
Add hot reload
McDoyen Nov 12, 2018
db28ef4
Fix unit tests
McDoyen Nov 12, 2018
86c6180
Refactor code
McDoyen Nov 16, 2018
8b70260
Fix dropdown in in pop up
McDoyen Nov 16, 2018
3724fe6
Simplify css
McDoyen Nov 19, 2018
d7583b3
Fix e2e
McDoyen Nov 21, 2018
23331c3
Fix re-render issue
McDoyen Nov 21, 2018
292ce25
Fix dropdown
McDoyen Nov 23, 2018
d199e12
Process feedback
McDoyen Nov 27, 2018
4e28a45
Fix e2e tests
McDoyen Nov 30, 2018
fb4654c
Refactor code
McDoyen Dec 5, 2018
b854f91
Fix prevent early options loading for async
Andries-Smit Dec 5, 2018
a1f91a0
Add lazy contraint xpath start contains
Andries-Smit Dec 5, 2018
baafc94
Improve xpath filter
Andries-Smit Dec 5, 2018
79448b0
Process feedback
McDoyen Dec 5, 2018
7b487f0
Add debounce
McDoyen Dec 7, 2018
a034b9f
Add widget art work
McDoyen Dec 10, 2018
a8299ed
Fix listen to grid
McDoyen Dec 12, 2018
bb1bb5b
Update documentation
McDoyen Dec 14, 2018
7349ba7
Refactor code
McDoyen Dec 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.ts text eol=lf
*.js text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.json text eol=lf
*.xml text eol=lf
*.yml text eol=lf
*.md text eol=lf
*.gitattributes eol=lf
*.gitignore eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
localSettings.js
node_modules/
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
sudo: required
language: node_js
node_js:
- "8.10.0"
before_install:
- npm i -g npm
- npm install grunt-cli -g
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- wget -q -O - http://opensource.wandisco.com/wandisco-debian.gpg | sudo apt-key add -
- sudo sh -c "echo 'deb http://opensource.wandisco.com/debian/ wheezy svn17' > /etc/apt/sources.list.d/wandisco-subversion.list"
- sudo apt-get -qq update
- sudo apt-get install -y --allow-downgrades subversion=1.7.22-1+WANdisco libsvn1=1.7.22-1+WANdisco
- svn --version
- npm --version
script: travis_wait 30 npm test
after_success:
- bash <(curl -s https://codecov.io/bash)
cache:
directories:
- node_modules
env:
global:
- MX_APP_NAME=dropdowntypeahead
- MX_BRANCH_NAME=trunk
- MX_PROJECT_ID=8514bda6-39a5-465c-8923-3f1ba33afdcc
- MX_ENVIRONMENT=Sandbox
- MX_USER=ci@flockofbirds.org
deploy:
provider: releases
api_key: $GITHUB_KEY
file_glob: true
file: dist/release/*
skip_cleanup: true
on:
repo: $TRAVIS_REPO_SLUG
tags: true
125 changes: 125 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
"use strict";
const webpack = require("webpack");
const webpackConfig = require("./webpack.config");
const merge = require("webpack-merge");
const ExtractTextPlugin = require("extract-text-webpack-plugin");

const widgetNames = Object.keys(webpackConfig[0].entry);

const webpackConfigRelease = webpackConfig.map(config => merge(config, {
devtool: false,
mode: "production"
}));

webpackConfigRelease[0].plugins.push(new ExtractTextPlugin({
filename: `./widgets/com/mendix/widget/custom/[name]/ui/[name].css`
}));

webpackConfigRelease[0].module.rules[1] = {
test: /\.s?css$/, loader: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [ "css-loader", "sass-loader" ]
})
};

module.exports = function(grunt) {
const pkg = grunt.file.readJSON("package.json");
grunt.initConfig({
watch: {
updateWidgetFiles: {
files: [ "./src/**/*" ],
tasks: [ "webpack:develop", "file_append", "compress:dist", "copy:distDeployment", "copy:mpk" ],
options: {
debounceDelay: 250,
livereload: true
}
}
},

compress: {
dist: {
options: {
archive: "./dist/" + pkg.version + "/" + pkg.widgetName + ".mpk",
mode: "zip"
},
files: [ {
expand: true,
date: new Date(),
store: false,
cwd: "./dist/tmp/widgets",
src: [ "**/*" ]
} ]
}
},

copy: {
distDeployment: {
files: [ {
dest: "./dist/MxTestProject/deployment/web/widgets",
cwd: "./dist/tmp/widgets/",
src: [ "**/*" ],
expand: true
} ]
},
mpk: {
files: [ {
dest: "./dist/MxTestProject/widgets",
cwd: "./dist/" + pkg.version + "/",
src: [ pkg.widgetName + ".mpk" ],
expand: true
} ]
}
},

file_append: {
addSourceURL: {
files: widgetNames.map(widgetName => {
return {
append: `\n\n//# sourceURL=${widgetName}.webmodeler.js\n`,
input: `dist/tmp/widgets/${widgetName}.webmodeler.js`
};
})
}
},

webpack: {
develop: webpackConfig,
release: webpackConfigRelease
},

clean: {
build: [
"./dist/" + pkg.version + "/" + pkg.widgetName + "/*",
"./dist/tmp/**/*",
"./dist/MxTestProject/deployment/web/widgets/" + pkg.widgetName + "/*",
"./dist/MxTestProject/widgets/" + pkg.widgetName + ".mpk",
"./dist/wdio/**/*"
]
},

checkDependencies: {
this: {}
}
});

grunt.loadNpmTasks("grunt-check-dependencies");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-compress");
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-file-append");
grunt.loadNpmTasks("grunt-webpack");

grunt.registerTask("default", [ "clean build", "watch" ]);
grunt.registerTask(
"clean build",
"Compiles all the assets and copies the files to the dist directory.",
[ "checkDependencies", "clean:build", "webpack:develop", "file_append", "compress:dist", "copy" ]
);
grunt.registerTask(
"release",
"Compiles all the assets and copies the files to the dist directory. Minified without source mapping",
[ "checkDependencies", "clean:build", "webpack:release", "file_append", "compress:dist", "copy:mpk" ]
);
grunt.registerTask("build", [ "clean build" ]);
};
201 changes: 201 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018 Mendix Bv

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading