fwtoolkit 0.1.0-alpha.5 → 0.1.0-alpha.7

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 (114) hide show
  1. package/README.md +41 -9
  2. package/css/alerts.css +7 -0
  3. package/css/dialog.css +62 -0
  4. package/css/overview_menu.css +7 -0
  5. package/dist/basic.d.ts +70 -0
  6. package/dist/basic.d.ts.map +1 -0
  7. package/dist/basic.js +447 -0
  8. package/dist/basic.js.map +1 -0
  9. package/dist/blob.d.ts +2 -0
  10. package/dist/blob.d.ts.map +1 -0
  11. package/dist/blob.js +12 -0
  12. package/dist/blob.js.map +1 -0
  13. package/dist/content_menu.d.ts +31 -0
  14. package/dist/content_menu.d.ts.map +1 -0
  15. package/dist/content_menu.js +360 -0
  16. package/dist/content_menu.js.map +1 -0
  17. package/dist/datatable_bulk.d.ts +14 -0
  18. package/dist/datatable_bulk.d.ts.map +1 -0
  19. package/dist/datatable_bulk.js +176 -0
  20. package/dist/datatable_bulk.js.map +1 -0
  21. package/dist/dialog.d.ts +18 -0
  22. package/dist/dialog.d.ts.map +1 -0
  23. package/dist/dialog.js +395 -0
  24. package/dist/dialog.js.map +1 -0
  25. package/dist/events.d.ts +2 -0
  26. package/dist/events.d.ts.map +1 -0
  27. package/dist/events.js +11 -0
  28. package/dist/events.js.map +1 -0
  29. package/dist/faq_dialog.d.ts +8 -0
  30. package/dist/faq_dialog.d.ts.map +1 -0
  31. package/dist/faq_dialog.js +63 -0
  32. package/dist/faq_dialog.js.map +1 -0
  33. package/dist/file/dialog.d.ts +27 -0
  34. package/dist/file/dialog.d.ts.map +1 -0
  35. package/dist/file/dialog.js +125 -0
  36. package/dist/file/dialog.js.map +1 -0
  37. package/dist/file/index.d.ts +5 -0
  38. package/dist/file/index.d.ts.map +1 -0
  39. package/dist/file/index.js +6 -0
  40. package/dist/file/index.js.map +1 -0
  41. package/dist/file/new_folder_dialog.d.ts +5 -0
  42. package/dist/file/new_folder_dialog.d.ts.map +1 -0
  43. package/dist/file/new_folder_dialog.js +34 -0
  44. package/dist/file/new_folder_dialog.js.map +1 -0
  45. package/dist/file/selector.d.ts +22 -0
  46. package/dist/file/selector.d.ts.map +1 -0
  47. package/dist/file/selector.js +239 -0
  48. package/dist/file/selector.js.map +1 -0
  49. package/dist/file/templates.d.ts +5 -0
  50. package/dist/file/templates.d.ts.map +1 -0
  51. package/dist/file/templates.js +9 -0
  52. package/dist/file/templates.js.map +1 -0
  53. package/dist/file/tools.d.ts +5 -0
  54. package/dist/file/tools.d.ts.map +1 -0
  55. package/dist/file/tools.js +51 -0
  56. package/dist/file/tools.js.map +1 -0
  57. package/dist/focus.d.ts +3 -0
  58. package/dist/focus.d.ts.map +1 -0
  59. package/dist/focus.js +12 -0
  60. package/dist/focus.js.map +1 -0
  61. package/dist/index.d.ts +16 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +17 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/network.d.ts +11 -0
  66. package/dist/network.d.ts.map +1 -0
  67. package/dist/network.js +113 -0
  68. package/dist/network.js.map +1 -0
  69. package/dist/overview_menu.d.ts +27 -0
  70. package/dist/overview_menu.d.ts.map +1 -0
  71. package/dist/overview_menu.js +536 -0
  72. package/dist/overview_menu.js.map +1 -0
  73. package/dist/settings.d.ts +3 -0
  74. package/dist/settings.d.ts.map +1 -0
  75. package/dist/settings.js +16 -0
  76. package/dist/settings.js.map +1 -0
  77. package/dist/user.d.ts +6 -0
  78. package/dist/user.d.ts.map +1 -0
  79. package/dist/user.js +45 -0
  80. package/dist/user.js.map +1 -0
  81. package/dist/worker.d.ts +2 -0
  82. package/dist/worker.d.ts.map +1 -0
  83. package/dist/worker.js +12 -0
  84. package/dist/worker.js.map +1 -0
  85. package/dist/ws.d.ts +46 -0
  86. package/dist/ws.d.ts.map +1 -0
  87. package/dist/ws.js +329 -0
  88. package/dist/ws.js.map +1 -0
  89. package/package.json +26 -4
  90. package/src/{basic.js → basic.ts} +1 -0
  91. package/src/{blob.js → blob.ts} +1 -0
  92. package/src/{content_menu.js → content_menu.ts} +3 -2
  93. package/src/{datatable_bulk.js → datatable_bulk.ts} +1 -0
  94. package/src/{dialog.js → dialog.ts} +1 -0
  95. package/src/{events.js → events.ts} +1 -0
  96. package/src/{faq_dialog.js → faq_dialog.ts} +1 -0
  97. package/src/file/{dialog.js → dialog.ts} +1 -0
  98. package/src/file/{index.js → index.ts} +1 -0
  99. package/src/file/{new_folder_dialog.js → new_folder_dialog.ts} +1 -0
  100. package/src/file/{selector.js → selector.ts} +1 -0
  101. package/src/file/{templates.js → templates.ts} +1 -0
  102. package/src/file/{tools.js → tools.ts} +1 -0
  103. package/src/{focus.js → focus.ts} +1 -0
  104. package/src/global.d.ts +11 -0
  105. package/src/{index.js → index.ts} +1 -2
  106. package/src/{network.js → network.ts} +1 -0
  107. package/src/{overview_menu.js → overview_menu.ts} +2 -1
  108. package/src/{settings.js → settings.ts} +1 -0
  109. package/src/{user.js → user.ts} +1 -0
  110. package/src/{worker.js → worker.ts} +1 -0
  111. package/src/{ws.js → ws.ts} +1 -0
  112. package/css/ui_dialogs.css +0 -144
  113. package/src/templates.js +0 -42
  114. package/src/user_util.js +0 -16
