typecomposer 0.1.47 → 0.1.49
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/{core → dist/core}/index.d.ts +0 -3
- package/{core → dist/core}/index.js +0 -3
- package/dist/core/index.js.map +1 -0
- package/{core → dist/core}/styles/index.d.ts +3 -3
- package/{core → dist/core}/styles/index.js +0 -8
- package/{core → dist/core}/styles/index.js.map +1 -1
- package/{global → dist/global}/index.d.ts +10 -4
- package/{global → dist/global}/index.js +387 -322
- package/dist/global/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/{index.d.ts → dist/index.js} +1 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -6
- package/styles/style.scss +2 -17
- package/typings/index.d.ts +58 -66
- package/core/app/Validate.d.ts +0 -61
- package/core/app/Validate.js +0 -2
- package/core/app/Validate.js.map +0 -1
- package/core/app/index.d.ts +0 -40
- package/core/app/index.js +0 -181
- package/core/app/index.js.map +0 -1
- package/core/components/AlertPanel.d.ts +0 -32
- package/core/components/AlertPanel.js +0 -75
- package/core/components/AlertPanel.js.map +0 -1
- package/core/components/AvatarPanel.d.ts +0 -21
- package/core/components/AvatarPanel.js +0 -62
- package/core/components/AvatarPanel.js.map +0 -1
- package/core/components/BorderPanel.d.ts +0 -28
- package/core/components/BorderPanel.js +0 -90
- package/core/components/BorderPanel.js.map +0 -1
- package/core/components/CardPanel.d.ts +0 -5
- package/core/components/CardPanel.js +0 -11
- package/core/components/CardPanel.js.map +0 -1
- package/core/components/CheckBox.d.ts +0 -36
- package/core/components/CheckBox.js +0 -109
- package/core/components/CheckBox.js.map +0 -1
- package/core/components/ColorPicker.d.ts +0 -10
- package/core/components/ColorPicker.js +0 -36
- package/core/components/ColorPicker.js.map +0 -1
- package/core/components/ContextMenu.d.ts +0 -16
- package/core/components/ContextMenu.js +0 -64
- package/core/components/ContextMenu.js.map +0 -1
- package/core/components/DialogPanel.d.ts +0 -15
- package/core/components/DialogPanel.js +0 -62
- package/core/components/DialogPanel.js.map +0 -1
- package/core/components/DropDown.d.ts +0 -54
- package/core/components/DropDown.js +0 -231
- package/core/components/DropDown.js.map +0 -1
- package/core/components/FlowPanel.d.ts +0 -11
- package/core/components/FlowPanel.js +0 -40
- package/core/components/FlowPanel.js.map +0 -1
- package/core/components/ForEach.d.ts +0 -11
- package/core/components/ForEach.js +0 -88
- package/core/components/ForEach.js.map +0 -1
- package/core/components/GridPanel.d.ts +0 -10
- package/core/components/GridPanel.js +0 -30
- package/core/components/GridPanel.js.map +0 -1
- package/core/components/HBox.d.ts +0 -5
- package/core/components/HBox.js +0 -10
- package/core/components/HBox.js.map +0 -1
- package/core/components/LazyLoading.d.ts +0 -19
- package/core/components/LazyLoading.js +0 -36
- package/core/components/LazyLoading.js.map +0 -1
- package/core/components/ListPanel.d.ts +0 -27
- package/core/components/ListPanel.js +0 -153
- package/core/components/ListPanel.js.map +0 -1
- package/core/components/PopUpButton.d.ts +0 -18
- package/core/components/PopUpButton.js +0 -57
- package/core/components/PopUpButton.js.map +0 -1
- package/core/components/ScrollPanel.d.ts +0 -14
- package/core/components/ScrollPanel.js +0 -35
- package/core/components/ScrollPanel.js.map +0 -1
- package/core/components/SliderPanel.d.ts +0 -7
- package/core/components/SliderPanel.js +0 -135
- package/core/components/SliderPanel.js.map +0 -1
- package/core/components/StackPanel.d.ts +0 -5
- package/core/components/StackPanel.js +0 -10
- package/core/components/StackPanel.js.map +0 -1
- package/core/components/TabItem.d.ts +0 -19
- package/core/components/TabItem.js +0 -84
- package/core/components/TabItem.js.map +0 -1
- package/core/components/TabPanel.d.ts +0 -25
- package/core/components/TabPanel.js +0 -96
- package/core/components/TabPanel.js.map +0 -1
- package/core/components/TablePanel.d.ts +0 -34
- package/core/components/TablePanel.js +0 -127
- package/core/components/TablePanel.js.map +0 -1
- package/core/components/TextEdit.d.ts +0 -32
- package/core/components/TextEdit.js +0 -174
- package/core/components/TextEdit.js.map +0 -1
- package/core/components/TextField.d.ts +0 -34
- package/core/components/TextField.js +0 -140
- package/core/components/TextField.js.map +0 -1
- package/core/components/ToggleButton.d.ts +0 -7
- package/core/components/ToggleButton.js +0 -20
- package/core/components/ToggleButton.js.map +0 -1
- package/core/components/Tooltip.d.ts +0 -10
- package/core/components/Tooltip.js +0 -14
- package/core/components/Tooltip.js.map +0 -1
- package/core/components/VBox.d.ts +0 -5
- package/core/components/VBox.js +0 -10
- package/core/components/VBox.js.map +0 -1
- package/core/components/VirtualScroll copy 2.d.ts +0 -24
- package/core/components/VirtualScroll copy 2.js +0 -92
- package/core/components/VirtualScroll copy 2.js.map +0 -1
- package/core/components/VirtualScroll.d.ts +0 -20
- package/core/components/VirtualScroll.js +0 -47
- package/core/components/VirtualScroll.js.map +0 -1
- package/core/components/index.d.ts +0 -28
- package/core/components/index.js +0 -30
- package/core/components/index.js.map +0 -1
- package/core/decorators/RegisterComponent.d.ts +0 -8
- package/core/decorators/RegisterComponent.js +0 -20
- package/core/decorators/RegisterComponent.js.map +0 -1
- package/core/decorators/StyleLink.d.ts +0 -1
- package/core/decorators/StyleLink.js +0 -13
- package/core/decorators/StyleLink.js.map +0 -1
- package/core/decorators/index.d.ts +0 -4
- package/core/decorators/index.js +0 -6
- package/core/decorators/index.js.map +0 -1
- package/core/element/AbbreviationElement.d.ts +0 -7
- package/core/element/AbbreviationElement.js +0 -10
- package/core/element/AbbreviationElement.js.map +0 -1
- package/core/element/AnchorElement.d.ts +0 -24
- package/core/element/AnchorElement.js +0 -31
- package/core/element/AnchorElement.js.map +0 -1
- package/core/element/AreaElement.d.ts +0 -18
- package/core/element/AreaElement.js +0 -11
- package/core/element/AreaElement.js.map +0 -1
- package/core/element/ArticleElement.d.ts +0 -5
- package/core/element/ArticleElement.js +0 -12
- package/core/element/ArticleElement.js.map +0 -1
- package/core/element/AudioElement.d.ts +0 -12
- package/core/element/AudioElement.js +0 -10
- package/core/element/AudioElement.js.map +0 -1
- package/core/element/BaseElement.d.ts +0 -8
- package/core/element/BaseElement.js +0 -11
- package/core/element/BaseElement.js.map +0 -1
- package/core/element/BodyElement.d.ts +0 -5
- package/core/element/BodyElement.js +0 -11
- package/core/element/BodyElement.js.map +0 -1
- package/core/element/BoldElement.d.ts +0 -5
- package/core/element/BoldElement.js +0 -10
- package/core/element/BoldElement.js.map +0 -1
- package/core/element/BreakElement.d.ts +0 -5
- package/core/element/BreakElement.js +0 -10
- package/core/element/BreakElement.js.map +0 -1
- package/core/element/ButtonElement.d.ts +0 -26
- package/core/element/ButtonElement.js +0 -47
- package/core/element/ButtonElement.js.map +0 -1
- package/core/element/CanvasElement.d.ts +0 -5
- package/core/element/CanvasElement.js +0 -14
- package/core/element/CanvasElement.js.map +0 -1
- package/core/element/CaptionElement.d.ts +0 -5
- package/core/element/CaptionElement.js +0 -13
- package/core/element/CaptionElement.js.map +0 -1
- package/core/element/CiteElement.d.ts +0 -5
- package/core/element/CiteElement.js +0 -11
- package/core/element/CiteElement.js.map +0 -1
- package/core/element/CodeElement.d.ts +0 -7
- package/core/element/CodeElement.js +0 -13
- package/core/element/CodeElement.js.map +0 -1
- package/core/element/DataListElement.d.ts +0 -5
- package/core/element/DataListElement.js +0 -13
- package/core/element/DataListElement.js.map +0 -1
- package/core/element/DefinitionDescriptionElement.d.ts +0 -5
- package/core/element/DefinitionDescriptionElement.js +0 -13
- package/core/element/DefinitionDescriptionElement.js.map +0 -1
- package/core/element/DefinitionElement.d.ts +0 -5
- package/core/element/DefinitionElement.js +0 -13
- package/core/element/DefinitionElement.js.map +0 -1
- package/core/element/DeletedTextElement.d.ts +0 -7
- package/core/element/DeletedTextElement.js +0 -15
- package/core/element/DeletedTextElement.js.map +0 -1
- package/core/element/DetailsElement.d.ts +0 -9
- package/core/element/DetailsElement.js +0 -28
- package/core/element/DetailsElement.js.map +0 -1
- package/core/element/DialogElement.d.ts +0 -7
- package/core/element/DialogElement.js +0 -14
- package/core/element/DialogElement.js.map +0 -1
- package/core/element/DivElement.d.ts +0 -5
- package/core/element/DivElement.js +0 -10
- package/core/element/DivElement.js.map +0 -1
- package/core/element/EmElement.d.ts +0 -5
- package/core/element/EmElement.js +0 -10
- package/core/element/EmElement.js.map +0 -1
- package/core/element/EmbedElement.d.ts +0 -10
- package/core/element/EmbedElement.js +0 -19
- package/core/element/EmbedElement.js.map +0 -1
- package/core/element/FieldSetElement.d.ts +0 -9
- package/core/element/FieldSetElement.js +0 -34
- package/core/element/FieldSetElement.js.map +0 -1
- package/core/element/FooterElement.d.ts +0 -5
- package/core/element/FooterElement.js +0 -13
- package/core/element/FooterElement.js.map +0 -1
- package/core/element/FormElement.d.ts +0 -20
- package/core/element/FormElement.js +0 -36
- package/core/element/FormElement.js.map +0 -1
- package/core/element/Fragment.d.ts +0 -32
- package/core/element/Fragment.js +0 -103
- package/core/element/Fragment.js.map +0 -1
- package/core/element/H1Element.d.ts +0 -5
- package/core/element/H1Element.js +0 -10
- package/core/element/H1Element.js.map +0 -1
- package/core/element/H2Element.d.ts +0 -5
- package/core/element/H2Element.js +0 -10
- package/core/element/H2Element.js.map +0 -1
- package/core/element/H3Element.d.ts +0 -5
- package/core/element/H3Element.js +0 -10
- package/core/element/H3Element.js.map +0 -1
- package/core/element/H4Element.d.ts +0 -5
- package/core/element/H4Element.js +0 -10
- package/core/element/H4Element.js.map +0 -1
- package/core/element/H5Element.d.ts +0 -5
- package/core/element/H5Element.js +0 -10
- package/core/element/H5Element.js.map +0 -1
- package/core/element/H6Element.d.ts +0 -5
- package/core/element/H6Element.js +0 -10
- package/core/element/H6Element.js.map +0 -1
- package/core/element/HeadElement.d.ts +0 -5
- package/core/element/HeadElement.js +0 -11
- package/core/element/HeadElement.js.map +0 -1
- package/core/element/HeaderElement.d.ts +0 -5
- package/core/element/HeaderElement.js +0 -13
- package/core/element/HeaderElement.js.map +0 -1
- package/core/element/HorizontalRuleElement.d.ts +0 -5
- package/core/element/HorizontalRuleElement.js +0 -13
- package/core/element/HorizontalRuleElement.js.map +0 -1
- package/core/element/HtmlElement.d.ts +0 -9
- package/core/element/HtmlElement.js +0 -19
- package/core/element/HtmlElement.js.map +0 -1
- package/core/element/IFrameElement.d.ts +0 -28
- package/core/element/IFrameElement.js +0 -67
- package/core/element/IFrameElement.js.map +0 -1
- package/core/element/ILayout.d.ts +0 -5
- package/core/element/ILayout.js +0 -9
- package/core/element/ILayout.js.map +0 -1
- package/core/element/IconElement.d.ts +0 -14
- package/core/element/IconElement.js +0 -32
- package/core/element/IconElement.js.map +0 -1
- package/core/element/IdiomaticElement.d.ts +0 -4
- package/core/element/IdiomaticElement.js +0 -6
- package/core/element/IdiomaticElement.js.map +0 -1
- package/core/element/ImageElement.d.ts +0 -19
- package/core/element/ImageElement.js +0 -17
- package/core/element/ImageElement.js.map +0 -1
- package/core/element/InputElement.d.ts +0 -19
- package/core/element/InputElement.js +0 -81
- package/core/element/InputElement.js.map +0 -1
- package/core/element/LabelElement.d.ts +0 -8
- package/core/element/LabelElement.js +0 -10
- package/core/element/LabelElement.js.map +0 -1
- package/core/element/LegendElement.d.ts +0 -7
- package/core/element/LegendElement.js +0 -15
- package/core/element/LegendElement.js.map +0 -1
- package/core/element/ListItemElement.d.ts +0 -12
- package/core/element/ListItemElement.js +0 -28
- package/core/element/ListItemElement.js.map +0 -1
- package/core/element/MainElement.d.ts +0 -5
- package/core/element/MainElement.js +0 -10
- package/core/element/MainElement.js.map +0 -1
- package/core/element/NavElement.d.ts +0 -5
- package/core/element/NavElement.js +0 -10
- package/core/element/NavElement.js.map +0 -1
- package/core/element/OrderedListElement.d.ts +0 -5
- package/core/element/OrderedListElement.js +0 -10
- package/core/element/OrderedListElement.js.map +0 -1
- package/core/element/ParagraphElement.d.ts +0 -5
- package/core/element/ParagraphElement.js +0 -10
- package/core/element/ParagraphElement.js.map +0 -1
- package/core/element/PreElement.d.ts +0 -5
- package/core/element/PreElement.js +0 -10
- package/core/element/PreElement.js.map +0 -1
- package/core/element/SectionElement.d.ts +0 -5
- package/core/element/SectionElement.js +0 -12
- package/core/element/SectionElement.js.map +0 -1
- package/core/element/SelectElement.d.ts +0 -5
- package/core/element/SelectElement.js +0 -12
- package/core/element/SelectElement.js.map +0 -1
- package/core/element/SourceElement.d.ts +0 -8
- package/core/element/SourceElement.js +0 -14
- package/core/element/SourceElement.js.map +0 -1
- package/core/element/SpanElement.d.ts +0 -5
- package/core/element/SpanElement.js +0 -10
- package/core/element/SpanElement.js.map +0 -1
- package/core/element/StrongElement.d.ts +0 -5
- package/core/element/StrongElement.js +0 -12
- package/core/element/StrongElement.js.map +0 -1
- package/core/element/StyleElement.d.ts +0 -5
- package/core/element/StyleElement.js +0 -10
- package/core/element/StyleElement.js.map +0 -1
- package/core/element/SummaryElement.d.ts +0 -5
- package/core/element/SummaryElement.js +0 -12
- package/core/element/SummaryElement.js.map +0 -1
- package/core/element/SvgElement.d.ts +0 -18
- package/core/element/SvgElement.js +0 -151
- package/core/element/SvgElement.js.map +0 -1
- package/core/element/TableBodyElement.d.ts +0 -5
- package/core/element/TableBodyElement.js +0 -10
- package/core/element/TableBodyElement.js.map +0 -1
- package/core/element/TableCellElement.d.ts +0 -10
- package/core/element/TableCellElement.js +0 -25
- package/core/element/TableCellElement.js.map +0 -1
- package/core/element/TableColElement.d.ts +0 -7
- package/core/element/TableColElement.js +0 -13
- package/core/element/TableColElement.js.map +0 -1
- package/core/element/TableColGroupElement.d.ts +0 -7
- package/core/element/TableColGroupElement.js +0 -15
- package/core/element/TableColGroupElement.js.map +0 -1
- package/core/element/TableElement.d.ts +0 -45
- package/core/element/TableElement.js +0 -228
- package/core/element/TableElement.js.map +0 -1
- package/core/element/TableFootElement.d.ts +0 -5
- package/core/element/TableFootElement.js +0 -10
- package/core/element/TableFootElement.js.map +0 -1
- package/core/element/TableFootRowElement.d.ts +0 -9
- package/core/element/TableFootRowElement.js +0 -23
- package/core/element/TableFootRowElement.js.map +0 -1
- package/core/element/TableHeadCellElement.d.ts +0 -10
- package/core/element/TableHeadCellElement.js +0 -24
- package/core/element/TableHeadCellElement.js.map +0 -1
- package/core/element/TableHeadElement.d.ts +0 -5
- package/core/element/TableHeadElement.js +0 -10
- package/core/element/TableHeadElement.js.map +0 -1
- package/core/element/TableHeadRowElement.d.ts +0 -11
- package/core/element/TableHeadRowElement.js +0 -29
- package/core/element/TableHeadRowElement.js.map +0 -1
- package/core/element/TableRowElement.d.ts +0 -11
- package/core/element/TableRowElement.js +0 -29
- package/core/element/TableRowElement.js.map +0 -1
- package/core/element/TextAreaElement.d.ts +0 -7
- package/core/element/TextAreaElement.js +0 -10
- package/core/element/TextAreaElement.js.map +0 -1
- package/core/element/UListElement.d.ts +0 -5
- package/core/element/UListElement.js +0 -10
- package/core/element/UListElement.js.map +0 -1
- package/core/element/VideoElement.d.ts +0 -13
- package/core/element/VideoElement.js +0 -16
- package/core/element/VideoElement.js.map +0 -1
- package/core/element/index.d.ts +0 -72
- package/core/element/index.js +0 -73
- package/core/element/index.js.map +0 -1
- package/core/event/index.d.ts +0 -16
- package/core/event/index.js +0 -75
- package/core/event/index.js.map +0 -1
- package/core/index.js.map +0 -1
- package/core/ref/Computed.d.ts +0 -3
- package/core/ref/Computed.js +0 -75
- package/core/ref/Computed.js.map +0 -1
- package/core/ref/RefBoolean.d.ts +0 -91
- package/core/ref/RefBoolean.js +0 -119
- package/core/ref/RefBoolean.js.map +0 -1
- package/core/ref/RefContainer.d.ts +0 -28
- package/core/ref/RefContainer.js +0 -114
- package/core/ref/RefContainer.js.map +0 -1
- package/core/ref/RefList.d.ts +0 -120
- package/core/ref/RefList.js +0 -240
- package/core/ref/RefList.js.map +0 -1
- package/core/ref/RefMap.d.ts +0 -100
- package/core/ref/RefMap.js +0 -149
- package/core/ref/RefMap.js.map +0 -1
- package/core/ref/RefNumber.d.ts +0 -118
- package/core/ref/RefNumber.js +0 -157
- package/core/ref/RefNumber.js.map +0 -1
- package/core/ref/RefObject copy.d.ts +0 -124
- package/core/ref/RefObject copy.js +0 -271
- package/core/ref/RefObject copy.js.map +0 -1
- package/core/ref/RefObject.d.ts +0 -120
- package/core/ref/RefObject.js +0 -265
- package/core/ref/RefObject.js.map +0 -1
- package/core/ref/RefProperty.d.ts +0 -3
- package/core/ref/RefProperty.js +0 -46
- package/core/ref/RefProperty.js.map +0 -1
- package/core/ref/RefSet.d.ts +0 -99
- package/core/ref/RefSet.js +0 -148
- package/core/ref/RefSet.js.map +0 -1
- package/core/ref/RefState.d.ts +0 -25
- package/core/ref/RefState.js +0 -89
- package/core/ref/RefState.js.map +0 -1
- package/core/ref/RefString.d.ts +0 -148
- package/core/ref/RefString.js +0 -179
- package/core/ref/RefString.js.map +0 -1
- package/core/ref/index.d.ts +0 -23
- package/core/ref/index.js +0 -71
- package/core/ref/index.js.map +0 -1
- package/core/router/RouteView.d.ts +0 -20
- package/core/router/RouteView.js +0 -84
- package/core/router/RouteView.js.map +0 -1
- package/core/router/Router.d.ts +0 -78
- package/core/router/Router.js +0 -307
- package/core/router/Router.js.map +0 -1
- package/core/router/RouterEvent.d.ts +0 -36
- package/core/router/RouterEvent.js +0 -43
- package/core/router/RouterEvent.js.map +0 -1
- package/core/router/RouterGuard.d.ts +0 -12
- package/core/router/RouterGuard.js +0 -3
- package/core/router/RouterGuard.js.map +0 -1
- package/core/router/index.d.ts +0 -4
- package/core/router/index.js +0 -5
- package/core/router/index.js.map +0 -1
- package/global/index.js.map +0 -1
- package/global/safari-polyfill.d.ts +0 -0
- package/global/safari-polyfill.js +0 -234
- package/global/safari-polyfill.js.map +0 -1
- package/index.js +0 -4
- package/index.js.map +0 -1
- package/translation/index.d.ts +0 -0
- /package/{assets → dist/assets}/index.d.ts +0 -0
- /package/{assets → dist/assets}/index.js +0 -0
- /package/{assets → dist/assets}/index.js.map +0 -0
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { Component, IdiomaticElement, UListElement } from "..";
|
|
2
|
-
export class SliderPanel extends Component {
|
|
3
|
-
static TAG = "tc-slider-panel";
|
|
4
|
-
slider;
|
|
5
|
-
constructor(props) {
|
|
6
|
-
super(props);
|
|
7
|
-
this.addClassName("wrapper");
|
|
8
|
-
// remove o select text
|
|
9
|
-
this.append(new IdiomaticElement({
|
|
10
|
-
id: "left", text: "<", style: { userSelect: "none" }
|
|
11
|
-
}));
|
|
12
|
-
this.slider = this.appendChild(new UListElement({ className: "carousel" }));
|
|
13
|
-
this.append(new IdiomaticElement({ id: "right", text: ">", style: { userSelect: "none" } }));
|
|
14
|
-
this.slider.innerHTML = `
|
|
15
|
-
<li class="card">
|
|
16
|
-
<div class="img"><img src="images/img-1.jpg" alt="img" draggable="false"></div>
|
|
17
|
-
<h2>Blanche Pearson</h2>
|
|
18
|
-
<span>Sales Manager</span>
|
|
19
|
-
</li>
|
|
20
|
-
<li class="card">
|
|
21
|
-
<div class="img"><img src="images/img-2.jpg" alt="img" draggable="false"></div>
|
|
22
|
-
<h2>Joenas Brauers</h2>
|
|
23
|
-
<span>Web Developer</span>
|
|
24
|
-
</li>
|
|
25
|
-
<li class="card">
|
|
26
|
-
<div class="img"><img src="images/img-3.jpg" alt="img" draggable="false"></div>
|
|
27
|
-
<h2>Lariach French</h2>
|
|
28
|
-
<span>Online Teacher</span>
|
|
29
|
-
</li>
|
|
30
|
-
<li class="card">
|
|
31
|
-
<div class="img"><img src="images/img-4.jpg" alt="img" draggable="false"></div>
|
|
32
|
-
<h2>James Khosravi</h2>
|
|
33
|
-
<span>Freelancer</span>
|
|
34
|
-
</li>
|
|
35
|
-
<li class="card">
|
|
36
|
-
<div class="img"><img src="images/img-5.jpg" alt="img" draggable="false"></div>
|
|
37
|
-
<h2>Kristina Zasiadko</h2>
|
|
38
|
-
<span>Bank Manager</span>
|
|
39
|
-
</li>
|
|
40
|
-
<li class="card">
|
|
41
|
-
<div class="img"><img src="images/img-6.jpg" alt="img" draggable="false"></div>
|
|
42
|
-
<h2>Donald Horton</h2>
|
|
43
|
-
<span>App Designer</span>
|
|
44
|
-
</li>
|
|
45
|
-
</ul>`;
|
|
46
|
-
this.onInit();
|
|
47
|
-
}
|
|
48
|
-
onInit() {
|
|
49
|
-
const wrapper = this;
|
|
50
|
-
const carousel = this.slider;
|
|
51
|
-
const arrowBtns = wrapper.querySelectorAll("i");
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
const carouselChildrens = [...carousel.children];
|
|
54
|
-
let isDragging = false, isAutoPlay = true, startX, startScrollLeft, timeoutId;
|
|
55
|
-
// Get the number of cards that can fit in the carousel at once
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
let cardPerView = Math.round(carousel.offsetWidth / firstCardWidth);
|
|
58
|
-
// Insert copies of the last few cards to beginning of carousel for infinite scrolling
|
|
59
|
-
carouselChildrens.slice(-cardPerView).reverse().forEach(card => {
|
|
60
|
-
carousel.insertAdjacentHTML("afterbegin", card.outerHTML);
|
|
61
|
-
});
|
|
62
|
-
// Insert copies of the first few cards to end of carousel for infinite scrolling
|
|
63
|
-
carouselChildrens.slice(0, cardPerView).forEach(card => {
|
|
64
|
-
carousel.insertAdjacentHTML("beforeend", card.outerHTML);
|
|
65
|
-
});
|
|
66
|
-
// Scroll the carousel at appropriate postition to hide first few duplicate cards on Firefox
|
|
67
|
-
carousel.classList.add("no-transition");
|
|
68
|
-
// @ts-ignore
|
|
69
|
-
carousel.scrollLeft = carousel.offsetWidth;
|
|
70
|
-
carousel.classList.remove("no-transition");
|
|
71
|
-
// Add event listeners for the arrow buttons to scroll the carousel left and right
|
|
72
|
-
arrowBtns.forEach(btn => {
|
|
73
|
-
btn.addEventListener("click", () => {
|
|
74
|
-
// @ts-ignore
|
|
75
|
-
const firstCardWidth = carousel.children[0].offsetWidth;
|
|
76
|
-
carousel.scrollLeft += btn.id == "left" ? -firstCardWidth : firstCardWidth;
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
const dragStart = (e) => {
|
|
80
|
-
isDragging = true;
|
|
81
|
-
carousel.classList.add("dragging");
|
|
82
|
-
// Records the initial cursor and scroll position of the carousel
|
|
83
|
-
startX = e.pageX;
|
|
84
|
-
startScrollLeft = carousel.scrollLeft;
|
|
85
|
-
};
|
|
86
|
-
const dragging = (e) => {
|
|
87
|
-
if (!isDragging)
|
|
88
|
-
return; // if isDragging is false return from here
|
|
89
|
-
// Updates the scroll position of the carousel based on the cursor movement
|
|
90
|
-
carousel.scrollLeft = startScrollLeft - (e.pageX - startX);
|
|
91
|
-
};
|
|
92
|
-
const dragStop = () => {
|
|
93
|
-
isDragging = false;
|
|
94
|
-
carousel.classList.remove("dragging");
|
|
95
|
-
};
|
|
96
|
-
const infiniteScroll = () => {
|
|
97
|
-
// If the carousel is at the beginning, scroll to the end
|
|
98
|
-
if (carousel.scrollLeft === 0) {
|
|
99
|
-
carousel.classList.add("no-transition");
|
|
100
|
-
// @ts-ignore
|
|
101
|
-
carousel.scrollLeft = carousel.scrollWidth - (2 * carousel.offsetWidth);
|
|
102
|
-
carousel.classList.remove("no-transition");
|
|
103
|
-
}
|
|
104
|
-
// If the carousel is at the end, scroll to the beginning
|
|
105
|
-
// @ts-ignore
|
|
106
|
-
else if (Math.ceil(carousel.scrollLeft) === carousel.scrollWidth - carousel.offsetWidth) {
|
|
107
|
-
carousel.classList.add("no-transition");
|
|
108
|
-
// @ts-ignore
|
|
109
|
-
carousel.scrollLeft = carousel.offsetWidth;
|
|
110
|
-
carousel.classList.remove("no-transition");
|
|
111
|
-
}
|
|
112
|
-
// Clear existing timeout & start autoplay if mouse is not hovering over carousel
|
|
113
|
-
clearTimeout(timeoutId);
|
|
114
|
-
if (!wrapper.matches(":hover"))
|
|
115
|
-
autoPlay();
|
|
116
|
-
};
|
|
117
|
-
const autoPlay = () => {
|
|
118
|
-
if (window.innerWidth < 800 || !isAutoPlay)
|
|
119
|
-
return; // Return if window is smaller than 800 or isAutoPlay is false
|
|
120
|
-
// @ts-ignore
|
|
121
|
-
const firstCardWidth = carousel.children[0].offsetWidth;
|
|
122
|
-
// Autoplay the carousel after every 2500 ms
|
|
123
|
-
timeoutId = setTimeout(() => carousel.scrollLeft += firstCardWidth, 2500);
|
|
124
|
-
};
|
|
125
|
-
autoPlay();
|
|
126
|
-
carousel.addEventListener("mousedown", dragStart);
|
|
127
|
-
carousel.addEventListener("mousemove", dragging);
|
|
128
|
-
wrapper.addEventListener("mouseup", dragStop);
|
|
129
|
-
carousel.addEventListener("scroll", infiniteScroll);
|
|
130
|
-
wrapper.addEventListener("mouseenter", () => clearTimeout(timeoutId));
|
|
131
|
-
wrapper.addEventListener("mouseleave", autoPlay);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
TypeComposer.defineElement(SliderPanel.TAG, SliderPanel);
|
|
135
|
-
//# sourceMappingURL=SliderPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SliderPanel.js","sourceRoot":"","sources":["../../../src/core/components/SliderPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,gBAAgB,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAI7E,MAAM,OAAO,WAAY,SAAQ,SAAS;IACzC,MAAM,CAAU,GAAG,GAAW,iBAAiB,CAAC;IAEvC,MAAM,CAAe;IAE9B,YAAY,KAAoB;QAC/B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAC7B,uBAAuB;QACvB,IAAI,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC;YAChC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAG,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;SACrD,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,YAAY,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,CAA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,CAAC,CAAC;QAC9C,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACpD,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;;AAGF,YAAY,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Component } from "../..";
|
|
2
|
-
export class StackPanel extends Component {
|
|
3
|
-
static TAG = "tc-stack-panel";
|
|
4
|
-
constructor(props) {
|
|
5
|
-
super(props);
|
|
6
|
-
this.addClassName("stack-panel");
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
TypeComposer.defineElement(StackPanel.TAG, StackPanel);
|
|
10
|
-
//# sourceMappingURL=StackPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackPanel.js","sourceRoot":"","sources":["../../../src/core/components/StackPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAEhD,MAAM,OAAO,UAAW,SAAQ,SAAS;IACvC,MAAM,CAAU,GAAG,GAAW,gBAAgB,CAAC;IAC/C,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IACnC,CAAC;;AAGH,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Component, H3Element, IconElement } from "..";
|
|
2
|
-
export declare class TabItem extends Component {
|
|
3
|
-
title: string;
|
|
4
|
-
static readonly TAG: string;
|
|
5
|
-
private __closeable;
|
|
6
|
-
private _titleElement;
|
|
7
|
-
private displayContent;
|
|
8
|
-
private _content;
|
|
9
|
-
private closeIcon;
|
|
10
|
-
constructor(title: string, content?: HTMLElement, icon?: IconElement | null, closeable?: boolean);
|
|
11
|
-
get closeable(): boolean;
|
|
12
|
-
set closeable(value: boolean);
|
|
13
|
-
select(): void;
|
|
14
|
-
unselect(): void;
|
|
15
|
-
get titleElement(): H3Element;
|
|
16
|
-
get content(): HTMLElement | undefined;
|
|
17
|
-
set content(newContent: HTMLElement | undefined);
|
|
18
|
-
onUpdatedContent(newContent: HTMLElement | undefined): void;
|
|
19
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Component, H4Element, IconElement } from "..";
|
|
2
|
-
export class TabItem extends Component {
|
|
3
|
-
title;
|
|
4
|
-
static TAG = "tc-tab-item";
|
|
5
|
-
__closeable = false;
|
|
6
|
-
_titleElement;
|
|
7
|
-
displayContent;
|
|
8
|
-
_content;
|
|
9
|
-
closeIcon = null;
|
|
10
|
-
constructor(title, content, icon, closeable = true) {
|
|
11
|
-
super();
|
|
12
|
-
this.title = title;
|
|
13
|
-
if (icon != null) {
|
|
14
|
-
icon.style.order = "0";
|
|
15
|
-
this.appendChild(icon);
|
|
16
|
-
}
|
|
17
|
-
this._content = content;
|
|
18
|
-
if (this.content) {
|
|
19
|
-
this.displayContent = content.style.display.toString(); //todo - fix
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
this.content.style.display = "none";
|
|
22
|
-
}
|
|
23
|
-
this._titleElement = new H4Element({
|
|
24
|
-
text: title,
|
|
25
|
-
style: {
|
|
26
|
-
padding: "0px 10px",
|
|
27
|
-
order: "1",
|
|
28
|
-
margin: "0px",
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
this.appendChild(this.titleElement);
|
|
32
|
-
this.className = "tab-title";
|
|
33
|
-
this.style.display = "grid";
|
|
34
|
-
this.style.gridTemplateColumns = "auto max-content auto";
|
|
35
|
-
this.style.gridTemplateRows = "1fr";
|
|
36
|
-
this.style.alignItems = "center";
|
|
37
|
-
this.closeable = closeable;
|
|
38
|
-
}
|
|
39
|
-
get closeable() {
|
|
40
|
-
return this.__closeable;
|
|
41
|
-
}
|
|
42
|
-
set closeable(value) {
|
|
43
|
-
this.__closeable = value;
|
|
44
|
-
if (value && !this.closeIcon) {
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
this.closeIcon = new IconElement({ icon: "fa-thin fa-x", order: "2" });
|
|
47
|
-
this.closeIcon.onclick = () => {
|
|
48
|
-
this.remove();
|
|
49
|
-
};
|
|
50
|
-
this.appendChild(this.closeIcon);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.closeIcon?.remove();
|
|
54
|
-
this.closeIcon = null;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
select() {
|
|
58
|
-
if (!this.classList.contains("tab-title-active"))
|
|
59
|
-
this.addClassName("tab-title-active");
|
|
60
|
-
if (this.content)
|
|
61
|
-
this.content.style.display = this.displayContent;
|
|
62
|
-
}
|
|
63
|
-
unselect() {
|
|
64
|
-
if (this.classList.contains("tab-title-active"))
|
|
65
|
-
this.classList.remove("tab-title-active");
|
|
66
|
-
if (this.content)
|
|
67
|
-
this.content.style.display = "none";
|
|
68
|
-
}
|
|
69
|
-
get titleElement() {
|
|
70
|
-
return this._titleElement;
|
|
71
|
-
}
|
|
72
|
-
get content() {
|
|
73
|
-
return this._content;
|
|
74
|
-
}
|
|
75
|
-
set content(newContent) {
|
|
76
|
-
this._content.remove();
|
|
77
|
-
this._content = newContent;
|
|
78
|
-
this.onUpdatedContent(newContent);
|
|
79
|
-
}
|
|
80
|
-
onUpdatedContent(newContent) { }
|
|
81
|
-
}
|
|
82
|
-
// @ts-ignore
|
|
83
|
-
TypeComposer.defineElement(TabItem.TAG, TabItem);
|
|
84
|
-
//# sourceMappingURL=TabItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.js","sourceRoot":"","sources":["../../../src/core/components/T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YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACxD,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,CAAC,UAAmC;QAC7C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;QAC3B,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAEM,gBAAgB,CAAC,UAAmC,IAAI,CAAC;;AAElE,aAAa;AACb,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BorderPanel, DivElement, IconElement, TabItem, type ElementProps } from "../..";
|
|
2
|
-
export declare class TabPanel extends BorderPanel {
|
|
3
|
-
static readonly TAG: string;
|
|
4
|
-
private tabs;
|
|
5
|
-
private slectTabItem;
|
|
6
|
-
private _closeable;
|
|
7
|
-
constructor(props?: ElementProps & {
|
|
8
|
-
closeable?: boolean;
|
|
9
|
-
alignTab?: "left" | "right" | "center";
|
|
10
|
-
});
|
|
11
|
-
addTap(title: string, content?: HTMLElement, icon?: IconElement | null): TabItem;
|
|
12
|
-
addTaps(...tabs: TabItem[]): void;
|
|
13
|
-
removeTap(title: string): void;
|
|
14
|
-
get closeable(): boolean;
|
|
15
|
-
set closeable(value: boolean);
|
|
16
|
-
private setTabSelected;
|
|
17
|
-
getTabs(): TabItem[];
|
|
18
|
-
getTab(tabToFind: {
|
|
19
|
-
index?: number;
|
|
20
|
-
title?: string;
|
|
21
|
-
}): TabItem | null;
|
|
22
|
-
get select(): TabItem | null;
|
|
23
|
-
get pane(): DivElement;
|
|
24
|
-
onSelectTab: (title: string, content: IComponent, index?: number) => void;
|
|
25
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { BorderPanel, DivElement, TabItem } from "../..";
|
|
2
|
-
export class TabPanel extends BorderPanel {
|
|
3
|
-
static TAG = "tc-tab-panel";
|
|
4
|
-
tabs = new DivElement();
|
|
5
|
-
slectTabItem = null;
|
|
6
|
-
_closeable = false;
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.addClassName("tab-pane");
|
|
10
|
-
this.style.width = "100%";
|
|
11
|
-
this.style.marginTop = "10px";
|
|
12
|
-
this.tabs.classList.add("tab-pane-tabs");
|
|
13
|
-
this.top = this.tabs;
|
|
14
|
-
this.center = new DivElement();
|
|
15
|
-
this.center.classList.add("tab-pane-content");
|
|
16
|
-
if (props != undefined && props?.closeable != undefined)
|
|
17
|
-
this._closeable = props.closeable;
|
|
18
|
-
if (props != undefined && props?.alignTab != undefined)
|
|
19
|
-
this.tabs.style.justifyContent = props.alignTab;
|
|
20
|
-
}
|
|
21
|
-
addTap(title, content, icon = null) {
|
|
22
|
-
const tab = new TabItem(title, content, icon, this.closeable);
|
|
23
|
-
this.addTaps(tab);
|
|
24
|
-
return tab;
|
|
25
|
-
}
|
|
26
|
-
addTaps(...tabs) {
|
|
27
|
-
tabs.forEach((tab) => {
|
|
28
|
-
if (tab.content != undefined)
|
|
29
|
-
this.center.appendChild(tab.content);
|
|
30
|
-
this.tabs.appendChild(tab);
|
|
31
|
-
tab.addEventListener("click", () => this.setTabSelected(tab));
|
|
32
|
-
tab.onUpdatedContent = (newContent) => {
|
|
33
|
-
if (newContent)
|
|
34
|
-
this.center.append(tab.content);
|
|
35
|
-
this.setTabSelected(tab);
|
|
36
|
-
};
|
|
37
|
-
// if (this.type == "max")
|
|
38
|
-
// this.tabs.style.gridTemplateColumns = "repeat(" + this.tabs.children.length + ", 1fr)";
|
|
39
|
-
// else {
|
|
40
|
-
// this.tabs.style.gridTemplateColumns = "repeat(" + this.tabs.children.length + ", auto)";
|
|
41
|
-
// tab.style.width = "fit-content";
|
|
42
|
-
// this.tabs.style.width = "fit-content";
|
|
43
|
-
// }
|
|
44
|
-
if (this.tabs.children.length == 1)
|
|
45
|
-
this.setTabSelected(tab);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
removeTap(title) {
|
|
49
|
-
const tabToRemove = this.getTab({ title: title });
|
|
50
|
-
if (!tabToRemove)
|
|
51
|
-
return;
|
|
52
|
-
tabToRemove.content.remove();
|
|
53
|
-
tabToRemove.remove();
|
|
54
|
-
}
|
|
55
|
-
get closeable() {
|
|
56
|
-
return this._closeable;
|
|
57
|
-
}
|
|
58
|
-
set closeable(value) {
|
|
59
|
-
this._closeable = value;
|
|
60
|
-
for (let i = 0; i < this.tabs?.children.length; i++) {
|
|
61
|
-
const child = this.tabs.children.item(i);
|
|
62
|
-
if (child instanceof TabItem)
|
|
63
|
-
child.closeable = value;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
setTabSelected(item) {
|
|
67
|
-
if (this.slectTabItem)
|
|
68
|
-
this.slectTabItem.unselect();
|
|
69
|
-
if (item) {
|
|
70
|
-
item.select();
|
|
71
|
-
this.slectTabItem = item;
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
this.onSelectTab(item.title, item.content, Array.from(this.tabs.children).indexOf(item));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
getTabs() {
|
|
77
|
-
return Array.from(this.tabs.children);
|
|
78
|
-
}
|
|
79
|
-
getTab(tabToFind) {
|
|
80
|
-
if (tabToFind.index)
|
|
81
|
-
return this.tabs.children.item(tabToFind.index);
|
|
82
|
-
else if (tabToFind.title) {
|
|
83
|
-
return Array.from(this.tabs.children).find((tab) => tab.title == tabToFind.title) || null;
|
|
84
|
-
}
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
get select() {
|
|
88
|
-
return this.slectTabItem;
|
|
89
|
-
}
|
|
90
|
-
get pane() {
|
|
91
|
-
return this.tabs;
|
|
92
|
-
}
|
|
93
|
-
onSelectTab = () => { };
|
|
94
|
-
}
|
|
95
|
-
TypeComposer.defineElement(TabPanel.TAG, TabPanel);
|
|
96
|
-
//# sourceMappingURL=TabPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.js","sourceRoot":"","sources":["../../../src/core/components/TabPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAe,OAAO,EAAqB,MAAM,OAAO,CAAC;AAEzF,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC,MAAM,CAAU,GAAG,GAAW,cAAc,CAAC;IACrC,IAAI,GAAe,IAAI,UAAU,EAAE,CAAC;IACpC,YAAY,GAAmB,IAAI,CAAC;IACpC,UAAU,GAAY,KAAK,CAAC;IAEpC,YACE,KAGC;QAED,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC9C,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,EAAE,SAAS,IAAI,SAAS;YAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3F,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,EAAE,QAAQ,IAAI,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,QAAQ,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AC,KAAK,CAAY,CAAC;aAC3E,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACzB,OAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAe,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;QAC3G,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAEM,WAAW,GAAiE,GAAG,EAAE,GAAG,CAAC,CAAC;;AAE/F,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ElementProps, Component, TableElement, TableElementProps } from "../..";
|
|
2
|
-
export declare class TablePagination extends Component {
|
|
3
|
-
static readonly TAG: string;
|
|
4
|
-
private totalItems;
|
|
5
|
-
private currentPage;
|
|
6
|
-
private rowsPerPage;
|
|
7
|
-
private pageInfoText;
|
|
8
|
-
private prevButton;
|
|
9
|
-
private nextButton;
|
|
10
|
-
private rowsSelect;
|
|
11
|
-
constructor(props?: ElementProps & {
|
|
12
|
-
totalItems?: number;
|
|
13
|
-
currentPage?: number;
|
|
14
|
-
rowsPerPage?: number;
|
|
15
|
-
options?: number[];
|
|
16
|
-
});
|
|
17
|
-
maxItems(value: number): void;
|
|
18
|
-
private onPrevClick;
|
|
19
|
-
private onNextClick;
|
|
20
|
-
private onRowsChange;
|
|
21
|
-
private updatePageInfo;
|
|
22
|
-
}
|
|
23
|
-
export declare class TablePanel<T = any> extends Component {
|
|
24
|
-
#private;
|
|
25
|
-
static readonly TAG: string;
|
|
26
|
-
readonly table: TableElement;
|
|
27
|
-
constructor(props?: ElementProps & {
|
|
28
|
-
tableProps?: TableElementProps;
|
|
29
|
-
stickyHeader?: boolean;
|
|
30
|
-
pagination?: boolean;
|
|
31
|
-
paginationProps?: ElementProps;
|
|
32
|
-
});
|
|
33
|
-
get pagination(): TablePagination | undefined;
|
|
34
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Component, DivElement, ButtonElement, SelectElement, TableElement, LabelElement, SpanElement, } from "../..";
|
|
2
|
-
export class TablePagination extends Component {
|
|
3
|
-
static TAG = "tc-table-pagination";
|
|
4
|
-
// Total de itens (pode vir de API, props, etc.)
|
|
5
|
-
totalItems = 15;
|
|
6
|
-
// Estado interno
|
|
7
|
-
currentPage = 1;
|
|
8
|
-
rowsPerPage = 10;
|
|
9
|
-
// Referências para atualização
|
|
10
|
-
pageInfoText;
|
|
11
|
-
prevButton;
|
|
12
|
-
nextButton;
|
|
13
|
-
rowsSelect;
|
|
14
|
-
constructor(props) {
|
|
15
|
-
super(props);
|
|
16
|
-
this.addClassName("table-pagination"); // adiciona a classe principal
|
|
17
|
-
// Container principal
|
|
18
|
-
const container = new DivElement({ className: "pagination-container" });
|
|
19
|
-
// --- Seção "Rows per page"
|
|
20
|
-
const rowsPerPageContainer = new DivElement({ className: "rows-per-page" });
|
|
21
|
-
const label = new LabelElement({ for: "rowsSelect", text: "Rows per page:" });
|
|
22
|
-
this.rowsSelect = new SelectElement({ id: "rowsSelect" });
|
|
23
|
-
const options = props?.options || [5, 10, 15];
|
|
24
|
-
for (let i = 0; i < options.length; i++) {
|
|
25
|
-
const option = new Option(options[i].toString(), options[i].toString());
|
|
26
|
-
if (options[i] === props?.rowsPerPage) {
|
|
27
|
-
option.selected = true;
|
|
28
|
-
}
|
|
29
|
-
this.rowsSelect.appendChild(option);
|
|
30
|
-
}
|
|
31
|
-
rowsPerPageContainer.appendChild(label);
|
|
32
|
-
rowsPerPageContainer.appendChild(this.rowsSelect);
|
|
33
|
-
const pageInfoContainer = new DivElement({ className: "page-info" });
|
|
34
|
-
this.pageInfoText = new SpanElement();
|
|
35
|
-
pageInfoContainer.append(this.pageInfoText);
|
|
36
|
-
// --- Botões de navegação
|
|
37
|
-
const navContainer = new DivElement({ className: "navigation-buttons" });
|
|
38
|
-
this.prevButton = new ButtonElement({ text: "◀", id: "prevBtn" });
|
|
39
|
-
this.nextButton = new ButtonElement({ text: "▶", id: "nextBtn" });
|
|
40
|
-
navContainer.appendChild(this.prevButton);
|
|
41
|
-
navContainer.appendChild(this.nextButton);
|
|
42
|
-
// --- Monta tudo no container principal
|
|
43
|
-
container.appendChild(rowsPerPageContainer);
|
|
44
|
-
container.appendChild(pageInfoContainer);
|
|
45
|
-
container.appendChild(navContainer);
|
|
46
|
-
// Anexa ao componente
|
|
47
|
-
this.appendChild(container);
|
|
48
|
-
// Eventos
|
|
49
|
-
this.prevButton.onclick = () => this.onPrevClick();
|
|
50
|
-
this.nextButton.onclick = () => this.onNextClick();
|
|
51
|
-
this.rowsSelect.onchange = (event) => this.onRowsChange(event);
|
|
52
|
-
// Inicializa a informação de página
|
|
53
|
-
this.updatePageInfo();
|
|
54
|
-
}
|
|
55
|
-
maxItems(value) {
|
|
56
|
-
this.totalItems = value;
|
|
57
|
-
this.updatePageInfo();
|
|
58
|
-
}
|
|
59
|
-
// Lógica de mudança de página anterior
|
|
60
|
-
onPrevClick() {
|
|
61
|
-
if (this.currentPage > 1) {
|
|
62
|
-
this.currentPage--;
|
|
63
|
-
this.updatePageInfo();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Lógica de mudança de página seguinte
|
|
67
|
-
onNextClick() {
|
|
68
|
-
if (this.currentPage * this.rowsPerPage < this.totalItems) {
|
|
69
|
-
this.currentPage++;
|
|
70
|
-
this.updatePageInfo();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// Lógica de troca de número de linhas por página
|
|
74
|
-
onRowsChange(event) {
|
|
75
|
-
const newRowsPerPage = parseInt(event.target.value, 10);
|
|
76
|
-
this.rowsPerPage = newRowsPerPage;
|
|
77
|
-
this.currentPage = 1; // ao mudar, volta para página 1
|
|
78
|
-
this.updatePageInfo();
|
|
79
|
-
}
|
|
80
|
-
// Atualiza o texto "1-10 of 15" e habilita/desabilita botões
|
|
81
|
-
updatePageInfo() {
|
|
82
|
-
const start = (this.currentPage - 1) * this.rowsPerPage + 1;
|
|
83
|
-
const end = Math.min(this.currentPage * this.rowsPerPage, this.totalItems);
|
|
84
|
-
// Exemplo: "1-10 of 15"
|
|
85
|
-
this.pageInfoText.innerText = `${start}-${end} of ${this.totalItems}`;
|
|
86
|
-
// Habilitar/desabilitar botões
|
|
87
|
-
if (this.currentPage === 1) {
|
|
88
|
-
this.prevButton.setAttribute("disabled", "true");
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.prevButton.removeAttribute("disabled");
|
|
92
|
-
}
|
|
93
|
-
if (this.currentPage * this.rowsPerPage >= this.totalItems) {
|
|
94
|
-
this.nextButton.setAttribute("disabled", "true");
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
this.nextButton.removeAttribute("disabled");
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
TypeComposer.defineElement(TablePagination.TAG, TablePagination);
|
|
102
|
-
export class TablePanel extends Component {
|
|
103
|
-
static TAG = "tc-table-panel";
|
|
104
|
-
table = new TableElement();
|
|
105
|
-
#pagination;
|
|
106
|
-
constructor(props) {
|
|
107
|
-
super({ ...props });
|
|
108
|
-
this.addClassName("table-panel");
|
|
109
|
-
if (props?.stickyHeader) {
|
|
110
|
-
this.addClassName("sticky-header");
|
|
111
|
-
}
|
|
112
|
-
this.table = this.appendChild(new TableElement(props?.tableProps));
|
|
113
|
-
if (props?.pagination) {
|
|
114
|
-
this.#pagination = new TablePagination(props?.paginationProps);
|
|
115
|
-
this.#pagination.maxItems(this.table.values.length);
|
|
116
|
-
this.appendChild(this.#pagination);
|
|
117
|
-
this.table.onUpdateValues = (values) => {
|
|
118
|
-
this.#pagination?.maxItems(values.length);
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
get pagination() {
|
|
123
|
-
return this.#pagination;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
TypeComposer.defineElement(TablePanel.TAG, TablePanel);
|
|
127
|
-
//# sourceMappingURL=TablePanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TablePanel.js","sourceRoot":"","sources":["../../../src/core/components/TablePanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,EAEZ,YAAY,EACZ,WAAW,GACZ,MAAM,OAAO,CAAC;AAGf,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,MAAM,CAAU,GAAG,GAAW,qBAAqB,CAAC;IACpD,gDAAgD;IACxC,UAAU,GAAW,EAAE,CAAC;IAEhC,iBAAiB;IACT,WAAW,GAAW,CAAC,CAAC;IACxB,WAAW,GAAW,EAAE,CAAC;IAEjC,+BAA+B;IACvB,YAAY,CAAe;IAC3B,UAAU,CAAiB;IAC3B,UAAU,CAAiB;IAC3B,UAAU,CAAiB;IAEnC,YAAY,KAKX;QACC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,8BAA8B;QAErE,sBAAsB;QACtB,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC,CAAC;QAExE,4BAA4B;QAC5B,MAAM,oBAAoB,GAAG,IAAI,UAAU,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;QAE5E,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;QAG9E,IAAI,CAAC,UAAU,GAAG,IAAI,aAAa,CAAC,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
|
6
|
-
strike?: boolean;
|
|
7
|
-
atributes?: string[];
|
|
8
|
-
styles?: string[];
|
|
9
|
-
classNames?: string[];
|
|
10
|
-
}
|
|
11
|
-
export declare class TextEdit extends Component {
|
|
12
|
-
#private;
|
|
13
|
-
static readonly TAG: string;
|
|
14
|
-
constructor(props: {
|
|
15
|
-
value?: string;
|
|
16
|
-
format: ITextEditFormat;
|
|
17
|
-
});
|
|
18
|
-
handleMouseUp(): void;
|
|
19
|
-
cleanElements(container: Element | undefined): void;
|
|
20
|
-
removeEmptyValues(obj: {
|
|
21
|
-
[key: string]: string;
|
|
22
|
-
}): {
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
};
|
|
25
|
-
private compareElements;
|
|
26
|
-
private mergeStyles;
|
|
27
|
-
private mergeAttributes;
|
|
28
|
-
private mergeAttributes2;
|
|
29
|
-
format(type: string, value: string): void;
|
|
30
|
-
private formatAtribute;
|
|
31
|
-
private formatStyle;
|
|
32
|
-
}
|