nice-elements 1.14.1 → 1.15.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/CHANGELOG.md +18 -0
- package/CLAUDE.md +89 -0
- package/README.md +3 -1
- package/bower.json +1 -1
- package/dist/nice.js +590 -83
- package/dist/nice.min.js +1 -1
- package/dist/style.css +180 -1
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +1 -1
- package/package.json +2 -2
- package/src/components/nice-badges-list/nice-badges-list.html +13 -0
- package/src/components/nice-badges-list/nice-badges-list.js +135 -0
- package/src/components/nice-badges-list/nice-badges-list.scss +75 -0
- package/src/components/nice-checkbox/nice-checkbox.html +1 -1
- package/src/components/nice-date/nice-date.js +3 -1
- package/src/components/nice-date-range/nice-date-range.js +7 -7
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +3 -3
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +7 -2
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +2 -2
- package/src/components/nice-dialog/nice-dialog.html +16 -0
- package/src/components/nice-dialog/nice-dialog.js +47 -0
- package/src/components/nice-dialog/nice-dialog.scss +126 -0
- package/src/components/nice-dropdown/nice-dropdown.js +4 -1
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +3 -1
- package/src/components/nice-input/nice-input.js +12 -8
- package/src/components/nice-no-data/nice-no-data.js +3 -1
- package/src/components/nice-number/nice-number.html +23 -9
- package/src/components/nice-number/nice-number.js +81 -12
- package/src/components/nice-percent/nice-percent.js +5 -3
- package/src/components/nice-popup/nice-popup.js +2 -2
- package/src/components/nice-search/nice-search.html +2 -4
- package/src/components/nice-search/nice-search.js +32 -6
- package/src/components/nice-svgs/nice-svgs.html +165 -20
- package/src/components/nice-table/nice-table.js +9 -4
- package/src/components/nice-view/_nice-view.scss +10 -1
- package/src/components/nice-view/nice-view.html +1 -0
- package/src/components/nice-wrapper/nice-wrapper.js +3 -1
- package/src/components/nice-yesno/nice-yesno.js +4 -2
- package/src/services/nice-service.js +16 -1
- package/src/styles/_nice.scss +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.15.0 (18.11.2026)
|
|
4
|
+
|
|
5
|
+
- created nice badges list component,
|
|
6
|
+
- created nice dialog component,
|
|
7
|
+
- added decimal support to nice number (accepts "1.5" and "1,5", localized decimal separator),
|
|
8
|
+
- added lang attribute to nice number,
|
|
9
|
+
- fixed nice number decimals rounding and decimal default-value,
|
|
10
|
+
- fixed nice checkbox description not showing,
|
|
11
|
+
- fixed nice date range not loading,
|
|
12
|
+
- fixed nice datetime picker date/time flags, no-margin and enable-ok-buttons,
|
|
13
|
+
- fixed nice datetimerange picker 2 min-date and max-date not passed to calendars,
|
|
14
|
+
- fixed nice input, nice number and nice percent valid binding,
|
|
15
|
+
- fixed nice input is-focused and text-area-lines default,
|
|
16
|
+
- on/off attributes treat "false" as off,
|
|
17
|
+
- worked on nice table, nice popup, nice search and nice view,
|
|
18
|
+
- created icons for example components sidebar,
|
|
19
|
+
- updated example documentation
|
|
20
|
+
|
|
3
21
|
## v1.14.1 (11.11.2026)
|
|
4
22
|
|
|
5
23
|
- fixed nice upload progress showing over text,
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
`nice-elements` is a UI component library for Olaii's AngularJS **1.5.8** webapps (module `niceElements`). Everything is plain ES-in-the-browser JavaScript (no bundler, no modules), Bootstrap 3 and SCSS. There are no tests.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm run build # grunt default task → regenerates dist/
|
|
13
|
+
npm run serve # demo app on http://localhost:3031 (node server.js)
|
|
14
|
+
npx eslint src # lint (eslint.config.mjs; not part of the build)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Build and how the demo loads code
|
|
18
|
+
|
|
19
|
+
- `grunt` compiles `src/styles/style.scss` → `dist/style.css` / `style.min.css`, turns every `src/{components,directives,modals}/**/*.html` into `$templateCache` entries (`ngtemplates`), and concatenates `src/nice.js` + all component/filter/directive/service/modal JS + templates into `dist/nice.js`, then uglifies to `nice.min.js`.
|
|
20
|
+
- `dist/` is committed and consumed by the apps, so **run the build after changes** and commit `dist/` along with `src/`.
|
|
21
|
+
- The demo (`demo/index.html`) loads each component **JS from `src/` directly** (one `<script>` per file) but **CSS from `dist/style.min.css`**. JS/HTML changes show up on reload; SCSS changes need `npm run build` first.
|
|
22
|
+
- `templateUrl` is always the repo path, e.g. `'src/components/nice-x/nice-x.html'`. That path is both the `$templateCache` key in `dist` and the URL the demo server serves, so keep this exact form.
|
|
23
|
+
|
|
24
|
+
## Component layout
|
|
25
|
+
|
|
26
|
+
Each component lives in `src/components/nice-<name>/` with `nice-<name>.js`, `.html` and `.scss` (some older ones use `_nice-<name>.scss`). Directives are registered with `angular.module('niceElements').directive('nice<Name>', ...)` with an `@ngdoc` header comment that documents usage.
|
|
27
|
+
|
|
28
|
+
Adding a component means touching all of these:
|
|
29
|
+
|
|
30
|
+
1. `src/components/nice-<name>/` files
|
|
31
|
+
2. `@import` the SCSS in `src/styles/_nice.scss`
|
|
32
|
+
3. `<script>` tag in `demo/index.html`
|
|
33
|
+
4. Route entry in the `routes` array in `demo/app.js` (name, path, fileName, sidebar icon)
|
|
34
|
+
5. Example page `demo/examples/nice-<name>.html` (see below)
|
|
35
|
+
6. Sidebar icon: add a `<symbol id="icon-...">` (24×24 viewBox, filled paths) to `src/components/nice-svgs/nice-svgs.html`
|
|
36
|
+
7. List it under Components in `README.md`
|
|
37
|
+
|
|
38
|
+
## Example pages (demo docs)
|
|
39
|
+
|
|
40
|
+
**Always document the component on its example page** (`demo/examples/nice-<name>.html`) and keep it in sync when attributes change. Pages use `ng-controller='ExampleCtrl'` (`demo/examples/example.js`, shared by all pages) inside a `<nice-view nice-title="..." nice-icon="{{ meta.icon }}">`. Include:
|
|
41
|
+
|
|
42
|
+
- live examples next to `<pre class="prettyprint">` usage snippets
|
|
43
|
+
- an attribute table at the end, in its own `<nice-wrapper>`:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<nice-wrapper>
|
|
47
|
+
<div class="table-responsive">
|
|
48
|
+
<table class="table table-hover nice-table">
|
|
49
|
+
<thead>
|
|
50
|
+
<tr>
|
|
51
|
+
<th>Command</th>
|
|
52
|
+
<th>Description</th>
|
|
53
|
+
<th>Default</th>
|
|
54
|
+
</tr>
|
|
55
|
+
</thead>
|
|
56
|
+
<tbody>
|
|
57
|
+
<tr>
|
|
58
|
+
<td>attribute-name</td>
|
|
59
|
+
<td>What it does</td>
|
|
60
|
+
<td>null</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</div>
|
|
65
|
+
</nice-wrapper>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Conventions
|
|
69
|
+
|
|
70
|
+
- **Theming**: style with the `--nice-*` CSS custom properties defined in `src/styles/_variables.scss` (`--nice-primary-color`, `--nice-border-color`, `--nice-border-radius`, `--nice-card-bg`, …), not hard-coded colors. SCSS `$screen-*` breakpoints come from `_bootstrap-variables.scss`.
|
|
71
|
+
- **Boolean "@" attributes**: use `NiceService.bindFlag($scope, $attrs, 'name')` / `NiceService.isOn()` so `"false"` and empty strings count as off.
|
|
72
|
+
- **Translations**: angular-gettext with `translate-context="Nice"` on user-facing strings in templates.
|
|
73
|
+
- **Dialogs**: ngDialog is a peer dependency. Library dialogs use `<nice-dialog>` and are opened with `className: 'nice-ngdialog', showClose: false`.
|
|
74
|
+
- Globals available everywhere: `angular`, `moment`, `_` (lodash 3), `Decimal` (decimal.js), `Popper`.
|
|
75
|
+
|
|
76
|
+
## Releases
|
|
77
|
+
|
|
78
|
+
A version bump touches `package.json`, `package-lock.json`, `bower.json`, the README title (`# Nice elements vX.Y.Z`), `version` in `src/services/nice-service.js`, and a new `CHANGELOG.md` entry (`## vX.Y.Z (D.M.YYYY)` with lowercase bullet list), followed by a rebuild.
|
|
79
|
+
|
|
80
|
+
## Additional notes
|
|
81
|
+
|
|
82
|
+
- Keep the code simple and readable. Do not write complex code. If code snippet is more complex add comments.
|
|
83
|
+
- Before writing new code, read a sibling file in the same folder type (view, modal, directive) and copy its structure — the codebase is very consistent; match it rather than modernizing.
|
|
84
|
+
- Verify with `npm run serve` (port 3031, via `http://localhost:3031/`) to check UI when needed.
|
|
85
|
+
|
|
86
|
+
## Don'ts
|
|
87
|
+
|
|
88
|
+
- Don't upgrade Angular, lodash, Bootstrap, Sass or introduce a bundler/framework.
|
|
89
|
+
- Don't use Bootstrap for anything but the grid system.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Nice elements v1.
|
|
3
|
+
# Nice elements v1.15.0
|
|
4
4
|
|
|
5
5
|
Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
|
|
6
6
|
|
|
@@ -51,6 +51,8 @@ Nice elements is an AngularJS v1.5.8 module that contains nice form elements lik
|
|
|
51
51
|
- nice-virtual-scroll
|
|
52
52
|
- nice-on-scroll
|
|
53
53
|
- nice-options
|
|
54
|
+
- nice-badges-list
|
|
55
|
+
- nice-dialog
|
|
54
56
|
- ~~nice-datetime-picker~~ (DEPREACATED)
|
|
55
57
|
- ~~nice-datetimerange-picker~~ (DEPREACATED)
|
|
56
58
|
- ~~nice-dtp~~ (DEPREACATED)
|