Releases: pardnchiu/NanoJSON
Releases · pardnchiu/NanoJSON
v1.2.0
v1.1.7 -> v1.2.0
Summary
collapsed and confirmKeyRemove constructor options now propagate correctly to all child nodes — both during initial JSON parsing and when inserting new nodes at runtime. Additionally, confirmKeyRemove: false now actually suppresses the remove confirmation dialog, which was previously hardcoded to always appear.
翻譯
collapsed 與 confirmKeyRemove 建構子選項現在能正確傳遞至所有子節點,包含初始 JSON 解析時與執行期間新增節點時。此外,confirmKeyRemove: false 現在能實際跳過刪除確認對話框,此前該對話框為硬編碼、永遠顯示。
Changes
FEAT
- Propagate
collapsedandconfirmKeyRemoveconfig options to all nodes created in#jsonToChildren()for both array and object entries - Propagate
collapsedandconfirmKeyRemoveto nodes created viainsert() - Respect
confirmKeyRemove: falseinJSONEditorNodeto bypass the remove confirmation dialog
翻譯
- 在
#jsonToChildren()中對陣列與物件條目創建的所有節點傳遞collapsed與confirmKeyRemove設定 - 透過
insert()創建的節點同樣傳遞collapsed與confirmKeyRemove JSONEditorNode現在實際尊重confirmKeyRemove: false設定,可跳過刪除確認對話框
REFACTOR
- Introduce
#configprivate field inJSONEditorto persist constructor config, replacing the pattern of passingconfigas an argument to#init() - Remove trailing semicolons on class method definitions and standardize arrow function parameter style across both model files
翻譯
- 在
JSONEditor中引入#config私有欄位持久化建構子設定,取代將config作為參數傳入#init()的模式 - 移除類別方法定義的尾部分號,並統一兩個 Model 檔案中箭頭函式的參數風格
Files Changed
| File | Status | Tag |
|---|---|---|
src/model/JSONEditor.js |
Modified | FEAT, REFACTOR |
src/model/JSONEditorNode.js |
Modified | FEAT, REFACTOR |
dist/NanoJSON.js |
Modified | FEAT |
dist/NanoJSON.esm.js |
Modified | FEAT |
doc.md |
Added | DOC |
doc.zh.md |
Added | DOC |
README.md |
Modified | DOC |
README.zh.md |
Modified | DOC |
update.md |
Deleted | DOC |
package.json |
Modified | CHORE |
page/live.html |
Modified | STYLE |
Generated by SKILL
v1.1.7
FIX
- [valueInput.js]: Fix number input validation to allow leading minus and decimal point (
-and.)
STYLE
- [src/sass/NanoJSON.scss]: Add
width: 100%to pre element, addtext-align: leftto textarea
DOC
- [README.md]: Add ChatGPT translation note, reorganize table of contents, adjust section titles and descriptions, remove Author badge, move license description to separate section
- [README.zh.md]: Adjust table of contents structure, change heading to "三大核心特色", remove Author badge, move license description to separate section, add supplementary section
FIX
- [valueInput.js]: 修正數字輸入驗證邏輯,允許輸入負號與小數點前導符號(
-和.)
STYLE
- [src/sass/NanoJSON.scss]: pre 元素新增
width: 100%、textarea 新增text-align: left
DOC
- [README.md]: 新增 ChatGPT 翻譯註記、重新組織目錄結構、調整段落標題與內容描述、移除 Author badge、移動授權說明至獨立章節
- [README.zh.md]: 調整目錄結構、標題層級改為「三大核心特色」、移除 Author badge、移動授權說明至獨立章節、新增補充章節
v1.1.6
v1.1.4-v1.1.5
Update
- Updated createElement function to enhance element creation and event binding.
- Updated getJSON function to handle various data types more effectively.
- Refactored keyInput and valueInput functions for better clarity and functionality.
v1.1.3
v1.1.2
Features
- Added readonly mode support:
enable(): Method to enable editing mode.disable(): Method to disable editing and enter readonly mode.- Hides action buttons and disables inputs in readonly state.
功能
- 新增唯讀模式:
enable():啟用編輯模式。disable():禁用編輯並進入唯讀模式。- 唯讀狀態下隱藏操作按鈕並禁用輸入。
v1.0.0
v0.4.0
v0.3.4
v0.3.3
Refactor
- Change to child node-based block rendering approach:
Introduce partition rendering logic based on child nodes, reducing overall DOM update frequency.
Modifications only affect related child nodes instead of regenerating the entire UI.
重構
- 改以子節點為區塊的渲染方式:
引入基於子節點的分區渲染邏輯,減少了整體 DOM 更新次數。
修改僅影響到相關的子節點,而非重新生成整體 UI。