fix(frontend): various fe incompatabilities with updated tooling

This commit is contained in:
Gregor Kleen 2022-04-22 15:50:35 +02:00
parent deb1853272
commit 46530c6c64
11 changed files with 13 additions and 15 deletions

View File

@ -1,4 +1,4 @@
import * as debounce from 'lodash.debounce';
import debounce from 'lodash.debounce';
export const MOVEMENT_INDICATOR_ELEMENT_CLASS = 'movement-indicator';
const MOVEMENT_DEBOUNCE = 250;

View File

@ -1,6 +1,6 @@
/* global global:writable */
import * as semver from 'semver';
import semver from 'semver';
import sodium from 'sodium-javascript';
import { HttpClient } from '../../services/http-client/http-client';

View File

@ -1,4 +1,4 @@
import * as toposort from 'toposort';
import toposort from 'toposort';
const DEBUG_MODE = /localhost/.test(window.location.href) ? 1 : 0;

View File

@ -3,8 +3,8 @@ import { StorageManager, LOCATION } from '../../lib/storage-manager/storage-mana
import { Datepicker } from '../form/datepicker';
import { HttpClient } from '../../services/http-client/http-client';
import { EventManager, EventWrapper, EVENT_TYPE } from '../../lib/event-manager/event-manager';
import * as debounce from 'lodash.debounce';
import * as throttle from 'lodash.throttle';
import debounce from 'lodash.debounce';
import throttle from 'lodash.throttle';
import './async-table-filter.sass';
import './async-table.sass';

View File

@ -2,7 +2,7 @@ import { Utility } from '../../core/utility';
import moment from 'moment';
import { EventManager, EventWrapper, EVENT_TYPE } from '../../lib/event-manager/event-manager';
import * as defer from 'lodash.defer';
import defer from 'lodash.defer';
// INTERNAL (Uni2work specific) formats for formatting dates and/or times

View File

@ -1,5 +1,5 @@
import { Utility } from '../../core/utility';
import * as defer from 'lodash.defer';
import defer from 'lodash.defer';
import { EventManager, EventWrapper, EVENT_TYPE } from '../../lib/event-manager/event-manager';
const FORM_ERROR_REPORTER_INITIALIZED_CLASS = 'form-error-remover--initialized';

View File

@ -6,7 +6,7 @@ import { AUTO_SUBMIT_INPUT_UTIL_SELECTOR } from './auto-submit-input';
import { InteractiveFieldset } from './interactive-fieldset';
import { Datepicker } from './datepicker';
import * as defer from 'lodash.defer';
import defer from 'lodash.defer';
/**
* Key generator from an arbitrary number of FormData objects.

View File

@ -158,12 +158,12 @@ export class HideColumns {
switchColumnDisplay(th, hidden) {
hidden = typeof(hidden) === 'undefined' ? !this.isHiddenTH(th) : !!hidden;
this.cellColumns(th).forEach(columnIndex => this.updateColumnDisplay(columnIndex, hidden));
Array.from(this.cellColumns(th)).forEach(columnIndex => this.updateColumnDisplay(columnIndex, hidden));
}
updateColumnDisplay(columnIndex, hidden) {
// console.debug('updateColumnDisplay', { columnIndex, hidden });
this._element.rows.forEach(row => {
Array.from(this._element.rows).forEach(row => {
const cell = this.getCol(row, columnIndex);
if (cell) {
@ -235,7 +235,7 @@ export class HideColumns {
}
updateHiderIcon(hider, hidden) {
hider.getElementsByClassName('fas').forEach(hiderIcon => {
Array.from(hider.getElementsByClassName('fas')).forEach(hiderIcon => {
hiderIcon.classList.remove(hidden ? 'fa-eye' : 'fa-eye-slash');
hiderIcon.classList.add(hidden ? 'fa-eye-slash' : 'fa-eye');
});

View File

@ -1,7 +1,7 @@
import { Utility } from '../../core/utility';
import { EventManager, EventWrapper, EVENT_TYPE } from '../../lib/event-manager/event-manager';
import './navbar.sass';
import * as throttle from 'lodash.throttle';
import throttle from 'lodash.throttle';
export const HEADER_CONTAINER_UTIL_SELECTOR = '.navbar__list-item--container-selector .navbar__link-wrapper';
const HEADER_CONTAINER_INITIALIZED_CLASS = 'navbar-header-container--initialized';

View File

@ -1,7 +1,7 @@
import { Utility } from '../../core/utility';
import { EventManager, EventWrapper, EVENT_TYPE } from '../../lib/event-manager/event-manager';
import './pageactions.sass';
import * as throttle from 'lodash.throttle';
import throttle from 'lodash.throttle';
export const PAGEACTION_SECONDARY_UTIL_SELECTOR = '.pagenav__list-item';
const PAGEACTION_SECONDARY_INITIALIZED_CLASS = '.pagenav-list-item--initialized';

View File

@ -719,5 +719,3 @@ addPWEntry User{ userAuthentication = _, ..} (Text.encodeUtf8 -> pw) = db' $ do
PWHashConf{..} <- getsYesod $ view _appAuthPWHash
(AuthPWHash . Text.decodeUtf8 -> userAuthentication) <- liftIO $ makePasswordWith pwHashAlgorithm pw pwHashStrength
void $ insert User{..}