@magmonium/one 0.4.29 → 0.4.31
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/assets/docs/en/app-release.md +0 -11
- package/assets/i18n/en.json +2 -0
- package/fesm2022/magmonium-one-attribute-value-CLBOZcme.mjs +255 -0
- package/fesm2022/magmonium-one-attribute-value-CLBOZcme.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-checkbox-D7NYJdU3.mjs +77 -0
- package/fesm2022/magmonium-one-base-checkbox-D7NYJdU3.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-dropdown-CEDsqaPz.mjs +604 -0
- package/fesm2022/magmonium-one-base-dropdown-CEDsqaPz.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-input-BOaD-WIi.mjs +183 -0
- package/fesm2022/magmonium-one-base-input-BOaD-WIi.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-text-D6p6_vsb.mjs +94 -0
- package/fesm2022/magmonium-one-base-text-D6p6_vsb.mjs.map +1 -0
- package/fesm2022/magmonium-one-button-rVNnp6G8.mjs +1281 -0
- package/fesm2022/magmonium-one-button-rVNnp6G8.mjs.map +1 -0
- package/fesm2022/magmonium-one-checkbox-rj4XHxb3.mjs +365 -0
- package/fesm2022/magmonium-one-checkbox-rj4XHxb3.mjs.map +1 -0
- package/fesm2022/magmonium-one-color-utl-CirPzUFk.mjs +449 -0
- package/fesm2022/magmonium-one-color-utl-CirPzUFk.mjs.map +1 -0
- package/fesm2022/magmonium-one-directives-DOBENX_K.mjs +1285 -0
- package/fesm2022/magmonium-one-directives-DOBENX_K.mjs.map +1 -0
- package/fesm2022/magmonium-one-file.service-Bo06pU3_.mjs +65 -0
- package/fesm2022/magmonium-one-file.service-Bo06pU3_.mjs.map +1 -0
- package/fesm2022/magmonium-one-group-Cue4x6tD.mjs +428 -0
- package/fesm2022/magmonium-one-group-Cue4x6tD.mjs.map +1 -0
- package/fesm2022/magmonium-one-header-DPVnaEOV.mjs +380 -0
- package/fesm2022/magmonium-one-header-DPVnaEOV.mjs.map +1 -0
- package/fesm2022/magmonium-one-icon-Dso-9RMN.mjs +833 -0
- package/fesm2022/magmonium-one-icon-Dso-9RMN.mjs.map +1 -0
- package/fesm2022/magmonium-one-image-editor-C7AtzEf6.mjs +438 -0
- package/fesm2022/magmonium-one-image-editor-C7AtzEf6.mjs.map +1 -0
- package/fesm2022/magmonium-one-image-frame-BTSaUSAi.mjs +116 -0
- package/fesm2022/magmonium-one-image-frame-BTSaUSAi.mjs.map +1 -0
- package/fesm2022/magmonium-one-input-DqHPorA1.mjs +39 -0
- package/fesm2022/magmonium-one-input-DqHPorA1.mjs.map +1 -0
- package/fesm2022/magmonium-one-label-B30Q4Vut.mjs +574 -0
- package/fesm2022/magmonium-one-label-B30Q4Vut.mjs.map +1 -0
- package/fesm2022/magmonium-one-m-ref-Dt0DCm8X.mjs +147 -0
- package/fesm2022/magmonium-one-m-ref-Dt0DCm8X.mjs.map +1 -0
- package/fesm2022/magmonium-one-menu-BBOnOK4M.mjs +887 -0
- package/fesm2022/magmonium-one-menu-BBOnOK4M.mjs.map +1 -0
- package/fesm2022/magmonium-one-multi-range-DCOwngql.mjs +458 -0
- package/fesm2022/magmonium-one-multi-range-DCOwngql.mjs.map +1 -0
- package/fesm2022/magmonium-one-options-asset-D8Gg1yNl.mjs +97 -0
- package/fesm2022/magmonium-one-options-asset-D8Gg1yNl.mjs.map +1 -0
- package/fesm2022/magmonium-one-otp-DLF7Pq94.mjs +261 -0
- package/fesm2022/magmonium-one-otp-DLF7Pq94.mjs.map +1 -0
- package/fesm2022/magmonium-one-password-BSOU4RI0.mjs +217 -0
- package/fesm2022/magmonium-one-password-BSOU4RI0.mjs.map +1 -0
- package/fesm2022/magmonium-one-radio-CYnWLXPZ.mjs +111 -0
- package/fesm2022/magmonium-one-radio-CYnWLXPZ.mjs.map +1 -0
- package/fesm2022/magmonium-one-range-CmmZAr57.mjs +216 -0
- package/fesm2022/magmonium-one-range-CmmZAr57.mjs.map +1 -0
- package/fesm2022/magmonium-one-rolldown-runtime-DpJrqANO.mjs +11 -0
- package/fesm2022/magmonium-one-selector-DDnBYNLr.mjs +1065 -0
- package/fesm2022/magmonium-one-selector-DDnBYNLr.mjs.map +1 -0
- package/fesm2022/magmonium-one-size-converter-B-UubQQ0.mjs +1057 -0
- package/fesm2022/magmonium-one-size-converter-B-UubQQ0.mjs.map +1 -0
- package/fesm2022/magmonium-one-text-FXb-RyBh.mjs +406 -0
- package/fesm2022/magmonium-one-text-FXb-RyBh.mjs.map +1 -0
- package/fesm2022/magmonium-one-text-output-D2XQWyL0.mjs +296 -0
- package/fesm2022/magmonium-one-text-output-D2XQWyL0.mjs.map +1 -0
- package/fesm2022/magmonium-one-theme-a7GlFbzE.mjs +1 -0
- package/fesm2022/magmonium-one-toggle-C0eTrtkt.mjs +231 -0
- package/fesm2022/magmonium-one-toggle-C0eTrtkt.mjs.map +1 -0
- package/fesm2022/magmonium-one.mjs +49231 -2
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +8 -8
- package/types/magmonium-one.d.ts +13801 -9510
- package/fesm2022/magmonium-one-image-editor-DYbS7fRP.mjs +0 -290
- package/fesm2022/magmonium-one-image-editor-DYbS7fRP.mjs.map +0 -1
- package/fesm2022/magmonium-one-magmonium-one-jBGfJvgl.mjs +0 -41576
- package/fesm2022/magmonium-one-magmonium-one-jBGfJvgl.mjs.map +0 -1
- package/fesm2022/magmonium-one-otp-DY1B1djA.mjs +0 -201
- package/fesm2022/magmonium-one-otp-DY1B1djA.mjs.map +0 -1
- package/fesm2022/magmonium-one-password-CzMwV84X.mjs +0 -105
- package/fesm2022/magmonium-one-password-CzMwV84X.mjs.map +0 -1
- package/fesm2022/magmonium-one-toggle-EoE3fKjl.mjs +0 -62
- package/fesm2022/magmonium-one-toggle-EoE3fKjl.mjs.map +0 -1
|
@@ -0,0 +1,1285 @@
|
|
|
1
|
+
import { B as IS_DESIGN_MODE, a as resolveSpacing } from "./magmonium-one-size-converter-B-UubQQ0.mjs";
|
|
2
|
+
import "./magmonium-one-selector-DDnBYNLr.mjs";
|
|
3
|
+
import "./magmonium-one-m-ref-Dt0DCm8X.mjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { Directive, ElementRef, HostListener, InjectionToken, Input, Renderer2, afterRenderEffect, booleanAttribute, computed, effect, inject, input, model, output, signal } from "@angular/core";
|
|
6
|
+
function isWithinBoundary(value, draggable, axis) {
|
|
7
|
+
const maxVal = draggable.max?.[axis] ?? (axis === "x" ? window.innerWidth : window.innerHeight);
|
|
8
|
+
const minVal = draggable.min?.[axis] ?? 0;
|
|
9
|
+
return value <= maxVal && value >= minVal;
|
|
10
|
+
}
|
|
11
|
+
function getNewPosition(draggable, event, delta) {
|
|
12
|
+
let { x, y } = draggable.position;
|
|
13
|
+
const touch = "touches" in event ? event.touches[0] || event.changedTouches[0] : null;
|
|
14
|
+
const screenX = touch ? touch.screenX : event.screenX;
|
|
15
|
+
const screenY = touch ? touch.screenY : event.screenY;
|
|
16
|
+
if (draggable.direction !== "y") {
|
|
17
|
+
const dx = screenX - (delta.x ?? 0);
|
|
18
|
+
if (isWithinBoundary(dx, draggable, "x")) x = dx;
|
|
19
|
+
}
|
|
20
|
+
if (draggable.direction !== "x") {
|
|
21
|
+
const dy = screenY - (delta.y ?? 0);
|
|
22
|
+
if (isWithinBoundary(dy, draggable, "y")) y = dy;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
x,
|
|
26
|
+
y
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function getCursor({ direction }) {
|
|
30
|
+
switch (direction) {
|
|
31
|
+
case "x": return "ew-resize";
|
|
32
|
+
case "y": return "ns-resize";
|
|
33
|
+
default: return "move";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const INTERACTIVE_SELECTOR = "button, a, input, textarea, select, [contenteditable=\"true\"]";
|
|
37
|
+
const shouldIgnorePointer = (target) => target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable || !!target.closest(INTERACTIVE_SELECTOR);
|
|
38
|
+
var DraggableDirective = class DraggableDirective {
|
|
39
|
+
mDraggable = model.required(...ngDevMode ? [{ debugName: "mDraggable" }] : /* istanbul ignore next */ []);
|
|
40
|
+
handleSelector = input(...ngDevMode ? [void 0, { debugName: "handleSelector" }] : /* istanbul ignore next */ []);
|
|
41
|
+
min = input(void 0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
42
|
+
max = input(void 0, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
43
|
+
dragStart = output();
|
|
44
|
+
dragEnd = output();
|
|
45
|
+
cursor = computed(() => getCursor(this.mDraggable()), ...ngDevMode ? [{ debugName: "cursor" }] : /* istanbul ignore next */ []);
|
|
46
|
+
state = {
|
|
47
|
+
dragging: false,
|
|
48
|
+
delta: {
|
|
49
|
+
x: 0,
|
|
50
|
+
y: 0
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
set pos(position) {
|
|
54
|
+
this.mDraggable.update((config) => ({
|
|
55
|
+
...config,
|
|
56
|
+
position
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
bounded = (config) => ({
|
|
60
|
+
...config,
|
|
61
|
+
min: this.min() ?? config.min,
|
|
62
|
+
max: this.max() ?? config.max
|
|
63
|
+
});
|
|
64
|
+
handleMouseDown(event) {
|
|
65
|
+
const target = event.target;
|
|
66
|
+
if (this.mDraggable()?.direction === "none" || shouldIgnorePointer(target)) return;
|
|
67
|
+
const selector = this.handleSelector();
|
|
68
|
+
if (selector && !target.closest(selector)) return;
|
|
69
|
+
event.stopPropagation();
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
this.state.dragging = true;
|
|
72
|
+
this.dragStart.emit();
|
|
73
|
+
const { screenX, screenY } = event;
|
|
74
|
+
const { x, y } = this.mDraggable()?.position ?? {};
|
|
75
|
+
this.state.delta.x = screenX - (x ?? 0);
|
|
76
|
+
this.state.delta.y = screenY - (y ?? 0);
|
|
77
|
+
}
|
|
78
|
+
handleMouseMove(event) {
|
|
79
|
+
if (!this.state.dragging) return;
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
event.stopPropagation();
|
|
82
|
+
this.mDraggable.update((config) => ({
|
|
83
|
+
...config,
|
|
84
|
+
position: getNewPosition(this.bounded(config), event, this.state.delta)
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
handleMouseUp(event) {
|
|
88
|
+
if (!this.state.dragging) return;
|
|
89
|
+
event.stopPropagation();
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
this.state.dragging = false;
|
|
92
|
+
this.dragEnd.emit();
|
|
93
|
+
}
|
|
94
|
+
handleTouchStart(event) {
|
|
95
|
+
const target = event.target;
|
|
96
|
+
if (this.mDraggable()?.direction === "none" || shouldIgnorePointer(target)) return;
|
|
97
|
+
const selector = this.handleSelector();
|
|
98
|
+
if (selector && !target.closest(selector)) return;
|
|
99
|
+
event.stopPropagation();
|
|
100
|
+
this.state.dragging = true;
|
|
101
|
+
this.dragStart.emit();
|
|
102
|
+
const { screenX, screenY } = event.touches[0];
|
|
103
|
+
const { x, y } = this.mDraggable()?.position ?? {};
|
|
104
|
+
this.state.delta.x = screenX - (x ?? 0);
|
|
105
|
+
this.state.delta.y = screenY - (y ?? 0);
|
|
106
|
+
}
|
|
107
|
+
handleTouchMove(event) {
|
|
108
|
+
if (!this.state.dragging) return;
|
|
109
|
+
if (event.cancelable) event.preventDefault();
|
|
110
|
+
event.stopPropagation();
|
|
111
|
+
this.mDraggable.update((config) => ({
|
|
112
|
+
...config,
|
|
113
|
+
position: getNewPosition(this.bounded(config), event, this.state.delta)
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
handleTouchEnd(event) {
|
|
117
|
+
if (!this.state.dragging) return;
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
this.state.dragging = false;
|
|
121
|
+
this.dragEnd.emit();
|
|
122
|
+
}
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
124
|
+
minVersion: "12.0.0",
|
|
125
|
+
version: "22.2.1",
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
type: DraggableDirective,
|
|
128
|
+
deps: [],
|
|
129
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
130
|
+
});
|
|
131
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
132
|
+
minVersion: "17.1.0",
|
|
133
|
+
version: "22.2.1",
|
|
134
|
+
type: DraggableDirective,
|
|
135
|
+
isStandalone: true,
|
|
136
|
+
selector: "[mDraggable]",
|
|
137
|
+
inputs: {
|
|
138
|
+
mDraggable: {
|
|
139
|
+
classPropertyName: "mDraggable",
|
|
140
|
+
publicName: "mDraggable",
|
|
141
|
+
isSignal: true,
|
|
142
|
+
isRequired: true,
|
|
143
|
+
transformFunction: null
|
|
144
|
+
},
|
|
145
|
+
handleSelector: {
|
|
146
|
+
classPropertyName: "handleSelector",
|
|
147
|
+
publicName: "handleSelector",
|
|
148
|
+
isSignal: true,
|
|
149
|
+
isRequired: false,
|
|
150
|
+
transformFunction: null
|
|
151
|
+
},
|
|
152
|
+
min: {
|
|
153
|
+
classPropertyName: "min",
|
|
154
|
+
publicName: "min",
|
|
155
|
+
isSignal: true,
|
|
156
|
+
isRequired: false,
|
|
157
|
+
transformFunction: null
|
|
158
|
+
},
|
|
159
|
+
max: {
|
|
160
|
+
classPropertyName: "max",
|
|
161
|
+
publicName: "max",
|
|
162
|
+
isSignal: true,
|
|
163
|
+
isRequired: false,
|
|
164
|
+
transformFunction: null
|
|
165
|
+
},
|
|
166
|
+
pos: {
|
|
167
|
+
classPropertyName: "pos",
|
|
168
|
+
publicName: "pos",
|
|
169
|
+
isSignal: false,
|
|
170
|
+
isRequired: false,
|
|
171
|
+
transformFunction: null
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
outputs: {
|
|
175
|
+
mDraggable: "mDraggableChange",
|
|
176
|
+
dragStart: "dragStart",
|
|
177
|
+
dragEnd: "dragEnd"
|
|
178
|
+
},
|
|
179
|
+
host: {
|
|
180
|
+
listeners: {
|
|
181
|
+
"mousedown": "handleMouseDown($event)",
|
|
182
|
+
"window:mousemove": "handleMouseMove($event)",
|
|
183
|
+
"window:mouseup": "handleMouseUp($event)",
|
|
184
|
+
"touchstart": "handleTouchStart($event)",
|
|
185
|
+
"window:touchmove": "handleTouchMove($event)",
|
|
186
|
+
"window:touchend": "handleTouchEnd($event)"
|
|
187
|
+
},
|
|
188
|
+
properties: {
|
|
189
|
+
"class.draggable": "mDraggable()?.direction !== 'none'",
|
|
190
|
+
"class.dragging": "this.state.dragging",
|
|
191
|
+
"style.position": "mDraggable()?.direction !== 'none' ? (mDraggable()?.positionType ?? 'absolute') : null",
|
|
192
|
+
"style.top.px": "mDraggable()?.direction !== 'none' && mDraggable()?.direction !== 'x' ? mDraggable()?.position?.y : null",
|
|
193
|
+
"style.left.px": "mDraggable()?.direction !== 'none' && mDraggable()?.direction !== 'y' ? mDraggable()?.position?.x : null",
|
|
194
|
+
"style.cursor": "mDraggable()?.direction !== 'none' ? cursor() : null"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
ngImport: i0
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
201
|
+
minVersion: "12.0.0",
|
|
202
|
+
version: "22.2.1",
|
|
203
|
+
ngImport: i0,
|
|
204
|
+
type: DraggableDirective,
|
|
205
|
+
decorators: [{
|
|
206
|
+
type: Directive,
|
|
207
|
+
args: [{
|
|
208
|
+
selector: "[mDraggable]",
|
|
209
|
+
host: {
|
|
210
|
+
"[class.draggable]": "mDraggable()?.direction !== 'none'",
|
|
211
|
+
"[class.dragging]": "this.state.dragging",
|
|
212
|
+
"[style.position]": "mDraggable()?.direction !== 'none' ? (mDraggable()?.positionType ?? 'absolute') : null",
|
|
213
|
+
"[style.top.px]": "mDraggable()?.direction !== 'none' && mDraggable()?.direction !== 'x' ? mDraggable()?.position?.y : null",
|
|
214
|
+
"[style.left.px]": "mDraggable()?.direction !== 'none' && mDraggable()?.direction !== 'y' ? mDraggable()?.position?.x : null",
|
|
215
|
+
"[style.cursor]": "mDraggable()?.direction !== 'none' ? cursor() : null"
|
|
216
|
+
}
|
|
217
|
+
}]
|
|
218
|
+
}],
|
|
219
|
+
propDecorators: {
|
|
220
|
+
mDraggable: [{
|
|
221
|
+
type: i0.Input,
|
|
222
|
+
args: [{
|
|
223
|
+
isSignal: true,
|
|
224
|
+
alias: "mDraggable",
|
|
225
|
+
required: true
|
|
226
|
+
}]
|
|
227
|
+
}, {
|
|
228
|
+
type: i0.Output,
|
|
229
|
+
args: ["mDraggableChange"]
|
|
230
|
+
}],
|
|
231
|
+
handleSelector: [{
|
|
232
|
+
type: i0.Input,
|
|
233
|
+
args: [{
|
|
234
|
+
isSignal: true,
|
|
235
|
+
alias: "handleSelector",
|
|
236
|
+
required: false
|
|
237
|
+
}]
|
|
238
|
+
}],
|
|
239
|
+
min: [{
|
|
240
|
+
type: i0.Input,
|
|
241
|
+
args: [{
|
|
242
|
+
isSignal: true,
|
|
243
|
+
alias: "min",
|
|
244
|
+
required: false
|
|
245
|
+
}]
|
|
246
|
+
}],
|
|
247
|
+
max: [{
|
|
248
|
+
type: i0.Input,
|
|
249
|
+
args: [{
|
|
250
|
+
isSignal: true,
|
|
251
|
+
alias: "max",
|
|
252
|
+
required: false
|
|
253
|
+
}]
|
|
254
|
+
}],
|
|
255
|
+
dragStart: [{
|
|
256
|
+
type: i0.Output,
|
|
257
|
+
args: ["dragStart"]
|
|
258
|
+
}],
|
|
259
|
+
dragEnd: [{
|
|
260
|
+
type: i0.Output,
|
|
261
|
+
args: ["dragEnd"]
|
|
262
|
+
}],
|
|
263
|
+
pos: [{ type: Input }],
|
|
264
|
+
handleMouseDown: [{
|
|
265
|
+
type: HostListener,
|
|
266
|
+
args: ["mousedown", ["$event"]]
|
|
267
|
+
}],
|
|
268
|
+
handleMouseMove: [{
|
|
269
|
+
type: HostListener,
|
|
270
|
+
args: ["window:mousemove", ["$event"]]
|
|
271
|
+
}],
|
|
272
|
+
handleMouseUp: [{
|
|
273
|
+
type: HostListener,
|
|
274
|
+
args: ["window:mouseup", ["$event"]]
|
|
275
|
+
}],
|
|
276
|
+
handleTouchStart: [{
|
|
277
|
+
type: HostListener,
|
|
278
|
+
args: ["touchstart", ["$event"]]
|
|
279
|
+
}],
|
|
280
|
+
handleTouchMove: [{
|
|
281
|
+
type: HostListener,
|
|
282
|
+
args: ["window:touchmove", ["$event"]]
|
|
283
|
+
}],
|
|
284
|
+
handleTouchEnd: [{
|
|
285
|
+
type: HostListener,
|
|
286
|
+
args: ["window:touchend", ["$event"]]
|
|
287
|
+
}]
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
var DragListDirective = class DragListDirective {
|
|
291
|
+
removeOnDragOut = input(false, {
|
|
292
|
+
...ngDevMode ? { debugName: "removeOnDragOut" } : /* istanbul ignore next */ {},
|
|
293
|
+
transform: booleanAttribute
|
|
294
|
+
});
|
|
295
|
+
reordered = output();
|
|
296
|
+
removed = output();
|
|
297
|
+
draggedIndex = signal(null, ...ngDevMode ? [{ debugName: "draggedIndex" }] : /* istanbul ignore next */ []);
|
|
298
|
+
dragOverIndex = signal(null, ...ngDevMode ? [{ debugName: "dragOverIndex" }] : /* istanbul ignore next */ []);
|
|
299
|
+
#elementRef = inject(ElementRef);
|
|
300
|
+
#scrollAnimationFrameId = null;
|
|
301
|
+
#dragPointerX = 0;
|
|
302
|
+
#dragPointerY = 0;
|
|
303
|
+
#scrollContainers = [];
|
|
304
|
+
startDrag = (index, clientX, clientY) => {
|
|
305
|
+
this.draggedIndex.set(index);
|
|
306
|
+
this.#dragPointerX = clientX;
|
|
307
|
+
this.#dragPointerY = clientY;
|
|
308
|
+
this.#startScrollLoop();
|
|
309
|
+
};
|
|
310
|
+
trackPointer = (clientX, clientY) => {
|
|
311
|
+
if (clientX !== 0 || clientY !== 0) {
|
|
312
|
+
this.#dragPointerX = clientX;
|
|
313
|
+
this.#dragPointerY = clientY;
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
endDrag = () => {
|
|
317
|
+
this.draggedIndex.set(null);
|
|
318
|
+
this.dragOverIndex.set(null);
|
|
319
|
+
this.#stopScrollLoop();
|
|
320
|
+
};
|
|
321
|
+
dragEnded = (event) => {
|
|
322
|
+
const from = this.draggedIndex();
|
|
323
|
+
if (from !== null && this.removeOnDragOut() && this.#isPointerOutside(event)) {
|
|
324
|
+
this.endDrag();
|
|
325
|
+
this.removed.emit(from);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
this.endDrag();
|
|
329
|
+
};
|
|
330
|
+
#isPointerOutside = (event) => {
|
|
331
|
+
const x = event.clientX || this.#dragPointerX;
|
|
332
|
+
const y = event.clientY || this.#dragPointerY;
|
|
333
|
+
const rect = this.#elementRef.nativeElement.getBoundingClientRect();
|
|
334
|
+
return x < rect.left || x > rect.right || y < rect.top || y > rect.bottom;
|
|
335
|
+
};
|
|
336
|
+
drop = (index) => {
|
|
337
|
+
const from = this.draggedIndex();
|
|
338
|
+
this.endDrag();
|
|
339
|
+
if (from !== null && from !== index) this.reordered.emit({
|
|
340
|
+
from,
|
|
341
|
+
to: index
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
onContainerDragOver = (event) => {
|
|
345
|
+
event.preventDefault();
|
|
346
|
+
this.trackPointer(event.clientX, event.clientY);
|
|
347
|
+
};
|
|
348
|
+
#getScrollContainers = () => {
|
|
349
|
+
const list = [];
|
|
350
|
+
let el = this.#elementRef.nativeElement;
|
|
351
|
+
while (el && el !== document.body) {
|
|
352
|
+
const style = window.getComputedStyle(el);
|
|
353
|
+
const overflowY = style.overflowY || style.overflow;
|
|
354
|
+
if ((overflowY === "auto" || overflowY === "scroll" || overflowY === "hidden") && el.scrollHeight > el.clientHeight) list.push(el);
|
|
355
|
+
el = el.parentElement;
|
|
356
|
+
}
|
|
357
|
+
list.push(document.documentElement);
|
|
358
|
+
return list;
|
|
359
|
+
};
|
|
360
|
+
#startScrollLoop = () => {
|
|
361
|
+
this.#stopScrollLoop();
|
|
362
|
+
this.#scrollContainers = this.#getScrollContainers();
|
|
363
|
+
window.addEventListener("dragover", this.#onGlobalDragOver, true);
|
|
364
|
+
window.addEventListener("drag", this.#onGlobalDrag, true);
|
|
365
|
+
const loop = () => {
|
|
366
|
+
if (this.draggedIndex() === null) {
|
|
367
|
+
this.#stopScrollLoop();
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
for (const container of this.#scrollContainers) {
|
|
371
|
+
const isRoot = container === document.documentElement;
|
|
372
|
+
const rect = container.getBoundingClientRect();
|
|
373
|
+
const topThreshold = isRoot ? 150 : rect.top + 150;
|
|
374
|
+
const bottomThreshold = isRoot ? window.innerHeight - 150 : rect.bottom - 150;
|
|
375
|
+
if (this.#dragPointerY < topThreshold) {
|
|
376
|
+
const diff = topThreshold - this.#dragPointerY;
|
|
377
|
+
const speed = Math.min(25, Math.max(2, Math.floor(diff / 4)));
|
|
378
|
+
if (isRoot) window.scrollBy(0, -speed);
|
|
379
|
+
else container.scrollTop -= speed;
|
|
380
|
+
} else if (this.#dragPointerY > bottomThreshold) {
|
|
381
|
+
const diff = this.#dragPointerY - bottomThreshold;
|
|
382
|
+
const speed = Math.min(25, Math.max(2, Math.floor(diff / 4)));
|
|
383
|
+
if (isRoot) window.scrollBy(0, speed);
|
|
384
|
+
else container.scrollTop += speed;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
this.#scrollAnimationFrameId = requestAnimationFrame(loop);
|
|
388
|
+
};
|
|
389
|
+
this.#scrollAnimationFrameId = requestAnimationFrame(loop);
|
|
390
|
+
};
|
|
391
|
+
#stopScrollLoop = () => {
|
|
392
|
+
window.removeEventListener("dragover", this.#onGlobalDragOver, true);
|
|
393
|
+
window.removeEventListener("drag", this.#onGlobalDrag, true);
|
|
394
|
+
if (this.#scrollAnimationFrameId !== null) {
|
|
395
|
+
cancelAnimationFrame(this.#scrollAnimationFrameId);
|
|
396
|
+
this.#scrollAnimationFrameId = null;
|
|
397
|
+
}
|
|
398
|
+
this.#scrollContainers = [];
|
|
399
|
+
};
|
|
400
|
+
#onGlobalDragOver = (event) => {
|
|
401
|
+
event.preventDefault();
|
|
402
|
+
this.trackPointer(event.clientX, event.clientY);
|
|
403
|
+
};
|
|
404
|
+
#onGlobalDrag = (event) => {
|
|
405
|
+
this.trackPointer(event.clientX, event.clientY);
|
|
406
|
+
};
|
|
407
|
+
ngOnDestroy() {
|
|
408
|
+
this.#stopScrollLoop();
|
|
409
|
+
}
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
411
|
+
minVersion: "12.0.0",
|
|
412
|
+
version: "22.2.1",
|
|
413
|
+
ngImport: i0,
|
|
414
|
+
type: DragListDirective,
|
|
415
|
+
deps: [],
|
|
416
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
417
|
+
});
|
|
418
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
419
|
+
minVersion: "17.1.0",
|
|
420
|
+
version: "22.2.1",
|
|
421
|
+
type: DragListDirective,
|
|
422
|
+
isStandalone: true,
|
|
423
|
+
selector: "[mDragList]",
|
|
424
|
+
inputs: { removeOnDragOut: {
|
|
425
|
+
classPropertyName: "removeOnDragOut",
|
|
426
|
+
publicName: "removeOnDragOut",
|
|
427
|
+
isSignal: true,
|
|
428
|
+
isRequired: false,
|
|
429
|
+
transformFunction: null
|
|
430
|
+
} },
|
|
431
|
+
outputs: {
|
|
432
|
+
reordered: "reordered",
|
|
433
|
+
removed: "removed"
|
|
434
|
+
},
|
|
435
|
+
host: { listeners: { "dragover": "onContainerDragOver($event)" } },
|
|
436
|
+
ngImport: i0
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
440
|
+
minVersion: "12.0.0",
|
|
441
|
+
version: "22.2.1",
|
|
442
|
+
ngImport: i0,
|
|
443
|
+
type: DragListDirective,
|
|
444
|
+
decorators: [{
|
|
445
|
+
type: Directive,
|
|
446
|
+
args: [{
|
|
447
|
+
selector: "[mDragList]",
|
|
448
|
+
host: { "(dragover)": "onContainerDragOver($event)" }
|
|
449
|
+
}]
|
|
450
|
+
}],
|
|
451
|
+
propDecorators: {
|
|
452
|
+
removeOnDragOut: [{
|
|
453
|
+
type: i0.Input,
|
|
454
|
+
args: [{
|
|
455
|
+
isSignal: true,
|
|
456
|
+
alias: "removeOnDragOut",
|
|
457
|
+
required: false
|
|
458
|
+
}]
|
|
459
|
+
}],
|
|
460
|
+
reordered: [{
|
|
461
|
+
type: i0.Output,
|
|
462
|
+
args: ["reordered"]
|
|
463
|
+
}],
|
|
464
|
+
removed: [{
|
|
465
|
+
type: i0.Output,
|
|
466
|
+
args: ["removed"]
|
|
467
|
+
}]
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
var DragListItemDirective = class DragListItemDirective {
|
|
471
|
+
mDragListItem = input.required(...ngDevMode ? [{ debugName: "mDragListItem" }] : /* istanbul ignore next */ []);
|
|
472
|
+
#list = inject(DragListDirective);
|
|
473
|
+
#elementRef = inject(ElementRef);
|
|
474
|
+
isDragging = computed(() => this.#list.draggedIndex() === this.mDragListItem(), ...ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []);
|
|
475
|
+
isDragOver = computed(() => this.#list.dragOverIndex() === this.mDragListItem(), ...ngDevMode ? [{ debugName: "isDragOver" }] : /* istanbul ignore next */ []);
|
|
476
|
+
onDragStart = (event) => {
|
|
477
|
+
if (event.dataTransfer) {
|
|
478
|
+
event.dataTransfer.effectAllowed = "move";
|
|
479
|
+
event.dataTransfer.setData("text/plain", this.mDragListItem().toString());
|
|
480
|
+
this.#setDragGhost(event);
|
|
481
|
+
}
|
|
482
|
+
this.#list.startDrag(this.mDragListItem(), event.clientX, event.clientY);
|
|
483
|
+
};
|
|
484
|
+
#setDragGhost = (event) => {
|
|
485
|
+
const host = this.#elementRef.nativeElement;
|
|
486
|
+
const rect = host.getBoundingClientRect();
|
|
487
|
+
const padding = 24;
|
|
488
|
+
const ghost = host.cloneNode(true);
|
|
489
|
+
ghost.style.width = `${rect.width}px`;
|
|
490
|
+
ghost.style.margin = "0";
|
|
491
|
+
ghost.style.transform = "rotate(2.5deg) scale(1.04)";
|
|
492
|
+
ghost.style.boxShadow = "0 16px 40px rgba(0, 0, 0, 0.4)";
|
|
493
|
+
ghost.style.opacity = "0.95";
|
|
494
|
+
const wrapper = document.createElement("div");
|
|
495
|
+
wrapper.style.position = "fixed";
|
|
496
|
+
wrapper.style.top = "-10000px";
|
|
497
|
+
wrapper.style.left = "-10000px";
|
|
498
|
+
wrapper.style.padding = `${padding}px`;
|
|
499
|
+
wrapper.style.pointerEvents = "none";
|
|
500
|
+
wrapper.appendChild(ghost);
|
|
501
|
+
document.body.appendChild(wrapper);
|
|
502
|
+
event.dataTransfer?.setDragImage(wrapper, event.clientX - rect.left + padding, event.clientY - rect.top + padding);
|
|
503
|
+
setTimeout(() => wrapper.remove(), 0);
|
|
504
|
+
};
|
|
505
|
+
onDrag = (event) => {
|
|
506
|
+
this.#list.trackPointer(event.clientX, event.clientY);
|
|
507
|
+
};
|
|
508
|
+
onDragOver = (event) => {
|
|
509
|
+
if (this.#list.draggedIndex() === this.mDragListItem()) return;
|
|
510
|
+
event.preventDefault();
|
|
511
|
+
this.#list.trackPointer(event.clientX, event.clientY);
|
|
512
|
+
};
|
|
513
|
+
onDragEnter = () => {
|
|
514
|
+
if (this.#list.draggedIndex() === this.mDragListItem()) return;
|
|
515
|
+
this.#list.dragOverIndex.set(this.mDragListItem());
|
|
516
|
+
};
|
|
517
|
+
onDragLeave = () => {
|
|
518
|
+
if (this.#list.dragOverIndex() === this.mDragListItem()) this.#list.dragOverIndex.set(null);
|
|
519
|
+
};
|
|
520
|
+
onDragEnd = (event) => {
|
|
521
|
+
this.#list.dragEnded(event);
|
|
522
|
+
};
|
|
523
|
+
onDrop = (event) => {
|
|
524
|
+
event.preventDefault();
|
|
525
|
+
this.#list.drop(this.mDragListItem());
|
|
526
|
+
};
|
|
527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
528
|
+
minVersion: "12.0.0",
|
|
529
|
+
version: "22.2.1",
|
|
530
|
+
ngImport: i0,
|
|
531
|
+
type: DragListItemDirective,
|
|
532
|
+
deps: [],
|
|
533
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
534
|
+
});
|
|
535
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
536
|
+
minVersion: "17.1.0",
|
|
537
|
+
version: "22.2.1",
|
|
538
|
+
type: DragListItemDirective,
|
|
539
|
+
isStandalone: true,
|
|
540
|
+
selector: "[mDragListItem]",
|
|
541
|
+
inputs: { mDragListItem: {
|
|
542
|
+
classPropertyName: "mDragListItem",
|
|
543
|
+
publicName: "mDragListItem",
|
|
544
|
+
isSignal: true,
|
|
545
|
+
isRequired: true,
|
|
546
|
+
transformFunction: null
|
|
547
|
+
} },
|
|
548
|
+
host: {
|
|
549
|
+
attributes: { "draggable": "true" },
|
|
550
|
+
listeners: {
|
|
551
|
+
"dragstart": "onDragStart($event)",
|
|
552
|
+
"dragover": "onDragOver($event)",
|
|
553
|
+
"dragenter": "onDragEnter()",
|
|
554
|
+
"dragleave": "onDragLeave()",
|
|
555
|
+
"dragend": "onDragEnd($event)",
|
|
556
|
+
"drop": "onDrop($event)",
|
|
557
|
+
"drag": "onDrag($event)"
|
|
558
|
+
},
|
|
559
|
+
properties: {
|
|
560
|
+
"class.is-dragging": "isDragging()",
|
|
561
|
+
"class.is-drag-over": "isDragOver()"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
ngImport: i0
|
|
565
|
+
});
|
|
566
|
+
};
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
568
|
+
minVersion: "12.0.0",
|
|
569
|
+
version: "22.2.1",
|
|
570
|
+
ngImport: i0,
|
|
571
|
+
type: DragListItemDirective,
|
|
572
|
+
decorators: [{
|
|
573
|
+
type: Directive,
|
|
574
|
+
args: [{
|
|
575
|
+
selector: "[mDragListItem]",
|
|
576
|
+
host: {
|
|
577
|
+
draggable: "true",
|
|
578
|
+
"[class.is-dragging]": "isDragging()",
|
|
579
|
+
"[class.is-drag-over]": "isDragOver()",
|
|
580
|
+
"(dragstart)": "onDragStart($event)",
|
|
581
|
+
"(dragover)": "onDragOver($event)",
|
|
582
|
+
"(dragenter)": "onDragEnter()",
|
|
583
|
+
"(dragleave)": "onDragLeave()",
|
|
584
|
+
"(dragend)": "onDragEnd($event)",
|
|
585
|
+
"(drop)": "onDrop($event)",
|
|
586
|
+
"(drag)": "onDrag($event)"
|
|
587
|
+
}
|
|
588
|
+
}]
|
|
589
|
+
}],
|
|
590
|
+
propDecorators: { mDragListItem: [{
|
|
591
|
+
type: i0.Input,
|
|
592
|
+
args: [{
|
|
593
|
+
isSignal: true,
|
|
594
|
+
alias: "mDragListItem",
|
|
595
|
+
required: true
|
|
596
|
+
}]
|
|
597
|
+
}] }
|
|
598
|
+
});
|
|
599
|
+
var AutosizeDirective = class AutosizeDirective {
|
|
600
|
+
_el = inject(ElementRef);
|
|
601
|
+
#isDesignMode = !!inject(IS_DESIGN_MODE, { optional: true });
|
|
602
|
+
#measuredValue = null;
|
|
603
|
+
#measuredWidth = -1;
|
|
604
|
+
onInput() {
|
|
605
|
+
if (!this.#isDesignMode) this.#adjust();
|
|
606
|
+
}
|
|
607
|
+
ngAfterViewChecked() {
|
|
608
|
+
if (this.#isDesignMode) return;
|
|
609
|
+
if (this._el.nativeElement.offsetParent != null) setTimeout(this.#adjust);
|
|
610
|
+
}
|
|
611
|
+
#adjust = () => {
|
|
612
|
+
const el = this._el.nativeElement;
|
|
613
|
+
const width = el.clientWidth;
|
|
614
|
+
if (el.value === this.#measuredValue && width === this.#measuredWidth) return;
|
|
615
|
+
this.#measuredValue = el.value;
|
|
616
|
+
this.#measuredWidth = width;
|
|
617
|
+
el.style.overflow = "hidden";
|
|
618
|
+
el.style.height = "0px";
|
|
619
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
620
|
+
};
|
|
621
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
622
|
+
minVersion: "12.0.0",
|
|
623
|
+
version: "22.2.1",
|
|
624
|
+
ngImport: i0,
|
|
625
|
+
type: AutosizeDirective,
|
|
626
|
+
deps: [],
|
|
627
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
628
|
+
});
|
|
629
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
630
|
+
minVersion: "14.0.0",
|
|
631
|
+
version: "22.2.1",
|
|
632
|
+
type: AutosizeDirective,
|
|
633
|
+
isStandalone: true,
|
|
634
|
+
selector: "[mAutosize]",
|
|
635
|
+
host: { listeners: {
|
|
636
|
+
"input": "onInput()",
|
|
637
|
+
"window:resize": "onInput()"
|
|
638
|
+
} },
|
|
639
|
+
ngImport: i0
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
643
|
+
minVersion: "12.0.0",
|
|
644
|
+
version: "22.2.1",
|
|
645
|
+
ngImport: i0,
|
|
646
|
+
type: AutosizeDirective,
|
|
647
|
+
decorators: [{
|
|
648
|
+
type: Directive,
|
|
649
|
+
args: [{ selector: "[mAutosize]" }]
|
|
650
|
+
}],
|
|
651
|
+
propDecorators: { onInput: [{
|
|
652
|
+
type: HostListener,
|
|
653
|
+
args: ["input", []]
|
|
654
|
+
}, {
|
|
655
|
+
type: HostListener,
|
|
656
|
+
args: ["window:resize", []]
|
|
657
|
+
}] }
|
|
658
|
+
});
|
|
659
|
+
var FileUploadDirective = class FileUploadDirective {
|
|
660
|
+
mFileUpload = input({}, ...ngDevMode ? [{ debugName: "mFileUpload" }] : /* istanbul ignore next */ []);
|
|
661
|
+
fileSelect = output();
|
|
662
|
+
elementRef = inject(ElementRef);
|
|
663
|
+
fileInput = null;
|
|
664
|
+
openFilePicker() {
|
|
665
|
+
if (!this.fileInput) {
|
|
666
|
+
this.fileInput = document.createElement("input");
|
|
667
|
+
this.fileInput.type = "file";
|
|
668
|
+
this.fileInput.style.display = "none";
|
|
669
|
+
this.fileInput.addEventListener("change", this.onFileChange);
|
|
670
|
+
this.elementRef.nativeElement.appendChild(this.fileInput);
|
|
671
|
+
}
|
|
672
|
+
const config = this.mFileUpload();
|
|
673
|
+
this.fileInput.accept = config.accept?.join(",") ?? "*";
|
|
674
|
+
this.fileInput.multiple = config.multiple ?? false;
|
|
675
|
+
this.fileInput.click();
|
|
676
|
+
}
|
|
677
|
+
onFileChange = (event) => {
|
|
678
|
+
const input = event.target;
|
|
679
|
+
const files = Array.from(input.files ?? []);
|
|
680
|
+
if (files.length === 0) return;
|
|
681
|
+
const maxSize = this.mFileUpload().maxSize;
|
|
682
|
+
const validFiles = maxSize ? files.filter((f) => f.size <= maxSize) : files;
|
|
683
|
+
if (validFiles.length > 0) this.fileSelect.emit({ files: validFiles });
|
|
684
|
+
input.value = "";
|
|
685
|
+
};
|
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
687
|
+
minVersion: "12.0.0",
|
|
688
|
+
version: "22.2.1",
|
|
689
|
+
ngImport: i0,
|
|
690
|
+
type: FileUploadDirective,
|
|
691
|
+
deps: [],
|
|
692
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
693
|
+
});
|
|
694
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
695
|
+
minVersion: "17.1.0",
|
|
696
|
+
version: "22.2.1",
|
|
697
|
+
type: FileUploadDirective,
|
|
698
|
+
isStandalone: true,
|
|
699
|
+
selector: "[mFileUpload]",
|
|
700
|
+
inputs: { mFileUpload: {
|
|
701
|
+
classPropertyName: "mFileUpload",
|
|
702
|
+
publicName: "mFileUpload",
|
|
703
|
+
isSignal: true,
|
|
704
|
+
isRequired: false,
|
|
705
|
+
transformFunction: null
|
|
706
|
+
} },
|
|
707
|
+
outputs: { fileSelect: "fileSelect" },
|
|
708
|
+
host: {
|
|
709
|
+
listeners: { "click": "openFilePicker()" },
|
|
710
|
+
properties: { "style.cursor": "\"pointer\"" }
|
|
711
|
+
},
|
|
712
|
+
ngImport: i0
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
716
|
+
minVersion: "12.0.0",
|
|
717
|
+
version: "22.2.1",
|
|
718
|
+
ngImport: i0,
|
|
719
|
+
type: FileUploadDirective,
|
|
720
|
+
decorators: [{
|
|
721
|
+
type: Directive,
|
|
722
|
+
args: [{
|
|
723
|
+
selector: "[mFileUpload]",
|
|
724
|
+
host: { "[style.cursor]": "\"pointer\"" }
|
|
725
|
+
}]
|
|
726
|
+
}],
|
|
727
|
+
propDecorators: {
|
|
728
|
+
mFileUpload: [{
|
|
729
|
+
type: i0.Input,
|
|
730
|
+
args: [{
|
|
731
|
+
isSignal: true,
|
|
732
|
+
alias: "mFileUpload",
|
|
733
|
+
required: false
|
|
734
|
+
}]
|
|
735
|
+
}],
|
|
736
|
+
fileSelect: [{
|
|
737
|
+
type: i0.Output,
|
|
738
|
+
args: ["fileSelect"]
|
|
739
|
+
}],
|
|
740
|
+
openFilePicker: [{
|
|
741
|
+
type: HostListener,
|
|
742
|
+
args: ["click"]
|
|
743
|
+
}]
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
var ToolTipDirective = class ToolTipDirective {
|
|
747
|
+
mToolTip = input("", ...ngDevMode ? [{ debugName: "mToolTip" }] : /* istanbul ignore next */ []);
|
|
748
|
+
elementRef = inject(ElementRef);
|
|
749
|
+
tooltipElement = null;
|
|
750
|
+
showTooltip() {
|
|
751
|
+
const text = this.mToolTip();
|
|
752
|
+
if (!text) return;
|
|
753
|
+
this.tooltipElement = document.createElement("div");
|
|
754
|
+
this.tooltipElement.textContent = text;
|
|
755
|
+
Object.assign(this.tooltipElement.style, {
|
|
756
|
+
position: "fixed",
|
|
757
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
758
|
+
color: "#fff",
|
|
759
|
+
padding: "4px 8px",
|
|
760
|
+
borderRadius: "4px",
|
|
761
|
+
fontSize: "12px",
|
|
762
|
+
zIndex: "10000",
|
|
763
|
+
pointerEvents: "none",
|
|
764
|
+
whiteSpace: "nowrap"
|
|
765
|
+
});
|
|
766
|
+
document.body.appendChild(this.tooltipElement);
|
|
767
|
+
this.positionTooltip();
|
|
768
|
+
}
|
|
769
|
+
hideTooltip() {
|
|
770
|
+
this.removeTooltip();
|
|
771
|
+
}
|
|
772
|
+
ngOnDestroy() {
|
|
773
|
+
this.removeTooltip();
|
|
774
|
+
}
|
|
775
|
+
positionTooltip() {
|
|
776
|
+
if (!this.tooltipElement) return;
|
|
777
|
+
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
778
|
+
const tooltipRect = this.tooltipElement.getBoundingClientRect();
|
|
779
|
+
this.tooltipElement.style.left = `${rect.left + rect.width / 2 - tooltipRect.width / 2}px`;
|
|
780
|
+
this.tooltipElement.style.top = `${rect.top - tooltipRect.height - 6}px`;
|
|
781
|
+
}
|
|
782
|
+
removeTooltip() {
|
|
783
|
+
this.tooltipElement?.remove();
|
|
784
|
+
this.tooltipElement = null;
|
|
785
|
+
}
|
|
786
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
787
|
+
minVersion: "12.0.0",
|
|
788
|
+
version: "22.2.1",
|
|
789
|
+
ngImport: i0,
|
|
790
|
+
type: ToolTipDirective,
|
|
791
|
+
deps: [],
|
|
792
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
793
|
+
});
|
|
794
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
795
|
+
minVersion: "17.1.0",
|
|
796
|
+
version: "22.2.1",
|
|
797
|
+
type: ToolTipDirective,
|
|
798
|
+
isStandalone: true,
|
|
799
|
+
selector: "[mToolTip]",
|
|
800
|
+
inputs: { mToolTip: {
|
|
801
|
+
classPropertyName: "mToolTip",
|
|
802
|
+
publicName: "mToolTip",
|
|
803
|
+
isSignal: true,
|
|
804
|
+
isRequired: false,
|
|
805
|
+
transformFunction: null
|
|
806
|
+
} },
|
|
807
|
+
host: { listeners: {
|
|
808
|
+
"mouseenter": "showTooltip()",
|
|
809
|
+
"mouseleave": "hideTooltip()"
|
|
810
|
+
} },
|
|
811
|
+
ngImport: i0
|
|
812
|
+
});
|
|
813
|
+
};
|
|
814
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
815
|
+
minVersion: "12.0.0",
|
|
816
|
+
version: "22.2.1",
|
|
817
|
+
ngImport: i0,
|
|
818
|
+
type: ToolTipDirective,
|
|
819
|
+
decorators: [{
|
|
820
|
+
type: Directive,
|
|
821
|
+
args: [{ selector: "[mToolTip]" }]
|
|
822
|
+
}],
|
|
823
|
+
propDecorators: {
|
|
824
|
+
mToolTip: [{
|
|
825
|
+
type: i0.Input,
|
|
826
|
+
args: [{
|
|
827
|
+
isSignal: true,
|
|
828
|
+
alias: "mToolTip",
|
|
829
|
+
required: false
|
|
830
|
+
}]
|
|
831
|
+
}],
|
|
832
|
+
showTooltip: [{
|
|
833
|
+
type: HostListener,
|
|
834
|
+
args: ["mouseenter"]
|
|
835
|
+
}],
|
|
836
|
+
hideTooltip: [{
|
|
837
|
+
type: HostListener,
|
|
838
|
+
args: ["mouseleave"]
|
|
839
|
+
}]
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
var PositionDirective = class PositionDirective {
|
|
843
|
+
el = inject(ElementRef);
|
|
844
|
+
direction = signal("below", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
845
|
+
detect() {
|
|
846
|
+
const rect = this.el.nativeElement.getBoundingClientRect();
|
|
847
|
+
const spaces = {
|
|
848
|
+
below: window.innerHeight - rect.bottom,
|
|
849
|
+
above: rect.top,
|
|
850
|
+
right: window.innerWidth - rect.right,
|
|
851
|
+
left: rect.left
|
|
852
|
+
};
|
|
853
|
+
const best = Object.entries(spaces).reduce((best, [dir, space]) => space > best.space ? {
|
|
854
|
+
dir,
|
|
855
|
+
space
|
|
856
|
+
} : best, {
|
|
857
|
+
dir: "below",
|
|
858
|
+
space: spaces.below
|
|
859
|
+
});
|
|
860
|
+
this.direction.set(best.dir);
|
|
861
|
+
}
|
|
862
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
863
|
+
minVersion: "12.0.0",
|
|
864
|
+
version: "22.2.1",
|
|
865
|
+
ngImport: i0,
|
|
866
|
+
type: PositionDirective,
|
|
867
|
+
deps: [],
|
|
868
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
869
|
+
});
|
|
870
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
871
|
+
minVersion: "14.0.0",
|
|
872
|
+
version: "22.2.1",
|
|
873
|
+
type: PositionDirective,
|
|
874
|
+
isStandalone: true,
|
|
875
|
+
selector: "[mPosition]",
|
|
876
|
+
host: {
|
|
877
|
+
listeners: { "mouseenter": "detect()" },
|
|
878
|
+
properties: {
|
|
879
|
+
"class.m-pos--above": "direction() === \"above\"",
|
|
880
|
+
"class.m-pos--below": "direction() === \"below\"",
|
|
881
|
+
"class.m-pos--left": "direction() === \"left\"",
|
|
882
|
+
"class.m-pos--right": "direction() === \"right\""
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
ngImport: i0
|
|
886
|
+
});
|
|
887
|
+
};
|
|
888
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
889
|
+
minVersion: "12.0.0",
|
|
890
|
+
version: "22.2.1",
|
|
891
|
+
ngImport: i0,
|
|
892
|
+
type: PositionDirective,
|
|
893
|
+
decorators: [{
|
|
894
|
+
type: Directive,
|
|
895
|
+
args: [{
|
|
896
|
+
selector: "[mPosition]",
|
|
897
|
+
host: {
|
|
898
|
+
"[class.m-pos--above]": "direction() === \"above\"",
|
|
899
|
+
"[class.m-pos--below]": "direction() === \"below\"",
|
|
900
|
+
"[class.m-pos--left]": "direction() === \"left\"",
|
|
901
|
+
"[class.m-pos--right]": "direction() === \"right\""
|
|
902
|
+
}
|
|
903
|
+
}]
|
|
904
|
+
}],
|
|
905
|
+
propDecorators: { detect: [{
|
|
906
|
+
type: HostListener,
|
|
907
|
+
args: ["mouseenter"]
|
|
908
|
+
}] }
|
|
909
|
+
});
|
|
910
|
+
var HighlightDirective = class HighlightDirective {
|
|
911
|
+
mHighlight = input("", ...ngDevMode ? [{ debugName: "mHighlight" }] : /* istanbul ignore next */ []);
|
|
912
|
+
mHighlightText = input("", ...ngDevMode ? [{ debugName: "mHighlightText" }] : /* istanbul ignore next */ []);
|
|
913
|
+
el = inject(ElementRef);
|
|
914
|
+
constructor() {
|
|
915
|
+
afterRenderEffect(() => {
|
|
916
|
+
const query = this.mHighlight().trim();
|
|
917
|
+
const text = this.mHighlightText();
|
|
918
|
+
if (!query) {
|
|
919
|
+
this.el.nativeElement.innerHTML = this.escapeHtml(text);
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
const escaped = query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
923
|
+
const regex = new RegExp(`(${escaped})`, "gi");
|
|
924
|
+
this.el.nativeElement.innerHTML = this.escapeHtml(text).replace(regex, "<mark class=\"m-table__highlight\">$1</mark>");
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
escapeHtml = (str) => String(str ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
928
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
929
|
+
minVersion: "12.0.0",
|
|
930
|
+
version: "22.2.1",
|
|
931
|
+
ngImport: i0,
|
|
932
|
+
type: HighlightDirective,
|
|
933
|
+
deps: [],
|
|
934
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
935
|
+
});
|
|
936
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
937
|
+
minVersion: "17.1.0",
|
|
938
|
+
version: "22.2.1",
|
|
939
|
+
type: HighlightDirective,
|
|
940
|
+
isStandalone: true,
|
|
941
|
+
selector: "[mHighlight]",
|
|
942
|
+
inputs: {
|
|
943
|
+
mHighlight: {
|
|
944
|
+
classPropertyName: "mHighlight",
|
|
945
|
+
publicName: "mHighlight",
|
|
946
|
+
isSignal: true,
|
|
947
|
+
isRequired: false,
|
|
948
|
+
transformFunction: null
|
|
949
|
+
},
|
|
950
|
+
mHighlightText: {
|
|
951
|
+
classPropertyName: "mHighlightText",
|
|
952
|
+
publicName: "mHighlightText",
|
|
953
|
+
isSignal: true,
|
|
954
|
+
isRequired: false,
|
|
955
|
+
transformFunction: null
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
ngImport: i0
|
|
959
|
+
});
|
|
960
|
+
};
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
962
|
+
minVersion: "12.0.0",
|
|
963
|
+
version: "22.2.1",
|
|
964
|
+
ngImport: i0,
|
|
965
|
+
type: HighlightDirective,
|
|
966
|
+
decorators: [{
|
|
967
|
+
type: Directive,
|
|
968
|
+
args: [{ selector: "[mHighlight]" }]
|
|
969
|
+
}],
|
|
970
|
+
ctorParameters: () => [],
|
|
971
|
+
propDecorators: {
|
|
972
|
+
mHighlight: [{
|
|
973
|
+
type: i0.Input,
|
|
974
|
+
args: [{
|
|
975
|
+
isSignal: true,
|
|
976
|
+
alias: "mHighlight",
|
|
977
|
+
required: false
|
|
978
|
+
}]
|
|
979
|
+
}],
|
|
980
|
+
mHighlightText: [{
|
|
981
|
+
type: i0.Input,
|
|
982
|
+
args: [{
|
|
983
|
+
isSignal: true,
|
|
984
|
+
alias: "mHighlightText",
|
|
985
|
+
required: false
|
|
986
|
+
}]
|
|
987
|
+
}]
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
function stringToColor(str) {
|
|
991
|
+
let hash = 0;
|
|
992
|
+
for (let i = 0; i < str.length; i++) hash = Math.imul(31, hash) + str.charCodeAt(i) | 0;
|
|
993
|
+
return `hsl(${Math.abs(hash) % 360}, ${65 + Math.abs(hash >> 8) % 20}%, ${45 + Math.abs(hash >> 16) % 15}%)`;
|
|
994
|
+
}
|
|
995
|
+
var MHeroColorDirective = class MHeroColorDirective {
|
|
996
|
+
mHeroColor = input.required(...ngDevMode ? [{ debugName: "mHeroColor" }] : /* istanbul ignore next */ []);
|
|
997
|
+
mHeroColorVar = input("--hero-accent-color", ...ngDevMode ? [{ debugName: "mHeroColorVar" }] : /* istanbul ignore next */ []);
|
|
998
|
+
#el = inject(ElementRef);
|
|
999
|
+
#renderer = inject(Renderer2);
|
|
1000
|
+
constructor() {
|
|
1001
|
+
effect(() => {
|
|
1002
|
+
const source = this.mHeroColor();
|
|
1003
|
+
const varName = this.mHeroColorVar();
|
|
1004
|
+
if (source) {
|
|
1005
|
+
const color = stringToColor(source);
|
|
1006
|
+
this.#renderer.setStyle(this.#el.nativeElement, varName, color);
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1011
|
+
minVersion: "12.0.0",
|
|
1012
|
+
version: "22.2.1",
|
|
1013
|
+
ngImport: i0,
|
|
1014
|
+
type: MHeroColorDirective,
|
|
1015
|
+
deps: [],
|
|
1016
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1017
|
+
});
|
|
1018
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1019
|
+
minVersion: "17.1.0",
|
|
1020
|
+
version: "22.2.1",
|
|
1021
|
+
type: MHeroColorDirective,
|
|
1022
|
+
isStandalone: true,
|
|
1023
|
+
selector: "[mHeroColor]",
|
|
1024
|
+
inputs: {
|
|
1025
|
+
mHeroColor: {
|
|
1026
|
+
classPropertyName: "mHeroColor",
|
|
1027
|
+
publicName: "mHeroColor",
|
|
1028
|
+
isSignal: true,
|
|
1029
|
+
isRequired: true,
|
|
1030
|
+
transformFunction: null
|
|
1031
|
+
},
|
|
1032
|
+
mHeroColorVar: {
|
|
1033
|
+
classPropertyName: "mHeroColorVar",
|
|
1034
|
+
publicName: "mHeroColorVar",
|
|
1035
|
+
isSignal: true,
|
|
1036
|
+
isRequired: false,
|
|
1037
|
+
transformFunction: null
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
ngImport: i0
|
|
1041
|
+
});
|
|
1042
|
+
};
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1044
|
+
minVersion: "12.0.0",
|
|
1045
|
+
version: "22.2.1",
|
|
1046
|
+
ngImport: i0,
|
|
1047
|
+
type: MHeroColorDirective,
|
|
1048
|
+
decorators: [{
|
|
1049
|
+
type: Directive,
|
|
1050
|
+
args: [{ selector: "[mHeroColor]" }]
|
|
1051
|
+
}],
|
|
1052
|
+
ctorParameters: () => [],
|
|
1053
|
+
propDecorators: {
|
|
1054
|
+
mHeroColor: [{
|
|
1055
|
+
type: i0.Input,
|
|
1056
|
+
args: [{
|
|
1057
|
+
isSignal: true,
|
|
1058
|
+
alias: "mHeroColor",
|
|
1059
|
+
required: true
|
|
1060
|
+
}]
|
|
1061
|
+
}],
|
|
1062
|
+
mHeroColorVar: [{
|
|
1063
|
+
type: i0.Input,
|
|
1064
|
+
args: [{
|
|
1065
|
+
isSignal: true,
|
|
1066
|
+
alias: "mHeroColorVar",
|
|
1067
|
+
required: false
|
|
1068
|
+
}]
|
|
1069
|
+
}]
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
const SPACING_INWARD = new InjectionToken("SPACING_INWARD");
|
|
1073
|
+
const isBlank = (value) => value === void 0 || value === null || typeof value === "string" && value.trim() === "";
|
|
1074
|
+
const axis = (own, shorthand) => resolveSpacing(isBlank(own) ? shorthand : own);
|
|
1075
|
+
var PaddingDirective = class PaddingDirective {
|
|
1076
|
+
mPadding = input(void 0, ...ngDevMode ? [{ debugName: "mPadding" }] : /* istanbul ignore next */ []);
|
|
1077
|
+
mPaddingX = input(void 0, ...ngDevMode ? [{ debugName: "mPaddingX" }] : /* istanbul ignore next */ []);
|
|
1078
|
+
mPaddingY = input(void 0, ...ngDevMode ? [{ debugName: "mPaddingY" }] : /* istanbul ignore next */ []);
|
|
1079
|
+
inward = !!inject(SPACING_INWARD, {
|
|
1080
|
+
self: true,
|
|
1081
|
+
optional: true
|
|
1082
|
+
})?.padding;
|
|
1083
|
+
inline = computed(() => axis(this.mPaddingX(), this.mPadding()), ...ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []);
|
|
1084
|
+
block = computed(() => axis(this.mPaddingY(), this.mPadding()), ...ngDevMode ? [{ debugName: "block" }] : /* istanbul ignore next */ []);
|
|
1085
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1086
|
+
minVersion: "12.0.0",
|
|
1087
|
+
version: "22.2.1",
|
|
1088
|
+
ngImport: i0,
|
|
1089
|
+
type: PaddingDirective,
|
|
1090
|
+
deps: [],
|
|
1091
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1092
|
+
});
|
|
1093
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1094
|
+
minVersion: "17.1.0",
|
|
1095
|
+
version: "22.2.1",
|
|
1096
|
+
type: PaddingDirective,
|
|
1097
|
+
isStandalone: true,
|
|
1098
|
+
selector: "[mPadding],[mPaddingX],[mPaddingY]",
|
|
1099
|
+
inputs: {
|
|
1100
|
+
mPadding: {
|
|
1101
|
+
classPropertyName: "mPadding",
|
|
1102
|
+
publicName: "mPadding",
|
|
1103
|
+
isSignal: true,
|
|
1104
|
+
isRequired: false,
|
|
1105
|
+
transformFunction: null
|
|
1106
|
+
},
|
|
1107
|
+
mPaddingX: {
|
|
1108
|
+
classPropertyName: "mPaddingX",
|
|
1109
|
+
publicName: "mPaddingX",
|
|
1110
|
+
isSignal: true,
|
|
1111
|
+
isRequired: false,
|
|
1112
|
+
transformFunction: null
|
|
1113
|
+
},
|
|
1114
|
+
mPaddingY: {
|
|
1115
|
+
classPropertyName: "mPaddingY",
|
|
1116
|
+
publicName: "mPaddingY",
|
|
1117
|
+
isSignal: true,
|
|
1118
|
+
isRequired: false,
|
|
1119
|
+
transformFunction: null
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
host: {
|
|
1123
|
+
properties: {
|
|
1124
|
+
"style.--m-padding-inline": "inline()",
|
|
1125
|
+
"style.--m-padding-block": "block()",
|
|
1126
|
+
"style.padding-inline": "inward ? null : inline()",
|
|
1127
|
+
"style.padding-block": "inward ? null : block()"
|
|
1128
|
+
},
|
|
1129
|
+
classAttribute: "m-padded"
|
|
1130
|
+
},
|
|
1131
|
+
ngImport: i0
|
|
1132
|
+
});
|
|
1133
|
+
};
|
|
1134
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1135
|
+
minVersion: "12.0.0",
|
|
1136
|
+
version: "22.2.1",
|
|
1137
|
+
ngImport: i0,
|
|
1138
|
+
type: PaddingDirective,
|
|
1139
|
+
decorators: [{
|
|
1140
|
+
type: Directive,
|
|
1141
|
+
args: [{
|
|
1142
|
+
selector: "[mPadding],[mPaddingX],[mPaddingY]",
|
|
1143
|
+
host: {
|
|
1144
|
+
class: "m-padded",
|
|
1145
|
+
"[style.--m-padding-inline]": "inline()",
|
|
1146
|
+
"[style.--m-padding-block]": "block()",
|
|
1147
|
+
"[style.padding-inline]": "inward ? null : inline()",
|
|
1148
|
+
"[style.padding-block]": "inward ? null : block()"
|
|
1149
|
+
}
|
|
1150
|
+
}]
|
|
1151
|
+
}],
|
|
1152
|
+
propDecorators: {
|
|
1153
|
+
mPadding: [{
|
|
1154
|
+
type: i0.Input,
|
|
1155
|
+
args: [{
|
|
1156
|
+
isSignal: true,
|
|
1157
|
+
alias: "mPadding",
|
|
1158
|
+
required: false
|
|
1159
|
+
}]
|
|
1160
|
+
}],
|
|
1161
|
+
mPaddingX: [{
|
|
1162
|
+
type: i0.Input,
|
|
1163
|
+
args: [{
|
|
1164
|
+
isSignal: true,
|
|
1165
|
+
alias: "mPaddingX",
|
|
1166
|
+
required: false
|
|
1167
|
+
}]
|
|
1168
|
+
}],
|
|
1169
|
+
mPaddingY: [{
|
|
1170
|
+
type: i0.Input,
|
|
1171
|
+
args: [{
|
|
1172
|
+
isSignal: true,
|
|
1173
|
+
alias: "mPaddingY",
|
|
1174
|
+
required: false
|
|
1175
|
+
}]
|
|
1176
|
+
}]
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
var MarginDirective = class MarginDirective {
|
|
1180
|
+
mMargin = input(void 0, ...ngDevMode ? [{ debugName: "mMargin" }] : /* istanbul ignore next */ []);
|
|
1181
|
+
mMarginX = input(void 0, ...ngDevMode ? [{ debugName: "mMarginX" }] : /* istanbul ignore next */ []);
|
|
1182
|
+
mMarginY = input(void 0, ...ngDevMode ? [{ debugName: "mMarginY" }] : /* istanbul ignore next */ []);
|
|
1183
|
+
inward = !!inject(SPACING_INWARD, {
|
|
1184
|
+
self: true,
|
|
1185
|
+
optional: true
|
|
1186
|
+
})?.margin;
|
|
1187
|
+
inline = computed(() => axis(this.mMarginX(), this.mMargin()), ...ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []);
|
|
1188
|
+
block = computed(() => axis(this.mMarginY(), this.mMargin()), ...ngDevMode ? [{ debugName: "block" }] : /* istanbul ignore next */ []);
|
|
1189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1190
|
+
minVersion: "12.0.0",
|
|
1191
|
+
version: "22.2.1",
|
|
1192
|
+
ngImport: i0,
|
|
1193
|
+
type: MarginDirective,
|
|
1194
|
+
deps: [],
|
|
1195
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1196
|
+
});
|
|
1197
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1198
|
+
minVersion: "17.1.0",
|
|
1199
|
+
version: "22.2.1",
|
|
1200
|
+
type: MarginDirective,
|
|
1201
|
+
isStandalone: true,
|
|
1202
|
+
selector: "[mMargin],[mMarginX],[mMarginY]",
|
|
1203
|
+
inputs: {
|
|
1204
|
+
mMargin: {
|
|
1205
|
+
classPropertyName: "mMargin",
|
|
1206
|
+
publicName: "mMargin",
|
|
1207
|
+
isSignal: true,
|
|
1208
|
+
isRequired: false,
|
|
1209
|
+
transformFunction: null
|
|
1210
|
+
},
|
|
1211
|
+
mMarginX: {
|
|
1212
|
+
classPropertyName: "mMarginX",
|
|
1213
|
+
publicName: "mMarginX",
|
|
1214
|
+
isSignal: true,
|
|
1215
|
+
isRequired: false,
|
|
1216
|
+
transformFunction: null
|
|
1217
|
+
},
|
|
1218
|
+
mMarginY: {
|
|
1219
|
+
classPropertyName: "mMarginY",
|
|
1220
|
+
publicName: "mMarginY",
|
|
1221
|
+
isSignal: true,
|
|
1222
|
+
isRequired: false,
|
|
1223
|
+
transformFunction: null
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
host: {
|
|
1227
|
+
properties: {
|
|
1228
|
+
"style.--m-margin-inline": "inline()",
|
|
1229
|
+
"style.--m-margin-block": "block()",
|
|
1230
|
+
"style.margin-inline": "inward ? null : inline()",
|
|
1231
|
+
"style.margin-block": "block()"
|
|
1232
|
+
},
|
|
1233
|
+
classAttribute: "m-spaced"
|
|
1234
|
+
},
|
|
1235
|
+
ngImport: i0
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
1238
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1239
|
+
minVersion: "12.0.0",
|
|
1240
|
+
version: "22.2.1",
|
|
1241
|
+
ngImport: i0,
|
|
1242
|
+
type: MarginDirective,
|
|
1243
|
+
decorators: [{
|
|
1244
|
+
type: Directive,
|
|
1245
|
+
args: [{
|
|
1246
|
+
selector: "[mMargin],[mMarginX],[mMarginY]",
|
|
1247
|
+
host: {
|
|
1248
|
+
class: "m-spaced",
|
|
1249
|
+
"[style.--m-margin-inline]": "inline()",
|
|
1250
|
+
"[style.--m-margin-block]": "block()",
|
|
1251
|
+
"[style.margin-inline]": "inward ? null : inline()",
|
|
1252
|
+
"[style.margin-block]": "block()"
|
|
1253
|
+
}
|
|
1254
|
+
}]
|
|
1255
|
+
}],
|
|
1256
|
+
propDecorators: {
|
|
1257
|
+
mMargin: [{
|
|
1258
|
+
type: i0.Input,
|
|
1259
|
+
args: [{
|
|
1260
|
+
isSignal: true,
|
|
1261
|
+
alias: "mMargin",
|
|
1262
|
+
required: false
|
|
1263
|
+
}]
|
|
1264
|
+
}],
|
|
1265
|
+
mMarginX: [{
|
|
1266
|
+
type: i0.Input,
|
|
1267
|
+
args: [{
|
|
1268
|
+
isSignal: true,
|
|
1269
|
+
alias: "mMarginX",
|
|
1270
|
+
required: false
|
|
1271
|
+
}]
|
|
1272
|
+
}],
|
|
1273
|
+
mMarginY: [{
|
|
1274
|
+
type: i0.Input,
|
|
1275
|
+
args: [{
|
|
1276
|
+
isSignal: true,
|
|
1277
|
+
alias: "mMarginY",
|
|
1278
|
+
required: false
|
|
1279
|
+
}]
|
|
1280
|
+
}]
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
export { stringToColor as a, ToolTipDirective as c, DragListItemDirective as d, DragListDirective as f, MHeroColorDirective as i, FileUploadDirective as l, PaddingDirective as n, HighlightDirective as o, DraggableDirective as p, SPACING_INWARD as r, PositionDirective as s, MarginDirective as t, AutosizeDirective as u };
|
|
1284
|
+
|
|
1285
|
+
//# sourceMappingURL=magmonium-one-directives-DOBENX_K.mjs.map
|