jobdone-shared-files 0.0.1-beta.10

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 (112) hide show
  1. package/ProjectManagement/projectNavbar.vue +168 -0
  2. package/README.md +27 -0
  3. package/common/directives/collapse.js +13 -0
  4. package/common/format.js +13 -0
  5. package/index.js +15 -0
  6. package/package.json +18 -0
  7. package/paginate.vue +139 -0
  8. package/style/css/vue-loading-overlay/index.css +40 -0
  9. package/style/scss/Bootstrap/_accordion.scss +158 -0
  10. package/style/scss/Bootstrap/_alert.scss +68 -0
  11. package/style/scss/Bootstrap/_badge.scss +38 -0
  12. package/style/scss/Bootstrap/_breadcrumb.scss +40 -0
  13. package/style/scss/Bootstrap/_button-group.scss +142 -0
  14. package/style/scss/Bootstrap/_buttons.scss +207 -0
  15. package/style/scss/Bootstrap/_card.scss +238 -0
  16. package/style/scss/Bootstrap/_carousel.scss +238 -0
  17. package/style/scss/Bootstrap/_close.scss +61 -0
  18. package/style/scss/Bootstrap/_containers.scss +41 -0
  19. package/style/scss/Bootstrap/_dropdown.scss +250 -0
  20. package/style/scss/Bootstrap/_forms.scss +9 -0
  21. package/style/scss/Bootstrap/_functions.scss +302 -0
  22. package/style/scss/Bootstrap/_grid.scss +33 -0
  23. package/style/scss/Bootstrap/_helpers.scss +10 -0
  24. package/style/scss/Bootstrap/_images.scss +42 -0
  25. package/style/scss/Bootstrap/_list-group.scss +204 -0
  26. package/style/scss/Bootstrap/_maps.scss +121 -0
  27. package/style/scss/Bootstrap/_mixins.scss +42 -0
  28. package/style/scss/Bootstrap/_modal.scss +237 -0
  29. package/style/scss/Bootstrap/_nav.scss +172 -0
  30. package/style/scss/Bootstrap/_navbar.scss +286 -0
  31. package/style/scss/Bootstrap/_offcanvas.scss +146 -0
  32. package/style/scss/Bootstrap/_pagination.scss +109 -0
  33. package/style/scss/Bootstrap/_placeholders.scss +51 -0
  34. package/style/scss/Bootstrap/_popover.scss +196 -0
  35. package/style/scss/Bootstrap/_progress.scss +68 -0
  36. package/style/scss/Bootstrap/_reboot.scss +610 -0
  37. package/style/scss/Bootstrap/_root.scss +195 -0
  38. package/style/scss/Bootstrap/_spinners.scss +85 -0
  39. package/style/scss/Bootstrap/_tables.scss +164 -0
  40. package/style/scss/Bootstrap/_toasts.scss +73 -0
  41. package/style/scss/Bootstrap/_tooltip.scss +120 -0
  42. package/style/scss/Bootstrap/_transitions.scss +27 -0
  43. package/style/scss/Bootstrap/_type.scss +106 -0
  44. package/style/scss/Bootstrap/_utilities.scss +748 -0
  45. package/style/scss/Bootstrap/_variables-dark.scss +70 -0
  46. package/style/scss/Bootstrap/_variables.scss +1703 -0
  47. package/style/scss/Bootstrap/bootstrap-grid.scss +66 -0
  48. package/style/scss/Bootstrap/bootstrap-reboot.scss +10 -0
  49. package/style/scss/Bootstrap/bootstrap-utilities.scss +19 -0
  50. package/style/scss/Bootstrap/bootstrap.scss +52 -0
  51. package/style/scss/Bootstrap/forms/_floating-labels.scss +90 -0
  52. package/style/scss/Bootstrap/forms/_form-check.scss +188 -0
  53. package/style/scss/Bootstrap/forms/_form-control.scss +201 -0
  54. package/style/scss/Bootstrap/forms/_form-range.scss +91 -0
  55. package/style/scss/Bootstrap/forms/_form-select.scss +81 -0
  56. package/style/scss/Bootstrap/forms/_form-text.scss +11 -0
  57. package/style/scss/Bootstrap/forms/_input-group.scss +132 -0
  58. package/style/scss/Bootstrap/forms/_labels.scss +36 -0
  59. package/style/scss/Bootstrap/forms/_validation.scss +12 -0
  60. package/style/scss/Bootstrap/helpers/_clearfix.scss +3 -0
  61. package/style/scss/Bootstrap/helpers/_color-bg.scss +10 -0
  62. package/style/scss/Bootstrap/helpers/_colored-links.scss +12 -0
  63. package/style/scss/Bootstrap/helpers/_position.scss +36 -0
  64. package/style/scss/Bootstrap/helpers/_ratio.scss +26 -0
  65. package/style/scss/Bootstrap/helpers/_stacks.scss +15 -0
  66. package/style/scss/Bootstrap/helpers/_stretched-link.scss +15 -0
  67. package/style/scss/Bootstrap/helpers/_text-truncation.scss +7 -0
  68. package/style/scss/Bootstrap/helpers/_visually-hidden.scss +8 -0
  69. package/style/scss/Bootstrap/helpers/_vr.scss +8 -0
  70. package/style/scss/Bootstrap/mixins/_alert.scss +18 -0
  71. package/style/scss/Bootstrap/mixins/_backdrop.scss +14 -0
  72. package/style/scss/Bootstrap/mixins/_banner.scss +7 -0
  73. package/style/scss/Bootstrap/mixins/_border-radius.scss +78 -0
  74. package/style/scss/Bootstrap/mixins/_box-shadow.scss +18 -0
  75. package/style/scss/Bootstrap/mixins/_breakpoints.scss +127 -0
  76. package/style/scss/Bootstrap/mixins/_buttons.scss +70 -0
  77. package/style/scss/Bootstrap/mixins/_caret.scss +69 -0
  78. package/style/scss/Bootstrap/mixins/_clearfix.scss +9 -0
  79. package/style/scss/Bootstrap/mixins/_color-mode.scss +21 -0
  80. package/style/scss/Bootstrap/mixins/_color-scheme.scss +7 -0
  81. package/style/scss/Bootstrap/mixins/_container.scss +11 -0
  82. package/style/scss/Bootstrap/mixins/_deprecate.scss +10 -0
  83. package/style/scss/Bootstrap/mixins/_forms.scss +153 -0
  84. package/style/scss/Bootstrap/mixins/_gradients.scss +47 -0
  85. package/style/scss/Bootstrap/mixins/_grid.scss +151 -0
  86. package/style/scss/Bootstrap/mixins/_image.scss +16 -0
  87. package/style/scss/Bootstrap/mixins/_list-group.scss +27 -0
  88. package/style/scss/Bootstrap/mixins/_lists.scss +7 -0
  89. package/style/scss/Bootstrap/mixins/_pagination.scss +10 -0
  90. package/style/scss/Bootstrap/mixins/_reset-text.scss +17 -0
  91. package/style/scss/Bootstrap/mixins/_resize.scss +6 -0
  92. package/style/scss/Bootstrap/mixins/_table-variants.scss +24 -0
  93. package/style/scss/Bootstrap/mixins/_text-truncate.scss +8 -0
  94. package/style/scss/Bootstrap/mixins/_transition.scss +26 -0
  95. package/style/scss/Bootstrap/mixins/_utilities.scss +97 -0
  96. package/style/scss/Bootstrap/mixins/_visually-hidden.scss +29 -0
  97. package/style/scss/Bootstrap/utilities/_api.scss +47 -0
  98. package/style/scss/Bootstrap/vendor/_rfs.scss +354 -0
  99. package/style/scss/Layout/LayoutBase.scss +942 -0
  100. package/style/scss/Layout/LayoutProject.scss +126 -0
  101. package/style/scss/Layout/LayoutSinglePage.scss +14 -0
  102. package/style/scss/Layout/LayoutTwoColumn.scss +56 -0
  103. package/style/scss/Settings/_Mixins.scss +229 -0
  104. package/style/scss/Settings/_basic-import.scss +5 -0
  105. package/style/scss/Settings/_bs-variables-dark.scss +70 -0
  106. package/style/scss/Settings/_bs-variables.scss +1703 -0
  107. package/style/scss/Settings/_color-mode.scss +123 -0
  108. package/style/scss/Settings/_custom-variables.scss +10 -0
  109. package/tagEditor.vue +264 -0
  110. package/tree.vue +62 -0
  111. package/treeItem.vue +367 -0
  112. package/vueLoadingOverlay.vue +77 -0
