@genesislcap/foundation-ui 14.272.0 → 14.274.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/custom-elements.json +1924 -1186
- package/dist/dts/base-components.d.ts +22 -0
- package/dist/dts/base-components.d.ts.map +1 -1
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/multiselect/multiselect-consts.d.ts +2 -2
- package/dist/dts/multiselect/multiselect-consts.d.ts.map +1 -1
- package/dist/dts/multiselect/multiselect.d.ts +11 -4
- package/dist/dts/multiselect/multiselect.d.ts.map +1 -1
- package/dist/dts/multiselect/multiselect.styles.d.ts.map +1 -1
- package/dist/dts/multiselect/multiselect.template.d.ts.map +1 -1
- package/dist/dts/scheduler/index.d.ts +4 -0
- package/dist/dts/scheduler/index.d.ts.map +1 -0
- package/dist/dts/scheduler/scheduler.d.ts +37 -0
- package/dist/dts/scheduler/scheduler.d.ts.map +1 -0
- package/dist/dts/scheduler/scheduler.styles.d.ts +3 -0
- package/dist/dts/scheduler/scheduler.styles.d.ts.map +1 -0
- package/dist/dts/scheduler/scheduler.template.d.ts +4 -0
- package/dist/dts/scheduler/scheduler.template.d.ts.map +1 -0
- package/dist/dts/scheduler-timezone/index.d.ts +4 -0
- package/dist/dts/scheduler-timezone/index.d.ts.map +1 -0
- package/dist/dts/scheduler-timezone/scheduler-timezone.d.ts +40 -0
- package/dist/dts/scheduler-timezone/scheduler-timezone.d.ts.map +1 -0
- package/dist/dts/scheduler-timezone/scheduler-timezone.styles.d.ts +3 -0
- package/dist/dts/scheduler-timezone/scheduler-timezone.styles.d.ts.map +1 -0
- package/dist/dts/scheduler-timezone/scheduler-timezone.template.d.ts +4 -0
- package/dist/dts/scheduler-timezone/scheduler-timezone.template.d.ts.map +1 -0
- package/dist/esm/base-components.js +4 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/multiselect/multiselect.js +80 -29
- package/dist/esm/multiselect/multiselect.styles.js +25 -20
- package/dist/esm/multiselect/multiselect.template.js +45 -35
- package/dist/esm/scheduler/index.js +3 -0
- package/dist/esm/scheduler/scheduler.js +47 -0
- package/dist/esm/scheduler/scheduler.styles.js +9 -0
- package/dist/esm/scheduler/scheduler.template.js +18 -0
- package/dist/esm/scheduler-timezone/index.js +3 -0
- package/dist/esm/scheduler-timezone/scheduler-timezone.js +81 -0
- package/dist/esm/scheduler-timezone/scheduler-timezone.styles.js +29 -0
- package/dist/esm/scheduler-timezone/scheduler-timezone.template.js +23 -0
- package/package.json +18 -18
|
@@ -209,6 +209,17 @@ export declare const baseComponents: {
|
|
|
209
209
|
foundationProgressRing: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").ProgressRingOptions>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").ProgressRingOptions, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
210
210
|
foundationRadio: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").RadioOptions>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").RadioOptions, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
211
211
|
foundationRadioGroup: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition>) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./radio-group").RadioGroup>;
|
|
212
|
+
foundationScheduler: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
213
|
+
baseName: string;
|
|
214
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
215
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("./scheduler").Scheduler, any>;
|
|
216
|
+
shadowOptions: ShadowRootInit;
|
|
217
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
218
|
+
baseName: string;
|
|
219
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
220
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("./scheduler").Scheduler, any>;
|
|
221
|
+
shadowOptions: ShadowRootInit;
|
|
222
|
+
}, typeof import("./scheduler").Scheduler>;
|
|
212
223
|
foundationSchedulerCronBuilder: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
213
224
|
baseName: string;
|
|
214
225
|
styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -220,6 +231,17 @@ export declare const baseComponents: {
|
|
|
220
231
|
template: import("@microsoft/fast-element").ViewTemplate<import("./scheduler-cron-builder").SchedulerCronBuilder, any>;
|
|
221
232
|
shadowOptions: ShadowRootInit;
|
|
222
233
|
}, typeof import("./scheduler-cron-builder").SchedulerCronBuilder>;
|
|
234
|
+
foundationSchedulerTimezone: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
235
|
+
baseName: string;
|
|
236
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
237
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("./scheduler-timezone").SchedulerTimezone, any>;
|
|
238
|
+
shadowOptions: ShadowRootInit;
|
|
239
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
240
|
+
baseName: string;
|
|
241
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
242
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("./scheduler-timezone").SchedulerTimezone, any>;
|
|
243
|
+
shadowOptions: ShadowRootInit;
|
|
244
|
+
}, typeof import("./scheduler-timezone").SchedulerTimezone>;
|
|
223
245
|
foundationSearchBar: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
224
246
|
baseName: string;
|
|
225
247
|
template: import("@microsoft/fast-element").ViewTemplate<import("./search-bar").SearchBar, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-components.d.ts","sourceRoot":"","sources":["../../src/base-components.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"base-components.d.ts","sourceRoot":"","sources":["../../src/base-components.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAiF5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAiFJ,SAAS,WAAW,GAAG,EAAE;CAe/C,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -63,7 +63,9 @@ export * from './progress-ring';
|
|
|
63
63
|
export * from './radio';
|
|
64
64
|
export * from './radio-group';
|
|
65
65
|
export * from './router';
|
|
66
|
+
export * from './scheduler';
|
|
66
67
|
export * from './scheduler-cron-builder';
|
|
68
|
+
export * from './scheduler-timezone';
|
|
67
69
|
export * from './search-bar';
|
|
68
70
|
export * from './segmented-control';
|
|
69
71
|
export * from './segmented-item';
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;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AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect-consts.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect-consts.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,iBAAiB,GACzB;IACE,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"multiselect-consts.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect-consts.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,iBAAiB,GACzB;IACE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACD,MAAM,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
1
2
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
3
|
import { MultiselectDatasource } from '../options-datasource';
|
|
3
4
|
import { MultiselectOption, Position } from './multiselect-consts';
|
|
@@ -16,6 +17,8 @@ export declare class Multiselect extends FoundationElement {
|
|
|
16
17
|
creatable: boolean;
|
|
17
18
|
async: boolean;
|
|
18
19
|
debounce: number;
|
|
20
|
+
delimiterValues: string;
|
|
21
|
+
delimiterLabels: string;
|
|
19
22
|
/** Tells if the filter uses a contains; if FALSE, will filter using a starts-with check */
|
|
20
23
|
filterByContains: boolean;
|
|
21
24
|
debounceChanged(oldValue: any, newValue: number): void;
|
|
@@ -39,11 +42,13 @@ export declare class Multiselect extends FoundationElement {
|
|
|
39
42
|
*/
|
|
40
43
|
position: Position;
|
|
41
44
|
onAllSelectedCallback: (allSelected: boolean) => void;
|
|
45
|
+
itemRenderer: (option: MultiselectOption, parent: Multiselect, prefix: string) => ViewTemplate;
|
|
42
46
|
private initialisedOptions;
|
|
43
47
|
arrowIcon: SVGElement;
|
|
44
|
-
|
|
48
|
+
multiselectDropdown: HTMLElement;
|
|
45
49
|
connectedCallback(): void;
|
|
46
50
|
disconnectedCallback(): void;
|
|
51
|
+
defaultItemRenderer(option: MultiselectOption, parent: Multiselect): ViewTemplate;
|
|
47
52
|
toggle(): void;
|
|
48
53
|
optionsChanged(): void;
|
|
49
54
|
selectedOptionsChanged(): void;
|
|
@@ -56,7 +61,8 @@ export declare class Multiselect extends FoundationElement {
|
|
|
56
61
|
* @private
|
|
57
62
|
*/
|
|
58
63
|
private setDropdownPosition;
|
|
59
|
-
|
|
64
|
+
optionValueGetter(option: MultiselectOption): string;
|
|
65
|
+
optionLabelGetter(option: MultiselectOption): string;
|
|
60
66
|
getItemLabel(option: MultiselectOption): any;
|
|
61
67
|
isOptionDisabled(option: MultiselectOption): boolean;
|
|
62
68
|
get getDisplayValue(): string;
|
|
@@ -76,15 +82,16 @@ export declare class Multiselect extends FoundationElement {
|
|
|
76
82
|
changeHandler(event: Event): void;
|
|
77
83
|
private handleClickOutside;
|
|
78
84
|
keydownHandler(e: Event & KeyboardEvent): boolean | void;
|
|
85
|
+
optionsHeaderSlottedNodes: Node[];
|
|
79
86
|
}
|
|
80
87
|
export declare const foundationMultiselect: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
81
88
|
baseName: string;
|
|
82
|
-
template:
|
|
89
|
+
template: ViewTemplate<Multiselect, any>;
|
|
83
90
|
styles: import("@microsoft/fast-element").ElementStyles;
|
|
84
91
|
shadowOptions: ShadowRootInit;
|
|
85
92
|
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
86
93
|
baseName: string;
|
|
87
|
-
template:
|
|
94
|
+
template: ViewTemplate<Multiselect, any>;
|
|
88
95
|
styles: import("@microsoft/fast-element").ElementStyles;
|
|
89
96
|
shadowOptions: ShadowRootInit;
|
|
90
97
|
}, typeof Multiselect>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.ts"],"names":[],"mappings":"AACA,OAAO,EAAoC,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMnE,eAAO,MAAM,kCAAkC,EAAE,cAA0B,CAAC;AAE5E,eAAO,MAAM,wBAAwB,IAAK,CAAC;AAE3C;;GAEG;AACH,qBAAa,WAAY,SAAQ,iBAAiB;IAC1C,IAAI,SAAM;IACuC,YAAY,EAAE,OAAO,CAAQ;IACzD,GAAG,UAAQ;IACX,WAAW,UAAS;IACpB,MAAM,UAAQ;IACd,QAAQ,UAAS;IACjB,SAAS,UAAS;IAClB,KAAK,UAAS;IACnC,QAAQ,EAAE,MAAM,CAAiB;IACjC,eAAe,EAAE,MAAM,CAAO;IAC9B,eAAe,EAAE,MAAM,CAAO;IAEpC,2FAA2F;IAC/B,gBAAgB,UAAS;IAErF,eAAe,CAAC,QAAQ,KAAA,EAAE,QAAQ,EAAE,MAAM;IAG1C,qBAAqB,MAAC;IACV,mBAAmB,EAAE,IAAI,EAAE,CAAC;IAC5B,iBAAiB,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gB,EAAE,iBAAiB;IAYrD,eAAe,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa;IAQzE,sBAAsB;IAItB,iBAAiB;IAajB,YAAY;IAcZ,qBAAqB;IAWrB,SAAS;IAwBT,SAAS;IAST,cAAc;IAkBd,aAAa,CAAC,KAAK,EAAE,KAAK;IAK1B,OAAO,CAAC,kBAAkB;IAM1B,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,aAAa,GAAG,OAAO,GAAG,IAAI;IAiC5C,yBAAyB,EAAE,IAAI,EAAE,CAAC;CAC/C;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;sBAMhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect.styles.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"multiselect.styles.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,eAAO,MAAM,iBAAiB,iDAuM7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect.template.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.template.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"multiselect.template.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.template.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,eAAO,MAAM,sBAAsB,uFA4HlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kEAE/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scheduler/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
type CronConfig = {
|
|
3
|
+
timezone: string;
|
|
4
|
+
cronExpression: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @tagname %%prefix%%-scheduler
|
|
8
|
+
*/
|
|
9
|
+
export declare class Scheduler extends FoundationElement {
|
|
10
|
+
timezone: string;
|
|
11
|
+
cron: string;
|
|
12
|
+
cronConfig: CronConfig;
|
|
13
|
+
cronConfigChanged(): void;
|
|
14
|
+
handleChange(event: CustomEvent, key: string): void;
|
|
15
|
+
}
|
|
16
|
+
export declare const foundationSchedulerShadowOptions: ShadowRootInit;
|
|
17
|
+
export declare const defaultConfig: {};
|
|
18
|
+
/**
|
|
19
|
+
* The Foundation Scheduler Element.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
* @remarks
|
|
23
|
+
* HTML Element: \<foundation-scheduler\>
|
|
24
|
+
*/
|
|
25
|
+
export declare const foundationScheduler: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
26
|
+
baseName: string;
|
|
27
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
28
|
+
template: import("@microsoft/fast-element").ViewTemplate<Scheduler, any>;
|
|
29
|
+
shadowOptions: ShadowRootInit;
|
|
30
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
31
|
+
baseName: string;
|
|
32
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
33
|
+
template: import("@microsoft/fast-element").ViewTemplate<Scheduler, any>;
|
|
34
|
+
shadowOptions: ShadowRootInit;
|
|
35
|
+
}, typeof Scheduler>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../src/scheduler/scheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAI/D,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AACF;;GAEG;AACH,qBAAa,SAAU,SAAQ,iBAAiB;IAClC,QAAQ,EAAE,MAAM,CAAM;IACtB,IAAI,EAAE,MAAM,CAAM;IAClB,UAAU,EAAE,UAAU,CAAC;IACnC,iBAAiB;IAKjB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM;CAS7C;AAGD,eAAO,MAAM,gCAAgC,EAAE,cAA0B,CAAC;AAE1E,eAAO,MAAM,aAAa,IAAK,CAAC;AAEhC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;oBAM9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.styles.d.ts","sourceRoot":"","sources":["../../../src/scheduler/scheduler.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,eAAe,EAAE,aAO7B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Scheduler } from './scheduler';
|
|
2
|
+
export declare const getPrefixedScheduler: (prefix: string) => import("@microsoft/fast-element").ViewTemplate<Scheduler, any>;
|
|
3
|
+
export declare const foundationSchedulerTemplate: import("@microsoft/fast-element").ViewTemplate<Scheduler, any>;
|
|
4
|
+
//# sourceMappingURL=scheduler.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.template.d.ts","sourceRoot":"","sources":["../../../src/scheduler/scheduler.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,oBAAoB,WAAY,MAAM,mEAWlD,CAAC;AACF,eAAO,MAAM,2BAA2B,gEAEvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scheduler-timezone/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Connect } from '@genesislcap/foundation-comms';
|
|
2
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
+
/**
|
|
4
|
+
* @tagname %%prefix%%-scheduler-timezone
|
|
5
|
+
*/
|
|
6
|
+
export declare class SchedulerTimezone extends FoundationElement {
|
|
7
|
+
timezone: string;
|
|
8
|
+
timezoneChanged(): void;
|
|
9
|
+
connect: Connect;
|
|
10
|
+
timeZones: any;
|
|
11
|
+
/**
|
|
12
|
+
* Used to store the timezone
|
|
13
|
+
* added to make sync directive work as it checks value field in the change event
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
value: string;
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
getTimeZones(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare const foundationSchedulerTimezoneShadowOptions: ShadowRootInit;
|
|
21
|
+
export declare const defaultTimezoneConfig: {};
|
|
22
|
+
/**
|
|
23
|
+
* The Foundation Scheduler Timezone Element.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
* @remarks
|
|
27
|
+
* HTML Element: \<foundation-scheduler-timezone\>
|
|
28
|
+
*/
|
|
29
|
+
export declare const foundationSchedulerTimezone: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
30
|
+
baseName: string;
|
|
31
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
32
|
+
template: import("@microsoft/fast-element").ViewTemplate<SchedulerTimezone, any>;
|
|
33
|
+
shadowOptions: ShadowRootInit;
|
|
34
|
+
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
35
|
+
baseName: string;
|
|
36
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
37
|
+
template: import("@microsoft/fast-element").ViewTemplate<SchedulerTimezone, any>;
|
|
38
|
+
shadowOptions: ShadowRootInit;
|
|
39
|
+
}, typeof SchedulerTimezone>;
|
|
40
|
+
//# sourceMappingURL=scheduler-timezone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler-timezone.d.ts","sourceRoot":"","sources":["../../../src/scheduler-timezone/scheduler-timezone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAI/D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,iBAAiB;IAC1C,QAAQ,EAAE,MAAM,CAAM;IAClC,eAAe;IAIN,OAAO,EAAG,OAAO,CAAC;IAEf,SAAS,MAAC;IACtB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAiB;IAE9B,iBAAiB;IAKX,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CA4BpC;AAGD,eAAO,MAAM,wCAAwC,EAAE,cAA0B,CAAC;AAElF,eAAO,MAAM,qBAAqB,IAAK,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;4BAMtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler-timezone.styles.d.ts","sourceRoot":"","sources":["../../../src/scheduler-timezone/scheduler-timezone.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,uBAAuB,EAAE,aA2BrC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SchedulerTimezone } from './scheduler-timezone';
|
|
2
|
+
export declare const getPrefixedSchedulerTimezone: (prefix: string) => import("@microsoft/fast-element").ViewTemplate<SchedulerTimezone, any>;
|
|
3
|
+
export declare const foundationSchedulerTimezoneTemplate: import("@microsoft/fast-element").ViewTemplate<SchedulerTimezone, any>;
|
|
4
|
+
//# sourceMappingURL=scheduler-timezone.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler-timezone.template.d.ts","sourceRoot":"","sources":["../../../src/scheduler-timezone/scheduler-timezone.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,4BAA4B,WAAY,MAAM,2EAmB1D,CAAC;AACF,eAAO,MAAM,mCAAmC,wEAE/C,CAAC"}
|
|
@@ -51,7 +51,9 @@ import { foundationProgress } from './progress';
|
|
|
51
51
|
import { foundationProgressRing } from './progress-ring';
|
|
52
52
|
import { foundationRadio } from './radio';
|
|
53
53
|
import { foundationRadioGroup } from './radio-group';
|
|
54
|
+
import { foundationScheduler } from './scheduler';
|
|
54
55
|
import { foundationSchedulerCronBuilder } from './scheduler-cron-builder';
|
|
56
|
+
import { foundationSchedulerTimezone } from './scheduler-timezone';
|
|
55
57
|
import { foundationSearchBar, foundationSearchBarCombobox } from './search-bar';
|
|
56
58
|
import { foundationSegmentedControl } from './segmented-control';
|
|
57
59
|
import { foundationSegmentedItem } from './segmented-item';
|
|
@@ -128,7 +130,9 @@ export const baseComponents = {
|
|
|
128
130
|
foundationProgressRing,
|
|
129
131
|
foundationRadio,
|
|
130
132
|
foundationRadioGroup,
|
|
133
|
+
foundationScheduler,
|
|
131
134
|
foundationSchedulerCronBuilder,
|
|
135
|
+
foundationSchedulerTimezone,
|
|
132
136
|
foundationSearchBar,
|
|
133
137
|
foundationSearchBarCombobox,
|
|
134
138
|
foundationSegmentedControl,
|
package/dist/esm/index.js
CHANGED
|
@@ -63,7 +63,9 @@ export * from './progress-ring';
|
|
|
63
63
|
export * from './radio';
|
|
64
64
|
export * from './radio-group';
|
|
65
65
|
export * from './router';
|
|
66
|
+
export * from './scheduler';
|
|
66
67
|
export * from './scheduler-cron-builder';
|
|
68
|
+
export * from './scheduler-timezone';
|
|
67
69
|
export * from './search-bar';
|
|
68
70
|
export * from './segmented-control';
|
|
69
71
|
export * from './segmented-item';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ResourceType } from '@genesislcap/foundation-comms';
|
|
3
|
-
import { attr, observable, volatile } from '@microsoft/fast-element';
|
|
3
|
+
import { attr, html, observable, volatile } from '@microsoft/fast-element';
|
|
4
4
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
5
5
|
import debounce from 'lodash.debounce';
|
|
6
6
|
import { dataserverCriteriaBuilder, logger, requestServerCriteriaBuilder, wasClickOutsideElement, } from '../utils';
|
|
@@ -25,6 +25,8 @@ export class Multiselect extends FoundationElement {
|
|
|
25
25
|
this.creatable = false;
|
|
26
26
|
this.async = false;
|
|
27
27
|
this.debounce = DEBOUNCE_TIME;
|
|
28
|
+
this.delimiterValues = ';';
|
|
29
|
+
this.delimiterLabels = ',';
|
|
28
30
|
/** Tells if the filter uses a contains; if FALSE, will filter using a starts-with check */
|
|
29
31
|
this.filterByContains = false;
|
|
30
32
|
this.filterSearchValue = '';
|
|
@@ -39,6 +41,7 @@ export class Multiselect extends FoundationElement {
|
|
|
39
41
|
* - Position.BELOW: Forces the dropdown to always open below the input field.
|
|
40
42
|
*/
|
|
41
43
|
this.position = Position.BELOW;
|
|
44
|
+
this.itemRenderer = this.defaultItemRenderer;
|
|
42
45
|
this.initialisedOptions = false;
|
|
43
46
|
}
|
|
44
47
|
debounceChanged(oldValue, newValue) {
|
|
@@ -49,25 +52,42 @@ export class Multiselect extends FoundationElement {
|
|
|
49
52
|
if (open) {
|
|
50
53
|
document.addEventListener('mousedown', this.clickOutside);
|
|
51
54
|
(_a = this.arrowIcon) === null || _a === void 0 ? void 0 : _a.classList.add('flipped');
|
|
52
|
-
(_b = this.
|
|
55
|
+
(_b = this.multiselectDropdown) === null || _b === void 0 ? void 0 : _b.classList.add('visible');
|
|
53
56
|
}
|
|
54
57
|
else {
|
|
55
58
|
document.removeEventListener('mousedown', this.clickOutside);
|
|
56
59
|
(_c = this.arrowIcon) === null || _c === void 0 ? void 0 : _c.classList.remove('flipped');
|
|
57
|
-
(_d = this.
|
|
60
|
+
(_d = this.multiselectDropdown) === null || _d === void 0 ? void 0 : _d.classList.remove('visible');
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
connectedCallback() {
|
|
61
64
|
var _a;
|
|
62
65
|
super.connectedCallback();
|
|
63
66
|
if (this.position === Position.ABOVE) {
|
|
64
|
-
(_a = this.
|
|
67
|
+
(_a = this.multiselectDropdown) === null || _a === void 0 ? void 0 : _a.classList.add('position-above');
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
disconnectedCallback() {
|
|
68
71
|
super.disconnectedCallback();
|
|
69
72
|
document.removeEventListener('mousedown', this.clickOutside);
|
|
70
73
|
}
|
|
74
|
+
defaultItemRenderer(option, parent) {
|
|
75
|
+
return html `
|
|
76
|
+
${typeof option === 'string'
|
|
77
|
+
? html `
|
|
78
|
+
<span part="option-label">${() => parent.getItemLabel(option)}</span>
|
|
79
|
+
`
|
|
80
|
+
: html `
|
|
81
|
+
<span
|
|
82
|
+
data-option-label-text=${() => option.optionLabelText}
|
|
83
|
+
style=${() => option.labelStyle}
|
|
84
|
+
part="option-label"
|
|
85
|
+
>
|
|
86
|
+
${() => parent.getItemLabel(option)}
|
|
87
|
+
</span>
|
|
88
|
+
`}
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
71
91
|
toggle() {
|
|
72
92
|
if (!this.open) {
|
|
73
93
|
this.setDropdownPosition();
|
|
@@ -76,7 +96,7 @@ export class Multiselect extends FoundationElement {
|
|
|
76
96
|
}
|
|
77
97
|
optionsChanged() {
|
|
78
98
|
if (this.allSelected && !this.initialisedOptions) {
|
|
79
|
-
this.selectedOptions = this.options.map((option) => this.
|
|
99
|
+
this.selectedOptions = this.options.map((option) => this.optionValueGetter(option));
|
|
80
100
|
}
|
|
81
101
|
this.filteredAvailableOptions = [...this.options];
|
|
82
102
|
}
|
|
@@ -108,14 +128,26 @@ export class Multiselect extends FoundationElement {
|
|
|
108
128
|
calculatedPosition = Position.BELOW;
|
|
109
129
|
}
|
|
110
130
|
}
|
|
111
|
-
this.
|
|
112
|
-
this.
|
|
131
|
+
this.multiselectDropdown.classList.toggle('position-above', calculatedPosition === Position.ABOVE);
|
|
132
|
+
this.multiselectDropdown.classList.toggle('position-below', calculatedPosition === Position.BELOW);
|
|
113
133
|
}
|
|
114
|
-
|
|
115
|
-
if (typeof option
|
|
116
|
-
return option
|
|
134
|
+
optionValueGetter(option) {
|
|
135
|
+
if (typeof option === 'string') {
|
|
136
|
+
return option;
|
|
137
|
+
}
|
|
138
|
+
if (Array.isArray(option.value)) {
|
|
139
|
+
return option.value.join(this.delimiterValues);
|
|
117
140
|
}
|
|
118
|
-
return option;
|
|
141
|
+
return option.value;
|
|
142
|
+
}
|
|
143
|
+
optionLabelGetter(option) {
|
|
144
|
+
if (typeof option === 'string') {
|
|
145
|
+
return option;
|
|
146
|
+
}
|
|
147
|
+
if (Array.isArray(option.label)) {
|
|
148
|
+
return option.label.join(this.delimiterLabels);
|
|
149
|
+
}
|
|
150
|
+
return option.label;
|
|
119
151
|
}
|
|
120
152
|
getItemLabel(option) {
|
|
121
153
|
let value;
|
|
@@ -126,7 +158,7 @@ export class Multiselect extends FoundationElement {
|
|
|
126
158
|
value = option;
|
|
127
159
|
}
|
|
128
160
|
else {
|
|
129
|
-
value = option
|
|
161
|
+
value = this.optionLabelGetter(option) || this.optionValueGetter(option) || '';
|
|
130
162
|
}
|
|
131
163
|
return this.valueFormatter ? this.valueFormatter(value) : value;
|
|
132
164
|
}
|
|
@@ -144,7 +176,7 @@ export class Multiselect extends FoundationElement {
|
|
|
144
176
|
break;
|
|
145
177
|
}
|
|
146
178
|
case 1: {
|
|
147
|
-
const selectedOption = this.options.find((option) => this.
|
|
179
|
+
const selectedOption = this.options.find((option) => this.optionValueGetter(option) === this.selectedOptions[0]);
|
|
148
180
|
displayText = this.getItemLabel(selectedOption);
|
|
149
181
|
break;
|
|
150
182
|
}
|
|
@@ -170,17 +202,17 @@ export class Multiselect extends FoundationElement {
|
|
|
170
202
|
this.findExactMatchOptions().length === 0);
|
|
171
203
|
}
|
|
172
204
|
isOptionSelected(normalizedOption) {
|
|
173
|
-
|
|
205
|
+
const value = this.optionValueGetter(normalizedOption);
|
|
206
|
+
return this.selectedOptions.includes(value);
|
|
174
207
|
}
|
|
175
208
|
selectCheckboxOne(normalizedOption) {
|
|
176
|
-
const option = this.
|
|
209
|
+
const option = this.optionValueGetter(normalizedOption);
|
|
177
210
|
const isIncluded = this.selectedOptions.includes(option);
|
|
178
211
|
if (!isIncluded) {
|
|
179
212
|
this.selectedOptions = [...this.selectedOptions, option];
|
|
180
213
|
}
|
|
181
214
|
else {
|
|
182
|
-
this.selectedOptions =
|
|
183
|
-
this.selectedOptions.splice(this.selectedOptions.indexOf(option), 1);
|
|
215
|
+
this.selectedOptions = this.selectedOptions.filter((x) => x !== option);
|
|
184
216
|
}
|
|
185
217
|
this.$emit('selectionChange', this.selectedOptions);
|
|
186
218
|
}
|
|
@@ -200,7 +232,7 @@ export class Multiselect extends FoundationElement {
|
|
|
200
232
|
? []
|
|
201
233
|
: this.options
|
|
202
234
|
.filter((opt) => !this.isOptionDisabled(opt))
|
|
203
|
-
.map((option) => this.
|
|
235
|
+
.map((option) => this.optionValueGetter(option));
|
|
204
236
|
if (this.onAllSelectedCallback) {
|
|
205
237
|
this.onAllSelectedCallback(!prevAllChecked);
|
|
206
238
|
}
|
|
@@ -223,21 +255,28 @@ export class Multiselect extends FoundationElement {
|
|
|
223
255
|
const filterSearchValueLower = this.filterSearchValue.toLowerCase();
|
|
224
256
|
return this.filteredAvailableOptions.filter((option) => {
|
|
225
257
|
var _a, _b;
|
|
226
|
-
const optionValue = typeof option === 'string'
|
|
258
|
+
const optionValue = typeof option === 'string'
|
|
259
|
+
? option
|
|
260
|
+
: (_a = this.optionLabelGetter(option)) !== null && _a !== void 0 ? _a : this.optionValueGetter(option);
|
|
227
261
|
return ((_b = optionValue === null || optionValue === void 0 ? void 0 : optionValue.toLowerCase()) !== null && _b !== void 0 ? _b : '') === filterSearchValueLower;
|
|
228
262
|
});
|
|
229
263
|
}
|
|
230
264
|
setFilter() {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
265
|
+
const searchValue = this.filterSearchValue.toLowerCase();
|
|
266
|
+
this.filteredAvailableOptions = this.options.filter((option) => {
|
|
267
|
+
const rawLabel = typeof option === 'string' ? option : option.label;
|
|
268
|
+
const rawValue = typeof option === 'string' ? option : option.value;
|
|
269
|
+
const checkMatch = (val) => this.filterByContains
|
|
270
|
+
? val === null || val === void 0 ? void 0 : val.toLowerCase().includes(searchValue)
|
|
271
|
+
: val === null || val === void 0 ? void 0 : val.toLowerCase().startsWith(searchValue);
|
|
272
|
+
const matchLabel = Array.isArray(rawLabel)
|
|
273
|
+
? rawLabel.some(checkMatch)
|
|
274
|
+
: rawLabel && checkMatch(rawLabel);
|
|
275
|
+
const matchValue = Array.isArray(rawValue)
|
|
276
|
+
? rawValue.some((val) => checkMatch(val))
|
|
277
|
+
: rawValue && checkMatch(rawValue);
|
|
278
|
+
return matchLabel || matchValue;
|
|
279
|
+
});
|
|
241
280
|
}
|
|
242
281
|
addOption() {
|
|
243
282
|
this.options = [
|
|
@@ -325,6 +364,12 @@ __decorate([
|
|
|
325
364
|
__decorate([
|
|
326
365
|
attr
|
|
327
366
|
], Multiselect.prototype, "debounce", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
attr
|
|
369
|
+
], Multiselect.prototype, "delimiterValues", void 0);
|
|
370
|
+
__decorate([
|
|
371
|
+
attr
|
|
372
|
+
], Multiselect.prototype, "delimiterLabels", void 0);
|
|
328
373
|
__decorate([
|
|
329
374
|
attr({ mode: 'boolean', attribute: 'filter-by-contains' })
|
|
330
375
|
], Multiselect.prototype, "filterByContains", void 0);
|
|
@@ -364,6 +409,9 @@ __decorate([
|
|
|
364
409
|
__decorate([
|
|
365
410
|
observable
|
|
366
411
|
], Multiselect.prototype, "onAllSelectedCallback", void 0);
|
|
412
|
+
__decorate([
|
|
413
|
+
observable
|
|
414
|
+
], Multiselect.prototype, "itemRenderer", void 0);
|
|
367
415
|
__decorate([
|
|
368
416
|
volatile
|
|
369
417
|
], Multiselect.prototype, "getDisplayValue", null);
|
|
@@ -376,5 +424,8 @@ __decorate([
|
|
|
376
424
|
__decorate([
|
|
377
425
|
volatile
|
|
378
426
|
], Multiselect.prototype, "showCreatable", null);
|
|
427
|
+
__decorate([
|
|
428
|
+
observable
|
|
429
|
+
], Multiselect.prototype, "optionsHeaderSlottedNodes", void 0);
|
|
379
430
|
export const foundationMultiselect = Multiselect.compose(Object.assign({ baseName: 'multiselect', template,
|
|
380
431
|
styles, shadowOptions: foundationMultiselectShadowOptions }, defaultMultiselectConfig));
|