@everymatrix/helper-accordion 0.1.24 → 1.0.70

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.
Files changed (50) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/helper-accordion.cjs.entry.js +83 -114
  3. package/dist/cjs/helper-accordion.cjs.js +17 -11
  4. package/dist/cjs/index-a21d4625.js +1205 -0
  5. package/dist/cjs/loader.cjs.js +7 -13
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/helper-accordion/helper-accordion.css +2 -0
  8. package/dist/collection/components/helper-accordion/helper-accordion.js +315 -349
  9. package/dist/collection/components/helper-accordion/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +18 -15
  11. package/dist/collection/utils/utils.js +1 -1
  12. package/dist/esm/app-globals-0f993ce5.js +3 -0
  13. package/dist/esm/helper-accordion.entry.js +83 -114
  14. package/dist/esm/helper-accordion.js +14 -11
  15. package/dist/esm/index-3a075c05.js +1178 -0
  16. package/dist/esm/loader.js +7 -13
  17. package/dist/helper-accordion/helper-accordion.esm.js +1 -1
  18. package/dist/helper-accordion/p-0ea524aa.js +2 -0
  19. package/dist/helper-accordion/p-bbd22381.entry.js +1 -0
  20. package/dist/helper-accordion/p-e1255160.js +1 -0
  21. package/dist/stencil.config.dev.js +17 -0
  22. package/dist/stencil.config.js +14 -19
  23. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.d.ts +2 -0
  24. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/helper-accordion/.stencil/packages/stencil/helper-accordion/stencil.config.dev.d.ts +2 -0
  25. package/dist/types/components/helper-accordion/helper-accordion.d.ts +62 -62
  26. package/dist/types/components/helper-accordion/index.d.ts +1 -0
  27. package/dist/types/components.d.ts +16 -1
  28. package/dist/types/stencil-public-runtime.d.ts +142 -33
  29. package/loader/cdn.js +1 -3
  30. package/loader/index.cjs.js +1 -3
  31. package/loader/index.d.ts +13 -1
  32. package/loader/index.es2017.js +1 -3
  33. package/loader/index.js +1 -3
  34. package/loader/package.json +1 -0
  35. package/package.json +9 -2
  36. package/dist/cjs/index-14140980.js +0 -1180
  37. package/dist/components/helper-accordion.d.ts +0 -11
  38. package/dist/components/helper-accordion.js +0 -159
  39. package/dist/components/index.d.ts +0 -26
  40. package/dist/components/index.js +0 -1
  41. package/dist/esm/index-19830116.js +0 -1154
  42. package/dist/esm/polyfills/core-js.js +0 -11
  43. package/dist/esm/polyfills/css-shim.js +0 -1
  44. package/dist/esm/polyfills/dom.js +0 -79
  45. package/dist/esm/polyfills/es5-html-element.js +0 -1
  46. package/dist/esm/polyfills/index.js +0 -34
  47. package/dist/esm/polyfills/system.js +0 -6
  48. package/dist/helper-accordion/p-57b397c6.entry.js +0 -1
  49. package/dist/helper-accordion/p-ba8015b8.js +0 -1
  50. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/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,159 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
