@3t-transform/threeteeui 0.0.22 → 0.0.24
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-bf777121.js → index-bc080fb4.js} +2 -148
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/tttx-button.cjs.entry.js +1 -1
- package/dist/cjs/tttx-icon.cjs.entry.js +1 -1
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +1 -1
- package/dist/cjs/tttx-list.cjs.entry.js +14 -178
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +1 -1
- package/dist/cjs/tttx-table.cjs.entry.js +1 -1
- package/dist/cjs/tttx.cjs.js +3 -7
- package/dist/collection/collection-manifest.json +2 -6
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.e2e.js +9 -0
- package/dist/collection/components/atoms/tttx-button/test/tttx-button.spec.js +43 -0
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.e2e.js +9 -0
- package/dist/collection/components/atoms/tttx-icon/test/tttx-icon.spec.js +16 -0
- package/dist/collection/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.js +164 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.js +64 -0
- package/dist/collection/components/molecules/tttx-list/test/tttx-list.spec.js +151 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.css +17 -20
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +22 -255
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +34 -32
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.js +9 -0
- package/dist/collection/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.js +146 -0
- package/dist/collection/components/molecules/tttx-table/test/tttx-table.e2e.js +9 -0
- package/dist/components/index.d.ts +0 -13
- package/dist/components/index.js +1 -5
- package/dist/components/tttx-button.js +54 -1
- package/dist/components/tttx-list.js +19 -188
- package/dist/components/tttx-loading-spinner.js +38 -1
- package/dist/components/tttx-table.js +2 -8
- package/dist/esm/{index-a05bd606.js → index-901bfd55.js} +3 -147
- package/dist/esm/loader.js +3 -4
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/tttx-button.entry.js +1 -1
- package/dist/esm/tttx-icon.entry.js +1 -1
- package/dist/esm/tttx-keyvalue-block.entry.js +1 -1
- package/dist/esm/tttx-list.entry.js +14 -178
- package/dist/esm/tttx-loading-spinner.entry.js +1 -1
- package/dist/esm/tttx-standalone-input.entry.js +1 -1
- package/dist/esm/tttx-table.entry.js +1 -1
- package/dist/esm/tttx.js +3 -4
- package/dist/tttx/{p-68ff0f39.entry.js → p-0ae51ec5.entry.js} +1 -1
- package/dist/tttx/{p-9536b8c4.entry.js → p-1ec23160.entry.js} +1 -1
- package/dist/tttx/p-300ff6a8.entry.js +1 -0
- package/dist/tttx/p-32ad02d3.entry.js +1 -0
- package/dist/tttx/{p-a96ca037.entry.js → p-80cf5236.entry.js} +1 -1
- package/dist/tttx/{p-a5808741.entry.js → p-9a382959.entry.js} +1 -1
- package/dist/tttx/{p-46b5551e.entry.js → p-a1bd16a1.entry.js} +1 -1
- package/dist/tttx/{p-93763d3c.entry.js → p-a4077908.entry.js} +1 -1
- package/dist/tttx/p-a6953900.entry.js +1 -0
- package/dist/tttx/p-b46e3c59.entry.js +1 -0
- package/dist/tttx/p-c290160b.js +2 -0
- package/dist/tttx/p-dc179257.entry.js +1 -0
- package/dist/tttx/p-e19eb07e.entry.js +1 -0
- package/dist/tttx/p-e4341658.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/test/tttx-button.e2e.d.ts +1 -0
- package/dist/types/components/atoms/tttx-button/test/tttx-button.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.e2e.d.ts +1 -0
- package/dist/types/components/atoms/tttx-icon/test/tttx-icon.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-keyvalue-block/test/tttx-keyvalue-block.spec.d.ts +1 -0
- package/dist/types/components/atoms/tttx-loading-spinner/Test/tttx-loading-spinner.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-list/interfaces.d.ts +4 -0
- package/dist/types/components/molecules/tttx-list/test/tttx-list.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +4 -46
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +2 -8
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts +1 -0
- package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts +1 -0
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +6 -6
- package/dist/types/components/molecules/tttx-table/test/tttx-table.e2e.d.ts +1 -0
- package/dist/types/components.d.ts +3 -91
- package/dist/types/stencil-public-runtime.d.ts +3 -59
- package/loader/index.d.ts +0 -9
- package/package.json +3 -2
- package/readme.md +20 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +0 -28
- package/dist/cjs/tttx-form.cjs.entry.js +0 -374
- package/dist/cjs/tttx-input-calendar.cjs.entry.js +0 -125
- package/dist/cjs/tttx-popover-content.cjs.entry.js +0 -23
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +0 -30
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +0 -97
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +0 -23
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +0 -181
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +0 -102
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +0 -13
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +0 -314
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +0 -452
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +0 -109
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.css +0 -93
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.js +0 -174
- package/dist/collection/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.js +0 -27
- package/dist/components/tttx-button2.js +0 -56
- package/dist/components/tttx-checkbox.d.ts +0 -11
- package/dist/components/tttx-checkbox.js +0 -46
- package/dist/components/tttx-form.d.ts +0 -11
- package/dist/components/tttx-form.js +0 -391
- package/dist/components/tttx-input-calendar.d.ts +0 -11
- package/dist/components/tttx-input-calendar.js +0 -157
- package/dist/components/tttx-loading-spinner2.js +0 -40
- package/dist/components/tttx-popover-content.d.ts +0 -11
- package/dist/components/tttx-popover-content.js +0 -6
- package/dist/components/tttx-popover-content2.js +0 -39
- package/dist/esm/tttx-checkbox.entry.js +0 -24
- package/dist/esm/tttx-form.entry.js +0 -370
- package/dist/esm/tttx-input-calendar.entry.js +0 -121
- package/dist/esm/tttx-popover-content.entry.js +0 -19
- package/dist/tttx/p-037d286f.entry.js +0 -1
- package/dist/tttx/p-07b134af.js +0 -2
- package/dist/tttx/p-1b63f16a.entry.js +0 -1
- package/dist/tttx/p-45afb84c.entry.js +0 -1
- package/dist/tttx/p-a92ca87e.entry.js +0 -1
- package/dist/tttx/p-f579ed1e.entry.js +0 -1
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +0 -7
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +0 -18
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +0 -9
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +0 -6
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +0 -134
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -12
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.d.ts +0 -19
- package/dist/types/components/molecules/tttx-input-calendar/tttx-input-calendar.stories.d.ts +0 -26
|
@@ -1,51 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
items: object[];
|
|
5
|
-
lastPage: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface ActionSelectedEventOptions {
|
|
8
|
-
name: string;
|
|
9
|
-
eventName: string;
|
|
10
|
-
removeRows: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface GenericTemplateData {
|
|
13
|
-
text: string;
|
|
14
|
-
icon?: string;
|
|
15
|
-
iconColor?: string;
|
|
16
|
-
}
|
|
2
|
+
import { ListItem } from './interfaces';
|
|
17
3
|
export declare class TttxList {
|
|
18
|
-
|
|
19
|
-
name: string;
|
|
20
|
-
selectable: boolean;
|
|
21
|
-
items: object[];
|
|
22
|
-
selectedIds: number[];
|
|
23
|
-
loading: boolean;
|
|
24
|
-
lastPage: boolean;
|
|
25
|
-
private template;
|
|
26
|
-
private scrollableParent;
|
|
27
|
-
private rowCount;
|
|
28
|
-
listLoadHandler(event: CustomEvent<LoadEventOptions>): void;
|
|
29
|
-
listPaginate: EventEmitter;
|
|
30
|
-
listPaginateHandler(): void;
|
|
31
|
-
listClearDataCacheHandler(event: CustomEvent): void;
|
|
32
|
-
listActionSelectedEventHandler(event: CustomEvent<ActionSelectedEventOptions>): void;
|
|
4
|
+
data: string | ListItem[];
|
|
33
5
|
listSelectedEvent: EventEmitter;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
listItemClickHandler(itemData: object): void;
|
|
37
|
-
componentWillLoad(): void;
|
|
38
|
-
componentDidLoad(): void;
|
|
39
|
-
listItemContainer(): Element;
|
|
40
|
-
scrollHandler(): Promise<void>;
|
|
41
|
-
isScrollable(node: HTMLElement): boolean;
|
|
42
|
-
getScrollableParent(node: HTMLElement): any;
|
|
43
|
-
appendRowCheckbox(rowContainer: HTMLElement): void;
|
|
44
|
-
appendSeededTemplate(rowData: object, rowContainer: HTMLElement): void;
|
|
45
|
-
appendGenericTemplate(rowData: GenericTemplateData, rowContainer: HTMLElement): void;
|
|
46
|
-
row(rowData: object): HTMLDivElement;
|
|
47
|
-
renderRows(batchData: object[]): void;
|
|
48
|
-
loadIndicator(): any;
|
|
6
|
+
private _data;
|
|
7
|
+
renderListItem(item: ListItem): any;
|
|
49
8
|
render(): any;
|
|
50
9
|
}
|
|
51
|
-
export {};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
3
|
component: string;
|
|
4
|
-
argTypes: {
|
|
5
|
-
selectable: {
|
|
6
|
-
control: {
|
|
7
|
-
type: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
4
|
};
|
|
12
5
|
export default _default;
|
|
13
|
-
export declare const
|
|
6
|
+
export declare const BasicStringList: any;
|
|
7
|
+
export declare const BasicObjectList: any;
|
package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.e2e.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/components/molecules/tttx-standalone-input/test/tttx-standalone-input.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
export type DateSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
|
|
3
|
-
export type MonthSyntax = `${number}${number}${number}${number}-${number}${number}`;
|
|
4
|
-
export type WeekSyntax = `${number}${number}${number}${number}-W${number}${number}`;
|
|
5
|
-
export type TimeSyntax = `${number}${number}:${number}${number}`;
|
|
6
|
-
export type DateTimeLocalSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}`;
|
|
7
|
-
export type MinMaxDates = DateSyntax | MonthSyntax | WeekSyntax | TimeSyntax | DateTimeLocalSyntax;
|
|
2
|
+
export declare type DateSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
|
|
3
|
+
export declare type MonthSyntax = `${number}${number}${number}${number}-${number}${number}`;
|
|
4
|
+
export declare type WeekSyntax = `${number}${number}${number}${number}-W${number}${number}`;
|
|
5
|
+
export declare type TimeSyntax = `${number}${number}:${number}${number}`;
|
|
6
|
+
export declare type DateTimeLocalSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}`;
|
|
7
|
+
export declare type MinMaxDates = DateSyntax | MonthSyntax | WeekSyntax | TimeSyntax | DateTimeLocalSyntax;
|
|
8
8
|
export declare class TttxInput {
|
|
9
9
|
label: string;
|
|
10
10
|
showerrormsg: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { ListItem } from "./components/molecules/tttx-list/interfaces";
|
|
8
9
|
import { MinMaxDates } from "./components/molecules/tttx-standalone-input/tttx-standalone-input";
|
|
9
10
|
export namespace Components {
|
|
10
11
|
interface TttxButton {
|
|
@@ -13,41 +14,21 @@ export namespace Components {
|
|
|
13
14
|
"iconposition": 'left' | 'right';
|
|
14
15
|
"notext": boolean;
|
|
15
16
|
}
|
|
16
|
-
interface TttxCheckbox {
|
|
17
|
-
"label": string;
|
|
18
|
-
"required": boolean;
|
|
19
|
-
"value": boolean;
|
|
20
|
-
}
|
|
21
|
-
interface TttxForm {
|
|
22
|
-
"formschema": any;
|
|
23
|
-
"submitValue": any;
|
|
24
|
-
}
|
|
25
17
|
interface TttxIcon {
|
|
26
18
|
"color": string;
|
|
27
19
|
"icon": string;
|
|
28
20
|
}
|
|
29
|
-
interface TttxInputCalendar {
|
|
30
|
-
"months": boolean;
|
|
31
|
-
"years": boolean;
|
|
32
|
-
}
|
|
33
21
|
interface TttxKeyvalueBlock {
|
|
34
22
|
"horizontal": boolean;
|
|
35
23
|
"keyvalues": any | any[] | string;
|
|
36
24
|
}
|
|
37
25
|
interface TttxList {
|
|
38
|
-
"
|
|
39
|
-
"selectable": boolean;
|
|
26
|
+
"data": string | ListItem[];
|
|
40
27
|
}
|
|
41
28
|
interface TttxLoadingSpinner {
|
|
42
29
|
"loadingMessage": boolean;
|
|
43
30
|
"size": 'small' | 'large';
|
|
44
31
|
}
|
|
45
|
-
interface TttxPopoverContent {
|
|
46
|
-
"body": string;
|
|
47
|
-
"header": string;
|
|
48
|
-
"linkcontext": string;
|
|
49
|
-
"linktext": string;
|
|
50
|
-
}
|
|
51
32
|
interface TttxStandaloneInput {
|
|
52
33
|
"autocomplete": 'off' | 'on';
|
|
53
34
|
"checked": boolean;
|
|
@@ -90,14 +71,6 @@ export namespace Components {
|
|
|
90
71
|
"selected": number;
|
|
91
72
|
}
|
|
92
73
|
}
|
|
93
|
-
export interface TttxCheckboxCustomEvent<T> extends CustomEvent<T> {
|
|
94
|
-
detail: T;
|
|
95
|
-
target: HTMLTttxCheckboxElement;
|
|
96
|
-
}
|
|
97
|
-
export interface TttxFormCustomEvent<T> extends CustomEvent<T> {
|
|
98
|
-
detail: T;
|
|
99
|
-
target: HTMLTttxFormElement;
|
|
100
|
-
}
|
|
101
74
|
export interface TttxListCustomEvent<T> extends CustomEvent<T> {
|
|
102
75
|
detail: T;
|
|
103
76
|
target: HTMLTttxListElement;
|
|
@@ -117,30 +90,12 @@ declare global {
|
|
|
117
90
|
prototype: HTMLTttxButtonElement;
|
|
118
91
|
new (): HTMLTttxButtonElement;
|
|
119
92
|
};
|
|
120
|
-
interface HTMLTttxCheckboxElement extends Components.TttxCheckbox, HTMLStencilElement {
|
|
121
|
-
}
|
|
122
|
-
var HTMLTttxCheckboxElement: {
|
|
123
|
-
prototype: HTMLTttxCheckboxElement;
|
|
124
|
-
new (): HTMLTttxCheckboxElement;
|
|
125
|
-
};
|
|
126
|
-
interface HTMLTttxFormElement extends Components.TttxForm, HTMLStencilElement {
|
|
127
|
-
}
|
|
128
|
-
var HTMLTttxFormElement: {
|
|
129
|
-
prototype: HTMLTttxFormElement;
|
|
130
|
-
new (): HTMLTttxFormElement;
|
|
131
|
-
};
|
|
132
93
|
interface HTMLTttxIconElement extends Components.TttxIcon, HTMLStencilElement {
|
|
133
94
|
}
|
|
134
95
|
var HTMLTttxIconElement: {
|
|
135
96
|
prototype: HTMLTttxIconElement;
|
|
136
97
|
new (): HTMLTttxIconElement;
|
|
137
98
|
};
|
|
138
|
-
interface HTMLTttxInputCalendarElement extends Components.TttxInputCalendar, HTMLStencilElement {
|
|
139
|
-
}
|
|
140
|
-
var HTMLTttxInputCalendarElement: {
|
|
141
|
-
prototype: HTMLTttxInputCalendarElement;
|
|
142
|
-
new (): HTMLTttxInputCalendarElement;
|
|
143
|
-
};
|
|
144
99
|
interface HTMLTttxKeyvalueBlockElement extends Components.TttxKeyvalueBlock, HTMLStencilElement {
|
|
145
100
|
}
|
|
146
101
|
var HTMLTttxKeyvalueBlockElement: {
|
|
@@ -159,12 +114,6 @@ declare global {
|
|
|
159
114
|
prototype: HTMLTttxLoadingSpinnerElement;
|
|
160
115
|
new (): HTMLTttxLoadingSpinnerElement;
|
|
161
116
|
};
|
|
162
|
-
interface HTMLTttxPopoverContentElement extends Components.TttxPopoverContent, HTMLStencilElement {
|
|
163
|
-
}
|
|
164
|
-
var HTMLTttxPopoverContentElement: {
|
|
165
|
-
prototype: HTMLTttxPopoverContentElement;
|
|
166
|
-
new (): HTMLTttxPopoverContentElement;
|
|
167
|
-
};
|
|
168
117
|
interface HTMLTttxStandaloneInputElement extends Components.TttxStandaloneInput, HTMLStencilElement {
|
|
169
118
|
}
|
|
170
119
|
var HTMLTttxStandaloneInputElement: {
|
|
@@ -179,14 +128,10 @@ declare global {
|
|
|
179
128
|
};
|
|
180
129
|
interface HTMLElementTagNameMap {
|
|
181
130
|
"tttx-button": HTMLTttxButtonElement;
|
|
182
|
-
"tttx-checkbox": HTMLTttxCheckboxElement;
|
|
183
|
-
"tttx-form": HTMLTttxFormElement;
|
|
184
131
|
"tttx-icon": HTMLTttxIconElement;
|
|
185
|
-
"tttx-input-calendar": HTMLTttxInputCalendarElement;
|
|
186
132
|
"tttx-keyvalue-block": HTMLTttxKeyvalueBlockElement;
|
|
187
133
|
"tttx-list": HTMLTttxListElement;
|
|
188
134
|
"tttx-loading-spinner": HTMLTttxLoadingSpinnerElement;
|
|
189
|
-
"tttx-popover-content": HTMLTttxPopoverContentElement;
|
|
190
135
|
"tttx-standalone-input": HTMLTttxStandaloneInputElement;
|
|
191
136
|
"tttx-table": HTMLTttxTableElement;
|
|
192
137
|
}
|
|
@@ -198,47 +143,22 @@ declare namespace LocalJSX {
|
|
|
198
143
|
"iconposition"?: 'left' | 'right';
|
|
199
144
|
"notext"?: boolean;
|
|
200
145
|
}
|
|
201
|
-
interface TttxCheckbox {
|
|
202
|
-
"label"?: string;
|
|
203
|
-
"onValueChanged"?: (event: TttxCheckboxCustomEvent<boolean>) => void;
|
|
204
|
-
"required"?: boolean;
|
|
205
|
-
"value"?: boolean;
|
|
206
|
-
}
|
|
207
|
-
interface TttxForm {
|
|
208
|
-
"formschema"?: any;
|
|
209
|
-
"onDataChanged"?: (event: TttxFormCustomEvent<{ name: string, value: any }>) => void;
|
|
210
|
-
"onDataSubmitted"?: (event: TttxFormCustomEvent<FormData>) => void;
|
|
211
|
-
"submitValue"?: any;
|
|
212
|
-
}
|
|
213
146
|
interface TttxIcon {
|
|
214
147
|
"color"?: string;
|
|
215
148
|
"icon"?: string;
|
|
216
149
|
}
|
|
217
|
-
interface TttxInputCalendar {
|
|
218
|
-
"months"?: boolean;
|
|
219
|
-
"years"?: boolean;
|
|
220
|
-
}
|
|
221
150
|
interface TttxKeyvalueBlock {
|
|
222
151
|
"horizontal"?: boolean;
|
|
223
152
|
"keyvalues"?: any | any[] | string;
|
|
224
153
|
}
|
|
225
154
|
interface TttxList {
|
|
226
|
-
"
|
|
155
|
+
"data"?: string | ListItem[];
|
|
227
156
|
"onListItemClick"?: (event: TttxListCustomEvent<any>) => void;
|
|
228
|
-
"onListPaginate"?: (event: TttxListCustomEvent<any>) => void;
|
|
229
|
-
"onListSelectedEvent"?: (event: TttxListCustomEvent<any>) => void;
|
|
230
|
-
"selectable"?: boolean;
|
|
231
157
|
}
|
|
232
158
|
interface TttxLoadingSpinner {
|
|
233
159
|
"loadingMessage"?: boolean;
|
|
234
160
|
"size"?: 'small' | 'large';
|
|
235
161
|
}
|
|
236
|
-
interface TttxPopoverContent {
|
|
237
|
-
"body"?: string;
|
|
238
|
-
"header"?: string;
|
|
239
|
-
"linkcontext"?: string;
|
|
240
|
-
"linktext"?: string;
|
|
241
|
-
}
|
|
242
162
|
interface TttxStandaloneInput {
|
|
243
163
|
"autocomplete"?: 'off' | 'on';
|
|
244
164
|
"checked"?: boolean;
|
|
@@ -288,14 +208,10 @@ declare namespace LocalJSX {
|
|
|
288
208
|
}
|
|
289
209
|
interface IntrinsicElements {
|
|
290
210
|
"tttx-button": TttxButton;
|
|
291
|
-
"tttx-checkbox": TttxCheckbox;
|
|
292
|
-
"tttx-form": TttxForm;
|
|
293
211
|
"tttx-icon": TttxIcon;
|
|
294
|
-
"tttx-input-calendar": TttxInputCalendar;
|
|
295
212
|
"tttx-keyvalue-block": TttxKeyvalueBlock;
|
|
296
213
|
"tttx-list": TttxList;
|
|
297
214
|
"tttx-loading-spinner": TttxLoadingSpinner;
|
|
298
|
-
"tttx-popover-content": TttxPopoverContent;
|
|
299
215
|
"tttx-standalone-input": TttxStandaloneInput;
|
|
300
216
|
"tttx-table": TttxTable;
|
|
301
217
|
}
|
|
@@ -305,14 +221,10 @@ declare module "@stencil/core" {
|
|
|
305
221
|
export namespace JSX {
|
|
306
222
|
interface IntrinsicElements {
|
|
307
223
|
"tttx-button": LocalJSX.TttxButton & JSXBase.HTMLAttributes<HTMLTttxButtonElement>;
|
|
308
|
-
"tttx-checkbox": LocalJSX.TttxCheckbox & JSXBase.HTMLAttributes<HTMLTttxCheckboxElement>;
|
|
309
|
-
"tttx-form": LocalJSX.TttxForm & JSXBase.HTMLAttributes<HTMLTttxFormElement>;
|
|
310
224
|
"tttx-icon": LocalJSX.TttxIcon & JSXBase.HTMLAttributes<HTMLTttxIconElement>;
|
|
311
|
-
"tttx-input-calendar": LocalJSX.TttxInputCalendar & JSXBase.HTMLAttributes<HTMLTttxInputCalendarElement>;
|
|
312
225
|
"tttx-keyvalue-block": LocalJSX.TttxKeyvalueBlock & JSXBase.HTMLAttributes<HTMLTttxKeyvalueBlockElement>;
|
|
313
226
|
"tttx-list": LocalJSX.TttxList & JSXBase.HTMLAttributes<HTMLTttxListElement>;
|
|
314
227
|
"tttx-loading-spinner": LocalJSX.TttxLoadingSpinner & JSXBase.HTMLAttributes<HTMLTttxLoadingSpinnerElement>;
|
|
315
|
-
"tttx-popover-content": LocalJSX.TttxPopoverContent & JSXBase.HTMLAttributes<HTMLTttxPopoverContentElement>;
|
|
316
228
|
"tttx-standalone-input": LocalJSX.TttxStandaloneInput & JSXBase.HTMLAttributes<HTMLTttxStandaloneInputElement>;
|
|
317
229
|
"tttx-table": LocalJSX.TttxTable & JSXBase.HTMLAttributes<HTMLTttxTableElement>;
|
|
318
230
|
}
|
|
@@ -133,7 +133,7 @@ export interface ListenOptions {
|
|
|
133
133
|
*/
|
|
134
134
|
passive?: boolean;
|
|
135
135
|
}
|
|
136
|
-
export type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
136
|
+
export declare type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
137
137
|
export interface StateDecorator {
|
|
138
138
|
(): PropertyDecorator;
|
|
139
139
|
}
|
|
@@ -214,8 +214,8 @@ export declare const State: StateDecorator;
|
|
|
214
214
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
215
215
|
*/
|
|
216
216
|
export declare const Watch: WatchDecorator;
|
|
217
|
-
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
218
|
-
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
217
|
+
export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
218
|
+
export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
219
219
|
/**
|
|
220
220
|
* `setMode()` is used for libraries which provide multiple "modes" for styles.
|
|
221
221
|
*/
|
|
@@ -257,15 +257,6 @@ export declare function getAssetPath(path: string): string;
|
|
|
257
257
|
* @returns the set path
|
|
258
258
|
*/
|
|
259
259
|
export declare function setAssetPath(path: string): string;
|
|
260
|
-
/**
|
|
261
|
-
* Used to specify a nonce value that corresponds with an application's
|
|
262
|
-
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
263
|
-
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
264
|
-
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
265
|
-
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
266
|
-
* @param nonce The value to be used for the nonce attribute.
|
|
267
|
-
*/
|
|
268
|
-
export declare function setNonce(nonce: string): void;
|
|
269
260
|
/**
|
|
270
261
|
* Retrieve a Stencil element for a given reference
|
|
271
262
|
* @param ref the ref to get the Stencil element for
|
|
@@ -442,57 +433,13 @@ interface HostAttributes {
|
|
|
442
433
|
ref?: (el: HTMLElement | null) => void;
|
|
443
434
|
[prop: string]: any;
|
|
444
435
|
}
|
|
445
|
-
/**
|
|
446
|
-
* Utilities for working with functional Stencil components. An object
|
|
447
|
-
* conforming to this interface is passed by the Stencil runtime as the third
|
|
448
|
-
* argument to a functional component, allowing component authors to work with
|
|
449
|
-
* features like children.
|
|
450
|
-
*
|
|
451
|
-
* The children of a functional component will be passed as the second
|
|
452
|
-
* argument, so a functional component which uses these utils to transform its
|
|
453
|
-
* children might look like the following:
|
|
454
|
-
*
|
|
455
|
-
* ```ts
|
|
456
|
-
* export const AddClass: FunctionalComponent = (_, children, utils) => (
|
|
457
|
-
* utils.map(children, child => ({
|
|
458
|
-
* ...child,
|
|
459
|
-
* vattrs: {
|
|
460
|
-
* ...child.vattrs,
|
|
461
|
-
* class: `${child.vattrs.class} add-class`
|
|
462
|
-
* }
|
|
463
|
-
* }))
|
|
464
|
-
* );
|
|
465
|
-
* ```
|
|
466
|
-
*
|
|
467
|
-
* For more see the Stencil documentation, here:
|
|
468
|
-
* https://stenciljs.com/docs/functional-components
|
|
469
|
-
*/
|
|
470
436
|
export interface FunctionalUtilities {
|
|
471
|
-
/**
|
|
472
|
-
* Utility for reading the children of a functional component at runtime.
|
|
473
|
-
* Since the Stencil runtime uses a different interface for children it is
|
|
474
|
-
* not recommendeded to read the children directly, and is preferable to use
|
|
475
|
-
* this utility to, for instance, perform a side effect for each child.
|
|
476
|
-
*/
|
|
477
437
|
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
|
|
478
|
-
/**
|
|
479
|
-
* Utility for transforming the children of a functional component. Given an
|
|
480
|
-
* array of children and a callback this will return a list of the results of
|
|
481
|
-
* passing each child to the supplied callback.
|
|
482
|
-
*/
|
|
483
438
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
484
439
|
}
|
|
485
440
|
export interface FunctionalComponent<T = {}> {
|
|
486
441
|
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
487
442
|
}
|
|
488
|
-
/**
|
|
489
|
-
* A Child VDOM node
|
|
490
|
-
*
|
|
491
|
-
* This has most of the same properties as {@link VNode} but friendlier names
|
|
492
|
-
* (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
|
|
493
|
-
* order to provide a friendlier public interface for users of the
|
|
494
|
-
* {@link FunctionalUtilities}).
|
|
495
|
-
*/
|
|
496
443
|
export interface ChildNode {
|
|
497
444
|
vtag?: string | number | Function;
|
|
498
445
|
vkey?: string | number;
|
|
@@ -539,9 +486,6 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
|
|
|
539
486
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
540
487
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
541
488
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
542
|
-
/**
|
|
543
|
-
* A virtual DOM node
|
|
544
|
-
*/
|
|
545
489
|
export interface VNode {
|
|
546
490
|
$flags$: number;
|
|
547
491
|
$tag$: string | number | Function;
|
package/loader/index.d.ts
CHANGED
|
@@ -10,12 +10,3 @@ export interface CustomElementsDefineOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
|
|
12
12
|
export declare function applyPolyfills(): Promise<void>;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
16
|
-
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
17
|
-
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
18
|
-
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
19
|
-
* will result in the same behavior.
|
|
20
|
-
*/
|
|
21
|
-
export declare function setNonce(nonce: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3t-transform/threeteeui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "3t Design System",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "stencil build --docs",
|
|
19
19
|
"start": "stencil build --watch --serve",
|
|
20
20
|
"test": "stencil test --spec --e2e",
|
|
21
|
-
"coverage": "yarn test --
|
|
21
|
+
"coverage": "yarn test --coverage --no-cache",
|
|
22
22
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
23
23
|
"generate": "stencil generate",
|
|
24
24
|
"storybook": "storybook dev -p 6006",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"readme": "ERROR: No README data found!",
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@popperjs/core": "^2.11.7",
|
|
70
|
+
"dompurify": "^3.0.3",
|
|
70
71
|
"storybook": "^7.0.6"
|
|
71
72
|
}
|
|
72
73
|
}
|
package/readme.md
CHANGED
|
@@ -87,3 +87,23 @@ The first step for all three of these strategies is to [publish to NPM](https://
|
|
|
87
87
|
- Run `npm install my-component --save`
|
|
88
88
|
- Add an import to the npm packages `import my-component;`
|
|
89
89
|
- Then you can use the element anywhere in your template, JSX, html etc
|
|
90
|
+
|
|
91
|
+
### DOMPurify
|
|
92
|
+
|
|
93
|
+
In some cases we may want to pass html to a component as a prop. In this case we can render it by pasing it to an element with the innerHTML attribute, which can be a security concern so before attaching it to the innerHTML attribute we first pass it through DOMPurify which should scan and removes moulious tags.
|
|
94
|
+
|
|
95
|
+
To use DOMPurify in your component you will need to import it and then use it in the render or a method called by the render function.
|
|
96
|
+
|
|
97
|
+
#### imports
|
|
98
|
+
``` typescript
|
|
99
|
+
import { sanitize } from 'dompurify';
|
|
100
|
+
import domSanitiserOptions from '../../../shared/domsanitiser.options';
|
|
101
|
+
```
|
|
102
|
+
#### Method
|
|
103
|
+
``` typescript
|
|
104
|
+
render() {
|
|
105
|
+
return (
|
|
106
|
+
<div innerHTML={sanitize(this.html, domSanitiserOptions)}></div>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
```
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-bf777121.js');
|
|
6
|
-
|
|
7
|
-
const tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}.spacing{margin-bottom:16px}";
|
|
8
|
-
|
|
9
|
-
const TttxCheckbox = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
13
|
-
this.value = undefined;
|
|
14
|
-
this.label = undefined;
|
|
15
|
-
this.required = undefined;
|
|
16
|
-
}
|
|
17
|
-
handleClick(event) {
|
|
18
|
-
const target = event.target;
|
|
19
|
-
this.value = target.checked;
|
|
20
|
-
this.valueChanged.emit(target.checked);
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
return (index.h(index.Host, null, index.h("div", { class: "field spacing" }, this.label && (index.h("label", { class: "label" }, this.label, !this.required ? index.h("span", { class: "optional" }, " (optional)") : '')), index.h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
TttxCheckbox.style = tttxCheckboxCss;
|
|
27
|
-
|
|
28
|
-
exports.tttx_checkbox = TttxCheckbox;
|