Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
BenOsodrac committed Jun 22, 2023
1 parent 117d023 commit 5aa07b9
Show file tree
Hide file tree
Showing 4 changed files with 1,359 additions and 109 deletions.
241 changes: 191 additions & 50 deletions dist/OutSystemsUI.css

Large diffs are not rendered by default.

275 changes: 273 additions & 2 deletions dist/OutSystemsUI.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ declare namespace OSFramework.OSUI.Constants {
const Comma = ",";
const EnableLogMessages = false;
const EmptyString = "";
const FocusTrapIgnoreAttr = "ignore-focus-trap";
const FocusableElems = "a[href]:not([disabled]),[tabindex=\"0\"], button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]),input[type=\"submit\"]:not([disabled]), select:not([disabled])";
const JavaScriptTypes: {
Undefined: string;
Expand Down Expand Up @@ -209,6 +210,27 @@ declare namespace OSFramework.OSUI.GlobalEnum {
TopLeft = "top-left",
TopRight = "top-right"
}
enum FloatingAlignment {
Center = "center",
End = "end",
Start = "start"
}
enum FloatingPosition {
Auto = "auto",
Bottom = "bottom",
BottomStart = "bottom-start",
BottomEnd = "bottom-end",
Center = "center",
Left = "left",
LeftEnd = "left-end",
LeftStart = "left-start",
Right = "right",
RightEnd = "right-end",
RightStart = "right-start",
Top = "top",
TopStart = "top-start",
TopEnd = "top-end"
}
enum CssProperties {
Auto = "auto",
Initial = "initial",
Expand Down Expand Up @@ -292,6 +314,9 @@ declare namespace OSFramework.OSUI.GlobalEnum {
TouchStart = "touchstart",
TransitionEnd = "transitionend"
}
enum CustomEvent {
BalloonOnToggle = "balloon.onToggle"
}
enum InlineStyle {
Display = "display",
Height = "height",
Expand Down Expand Up @@ -342,6 +367,7 @@ declare namespace OSFramework.OSUI.GlobalEnum {
Accordion = "Accordion",
AccordionItem = "Accordion Item",
AnimatedLabel = "Animated Label",
Balloon = "Balloon",
BottomSheet = "Bottom Sheet",
ButtonLoading = "ButtonLoading",
Carousel = "Carousel",
Expand All @@ -355,6 +381,7 @@ declare namespace OSFramework.OSUI.GlobalEnum {
InlineSvg = "InlineSVG",
MonthPicker = "MonthPicker",
Notification = "Notification",
OverflowMenu = "OverflowMenu",
ProgressBar = "Progress Bar",
ProgressCircle = "Progress Circle",
RangeSlider = "Range Slider",
Expand Down Expand Up @@ -569,11 +596,17 @@ declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
private _eventType;
protected eventCallback: EventListenerObject;
protected useCapture: boolean;
constructor(eventTarget: HTMLElement | Window, eventType: GlobalEnum.HTMLEvent);
constructor(eventTarget: HTMLElement | Document | Window, eventType: GlobalEnum.HTMLEvent | GlobalEnum.CustomEvent, isCustomEvent?: boolean);
addEvent(): void;
removeEvent(): void;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class BalloonOnToggle extends AbstractListener<string> {
constructor();
private _onToggleTrigger;
}
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
class BodyOnClick extends AbstractListener<string> {
private _enableBodyClick;
Expand Down Expand Up @@ -604,6 +637,7 @@ declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
}
declare namespace OSFramework.OSUI.Event.DOMEvents.Listeners {
enum Type {
BalloonOnToggle = "balloon.onToggle",
BodyOnClick = "body.onclick",
BodyOnScroll = "body.onscroll",
BodyOnMouseDown = "body.mousedown",
Expand Down Expand Up @@ -800,6 +834,81 @@ declare namespace OSFramework.OSUI.Event.ProviderEvents {
get hasPendingEvents(): boolean;
}
}
declare namespace OSFramework.OSUI.Feature {
abstract class AbstractFeature<PT, O> implements IFeature {
private _featureElem;
private _featureOptions;
private _featurePattern;
constructor(featurePattern: PT, featureElem: HTMLElement, options: O);
dispose(): void;
get featureElem(): HTMLElement;
get featureOptions(): O;
get featurePattern(): PT;
}
}
declare namespace OSFramework.OSUI.Feature {
interface IFeature extends Interface.IDisposable {
}
}
declare namespace OSFramework.OSUI.Feature.Balloon {
type BalloonOptions = {
alignment: GlobalEnum.FloatingAlignment;
allowedPlacements: Array<GlobalEnum.FloatingPosition>;
anchorElem: HTMLElement;
position: GlobalEnum.FloatingPosition;
shape: GlobalEnum.ShapeTypes;
};
class Balloon<PT> extends AbstractFeature<PT, BalloonOptions> implements IBalloon {
private _eventBodyClick;
private _eventOnKeypress;
private _floatingInstance;
private _floatingOptions;
private _focusTrapInstance;
private _focusableActiveElement;
private _isOpenedByApi;
private _onToggleEvent;
isOpen: boolean;
constructor(featurePattern: PT, featureElem: HTMLElement, options: BalloonOptions);
private _bodyClickCallback;
private _handleFocusTrap;
private _onkeypressCallback;
private _removeEventListeners;
private _setA11YProperties;
private _setCallbacks;
private _setEventListeners;
private _toggleBalloon;
private _unsetCallbacks;
build(): void;
close(): void;
dispose(): void;
open(isOpenedByApi: boolean): void;
setBalloonShape(shape?: GlobalEnum.ShapeTypes): void;
setFloatingBehaviour(isUpdate?: boolean): void;
setFloatingConfigs(): void;
updateFloatingConfigs(floatingConfigs?: Utils.FloatingPosition.FloatingPositionConfig): void;
updatePositionOption(position: GlobalEnum.FloatingPosition): void;
}
}
declare namespace OSFramework.OSUI.Feature.Balloon.Enum {
enum CssClasses {
IsOpen = "osui-balloon--is-open",
Pattern = "osui-balloon"
}
enum CssCustomProperties {
Shape = "--osui-balloon-shape"
}
enum Properties {
AnchorId = "AnchorId",
BalloonPosition = "BalloonPosition",
BalloonShape = "BalloonShape"
}
}
declare namespace OSFramework.OSUI.Feature.Balloon {
interface IBalloon extends Feature.IFeature, Interface.IOpenable {
setBalloonShape(shape?: GlobalEnum.ShapeTypes): void;
updatePositionOption(position: GlobalEnum.FloatingPosition): void;
}
}
declare namespace OSFramework.OSUI.Helper {
function AsyncInvocation(callback: GlobalCallbacks.Generic, ...args: unknown[]): void;
function ApplySetTimeOut(callback: GlobalCallbacks.Generic, time: number, ...args: unknown[]): void;
Expand Down Expand Up @@ -1024,6 +1133,10 @@ declare namespace OSFramework.OSUI.Interface {
setGestureEvents(onGestureStart: Event.GestureEvent.Callbacks.GestureStart, onGestureMove: Event.GestureEvent.Callbacks.GestureMove, onGestureEnd: Event.GestureEvent.Callbacks.GestureEnd): any;
}
}
declare namespace OSFramework.OSUI.Interface {
interface IFloatable extends IOpenable {
}
}
declare namespace OSFramework.OSUI.Interface {
interface IGestureEvent {
hasGestureEvents: boolean;
Expand All @@ -1032,8 +1145,9 @@ declare namespace OSFramework.OSUI.Interface {
}
declare namespace OSFramework.OSUI.Interface {
interface IOpenable {
isOpen?: boolean;
close(): void;
open(): void;
open(isOpenedByApi?: boolean): void;
}
}
declare namespace OSFramework.OSUI.Interface {
Expand Down Expand Up @@ -2278,6 +2392,78 @@ declare namespace OSFramework.OSUI.Patterns.Notification {
validateDefault(key: string, value: unknown): unknown;
}
}
declare namespace OSFramework.OSUI.Patterns.OverflowMenu.Callbacks {
type OSOnToggleEvent = {
(overflowMenuId: string, isOpen: boolean): void;
};
}
declare namespace OSFramework.OSUI.Patterns.OverflowMenu.Enum {
enum AriaLabel {
Trigger = "Trigger the balloon"
}
enum CssClass {
Open = "osui-overflow-menu--is-open",
Trigger = "osui-overflow-menu__trigger",
Balloon = "osui-overflow-menu__balloon"
}
enum CssCustomProperties {
Shape = "--osui-overflow-menu-shape"
}
enum Events {
OnMenuToggle = "OnToggle"
}
enum Properties {
Position = "Position",
Shape = "Shape"
}
}
declare namespace OSFramework.OSUI.Patterns.OverflowMenu {
interface IOverflowMenu extends Interface.IPattern, Interface.IOpenable {
}
}
declare namespace OSFramework.OSUI.Patterns.OverflowMenu {
class OverflowMenu extends AbstractPattern<OverflowMenuConfig> implements IOverflowMenu {
private _ariaLabelTrigger;
private _balloonElem;
private _balloonFeature;
private _eventBalloonOnToggle;
private _eventOnClick;
private _isOpenedByApi;
private _platformEventOnToggle;
private _triggerElem;
balloonOptions: Feature.Balloon.BalloonOptions;
isOpen: boolean;
constructor(uniqueId: string, configs: JSON);
private _balloonOnToggleCallback;
private _onClickCallback;
private _setBalloonFeature;
private _setOverflowMenuShape;
private _togglePattern;
private _triggerOnToggleEvent;
protected removeEventListeners(): void;
protected setA11YProperties(): void;
protected setCallbacks(): void;
protected setEventListeners(): void;
protected setHtmlElements(): void;
protected unsetCallbacks(): void;
protected unsetHtmlElements(): void;
build(): void;
changeProperty(propertyName: string, propertyValue: unknown): void;
close(): void;
dispose(): void;
open(isOpenedByApi: boolean): void;
registerCallback(eventName: string, callback: GlobalCallbacks.OSGeneric): void;
setBalloonOptions(balloonOptions?: Feature.Balloon.BalloonOptions): void;
setTriggerAriaLabel(ariaLabelText: string): void;
}
}
declare namespace OSFramework.OSUI.Patterns.OverflowMenu {
class OverflowMenuConfig extends AbstractConfiguration {
Position: GlobalEnum.FloatingPosition;
Shape: GlobalEnum.ShapeTypes;
constructor(config: JSON);
}
}
declare namespace OSFramework.OSUI.Patterns.Progress {
abstract class AbstractProgress<C extends ProgressConfiguration> extends AbstractPattern<C> implements IProgress {
private _eventAnimateEntranceEnd;
Expand Down Expand Up @@ -3537,6 +3723,49 @@ declare namespace OSFramework.OSUI.Patterns.Video {
constructor(config: JSON);
}
}
declare namespace OSFramework.OSUI.Utils.FloatingPosition.Enum {
enum CssCustomProperties {
Offset = "--osui-floating-offset",
YPosition = "--osui-floating-position-y",
XPosition = "--osui-floating-position-x"
}
enum Provider {
FloatingUI = "FloatingUI"
}
}
declare namespace OSFramework.OSUI.Utils.FloatingPosition {
abstract class FloatingPosition implements IFloatingPosition {
protected eventOnUpdateCallback: OSFramework.OSUI.GlobalCallbacks.Generic;
protected floatingConfigs: FloatingPositionConfig;
protected isBuilt: boolean;
constructor(options: FloatingPositionConfig);
protected getOffsetValue(): number;
build(): void;
dispose(): void;
update(options: FloatingPositionConfig): void;
abstract setFloatingPosition(): void;
abstract unsetFloatingPosition(): void;
}
}
declare namespace OSFramework.OSUI.Utils.FloatingPosition {
class FloatingPositionConfig {
AnchorElem: HTMLElement;
AutoPlacement: boolean;
AutoPlacementOptions: AutoPlacementOptions;
FloatingElem: HTMLElement;
Position: string;
UpdatePosition: boolean;
}
}
declare namespace OSFramework.OSUI.Utils.FloatingPosition.Factory {
function NewFloatingPosition(configs: FloatingPositionConfig, provider: string): void;
}
declare namespace OSFramework.OSUI.Utils.FloatingPosition {
interface IFloatingPosition {
setFloatingPosition(): void;
unsetFloatingPosition(): void;
}
}
declare namespace OutSystems.OSUI.ErrorCodes {
const Success: {
code: string;
Expand Down Expand Up @@ -3814,6 +4043,13 @@ declare namespace OutSystems.OSUI.ErrorCodes {
FailDispose: string;
FailRegisterCallback: string;
};
const OverflowMenu: {
FailChangeProperty: string;
FailDispose: string;
FailRegisterCallback: string;
FailOpen: string;
FailClose: string;
};
const Video: {
FailChangeProperty: string;
FailClose: string;
Expand Down Expand Up @@ -4021,6 +4257,17 @@ declare namespace OutSystems.OSUI.Patterns.NotificationAPI {
function RegisterCallback(notificationId: string, eventName: string, callback: OSFramework.OSUI.GlobalCallbacks.OSGeneric): string;
function Show(notificationId: string): string;
}
declare namespace OutSystems.OSUI.Patterns.OverflowMenuAPI {
function ChangeProperty(overflowMenuId: string, propertyName: string, propertyValue: unknown): string;
function Create(overflowMenuId: string, configs: string): OSFramework.OSUI.Patterns.OverflowMenu.IOverflowMenu;
function Dispose(overflowMenuId: string): string;
function GetAllOverflowMenus(): Array<string>;
function GetOverflowMenuById(overflowMenuId: string): OSFramework.OSUI.Patterns.OverflowMenu.IOverflowMenu;
function Initialize(overflowMenuId: string): OSFramework.OSUI.Patterns.OverflowMenu.IOverflowMenu;
function RegisterCallback(overflowMenuId: string, eventName: string, callback: OSFramework.OSUI.GlobalCallbacks.Generic): string;
function Open(overflowMenuId: string): string;
function Close(overflowMenuId: string): string;
}
declare namespace OutSystems.OSUI.Patterns.ProgressAPI {
function ChangeProperty(progressId: string, propertyName: string, propertyValue: any): string;
function Create(progressId: string, type: string, configs: string): OSFramework.OSUI.Patterns.Progress.IProgress;
Expand Down Expand Up @@ -4346,6 +4593,12 @@ declare namespace OutSystems.OSUI.Utils {
function SetSelectedTableRow(TableId: string, RowNumber: number, IsSelected: boolean): string;
function ShowPassword(): string;
}
declare namespace Providers.OSUI.ErrorCodes {
const FloatingUI: {
FailCallProvider: string;
FailSetPosition: string;
};
}
declare namespace Providers {
}
declare namespace Providers.OSUI.Carousel.Splide.Enum {
Expand Down Expand Up @@ -5707,3 +5960,21 @@ declare namespace Providers.OSUI.TimePicker.Flatpickr {
interface IFlatpickrTime extends OSFramework.OSUI.Patterns.TimePicker.ITimePicker, OSFramework.OSUI.Interface.IProviderPattern<Flatpickr> {
}
}
declare namespace Providers.OSUI.Utils.Enum {
enum ProviderInfo {
Name = "FloatingUI",
Version = "1.2.8"
}
}
declare namespace Providers.OSUI.Utils {
class FloatingUI extends OSFramework.OSUI.Utils.FloatingPosition.FloatingPosition {
constructor(options: FloatingUIConfig);
dispose(): void;
setFloatingPosition(): void;
unsetFloatingPosition(): void;
}
}
declare namespace Providers.OSUI.Utils {
class FloatingUIConfig extends OSFramework.OSUI.Utils.FloatingPosition.FloatingPositionConfig {
}
}
Loading

0 comments on commit 5aa07b9

Please sign in to comment.