-
3
- const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
5
- const TRANSLATIONS = {
6
- en: {
7
- deleteTicket: 'Delete ticket'
8
- },
9
- ro: {
10
- deleteTicket: 'Sterge biletul'
11
- },
12
- fr: {
13
- deleteTicket: 'Supprimer le billet'
14
- },
15
- ar: {
16
- deleteTicket: 'حذف التذكرة'
17
- }
18
- };
19
- const translate = (key, customLang) => {
20
- const lang = customLang;
21
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
22
- };
23
-
24
- 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}.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}.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}";
25
-
26
- const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
27
- constructor() {
28
- super();
29
- this.__registerHost();
30
- this.__attachShadow();
31
- this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
32
- /**
33
- * Flag for ticket history
34
- */
35
- this.ticketHistoryFlag = false;
36
- /**
37
- * Title (top header)
38
- */
39
- this.headerTitle = '';
40
- /**
41
- * SubTitle (top header)
42
- */
43
- this.headerSubtitle = '';
44
- /**
45
- * Description
46
- */
47
- this.description = '';
48
- /**
49
- * Enables footer content
50
- */
51
- this.footer = false;
52
- /**
53
- * Enables footer button for tab deletion
54
- */
55
- this.deleteTab = false;
56
- /**
57
- * Activates postMessages as events for actions from the widget
58
- */
59
- this.postMessage = false;
60
- /**
61
- * Name of the event emitter by the action button
62
- */
63
- this.eventName = 'helperAccordionAction';
64
- /**
65
- * Collapsed
66
- */
67
- this.collapsed = true;
68
- /**
69
- * Language
70
- */
71
- this.language = 'en';
72
- /**
73
- * Client custom styling via string
74
- */
75
- this.clientStyling = '';
76
- /**
77
- * Client custom styling via url content
78
- */
79
- this.clientStylingUrlContent = '';
80
- this.limitStylingAppends = false;
81
- this.setClientStyling = () => {
82
- let sheet = document.createElement('style');
83
- sheet.innerHTML = this.clientStyling;
84
- this.stylingContainer.prepend(sheet);
85
- };
86
- this.setClientStylingURL = () => {
87
- let cssFile = document.createElement('style');
88
- setTimeout(() => {
89
- cssFile.innerHTML = this.clientStylingUrlContent;
90
- this.stylingContainer.prepend(cssFile);
91
- }, 1);
92
- };
93
- }
94
- // @TODO fix the `any` type :)
95
- connectedCallback() {
96
- this.showContent = !this.collapsed;
97
- }
98
- componentDidRender() {
99
- // start custom styling area
100
- if (!this.limitStylingAppends && this.stylingContainer) {
101
- if (this.clientStyling)
102
- this.setClientStyling();
103
- if (this.clientStylingUrlContent)
104
- this.setClientStylingURL();
105
- this.limitStylingAppends = true;
106
- }
107
- // end custom styling area
108
- }
109
- toggleContent() {
110
- this.showContent = !this.showContent;
111
- }
112
- deleteAction() {
113
- if (this.postMessage) {
114
- // @TODO maybe change the name type, this one sucks
115
- window.postMessage({ type: this.eventName }, window.location.href);
116
- }
117
- this.accordionEvent.emit();
118
- }
119
- render() {
120
- return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
121
- h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
122
- h("div", null, this.deleteTab &&
123
- h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
124
- }
125
- static get style() { return helperAccordionCss; }
126
- }, [1, "helper-accordion", {
127
- "ticketHistoryFlag": [4, "ticket-history-flag"],
128
- "headerTitle": [1, "header-title"],
129
- "headerSubtitle": [1, "header-subtitle"],
130
- "description": [1],
131
- "footer": [4],
132
- "deleteTab": [4, "delete-tab"],
133
- "postMessage": [4, "post-message"],
134
- "eventName": [1, "event-name"],
135
- "collapsed": [4],
136
- "language": [1],
137
- "clientStyling": [1, "client-styling"],
138
- "clientStylingUrlContent": [1, "client-styling-url-content"],
139
- "showContent": [32],
140
- "limitStylingAppends": [32]
141
- }]);
142
- function defineCustomElement$1() {
143
- if (typeof customElements === "undefined") {
144
- return;
145
- }
146
- const components = ["helper-accordion"];
147
- components.forEach(tagName => { switch (tagName) {
148
- case "helper-accordion":
149
- if (!customElements.get(tagName)) {
150
- customElements.define(tagName, Accordion);
151
- }
152
- break;
153
- } });
154
- }
155
-
156
- const HelperAccordion = Accordion;
157
- const defineCustomElement = defineCustomElement$1;
158
-
159
- 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';
@@ -1 +0,0 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';