@memberjunction/ng-ui-components 0.0.1 → 5.24.0
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/dist/lib/accordion/accordion.component.d.ts +58 -0
- package/dist/lib/accordion/accordion.component.d.ts.map +1 -0
- package/dist/lib/accordion/accordion.component.js +163 -0
- package/dist/lib/accordion/accordion.component.js.map +1 -0
- package/dist/lib/accordion/accordion.scss +45 -0
- package/dist/lib/button/button.directive.d.ts +45 -0
- package/dist/lib/button/button.directive.d.ts.map +1 -0
- package/dist/lib/button/button.directive.js +114 -0
- package/dist/lib/button/button.directive.js.map +1 -0
- package/dist/lib/button/button.scss +250 -0
- package/dist/lib/calendar/calendar-utils.d.ts +16 -0
- package/dist/lib/calendar/calendar-utils.d.ts.map +1 -0
- package/dist/lib/calendar/calendar-utils.js +41 -0
- package/dist/lib/calendar/calendar-utils.js.map +1 -0
- package/dist/lib/combobox/combobox.component.d.ts +83 -0
- package/dist/lib/combobox/combobox.component.d.ts.map +1 -0
- package/dist/lib/combobox/combobox.component.js +483 -0
- package/dist/lib/combobox/combobox.component.js.map +1 -0
- package/dist/lib/combobox/combobox.scss +86 -0
- package/dist/lib/datepicker/datepicker.component.d.ts +50 -0
- package/dist/lib/datepicker/datepicker.component.d.ts.map +1 -0
- package/dist/lib/datepicker/datepicker.component.js +279 -0
- package/dist/lib/datepicker/datepicker.component.js.map +1 -0
- package/dist/lib/datepicker/datepicker.scss +60 -0
- package/dist/lib/dialog/dialog.component.d.ts +84 -0
- package/dist/lib/dialog/dialog.component.d.ts.map +1 -0
- package/dist/lib/dialog/dialog.component.js +285 -0
- package/dist/lib/dialog/dialog.component.js.map +1 -0
- package/dist/lib/dialog/dialog.scss +134 -0
- package/dist/lib/dialog/dialog.service.d.ts +114 -0
- package/dist/lib/dialog/dialog.service.d.ts.map +1 -0
- package/dist/lib/dialog/dialog.service.js +282 -0
- package/dist/lib/dialog/dialog.service.js.map +1 -0
- package/dist/lib/dropdown/dropdown.component.d.ts +75 -0
- package/dist/lib/dropdown/dropdown.component.d.ts.map +1 -0
- package/dist/lib/dropdown/dropdown.component.js +445 -0
- package/dist/lib/dropdown/dropdown.component.js.map +1 -0
- package/dist/lib/dropdown/dropdown.scss +68 -0
- package/dist/lib/input/chip.scss +64 -0
- package/dist/lib/input/input-switch-progress.scss +57 -0
- package/dist/lib/input/input.scss +77 -0
- package/dist/lib/numeric-input/numeric-input.component.d.ts +31 -0
- package/dist/lib/numeric-input/numeric-input.component.d.ts.map +1 -0
- package/dist/lib/numeric-input/numeric-input.component.js +103 -0
- package/dist/lib/numeric-input/numeric-input.component.js.map +1 -0
- package/dist/lib/progress-bar/progress-bar.component.d.ts +14 -0
- package/dist/lib/progress-bar/progress-bar.component.d.ts.map +1 -0
- package/dist/lib/progress-bar/progress-bar.component.js +62 -0
- package/dist/lib/progress-bar/progress-bar.component.js.map +1 -0
- package/dist/lib/splitter/splitter.component.d.ts +23 -0
- package/dist/lib/splitter/splitter.component.d.ts.map +1 -0
- package/dist/lib/splitter/splitter.component.js +24 -0
- package/dist/lib/splitter/splitter.component.js.map +1 -0
- package/dist/lib/splitter/splitter.scss +29 -0
- package/dist/lib/switch/switch.component.d.ts +24 -0
- package/dist/lib/switch/switch.component.d.ts.map +1 -0
- package/dist/lib/switch/switch.component.js +82 -0
- package/dist/lib/switch/switch.component.js.map +1 -0
- package/dist/lib/window/window.component.d.ts +115 -0
- package/dist/lib/window/window.component.d.ts.map +1 -0
- package/dist/lib/window/window.component.js +502 -0
- package/dist/lib/window/window.component.js.map +1 -0
- package/dist/lib/window/window.scss +97 -0
- package/dist/public-api.d.ts +14 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +16 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +39 -6
- package/README.md +0 -45
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MJ Switch + Progress Bar Styles
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* ========== Switch ========== */
|
|
6
|
+
.mj-switch {
|
|
7
|
+
display: inline-flex; align-items: center; gap: 8px; padding: 4px;
|
|
8
|
+
background: none; border: none; cursor: pointer;
|
|
9
|
+
font-family: var(--mj-font-family); font-size: var(--mj-text-sm);
|
|
10
|
+
color: var(--mj-text-primary); min-height: 44px;
|
|
11
|
+
&:focus-visible { outline: none; .mj-switch-track { box-shadow: var(--mj-focus-ring); } }
|
|
12
|
+
}
|
|
13
|
+
.mj-switch-track {
|
|
14
|
+
position: relative; width: 44px; height: 24px;
|
|
15
|
+
background: var(--mj-border-strong); border-radius: var(--mj-radius-full);
|
|
16
|
+
transition: background var(--mj-transition-base); flex-shrink: 0;
|
|
17
|
+
}
|
|
18
|
+
.mj-switch-thumb {
|
|
19
|
+
position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
|
|
20
|
+
background: var(--mj-bg-surface); border-radius: var(--mj-radius-full);
|
|
21
|
+
transition: transform var(--mj-transition-base); box-shadow: var(--mj-shadow-sm);
|
|
22
|
+
}
|
|
23
|
+
.mj-switch--on .mj-switch-track { background: var(--mj-brand-primary); }
|
|
24
|
+
.mj-switch--on .mj-switch-thumb { transform: translateX(20px); }
|
|
25
|
+
.mj-switch--disabled { opacity: 0.5; cursor: not-allowed; }
|
|
26
|
+
.mj-switch-label { color: var(--mj-text-secondary); }
|
|
27
|
+
|
|
28
|
+
/* ========== Progress Bar ========== */
|
|
29
|
+
.mj-progress-bar-host { display: block; width: 100%; }
|
|
30
|
+
progress.mj-progress-bar {
|
|
31
|
+
display: block; width: 100%; height: 8px; border: none;
|
|
32
|
+
border-radius: var(--mj-radius-full); overflow: hidden; appearance: none; -webkit-appearance: none;
|
|
33
|
+
&::-webkit-progress-bar { background: var(--mj-bg-surface-sunken); border-radius: var(--mj-radius-full); }
|
|
34
|
+
&::-webkit-progress-value { background: var(--mj-brand-primary); border-radius: var(--mj-radius-full); transition: width var(--mj-transition-base); }
|
|
35
|
+
&::-moz-progress-bar { background: var(--mj-brand-primary); border-radius: var(--mj-radius-full); }
|
|
36
|
+
}
|
|
37
|
+
div.mj-progress-bar--infinite {
|
|
38
|
+
width: 100%; height: 8px; background: var(--mj-bg-surface-sunken);
|
|
39
|
+
border-radius: var(--mj-radius-full); overflow: hidden; position: relative;
|
|
40
|
+
}
|
|
41
|
+
.mj-progress-bar-indeterminate {
|
|
42
|
+
position: absolute; top: 0; left: 0; height: 100%; width: 30%;
|
|
43
|
+
background: var(--mj-brand-primary); border-radius: var(--mj-radius-full);
|
|
44
|
+
animation: mj-progress-indeterminate 1.5s infinite ease-in-out;
|
|
45
|
+
}
|
|
46
|
+
@keyframes mj-progress-indeterminate { 0% { left: -30%; } 100% { left: 100%; } }
|
|
47
|
+
|
|
48
|
+
/* ========== Numeric Input ========== */
|
|
49
|
+
.mj-numeric-input {
|
|
50
|
+
-moz-appearance: textfield;
|
|
51
|
+
&::-webkit-inner-spin-button, &::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (prefers-reduced-motion: reduce) {
|
|
55
|
+
.mj-progress-bar-indeterminate { animation: none; left: 0; width: 100%; opacity: 0.5; }
|
|
56
|
+
.mj-switch-thumb { transition: none; }
|
|
57
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MJ Form Input Styles
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent styling for native form elements replacing Kendo inputs.
|
|
5
|
+
* - .mj-input — text inputs (replaces kendo-textbox / kendoTextBox)
|
|
6
|
+
* - .mj-textarea — textareas (replaces kendoTextArea)
|
|
7
|
+
* - .mj-checkbox — styled checkbox (replaces kendoCheckBox)
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.mj-input,
|
|
11
|
+
.mj-textarea {
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
padding: 8px 12px;
|
|
15
|
+
font-family: var(--mj-font-family);
|
|
16
|
+
font-size: var(--mj-text-sm);
|
|
17
|
+
line-height: 1.5;
|
|
18
|
+
color: var(--mj-text-primary);
|
|
19
|
+
background: var(--mj-bg-surface);
|
|
20
|
+
border: 1px solid var(--mj-border-default);
|
|
21
|
+
border-radius: var(--mj-radius-sm);
|
|
22
|
+
transition: var(--mj-transition-colors), box-shadow var(--mj-transition-base);
|
|
23
|
+
outline: none;
|
|
24
|
+
min-height: 38px;
|
|
25
|
+
|
|
26
|
+
&::placeholder {
|
|
27
|
+
color: var(--mj-text-disabled);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover:not(:disabled) {
|
|
31
|
+
border-color: var(--mj-border-strong);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:focus {
|
|
35
|
+
border-color: var(--mj-brand-primary);
|
|
36
|
+
box-shadow: var(--mj-focus-ring);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
opacity: 0.5;
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
background: var(--mj-bg-surface-sunken);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mj-textarea {
|
|
47
|
+
min-height: 80px;
|
|
48
|
+
resize: vertical;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mj-checkbox {
|
|
52
|
+
accent-color: var(--mj-brand-primary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ========== Search Input with Icon ========== */
|
|
56
|
+
.search-input-wrapper {
|
|
57
|
+
position: relative;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
|
|
61
|
+
.search-icon {
|
|
62
|
+
position: absolute;
|
|
63
|
+
left: 12px;
|
|
64
|
+
color: var(--mj-text-muted);
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mj-input {
|
|
70
|
+
padding-left: 36px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.search-clear {
|
|
74
|
+
position: absolute;
|
|
75
|
+
right: 4px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* mj-numeric-input — Numeric input with min/max/step. Replaces `<kendo-numerictextbox>`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MJNumericInputComponent implements ControlValueAccessor {
|
|
7
|
+
Min: number | null;
|
|
8
|
+
Max: number | null;
|
|
9
|
+
Step: number;
|
|
10
|
+
Format: string;
|
|
11
|
+
Decimals: number | null;
|
|
12
|
+
Disabled: boolean;
|
|
13
|
+
Placeholder: string;
|
|
14
|
+
readonly hostClass = true;
|
|
15
|
+
IsDisabled: boolean;
|
|
16
|
+
DisplayValue: string | number;
|
|
17
|
+
private internalValue;
|
|
18
|
+
private onChange;
|
|
19
|
+
private onTouched;
|
|
20
|
+
OnInput(event: Event): void;
|
|
21
|
+
OnBlur(): void;
|
|
22
|
+
writeValue(value: number | null): void;
|
|
23
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
24
|
+
registerOnTouched(fn: () => void): void;
|
|
25
|
+
setDisabledState(isDisabled: boolean): void;
|
|
26
|
+
private clamp;
|
|
27
|
+
private formatDisplay;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJNumericInputComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJNumericInputComponent, "mj-numeric-input", never, { "Min": { "alias": "Min"; "required": false; }; "Max": { "alias": "Max"; "required": false; }; "Step": { "alias": "Step"; "required": false; }; "Format": { "alias": "Format"; "required": false; }; "Decimals": { "alias": "Decimals"; "required": false; }; "Disabled": { "alias": "Disabled"; "required": false; }; "Placeholder": { "alias": "Placeholder"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=numeric-input.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeric-input.component.d.ts","sourceRoot":"","sources":["../../../src/lib/numeric-input/numeric-input.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;;AAEzE;;GAEG;AACH,qBAYa,uBAAwB,YAAW,oBAAoB;IACzD,GAAG,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1B,IAAI,EAAE,MAAM,CAAK;IACjB,MAAM,EAAE,MAAM,CAAM;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B,QAAQ,UAAS;IACjB,WAAW,SAAM;IACkB,QAAQ,CAAC,SAAS,QAAQ;IAEtE,UAAU,UAAS;IACnB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAM;IACnC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,QAAQ,CAA4C;IAC5D,OAAO,CAAC,SAAS,CAAwB;IAEzC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAU3B,MAAM,IAAI,IAAI;IAEd,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IACtC,gBAAgB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI;IAC1D,iBAAiB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IACvC,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAE3C,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,aAAa;yCAxCV,uBAAuB;2CAAvB,uBAAuB;CA4CnC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Component, Input, forwardRef, HostBinding } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* mj-numeric-input — Numeric input with min/max/step. Replaces `<kendo-numerictextbox>`.
|
|
6
|
+
*/
|
|
7
|
+
export class MJNumericInputComponent {
|
|
8
|
+
Min = null;
|
|
9
|
+
Max = null;
|
|
10
|
+
Step = 1;
|
|
11
|
+
Format = '';
|
|
12
|
+
Decimals = null;
|
|
13
|
+
Disabled = false;
|
|
14
|
+
Placeholder = '';
|
|
15
|
+
hostClass = true;
|
|
16
|
+
IsDisabled = false;
|
|
17
|
+
DisplayValue = '';
|
|
18
|
+
internalValue = null;
|
|
19
|
+
onChange = () => { };
|
|
20
|
+
onTouched = () => { };
|
|
21
|
+
OnInput(event) {
|
|
22
|
+
const raw = event.target.value;
|
|
23
|
+
if (raw === '' || raw === '-') {
|
|
24
|
+
this.internalValue = null;
|
|
25
|
+
this.onChange(null);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
let num = parseFloat(raw);
|
|
29
|
+
if (isNaN(num))
|
|
30
|
+
return;
|
|
31
|
+
num = this.clamp(num);
|
|
32
|
+
this.internalValue = num;
|
|
33
|
+
this.onChange(num);
|
|
34
|
+
}
|
|
35
|
+
OnBlur() { this.onTouched(); this.formatDisplay(); }
|
|
36
|
+
writeValue(value) { this.internalValue = value; this.formatDisplay(); }
|
|
37
|
+
registerOnChange(fn) { this.onChange = fn; }
|
|
38
|
+
registerOnTouched(fn) { this.onTouched = fn; }
|
|
39
|
+
setDisabledState(isDisabled) { this.IsDisabled = isDisabled || this.Disabled; }
|
|
40
|
+
clamp(value) {
|
|
41
|
+
if (this.Min != null && value < this.Min)
|
|
42
|
+
return this.Min;
|
|
43
|
+
if (this.Max != null && value > this.Max)
|
|
44
|
+
return this.Max;
|
|
45
|
+
if (this.Decimals != null) {
|
|
46
|
+
const f = Math.pow(10, this.Decimals);
|
|
47
|
+
return Math.round(value * f) / f;
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
formatDisplay() {
|
|
52
|
+
if (this.internalValue == null) {
|
|
53
|
+
this.DisplayValue = '';
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.DisplayValue = this.Decimals != null ? this.internalValue.toFixed(this.Decimals) : this.internalValue;
|
|
57
|
+
}
|
|
58
|
+
static ɵfac = function MJNumericInputComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJNumericInputComponent)(); };
|
|
59
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJNumericInputComponent, selectors: [["mj-numeric-input"]], hostVars: 2, hostBindings: function MJNumericInputComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
60
|
+
i0.ɵɵclassProp("mj-numeric-input-host", ctx.hostClass);
|
|
61
|
+
} }, inputs: { Min: "Min", Max: "Max", Step: "Step", Format: "Format", Decimals: "Decimals", Disabled: "Disabled", Placeholder: "Placeholder" }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJNumericInputComponent), multi: true }])], decls: 1, vars: 6, consts: [["type", "number", 1, "mj-input", "mj-numeric-input", 3, "input", "blur", "disabled", "value"]], template: function MJNumericInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵdomElementStart(0, "input", 0);
|
|
63
|
+
i0.ɵɵdomListener("input", function MJNumericInputComponent_Template_input_input_0_listener($event) { return ctx.OnInput($event); })("blur", function MJNumericInputComponent_Template_input_blur_0_listener() { return ctx.OnBlur(); });
|
|
64
|
+
i0.ɵɵdomElementEnd();
|
|
65
|
+
} if (rf & 2) {
|
|
66
|
+
i0.ɵɵdomProperty("disabled", ctx.IsDisabled)("value", ctx.DisplayValue);
|
|
67
|
+
i0.ɵɵattribute("min", ctx.Min)("max", ctx.Max)("step", ctx.Step)("placeholder", ctx.Placeholder);
|
|
68
|
+
} }, encapsulation: 2 });
|
|
69
|
+
}
|
|
70
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJNumericInputComponent, [{
|
|
71
|
+
type: Component,
|
|
72
|
+
args: [{
|
|
73
|
+
selector: 'mj-numeric-input',
|
|
74
|
+
standalone: true,
|
|
75
|
+
template: `
|
|
76
|
+
<input type="number" class="mj-input mj-numeric-input"
|
|
77
|
+
[attr.min]="Min" [attr.max]="Max" [attr.step]="Step"
|
|
78
|
+
[attr.placeholder]="Placeholder" [disabled]="IsDisabled"
|
|
79
|
+
[value]="DisplayValue"
|
|
80
|
+
(input)="OnInput($event)" (blur)="OnBlur()" />
|
|
81
|
+
`,
|
|
82
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJNumericInputComponent), multi: true }]
|
|
83
|
+
}]
|
|
84
|
+
}], null, { Min: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], Max: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], Step: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], Format: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], Decimals: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], Disabled: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], Placeholder: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], hostClass: [{
|
|
99
|
+
type: HostBinding,
|
|
100
|
+
args: ['class.mj-numeric-input-host']
|
|
101
|
+
}] }); })();
|
|
102
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJNumericInputComponent, { className: "MJNumericInputComponent", filePath: "lib/numeric-input/numeric-input.component.ts", lineNumber: 19 }); })();
|
|
103
|
+
//# sourceMappingURL=numeric-input.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeric-input.component.js","sourceRoot":"","sources":["../../../src/lib/numeric-input/numeric-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,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B;6DAAvB,uBAAuB;YAAvB,sDAAuB;0LAFvB,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YAN9G,mCAIgD;YAApB,AAA1B,4GAAS,mBAAe,IAAC,oFAAS,YAAQ,IAAC;YAJ7C,oBAIgD;;YAD9C,AADiC,4CAAuB,2BAClC;;;;iFAKf,uBAAuB;cAZnC,SAAS;eAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;;;GAMT;gBACD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,wBAAwB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;aACjH;;kBAEE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,WAAW;mBAAC,6BAA6B;;kFAR/B,uBAAuB","sourcesContent":["import { Component, Input, forwardRef, HostBinding } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\n/**\n * mj-numeric-input — Numeric input with min/max/step. Replaces `<kendo-numerictextbox>`.\n */\n@Component({\n selector: 'mj-numeric-input',\n standalone: true,\n template: `\n <input type=\"number\" class=\"mj-input mj-numeric-input\"\n [attr.min]=\"Min\" [attr.max]=\"Max\" [attr.step]=\"Step\"\n [attr.placeholder]=\"Placeholder\" [disabled]=\"IsDisabled\"\n [value]=\"DisplayValue\"\n (input)=\"OnInput($event)\" (blur)=\"OnBlur()\" />\n `,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJNumericInputComponent), multi: true }]\n})\nexport class MJNumericInputComponent implements ControlValueAccessor {\n @Input() Min: number | null = null;\n @Input() Max: number | null = null;\n @Input() Step: number = 1;\n @Input() Format: string = '';\n @Input() Decimals: number | null = null;\n @Input() Disabled = false;\n @Input() Placeholder = '';\n @HostBinding('class.mj-numeric-input-host') readonly hostClass = true;\n\n IsDisabled = false;\n DisplayValue: string | number = '';\n private internalValue: number | null = null;\n private onChange: (value: number | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n OnInput(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n if (raw === '' || raw === '-') { this.internalValue = null; this.onChange(null); return; }\n let num = parseFloat(raw);\n if (isNaN(num)) return;\n num = this.clamp(num);\n this.internalValue = num;\n this.onChange(num);\n }\n\n OnBlur(): void { this.onTouched(); this.formatDisplay(); }\n\n writeValue(value: number | null): void { this.internalValue = value; this.formatDisplay(); }\n registerOnChange(fn: (value: number | null) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.IsDisabled = isDisabled || this.Disabled; }\n\n private clamp(value: number): number {\n if (this.Min != null && value < this.Min) return this.Min;\n if (this.Max != null && value > this.Max) return this.Max;\n if (this.Decimals != null) { const f = Math.pow(10, this.Decimals); return Math.round(value * f) / f; }\n return value;\n }\n\n private formatDisplay(): void {\n if (this.internalValue == null) { this.DisplayValue = ''; return; }\n this.DisplayValue = this.Decimals != null ? this.internalValue.toFixed(this.Decimals) : this.internalValue;\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export type MjProgressBarType = 'value' | 'infinite';
|
|
3
|
+
/**
|
|
4
|
+
* mj-progress-bar — Progress indicator. Replaces `<kendo-progressbar>`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MJProgressBarComponent {
|
|
7
|
+
Value: number;
|
|
8
|
+
Type: MjProgressBarType;
|
|
9
|
+
readonly hostClass = true;
|
|
10
|
+
get ClampedValue(): number;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJProgressBarComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJProgressBarComponent, "mj-progress-bar", never, { "Value": { "alias": "Value"; "required": false; }; "Type": { "alias": "Type"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=progress-bar.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.component.d.ts","sourceRoot":"","sources":["../../../src/lib/progress-bar/progress-bar.component.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,CAAC;AAErD;;GAEG;AACH,qBAgBa,sBAAsB;IACxB,KAAK,EAAE,MAAM,CAAK;IAClB,IAAI,EAAE,iBAAiB,CAAW;IACA,QAAQ,CAAC,SAAS,QAAQ;IACrE,IAAI,YAAY,IAAI,MAAM,CAAmD;yCAJlE,sBAAsB;2CAAtB,sBAAsB;CAKlC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Component, Input, HostBinding } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
function MJProgressBarComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
4
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
5
|
+
i0.ɵɵdomElement(1, "div", 2);
|
|
6
|
+
i0.ɵɵdomElementEnd();
|
|
7
|
+
} }
|
|
8
|
+
function MJProgressBarComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
+
i0.ɵɵdomElementStart(0, "progress", 1);
|
|
10
|
+
i0.ɵɵtext(1);
|
|
11
|
+
i0.ɵɵdomElementEnd();
|
|
12
|
+
} if (rf & 2) {
|
|
13
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
14
|
+
i0.ɵɵattribute("value", ctx_r0.ClampedValue)("aria-valuenow", ctx_r0.ClampedValue);
|
|
15
|
+
i0.ɵɵadvance();
|
|
16
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.ClampedValue, "% ");
|
|
17
|
+
} }
|
|
18
|
+
/**
|
|
19
|
+
* mj-progress-bar — Progress indicator. Replaces `<kendo-progressbar>`.
|
|
20
|
+
*/
|
|
21
|
+
export class MJProgressBarComponent {
|
|
22
|
+
Value = 0;
|
|
23
|
+
Type = 'value';
|
|
24
|
+
hostClass = true;
|
|
25
|
+
get ClampedValue() { return Math.max(0, Math.min(100, this.Value)); }
|
|
26
|
+
static ɵfac = function MJProgressBarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJProgressBarComponent)(); };
|
|
27
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJProgressBarComponent, selectors: [["mj-progress-bar"]], hostVars: 2, hostBindings: function MJProgressBarComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
28
|
+
i0.ɵɵclassProp("mj-progress-bar-host", ctx.hostClass);
|
|
29
|
+
} }, inputs: { Value: "Value", Type: "Type" }, decls: 2, vars: 1, consts: [["role", "progressbar", "aria-label", "Loading", 1, "mj-progress-bar", "mj-progress-bar--infinite"], ["max", "100", "role", "progressbar", "aria-valuemin", "0", "aria-valuemax", "100", 1, "mj-progress-bar"], [1, "mj-progress-bar-indeterminate"]], template: function MJProgressBarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵconditionalCreate(0, MJProgressBarComponent_Conditional_0_Template, 2, 0, "div", 0)(1, MJProgressBarComponent_Conditional_1_Template, 2, 3, "progress", 1);
|
|
31
|
+
} if (rf & 2) {
|
|
32
|
+
i0.ɵɵconditional(ctx.Type === "infinite" ? 0 : 1);
|
|
33
|
+
} }, encapsulation: 2 });
|
|
34
|
+
}
|
|
35
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJProgressBarComponent, [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: 'mj-progress-bar',
|
|
39
|
+
standalone: true,
|
|
40
|
+
template: `
|
|
41
|
+
@if (Type === 'infinite') {
|
|
42
|
+
<div class="mj-progress-bar mj-progress-bar--infinite" role="progressbar" aria-label="Loading">
|
|
43
|
+
<div class="mj-progress-bar-indeterminate"></div>
|
|
44
|
+
</div>
|
|
45
|
+
} @else {
|
|
46
|
+
<progress class="mj-progress-bar" [attr.value]="ClampedValue" max="100"
|
|
47
|
+
role="progressbar" [attr.aria-valuenow]="ClampedValue" aria-valuemin="0" aria-valuemax="100">
|
|
48
|
+
{{ ClampedValue }}%
|
|
49
|
+
</progress>
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
}]
|
|
53
|
+
}], null, { Value: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], Type: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], hostClass: [{
|
|
58
|
+
type: HostBinding,
|
|
59
|
+
args: ['class.mj-progress-bar-host']
|
|
60
|
+
}] }); })();
|
|
61
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJProgressBarComponent, { className: "MJProgressBarComponent", filePath: "lib/progress-bar/progress-bar.component.ts", lineNumber: 24 }); })();
|
|
62
|
+
//# sourceMappingURL=progress-bar.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.component.js","sourceRoot":"","sources":["../../../src/lib/progress-bar/progress-bar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;;IAYxD,iCAA+F;IAC7F,4BAAiD;IACnD,oBAAM;;;IAEN,sCAC+F;IAC7F,YACF;IAAA,oBAAW;;;;IADT,cACF;IADE,qDACF;;AAfN;;GAEG;AAiBH,MAAM,OAAO,sBAAsB;IACxB,KAAK,GAAW,CAAC,CAAC;IAClB,IAAI,GAAsB,OAAO,CAAC;IACS,SAAS,GAAG,IAAI,CAAC;IACrE,IAAI,YAAY,KAAa,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gHAJlE,sBAAsB;6DAAtB,sBAAsB;YAAtB,qDAAsB;;YAR7B,AAJF,wFAA2B,uEAIlB;;YAJT,iDASC;;;iFAGQ,sBAAsB;cAhBlC,SAAS;eAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;;;;;;;;GAWT;aACF;;kBAEE,KAAK;;kBACL,KAAK;;kBACL,WAAW;mBAAC,4BAA4B;;kFAH9B,sBAAsB","sourcesContent":["import { Component, Input, HostBinding } from '@angular/core';\n\nexport type MjProgressBarType = 'value' | 'infinite';\n\n/**\n * mj-progress-bar — Progress indicator. Replaces `<kendo-progressbar>`.\n */\n@Component({\n selector: 'mj-progress-bar',\n standalone: true,\n template: `\n @if (Type === 'infinite') {\n <div class=\"mj-progress-bar mj-progress-bar--infinite\" role=\"progressbar\" aria-label=\"Loading\">\n <div class=\"mj-progress-bar-indeterminate\"></div>\n </div>\n } @else {\n <progress class=\"mj-progress-bar\" [attr.value]=\"ClampedValue\" max=\"100\"\n role=\"progressbar\" [attr.aria-valuenow]=\"ClampedValue\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n {{ ClampedValue }}%\n </progress>\n }\n `\n})\nexport class MJProgressBarComponent {\n @Input() Value: number = 0;\n @Input() Type: MjProgressBarType = 'value';\n @HostBinding('class.mj-progress-bar-host') readonly hostClass = true;\n get ClampedValue(): number { return Math.max(0, Math.min(100, this.Value)); }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MJ Splitter — wraps angular-split for resizable split layouts.
|
|
3
|
+
* Replaces `<kendo-splitter>` and `<kendo-splitter-pane>`.
|
|
4
|
+
*
|
|
5
|
+
* Re-exports angular-split's AngularSplitModule so consumers only
|
|
6
|
+
* need to import from @memberjunction/ng-ui-components.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```html
|
|
10
|
+
* <as-split direction="horizontal">
|
|
11
|
+
* <as-split-area [size]="30">Left</as-split-area>
|
|
12
|
+
* <as-split-area [size]="70">Right</as-split-area>
|
|
13
|
+
* </as-split>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Migration from Kendo:
|
|
17
|
+
* - `<kendo-splitter orientation="horizontal">` → `<as-split direction="horizontal">`
|
|
18
|
+
* - `<kendo-splitter-pane [size]="'30%'">` → `<as-split-area [size]="30">`
|
|
19
|
+
* - `<kendo-splitter-pane>` (no size = fill) → `<as-split-area [size]="*">`
|
|
20
|
+
* - size values are numbers (percentages), not strings
|
|
21
|
+
*/
|
|
22
|
+
export { AngularSplitModule } from 'angular-split';
|
|
23
|
+
//# sourceMappingURL=splitter.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter.component.d.ts","sourceRoot":"","sources":["../../../src/lib/splitter/splitter.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MJ Splitter — wraps angular-split for resizable split layouts.
|
|
3
|
+
* Replaces `<kendo-splitter>` and `<kendo-splitter-pane>`.
|
|
4
|
+
*
|
|
5
|
+
* Re-exports angular-split's AngularSplitModule so consumers only
|
|
6
|
+
* need to import from @memberjunction/ng-ui-components.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```html
|
|
10
|
+
* <as-split direction="horizontal">
|
|
11
|
+
* <as-split-area [size]="30">Left</as-split-area>
|
|
12
|
+
* <as-split-area [size]="70">Right</as-split-area>
|
|
13
|
+
* </as-split>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Migration from Kendo:
|
|
17
|
+
* - `<kendo-splitter orientation="horizontal">` → `<as-split direction="horizontal">`
|
|
18
|
+
* - `<kendo-splitter-pane [size]="'30%'">` → `<as-split-area [size]="30">`
|
|
19
|
+
* - `<kendo-splitter-pane>` (no size = fill) → `<as-split-area [size]="*">`
|
|
20
|
+
* - size values are numbers (percentages), not strings
|
|
21
|
+
*/
|
|
22
|
+
// Re-export angular-split module for consumers
|
|
23
|
+
export { AngularSplitModule } from 'angular-split';
|
|
24
|
+
//# sourceMappingURL=splitter.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter.component.js","sourceRoot":"","sources":["../../../src/lib/splitter/splitter.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,+CAA+C;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/**\n * MJ Splitter — wraps angular-split for resizable split layouts.\n * Replaces `<kendo-splitter>` and `<kendo-splitter-pane>`.\n *\n * Re-exports angular-split's AngularSplitModule so consumers only\n * need to import from @memberjunction/ng-ui-components.\n *\n * Usage:\n * ```html\n * <as-split direction=\"horizontal\">\n * <as-split-area [size]=\"30\">Left</as-split-area>\n * <as-split-area [size]=\"70\">Right</as-split-area>\n * </as-split>\n * ```\n *\n * Migration from Kendo:\n * - `<kendo-splitter orientation=\"horizontal\">` → `<as-split direction=\"horizontal\">`\n * - `<kendo-splitter-pane [size]=\"'30%'\">` → `<as-split-area [size]=\"30\">`\n * - `<kendo-splitter-pane>` (no size = fill) → `<as-split-area [size]=\"*\">`\n * - size values are numbers (percentages), not strings\n */\n\n// Re-export angular-split module for consumers\nexport { AngularSplitModule } from 'angular-split';\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MJ Splitter Theme — overrides angular-split defaults with MJ design tokens.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* Override angular-split CSS custom properties */
|
|
6
|
+
as-split {
|
|
7
|
+
--as-gutter-background-color: var(--mj-border-default);
|
|
8
|
+
|
|
9
|
+
.as-split-gutter {
|
|
10
|
+
transition: background-color var(--mj-transition-fast);
|
|
11
|
+
|
|
12
|
+
&:hover {
|
|
13
|
+
--as-gutter-background-color: var(--mj-bg-surface-hover);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.as-dragged {
|
|
17
|
+
--as-gutter-background-color: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.as-split-gutter-icon {
|
|
22
|
+
opacity: 0.4;
|
|
23
|
+
transition: opacity var(--mj-transition-fast);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.as-split-gutter:hover .as-split-gutter-icon {
|
|
27
|
+
opacity: 0.7;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* mj-switch — Toggle switch. Replaces `<kendo-switch>`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MJSwitchComponent implements ControlValueAccessor {
|
|
7
|
+
OnLabel: string;
|
|
8
|
+
OffLabel: string;
|
|
9
|
+
Disabled: boolean;
|
|
10
|
+
readonly hostClass = true;
|
|
11
|
+
Value: boolean;
|
|
12
|
+
IsDisabled: boolean;
|
|
13
|
+
private onChange;
|
|
14
|
+
private onTouched;
|
|
15
|
+
Toggle(): void;
|
|
16
|
+
OnTouched(): void;
|
|
17
|
+
writeValue(value: boolean): void;
|
|
18
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
19
|
+
registerOnTouched(fn: () => void): void;
|
|
20
|
+
setDisabledState(isDisabled: boolean): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJSwitchComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJSwitchComponent, "mj-switch", never, { "OnLabel": { "alias": "OnLabel"; "required": false; }; "OffLabel": { "alias": "OffLabel"; "required": false; }; "Disabled": { "alias": "Disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=switch.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.component.d.ts","sourceRoot":"","sources":["../../../src/lib/switch/switch.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;;AAEzE;;GAEG;AACH,qBAgBa,iBAAkB,YAAW,oBAAoB;IACnD,OAAO,SAAM;IACb,QAAQ,SAAM;IACd,QAAQ,UAAS;IACW,QAAQ,CAAC,SAAS,QAAQ;IAE/D,KAAK,UAAS;IACd,UAAU,UAAS;IACnB,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,SAAS,CAAwB;IAEzC,MAAM,IAAI,IAAI;IACd,SAAS,IAAI,IAAI;IACjB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAChC,gBAAgB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IACpD,iBAAiB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IACvC,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;yCAhBhC,iBAAiB;2CAAjB,iBAAiB;CAiB7B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Component, Input, forwardRef, HostBinding } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
function MJSwitchComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
+
i0.ɵɵdomElementStart(0, "span", 3);
|
|
6
|
+
i0.ɵɵtext(1);
|
|
7
|
+
i0.ɵɵdomElementEnd();
|
|
8
|
+
} if (rf & 2) {
|
|
9
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10
|
+
i0.ɵɵadvance();
|
|
11
|
+
i0.ɵɵtextInterpolate(ctx_r0.Value ? ctx_r0.OnLabel : ctx_r0.OffLabel);
|
|
12
|
+
} }
|
|
13
|
+
/**
|
|
14
|
+
* mj-switch — Toggle switch. Replaces `<kendo-switch>`.
|
|
15
|
+
*/
|
|
16
|
+
export class MJSwitchComponent {
|
|
17
|
+
OnLabel = '';
|
|
18
|
+
OffLabel = '';
|
|
19
|
+
Disabled = false;
|
|
20
|
+
hostClass = true;
|
|
21
|
+
Value = false;
|
|
22
|
+
IsDisabled = false;
|
|
23
|
+
onChange = () => { };
|
|
24
|
+
onTouched = () => { };
|
|
25
|
+
Toggle() { if (!this.IsDisabled) {
|
|
26
|
+
this.Value = !this.Value;
|
|
27
|
+
this.onChange(this.Value);
|
|
28
|
+
} }
|
|
29
|
+
OnTouched() { this.onTouched(); }
|
|
30
|
+
writeValue(value) { this.Value = !!value; }
|
|
31
|
+
registerOnChange(fn) { this.onChange = fn; }
|
|
32
|
+
registerOnTouched(fn) { this.onTouched = fn; }
|
|
33
|
+
setDisabledState(isDisabled) { this.IsDisabled = isDisabled || this.Disabled; }
|
|
34
|
+
static ɵfac = function MJSwitchComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJSwitchComponent)(); };
|
|
35
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJSwitchComponent, selectors: [["mj-switch"]], hostVars: 2, hostBindings: function MJSwitchComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
36
|
+
i0.ɵɵclassProp("mj-switch-host", ctx.hostClass);
|
|
37
|
+
} }, inputs: { OnLabel: "OnLabel", OffLabel: "OffLabel", Disabled: "Disabled" }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }])], decls: 4, vars: 7, consts: [["type", "button", "role", "switch", 1, "mj-switch", 3, "click", "blur", "disabled"], [1, "mj-switch-track"], [1, "mj-switch-thumb"], [1, "mj-switch-label"]], template: function MJSwitchComponent_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵdomElementStart(0, "button", 0);
|
|
39
|
+
i0.ɵɵdomListener("click", function MJSwitchComponent_Template_button_click_0_listener() { return ctx.Toggle(); })("blur", function MJSwitchComponent_Template_button_blur_0_listener() { return ctx.OnTouched(); });
|
|
40
|
+
i0.ɵɵdomElementStart(1, "span", 1);
|
|
41
|
+
i0.ɵɵdomElement(2, "span", 2);
|
|
42
|
+
i0.ɵɵdomElementEnd();
|
|
43
|
+
i0.ɵɵconditionalCreate(3, MJSwitchComponent_Conditional_3_Template, 2, 1, "span", 3);
|
|
44
|
+
i0.ɵɵdomElementEnd();
|
|
45
|
+
} if (rf & 2) {
|
|
46
|
+
i0.ɵɵclassProp("mj-switch--on", ctx.Value)("mj-switch--disabled", ctx.IsDisabled);
|
|
47
|
+
i0.ɵɵdomProperty("disabled", ctx.IsDisabled);
|
|
48
|
+
i0.ɵɵattribute("aria-checked", ctx.Value);
|
|
49
|
+
i0.ɵɵadvance(3);
|
|
50
|
+
i0.ɵɵconditional(ctx.OnLabel || ctx.OffLabel ? 3 : -1);
|
|
51
|
+
} }, encapsulation: 2 });
|
|
52
|
+
}
|
|
53
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJSwitchComponent, [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{
|
|
56
|
+
selector: 'mj-switch',
|
|
57
|
+
standalone: true,
|
|
58
|
+
template: `
|
|
59
|
+
<button type="button" role="switch" class="mj-switch"
|
|
60
|
+
[class.mj-switch--on]="Value" [class.mj-switch--disabled]="IsDisabled"
|
|
61
|
+
[attr.aria-checked]="Value" [disabled]="IsDisabled"
|
|
62
|
+
(click)="Toggle()" (blur)="OnTouched()">
|
|
63
|
+
<span class="mj-switch-track"><span class="mj-switch-thumb"></span></span>
|
|
64
|
+
@if (OnLabel || OffLabel) {
|
|
65
|
+
<span class="mj-switch-label">{{ Value ? OnLabel : OffLabel }}</span>
|
|
66
|
+
}
|
|
67
|
+
</button>
|
|
68
|
+
`,
|
|
69
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }]
|
|
70
|
+
}]
|
|
71
|
+
}], null, { OnLabel: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], OffLabel: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], Disabled: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}], hostClass: [{
|
|
78
|
+
type: HostBinding,
|
|
79
|
+
args: ['class.mj-switch-host']
|
|
80
|
+
}] }); })();
|
|
81
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJSwitchComponent, { className: "MJSwitchComponent", filePath: "lib/switch/switch.component.ts", lineNumber: 23 }); })();
|
|
82
|
+
//# sourceMappingURL=switch.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.component.js","sourceRoot":"","sources":["../../../src/lib/switch/switch.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;;;IAejE,kCAA8B;IAAA,YAAgC;IAAA,oBAAO;;;IAAvC,cAAgC;IAAhC,qEAAgC;;AAbtE;;GAEG;AAiBH,MAAM,OAAO,iBAAiB;IACnB,OAAO,GAAG,EAAE,CAAC;IACb,QAAQ,GAAG,EAAE,CAAC;IACd,QAAQ,GAAG,KAAK,CAAC;IACoB,SAAS,GAAG,IAAI,CAAC;IAE/D,KAAK,GAAG,KAAK,CAAC;IACd,UAAU,GAAG,KAAK,C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AChB,QAAQ,EAAE;;;;;;;;;;GAUT;gBACD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;aAC3G;;kBAEE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,WAAW;mBAAC,sBAAsB;;kFAJxB,iBAAiB","sourcesContent":["import { Component, Input, forwardRef, HostBinding } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\n/**\n * mj-switch — Toggle switch. Replaces `<kendo-switch>`.\n */\n@Component({\n selector: 'mj-switch',\n standalone: true,\n template: `\n <button type=\"button\" role=\"switch\" class=\"mj-switch\"\n [class.mj-switch--on]=\"Value\" [class.mj-switch--disabled]=\"IsDisabled\"\n [attr.aria-checked]=\"Value\" [disabled]=\"IsDisabled\"\n (click)=\"Toggle()\" (blur)=\"OnTouched()\">\n <span class=\"mj-switch-track\"><span class=\"mj-switch-thumb\"></span></span>\n @if (OnLabel || OffLabel) {\n <span class=\"mj-switch-label\">{{ Value ? OnLabel : OffLabel }}</span>\n }\n </button>\n `,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }]\n})\nexport class MJSwitchComponent implements ControlValueAccessor {\n @Input() OnLabel = '';\n @Input() OffLabel = '';\n @Input() Disabled = false;\n @HostBinding('class.mj-switch-host') readonly hostClass = true;\n\n Value = false;\n IsDisabled = false;\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n Toggle(): void { if (!this.IsDisabled) { this.Value = !this.Value; this.onChange(this.Value); } }\n OnTouched(): void { this.onTouched(); }\n writeValue(value: boolean): void { this.Value = !!value; }\n registerOnChange(fn: (value: boolean) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.IsDisabled = isDisabled || this.Disabled; }\n}\n"]}
|