tonkpils / ember-sweetalert Goto Github PK
View Code? Open in Web Editor NEWEmber CLI addon for SweetAlert2
License: MIT License
Ember CLI addon for SweetAlert2
License: MIT License
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
ember-sweetalert/addon/services/swal.js
Line 16 in adc6999
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
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.
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.
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!
@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"
}
}
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?
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
Need to add a note to the readme that IE11 requires the Babel polyfill to be present. Can add it as per this comment:
emberjs/ember-cli-babel#40 (comment)
If you don't add it, you get a Promise is undefined
error.
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.