diff --git a/CHANGELOG.md b/CHANGELOG.md index 522545d7..cdc89bf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.0.13] - 2023-07-24 + +### Added + +- New dependency mechanism isValid + you can show/hide a field based if another field is valid or not + ## [4.0.12] - 2023-07-15 ### Changed @@ -536,7 +543,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow change password for current local user - Start tracking versions -[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/4.0.12...HEAD +[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/4.0.13...HEAD + +[4.0.13]: https://github.com/ansibleguy76/ansibleforms/compare/4.0.12...4.0.13 [4.0.12]: https://github.com/ansibleguy76/ansibleforms/compare/4.0.11...4.0.12 diff --git a/app_versions.gradle b/app_versions.gradle index b37e644c..13327f63 100644 --- a/app_versions.gradle +++ b/app_versions.gradle @@ -1,2 +1,2 @@ -ext.version_code = 40012 -ext.version_name = "4.0.12" +ext.version_code = 40013 +ext.version_name = "4.0.13" diff --git a/client/package.json b/client/package.json index 7a230bca..e90de5ab 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "ansible_forms_vue", - "version": "4.0.12", + "version": "4.0.13", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/client/src/components/Form.vue b/client/src/components/Form.vue index 47763cf3..2e2683f9 100644 --- a/client/src/components/Form.vue +++ b/client/src/components/Form.vue @@ -785,6 +785,7 @@ var fieldname=inversed?item.name.slice(1):item.name var columnRegex = /(.+)\.(.+)/g; // detect a "." in the field var tmpArr=columnRegex.exec(fieldname) // found aaa.bbb + var tmp if(tmpArr && tmpArr.length>0){ fieldname = tmpArr[1] // aaa column=tmpArr[2] // bbb @@ -798,16 +799,34 @@ }else{ value=ref.form[fieldname] } - if(isAnd && ((!inversed && !item.values.includes(value)) || ((inversed && item.values.includes(value)))) ){ - result=false - // console.log("and not valid") - break - } - if(isOr && ((!inversed && item.values.includes(value)) || (inversed && !item.values.includes(value)))){ - result=true - // console.log("or valid") - break + // new in 4.0.13 - dependency on validated + if(item.isValid != undefined){ + tmp = item.isValid!=this.$v.form[fieldname].$invalid + if(isAnd && ((!inversed && !tmp) || ((inversed && tmp))) ){ + result=false + // console.log("and not valid") + break + } + if(isOr && ((!inversed && tmp) || (inversed && !tmp))){ + result=true + // console.log("or valid") + break + } + + }else{ + tmp = item.values?.includes(value) + if(isAnd && ((!inversed && !tmp) || ((inversed && tmp))) ){ + result=false + // console.log("and not valid") + break + } + if(isOr && ((!inversed && tmp) || (inversed && !tmp))){ + result=true + // console.log("or valid") + break + } } + } // console.log("sub => " + result) // invert if nand or nor diff --git a/docs/404.md b/docs/404.md new file mode 100644 index 00000000..a7b58c00 --- /dev/null +++ b/docs/404.md @@ -0,0 +1,6 @@ +--- +title: "Page Not Found" +search: exclude +--- + +Sorry, but the page you were trying to view does not exist. Try searching for it or looking at the URL to see if it looks correct. diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 00000000..7eed201a --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,14 @@ +FROM jekyll/builder + +WORKDIR /tmp +ADD Gemfile /tmp/ +ADD Gemfile.lock /tmp/ +RUN bundle install + +FROM jekyll/jekyll + +VOLUME /src +EXPOSE 4000 + +WORKDIR /src +ENTRYPOINT ["jekyll", "serve", "--livereload", "-H", "0.0.0.0"] diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..515633aa --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,7 @@ +source "https://rubygems.org" + +# to publish on github page +gem 'github-pages', group: :jekyll_plugins + +# to publich without github page +#gem "jekyll" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 00000000..e8ad94bf --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,273 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (6.0.6.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + commonmarker (0.17.13) + ruby-enum (~> 0.5) + concurrent-ruby (1.2.0) + dnsruby (1.61.7) + simpleidn (~> 0.1) + em-websocket (0.5.2) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + ethon (0.14.0) + ffi (>= 1.15.0) + eventmachine (1.2.7) + execjs (2.8.1) + faraday (1.4.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + multipart-post (>= 1.2, < 3) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.1.0) + ffi (1.15.3) + forwardable-extended (2.6.0) + gemoji (3.0.1) + github-pages (215) + github-pages-health-check (= 1.17.2) + jekyll (= 3.9.0) + jekyll-avatar (= 0.7.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.1.6) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.15.1) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.13.0) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.3) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.7.1) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.1.1) + jekyll-theme-cayman (= 0.1.1) + jekyll-theme-dinky (= 0.1.1) + jekyll-theme-hacker (= 0.1.2) + jekyll-theme-leap-day (= 0.1.1) + jekyll-theme-merlot (= 0.1.1) + jekyll-theme-midnight (= 0.1.1) + jekyll-theme-minimal (= 0.1.1) + jekyll-theme-modernist (= 0.1.1) + jekyll-theme-primer (= 0.5.4) + jekyll-theme-slate (= 0.1.1) + jekyll-theme-tactile (= 0.1.1) + jekyll-theme-time-machine (= 0.1.1) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.12.0) + kramdown (= 2.3.1) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.3) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.10.4, < 2.0) + rouge (= 3.26.0) + terminal-table (~> 1.4) + github-pages-health-check (1.17.2) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (~> 4.0) + public_suffix (>= 2.0.2, < 5.0) + typhoeus (~> 1.3) + html-pipeline (2.14.0) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.9.0) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (>= 1.17, < 3) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-avatar (0.7.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.1.1) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.3.1) + commonmarker (~> 0.14) + jekyll (>= 3.7, < 5.0) + jekyll-commonmark-ghpages (0.1.6) + commonmarker (~> 0.17.6) + jekyll-commonmark (~> 1.2) + rouge (>= 2.0, < 4.0) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.15.1) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.13.0) + jekyll (>= 3.4, < 5.0) + octokit (~> 4.0, != 4.4.0) + jekyll-mentions (1.6.0) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.7.1) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.1.2) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.5.4) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.12.0) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + kramdown (2.3.1) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.5.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.3.6) + mini_portile2 (2.8.0) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.17.0) + multipart-post (2.1.1) + nokogiri (1.13.9) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + octokit (4.21.0) + faraday (>= 0.9) + sawyer (~> 0.8.0, >= 0.5.3) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.6) + racc (1.6.0) + rb-fsevent (0.11.0) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (3.26.0) + ruby-enum (0.9.0) + i18n + ruby2_keywords (0.0.4) + rubyzip (2.3.0) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) + simpleidn (0.2.1) + unf (~> 0.1.4) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (1.2.11) + thread_safe (~> 0.1) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) + unicode-display_width (1.7.0) + zeitwerk (2.6.6) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + +BUNDLED WITH + 2.1.4 diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 00000000..573599c4 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,13 @@ +Copyright 2021 Google LLC + +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 + + https://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. diff --git a/docs/LICENSE-BSD-NAVGOCO.txt b/docs/LICENSE-BSD-NAVGOCO.txt new file mode 100644 index 00000000..7fdefc39 --- /dev/null +++ b/docs/LICENSE-BSD-NAVGOCO.txt @@ -0,0 +1,27 @@ +/* This license pertains to the Navgoco jQuery component used for the sidebar. */ + +Copyright (c) 2013, Christodoulos Tsoulloftas, http://www.komposta.net +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..25e1b230 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,120 @@ +repository: tomjoht/documentation-theme-jekyll + +output: web +# this property is useful for conditional filtering of content that is separate from the PDF. + +topnav_title: Jekyll Documentation Theme +# this appears on the top navigation bar next to the home button + +site_title: Jekyll theme for documentation +# this appears in the html browser tab for the site title (seen mostly by search engines, not users) + +company_name: Copyright 2021 Google LLC +# this appears in the footer + +github_editme_path: tomjoht/documentation-theme-jekyll/blob/gh-pages/ +# if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank. + +# gitlab_editme_path: tomjoht/documentation-theme-jekyll/blob/gh-pages/ +# if you're using GitLab, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank. + +google_analytics: UA-66296557-1 +# if you have google-analytics ID, put it in. if not, edit this value to blank. + +host: 127.0.0.1 +# the preview server used. Leave as is. + +port: 4000 +# the port where the preview is rendered. You can leave this as is unless you have other Jekyll builds using this same port that might cause conflicts. in that case, use another port such as 4006. + +exclude: + - .idea/ + - .gitignore + - vendor +# these are the files and directories that jekyll will exclude from the build + +feedback_subject_line: Jekyll documentation theme + +feedback_email: tomjoht@gmail.com +# used as a contact email for the Feedback link in the top navigation bar + +# feedback_disable: true +# if you uncomment the previous line, the Feedback link gets removed + +# feedback_text: "Need help?" +# if you uncomment the previous line, it changes the Feedback text + +# feedback_link: "http://helpy.io/" +# if you uncomment the previous line, it changes where the feedback link points to + +highlighter: rouge +# library used for syntax highlighting + +markdown: kramdown +kramdown: + input: GFM + auto_ids: true + hard_wrap: false + syntax_highlighter: rouge + +# filter used to process markdown. note that kramdown differs from github-flavored markdown in some subtle ways + +collections: + tooltips: + output: false +# collections are declared here. this renders the content in _tooltips and processes it, but doesn't output it as actual files in the output unless you change output to true + +defaults: + - + scope: + path: "" + type: "pages" + values: + layout: "page" + comments: true + # if you don't want to use Commento.io and just hide comments, change true to false wherever you see the comments property + search: true + sidebar: home_sidebar + topnav: topnav + - + scope: + path: "" + type: "tooltips" + values: + layout: "page" + search: true + tooltip: true + + - + scope: + path: "" + type: "posts" + values: + layout: "post" + comments: true + # if you don't want to use Commento.io and just hide comments, change true to false wherever you see the comments property + search: true + sidebar: home_sidebar + topnav: topnav + +# these are defaults used for the frontmatter for these file types + +sidebars: +- home_sidebar +- mydoc_sidebar +- product1_sidebar +- product2_sidebar +- other + +description: "Intended as a documentation theme based on Jekyll for technical writers documenting software and other technical products, this theme has all the elements you would need to handle multiple products with both multi-level sidebar navigation, tags, and other documentation features." +# the description is used in the feed.xml file + +# needed for sitemap.xml file only +# url: http://idratherbewriting.com +# baseurl: /documentation-theme-jekyll + + +github: [metadata] + + +# Copyright 2021 Google LLC diff --git a/docs/_data/alerts.yml b/docs/_data/alerts.yml new file mode 100644 index 00000000..7dfa163f --- /dev/null +++ b/docs/_data/alerts.yml @@ -0,0 +1,18 @@ +tip: '