@jsb188/app-settings-web 1.1.12 → 1.1.13
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/LICENSE +21 -0
- package/package.json +16 -8
- package/src/ui/AppSettingsUI.tsx +21 -21
- package/tsconfig.json +0 -13
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jsb188
|
|
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/package.json
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsb188/app-settings-web",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "App settings module for web.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "MIT",
|
|
6
6
|
"author": "jsb188",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./src/main.ts"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@jsb188/app": "1.1.
|
|
13
|
-
"@jsb188/graphql": "1.1.
|
|
14
|
-
"@jsb188/react": "1.1.
|
|
15
|
-
"@jsb188/react-web": "1.1.
|
|
12
|
+
"@jsb188/app": "1.1.13",
|
|
13
|
+
"@jsb188/graphql": "1.1.13",
|
|
14
|
+
"@jsb188/react": "1.1.13",
|
|
15
|
+
"@jsb188/react-web": "1.1.13",
|
|
16
16
|
"jotai": "^2.20.2",
|
|
17
17
|
"react": "^19.3.0",
|
|
18
18
|
"react-dom": "^19.3.0",
|
|
19
19
|
"react-router": "^8.4.0",
|
|
20
|
-
"@jsb188/form": "1.1.
|
|
20
|
+
"@jsb188/form": "1.1.13"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
24
24
|
"build": "tsc"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"src/**/*.{ts,tsx,css,svg}",
|
|
28
|
+
"!**/*.test.*",
|
|
29
|
+
"!**/*.spec.*",
|
|
30
|
+
"!**/tests/**",
|
|
31
|
+
"!**/*.md",
|
|
32
|
+
"!**/.DS_Store"
|
|
33
|
+
]
|
|
26
34
|
}
|
package/src/ui/AppSettingsUI.tsx
CHANGED
|
@@ -80,7 +80,7 @@ export const AppSettingsContentContainer = forwardRef<HTMLDivElement, AppSetting
|
|
|
80
80
|
}
|
|
81
81
|
{...other}
|
|
82
82
|
>
|
|
83
|
-
{notReady ? <BigLoading color=
|
|
83
|
+
{notReady ? <BigLoading color="alt" /> : children}
|
|
84
84
|
</div>
|
|
85
85
|
);
|
|
86
86
|
});
|
|
@@ -94,8 +94,8 @@ AppSettingsContentContainer.displayName = 'AppSettingsContentContainer';
|
|
|
94
94
|
const AppSettingsSideNavItem = (p: AppSettingsSideNavOption) => {
|
|
95
95
|
if (p.__type === 'LIST_SUBTITLE') {
|
|
96
96
|
return (
|
|
97
|
-
<div className=
|
|
98
|
-
<span className=
|
|
97
|
+
<div className="px_xs py_4 ml_2 mb_2 title">
|
|
98
|
+
<span className="cl_lt ft_sm ft_medium">{p.text}</span>
|
|
99
99
|
</div>
|
|
100
100
|
);
|
|
101
101
|
}
|
|
@@ -104,22 +104,22 @@ const AppSettingsSideNavItem = (p: AppSettingsSideNavOption) => {
|
|
|
104
104
|
|
|
105
105
|
return (
|
|
106
106
|
<button
|
|
107
|
-
type=
|
|
107
|
+
type="button"
|
|
108
108
|
aria-current={selected ? 'page' : undefined}
|
|
109
109
|
disabled={!onClick}
|
|
110
110
|
className={cn('r_sm h_item mb_2 w_f link px_xs py_4', selected ? '_bg shadow_line_soft disabled cl_df' : 'bg_hv cl_df')}
|
|
111
111
|
onClick={onClick && !selected ? () => onClick(value) : undefined}
|
|
112
112
|
>
|
|
113
113
|
{iconName && (
|
|
114
|
-
<span className=
|
|
114
|
+
<span className="w_25 h_center shift_left mr_4 ft_sm">
|
|
115
115
|
<Icon name={iconName} />
|
|
116
116
|
</span>
|
|
117
117
|
)}
|
|
118
118
|
|
|
119
|
-
<span className=
|
|
119
|
+
<span className="ellip pb_1 shift_down lh_1">{text}</span>
|
|
120
120
|
|
|
121
121
|
{rightIconName && (
|
|
122
|
-
<span className=
|
|
122
|
+
<span className="ic_sm ml_xs">
|
|
123
123
|
<Icon name={rightIconName} />
|
|
124
124
|
</span>
|
|
125
125
|
)}
|
|
@@ -139,10 +139,10 @@ export const AppSettingsSideNav = (p: {
|
|
|
139
139
|
const { selectedValue, options, onClickItem } = p;
|
|
140
140
|
|
|
141
141
|
return (
|
|
142
|
-
<nav className=
|
|
142
|
+
<nav className="f_stretch w_270 py_lg bg_fade y_scr always">
|
|
143
143
|
{options.map((list, i) => (
|
|
144
144
|
<div
|
|
145
|
-
className=
|
|
145
|
+
className="px_df py_10"
|
|
146
146
|
key={i}
|
|
147
147
|
>
|
|
148
148
|
{list.map((item) => (
|
|
@@ -177,32 +177,32 @@ export const AppSettingsFloatingSaveButton = forwardRef<HTMLDivElement, AppSetti
|
|
|
177
177
|
hasChanges ? 'visible shadow_line_alt' : 'noclick',
|
|
178
178
|
)}
|
|
179
179
|
>
|
|
180
|
-
<div className=
|
|
180
|
+
<div className="h_item px_xs">{i18n.t('c.unsaved_changes_msg')}</div>
|
|
181
181
|
|
|
182
|
-
<div className=
|
|
183
|
-
<div className=
|
|
182
|
+
<div className="h_right">
|
|
183
|
+
<div className="pill pill_sm h_center mr_xs">
|
|
184
184
|
<button
|
|
185
|
-
type=
|
|
186
|
-
className=
|
|
185
|
+
type="button"
|
|
186
|
+
className="text_link"
|
|
187
187
|
disabled={!hasChanges || saving}
|
|
188
188
|
onClick={onReset}
|
|
189
189
|
>
|
|
190
|
-
<span className=
|
|
191
|
-
<Icon name=
|
|
192
|
-
<span className=
|
|
190
|
+
<span className="h_right">
|
|
191
|
+
<Icon name="arrow-back-up" />
|
|
192
|
+
<span className="ml_xs">{i18n.t('c.undo_changes')}</span>
|
|
193
193
|
</span>
|
|
194
194
|
</button>
|
|
195
195
|
</div>
|
|
196
196
|
|
|
197
197
|
<button
|
|
198
|
-
type=
|
|
198
|
+
type="button"
|
|
199
199
|
className={cn('pill pill_df r bg_primary', saving && 'loading')}
|
|
200
200
|
aria-busy={saving || undefined}
|
|
201
201
|
disabled={!hasChanges || saving}
|
|
202
202
|
onClick={onSave}
|
|
203
203
|
>
|
|
204
204
|
{saving && (
|
|
205
|
-
<div className=
|
|
205
|
+
<div className="abs_full v_center">
|
|
206
206
|
<ActivityDots />
|
|
207
207
|
</div>
|
|
208
208
|
)}
|
|
@@ -211,8 +211,8 @@ export const AppSettingsFloatingSaveButton = forwardRef<HTMLDivElement, AppSetti
|
|
|
211
211
|
{i18n.t('c.save_changes')}
|
|
212
212
|
</span>
|
|
213
213
|
<ShortcutKey
|
|
214
|
-
letter=
|
|
215
|
-
className=
|
|
214
|
+
letter="S"
|
|
215
|
+
className="bg_darker_3 shift_up ml_7"
|
|
216
216
|
/>
|
|
217
217
|
</button>
|
|
218
218
|
</div>
|
package/tsconfig.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "Bundler",
|
|
6
|
-
"allowImportingTsExtensions": true,
|
|
7
|
-
"jsx": "react-jsx",
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true
|
|
11
|
-
},
|
|
12
|
-
"include": ["src/**/*"]
|
|
13
|
-
}
|