@everymatrix/helper-accordion 1.31.2 → 1.32.4

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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/helper-accordion.cjs.entry.js +0 -133
  4. package/dist/cjs/helper-accordion.cjs.js +0 -19
  5. package/dist/cjs/index-ed89de9c.js +0 -1191
  6. package/dist/cjs/index.cjs.js +0 -2
  7. package/dist/cjs/loader.cjs.js +0 -21
  8. package/dist/collection/collection-manifest.json +0 -12
  9. package/dist/collection/components/helper-accordion/helper-accordion.css +0 -101
  10. package/dist/collection/components/helper-accordion/helper-accordion.js +0 -353
  11. package/dist/collection/index.js +0 -1
  12. package/dist/collection/utils/locale.utils.js +0 -23
  13. package/dist/collection/utils/utils.js +0 -3
  14. package/dist/components/helper-accordion.d.ts +0 -11
  15. package/dist/components/helper-accordion.js +0 -162
  16. package/dist/components/index.d.ts +0 -26
  17. package/dist/components/index.js +0 -1
  18. package/dist/esm/helper-accordion.entry.js +0 -129
  19. package/dist/esm/helper-accordion.js +0 -17
  20. package/dist/esm/index-a87a3869.js +0 -1165
  21. package/dist/esm/index.js +0 -1
  22. package/dist/esm/loader.js +0 -17
  23. package/dist/esm/polyfills/core-js.js +0 -11
  24. package/dist/esm/polyfills/css-shim.js +0 -1
  25. package/dist/esm/polyfills/dom.js +0 -79
  26. package/dist/esm/polyfills/es5-html-element.js +0 -1
  27. package/dist/esm/polyfills/index.js +0 -34
  28. package/dist/esm/polyfills/system.js +0 -6
  29. package/dist/helper-accordion/helper-accordion.esm.js +0 -1
  30. package/dist/helper-accordion/index.esm.js +0 -0
  31. package/dist/helper-accordion/p-a199c923.entry.js +0 -1
  32. package/dist/helper-accordion/p-a8ce3eea.js +0 -1
  33. package/dist/index.cjs.js +0 -1
  34. package/dist/index.js +0 -1
  35. package/dist/stencil.config.js +0 -22
  36. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/helper-accordion/.stencil/packages/helper-accordion/stencil.config.d.ts +0 -2
  37. package/dist/types/components/helper-accordion/helper-accordion.d.ts +0 -65
  38. package/dist/types/components.d.ts +0 -137
  39. package/dist/types/index.d.ts +0 -1
  40. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  41. package/dist/types/utils/locale.utils.d.ts +0 -1
  42. package/dist/types/utils/utils.d.ts +0 -1
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
@@ -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';
@@ -1,129 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-a87a3869.js';
2
-
3
- const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
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
- hr: {
19
- deleteTicket: 'Izbriši listić'
20
- }
21
- };
22
- const translate = (key, customLang) => {
23
- const lang = customLang;
24
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
25
- };
26
-
27
- 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}";
28
-
29
- const Accordion = class {
30
- constructor(hostRef) {
31
- registerInstance(this, hostRef);
32
- this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
33
- /**
34
- * Flag for ticket history
35
- */
36
- this.ticketHistoryFlag = false;
37
- /**
38
- * Title (top header)
39
- */
40
- this.headerTitle = '';
41
- /**
42
- * SubTitle (top header)
43
- */
44
- this.headerSubtitle = '';
45
- /**
46
- * Description
47
- */
48
- this.description = '';
49
- /**
50
- * Enables footer content
51
- */
52
- this.footer = false;
53
- /**
54
- * Enables footer button for tab deletion
55
- */
56
- this.deleteTab = false;
57
- /**
58
- * Activates postMessages as events for actions from the widget
59
- */
60
- this.postMessage = false;
61
- /**
62
- * Name of the event emitter by the action button
63
- */
64
- this.eventName = 'helperAccordionAction';
65
- /**
66
- * Collapsed
67
- */
68
- this.collapsed = true;
69
- /**
70
- * Language
71
- */
72
- this.language = 'en';
73
- /**
74
- * Client custom styling via string
75
- */
76
- this.clientStyling = '';
77
- /**
78
- * Client custom styling via url content
79
- */
80
- this.clientStylingUrlContent = '';
81
- this.limitStylingAppends = false;
82
- this.setClientStyling = () => {
83
- let sheet = document.createElement('style');
84
- sheet.innerHTML = this.clientStyling;
85
- this.stylingContainer.prepend(sheet);
86
- };
87
- this.setClientStylingURL = () => {
88
- let cssFile = document.createElement('style');
89
- setTimeout(() => {
90
- cssFile.innerHTML = this.clientStylingUrlContent;
91
- this.stylingContainer.prepend(cssFile);
92
- }, 1);
93
- };
94
- }
95
- // @TODO fix the `any` type :)
96
- connectedCallback() {
97
- this.showContent = !this.collapsed;
98
- }
99
- componentDidRender() {
100
- // start custom styling area
101
- if (!this.limitStylingAppends && this.stylingContainer) {
102
- if (this.clientStyling)
103
- this.setClientStyling();
104
- if (this.clientStylingUrlContent)
105
- this.setClientStylingURL();
106
- this.limitStylingAppends = true;
107
- }
108
- // end custom styling area
109
- }
110
- toggleContent() {
111
- this.showContent = !this.showContent;
112
- }
113
- deleteAction() {
114
- if (this.postMessage) {
115
- // @TODO maybe change the name type, this one sucks
116
- window.postMessage({ type: this.eventName }, window.location.href);
117
- }
118
- this.accordionEvent.emit();
119
- }
120
- render() {
121
- 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 &&
122
- h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
123
- h("div", null, this.deleteTab &&
124
- h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
125
- }
126
- };
127
- Accordion.style = helperAccordionCss;
128
-
129
- export { Accordion as helper_accordion };
@@ -1,17 +0,0 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-a87a3869.js';
2
-
3
- /*
4
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
5
- */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
13
- };
14
-
15
- patchBrowser().then(options => {
16
- return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
17
- });