saby-customizer 0.0.4 → 0.0.6
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.
- package/features/git-branch.js +1 -1
- package/lib/context.js +4 -2
- package/material.js +16 -28
- package/package.json +1 -1
package/features/git-branch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { oom } from '@notml/core'
|
|
2
|
-
import {
|
|
2
|
+
import { toolbar, PopupDialog, getListOfOpenCards, snackbar, context, db } from 'saby-customizer/lib.js'
|
|
3
3
|
import { octicons } from 'saby-customizer/octicons.js'
|
|
4
4
|
|
|
5
5
|
|
package/lib/context.js
CHANGED
|
@@ -31,10 +31,12 @@ export const context = new Proxy(origin, {
|
|
|
31
31
|
async function userInfo(target, name) {
|
|
32
32
|
const result = (await sabyRPC.call({
|
|
33
33
|
service: 'auth',
|
|
34
|
-
method: '
|
|
34
|
+
method: 'SAP.CurrentUser'
|
|
35
35
|
})).getRow()
|
|
36
|
+
const userLogin = result.get('ЛогинПользователя') || ''
|
|
37
|
+
const userEMail = result.get('МылоПользователя') || ''
|
|
36
38
|
|
|
37
|
-
target.userLogin =
|
|
39
|
+
target.userLogin = (!(/^\d+$/).test(userLogin) ? userLogin : userEMail.split('@')[0]) || userLogin
|
|
38
40
|
|
|
39
41
|
return target[name]
|
|
40
42
|
}
|
package/material.js
CHANGED
|
@@ -1365,7 +1365,6 @@ var MDCDialogFoundation = (function (_super) {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
return MDCDialogFoundation;
|
|
1367
1367
|
}(MDCFoundation));
|
|
1368
|
-
var MDCDialogFoundation$1 = MDCDialogFoundation;
|
|
1369
1368
|
|
|
1370
1369
|
function applyPassive(globalObj) {
|
|
1371
1370
|
if (globalObj === void 0) { globalObj = window; }
|
|
@@ -3224,7 +3223,7 @@ class DialogBase extends BaseElement {
|
|
|
3224
3223
|
this.actionAttribute = 'dialogAction';
|
|
3225
3224
|
this.initialFocusAttribute = 'dialogInitialFocus';
|
|
3226
3225
|
this.initialSupressDefaultPressSelector = '';
|
|
3227
|
-
this.mdcFoundationClass = MDCDialogFoundation
|
|
3226
|
+
this.mdcFoundationClass = MDCDialogFoundation;
|
|
3228
3227
|
this.boundHandleClick = null;
|
|
3229
3228
|
this.boundHandleKeydown = null;
|
|
3230
3229
|
this.boundHandleDocumentKeydown = null;
|
|
@@ -4055,7 +4054,6 @@ var MDCRippleFoundation = (function (_super) {
|
|
|
4055
4054
|
};
|
|
4056
4055
|
return MDCRippleFoundation;
|
|
4057
4056
|
}(MDCFoundation));
|
|
4058
|
-
var MDCRippleFoundation$1 = MDCRippleFoundation;
|
|
4059
4057
|
|
|
4060
4058
|
const important = 'important';
|
|
4061
4059
|
const importantFlag = ' !' + important;
|
|
@@ -4145,7 +4143,7 @@ class RippleBase extends BaseElement {
|
|
|
4145
4143
|
this.translateEnd = '';
|
|
4146
4144
|
this.leftPos = '';
|
|
4147
4145
|
this.topPos = '';
|
|
4148
|
-
this.mdcFoundationClass = MDCRippleFoundation
|
|
4146
|
+
this.mdcFoundationClass = MDCRippleFoundation;
|
|
4149
4147
|
}
|
|
4150
4148
|
get isActive() {
|
|
4151
4149
|
return matches(this.parentElement || this, ':active');
|
|
@@ -4621,7 +4619,6 @@ var MDCFadingTabIndicatorFoundation = (function (_super) {
|
|
|
4621
4619
|
};
|
|
4622
4620
|
return MDCFadingTabIndicatorFoundation;
|
|
4623
4621
|
}(MDCTabIndicatorFoundation));
|
|
4624
|
-
var MDCFadingTabIndicatorFoundation$1 = MDCFadingTabIndicatorFoundation;
|
|
4625
4622
|
|
|
4626
4623
|
var MDCSlidingTabIndicatorFoundation = (function (_super) {
|
|
4627
4624
|
__extends(MDCSlidingTabIndicatorFoundation, _super);
|
|
@@ -4648,7 +4645,6 @@ var MDCSlidingTabIndicatorFoundation = (function (_super) {
|
|
|
4648
4645
|
};
|
|
4649
4646
|
return MDCSlidingTabIndicatorFoundation;
|
|
4650
4647
|
}(MDCTabIndicatorFoundation));
|
|
4651
|
-
var MDCSlidingTabIndicatorFoundation$1 = MDCSlidingTabIndicatorFoundation;
|
|
4652
4648
|
|
|
4653
4649
|
class TabIndicatorBase extends BaseElement {
|
|
4654
4650
|
constructor() {
|
|
@@ -4657,8 +4653,8 @@ class TabIndicatorBase extends BaseElement {
|
|
|
4657
4653
|
this.fade = false;
|
|
4658
4654
|
}
|
|
4659
4655
|
get mdcFoundationClass() {
|
|
4660
|
-
return this.fade ? MDCFadingTabIndicatorFoundation
|
|
4661
|
-
MDCSlidingTabIndicatorFoundation
|
|
4656
|
+
return this.fade ? MDCFadingTabIndicatorFoundation :
|
|
4657
|
+
MDCSlidingTabIndicatorFoundation;
|
|
4662
4658
|
}
|
|
4663
4659
|
render() {
|
|
4664
4660
|
const contentClasses = {
|
|
@@ -4808,13 +4804,12 @@ var MDCTabFoundation = (function (_super) {
|
|
|
4808
4804
|
};
|
|
4809
4805
|
return MDCTabFoundation;
|
|
4810
4806
|
}(MDCFoundation));
|
|
4811
|
-
var MDCTabFoundation$1 = MDCTabFoundation;
|
|
4812
4807
|
|
|
4813
4808
|
let tabIdCounter = 0;
|
|
4814
4809
|
class TabBase extends BaseElement {
|
|
4815
4810
|
constructor() {
|
|
4816
4811
|
super(...arguments);
|
|
4817
|
-
this.mdcFoundationClass = MDCTabFoundation
|
|
4812
|
+
this.mdcFoundationClass = MDCTabFoundation;
|
|
4818
4813
|
this.label = '';
|
|
4819
4814
|
this.icon = '';
|
|
4820
4815
|
this.hasImageIcon = false;
|
|
@@ -4903,7 +4898,7 @@ class TabBase extends BaseElement {
|
|
|
4903
4898
|
}, deactivateIndicator: async () => {
|
|
4904
4899
|
await this.tabIndicator.updateComplete;
|
|
4905
4900
|
this.tabIndicator.deactivate();
|
|
4906
|
-
}, notifyInteracted: () => this.dispatchEvent(new CustomEvent(MDCTabFoundation
|
|
4901
|
+
}, notifyInteracted: () => this.dispatchEvent(new CustomEvent(MDCTabFoundation.strings.INTERACTED_EVENT, {
|
|
4907
4902
|
detail: { tabId: this.id },
|
|
4908
4903
|
bubbles: true,
|
|
4909
4904
|
composed: true,
|
|
@@ -5420,12 +5415,11 @@ var MDCTabScrollerFoundation = (function (_super) {
|
|
|
5420
5415
|
};
|
|
5421
5416
|
return MDCTabScrollerFoundation;
|
|
5422
5417
|
}(MDCFoundation));
|
|
5423
|
-
var MDCTabScrollerFoundation$1 = MDCTabScrollerFoundation;
|
|
5424
5418
|
|
|
5425
5419
|
class TabScrollerBase extends BaseElement {
|
|
5426
5420
|
constructor() {
|
|
5427
5421
|
super(...arguments);
|
|
5428
|
-
this.mdcFoundationClass = MDCTabScrollerFoundation
|
|
5422
|
+
this.mdcFoundationClass = MDCTabScrollerFoundation;
|
|
5429
5423
|
this._scrollbarHeight = -1;
|
|
5430
5424
|
}
|
|
5431
5425
|
_handleInteraction() {
|
|
@@ -5765,12 +5759,11 @@ var MDCTabBarFoundation = (function (_super) {
|
|
|
5765
5759
|
};
|
|
5766
5760
|
return MDCTabBarFoundation;
|
|
5767
5761
|
}(MDCFoundation));
|
|
5768
|
-
var MDCTabBarFoundation$1 = MDCTabBarFoundation;
|
|
5769
5762
|
|
|
5770
5763
|
class TabBarBase extends BaseElement {
|
|
5771
5764
|
constructor() {
|
|
5772
5765
|
super(...arguments);
|
|
5773
|
-
this.mdcFoundationClass = MDCTabBarFoundation
|
|
5766
|
+
this.mdcFoundationClass = MDCTabBarFoundation;
|
|
5774
5767
|
this.activeIndex = 0;
|
|
5775
5768
|
this._previousActiveIndex = -1;
|
|
5776
5769
|
}
|
|
@@ -5857,7 +5850,7 @@ class TabBarBase extends BaseElement {
|
|
|
5857
5850
|
getTabListLength: () => this._getTabs().length,
|
|
5858
5851
|
notifyTabActivated: (index) => {
|
|
5859
5852
|
this.activeIndex = index;
|
|
5860
|
-
this.dispatchEvent(new CustomEvent(MDCTabBarFoundation
|
|
5853
|
+
this.dispatchEvent(new CustomEvent(MDCTabBarFoundation.strings.TAB_ACTIVATED_EVENT, { detail: { index }, bubbles: true, cancelable: true }));
|
|
5861
5854
|
},
|
|
5862
5855
|
};
|
|
5863
5856
|
}
|
|
@@ -7872,7 +7865,6 @@ var MDCMenuSurfaceFoundation = (function (_super) {
|
|
|
7872
7865
|
};
|
|
7873
7866
|
return MDCMenuSurfaceFoundation;
|
|
7874
7867
|
}(MDCFoundation));
|
|
7875
|
-
var MDCMenuSurfaceFoundation$1 = MDCMenuSurfaceFoundation;
|
|
7876
7868
|
|
|
7877
7869
|
const stringToCorner = {
|
|
7878
7870
|
'TOP_LEFT': Corner.TOP_LEFT,
|
|
@@ -7887,7 +7879,7 @@ const stringToCorner = {
|
|
|
7887
7879
|
class MenuSurfaceBase extends BaseElement {
|
|
7888
7880
|
constructor() {
|
|
7889
7881
|
super(...arguments);
|
|
7890
|
-
this.mdcFoundationClass = MDCMenuSurfaceFoundation
|
|
7882
|
+
this.mdcFoundationClass = MDCMenuSurfaceFoundation;
|
|
7891
7883
|
this.absolute = false;
|
|
7892
7884
|
this.fullwidth = false;
|
|
7893
7885
|
this.fixed = false;
|
|
@@ -8352,12 +8344,11 @@ var MDCMenuFoundation = (function (_super) {
|
|
|
8352
8344
|
};
|
|
8353
8345
|
return MDCMenuFoundation;
|
|
8354
8346
|
}(MDCFoundation));
|
|
8355
|
-
var MDCMenuFoundation$1 = MDCMenuFoundation;
|
|
8356
8347
|
|
|
8357
8348
|
class MenuBase extends BaseElement {
|
|
8358
8349
|
constructor() {
|
|
8359
8350
|
super(...arguments);
|
|
8360
|
-
this.mdcFoundationClass = MDCMenuFoundation
|
|
8351
|
+
this.mdcFoundationClass = MDCMenuFoundation;
|
|
8361
8352
|
this.listElement_ = null;
|
|
8362
8353
|
this.anchor = null;
|
|
8363
8354
|
this.open = false;
|
|
@@ -9635,7 +9626,6 @@ var MDCTextFieldFoundation = (function (_super) {
|
|
|
9635
9626
|
};
|
|
9636
9627
|
return MDCTextFieldFoundation;
|
|
9637
9628
|
}(MDCFoundation));
|
|
9638
|
-
var MDCTextFieldFoundation$1 = MDCTextFieldFoundation;
|
|
9639
9629
|
|
|
9640
9630
|
var _a, _b;
|
|
9641
9631
|
((_a = window.ShadyDOM) === null || _a === void 0 ? void 0 : _a.inUse) &&
|
|
@@ -9700,7 +9690,7 @@ const createValidityObj = (customValidity = {}) => {
|
|
|
9700
9690
|
class TextFieldBase extends FormElement {
|
|
9701
9691
|
constructor() {
|
|
9702
9692
|
super(...arguments);
|
|
9703
|
-
this.mdcFoundationClass = MDCTextFieldFoundation
|
|
9693
|
+
this.mdcFoundationClass = MDCTextFieldFoundation;
|
|
9704
9694
|
this.value = '';
|
|
9705
9695
|
this.type = 'text';
|
|
9706
9696
|
this.placeholder = '';
|
|
@@ -10496,7 +10486,6 @@ var MDCTopAppBarFoundation = (function (_super) {
|
|
|
10496
10486
|
};
|
|
10497
10487
|
return MDCTopAppBarFoundation;
|
|
10498
10488
|
}(MDCTopAppBarBaseFoundation));
|
|
10499
|
-
var MDCTopAppBarFoundation$1 = MDCTopAppBarFoundation;
|
|
10500
10489
|
|
|
10501
10490
|
const passiveEventOptionsIfSupported = supportsPassiveEventListener ? { passive: true } : undefined;
|
|
10502
10491
|
class TopAppBarBaseBase extends BaseElement {
|
|
@@ -10598,7 +10587,7 @@ __decorate([
|
|
|
10598
10587
|
class TopAppBarBase extends TopAppBarBaseBase {
|
|
10599
10588
|
constructor() {
|
|
10600
10589
|
super(...arguments);
|
|
10601
|
-
this.mdcFoundationClass = MDCTopAppBarFoundation
|
|
10590
|
+
this.mdcFoundationClass = MDCTopAppBarFoundation;
|
|
10602
10591
|
this.prominent = false;
|
|
10603
10592
|
this.dense = false;
|
|
10604
10593
|
this.handleResize = () => {
|
|
@@ -10830,7 +10819,6 @@ var MDCSnackbarFoundation = (function (_super) {
|
|
|
10830
10819
|
};
|
|
10831
10820
|
return MDCSnackbarFoundation;
|
|
10832
10821
|
}(MDCFoundation));
|
|
10833
|
-
var MDCSnackbarFoundation$1 = MDCSnackbarFoundation;
|
|
10834
10822
|
|
|
10835
10823
|
const notifyChildrenConnectedChanged = (parent, isConnected) => {
|
|
10836
10824
|
var _a, _b;
|
|
@@ -10951,7 +10939,7 @@ class AsyncDirective extends Directive {
|
|
|
10951
10939
|
reconnected() { }
|
|
10952
10940
|
}
|
|
10953
10941
|
|
|
10954
|
-
const { ARIA_LIVE_DELAY_MS } = MDCSnackbarFoundation
|
|
10942
|
+
const { ARIA_LIVE_DELAY_MS } = MDCSnackbarFoundation.numbers;
|
|
10955
10943
|
class AccessibleSnackbarLabel extends AsyncDirective {
|
|
10956
10944
|
constructor(partInfo) {
|
|
10957
10945
|
super(partInfo);
|
|
@@ -11009,11 +10997,11 @@ class AccessibleSnackbarLabel extends AsyncDirective {
|
|
|
11009
10997
|
}
|
|
11010
10998
|
const accessibleSnackbarLabel = directive(AccessibleSnackbarLabel);
|
|
11011
10999
|
|
|
11012
|
-
const { OPENING_EVENT, OPENED_EVENT, CLOSING_EVENT, CLOSED_EVENT, } = MDCSnackbarFoundation
|
|
11000
|
+
const { OPENING_EVENT, OPENED_EVENT, CLOSING_EVENT, CLOSED_EVENT, } = MDCSnackbarFoundation.strings;
|
|
11013
11001
|
class SnackbarBase extends BaseElement {
|
|
11014
11002
|
constructor() {
|
|
11015
11003
|
super(...arguments);
|
|
11016
|
-
this.mdcFoundationClass = MDCSnackbarFoundation
|
|
11004
|
+
this.mdcFoundationClass = MDCSnackbarFoundation;
|
|
11017
11005
|
this.open = false;
|
|
11018
11006
|
this.timeoutMs = 5000;
|
|
11019
11007
|
this.closeOnEscape = false;
|