Coder Social home page Coder Social logo

lazybensch / ember-cli-copyable Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 17.0 79 KB

Deeply copies your records including their relations. The mixin is smart enough to resolve not loaded relations and is configurable to what should be shallow/deeply copied or excluded entirely.

License: MIT License

JavaScript 91.78% HTML 8.22%

ember-cli-copyable's People

Contributors

adjohnson916 avatar bekzod avatar ember-tomster avatar ibroadfo avatar lazybensch avatar odoe avatar woodzu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ember-cli-copyable's Issues

Could not find module `ember-cli-copyable`

I ran the following:

ember install ember-cli-copyable

App Info: 
 "devDependencies": {
    "ember-cli": "0.2.5",
    "ember-cli-copyable": "0.9.6"
  },
"dependencies": {
    "ember-cli": "0.2.5"
    ..... rest omitted
}

Model

`import DS from 'ember-data'`
`import ModelWithEmbeddedMixin from '../mixins/model-with-embedded-mixin'`
`import Copyable from 'ember-cli-copyable'`

listing = DS.Model.extend ModelWithEmbeddedMixin, Copyable,
    # content omitted 
`export default listing`

When I try to run the app I am given:

Error: Could not find module ember-cli-copyable imported from main-app/models/listing

Deep copy browser stuck

Hi,

My browser becomes stuck with 100% CPU usage on object copy:

This is my action:

 actions: {
    selectSurvey(id, component) {
      let store = this.store;
      let campaign = this.get('model');
      campaign.get('survey').then(function(survey) {
        if (survey)
          survey.destroyRecord();
        store.find('survey', id).then(function(survey) {
          survey.copy().then(function(copy) {});
        });
      });
    },
 }

The survey model is copyable and has many questions (copyable too) with many answers (copyable again). Maybe an infinite loop in deep copy ?

The problem occurred only on survey with questions. Copy for a survey without questions works fine.

Ember-cli: 2.3.0
Ember-cli-copyable: 0.9.6

Any idea ?

Breaks on inverse relationships

If you define inverses of your relationship, the mixin hangs and finally crashes.
The Merging of a circular reference fix takes since 2015.

Deprecated dependencies

DEPRECATION: Addon files were detected in ../node_modules/ember-cli-copyable/addon, but no JavaScript preprocessors were found for ember-cli-copyable. Please make sure to add a preprocessor (most likely ember-cli-babel) to in dependencies (NOT devDependencies) in ember-cli-copyable's package.json.

copy is not a Function

Hello,

I am trying to copy a model object and am getting the error, format.copy is not a Function. Any ideas what I am doing wrong? Here is my controller with my action from a form:

`import Notify from 'ember-notify'`
`import Copyable from 'ember-cli-copyable'`

DocumentFormatCopyController = Ember.Controller.extend
  needs: ['application']
  copiedName: null

  actions:
    cancel: ->
      @transitionToRoute 'document_formats'
    copyFormat: ->
      newName = @get('copiedName')
      format = @get('model')
      format.copy({name: newName}).then (copy) =>
        Notify.success('Saved!')
        @transitionToRoute 'document_format', copy

`export default DocumentFormatCopyController`

looking for new collaborators

Due to changes in my work environment during the last year I was - and most likely will be - unable to foster this addon any longer. I hope that in the future I will be able to come back and work on ember-cli-copyable but for now i am clearly unable to keep up with contributors fixing and extending the project.

This is why i am looking for someone, or multiple contributors to take over the project. If someone would like to do this please let me know and i will add you as an npm owner and github collaborator.

I am sorry for the inconveniences thus far.

ben

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.