@@ -1,144 +0,0 @@
1
- .ui-widget-overlay {
2
- position: fixed;
3
- left: 0;
4
- top: 0;
5
- width: 100%;
6
- height: 100%;
7
- background-color: rgb(var(--overlay-color));
8
- z-index: 100;
9
- backdrop-filter: blur(2px);
10
- }
11
-
12
- .ui-widget-overlay.no-blur {
13
- backdrop-filter: none;
14
- }
15
-
16
- .ui-dialog {
17
- position: absolute;
18
- padding: 19px;
19
- background-color: var(--cs-light-background);
20
- border: solid 1px var(--cs-light-border);
21
- box-shadow: 0 0 10px var(--cs-light-box-shadow);
22
- overflow: hidden;
23
- border-radius: 4px;
24
- font-size: 14px;
25
- outline: 0;
26
- z-index: 1000; /* Ensure dialog stays on top */
27
- user-select: none; /* Prevent interaction with background content */
28
- }
29
-
30
- .ui-dialog-titlebar {
31
- position: relative;
32
- padding: 0;
33
- }
34
-
35
- .ui-dialog-title {
36
- font-size: 16px;
37
- font-weight: 700;
38
- text-transform: none;
39
- }
40
-
41
- .ui-dialog-buttonpane {
42
- padding-top: 20px;
43
- }
44
-
45
- .ui-button {
46
- font-size: 14px;
47
- line-height: 1em;
48
- border: none;
49
- background: none;
50
- padding: 0;
51
- margin: 0;
52
- cursor: pointer;
53
- }
54
-
55
- .ui-dialog-titlebar-close,
56
- .ui-dialog-titlebar-help {
57
- position: absolute;
58
- right: 0.3em;
59
- top: 50%;
60
- width: 20px;
61
- margin: -10px 0 0;
62
- padding: 1px;
63
- height: 20px;
64
- }
65
-
66
- .ui-button-icon-only {
67
- width: 2em;
68
- box-sizing: border-box;
69
- text-indent: -9999px;
70
- white-space: nowrap;
71
- }
72
-
73
- .ui-button-icon-only .ui-icon {
74
- position: absolute;
75
- top: 50%;
76
- left: 50%;
77
- margin-top: -8px;
78
- margin-left: -8px;
79
- }
80
-
81
- .ui-button-icon-only .ui-icon::before {
82
- text-indent: 5019px;
83
- }
84
-
85
- /* Style for the close button specifically */
86
- .ui-dialog-titlebar-close {
87
- order: 99; /* Push to end of flex container */
88
- }
89
-
90
- .ui-dialog-titlebar-close:hover,
91
- .ui-dialog-titlebar-help:hover {
92
- color: var(--cs-dark-hover);
93
- }
94
-
95
- .ui-icon-closethick::before {
96
- width: 0.7em;
97
- height: 1em;
98
- padding-top: 5px;
99
- content: "\f00d";
100
- }
101
-
102
- .ui-icon-help::before {
103
- width: 0.7em;
104
- height: 1em;
105
- padding-top: 5px;
106
- content: "\f128";
107
- }
108
-
109
- .ui-dialog-content {
110
- position: relative;
111
- margin-top: 24px;
112
- overflow: auto;
113
- }
114
-
115
- .ui-dialog-buttonset {
116
- position: relative;
117
- text-align: right;
118
- }
119
-
120
- .ui-dialog-buttonset .fw-button {
121
- margin-left: 6px;
122
- }
123
-
124
- /* Make focus visible on all focusable elements */
125
- .ui-dialog *:focus {
126
- outline: 2px solid var(--cs-dark-background);
127
- outline-offset: 2px;
128
- }
129
-
130
- /* Style the title bar buttons specifically */
131
- .ui-dialog-titlebar .ui-button-icon-only {
132
- position: absolute;
133
- top: 50%;
134
- transform: translateY(-50%);
135
- padding: 8px;
136
- background: transparent;
137
- border: none;
138
- }
139
-
140
- .ui-dialog-titlebar .ui-button-icon-only:focus {
141
- outline: 2px solid var(--cs-dark-text);
142
- outline-offset: 2px;
143
- border-radius: 4px;
144
- }
package/src/templates.js DELETED
@@ -1,42 +0,0 @@
1
- import {avatarTemplate} from "./user.js"
2
- import {filterPrimaryEmail} from "./user_util.js"
3
-
4
- export const baseBodyTemplate = ({user, contents, hasOverview, app}) => `
5
- <div id="wait">
6
- <i class="fa fa-spinner fa-pulse"></i>
7
- </div>
8
- <header class="fw-header" role="banner">
9
- <div class="fw-container">
10
- <a href="${app && app.routes[""].app === "document" ? "/" : "/documents/"}">
11
- <h1 class="fw-logo">
12
- <span class="fw-logo-text"></span>
13
- <img src="${staticUrl("svg/icon.svg")}" alt="Logo" />
14
- </h1>
15
- </a>
16
- <nav id="header-nav" role="navigation" aria-label="${gettext("Site navigation")}"></nav>
17
- <div id="user-preferences" class="fw-user-preferences fw-header-text">
18
- <div id="preferences-btn" class="fw-button">
19
- ${avatarTemplate({user})}
20
- </div>
21
- <div id="user-preferences-pulldown" class="fw-pulldown fw-right">
22
- <div data-value="profile">
23
- <span class='fw-avatar-card'>
24
- <span class='fw-avatar-card-avatar'>${avatarTemplate({user})}</span>
25
- <span class='fw-avatar-card-name'>
26
- ${user.username}
27
- <span class='fw-avatar-card-email'>${filterPrimaryEmail(user.emails)}</span>
28
- </span>
29
- </span>
30
- </div>
31
- <div data-value="contacts">${gettext("Contacts")}</div>
32
- <div data-value="logout">${gettext("Log out")}</div>
33
- </div>
34
- </div><!-- end user preference -->
35
- </div><!-- end container -->
36
- </header>
37
- <div class="fw-contents-outer">
38
- ${hasOverview ? '<div class="fw-overview-menu-wrapper"><ul id="fw-overview-menu"></ul></div>' : ""}
39
- <div class="fw-contents">
40
- ${contents}
41
- </div>
42
- </div>`
package/src/user_util.js DELETED
@@ -1,16 +0,0 @@
1
- /** Creates a dropdown box.
2
- * @param btn The button to open and close the dropdown box.
3
- * @param box The node containing the contents of the dropdown box.
4
- * @param preopen An optional function to be called before opening the dropdown box. Used to position dropdown box.
5
- */
6
- export const filterPrimaryEmail = emails => {
7
- const primaryEmails = emails.filter(email => email.primary)
8
- if (!primaryEmails.length) {
9
- if (emails.length) {
10
- return emails[0].address
11
- } else {
12
- return ""
13
- }
14
- }
15
- return primaryEmails[0].address
16
- }