Skip to content

Releases: pardnchiu/NanoJSON

v1.2.0

20 Feb 10:07

Choose a tag to compare

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.

翻譯

collapsedconfirmKeyRemove 建構子選項現在能正確傳遞至所有子節點,包含初始 JSON 解析時與執行期間新增節點時。此外,confirmKeyRemove: false 現在能實際跳過刪除確認對話框,此前該對話框為硬編碼、永遠顯示。

Changes

FEAT

  • Propagate collapsed and confirmKeyRemove config options to all nodes created in #jsonToChildren() for both array and object entries
  • Propagate collapsed and confirmKeyRemove to nodes created via insert()
  • Respect confirmKeyRemove: false in JSONEditorNode to bypass the remove confirmation dialog
翻譯
  • #jsonToChildren() 中對陣列與物件條目創建的所有節點傳遞 collapsedconfirmKeyRemove 設定
  • 透過 insert() 創建的節點同樣傳遞 collapsedconfirmKeyRemove
  • JSONEditorNode 現在實際尊重 confirmKeyRemove: false 設定,可跳過刪除確認對話框

REFACTOR

  • Introduce #config private field in JSONEditor to persist constructor config, replacing the pattern of passing config as 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

01 Jan 07:37

Choose a tag to compare

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, add text-align: left to 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

27 Nov 11:14

Choose a tag to compare

Fix

  • Enhanced the value input validation regex to only allow valid number formats.

v1.1.4-v1.1.5

27 Nov 10:52

Choose a tag to compare

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

27 Oct 07:28

Choose a tag to compare

Features

  • Allow importing CSS via custom paths
    editor = new JSONEditor({
       ...
       css: "https://cdn.jsdelivr.net/npm/@pardnchiu/nanojson@1.1.3/dist/NanoJSON.css",
       ...
    });
    

v1.1.2

02 Oct 07:40

Choose a tag to compare

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

18 Jul 18:43

Choose a tag to compare

Clear README history and release v1.0.0


清空 README 記錄並釋出 v1.0.0

v0.4.0

07 Jul 04:23

Choose a tag to compare

v0.4.0 Pre-release
Pre-release

Refactor

  • Remove all obfuscated code
  • Change project to MIT

重構

  • 移除全部混淆代碼
  • 專案改為 MIT

v0.3.4

25 Jan 05:53

Choose a tag to compare

v0.3.4 Pre-release
Pre-release
  • Fix bugs。

  • 修正 Bugs。

v0.3.3

24 Jan 18:19

Choose a tag to compare

v0.3.3 Pre-release
Pre-release

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。