@magic-xpa/angular 4.1100.0-dev4110.106 → 4.1100.0-dev4110.107
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/README.md +5 -5
- package/esm2020/index.mjs +59 -2
- package/esm2020/src/controls.metadata.model.mjs +180 -0
- package/esm2020/src/interfaces/sub-form-definition.iterface.mjs +2 -0
- package/esm2020/src/magic.core.module.mjs +160 -0
- package/esm2020/src/services/ISubformMagicService.mjs +2 -0
- package/esm2020/src/services/OverlayWindowService.mjs +236 -0
- package/esm2020/src/services/StylesMapManager.mjs +28 -0
- package/esm2020/src/services/accessor.magic.service.mjs +356 -0
- package/esm2020/src/services/commands-collector.magic.service.mjs +46 -0
- package/esm2020/src/services/component-list.magic.service.mjs +46 -0
- package/esm2020/src/services/confirmation.components.magic.provider.mjs +21 -0
- package/esm2020/src/services/engine.magic.service.mjs +82 -0
- package/esm2020/src/services/exit.magic.service.mjs +13 -0
- package/esm2020/src/services/magic-color.service.mjs +99 -0
- package/esm2020/src/services/magic.lazy.loader.service.mjs +16 -0
- package/esm2020/src/services/magic.providers.mjs +25 -0
- package/esm2020/src/services/magic.services.mjs +31 -0
- package/esm2020/src/services/mg-date-adapter.mjs +109 -0
- package/esm2020/src/services/overlay.conainer.magic.provider.mjs +14 -0
- package/esm2020/src/services/router-commands.magic.service.mjs +28 -0
- package/esm2020/src/services/subform.magic.service.mjs +184 -0
- package/esm2020/src/services/table.magic.service.mjs +77 -0
- package/esm2020/src/services/task.magics.service.mjs +624 -0
- package/esm2020/src/services/title.magic.service.mjs +18 -0
- package/esm2020/src/ui/GuiInteractiveExecutor.mjs +105 -0
- package/esm2020/src/ui/components/base-magic-alert.component.mjs +23 -0
- package/esm2020/src/ui/components/base-magic-confirm.component.mjs +23 -0
- package/esm2020/src/ui/components/magic-alert.component.mjs +35 -0
- package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +41 -0
- package/esm2020/src/ui/directives/NonMagicControlDirective.mjs +49 -0
- package/esm2020/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.mjs +28 -0
- package/esm2020/src/ui/directives/magic/checkbox.magic.directive.mjs +28 -0
- package/esm2020/src/ui/directives/magic/combobox.magic.directive.mjs +36 -0
- package/esm2020/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.mjs +27 -0
- package/esm2020/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.mjs +52 -0
- package/esm2020/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.mjs +32 -0
- package/esm2020/src/ui/directives/magic/input.noformcontrol.magic.directive.mjs +27 -0
- package/esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs +193 -0
- package/esm2020/src/ui/directives/magic/row.magic.directive.mjs +58 -0
- package/esm2020/src/ui/directives/magic-focus.directive.mjs +19 -0
- package/esm2020/src/ui/directives/magic.directive.mjs +215 -0
- package/esm2020/src/ui/directives/magicViewContainerRef.directive.mjs +19 -0
- package/esm2020/src/ui/directives/mgformat.magic.directive.mjs +408 -0
- package/esm2020/src/ui/directives/range-validator.magic.directive.mjs +58 -0
- package/esm2020/src/ui/magic-confirmationBox.mjs +42 -0
- package/esm2020/src/ui/magic-modal/base-magic-overlay-container.mjs +22 -0
- package/esm2020/src/ui/magic-modal/magic-modal-form.mjs +8 -0
- package/esm2020/src/ui/magic-modal/magic-modal-interface.mjs +2 -0
- package/esm2020/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +121 -0
- package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +159 -0
- package/esm2020/src/ui/magic-root.component.mjs +203 -0
- package/esm2020/src/ui/mgerror.magic.component.mjs +119 -0
- package/esm2020/src/ui/pipes/date.magic.pipe.mjs +105 -0
- package/esm2020/src/ui/pipes/time.magic.pipe.mjs +51 -0
- package/esm2020/src/ui/pipes/time24.magic.pipe.mjs +34 -0
- package/esm2020/src/ui/router-container.magic.component.mjs +108 -0
- package/esm2020/src/ui/subform.magic.component.mjs +52 -0
- package/esm2020/src/ui/task-base.magic.component.mjs +86 -0
- package/esm2020/src/ui/utils.mjs +54 -0
- package/fesm2015/magic-xpa-angular.mjs +4863 -0
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +4681 -0
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/index.d.ts +58 -1
- package/package.json +3 -3
- package/src/controls.metadata.model.d.ts +62 -0
- package/src/interfaces/sub-form-definition.iterface.d.ts +12 -0
- package/src/magic.core.module.d.ts +41 -0
- package/src/services/ISubformMagicService.d.ts +4 -0
- package/src/services/OverlayWindowService.d.ts +31 -0
- package/src/services/StylesMapManager.d.ts +5 -0
- package/src/services/accessor.magic.service.d.ts +69 -0
- package/src/services/commands-collector.magic.service.d.ts +15 -0
- package/src/services/component-list.magic.service.d.ts +23 -0
- package/src/services/confirmation.components.magic.provider.d.ts +8 -0
- package/src/services/engine.magic.service.d.ts +27 -0
- package/src/services/exit.magic.service.d.ts +6 -0
- package/src/services/magic-color.service.d.ts +19 -0
- package/src/services/magic.lazy.loader.service.d.ts +6 -0
- package/src/services/magic.providers.d.ts +107 -0
- package/src/services/magic.services.d.ts +16 -0
- package/src/services/mg-date-adapter.d.ts +40 -0
- package/src/services/overlay.conainer.magic.provider.d.ts +7 -0
- package/src/services/router-commands.magic.service.d.ts +17 -0
- package/src/services/subform.magic.service.d.ts +43 -0
- package/src/services/table.magic.service.d.ts +30 -0
- package/src/services/task.magics.service.d.ts +100 -0
- package/src/services/title.magic.service.d.ts +9 -0
- package/src/ui/GuiInteractiveExecutor.d.ts +22 -0
- package/src/ui/components/base-magic-alert.component.d.ts +10 -0
- package/src/ui/components/base-magic-confirm.component.d.ts +10 -0
- package/src/ui/components/magic-alert.component.d.ts +6 -0
- package/src/ui/components/magic-confirmation-box.component.d.ts +6 -0
- package/src/ui/directives/NonMagicControlDirective.d.ts +26 -0
- package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +9 -0
- package/src/ui/directives/magic/checkbox.magic.directive.d.ts +9 -0
- package/src/ui/directives/magic/combobox.magic.directive.d.ts +10 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +7 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +17 -0
- package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +7 -0
- package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +9 -0
- package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +18 -0
- package/src/ui/directives/magic/row.magic.directive.d.ts +17 -0
- package/src/ui/directives/magic-focus.directive.d.ts +9 -0
- package/src/ui/directives/magic.directive.d.ts +44 -0
- package/src/ui/directives/magicViewContainerRef.directive.d.ts +8 -0
- package/src/ui/directives/mgformat.magic.directive.d.ts +31 -0
- package/src/ui/directives/range-validator.magic.directive.d.ts +17 -0
- package/src/ui/magic-confirmationBox.d.ts +6 -0
- package/src/ui/magic-modal/base-magic-overlay-container.d.ts +5 -0
- package/src/ui/magic-modal/magic-modal-form.d.ts +5 -0
- package/src/ui/magic-modal/magic-modal-interface.d.ts +10 -0
- package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +31 -0
- package/src/ui/magic-modal/magic-overlay-container.d.ts +25 -0
- package/src/ui/magic-root.component.d.ts +40 -0
- package/src/ui/mgerror.magic.component.d.ts +20 -0
- package/src/ui/pipes/date.magic.pipe.d.ts +17 -0
- package/src/ui/pipes/time.magic.pipe.d.ts +11 -0
- package/src/ui/pipes/time24.magic.pipe.d.ts +10 -0
- package/src/ui/router-container.magic.component.d.ts +30 -0
- package/src/ui/subform.magic.component.d.ts +16 -0
- package/src/ui/task-base.magic.component.d.ts +34 -0
- package/src/ui/utils.d.ts +9 -0
@@ -0,0 +1,236 @@
|
|
1
|
+
import { ComponentFactoryResolver, Injectable, Injector, Compiler } from "@angular/core";
|
2
|
+
import { ComponentListMagicService } from "./component-list.magic.service";
|
3
|
+
import { EngineMagicService } from "./engine.magic.service";
|
4
|
+
import { getGuiEventObj } from "@magic-xpa/engine";
|
5
|
+
import { OverlayContainerMagicProvider } from "./overlay.conainer.magic.provider";
|
6
|
+
import { MagicOverlayContainerWrapper } from "../ui/magic-modal/magic-overlay-container-wrapper";
|
7
|
+
import { ConfirmationComponentsMagicProvider } from "./confirmation.components.magic.provider";
|
8
|
+
import { OverlayType, Styles } from "@magic-xpa/gui";
|
9
|
+
import { confirmationBox } from "../ui/magic-confirmationBox";
|
10
|
+
import { isNullOrUndefined } from "@magic-xpa/mscorelib";
|
11
|
+
import { MagicLazyLoaderService } from "./magic.lazy.loader.service";
|
12
|
+
import * as i0 from "@angular/core";
|
13
|
+
import * as i1 from "./component-list.magic.service";
|
14
|
+
import * as i2 from "./engine.magic.service";
|
15
|
+
import * as i3 from "./magic.lazy.loader.service";
|
16
|
+
import * as i4 from "./overlay.conainer.magic.provider";
|
17
|
+
import * as i5 from "./confirmation.components.magic.provider";
|
18
|
+
export class OverlayWindowService {
|
19
|
+
constructor(componentFactoryResolver, componentList, engineMagicService, magicLazyModuleLoader, injector, compiler, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
|
20
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
21
|
+
this.componentList = componentList;
|
22
|
+
this.engineMagicService = engineMagicService;
|
23
|
+
this.magicLazyModuleLoader = magicLazyModuleLoader;
|
24
|
+
this.injector = injector;
|
25
|
+
this.compiler = compiler;
|
26
|
+
this.overlayContainerMagicProvider = overlayContainerMagicProvider;
|
27
|
+
this.confirmationComponentsMagicProvider = confirmationComponentsMagicProvider;
|
28
|
+
this.overlayWindowFocusManager = null;
|
29
|
+
this.changeDetectorRef = null;
|
30
|
+
}
|
31
|
+
init(overlayWindowsContainerViewRef, rootMagicElement, changeDetectorRef) {
|
32
|
+
this.overlayWindowsContainerViewRef = overlayWindowsContainerViewRef;
|
33
|
+
this.overlayWindowFocusManager = new OverlayWindowFocusManager(rootMagicElement);
|
34
|
+
this.changeDetectorRef = changeDetectorRef;
|
35
|
+
}
|
36
|
+
loadAndOpenModule(formName, taskId, taskDescription) {
|
37
|
+
let moduleRef = this.componentList.getModuleRef(formName);
|
38
|
+
if (moduleRef == null) {
|
39
|
+
let lazyLoadModule = this.componentList.getLazyLoadModuleData(formName);
|
40
|
+
if (lazyLoadModule != null) {
|
41
|
+
let moduleName = lazyLoadModule.moduleName.replace("Magic", "");
|
42
|
+
moduleName = moduleName.replace("Module", "");
|
43
|
+
this.magicLazyModuleLoader.Load(moduleName).then(m => {
|
44
|
+
const compiled = this.compiler.compileModuleAndAllComponentsSync(m[lazyLoadModule.moduleName]);
|
45
|
+
moduleRef = compiled.ngModuleFactory.create(this.injector);
|
46
|
+
this.open(formName, taskId, taskDescription);
|
47
|
+
this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);
|
48
|
+
});
|
49
|
+
}
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
this.open(formName, taskId, taskDescription);
|
53
|
+
this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
open(formName, taskId, taskDescription) {
|
57
|
+
let comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null : this.componentList.getComponent(formName);
|
58
|
+
let parameters = { taskIdParam: taskId, taskDescription: taskDescription };
|
59
|
+
let componentRef = this.createModalComponent({ MagicFormName: formName, ModalComp: comp, ModalCompParameters: parameters }, this.overlayContainerMagicProvider.getComponent(), OverlayType.Overlay);
|
60
|
+
componentRef.instance.onClose.subscribe(() => {
|
61
|
+
let guiEvent = getGuiEventObj("close", null, 0);
|
62
|
+
guiEvent.TaskID = taskId;
|
63
|
+
this.engineMagicService.insertEvent(guiEvent);
|
64
|
+
});
|
65
|
+
this.changeDetectorRef.detectChanges();
|
66
|
+
}
|
67
|
+
close(commandStr) {
|
68
|
+
this.overlayWindowsContainerViewRef.remove();
|
69
|
+
this.overlayWindowFocusManager.popDialog();
|
70
|
+
let guiEvent1 = getGuiEventObj("dispose", null, 0);
|
71
|
+
guiEvent1.TaskID = commandStr;
|
72
|
+
this.engineMagicService.insertEvent(guiEvent1);
|
73
|
+
}
|
74
|
+
openConfirmationBox(title, msg, style) {
|
75
|
+
if (this.confirmationComponentsMagicProvider.showDefaultConfirmations()) {
|
76
|
+
let res = confirmationBox.showConfirmationBox(title, msg, style);
|
77
|
+
this.finishConfirmation(style, res);
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
let comp = confirmationBox.isConfirmBox(style) ? this.confirmationComponentsMagicProvider.getConfirmtionComponent() : this.confirmationComponentsMagicProvider.getAlertComponent();
|
81
|
+
let overlayType = confirmationBox.isConfirmBox(style) ? OverlayType.ConfirmationBox : OverlayType.Alert;
|
82
|
+
let componentRef = this.createModalComponent({ title: title, message: msg }, comp, overlayType);
|
83
|
+
componentRef.instance.onClose.subscribe((res) => {
|
84
|
+
this.overlayWindowsContainerViewRef.remove();
|
85
|
+
this.overlayWindowFocusManager.popDialog();
|
86
|
+
this.finishConfirmation(style, res);
|
87
|
+
});
|
88
|
+
}
|
89
|
+
}
|
90
|
+
finishConfirmation(style, result) {
|
91
|
+
let guiEvent = getGuiEventObj("confirmationClosed", null, 0);
|
92
|
+
guiEvent.keyCode = confirmationBox.convertToExcpectedResultBox(style, result);
|
93
|
+
this.engineMagicService.insertEvent(guiEvent);
|
94
|
+
}
|
95
|
+
createModalComponent(parameters, component, overlayType) {
|
96
|
+
let componentRef;
|
97
|
+
let magicModalContainerParameters = {
|
98
|
+
Component: component,
|
99
|
+
Parameters: parameters,
|
100
|
+
OverlayTypeParam: overlayType
|
101
|
+
};
|
102
|
+
const factory = this.componentFactoryResolver.resolveComponentFactory(MagicOverlayContainerWrapper);
|
103
|
+
let viewCRef = this.overlayWindowsContainerViewRef;
|
104
|
+
componentRef = viewCRef.createComponent(factory);
|
105
|
+
Object.assign(componentRef.instance, magicModalContainerParameters);
|
106
|
+
this.overlayWindowFocusManager.pushDialog(componentRef.instance.GetRootElement());
|
107
|
+
componentRef.instance.DetectChanges();
|
108
|
+
return componentRef;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i1.ComponentListMagicService), i0.ɵɵinject(i2.EngineMagicService), i0.ɵɵinject(i3.MagicLazyLoaderService), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i0.Compiler), i0.ɵɵinject(i4.OverlayContainerMagicProvider), i0.ɵɵinject(i5.ConfirmationComponentsMagicProvider)); };
|
112
|
+
OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac, providedIn: 'root' });
|
113
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayWindowService, [{
|
114
|
+
type: Injectable,
|
115
|
+
args: [{
|
116
|
+
providedIn: 'root'
|
117
|
+
}]
|
118
|
+
}], function () { return [{ type: i0.ComponentFactoryResolver }, { type: i1.ComponentListMagicService }, { type: i2.EngineMagicService }, { type: i3.MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.Compiler }, { type: i4.OverlayContainerMagicProvider }, { type: i5.ConfirmationComponentsMagicProvider }]; }, null); })();
|
119
|
+
class OverlayWindowFocusManager {
|
120
|
+
constructor(rootMagicElement) {
|
121
|
+
this.rootMagicElement = null;
|
122
|
+
this.openDialogList = new Array(0);
|
123
|
+
this.ignoreUtilFocusChanges = false;
|
124
|
+
this.lastFocus = null;
|
125
|
+
this.focusListener = null;
|
126
|
+
this.rootMagicElement = rootMagicElement;
|
127
|
+
}
|
128
|
+
pushDialog(rootElement) {
|
129
|
+
if (this.openDialogList.length === 0) {
|
130
|
+
this.focusListener = this.trapFocus.bind(this);
|
131
|
+
document.addEventListener('focus', this.focusListener, true);
|
132
|
+
}
|
133
|
+
this.openDialogList.push(new DialogInfo(rootElement, (document.activeElement instanceof HTMLElement ? document.activeElement : null)));
|
134
|
+
}
|
135
|
+
popDialog() {
|
136
|
+
const dialogInfo = this.openDialogList.pop();
|
137
|
+
this.attemptFocus(dialogInfo.FocusElementOnClose);
|
138
|
+
if (this.openDialogList.length === 0) {
|
139
|
+
document.removeEventListener('focus', this.focusListener, true);
|
140
|
+
this.focusListener = null;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
trapFocus(event) {
|
144
|
+
if (this.ignoreUtilFocusChanges) {
|
145
|
+
return;
|
146
|
+
}
|
147
|
+
if (this.openDialogList.length > 0) {
|
148
|
+
var currentDialog = this.openDialogList[this.openDialogList.length - 1].RootElement;
|
149
|
+
if (currentDialog.contains(event.target)) {
|
150
|
+
this.lastFocus = event.target;
|
151
|
+
}
|
152
|
+
else {
|
153
|
+
if (this.rootMagicElement.contains(event.target)) {
|
154
|
+
this.focusFirstDescendant(currentDialog);
|
155
|
+
if (this.lastFocus == document.activeElement) {
|
156
|
+
this.focusLastDescendant(currentDialog);
|
157
|
+
}
|
158
|
+
}
|
159
|
+
this.lastFocus = document.activeElement;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
focusFirstDescendant(element) {
|
164
|
+
for (var i = 0; i < element.childNodes.length; i++) {
|
165
|
+
var child = element.childNodes[i];
|
166
|
+
if (this.attemptFocus(child) ||
|
167
|
+
this.focusFirstDescendant(child)) {
|
168
|
+
return true;
|
169
|
+
}
|
170
|
+
}
|
171
|
+
return false;
|
172
|
+
}
|
173
|
+
;
|
174
|
+
focusLastDescendant(element) {
|
175
|
+
for (var i = element.childNodes.length - 1; i >= 0; i--) {
|
176
|
+
var child = element.childNodes[i];
|
177
|
+
if (this.attemptFocus(child) ||
|
178
|
+
this.focusLastDescendant(child)) {
|
179
|
+
return true;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
return false;
|
183
|
+
}
|
184
|
+
;
|
185
|
+
attemptFocus(element) {
|
186
|
+
if (!this.isFocusable(element)) {
|
187
|
+
return false;
|
188
|
+
}
|
189
|
+
this.ignoreUtilFocusChanges = true;
|
190
|
+
try {
|
191
|
+
element.focus();
|
192
|
+
}
|
193
|
+
catch (e) {
|
194
|
+
}
|
195
|
+
this.ignoreUtilFocusChanges = false;
|
196
|
+
return (document.activeElement === element);
|
197
|
+
}
|
198
|
+
;
|
199
|
+
isFocusable(element) {
|
200
|
+
if (isNullOrUndefined(element))
|
201
|
+
return false;
|
202
|
+
if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) {
|
203
|
+
return true;
|
204
|
+
}
|
205
|
+
else if (element.tabIndex < 0)
|
206
|
+
return false;
|
207
|
+
if (element.disabled) {
|
208
|
+
return false;
|
209
|
+
}
|
210
|
+
switch (element.nodeName) {
|
211
|
+
case 'A':
|
212
|
+
return !!element.href && element.rel != 'ignore';
|
213
|
+
case 'INPUT':
|
214
|
+
return element.type != 'hidden' && element.type != 'file';
|
215
|
+
case 'BUTTON':
|
216
|
+
case 'SELECT':
|
217
|
+
case 'TEXTAREA':
|
218
|
+
return true;
|
219
|
+
default:
|
220
|
+
return false;
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
class DialogInfo {
|
225
|
+
constructor(rootElement, focusElementOnClose) {
|
226
|
+
this.rootElement = rootElement;
|
227
|
+
this.focusElementOnClose = focusElementOnClose;
|
228
|
+
}
|
229
|
+
get RootElement() {
|
230
|
+
return this.rootElement;
|
231
|
+
}
|
232
|
+
get FocusElementOnClose() {
|
233
|
+
return this.focusElementOnClose;
|
234
|
+
}
|
235
|
+
}
|
236
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3ZlcmxheVdpbmRvd1NlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyL3NyYy9zZXJ2aWNlcy9PdmVybGF5V2luZG93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GUgIT0gJ2hpZGRlbicgJiYgZWxlbWVudC50eXBlICE9ICdmaWxlJztcclxuICAgICAgY2FzZSAnQlVUVE9OJzpcclxuICAgICAgY2FzZSAnU0VMRUNUJzpcclxuICAgICAgY2FzZSAnVEVYVEFSRUEnOlxyXG4gICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICBkZWZhdWx0OlxyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuXHJcbmNsYXNzIERpYWxvZ0luZm9cclxue1xyXG4gIHByaXZhdGUgcm9vdEVsZW1lbnQ6IEhUTUxFbGVtZW50O1xyXG4gIHByaXZhdGUgZm9jdXNFbGVtZW50T25DbG9zZTogSFRNTEVsZW1lbnQ7XHJcblxyXG4gIGNvbnN0cnVjdG9yKHJvb3RFbGVtZW50OiBIVE1MRWxlbWVudCwgZm9jdXNFbGVtZW50T25DbG9zZTogSFRNTEVsZW1lbnQpIHtcclxuICAgIHRoaXMucm9vdEVsZW1lbnQgPSByb290RWxlbWVudDtcclxuICAgIHRoaXMuZm9jdXNFbGVtZW50T25DbG9zZSA9IGZvY3VzRWxlbWVudE9uQ2xvc2U7XHJcbiAgfVxyXG5cclxuICBnZXQgUm9vdEVsZW1lbnQoKTogSFRNTEVsZW1lbnQge1xyXG4gICAgcmV0dXJuIHRoaXMucm9vdEVsZW1lbnQ7XHJcbiAgfVxyXG5cclxuICBnZXQgRm9jdXNFbGVtZW50T25DbG9zZSgpOiBIVE1MRWxlbWVudCB7XHJcbiAgICByZXR1cm4gdGhpcy5mb2N1c0VsZW1lbnRPbkNsb3NlO1xyXG4gIH1cclxufVxyXG5cclxuXHJcbiJdfQ==
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { MagicProperties } from "@magic-xpa/utils";
|
2
|
+
import { NString, isNullOrUndefined } from "@magic-xpa/mscorelib";
|
3
|
+
export class StylesMapManager {
|
4
|
+
static magicValueGetStyle(styleName, magicValue) {
|
5
|
+
let style = "";
|
6
|
+
if (!isNullOrUndefined(magicValue)) {
|
7
|
+
let value = StylesMapManager.StylesMap.get(styleName);
|
8
|
+
if (value.constructor === Map) {
|
9
|
+
style = value.get(magicValue);
|
10
|
+
}
|
11
|
+
else if (value.constructor === String) {
|
12
|
+
style = NString.Format(value.toString(), magicValue);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
return style;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
StylesMapManager.StylesMap = new Map([
|
19
|
+
[MagicProperties.LineDivider, new Map([[true, "solid"], [false, "hidden"]])],
|
20
|
+
[MagicProperties.ImageFile, "url('\{0}\')"],
|
21
|
+
[MagicProperties.Wallpaper, "url('\{0}\')"]
|
22
|
+
]);
|
23
|
+
StylesMapManager.MagicPropertyToHtmlAttributeMap = new Map([
|
24
|
+
[MagicProperties.LineDivider, "border-bottom-style"],
|
25
|
+
[MagicProperties.ImageFile, "background-image"],
|
26
|
+
[MagicProperties.Wallpaper, "background-image"]
|
27
|
+
]);
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3R5bGVzTWFwTWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXIvc3JjL3NlcnZpY2VzL1N0eWxlc01hcE1hbmFnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLGtCQUFrQixDQUFBO0FBQ2hELE9BQU8sRUFBQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQTtBQUsvRCxNQUFNLE9BQU8sZ0JBQWdCO0lBaUIzQixNQUFNLENBQUMsa0JBQWtCLENBQUMsU0FBaUIsRUFBRSxVQUFlO1FBQzFELElBQUksS0FBSyxHQUFXLEVBQUUsQ0FBQztRQUV2QixJQUFJLENBQUMs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