@yuneta/gobj-ui 7.26.46 → 7.26.47

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/README.md CHANGED
@@ -229,9 +229,23 @@ Published as `@yuneta/gobj-ui`. Built on top of [`@yuneta/gobj-js`](https://gith
229
229
  > yui_shell_push_escape(shell, "modal", ask_then_close, close_now);
230
230
  > ```
231
231
  >
232
- > And a trap whose panel left the document without being released is dropped,
233
- > said in the log, the next time the stack is read: it no longer stands for an
234
- > overlay that is gone.
232
+ > **And it moves no browser history (7.26.47).** The markers of the overlays it
233
+ > closes are left in place, inert, as those of overlays a navigation drains: a
234
+ > later Back lands on one and is absorbed. In 7.26.46 the stop retired them with
235
+ > `history.back()`, which is asynchronous, and a stopped shell no longer hears
236
+ > where it lands: a logout followed by a new shell in the same turn had it take
237
+ > the new shell's first marker (Chromium), and the next Back left the app. A
238
+ > question open at the stop answers what Escape answers -- `false` for a yes/no
239
+ > or a danger question, `"cancel"` for yes/no/cancel --; a
240
+ > `yui_shell_confirm_ok()` resolves as on every close, so code awaiting it runs
241
+ > after the stop and must not take the shell for alive.
242
+ >
243
+ > A trap whose panel is out of the document is not the top: the top is the
244
+ > highest trap whose panel is in it, so a trap left behind by an owner torn
245
+ > down with it no longer stands for an overlay that is gone. It is skipped, not
246
+ > dropped: it leaves the stack only by its `release()`, and a panel that only
247
+ > moves (taken out and put back) has its trap again (7.26.47; 7.26.46 dropped
248
+ > it for good).
235
249
 
236
250
  ## Two maintained lines
237
251
 
@@ -3656,12 +3670,40 @@ question. A reload or a close by code still discards the open editor (it is
3656
3670
  cancelled before the rows go): asking is the host's part, and `edited` is
3657
3671
  what tells it to.
3658
3672
 
3673
+ An edit the reader CANCELS -- Escape, or a box left as it was -- gives back the
3674
+ `edited` and `changes` the form had when that editor opened (7.26.47+): what was
3675
+ typed is gone, and up to 7.26.46 it still counted, so closing asked about a
3676
+ change that no longer existed. Nothing is given back when anything else changed
3677
+ the form while the editor was open (another cell committed, a paste): that
3678
+ change is real.
3679
+
3680
+ Enter in a box of the form never submits it (7.26.47+). The table's "add"
3681
+ button was the form's first submit button, so Enter in any field -- or in a cell
3682
+ editor that stays open -- added an empty row; and a form of a single text box
3683
+ reloaded the page.
3684
+
3659
3685
  A `time` / `now` column of a table is edited in a `datetime-local` box, to the
3660
3686
  second, read and written as the form's own time field is (`form_time_value.js`:
3661
3687
  an epoch in seconds, or an ISO text for a string column). Up to 7.26.45 it was
3662
3688
  Tabulator's `datetime` editor with a luxon `format`, and nothing gives gobj-ui
3663
3689
  luxon: it opened empty and threw when committed. Luxon is not taken in for one
3664
- editor.
3690
+ editor. The cell shows the same local clock, `2026-03-14 09:26:53` (7.26.47+; it
3691
+ showed the raw epoch).
3692
+
3693
+ A date with a part cleared is not a value. The box answers `""` for it, as for an
3694
+ empty box, and only `validity.badInput` tells them apart: Enter leaves the editor
3695
+ open, outlined and with `aria-invalid`, until the date is whole again or Escape;
3696
+ leaving the cell cancels, and the cell keeps its time (7.26.47+; up to 7.26.46
3697
+ one Backspace and Enter erased the stored time). **To clear a time on purpose,
3698
+ clear every part of the box**: an empty box writes `null`. Inside the box Tab
3699
+ moves between its parts, as the browser does.
3700
+
3701
+ The form's own time field and the cell editor read and write a column the same
3702
+ way (7.26.47+): an epoch in seconds, an ISO text for a `string` column, and an
3703
+ empty box for a column that holds no time. Up to 7.26.46 the field read every
3704
+ column with `parseInt` -- an ISO text as 2026 seconds, in January 1970 --, wrote
3705
+ the epoch into a `string` column, and showed no time as January 1970, which a
3706
+ save wrote back as `0`.
3665
3707
 
3666
3708
  A table hears the reader through Tabulator's `dataChanged`, which Tabulator
3667
3709
  does not say for `setData()` / `replaceData()`, nor when its `history` module
@@ -3739,11 +3781,15 @@ so it governs the row's own click, which toggles the row (a row drawn while it
3739
3781
  was `false` stays unselectable until it is drawn again). With the defaults
3740
3782
  nothing is selected.
3741
3783
 
3742
- The checkbox column (`with_checkbox`) asks `selectable` too, and is not drawn
3743
- when the form is not selectable (7.26.46): Tabulator's row box ticks before its
3744
- toggle is refused, and its header box selects every row without asking. A
3745
- click in a NESTED table selects in that table only; it bubbled up to the row
3746
- holding the table, which toggled too.
3784
+ The checkbox column (`with_checkbox`) asks `selectable` too, and is hidden while
3785
+ the form is not selectable (7.26.46): Tabulator's row box ticks before its
3786
+ toggle is refused, and its header box selects every row without asking. It
3787
+ follows `selectable` written at any time, in every table (7.26.47+; in 7.26.46
3788
+ it was read when the table was built, and a `false` written later left boxes
3789
+ that ticked without selecting). Its header box is named *select all rows*, a
3790
+ row's *select row*, and both change language with the form (consumer key
3791
+ `select all rows`, 7.26.47). A click in a NESTED table selects in that table
3792
+ only; it bubbled up to the row holding the table, which toggled too.
3747
3793
 
3748
3794
  ```js
3749
3795
  gobj_create("form", "C_YUI_FORM", {
@@ -4059,6 +4105,18 @@ next to a version raised on main with the old range, deployed under that
4059
4105
  version, and a package.json MOVED after a hand raise was taken for one born
4060
4106
  with the range; and `7.26.45` refused every shallow clone.
4061
4107
 
4108
+ Since `7.26.47` a move git does not see as a rename is followed too -- a `git
4109
+ mv` with many changes (below `-M`'s 50%), a removal and an addition in two
4110
+ commits, a copy: where the package.json is BORN with the range and the version
4111
+ of the working tree, every package.json the repository had before it is read,
4112
+ by version. In a repository of two apps, a new one born with the range beside
4113
+ one that once had its number with another range has its version raised once
4114
+ more than needed -- a number spent, never a bundle under an old one. A state
4115
+ that is not json (a stray comma, conflict markers) is read by its lines, every
4116
+ `"version"` it holds: up to `7.26.46` one such commit anywhere in the history
4117
+ refused the app on every round, without naming the commit. A package.json of
4118
+ the working tree that is not json is refused naming the file.
4119
+
4062
4120
  ### Colour: a brand token as INK takes `-on-scheme`, as a FILL it does not
4063
4121
 
4064
4122
  A Bulma brand colour (`--bulma-link`, `--bulma-danger`, …) is built to carry
@@ -4426,7 +4484,13 @@ well (``t[`call`](x, k)``, `t[M](x, k)` with `const M = "call"`, `i18next[T](k)`
4426
4484
  with `const T = "t"`), and so is a SPREAD of an array the source writes out:
4427
4485
  `t(...["k"])`, `t.call(x, ...["k"])`, `t(...KEYS)` and `t.apply(x, KEYS)` with
4428
4486
  `const KEYS = ["k"]` -- each element of the const read as `KEYS[0]`,
4429
- `KEYS[1]`... (up to `7.26.45` none of them was read, and nothing failed).
4487
+ `KEYS[1]`... (up to `7.26.45` none of them was read, and nothing failed). Since
4488
+ `7.26.47` each of those is THAT element, so `t.apply(null, ["save", "Save it"])`
4489
+ asks for "save" and not for its default value (`7.26.46` read every element of
4490
+ the array at every position, and asked for both), and a const ALIAS of such an
4491
+ array (`const B = KEYS; t(...B)`), an import of one, and an
4492
+ `Object.freeze([...])` are read as it is (up to `7.26.46` they were spreads of
4493
+ what the source does not write).
4430
4494
  An ARRAY given to it is i18next's list of fallback keys, and
4431
4495
  each one is a key: `t([specific, "generic"])` asks for "generic". A `.bind()`
4432
4496
  that binds a KEY makes a translator whose calls hand i18next its options or its
@@ -4479,6 +4543,12 @@ options). What is followed:
4479
4543
  computed one, `NOTES[verdict]`, every value the object holds; also of a
4480
4544
  COPY of one (since `7.26.32`): `{...BASE, title: "t"}`,
4481
4545
  `Object.assign({}, BASE)`;
4546
+ - an element of a const array literal read by an index the source writes
4547
+ (`LABELS[1]`, `LABELS["1"]`): that element, nothing past the end or in a
4548
+ hole (since `7.26.47`; up to `7.26.46` every element of the array). An
4549
+ index past a spread, a computed one, and an array its scope writes into
4550
+ (`LABELS[0] = k`, `.push()`, `.reverse()`, `.sort()`, `delete`, ...: an
4551
+ element may be another one by then) read every element written out;
4482
4552
  - the element of a const array literal that a `for...of` walks, or that the
4483
4553
  first parameter of a callback of one of the methods above receives (in the
4484
4554
  same forms, and since `7.26.42` also the callback of `Array.from(ROWS, cb)`,
@@ -4654,7 +4724,9 @@ a const alias (`const show = yui_shell_show_info`), a map in a const
4654
4724
  ...)`, and with a spread or an `.apply()` of an array the source writes out,
4655
4725
  `f(shell, ...["k"])`, `f.apply(x, ARGS)` with `const ARGS = [shell, "k"]`,
4656
4726
  since `7.26.46` -- up to `7.26.45` such a spread failed the rule per call, and
4657
- `f[M](...)` was not read); and a `.bind()` of it is read as the
4727
+ `f[M](...)` was not read; in `7.26.46` a const such as ARGS was read at every
4728
+ position as all of its elements, so this very example failed the rule per call
4729
+ with `shell`: each position is its own element since `7.26.47`); and a `.bind()` of it is read as the
4658
4730
  call it prepares, at the positions it binds (since `7.26.43`):
4659
4731
  `yui_shell_show_info.bind(null, shell, "k")` asks for "k", and a parameter
4660
4732
  bound there fails the rule per call as it does when it is handed directly. Up
@@ -5132,8 +5204,9 @@ reading the page in another language:
5132
5204
  `m` a parameter or a `let`, `t[c()? "call" : "apply"]`);
5133
5205
  - a key handed to a translator in a spread of what is no array the source
5134
5206
  writes out (`t(...args)`, `t.apply(x, args)` with `args` a parameter, a
5135
- `let`, or a const whose array holds a spread or a hole): from the spread on,
5136
- no position is known;
5207
+ `let`, or a const whose array holds a spread or a hole; a const alias, an
5208
+ import or an `Object.freeze()` of an array written out is read, since
5209
+ `7.26.47`): from the spread on, no position is known;
5137
5210
  - a translator handed to a FUNCTION (`{t: t}`, `yui_tabulator_lang(t)`,
5138
5211
  `run(t)`) or to any method but those listed above (`keys.reduce(t)`,
5139
5212
  `keys.sort(t)`, an alias of a method, `Reflect.apply()`): only those
@@ -5154,9 +5227,14 @@ reading the page in another language:
5154
5227
  (`const ds = el.dataset; ds.i18nTitle = k`), by `Object.assign()` into it,
5155
5228
  or named by a `let`;
5156
5229
  - what is written INTO a `const` table after its declaration
5157
- (`TABLE.k = "k"`): the reader follows a const to its value, and only a
5158
- marked `let` is followed into what is written into it (a published list
5159
- that is written into fails: above);
5230
+ (`TABLE.k = "k"`, `LIST[0] = "k"`, `LIST.push("k")`): the reader follows a
5231
+ const to its value, and only a marked `let` is followed into what is
5232
+ written into it (a published list that is written into fails: above). An
5233
+ array written into in its own scope is read by every element at any index
5234
+ (above); written through an alias (`const B = LIST; B.reverse()`), from a
5235
+ module that imports it, or by a function it is handed to (`shuffle(LIST)`),
5236
+ it is not seen, and an element
5237
+ read by its index is the one the source writes there;
5160
5238
  - what a module of a package exports (gobj-js, i18next), and an exported
5161
5239
  `let`;
5162
5240
  - in the library's forwarder search, a key stored in a heap object or a DOM