@3t-transform/threeteeui 0.0.1
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-eb8fc323.js +1620 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/toolbar-656be6e6.js +34259 -0
- package/dist/cjs/tttx-page.cjs.entry.js +927 -0
- package/dist/cjs/tttx-worksheet.cjs.entry.js +47 -0
- package/dist/cjs/tttx.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/patterns/tttx-page/tttx-page.css +162 -0
- package/dist/collection/components/patterns/tttx-page/tttx-page.js +213 -0
- package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +80 -0
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +134 -0
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +70 -0
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +44 -0
- package/dist/collection/docs/gettingstarted-developer.stories.js +9 -0
- package/dist/collection/docs/template.stories.js +10 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/index.js +3 -0
- package/dist/components/tttx-page.d.ts +11 -0
- package/dist/components/tttx-page.js +953 -0
- package/dist/components/tttx-worksheet.d.ts +11 -0
- package/dist/components/tttx-worksheet.js +6 -0
- package/dist/components/tttx-worksheet2.js +34288 -0
- package/dist/esm/index-4c11a593.js +1594 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/toolbar-cede4385.js +34231 -0
- package/dist/esm/tttx-page.entry.js +923 -0
- package/dist/esm/tttx-worksheet.entry.js +43 -0
- package/dist/esm/tttx.js +17 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/tttx/index.esm.js +0 -0
- package/dist/tttx/p-2681b874.js +2 -0
- package/dist/tttx/p-d038fe18.js +1 -0
- package/dist/tttx/p-d5c31f03.entry.js +1 -0
- package/dist/tttx/p-e40966f3.entry.js +1 -0
- package/dist/tttx/tttx.css +1 -0
- package/dist/tttx/tttx.esm.js +1 -0
- package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +21 -0
- package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +48 -0
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +9 -0
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.stories.d.ts +23 -0
- package/dist/types/components.d.ts +66 -0
- package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -0
- package/dist/types/docs/template.stories.d.ts +5 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1581 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +60 -0
- package/readme.md +90 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
import dxToolbar from 'devextreme/esm/ui/toolbar';
|
|
3
|
+
import dxButton from 'devextreme/esm/ui/button';
|
|
4
|
+
export class TttxWorksheet {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.pageSize = 'large';
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
this.footer();
|
|
10
|
+
}
|
|
11
|
+
pageSizeIsNumeric() {
|
|
12
|
+
return /^\d+$/.test(this.pageSize);
|
|
13
|
+
}
|
|
14
|
+
pageSizeClasses(baseClassName) {
|
|
15
|
+
return this.pageSizeIsNumeric() ? baseClassName : `${baseClassName}--${this.pageSize}`;
|
|
16
|
+
}
|
|
17
|
+
footer() {
|
|
18
|
+
if (!['medium', 'small'].includes(this.pageSize)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
new dxToolbar(this.footerBar, {
|
|
22
|
+
items: [
|
|
23
|
+
{
|
|
24
|
+
location: 'after',
|
|
25
|
+
widget: dxButton,
|
|
26
|
+
options: {
|
|
27
|
+
text: 'save'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
const customPageWidth = this.pageSizeIsNumeric ? { width: `${this.pageSize}px` } : {};
|
|
35
|
+
return (h(Host, null, h("div", { class: this.pageSizeClasses('worksheet__container'), style: Object.assign({}, customPageWidth) }, h("slot", null), h("div", { class: `worksheet__footer--${this.pageSize}`, ref: el => (this.footerBar = el) }))));
|
|
36
|
+
}
|
|
37
|
+
static get is() { return "tttx-worksheet"; }
|
|
38
|
+
static get originalStyleUrls() {
|
|
39
|
+
return {
|
|
40
|
+
"$": ["tttx-worksheet.scss"]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static get styleUrls() {
|
|
44
|
+
return {
|
|
45
|
+
"$": ["tttx-worksheet.css"]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static get properties() {
|
|
49
|
+
return {
|
|
50
|
+
"pageSize": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "'large' | 'medium' | 'small' | string",
|
|
55
|
+
"resolved": "string",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"attribute": "page-size",
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"defaultValue": "'large'"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Patterns/Worksheet',
|
|
3
|
+
argTypes: {
|
|
4
|
+
pageSize: {
|
|
5
|
+
options: [
|
|
6
|
+
'large',
|
|
7
|
+
'medium',
|
|
8
|
+
'small',
|
|
9
|
+
'800'
|
|
10
|
+
],
|
|
11
|
+
control: {
|
|
12
|
+
type: 'select'
|
|
13
|
+
},
|
|
14
|
+
description: 'A control on the width of the worksheet. Accepts three preset sizes (large, medium and small), as well as a number of pixels. Medium and small worksheets render a footer'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
backgrounds: {
|
|
19
|
+
default: 'dark'
|
|
20
|
+
},
|
|
21
|
+
docs: {
|
|
22
|
+
transformSource: source => {
|
|
23
|
+
var _a;
|
|
24
|
+
const [, output] = (_a = source.match(/<span decorator-start \/>([\s\S]*?)<span decorator-end \/>/)) !== null && _a !== void 0 ? _a : [];
|
|
25
|
+
return output;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
decorators: [
|
|
30
|
+
(Story) => `
|
|
31
|
+
<div style="height: 500px; transform: translateZ(0)">
|
|
32
|
+
<span decorator-start />
|
|
33
|
+
${Story()}
|
|
34
|
+
<span decorator-end />
|
|
35
|
+
</div>
|
|
36
|
+
`
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
const Template = (args) => `
|
|
40
|
+
<tttx-worksheet
|
|
41
|
+
${args.pageSize ? `page-size=${args.pageSize}` : ''}>
|
|
42
|
+
</tttx-worksheet>
|
|
43
|
+
`;
|
|
44
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* tttx custom elements */
|
|
2
|
+
export { TttxPage as TttxPage } from '../types/components/patterns/tttx-page/tttx-page';
|
|
3
|
+
export { TttxWorksheet as TttxWorksheet } from '../types/components/patterns/tttx-worksheet/tttx-worksheet';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Used to manually set the base path where assets can be found.
|
|
7
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
8
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
9
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
10
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
11
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
12
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
13
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
14
|
+
*/
|
|
15
|
+
export declare const setAssetPath: (path: string) => void;
|
|
16
|
+
|
|
17
|
+
export interface SetPlatformOptions {
|
|
18
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
19
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
20
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
23
|
+
export * from '../types';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
+
export { TttxPage, defineCustomElement as defineCustomElementTttxPage } from './tttx-page.js';
|
|
3
|
+
export { TttxWorksheet, defineCustomElement as defineCustomElementTttxWorksheet } from './tttx-worksheet.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxPage extends Components.TttxPage, HTMLElement {}
|
|
4
|
+
export const TttxPage: {
|
|
5
|
+
prototype: TttxPage;
|
|
6
|
+
new (): TttxPage;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|