arrmatura 5.2.0 → 6.2.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.
Files changed (110) hide show
  1. package/index.ts +20 -0
  2. package/package.json +14 -44
  3. package/src/core/composition.ts +71 -0
  4. package/src/core/conditionals.ts +80 -0
  5. package/src/core/elementary.ts +40 -0
  6. package/src/core/fragment.ts +21 -0
  7. package/src/core/index.ts +19 -0
  8. package/src/core/iterations.ts +121 -0
  9. package/src/core/root.ts +46 -0
  10. package/src/core/routing.ts +37 -0
  11. package/src/core/selection.ts +57 -0
  12. package/src/core/slot.ts +36 -0
  13. package/src/ctx/Ctx.ts +424 -0
  14. package/src/ctx/CtxNode.ts +159 -0
  15. package/src/utils/compileExpression.ts +126 -0
  16. package/src/utils/stringify.ts +39 -0
  17. package/LICENSE +0 -21
  18. package/README.md +0 -54
  19. package/commons/auth/AuthService.ts +0 -111
  20. package/commons/auth/UserService.ts +0 -57
  21. package/commons/auth/index.ts +0 -5
  22. package/commons/auth/user.xml +0 -64
  23. package/commons/components/buttons.xml +0 -25
  24. package/commons/components/index.ts +0 -13
  25. package/commons/components/inputs.xml +0 -33
  26. package/commons/components/layouts.xml +0 -77
  27. package/commons/components/media.xml +0 -21
  28. package/commons/components/modal.xml +0 -37
  29. package/commons/components/navigation.xml +0 -73
  30. package/commons/components/popups.xml +0 -12
  31. package/commons/components/searchbar.xml +0 -54
  32. package/commons/components/table.xml +0 -140
  33. package/commons/components/toasts.xml +0 -18
  34. package/commons/components/viewport.xml +0 -48
  35. package/commons/forms/FieldItem.xml +0 -20
  36. package/commons/forms/FormController.ts +0 -87
  37. package/commons/forms/Item.ts +0 -132
  38. package/commons/forms/ItemCollectionController.ts +0 -113
  39. package/commons/forms/ItemController.ts +0 -91
  40. package/commons/forms/MultiEnumField.xml +0 -44
  41. package/commons/forms/MultivalueController.ts +0 -49
  42. package/commons/forms/NewItemController.ts +0 -46
  43. package/commons/forms/SmartareaField.xml +0 -51
  44. package/commons/forms/SuggestionController.ts +0 -80
  45. package/commons/forms/SuggestionField.xml +0 -28
  46. package/commons/forms/fields.xml +0 -151
  47. package/commons/forms/form.xml +0 -37
  48. package/commons/forms/index.ts +0 -29
  49. package/commons/index.ts +0 -6
  50. package/commons/services/ApiClientService.ts +0 -32
  51. package/commons/services/ErrorHandlingService.ts +0 -11
  52. package/commons/services/FirebaseService.ts +0 -185
  53. package/commons/services/GSheetsService.ts +0 -120
  54. package/commons/services/HeartbeatService.ts +0 -35
  55. package/commons/services/Invoke.ts +0 -29
  56. package/commons/services/JsonpService.ts +0 -18
  57. package/commons/services/Loader.ts +0 -17
  58. package/commons/services/MetadataService.ts +0 -50
  59. package/commons/services/NavigationService.ts +0 -74
  60. package/commons/services/Service.ts +0 -62
  61. package/commons/services/ServiceWorker.ts +0 -111
  62. package/commons/services/Storage.ts +0 -55
  63. package/commons/services/ToastService.ts +0 -61
  64. package/commons/services/index.ts +0 -13
  65. package/core/Arrmatura.ts +0 -79
  66. package/core/CNode.ts +0 -111
  67. package/core/Component.ts +0 -424
  68. package/core/cnodes/composition.ts +0 -100
  69. package/core/cnodes/conditionals.ts +0 -52
  70. package/core/cnodes/elementary.ts +0 -44
  71. package/core/cnodes/iterations.ts +0 -92
  72. package/core/cnodes/routing.ts +0 -25
  73. package/core/compileNode.ts +0 -39
  74. package/core/expression.ts +0 -73
  75. package/core/index.ts +0 -1
  76. package/core/register.ts +0 -43
  77. package/core/utils.ts +0 -23
  78. package/core-web/WebPlatform.ts +0 -25
  79. package/core-web/attributes.ts +0 -218
  80. package/core-web/elements.ts +0 -81
  81. package/core-web/index.ts +0 -28
  82. package/core-web/reflow.ts +0 -30
  83. package/core-web/support.ts +0 -27
  84. package/core-web/type.ts +0 -18
  85. package/docs/index.js +0 -485
  86. package/lib/array/arrayGroupBy.ts +0 -19
  87. package/lib/array/arraySortBy.ts +0 -49
  88. package/lib/array/arrayToObject.ts +0 -18
  89. package/lib/array/arrayish.ts +0 -7
  90. package/lib/array/index.ts +0 -4
  91. package/lib/crypto/index.ts +0 -25
  92. package/lib/date/index.ts +0 -127
  93. package/lib/func/curry.ts +0 -11
  94. package/lib/func/fx.ts +0 -56
  95. package/lib/func/identity.ts +0 -6
  96. package/lib/func/nextId.ts +0 -9
  97. package/lib/func/noop.ts +0 -6
  98. package/lib/geo/index.js +0 -22
  99. package/lib/index.ts +0 -17
  100. package/lib/object/index.ts +0 -69
  101. package/lib/parsing/codus.ts +0 -25
  102. package/lib/parsing/compiler.ts +0 -26
  103. package/lib/parsing/scalarParse.ts +0 -25
  104. package/lib/parsing/urls.ts +0 -91
  105. package/lib/parsing/xml.ts +0 -117
  106. package/lib/resources/l10n.ts +0 -40
  107. package/lib/resources/resources.ru.ts +0 -20
  108. package/lib/resources/resources.ts +0 -20
  109. package/lib/string/index.ts +0 -58
  110. package/lib/support/createListeners.ts +0 -12