package/treeItem.vue ADDED
@@ -0,0 +1,367 @@
1
+ <template>
2
+ <li class="tree-item" :class="[itemClass]">
3
+ <div class="card flex-row d-flex input-group flex-nowrap">
4
+ <button class="btn text-primary border-end px-1" :disabled="!item.children" data-bs-toggle="collapse" :data-bs-target="'#collapse-'+item.id">
5
+ <span class="material-icons">arrow_drop_down</span>
6
+ </button>
7
+ <input type="radio" name="tree-item" :id="item.id">
8
+ <label class="btn-title d-flex text-start rounded-0 flex-grow-1"
9
+ :for="item.id" @click="clickItem(item)">
10
+ <div class="btn btn-text border-start">{{item.title}}</div>
11
+ <slot name="icon">
12
+ <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
13
+ <span class="material-icons icon-18"></span>
14
+ </div>
15
+ </slot>
16
+ </label>
17
+ </div>
18
+ <template v-if="item.children">
19
+ <ul :id="'collapse-'+item.id" class="content-children show" v-collapse>
20
+ <TreeItem class="children-box" v-for="(subItem, subIndex) in item.children"
21
+ :key="subItem.id"
22
+ :item="subItem"
23
+ :index="subIndex"
24
+ :click-item="clickItem"
25
+ :active-id="activeId"
26
+ :tree-item-class="treeItemClass">
27
+ <template v-slot:icon>
28
+ <slot name="icon">
29
+ <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
30
+ <span class="material-icons icon-18"></span>
31
+ </div>
32
+ </slot>
33
+ </template>
34
+ </TreeItem>
35
+ </ul>
36
+ </template>
37
+ </li>
38
+ </template>
39
+
40
+ <script>
41
+ import { ref, computed } from 'vue';
42
+ import collapse from './common/directives/collapse';
43
+ export default {
44
+ name: 'TreeItem',
45
+ props: {
46
+ item: {
47
+ type: Object,
48
+ required: true
49
+ },
50
+ index: {
51
+ type: Number,
52
+ required: true
53
+ },
54
+ clickItem: {
55
+ type: Function
56
+ },
57
+ activeId: {
58
+ type: String,
59
+ required: true
60
+ },
61
+ treeItemClass: {
62
+ type: Array,
63
+ default: function () {
64
+ return [];
65
+ }
66
+ }
67
+ },
68
+ directives: {
69
+ collapse
70
+ },
71
+ setup(props, { emit }) {
72
+ const itemClass = computed(() => {
73
+ var classList = [...props.treeItemClass];
74
+ if (props.activeId === props.item.id) {
75
+ classList.push('active');
76
+ }
77
+ return classList;
78
+ });
79
+ return {
80
+ itemClass: itemClass
81
+ };
82
+ }
83
+ }
84
+ </script>
85
+
86
+ <style scoped lang="scss">
87
+ @import "./style/scss/Settings/basic-import";
88
+
89
+ li {
90
+ list-style-type: none;
91
+ }
92
+
93
+ // 基本 sizes
94
+ .tree-item {
95
+ .btn {
96
+ --bs-btn-padding-x: 0.75em;
97
+ --bs-btn-padding-y: 0.375em;
98
+ --bs-btn-font-size: 1em;
99
+ }
100
+
101
+ .card {
102
+ --bs-card-spacer-y: 1em;
103
+ --bs-card-spacer-x: 1em;
104
+ --bs-card-title-spacer-y: 0.5em;
105
+ --bs-card-cap-padding-y: 0.5em;
106
+ --bs-card-cap-padding-x: 1em;
107
+ --bs-card-img-overlay-padding: 1em;
108
+ --bs-card-group-margin: 0.75em;
109
+ }
110
+
111
+ .material-icons {
112
+ font-size: 1.5em;
113
+
114
+ &.icon-14 {
115
+ font-size: 0.875em;
116
+ }
117
+
118
+ &.icon-18 {
119
+ font-size: 1.125em;
120
+ }
121
+
122
+ &.icon-28 {
123
+ font-size: 1.75em;
124
+ }
125
+
126
+ &.icon-32 {
127
+ font-size: 2em;
128
+ }
129
+ }
130
+ }
131
+
132
+ // hover效果與優化
133
+ // firefox 暫不支援 has
134
+ .tree-item:has([data-bs-toggle="collapse"]:hover) + .collapse {
135
+ will-change: height;
136
+ }
137
+
138
+ .tree-item:hover > .card,
139
+ .tree-item .card:focus-within {
140
+ background-color: lighten( $primary, 32% );
141
+ border-color: rgba( $primary, .4 );
142
+ }
143
+
144
+ // active效果
145
+ .tree-item.active {
146
+ > .card {
147
+ background-color: lighten( $primary, 30% );
148
+ border-color: rgba( $primary, .5 );
149
+ }
150
+
151
+ .btn-title {
152
+ color: $primary;
153
+ }
154
+ }
155
+
156
+ .btn-title {
157
+ .btn {
158
+ border-radius: 0;
159
+
160
+ &:focus, &:active {
161
+ border-color: transparent;
162
+ }
163
+ }
164
+
165
+ .btn-text {
166
+ width: 100%;
167
+ text-align: left;
168
+ }
169
+ }
170
+
171
+ label.btn-title {
172
+ cursor: pointer;
173
+ }
174
+
175
+ // 隱藏 input
176
+ .tree-item {
177
+ position: relative;
178
+
179
+ input[type="checkbox"], input[type="radio"] {
180
+ position: absolute;
181
+ @include size(0);
182
+ pointer-events: none;
183
+
184
+ ~ .btn-title .material-icons:before {
185
+ content: "\e836";
186
+ display: inline-block;
187
+ font-family: inherit;
188
+ }
189
+
190
+ &:checked ~ .btn-title .material-icons:before {
191
+ content: "\e837";
192
+ }
193
+ }
194
+ }
195
+
196
+
197
+ // 刪除子層標示 UI
198
+ .tree-item:has(.btn.text-danger:hover) {
199
+ .card {
200
+ background-color: lighten( $danger, 43% );
201
+ border-color: rgba( $danger, .5 );
202
+
203
+ .btn {
204
+ color: $danger;
205
+ }
206
+ }
207
+ }
208
+ // 刪除子層標示 UI (含子層)
209
+ // .tree-child:has(.btn.text-danger:hover){
210
+ // .card, + .content-children .card{
211
+ // background-color: lighten( $danger, 43% );
212
+ // border-color: rgba( $danger, .5 );
213
+ // .btn{
214
+ // color: $danger;
215
+ // }
216
+ // }
217
+ // }
218
+
219
+ .btn-no-children {
220
+ cursor: auto;
221
+
222
+ &:focus {
223
+ border-color: transparent;
224
+ }
225
+ }
226
+
227
+ // 基本 style
228
+ $card-margin: .2em;
229
+ $line-padding: .7em;
230
+
231
+ .tree-item {
232
+ display: flex;
233
+ flex-direction: column;
234
+ width: 100%;
235
+ margin-top: $card-margin;
236
+
237
+ .card {
238
+ position: relative;
239
+ flex-grow: 1;
240
+ transition: $transition-base;
241
+ z-index: 2;
242
+ }
243
+ }
244
+
245
+ .col-action {
246
+ @include flex-center;
247
+ width: 2.8rem;
248
+ }
249
+
250
+
251
+ // 開合 style
252
+ .btn[data-bs-toggle="collapse"] {
253
+ .material-icons {
254
+ transition: $transition-base;
255
+ }
256
+
257
+ &[aria-expanded="false"] .material-icons {
258
+ transform: rotate(-90deg);
259
+ }
260
+
261
+ &:disabled, &.disabled {
262
+ border-color: transparent;
263
+ }
264
+ }
265
+
266
+ // 畫線 style
267
+ .content-children {
268
+ padding-left: 1.5rem;
269
+ --tree-border-color: #fff;
270
+ position: relative;
271
+
272
+ &:before {
273
+ content: "";
274
+ position: absolute;
275
+ display: block;
276
+ left: -$line-padding;
277
+ bottom: 24px;
278
+ width: 1px;
279
+ height: 100%;
280
+ z-index: 1;
281
+ background-color: var(--tree-border-color);
282
+ }
283
+ // // line color
284
+ &:before, .tree-item .card:before, .tree-item .card:after {
285
+ background-color: var(--tree-border-color);
286
+ }
287
+ }
288
+
289
+ .tree-item {
290
+ &:last-child > .content-children:before {
291
+ display: none;
292
+ }
293
+
294
+ .card {
295
+ position: relative;
296
+
297
+ &:before, &:after {
298
+ content: "";
299
+ position: absolute;
300
+ left: calc(-#{$line-padding} - #{$border-width});
301
+ z-index: 1;
302
+ }
303
+
304
+ &:before {
305
+ bottom: 50%;
306
+ width: 1px;
307
+ height: calc(100% + #{$card-margin}*2 + #{$border-width}*2);
308
+ }
309
+
310
+ &:after {
311
+ top: 0;
312
+ bottom: 0;
313
+ width: $line-padding;
314
+ height: 1px;
315
+ margin: auto;
316
+ }
317
+ }
318
+
319
+ &:nth-child(1) > .card:before {
320
+ height: calc(50% + #{$card-margin} + #{$border-width});
321
+ }
322
+ }
323
+
324
+
325
+ // 小版本
326
+ .tree-item-sm {
327
+ > .card {
328
+ font-size: 86%;
329
+ }
330
+
331
+ .content-children {
332
+ padding-left: 1rem;
333
+ }
334
+
335
+ .content-children:before {
336
+ left: -10px;
337
+ bottom: 19px;
338
+ }
339
+ }
340
+ // .tree-item-sm + .content-children{
341
+ // > .children-box{
342
+ // padding-left: 1rem;
343
+ // }
344
+ // }
345
+
346
+
347
+ // 白背景版本
348
+ .tree-item-in-white {
349
+ .content-children {
350
+ --tree-border-color: var(--bs-border-color);
351
+ }
352
+
353
+ .card {
354
+ --bs-card-bg: var(--gray-100);
355
+ --bs-card-border-color: var(--bs-border-color);
356
+ }
357
+
358
+ &:hover > .card,
359
+ .card:focus-within {
360
+ background-color: $white;
361
+ }
362
+ // active效果
363
+ &.active .card {
364
+ background-color: $white;
365
+ }
366
+ }
367
+ </style>
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <loading :loader='loader' :active="active" :color='colors' :background-color='backgroundColor' :opacity='opacity' />
3
+ </template>
4
+
5
+ <script>
6
+
7
+ // enum Data & Functions
8
+
9
+ // vue & bootstrap
10
+ import { ref } from 'vue'
11
+
12
+ // plugins
13
+ import Loading from 'vue-loading-overlay';
14
+
15
+ /** vue loading 預設樣式 */
16
+ const loadingOverlayOptions = {
17
+ loader: 'bars',
18
+ colors: '#647AF1',
19
+ backgroundColor: '#000',
20
+ opacity: 0.5,
21
+ }
22
+
23
+ // 用法說明
24
+ // 1. npm install vue-loading-overlay@^6.0
25
+ // 2. 在js或.vue中import >> import Loading from "本檔案位置"
26
+ // 3. 畫面中放上Component >> <Loading ref="loading"></Loading> ("loading" => 自定義REF名稱)
27
+ // 4. loading 初始化 >> const loading = ref(null); ("loading" => 自定義REF名稱)
28
+ // 5. 開啟loading >> loading.value.show() ("loading" => 自定義REF名稱)
29
+ // 6. 關閉loading >> loading.value.hide() ("loading" => 自定義REF名稱)
30
+
31
+
32
+
33
+ // vue components
34
+ export default {
35
+ props: {
36
+ loader: {
37
+ type: String,
38
+ default: loadingOverlayOptions.loader
39
+ },
40
+ colors: {
41
+ type: String,
42
+ default: loadingOverlayOptions.colors
43
+ },
44
+ backgroundColor: {
45
+ type: String,
46
+ default: loadingOverlayOptions.backgroundColor
47
+ },
48
+ opacity: {
49
+ type: Number,
50
+ default: loadingOverlayOptions.opacity
51
+ },
52
+ },
53
+ components: {
54
+ Loading
55
+ },
56
+ setup(props, { emit }) {
57
+ const active = ref(false)
58
+
59
+ function show() { // 顯示Loading
60
+ this.active = true;
61
+ }
62
+ function hide() { // 隱藏Loading
63
+ this.active = false;
64
+ }
65
+
66
+ return {
67
+ active,
68
+ show,
69
+ hide
70
+ }
71
+ }
72
+ }
73
+
74
+ </script>
75
+ <style lang="scss">
76
+ @import './style/css/vue-loading-overlay/index.css';
77
+ </style>