@mgdis/mg-components 6.20.0 → 6.21.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/cjs/{index-Bp6wZzau.js → index-C2viYwrR.js} +1757 -80
- package/dist/cjs/{index-TUElr4Wv.js → index-CCsGMNyq.js} +46 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +684 -273
- package/dist/cjs/mg-alert.cjs.entry.js +17 -9
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +24 -7
- package/dist/cjs/mg-input-combobox.cjs.entry.js +48 -18
- package/dist/cjs/mg-input-file.cjs.entry.js +384 -0
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +30 -18
- package/dist/cjs/{mg-input.conf-D7jmj_lh.js → mg-input.conf-BNpeATnq.js} +7 -0
- package/dist/cjs/mg-loader.cjs.entry.js +8 -6
- package/dist/cjs/mg-progress.cjs.entry.js +19 -9
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +6 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +877 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +12 -12
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +12 -3
- package/dist/collection/components/molecules/mg-form/mg-form.js +12 -2
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/locales/en/messages.json +11 -0
- package/dist/collection/locales/fr/messages.json +11 -0
- package/dist/components/events.utils.js +1 -23
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -408
- package/dist/components/index3.js +1 -476
- package/dist/components/mg-action-more.js +1 -254
- package/dist/components/mg-alert.js +1 -224
- package/dist/components/mg-badge.js +1 -6
- package/dist/components/mg-badge2.js +1 -113
- package/dist/components/mg-button.js +1 -6
- package/dist/components/mg-button2.js +1 -275
- package/dist/components/mg-card.js +1 -6
- package/dist/components/mg-card2.js +1 -92
- package/dist/components/mg-character-left.js +1 -6
- package/dist/components/mg-character-left2.js +1 -75
- package/dist/components/mg-details.js +1 -104
- package/dist/components/mg-divider.js +1 -6
- package/dist/components/mg-divider2.js +1 -49
- package/dist/components/mg-fieldset.js +1 -209
- package/dist/components/mg-form.js +1 -302
- package/dist/components/mg-icon.js +1 -6
- package/dist/components/mg-icon2.js +1 -188
- package/dist/components/mg-illustrated-message.js +1 -129
- package/dist/components/mg-input-checkbox-paginated.js +1 -6
- package/dist/components/mg-input-checkbox-paginated2.js +1 -135
- package/dist/components/mg-input-checkbox.js +1 -762
- package/dist/components/mg-input-combobox.js +1 -940
- package/dist/components/mg-input-date.js +1 -463
- package/dist/components/mg-input-file.d.ts +11 -0
- package/dist/components/mg-input-file.js +1 -0
- package/dist/components/mg-input-numeric.js +1 -592
- package/dist/components/mg-input-password.js +1 -360
- package/dist/components/mg-input-radio.js +1 -392
- package/dist/components/mg-input-rich-text-editor.js +1 -16797
- package/dist/components/mg-input-select.js +1 -6
- package/dist/components/mg-input-select2.js +1 -481
- package/dist/components/mg-input-text.js +1 -6
- package/dist/components/mg-input-text2.js +1 -514
- package/dist/components/mg-input-textarea.js +1 -412
- package/dist/components/mg-input-title.js +1 -6
- package/dist/components/mg-input-title2.js +1 -81
- package/dist/components/mg-input-toggle.js +1 -371
- package/dist/components/mg-input.conf.js +1 -0
- package/dist/components/mg-input.js +1 -6
- package/dist/components/mg-input2.js +1 -459
- package/dist/components/mg-item-more.js +1 -6
- package/dist/components/mg-item-more2.js +1 -505
- package/dist/components/mg-loader.js +1 -6
- package/dist/components/mg-loader2.js +1 -74
- package/dist/components/mg-menu-item.js +1 -6
- package/dist/components/mg-menu-item2.js +1 -485
- package/dist/components/mg-menu.js +1 -6
- package/dist/components/mg-message.js +1 -6
- package/dist/components/mg-message2.js +1 -146
- package/dist/components/mg-modal.js +1 -184
- package/dist/components/mg-pagination.js +1 -234
- package/dist/components/mg-panel.js +1 -350
- package/dist/components/mg-popover-content.js +1 -6
- package/dist/components/mg-popover-content2.js +1 -96
- package/dist/components/mg-popover.js +1 -6
- package/dist/components/mg-popover2.js +1 -312
- package/dist/components/mg-progress.js +1 -123
- package/dist/components/mg-skip-links.js +1 -78
- package/dist/components/mg-table.js +1 -319
- package/dist/components/mg-tabs.js +1 -6
- package/dist/components/mg-tabs2.js +1 -315
- package/dist/components/mg-tag.js +1 -133
- package/dist/components/mg-tooltip-content.js +1 -6
- package/dist/components/mg-tooltip-content2.js +1 -42
- package/dist/components/mg-tooltip.js +1 -6
- package/dist/components/mg-tooltip2.js +1 -421
- package/dist/components/popper.js +1 -1790
- package/dist/esm/{index-CNX6lq0x.js → index-D-uaxCxH.js} +46 -1
- package/dist/esm/{index-BluNKQ3L.js → index-DFwaH2hS.js} +1757 -80
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +684 -273
- package/dist/esm/mg-alert.entry.js +17 -9
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +24 -7
- package/dist/esm/mg-input-combobox.entry.js +48 -18
- package/dist/esm/mg-input-file.entry.js +382 -0
- package/dist/esm/mg-input-rich-text-editor.entry.js +30 -18
- package/dist/esm/{mg-input.conf-DDnrE1hD.js → mg-input.conf-C9rmNQIL.js} +7 -1
- package/dist/esm/mg-loader.entry.js +8 -6
- package/dist/esm/mg-progress.entry.js +19 -9
- package/dist/mg-components/locales/en/messages.json +11 -0
- package/dist/mg-components/locales/fr/messages.json +11 -0
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-d5a276eb.entry.js → p-08fa327b.entry.js} +1 -1
- package/dist/mg-components/p-4175dcbe.entry.js +1 -0
- package/dist/mg-components/{p-7132bca1.entry.js → p-6b57f249.entry.js} +1 -1
- package/dist/mg-components/p-6b655830.entry.js +1 -0
- package/dist/mg-components/p-988c282e.entry.js +1 -0
- package/dist/mg-components/p-C9rmNQIL.js +1 -0
- package/dist/mg-components/p-D-uaxCxH.js +1 -0
- package/dist/mg-components/p-DFwaH2hS.js +2 -0
- package/dist/mg-components/p-a79b1f19.entry.js +1 -0
- package/dist/mg-components/{p-916dfb6d.entry.js → p-c3d116b9.entry.js} +1 -1
- package/dist/mg-components/p-dd1934f4.entry.js +1 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +7 -1
- package/dist/types/components/molecules/inputs/mg-input-file/mg-input-file.d.ts +210 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -4
- package/dist/types/components.d.ts +211 -10
- package/dist/types/stencil-public-runtime.d.ts +76 -12
- package/ide/intellij/web-types.json +356 -12
- package/ide/vscode/html-custom-data.json +338 -76
- package/package.json +19 -19
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.scss +0 -1
- package/dist/mg-components/p-016bd291.entry.js +0 -1
- package/dist/mg-components/p-186a6139.entry.js +0 -1
- package/dist/mg-components/p-BluNKQ3L.js +0 -2
- package/dist/mg-components/p-CNX6lq0x.js +0 -1
- package/dist/mg-components/p-DDnrE1hD.js +0 -1
- package/dist/mg-components/p-cd061b38.entry.js +0 -1
- package/dist/mg-components/p-d2c72f09.entry.js +0 -1
- package/ide/vscode/custom.css-data.json +0 -425
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
2
|
-
type UnionToIntersection<U> = (U extends any ? (
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
|
|
3
4
|
export interface ComponentDecorator {
|
|
4
5
|
(opts?: ComponentOptions): ClassDecorator;
|
|
5
6
|
}
|
|
@@ -62,6 +63,12 @@ export interface ShadowRootOptions {
|
|
|
62
63
|
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
|
|
63
64
|
*/
|
|
64
65
|
delegatesFocus?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
|
|
68
|
+
* slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
|
|
69
|
+
* declarative slotting behavior.
|
|
70
|
+
*/
|
|
71
|
+
slotAssignment?: 'manual' | 'named';
|
|
65
72
|
}
|
|
66
73
|
export interface ModeStyles {
|
|
67
74
|
[modeName: string]: string | string[];
|
|
@@ -124,6 +131,9 @@ export interface AttachInternalsDecorator {
|
|
|
124
131
|
export interface ListenDecorator {
|
|
125
132
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
126
133
|
}
|
|
134
|
+
export interface ResolveVarFunction {
|
|
135
|
+
<T>(variable: T): string;
|
|
136
|
+
}
|
|
127
137
|
export interface ListenOptions {
|
|
128
138
|
/**
|
|
129
139
|
* Handlers can also be registered for an event other than the host itself.
|
|
@@ -152,7 +162,9 @@ export interface StateDecorator {
|
|
|
152
162
|
(): PropertyDecorator;
|
|
153
163
|
}
|
|
154
164
|
export interface WatchDecorator {
|
|
155
|
-
(propName: any
|
|
165
|
+
(propName: any, watchOptions?: {
|
|
166
|
+
immediate?: boolean;
|
|
167
|
+
}): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
|
|
156
168
|
}
|
|
157
169
|
export interface PropSerializeDecorator {
|
|
158
170
|
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
|
|
@@ -207,6 +219,24 @@ export declare const AttachInternals: AttachInternalsDecorator;
|
|
|
207
219
|
* https://stenciljs.com/docs/events#listen-decorator
|
|
208
220
|
*/
|
|
209
221
|
export declare const Listen: ListenDecorator;
|
|
222
|
+
/**
|
|
223
|
+
* The `resolveVar()` function is a compile-time utility that resolves const variables
|
|
224
|
+
* and object properties to their string literal values. This allows variables to be
|
|
225
|
+
* used in `@Listen` and `@Event` decorators instead of hardcoded strings.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```ts
|
|
229
|
+
* const MY_EVENT = 'myEvent';
|
|
230
|
+
* @Listen(resolveVar(MY_EVENT))
|
|
231
|
+
* ```
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```ts
|
|
235
|
+
* const EVENTS = { MY_EVENT: 'myEvent' } as const;
|
|
236
|
+
* @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
export declare const resolveVar: ResolveVarFunction;
|
|
210
240
|
/**
|
|
211
241
|
* The `@Method()` decorator is used to expose methods on the public API.
|
|
212
242
|
* Class methods decorated with the @Method() decorator can be called directly
|
|
@@ -364,18 +394,48 @@ export declare function readTask(task: RafCallback): void;
|
|
|
364
394
|
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
|
|
365
395
|
*/
|
|
366
396
|
export declare const setErrorHandler: (handler: ErrorHandler) => void;
|
|
367
|
-
export type
|
|
397
|
+
export type TagTransformer = (tag: string) => string;
|
|
398
|
+
/**
|
|
399
|
+
* Sets a tag transformer to be used when rendering your custom elements.
|
|
400
|
+
* ```ts
|
|
401
|
+
* setTagTransformer((tag) => {
|
|
402
|
+
* if (tag.startsWith('my-')) return `new-${tag}`
|
|
403
|
+
* return tag;
|
|
404
|
+
* });
|
|
405
|
+
* ```
|
|
406
|
+
* Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
|
|
407
|
+
*
|
|
408
|
+
* @param transformer the transformer function to use which must return a string.
|
|
409
|
+
*/
|
|
410
|
+
export declare function setTagTransformer(transformer: TagTransformer): void;
|
|
411
|
+
/**
|
|
412
|
+
* Transforms a tag name using a transformer set via `setTagTransformer`
|
|
413
|
+
*
|
|
414
|
+
* @param tag - the tag to transform e.g. `my-tag`
|
|
415
|
+
* @returns the transformed tag e.g. `new-my-tag`
|
|
416
|
+
*/
|
|
417
|
+
export declare function transformTag(tag: string): string;
|
|
418
|
+
/**
|
|
419
|
+
* @deprecated - Use `MixedInCtor` instead:
|
|
420
|
+
* ```ts
|
|
421
|
+
* import { MixedInCtor } from '@stencil/core';
|
|
422
|
+
*
|
|
423
|
+
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
427
|
+
export type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
368
428
|
/**
|
|
369
429
|
* Compose multiple mixin classes into a single constructor.
|
|
370
430
|
* The resulting class has the combined instance types of all mixed-in classes.
|
|
371
431
|
*
|
|
372
432
|
* Example:
|
|
373
|
-
* ```
|
|
374
|
-
* import { Mixin,
|
|
433
|
+
* ```ts
|
|
434
|
+
* import { Mixin, MixedInCtor } from '@stencil/core';
|
|
375
435
|
*
|
|
376
|
-
* const AWrap
|
|
377
|
-
* const BWrap
|
|
378
|
-
* const CWrap
|
|
436
|
+
* const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
437
|
+
* const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
|
|
438
|
+
* const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
|
|
379
439
|
*
|
|
380
440
|
* class X extends Mixin(AWrap, BWrap, CWrap) {
|
|
381
441
|
* render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
|
|
@@ -383,9 +443,9 @@ export type MixinFactory = <TBase extends new (...args: any[]) => any>(base: TBa
|
|
|
383
443
|
* ```
|
|
384
444
|
*
|
|
385
445
|
* @param mixinFactories mixin factory functions that return a class which extends from the provided class.
|
|
386
|
-
* @returns a class that
|
|
446
|
+
* @returns a class that is composed from extending each of the provided classes in the order they were provided.
|
|
387
447
|
*/
|
|
388
|
-
export declare function Mixin<TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<
|
|
448
|
+
export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
|
|
389
449
|
/**
|
|
390
450
|
* This file gets copied to all distributions of stencil component collections.
|
|
391
451
|
* - no imports
|
|
@@ -643,7 +703,7 @@ declare namespace LocalJSX {
|
|
|
643
703
|
export { LocalJSX as JSX };
|
|
644
704
|
export declare namespace JSXBase {
|
|
645
705
|
interface IntrinsicElements {
|
|
646
|
-
slot: JSXBase.SlotAttributes
|
|
706
|
+
slot: JSXBase.SlotAttributes<HTMLSlotElement>;
|
|
647
707
|
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
648
708
|
abbr: JSXBase.HTMLAttributes;
|
|
649
709
|
address: JSXBase.HTMLAttributes;
|
|
@@ -813,7 +873,7 @@ export declare namespace JSXBase {
|
|
|
813
873
|
use: JSXBase.SVGAttributes;
|
|
814
874
|
view: JSXBase.SVGAttributes;
|
|
815
875
|
}
|
|
816
|
-
interface SlotAttributes extends JSXAttributes {
|
|
876
|
+
interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
817
877
|
name?: string;
|
|
818
878
|
slot?: string;
|
|
819
879
|
onSlotchange?: (event: Event) => void;
|
|
@@ -869,6 +929,9 @@ export declare namespace JSXBase {
|
|
|
869
929
|
popoverTargetAction?: string;
|
|
870
930
|
popoverTargetElement?: Element | null;
|
|
871
931
|
popoverTarget?: string;
|
|
932
|
+
command?: string;
|
|
933
|
+
commandFor?: string;
|
|
934
|
+
commandfor?: string;
|
|
872
935
|
}
|
|
873
936
|
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
874
937
|
height?: number | string;
|
|
@@ -1737,6 +1800,7 @@ export interface CustomElementsDefineOptions {
|
|
|
1737
1800
|
exclude?: string[];
|
|
1738
1801
|
resourcesUrl?: string;
|
|
1739
1802
|
syncQueue?: boolean;
|
|
1803
|
+
/** @deprecated in-favour of `setTagTransformer` and `transformTag` */
|
|
1740
1804
|
transformTagName?: (tagName: string) => string;
|
|
1741
1805
|
jmp?: (c: Function) => any;
|
|
1742
1806
|
raf?: (c: FrameRequestCallback) => number;
|