@@ -0,0 +1,39 @@
1
+ import { Hash } from "ultimus";
2
+ const attributesToString = (v?: Hash): string => {
3
+ if (typeof v === "object") {
4
+ if (Array.isArray(v)) {
5
+ return !v.length
6
+ ? "[]"
7
+ : `[${attributesToString(v[0]) ?? ""} x${String(v.length)}]`;
8
+ }
9
+ return `{${Object.keys(v).toString()}}`;
10
+ }
11
+ return v ?? "";
12
+ };
13
+
14
+ const stringifyState = (attrs?: object | Hash) => {
15
+ if (!attrs) {
16
+ return "";
17
+ }
18
+
19
+ const r: string[] = [];
20
+ Object.entries(attrs).forEach(([k, v]) => {
21
+ if (v && k[0] !== "$") {
22
+ r.push(` ${k}="${attributesToString(v)}"`);
23
+ }
24
+ });
25
+
26
+ return r.length ? r.join("") : "";
27
+ };
28
+
29
+ export const stringify = (T: any, tab = ""): string => {
30
+ const { uid, displayName: tag = uid, component: impl, children } = T;
31
+
32
+ const ssubs: string = children?.size
33
+ ? [...children.values()].map((c) => stringify(c, ` ${tab}`)).join("\n")
34
+ : "";
35
+
36
+ return `${tab}<${tag}${stringifyState(impl)}${
37
+ !ssubs ? "/>" : `>\n${ssubs}\n${tab}</${tag}>`
38
+ }`;
39
+ };
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2017 Alex Litskevich
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,54 +0,0 @@
1
- # Arrmatura
2
-
3
- `Arrmatura` is a mimimalistic component framework that designed to be:
4
-
5
- - declarative and codeless
6
- - reactive and functional
7
- - non-obtrusive, platform-independent
8
- - easy to learn and get started.
9
-
10
- # Get Started
11
-
12
- npm i arrmatura
13
-
14
- ./templates.xml
15
-
16
- ```xml
17
- <component id="Application">
18
- <Main name="Joe"/>
19
- </component>
20
-
21
- <component id="Main">
22
- <Button title="{:greeting}, {name|upper}!">
23
- </component>
24
- ```
25
-
26
- index.ts
27
-
28
- ```javascript
29
- import { arrmatura } from 'arrmatura';
30
- import templates from './templates.xml';
31
-
32
- arrmatura('<Application />', {
33
- types: [templates],
34
- resources: {
35
- greeting: 'Hello',
36
- },
37
- functions: {
38
- upper: (x) => x.toUpperCase(),
39
- },
40
- });
41
- ```
42
-
43
- # Documentation
44
-
45
- - [Glossary](manuals/GLOSSARY.md)
46
- - [Templates](manuals/TEMPLATE.md)
47
- - [Custom components](manuals/CUSTOM.md)
48
-
49
- # Samples
50
-
51
- - [TodoMVC](https://alitskevich.github.io/arrmatura/todo.html) ([source](https://github.com/alitskevich/arrmatura/blob/master/docs/todo.html))
52
- - [Tasks list](https://alitskevich.github.io/arrmatura/task.html) ([source](https://github.com/alitskevich/arrmatura/tree/master/app-task))
53
- - [Game Solver](https://dlitskevich.github.io/solver/) ([source](https://github.com/dlitskevich/solver/tree/master/app))
54
- - [Input Templates](https://alitskevich.github.io/templain/) ([source](https://github.com/alitskevich/templain/tree/master/app))
@@ -1,111 +0,0 @@
1
- import { Service } from '../services/Service';
2
- import { Storage } from '../services/Storage';
3
-
4
- export class AuthService extends Service {
5
- authUrl: string = '';
6
- local?: Storage;
7
- initialToken: any;
8
- $info: unknown;
9
- afterSignedOut?: Procedure;
10
- persistence: 'local' | 'session' | 'transient' = 'transient';
11
-
12
- init() {
13
- this.local = new Storage(this.persistence);
14
-
15
- return !this.initialToken
16
- ? null
17
- : {
18
- token: this.initialToken,
19
- };
20
- }
21
-
22
- get token() {
23
- return this.initialToken || this.local?.get('$auth_token');
24
- }
25
-
26
- set token(token: string | null) {
27
- this.local?.set('$auth_token', token);
28
- }
29
-
30
- get isSignedIn() {
31
- return !!this.token;
32
- }
33
-
34
- get canSignOut() {
35
- return !this.initialToken;
36
- }
37
-
38
- signOut() {
39
- new Storage('local').clear();
40
- new Storage('session').clear();
41
- this.initialToken = null;
42
- this.token = null;
43
- window.location.reload();
44
- return null;
45
- }
46
-
47
- signIn(creds: any) {
48
- const { username, password } = creds || {};
49
- return fetch(this.authUrl + '?action=signin', {
50
- method: 'POST',
51
- mode: 'cors',
52
- redirect: 'follow',
53
- body: JSON.stringify({ creds: username + ':' + password }),
54
- })
55
- .then((res) => res.json())
56
- .then(({ error, ...rest }) => {
57
- if (error) {
58
- throw new Error('Invalid credentials');
59
- }
60
- return rest;
61
- });
62
- }
63
-
64
- signUp(data: any) {
65
- return fetch(this.authUrl + '?action=signup', {
66
- method: 'POST',
67
- mode: 'cors',
68
- redirect: 'follow',
69
- body: JSON.stringify({ data }),
70
- })
71
- .then((res) => res.json())
72
- .then(({ error, ...rest }) => {
73
- if (error) {
74
- throw error;
75
- }
76
- return rest;
77
- });
78
- }
79
-
80
- onInvalidateToken() {
81
- return this.signOut();
82
- }
83
-
84
- onSignIn(creds: Hash) {
85
- return {
86
- busy: true,
87
- '*': this.signIn(creds)
88
- .catch((error) => {
89
- this.toast('error: ' + error.message);
90
- return null;
91
- })
92
- .then((info) => ({ busy: false, ...info })),
93
- };
94
- }
95
- onSignUp(creds: Hash) {
96
- return {
97
- busy: true,
98
- '*': this.signUp(creds)
99
- .catch((error) => {
100
- this.toast('error: ' + error.message);
101
- return null;
102
- })
103
- .then((info) => ({ busy: false, ...info })),
104
- };
105
- }
106
-
107
- onSignOut() {
108
- this.signOut();
109
- this.afterSignedOut?.();
110
- }
111
- }
@@ -1,57 +0,0 @@
1
- import { Service } from '../services/Service';
2
- import { Storage } from '../services/Storage';
3
-
4
- export class UserService extends Service {
5
- url: string = '';
6
- kind: string = '$user';
7
- local?: Storage;
8
- persistence: 'local' | 'session' | 'transient' = 'transient';
9
-
10
- set info(info: unknown) {
11
- this.local?.set(this.kind, info);
12
- }
13
-
14
- get info(): Delta {
15
- return this.local?.get(this.kind);
16
- }
17
-
18
- init() {
19
- this.local = new Storage(this.persistence);
20
-
21
- return this.sync();
22
- }
23
-
24
- submit(_data: any): Promise<any> {
25
- throw new Error('Method not implemented.');
26
- }
27
-
28
- sync(delta?: Delta) {
29
- const promise = this.submit({ path: `?action=user`, body: { delta } })
30
- .then(({ user }) => {
31
- this.log('sync ' + this.kind, user);
32
- return { isLoading: false, info: user };
33
- })
34
- .catch((error) => {
35
- const message = error?.message || error || 'unknown';
36
- this.toast({ id: message, mode: 'error', message: 'Ошибка: ' + message });
37
- return { isLoading: false, error: message };
38
- });
39
-
40
- return {
41
- isLoading: true,
42
- info: { ...this.info, ...delta },
43
- error: null,
44
- '*': promise,
45
- };
46
- }
47
-
48
- onSave(delta: Delta) {
49
- return this.sync(delta);
50
- }
51
-
52
- onShowProfile(showProfile = false) {
53
- return {
54
- showProfile,
55
- };
56
- }
57
- }
@@ -1,5 +0,0 @@
1
- import userXml from './user.xml';
2
- export * from './AuthService';
3
- export * from './UserService';
4
-
5
- export const userTemplates = userXml;
@@ -1,64 +0,0 @@
1
- <component id="UserBar">
2
- <div class="float-right" style="width: 1.5rem;">
3
- <NoUserPanel ui:if="<-auth.isSignedIn|not">
4
- <ui:else>
5
- <UserLoading ui:if="<-user.isLoading">
6
- <ui:else>
7
- <UserPanel ui:props="<-user.info" defaultImage="assets/person1.png"/>
8
- </ui:else>
9
- </UserLoading>
10
- </ui:else>
11
- </NoUserPanel>
12
- </div>
13
- </component>
14
-
15
- <component id="UserLoading">
16
- <div class="tile tile-centered">
17
- <div class="tile-action">
18
- <div class="dropdown dropdown-right">
19
- <a class="btn btn-link dropdown-toggle" tabindex="0">
20
- <div class="mx-2 loading"></div>
21
- </a>
22
- </div>
23
- </div>
24
- </div>
25
- </component>
26
-
27
- <component id="UserPanel">
28
- <div class="tile tile-centered">
29
- <div class="tile-action">
30
- <div class="dropdown dropdown-right">
31
- <a class="btn btn-link dropdown-toggle p-0" tabindex="0">
32
- <figure class="avatar">
33
- <img src="{image|or:@defaultImage}" alt="{name}" />
34
- </figure>
35
- </a>
36
- <ul class="menu">
37
- <li class="menu-item">
38
- <a click="-> user.showProfile|truthy">Profile</a>
39
- </li>
40
- <li class="menu-item" ui:if="<- auth.canSignOut">
41
- <a click="-> auth.signOut">Exit</a>
42
- </li>
43
- </ul>
44
- </div>
45
- </div>
46
- </div>
47
- </component>
48
-
49
- <component id="NoUserPanel">
50
- <div class="tile tile-centered">
51
- <div class="tile-action">
52
- <a class="btn btn-link dropdown-toggle" click="-> auth.signIn">
53
- <Icon type="people"/>
54
- </a>
55
- <div class="dropdown dropdown-right">
56
- <ul class="menu">
57
- <li class="menu-item">
58
- <a>▶️Vxod</a>
59
- </li>
60
- </ul>
61
- </div>
62
- </div>
63
- </div>
64
- </component>
@@ -1,25 +0,0 @@
1
- <component id="Btn">
2
- <button class="
3
- btn btn-{mode}
4
- {primary|then:btn-primary}
5
- {disabled|or:@busy|then:disabled}
6
- {class}
7
- {large|then:btn-lg}
8
- {link|then:btn-link}
9
- c-hand
10
- " style="{style}" data={data} click="{action}">
11
- <span ui:if="{busy}" class="mx-2" style="width:18px;">
12
- <i class="loading"></i>
13
- </span>
14
- <Icon ui:if="busy|not|and:@icon" bundle="{iconBundle}" type="{icon}" class="mr-2"/>
15
- <span ui:if="{title}" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{title}</span>
16
- </button>
17
- </component>
18
-
19
- <component id="FAB">
20
- <button class="btn {tooltip|then:tooltip} tooltip-left p-0 fixed s-circle bg-error c-hand {class} {disabled|or:@busy|then:disabled} {busy|then:loading}" style="position: fixed; border: none; right: 1.5rem; bottom: 1.5rem; width: 2.5rem; height: 2.5rem;" data-tooltip="{tooltip|or:}">
21
- <div class="centroid s-circle" style="width: 2.5rem; height: 2.5rem;" data="{data}" click="{action}">
22
- <Icon type="{icon|or:plus}" />
23
- </div>
24
- </button>
25
- </component>
@@ -1,13 +0,0 @@
1
- import buttons from './buttons.xml';
2
- import table from './table.xml';
3
- import inputs from './inputs.xml';
4
- import media from './media.xml';
5
- import modal from './modal.xml';
6
- import navigation from './navigation.xml';
7
- import layouts from './layouts.xml';
8
- import viewport from './viewport.xml';
9
- import toasts from './toasts.xml';
10
- import searchbar from './searchbar.xml';
11
- import popups from './popups.xml';
12
-
13
- export default [buttons, media, table, modal, navigation, toasts, viewport, layouts, inputs, searchbar, popups];
@@ -1,33 +0,0 @@
1
- <component id="Select">
2
- <select class="{class}" change="{change}" multiple="{multiple}" disabled="{disabled}" data="{data}">
3
- <option selected="{value|not}" value="" ui:if="{value|not|or:@emptyCaption}">{emptyCaption}</option>
4
- <option ui:for="option of options" selected="{option.id|equals:@value}" value="{option.id}">{option.name}</option>
5
- </select>
6
- </component>
7
-
8
- <component id="RadioGroup">
9
- <div class="{class}">
10
- <label class="form-radio" ui:for="option of options">
11
- <input type="radio" name="{id|or:rg}" value="{option.id}" checked="{option.id|equals:@value}" change="{change}" data="{data}" disabled="{disabled}" />
12
- <i class="form-icon"></i>{option.name}
13
- </label>
14
- </div>
15
- </component>
16
-
17
- <component id="Dropdown">
18
- <div class="dropdown">
19
- <a href="#" class="btn btn-link dropdown-toggle" tabindex="0">
20
- {data|selectedName}<i class="icon icon-caret"></i>
21
- </a>
22
- <!-- menu component -->
23
- <ul class="menu" style="right: 0; left: auto">
24
- <li ui:for="item of data" class="menu-item {item.id|equals:@value|then:active}" data-id="{item.id}" data-name="{item.name}" click="{change}">
25
- <a>{item.name}</a>
26
- </li>
27
- </ul>
28
- </div>
29
- </component>
30
-
31
- <component id="DateTimeInput">
32
- <input class="form-input flatpickr-input" init="{:support.initFlatpickr}" disabled="{disabled}" type="text" placeholder="{placeholder}" value="{value|support.setFlatpickrValue}" change="{change}" />
33
- </component>
@@ -1,77 +0,0 @@
1
- <component id="Panel">
2
- <h6 class="mt-2 pt-2 px-2 text-gray" ui:if="caption">{caption}</h6>
3
- <div class="panel {class}" style="{style}">
4
- <small class="p-2 bg-secondary" ui:if="{hint}">{hint}</small>
5
- <div class="panel-header" ui:if="slot(title)">
6
- <div class="panel-title">
7
- <ui:slot id="title" key="panel-title" />
8
- </div>
9
- </div>
10
- <div class="panel-nav" ui:if="slot(nav)">
11
- <ui:slot id="nav" />
12
- </div>
13
- <div class="panel-body p-2">
14
- <ui:slot />
15
- </div>
16
- <div class="panel-footer" ui:if="slot(footer)">
17
- <ui:slot id="footer" />
18
- </div>
19
- </div>
20
- </component>
21
-
22
- <component id="Tile">
23
- <div class="tile {centered|then:tile-centered} m-2 {class}">
24
- <div class="tile-icon" ui:if="{image}">
25
- <Avatar src="{image}" />
26
- </div>
27
- <div class="tile-icon" ui:if="{icon}">
28
- <Icon type="{icon}" />
29
- </div>
30
- <div class="tile-content">
31
- <div class="tile-title text-bold" ui:if="{title}">{title}</div>
32
- <div class="tile-subtitle" ui:if="{subtitle}">{subtitle}</div>
33
- <ui:slot />
34
- </div>
35
- <div class="tile-action btn-group" ui:if="slot(actions)">
36
- <ui:slot id="actions" />
37
- </div>
38
- </div>
39
- </component>
40
-
41
- <component id="Card">
42
- <div class="card" style="{style}">
43
- <div class="card-image" ui:if="{image}">
44
- <img src="{image}" class="img-responsive" />
45
- </div>
46
- <div class="card-header">
47
- <a ui:if="{title}" href="{link}">
48
- <h5 class="card-title">{title}</h5>
49
- </a>
50
- <div ui:if="{subtitle}" class="card-subtitle text-gray">{subtitle}</div>
51
- <ui:slot id="header" />
52
- </div>
53
- <div class="card-body">
54
- <ui:slot />
55
- </div>
56
- <div class="card-footer" ui:if="slot(footer)">
57
- <ui:slot id="footer" />
58
- </div>
59
- </div>
60
- </component>
61
-
62
- <component id="Hero">
63
- <div class="hero bg-dark p-0">
64
- <div class="hero-body px-2">
65
- <h1>{title}</h1>
66
- </div>
67
- </div>
68
- </component>
69
-
70
-
71
- <component id="FixedPanel">
72
- <div style="position: fixed; right: 0; {bottom|then:bottom:top}: 0; left: 0; z-index:3;">
73
- <div class="{class}" style="max-width: 720px; margin: auto; display: flex; {style}">
74
- <ui:slot />
75
- </div>
76
- </div>
77
- </component>
@@ -1,21 +0,0 @@
1
- <component id="Icon">
2
- <i class="icon icon-{type} {class}" style="{style}" data="{data}" click="{click}"></i>
3
- </component>
4
-
5
- <component id="Img">
6
- <img src="{src|or:@default}" alt="{alt}" class="img {class}" style="{style}" />
7
- </component>
8
-
9
- <component id="ImgLogo">
10
- <img src="{src}" class="{class}" error="->" data-src="/assets/logo.jpg" />
11
- </component>
12
-
13
- <component id="IFrame">
14
- <iframe width="100%" height="450" frameborder="0" style="border: 0;" src="{src}" allowfullscreen="1"></iframe>
15
- </component>
16
-
17
- <component id="Avatar">
18
- <figure class="avatar {large|then:avatar-lg}">
19
- <img src="{src}" alt="{alt}" default="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" />
20
- </figure>
21
- </component>
@@ -1,37 +0,0 @@
1
- <component id="Modal">
2
- <!--
3
-
4
- Modal component:
5
-
6
- Slots:
7
- - header
8
- - default
9
- - footer
10
-
11
- Properties:
12
- - open: boolean
13
- - close: procedure
14
- - title: string
15
- - mode: lg|sm
16
-
17
- -->
18
- <div class="modal modal-{mode} {open|then:active}" style="padding:0;">
19
- <a class="modal-overlay" aria-label="Close" click="{close}" ui:if="mode|equals:lg|not"></a>
20
- <div class="modal-container" style="padding:0;max-height: {mode|equals:lg|then:100:70}vh">
21
- <div class="modal-header bg-secondary" style="margin:0">
22
- <a class="btn btn-lg btn-clear float-right" aria-label=":close" click="{close}"></a>
23
- <div class="modal-title h5" ui:if="{title}">{title}</div>
24
- <ui:slot id="header" />
25
- </div>
26
- <div class="modal-body" style="">
27
- <div class="content">
28
- <ui:slot />
29
- </div>
30
- </div>
31
- <div class="modal-footer">
32
- <ui:slot id="footer" />
33
- </div>
34
- </div>
35
- </div>
36
- </component>
37
-
@@ -1,73 +0,0 @@
1
- <component id="Tabs">
2
- <ul class="tab tab-block">
3
- <li class="tab-item {item.id|equals:@value|then:active} c-hand" ui:for="item of items">
4
- <a data-id="{item.id}" click="{change}">
5
- <Icon ui:if="{item.icon}" type="{item.icon}" bundle="{item.iconBundle}" class="mx-2" />
6
- {item.name|or:@item.id}
7
- </a>
8
- </li>
9
- </ul>
10
- </component>
11
-
12
- <component id="BackButton">
13
- <a class="mx-2" style="border: none; width: 1.5rem; z-index: 5" href="{href}">
14
- <Icon type="back" />
15
- </a>
16
- </component>
17
-
18
- <component id="Navbar">
19
- <header class="navbar sticky {class} bg-secondary" style="height: 48px;flex-wrap: nowrap;margin:0;">
20
- <section class="navbar-section" style="max-width:100%;">
21
- <div class="m-2 d-flex items-center flex-1">
22
- <ui:slot id="left" />
23
- <div style="flex:1; min-height:1.7rem;display:flex;align-items: center;">
24
- <h4 class="text-dark text-ellipsis {badge|then:badge}" style="margin-bottom:0; flex:1;max-width:640px;" data-badge="{badge}" ui:if="{caption}">{caption}</h4>
25
- </div>
26
- </div>
27
- </section>
28
- <section class="navbar-section flex-0 mx-2" ui:if="slot(right)">
29
- <ui:slot id="right" />
30
- </section>
31
- </header>
32
- </component>
33
-
34
- <component id="PageRouter">
35
- <ui:tag tag="{host|capitalize|or:Loader}Page" path={path} ui:props="{params}" params="{params}" />
36
- </component>
37
-
38
- <component id="LoaderPage">
39
- <LoadingIndicator />
40
- </component>
41
-
42
- <component id="NavTree">
43
- <ul class="nav">
44
- <li class="nav-item {item.class}" ui:for="item of data">
45
- <NavLink href="{item.id}">
46
- <span>{item.name}</span>
47
- <span ui:if="{item.label}" class="label label-error">{item.label}</span>
48
- </NavLink>
49
- <NavTree ui:if="{item.subs}" data="{item.subs}" />
50
- </li>
51
- </ul>
52
- </component>
53
-
54
- <component id="NavLink">
55
- <a data-value="{href}" click="-> nav.hash" class="c-hand {class}">
56
- <ui:slot />
57
- </a>
58
- </component>
59
-
60
- <component id="NavListCursor">
61
- <div class="d-flex {class}" style="min-width: 6rem;align-items: center;" ui:if="total">
62
- <span class="p-2" ui:if="prev.id|not">
63
- <Icon type="arrow-left"/>
64
- </span>
65
- <a class="p-2" href="#/task?itemId={prev.id}" ui:if="prev.id">
66
- <Icon type="arrow-left"/>
67
- </a>
68
- <span class="text-dark text-ellipsis text-bold">{index|plus:1} / {total}</span>
69
- <a class="p-2" href="#/task?itemId={next.id}" ui:if="next.id">
70
- <Icon type="arrow-right"/>
71
- </a>
72
- </div>
73
- </component>
@@ -1,12 +0,0 @@
1
- <component id="Popover">
2
- <div class="popover popover-right">
3
- <ui:slot />
4
- <div class="popover-container">
5
- <div class="card">
6
- <div class="card-header">
7
- <ui:slot id="body" />
8
- </div>
9
- </div>
10
- </div>
11
- </div>
12
- </component>