@pallasoft/ps-mobile-components 1.1.0 → 1.3.0
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/dist/components/ps-action-menu/ps-action-menu-avatar-entry.d.ts +5 -0
- package/dist/components/ps-action-menu/ps-action-menu-avatar-entry.js +16 -0
- package/dist/components/ps-action-menu/ps-action-menu-entries.js +4 -2
- package/dist/components/ps-action-menu/ps-action-menu-labelled.d.ts +2 -1
- package/dist/components/ps-action-menu/ps-action-menu-labelled.js +2 -2
- package/dist/components/ps-action-menu/ps-action-menu.android.js +1 -1
- package/dist/components/ps-action-menu/ps-action-menu.ios.js +10 -1
- package/dist/components/ps-action-menu/ps-menu-tile-canvas.d.ts +6 -0
- package/dist/components/ps-action-menu/ps-menu-tile-canvas.js +5 -0
- package/dist/components/ps-action-menu/ps-menu-tile-drawing.d.ts +6 -0
- package/dist/components/ps-action-menu/ps-menu-tile-drawing.js +34 -0
- package/dist/components/ps-app-lock-screen/index.d.ts +2 -0
- package/dist/components/ps-app-lock-screen/index.js +2 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen-props.d.ts +9 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen-props.js +1 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen.d.ts +2 -0
- package/dist/components/ps-app-lock-screen/ps-app-lock-screen.js +19 -0
- package/dist/components/ps-chip/ps-chip.js +1 -1
- package/dist/components/ps-count-badge/index.d.ts +2 -0
- package/dist/components/ps-count-badge/index.js +2 -0
- package/dist/components/ps-count-badge/ps-count-badge-props.d.ts +5 -0
- package/dist/components/ps-count-badge/ps-count-badge-props.js +1 -0
- package/dist/components/ps-count-badge/ps-count-badge.d.ts +2 -0
- package/dist/components/ps-count-badge/ps-count-badge.js +25 -0
- package/dist/components/ps-form-sheet/ps-form-sheet-props.d.ts +2 -0
- package/dist/components/ps-form-sheet/ps-form-sheet.d.ts +1 -1
- package/dist/components/ps-form-sheet/ps-form-sheet.js +17 -7
- package/dist/components/ps-list/index.d.ts +2 -0
- package/dist/components/ps-list/index.js +2 -0
- package/dist/components/ps-list/ps-list-context-menu.js +1 -1
- package/dist/components/ps-list/ps-list-link-menu-entry.d.ts +5 -0
- package/dist/components/ps-list/ps-list-link-menu-entry.js +11 -0
- package/dist/components/ps-list/ps-list-link-menu.d.ts +10 -0
- package/dist/components/ps-list/ps-list-link-menu.js +16 -0
- package/dist/components/ps-list/ps-list-link-row-props.d.ts +11 -0
- package/dist/components/ps-list/ps-list-link-row-props.js +1 -0
- package/dist/components/ps-list/ps-list-link-row-skeleton.d.ts +1 -0
- package/dist/components/ps-list/ps-list-link-row-skeleton.js +14 -0
- package/dist/components/ps-list/ps-list-link-row.d.ts +2 -0
- package/dist/components/ps-list/ps-list-link-row.js +40 -0
- package/dist/components/ps-list/ps-list-props.d.ts +3 -1
- package/dist/components/ps-list/ps-list-row-body.js +2 -4
- package/dist/components/ps-list/ps-list-row.d.ts +1 -1
- package/dist/components/ps-list/ps-list-row.js +3 -2
- package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider-props.d.ts +4 -2
- package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider.d.ts +1 -1
- package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider.js +20 -10
- package/dist/components/ps-native-menu/ps-native-menu.android.js +1 -1
- package/dist/components/ps-option-picker/index.d.ts +2 -0
- package/dist/components/ps-option-picker/index.js +2 -0
- package/dist/components/ps-option-picker/ps-option-picker-props.d.ts +16 -0
- package/dist/components/ps-option-picker/ps-option-picker-props.js +1 -0
- package/dist/components/ps-option-picker/ps-option-picker.d.ts +2 -0
- package/dist/components/ps-option-picker/ps-option-picker.js +33 -0
- package/dist/components/ps-privacy-cover/index.d.ts +2 -0
- package/dist/components/ps-privacy-cover/index.js +2 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover-props.d.ts +4 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover-props.js +1 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover.d.ts +2 -0
- package/dist/components/ps-privacy-cover/ps-privacy-cover.js +17 -0
- package/dist/components/ps-search-select-field/index.d.ts +2 -0
- package/dist/components/ps-search-select-field/index.js +2 -0
- package/dist/components/ps-search-select-field/ps-search-select-field-props.d.ts +10 -0
- package/dist/components/ps-search-select-field/ps-search-select-field-props.js +1 -0
- package/dist/components/ps-search-select-field/ps-search-select-field.d.ts +2 -0
- package/dist/components/ps-search-select-field/ps-search-select-field.js +15 -0
- package/dist/components/ps-selection-mode/index.d.ts +2 -0
- package/dist/components/ps-selection-mode/index.js +2 -0
- package/dist/components/ps-selection-mode/ps-selection-mode-props.d.ts +13 -0
- package/dist/components/ps-selection-mode/ps-selection-mode-props.js +1 -0
- package/dist/components/ps-selection-mode/ps-selection-mode.d.ts +2 -0
- package/dist/components/ps-selection-mode/ps-selection-mode.js +28 -0
- package/dist/components/ps-sheet/ps-sheet-props.d.ts +4 -1
- package/dist/components/ps-sheet/ps-sheet.d.ts +1 -1
- package/dist/components/ps-sheet/ps-sheet.js +4 -5
- package/dist/components/ps-sheet-header/ps-sheet-header-props.d.ts +2 -0
- package/dist/components/ps-sheet-header/ps-sheet-header.d.ts +1 -1
- package/dist/components/ps-sheet-header/ps-sheet-header.js +2 -2
- package/dist/components/ps-sheet-page/ps-sheet-page-view.d.ts +8 -0
- package/dist/components/ps-sheet-page/ps-sheet-page-view.js +11 -0
- package/dist/components/ps-sheet-presenter/ps-sheet-presenter.ios.js +9 -2
- package/dist/components/ps-tab-bar-provider/index.d.ts +2 -0
- package/dist/components/ps-tab-bar-provider/index.js +2 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider-props.d.ts +4 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider-props.js +1 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider.d.ts +2 -0
- package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider.js +8 -0
- package/dist/components/ps-tabs/ps-tabs.js +1 -1
- package/dist/components/ps-text-link/ps-text-link.js +1 -1
- package/dist/constants/ps-app-lock-config.d.ts +13 -0
- package/dist/constants/ps-app-lock-config.js +13 -0
- package/dist/constants/ps-app-lock-native-codes.d.ts +10 -0
- package/dist/constants/ps-app-lock-native-codes.js +10 -0
- package/dist/constants/ps-biometry-kind.d.ts +7 -0
- package/dist/constants/ps-biometry-kind.js +6 -0
- package/dist/constants/ps-count-badge-config.d.ts +6 -0
- package/dist/constants/ps-count-badge-config.js +6 -0
- package/dist/constants/ps-layout-config.d.ts +4 -0
- package/dist/constants/ps-layout-config.js +4 -0
- package/dist/constants/ps-list-config.d.ts +2 -0
- package/dist/constants/ps-list-config.js +2 -0
- package/dist/constants/ps-menu-tile-config.d.ts +9 -0
- package/dist/constants/ps-menu-tile-config.js +9 -0
- package/dist/constants/ps-mobile-control-config.d.ts +0 -12
- package/dist/constants/ps-mobile-control-config.js +0 -6
- package/dist/constants/ps-option-picker-config.d.ts +6 -0
- package/dist/constants/ps-option-picker-config.js +6 -0
- package/dist/constants/ps-sf-symbol-config.d.ts +92 -0
- package/dist/constants/ps-sf-symbol-config.js +92 -0
- package/dist/constants/ps-sheet-page-config.d.ts +4 -0
- package/dist/constants/ps-sheet-page-config.js +4 -0
- package/dist/contexts/ps-tab-bar-context.d.ts +2 -0
- package/dist/contexts/ps-tab-bar-context.js +5 -0
- package/dist/hooks/use-ps-app-lock.d.ts +3 -0
- package/dist/hooks/use-ps-app-lock.js +72 -0
- package/dist/hooks/use-ps-menu-tiles.d.ts +4 -0
- package/dist/hooks/use-ps-menu-tiles.js +8 -0
- package/dist/hooks/use-ps-tab-bar.d.ts +2 -0
- package/dist/hooks/use-ps-tab-bar.js +3 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/interfaces/ps-action-menu-header.d.ts +1 -0
- package/dist/interfaces/ps-app-lock-native.d.ts +13 -0
- package/dist/interfaces/ps-app-lock-native.js +1 -0
- package/dist/interfaces/ps-app-lock-prompt.d.ts +4 -0
- package/dist/interfaces/ps-app-lock-prompt.js +1 -0
- package/dist/interfaces/ps-menu-item.d.ts +2 -0
- package/dist/interfaces/ps-menu-tile-request.d.ts +7 -0
- package/dist/interfaces/ps-menu-tile-request.js +1 -0
- package/dist/interfaces/ps-menu-tile-shape.d.ts +1 -0
- package/dist/interfaces/ps-menu-tile-shape.js +1 -0
- package/dist/interfaces/ps-mobile-brand-colors.d.ts +5 -0
- package/dist/interfaces/ps-mobile-brand-colors.js +1 -0
- package/dist/interfaces/ps-mobile-brand-input.d.ts +7 -0
- package/dist/interfaces/ps-mobile-brand-input.js +1 -0
- package/dist/interfaces/ps-mobile-theme-input.d.ts +1 -1
- package/dist/interfaces/ps-mobile-theme.d.ts +32 -0
- package/dist/interfaces/ps-sheet-leading-kind.d.ts +1 -0
- package/dist/interfaces/ps-sheet-leading-kind.js +1 -0
- package/dist/interfaces/ps-sheet-page.d.ts +8 -0
- package/dist/interfaces/ps-sheet-page.js +1 -0
- package/dist/interfaces/ps-tab-bar-context-data.d.ts +4 -0
- package/dist/interfaces/ps-tab-bar-context-data.js +1 -0
- package/dist/interfaces/use-ps-app-lock-options.d.ts +6 -0
- package/dist/interfaces/use-ps-app-lock-options.js +1 -0
- package/dist/interfaces/use-ps-app-lock-result.d.ts +7 -0
- package/dist/interfaces/use-ps-app-lock-result.js +1 -0
- package/dist/services/ps-action-menu-service.d.ts +4 -0
- package/dist/services/ps-action-menu-service.js +25 -2
- package/dist/services/ps-app-lock-grace-service.d.ts +6 -0
- package/dist/services/ps-app-lock-grace-service.js +17 -0
- package/dist/services/ps-app-lock-service.d.ts +10 -0
- package/dist/services/ps-app-lock-service.js +84 -0
- package/dist/services/ps-badge-tone-service.js +3 -3
- package/dist/services/ps-button-style-service.js +2 -2
- package/dist/services/ps-context-menu-service.d.ts +1 -0
- package/dist/services/ps-context-menu-service.js +13 -0
- package/dist/services/ps-count-badge-service.d.ts +3 -0
- package/dist/services/ps-count-badge-service.js +6 -0
- package/dist/services/ps-list-row-style-service.d.ts +4 -0
- package/dist/services/ps-list-row-style-service.js +11 -0
- package/dist/services/ps-menu-tile-service.d.ts +16 -0
- package/dist/services/ps-menu-tile-service.js +70 -0
- package/dist/services/ps-menu-tile-style-service.d.ts +4 -0
- package/dist/services/ps-menu-tile-style-service.js +5 -0
- package/dist/services/ps-mobile-brand-service.d.ts +5 -0
- package/dist/services/ps-mobile-brand-service.js +24 -0
- package/dist/services/ps-mobile-theme-service.d.ts +0 -2
- package/dist/services/ps-mobile-theme-service.js +64 -94
- package/dist/services/ps-option-picker-service.d.ts +8 -0
- package/dist/services/ps-option-picker-service.js +10 -0
- package/dist/services/ps-selection-service.d.ts +5 -0
- package/dist/services/ps-selection-service.js +13 -0
- package/dist/services/ps-sheet-service.d.ts +5 -0
- package/dist/services/ps-sheet-service.js +11 -0
- package/dist/services/ps-text-service.js +4 -4
- package/jest-setup.js +71 -0
- package/package.json +14 -2
|
@@ -26,8 +26,6 @@ export declare const PsMobileControlConfig: {
|
|
|
26
26
|
readonly iconSizeInline: PallasoftControlMetric.IconInline;
|
|
27
27
|
readonly iconSizeStandalone: PallasoftControlMetric.IconStandalone;
|
|
28
28
|
readonly neutralAlpha: 0.08;
|
|
29
|
-
readonly overlayAlpha: 0.4;
|
|
30
|
-
readonly overlayAlphaDark: 0.7;
|
|
31
29
|
readonly pillRadius: 999;
|
|
32
30
|
readonly pressedAlpha: 0.06;
|
|
33
31
|
readonly pressedBorderAlpha: 0.4;
|
|
@@ -37,19 +35,9 @@ export declare const PsMobileControlConfig: {
|
|
|
37
35
|
readonly ringWidth: 2;
|
|
38
36
|
readonly rowSpacing: 12;
|
|
39
37
|
readonly skeletonAlpha: 0.1;
|
|
40
|
-
readonly skeletonBaseAlpha: {
|
|
41
|
-
readonly dark: 0.05;
|
|
42
|
-
readonly light: 0.08;
|
|
43
|
-
};
|
|
44
38
|
readonly skeletonLineHeight: 12;
|
|
45
39
|
readonly skeletonListCount: 5;
|
|
46
|
-
readonly skeletonSweepAlpha: {
|
|
47
|
-
readonly dark: 0.08;
|
|
48
|
-
readonly light: 0.14;
|
|
49
|
-
};
|
|
50
40
|
readonly skeletonSweepMs: 1400;
|
|
51
41
|
readonly skeletonTextLines: 3;
|
|
52
|
-
readonly softAlphaDark: 0.2;
|
|
53
|
-
readonly softAlphaLight: 0.16;
|
|
54
42
|
readonly spinnerSize: 18;
|
|
55
43
|
};
|
|
@@ -22,8 +22,6 @@ export const PsMobileControlConfig = {
|
|
|
22
22
|
iconSizeInline: PallasoftControlMetric.IconInline,
|
|
23
23
|
iconSizeStandalone: PallasoftControlMetric.IconStandalone,
|
|
24
24
|
neutralAlpha: 0.08,
|
|
25
|
-
overlayAlpha: 0.4,
|
|
26
|
-
overlayAlphaDark: 0.7,
|
|
27
25
|
pillRadius: 999,
|
|
28
26
|
pressedAlpha: 0.06,
|
|
29
27
|
pressedBorderAlpha: 0.4,
|
|
@@ -33,13 +31,9 @@ export const PsMobileControlConfig = {
|
|
|
33
31
|
ringWidth: 2,
|
|
34
32
|
rowSpacing: 12,
|
|
35
33
|
skeletonAlpha: 0.1,
|
|
36
|
-
skeletonBaseAlpha: { dark: 0.05, light: 0.08 },
|
|
37
34
|
skeletonLineHeight: 12,
|
|
38
35
|
skeletonListCount: 5,
|
|
39
|
-
skeletonSweepAlpha: { dark: 0.08, light: 0.14 },
|
|
40
36
|
skeletonSweepMs: 1400,
|
|
41
37
|
skeletonTextLines: 3,
|
|
42
|
-
softAlphaDark: 0.2,
|
|
43
|
-
softAlphaLight: 0.16,
|
|
44
38
|
spinnerSize: 18,
|
|
45
39
|
};
|
|
@@ -1,35 +1,127 @@
|
|
|
1
1
|
export declare const PsSfSymbolConfig: {
|
|
2
2
|
readonly symbols: {
|
|
3
|
+
arrow: "arrow.right";
|
|
4
|
+
audio: "waveform";
|
|
3
5
|
bank: "building.columns";
|
|
4
6
|
bell: "bell";
|
|
7
|
+
book: "book";
|
|
5
8
|
calendar: "calendar";
|
|
6
9
|
camera: "camera";
|
|
10
|
+
'camera-off': "camera.badge.ellipsis";
|
|
11
|
+
chart: "chart.bar";
|
|
12
|
+
chat: "bubble.left";
|
|
7
13
|
check: "checkmark";
|
|
14
|
+
chevron: "chevron.down";
|
|
15
|
+
'chevron-right': "chevron.right";
|
|
16
|
+
clipboard: "list.clipboard";
|
|
8
17
|
clock: "clock";
|
|
9
18
|
close: "xmark";
|
|
19
|
+
columns: "rectangle.split.3x1";
|
|
20
|
+
'credit-card': "creditcard";
|
|
21
|
+
crop: "crop";
|
|
10
22
|
doc: "doc.text";
|
|
11
23
|
download: "arrow.down.circle";
|
|
24
|
+
expand: "arrow.up.left.and.arrow.down.right";
|
|
12
25
|
eye: "eye";
|
|
26
|
+
'eye-off': "eye.slash";
|
|
13
27
|
file: "doc";
|
|
28
|
+
filter: "line.3.horizontal.decrease";
|
|
29
|
+
flash: "bolt";
|
|
14
30
|
forward: "arrowshape.turn.up.right";
|
|
31
|
+
globe: "globe";
|
|
32
|
+
help: "questionmark.circle";
|
|
15
33
|
home: "house";
|
|
16
34
|
image: "photo";
|
|
35
|
+
inbox: "tray";
|
|
17
36
|
invoice: "doc.plaintext";
|
|
37
|
+
layers: "square.stack.3d.up";
|
|
38
|
+
lifebuoy: "lifepreserver";
|
|
39
|
+
lightbulb: "lightbulb";
|
|
40
|
+
linkedin: "link";
|
|
41
|
+
location: "mappin.and.ellipse";
|
|
18
42
|
mail: "envelope";
|
|
43
|
+
menu: "line.3.horizontal";
|
|
44
|
+
minus: "minus.circle";
|
|
45
|
+
moon: "moon";
|
|
19
46
|
more: "ellipsis";
|
|
47
|
+
palette: "paintpalette";
|
|
48
|
+
pallabuzz: "app";
|
|
49
|
+
pallaforge: "app";
|
|
50
|
+
pause: "pause";
|
|
51
|
+
payroll: "person.2";
|
|
20
52
|
pencil: "pencil";
|
|
53
|
+
play: "play";
|
|
21
54
|
plus: "plus";
|
|
22
55
|
receipt: "scroll";
|
|
23
56
|
refresh: "arrow.clockwise";
|
|
24
57
|
reports: "chart.bar";
|
|
58
|
+
rewind: "backward";
|
|
59
|
+
rotate: "rotate.right";
|
|
60
|
+
scale: "scalemass";
|
|
25
61
|
scan: "doc.viewfinder";
|
|
62
|
+
search: "magnifyingglass";
|
|
26
63
|
settings: "gearshape";
|
|
27
64
|
share: "square.and.arrow.up";
|
|
65
|
+
sheet: "tablecells";
|
|
66
|
+
shield: "shield";
|
|
28
67
|
'sign-out': "rectangle.portrait.and.arrow.right";
|
|
68
|
+
smile: "face.smiling";
|
|
69
|
+
sort: "arrow.up.arrow.down";
|
|
70
|
+
'sort-ascending': "arrow.up";
|
|
71
|
+
'sort-descending': "arrow.down";
|
|
72
|
+
spark: "sparkles";
|
|
73
|
+
star: "star";
|
|
74
|
+
sun: "sun.max";
|
|
29
75
|
swap: "arrow.left.arrow.right";
|
|
76
|
+
tax: "percent";
|
|
77
|
+
text: "text.alignleft";
|
|
30
78
|
trash: "trash";
|
|
31
79
|
upload: "square.and.arrow.up";
|
|
32
80
|
user: "person.crop.circle";
|
|
81
|
+
video: "video";
|
|
82
|
+
wallet: "wallet.bifold";
|
|
83
|
+
warning: "exclamationmark.triangle";
|
|
84
|
+
x: "xmark";
|
|
85
|
+
'zoom-in': "plus.magnifyingglass";
|
|
86
|
+
'zoom-out': "minus.magnifyingglass";
|
|
87
|
+
};
|
|
88
|
+
readonly monograms: {
|
|
89
|
+
'0': "0.circle.fill";
|
|
90
|
+
'1': "1.circle.fill";
|
|
91
|
+
'2': "2.circle.fill";
|
|
92
|
+
'3': "3.circle.fill";
|
|
93
|
+
'4': "4.circle.fill";
|
|
94
|
+
'5': "5.circle.fill";
|
|
95
|
+
'6': "6.circle.fill";
|
|
96
|
+
'7': "7.circle.fill";
|
|
97
|
+
'8': "8.circle.fill";
|
|
98
|
+
'9': "9.circle.fill";
|
|
99
|
+
a: "a.circle.fill";
|
|
100
|
+
b: "b.circle.fill";
|
|
101
|
+
c: "c.circle.fill";
|
|
102
|
+
d: "d.circle.fill";
|
|
103
|
+
e: "e.circle.fill";
|
|
104
|
+
f: "f.circle.fill";
|
|
105
|
+
g: "g.circle.fill";
|
|
106
|
+
h: "h.circle.fill";
|
|
107
|
+
i: "i.circle.fill";
|
|
108
|
+
j: "j.circle.fill";
|
|
109
|
+
k: "k.circle.fill";
|
|
110
|
+
l: "l.circle.fill";
|
|
111
|
+
m: "m.circle.fill";
|
|
112
|
+
n: "n.circle.fill";
|
|
113
|
+
o: "o.circle.fill";
|
|
114
|
+
p: "p.circle.fill";
|
|
115
|
+
q: "q.circle.fill";
|
|
116
|
+
r: "r.circle.fill";
|
|
117
|
+
s: "s.circle.fill";
|
|
118
|
+
t: "t.circle.fill";
|
|
119
|
+
u: "u.circle.fill";
|
|
120
|
+
v: "v.circle.fill";
|
|
121
|
+
w: "w.circle.fill";
|
|
122
|
+
x: "x.circle.fill";
|
|
123
|
+
y: "y.circle.fill";
|
|
124
|
+
z: "z.circle.fill";
|
|
33
125
|
};
|
|
34
126
|
readonly checkedSymbol: "checkmark";
|
|
35
127
|
readonly headerSymbol: "person.crop.circle.fill";
|
|
@@ -1,35 +1,127 @@
|
|
|
1
1
|
export const PsSfSymbolConfig = {
|
|
2
2
|
symbols: {
|
|
3
|
+
'arrow': 'arrow.right',
|
|
4
|
+
'audio': 'waveform',
|
|
3
5
|
'bank': 'building.columns',
|
|
4
6
|
'bell': 'bell',
|
|
7
|
+
'book': 'book',
|
|
5
8
|
'calendar': 'calendar',
|
|
6
9
|
'camera': 'camera',
|
|
10
|
+
'camera-off': 'camera.badge.ellipsis',
|
|
11
|
+
'chart': 'chart.bar',
|
|
12
|
+
'chat': 'bubble.left',
|
|
7
13
|
'check': 'checkmark',
|
|
14
|
+
'chevron': 'chevron.down',
|
|
15
|
+
'chevron-right': 'chevron.right',
|
|
16
|
+
'clipboard': 'list.clipboard',
|
|
8
17
|
'clock': 'clock',
|
|
9
18
|
'close': 'xmark',
|
|
19
|
+
'columns': 'rectangle.split.3x1',
|
|
20
|
+
'credit-card': 'creditcard',
|
|
21
|
+
'crop': 'crop',
|
|
10
22
|
'doc': 'doc.text',
|
|
11
23
|
'download': 'arrow.down.circle',
|
|
24
|
+
'expand': 'arrow.up.left.and.arrow.down.right',
|
|
12
25
|
'eye': 'eye',
|
|
26
|
+
'eye-off': 'eye.slash',
|
|
13
27
|
'file': 'doc',
|
|
28
|
+
'filter': 'line.3.horizontal.decrease',
|
|
29
|
+
'flash': 'bolt',
|
|
14
30
|
'forward': 'arrowshape.turn.up.right',
|
|
31
|
+
'globe': 'globe',
|
|
32
|
+
'help': 'questionmark.circle',
|
|
15
33
|
'home': 'house',
|
|
16
34
|
'image': 'photo',
|
|
35
|
+
'inbox': 'tray',
|
|
17
36
|
'invoice': 'doc.plaintext',
|
|
37
|
+
'layers': 'square.stack.3d.up',
|
|
38
|
+
'lifebuoy': 'lifepreserver',
|
|
39
|
+
'lightbulb': 'lightbulb',
|
|
40
|
+
'linkedin': 'link',
|
|
41
|
+
'location': 'mappin.and.ellipse',
|
|
18
42
|
'mail': 'envelope',
|
|
43
|
+
'menu': 'line.3.horizontal',
|
|
44
|
+
'minus': 'minus.circle',
|
|
45
|
+
'moon': 'moon',
|
|
19
46
|
'more': 'ellipsis',
|
|
47
|
+
'palette': 'paintpalette',
|
|
48
|
+
'pallabuzz': 'app',
|
|
49
|
+
'pallaforge': 'app',
|
|
50
|
+
'pause': 'pause',
|
|
51
|
+
'payroll': 'person.2',
|
|
20
52
|
'pencil': 'pencil',
|
|
53
|
+
'play': 'play',
|
|
21
54
|
'plus': 'plus',
|
|
22
55
|
'receipt': 'scroll',
|
|
23
56
|
'refresh': 'arrow.clockwise',
|
|
24
57
|
'reports': 'chart.bar',
|
|
58
|
+
'rewind': 'backward',
|
|
59
|
+
'rotate': 'rotate.right',
|
|
60
|
+
'scale': 'scalemass',
|
|
25
61
|
'scan': 'doc.viewfinder',
|
|
62
|
+
'search': 'magnifyingglass',
|
|
26
63
|
'settings': 'gearshape',
|
|
27
64
|
'share': 'square.and.arrow.up',
|
|
65
|
+
'sheet': 'tablecells',
|
|
66
|
+
'shield': 'shield',
|
|
28
67
|
'sign-out': 'rectangle.portrait.and.arrow.right',
|
|
68
|
+
'smile': 'face.smiling',
|
|
69
|
+
'sort': 'arrow.up.arrow.down',
|
|
70
|
+
'sort-ascending': 'arrow.up',
|
|
71
|
+
'sort-descending': 'arrow.down',
|
|
72
|
+
'spark': 'sparkles',
|
|
73
|
+
'star': 'star',
|
|
74
|
+
'sun': 'sun.max',
|
|
29
75
|
'swap': 'arrow.left.arrow.right',
|
|
76
|
+
'tax': 'percent',
|
|
77
|
+
'text': 'text.alignleft',
|
|
30
78
|
'trash': 'trash',
|
|
31
79
|
'upload': 'square.and.arrow.up',
|
|
32
80
|
'user': 'person.crop.circle',
|
|
81
|
+
'video': 'video',
|
|
82
|
+
'wallet': 'wallet.bifold',
|
|
83
|
+
'warning': 'exclamationmark.triangle',
|
|
84
|
+
'x': 'xmark',
|
|
85
|
+
'zoom-in': 'plus.magnifyingglass',
|
|
86
|
+
'zoom-out': 'minus.magnifyingglass',
|
|
87
|
+
},
|
|
88
|
+
monograms: {
|
|
89
|
+
'0': '0.circle.fill',
|
|
90
|
+
'1': '1.circle.fill',
|
|
91
|
+
'2': '2.circle.fill',
|
|
92
|
+
'3': '3.circle.fill',
|
|
93
|
+
'4': '4.circle.fill',
|
|
94
|
+
'5': '5.circle.fill',
|
|
95
|
+
'6': '6.circle.fill',
|
|
96
|
+
'7': '7.circle.fill',
|
|
97
|
+
'8': '8.circle.fill',
|
|
98
|
+
'9': '9.circle.fill',
|
|
99
|
+
'a': 'a.circle.fill',
|
|
100
|
+
'b': 'b.circle.fill',
|
|
101
|
+
'c': 'c.circle.fill',
|
|
102
|
+
'd': 'd.circle.fill',
|
|
103
|
+
'e': 'e.circle.fill',
|
|
104
|
+
'f': 'f.circle.fill',
|
|
105
|
+
'g': 'g.circle.fill',
|
|
106
|
+
'h': 'h.circle.fill',
|
|
107
|
+
'i': 'i.circle.fill',
|
|
108
|
+
'j': 'j.circle.fill',
|
|
109
|
+
'k': 'k.circle.fill',
|
|
110
|
+
'l': 'l.circle.fill',
|
|
111
|
+
'm': 'm.circle.fill',
|
|
112
|
+
'n': 'n.circle.fill',
|
|
113
|
+
'o': 'o.circle.fill',
|
|
114
|
+
'p': 'p.circle.fill',
|
|
115
|
+
'q': 'q.circle.fill',
|
|
116
|
+
'r': 'r.circle.fill',
|
|
117
|
+
's': 's.circle.fill',
|
|
118
|
+
't': 't.circle.fill',
|
|
119
|
+
'u': 'u.circle.fill',
|
|
120
|
+
'v': 'v.circle.fill',
|
|
121
|
+
'w': 'w.circle.fill',
|
|
122
|
+
'x': 'x.circle.fill',
|
|
123
|
+
'y': 'y.circle.fill',
|
|
124
|
+
'z': 'z.circle.fill',
|
|
33
125
|
},
|
|
34
126
|
checkedSymbol: 'checkmark',
|
|
35
127
|
headerSymbol: 'person.crop.circle.fill',
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { UsePsAppLockOptions } from '../interfaces/use-ps-app-lock-options';
|
|
2
|
+
import type { UsePsAppLockResult } from '../interfaces/use-ps-app-lock-result';
|
|
3
|
+
export declare const usePsAppLock: ({ graceSeconds, isEnabled, prompt, }: UsePsAppLockOptions) => UsePsAppLockResult;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Common } from '@pallasoft/ps-utilities';
|
|
3
|
+
import { AppState } from 'react-native';
|
|
4
|
+
import { PsAppLockConfig } from '../constants/ps-app-lock-config';
|
|
5
|
+
import { PsAppLockGraceService } from '../services/ps-app-lock-grace-service';
|
|
6
|
+
import { PsAppLockService } from '../services/ps-app-lock-service';
|
|
7
|
+
import { usePsHaptics } from './use-ps-haptics';
|
|
8
|
+
export const usePsAppLock = ({ graceSeconds = PsAppLockConfig.defaultGraceSeconds, isEnabled, prompt, }) => {
|
|
9
|
+
const haptics = usePsHaptics();
|
|
10
|
+
const [isHeld, setIsHeld] = useState(false);
|
|
11
|
+
const [isUnlocking, setIsUnlocking] = useState(false);
|
|
12
|
+
const [appState, setAppState] = useState(PsAppLockConfig.activeState);
|
|
13
|
+
const backgroundedAt = useRef(null);
|
|
14
|
+
const isUnlockingRef = useRef(false);
|
|
15
|
+
const latest = useRef({ haptics, prompt });
|
|
16
|
+
const isLocked = isEnabled && isHeld;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
latest.current = { haptics, prompt };
|
|
19
|
+
});
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!isEnabled)
|
|
22
|
+
setIsHeld(false);
|
|
23
|
+
}, [isEnabled]);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const subscription = AppState.addEventListener('change', (next) => {
|
|
26
|
+
if (PsAppLockService.isBusy())
|
|
27
|
+
return;
|
|
28
|
+
const now = Common.DateService.nowUnixSeconds();
|
|
29
|
+
if (PsAppLockGraceService.isBackground(next))
|
|
30
|
+
backgroundedAt.current = now;
|
|
31
|
+
if (PsAppLockGraceService.isActive(next)) {
|
|
32
|
+
if (PsAppLockGraceService.isExpired(backgroundedAt.current, now, graceSeconds))
|
|
33
|
+
setIsHeld(true);
|
|
34
|
+
backgroundedAt.current = null;
|
|
35
|
+
}
|
|
36
|
+
setAppState(next);
|
|
37
|
+
});
|
|
38
|
+
return () => subscription.remove();
|
|
39
|
+
}, [graceSeconds]);
|
|
40
|
+
const lock = useCallback(() => setIsHeld(true), []);
|
|
41
|
+
const unlock = useCallback(async () => {
|
|
42
|
+
if (isUnlockingRef.current)
|
|
43
|
+
return false;
|
|
44
|
+
isUnlockingRef.current = true;
|
|
45
|
+
setIsUnlocking(true);
|
|
46
|
+
try {
|
|
47
|
+
const { haptics: play, prompt: current } = latest.current;
|
|
48
|
+
const isOk = await PsAppLockService.authenticate(current.message, current.cancelLabel);
|
|
49
|
+
if (isOk)
|
|
50
|
+
setIsHeld(false);
|
|
51
|
+
play(isOk ? 'success' : 'error');
|
|
52
|
+
return isOk;
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
isUnlockingRef.current = false;
|
|
56
|
+
setIsUnlocking(false);
|
|
57
|
+
}
|
|
58
|
+
}, []);
|
|
59
|
+
const isHidden = PsAppLockGraceService.isHidden(appState);
|
|
60
|
+
const shouldPrompt = isLocked && !isHidden;
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (shouldPrompt)
|
|
63
|
+
void unlock();
|
|
64
|
+
}, [shouldPrompt, unlock]);
|
|
65
|
+
return {
|
|
66
|
+
isCovered: isEnabled && isHidden,
|
|
67
|
+
isLocked,
|
|
68
|
+
isUnlocking,
|
|
69
|
+
lock,
|
|
70
|
+
unlock,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export const usePsMenuTiles = () => {
|
|
3
|
+
const [tiles, setTiles] = useState({});
|
|
4
|
+
const onTile = useCallback((key, uri) => {
|
|
5
|
+
setTiles((current) => (current[key] === uri ? current : { ...current, [key]: uri }));
|
|
6
|
+
}, []);
|
|
7
|
+
return { onTile, tiles };
|
|
8
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -25,8 +25,13 @@ export * from './components/ps-mobile-theme-provider';
|
|
|
25
25
|
export * from './components/ps-page-backdrop';
|
|
26
26
|
export * from './components/ps-pallasoft-sign-in-button';
|
|
27
27
|
export * from './components/ps-color-swatches';
|
|
28
|
+
export * from './components/ps-count-badge';
|
|
28
29
|
export * from './components/ps-segmented-control';
|
|
30
|
+
export * from './components/ps-selection-mode';
|
|
31
|
+
export * from './components/ps-tab-bar-provider';
|
|
29
32
|
export * from './components/ps-tabs';
|
|
33
|
+
export * from './components/ps-option-picker';
|
|
34
|
+
export * from './components/ps-search-select-field';
|
|
30
35
|
export * from './components/ps-select';
|
|
31
36
|
export * from './components/ps-skeleton';
|
|
32
37
|
export * from './components/ps-sortable-grid';
|
|
@@ -50,12 +55,14 @@ export * from './hooks/use-ps-document-scanner';
|
|
|
50
55
|
export * from './hooks/use-ps-haptics';
|
|
51
56
|
export * from './hooks/use-ps-mobile-theme';
|
|
52
57
|
export * from './hooks/use-ps-refresh';
|
|
58
|
+
export * from './hooks/use-ps-tab-bar';
|
|
53
59
|
export * from './hooks/use-ps-toast';
|
|
54
60
|
export * from './hooks/use-ps-remote-data';
|
|
55
61
|
export * from './interfaces/ps-document-item';
|
|
56
62
|
export * from './interfaces/ps-document-labels';
|
|
57
63
|
export * from './interfaces/ps-document-scanner-options';
|
|
58
64
|
export * from './interfaces/ps-document-source';
|
|
65
|
+
export * from './interfaces/ps-tab-bar-context-data';
|
|
59
66
|
export * from './interfaces/ps-area-chart-datum';
|
|
60
67
|
export * from './interfaces/ps-cartesian-chart-series';
|
|
61
68
|
export * from './interfaces/ps-donut-chart-datum';
|
|
@@ -77,6 +84,7 @@ export * from './interfaces/ps-text-field-type';
|
|
|
77
84
|
export * from './interfaces/ps-scanned-file';
|
|
78
85
|
export * from './interfaces/use-ps-document-scanner-result';
|
|
79
86
|
export { PsActionMenuService } from './services/ps-action-menu-service';
|
|
87
|
+
export { PsSelectionService } from './services/ps-selection-service';
|
|
80
88
|
export { PsSortableGridService } from './services/ps-sortable-grid-service';
|
|
81
89
|
export { PsDocumentPagerService } from './services/ps-document-pager-service';
|
|
82
90
|
export { PsDocumentZoomService } from './services/ps-document-zoom-service';
|
|
@@ -111,3 +119,14 @@ export * from './interfaces/ps-text-align';
|
|
|
111
119
|
export * from './interfaces/ps-text-tone';
|
|
112
120
|
export * from './interfaces/ps-text-variant';
|
|
113
121
|
export * from './interfaces/ps-sheet-action';
|
|
122
|
+
export * from './interfaces/ps-sheet-leading-kind';
|
|
123
|
+
export * from './interfaces/ps-sheet-page';
|
|
124
|
+
export * from './components/ps-app-lock-screen';
|
|
125
|
+
export * from './components/ps-privacy-cover';
|
|
126
|
+
export * from './constants/ps-biometry-kind';
|
|
127
|
+
export * from './hooks/use-ps-app-lock';
|
|
128
|
+
export * from './interfaces/ps-app-lock-prompt';
|
|
129
|
+
export * from './interfaces/use-ps-app-lock-options';
|
|
130
|
+
export * from './interfaces/use-ps-app-lock-result';
|
|
131
|
+
export { PsAppLockGraceService } from './services/ps-app-lock-grace-service';
|
|
132
|
+
export { PsAppLockService } from './services/ps-app-lock-service';
|
package/dist/index.js
CHANGED
|
@@ -25,8 +25,13 @@ export * from './components/ps-mobile-theme-provider';
|
|
|
25
25
|
export * from './components/ps-page-backdrop';
|
|
26
26
|
export * from './components/ps-pallasoft-sign-in-button';
|
|
27
27
|
export * from './components/ps-color-swatches';
|
|
28
|
+
export * from './components/ps-count-badge';
|
|
28
29
|
export * from './components/ps-segmented-control';
|
|
30
|
+
export * from './components/ps-selection-mode';
|
|
31
|
+
export * from './components/ps-tab-bar-provider';
|
|
29
32
|
export * from './components/ps-tabs';
|
|
33
|
+
export * from './components/ps-option-picker';
|
|
34
|
+
export * from './components/ps-search-select-field';
|
|
30
35
|
export * from './components/ps-select';
|
|
31
36
|
export * from './components/ps-skeleton';
|
|
32
37
|
export * from './components/ps-sortable-grid';
|
|
@@ -50,12 +55,14 @@ export * from './hooks/use-ps-document-scanner';
|
|
|
50
55
|
export * from './hooks/use-ps-haptics';
|
|
51
56
|
export * from './hooks/use-ps-mobile-theme';
|
|
52
57
|
export * from './hooks/use-ps-refresh';
|
|
58
|
+
export * from './hooks/use-ps-tab-bar';
|
|
53
59
|
export * from './hooks/use-ps-toast';
|
|
54
60
|
export * from './hooks/use-ps-remote-data';
|
|
55
61
|
export * from './interfaces/ps-document-item';
|
|
56
62
|
export * from './interfaces/ps-document-labels';
|
|
57
63
|
export * from './interfaces/ps-document-scanner-options';
|
|
58
64
|
export * from './interfaces/ps-document-source';
|
|
65
|
+
export * from './interfaces/ps-tab-bar-context-data';
|
|
59
66
|
export * from './interfaces/ps-area-chart-datum';
|
|
60
67
|
export * from './interfaces/ps-cartesian-chart-series';
|
|
61
68
|
export * from './interfaces/ps-donut-chart-datum';
|
|
@@ -77,6 +84,7 @@ export * from './interfaces/ps-text-field-type';
|
|
|
77
84
|
export * from './interfaces/ps-scanned-file';
|
|
78
85
|
export * from './interfaces/use-ps-document-scanner-result';
|
|
79
86
|
export { PsActionMenuService } from './services/ps-action-menu-service';
|
|
87
|
+
export { PsSelectionService } from './services/ps-selection-service';
|
|
80
88
|
export { PsSortableGridService } from './services/ps-sortable-grid-service';
|
|
81
89
|
export { PsDocumentPagerService } from './services/ps-document-pager-service';
|
|
82
90
|
export { PsDocumentZoomService } from './services/ps-document-zoom-service';
|
|
@@ -107,3 +115,14 @@ export * from './interfaces/ps-text-align';
|
|
|
107
115
|
export * from './interfaces/ps-text-tone';
|
|
108
116
|
export * from './interfaces/ps-text-variant';
|
|
109
117
|
export * from './interfaces/ps-sheet-action';
|
|
118
|
+
export * from './interfaces/ps-sheet-leading-kind';
|
|
119
|
+
export * from './interfaces/ps-sheet-page';
|
|
120
|
+
export * from './components/ps-app-lock-screen';
|
|
121
|
+
export * from './components/ps-privacy-cover';
|
|
122
|
+
export * from './constants/ps-biometry-kind';
|
|
123
|
+
export * from './hooks/use-ps-app-lock';
|
|
124
|
+
export * from './interfaces/ps-app-lock-prompt';
|
|
125
|
+
export * from './interfaces/use-ps-app-lock-options';
|
|
126
|
+
export * from './interfaces/use-ps-app-lock-result';
|
|
127
|
+
export { PsAppLockGraceService } from './services/ps-app-lock-grace-service';
|
|
128
|
+
export { PsAppLockService } from './services/ps-app-lock-service';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PsAppLockNativeOptions {
|
|
2
|
+
cancelLabel: string;
|
|
3
|
+
disableDeviceFallback: boolean;
|
|
4
|
+
promptMessage: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PsAppLockNativeResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PsAppLockNative {
|
|
10
|
+
authenticateAsync: (options: PsAppLockNativeOptions) => Promise<PsAppLockNativeResult>;
|
|
11
|
+
getEnrolledLevelAsync: () => Promise<number>;
|
|
12
|
+
supportedAuthenticationTypesAsync: () => Promise<number[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,10 +4,12 @@ export interface PsMenuItem {
|
|
|
4
4
|
children?: PsMenuItem[];
|
|
5
5
|
iconKey?: PsMobileIconKey;
|
|
6
6
|
id: string;
|
|
7
|
+
imageUri?: string;
|
|
7
8
|
isChecked?: boolean;
|
|
8
9
|
isDanger?: boolean;
|
|
9
10
|
isDisabled?: boolean;
|
|
10
11
|
label: string;
|
|
12
|
+
monogram?: string;
|
|
11
13
|
onSelect: () => void;
|
|
12
14
|
subtitle?: string;
|
|
13
15
|
tone?: PsMenuItemTone;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PsMenuTileShape = 'circle' | 'rounded';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|