Repository: hamzahamidi/ajsf Branch: main Commit: 587dbed91c7c Files: 261 Total size: 696.5 KB Directory structure: gitextract_hea3k8sd/ ├── .browserslistrc ├── .editorconfig ├── .github/ │ └── workflows/ │ ├── ci.yml │ ├── codeql-analysis.yml │ ├── dependabot.yml │ ├── deploy.yml │ └── stale.yml ├── .gitignore ├── .nvmrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── angular.json ├── demo/ │ ├── app/ │ │ ├── ace-editor.directive.ts │ │ ├── demo-root.component.ts │ │ ├── demo.component.html │ │ ├── demo.component.ts │ │ ├── demo.module.ts │ │ ├── demo.routes.ts │ │ └── example-schemas.model.ts │ ├── assets/ │ │ └── example-schemas/ │ │ ├── asf-array.json │ │ ├── asf-basic-json-schema-type.json │ │ ├── asf-bootstrap-grid.json │ │ ├── asf-complex-key-support.json │ │ ├── asf-hack-conditional-required.json │ │ ├── asf-kitchen-sink.json │ │ ├── asf-simple.json │ │ ├── asf-tab-array.json │ │ ├── asf-titlemap-examples.json │ │ ├── jsf-events.json │ │ ├── jsf-factory-sleek.json │ │ ├── jsf-fields-ace.json │ │ ├── jsf-fields-actions.json │ │ ├── jsf-fields-advancedfieldset.json │ │ ├── jsf-fields-array-simple.json │ │ ├── jsf-fields-array.json │ │ ├── jsf-fields-authfieldset.json │ │ ├── jsf-fields-autocomplete.json │ │ ├── jsf-fields-checkbox.json │ │ ├── jsf-fields-checkboxbuttons.json │ │ ├── jsf-fields-checkboxes.json │ │ ├── jsf-fields-color.json │ │ ├── jsf-fields-common.json │ │ ├── jsf-fields-fieldset.json │ │ ├── jsf-fields-help.json │ │ ├── jsf-fields-hidden.json │ │ ├── jsf-fields-iconselect.json │ │ ├── jsf-fields-imageselect.json │ │ ├── jsf-fields-password.json │ │ ├── jsf-fields-questions.json │ │ ├── jsf-fields-radiobuttons.json │ │ ├── jsf-fields-radios.json │ │ ├── jsf-fields-range.json │ │ ├── jsf-fields-section.json │ │ ├── jsf-fields-select.json │ │ ├── jsf-fields-selectfieldset-key.json │ │ ├── jsf-fields-selectfieldset.json │ │ ├── jsf-fields-submit.json │ │ ├── jsf-fields-tabarray-maxitems.json │ │ ├── jsf-fields-tabarray-value.json │ │ ├── jsf-fields-tabarray.json │ │ ├── jsf-fields-textarea.json │ │ ├── jsf-gettingstarted.json │ │ ├── jsf-previousvalues-multidimensional.json │ │ ├── jsf-previousvalues.json │ │ ├── jsf-schema-array.json │ │ ├── jsf-schema-basic.json │ │ ├── jsf-schema-default.json │ │ ├── jsf-schema-inlineref.json │ │ ├── jsf-schema-morecomplex.json │ │ ├── jsf-schema-required.json │ │ ├── jsf-templating-idx.json │ │ ├── jsf-templating-tpldata.json │ │ ├── jsf-templating-value.json │ │ ├── jsf-templating-values.json │ │ ├── json-schema-draft01.json │ │ ├── json-schema-draft02.json │ │ ├── json-schema-draft03.json │ │ ├── json-schema-draft04.json │ │ ├── json-schema-draft06.json │ │ ├── ng-jsf-data-only.json │ │ ├── ng-jsf-deep-ref.json │ │ ├── ng-jsf-flex-layout.json │ │ ├── ng-jsf-layout-only.json │ │ ├── ng-jsf-nested-arrays.json │ │ ├── ng-jsf-select-list-examples.json │ │ ├── ng-jsf-select-widget-examples.json │ │ ├── ng-jsf-simple-array.json │ │ ├── rjsf-alternatives.json │ │ ├── rjsf-arrays.json │ │ ├── rjsf-custom-array.json │ │ ├── rjsf-custom.json │ │ ├── rjsf-date-and-time.json │ │ ├── rjsf-errors.json │ │ ├── rjsf-files.json │ │ ├── rjsf-large.json │ │ ├── rjsf-nested.json │ │ ├── rjsf-numbers.json │ │ ├── rjsf-ordering.json │ │ ├── rjsf-references.json │ │ ├── rjsf-simple.json │ │ ├── rjsf-single.json │ │ ├── rjsf-validation.json │ │ ├── rjsf-widgets.json │ │ └── sources.md │ ├── environments/ │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── docs/ │ └── issue_template.md ├── e2e/ │ ├── protractor.conf.js │ ├── src/ │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package.json ├── projects/ │ ├── ajsf-bootstrap3/ │ │ ├── README.md │ │ ├── karma.conf.js │ │ ├── ng-package.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── lib/ │ │ │ │ ├── bootstrap3-framework.component.html │ │ │ │ ├── bootstrap3-framework.component.scss │ │ │ │ ├── bootstrap3-framework.component.spec.ts │ │ │ │ ├── bootstrap3-framework.component.ts │ │ │ │ ├── bootstrap3-framework.module.ts │ │ │ │ └── bootstrap3.framework.ts │ │ │ ├── public_api.ts │ │ │ └── test.ts │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.lib.prod.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ ├── ajsf-bootstrap4/ │ │ ├── README.md │ │ ├── karma.conf.js │ │ ├── ng-package.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── lib/ │ │ │ │ ├── bootstrap4-framework.component.html │ │ │ │ ├── bootstrap4-framework.component.scss │ │ │ │ ├── bootstrap4-framework.component.spec.ts │ │ │ │ ├── bootstrap4-framework.component.ts │ │ │ │ ├── bootstrap4-framework.module.ts │ │ │ │ └── bootstrap4.framework.ts │ │ │ ├── public_api.ts │ │ │ └── test.ts │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.lib.prod.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ ├── ajsf-core/ │ │ ├── karma.conf.js │ │ ├── ng-package.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── lib/ │ │ │ │ ├── framework-library/ │ │ │ │ │ ├── framework-library.service.ts │ │ │ │ │ ├── framework.ts │ │ │ │ │ ├── no-framework.component.html │ │ │ │ │ ├── no-framework.component.ts │ │ │ │ │ ├── no-framework.module.ts │ │ │ │ │ └── no.framework.ts │ │ │ │ ├── json-schema-form.component.html │ │ │ │ ├── json-schema-form.component.ts │ │ │ │ ├── json-schema-form.module.ts │ │ │ │ ├── json-schema-form.service.ts │ │ │ │ ├── locale/ │ │ │ │ │ ├── de-validation-messages.ts │ │ │ │ │ ├── en-validation-messages.ts │ │ │ │ │ ├── es-validation-messages.ts │ │ │ │ │ ├── fr-validation-messages.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── it-validation-messages.ts │ │ │ │ │ ├── pt-validation-messages.ts │ │ │ │ │ └── zh-validation-messages.ts │ │ │ │ ├── locale-dates/ │ │ │ │ │ └── en-US.ts │ │ │ │ ├── shared/ │ │ │ │ │ ├── convert-schema-to-draft6.function.ts │ │ │ │ │ ├── form-group.functions.ts │ │ │ │ │ ├── format-regex.constants.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── json-schema.functions.ts │ │ │ │ │ ├── json.validators.ts │ │ │ │ │ ├── jsonpointer.functions.ts │ │ │ │ │ ├── jspointer.functions.json.spec.ts │ │ │ │ │ ├── layout.functions.ts │ │ │ │ │ ├── merge-schemas.function.ts │ │ │ │ │ ├── utility.functions.ts │ │ │ │ │ ├── validator.functions.spec.ts │ │ │ │ │ └── validator.functions.ts │ │ │ │ └── widget-library/ │ │ │ │ ├── add-reference.component.ts │ │ │ │ ├── button.component.ts │ │ │ │ ├── checkbox.component.ts │ │ │ │ ├── checkboxes.component.ts │ │ │ │ ├── file.component.ts │ │ │ │ ├── hidden.component.ts │ │ │ │ ├── index.ts │ │ │ │ ├── input.component.ts │ │ │ │ ├── message.component.ts │ │ │ │ ├── none.component.ts │ │ │ │ ├── number.component.ts │ │ │ │ ├── one-of.component.ts │ │ │ │ ├── orderable.directive.ts │ │ │ │ ├── radios.component.ts │ │ │ │ ├── root.component.ts │ │ │ │ ├── section.component.ts │ │ │ │ ├── select-framework.component.ts │ │ │ │ ├── select-widget.component.ts │ │ │ │ ├── select.component.ts │ │ │ │ ├── submit.component.ts │ │ │ │ ├── tab.component.ts │ │ │ │ ├── tabs.component.ts │ │ │ │ ├── template.component.ts │ │ │ │ ├── textarea.component.ts │ │ │ │ ├── widget-library.module.ts │ │ │ │ └── widget-library.service.ts │ │ │ ├── public_api.ts │ │ │ └── test.ts │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.lib.prod.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ └── ajsf-material/ │ ├── README.md │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── src/ │ │ ├── lib/ │ │ │ ├── angular-flex-monkey-patch.ts │ │ │ ├── material-design-framework.component.html │ │ │ ├── material-design-framework.component.scss │ │ │ ├── material-design-framework.component.spec.ts │ │ │ ├── material-design-framework.component.ts │ │ │ ├── material-design-framework.module.ts │ │ │ ├── material-design.framework.ts │ │ │ └── widgets/ │ │ │ ├── flex-layout-root.component.html │ │ │ ├── flex-layout-root.component.ts │ │ │ ├── flex-layout-section.component.ts │ │ │ ├── material-add-reference.component.ts │ │ │ ├── material-button-group.component.ts │ │ │ ├── material-button.component.ts │ │ │ ├── material-checkbox.component.ts │ │ │ ├── material-checkboxes.component.ts │ │ │ ├── material-chip-list.component.ts │ │ │ ├── material-datepicker.component.ts │ │ │ ├── material-file.component.ts │ │ │ ├── material-input.component.ts │ │ │ ├── material-number.component.ts │ │ │ ├── material-one-of.component.ts │ │ │ ├── material-radios.component.ts │ │ │ ├── material-select.component.ts │ │ │ ├── material-slider.component.ts │ │ │ ├── material-stepper.component.ts │ │ │ ├── material-tabs.component.ts │ │ │ ├── material-textarea.component.ts │ │ │ └── public_api.ts │ │ ├── public_api.ts │ │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .browserslistrc ================================================ # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers # For additional information regarding the format and rule options, please see: # https://github.com/browserslist/browserslist#queries # For IE 9-11 support, please uncomment the last line of the file and adjust as needed > 0.5% last 2 versions Firefox ESR not dead # IE 9-11 ================================================ FILE: .editorconfig ================================================ # Editor configuration, see http://editorconfig.org root = true [*] charset = utf-8 indent_style = space indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true [*.md] max_line_length = off trim_trailing_whitespace = false ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning' push: branches: [ main ] pull_request: branches: [ main ] jobs: ci: runs-on: ubuntu-latest strategy: matrix: node-version: [16.x, lts/*] steps: - uses: actions/checkout@v3 - name: Setup Node ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm ci - name: Build libs and demo run: npm run build:demo - name: Test libs run: | npm run test:core -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessCI npm run test:bs3 -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessCI npm run test:bs4 -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessCI npm run test:material -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessCI - name: Publish code coverage run: npm run publish:coverage ================================================ FILE: .github/workflows/codeql-analysis.yml ================================================ name: "CodeQL" on: push: branches: [main, angular6-json-schema-form] pull_request: # The branches below must be a subset of the branches above branches: [main, angular6-json-schema-form] schedule: - cron: '0 18 * * 3' jobs: analyse: name: Analyse runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. fetch-depth: 2 # If this run was triggered by a pull request event, then checkout # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2 if: ${{ github.event_name == 'pull_request' }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 # Override language selection by uncommenting this and choosing your languages # with: # languages: go, javascript, csharp, python, cpp, java # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language #- run: | # make bootstrap # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 ================================================ FILE: .github/workflows/dependabot.yml ================================================ version: 2 updates: # npm dependencies - package-ecosystem: "npm" # package.json directory directory: "/" # Check for dependencies update every week on Sunday so owners are not spammed during the week schedule: interval: "monthly" # 10 PRs created per week max seems managable? open-pull-requests-limit: 5 commit-message: # Prefix all commit messages with "build" prefix: "build" - package-ecosystem: "npm" directory: "/projects/ajsf-core" schedule: interval: "weekly" day: "sunday" open-pull-requests-limit: 5 commit-message: prefix: "build" - package-ecosystem: "npm" directory: "/projects/ajsf-material" schedule: interval: "weekly" day: "sunday" open-pull-requests-limit: 5 commit-message: prefix: "build" - package-ecosystem: "npm" directory: "/projects/ajsf-bootstrap3" schedule: interval: "weekly" day: "sunday" open-pull-requests-limit: 5 commit-message: prefix: "build" - package-ecosystem: "npm" directory: "/projects/ajsf-bootstrap4" schedule: interval: "weekly" day: "sunday" open-pull-requests-limit: 5 commit-message: prefix: "build" ================================================ FILE: .github/workflows/deploy.yml ================================================ name: Deploy on: push: branches: [ main ] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: setup Node uses: actions/setup-node@v3 - run: npm ci - run: npm run build:demo - name: deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./dist/demo exclude_assets: '' ================================================ FILE: .github/workflows/stale.yml ================================================ name: Mark stale issues and pull requests on: schedule: - cron: "0 0 * * *" jobs: stale: runs-on: ubuntu-latest steps: - uses: actions/stale@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Stale issue' stale-pr-message: 'Stale pull request' stale-issue-label: 'no-issue-activity' stale-pr-label: 'no-pr-activity' ================================================ FILE: .gitignore ================================================ # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist /tmp /out-tsc # dependencies /node_modules # IDEs and editors /.idea .project .classpath .c9/ *.launch .settings/ *.sublime-workspace # IDE - VSCode .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json # misc /.angular/cache /.sass-cache /connect.lock /coverage /libpeerconnection.log npm-debug.log yarn-error.log testem.log /typings # System Files .DS_Store Thumbs.db ================================================ FILE: .nvmrc ================================================ 16.13.2 ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to ajsf ajsf is an open project and welcomes contributions. These guidelines are provided to help you understand how the project works and to make contributing smooth and fun for everybody involved. There are two main forms of contribution: reporting issues and performing code changes. ## Reporting Issues If you find a problem with ajsf, report it using [GitHub issues](https://github.com/hamzahamidi/ajsf/issues/new). Before reporting a new issue, please take a moment to check whether it has already been reported [here](https://github.com/hamzahamidi/ajsf/issues). If this is the case, please: - Read all the comments to confirm that it's the same issue you're having. - Refrain from adding "same thing here" or "+1" comments. Just hit the "subscribe" button to get notifications for this issue. - Add a comment only if you can provide helpful information that has not been provided in the discussion yet. When creating a new issue, make sure you include: 1. As much detail as possible about your setup/environment 1. Steps to reproduce the issue/bug 1. What you expected to happen 1. What happened instead This information will help to determine the cause and prepare a fix as fast as possible. ## Code Changes Code contributions come in various forms and sizes, from simple bug fixes to implementation of new features. To send your code change, use GitHub pull requests. The workflow is as follows: 1. Fork the project. 1. Create a branch based on `main`. 1. Implement your change, including tests and documentation. 1. Run tests to make sure your change didn't break anything. 1. Publish the branch and create a pull request. 1. ajsf developers will review your change and possibly point out issues. Adapt the code under their guidance until all issues are resolved. 1. Finally, the pull request will get merged or rejected. See also [GitHub's guide on contributing](https://help.github.com/articles/fork-a-repo). If you want to do multiple unrelated changes, use separate branches and pull requests. ### Start the development environment Let's first generate all the bundles we need to start the demo: ```bash $ cd ajsf $ yarn install or npm install $ yarn start ``` You can stop the demo application. The tricky part now is to run concurrently both the demo application & the library in watch mode. So, first choose which library you want to change then run `$ ng build @ajsf/core --watch` for example to build in watch mode the `@ajsf/core`. Now let's start the demo application in watch mode too. So, open a new terminal and run `$ ng serve` and there you go. This method is tricky but it works perfectly in all environments (I tried other methods like npm-run-all or concurrently packages but angular-cli build doesn't restart after a failed build). If you have a better method please send a PR. ### Commits Each commit in the pull request should do only one thing, which is clearly described by its commit message. Especially avoid mixing formatting changes and functional changes into one commit. When writing commit messages, adhere to [Angular Conventional Commit](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines). #### Commit Message Format Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: ``` ():