@@ -15,7 +15,7 @@
// limitations under the License.
import $ from 'jquery';
-import ko from 'knockout';
+import * as ko from 'knockout';
import apiQueueManager from 'api/apiQueueManager';
import CancellablePromise from 'api/cancellablePromise';
@@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
import AceAutocompleteWrapper from './aceAutocompleteWrapper';
@@ -17,7 +17,7 @@
import Clipboard from 'clipboard';
import 'jquery-mousewheel';
import 'ext/bootstrap-datepicker.min';
import 'ext/jquery.hotkeys';
import 'jquery/plugins/jquery.hdfstree';
import komapping from 'knockout.mapping';
import apiHelper from 'api/apiHelper';
import hueUtils from 'utils/hueUtils';
class Session {
import { markdown } from 'markdown';
import componentUtils from 'ko/components/componentUtils';
import I18n from 'utils/i18n';
import 'ko/bindings/ko.publish';
import DisposableComponent from 'ko/components/DisposableComponent';
import huePubSub from 'utils/huePubSub';
import './ko.resultDownloadActions';
import dataCatalog from 'catalog/dataCatalog';
import contextCatalog from 'catalog/contextCatalog';
class MetastoreTableSamples {
/**
// based on the original https://github.com/brianchance/knockout-x-editable
ko.bindingHandlers.editable = {
init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
@@ -254,4 +254,4 @@ ko.bindingHandlers.editable = {
});
}
-};
+};
// Based on https://gist.githubusercontent.com/xtranophilist/8001624/raw/ko_selectize.js
@@ -221,4 +221,4 @@ ko.bindingHandlers.selectize = {
})[0]);
-}
+}
@@ -22,7 +22,7 @@ import 'apps/notebook2/execution/sessionManager';
import './jquery.setup';
import './sqlTestUtils';
ko.mapping = komapping;
export const koSetup = () => {
let originalLoadTemplate;
import qq from 'ext/fileuploader.custom';
import huePubSub from '../../utils/huePubSub';
import AceLocationHandler from 'ko/bindings/ace/aceLocationHandler';
@@ -16,7 +16,7 @@
import d3v3 from 'd3v3';
import nv from 'ext/nv.d3.1.1.15b.custom';
import 'ext/leaflet/leaflet';
import 'ext/leaflet/leaflet.markercluster';
import 'ext/leaflet/leaflet.heat';
import HueColors from 'utils/hueColors';
ko.bindingHandlers.scatterChart = {
import Datamap from './datamap';
@@ -21,7 +21,7 @@
*/
import Plotly from 'plotly.js-dist';
ko.bindingHandlers.attachViewModelToElementData = {
init: function(el, valueAccessor, allBindingsAccessor, viewModel) {
// TODO: less from bootstrap?
ko.bindingHandlers.autogrowInput = {
init: function(element, valueAccessor) {
ko.bindingHandlers.blurHide = {
import sprintf from 'sprintf-js';
ko.bindingHandlers.bytesize = (function() {
ko.bindingHandlers.chosen = {
init: function(element, valueAccessor, allBindings) {
ko.bindingHandlers.clearable = {
after: ['textInput', 'value', 'valueUpdate'],
ko.bindingHandlers.clickForAceFocus = {
ko.bindingHandlers.clickToCopy = {
ko.bindingHandlers.clipboard = {
init: (element, valueAccessor) => {
// https://stackoverflow.com/questions/19865364/knockoutjs-linking-value-from-a-input-to-a-datalist-value
ko.bindingHandlers.dateRangePicker = {
INTERVAL_OPTIONS: [
ko.bindingHandlers.datepicker = {
ko.bindingHandlers.dblclick = {
init: function(element, valueAccessor, allBindingsAccessor, viewModel) {
ko.bindingHandlers.delayedOverflow = {
ko.bindingHandlers.dropdown = {
init: function(element) {
import Dropzone from 'dropzone';
ko.bindingHandlers.duration = (function() {
ko.bindingHandlers.ellipsis = {
update: function(element, valueAccessor) {
ko.bindingHandlers.fadeVisible = {
ko.bindingHandlers.fetchMore = {
ko.bindingHandlers.hdfsAutocomplete = {
ko.bindingHandlers.hdfsTree = {
// TODO: Depends on Ace
ko.bindingHandlers.hiveChooser = {
init: function(element, valueAccessor, allBindingsAccessor) {
const APP_ICON_INDEX = {
adls: `<svg class="hi hi-fw"><use xlink:href="#hi-adls"></use></svg>`,
ko.bindingHandlers.hueCheckAll = {
ko.bindingHandlers.hueCheckbox = {
after: ['value', 'attr'],
ko.bindingHandlers.hueChecked = {
* Binding for adding a spinner to the page
ko.bindingHandlers.jHueRowSelector = {
ko.bindingHandlers.logResizer = {