inviton-powerduck 0.0.117 → 0.0.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/powerduck-initializer.ts +5 -4
- package/app/powerduck-state.ts +1 -1
- package/common/api-http.ts +8 -10
- package/common/base-component.tsx +2 -2
- package/common/dialog-utils.ts +25 -37
- package/common/excel/excel-js-provider.ts +1 -0
- package/common/external-barcode-scanner.ts +242 -242
- package/common/utils/array-extend.ts +8 -8
- package/common/utils/utils.ts +16 -13
- package/components/app/root-dynamic-component-container.tsx +1 -1
- package/components/app/vue-plugin-jsxtransform.ts +1 -1
- package/components/button/upload-button.tsx +7 -7
- package/components/chart-js/line-chart-flot.tsx +4 -6
- package/components/context-menu/context-menu-binder.ts +2 -2
- package/components/counter/testall.tsx +6 -6
- package/components/datatable/col-vis-modal.tsx +11 -7
- package/components/datatable/datatable.tsx +157 -162
- package/components/dropdown/country-dropdown.tsx +1 -1
- package/components/dropdown/index.tsx +16 -23
- package/components/dropdown/mobile/legacy_fdd.ts +5 -5
- package/components/dropdown/ts/select2-multi-checkboxes.ts +5 -8
- package/components/dropzone/gallery-dropzone.tsx +26 -25
- package/components/fullcalendar/timegrid-calendar.tsx +17 -17
- package/components/google/maps.tsx +6 -6
- package/components/google/places-autocomplete.tsx +6 -6
- package/components/google/ts/google-maps-api.ts +2 -1
- package/components/image-crop/image-cropping-modal.tsx +5 -5
- package/components/input/color-picker.tsx +2 -2
- package/components/input/daterange-picker.tsx +2 -2
- package/components/input/datetime-picker.tsx +10 -10
- package/components/input/pin-input.tsx +1 -1
- package/components/input/plugins/trumbowyg/lang/cs.ts +1 -1
- package/components/input/plugins/trumbowyg/lang/de.ts +1 -1
- package/components/input/plugins/trumbowyg/lang/sk.ts +1 -1
- package/components/input/ts/dateInputHelper.ts +8 -8
- package/components/input/wysiwig.tsx +13 -13
- package/components/modal/modal-utils.ts +2 -2
- package/components/modal/ts/file-manager-dialog.ts +3 -3
- package/components/stars/stars.tsx +1 -1
- package/components/ui/notification.ts +1 -1
- package/package.json +1 -1
|
@@ -14,10 +14,10 @@ export interface PoweduckInitFrameworkArgs {
|
|
|
14
14
|
|
|
15
15
|
export default class PowerduckInitializer {
|
|
16
16
|
static initFramework(args?: PoweduckInitFrameworkArgs) {
|
|
17
|
-
window.jQuery = jquery;
|
|
18
|
-
window.$ = window.jQuery;
|
|
19
|
-
window.moment = moment;
|
|
20
|
-
window.select2 = select2();
|
|
17
|
+
(window as any).jQuery = jquery;
|
|
18
|
+
(window as any).$ = (window as any).jQuery;
|
|
19
|
+
(window as any).moment = moment;
|
|
20
|
+
(window as any).select2 = select2();
|
|
21
21
|
|
|
22
22
|
if ((window as any).__viteErrHandlerBound != true) {
|
|
23
23
|
(window as any).__viteErrHandlerBound = true;
|
|
@@ -39,6 +39,7 @@ export default class PowerduckInitializer {
|
|
|
39
39
|
|
|
40
40
|
if (args != null) {
|
|
41
41
|
if (args.supportedLanguages?.length as number > 0) {
|
|
42
|
+
// @ts-ignore
|
|
42
43
|
LanguageUtils.supportedLanguages = args.supportedLanguages as Language[];
|
|
43
44
|
}
|
|
44
45
|
}
|
package/app/powerduck-state.ts
CHANGED
|
@@ -145,7 +145,7 @@ export default class PowerduckState {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
static get rootDynamicComponentContainer(): IDynamicComponentContainer {
|
|
148
|
-
return window.RootDynamicContainerInstance;
|
|
148
|
+
return (window as any).RootDynamicContainerInstance;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
static registerStickyTabs(id: string, state: IStickyDeclaration): void {
|
package/common/api-http.ts
CHANGED
|
@@ -402,7 +402,7 @@ export class AppHttpProvider {
|
|
|
402
402
|
if (blockUiEnabled) {
|
|
403
403
|
try {
|
|
404
404
|
mySelf.unblockUi(args);
|
|
405
|
-
} catch (e) {}
|
|
405
|
+
} catch (e) { }
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
const stop = new Date().getTime();
|
|
@@ -488,10 +488,8 @@ export class AppHttpProvider {
|
|
|
488
488
|
setTimeout(() => {
|
|
489
489
|
AppHttpProvider.log(
|
|
490
490
|
'warning',
|
|
491
|
-
`Attempting retry to ${
|
|
492
|
-
|
|
493
|
-
}, the request took ${
|
|
494
|
-
stop - start
|
|
491
|
+
`Attempting retry to ${url
|
|
492
|
+
}, the request took ${stop - start
|
|
495
493
|
}ms`,
|
|
496
494
|
args.data,
|
|
497
495
|
);
|
|
@@ -743,7 +741,7 @@ export class AppHttpProvider {
|
|
|
743
741
|
public static apiGet<T>(
|
|
744
742
|
apiMethodName: string,
|
|
745
743
|
data: object | string,
|
|
746
|
-
timeout: number = null,
|
|
744
|
+
timeout: number = null,
|
|
747
745
|
): Promise<T> {
|
|
748
746
|
return this.getJSON(
|
|
749
747
|
this.getApiUrl(
|
|
@@ -768,7 +766,7 @@ timeout: number = null,
|
|
|
768
766
|
public static privateApiGet<T>(
|
|
769
767
|
apiMethodName: string,
|
|
770
768
|
data: object | string,
|
|
771
|
-
timeout: number = null,
|
|
769
|
+
timeout: number = null,
|
|
772
770
|
): Promise<T> {
|
|
773
771
|
return this.getJSON(
|
|
774
772
|
this.getApiUrl(
|
|
@@ -843,7 +841,7 @@ timeout: number = null,
|
|
|
843
841
|
if (retVal != null && retVal.length > 0) {
|
|
844
842
|
return retVal;
|
|
845
843
|
}
|
|
846
|
-
} catch (e) {}
|
|
844
|
+
} catch (e) { }
|
|
847
845
|
}
|
|
848
846
|
}
|
|
849
847
|
}
|
|
@@ -856,8 +854,8 @@ timeout: number = null,
|
|
|
856
854
|
return this.enforceDomain;
|
|
857
855
|
}
|
|
858
856
|
|
|
859
|
-
if (PortalUtils && PortalUtils.INV_FORCE_DOMAIN != null) {
|
|
860
|
-
appDomain = PortalUtils.INV_FORCE_DOMAIN;
|
|
857
|
+
if (PortalUtils && (PortalUtils as any).INV_FORCE_DOMAIN != null) {
|
|
858
|
+
appDomain = (PortalUtils as any).INV_FORCE_DOMAIN;
|
|
861
859
|
}
|
|
862
860
|
|
|
863
861
|
if (appDomain == null) {
|
|
@@ -44,10 +44,10 @@ export abstract class PowerduckViewModelBase extends Vue {
|
|
|
44
44
|
*/
|
|
45
45
|
public async tryPostDataByArgs<TData, TArgs>(args: TryCallApiArgs<TData, TArgs>): Promise<TryPostApiResponse<TData>> {
|
|
46
46
|
const retVal = await this.tryCallApiByArgs(args, true);
|
|
47
|
-
if (retVal != null && retVal.ajaxErr != null) {
|
|
47
|
+
if (retVal != null && (retVal as any).ajaxErr != null) {
|
|
48
48
|
return {
|
|
49
49
|
data: null as any,
|
|
50
|
-
error: retVal.ajaxErr,
|
|
50
|
+
error: (retVal as any).ajaxErr,
|
|
51
51
|
result: TryCallApiResult.Error,
|
|
52
52
|
};
|
|
53
53
|
} else {
|
package/common/dialog-utils.ts
CHANGED
|
@@ -120,12 +120,9 @@ class DialogBuilder {
|
|
|
120
120
|
this.builder = '';
|
|
121
121
|
|
|
122
122
|
this.builder
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}"
|
|
126
|
-
this.labelId
|
|
127
|
-
}" data-bs-backdrop="true" data-bs-keyboard="true" class="modal fade${
|
|
128
|
-
args.cssClass ? ` ${args.cssClass}` : ''
|
|
123
|
+
+= `<div id="${this.id}" key="${this.id
|
|
124
|
+
}" tabindex="-1" role="dialog" aria-labelledby="${this.labelId
|
|
125
|
+
}" data-bs-backdrop="true" data-bs-keyboard="true" class="modal fade${args.cssClass ? ` ${args.cssClass}` : ''
|
|
129
126
|
}">`;
|
|
130
127
|
this.builder += ` <div role="document" class="modal-dialog${args.size != null ? ` ${args.size}` : ''}">`;
|
|
131
128
|
this.builder += ' <div class="modal-content">';
|
|
@@ -150,17 +147,15 @@ class DialogBuilder {
|
|
|
150
147
|
|
|
151
148
|
innerBuilder += ` <h5 id="${this.labelId}" class="modal-title">${this.args.title}</h5>`;
|
|
152
149
|
innerBuilder
|
|
153
|
-
|
|
150
|
+
+= ' <button type="button" data-dismiss="modal" data-bs-dismiss="modal" aria-label="Close" class="btn-close close"></button>';
|
|
154
151
|
innerBuilder += '</div>';
|
|
155
152
|
return innerBuilder;
|
|
156
153
|
}
|
|
157
154
|
|
|
158
155
|
private _getBody(): string {
|
|
159
156
|
return (
|
|
160
|
-
`<div class="modal-body${
|
|
161
|
-
|
|
162
|
-
}">${
|
|
163
|
-
this.args.message
|
|
157
|
+
`<div class="modal-body${this.args.fullHeight ? ' modal-full-height' : ''
|
|
158
|
+
}">${this.args.message
|
|
164
159
|
}</div>`
|
|
165
160
|
);
|
|
166
161
|
}
|
|
@@ -174,13 +169,11 @@ class DialogBuilder {
|
|
|
174
169
|
let textBuilder = btn.text;
|
|
175
170
|
if (btn.icon && btn.iconOnRight != true) {
|
|
176
171
|
textBuilder
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}"></i><span> </span></span>${
|
|
180
|
-
textBuilder}`;
|
|
172
|
+
= `<span class="btn-label"><i class="${btn.icon
|
|
173
|
+
}"></i><span> </span></span>${textBuilder}`;
|
|
181
174
|
} else if (btn.icon && btn.iconOnRight) {
|
|
182
175
|
textBuilder
|
|
183
|
-
|
|
176
|
+
+= `<span class="btn-label"><span> </span><i class="${btn.icon}"></i></span>`;
|
|
184
177
|
}
|
|
185
178
|
|
|
186
179
|
let classBuilder = btn.layout.toString();
|
|
@@ -193,14 +186,11 @@ class DialogBuilder {
|
|
|
193
186
|
}
|
|
194
187
|
|
|
195
188
|
innerBuilder
|
|
196
|
-
|
|
197
|
-
this.id
|
|
189
|
+
+= `<button id="${this.id
|
|
198
190
|
}-button-${i}`
|
|
199
191
|
+ `" type="button" `
|
|
200
|
-
+ ` class="${
|
|
201
|
-
|
|
202
|
-
}">${
|
|
203
|
-
textBuilder
|
|
192
|
+
+ ` class="${classBuilder
|
|
193
|
+
}">${textBuilder
|
|
204
194
|
}</button>`;
|
|
205
195
|
});
|
|
206
196
|
|
|
@@ -232,7 +222,7 @@ export class DialogUtils {
|
|
|
232
222
|
});
|
|
233
223
|
|
|
234
224
|
const modalContext = BootstrapModal.getOrCreateInstance(`#${builder.id}`);
|
|
235
|
-
const modalSelector = $(modalContext._element);
|
|
225
|
+
const modalSelector = $((modalContext as any)._element);
|
|
236
226
|
modalSelector
|
|
237
227
|
.on('shown.bs.modal', () => {
|
|
238
228
|
setTimeout(() => {
|
|
@@ -313,9 +303,9 @@ export class DialogUtils {
|
|
|
313
303
|
static showConfirmDialog(
|
|
314
304
|
titleHtml: string,
|
|
315
305
|
messageHtml: string,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
306
|
+
yesButton: string = PowerduckState.getResourceValue('yes'),
|
|
307
|
+
noButton: string = PowerduckState.getResourceValue('no'),
|
|
308
|
+
icon: DialogIcons = DialogIcons.Warning,
|
|
319
309
|
): Promise<DialogResult> {
|
|
320
310
|
const _self = this;
|
|
321
311
|
return new Promise((resolve, reject) => {
|
|
@@ -344,9 +334,9 @@ export class DialogUtils {
|
|
|
344
334
|
static showConfirmDialogEx(
|
|
345
335
|
titleHtml: string,
|
|
346
336
|
messageHtml: string,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
337
|
+
yesButton: string = PowerduckState.getResourceValue('yes'),
|
|
338
|
+
noButton: string = PowerduckState.getResourceValue('no'),
|
|
339
|
+
icon: DialogIcons = DialogIcons.Warning,
|
|
350
340
|
): Promise<AppDialogExResult<DialogResult>> {
|
|
351
341
|
const _self = this;
|
|
352
342
|
return new Promise((resolve, reject) => {
|
|
@@ -537,12 +527,10 @@ export class DialogUtils {
|
|
|
537
527
|
boxColor: null,
|
|
538
528
|
icon: DialogIcons.Question,
|
|
539
529
|
message:
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
(defaultValue || '').replace(/"/g, '"')
|
|
545
|
-
}"></div>`,
|
|
530
|
+
`${messageHtml
|
|
531
|
+
}<br><br><div class="form-group"><input id="${inputId
|
|
532
|
+
}" type="text" class="${PowerduckState.getFormControlCssClass()}" placeholder="${(defaultValue || '').replace(/"/g, '"')
|
|
533
|
+
}"></div>`,
|
|
546
534
|
title: titleHtml,
|
|
547
535
|
buttons: [
|
|
548
536
|
{
|
|
@@ -598,6 +586,6 @@ export class DialogUtils {
|
|
|
598
586
|
}
|
|
599
587
|
}
|
|
600
588
|
|
|
601
|
-
|
|
602
|
-
window.DialogUtils = DialogUtils;
|
|
589
|
+
(() => {
|
|
590
|
+
(window as any).DialogUtils = DialogUtils;
|
|
603
591
|
})();
|