Giter VIP home page Giter VIP logo

ember-sweetalert's People

Contributors

dependabot[bot] avatar ember-tomster avatar fed03 avatar greatwizard avatar lindyhopchris avatar shaneprrlt avatar tonkpils avatar victor95pc avatar

Stargazers

 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  avatar

ember-sweetalert's Issues

Not working in production build

Hi,
I used the unreleased 1.0 version of this addon throughout the whole development phase without any problem.
Sadly, building for production make this not working.

The browser spits out the error t.default.mixin is not a function that I tracked down to this line

return Swal.mixin(get(this, 'config'));

Thinking that it might be a conflict with another addon I created an empty emper app with only ember-sweetalert installed https://github.com/Fed03/sweetalert-test

If you run ember s and ember s -prod you'll se the error.
Let me know if I can help any further

1.0

So wanted to write some of my ideas for the things that would be good to sort out to get this package to 1.0. Totally just my ideas and happy to be shot down as needed! Plus would be good to hear any ideas that others have.

  • Upgrade to SweetAlert2 v7.
  • Install via NPM rather than Bower.
  • Use a service rather than a mixin (see below)
  • Allow default config (Issue #8)
  • Ensure callbacks are executed in the Ember run loop
  • Provide test helpers and/or a testing approach for applications.
  • Add tests to this package.

Service instead of Mixin

Service would be a more appropriate pattern as it fits with current Ember best-practice. It also will provide an easy way to deliver points 4 and 5 above.

The other thing it will help with is testing. I'm not sure how to deal with SweetAlert in Ember tests because it is all occurring outside the runloop. At the moment, my approach is to import Ember.testing and not use sweet alert if in testing mode. (Would be interested to hear if anyone else has a better approach.) If we implement as a service, then this would provide a way to easily stub out SweetAlert when testing.

Is this package stable?

Hey! I've used sweetalert2 a ton in vanilla js projects; I was wondering if this ember extension was stable or if it needed any help? I'm available to work if there are any known bugs/limitations etc. Thanks!

[alpha] Install issues

@lindyhopchris I moved this here to not clog up the 1.0 ( #13 ) pull request.

SweetAlert was still in the bower.json so I removed it from there. After I cleared out the tmp folders, I'm still getting the same error when the {{sweet-alert}} component is triggered with true from the show computed property.

Template snippet

{{sweet-alert
  show=temperatureTooHigh
  title="Temperature Too High"
  text="The temperature entered exceeds the maximum temperature limit."
  icon="error"
  confirmButtonText="Try again"
}}
  temperatureTooHigh: computed('pumpApplication.temperature', function() {
    return this.get('pumpApplication.temperature') > 300;
  }),

ember -v

ember-cli: 3.2.0
node: 6.14.1
os: darwin x64

package.json

{
  "name": "tester",
  "version": "0.0.0",
  "description": "",
  "license": "All Rights Reserved",
  "author": "fh group",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "repository": "",
  "scripts": {
    "build": "ember build",
    "lint:js": "eslint .",
    "start": "ember serve",
    "test": "ember test"
  },
  "devDependencies": {
    "broccoli-asset-rev": "^2.7.0",
    "ember-ajax": "^3.0.0",
    "ember-cli": "~3.2.0",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^6.6.0",
    "ember-cli-bootstrap-sassy": "^0.5.8",
    "ember-cli-dependency-checker": "^2.0.0",
    "ember-cli-eslint": "^4.2.1",
    "ember-cli-htmlbars": "^2.0.1",
    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-moment-shim": "^3.5.0",
    "ember-cli-nouislider": "^0.14.1",
    "ember-cli-qunit": "^4.3.2",
    "ember-cli-sass": "^7.2.0",
    "ember-cli-shims": "^1.2.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-uglify": "^2.0.0",
    "ember-cli-update": "^0.21.4",
    "ember-concurrency": "^0.8.16",
    "ember-cpm": "^3.0.0",
    "ember-d3": "^0.4.4",
    "ember-data": "~3.2.0",
    "ember-export-application-global": "^2.0.0",
    "ember-feature-flags": "^4.2.0",
    "ember-file-upload": "^2.5.0",
    "ember-font-awesome": "^3.1.1",
    "ember-get-config": "^0.2.4",
    "ember-inflector": "2.1.0",
    "ember-inputmask": "^0.6.0",
    "ember-load-initializers": "^1.1.0",
    "ember-local-storage": "^1.3.6",
    "ember-lodash": "~4.17.6",
    "ember-maybe-import-regenerator": "^0.1.6",
    "ember-modal-dialog": "^2.4.1",
    "ember-moment": "^7.6.0",
    "ember-page-title": "^4.0.3",
    "ember-parachute": "^0.3.7",
    "ember-resolver": "^4.0.0",
    "ember-select": "0.4.0",
    "ember-simple-auth": "^1.6.0",
    "ember-source": "~3.2.0",
    "ember-sweetalert": "https://github.com/Tonkpils/ember-sweetalert.git#1.0",
    "ember-tri-state": "^1.0.1",
    "ember-truth-helpers": "^2.0.0",
    "ember-watson": "^0.9.1",
    "ember-welcome-page": "^3.0.0",
    "ember-wormhole": "^0.5.4",
    "eslint-plugin-ember": "^5.0.0",
    "loader.js": "^4.2.3",
    "qunit-dom": "^0.6.2"
  },
  "private": true,
  "dependencies": {
    "accounting": "^0.4.1",
    "d3": "^5.3.0",
    "ember-concurrency": "^0.8.16",
    "spinkit": "^1.2.5"
  },
  "engines": {
    "node": "6.* || 8.* || >= 10.*"
  }
}

bower.json

{
  "name": "tester",
  "dependencies": {
    "canvas": "http://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.4.1/canvas.min.js",
    "jquery.inputmask": "3.1.49",
    "js-quantities": "~1.5.0",
    "print-area": "~2.4.1",
    "ravenjs": "http://cdn.ravenjs.com/3.12.1/raven.min.js",
    "round": "https://gist.githubusercontent.com/al3x-edge/01c8b37ce44476ba8aaa/raw/eb3020675f163f7def10939f71d7f4b94d75b3e1/round.js"
  }
}

Broccoli error Ember 2.9.x

I'm trying to use your addon in Ember 2.9.x but when I run ember server I'm receiving this:

The Broccoli Plugin: [SourceMapConcat: Concat: Vendor /assets/vendor.js] failed with:   

Any Idea why this happening?

DEPRECATION warning

After upgrading ember from 2.12 to 2.18 I got this warning when I start ember

DEPRECATION: An addon is trying to access project.nodeModulesPath. This is not a reliable way to discover npm modules. Instead, consider doing: require("resolve").sync(something, { basedir: project.root }). Accessed from: new NPMDependencyVersionChecker (...\node_modules\ember-sweetalert\node_modules\ember-cli-version-checker\src\npm-dependency-version-checker.js:11:33)

ember-cli: 2.18.0
node: 8.9.4
os: win32 x6

Looking for Maintainers

Unfortunately, I am not actively maintaining this and I have not dedicated too much time at keeping up with the Ember environment. I created this library as a way of learning Ember and had some hopes of doing some work in production with it. However, I was moved in a different direction and this project fell through the cracks.

There are a couple of issues that would be better tackled by someone that uses this actively and has more knowledge of Ember. The sweetalert2 project is fairly active and if there is a need for this project I would love to have it keep going.

Ping me on this issue and I'd be happy to add you as a collaborator on the project.

Set defaults?

Is it possible to set default configuration options somehow? For example, I always want buttonsStyling: false but I'd rather not have to set that for each alert

fastboot compatibility?

Hi,

I tried to include this addon in a fastboot project and the build failed. The build fails wherever sweetalert uses document. Any thoughts or pointers to how to make it play nice with fastboot?

Thanks

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.