@everymatrix/helper-accordion 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/helper-accordion.cjs.entry.js +81 -115
- package/dist/cjs/helper-accordion.cjs.js +16 -10
- package/dist/cjs/index-a21d4625.js +1205 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/helper-accordion/helper-accordion.js +315 -349
- package/dist/collection/components/helper-accordion/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +17 -17
- package/dist/collection/utils/utils.js +1 -1
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/helper-accordion.entry.js +81 -115
- package/dist/esm/helper-accordion.js +13 -10
- package/dist/esm/index-3a075c05.js +1178 -0
- package/dist/esm/loader.js +6 -12
- package/dist/helper-accordion/helper-accordion.esm.js +1 -1
- package/dist/helper-accordion/p-0ea524aa.js +2 -0
- package/dist/helper-accordion/p-9f0e8fda.entry.js +1 -0
- package/dist/helper-accordion/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/helper-accordion/helper-accordion.d.ts +62 -62
- package/dist/types/components/helper-accordion/index.d.ts +1 -0
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/cjs/index-ed89de9c.js +0 -1191
- package/dist/components/helper-accordion.d.ts +0 -11
- package/dist/components/helper-accordion.js +0 -161
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-a87a3869.js +0 -1165
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/helper-accordion/p-7391c647.entry.js +0 -1
- package/dist/helper-accordion/p-a8ce3eea.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-accordion/.stencil/packages/helper-accordion/stencil.config.d.ts +0 -2
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface HelperAccordion extends Components.HelperAccordion, HTMLElement {}
|
|
4
|
-
export const HelperAccordion: {
|
|
5
|
-
prototype: HelperAccordion;
|
|
6
|
-
new (): HelperAccordion;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const TRANSLATIONS = {
|
|
5
|
-
en: {
|
|
6
|
-
deleteTicket: 'Delete ticket'
|
|
7
|
-
},
|
|
8
|
-
ro: {
|
|
9
|
-
deleteTicket: 'Sterge biletul'
|
|
10
|
-
},
|
|
11
|
-
fr: {
|
|
12
|
-
deleteTicket: 'Supprimer le billet'
|
|
13
|
-
},
|
|
14
|
-
ar: {
|
|
15
|
-
deleteTicket: 'حذف التذكرة'
|
|
16
|
-
},
|
|
17
|
-
hr: {
|
|
18
|
-
deleteTicket: 'Izbriši listić'
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const translate = (key, customLang) => {
|
|
22
|
-
const lang = customLang;
|
|
23
|
-
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
|
|
27
|
-
|
|
28
|
-
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
29
|
-
constructor() {
|
|
30
|
-
super();
|
|
31
|
-
this.__registerHost();
|
|
32
|
-
this.__attachShadow();
|
|
33
|
-
this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
|
|
34
|
-
/**
|
|
35
|
-
* Flag for ticket history
|
|
36
|
-
*/
|
|
37
|
-
this.ticketHistoryFlag = false;
|
|
38
|
-
/**
|
|
39
|
-
* Title (top header)
|
|
40
|
-
*/
|
|
41
|
-
this.headerTitle = '';
|
|
42
|
-
/**
|
|
43
|
-
* SubTitle (top header)
|
|
44
|
-
*/
|
|
45
|
-
this.headerSubtitle = '';
|
|
46
|
-
/**
|
|
47
|
-
* Description
|
|
48
|
-
*/
|
|
49
|
-
this.description = '';
|
|
50
|
-
/**
|
|
51
|
-
* Enables footer content
|
|
52
|
-
*/
|
|
53
|
-
this.footer = false;
|
|
54
|
-
/**
|
|
55
|
-
* Enables footer button for tab deletion
|
|
56
|
-
*/
|
|
57
|
-
this.deleteTab = false;
|
|
58
|
-
/**
|
|
59
|
-
* Activates postMessages as events for actions from the widget
|
|
60
|
-
*/
|
|
61
|
-
this.postMessage = false;
|
|
62
|
-
/**
|
|
63
|
-
* Name of the event emitter by the action button
|
|
64
|
-
*/
|
|
65
|
-
this.eventName = 'helperAccordionAction';
|
|
66
|
-
/**
|
|
67
|
-
* Collapsed
|
|
68
|
-
*/
|
|
69
|
-
this.collapsed = true;
|
|
70
|
-
/**
|
|
71
|
-
* Language
|
|
72
|
-
*/
|
|
73
|
-
this.language = 'en';
|
|
74
|
-
/**
|
|
75
|
-
* Client custom styling via string
|
|
76
|
-
*/
|
|
77
|
-
this.clientStyling = '';
|
|
78
|
-
/**
|
|
79
|
-
* Client custom styling via url content
|
|
80
|
-
*/
|
|
81
|
-
this.clientStylingUrlContent = '';
|
|
82
|
-
this.limitStylingAppends = false;
|
|
83
|
-
this.setClientStyling = () => {
|
|
84
|
-
let sheet = document.createElement('style');
|
|
85
|
-
sheet.innerHTML = this.clientStyling;
|
|
86
|
-
this.stylingContainer.prepend(sheet);
|
|
87
|
-
};
|
|
88
|
-
this.setClientStylingURL = () => {
|
|
89
|
-
let cssFile = document.createElement('style');
|
|
90
|
-
setTimeout(() => {
|
|
91
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
92
|
-
this.stylingContainer.prepend(cssFile);
|
|
93
|
-
}, 1);
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
// @TODO fix the `any` type :)
|
|
97
|
-
connectedCallback() {
|
|
98
|
-
this.showContent = !this.collapsed;
|
|
99
|
-
}
|
|
100
|
-
componentDidRender() {
|
|
101
|
-
// start custom styling area
|
|
102
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
103
|
-
if (this.clientStyling)
|
|
104
|
-
this.setClientStyling();
|
|
105
|
-
if (this.clientStylingUrlContent)
|
|
106
|
-
this.setClientStylingURL();
|
|
107
|
-
this.limitStylingAppends = true;
|
|
108
|
-
}
|
|
109
|
-
// end custom styling area
|
|
110
|
-
}
|
|
111
|
-
toggleContent() {
|
|
112
|
-
this.showContent = !this.showContent;
|
|
113
|
-
}
|
|
114
|
-
deleteAction() {
|
|
115
|
-
if (this.postMessage) {
|
|
116
|
-
// @TODO maybe change the name type, this one sucks
|
|
117
|
-
window.postMessage({ type: this.eventName }, window.location.href);
|
|
118
|
-
}
|
|
119
|
-
this.accordionEvent.emit();
|
|
120
|
-
}
|
|
121
|
-
render() {
|
|
122
|
-
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
123
|
-
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
124
|
-
h("div", null, this.deleteTab &&
|
|
125
|
-
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
126
|
-
}
|
|
127
|
-
static get style() { return helperAccordionCss; }
|
|
128
|
-
}, [1, "helper-accordion", {
|
|
129
|
-
"ticketHistoryFlag": [516, "ticket-history-flag"],
|
|
130
|
-
"headerTitle": [513, "header-title"],
|
|
131
|
-
"headerSubtitle": [513, "header-subtitle"],
|
|
132
|
-
"description": [513],
|
|
133
|
-
"footer": [516],
|
|
134
|
-
"deleteTab": [516, "delete-tab"],
|
|
135
|
-
"postMessage": [516, "post-message"],
|
|
136
|
-
"eventName": [513, "event-name"],
|
|
137
|
-
"collapsed": [516],
|
|
138
|
-
"language": [513],
|
|
139
|
-
"clientStyling": [513, "client-styling"],
|
|
140
|
-
"clientStylingUrlContent": [513, "client-styling-url-content"],
|
|
141
|
-
"showContent": [32],
|
|
142
|
-
"limitStylingAppends": [32]
|
|
143
|
-
}]);
|
|
144
|
-
function defineCustomElement$1() {
|
|
145
|
-
if (typeof customElements === "undefined") {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
const components = ["helper-accordion"];
|
|
149
|
-
components.forEach(tagName => { switch (tagName) {
|
|
150
|
-
case "helper-accordion":
|
|
151
|
-
if (!customElements.get(tagName)) {
|
|
152
|
-
customElements.define(tagName, Accordion);
|
|
153
|
-
}
|
|
154
|
-
break;
|
|
155
|
-
} });
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
const HelperAccordion = Accordion;
|
|
159
|
-
const defineCustomElement = defineCustomElement$1;
|
|
160
|
-
|
|
161
|
-
export { HelperAccordion, defineCustomElement };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/* HelperAccordion custom elements */
|
|
2
|
-
|
|
3
|
-
import type { Components, JSX } from "../types/components";
|
|
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
|
-
|
|
24
|
-
export type { Components, JSX };
|
|
25
|
-
|
|
26
|
-
export * from '../types';
|
package/dist/components/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|