I am using the AG Grid React for a project & the free version seems to be working fine. Recently i got a trial license & tried to incorporate that with the Ag Grid React. I have followed the following approach for importing the license
import { AgGridReact } from 'ag-grid-react';
import {LicenseManager} from "ag-grid-enterprise";
LicenseManager.setLicenseKey("license key");
Some features of Ag Grid Community & Ag Grid are also getting used as below
import { GridOptions, ColDef, ColGroupDef, ICellRendererParams } from "ag-grid";
import { CellClickedEvent } from 'ag-grid-community';
After that the Ag Grid shows up just fine like before but the enterprise features are still missing. I have tried to import the license at application starting point as well but still no luck.
There is no console error or warning for missing enterprise licence etc.
The Project is Durandal based front end application that leverages Require.js & Grunt minification.
Any help regarding this would be appreciated.
Thanks
Just import the enterprise version
import "ag-grid-enterprise";
Try doing this.
import { LicenseManager } from 'ag-grid-enterprise/main';
You can import cellClickedevent from ag-grid
import { CellClickedEvent } from 'ag-grid'
Related
I have flutter application which uses different webview plugin for each platform(mobile, web, window).
Though I am able to import platform base on web and mobile, I am not able to import for windows.
I have tried adding else condition if it is not mobile or web, but it is taking mobile plugin.
This is how I import package for web and mobile (Working).
import 'package:eam_flutter/form/mobileui.dart'
if (dart.library.html) 'package:eam_flutter/form/webui.dart'
as multiPlatform;
This is how I import package for web, mobile and windows (Not Working, it is showing mobile webview exception since it doesn't support desktop).
import 'package:eam_flutter/form/windowui.dart'
if (dart.library.html) 'package:eam_flutter/form/webui.dart'
if (dart.library.io) 'package:eam_flutter/form/mobileui.dart'
as multiPlatform;
How can I specify conditional imports for windows?
For anyone else finding this, note that the accepted answer is not an answer to the question that was asked. The answer to the question that was asked is that you cannot. There is no way to use conditional imports to get different behavior between mobile and desktop; see this comment from the Dart team.
Since there is no conditional import support for window since it comes under dart io.
I have this workaround and found it working.
I end up creating file for each platform with different package import.
import 'package:flutter/foundation.dart' show kIsWeb;
import 'dart:io' as io;
if(kIsWeb){
{
return WebPage(); //your web page with web package import in it
}
else if (!kIsWeb && io.Platform.isWindows) {
return WindowsPage(); //your window page with window package import in it
}
else if(!kIsWeb && io.Platform.isAndroid) {
return AndroidPage(); //your android page with android package import in it
}
//you can add others condition...
Maybe we no longer need conditional import.
Look at the code below:
import 'package:package1/package1.dart';
import 'package:package2/package2.dart';
const keepFunc1 = bool.fromEnvironment('KEEP_FUNC1');
dynamic result2;
void main() {
if (keepFunc1) {
result2 = Calculator1()..addOne(1);
} else {
result2 = Calculator2()..addOne(1);
}
runApp(const MyApp());
}
If KEEP_FUNC1 environment variable is not specified to true. The package1 and the class Caculator1 won't be packaged into apk or ipa.
For more details, see the answer I wrote here.
So we can import all packages and use a const environment value to decide what packages to import. The tree-shaking mechanism is smart enough to remove unused parts.
Check this example
you need to create 2 files one for web & another for os and use condition on import
I see that Flutter has conditional import statements, but after looking at some examples I’m still confused.
If I want to have main.dart import package “package:xyz/xyz.dart” only when the user is on web, how can I achieve that in the simplest way? Thanks for any tips.
We could import a package only for the web users by the use of a conditional import:
import 'package:xyz/mobile.dart'
if (dart.library.html) 'package:xyz/web.dart';
The code above imports package:xyz/web.dart only if dart.library.html is available, which happens to be the case for the web platform.
As per this link, I'm able to install the podfile just fine: https://developers.google.com/ml-kit/vision/object-detection/ios#objc
https://i.stack.imgur.com/AqkFZ.png
But what's the actual import statement at the top of my code? I can't find that anywhere. For example I'm trying to find something like the following code example but can't anywhere.
import GoogleMLKit
import GoogleMLKitObjectDetection
I must be missing something very simple.
In the example projects on Github the implmentation is
import MLKit
Here are differents example projects about its use. The link is in the documentation you shared.
https://github.com/googlesamples/mlkit/tree/master/ios/quickstarts/vision
I'm trying to import features available under enterprise license into my angular 6 app, but it seems ag-grid doesn't see license key.
I have already imported ag-grid and ag-grid-community and it works fine, but there are some problems with enterprise licensed features.
Yesterday I got trial license for 2 month;
I downloaded package ag-grid-enterprise via npm and imported LicenseManager component (before bootstraping app):
import { LicenseManager } from 'ag-grid-enterprise';
LicenseManager.setLicenseKey('my_key');
Then added import "'ag-grid-enterprise'" to my module file according to documentation (I'm using lazy loading modules, so I put AgGridModule not into app.module, but into that module where I need ag-grid);
Then switched rowModelType to serverSide and replaced setter with setServerSideDatasource()
I followed the documentation steps, but after grid initialization got errors listed below.
ag-Grid: could not find matching row model for rowModelType serverSide
ag-Grid: rowModelType server side is only available in ag-Grid Enterprise
I'll really appreciate for any suggestions about how to solve this problem. If anyone have some alternative/more detailed guide that would be perfect.
I'm using Quasar and the PWA starter kit, with VueJS.
I want to know how to declare once a set of components used throughout many pages in a Vue app.
I seem to need to have a huge import declaration in every page
I tried to import once in main.js but there is a conflicting
import Quasar from 'quasar'
so I can't add to that or change it to
import {
Quasar,
QCard,
.... etc
} from 'quasar'
as the {} seems to break the import.
Also can't import twice (duplicate import error).
What is the way to import components once for a whole app?
Or get at the Vue object so it can be used in another way to import inside a different component?
You can import specific components to register globally in the main.js file when you register the Quasar plugin.
For example, in you want to be able to use the <q-btn> and <q-icon> components anywhere in your application you could do this:
import Quasar, { QBtn, QIcon } from 'quasar'
Vue.use(Quasar, {
components: { QBtn, QIcon }
})
Here's the documentation.