ember-sortable 5.1.2 → 5.2.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/{addon-main.js → addon-main.cjs} +2 -0
- package/declarations/modifiers/sortable-group.d.ts +326 -0
- package/declarations/modifiers/sortable-group.d.ts.map +1 -0
- package/declarations/modifiers/sortable-handle.d.ts +24 -0
- package/declarations/modifiers/sortable-handle.d.ts.map +1 -0
- package/declarations/modifiers/sortable-item.d.ts +346 -0
- package/declarations/modifiers/sortable-item.d.ts.map +1 -0
- package/declarations/services/ember-sortable-internal-state.d.ts +58 -0
- package/declarations/services/ember-sortable-internal-state.d.ts.map +1 -0
- package/declarations/system/scroll-container.d.ts +18 -0
- package/declarations/system/scroll-container.d.ts.map +1 -0
- package/declarations/system/scroll-parent.d.ts +2 -0
- package/declarations/system/scroll-parent.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +9 -0
- package/declarations/template-registry.d.ts.map +1 -0
- package/declarations/test-support/helpers/drag.d.ts +37 -0
- package/declarations/test-support/helpers/drag.d.ts.map +1 -0
- package/declarations/test-support/helpers/reorder.d.ts +25 -0
- package/declarations/test-support/helpers/reorder.d.ts.map +1 -0
- package/declarations/test-support/index.d.ts +5 -0
- package/declarations/test-support/index.d.ts.map +1 -0
- package/declarations/test-support/utils/keyboard.d.ts +17 -0
- package/declarations/test-support/utils/keyboard.d.ts.map +1 -0
- package/declarations/test-support/utils/offset.d.ts +11 -0
- package/declarations/test-support/utils/offset.d.ts.map +1 -0
- package/declarations/utils/constant.d.ts +11 -0
- package/declarations/utils/constant.d.ts.map +1 -0
- package/declarations/utils/coordinate.d.ts +17 -0
- package/declarations/utils/coordinate.d.ts.map +1 -0
- package/declarations/utils/css-calculation.d.ts +13 -0
- package/declarations/utils/css-calculation.d.ts.map +1 -0
- package/declarations/utils/defaults.d.ts +23 -0
- package/declarations/utils/defaults.d.ts.map +1 -0
- package/declarations/utils/keyboard.d.ts +17 -0
- package/declarations/utils/keyboard.d.ts.map +1 -0
- package/dist/{_rollupPluginBabelHelpers-543b1c36.js → _rollupPluginBabelHelpers-a7bede49.js} +2 -2
- package/dist/_rollupPluginBabelHelpers-a7bede49.js.map +1 -0
- package/dist/modifiers/sortable-group.js +63 -30
- package/dist/modifiers/sortable-group.js.map +1 -1
- package/dist/modifiers/sortable-handle.js +4 -4
- package/dist/modifiers/sortable-handle.js.map +1 -1
- package/dist/modifiers/sortable-item.js +187 -80
- package/dist/modifiers/sortable-item.js.map +1 -1
- package/dist/services/ember-sortable-internal-state.js +11 -5
- package/dist/services/ember-sortable-internal-state.js.map +1 -1
- package/dist/test-support/helpers/drag.js +4 -1
- package/dist/test-support/helpers/drag.js.map +1 -1
- package/dist/test-support/helpers/reorder.js +12 -2
- package/dist/test-support/helpers/reorder.js.map +1 -1
- package/dist/test-support/utils/keyboard.js.map +1 -1
- package/dist/test-support/utils/offset.js.map +1 -1
- package/dist/utils/constant.js.map +1 -1
- package/dist/utils/coordinate.js +4 -4
- package/dist/utils/coordinate.js.map +1 -1
- package/dist/utils/css-calculation.js +4 -4
- package/dist/utils/css-calculation.js.map +1 -1
- package/dist/utils/defaults.js.map +1 -1
- package/dist/utils/keyboard.js.map +1 -1
- package/package.json +91 -26
- package/dist/_rollupPluginBabelHelpers-543b1c36.js.map +0 -1
- package/dist/system/scroll-container.js +0 -54
- package/dist/system/scroll-container.js.map +0 -1
- package/dist/system/scroll-parent.js +0 -35
- package/dist/system/scroll-parent.js.map +0 -1
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import Modifier from 'ember-modifier';
|
|
2
|
+
import type { ArgsFor, PositionalArgs, NamedArgs } from 'ember-modifier';
|
|
3
|
+
import type EmberSortableService from '../services/ember-sortable-internal-state.ts';
|
|
4
|
+
import type Owner from '@ember/owner';
|
|
5
|
+
import type { Group } from '../services/ember-sortable-internal-state.ts';
|
|
6
|
+
import type SortableGroupModifier from './sortable-group.ts';
|
|
7
|
+
import type { TDirection } from './sortable-group.ts';
|
|
8
|
+
export interface MoveDirection {
|
|
9
|
+
left: boolean;
|
|
10
|
+
right: boolean;
|
|
11
|
+
top: boolean;
|
|
12
|
+
bottom: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface FakeEvent {
|
|
15
|
+
pageX: number;
|
|
16
|
+
pageY: number;
|
|
17
|
+
clientX: number;
|
|
18
|
+
clientY: number;
|
|
19
|
+
}
|
|
20
|
+
export interface SortableItemModifierSignature<T> {
|
|
21
|
+
Args: {
|
|
22
|
+
Named: {
|
|
23
|
+
model: T;
|
|
24
|
+
groupName?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
updateInterval?: number;
|
|
27
|
+
spacing?: number;
|
|
28
|
+
isDraggingDisabled?: boolean;
|
|
29
|
+
handle?: string;
|
|
30
|
+
distance?: number;
|
|
31
|
+
disableCheckScrollBounds?: boolean;
|
|
32
|
+
onDragStart?: (item: T) => void;
|
|
33
|
+
onDragStop?: (item: T) => void;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
Element: HTMLElement;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Modifier to mark an element as an item to be reordered
|
|
40
|
+
*
|
|
41
|
+
* @param {Object} model The model that this item will represent
|
|
42
|
+
* @param {boolean} [disabled=false] Set to true to make this item not sortable
|
|
43
|
+
* @param {Function} [onDragStart] An optional callback for when dragging starts.
|
|
44
|
+
* @param {Function} [onDragStop] An optional callback for when dragging stops.
|
|
45
|
+
*
|
|
46
|
+
* @module drag-drop/draggable-group
|
|
47
|
+
* @example
|
|
48
|
+
* <ol {{sortable-group onChange=this.update a11yAnnouncementConfig=this.myA11yConfig}}>
|
|
49
|
+
* {{#each model.items as |item|}}
|
|
50
|
+
* <li {{sortable-item model=item}}>
|
|
51
|
+
* {{item.name}}
|
|
52
|
+
* <span class="handle" {{sortable-handle}}>↕</span>
|
|
53
|
+
* </li>
|
|
54
|
+
* {{/each}}
|
|
55
|
+
* </ol>
|
|
56
|
+
*/
|
|
57
|
+
export default class SortableItemModifier<T> extends Modifier<SortableItemModifierSignature<T>> {
|
|
58
|
+
className: string;
|
|
59
|
+
sortableService: EmberSortableService<T>;
|
|
60
|
+
startEvent?: FakeEvent | Event;
|
|
61
|
+
_sortableGroup?: Group<T>;
|
|
62
|
+
_x?: number;
|
|
63
|
+
_y?: number;
|
|
64
|
+
_dragOriginX?: number;
|
|
65
|
+
_dragOriginY?: number;
|
|
66
|
+
_pageX?: number;
|
|
67
|
+
_pageY?: number;
|
|
68
|
+
/**
|
|
69
|
+
* The SortableGroupModifier this item belongs to. Assigned by the group
|
|
70
|
+
* when it inspects all the items in the list
|
|
71
|
+
*
|
|
72
|
+
* @type SortableGroupModifier
|
|
73
|
+
*/
|
|
74
|
+
get sortableGroup(): SortableGroupModifier<T>;
|
|
75
|
+
get model(): T;
|
|
76
|
+
get direction(): TDirection;
|
|
77
|
+
get groupDisabled(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* This is the group name used to keep groups separate if there are more than one on the screen at a time.
|
|
80
|
+
* If no group is assigned a default is used
|
|
81
|
+
*
|
|
82
|
+
* @default "_EmberSortableGroup"
|
|
83
|
+
* @returns {string}
|
|
84
|
+
*/
|
|
85
|
+
get groupName(): string;
|
|
86
|
+
/**
|
|
87
|
+
The frequency with which the group is informed
|
|
88
|
+
that an update is required.
|
|
89
|
+
@property updateInterval
|
|
90
|
+
@type Number
|
|
91
|
+
@default 125
|
|
92
|
+
*/
|
|
93
|
+
get updateInterval(): number;
|
|
94
|
+
/**
|
|
95
|
+
Additional spacing between active item and the rest of the elements.
|
|
96
|
+
@property spacing
|
|
97
|
+
@type Number
|
|
98
|
+
@default 0[px]
|
|
99
|
+
*/
|
|
100
|
+
get spacing(): number;
|
|
101
|
+
/**
|
|
102
|
+
Removes the ability for the current item to be sorted
|
|
103
|
+
@property disabled
|
|
104
|
+
@type boolean
|
|
105
|
+
@default false
|
|
106
|
+
*/
|
|
107
|
+
get isDisabled(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
Selector for the element to use as handle.
|
|
110
|
+
1. By default, we will hook it the yielded sortable-handle.
|
|
111
|
+
2. If you don't use the sortable-handle, the entire element will be used as the handle.
|
|
112
|
+
3. In very rare situations, if you want to use a handle, but not the sortable-handle,
|
|
113
|
+
you can override this class with your own handle's selector. This behavior will be
|
|
114
|
+
synonymous with v1
|
|
115
|
+
@property handle
|
|
116
|
+
@type String
|
|
117
|
+
@default "[data-sortable-handle]"
|
|
118
|
+
*/
|
|
119
|
+
get handle(): string;
|
|
120
|
+
handleElement?: HTMLElement | null;
|
|
121
|
+
/**
|
|
122
|
+
* Tolerance, in pixels, for when sorting should start.
|
|
123
|
+
* If specified, sorting will not start until after mouse
|
|
124
|
+
* is dragged beyond distance. Can be used to allow for clicks
|
|
125
|
+
* on elements within a handle.
|
|
126
|
+
*
|
|
127
|
+
* @property distance
|
|
128
|
+
* @type Integer
|
|
129
|
+
* @default 0
|
|
130
|
+
*/
|
|
131
|
+
get distance(): number;
|
|
132
|
+
/**
|
|
133
|
+
* True if the item is currently being dragged.
|
|
134
|
+
*
|
|
135
|
+
* @property isDragging
|
|
136
|
+
* @type boolean
|
|
137
|
+
* @default false
|
|
138
|
+
* @protected
|
|
139
|
+
*/
|
|
140
|
+
_isDragging: boolean;
|
|
141
|
+
get isDragging(): boolean;
|
|
142
|
+
set isDragging(value: boolean);
|
|
143
|
+
/**
|
|
144
|
+
* Gives info in which direction the element will be moved
|
|
145
|
+
*
|
|
146
|
+
* @property moveDirection
|
|
147
|
+
* @type Object
|
|
148
|
+
*/
|
|
149
|
+
get moveDirection(): MoveDirection;
|
|
150
|
+
/**
|
|
151
|
+
Action that fires when the item starts being dragged.
|
|
152
|
+
@property onDragStart
|
|
153
|
+
@type Function
|
|
154
|
+
@param {Object} item model
|
|
155
|
+
@default null
|
|
156
|
+
*/
|
|
157
|
+
get onDragStart(): (item: T) => void;
|
|
158
|
+
/**
|
|
159
|
+
Action that fires when the item stops being dragged.
|
|
160
|
+
@property onDragStop
|
|
161
|
+
@type Function
|
|
162
|
+
@param {Object} item model
|
|
163
|
+
@default null
|
|
164
|
+
*/
|
|
165
|
+
get onDragStop(): (item: T) => void;
|
|
166
|
+
/**
|
|
167
|
+
True if the item is currently dropping.
|
|
168
|
+
@property isDropping
|
|
169
|
+
@type Boolean
|
|
170
|
+
@default false
|
|
171
|
+
*/
|
|
172
|
+
_isDropping: boolean;
|
|
173
|
+
get isDropping(): boolean;
|
|
174
|
+
set isDropping(value: boolean);
|
|
175
|
+
/**
|
|
176
|
+
True if the item was dropped during the interaction
|
|
177
|
+
@property wasDropped
|
|
178
|
+
@type Boolean
|
|
179
|
+
@default false
|
|
180
|
+
*/
|
|
181
|
+
wasDropped: boolean;
|
|
182
|
+
/**
|
|
183
|
+
@property isBusy
|
|
184
|
+
@type Boolean
|
|
185
|
+
*/
|
|
186
|
+
get isBusy(): boolean;
|
|
187
|
+
/**
|
|
188
|
+
@property disableCheckScrollBounds
|
|
189
|
+
*/
|
|
190
|
+
get disableCheckScrollBounds(): boolean;
|
|
191
|
+
/**
|
|
192
|
+
@method mouseDown
|
|
193
|
+
*/
|
|
194
|
+
mouseDown(event: MouseEvent): void;
|
|
195
|
+
keyDown(event: Event): void;
|
|
196
|
+
/**
|
|
197
|
+
@method touchStart
|
|
198
|
+
*/
|
|
199
|
+
touchStart(event: TouchEvent): void;
|
|
200
|
+
/**
|
|
201
|
+
@method freeze
|
|
202
|
+
*/
|
|
203
|
+
freeze(): void;
|
|
204
|
+
/**
|
|
205
|
+
@method reset
|
|
206
|
+
*/
|
|
207
|
+
reset(): void;
|
|
208
|
+
/**
|
|
209
|
+
@method thaw
|
|
210
|
+
*/
|
|
211
|
+
thaw(): void;
|
|
212
|
+
_prepareDragListener: () => void;
|
|
213
|
+
_cancelStartDragListener: () => void;
|
|
214
|
+
/**
|
|
215
|
+
* Setup event listeners for drag and drop
|
|
216
|
+
*
|
|
217
|
+
* @method _primeDrag
|
|
218
|
+
* @param {Event} startEvent JS Event object
|
|
219
|
+
* @private
|
|
220
|
+
*/
|
|
221
|
+
_primeDrag(startEvent: Event): void;
|
|
222
|
+
/**
|
|
223
|
+
* Prepares for the drag event
|
|
224
|
+
*
|
|
225
|
+
* @method _prepareDrag
|
|
226
|
+
* @param {Event} startEvent JS Event object
|
|
227
|
+
* @param {Event} event JS Event object
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
_prepareDrag(startEvent: MouseEvent, event: MouseEvent): void;
|
|
231
|
+
/**
|
|
232
|
+
* Start dragging & setup more event listeners
|
|
233
|
+
*
|
|
234
|
+
* @method _startDrag
|
|
235
|
+
* @param {Event} event JS Event object
|
|
236
|
+
* @private
|
|
237
|
+
*/
|
|
238
|
+
_startDrag(event: MouseEvent | TouchEvent): void;
|
|
239
|
+
/**
|
|
240
|
+
The maximum scroll speed when dragging element.
|
|
241
|
+
@property maxScrollSpeed
|
|
242
|
+
@default 20
|
|
243
|
+
*/
|
|
244
|
+
maxScrollSpeed: number;
|
|
245
|
+
_scrollOnEdges(drag: (event: FakeEvent | Event) => void): void;
|
|
246
|
+
/**
|
|
247
|
+
@method _makeDragHandler
|
|
248
|
+
@param {Event} startEvent
|
|
249
|
+
@return {Function}
|
|
250
|
+
@private
|
|
251
|
+
*/
|
|
252
|
+
_makeDragHandler(startEvent: FakeEvent | Event): (event: FakeEvent | Event) => void;
|
|
253
|
+
/**
|
|
254
|
+
@method _scheduleApplyPosition
|
|
255
|
+
@private
|
|
256
|
+
*/
|
|
257
|
+
_scheduleApplyPosition(): void;
|
|
258
|
+
/**
|
|
259
|
+
@method _applyPosition
|
|
260
|
+
@private
|
|
261
|
+
*/
|
|
262
|
+
_applyPosition(): void;
|
|
263
|
+
/**
|
|
264
|
+
@method _drag
|
|
265
|
+
@private
|
|
266
|
+
*/
|
|
267
|
+
_drag(dimensionX: number, dimensionY: number): void;
|
|
268
|
+
/**
|
|
269
|
+
@method _drop
|
|
270
|
+
@private
|
|
271
|
+
*/
|
|
272
|
+
_drop(): void;
|
|
273
|
+
/**
|
|
274
|
+
@method _preventClick
|
|
275
|
+
@private
|
|
276
|
+
*/
|
|
277
|
+
_preventClick(): void;
|
|
278
|
+
/**
|
|
279
|
+
@method _preventClickHandler
|
|
280
|
+
@private
|
|
281
|
+
*/
|
|
282
|
+
_preventClickHandler(e: Event): void;
|
|
283
|
+
/**
|
|
284
|
+
@method _waitForTransition
|
|
285
|
+
@private
|
|
286
|
+
@return Promise
|
|
287
|
+
*/
|
|
288
|
+
_waitForTransition(): import("rsvp").default.Promise<unknown>;
|
|
289
|
+
/**
|
|
290
|
+
@method _waitForTransitions
|
|
291
|
+
@private
|
|
292
|
+
@return Promise
|
|
293
|
+
*/
|
|
294
|
+
_waitForAllTransitions(): import("rsvp").default.Promise<unknown>;
|
|
295
|
+
/**
|
|
296
|
+
@method _complete
|
|
297
|
+
@private
|
|
298
|
+
*/
|
|
299
|
+
_complete(): void;
|
|
300
|
+
get isAnimated(): boolean | undefined;
|
|
301
|
+
/**
|
|
302
|
+
The current transition duration in milliseconds.
|
|
303
|
+
@property transitionDuration
|
|
304
|
+
@type Number
|
|
305
|
+
*/
|
|
306
|
+
get transitionDuration(): number;
|
|
307
|
+
/**
|
|
308
|
+
Horizontal position of the item.
|
|
309
|
+
@property x
|
|
310
|
+
@type Number
|
|
311
|
+
*/
|
|
312
|
+
get x(): number;
|
|
313
|
+
set x(value: number);
|
|
314
|
+
/**
|
|
315
|
+
Vertical position of the item relative to its offset parent.
|
|
316
|
+
@property y
|
|
317
|
+
@type Number
|
|
318
|
+
*/
|
|
319
|
+
get y(): number;
|
|
320
|
+
set y(value: number);
|
|
321
|
+
/**
|
|
322
|
+
Width of the item.
|
|
323
|
+
@property height
|
|
324
|
+
@type Number
|
|
325
|
+
*/
|
|
326
|
+
get width(): number;
|
|
327
|
+
/**
|
|
328
|
+
Height of the item including margins.
|
|
329
|
+
@property height
|
|
330
|
+
@type Number
|
|
331
|
+
*/
|
|
332
|
+
get height(): number;
|
|
333
|
+
addEventListener(): void;
|
|
334
|
+
removeEventListener(): void;
|
|
335
|
+
setupHandleElement(disabled?: boolean): void;
|
|
336
|
+
element: HTMLElement;
|
|
337
|
+
didSetup: boolean;
|
|
338
|
+
named: NamedArgs<SortableItemModifierSignature<T>>;
|
|
339
|
+
/**
|
|
340
|
+
* tracks if event listeners have been registered. Registering event handlers is unnecessary if item is disabled.
|
|
341
|
+
*/
|
|
342
|
+
listenersRegistered: boolean;
|
|
343
|
+
constructor(owner: Owner, args: ArgsFor<SortableItemModifierSignature<T>>);
|
|
344
|
+
modify(element: HTMLElement, _positional: PositionalArgs<SortableItemModifierSignature<T>>, named: NamedArgs<SortableItemModifierSignature<T>>): void;
|
|
345
|
+
}
|
|
346
|
+
//# sourceMappingURL=sortable-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-item.d.ts","sourceRoot":"","sources":["../../src/modifiers/sortable-item.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAetC,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,qBAAqB,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;CACjB;AAWD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CA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,CAAC,KAAK,EAAE,MAAM,EAKlB;IAED;;;;OAIG;IACH,IAAI,KAAK,IAAI,MAAM,CAUlB;IAED;;;;OAIG;IACH,IAAI,MAAM,IAAI,MAAM,CAiBnB;IAED,gBAAgB;IAOhB,mBAAmB;IAOnB,kBAAkB,CAAC,QAAQ,UAAQ;IAWnC,OAAO,EAAG,WAAW,CAAC;IACtB,QAAQ,UAAS;IACjB,KAAK,EAAG,SAAS,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;IAEpD;;OAEG;IACH,mBAAmB,UAAS;gBAEhB,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;IAKhE,MAAM,CACb,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,cAAc,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,EAC7D,KAAK,EAAE,SAAS,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;CAuBrD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import Service from '@ember/service';
|
|
2
|
+
import type SortableGroupModifier from '../modifiers/sortable-group';
|
|
3
|
+
import type SortableItemModifier from '../modifiers/sortable-item';
|
|
4
|
+
export interface Group<T> {
|
|
5
|
+
groupModifier: SortableGroupModifier<T> | undefined;
|
|
6
|
+
items: SortableItemModifier<T>[];
|
|
7
|
+
}
|
|
8
|
+
export default class EmberSortableService<T> extends Service {
|
|
9
|
+
/**
|
|
10
|
+
* Internal State for any groups currently in DOM
|
|
11
|
+
*
|
|
12
|
+
* {
|
|
13
|
+
* groupName: {
|
|
14
|
+
* groupModifier: object,
|
|
15
|
+
* items: []
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* @type {{}}
|
|
19
|
+
*/
|
|
20
|
+
groups: Record<string, Group<T>>;
|
|
21
|
+
/**
|
|
22
|
+
* Register a new group with the service
|
|
23
|
+
*
|
|
24
|
+
* @param {String} groupName
|
|
25
|
+
* @param {SortableGroupModifier} groupModifier
|
|
26
|
+
*/
|
|
27
|
+
registerGroup(groupName: string, groupModifier: SortableGroupModifier<T> | undefined): void;
|
|
28
|
+
/**
|
|
29
|
+
* De-register a group with the service
|
|
30
|
+
*
|
|
31
|
+
* @param {String} groupName
|
|
32
|
+
*/
|
|
33
|
+
deregisterGroup(groupName: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Register an item with this group
|
|
36
|
+
*
|
|
37
|
+
* @method registerItem
|
|
38
|
+
* @param {String} groupName
|
|
39
|
+
* @param {SortableItemModifier} item
|
|
40
|
+
*/
|
|
41
|
+
registerItem(groupName: string, item: SortableItemModifier<T>): void;
|
|
42
|
+
/**
|
|
43
|
+
De-register an item with this group.
|
|
44
|
+
|
|
45
|
+
@method deregisterItem
|
|
46
|
+
@param groupName
|
|
47
|
+
@param item
|
|
48
|
+
*/
|
|
49
|
+
deregisterItem(groupName: string, item: SortableItemModifier<T>): void;
|
|
50
|
+
/**
|
|
51
|
+
* Fetch a group definition
|
|
52
|
+
*
|
|
53
|
+
* @param {String} groupName
|
|
54
|
+
* @returns {*}
|
|
55
|
+
*/
|
|
56
|
+
fetchGroup(groupName: string): Group<T>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=ember-sortable-internal-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ember-sortable-internal-state.d.ts","sourceRoot":"","sources":["../../src/services/ember-sortable-internal-state.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,qBAAqB,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,oBAAoB,MAAM,4BAA4B,CAAC;AAEnE,MAAM,WAAW,KAAK,CAAC,CAAC;IACtB,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACpD,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,OAAO,oBAAoB,CAAC,CAAC,CAAE,SAAQ,OAAO;IAC1D;;;;;;;;;;OAUG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAM;IAEtC;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,SAAS;IAWpF;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIxC;;;;;;OAMG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAgBpE;;;;;;OAMG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAgBtE;;;;;OAKG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;CAOxC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default class ScrollContainer {
|
|
2
|
+
element: HTMLElement;
|
|
3
|
+
isWindow: boolean;
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
scrollWidth: number;
|
|
9
|
+
scrollHeight: number;
|
|
10
|
+
maxScrollTop: number;
|
|
11
|
+
maxScrollLeft: number;
|
|
12
|
+
constructor(element: HTMLElement | Document);
|
|
13
|
+
get bottom(): number;
|
|
14
|
+
get right(): number;
|
|
15
|
+
scrollTop(value?: number): number;
|
|
16
|
+
scrollLeft(value?: number): number;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=scroll-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-container.d.ts","sourceRoot":"","sources":["../../src/system/scroll-container.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;gBAEV,OAAO,EAAE,WAAW,GAAG,QAAQ;IA0B3C,IAAI,MAAM,WAET;IAED,IAAI,KAAK,WAER;IAED,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM;IASxB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM;CAQ1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-parent.d.ts","sourceRoot":"","sources":["../../src/system/scroll-parent.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,QAAQ,CAgBrE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type SortableGroupModifier from './modifiers/sortable-group';
|
|
2
|
+
import type SortableHandleModifier from './modifiers/sortable-handle';
|
|
3
|
+
import type SortableItemModifier from './modifiers/sortable-item';
|
|
4
|
+
export default interface EmberSortableRegistry {
|
|
5
|
+
'sortable-group': typeof SortableGroupModifier;
|
|
6
|
+
'sortable-handle': typeof SortableHandleModifier;
|
|
7
|
+
'sortable-item': typeof SortableItemModifier;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=template-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,qBAAqB;IAC5C,gBAAgB,EAAE,OAAO,qBAAqB,CAAC;IAC/C,iBAAiB,EAAE,OAAO,sBAAsB,CAAC;IACjD,eAAe,EAAE,OAAO,oBAAoB,CAAC;CAC9C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Drags elements by an offset specified in pixels.
|
|
3
|
+
|
|
4
|
+
Examples
|
|
5
|
+
|
|
6
|
+
drag(
|
|
7
|
+
'mouse',
|
|
8
|
+
'.some-list li[data-item=uno]',
|
|
9
|
+
function() {
|
|
10
|
+
return { dy: 50, dx: 20 };
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
@method drag
|
|
15
|
+
@param {'mouse'|'touch'} [mode]
|
|
16
|
+
event mode
|
|
17
|
+
@param {String} [itemSelector]
|
|
18
|
+
selector for the element to drag
|
|
19
|
+
@param {Function} [offsetFn]
|
|
20
|
+
function returning the offset by which to drag
|
|
21
|
+
@param {Object} [callbacks]
|
|
22
|
+
callbacks that are fired at the different stages of the interaction
|
|
23
|
+
@return {Promise}
|
|
24
|
+
*/
|
|
25
|
+
export type TMode = 'mouse' | 'touch';
|
|
26
|
+
interface Callbacks {
|
|
27
|
+
dragstart?: () => Promise<void>;
|
|
28
|
+
dragmove?: () => Promise<void>;
|
|
29
|
+
beforedragend?: () => Promise<void>;
|
|
30
|
+
dragend?: () => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare function drag(mode: TMode, itemSelector: string, offsetFn: () => {
|
|
33
|
+
dx: number;
|
|
34
|
+
dy: number;
|
|
35
|
+
}, callbacks?: Callbacks): Promise<void>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=drag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag.d.ts","sourceRoot":"","sources":["../../../src/test-support/helpers/drag.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtC,UAAU,SAAS;IACjB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,wBAAsB,IAAI,CACxB,IAAI,EAAE,KAAK,EACX,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAC1C,SAAS,GAAE,SAAc,iBAmG1B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type TMode } from './drag.ts';
|
|
2
|
+
/**
|
|
3
|
+
Reorders elements to the specified state.
|
|
4
|
+
|
|
5
|
+
Examples
|
|
6
|
+
|
|
7
|
+
reorder(
|
|
8
|
+
'mouse',
|
|
9
|
+
'.some-list li',
|
|
10
|
+
'[data-id="66278893"]',
|
|
11
|
+
'[data-id="66278894"]',
|
|
12
|
+
'[data-id="66278892"]'
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
@method reorder
|
|
16
|
+
@param {'mouse'|'touch'} [mode]
|
|
17
|
+
event mode
|
|
18
|
+
@param {String} [itemSelector]
|
|
19
|
+
selector for all items
|
|
20
|
+
@param {...String} [resultSelectors]
|
|
21
|
+
selectors for the resultant order
|
|
22
|
+
@return {Promise}
|
|
23
|
+
*/
|
|
24
|
+
export declare function reorder<T extends keyof HTMLElementTagNameMap>(mode: TMode, itemSelector: string, ...resultSelectors: T[]): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=reorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder.d.ts","sourceRoot":"","sources":["../../../src/test-support/helpers/reorder.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,KAAK,EAAE,MAAM,WAAW,CAAC;AAK7C;;;;;;;;;;;;;;;;;;;;;EAqBE;AACF,wBAAsB,OAAO,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,IAAI,EAAE,KAAK,EACX,YAAY,EAAE,MAAM,EACpB,GAAG,eAAe,EAAE,CAAC,EAAE,iBA4BxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const ENTER_KEY_CODE = 13;
|
|
2
|
+
export declare const ESCAPE_KEY_CODE = 27;
|
|
3
|
+
export declare const SPACE_KEY_CODE = 32;
|
|
4
|
+
export declare const ARROW_KEY_CODES: {
|
|
5
|
+
LEFT: number;
|
|
6
|
+
UP: number;
|
|
7
|
+
RIGHT: number;
|
|
8
|
+
DOWN: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const isEnterKey: (event: KeyboardEvent) => boolean;
|
|
11
|
+
export declare const isEscapeKey: (event: KeyboardEvent) => boolean;
|
|
12
|
+
export declare const isSpaceKey: (event: KeyboardEvent) => boolean;
|
|
13
|
+
export declare const isLeftArrowKey: (event: KeyboardEvent) => boolean;
|
|
14
|
+
export declare const isUpArrowKey: (event: KeyboardEvent) => boolean;
|
|
15
|
+
export declare const isRightArrowKey: (event: KeyboardEvent) => boolean;
|
|
16
|
+
export declare const isDownArrowKey: (event: KeyboardEvent) => boolean;
|
|
17
|
+
//# sourceMappingURL=keyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../src/test-support/utils/keyboard.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,eAAe;;;;;CAK3B,CAAC;AAQF,eAAO,MAAM,UAAU,UALQ,aAAa,YAKsB,CAAC;AACnE,eAAO,MAAM,WAAW,UANO,aAAa,YAMyB,CAAC;AACtE,eAAO,MAAM,UAAU,UAPQ,aAAa,YAOsB,CAAC;AACnE,eAAO,MAAM,cAAc,UARI,aAAa,YAQsC,CAAC;AACnF,eAAO,MAAM,YAAY,UATM,aAAa,YASgC,CAAC;AAC7E,eAAO,MAAM,eAAe,UAVG,aAAa,YAUyC,CAAC;AACtF,eAAO,MAAM,cAAc,UAXI,aAAa,YAWsC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Vanilla Javascript equivalent of JQuery's `.offset`.
|
|
2
|
+
* Reference: https://github.com/nefe/You-Dont-Need-jQuery
|
|
3
|
+
*
|
|
4
|
+
* @method getOffset
|
|
5
|
+
* @param {Element} el an element
|
|
6
|
+
*/
|
|
7
|
+
export declare function getOffset(el: Element): {
|
|
8
|
+
top: number;
|
|
9
|
+
left: number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=offset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offset.d.ts","sourceRoot":"","sources":["../../../src/test-support/utils/offset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO;;;EAOpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { A11yAnnouncementConfig } from './defaults';
|
|
2
|
+
export declare const DRAG_ACTIONS: (keyof WindowEventMap)[];
|
|
3
|
+
export declare const ELEMENT_CLICK_ACTION = "click";
|
|
4
|
+
export declare const END_ACTIONS: string[];
|
|
5
|
+
export declare const ANNOUNCEMENT_ACTION_TYPES: {
|
|
6
|
+
ACTIVATE: keyof A11yAnnouncementConfig;
|
|
7
|
+
MOVE: keyof A11yAnnouncementConfig;
|
|
8
|
+
CONFIRM: keyof A11yAnnouncementConfig;
|
|
9
|
+
CANCEL: keyof A11yAnnouncementConfig;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=constant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/utils/constant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,YAAY,EAAE,CAAC,MAAM,cAAc,CAAC,EAA+B,CAAC;AACjF,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAC5C,eAAO,MAAM,WAAW,UAAmC,CAAC;AAC5D,eAAO,MAAM,yBAAyB,EAAE;IACtC,QAAQ,EAAE,MAAM,sBAAsB,CAAC;IACvC,IAAI,EAAE,MAAM,sBAAsB,CAAC;IACnC,OAAO,EAAE,MAAM,sBAAsB,CAAC;IACtC,MAAM,EAAE,MAAM,sBAAsB,CAAC;CAMtC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FakeEvent } from '../modifiers/sortable-item';
|
|
2
|
+
/**
|
|
3
|
+
Gets the y offset for a given event.
|
|
4
|
+
Work for touch and mouse events.
|
|
5
|
+
@method getY
|
|
6
|
+
@return {Number}
|
|
7
|
+
@private
|
|
8
|
+
*/
|
|
9
|
+
export declare function getY(event: FakeEvent | Event): number;
|
|
10
|
+
/**
|
|
11
|
+
Gets the x offset for a given event.
|
|
12
|
+
@method getX
|
|
13
|
+
@return {Number}
|
|
14
|
+
@private
|
|
15
|
+
*/
|
|
16
|
+
export declare function getX(event: FakeEvent | Event): number;
|
|
17
|
+
//# sourceMappingURL=coordinate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../src/utils/coordinate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;;EAME;AACF,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,CASrD;AAED;;;;;EAKE;AACF,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,CASrD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Gets a numeric border-spacing values for a given element.
|
|
3
|
+
|
|
4
|
+
@method getBorderSpacing
|
|
5
|
+
@param {Element} element
|
|
6
|
+
@return {Object}
|
|
7
|
+
@private
|
|
8
|
+
*/
|
|
9
|
+
export declare function getBorderSpacing(el: Element): {
|
|
10
|
+
horizontal: number;
|
|
11
|
+
vertical: number;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=css-calculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-calculation.d.ts","sourceRoot":"","sources":["../../src/utils/css-calculation.ts"],"names":[],"mappings":"AAAA;;;;;;;EAOE;AACF,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO;;;EAQ3C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TDirection } from '../modifiers/sortable-group.ts';
|
|
2
|
+
export interface A11yAnnouncementConfig {
|
|
3
|
+
ACTIVATE: ({ a11yItemName, index, maxLength, direction, }: {
|
|
4
|
+
a11yItemName: string;
|
|
5
|
+
index: number;
|
|
6
|
+
maxLength: number;
|
|
7
|
+
direction: TDirection;
|
|
8
|
+
}) => string;
|
|
9
|
+
MOVE: ({ a11yItemName, index, maxLength, delta, }: {
|
|
10
|
+
a11yItemName: string;
|
|
11
|
+
index: number;
|
|
12
|
+
maxLength: number;
|
|
13
|
+
delta: number;
|
|
14
|
+
}) => string;
|
|
15
|
+
CONFIRM: ({ a11yItemName }: {
|
|
16
|
+
a11yItemName: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
CANCEL: ({ a11yItemName }: {
|
|
19
|
+
a11yItemName: string;
|
|
20
|
+
}) => string;
|
|
21
|
+
}
|
|
22
|
+
export declare const defaultA11yAnnouncementConfig: A11yAnnouncementConfig;
|
|
23
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,CAAC,EACT,YAAY,EACZ,KAAK,EACL,SAAS,EACT,SAAS,GACV,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,UAAU,CAAC;KACvB,KAAK,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,EACL,YAAY,EACZ,KAAK,EACL,SAAS,EACT,KAAK,GACN,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IAChE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;CAChE;AAED,eAAO,MAAM,6BAA6B,EAAE,sBAyB3C,CAAC"}
|