├── .DS_Store ├── .babelrc ├── .commitlintrc.json ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .github ├── CODE_OF_CONDUCT.md ├── COMMIT_CONVENTION.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmignore ├── .nvmrc ├── .storybook ├── config.js └── webpack.config.js ├── LICENSE.md ├── README.md ├── docs ├── preview-container-object.png ├── preview-container.png └── preview-simple.png ├── jest.config.js ├── jest.setup.js ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── __tests__ │ └── index.js ├── components │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── field-array.js.snap │ │ └── field-array.js │ └── field-array.vue ├── index.js └── index.umd.js └── stories ├── Container.vue ├── _index.stories.js ├── bootstrap-accordion-container.stories.js ├── bootstrap-accordion-container.vue ├── remove-button.stories.js ├── show-empty-component-at-bottom.stories.js └── simple-array-with-container.stories.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwenaelp/vfg-field-array/24449cc133d721388e6813f2dc5e0ea4af78ff3a/.DS_Store -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["vue-app", { 4 | "modules": false 5 | }] 6 | ], 7 | "plugins": [ 8 | ["module-resolver", { 9 | "extensions": [".js", ".vue", ".json"] 10 | }] 11 | ], 12 | "env": { 13 | "test": { 14 | "plugins": ["dynamic-import-node"] 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@commitlint/config-conventional" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .github/ 2 | _book/ 3 | docs/ 4 | coverage/ 5 | dist/ -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint', 7 | ecmaVersion: 2017, 8 | sourceType: 'module' 9 | }, 10 | plugins: ['html', 'vue'], 11 | extends: [ 12 | 'eslint:recommended', 13 | 'plugin:prettier/recommended', 14 | 'plugin:vue/recommended', 15 | 'plugin:import/errors', 16 | 'plugin:import/warnings' 17 | ], 18 | env: { 19 | browser: true, 20 | node: true, 21 | commonjs: true, 22 | es6: true, 23 | jest: true 24 | }, 25 | rules: { 26 | // allow async-await 27 | 'generator-star-spacing': 'off', 28 | // don't require .vue extension when importing 29 | 'import/extensions': ['error', 'always', { 30 | 'js': 'never', 31 | 'vue': 'never' 32 | }], 33 | // disallow reassignment of function parameters 34 | // disallow parameter object manipulation except for specific exclusions 35 | 'no-param-reassign': ['error', { 36 | props: true, 37 | ignorePropertyModificationsFor: [ 38 | 'state', // for vuex state 39 | 'acc', // for reduce accumulators 40 | 'e' // for e.returnvalue 41 | ] 42 | }], 43 | // allow optionalDependencies 44 | 'import/no-extraneous-dependencies': ['error', { 45 | optionalDependencies: ['test/index.js'] 46 | }], 47 | // allow debugger during development 48 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 49 | }, 50 | "settings": { 51 | // resolve using plugin babel module resolver 52 | "import/resolver": { 53 | "babel-module": {} 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at accounts@gwenp.fr. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ -------------------------------------------------------------------------------- /.github/COMMIT_CONVENTION.md: -------------------------------------------------------------------------------- 1 | ## Git Commit Message Convention 2 | 3 | > This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md). 4 | 5 | #### Examples 6 | 7 | Appears under "Features" header, `compiler` subheader: 8 | 9 | ``` 10 | feat(compiler): add 'comments' option 11 | ``` 12 | 13 | Appears under "Bug Fixes" header, `v-model` subheader, with a link to issue #28: 14 | 15 | ``` 16 | fix(v-model): handle events on blur 17 | 18 | close #28 19 | ``` 20 | 21 | Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: 22 | 23 | ``` 24 | perf(core): improve vdom diffing by removing 'foo' option 25 | 26 | BREAKING CHANGE: The 'foo' option has been removed. 27 | ``` 28 | 29 | The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. 30 | 31 | ``` 32 | revert: feat(compiler): add 'comments' option 33 | 34 | This reverts commit 667ecc1654a317a13331b17617d973392f415f02. 35 | ``` 36 | 37 | ### Full Message Format 38 | 39 | A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: 40 | 41 | ``` 42 | (): 43 | 44 | 45 | 46 |