@magic-xpa/angular 4.1000.0-dev4100.362 → 4.1000.0-dev4100.365
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/esm2020/index.mjs +2 -1
- package/esm2020/src/magic.core.module.mjs +8 -4
- package/esm2020/src/ui/pipes/time24.magic.pipe.mjs +34 -0
- package/fesm2015/magic-xpa-angular.mjs +39 -4
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +37 -4
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +3 -3
- package/src/magic.core.module.d.ts +8 -7
- package/src/ui/pipes/time24.magic.pipe.d.ts +10 -0
@@ -4270,6 +4270,36 @@ NonMagicControlDirective.ɵdir = i0.ɵɵdefineDirective({ type: NonMagicControlD
|
|
4270
4270
|
args: ['NonMagicControl']
|
4271
4271
|
}] }); })();
|
4272
4272
|
|
4273
|
+
class Time24MagicPipe {
|
4274
|
+
constructor(_task) {
|
4275
|
+
this._task = _task;
|
4276
|
+
}
|
4277
|
+
transform(value, controlId) {
|
4278
|
+
let mask = this._task.GetControlPictureMask(controlId).getMask();
|
4279
|
+
if (typeof value !== "undefined" && mask !== null) {
|
4280
|
+
const date = new Date(value);
|
4281
|
+
const hours = date.getHours().toString().padStart(2, '0');
|
4282
|
+
const minutes = date.getMinutes().toString().padStart(2, '0');
|
4283
|
+
const seconds = date.getSeconds().toString().padStart(2, '0');
|
4284
|
+
if (mask.length == 5) {
|
4285
|
+
return `${hours}:${minutes}`;
|
4286
|
+
}
|
4287
|
+
else if (mask.length > 5) {
|
4288
|
+
return `${hours}:${minutes}:${seconds}`;
|
4289
|
+
}
|
4290
|
+
}
|
4291
|
+
return value;
|
4292
|
+
}
|
4293
|
+
}
|
4294
|
+
Time24MagicPipe.ɵfac = function Time24MagicPipe_Factory(t) { return new (t || Time24MagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService, 16)); };
|
4295
|
+
Time24MagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicTime24", type: Time24MagicPipe, pure: true });
|
4296
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Time24MagicPipe, [{
|
4297
|
+
type: Pipe,
|
4298
|
+
args: [{
|
4299
|
+
name: 'magicTime24'
|
4300
|
+
}]
|
4301
|
+
}], function () { return [{ type: TaskMagicService }]; }, null); })();
|
4302
|
+
|
4273
4303
|
const decs = [
|
4274
4304
|
MagicDirective,
|
4275
4305
|
CheckboxMagicDirective,
|
@@ -4298,7 +4328,8 @@ const decs = [
|
|
4298
4328
|
RangeValidatorMagicDirective,
|
4299
4329
|
NonMagicControlDirective,
|
4300
4330
|
MagicFocusDirective,
|
4301
|
-
MagicViewContainerRef
|
4331
|
+
MagicViewContainerRef,
|
4332
|
+
Time24MagicPipe
|
4302
4333
|
];
|
4303
4334
|
class MagicModule {
|
4304
4335
|
}
|
@@ -4354,7 +4385,8 @@ MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMa
|
|
4354
4385
|
RangeValidatorMagicDirective,
|
4355
4386
|
NonMagicControlDirective,
|
4356
4387
|
MagicFocusDirective,
|
4357
|
-
MagicViewContainerRef
|
4388
|
+
MagicViewContainerRef,
|
4389
|
+
Time24MagicPipe], imports: [CommonModule,
|
4358
4390
|
FormsModule,
|
4359
4391
|
ReactiveFormsModule,
|
4360
4392
|
RouterModule,
|
@@ -4386,7 +4418,8 @@ MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMa
|
|
4386
4418
|
RangeValidatorMagicDirective,
|
4387
4419
|
NonMagicControlDirective,
|
4388
4420
|
MagicFocusDirective,
|
4389
|
-
MagicViewContainerRef,
|
4421
|
+
MagicViewContainerRef,
|
4422
|
+
Time24MagicPipe, MaskitoModule] }); })();
|
4390
4423
|
|
4391
4424
|
const MG_FORMATS = {
|
4392
4425
|
parse: { dateInput: { month: 'short', year: 'numeric', day: 'numeric' } },
|
@@ -4568,5 +4601,5 @@ class ModalFormDefinition {
|
|
4568
4601
|
}
|
4569
4602
|
}
|
4570
4603
|
|
4571
|
-
export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, COLOR_FILE_NAME, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_BG_COLOR, MAGIC_DEFAULT_VALUE_ACCESSOR, MAGIC_FG_COLOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicColorService, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicLazyLoaderService, MagicModule, MagicOverlayContainer, MagicOverlayContainerWrapper, MagicServices, MagicShellComponent, MagicViewContainerRef, MgDateAdapter, MgDateFormatter, MgformatMagicDirective, ModalFormDefinition, NoControlMagicDirective, NonMagicControlDirective, OverlayContainerMagicProvider, OverlayWindowService, RangeValidatorMagicDirective, Records, RouteCommand, RouterCommandsMagicService, RouterContainerMagicComponent, RowMagicDirective, StylesMapManager, SubformMagicComponent, SubformMagicService, TableMagicService, TaskBaseMagicComponent, TaskMagicService, TimeMagicPipe, TitleMagicService, basicMagicProviders, confirmationBox, magicProviders, matDateProviders, utils };
|
4604
|
+
export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, COLOR_FILE_NAME, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_BG_COLOR, MAGIC_DEFAULT_VALUE_ACCESSOR, MAGIC_FG_COLOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicColorService, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicLazyLoaderService, MagicModule, MagicOverlayContainer, MagicOverlayContainerWrapper, MagicServices, MagicShellComponent, MagicViewContainerRef, MgDateAdapter, MgDateFormatter, MgformatMagicDirective, ModalFormDefinition, NoControlMagicDirective, NonMagicControlDirective, OverlayContainerMagicProvider, OverlayWindowService, RangeValidatorMagicDirective, Records, RouteCommand, RouterCommandsMagicService, RouterContainerMagicComponent, RowMagicDirective, StylesMapManager, SubformMagicComponent, SubformMagicService, TableMagicService, TaskBaseMagicComponent, TaskMagicService, Time24MagicPipe, TimeMagicPipe, TitleMagicService, basicMagicProviders, confirmationBox, magicProviders, matDateProviders, utils };
|
4572
4605
|
//# sourceMappingURL=magic-xpa-angular.mjs.map
|